pptx-react-viewer 2.15.3 → 2.16.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 (99) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-R7BYGQX5.js → AiChatPanel-OHB6CVLY.js} +22 -22
  3. package/dist/AiChatPanel-OHB6CVLY.js.br +0 -0
  4. package/dist/AiChatPanel-OHB6CVLY.js.gz +0 -0
  5. package/dist/{AiChatPanel-OXAKUVYH.mjs → AiChatPanel-UPNVIENY.mjs} +3 -3
  6. package/dist/AiChatPanel-UPNVIENY.mjs.br +0 -0
  7. package/dist/AiChatPanel-UPNVIENY.mjs.gz +0 -0
  8. package/dist/{Model3DScene-BK7RWDCU.js → Model3DScene-7FKWPESH.js} +2 -2
  9. package/dist/Model3DScene-7FKWPESH.js.br +0 -0
  10. package/dist/Model3DScene-7FKWPESH.js.gz +0 -0
  11. package/dist/{Model3DScene-TPUVF4FY.mjs → Model3DScene-KEUY3M7X.mjs} +1 -1
  12. package/dist/Model3DScene-KEUY3M7X.mjs.br +0 -0
  13. package/dist/Model3DScene-KEUY3M7X.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-FXJ45DC5.mjs → SurfaceChart3DScene-2MLBPJ63.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-FXJ45DC5.mjs.br → SurfaceChart3DScene-2MLBPJ63.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-2MLBPJ63.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-WOLVZOW3.js → SurfaceChart3DScene-NPJQXIGW.js} +2 -2
  18. package/dist/SurfaceChart3DScene-NPJQXIGW.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-NPJQXIGW.js.gz +0 -0
  20. package/dist/{chunk-YBTRSG74.js → chunk-3NDRTC7T.js} +352 -40
  21. package/dist/chunk-3NDRTC7T.js.br +0 -0
  22. package/dist/{chunk-YBTRSG74.js.gz → chunk-3NDRTC7T.js.gz} +0 -0
  23. package/dist/{chunk-RPGAI65Z.mjs → chunk-6ROCCY4M.mjs} +14 -9
  24. package/dist/chunk-6ROCCY4M.mjs.br +0 -0
  25. package/dist/chunk-6ROCCY4M.mjs.gz +0 -0
  26. package/dist/{chunk-T5IS3MGN.js → chunk-7UBDMCI7.js} +3 -3
  27. package/dist/chunk-7UBDMCI7.js.br +0 -0
  28. package/dist/chunk-7UBDMCI7.js.gz +0 -0
  29. package/dist/{chunk-3XJODTAV.js → chunk-DQTTI6D4.js} +362 -341
  30. package/dist/chunk-DQTTI6D4.js.br +0 -0
  31. package/dist/chunk-DQTTI6D4.js.gz +0 -0
  32. package/dist/{chunk-6M6WP2TK.mjs → chunk-ENOHLGJ2.mjs} +344 -40
  33. package/dist/chunk-ENOHLGJ2.mjs.br +0 -0
  34. package/dist/{chunk-6M6WP2TK.mjs.gz → chunk-ENOHLGJ2.mjs.gz} +0 -0
  35. package/dist/{chunk-FHTEL3Q6.js → chunk-IN7D2T4R.js} +373 -375
  36. package/dist/chunk-IN7D2T4R.js.br +0 -0
  37. package/dist/chunk-IN7D2T4R.js.gz +0 -0
  38. package/dist/{chunk-U2UPBBJV.mjs → chunk-LJZFG6YP.mjs} +1 -1
  39. package/dist/chunk-LJZFG6YP.mjs.br +0 -0
  40. package/dist/chunk-LJZFG6YP.mjs.gz +0 -0
  41. package/dist/{chunk-IEXZ2JSO.js → chunk-N6IE34HX.js} +1060 -1055
  42. package/dist/chunk-N6IE34HX.js.br +0 -0
  43. package/dist/chunk-N6IE34HX.js.gz +0 -0
  44. package/dist/{chunk-OPX74QGH.mjs → chunk-RUK5XZGO.mjs} +31 -10
  45. package/dist/chunk-RUK5XZGO.mjs.br +0 -0
  46. package/dist/chunk-RUK5XZGO.mjs.gz +0 -0
  47. package/dist/{chunk-WJNWCKS7.mjs → chunk-ZOOGEDYG.mjs} +131 -133
  48. package/dist/chunk-ZOOGEDYG.mjs.br +0 -0
  49. package/dist/chunk-ZOOGEDYG.mjs.gz +0 -0
  50. package/dist/index.js +39 -39
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +5 -5
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.d.ts +16 -0
  57. package/dist/internals.d.ts.map +1 -1
  58. package/dist/internals.js +78 -78
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +3 -3
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/viewer/index.js +26 -26
  65. package/dist/viewer/index.js.br +0 -0
  66. package/dist/viewer/index.js.gz +0 -0
  67. package/dist/viewer/index.mjs +5 -5
  68. package/dist/viewer/index.mjs.br +0 -0
  69. package/dist/viewer/index.mjs.gz +0 -0
  70. package/package.json +1 -1
  71. package/dist/AiChatPanel-OXAKUVYH.mjs.br +0 -0
  72. package/dist/AiChatPanel-OXAKUVYH.mjs.gz +0 -0
  73. package/dist/AiChatPanel-R7BYGQX5.js.br +0 -0
  74. package/dist/AiChatPanel-R7BYGQX5.js.gz +0 -0
  75. package/dist/Model3DScene-BK7RWDCU.js.br +0 -0
  76. package/dist/Model3DScene-BK7RWDCU.js.gz +0 -0
  77. package/dist/Model3DScene-TPUVF4FY.mjs.br +0 -0
  78. package/dist/Model3DScene-TPUVF4FY.mjs.gz +0 -0
  79. package/dist/SurfaceChart3DScene-FXJ45DC5.mjs.gz +0 -0
  80. package/dist/SurfaceChart3DScene-WOLVZOW3.js.br +0 -0
  81. package/dist/SurfaceChart3DScene-WOLVZOW3.js.gz +0 -0
  82. package/dist/chunk-3XJODTAV.js.br +0 -0
  83. package/dist/chunk-3XJODTAV.js.gz +0 -0
  84. package/dist/chunk-6M6WP2TK.mjs.br +0 -0
  85. package/dist/chunk-FHTEL3Q6.js.br +0 -0
  86. package/dist/chunk-FHTEL3Q6.js.gz +0 -0
  87. package/dist/chunk-IEXZ2JSO.js.br +0 -0
  88. package/dist/chunk-IEXZ2JSO.js.gz +0 -0
  89. package/dist/chunk-OPX74QGH.mjs.br +0 -0
  90. package/dist/chunk-OPX74QGH.mjs.gz +0 -0
  91. package/dist/chunk-RPGAI65Z.mjs.br +0 -0
  92. package/dist/chunk-RPGAI65Z.mjs.gz +0 -0
  93. package/dist/chunk-T5IS3MGN.js.br +0 -0
  94. package/dist/chunk-T5IS3MGN.js.gz +0 -0
  95. package/dist/chunk-U2UPBBJV.mjs.br +0 -0
  96. package/dist/chunk-U2UPBBJV.mjs.gz +0 -0
  97. package/dist/chunk-WJNWCKS7.mjs.br +0 -0
  98. package/dist/chunk-WJNWCKS7.mjs.gz +0 -0
  99. package/dist/chunk-YBTRSG74.js.br +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkFHTEL3Q6_js = require('./chunk-FHTEL3Q6.js');
3
+ var chunkIN7D2T4R_js = require('./chunk-IN7D2T4R.js');
4
4
  var chunk3ISYPBSX_js = require('./chunk-3ISYPBSX.js');
5
- var chunkYBTRSG74_js = require('./chunk-YBTRSG74.js');
5
+ var chunk3NDRTC7T_js = require('./chunk-3NDRTC7T.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 = chunkYBTRSG74_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunk3NDRTC7T_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 = chunkYBTRSG74_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunk3NDRTC7T_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") => {
@@ -85,7 +85,7 @@ function usePresenceTracking({
85
85
  }) {
86
86
  const [remoteUsers, setRemoteUsers] = react.useState([]);
87
87
  const projectorRef = react.useRef(null);
88
- projectorRef.current ??= chunkYBTRSG74_js.createPresenceProjector();
88
+ projectorRef.current ??= chunk3NDRTC7T_js.createPresenceProjector();
89
89
  const projector = projectorRef.current;
90
90
  const lastBroadcastRef = react.useRef(0);
91
91
  const pendingBroadcastRef = react.useRef(null);
@@ -110,7 +110,7 @@ function usePresenceTracking({
110
110
  awareness.setLocalStateField("presence", state);
111
111
  lastBroadcastRef.current = Date.now();
112
112
  };
113
- if (elapsed >= chunkYBTRSG74_js.BROADCAST_THROTTLE_MS) {
113
+ if (elapsed >= chunk3NDRTC7T_js.BROADCAST_THROTTLE_MS) {
114
114
  if (pendingBroadcastRef.current) {
115
115
  clearTimeout(pendingBroadcastRef.current);
116
116
  pendingBroadcastRef.current = null;
@@ -120,7 +120,7 @@ function usePresenceTracking({
120
120
  pendingBroadcastRef.current = setTimeout(() => {
121
121
  pendingBroadcastRef.current = null;
122
122
  flush();
123
- }, chunkYBTRSG74_js.BROADCAST_THROTTLE_MS - elapsed);
123
+ }, chunk3NDRTC7T_js.BROADCAST_THROTTLE_MS - elapsed);
124
124
  }
125
125
  },
126
126
  [awareness, userName, userColor, userAvatar, role]
@@ -200,7 +200,7 @@ function useYjsProvider({ config }) {
200
200
  const departureRef = react.useRef(null);
201
201
  const gateRef = react.useRef(null);
202
202
  if (!gateRef.current) {
203
- gateRef.current = chunkYBTRSG74_js.createSyncGate(() => setSynced(true));
203
+ gateRef.current = chunk3NDRTC7T_js.createSyncGate(() => setSynced(true));
204
204
  }
205
205
  const teardown = react.useCallback(() => {
206
206
  if (timeoutRef.current) {
@@ -220,7 +220,7 @@ function useYjsProvider({ config }) {
220
220
  const buildCleanup = react.useCallback(
221
221
  (provider, yDoc) => () => {
222
222
  announceDeparture();
223
- chunkYBTRSG74_js.clearLocalAwareness(provider.awareness);
223
+ chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
224
224
  provider.destroy();
225
225
  yDoc.destroy();
226
226
  setDoc(null);
@@ -245,9 +245,9 @@ function useYjsProvider({ config }) {
245
245
  if (config.authToken) {
246
246
  opts.password = config.authToken;
247
247
  }
248
- const roomId = chunkYBTRSG74_js.validateRoomId(config.roomId);
248
+ const roomId = chunk3NDRTC7T_js.validateRoomId(config.roomId);
249
249
  const provider = new WebrtcProvider(roomId, yDoc, opts);
250
- departureRef.current = chunkYBTRSG74_js.createDepartureChannel(roomId, provider.awareness);
250
+ departureRef.current = chunk3NDRTC7T_js.createDepartureChannel(roomId, provider.awareness);
251
251
  setDoc(yDoc);
252
252
  setAwareness(provider.awareness);
253
253
  setClientId(provider.awareness.clientID);
@@ -289,13 +289,13 @@ function useYjsProvider({ config }) {
289
289
  if (!config) {
290
290
  return;
291
291
  }
292
- const roomId = chunkYBTRSG74_js.validateRoomId(config.roomId);
293
- const transport = config.transport ?? chunkYBTRSG74_js.resolveTransportForServerUrl(config.serverUrl);
292
+ const roomId = chunk3NDRTC7T_js.validateRoomId(config.roomId);
293
+ const transport = config.transport ?? chunk3NDRTC7T_js.resolveTransportForServerUrl(config.serverUrl);
294
294
  if (transport === "webrtc") {
295
295
  await initWebrtc();
296
296
  return;
297
297
  }
298
- if (chunkYBTRSG74_js.isMixedContentBlocked(config.serverUrl)) {
298
+ if (chunk3NDRTC7T_js.isMixedContentBlocked(config.serverUrl)) {
299
299
  console.warn(
300
300
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
301
301
  );
@@ -309,7 +309,7 @@ function useYjsProvider({ config }) {
309
309
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
310
310
  params: config.authToken ? { token: config.authToken } : void 0
311
311
  });
312
- departureRef.current = chunkYBTRSG74_js.createDepartureChannel(roomId, provider.awareness);
312
+ departureRef.current = chunk3NDRTC7T_js.createDepartureChannel(roomId, provider.awareness);
313
313
  let connected = false;
314
314
  const handleStatus = (event) => {
315
315
  if (event.status === "connected") {
@@ -349,7 +349,7 @@ function useYjsProvider({ config }) {
349
349
  provider.off("status", handleStatus);
350
350
  provider.off("sync", handleSynced);
351
351
  announceDeparture();
352
- chunkYBTRSG74_js.clearLocalAwareness(provider.awareness);
352
+ chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
353
353
  provider.destroy();
354
354
  yDoc.destroy();
355
355
  setDoc(null);
@@ -358,7 +358,7 @@ function useYjsProvider({ config }) {
358
358
  cleanupRef.current = null;
359
359
  setStatus("error");
360
360
  }
361
- }, chunkYBTRSG74_js.CONNECTION_TIMEOUT_MS);
361
+ }, chunk3NDRTC7T_js.CONNECTION_TIMEOUT_MS);
362
362
  }
363
363
  setDoc(yDoc);
364
364
  setAwareness(provider.awareness);
@@ -367,7 +367,7 @@ function useYjsProvider({ config }) {
367
367
  provider.off("status", handleStatus);
368
368
  provider.off("sync", handleSynced);
369
369
  announceDeparture();
370
- chunkYBTRSG74_js.clearLocalAwareness(provider.awareness);
370
+ chunk3NDRTC7T_js.clearLocalAwareness(provider.awareness);
371
371
  provider.destroy();
372
372
  yDoc.destroy();
373
373
  setDoc(null);
@@ -393,7 +393,7 @@ function useYjsProvider({ config }) {
393
393
  ]);
394
394
  react.useEffect(() => {
395
395
  init();
396
- const disposeTeardown = chunkYBTRSG74_js.registerCollaborationTeardown({
396
+ const disposeTeardown = chunk3NDRTC7T_js.registerCollaborationTeardown({
397
397
  leave: teardown,
398
398
  rejoin: init
399
399
  });
@@ -414,7 +414,7 @@ function useCollaborativeState({
414
414
  canvasWidth,
415
415
  canvasHeight
416
416
  }) {
417
- const userColor = chunkYBTRSG74_js.sanitizeColor(config?.userColor, "#6366f1");
417
+ const userColor = chunk3NDRTC7T_js.sanitizeColor(config?.userColor, "#6366f1");
418
418
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
419
419
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
420
420
  awareness,
@@ -523,8 +523,8 @@ function useEditorHistory(input) {
523
523
  width: canvasSize.width,
524
524
  height: canvasSize.height,
525
525
  activeSlideIndex,
526
- slides: slides.map(chunkYBTRSG74_js.cloneSlide),
527
- templateElementsBySlideId: chunkYBTRSG74_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
526
+ slides: slides.map(chunk3NDRTC7T_js.cloneSlide),
527
+ templateElementsBySlideId: chunk3NDRTC7T_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
528
528
  ...actionLabel ? { actionLabel } : {}
529
529
  };
530
530
  },
@@ -537,9 +537,9 @@ function useEditorHistory(input) {
537
537
  width: snapshot.width,
538
538
  height: snapshot.height
539
539
  });
540
- setSlides(snapshot.slides.map(chunkYBTRSG74_js.cloneSlide));
540
+ setSlides(snapshot.slides.map(chunk3NDRTC7T_js.cloneSlide));
541
541
  setTemplateElementsBySlideId(
542
- chunkYBTRSG74_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
542
+ chunk3NDRTC7T_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
543
543
  );
544
544
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
545
545
  setSelectedElementIds([]);
@@ -573,8 +573,8 @@ function useEditorHistory(input) {
573
573
  const currentSnapshot = buildHistorySnapshot();
574
574
  historyFutureRef.current.push(currentSnapshot);
575
575
  isApplyingHistoryRef.current = true;
576
- const nextSnapshot = chunkFHTEL3Q6_js.cloneHistorySnapshot(previousSnapshot);
577
- lastHistorySnapshotRef.current = chunkFHTEL3Q6_js.cloneHistorySnapshot(nextSnapshot);
576
+ const nextSnapshot = chunkIN7D2T4R_js.cloneHistorySnapshot(previousSnapshot);
577
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(nextSnapshot);
578
578
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
579
579
  applyHistorySnapshot(nextSnapshot);
580
580
  updateHistoryAvailability();
@@ -595,8 +595,8 @@ function useEditorHistory(input) {
595
595
  const currentSnapshot = buildHistorySnapshot();
596
596
  historyPastRef.current.push(currentSnapshot);
597
597
  isApplyingHistoryRef.current = true;
598
- const targetSnapshot = chunkFHTEL3Q6_js.cloneHistorySnapshot(nextSnapshot);
599
- lastHistorySnapshotRef.current = chunkFHTEL3Q6_js.cloneHistorySnapshot(targetSnapshot);
598
+ const targetSnapshot = chunkIN7D2T4R_js.cloneHistorySnapshot(nextSnapshot);
599
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(targetSnapshot);
600
600
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
601
601
  applyHistorySnapshot(targetSnapshot);
602
602
  updateHistoryAvailability();
@@ -614,7 +614,7 @@ function useEditorHistory(input) {
614
614
  historyPastRef.current = [];
615
615
  historyFutureRef.current = [];
616
616
  if (initialSnapshot) {
617
- const clonedInitial = chunkFHTEL3Q6_js.cloneHistorySnapshot(initialSnapshot);
617
+ const clonedInitial = chunkIN7D2T4R_js.cloneHistorySnapshot(initialSnapshot);
618
618
  lastHistorySnapshotRef.current = clonedInitial;
619
619
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
620
620
  } else {
@@ -655,18 +655,18 @@ function useEditorHistory(input) {
655
655
  }
656
656
  const previousSnapshot = lastHistorySnapshotRef.current;
657
657
  if (!previousSnapshot) {
658
- lastHistorySnapshotRef.current = chunkFHTEL3Q6_js.cloneHistorySnapshot(snapshot);
658
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(snapshot);
659
659
  lastHistorySerializedRef.current = serialized;
660
660
  lastCheapHashRef.current = cheapHash;
661
661
  updateHistoryAvailability();
662
662
  return;
663
663
  }
664
- historyPastRef.current.push(chunkFHTEL3Q6_js.cloneHistorySnapshot(previousSnapshot));
664
+ historyPastRef.current.push(chunkIN7D2T4R_js.cloneHistorySnapshot(previousSnapshot));
665
665
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
666
666
  historyPastRef.current.shift();
667
667
  }
668
668
  historyFutureRef.current = [];
669
- lastHistorySnapshotRef.current = chunkFHTEL3Q6_js.cloneHistorySnapshot(snapshot);
669
+ lastHistorySnapshotRef.current = chunkIN7D2T4R_js.cloneHistorySnapshot(snapshot);
670
670
  lastHistorySerializedRef.current = serialized;
671
671
  lastCheapHashRef.current = cheapHash;
672
672
  updateHistoryAvailability();
@@ -726,8 +726,9 @@ function useZoomViewport({
726
726
  const canvasStageRef = react.useRef(null);
727
727
  const canvasViewportRef = react.useRef(null);
728
728
  const renderScaleRef = react.useRef(1);
729
+ const wheelBufferRef = react.useRef(chunk3NDRTC7T_js.createWheelStepBuffer());
729
730
  const storeRef = react.useRef(null);
730
- storeRef.current ??= chunkYBTRSG74_js.createViewerZoomStore();
731
+ storeRef.current ??= chunk3NDRTC7T_js.createViewerZoomStore();
731
732
  const store = storeRef.current;
732
733
  const scale = useViewerStore(store, selectZoom);
733
734
  const setScale = react.useCallback(
@@ -788,7 +789,7 @@ function useZoomViewport({
788
789
  if (!wrapper || !canvasViewport) {
789
790
  return;
790
791
  }
791
- const boundedScale = chunkYBTRSG74_js.clampZoomScale(nextScale);
792
+ const boundedScale = chunk3NDRTC7T_js.clampZoomScale(nextScale);
792
793
  const nextEditorScale = fitScale * boundedScale;
793
794
  const centerX = (bounds.minX + bounds.maxX) / 2;
794
795
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -825,29 +826,29 @@ function useZoomViewport({
825
826
  selectedElements.forEach((element) => {
826
827
  minX = Math.min(minX, element.x);
827
828
  minY = Math.min(minY, element.y);
828
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE));
829
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE));
829
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE));
830
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE));
830
831
  });
831
832
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
832
833
  return;
833
834
  }
834
835
  const selectionBounds = { minX, minY, maxX, maxY };
835
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE);
836
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE);
836
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
837
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
837
838
  const availableWidth = Math.max(
838
- effectiveEditorDimensions.width - chunkFHTEL3Q6_js.ZOOM_TO_SELECTION_PADDING,
839
- chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE
839
+ effectiveEditorDimensions.width - chunkIN7D2T4R_js.ZOOM_TO_SELECTION_PADDING,
840
+ chunkIN7D2T4R_js.MIN_ELEMENT_SIZE
840
841
  );
841
842
  const availableHeight = Math.max(
842
- effectiveEditorDimensions.height - chunkFHTEL3Q6_js.ZOOM_TO_SELECTION_PADDING,
843
- chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE
843
+ effectiveEditorDimensions.height - chunkIN7D2T4R_js.ZOOM_TO_SELECTION_PADDING,
844
+ chunkIN7D2T4R_js.MIN_ELEMENT_SIZE
844
845
  );
845
846
  const targetEditorScale = Math.min(
846
847
  availableWidth / boundsWidth,
847
848
  availableHeight / boundsHeight
848
849
  );
849
850
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
850
- const nextScale = chunkYBTRSG74_js.clampZoomScale(targetEditorScale / safeFitScale);
851
+ const nextScale = chunk3NDRTC7T_js.clampZoomScale(targetEditorScale / safeFitScale);
851
852
  setScale(nextScale);
852
853
  window.requestAnimationFrame(() => {
853
854
  window.requestAnimationFrame(() => {
@@ -864,14 +865,14 @@ function useZoomViewport({
864
865
  ]);
865
866
  const handleWheel = react.useCallback(
866
867
  (event) => {
867
- if (!event.ctrlKey) {
868
+ const mapped = chunk3NDRTC7T_js.mapEditingWheel(event, wheelBufferRef.current, true);
869
+ if (mapped.intent !== "zoom") {
868
870
  return;
869
871
  }
870
872
  event.preventDefault();
871
- const delta = event.deltaY * -1e-3;
872
873
  store.dispatch({
873
874
  type: "set-zoom",
874
- zoom: chunkYBTRSG74_js.clampZoomScale(store.getState().zoom + delta)
875
+ zoom: chunk3NDRTC7T_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
875
876
  });
876
877
  },
877
878
  [store]
@@ -959,7 +960,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
959
960
  const command = step.command;
960
961
  const timer = window.setTimeout(
961
962
  () => {
962
- chunkFHTEL3Q6_js.executeMediaCommand(command);
963
+ chunkIN7D2T4R_js.executeMediaCommand(command);
963
964
  },
964
965
  Math.max(0, step.delayMs)
965
966
  );
@@ -1096,7 +1097,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1096
1097
  }))
1097
1098
  );
1098
1099
  entranceAnimations.forEach((animation, animationIndex) => {
1099
- const delay = chunkYBTRSG74_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1100
+ const delay = chunk3NDRTC7T_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1100
1101
  const timer = window.setTimeout(() => {
1101
1102
  setPresentationAnimations(
1102
1103
  (previousAnimations) => previousAnimations.map(
@@ -1128,7 +1129,7 @@ function useAnimationPlayback(input) {
1128
1129
  (controller, group) => {
1129
1130
  driveBuildReveal(
1130
1131
  controller,
1131
- chunkYBTRSG74_js.PresentationAnimationController.collectBuildStepIds(group),
1132
+ chunk3NDRTC7T_js.PresentationAnimationController.collectBuildStepIds(group),
1132
1133
  setPresentationElementStates,
1133
1134
  buildRafRef
1134
1135
  );
@@ -1191,7 +1192,7 @@ function useAnimationPlayback(input) {
1191
1192
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1192
1193
  return;
1193
1194
  }
1194
- const controller = chunkYBTRSG74_js.PresentationAnimationController.fromSlide(slide);
1195
+ const controller = chunk3NDRTC7T_js.PresentationAnimationController.fromSlide(slide);
1195
1196
  controllerRef.current = controller;
1196
1197
  setPresentationKeyframesCss(controller.keyframesCss);
1197
1198
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1349,12 +1350,12 @@ function useAnimationPlayback(input) {
1349
1350
  presentationTimersRef
1350
1351
  };
1351
1352
  }
1352
- var PRESENTER_CHANNEL_NAME = chunkYBTRSG74_js.PRESENTATION_CHANNEL_NAME;
1353
- var AUDIENCE_HASH = chunkYBTRSG74_js.PRESENTATION_HASH;
1354
- var PRESENTER_MSG_ORIGIN = chunkYBTRSG74_js.PRESENTATION_MESSAGE_ORIGIN;
1355
- var AUDIENCE_NONCE_KEY = chunkYBTRSG74_js.PRESENTATION_NONCE_KEY;
1353
+ var PRESENTER_CHANNEL_NAME = chunk3NDRTC7T_js.PRESENTATION_CHANNEL_NAME;
1354
+ var AUDIENCE_HASH = chunk3NDRTC7T_js.PRESENTATION_HASH;
1355
+ var PRESENTER_MSG_ORIGIN = chunk3NDRTC7T_js.PRESENTATION_MESSAGE_ORIGIN;
1356
+ var AUDIENCE_NONCE_KEY = chunk3NDRTC7T_js.PRESENTATION_NONCE_KEY;
1356
1357
  function generateSessionId() {
1357
- return chunkYBTRSG74_js.createPresentationSessionId();
1358
+ return chunk3NDRTC7T_js.createPresentationSessionId();
1358
1359
  }
1359
1360
  function parseAudienceNonce() {
1360
1361
  const hash = window.location.hash;
@@ -1390,7 +1391,7 @@ function usePresenterWindow(input) {
1390
1391
  }, []);
1391
1392
  const swapDisplays = react.useCallback(async () => {
1392
1393
  const audience = audienceWindowRef.current;
1393
- return audience && !audience.closed ? chunkYBTRSG74_js.swapPresentationWindows(window, audience) : false;
1394
+ return audience && !audience.closed ? chunk3NDRTC7T_js.swapPresentationWindows(window, audience) : false;
1394
1395
  }, []);
1395
1396
  const syncSlideToAudience = react.useCallback(
1396
1397
  (slideIndex) => {
@@ -1454,7 +1455,7 @@ function usePresenterWindow(input) {
1454
1455
  pollTimerRef.current = null;
1455
1456
  }
1456
1457
  if (closingSessionId) {
1457
- void chunkYBTRSG74_js.clearAudienceContent(closingSessionId);
1458
+ void chunk3NDRTC7T_js.clearAudienceContent(closingSessionId);
1458
1459
  }
1459
1460
  }, [getChannel]);
1460
1461
  const openAudienceWindow = react.useCallback(() => {
@@ -1472,10 +1473,10 @@ function usePresenterWindow(input) {
1472
1473
  audienceWindowRef.current = blankWin;
1473
1474
  const sessionId = generateSessionId();
1474
1475
  sessionIdRef.current = sessionId;
1475
- const audienceUrl = chunkYBTRSG74_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1476
- void chunkYBTRSG74_js.resolveAudienceScreenPlacement(window).then((placement) => {
1476
+ const audienceUrl = chunk3NDRTC7T_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1477
+ void chunk3NDRTC7T_js.resolveAudienceScreenPlacement(window).then((placement) => {
1477
1478
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1478
- chunkYBTRSG74_js.placeAudienceWindow(blankWin, placement);
1479
+ chunk3NDRTC7T_js.placeAudienceWindow(blankWin, placement);
1479
1480
  }
1480
1481
  return void 0;
1481
1482
  });
@@ -1505,7 +1506,7 @@ function usePresenterWindow(input) {
1505
1506
  }
1506
1507
  };
1507
1508
  if (content) {
1508
- void chunkYBTRSG74_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1509
+ void chunk3NDRTC7T_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1509
1510
  } else {
1510
1511
  navigateOrClose(true);
1511
1512
  }
@@ -1531,7 +1532,7 @@ function usePresenterWindow(input) {
1531
1532
  }
1532
1533
  const handleMessage = (event) => {
1533
1534
  const message = event.data;
1534
- if (chunkYBTRSG74_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1535
+ if (chunk3NDRTC7T_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1535
1536
  syncStateToAudience(snapshotRef.current);
1536
1537
  }
1537
1538
  };
@@ -1560,7 +1561,7 @@ function usePresenterWindow(input) {
1560
1561
  react.useEffect(() => {
1561
1562
  const handleBeforeUnload = () => {
1562
1563
  if (sessionIdRef.current) {
1563
- void chunkYBTRSG74_js.clearAudienceContent(sessionIdRef.current);
1564
+ void chunk3NDRTC7T_js.clearAudienceContent(sessionIdRef.current);
1564
1565
  }
1565
1566
  };
1566
1567
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1622,7 +1623,7 @@ function useAudienceMode(input) {
1622
1623
  }
1623
1624
  channel.onmessage = (event) => {
1624
1625
  const data = event.data;
1625
- if (!chunkYBTRSG74_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1626
+ if (!chunk3NDRTC7T_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1626
1627
  return;
1627
1628
  }
1628
1629
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1638,16 +1639,16 @@ function useAudienceMode(input) {
1638
1639
  }
1639
1640
  if (data.type === "presenter-exit") {
1640
1641
  if (expectedSessionId) {
1641
- void chunkYBTRSG74_js.clearAudienceContent(expectedSessionId);
1642
+ void chunk3NDRTC7T_js.clearAudienceContent(expectedSessionId);
1642
1643
  }
1643
- if (chunkYBTRSG74_js.endAudienceDisplay(window)) {
1644
+ if (chunk3NDRTC7T_js.endAudienceDisplay(window)) {
1644
1645
  handlers.onPresenterEnded?.();
1645
1646
  }
1646
1647
  }
1647
1648
  };
1648
1649
  if (expectedSessionId) {
1649
1650
  channel.postMessage({
1650
- origin: chunkYBTRSG74_js.PRESENTATION_MESSAGE_ORIGIN,
1651
+ origin: chunk3NDRTC7T_js.PRESENTATION_MESSAGE_ORIGIN,
1651
1652
  type: "audience-ready",
1652
1653
  sessionId: expectedSessionId
1653
1654
  });
@@ -1661,6 +1662,7 @@ function useAudienceMode(input) {
1661
1662
  }, []);
1662
1663
  }
1663
1664
  function usePresentationKeyboard(input) {
1665
+ const wheelBufferRef = react.useRef(chunk3NDRTC7T_js.createWheelStepBuffer());
1664
1666
  const {
1665
1667
  mode,
1666
1668
  movePresentationSlide,
@@ -1680,14 +1682,14 @@ function usePresentationKeyboard(input) {
1680
1682
  presentationSlideIndex,
1681
1683
  setShowRehearsalSummary
1682
1684
  } = input;
1683
- const keyBufferRef = react.useRef(chunkYBTRSG74_js.createPresentationKeyBuffer());
1685
+ const keyBufferRef = react.useRef(chunk3NDRTC7T_js.createPresentationKeyBuffer());
1684
1686
  react.useEffect(() => {
1685
- if (mode !== "present" || !chunkYBTRSG74_js.acceptsPresentationInput()) {
1686
- keyBufferRef.current = chunkYBTRSG74_js.createPresentationKeyBuffer();
1687
+ if (mode !== "present" || !chunk3NDRTC7T_js.acceptsPresentationInput()) {
1688
+ keyBufferRef.current = chunk3NDRTC7T_js.createPresentationKeyBuffer();
1687
1689
  return;
1688
1690
  }
1689
1691
  const handleKeyDown = (event) => {
1690
- const mapped = chunkYBTRSG74_js.mapPresentationKey(event, keyBufferRef.current);
1692
+ const mapped = chunk3NDRTC7T_js.mapPresentationKey(event, keyBufferRef.current);
1691
1693
  if (mapped.action === "none") {
1692
1694
  return;
1693
1695
  }
@@ -1707,12 +1709,12 @@ function usePresentationKeyboard(input) {
1707
1709
  movePresentationSlide(-1);
1708
1710
  return;
1709
1711
  case "first": {
1710
- const first = chunkYBTRSG74_js.firstShowSlideIndex(showSlideIndexes);
1712
+ const first = chunk3NDRTC7T_js.firstShowSlideIndex(showSlideIndexes);
1711
1713
  navigateToSlide(first ?? 0);
1712
1714
  return;
1713
1715
  }
1714
1716
  case "last": {
1715
- const last = chunkYBTRSG74_js.lastShowSlideIndex(showSlideIndexes);
1717
+ const last = chunk3NDRTC7T_js.lastShowSlideIndex(showSlideIndexes);
1716
1718
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1717
1719
  return;
1718
1720
  }
@@ -1746,9 +1748,24 @@ function usePresentationKeyboard(input) {
1746
1748
  break;
1747
1749
  }
1748
1750
  };
1751
+ const handleWheel = (event) => {
1752
+ if (mode !== "present" || !chunk3NDRTC7T_js.acceptsPresentationInput()) {
1753
+ return;
1754
+ }
1755
+ const mapped = chunk3NDRTC7T_js.mapPresentationWheel(event, wheelBufferRef.current);
1756
+ if (mapped.intent === "next-slide") {
1757
+ event.preventDefault();
1758
+ movePresentationSlide(1);
1759
+ } else if (mapped.intent === "previous-slide") {
1760
+ event.preventDefault();
1761
+ movePresentationSlide(-1);
1762
+ }
1763
+ };
1749
1764
  window.addEventListener("keydown", handleKeyDown);
1765
+ window.addEventListener("wheel", handleWheel, { passive: false });
1750
1766
  return () => {
1751
1767
  window.removeEventListener("keydown", handleKeyDown);
1768
+ window.removeEventListener("wheel", handleWheel);
1752
1769
  };
1753
1770
  }, [
1754
1771
  mode,
@@ -1867,7 +1884,7 @@ function useRehearsalTimings(input) {
1867
1884
 
1868
1885
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1869
1886
  function handlePresentationActionImpl(action, deps) {
1870
- chunkYBTRSG74_js.runPresentationAction(
1887
+ chunk3NDRTC7T_js.runPresentationAction(
1871
1888
  action,
1872
1889
  { slideCount: deps.slidesLength },
1873
1890
  {
@@ -1889,7 +1906,7 @@ function handlePresentationActionImpl(action, deps) {
1889
1906
  function executeSlideTransition(nextSlideIndex, deps) {
1890
1907
  const incomingSlide = deps.slides[nextSlideIndex];
1891
1908
  const transition = incomingSlide?.transition;
1892
- const durationMs = deps.playTransition ? chunkYBTRSG74_js.resolveTransitionDurationMs(transition) : 0;
1909
+ const durationMs = deps.playTransition ? chunk3NDRTC7T_js.resolveTransitionDurationMs(transition) : 0;
1893
1910
  deps.clearPresentationTimers();
1894
1911
  deps.setPresentationSlideIndex(nextSlideIndex);
1895
1912
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1948,7 +1965,7 @@ function useSlideNavigation(input) {
1948
1965
  });
1949
1966
  const scheduleAutoAdvanceForSlide = react.useCallback(
1950
1967
  (slideIndex) => {
1951
- const delayMs = chunkYBTRSG74_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1968
+ const delayMs = chunk3NDRTC7T_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1952
1969
  if (delayMs === void 0) {
1953
1970
  return;
1954
1971
  }
@@ -1971,7 +1988,7 @@ function useSlideNavigation(input) {
1971
1988
  if (availableSlideIndexes.length === 0) {
1972
1989
  return;
1973
1990
  }
1974
- const pastLastSlide = direction === 1 && !chunkYBTRSG74_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1991
+ const pastLastSlide = direction === 1 && !chunk3NDRTC7T_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1975
1992
  if (rehearsing && pastLastSlide) {
1976
1993
  recordCurrentSlideTime(presentationSlideIndex);
1977
1994
  try {
@@ -1989,9 +2006,9 @@ function useSlideNavigation(input) {
1989
2006
  onAdvancePastLastSlide();
1990
2007
  return;
1991
2008
  }
1992
- const nextSlideIndex = direction === 1 ? chunkYBTRSG74_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
2009
+ const nextSlideIndex = direction === 1 ? chunk3NDRTC7T_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1993
2010
  loop: Boolean(loopContinuously) && !rehearsing
1994
- }) : chunkYBTRSG74_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
2011
+ }) : chunk3NDRTC7T_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1995
2012
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1996
2013
  return;
1997
2014
  }
@@ -2136,22 +2153,22 @@ function useZoomNavigation(input) {
2136
2153
  };
2137
2154
  }
2138
2155
  function usePresenterConsole(slideIndex, active) {
2139
- const timerRef = react.useRef(chunkYBTRSG74_js.createPresenterTimer());
2140
- const [snapshot, setSnapshot] = react.useState(() => chunkYBTRSG74_js.createInitialPresentationSnapshot(slideIndex));
2156
+ const timerRef = react.useRef(chunk3NDRTC7T_js.createPresenterTimer());
2157
+ const [snapshot, setSnapshot] = react.useState(() => chunk3NDRTC7T_js.createInitialPresentationSnapshot(slideIndex));
2141
2158
  const patch = react.useCallback((value) => {
2142
- setSnapshot((current) => chunkYBTRSG74_js.mergePresentationSnapshot(current, value));
2159
+ setSnapshot((current) => chunk3NDRTC7T_js.mergePresentationSnapshot(current, value));
2143
2160
  }, []);
2144
2161
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2145
2162
  react.useEffect(() => {
2146
2163
  if (!active) {
2147
2164
  return;
2148
2165
  }
2149
- timerRef.current = chunkYBTRSG74_js.resetPresenterTimer();
2166
+ timerRef.current = chunk3NDRTC7T_js.resetPresenterTimer();
2150
2167
  patch({ paused: false, elapsedMs: 0 });
2151
2168
  const timer = window.setInterval(() => {
2152
2169
  patch({
2153
2170
  paused: timerRef.current.paused,
2154
- elapsedMs: chunkYBTRSG74_js.presenterElapsed(timerRef.current)
2171
+ elapsedMs: chunk3NDRTC7T_js.presenterElapsed(timerRef.current)
2155
2172
  });
2156
2173
  }, 1e3);
2157
2174
  return () => window.clearInterval(timer);
@@ -2161,19 +2178,19 @@ function usePresenterConsole(slideIndex, active) {
2161
2178
  applyAudienceSnapshot: setSnapshot,
2162
2179
  setBlackout: (blackout) => patch({ blackout }),
2163
2180
  toggleTimer: () => {
2164
- timerRef.current = chunkYBTRSG74_js.togglePresenterTimer(timerRef.current);
2181
+ timerRef.current = chunk3NDRTC7T_js.togglePresenterTimer(timerRef.current);
2165
2182
  patch({
2166
2183
  paused: timerRef.current.paused,
2167
- elapsedMs: chunkYBTRSG74_js.presenterElapsed(timerRef.current)
2184
+ elapsedMs: chunk3NDRTC7T_js.presenterElapsed(timerRef.current)
2168
2185
  });
2169
2186
  },
2170
2187
  resetTimer: () => {
2171
- timerRef.current = chunkYBTRSG74_js.resetPresenterTimer();
2188
+ timerRef.current = chunk3NDRTC7T_js.resetPresenterTimer();
2172
2189
  patch({ paused: false, elapsedMs: 0 });
2173
2190
  },
2174
2191
  stepZoom: (direction) => setSnapshot(
2175
- (current) => chunkYBTRSG74_js.mergePresentationSnapshot(current, {
2176
- zoom: chunkYBTRSG74_js.stepPresenterZoom(
2192
+ (current) => chunk3NDRTC7T_js.mergePresentationSnapshot(current, {
2193
+ zoom: chunk3NDRTC7T_js.stepPresenterZoom(
2177
2194
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2178
2195
  direction
2179
2196
  )
@@ -2218,7 +2235,7 @@ function usePresentationMode(input) {
2218
2235
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2219
2236
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2220
2237
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2221
- const showGuard = react.useMemo(() => chunkYBTRSG74_js.createPresenterShowGuard(), []);
2238
+ const showGuard = react.useMemo(() => chunk3NDRTC7T_js.createPresenterShowGuard(), []);
2222
2239
  const {
2223
2240
  presentationAnimations,
2224
2241
  presentationElementStates,
@@ -2297,7 +2314,7 @@ function usePresentationMode(input) {
2297
2314
  });
2298
2315
  const movePresentationSlide = react.useCallback(
2299
2316
  (direction, trigger = "explicit") => {
2300
- if (!chunkYBTRSG74_js.acceptsPresentationInput()) {
2317
+ if (!chunk3NDRTC7T_js.acceptsPresentationInput()) {
2301
2318
  return;
2302
2319
  }
2303
2320
  if (endOfShowVisible) {
@@ -2434,7 +2451,7 @@ function usePresentationMode(input) {
2434
2451
  if (mode !== "present") {
2435
2452
  return;
2436
2453
  }
2437
- return chunkYBTRSG74_js.attachPresentationVisibilityPause({
2454
+ return chunk3NDRTC7T_js.attachPresentationVisibilityPause({
2438
2455
  root: containerRef.current ?? void 0,
2439
2456
  onHidden: () => clearPresentationTimersRef.current(),
2440
2457
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2514,11 +2531,11 @@ function usePresentationMode(input) {
2514
2531
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2515
2532
  return void 0;
2516
2533
  }
2517
- return chunkYBTRSG74_js.buildMorphTransitionPlan(
2534
+ return chunk3NDRTC7T_js.buildMorphTransitionPlan(
2518
2535
  slides[transitionOverlay.outgoingSlideIndex],
2519
2536
  slides[transitionOverlay.incomingSlideIndex],
2520
2537
  transitionOverlay.durationMs,
2521
- chunkYBTRSG74_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2538
+ chunk3NDRTC7T_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2522
2539
  );
2523
2540
  }, [transitionOverlay, slides]);
2524
2541
  const morphedElementStates = react.useMemo(() => {
@@ -2535,11 +2552,15 @@ function usePresentationMode(input) {
2535
2552
  }
2536
2553
  return merged;
2537
2554
  }, [morphPlan, presentationElementStates]);
2538
- const morphedKeyframesCss = react.useMemo(
2539
- () => morphPlan ? `${presentationKeyframesCss ?? ""}
2540
- ${morphPlan.keyframesCss}` : presentationKeyframesCss,
2541
- [morphPlan, presentationKeyframesCss]
2542
- );
2555
+ const morphedKeyframesCss = react.useMemo(() => {
2556
+ if (!morphPlan) {
2557
+ return presentationKeyframesCss;
2558
+ }
2559
+ const imageRules = chunk3NDRTC7T_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2560
+ return `${presentationKeyframesCss ?? ""}
2561
+ ${morphPlan.keyframesCss}
2562
+ ${imageRules}`;
2563
+ }, [morphPlan, presentationKeyframesCss]);
2543
2564
  return {
2544
2565
  presentationSlideIndex,
2545
2566
  setPresentationSlideIndex,
@@ -2824,7 +2845,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2824
2845
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2825
2846
  slides.forEach((slide, slideIndex) => {
2826
2847
  for (const element of slide.elements || []) {
2827
- if (!chunkYBTRSG74_js.hasTextProperties(element)) {
2848
+ if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
2828
2849
  continue;
2829
2850
  }
2830
2851
  const segments = element.textSegments ?? [];
@@ -2875,7 +2896,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2875
2896
  continue;
2876
2897
  }
2877
2898
  const element = slide.elements[elIdx];
2878
- if (!chunkYBTRSG74_js.hasTextProperties(element)) {
2899
+ if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
2879
2900
  continue;
2880
2901
  }
2881
2902
  const segments = [...element.textSegments ?? []];
@@ -3473,7 +3494,7 @@ function useViewerCoreState(_input) {
3473
3494
  const shapeAdjustmentDragStateRef = react.useRef(null);
3474
3495
  const marqueeStateRef = react.useRef(null);
3475
3496
  const isDrawingRef = react.useRef(false);
3476
- const livePatcher = react.useMemo(() => chunkYBTRSG74_js.createCollaborationLivePatcher(), []);
3497
+ const livePatcher = react.useMemo(() => chunk3NDRTC7T_js.createCollaborationLivePatcher(), []);
3477
3498
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3478
3499
  const slidesRef = react.useRef([]);
3479
3500
  const [mode, setMode] = react.useState("edit");
@@ -3482,8 +3503,8 @@ function useViewerCoreState(_input) {
3482
3503
  const [slides, setSlides] = react.useState([]);
3483
3504
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3484
3505
  const [canvasSize, setCanvasSize] = react.useState({
3485
- width: chunkFHTEL3Q6_js.DEFAULT_CANVAS_WIDTH,
3486
- height: chunkFHTEL3Q6_js.DEFAULT_CANVAS_HEIGHT
3506
+ width: chunkIN7D2T4R_js.DEFAULT_CANVAS_WIDTH,
3507
+ height: chunkIN7D2T4R_js.DEFAULT_CANVAS_HEIGHT
3487
3508
  });
3488
3509
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3489
3510
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3503,7 +3524,7 @@ function useViewerCoreState(_input) {
3503
3524
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3504
3525
  inlineEditingTextRef.current = resolved;
3505
3526
  setInlineEditingTextBase(value);
3506
- chunkYBTRSG74_js.publishLiveInlineText(
3527
+ chunk3NDRTC7T_js.publishLiveInlineText(
3507
3528
  livePatcher,
3508
3529
  slidesRef.current[activeSlideIndexRef.current],
3509
3530
  inlineEditingElementIdRef.current,
@@ -3837,7 +3858,7 @@ function useLoadContent({
3837
3858
  );
3838
3859
  }
3839
3860
  const previousHandler = handlerRef.current;
3840
- const handler = new chunkYBTRSG74_js.PptxHandler();
3861
+ const handler = new chunk3NDRTC7T_js.PptxHandler();
3841
3862
  const parsed = await handler.load(buffer);
3842
3863
  if (cancelled || token !== renderTokenRef.current) {
3843
3864
  handler.dispose();
@@ -3849,7 +3870,7 @@ function useLoadContent({
3849
3870
  handlerRef.current = null;
3850
3871
  const mediaElements = [];
3851
3872
  for (const slide of parsed.slides) {
3852
- chunkYBTRSG74_js.collectMediaElements(slide.elements, mediaElements);
3873
+ chunk3NDRTC7T_js.collectMediaElements(slide.elements, mediaElements);
3853
3874
  }
3854
3875
  for (const url of mediaDataUrls.values()) {
3855
3876
  if (url.startsWith("blob:")) {
@@ -3890,7 +3911,7 @@ function useLoadContent({
3890
3911
  }
3891
3912
  })
3892
3913
  );
3893
- const { paths: imagePaths, refs: imageRefs } = chunkYBTRSG74_js.collectImagePaths(parsed.slides);
3914
+ const { paths: imagePaths, refs: imageRefs } = chunk3NDRTC7T_js.collectImagePaths(parsed.slides);
3894
3915
  let nextSlides = parsed.slides;
3895
3916
  if (imagePaths.size > 0) {
3896
3917
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3945,12 +3966,12 @@ function useLoadContent({
3945
3966
  }
3946
3967
  }
3947
3968
  handlerRef.current = handler;
3948
- const partition = chunkFHTEL3Q6_js.partitionTemplateElements(nextSlides);
3969
+ const partition = chunkIN7D2T4R_js.partitionTemplateElements(nextSlides);
3949
3970
  setSlides(partition.slides);
3950
3971
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3951
3972
  setCanvasSize({
3952
- width: parsed.width ?? chunkFHTEL3Q6_js.DEFAULT_CANVAS_WIDTH,
3953
- height: parsed.height ?? chunkFHTEL3Q6_js.DEFAULT_CANVAS_HEIGHT
3973
+ width: parsed.width ?? chunkIN7D2T4R_js.DEFAULT_CANVAS_WIDTH,
3974
+ height: parsed.height ?? chunkIN7D2T4R_js.DEFAULT_CANVAS_HEIGHT
3954
3975
  });
3955
3976
  setHeaderFooter(parsed.headerFooter ?? {});
3956
3977
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3979,7 +4000,7 @@ function useLoadContent({
3979
4000
  setHasMacros(parsed.hasMacros === true);
3980
4001
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3981
4002
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3982
- setGuides(chunkYBTRSG74_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4003
+ setGuides(chunk3NDRTC7T_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3983
4004
  setActiveSlideIndex(0);
3984
4005
  clearSelection();
3985
4006
  setIsDirty(false);
@@ -3987,7 +4008,7 @@ function useLoadContent({
3987
4008
  onContentApplied?.();
3988
4009
  } catch (err) {
3989
4010
  if (!cancelled && token === renderTokenRef.current) {
3990
- if (err instanceof chunkYBTRSG74_js.EncryptedFileError) {
4011
+ if (err instanceof chunk3NDRTC7T_js.EncryptedFileError) {
3991
4012
  setIsEncrypted(true);
3992
4013
  } else {
3993
4014
  setError(err instanceof Error ? err.message : String(err));
@@ -4064,7 +4085,7 @@ function useAutosave(input) {
4064
4085
  isSavingRef.current = false;
4065
4086
  return;
4066
4087
  }
4067
- await chunkYBTRSG74_js.saveAutosaveSnapshot(filePathRef.current, data);
4088
+ await chunk3NDRTC7T_js.saveAutosaveSnapshot(filePathRef.current, data);
4068
4089
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4069
4090
  } catch (err) {
4070
4091
  setAutosaveStatus({
@@ -4129,7 +4150,7 @@ function useElementOperations(input) {
4129
4150
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4130
4151
  const updateElementById = react.useCallback(
4131
4152
  (elementId, updates) => {
4132
- if (chunkYBTRSG74_js.isTemplateElementId(elementId)) {
4153
+ if (chunk3NDRTC7T_js.isTemplateElementId(elementId)) {
4133
4154
  const slideId = activeSlide?.id;
4134
4155
  if (slideId) {
4135
4156
  setTemplateElementsBySlideId((prev) => ({
@@ -4169,7 +4190,7 @@ function useElementOperations(input) {
4169
4190
  );
4170
4191
  const updateSelectedShapeStyle = react.useCallback(
4171
4192
  (updates) => {
4172
- if (!selectedElement || !chunkYBTRSG74_js.hasShapeProperties(selectedElement)) {
4193
+ if (!selectedElement || !chunk3NDRTC7T_js.hasShapeProperties(selectedElement)) {
4173
4194
  return;
4174
4195
  }
4175
4196
  updateSelectedElement({
@@ -4180,17 +4201,17 @@ function useElementOperations(input) {
4180
4201
  );
4181
4202
  const updateSelectedTextStyle = react.useCallback(
4182
4203
  (updates) => {
4183
- if (!selectedElement || !chunkYBTRSG74_js.hasTextProperties(selectedElement)) {
4204
+ if (!selectedElement || !chunk3NDRTC7T_js.hasTextProperties(selectedElement)) {
4184
4205
  return;
4185
4206
  }
4186
- const inlineSel = chunkYBTRSG74_js.getInlineEditorSelection(selectedElement.textSegments);
4207
+ const inlineSel = chunk3NDRTC7T_js.getInlineEditorSelection(selectedElement.textSegments);
4187
4208
  if (inlineSel && selectedElement.textSegments) {
4188
- const { newSegments: newSegments2, newSelection } = chunkYBTRSG74_js.applyStyleToSelectedSegments(
4209
+ const { newSegments: newSegments2, newSelection } = chunk3NDRTC7T_js.applyStyleToSelectedSegments(
4189
4210
  selectedElement.textSegments,
4190
4211
  inlineSel,
4191
4212
  updates
4192
4213
  );
4193
- chunkYBTRSG74_js.setPendingSelectionRestore(newSelection);
4214
+ chunk3NDRTC7T_js.setPendingSelectionRestore(newSelection);
4194
4215
  updateSelectedElement({
4195
4216
  textSegments: newSegments2
4196
4217
  });
@@ -4210,12 +4231,12 @@ function useElementOperations(input) {
4210
4231
  );
4211
4232
  const updateSelectedTextCase = react.useCallback(
4212
4233
  (mode) => {
4213
- if (!selectedElement || !chunkYBTRSG74_js.hasTextProperties(selectedElement)) {
4234
+ if (!selectedElement || !chunk3NDRTC7T_js.hasTextProperties(selectedElement)) {
4214
4235
  return;
4215
4236
  }
4216
- const inlineSel = chunkYBTRSG74_js.getInlineEditorSelection(selectedElement.textSegments);
4237
+ const inlineSel = chunk3NDRTC7T_js.getInlineEditorSelection(selectedElement.textSegments);
4217
4238
  if (inlineSel && selectedElement.textSegments) {
4218
- const newSegments = chunkYBTRSG74_js.applyCaseTransformToSegments(
4239
+ const newSegments = chunk3NDRTC7T_js.applyCaseTransformToSegments(
4219
4240
  selectedElement.textSegments,
4220
4241
  inlineSel,
4221
4242
  mode
@@ -4225,14 +4246,14 @@ function useElementOperations(input) {
4225
4246
  }
4226
4247
  const updates = {};
4227
4248
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4228
- updates.textSegments = chunkYBTRSG74_js.applyCaseTransformToSegments(
4249
+ updates.textSegments = chunk3NDRTC7T_js.applyCaseTransformToSegments(
4229
4250
  selectedElement.textSegments,
4230
4251
  null,
4231
4252
  mode
4232
4253
  );
4233
4254
  }
4234
4255
  if (typeof selectedElement.text === "string") {
4235
- updates.text = chunkYBTRSG74_js.transformTextCase(selectedElement.text, mode);
4256
+ updates.text = chunk3NDRTC7T_js.transformTextCase(selectedElement.text, mode);
4236
4257
  }
4237
4258
  updateSelectedElement(updates);
4238
4259
  },
@@ -4287,7 +4308,7 @@ function useSectionOperations(input) {
4287
4308
  const { sections, setSections, slides, setSlides, markDirty } = input;
4288
4309
  const addSection2 = react.useCallback(
4289
4310
  (name, afterSlideIndex) => {
4290
- const result = chunkYBTRSG74_js.addSection(sections, slides, name, afterSlideIndex);
4311
+ const result = chunk3NDRTC7T_js.addSection(sections, slides, name, afterSlideIndex);
4291
4312
  setSlides(result.slides);
4292
4313
  setSections(result.sections);
4293
4314
  markDirty();
@@ -4296,7 +4317,7 @@ function useSectionOperations(input) {
4296
4317
  );
4297
4318
  const renameSection2 = react.useCallback(
4298
4319
  (sectionId, newName) => {
4299
- const result = chunkYBTRSG74_js.renameSection(sections, slides, sectionId, newName);
4320
+ const result = chunk3NDRTC7T_js.renameSection(sections, slides, sectionId, newName);
4300
4321
  setSections(result.sections);
4301
4322
  setSlides(result.slides);
4302
4323
  markDirty();
@@ -4305,7 +4326,7 @@ function useSectionOperations(input) {
4305
4326
  );
4306
4327
  const deleteSection2 = react.useCallback(
4307
4328
  (sectionId) => {
4308
- const result = chunkYBTRSG74_js.deleteSection(sections, slides, sectionId);
4329
+ const result = chunk3NDRTC7T_js.deleteSection(sections, slides, sectionId);
4309
4330
  setSections(result.sections);
4310
4331
  setSlides(result.slides);
4311
4332
  markDirty();
@@ -4314,21 +4335,21 @@ function useSectionOperations(input) {
4314
4335
  );
4315
4336
  const moveSectionUp2 = react.useCallback(
4316
4337
  (sectionId) => {
4317
- setSections(chunkYBTRSG74_js.moveSectionUp(sections, sectionId));
4338
+ setSections(chunk3NDRTC7T_js.moveSectionUp(sections, sectionId));
4318
4339
  markDirty();
4319
4340
  },
4320
4341
  [sections, setSections, markDirty]
4321
4342
  );
4322
4343
  const moveSectionDown2 = react.useCallback(
4323
4344
  (sectionId) => {
4324
- setSections(chunkYBTRSG74_js.moveSectionDown(sections, sectionId));
4345
+ setSections(chunk3NDRTC7T_js.moveSectionDown(sections, sectionId));
4325
4346
  markDirty();
4326
4347
  },
4327
4348
  [sections, setSections, markDirty]
4328
4349
  );
4329
4350
  const moveSlidesToSection2 = react.useCallback(
4330
4351
  (slideIndexes, targetSectionId) => {
4331
- const result = chunkYBTRSG74_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4352
+ const result = chunk3NDRTC7T_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4332
4353
  setSlides(result.slides);
4333
4354
  setSections(result.sections);
4334
4355
  markDirty();
@@ -4347,19 +4368,19 @@ function useSectionOperations(input) {
4347
4368
 
4348
4369
  // src/viewer/hooks/pointer-move-handlers.ts
4349
4370
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4350
- const resized = chunkYBTRSG74_js.applyResize(
4371
+ const resized = chunk3NDRTC7T_js.applyResize(
4351
4372
  { x: startX, y: startY, width: startWidth, height: startHeight },
4352
4373
  handle,
4353
4374
  dx,
4354
4375
  dy,
4355
4376
  1,
4356
- { minSize: chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE }
4377
+ { minSize: chunkIN7D2T4R_js.MIN_ELEMENT_SIZE }
4357
4378
  );
4358
4379
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4359
4380
  if (!snapToGrid) {
4360
4381
  return box;
4361
4382
  }
4362
- return chunkYBTRSG74_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE);
4383
+ return chunk3NDRTC7T_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE);
4363
4384
  }
4364
4385
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4365
4386
  const range = startWidth || 200;
@@ -4477,7 +4498,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4477
4498
  width: el.width,
4478
4499
  height: el.height
4479
4500
  }));
4480
- const snapResult = chunkYBTRSG74_js.computeSnapToShape(
4501
+ const snapResult = chunk3NDRTC7T_js.computeSnapToShape(
4481
4502
  targetX,
4482
4503
  targetY,
4483
4504
  primaryEl.width,
@@ -4516,7 +4537,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4516
4537
  if (live) {
4517
4538
  for (const id of Object.keys(drag.startPositionsById)) {
4518
4539
  const start = drag.startPositionsById[id];
4519
- chunkYBTRSG74_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4540
+ chunk3NDRTC7T_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4520
4541
  x: start.x + appliedDx,
4521
4542
  y: start.y + appliedDy
4522
4543
  });
@@ -4550,15 +4571,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4550
4571
  if (rs.domEl) {
4551
4572
  rs.domEl.style.left = `${geo.x}px`;
4552
4573
  rs.domEl.style.top = `${geo.y}px`;
4553
- rs.domEl.style.width = `${Math.max(geo.width, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE)}px`;
4554
- rs.domEl.style.height = `${Math.max(geo.height, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE)}px`;
4574
+ rs.domEl.style.width = `${Math.max(geo.width, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE)}px`;
4575
+ rs.domEl.style.height = `${Math.max(geo.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE)}px`;
4555
4576
  }
4556
4577
  if (live) {
4557
- chunkYBTRSG74_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4578
+ chunk3NDRTC7T_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4558
4579
  x: geo.x,
4559
4580
  y: geo.y,
4560
- width: Math.max(geo.width, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE),
4561
- height: Math.max(geo.height, chunkFHTEL3Q6_js.MIN_ELEMENT_SIZE)
4581
+ width: Math.max(geo.width, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE),
4582
+ height: Math.max(geo.height, chunkIN7D2T4R_js.MIN_ELEMENT_SIZE)
4562
4583
  });
4563
4584
  }
4564
4585
  }
@@ -4638,13 +4659,13 @@ function processPointerUp(input) {
4638
4659
  if (i !== activeSlideIndex) {
4639
4660
  return s;
4640
4661
  }
4641
- const rerouted = chunkYBTRSG74_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4662
+ const rerouted = chunk3NDRTC7T_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4642
4663
  if (rerouted.length === 0) {
4643
4664
  return s;
4644
4665
  }
4645
4666
  return {
4646
4667
  ...s,
4647
- elements: chunkYBTRSG74_js.applyReroutedConnectors(s.elements, rerouted)
4668
+ elements: chunk3NDRTC7T_js.applyReroutedConnectors(s.elements, rerouted)
4648
4669
  };
4649
4670
  })
4650
4671
  );
@@ -4666,9 +4687,9 @@ function processPointerUp(input) {
4666
4687
  }
4667
4688
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4668
4689
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4669
- const hitIds = chunkYBTRSG74_js.computeMarqueeHitIds(marquee, sourceElements);
4690
+ const hitIds = chunk3NDRTC7T_js.computeMarqueeHitIds(marquee, sourceElements);
4670
4691
  if (marquee.additive) {
4671
- const merged = chunkYBTRSG74_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4692
+ const merged = chunk3NDRTC7T_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4672
4693
  if (merged.length > 0) {
4673
4694
  applySelection(merged[0], merged);
4674
4695
  } else {
@@ -4691,8 +4712,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4691
4712
  }
4692
4713
  return { ...el, x: start.x + dx, y: start.y + dy };
4693
4714
  });
4694
- const rerouted = chunkYBTRSG74_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4695
- return chunkYBTRSG74_js.applyReroutedConnectors(movedElements, rerouted);
4715
+ const rerouted = chunk3NDRTC7T_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4716
+ return chunk3NDRTC7T_js.applyReroutedConnectors(movedElements, rerouted);
4696
4717
  };
4697
4718
  if (editTemplateMode) {
4698
4719
  const slideId = activeSlide?.id;
@@ -4848,9 +4869,9 @@ function useCanvasInteractions(input) {
4848
4869
  return;
4849
4870
  }
4850
4871
  const el = elementLookup.get(editId);
4851
- if (el && chunkYBTRSG74_js.hasTextProperties(el)) {
4872
+ if (el && chunk3NDRTC7T_js.hasTextProperties(el)) {
4852
4873
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4853
- const newSegments = chunkYBTRSG74_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4874
+ const newSegments = chunk3NDRTC7T_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4854
4875
  ops.updateElementById(editId, {
4855
4876
  text: committedText,
4856
4877
  textSegments: newSegments
@@ -4861,7 +4882,7 @@ function useCanvasInteractions(input) {
4861
4882
  setInlineEditingText("");
4862
4883
  };
4863
4884
  const openEquationEditorForElement = (el) => {
4864
- if (!chunkYBTRSG74_js.hasTextProperties(el)) {
4885
+ if (!chunk3NDRTC7T_js.hasTextProperties(el)) {
4865
4886
  return false;
4866
4887
  }
4867
4888
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4890,7 +4911,7 @@ function useCanvasInteractions(input) {
4890
4911
  justSelectedRef.current = false;
4891
4912
  } else {
4892
4913
  const el = elementLookup.get(elementId);
4893
- if (el && chunkYBTRSG74_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4914
+ if (el && chunk3NDRTC7T_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4894
4915
  if (!openEquationEditorForElement(el)) {
4895
4916
  setInlineEditingElementId(elementId);
4896
4917
  setInlineEditingText(el.text ?? "");
@@ -4909,7 +4930,7 @@ function useCanvasInteractions(input) {
4909
4930
  if (openEquationEditorForElement(el)) {
4910
4931
  return;
4911
4932
  }
4912
- if (chunkYBTRSG74_js.hasTextProperties(el)) {
4933
+ if (chunk3NDRTC7T_js.hasTextProperties(el)) {
4913
4934
  setInlineEditingElementId(elementId);
4914
4935
  setInlineEditingText(el.text ?? "");
4915
4936
  }
@@ -5102,7 +5123,7 @@ function createFileHandlers(deps) {
5102
5123
  h = Math.round(h * scale);
5103
5124
  }
5104
5125
  addElement({
5105
- id: chunkYBTRSG74_js.generateElementId(),
5126
+ id: chunk3NDRTC7T_js.generateElementId(),
5106
5127
  type: "image",
5107
5128
  x: Math.round((canvasSize.width - w) / 2),
5108
5129
  y: Math.round((canvasSize.height - h) / 2),
@@ -5113,7 +5134,7 @@ function createFileHandlers(deps) {
5113
5134
  };
5114
5135
  img.onerror = () => {
5115
5136
  addElement({
5116
- id: chunkYBTRSG74_js.generateElementId(),
5137
+ id: chunk3NDRTC7T_js.generateElementId(),
5117
5138
  type: "image",
5118
5139
  x: 100,
5119
5140
  y: 100,
@@ -5139,7 +5160,7 @@ function createFileHandlers(deps) {
5139
5160
  const elFilePath = file.path;
5140
5161
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5141
5162
  addElement({
5142
- id: chunkYBTRSG74_js.generateElementId(),
5163
+ id: chunk3NDRTC7T_js.generateElementId(),
5143
5164
  type: "media",
5144
5165
  mediaType,
5145
5166
  mediaMimeType: file.type || void 0,
@@ -5314,13 +5335,13 @@ function createStructuredElementHandlers(deps) {
5314
5335
  return;
5315
5336
  }
5316
5337
  addElement({
5317
- id: chunkYBTRSG74_js.generateElementId(),
5338
+ id: chunk3NDRTC7T_js.generateElementId(),
5318
5339
  type: "smartArt",
5319
5340
  x: 100,
5320
5341
  y: 120,
5321
5342
  width: 600,
5322
5343
  height: 340,
5323
- smartArtData: chunkYBTRSG74_js.buildSmartArtPresetData(
5344
+ smartArtData: chunk3NDRTC7T_js.buildSmartArtPresetData(
5324
5345
  layout,
5325
5346
  defaultItems,
5326
5347
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5332,7 +5353,7 @@ function createStructuredElementHandlers(deps) {
5332
5353
  return;
5333
5354
  }
5334
5355
  addElement({
5335
- id: chunkYBTRSG74_js.generateElementId(),
5356
+ id: chunk3NDRTC7T_js.generateElementId(),
5336
5357
  type: "shape",
5337
5358
  x: 120,
5338
5359
  y: 200,
@@ -5391,7 +5412,7 @@ function createStructuredElementHandlers(deps) {
5391
5412
  const displayText = value || fieldTexts[fieldType] || fieldType;
5392
5413
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5393
5414
  addElement({
5394
- id: chunkYBTRSG74_js.generateElementId(),
5415
+ id: chunk3NDRTC7T_js.generateElementId(),
5395
5416
  type: "shape",
5396
5417
  x: 120,
5397
5418
  y: 200,
@@ -5413,11 +5434,11 @@ function createStructuredElementHandlers(deps) {
5413
5434
  if (!activeSlide) {
5414
5435
  return;
5415
5436
  }
5416
- const preset = chunkYBTRSG74_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5437
+ const preset = chunk3NDRTC7T_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5417
5438
  if (!preset) {
5418
5439
  return;
5419
5440
  }
5420
- const defaultPptxAction = chunkYBTRSG74_js.elementActionToPptxAction({
5441
+ const defaultPptxAction = chunk3NDRTC7T_js.elementActionToPptxAction({
5421
5442
  trigger: "click",
5422
5443
  type: preset.defaultAction
5423
5444
  });
@@ -5426,7 +5447,7 @@ function createStructuredElementHandlers(deps) {
5426
5447
  defaultPptxAction.highlightClick = true;
5427
5448
  }
5428
5449
  addElement({
5429
- id: chunkYBTRSG74_js.generateElementId(),
5450
+ id: chunk3NDRTC7T_js.generateElementId(),
5430
5451
  type: "shape",
5431
5452
  x: 150,
5432
5453
  y: 150,
@@ -5493,14 +5514,14 @@ function useInsertElements(input) {
5493
5514
  return;
5494
5515
  }
5495
5516
  addElement({
5496
- id: chunkYBTRSG74_js.generateElementId(),
5517
+ id: chunk3NDRTC7T_js.generateElementId(),
5497
5518
  type: "text",
5498
5519
  x: 100,
5499
5520
  y: 100,
5500
5521
  width: 300,
5501
5522
  height: 60,
5502
5523
  text: "",
5503
- textStyle: { fontSize: chunkFHTEL3Q6_js.DEFAULT_TEXT_FONT_SIZE }
5524
+ textStyle: { fontSize: chunkIN7D2T4R_js.DEFAULT_TEXT_FONT_SIZE }
5504
5525
  });
5505
5526
  };
5506
5527
  const handleAddShape = () => {
@@ -5508,7 +5529,7 @@ function useInsertElements(input) {
5508
5529
  return;
5509
5530
  }
5510
5531
  addElement({
5511
- id: chunkYBTRSG74_js.generateElementId(),
5532
+ id: chunk3NDRTC7T_js.generateElementId(),
5512
5533
  type: "shape",
5513
5534
  x: 150,
5514
5535
  y: 150,
@@ -5527,15 +5548,15 @@ function useInsertElements(input) {
5527
5548
  return;
5528
5549
  }
5529
5550
  addElement({
5530
- ...chunkYBTRSG74_js.newTableElement(chunkFHTEL3Q6_js.DEFAULT_TABLE_ROWS, chunkFHTEL3Q6_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5531
- id: chunkYBTRSG74_js.generateElementId()
5551
+ ...chunk3NDRTC7T_js.newTableElement(chunkIN7D2T4R_js.DEFAULT_TABLE_ROWS, chunkIN7D2T4R_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5552
+ id: chunk3NDRTC7T_js.generateElementId()
5532
5553
  });
5533
5554
  };
5534
5555
  const handleAddChart = (chartKind) => {
5535
5556
  if (!activeSlide) {
5536
5557
  return;
5537
5558
  }
5538
- addElement(chunkYBTRSG74_js.createDefaultChartElement(chartKind));
5559
+ addElement(chunk3NDRTC7T_js.createDefaultChartElement(chartKind));
5539
5560
  };
5540
5561
  const structured = createStructuredElementHandlers({
5541
5562
  activeSlide,
@@ -5605,7 +5626,7 @@ function useClipboardHandlers(input) {
5605
5626
  if (!selectedElement) {
5606
5627
  return;
5607
5628
  }
5608
- setClipboardPayload(chunkYBTRSG74_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5629
+ setClipboardPayload(chunk3NDRTC7T_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5609
5630
  };
5610
5631
  const handleDelete = () => {
5611
5632
  const idsToDelete = effectiveSelectedIds;
@@ -5622,7 +5643,7 @@ function useClipboardHandlers(input) {
5622
5643
  handleDelete();
5623
5644
  };
5624
5645
  const insertClone = (source) => {
5625
- const clone = chunkYBTRSG74_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5646
+ const clone = chunk3NDRTC7T_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5626
5647
  ops.updateActiveElements((els) => [...els, clone]);
5627
5648
  ops.applySelection(clone.id);
5628
5649
  history.markDirty();
@@ -5657,7 +5678,7 @@ function resolveShapePath(el) {
5657
5678
  return el.pathData;
5658
5679
  }
5659
5680
  if ("shapeType" in el && typeof el.shapeType === "string") {
5660
- const clipPath = chunkYBTRSG74_js.getPresetShapeClipPath(el.shapeType);
5681
+ const clipPath = chunk3NDRTC7T_js.getPresetShapeClipPath(el.shapeType);
5661
5682
  if (clipPath) {
5662
5683
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5663
5684
  if (svgPath) {
@@ -5708,7 +5729,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5708
5729
  return parts.join(" ");
5709
5730
  }
5710
5731
  function transformPathToGlobal(pathData, el) {
5711
- const polys = chunkYBTRSG74_js.svgPathToPolygons(pathData);
5732
+ const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5712
5733
  if (polys.length === 0) {
5713
5734
  return pathData;
5714
5735
  }
@@ -5728,10 +5749,10 @@ function transformPathToGlobal(pathData, el) {
5728
5749
  y: pt.y * scaleY + el.y
5729
5750
  }))
5730
5751
  );
5731
- return chunkYBTRSG74_js.polygonsToSvgPath(transformed);
5752
+ return chunk3NDRTC7T_js.polygonsToSvgPath(transformed);
5732
5753
  }
5733
5754
  function transformPathToLocal(pathData, x, y, _width, _height) {
5734
- const polys = chunkYBTRSG74_js.svgPathToPolygons(pathData);
5755
+ const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5735
5756
  if (polys.length === 0) {
5736
5757
  return pathData;
5737
5758
  }
@@ -5741,10 +5762,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5741
5762
  y: pt.y - y
5742
5763
  }))
5743
5764
  );
5744
- return chunkYBTRSG74_js.polygonsToSvgPath(transformed);
5765
+ return chunk3NDRTC7T_js.polygonsToSvgPath(transformed);
5745
5766
  }
5746
5767
  function pathBounds(pathData) {
5747
- const polys = chunkYBTRSG74_js.svgPathToPolygons(pathData);
5768
+ const polys = chunk3NDRTC7T_js.svgPathToPolygons(pathData);
5748
5769
  let minX = Infinity;
5749
5770
  let minY = Infinity;
5750
5771
  let maxX = -Infinity;
@@ -5803,7 +5824,7 @@ function useMergeShapesHandler(input) {
5803
5824
  let allFragments = [];
5804
5825
  let remaining = globalPaths[0];
5805
5826
  for (let i = 1; i < globalPaths.length; i++) {
5806
- const frags = chunkYBTRSG74_js.mergeShapes("fragment", remaining, globalPaths[i]);
5827
+ const frags = chunk3NDRTC7T_js.mergeShapes("fragment", remaining, globalPaths[i]);
5807
5828
  if (Array.isArray(frags)) {
5808
5829
  allFragments = frags;
5809
5830
  }
@@ -5832,7 +5853,7 @@ function useMergeShapesHandler(input) {
5832
5853
  bounds.height
5833
5854
  );
5834
5855
  const newEl = {
5835
- id: chunkYBTRSG74_js.generateElementId(),
5856
+ id: chunk3NDRTC7T_js.generateElementId(),
5836
5857
  type: "shape",
5837
5858
  x: bounds.x,
5838
5859
  y: bounds.y,
@@ -5870,7 +5891,7 @@ function useMergeShapesHandler(input) {
5870
5891
  } else {
5871
5892
  let resultPath = globalPaths[0];
5872
5893
  for (let i = 1; i < globalPaths.length; i++) {
5873
- const result = chunkYBTRSG74_js.mergeShapes(operation, resultPath, globalPaths[i]);
5894
+ const result = chunk3NDRTC7T_js.mergeShapes(operation, resultPath, globalPaths[i]);
5874
5895
  if (typeof result === "string") {
5875
5896
  resultPath = result;
5876
5897
  }
@@ -5891,7 +5912,7 @@ function useMergeShapesHandler(input) {
5891
5912
  );
5892
5913
  const primary = targets[0];
5893
5914
  const newEl = {
5894
- id: chunkYBTRSG74_js.generateElementId(),
5915
+ id: chunk3NDRTC7T_js.generateElementId(),
5895
5916
  type: "shape",
5896
5917
  x: bounds.x,
5897
5918
  y: bounds.y,
@@ -5954,7 +5975,7 @@ function useGroupAlignLayerHandlers(input) {
5954
5975
  if (ids.length < 2 || !activeSlide) {
5955
5976
  return;
5956
5977
  }
5957
- const { elements, groupId } = chunkYBTRSG74_js.groupElements(ops.activeElements, ids, chunkYBTRSG74_js.generateElementId());
5978
+ const { elements, groupId } = chunk3NDRTC7T_js.groupElements(ops.activeElements, ids, chunk3NDRTC7T_js.generateElementId());
5958
5979
  if (groupId === null) {
5959
5980
  return;
5960
5981
  }
@@ -5967,12 +5988,12 @@ function useGroupAlignLayerHandlers(input) {
5967
5988
  return;
5968
5989
  }
5969
5990
  const group = selectedElement;
5970
- const intoTemplate = chunkYBTRSG74_js.isTemplateElementId(group.id);
5991
+ const intoTemplate = chunk3NDRTC7T_js.isTemplateElementId(group.id);
5971
5992
  const ungrouped = group.children.map((child) => ({
5972
5993
  ...structuredClone(child),
5973
5994
  // Keep child ids in the same store as the group so later edits route
5974
5995
  // correctly: template groups yield template-prefixed child ids.
5975
- id: intoTemplate ? chunkYBTRSG74_js.makeCloneId(true, child.id || group.id) : child.id || chunkYBTRSG74_js.generateElementId(),
5996
+ id: intoTemplate ? chunk3NDRTC7T_js.makeCloneId(true, child.id || group.id) : child.id || chunk3NDRTC7T_js.generateElementId(),
5976
5997
  x: child.x + group.x,
5977
5998
  y: child.y + group.y
5978
5999
  }));
@@ -5996,7 +6017,7 @@ function useGroupAlignLayerHandlers(input) {
5996
6017
  if (!edge) {
5997
6018
  return;
5998
6019
  }
5999
- const positions = chunkYBTRSG74_js.alignElements(selectedElements, edge);
6020
+ const positions = chunk3NDRTC7T_js.alignElements(selectedElements, edge);
6000
6021
  for (const [id, pos] of positions) {
6001
6022
  const el = elementLookup.get(id);
6002
6023
  if (!el) {
@@ -6014,7 +6035,7 @@ function useGroupAlignLayerHandlers(input) {
6014
6035
  if (!distAxis) {
6015
6036
  return;
6016
6037
  }
6017
- const positions = chunkYBTRSG74_js.distributeElements(selectedElements, distAxis);
6038
+ const positions = chunk3NDRTC7T_js.distributeElements(selectedElements, distAxis);
6018
6039
  for (const [id, pos] of positions) {
6019
6040
  const el = elementLookup.get(id);
6020
6041
  if (!el) {
@@ -6031,7 +6052,7 @@ function useGroupAlignLayerHandlers(input) {
6031
6052
  }
6032
6053
  const id = selectedElement.id;
6033
6054
  ops.updateActiveElements(
6034
- (els) => direction === "forward" ? chunkYBTRSG74_js.bringForward(els, id) : direction === "backward" ? chunkYBTRSG74_js.sendBackward(els, id) : els
6055
+ (els) => direction === "forward" ? chunk3NDRTC7T_js.bringForward(els, id) : direction === "backward" ? chunk3NDRTC7T_js.sendBackward(els, id) : els
6035
6056
  );
6036
6057
  history.markDirty();
6037
6058
  };
@@ -6041,7 +6062,7 @@ function useGroupAlignLayerHandlers(input) {
6041
6062
  }
6042
6063
  const id = selectedElement.id;
6043
6064
  ops.updateActiveElements(
6044
- (els) => direction === "front" ? chunkYBTRSG74_js.bringToFront(els, id) : chunkYBTRSG74_js.sendToBack(els, id)
6065
+ (els) => direction === "front" ? chunk3NDRTC7T_js.bringToFront(els, id) : chunk3NDRTC7T_js.sendToBack(els, id)
6045
6066
  );
6046
6067
  history.markDirty();
6047
6068
  };
@@ -6172,7 +6193,7 @@ function useSlideManagement(input) {
6172
6193
  theme
6173
6194
  } = input;
6174
6195
  const handleAddSlide = () => {
6175
- const newSlide = chunkYBTRSG74_js.createBlankSlide(slides.length + 1);
6196
+ const newSlide = chunk3NDRTC7T_js.createBlankSlide(slides.length + 1);
6176
6197
  ops.updateSlides((prev) => {
6177
6198
  const next = [...prev];
6178
6199
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6235,7 +6256,7 @@ function useSlideManagement(input) {
6235
6256
  }
6236
6257
  const clone = {
6237
6258
  ...src,
6238
- id: chunkYBTRSG74_js.makeSlideId(),
6259
+ id: chunk3NDRTC7T_js.makeSlideId(),
6239
6260
  elements: src.elements.map((el) => ({
6240
6261
  ...el,
6241
6262
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6267,7 +6288,7 @@ function useSlideManagement(input) {
6267
6288
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6268
6289
  const insertAt = activeSlideIndex + 1;
6269
6290
  const draft = {
6270
- ...chunkYBTRSG74_js.createBlankSlide(slides.length + 1),
6291
+ ...chunk3NDRTC7T_js.createBlankSlide(slides.length + 1),
6271
6292
  layoutPath,
6272
6293
  ...layoutName ? { layoutName } : {}
6273
6294
  };
@@ -6300,9 +6321,9 @@ function useSlideManagement(input) {
6300
6321
  };
6301
6322
  const handleInsertSlideFromTemplate = (templateId) => {
6302
6323
  const insertAt = activeSlideIndex + 1;
6303
- const draft = chunkYBTRSG74_js.buildSlideTemplateSlide(templateId, chunkYBTRSG74_js.makeSlideId(), slides.length + 1, {
6324
+ const draft = chunk3NDRTC7T_js.buildSlideTemplateSlide(templateId, chunk3NDRTC7T_js.makeSlideId(), slides.length + 1, {
6304
6325
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6305
- scheme: chunkYBTRSG74_js.templateSchemeFromTheme(theme?.colorScheme)
6326
+ scheme: chunk3NDRTC7T_js.templateSchemeFromTheme(theme?.colorScheme)
6306
6327
  });
6307
6328
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6308
6329
  setActiveSlideIndex(insertAt);
@@ -6339,7 +6360,7 @@ function createTableMergeHandlers(input) {
6339
6360
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6340
6361
  return;
6341
6362
  }
6342
- const newTableData = chunkYBTRSG74_js.mergeCells(
6363
+ const newTableData = chunk3NDRTC7T_js.mergeCells(
6343
6364
  [
6344
6365
  { row: rowIndex, col: columnIndex },
6345
6366
  { row: rowIndex, col: nextColIdx }
@@ -6347,7 +6368,7 @@ function createTableMergeHandlers(input) {
6347
6368
  td
6348
6369
  );
6349
6370
  const updates = { tableData: newTableData };
6350
- const newRawXml = chunkYBTRSG74_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6371
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6351
6372
  if (newRawXml) {
6352
6373
  updates.rawXml = newRawXml;
6353
6374
  }
@@ -6373,7 +6394,7 @@ function createTableMergeHandlers(input) {
6373
6394
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6374
6395
  return;
6375
6396
  }
6376
- const newTableData = chunkYBTRSG74_js.mergeCells(
6397
+ const newTableData = chunk3NDRTC7T_js.mergeCells(
6377
6398
  [
6378
6399
  { row: rowIndex, col: columnIndex },
6379
6400
  { row: targetNextRowIdx, col: columnIndex }
@@ -6381,7 +6402,7 @@ function createTableMergeHandlers(input) {
6381
6402
  td
6382
6403
  );
6383
6404
  const updates = { tableData: newTableData };
6384
- const newRawXml = chunkYBTRSG74_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6405
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6385
6406
  if (newRawXml) {
6386
6407
  updates.rawXml = newRawXml;
6387
6408
  }
@@ -6396,9 +6417,9 @@ function createTableMergeHandlers(input) {
6396
6417
  return;
6397
6418
  }
6398
6419
  const td = selectedElement.tableData;
6399
- const newTableData = chunkYBTRSG74_js.mergeCells(ts.selectedCells, td);
6420
+ const newTableData = chunk3NDRTC7T_js.mergeCells(ts.selectedCells, td);
6400
6421
  const updates = { tableData: newTableData };
6401
- const newRawXml = chunkYBTRSG74_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6422
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6402
6423
  if (newRawXml) {
6403
6424
  updates.rawXml = newRawXml;
6404
6425
  }
@@ -6415,9 +6436,9 @@ function createTableMergeHandlers(input) {
6415
6436
  }
6416
6437
  const { rowIndex, columnIndex } = ts;
6417
6438
  const td = selectedElement.tableData;
6418
- const newTableData = chunkYBTRSG74_js.splitCell(rowIndex, columnIndex, td);
6439
+ const newTableData = chunk3NDRTC7T_js.splitCell(rowIndex, columnIndex, td);
6419
6440
  const updates = { tableData: newTableData };
6420
- const newRawXml = chunkYBTRSG74_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6441
+ const newRawXml = chunk3NDRTC7T_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6421
6442
  if (newRawXml) {
6422
6443
  updates.rawXml = newRawXml;
6423
6444
  }
@@ -6461,7 +6482,7 @@ function createTableStructHandlers(input) {
6461
6482
  updates.tableData = { ...el.tableData, rows: newRows };
6462
6483
  }
6463
6484
  if (el.rawXml) {
6464
- const newRawXml = chunkYBTRSG74_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6485
+ const newRawXml = chunk3NDRTC7T_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6465
6486
  if (newRawXml) {
6466
6487
  updates.rawXml = newRawXml;
6467
6488
  }
@@ -6485,7 +6506,7 @@ function createTableStructHandlers(input) {
6485
6506
  const { rowIndex, columnIndex: colIndex } = ts;
6486
6507
  const updates = {};
6487
6508
  if (selectedElement.rawXml) {
6488
- const newRawXml = chunkYBTRSG74_js.updateCellTextStyleInRawXml(
6509
+ const newRawXml = chunk3NDRTC7T_js.updateCellTextStyleInRawXml(
6489
6510
  selectedElement,
6490
6511
  rowIndex,
6491
6512
  colIndex,
@@ -6549,9 +6570,9 @@ function createTableStructHandlers(input) {
6549
6570
  return;
6550
6571
  }
6551
6572
  const rowIdx = ts?.rowIndex ?? 0;
6552
- const newTableData = chunkYBTRSG74_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6573
+ const newTableData = chunk3NDRTC7T_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6553
6574
  const updates = { tableData: newTableData };
6554
- const newRawXml = chunkYBTRSG74_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6575
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6555
6576
  if (newRawXml) {
6556
6577
  updates.rawXml = newRawXml;
6557
6578
  }
@@ -6564,12 +6585,12 @@ function createTableStructHandlers(input) {
6564
6585
  }
6565
6586
  const td = selectedElement.tableData;
6566
6587
  const rowIdx = ts?.rowIndex ?? 0;
6567
- const newTableData = chunkYBTRSG74_js.deleteTableRow(td, rowIdx);
6588
+ const newTableData = chunk3NDRTC7T_js.deleteTableRow(td, rowIdx);
6568
6589
  if (newTableData === td) {
6569
6590
  return;
6570
6591
  }
6571
6592
  const updates = { tableData: newTableData };
6572
- const newRawXml = chunkYBTRSG74_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6593
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6573
6594
  if (newRawXml) {
6574
6595
  updates.rawXml = newRawXml;
6575
6596
  }
@@ -6581,9 +6602,9 @@ function createTableStructHandlers(input) {
6581
6602
  return;
6582
6603
  }
6583
6604
  const colIdx = ts?.columnIndex ?? 0;
6584
- const newTableData = chunkYBTRSG74_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6605
+ const newTableData = chunk3NDRTC7T_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6585
6606
  const updates = { tableData: newTableData };
6586
- const newRawXml = chunkYBTRSG74_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6607
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6587
6608
  if (newRawXml) {
6588
6609
  updates.rawXml = newRawXml;
6589
6610
  }
@@ -6596,12 +6617,12 @@ function createTableStructHandlers(input) {
6596
6617
  }
6597
6618
  const td = selectedElement.tableData;
6598
6619
  const colIdx = ts?.columnIndex ?? 0;
6599
- const newTableData = chunkYBTRSG74_js.deleteTableColumn(td, colIdx);
6620
+ const newTableData = chunk3NDRTC7T_js.deleteTableColumn(td, colIdx);
6600
6621
  if (newTableData === td) {
6601
6622
  return;
6602
6623
  }
6603
6624
  const updates = { tableData: newTableData };
6604
- const newRawXml = chunkYBTRSG74_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6625
+ const newRawXml = chunk3NDRTC7T_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6605
6626
  if (newRawXml) {
6606
6627
  updates.rawXml = newRawXml;
6607
6628
  }
@@ -6637,8 +6658,8 @@ async function renderToCanvas(element, options = {}) {
6637
6658
  return html2canvasPro(element, {
6638
6659
  ...options,
6639
6660
  onclone: async (doc, clonedEl) => {
6640
- await chunkYBTRSG74_js.normalizeColorsForCapture(doc, clonedEl);
6641
- chunkYBTRSG74_js.preprocessCssForCapture(clonedEl);
6661
+ await chunk3NDRTC7T_js.normalizeColorsForCapture(doc, clonedEl);
6662
+ chunk3NDRTC7T_js.preprocessCssForCapture(clonedEl);
6642
6663
  if (typeof userOnClone === "function") {
6643
6664
  userOnClone(doc, clonedEl);
6644
6665
  }
@@ -6694,7 +6715,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6694
6715
  }
6695
6716
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6696
6717
  const blob = await exportSlideToPngBlob(slideElement, options);
6697
- chunkYBTRSG74_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6718
+ chunk3NDRTC7T_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6698
6719
  }
6699
6720
  async function copySlideToClipboard(slideElement, options = {}) {
6700
6721
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6716,15 +6737,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6716
6737
  continue;
6717
6738
  }
6718
6739
  const canvas = await renderElementToCanvas(stageEl, scale);
6719
- images.push(chunkYBTRSG74_js.canvasToJpegData(canvas));
6740
+ images.push(chunk3NDRTC7T_js.canvasToJpegData(canvas));
6720
6741
  }
6721
6742
  onProgress?.(totalSlides, totalSlides);
6722
6743
  setActiveSlide(currentSlideIndex);
6723
6744
  if (images.length === 0) {
6724
6745
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6725
6746
  }
6726
- const pdfBlobUrl = chunkFHTEL3Q6_js.buildPdfFromImageData(images);
6727
- chunkYBTRSG74_js.downloadDataUrl(pdfBlobUrl, filename);
6747
+ const pdfBlobUrl = chunkIN7D2T4R_js.buildPdfFromImageData(images);
6748
+ chunk3NDRTC7T_js.downloadDataUrl(pdfBlobUrl, filename);
6728
6749
  }
6729
6750
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6730
6751
  const { scale = 2, onProgress } = options;
@@ -6772,8 +6793,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6772
6793
  if (pages.length === 0) {
6773
6794
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6774
6795
  }
6775
- const pdfDataUrl = chunkFHTEL3Q6_js.buildNotesPdf(pages);
6776
- chunkYBTRSG74_js.downloadDataUrl(pdfDataUrl, filename);
6796
+ const pdfDataUrl = chunkIN7D2T4R_js.buildNotesPdf(pages);
6797
+ chunk3NDRTC7T_js.downloadDataUrl(pdfDataUrl, filename);
6777
6798
  }
6778
6799
 
6779
6800
  // src/viewer/utils/export-video.ts
@@ -6817,7 +6838,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6817
6838
  const fps = 30;
6818
6839
  const stream = recordingCanvas.captureStream(fps);
6819
6840
  const recorder = new MediaRecorder(stream, {
6820
- mimeType: chunkYBTRSG74_js.pickSupportedMimeType([...chunkYBTRSG74_js.WEBM_MIME_CANDIDATES]),
6841
+ mimeType: chunk3NDRTC7T_js.pickSupportedMimeType([...chunk3NDRTC7T_js.WEBM_MIME_CANDIDATES]),
6821
6842
  videoBitsPerSecond: 5e6
6822
6843
  });
6823
6844
  const chunks = [];
@@ -6840,8 +6861,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6840
6861
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6841
6862
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6842
6863
  ctx.drawImage(slideCanvases[i], 0, 0);
6843
- const frameInterval = chunkYBTRSG74_js.fpsToFrameIntervalMs(fps);
6844
- const framesNeeded = chunkYBTRSG74_js.segmentFrameCount(duration, fps);
6864
+ const frameInterval = chunk3NDRTC7T_js.fpsToFrameIntervalMs(fps);
6865
+ const framesNeeded = chunk3NDRTC7T_js.segmentFrameCount(duration, fps);
6845
6866
  for (let f = 0; f < framesNeeded; f++) {
6846
6867
  if (signal?.aborted) {
6847
6868
  recorder.stop();
@@ -6890,7 +6911,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6890
6911
  if (frames.length === 0) {
6891
6912
  throw new Error(chunk3ISYPBSX_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6892
6913
  }
6893
- const gifBytes = chunkYBTRSG74_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6914
+ const gifBytes = chunk3NDRTC7T_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6894
6915
  onProgress?.(totalSlides, totalSlides);
6895
6916
  const buf = new ArrayBuffer(gifBytes.length);
6896
6917
  new Uint8Array(buf).set(gifBytes);
@@ -6944,7 +6965,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6944
6965
  continue;
6945
6966
  }
6946
6967
  onProgress?.(processedCount, data.slides.length);
6947
- let svg = chunkYBTRSG74_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6968
+ let svg = chunk3NDRTC7T_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6948
6969
  if (embedFonts && fontFaces?.length) {
6949
6970
  svg = injectFontFaces(svg, fontFaces);
6950
6971
  }
@@ -7006,7 +7027,7 @@ function useExportSaveAs(input) {
7006
7027
  }
7007
7028
  setExportProgress(70);
7008
7029
  setExportStatusMessage("Writing README...");
7009
- const readme = chunkYBTRSG74_js.generatePackageReadme(pptxFilename);
7030
+ const readme = chunk3NDRTC7T_js.generatePackageReadme(pptxFilename);
7010
7031
  pkgFolder.file("README.txt", readme);
7011
7032
  if (abortCtrl.signal.aborted) {
7012
7033
  throw new DOMException("Export cancelled", "AbortError");
@@ -7017,7 +7038,7 @@ function useExportSaveAs(input) {
7017
7038
  setExportProgress(95);
7018
7039
  setExportStatusMessage("Downloading...");
7019
7040
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
7020
- chunkYBTRSG74_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7041
+ chunk3NDRTC7T_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
7021
7042
  setExportProgress(100);
7022
7043
  } catch (err) {
7023
7044
  if (err.name !== "AbortError") {
@@ -7040,7 +7061,7 @@ function useExportSaveAs(input) {
7040
7061
  const blob = new Blob([data], {
7041
7062
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
7042
7063
  });
7043
- chunkYBTRSG74_js.downloadBlob(blob, `${baseName}.${ext}`);
7064
+ chunk3NDRTC7T_js.downloadBlob(blob, `${baseName}.${ext}`);
7044
7065
  } catch (err) {
7045
7066
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
7046
7067
  }
@@ -7053,14 +7074,14 @@ function useExportSaveAs(input) {
7053
7074
  const pptxGuides = guides.map((g) => ({
7054
7075
  id: g.id,
7055
7076
  orientation: g.axis === "h" ? "horz" : "vert",
7056
- positionEmu: chunkYBTRSG74_js.guidePxToEmu(g.position)
7077
+ positionEmu: chunk3NDRTC7T_js.guidePxToEmu(g.position)
7057
7078
  }));
7058
7079
  return {
7059
7080
  ...slide,
7060
7081
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
7061
7082
  };
7062
7083
  });
7063
- const slidesToSave = chunkFHTEL3Q6_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7084
+ const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
7064
7085
  const saveOptions = {
7065
7086
  headerFooter,
7066
7087
  presentationProperties,
@@ -7086,11 +7107,11 @@ function useExportSaveAs(input) {
7086
7107
  const handleExportJson = () => {
7087
7108
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7088
7109
  const data = {
7089
- slides: chunkFHTEL3Q6_js.buildSaveSlides(slides, templateElementsBySlideId),
7110
+ slides: chunkIN7D2T4R_js.buildSaveSlides(slides, templateElementsBySlideId),
7090
7111
  width: canvasSize.width,
7091
7112
  height: canvasSize.height,
7092
- widthEmu: chunkYBTRSG74_js.guidePxToEmu(canvasSize.width),
7093
- heightEmu: chunkYBTRSG74_js.guidePxToEmu(canvasSize.height),
7113
+ widthEmu: chunk3NDRTC7T_js.guidePxToEmu(canvasSize.width),
7114
+ heightEmu: chunk3NDRTC7T_js.guidePxToEmu(canvasSize.height),
7094
7115
  theme,
7095
7116
  headerFooter,
7096
7117
  presentationProperties,
@@ -7104,7 +7125,7 @@ function useExportSaveAs(input) {
7104
7125
  handoutMaster
7105
7126
  };
7106
7127
  try {
7107
- chunkYBTRSG74_js.exportDeckJson(data, sourceName);
7128
+ chunk3NDRTC7T_js.exportDeckJson(data, sourceName);
7108
7129
  } catch (err) {
7109
7130
  console.error("[PowerPointViewer] JSON export failed:", err);
7110
7131
  }
@@ -7144,7 +7165,7 @@ function safeConfirm(message) {
7144
7165
  }
7145
7166
  }
7146
7167
  function downloadBlob2(blob, filename) {
7147
- chunkYBTRSG74_js.downloadBlob(blob, chunkYBTRSG74_js.sanitizeDownloadFilename(filename));
7168
+ chunk3NDRTC7T_js.downloadBlob(blob, chunk3NDRTC7T_js.sanitizeDownloadFilename(filename));
7148
7169
  }
7149
7170
 
7150
7171
  // src/viewer/hooks/useExportHandlers.ts
@@ -7250,21 +7271,21 @@ function useExportHandlers(input) {
7250
7271
  {
7251
7272
  scale: 2,
7252
7273
  onProgress: (current, total) => {
7253
- setExportProgress(chunkYBTRSG74_js.slideProgressPercent(current, total));
7254
- setExportStatusMessage(chunkYBTRSG74_js.slideStatusLabel("Rendering", current, total));
7274
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7275
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Rendering", current, total));
7255
7276
  },
7256
7277
  signal: abortCtrl.signal
7257
7278
  }
7258
7279
  );
7259
- setExportProgress(chunkYBTRSG74_js.EXPORT_ASSEMBLING_PERCENT);
7280
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7260
7281
  setExportStatusMessage("Building PDF...");
7261
7282
  await new Promise((r) => {
7262
7283
  setTimeout(r, 100);
7263
7284
  });
7264
- setExportProgress(chunkYBTRSG74_js.EXPORT_DONE_PERCENT);
7285
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7265
7286
  setExportStatusMessage("Done!");
7266
7287
  } catch (err) {
7267
- if (!chunkYBTRSG74_js.isExportAbortError(err)) {
7288
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7268
7289
  console.error("[PowerPointViewer] PDF export failed:", err);
7269
7290
  }
7270
7291
  } finally {
@@ -7294,21 +7315,21 @@ function useExportHandlers(input) {
7294
7315
  {
7295
7316
  scale: 2,
7296
7317
  onProgress: (current, total) => {
7297
- setExportProgress(chunkYBTRSG74_js.slideProgressPercent(current, total));
7298
- setExportStatusMessage(chunkYBTRSG74_js.slideStatusLabel("Rendering", current, total));
7318
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7319
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Rendering", current, total));
7299
7320
  },
7300
7321
  signal: abortCtrl.signal
7301
7322
  }
7302
7323
  );
7303
- setExportProgress(chunkYBTRSG74_js.EXPORT_ASSEMBLING_PERCENT);
7324
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7304
7325
  setExportStatusMessage("Building PDF...");
7305
7326
  await new Promise((r) => {
7306
7327
  setTimeout(r, 100);
7307
7328
  });
7308
- setExportProgress(chunkYBTRSG74_js.EXPORT_DONE_PERCENT);
7329
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7309
7330
  setExportStatusMessage("Done!");
7310
7331
  } catch (err) {
7311
- if (!chunkYBTRSG74_js.isExportAbortError(err)) {
7332
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7312
7333
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7313
7334
  }
7314
7335
  } finally {
@@ -7349,22 +7370,22 @@ function useExportHandlers(input) {
7349
7370
  scale: 1,
7350
7371
  slideDurationMs: 3e3,
7351
7372
  onProgress: (current, total) => {
7352
- setExportProgress(chunkYBTRSG74_js.slideProgressPercent(current, total, 45));
7353
- setExportStatusMessage(chunkYBTRSG74_js.slideStatusLabel("Capturing", current, total));
7373
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total, 45));
7374
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Capturing", current, total));
7354
7375
  },
7355
7376
  onRecordProgress: (current, total) => {
7356
- setExportProgress(chunkYBTRSG74_js.recordProgressPercent(current, total));
7357
- setExportStatusMessage(chunkYBTRSG74_js.slideStatusLabel("Recording", current, total));
7377
+ setExportProgress(chunk3NDRTC7T_js.recordProgressPercent(current, total));
7378
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Recording", current, total));
7358
7379
  },
7359
7380
  signal: abortCtrl.signal
7360
7381
  }
7361
7382
  );
7362
- setExportProgress(chunkYBTRSG74_js.EXPORT_ASSEMBLING_PERCENT);
7383
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7363
7384
  setExportStatusMessage("Saving file...");
7364
7385
  downloadBlob2(blob, "presentation.webm");
7365
- setExportProgress(chunkYBTRSG74_js.EXPORT_DONE_PERCENT);
7386
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7366
7387
  } catch (err) {
7367
- if (!chunkYBTRSG74_js.isExportAbortError(err)) {
7388
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7368
7389
  console.error("[PowerPointViewer] Video export failed:", err);
7369
7390
  }
7370
7391
  } finally {
@@ -7392,18 +7413,18 @@ function useExportHandlers(input) {
7392
7413
  scale: 0.5,
7393
7414
  slideDurationMs: 2e3,
7394
7415
  onProgress: (current, total) => {
7395
- setExportProgress(chunkYBTRSG74_js.slideProgressPercent(current, total));
7396
- setExportStatusMessage(chunkYBTRSG74_js.slideStatusLabel("Encoding", current, total));
7416
+ setExportProgress(chunk3NDRTC7T_js.slideProgressPercent(current, total));
7417
+ setExportStatusMessage(chunk3NDRTC7T_js.slideStatusLabel("Encoding", current, total));
7397
7418
  },
7398
7419
  signal: abortCtrl.signal
7399
7420
  }
7400
7421
  );
7401
- setExportProgress(chunkYBTRSG74_js.EXPORT_ASSEMBLING_PERCENT);
7422
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_ASSEMBLING_PERCENT);
7402
7423
  setExportStatusMessage("Saving file...");
7403
7424
  downloadBlob2(blob, "presentation.gif");
7404
- setExportProgress(chunkYBTRSG74_js.EXPORT_DONE_PERCENT);
7425
+ setExportProgress(chunk3NDRTC7T_js.EXPORT_DONE_PERCENT);
7405
7426
  } catch (err) {
7406
- if (!chunkYBTRSG74_js.isExportAbortError(err)) {
7427
+ if (!chunk3NDRTC7T_js.isExportAbortError(err)) {
7407
7428
  console.error("[PowerPointViewer] GIF export failed:", err);
7408
7429
  }
7409
7430
  } finally {
@@ -7444,7 +7465,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7444
7465
  }
7445
7466
  printWindow.document.open();
7446
7467
  printWindow.document.write(
7447
- chunkYBTRSG74_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7468
+ chunk3NDRTC7T_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7448
7469
  );
7449
7470
  printWindow.document.close();
7450
7471
  printWindow.focus();
@@ -7505,7 +7526,7 @@ function usePrintHandlers(input) {
7505
7526
  if (svgs.length === 0) {
7506
7527
  return;
7507
7528
  }
7508
- const printDoc = chunkYBTRSG74_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7529
+ const printDoc = chunk3NDRTC7T_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7509
7530
  title: "Slides (Vector)",
7510
7531
  orientation: settings.orientation,
7511
7532
  colorFilter
@@ -7541,7 +7562,7 @@ function usePrintHandlers(input) {
7541
7562
  if (settings.printWhat === "outline") {
7542
7563
  openPrintWindow(
7543
7564
  "Outline",
7544
- `<div class="outline-page">${chunkYBTRSG74_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7565
+ `<div class="outline-page">${chunk3NDRTC7T_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7545
7566
  settings.orientation,
7546
7567
  colorFilter,
7547
7568
  settings.frameSlides
@@ -7566,7 +7587,7 @@ function usePrintHandlers(input) {
7566
7587
  if (settings.printWhat === "slides") {
7567
7588
  openPrintWindow(
7568
7589
  "Slides",
7569
- chunkYBTRSG74_js.buildSlidesHtml(slideImages, slideIndices),
7590
+ chunk3NDRTC7T_js.buildSlidesHtml(slideImages, slideIndices),
7570
7591
  settings.orientation,
7571
7592
  colorFilter,
7572
7593
  settings.frameSlides
@@ -7576,7 +7597,7 @@ function usePrintHandlers(input) {
7576
7597
  if (settings.printWhat === "notes") {
7577
7598
  openPrintWindow(
7578
7599
  "Notes Pages",
7579
- chunkYBTRSG74_js.buildNotesHtml(slideImages, slideIndices, slides),
7600
+ chunk3NDRTC7T_js.buildNotesHtml(slideImages, slideIndices, slides),
7580
7601
  "portrait",
7581
7602
  colorFilter,
7582
7603
  settings.frameSlides
@@ -7587,7 +7608,7 @@ function usePrintHandlers(input) {
7587
7608
  const spp = settings.slidesPerPage;
7588
7609
  openPrintWindow(
7589
7610
  `Handout ${spp} per page`,
7590
- chunkYBTRSG74_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7611
+ chunk3NDRTC7T_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7591
7612
  "portrait",
7592
7613
  colorFilter,
7593
7614
  settings.frameSlides
@@ -7651,8 +7672,8 @@ function useThemeHandlers(input) {
7651
7672
  return;
7652
7673
  }
7653
7674
  await handler.updateThemeColorScheme(colorScheme);
7654
- const previousMap = theme?.colorScheme ? chunkYBTRSG74_js.buildThemeColorMap(theme.colorScheme) : {};
7655
- setSlides((prev) => chunkYBTRSG74_js.reResolveSlideColors(prev, previousMap, colorScheme));
7675
+ const previousMap = theme?.colorScheme ? chunk3NDRTC7T_js.buildThemeColorMap(theme.colorScheme) : {};
7676
+ setSlides((prev) => chunk3NDRTC7T_js.reResolveSlideColors(prev, previousMap, colorScheme));
7656
7677
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7657
7678
  bumpHistory();
7658
7679
  history.markDirty();
@@ -7757,7 +7778,7 @@ function useThemeSwitching(input) {
7757
7778
  }
7758
7779
  try {
7759
7780
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7760
- const newData = chunkYBTRSG74_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7781
+ const newData = chunk3NDRTC7T_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7761
7782
  onDataChange(newData);
7762
7783
  onThemeChanged?.(preset);
7763
7784
  } catch (error) {
@@ -7774,7 +7795,7 @@ function useThemeSwitching(input) {
7774
7795
  }
7775
7796
  try {
7776
7797
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7777
- const newData = chunkYBTRSG74_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7798
+ const newData = chunk3NDRTC7T_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7778
7799
  onDataChange(newData);
7779
7800
  } catch (error) {
7780
7801
  console.error("Failed to switch to custom theme:", error);
@@ -7786,12 +7807,12 @@ function useThemeSwitching(input) {
7786
7807
  if (!data?.theme?.colorScheme) {
7787
7808
  return void 0;
7788
7809
  }
7789
- return chunkYBTRSG74_js.THEME_PRESETS.find(
7790
- (p) => chunkYBTRSG74_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7810
+ return chunk3NDRTC7T_js.THEME_PRESETS.find(
7811
+ (p) => chunk3NDRTC7T_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7791
7812
  );
7792
7813
  }, [data?.theme?.colorScheme]);
7793
7814
  return {
7794
- presets: chunkYBTRSG74_js.THEME_PRESETS,
7815
+ presets: chunk3NDRTC7T_js.THEME_PRESETS,
7795
7816
  switchToPreset,
7796
7817
  switchToCustom,
7797
7818
  currentPreset
@@ -7866,7 +7887,7 @@ function usePropertyHandlers(input) {
7866
7887
  }
7867
7888
  try {
7868
7889
  const ab = await file.arrayBuffer();
7869
- const h = new chunkYBTRSG74_js.PptxHandler();
7890
+ const h = new chunk3NDRTC7T_js.PptxHandler();
7870
7891
  const other = await h.load(ab);
7871
7892
  if (!other) {
7872
7893
  return;
@@ -7876,7 +7897,7 @@ function usePropertyHandlers(input) {
7876
7897
  width: canvasSize.width,
7877
7898
  height: canvasSize.height
7878
7899
  };
7879
- setCompareResult(chunkYBTRSG74_js.comparePresentation(cur, other));
7900
+ setCompareResult(chunk3NDRTC7T_js.comparePresentation(cur, other));
7880
7901
  setIsComparePanelOpen(true);
7881
7902
  } catch (err) {
7882
7903
  console.warn("Compare failed:", err);
@@ -7893,7 +7914,7 @@ function usePropertyHandlers(input) {
7893
7914
  if (!diff || diff.status === "unchanged") {
7894
7915
  return;
7895
7916
  }
7896
- setSlides((prev) => chunkYBTRSG74_js.applyAcceptSlide(prev, diff));
7917
+ setSlides((prev) => chunk3NDRTC7T_js.applyAcceptSlide(prev, diff));
7897
7918
  setIsDirty(true);
7898
7919
  },
7899
7920
  [compareResult, setSlides, setIsDirty]
@@ -7904,10 +7925,10 @@ function usePropertyHandlers(input) {
7904
7925
  if (!compareResult) {
7905
7926
  return;
7906
7927
  }
7907
- setSlides((prev) => chunkYBTRSG74_js.applyAcceptAllSlides(prev, compareResult));
7928
+ setSlides((prev) => chunk3NDRTC7T_js.applyAcceptAllSlides(prev, compareResult));
7908
7929
  setIsDirty(true);
7909
7930
  }, [compareResult, setSlides, setIsDirty]);
7910
- const usedFontFamilies = react.useMemo(() => chunkYBTRSG74_js.collectUsedFonts(slides), [slides]);
7931
+ const usedFontFamilies = react.useMemo(() => chunk3NDRTC7T_js.collectUsedFonts(slides), [slides]);
7911
7932
  return {
7912
7933
  handleUpdateNotes,
7913
7934
  handleUpdateSlide,
@@ -8026,7 +8047,7 @@ function useIsMobile(input) {
8026
8047
  const containerRef = input?.containerRef;
8027
8048
  const isTouchDevice = react.useSyncExternalStore(
8028
8049
  subscribeTouchCapability,
8029
- chunkYBTRSG74_js.detectTouchDevice,
8050
+ chunk3NDRTC7T_js.detectTouchDevice,
8030
8051
  () => false
8031
8052
  // server snapshot
8032
8053
  );
@@ -8042,7 +8063,7 @@ function useIsMobile(input) {
8042
8063
  }
8043
8064
  return containerRef?.current?.clientHeight ?? window.innerHeight;
8044
8065
  });
8045
- const [orientation, setOrientation] = react.useState(chunkYBTRSG74_js.detectOrientation);
8066
+ const [orientation, setOrientation] = react.useState(chunk3NDRTC7T_js.detectOrientation);
8046
8067
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
8047
8068
  const [initialViewportHeight] = react.useState(
8048
8069
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -8086,7 +8107,7 @@ function useIsMobile(input) {
8086
8107
  return;
8087
8108
  }
8088
8109
  const handleOrientationChange = () => {
8089
- setOrientation(chunkYBTRSG74_js.detectOrientation());
8110
+ setOrientation(chunk3NDRTC7T_js.detectOrientation());
8090
8111
  };
8091
8112
  if (screen.orientation) {
8092
8113
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -8116,9 +8137,9 @@ function useIsMobile(input) {
8116
8137
  window.addEventListener("resize", handleResize);
8117
8138
  return () => window.removeEventListener("resize", handleResize);
8118
8139
  }, [isTouchDevice, initialViewportHeight]);
8119
- const isMobile = chunkYBTRSG74_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8120
- const isTablet = !isMobile && containerWidth >= chunkYBTRSG74_js.MOBILE_BREAKPOINT && containerWidth < chunkYBTRSG74_js.TABLET_BREAKPOINT;
8121
- const isDesktop = !isMobile && containerWidth >= chunkYBTRSG74_js.TABLET_BREAKPOINT;
8140
+ const isMobile = chunk3NDRTC7T_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
8141
+ const isTablet = !isMobile && containerWidth >= chunk3NDRTC7T_js.MOBILE_BREAKPOINT && containerWidth < chunk3NDRTC7T_js.TABLET_BREAKPOINT;
8142
+ const isDesktop = !isMobile && containerWidth >= chunk3NDRTC7T_js.TABLET_BREAKPOINT;
8122
8143
  return {
8123
8144
  isMobile,
8124
8145
  isTablet,
@@ -8179,11 +8200,11 @@ function useViewerDialogs(input) {
8179
8200
  );
8180
8201
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8181
8202
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8182
- () => typeof window !== "undefined" ? chunkYBTRSG74_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8203
+ () => typeof window !== "undefined" ? chunk3NDRTC7T_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8183
8204
  );
8184
8205
  react.useEffect(() => {
8185
8206
  const handleWindow = () => setIsNarrowViewport(
8186
- chunkYBTRSG74_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8207
+ chunk3NDRTC7T_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8187
8208
  );
8188
8209
  let observer = null;
8189
8210
  let raf = 0;
@@ -8197,12 +8218,12 @@ function useViewerDialogs(input) {
8197
8218
  const entry = entries[0];
8198
8219
  if (entry) {
8199
8220
  setIsNarrowViewport(
8200
- chunkYBTRSG74_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8221
+ chunk3NDRTC7T_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8201
8222
  );
8202
8223
  }
8203
8224
  });
8204
8225
  observer.observe(el);
8205
- setIsNarrowViewport(chunkYBTRSG74_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8226
+ setIsNarrowViewport(chunk3NDRTC7T_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8206
8227
  };
8207
8228
  attach();
8208
8229
  window.addEventListener("resize", handleWindow);
@@ -8360,20 +8381,20 @@ function useViewerDialogs(input) {
8360
8381
  }
8361
8382
  function computeGridSpacingPx(presentationGridSpacing) {
8362
8383
  if (presentationGridSpacing) {
8363
- const px = Math.round(presentationGridSpacing.cx / chunkFHTEL3Q6_js.EMU_PER_PX);
8384
+ const px = Math.round(presentationGridSpacing.cx / chunkIN7D2T4R_js.EMU_PER_PX);
8364
8385
  if (px > 0) {
8365
8386
  return px;
8366
8387
  }
8367
8388
  }
8368
- return chunkFHTEL3Q6_js.GRID_SIZE;
8389
+ return chunkIN7D2T4R_js.GRID_SIZE;
8369
8390
  }
8370
8391
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8371
8392
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8372
- return chunkYBTRSG74_js.resolveShowSlideIndexes(slides, activeShow);
8393
+ return chunk3NDRTC7T_js.resolveShowSlideIndexes(slides, activeShow);
8373
8394
  }
8374
8395
  function computeSlideSectionGroups(slides, sections) {
8375
- return chunkYBTRSG74_js.groupSlidesBySection(sections, slides).map((group) => ({
8376
- id: group.section?.id ?? (sections.length > 0 ? chunkFHTEL3Q6_js.UNGROUPED_SECTION_ID : "default"),
8396
+ return chunk3NDRTC7T_js.groupSlidesBySection(sections, slides).map((group) => ({
8397
+ id: group.section?.id ?? (sections.length > 0 ? chunkIN7D2T4R_js.UNGROUPED_SECTION_ID : "default"),
8377
8398
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8378
8399
  slideIndexes: group.slideIndexes,
8379
8400
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8428,7 +8449,7 @@ function useDerivedSlideState(input) {
8428
8449
  );
8429
8450
  const slideSectionGroups = react.useMemo(
8430
8451
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8431
- if (group.id === chunkFHTEL3Q6_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8452
+ if (group.id === chunkIN7D2T4R_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8432
8453
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8433
8454
  }
8434
8455
  if (group.id === "default" && group.label === "Slides") {
@@ -8531,13 +8552,13 @@ function useAnnotationHandlers(input) {
8531
8552
  }, [annotations, setMode, setSlides, history]);
8532
8553
  const handleSetMode = react.useCallback(
8533
8554
  (nextMode) => {
8534
- if (mode === "present" && nextMode !== "present" && !chunkYBTRSG74_js.mayLeaveSlideShow()) {
8555
+ if (mode === "present" && nextMode !== "present" && !chunk3NDRTC7T_js.mayLeaveSlideShow()) {
8535
8556
  return;
8536
8557
  }
8537
8558
  if (nextMode === "present") {
8538
8559
  presentation.enterPresentMode();
8539
8560
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8540
- chunkYBTRSG74_js.stopAllPersistentAudio();
8561
+ chunk3NDRTC7T_js.stopAllPersistentAudio();
8541
8562
  pendingModeAfterAnnotationsRef.current = nextMode;
8542
8563
  if (promptKeepInkAnnotations) {
8543
8564
  setShowKeepAnnotationsDialog(true);
@@ -8546,7 +8567,7 @@ function useAnnotationHandlers(input) {
8546
8567
  }
8547
8568
  } else {
8548
8569
  if (mode === "present") {
8549
- chunkYBTRSG74_js.stopAllPersistentAudio();
8570
+ chunk3NDRTC7T_js.stopAllPersistentAudio();
8550
8571
  }
8551
8572
  setMode(nextMode);
8552
8573
  }
@@ -8612,13 +8633,13 @@ function useSerialize(input) {
8612
8633
  let processedSlide = slide;
8613
8634
  if (pendingEditId) {
8614
8635
  const updatedElements = slide.elements.map((el) => {
8615
- if (el.id !== pendingEditId || !chunkYBTRSG74_js.hasTextProperties(el)) {
8636
+ if (el.id !== pendingEditId || !chunk3NDRTC7T_js.hasTextProperties(el)) {
8616
8637
  return el;
8617
8638
  }
8618
8639
  return {
8619
8640
  ...el,
8620
8641
  text: pendingEditText,
8621
- textSegments: chunkYBTRSG74_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8642
+ textSegments: chunk3NDRTC7T_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8622
8643
  };
8623
8644
  });
8624
8645
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8631,14 +8652,14 @@ function useSerialize(input) {
8631
8652
  const pptxGuides = guides.map((g) => ({
8632
8653
  id: g.id,
8633
8654
  orientation: g.axis === "h" ? "horz" : "vert",
8634
- positionEmu: chunkYBTRSG74_js.guidePxToEmu(g.position)
8655
+ positionEmu: chunk3NDRTC7T_js.guidePxToEmu(g.position)
8635
8656
  }));
8636
8657
  return {
8637
8658
  ...processedSlide,
8638
8659
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8639
8660
  };
8640
8661
  });
8641
- const slidesToSave = chunkFHTEL3Q6_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8662
+ const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8642
8663
  const saveOptions = {
8643
8664
  headerFooter,
8644
8665
  presentationProperties,
@@ -8807,7 +8828,7 @@ function usePresentationSetup(input) {
8807
8828
  containerRef,
8808
8829
  content,
8809
8830
  onSetMode: (nextMode) => {
8810
- if (mode === "present" && nextMode !== "present" && !chunkYBTRSG74_js.mayLeaveSlideShow()) {
8831
+ if (mode === "present" && nextMode !== "present" && !chunk3NDRTC7T_js.mayLeaveSlideShow()) {
8811
8832
  return;
8812
8833
  }
8813
8834
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8815,7 +8836,7 @@ function usePresentationSetup(input) {
8815
8836
  setShowKeepAnnotationsDialog(true);
8816
8837
  } else {
8817
8838
  if (mode === "present" && nextMode !== "present") {
8818
- chunkYBTRSG74_js.stopAllPersistentAudio();
8839
+ chunk3NDRTC7T_js.stopAllPersistentAudio();
8819
8840
  stopAnimationSound();
8820
8841
  }
8821
8842
  setMode(nextMode);
@@ -8869,10 +8890,10 @@ function usePresentationSetup(input) {
8869
8890
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8870
8891
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8871
8892
  onSaveRehearsalTimings: (timings) => {
8872
- setSlides((prev) => chunkYBTRSG74_js.applyRehearsalTimings(prev, timings));
8893
+ setSlides((prev) => chunk3NDRTC7T_js.applyRehearsalTimings(prev, timings));
8873
8894
  history.markDirty();
8874
8895
  },
8875
- loopContinuously: chunkYBTRSG74_js.shouldLoopContinuously(presentationProperties),
8896
+ loopContinuously: chunk3NDRTC7T_js.shouldLoopContinuously(presentationProperties),
8876
8897
  showWithAnimation: presentationProperties.showWithAnimation,
8877
8898
  useTimings: presentationProperties.advanceMode !== "manual",
8878
8899
  endWithBlackSlide
@@ -9036,7 +9057,7 @@ function useEditorOperations(input) {
9036
9057
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9037
9058
  react.useEffect(() => {
9038
9059
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9039
- copiedFormatRef.current = chunkYBTRSG74_js.copyFormatFromElement(selectedElement);
9060
+ copiedFormatRef.current = chunk3NDRTC7T_js.copyFormatFromElement(selectedElement);
9040
9061
  } else if (!formatPainterActive) {
9041
9062
  copiedFormatRef.current = null;
9042
9063
  }
@@ -9062,12 +9083,12 @@ function useEditorOperations(input) {
9062
9083
  e.stopPropagation();
9063
9084
  const element = elementLookup.get(elementId);
9064
9085
  if (element) {
9065
- const updated = chunkYBTRSG74_js.applyFormatToElement(element, copiedFormatRef.current);
9086
+ const updated = chunk3NDRTC7T_js.applyFormatToElement(element, copiedFormatRef.current);
9066
9087
  const updates = {};
9067
- if (chunkYBTRSG74_js.hasShapeProperties(updated)) {
9088
+ if (chunk3NDRTC7T_js.hasShapeProperties(updated)) {
9068
9089
  updates.shapeStyle = updated.shapeStyle;
9069
9090
  }
9070
- if (chunkYBTRSG74_js.hasTextProperties(updated)) {
9091
+ if (chunk3NDRTC7T_js.hasTextProperties(updated)) {
9071
9092
  updates.textStyle = updated.textStyle;
9072
9093
  }
9073
9094
  ops.updateElementById(elementId, updates);
@@ -9216,7 +9237,7 @@ function collectReferencedFontFamilies(slides) {
9216
9237
  const families = /* @__PURE__ */ new Set();
9217
9238
  for (const slide of slides) {
9218
9239
  for (const el of slide.elements) {
9219
- if (chunkYBTRSG74_js.hasTextProperties(el) && el.textSegments) {
9240
+ if (chunk3NDRTC7T_js.hasTextProperties(el) && el.textSegments) {
9220
9241
  for (const seg of el.textSegments) {
9221
9242
  if (seg.style.fontFamily) {
9222
9243
  families.add(seg.style.fontFamily);
@@ -9428,13 +9449,13 @@ function useKeyboardShortcuts(input) {
9428
9449
  inputRef.current = input;
9429
9450
  const handleKeyDown = react.useCallback((e) => {
9430
9451
  const current = inputRef.current;
9431
- const { action, dx, dy } = chunkYBTRSG74_js.mapEditorKey(e, {
9452
+ const { action, dx, dy } = chunk3NDRTC7T_js.mapEditorKey(e, {
9432
9453
  canEdit: current.canEdit,
9433
9454
  isPresenting: current.mode !== "edit",
9434
9455
  hasSelection: current.hasSelection,
9435
9456
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9436
9457
  isDrawing: current.activeTool !== "select",
9437
- isTextInputTarget: chunkYBTRSG74_js.isEditorTextInputTarget(e.target)
9458
+ isTextInputTarget: chunk3NDRTC7T_js.isEditorTextInputTarget(e.target)
9438
9459
  });
9439
9460
  if (action === null) {
9440
9461
  return;
@@ -9727,7 +9748,7 @@ function useViewerIntegration(input) {
9727
9748
  return zoom.scale;
9728
9749
  },
9729
9750
  setZoom(level) {
9730
- zoom.setScale(chunkYBTRSG74_js.clampZoomScale(level));
9751
+ zoom.setScale(chunk3NDRTC7T_js.clampZoomScale(level));
9731
9752
  },
9732
9753
  zoomIn() {
9733
9754
  zoom.handleZoomIn();
@@ -9942,7 +9963,7 @@ function useReducedMotion() {
9942
9963
  }
9943
9964
  function useViewerOptions() {
9944
9965
  const storeRef = react.useRef(null);
9945
- storeRef.current ??= chunkYBTRSG74_js.createViewerOptionsStore();
9966
+ storeRef.current ??= chunk3NDRTC7T_js.createViewerOptionsStore();
9946
9967
  const store = storeRef.current;
9947
9968
  const options = react.useSyncExternalStore(
9948
9969
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9951,9 +9972,9 @@ function useViewerOptions() {
9951
9972
  );
9952
9973
  return { optionsStore: store, options };
9953
9974
  }
9954
- var KNOWN_TAB_IDS = new Set(chunkYBTRSG74_js.TOOLBAR_TABS.map((tab) => tab.id));
9975
+ var KNOWN_TAB_IDS = new Set(chunk3NDRTC7T_js.TOOLBAR_TABS.map((tab) => tab.id));
9955
9976
  function computeToolbarVisibility(hiddenActions) {
9956
- const isHidden = (id) => chunkYBTRSG74_js.isActionHidden(id, hiddenActions);
9977
+ const isHidden = (id) => chunk3NDRTC7T_js.isActionHidden(id, hiddenActions);
9957
9978
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9958
9979
  return { isHidden, isTabVisible };
9959
9980
  }
@@ -10038,12 +10059,12 @@ function useYjsDocumentSync({
10038
10059
  return;
10039
10060
  }
10040
10061
  try {
10041
- const handler = new chunkYBTRSG74_js.PptxHandler();
10062
+ const handler = new chunk3NDRTC7T_js.PptxHandler();
10042
10063
  await handler.load(sourceBytes.buffer);
10043
- const currentSlides = chunkYBTRSG74_js.readSlidesFromYDoc(
10064
+ const currentSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10044
10065
  doc
10045
10066
  );
10046
- const slidesToSave = chunkFHTEL3Q6_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10067
+ const slidesToSave = chunkIN7D2T4R_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10047
10068
  const bytes = await handler.save(slidesToSave);
10048
10069
  config.onWriteBack(bytes);
10049
10070
  } catch {
@@ -10058,7 +10079,7 @@ function useYjsDocumentSync({
10058
10079
  if (!doc || !isConnected) {
10059
10080
  return;
10060
10081
  }
10061
- const docSlides = chunkYBTRSG74_js.readSlidesFromYDoc(
10082
+ const docSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10062
10083
  doc
10063
10084
  );
10064
10085
  if (docSlides.length === 0) {
@@ -10080,11 +10101,11 @@ function useYjsDocumentSync({
10080
10101
  lastSyncedRef.current = serialized;
10081
10102
  void (async () => {
10082
10103
  const factories = await getFactories();
10083
- chunkYBTRSG74_js.reconcileSlidesInYDoc(
10104
+ chunk3NDRTC7T_js.reconcileSlidesInYDoc(
10084
10105
  slides,
10085
10106
  doc,
10086
10107
  factories,
10087
- chunkYBTRSG74_js.LOCAL_SYNC_ORIGIN
10108
+ chunk3NDRTC7T_js.LOCAL_SYNC_ORIGIN
10088
10109
  );
10089
10110
  scheduleWriteBack();
10090
10111
  })();
@@ -10098,10 +10119,10 @@ function useYjsDocumentSync({
10098
10119
  return;
10099
10120
  }
10100
10121
  const handleChange = (_events, transaction) => {
10101
- if (transaction?.origin === chunkYBTRSG74_js.LOCAL_SYNC_ORIGIN) {
10122
+ if (transaction?.origin === chunk3NDRTC7T_js.LOCAL_SYNC_ORIGIN) {
10102
10123
  return;
10103
10124
  }
10104
- const remoteSlides = chunkYBTRSG74_js.readSlidesFromYDoc(
10125
+ const remoteSlides = chunk3NDRTC7T_js.readSlidesFromYDoc(
10105
10126
  doc
10106
10127
  );
10107
10128
  if (remoteSlides.length === 0) {
@@ -10117,7 +10138,7 @@ function useYjsDocumentSync({
10117
10138
  isApplyingRemoteRef.current = false;
10118
10139
  scheduleWriteBack();
10119
10140
  };
10120
- const unobserve = chunkYBTRSG74_js.observeYDocSlides(
10141
+ const unobserve = chunk3NDRTC7T_js.observeYDocSlides(
10121
10142
  doc,
10122
10143
  handleChange
10123
10144
  );
@@ -10155,7 +10176,7 @@ function useBroadcastFollower({
10155
10176
  if (!broadcaster) {
10156
10177
  return;
10157
10178
  }
10158
- if (!chunkYBTRSG74_js.shouldAutoFollowBroadcaster({
10179
+ if (!chunk3NDRTC7T_js.shouldAutoFollowBroadcaster({
10159
10180
  localRole: collab.config.role,
10160
10181
  broadcasterRole: broadcaster.role
10161
10182
  })) {
@@ -10315,10 +10336,10 @@ function useTouchGestures(input) {
10315
10336
  if (!el || !enabled) {
10316
10337
  return;
10317
10338
  }
10318
- const recognizer = chunkYBTRSG74_js.createTouchGestureRecognizer({
10339
+ const recognizer = chunk3NDRTC7T_js.createTouchGestureRecognizer({
10319
10340
  getScale: () => scaleRef.current,
10320
- minScale: chunkYBTRSG74_js.MIN_ZOOM_SCALE,
10321
- maxScale: chunkYBTRSG74_js.MAX_ZOOM_SCALE,
10341
+ minScale: chunk3NDRTC7T_js.MIN_ZOOM_SCALE,
10342
+ maxScale: chunk3NDRTC7T_js.MAX_ZOOM_SCALE,
10322
10343
  callbacks: {
10323
10344
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10324
10345
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10358,7 +10379,7 @@ function scrollFocusedIntoView(keyboardInset) {
10358
10379
  return;
10359
10380
  }
10360
10381
  const rect = active.getBoundingClientRect();
10361
- const delta = chunkYBTRSG74_js.computeScrollDelta(
10382
+ const delta = chunk3NDRTC7T_js.computeScrollDelta(
10362
10383
  { top: rect.top, bottom: rect.bottom },
10363
10384
  window.innerHeight,
10364
10385
  keyboardInset
@@ -10378,8 +10399,8 @@ function useKeyboardInsets(enabled = true) {
10378
10399
  return;
10379
10400
  }
10380
10401
  const update = () => {
10381
- const metrics = chunkYBTRSG74_js.readViewportMetrics(window);
10382
- const inset = metrics ? chunkYBTRSG74_js.computeKeyboardInset(metrics) : 0;
10402
+ const metrics = chunk3NDRTC7T_js.readViewportMetrics(window);
10403
+ const inset = metrics ? chunk3NDRTC7T_js.computeKeyboardInset(metrics) : 0;
10383
10404
  setKeyboardInset(inset);
10384
10405
  if (inset > 0) {
10385
10406
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10390,8 +10411,8 @@ function useKeyboardInsets(enabled = true) {
10390
10411
  vv.addEventListener("scroll", update);
10391
10412
  const onFocusIn = () => {
10392
10413
  window.requestAnimationFrame(() => {
10393
- const metrics = chunkYBTRSG74_js.readViewportMetrics(window);
10394
- const inset = metrics ? chunkYBTRSG74_js.computeKeyboardInset(metrics) : 0;
10414
+ const metrics = chunk3NDRTC7T_js.readViewportMetrics(window);
10415
+ const inset = metrics ? chunk3NDRTC7T_js.computeKeyboardInset(metrics) : 0;
10395
10416
  if (inset > 0) {
10396
10417
  scrollFocusedIntoView(inset);
10397
10418
  }
@@ -10404,7 +10425,7 @@ function useKeyboardInsets(enabled = true) {
10404
10425
  document.removeEventListener("focusin", onFocusIn);
10405
10426
  };
10406
10427
  }, [enabled]);
10407
- return { keyboardInset, isKeyboardOpen: chunkYBTRSG74_js.isKeyboardOpen(keyboardInset) };
10428
+ return { keyboardInset, isKeyboardOpen: chunk3NDRTC7T_js.isKeyboardOpen(keyboardInset) };
10408
10429
  }
10409
10430
 
10410
10431
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10431,7 +10452,7 @@ function buildCanvasProps(input) {
10431
10452
  } = input;
10432
10453
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10433
10454
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10434
- const fieldContext = chunkYBTRSG74_js.buildFieldSubstitutionContext({
10455
+ const fieldContext = chunk3NDRTC7T_js.buildFieldSubstitutionContext({
10435
10456
  headerFooter: s.headerFooter,
10436
10457
  customProperties: s.customProperties,
10437
10458
  slide: activeSlide
@@ -10441,13 +10462,13 @@ function buildCanvasProps(input) {
10441
10462
  if (mode === "present") {
10442
10463
  presentation.handlePresentationAction(action);
10443
10464
  } else if (action.url) {
10444
- chunkYBTRSG74_js.safeOpenUrl(action.url);
10465
+ chunk3NDRTC7T_js.safeOpenUrl(action.url);
10445
10466
  }
10446
10467
  };
10447
10468
  const handleHyperlinkClick = (url) => {
10448
- if (chunkYBTRSG74_js.isPpactionUrl(url)) {
10469
+ if (chunk3NDRTC7T_js.isPpactionUrl(url)) {
10449
10470
  if (mode === "present") {
10450
- const parsed = chunkYBTRSG74_js.parsePpactionUrl(url);
10471
+ const parsed = chunk3NDRTC7T_js.parsePpactionUrl(url);
10451
10472
  if (parsed) {
10452
10473
  presentation.handlePresentationAction({
10453
10474
  action: parsed.action,
@@ -10457,7 +10478,7 @@ function buildCanvasProps(input) {
10457
10478
  }
10458
10479
  return;
10459
10480
  }
10460
- chunkYBTRSG74_js.safeOpenUrl(url);
10481
+ chunk3NDRTC7T_js.safeOpenUrl(url);
10461
10482
  };
10462
10483
  return {
10463
10484
  activeSlide: effectiveSlide,
@@ -10600,7 +10621,7 @@ function buildToolbarAnimationHandlers(input) {
10600
10621
  const current = activeSlide.animations ?? [];
10601
10622
  if (group === "motionPath") {
10602
10623
  propertyHandlers.handleUpdateSlide({
10603
- animations: chunkYBTRSG74_js.applyMotionPathPreset(current, selectedElement.id, preset)
10624
+ animations: chunk3NDRTC7T_js.applyMotionPathPreset(current, selectedElement.id, preset)
10604
10625
  });
10605
10626
  return;
10606
10627
  }
@@ -10795,7 +10816,7 @@ function buildToolbarProps(input) {
10795
10816
  onOpenFile,
10796
10817
  onOpenRecentFile,
10797
10818
  onCreatePresentation: (templateId) => {
10798
- s.setSlides(chunkYBTRSG74_js.createBackstagePresentation(templateId));
10819
+ s.setSlides(chunk3NDRTC7T_js.createBackstagePresentation(templateId));
10799
10820
  s.setActiveSlideIndex(0);
10800
10821
  s.setSelectedElementId(null);
10801
10822
  s.setSelectedElementIds([]);
@@ -10822,7 +10843,7 @@ function buildToolbarProps(input) {
10822
10843
  layoutOptions: scopedLayoutOptions,
10823
10844
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
10824
10845
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
10825
- templateScheme: chunkYBTRSG74_js.templateSchemeFromTheme(s.theme?.colorScheme),
10846
+ templateScheme: chunk3NDRTC7T_js.templateSchemeFromTheme(s.theme?.colorScheme),
10826
10847
  customShows: s.customShows,
10827
10848
  activeCustomShowId: s.activeCustomShowId,
10828
10849
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -10854,7 +10875,7 @@ function buildToolbarProps(input) {
10854
10875
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10855
10876
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10856
10877
  formatPainterActive: s.formatPainterActive,
10857
- canActivateFormatPainter: chunkYBTRSG74_js.hasCopyableFormat(selectedElement),
10878
+ canActivateFormatPainter: chunk3NDRTC7T_js.hasCopyableFormat(selectedElement),
10858
10879
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10859
10880
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10860
10881
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11123,7 +11144,7 @@ function useViewerBuildingBlocks(input) {
11123
11144
  }, [incomingContent]);
11124
11145
  const onOpenFile = react.useCallback(() => {
11125
11146
  void (async () => {
11126
- const picked = await chunkYBTRSG74_js.openPptxFile();
11147
+ const picked = await chunk3NDRTC7T_js.openPptxFile();
11127
11148
  if (picked) {
11128
11149
  setContent(picked.buffer);
11129
11150
  }
@@ -11131,7 +11152,7 @@ function useViewerBuildingBlocks(input) {
11131
11152
  }, []);
11132
11153
  const onOpenRecentFile = react.useCallback((key) => {
11133
11154
  void (async () => {
11134
- const bytes = await chunkYBTRSG74_js.readBackstageRecentFile(key);
11155
+ const bytes = await chunk3NDRTC7T_js.readBackstageRecentFile(key);
11135
11156
  if (bytes) {
11136
11157
  setContent(bytes);
11137
11158
  }