pptx-react-viewer 2.11.1 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-RMQIJDUJ.mjs → AiChatPanel-CS4CONUO.mjs} +4 -4
  3. package/dist/AiChatPanel-CS4CONUO.mjs.br +0 -0
  4. package/dist/AiChatPanel-CS4CONUO.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-E6W3EACA.js → AiChatPanel-JIXSOZXN.js} +23 -23
  6. package/dist/AiChatPanel-JIXSOZXN.js.br +0 -0
  7. package/dist/AiChatPanel-JIXSOZXN.js.gz +0 -0
  8. package/dist/{Model3DScene-U4B4NZJT.js → Model3DScene-5KMJ4JL6.js} +2 -2
  9. package/dist/{Model3DScene-U4B4NZJT.js.br → Model3DScene-5KMJ4JL6.js.br} +0 -0
  10. package/dist/Model3DScene-5KMJ4JL6.js.gz +0 -0
  11. package/dist/{Model3DScene-WHSHBMR5.mjs → Model3DScene-RWFPSN6B.mjs} +1 -1
  12. package/dist/Model3DScene-RWFPSN6B.mjs.br +0 -0
  13. package/dist/Model3DScene-RWFPSN6B.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-77JP5XH5.mjs → SurfaceChart3DScene-2GZQM3LN.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-77JP5XH5.mjs.br → SurfaceChart3DScene-2GZQM3LN.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-2GZQM3LN.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-5S43UBRD.js → SurfaceChart3DScene-BIOKIETC.js} +2 -2
  18. package/dist/SurfaceChart3DScene-BIOKIETC.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-BIOKIETC.js.gz +0 -0
  20. package/dist/{chunk-FAP6OPLL.js → chunk-2VUHJNWM.js} +243 -284
  21. package/dist/chunk-2VUHJNWM.js.br +0 -0
  22. package/dist/chunk-2VUHJNWM.js.gz +0 -0
  23. package/dist/{chunk-IOVOQ6ZJ.js → chunk-3GNSGGY2.js} +288 -1
  24. package/dist/chunk-3GNSGGY2.js.br +0 -0
  25. package/dist/chunk-3GNSGGY2.js.gz +0 -0
  26. package/dist/{chunk-NJ4PTG4F.mjs → chunk-AOED5MFM.mjs} +18 -39
  27. package/dist/chunk-AOED5MFM.mjs.br +0 -0
  28. package/dist/chunk-AOED5MFM.mjs.gz +0 -0
  29. package/dist/{chunk-PXYZFWDA.mjs → chunk-BJQSHVYH.mjs} +86 -61
  30. package/dist/chunk-BJQSHVYH.mjs.br +0 -0
  31. package/dist/chunk-BJQSHVYH.mjs.gz +0 -0
  32. package/dist/{chunk-DD54KUDG.mjs → chunk-CEUHGUZ4.mjs} +5 -46
  33. package/dist/chunk-CEUHGUZ4.mjs.br +0 -0
  34. package/dist/chunk-CEUHGUZ4.mjs.gz +0 -0
  35. package/dist/{chunk-RHR7GTDX.mjs → chunk-ECDKYPQ2.mjs} +288 -1
  36. package/dist/chunk-ECDKYPQ2.mjs.br +0 -0
  37. package/dist/chunk-ECDKYPQ2.mjs.gz +0 -0
  38. package/dist/{chunk-HF6L2CTF.mjs → chunk-EJRHYYKE.mjs} +1 -1
  39. package/dist/chunk-EJRHYYKE.mjs.br +0 -0
  40. package/dist/chunk-EJRHYYKE.mjs.gz +0 -0
  41. package/dist/{chunk-KDJBWJJH.js → chunk-PJUQQF3I.js} +328 -52
  42. package/dist/chunk-PJUQQF3I.js.br +0 -0
  43. package/dist/chunk-PJUQQF3I.js.gz +0 -0
  44. package/dist/{chunk-QT6BPOZM.js → chunk-PTGTFXPU.js} +345 -366
  45. package/dist/chunk-PTGTFXPU.js.br +0 -0
  46. package/dist/chunk-PTGTFXPU.js.gz +0 -0
  47. package/dist/{chunk-FV7HEYCX.mjs → chunk-QGHC65C4.mjs} +320 -53
  48. package/dist/chunk-QGHC65C4.mjs.br +0 -0
  49. package/dist/chunk-QGHC65C4.mjs.gz +0 -0
  50. package/dist/{chunk-IXBM3HWH.js → chunk-SP7U34QM.js} +1064 -1039
  51. package/dist/chunk-SP7U34QM.js.br +0 -0
  52. package/dist/chunk-SP7U34QM.js.gz +0 -0
  53. package/dist/{chunk-X3SFCKAF.js → chunk-ZIXSSQAZ.js} +3 -3
  54. package/dist/chunk-ZIXSSQAZ.js.br +0 -0
  55. package/dist/chunk-ZIXSSQAZ.js.gz +0 -0
  56. package/dist/i18n.js +4 -4
  57. package/dist/i18n.js.br +0 -0
  58. package/dist/i18n.js.gz +0 -0
  59. package/dist/i18n.mjs +1 -1
  60. package/dist/i18n.mjs.br +0 -0
  61. package/dist/i18n.mjs.gz +0 -0
  62. package/dist/index.js +36 -36
  63. package/dist/index.js.br +0 -0
  64. package/dist/index.js.gz +0 -0
  65. package/dist/index.mjs +6 -6
  66. package/dist/index.mjs.br +0 -0
  67. package/dist/index.mjs.gz +0 -0
  68. package/dist/internals.js +79 -79
  69. package/dist/internals.js.br +0 -0
  70. package/dist/internals.js.gz +0 -0
  71. package/dist/internals.mjs +4 -4
  72. package/dist/internals.mjs.br +0 -0
  73. package/dist/internals.mjs.gz +0 -0
  74. package/dist/pptx-viewer.css +1 -1
  75. package/dist/pptx-viewer.css.br +0 -0
  76. package/dist/pptx-viewer.css.gz +0 -0
  77. package/dist/viewer/index.js +22 -22
  78. package/dist/viewer/index.js.br +0 -0
  79. package/dist/viewer/index.js.gz +0 -0
  80. package/dist/viewer/index.mjs +6 -6
  81. package/dist/viewer/index.mjs.br +0 -0
  82. package/dist/viewer/index.mjs.gz +0 -0
  83. package/package.json +1 -1
  84. package/dist/AiChatPanel-E6W3EACA.js.br +0 -0
  85. package/dist/AiChatPanel-E6W3EACA.js.gz +0 -0
  86. package/dist/AiChatPanel-RMQIJDUJ.mjs.br +0 -0
  87. package/dist/AiChatPanel-RMQIJDUJ.mjs.gz +0 -0
  88. package/dist/Model3DScene-U4B4NZJT.js.gz +0 -0
  89. package/dist/Model3DScene-WHSHBMR5.mjs.br +0 -0
  90. package/dist/Model3DScene-WHSHBMR5.mjs.gz +0 -0
  91. package/dist/SurfaceChart3DScene-5S43UBRD.js.br +0 -0
  92. package/dist/SurfaceChart3DScene-5S43UBRD.js.gz +0 -0
  93. package/dist/SurfaceChart3DScene-77JP5XH5.mjs.gz +0 -0
  94. package/dist/chunk-DD54KUDG.mjs.br +0 -0
  95. package/dist/chunk-DD54KUDG.mjs.gz +0 -0
  96. package/dist/chunk-FAP6OPLL.js.br +0 -0
  97. package/dist/chunk-FAP6OPLL.js.gz +0 -0
  98. package/dist/chunk-FV7HEYCX.mjs.br +0 -0
  99. package/dist/chunk-FV7HEYCX.mjs.gz +0 -0
  100. package/dist/chunk-HF6L2CTF.mjs.br +0 -0
  101. package/dist/chunk-HF6L2CTF.mjs.gz +0 -0
  102. package/dist/chunk-IOVOQ6ZJ.js.br +0 -0
  103. package/dist/chunk-IOVOQ6ZJ.js.gz +0 -0
  104. package/dist/chunk-IXBM3HWH.js.br +0 -0
  105. package/dist/chunk-IXBM3HWH.js.gz +0 -0
  106. package/dist/chunk-KDJBWJJH.js.br +0 -0
  107. package/dist/chunk-KDJBWJJH.js.gz +0 -0
  108. package/dist/chunk-NJ4PTG4F.mjs.br +0 -0
  109. package/dist/chunk-NJ4PTG4F.mjs.gz +0 -0
  110. package/dist/chunk-PXYZFWDA.mjs.br +0 -0
  111. package/dist/chunk-PXYZFWDA.mjs.gz +0 -0
  112. package/dist/chunk-QT6BPOZM.js.br +0 -0
  113. package/dist/chunk-QT6BPOZM.js.gz +0 -0
  114. package/dist/chunk-RHR7GTDX.mjs.br +0 -0
  115. package/dist/chunk-RHR7GTDX.mjs.gz +0 -0
  116. package/dist/chunk-X3SFCKAF.js.br +0 -0
  117. package/dist/chunk-X3SFCKAF.js.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkFAP6OPLL_js = require('./chunk-FAP6OPLL.js');
4
- var chunkIOVOQ6ZJ_js = require('./chunk-IOVOQ6ZJ.js');
5
- var chunkKDJBWJJH_js = require('./chunk-KDJBWJJH.js');
3
+ var chunk2VUHJNWM_js = require('./chunk-2VUHJNWM.js');
4
+ var chunk3GNSGGY2_js = require('./chunk-3GNSGGY2.js');
5
+ var chunkPJUQQF3I_js = require('./chunk-PJUQQF3I.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 = chunkKDJBWJJH_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkPJUQQF3I_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 = chunkKDJBWJJH_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkPJUQQF3I_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
48
48
  const safeItemHeight = Math.max(itemHeight, 1);
49
49
  const scrollToIndex = react.useCallback(
50
50
  (index, behavior = "smooth") => {
@@ -107,7 +107,7 @@ function usePresenceTracking({
107
107
  awareness.setLocalStateField("presence", state);
108
108
  lastBroadcastRef.current = Date.now();
109
109
  };
110
- if (elapsed >= chunkKDJBWJJH_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkPJUQQF3I_js.BROADCAST_THROTTLE_MS) {
111
111
  if (pendingBroadcastRef.current) {
112
112
  clearTimeout(pendingBroadcastRef.current);
113
113
  pendingBroadcastRef.current = null;
@@ -117,7 +117,7 @@ function usePresenceTracking({
117
117
  pendingBroadcastRef.current = setTimeout(() => {
118
118
  pendingBroadcastRef.current = null;
119
119
  flush();
120
- }, chunkKDJBWJJH_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkPJUQQF3I_js.BROADCAST_THROTTLE_MS - elapsed);
121
121
  }
122
122
  },
123
123
  [awareness, userName, userColor, userAvatar, role]
@@ -142,7 +142,7 @@ function usePresenceTracking({
142
142
  return;
143
143
  }
144
144
  const handleChange = () => {
145
- const users = chunkKDJBWJJH_js.derivePresenceList(
145
+ const users = chunkPJUQQF3I_js.derivePresenceList(
146
146
  awareness.getStates(),
147
147
  localClientId,
148
148
  canvasWidth,
@@ -194,7 +194,7 @@ function useYjsProvider({ config }) {
194
194
  const departureRef = react.useRef(null);
195
195
  const gateRef = react.useRef(null);
196
196
  if (!gateRef.current) {
197
- gateRef.current = chunkKDJBWJJH_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkPJUQQF3I_js.createSyncGate(() => setSynced(true));
198
198
  }
199
199
  const teardown = react.useCallback(() => {
200
200
  if (timeoutRef.current) {
@@ -214,7 +214,7 @@ function useYjsProvider({ config }) {
214
214
  const buildCleanup = react.useCallback(
215
215
  (provider, yDoc) => () => {
216
216
  announceDeparture();
217
- chunkKDJBWJJH_js.clearLocalAwareness(provider.awareness);
217
+ chunkPJUQQF3I_js.clearLocalAwareness(provider.awareness);
218
218
  provider.destroy();
219
219
  yDoc.destroy();
220
220
  setDoc(null);
@@ -239,9 +239,9 @@ function useYjsProvider({ config }) {
239
239
  if (config.authToken) {
240
240
  opts.password = config.authToken;
241
241
  }
242
- const roomId = chunkKDJBWJJH_js.validateRoomId(config.roomId);
242
+ const roomId = chunkPJUQQF3I_js.validateRoomId(config.roomId);
243
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
244
- departureRef.current = chunkKDJBWJJH_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkPJUQQF3I_js.createDepartureChannel(roomId, provider.awareness);
245
245
  setDoc(yDoc);
246
246
  setAwareness(provider.awareness);
247
247
  setClientId(provider.awareness.clientID);
@@ -283,13 +283,13 @@ function useYjsProvider({ config }) {
283
283
  if (!config) {
284
284
  return;
285
285
  }
286
- const roomId = chunkKDJBWJJH_js.validateRoomId(config.roomId);
287
- const transport = config.transport ?? chunkKDJBWJJH_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkPJUQQF3I_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkPJUQQF3I_js.resolveTransportForServerUrl(config.serverUrl);
288
288
  if (transport === "webrtc") {
289
289
  await initWebrtc();
290
290
  return;
291
291
  }
292
- if (chunkKDJBWJJH_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkPJUQQF3I_js.isMixedContentBlocked(config.serverUrl)) {
293
293
  console.warn(
294
294
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
295
295
  );
@@ -303,7 +303,7 @@ function useYjsProvider({ config }) {
303
303
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
304
304
  params: config.authToken ? { token: config.authToken } : void 0
305
305
  });
306
- departureRef.current = chunkKDJBWJJH_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkPJUQQF3I_js.createDepartureChannel(roomId, provider.awareness);
307
307
  let connected = false;
308
308
  const handleStatus = (event) => {
309
309
  if (event.status === "connected") {
@@ -343,7 +343,7 @@ function useYjsProvider({ config }) {
343
343
  provider.off("status", handleStatus);
344
344
  provider.off("sync", handleSynced);
345
345
  announceDeparture();
346
- chunkKDJBWJJH_js.clearLocalAwareness(provider.awareness);
346
+ chunkPJUQQF3I_js.clearLocalAwareness(provider.awareness);
347
347
  provider.destroy();
348
348
  yDoc.destroy();
349
349
  setDoc(null);
@@ -352,7 +352,7 @@ function useYjsProvider({ config }) {
352
352
  cleanupRef.current = null;
353
353
  setStatus("error");
354
354
  }
355
- }, chunkKDJBWJJH_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkPJUQQF3I_js.CONNECTION_TIMEOUT_MS);
356
356
  }
357
357
  setDoc(yDoc);
358
358
  setAwareness(provider.awareness);
@@ -361,7 +361,7 @@ function useYjsProvider({ config }) {
361
361
  provider.off("status", handleStatus);
362
362
  provider.off("sync", handleSynced);
363
363
  announceDeparture();
364
- chunkKDJBWJJH_js.clearLocalAwareness(provider.awareness);
364
+ chunkPJUQQF3I_js.clearLocalAwareness(provider.awareness);
365
365
  provider.destroy();
366
366
  yDoc.destroy();
367
367
  setDoc(null);
@@ -387,7 +387,7 @@ function useYjsProvider({ config }) {
387
387
  ]);
388
388
  react.useEffect(() => {
389
389
  init();
390
- const disposeTeardown = chunkKDJBWJJH_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkPJUQQF3I_js.registerCollaborationTeardown({
391
391
  leave: teardown,
392
392
  rejoin: init
393
393
  });
@@ -408,7 +408,7 @@ function useCollaborativeState({
408
408
  canvasWidth,
409
409
  canvasHeight
410
410
  }) {
411
- const userColor = chunkKDJBWJJH_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkPJUQQF3I_js.sanitizeColor(config?.userColor, "#6366f1");
412
412
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
413
413
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
414
414
  awareness,
@@ -517,8 +517,8 @@ function useEditorHistory(input) {
517
517
  width: canvasSize.width,
518
518
  height: canvasSize.height,
519
519
  activeSlideIndex,
520
- slides: slides.map(chunkKDJBWJJH_js.cloneSlide),
521
- templateElementsBySlideId: chunkKDJBWJJH_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkPJUQQF3I_js.cloneSlide),
521
+ templateElementsBySlideId: chunkPJUQQF3I_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
522
522
  ...actionLabel ? { actionLabel } : {}
523
523
  };
524
524
  },
@@ -531,9 +531,9 @@ function useEditorHistory(input) {
531
531
  width: snapshot.width,
532
532
  height: snapshot.height
533
533
  });
534
- setSlides(snapshot.slides.map(chunkKDJBWJJH_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkPJUQQF3I_js.cloneSlide));
535
535
  setTemplateElementsBySlideId(
536
- chunkKDJBWJJH_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkPJUQQF3I_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
537
  );
538
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
539
539
  setSelectedElementIds([]);
@@ -567,8 +567,8 @@ function useEditorHistory(input) {
567
567
  const currentSnapshot = buildHistorySnapshot();
568
568
  historyFutureRef.current.push(currentSnapshot);
569
569
  isApplyingHistoryRef.current = true;
570
- const nextSnapshot = chunkFAP6OPLL_js.cloneHistorySnapshot(previousSnapshot);
571
- lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunk2VUHJNWM_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(nextSnapshot);
572
572
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
573
573
  applyHistorySnapshot(nextSnapshot);
574
574
  updateHistoryAvailability();
@@ -589,8 +589,8 @@ function useEditorHistory(input) {
589
589
  const currentSnapshot = buildHistorySnapshot();
590
590
  historyPastRef.current.push(currentSnapshot);
591
591
  isApplyingHistoryRef.current = true;
592
- const targetSnapshot = chunkFAP6OPLL_js.cloneHistorySnapshot(nextSnapshot);
593
- lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunk2VUHJNWM_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(targetSnapshot);
594
594
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
595
595
  applyHistorySnapshot(targetSnapshot);
596
596
  updateHistoryAvailability();
@@ -608,7 +608,7 @@ function useEditorHistory(input) {
608
608
  historyPastRef.current = [];
609
609
  historyFutureRef.current = [];
610
610
  if (initialSnapshot) {
611
- const clonedInitial = chunkFAP6OPLL_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunk2VUHJNWM_js.cloneHistorySnapshot(initialSnapshot);
612
612
  lastHistorySnapshotRef.current = clonedInitial;
613
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
614
614
  } else {
@@ -649,18 +649,18 @@ function useEditorHistory(input) {
649
649
  }
650
650
  const previousSnapshot = lastHistorySnapshotRef.current;
651
651
  if (!previousSnapshot) {
652
- lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(snapshot);
653
653
  lastHistorySerializedRef.current = serialized;
654
654
  lastCheapHashRef.current = cheapHash;
655
655
  updateHistoryAvailability();
656
656
  return;
657
657
  }
658
- historyPastRef.current.push(chunkFAP6OPLL_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunk2VUHJNWM_js.cloneHistorySnapshot(previousSnapshot));
659
659
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
660
660
  historyPastRef.current.shift();
661
661
  }
662
662
  historyFutureRef.current = [];
663
- lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunk2VUHJNWM_js.cloneHistorySnapshot(snapshot);
664
664
  lastHistorySerializedRef.current = serialized;
665
665
  lastCheapHashRef.current = cheapHash;
666
666
  updateHistoryAvailability();
@@ -749,7 +749,7 @@ function useZoomViewport({
749
749
  if (!wrapper || !canvasViewport) {
750
750
  return;
751
751
  }
752
- const boundedScale = chunkKDJBWJJH_js.clampZoomScale(nextScale);
752
+ const boundedScale = chunkPJUQQF3I_js.clampZoomScale(nextScale);
753
753
  const nextEditorScale = fitScale * boundedScale;
754
754
  const centerX = (bounds.minX + bounds.maxX) / 2;
755
755
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -764,10 +764,10 @@ function useZoomViewport({
764
764
  [fitScale]
765
765
  );
766
766
  const handleZoomIn = react.useCallback(() => {
767
- setScale((currentScale) => chunkKDJBWJJH_js.zoomInScale(currentScale));
767
+ setScale((currentScale) => chunkPJUQQF3I_js.zoomInScale(currentScale));
768
768
  }, []);
769
769
  const handleZoomOut = react.useCallback(() => {
770
- setScale((currentScale) => chunkKDJBWJJH_js.zoomOutScale(currentScale));
770
+ setScale((currentScale) => chunkPJUQQF3I_js.zoomOutScale(currentScale));
771
771
  }, []);
772
772
  const handleResetZoom = react.useCallback(() => {
773
773
  setScale(1);
@@ -786,29 +786,29 @@ function useZoomViewport({
786
786
  selectedElements.forEach((element) => {
787
787
  minX = Math.min(minX, element.x);
788
788
  minY = Math.min(minY, element.y);
789
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE));
790
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE));
789
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE));
790
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE));
791
791
  });
792
792
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
793
793
  return;
794
794
  }
795
795
  const selectionBounds = { minX, minY, maxX, maxY };
796
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE);
797
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE);
796
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE);
797
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE);
798
798
  const availableWidth = Math.max(
799
- effectiveEditorDimensions.width - chunkFAP6OPLL_js.ZOOM_TO_SELECTION_PADDING,
800
- chunkFAP6OPLL_js.MIN_ELEMENT_SIZE
799
+ effectiveEditorDimensions.width - chunk2VUHJNWM_js.ZOOM_TO_SELECTION_PADDING,
800
+ chunk2VUHJNWM_js.MIN_ELEMENT_SIZE
801
801
  );
802
802
  const availableHeight = Math.max(
803
- effectiveEditorDimensions.height - chunkFAP6OPLL_js.ZOOM_TO_SELECTION_PADDING,
804
- chunkFAP6OPLL_js.MIN_ELEMENT_SIZE
803
+ effectiveEditorDimensions.height - chunk2VUHJNWM_js.ZOOM_TO_SELECTION_PADDING,
804
+ chunk2VUHJNWM_js.MIN_ELEMENT_SIZE
805
805
  );
806
806
  const targetEditorScale = Math.min(
807
807
  availableWidth / boundsWidth,
808
808
  availableHeight / boundsHeight
809
809
  );
810
810
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
811
- const nextScale = chunkKDJBWJJH_js.clampZoomScale(targetEditorScale / safeFitScale);
811
+ const nextScale = chunkPJUQQF3I_js.clampZoomScale(targetEditorScale / safeFitScale);
812
812
  setScale(nextScale);
813
813
  window.requestAnimationFrame(() => {
814
814
  window.requestAnimationFrame(() => {
@@ -828,7 +828,7 @@ function useZoomViewport({
828
828
  }
829
829
  event.preventDefault();
830
830
  const delta = event.deltaY * -1e-3;
831
- setScale((currentScale) => chunkKDJBWJJH_js.clampZoomScale(currentScale + delta));
831
+ setScale((currentScale) => chunkPJUQQF3I_js.clampZoomScale(currentScale + delta));
832
832
  }, []);
833
833
  react.useEffect(() => {
834
834
  const viewport = canvasViewportRef.current;
@@ -905,7 +905,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
905
905
  const command = step.command;
906
906
  const timer = window.setTimeout(
907
907
  () => {
908
- chunkFAP6OPLL_js.executeMediaCommand(command);
908
+ chunk2VUHJNWM_js.executeMediaCommand(command);
909
909
  },
910
910
  Math.max(0, step.delayMs)
911
911
  );
@@ -1021,7 +1021,7 @@ function useAnimationPlayback(input) {
1021
1021
  (controller, group) => {
1022
1022
  driveBuildReveal(
1023
1023
  controller,
1024
- chunkKDJBWJJH_js.PresentationAnimationController.collectBuildStepIds(group),
1024
+ chunkPJUQQF3I_js.PresentationAnimationController.collectBuildStepIds(group),
1025
1025
  setPresentationElementStates,
1026
1026
  buildRafRef
1027
1027
  );
@@ -1084,7 +1084,7 @@ function useAnimationPlayback(input) {
1084
1084
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1085
1085
  return;
1086
1086
  }
1087
- const controller = chunkKDJBWJJH_js.PresentationAnimationController.fromSlide(slide);
1087
+ const controller = chunkPJUQQF3I_js.PresentationAnimationController.fromSlide(slide);
1088
1088
  controllerRef.current = controller;
1089
1089
  setPresentationKeyframesCss(controller.keyframesCss);
1090
1090
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1232,7 +1232,7 @@ function useAnimationPlayback(input) {
1232
1232
  }))
1233
1233
  );
1234
1234
  entranceAnimations.forEach((animation, animationIndex) => {
1235
- const delay = chunkKDJBWJJH_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1235
+ const delay = chunkPJUQQF3I_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1236
1236
  const timer = window.setTimeout(() => {
1237
1237
  setPresentationAnimations(
1238
1238
  (previousAnimations) => previousAnimations.map(
@@ -1269,12 +1269,12 @@ function useAnimationPlayback(input) {
1269
1269
  presentationTimersRef
1270
1270
  };
1271
1271
  }
1272
- var PRESENTER_CHANNEL_NAME = chunkKDJBWJJH_js.PRESENTATION_CHANNEL_NAME;
1273
- var AUDIENCE_HASH = chunkKDJBWJJH_js.PRESENTATION_HASH;
1274
- var PRESENTER_MSG_ORIGIN = chunkKDJBWJJH_js.PRESENTATION_MESSAGE_ORIGIN;
1275
- var AUDIENCE_NONCE_KEY = chunkKDJBWJJH_js.PRESENTATION_NONCE_KEY;
1272
+ var PRESENTER_CHANNEL_NAME = chunkPJUQQF3I_js.PRESENTATION_CHANNEL_NAME;
1273
+ var AUDIENCE_HASH = chunkPJUQQF3I_js.PRESENTATION_HASH;
1274
+ var PRESENTER_MSG_ORIGIN = chunkPJUQQF3I_js.PRESENTATION_MESSAGE_ORIGIN;
1275
+ var AUDIENCE_NONCE_KEY = chunkPJUQQF3I_js.PRESENTATION_NONCE_KEY;
1276
1276
  function generateSessionId() {
1277
- return chunkKDJBWJJH_js.createPresentationSessionId();
1277
+ return chunkPJUQQF3I_js.createPresentationSessionId();
1278
1278
  }
1279
1279
  function parseAudienceNonce() {
1280
1280
  const hash = window.location.hash;
@@ -1310,7 +1310,7 @@ function usePresenterWindow(input) {
1310
1310
  }, []);
1311
1311
  const swapDisplays = react.useCallback(async () => {
1312
1312
  const audience = audienceWindowRef.current;
1313
- return audience && !audience.closed ? chunkKDJBWJJH_js.swapPresentationWindows(window, audience) : false;
1313
+ return audience && !audience.closed ? chunkPJUQQF3I_js.swapPresentationWindows(window, audience) : false;
1314
1314
  }, []);
1315
1315
  const syncSlideToAudience = react.useCallback(
1316
1316
  (slideIndex) => {
@@ -1374,7 +1374,7 @@ function usePresenterWindow(input) {
1374
1374
  pollTimerRef.current = null;
1375
1375
  }
1376
1376
  if (closingSessionId) {
1377
- void chunkKDJBWJJH_js.clearAudienceContent(closingSessionId);
1377
+ void chunkPJUQQF3I_js.clearAudienceContent(closingSessionId);
1378
1378
  }
1379
1379
  }, [getChannel]);
1380
1380
  const openAudienceWindow = react.useCallback(() => {
@@ -1392,10 +1392,10 @@ function usePresenterWindow(input) {
1392
1392
  audienceWindowRef.current = blankWin;
1393
1393
  const sessionId = generateSessionId();
1394
1394
  sessionIdRef.current = sessionId;
1395
- const audienceUrl = chunkKDJBWJJH_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
- void chunkKDJBWJJH_js.resolveAudienceScreenPlacement(window).then((placement) => {
1395
+ const audienceUrl = chunkPJUQQF3I_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
+ void chunkPJUQQF3I_js.resolveAudienceScreenPlacement(window).then((placement) => {
1397
1397
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1398
- chunkKDJBWJJH_js.placeAudienceWindow(blankWin, placement);
1398
+ chunkPJUQQF3I_js.placeAudienceWindow(blankWin, placement);
1399
1399
  }
1400
1400
  return void 0;
1401
1401
  });
@@ -1425,7 +1425,7 @@ function usePresenterWindow(input) {
1425
1425
  }
1426
1426
  };
1427
1427
  if (content) {
1428
- void chunkKDJBWJJH_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1428
+ void chunkPJUQQF3I_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1429
1429
  } else {
1430
1430
  navigateOrClose(true);
1431
1431
  }
@@ -1451,7 +1451,7 @@ function usePresenterWindow(input) {
1451
1451
  }
1452
1452
  const handleMessage = (event) => {
1453
1453
  const message = event.data;
1454
- if (chunkKDJBWJJH_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1454
+ if (chunkPJUQQF3I_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1455
1455
  syncStateToAudience(snapshotRef.current);
1456
1456
  }
1457
1457
  };
@@ -1480,7 +1480,7 @@ function usePresenterWindow(input) {
1480
1480
  react.useEffect(() => {
1481
1481
  const handleBeforeUnload = () => {
1482
1482
  if (sessionIdRef.current) {
1483
- void chunkKDJBWJJH_js.clearAudienceContent(sessionIdRef.current);
1483
+ void chunkPJUQQF3I_js.clearAudienceContent(sessionIdRef.current);
1484
1484
  }
1485
1485
  };
1486
1486
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1542,7 +1542,7 @@ function useAudienceMode(input) {
1542
1542
  }
1543
1543
  channel.onmessage = (event) => {
1544
1544
  const data = event.data;
1545
- if (!chunkKDJBWJJH_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1545
+ if (!chunkPJUQQF3I_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1546
1546
  return;
1547
1547
  }
1548
1548
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1558,16 +1558,16 @@ function useAudienceMode(input) {
1558
1558
  }
1559
1559
  if (data.type === "presenter-exit") {
1560
1560
  if (expectedSessionId) {
1561
- void chunkKDJBWJJH_js.clearAudienceContent(expectedSessionId);
1561
+ void chunkPJUQQF3I_js.clearAudienceContent(expectedSessionId);
1562
1562
  }
1563
- if (chunkKDJBWJJH_js.endAudienceDisplay(window)) {
1563
+ if (chunkPJUQQF3I_js.endAudienceDisplay(window)) {
1564
1564
  handlers.onPresenterEnded?.();
1565
1565
  }
1566
1566
  }
1567
1567
  };
1568
1568
  if (expectedSessionId) {
1569
1569
  channel.postMessage({
1570
- origin: chunkKDJBWJJH_js.PRESENTATION_MESSAGE_ORIGIN,
1570
+ origin: chunkPJUQQF3I_js.PRESENTATION_MESSAGE_ORIGIN,
1571
1571
  type: "audience-ready",
1572
1572
  sessionId: expectedSessionId
1573
1573
  });
@@ -1600,14 +1600,14 @@ function usePresentationKeyboard(input) {
1600
1600
  presentationSlideIndex,
1601
1601
  setShowRehearsalSummary
1602
1602
  } = input;
1603
- const keyBufferRef = react.useRef(chunkKDJBWJJH_js.createPresentationKeyBuffer());
1603
+ const keyBufferRef = react.useRef(chunkPJUQQF3I_js.createPresentationKeyBuffer());
1604
1604
  react.useEffect(() => {
1605
- if (mode !== "present" || !chunkKDJBWJJH_js.acceptsPresentationInput()) {
1606
- keyBufferRef.current = chunkKDJBWJJH_js.createPresentationKeyBuffer();
1605
+ if (mode !== "present" || !chunkPJUQQF3I_js.acceptsPresentationInput()) {
1606
+ keyBufferRef.current = chunkPJUQQF3I_js.createPresentationKeyBuffer();
1607
1607
  return;
1608
1608
  }
1609
1609
  const handleKeyDown = (event) => {
1610
- const mapped = chunkKDJBWJJH_js.mapPresentationKey(event, keyBufferRef.current);
1610
+ const mapped = chunkPJUQQF3I_js.mapPresentationKey(event, keyBufferRef.current);
1611
1611
  if (mapped.action === "none") {
1612
1612
  return;
1613
1613
  }
@@ -1627,12 +1627,12 @@ function usePresentationKeyboard(input) {
1627
1627
  movePresentationSlide(-1);
1628
1628
  return;
1629
1629
  case "first": {
1630
- const first = chunkKDJBWJJH_js.firstShowSlideIndex(showSlideIndexes);
1630
+ const first = chunkPJUQQF3I_js.firstShowSlideIndex(showSlideIndexes);
1631
1631
  navigateToSlide(first ?? 0);
1632
1632
  return;
1633
1633
  }
1634
1634
  case "last": {
1635
- const last = chunkKDJBWJJH_js.lastShowSlideIndex(showSlideIndexes);
1635
+ const last = chunkPJUQQF3I_js.lastShowSlideIndex(showSlideIndexes);
1636
1636
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1637
1637
  return;
1638
1638
  }
@@ -1787,50 +1787,29 @@ function useRehearsalTimings(input) {
1787
1787
 
1788
1788
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1789
1789
  function handlePresentationActionImpl(action, deps) {
1790
- const actionStr = action.action || "";
1791
- if (action.soundPath && deps.onPlayActionSound) {
1792
- deps.onPlayActionSound(action.soundPath);
1793
- }
1794
- if (typeof action.targetSlideIndex === "number") {
1795
- const clamped = Math.max(
1796
- 0,
1797
- Math.min(deps.slidesLength - 1, Math.floor(action.targetSlideIndex))
1798
- );
1799
- if (deps.slidesLength > 0) {
1800
- deps.navigateToSlide(clamped);
1801
- }
1802
- return;
1803
- }
1804
- if (actionStr.includes("hlinkshowjump")) {
1805
- const lower = actionStr.toLowerCase();
1806
- if (lower.includes("nextslide")) {
1807
- deps.movePresentationSlide(1);
1808
- } else if (lower.includes("previousslide")) {
1809
- deps.movePresentationSlide(-1);
1810
- } else if (lower.includes("firstslide")) {
1811
- deps.navigateToSlide(0);
1812
- } else if (lower.includes("lastslide")) {
1813
- deps.navigateToSlide(deps.slidesLength - 1);
1814
- } else if (lower.includes("endshow")) {
1815
- deps.onSetMode("edit");
1816
- }
1817
- return;
1818
- }
1819
- if (actionStr.includes("hlinksldjump")) {
1820
- return;
1821
- }
1822
- if (action.url && !actionStr.includes("hlinksldjump")) {
1823
- if (chunkKDJBWJJH_js.isUrlSafe(action.url)) {
1824
- window.open(action.url, "_blank", "noopener,noreferrer");
1790
+ chunkPJUQQF3I_js.runPresentationAction(
1791
+ action,
1792
+ { slideCount: deps.slidesLength },
1793
+ {
1794
+ goToSlide: (slideIndex) => {
1795
+ deps.navigateToSlide(slideIndex);
1796
+ },
1797
+ move: (direction) => {
1798
+ deps.movePresentationSlide(direction);
1799
+ },
1800
+ endShow: () => {
1801
+ deps.onSetMode("edit");
1802
+ },
1803
+ playSound: deps.onPlayActionSound ? (soundPath) => deps.onPlayActionSound?.(soundPath) : void 0
1825
1804
  }
1826
- }
1805
+ );
1827
1806
  }
1828
1807
 
1829
1808
  // src/viewer/hooks/presentation-mode/slide-transition.ts
1830
1809
  function executeSlideTransition(nextSlideIndex, deps) {
1831
1810
  const incomingSlide = deps.slides[nextSlideIndex];
1832
1811
  const transition = incomingSlide?.transition;
1833
- const durationMs = deps.playTransition ? chunkKDJBWJJH_js.resolveTransitionDurationMs(transition) : 0;
1812
+ const durationMs = deps.playTransition ? chunkPJUQQF3I_js.resolveTransitionDurationMs(transition) : 0;
1834
1813
  deps.clearPresentationTimers();
1835
1814
  deps.setPresentationSlideIndex(nextSlideIndex);
1836
1815
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1889,7 +1868,7 @@ function useSlideNavigation(input) {
1889
1868
  });
1890
1869
  const scheduleAutoAdvanceForSlide = react.useCallback(
1891
1870
  (slideIndex) => {
1892
- const delayMs = chunkKDJBWJJH_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1871
+ const delayMs = chunkPJUQQF3I_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1893
1872
  if (delayMs === void 0) {
1894
1873
  return;
1895
1874
  }
@@ -1912,7 +1891,7 @@ function useSlideNavigation(input) {
1912
1891
  if (availableSlideIndexes.length === 0) {
1913
1892
  return;
1914
1893
  }
1915
- const pastLastSlide = direction === 1 && !chunkKDJBWJJH_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1894
+ const pastLastSlide = direction === 1 && !chunkPJUQQF3I_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1916
1895
  if (rehearsing && pastLastSlide) {
1917
1896
  recordCurrentSlideTime(presentationSlideIndex);
1918
1897
  try {
@@ -1930,9 +1909,9 @@ function useSlideNavigation(input) {
1930
1909
  onAdvancePastLastSlide();
1931
1910
  return;
1932
1911
  }
1933
- const nextSlideIndex = direction === 1 ? chunkKDJBWJJH_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1912
+ const nextSlideIndex = direction === 1 ? chunkPJUQQF3I_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1934
1913
  loop: Boolean(loopContinuously) && !rehearsing
1935
- }) : chunkKDJBWJJH_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1914
+ }) : chunkPJUQQF3I_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1936
1915
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1937
1916
  return;
1938
1917
  }
@@ -2073,17 +2052,17 @@ function useZoomNavigation(input) {
2073
2052
  };
2074
2053
  }
2075
2054
  function usePresenterConsole(slideIndex) {
2076
- const timerRef = react.useRef(chunkKDJBWJJH_js.createPresenterTimer());
2077
- const [snapshot, setSnapshot] = react.useState(() => chunkKDJBWJJH_js.createInitialPresentationSnapshot(slideIndex));
2055
+ const timerRef = react.useRef(chunkPJUQQF3I_js.createPresenterTimer());
2056
+ const [snapshot, setSnapshot] = react.useState(() => chunkPJUQQF3I_js.createInitialPresentationSnapshot(slideIndex));
2078
2057
  const patch = react.useCallback((value) => {
2079
- setSnapshot((current) => chunkKDJBWJJH_js.mergePresentationSnapshot(current, value));
2058
+ setSnapshot((current) => chunkPJUQQF3I_js.mergePresentationSnapshot(current, value));
2080
2059
  }, []);
2081
2060
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2082
2061
  react.useEffect(() => {
2083
2062
  const timer = window.setInterval(() => {
2084
2063
  patch({
2085
2064
  paused: timerRef.current.paused,
2086
- elapsedMs: chunkKDJBWJJH_js.presenterElapsed(timerRef.current)
2065
+ elapsedMs: chunkPJUQQF3I_js.presenterElapsed(timerRef.current)
2087
2066
  });
2088
2067
  }, 1e3);
2089
2068
  return () => window.clearInterval(timer);
@@ -2093,19 +2072,19 @@ function usePresenterConsole(slideIndex) {
2093
2072
  applyAudienceSnapshot: setSnapshot,
2094
2073
  setBlackout: (blackout) => patch({ blackout }),
2095
2074
  toggleTimer: () => {
2096
- timerRef.current = chunkKDJBWJJH_js.togglePresenterTimer(timerRef.current);
2075
+ timerRef.current = chunkPJUQQF3I_js.togglePresenterTimer(timerRef.current);
2097
2076
  patch({
2098
2077
  paused: timerRef.current.paused,
2099
- elapsedMs: chunkKDJBWJJH_js.presenterElapsed(timerRef.current)
2078
+ elapsedMs: chunkPJUQQF3I_js.presenterElapsed(timerRef.current)
2100
2079
  });
2101
2080
  },
2102
2081
  resetTimer: () => {
2103
- timerRef.current = chunkKDJBWJJH_js.resetPresenterTimer();
2082
+ timerRef.current = chunkPJUQQF3I_js.resetPresenterTimer();
2104
2083
  patch({ paused: false, elapsedMs: 0 });
2105
2084
  },
2106
2085
  stepZoom: (direction) => setSnapshot(
2107
- (current) => chunkKDJBWJJH_js.mergePresentationSnapshot(current, {
2108
- zoom: chunkKDJBWJJH_js.stepPresenterZoom(
2086
+ (current) => chunkPJUQQF3I_js.mergePresentationSnapshot(current, {
2087
+ zoom: chunkPJUQQF3I_js.stepPresenterZoom(
2109
2088
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2110
2089
  direction
2111
2090
  )
@@ -2226,7 +2205,7 @@ function usePresentationMode(input) {
2226
2205
  });
2227
2206
  const movePresentationSlide = react.useCallback(
2228
2207
  (direction, trigger = "explicit") => {
2229
- if (!chunkKDJBWJJH_js.acceptsPresentationInput()) {
2208
+ if (!chunkPJUQQF3I_js.acceptsPresentationInput()) {
2230
2209
  return;
2231
2210
  }
2232
2211
  if (endOfShowVisible) {
@@ -2429,11 +2408,11 @@ function usePresentationMode(input) {
2429
2408
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2430
2409
  return void 0;
2431
2410
  }
2432
- return chunkKDJBWJJH_js.buildMorphTransitionPlan(
2411
+ return chunkPJUQQF3I_js.buildMorphTransitionPlan(
2433
2412
  slides[transitionOverlay.outgoingSlideIndex],
2434
2413
  slides[transitionOverlay.incomingSlideIndex],
2435
2414
  transitionOverlay.durationMs,
2436
- chunkKDJBWJJH_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2415
+ chunkPJUQQF3I_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2437
2416
  );
2438
2417
  }, [transitionOverlay, slides]);
2439
2418
  const morphedElementStates = react.useMemo(() => {
@@ -2739,7 +2718,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2739
2718
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2740
2719
  slides.forEach((slide, slideIndex) => {
2741
2720
  for (const element of slide.elements || []) {
2742
- if (!chunkKDJBWJJH_js.hasTextProperties(element)) {
2721
+ if (!chunkPJUQQF3I_js.hasTextProperties(element)) {
2743
2722
  continue;
2744
2723
  }
2745
2724
  const segments = element.textSegments ?? [];
@@ -2790,7 +2769,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2790
2769
  continue;
2791
2770
  }
2792
2771
  const element = slide.elements[elIdx];
2793
- if (!chunkKDJBWJJH_js.hasTextProperties(element)) {
2772
+ if (!chunkPJUQQF3I_js.hasTextProperties(element)) {
2794
2773
  continue;
2795
2774
  }
2796
2775
  const segments = [...element.textSegments ?? []];
@@ -3388,7 +3367,7 @@ function useViewerCoreState(_input) {
3388
3367
  const shapeAdjustmentDragStateRef = react.useRef(null);
3389
3368
  const marqueeStateRef = react.useRef(null);
3390
3369
  const isDrawingRef = react.useRef(false);
3391
- const livePatcher = react.useMemo(() => chunkKDJBWJJH_js.createCollaborationLivePatcher(), []);
3370
+ const livePatcher = react.useMemo(() => chunkPJUQQF3I_js.createCollaborationLivePatcher(), []);
3392
3371
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3393
3372
  const slidesRef = react.useRef([]);
3394
3373
  const [mode, setMode] = react.useState("edit");
@@ -3397,8 +3376,8 @@ function useViewerCoreState(_input) {
3397
3376
  const [slides, setSlides] = react.useState([]);
3398
3377
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3399
3378
  const [canvasSize, setCanvasSize] = react.useState({
3400
- width: chunkFAP6OPLL_js.DEFAULT_CANVAS_WIDTH,
3401
- height: chunkFAP6OPLL_js.DEFAULT_CANVAS_HEIGHT
3379
+ width: chunk2VUHJNWM_js.DEFAULT_CANVAS_WIDTH,
3380
+ height: chunk2VUHJNWM_js.DEFAULT_CANVAS_HEIGHT
3402
3381
  });
3403
3382
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3404
3383
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3418,7 +3397,7 @@ function useViewerCoreState(_input) {
3418
3397
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3419
3398
  inlineEditingTextRef.current = resolved;
3420
3399
  setInlineEditingTextBase(value);
3421
- chunkKDJBWJJH_js.publishLiveInlineText(
3400
+ chunkPJUQQF3I_js.publishLiveInlineText(
3422
3401
  livePatcher,
3423
3402
  slidesRef.current[activeSlideIndexRef.current],
3424
3403
  inlineEditingElementIdRef.current,
@@ -3752,7 +3731,7 @@ function useLoadContent({
3752
3731
  );
3753
3732
  }
3754
3733
  const previousHandler = handlerRef.current;
3755
- const handler = new chunkKDJBWJJH_js.PptxHandler();
3734
+ const handler = new chunkPJUQQF3I_js.PptxHandler();
3756
3735
  const parsed = await handler.load(buffer);
3757
3736
  if (cancelled || token !== renderTokenRef.current) {
3758
3737
  handler.dispose();
@@ -3764,7 +3743,7 @@ function useLoadContent({
3764
3743
  handlerRef.current = null;
3765
3744
  const mediaElements = [];
3766
3745
  for (const slide of parsed.slides) {
3767
- chunkKDJBWJJH_js.collectMediaElements(slide.elements, mediaElements);
3746
+ chunkPJUQQF3I_js.collectMediaElements(slide.elements, mediaElements);
3768
3747
  }
3769
3748
  for (const url of mediaDataUrls.values()) {
3770
3749
  if (url.startsWith("blob:")) {
@@ -3805,7 +3784,7 @@ function useLoadContent({
3805
3784
  }
3806
3785
  })
3807
3786
  );
3808
- const { paths: imagePaths, refs: imageRefs } = chunkKDJBWJJH_js.collectImagePaths(parsed.slides);
3787
+ const { paths: imagePaths, refs: imageRefs } = chunkPJUQQF3I_js.collectImagePaths(parsed.slides);
3809
3788
  let nextSlides = parsed.slides;
3810
3789
  if (imagePaths.size > 0) {
3811
3790
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3860,12 +3839,12 @@ function useLoadContent({
3860
3839
  }
3861
3840
  }
3862
3841
  handlerRef.current = handler;
3863
- const partition = chunkFAP6OPLL_js.partitionTemplateElements(nextSlides);
3842
+ const partition = chunk2VUHJNWM_js.partitionTemplateElements(nextSlides);
3864
3843
  setSlides(partition.slides);
3865
3844
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3866
3845
  setCanvasSize({
3867
- width: parsed.width ?? chunkFAP6OPLL_js.DEFAULT_CANVAS_WIDTH,
3868
- height: parsed.height ?? chunkFAP6OPLL_js.DEFAULT_CANVAS_HEIGHT
3846
+ width: parsed.width ?? chunk2VUHJNWM_js.DEFAULT_CANVAS_WIDTH,
3847
+ height: parsed.height ?? chunk2VUHJNWM_js.DEFAULT_CANVAS_HEIGHT
3869
3848
  });
3870
3849
  setHeaderFooter(parsed.headerFooter ?? {});
3871
3850
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3894,7 +3873,7 @@ function useLoadContent({
3894
3873
  setHasMacros(parsed.hasMacros === true);
3895
3874
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3896
3875
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3897
- setGuides(chunkKDJBWJJH_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3876
+ setGuides(chunkPJUQQF3I_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3898
3877
  setActiveSlideIndex(0);
3899
3878
  clearSelection();
3900
3879
  setIsDirty(false);
@@ -3902,7 +3881,7 @@ function useLoadContent({
3902
3881
  onContentApplied?.();
3903
3882
  } catch (err) {
3904
3883
  if (!cancelled && token === renderTokenRef.current) {
3905
- if (err instanceof chunkKDJBWJJH_js.EncryptedFileError) {
3884
+ if (err instanceof chunkPJUQQF3I_js.EncryptedFileError) {
3906
3885
  setIsEncrypted(true);
3907
3886
  } else {
3908
3887
  setError(err instanceof Error ? err.message : String(err));
@@ -3979,7 +3958,7 @@ function useAutosave(input) {
3979
3958
  isSavingRef.current = false;
3980
3959
  return;
3981
3960
  }
3982
- await chunkKDJBWJJH_js.saveAutosaveSnapshot(filePathRef.current, data);
3961
+ await chunkPJUQQF3I_js.saveAutosaveSnapshot(filePathRef.current, data);
3983
3962
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3984
3963
  } catch (err) {
3985
3964
  setAutosaveStatus({
@@ -4044,7 +4023,7 @@ function useElementOperations(input) {
4044
4023
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4045
4024
  const updateElementById = react.useCallback(
4046
4025
  (elementId, updates) => {
4047
- if (chunkKDJBWJJH_js.isTemplateElementId(elementId)) {
4026
+ if (chunkPJUQQF3I_js.isTemplateElementId(elementId)) {
4048
4027
  const slideId = activeSlide?.id;
4049
4028
  if (slideId) {
4050
4029
  setTemplateElementsBySlideId((prev) => ({
@@ -4084,7 +4063,7 @@ function useElementOperations(input) {
4084
4063
  );
4085
4064
  const updateSelectedShapeStyle = react.useCallback(
4086
4065
  (updates) => {
4087
- if (!selectedElement || !chunkKDJBWJJH_js.hasShapeProperties(selectedElement)) {
4066
+ if (!selectedElement || !chunkPJUQQF3I_js.hasShapeProperties(selectedElement)) {
4088
4067
  return;
4089
4068
  }
4090
4069
  updateSelectedElement({
@@ -4095,17 +4074,17 @@ function useElementOperations(input) {
4095
4074
  );
4096
4075
  const updateSelectedTextStyle = react.useCallback(
4097
4076
  (updates) => {
4098
- if (!selectedElement || !chunkKDJBWJJH_js.hasTextProperties(selectedElement)) {
4077
+ if (!selectedElement || !chunkPJUQQF3I_js.hasTextProperties(selectedElement)) {
4099
4078
  return;
4100
4079
  }
4101
- const inlineSel = chunkKDJBWJJH_js.getInlineEditorSelection(selectedElement.textSegments);
4080
+ const inlineSel = chunkPJUQQF3I_js.getInlineEditorSelection(selectedElement.textSegments);
4102
4081
  if (inlineSel && selectedElement.textSegments) {
4103
- const { newSegments: newSegments2, newSelection } = chunkKDJBWJJH_js.applyStyleToSelectedSegments(
4082
+ const { newSegments: newSegments2, newSelection } = chunkPJUQQF3I_js.applyStyleToSelectedSegments(
4104
4083
  selectedElement.textSegments,
4105
4084
  inlineSel,
4106
4085
  updates
4107
4086
  );
4108
- chunkKDJBWJJH_js.setPendingSelectionRestore(newSelection);
4087
+ chunkPJUQQF3I_js.setPendingSelectionRestore(newSelection);
4109
4088
  updateSelectedElement({
4110
4089
  textSegments: newSegments2
4111
4090
  });
@@ -4125,12 +4104,12 @@ function useElementOperations(input) {
4125
4104
  );
4126
4105
  const updateSelectedTextCase = react.useCallback(
4127
4106
  (mode) => {
4128
- if (!selectedElement || !chunkKDJBWJJH_js.hasTextProperties(selectedElement)) {
4107
+ if (!selectedElement || !chunkPJUQQF3I_js.hasTextProperties(selectedElement)) {
4129
4108
  return;
4130
4109
  }
4131
- const inlineSel = chunkKDJBWJJH_js.getInlineEditorSelection(selectedElement.textSegments);
4110
+ const inlineSel = chunkPJUQQF3I_js.getInlineEditorSelection(selectedElement.textSegments);
4132
4111
  if (inlineSel && selectedElement.textSegments) {
4133
- const newSegments = chunkKDJBWJJH_js.applyCaseTransformToSegments(
4112
+ const newSegments = chunkPJUQQF3I_js.applyCaseTransformToSegments(
4134
4113
  selectedElement.textSegments,
4135
4114
  inlineSel,
4136
4115
  mode
@@ -4140,14 +4119,14 @@ function useElementOperations(input) {
4140
4119
  }
4141
4120
  const updates = {};
4142
4121
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4143
- updates.textSegments = chunkKDJBWJJH_js.applyCaseTransformToSegments(
4122
+ updates.textSegments = chunkPJUQQF3I_js.applyCaseTransformToSegments(
4144
4123
  selectedElement.textSegments,
4145
4124
  null,
4146
4125
  mode
4147
4126
  );
4148
4127
  }
4149
4128
  if (typeof selectedElement.text === "string") {
4150
- updates.text = chunkKDJBWJJH_js.transformTextCase(selectedElement.text, mode);
4129
+ updates.text = chunkPJUQQF3I_js.transformTextCase(selectedElement.text, mode);
4151
4130
  }
4152
4131
  updateSelectedElement(updates);
4153
4132
  },
@@ -4202,7 +4181,7 @@ function useSectionOperations(input) {
4202
4181
  const { sections, setSections, slides, setSlides, markDirty } = input;
4203
4182
  const addSection2 = react.useCallback(
4204
4183
  (name, afterSlideIndex) => {
4205
- const result = chunkKDJBWJJH_js.addSection(sections, slides, name, afterSlideIndex);
4184
+ const result = chunkPJUQQF3I_js.addSection(sections, slides, name, afterSlideIndex);
4206
4185
  setSlides(result.slides);
4207
4186
  setSections(result.sections);
4208
4187
  markDirty();
@@ -4211,7 +4190,7 @@ function useSectionOperations(input) {
4211
4190
  );
4212
4191
  const renameSection2 = react.useCallback(
4213
4192
  (sectionId, newName) => {
4214
- const result = chunkKDJBWJJH_js.renameSection(sections, slides, sectionId, newName);
4193
+ const result = chunkPJUQQF3I_js.renameSection(sections, slides, sectionId, newName);
4215
4194
  setSections(result.sections);
4216
4195
  setSlides(result.slides);
4217
4196
  markDirty();
@@ -4220,7 +4199,7 @@ function useSectionOperations(input) {
4220
4199
  );
4221
4200
  const deleteSection2 = react.useCallback(
4222
4201
  (sectionId) => {
4223
- const result = chunkKDJBWJJH_js.deleteSection(sections, slides, sectionId);
4202
+ const result = chunkPJUQQF3I_js.deleteSection(sections, slides, sectionId);
4224
4203
  setSections(result.sections);
4225
4204
  setSlides(result.slides);
4226
4205
  markDirty();
@@ -4229,21 +4208,21 @@ function useSectionOperations(input) {
4229
4208
  );
4230
4209
  const moveSectionUp2 = react.useCallback(
4231
4210
  (sectionId) => {
4232
- setSections(chunkKDJBWJJH_js.moveSectionUp(sections, sectionId));
4211
+ setSections(chunkPJUQQF3I_js.moveSectionUp(sections, sectionId));
4233
4212
  markDirty();
4234
4213
  },
4235
4214
  [sections, setSections, markDirty]
4236
4215
  );
4237
4216
  const moveSectionDown2 = react.useCallback(
4238
4217
  (sectionId) => {
4239
- setSections(chunkKDJBWJJH_js.moveSectionDown(sections, sectionId));
4218
+ setSections(chunkPJUQQF3I_js.moveSectionDown(sections, sectionId));
4240
4219
  markDirty();
4241
4220
  },
4242
4221
  [sections, setSections, markDirty]
4243
4222
  );
4244
4223
  const moveSlidesToSection2 = react.useCallback(
4245
4224
  (slideIndexes, targetSectionId) => {
4246
- const result = chunkKDJBWJJH_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4225
+ const result = chunkPJUQQF3I_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4247
4226
  setSlides(result.slides);
4248
4227
  setSections(result.sections);
4249
4228
  markDirty();
@@ -4262,19 +4241,19 @@ function useSectionOperations(input) {
4262
4241
 
4263
4242
  // src/viewer/hooks/pointer-move-handlers.ts
4264
4243
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4265
- const resized = chunkKDJBWJJH_js.applyResize(
4244
+ const resized = chunkPJUQQF3I_js.applyResize(
4266
4245
  { x: startX, y: startY, width: startWidth, height: startHeight },
4267
4246
  handle,
4268
4247
  dx,
4269
4248
  dy,
4270
4249
  1,
4271
- { minSize: chunkFAP6OPLL_js.MIN_ELEMENT_SIZE }
4250
+ { minSize: chunk2VUHJNWM_js.MIN_ELEMENT_SIZE }
4272
4251
  );
4273
4252
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4274
4253
  if (!snapToGrid) {
4275
4254
  return box;
4276
4255
  }
4277
- return chunkKDJBWJJH_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE);
4256
+ return chunkPJUQQF3I_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE);
4278
4257
  }
4279
4258
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4280
4259
  const range = startWidth || 200;
@@ -4392,7 +4371,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4392
4371
  width: el.width,
4393
4372
  height: el.height
4394
4373
  }));
4395
- const snapResult = chunkKDJBWJJH_js.computeSnapToShape(
4374
+ const snapResult = chunkPJUQQF3I_js.computeSnapToShape(
4396
4375
  targetX,
4397
4376
  targetY,
4398
4377
  primaryEl.width,
@@ -4431,7 +4410,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4431
4410
  if (live) {
4432
4411
  for (const id of Object.keys(drag.startPositionsById)) {
4433
4412
  const start = drag.startPositionsById[id];
4434
- chunkKDJBWJJH_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4413
+ chunkPJUQQF3I_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4435
4414
  x: start.x + appliedDx,
4436
4415
  y: start.y + appliedDy
4437
4416
  });
@@ -4465,15 +4444,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4465
4444
  if (rs.domEl) {
4466
4445
  rs.domEl.style.left = `${geo.x}px`;
4467
4446
  rs.domEl.style.top = `${geo.y}px`;
4468
- rs.domEl.style.width = `${Math.max(geo.width, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE)}px`;
4469
- rs.domEl.style.height = `${Math.max(geo.height, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE)}px`;
4447
+ rs.domEl.style.width = `${Math.max(geo.width, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE)}px`;
4448
+ rs.domEl.style.height = `${Math.max(geo.height, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE)}px`;
4470
4449
  }
4471
4450
  if (live) {
4472
- chunkKDJBWJJH_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4451
+ chunkPJUQQF3I_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4473
4452
  x: geo.x,
4474
4453
  y: geo.y,
4475
- width: Math.max(geo.width, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE),
4476
- height: Math.max(geo.height, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE)
4454
+ width: Math.max(geo.width, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE),
4455
+ height: Math.max(geo.height, chunk2VUHJNWM_js.MIN_ELEMENT_SIZE)
4477
4456
  });
4478
4457
  }
4479
4458
  }
@@ -4553,13 +4532,13 @@ function processPointerUp(input) {
4553
4532
  if (i !== activeSlideIndex) {
4554
4533
  return s;
4555
4534
  }
4556
- const rerouted = chunkKDJBWJJH_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4535
+ const rerouted = chunkPJUQQF3I_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4557
4536
  if (rerouted.length === 0) {
4558
4537
  return s;
4559
4538
  }
4560
4539
  return {
4561
4540
  ...s,
4562
- elements: chunkKDJBWJJH_js.applyReroutedConnectors(s.elements, rerouted)
4541
+ elements: chunkPJUQQF3I_js.applyReroutedConnectors(s.elements, rerouted)
4563
4542
  };
4564
4543
  })
4565
4544
  );
@@ -4581,9 +4560,9 @@ function processPointerUp(input) {
4581
4560
  }
4582
4561
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4583
4562
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4584
- const hitIds = chunkKDJBWJJH_js.computeMarqueeHitIds(marquee, sourceElements);
4563
+ const hitIds = chunkPJUQQF3I_js.computeMarqueeHitIds(marquee, sourceElements);
4585
4564
  if (marquee.additive) {
4586
- const merged = chunkKDJBWJJH_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4565
+ const merged = chunkPJUQQF3I_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4587
4566
  if (merged.length > 0) {
4588
4567
  applySelection(merged[0], merged);
4589
4568
  } else {
@@ -4606,8 +4585,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4606
4585
  }
4607
4586
  return { ...el, x: start.x + dx, y: start.y + dy };
4608
4587
  });
4609
- const rerouted = chunkKDJBWJJH_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4610
- return chunkKDJBWJJH_js.applyReroutedConnectors(movedElements, rerouted);
4588
+ const rerouted = chunkPJUQQF3I_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4589
+ return chunkPJUQQF3I_js.applyReroutedConnectors(movedElements, rerouted);
4611
4590
  };
4612
4591
  if (editTemplateMode) {
4613
4592
  const slideId = activeSlide?.id;
@@ -4763,9 +4742,9 @@ function useCanvasInteractions(input) {
4763
4742
  return;
4764
4743
  }
4765
4744
  const el = elementLookup.get(editId);
4766
- if (el && chunkKDJBWJJH_js.hasTextProperties(el)) {
4745
+ if (el && chunkPJUQQF3I_js.hasTextProperties(el)) {
4767
4746
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4768
- const newSegments = chunkKDJBWJJH_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4747
+ const newSegments = chunkPJUQQF3I_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4769
4748
  ops.updateElementById(editId, {
4770
4749
  text: committedText,
4771
4750
  textSegments: newSegments
@@ -4776,7 +4755,7 @@ function useCanvasInteractions(input) {
4776
4755
  setInlineEditingText("");
4777
4756
  };
4778
4757
  const openEquationEditorForElement = (el) => {
4779
- if (!chunkKDJBWJJH_js.hasTextProperties(el)) {
4758
+ if (!chunkPJUQQF3I_js.hasTextProperties(el)) {
4780
4759
  return false;
4781
4760
  }
4782
4761
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4805,7 +4784,7 @@ function useCanvasInteractions(input) {
4805
4784
  justSelectedRef.current = false;
4806
4785
  } else {
4807
4786
  const el = elementLookup.get(elementId);
4808
- if (el && chunkKDJBWJJH_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4787
+ if (el && chunkPJUQQF3I_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4809
4788
  if (!openEquationEditorForElement(el)) {
4810
4789
  setInlineEditingElementId(elementId);
4811
4790
  setInlineEditingText(el.text ?? "");
@@ -4824,7 +4803,7 @@ function useCanvasInteractions(input) {
4824
4803
  if (openEquationEditorForElement(el)) {
4825
4804
  return;
4826
4805
  }
4827
- if (chunkKDJBWJJH_js.hasTextProperties(el)) {
4806
+ if (chunkPJUQQF3I_js.hasTextProperties(el)) {
4828
4807
  setInlineEditingElementId(elementId);
4829
4808
  setInlineEditingText(el.text ?? "");
4830
4809
  }
@@ -5017,7 +4996,7 @@ function createFileHandlers(deps) {
5017
4996
  h = Math.round(h * scale);
5018
4997
  }
5019
4998
  addElement({
5020
- id: chunkKDJBWJJH_js.generateElementId(),
4999
+ id: chunkPJUQQF3I_js.generateElementId(),
5021
5000
  type: "image",
5022
5001
  x: Math.round((canvasSize.width - w) / 2),
5023
5002
  y: Math.round((canvasSize.height - h) / 2),
@@ -5028,7 +5007,7 @@ function createFileHandlers(deps) {
5028
5007
  };
5029
5008
  img.onerror = () => {
5030
5009
  addElement({
5031
- id: chunkKDJBWJJH_js.generateElementId(),
5010
+ id: chunkPJUQQF3I_js.generateElementId(),
5032
5011
  type: "image",
5033
5012
  x: 100,
5034
5013
  y: 100,
@@ -5054,7 +5033,7 @@ function createFileHandlers(deps) {
5054
5033
  const elFilePath = file.path;
5055
5034
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5056
5035
  addElement({
5057
- id: chunkKDJBWJJH_js.generateElementId(),
5036
+ id: chunkPJUQQF3I_js.generateElementId(),
5058
5037
  type: "media",
5059
5038
  mediaType,
5060
5039
  mediaMimeType: file.type || void 0,
@@ -5229,13 +5208,13 @@ function createStructuredElementHandlers(deps) {
5229
5208
  return;
5230
5209
  }
5231
5210
  addElement({
5232
- id: chunkKDJBWJJH_js.generateElementId(),
5211
+ id: chunkPJUQQF3I_js.generateElementId(),
5233
5212
  type: "smartArt",
5234
5213
  x: 100,
5235
5214
  y: 120,
5236
5215
  width: 600,
5237
5216
  height: 340,
5238
- smartArtData: chunkKDJBWJJH_js.buildSmartArtPresetData(
5217
+ smartArtData: chunkPJUQQF3I_js.buildSmartArtPresetData(
5239
5218
  layout,
5240
5219
  defaultItems,
5241
5220
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5247,7 +5226,7 @@ function createStructuredElementHandlers(deps) {
5247
5226
  return;
5248
5227
  }
5249
5228
  addElement({
5250
- id: chunkKDJBWJJH_js.generateElementId(),
5229
+ id: chunkPJUQQF3I_js.generateElementId(),
5251
5230
  type: "shape",
5252
5231
  x: 120,
5253
5232
  y: 200,
@@ -5306,7 +5285,7 @@ function createStructuredElementHandlers(deps) {
5306
5285
  const displayText = value || fieldTexts[fieldType] || fieldType;
5307
5286
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5308
5287
  addElement({
5309
- id: chunkKDJBWJJH_js.generateElementId(),
5288
+ id: chunkPJUQQF3I_js.generateElementId(),
5310
5289
  type: "shape",
5311
5290
  x: 120,
5312
5291
  y: 200,
@@ -5328,11 +5307,11 @@ function createStructuredElementHandlers(deps) {
5328
5307
  if (!activeSlide) {
5329
5308
  return;
5330
5309
  }
5331
- const preset = chunkKDJBWJJH_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5310
+ const preset = chunkPJUQQF3I_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5332
5311
  if (!preset) {
5333
5312
  return;
5334
5313
  }
5335
- const defaultPptxAction = chunkKDJBWJJH_js.elementActionToPptxAction({
5314
+ const defaultPptxAction = chunkPJUQQF3I_js.elementActionToPptxAction({
5336
5315
  trigger: "click",
5337
5316
  type: preset.defaultAction
5338
5317
  });
@@ -5341,7 +5320,7 @@ function createStructuredElementHandlers(deps) {
5341
5320
  defaultPptxAction.highlightClick = true;
5342
5321
  }
5343
5322
  addElement({
5344
- id: chunkKDJBWJJH_js.generateElementId(),
5323
+ id: chunkPJUQQF3I_js.generateElementId(),
5345
5324
  type: "shape",
5346
5325
  x: 150,
5347
5326
  y: 150,
@@ -5408,14 +5387,14 @@ function useInsertElements(input) {
5408
5387
  return;
5409
5388
  }
5410
5389
  addElement({
5411
- id: chunkKDJBWJJH_js.generateElementId(),
5390
+ id: chunkPJUQQF3I_js.generateElementId(),
5412
5391
  type: "text",
5413
5392
  x: 100,
5414
5393
  y: 100,
5415
5394
  width: 300,
5416
5395
  height: 60,
5417
5396
  text: "",
5418
- textStyle: { fontSize: chunkFAP6OPLL_js.DEFAULT_TEXT_FONT_SIZE }
5397
+ textStyle: { fontSize: chunk2VUHJNWM_js.DEFAULT_TEXT_FONT_SIZE }
5419
5398
  });
5420
5399
  };
5421
5400
  const handleAddShape = () => {
@@ -5423,7 +5402,7 @@ function useInsertElements(input) {
5423
5402
  return;
5424
5403
  }
5425
5404
  addElement({
5426
- id: chunkKDJBWJJH_js.generateElementId(),
5405
+ id: chunkPJUQQF3I_js.generateElementId(),
5427
5406
  type: "shape",
5428
5407
  x: 150,
5429
5408
  y: 150,
@@ -5442,15 +5421,15 @@ function useInsertElements(input) {
5442
5421
  return;
5443
5422
  }
5444
5423
  addElement({
5445
- ...chunkKDJBWJJH_js.newTableElement(chunkFAP6OPLL_js.DEFAULT_TABLE_ROWS, chunkFAP6OPLL_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5446
- id: chunkKDJBWJJH_js.generateElementId()
5424
+ ...chunkPJUQQF3I_js.newTableElement(chunk2VUHJNWM_js.DEFAULT_TABLE_ROWS, chunk2VUHJNWM_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5425
+ id: chunkPJUQQF3I_js.generateElementId()
5447
5426
  });
5448
5427
  };
5449
5428
  const handleAddChart = (chartType) => {
5450
5429
  if (!activeSlide) {
5451
5430
  return;
5452
5431
  }
5453
- addElement(chunkKDJBWJJH_js.createDefaultChartElement(chartType));
5432
+ addElement(chunkPJUQQF3I_js.createDefaultChartElement(chartType));
5454
5433
  };
5455
5434
  const structured = createStructuredElementHandlers({
5456
5435
  activeSlide,
@@ -5520,7 +5499,7 @@ function useClipboardHandlers(input) {
5520
5499
  if (!selectedElement) {
5521
5500
  return;
5522
5501
  }
5523
- setClipboardPayload(chunkKDJBWJJH_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5502
+ setClipboardPayload(chunkPJUQQF3I_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5524
5503
  };
5525
5504
  const handleDelete = () => {
5526
5505
  const idsToDelete = effectiveSelectedIds;
@@ -5537,7 +5516,7 @@ function useClipboardHandlers(input) {
5537
5516
  handleDelete();
5538
5517
  };
5539
5518
  const insertClone = (source) => {
5540
- const clone = chunkKDJBWJJH_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5519
+ const clone = chunkPJUQQF3I_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5541
5520
  ops.updateActiveElements((els) => [...els, clone]);
5542
5521
  ops.applySelection(clone.id);
5543
5522
  history.markDirty();
@@ -5572,7 +5551,7 @@ function resolveShapePath(el) {
5572
5551
  return el.pathData;
5573
5552
  }
5574
5553
  if ("shapeType" in el && typeof el.shapeType === "string") {
5575
- const clipPath = chunkKDJBWJJH_js.getPresetShapeClipPath(el.shapeType);
5554
+ const clipPath = chunkPJUQQF3I_js.getPresetShapeClipPath(el.shapeType);
5576
5555
  if (clipPath) {
5577
5556
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5578
5557
  if (svgPath) {
@@ -5623,7 +5602,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5623
5602
  return parts.join(" ");
5624
5603
  }
5625
5604
  function transformPathToGlobal(pathData, el) {
5626
- const polys = chunkKDJBWJJH_js.svgPathToPolygons(pathData);
5605
+ const polys = chunkPJUQQF3I_js.svgPathToPolygons(pathData);
5627
5606
  if (polys.length === 0) {
5628
5607
  return pathData;
5629
5608
  }
@@ -5643,10 +5622,10 @@ function transformPathToGlobal(pathData, el) {
5643
5622
  y: pt.y * scaleY + el.y
5644
5623
  }))
5645
5624
  );
5646
- return chunkKDJBWJJH_js.polygonsToSvgPath(transformed);
5625
+ return chunkPJUQQF3I_js.polygonsToSvgPath(transformed);
5647
5626
  }
5648
5627
  function transformPathToLocal(pathData, x, y, _width, _height) {
5649
- const polys = chunkKDJBWJJH_js.svgPathToPolygons(pathData);
5628
+ const polys = chunkPJUQQF3I_js.svgPathToPolygons(pathData);
5650
5629
  if (polys.length === 0) {
5651
5630
  return pathData;
5652
5631
  }
@@ -5656,10 +5635,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5656
5635
  y: pt.y - y
5657
5636
  }))
5658
5637
  );
5659
- return chunkKDJBWJJH_js.polygonsToSvgPath(transformed);
5638
+ return chunkPJUQQF3I_js.polygonsToSvgPath(transformed);
5660
5639
  }
5661
5640
  function pathBounds(pathData) {
5662
- const polys = chunkKDJBWJJH_js.svgPathToPolygons(pathData);
5641
+ const polys = chunkPJUQQF3I_js.svgPathToPolygons(pathData);
5663
5642
  let minX = Infinity;
5664
5643
  let minY = Infinity;
5665
5644
  let maxX = -Infinity;
@@ -5718,7 +5697,7 @@ function useMergeShapesHandler(input) {
5718
5697
  let allFragments = [];
5719
5698
  let remaining = globalPaths[0];
5720
5699
  for (let i = 1; i < globalPaths.length; i++) {
5721
- const frags = chunkKDJBWJJH_js.mergeShapes("fragment", remaining, globalPaths[i]);
5700
+ const frags = chunkPJUQQF3I_js.mergeShapes("fragment", remaining, globalPaths[i]);
5722
5701
  if (Array.isArray(frags)) {
5723
5702
  allFragments = frags;
5724
5703
  }
@@ -5747,7 +5726,7 @@ function useMergeShapesHandler(input) {
5747
5726
  bounds.height
5748
5727
  );
5749
5728
  const newEl = {
5750
- id: chunkKDJBWJJH_js.generateElementId(),
5729
+ id: chunkPJUQQF3I_js.generateElementId(),
5751
5730
  type: "shape",
5752
5731
  x: bounds.x,
5753
5732
  y: bounds.y,
@@ -5785,7 +5764,7 @@ function useMergeShapesHandler(input) {
5785
5764
  } else {
5786
5765
  let resultPath = globalPaths[0];
5787
5766
  for (let i = 1; i < globalPaths.length; i++) {
5788
- const result = chunkKDJBWJJH_js.mergeShapes(operation, resultPath, globalPaths[i]);
5767
+ const result = chunkPJUQQF3I_js.mergeShapes(operation, resultPath, globalPaths[i]);
5789
5768
  if (typeof result === "string") {
5790
5769
  resultPath = result;
5791
5770
  }
@@ -5806,7 +5785,7 @@ function useMergeShapesHandler(input) {
5806
5785
  );
5807
5786
  const primary = targets[0];
5808
5787
  const newEl = {
5809
- id: chunkKDJBWJJH_js.generateElementId(),
5788
+ id: chunkPJUQQF3I_js.generateElementId(),
5810
5789
  type: "shape",
5811
5790
  x: bounds.x,
5812
5791
  y: bounds.y,
@@ -5869,7 +5848,7 @@ function useGroupAlignLayerHandlers(input) {
5869
5848
  if (ids.length < 2 || !activeSlide) {
5870
5849
  return;
5871
5850
  }
5872
- const { elements, groupId } = chunkKDJBWJJH_js.groupElements(ops.activeElements, ids, chunkKDJBWJJH_js.generateElementId());
5851
+ const { elements, groupId } = chunkPJUQQF3I_js.groupElements(ops.activeElements, ids, chunkPJUQQF3I_js.generateElementId());
5873
5852
  if (groupId === null) {
5874
5853
  return;
5875
5854
  }
@@ -5882,12 +5861,12 @@ function useGroupAlignLayerHandlers(input) {
5882
5861
  return;
5883
5862
  }
5884
5863
  const group = selectedElement;
5885
- const intoTemplate = chunkKDJBWJJH_js.isTemplateElementId(group.id);
5864
+ const intoTemplate = chunkPJUQQF3I_js.isTemplateElementId(group.id);
5886
5865
  const ungrouped = group.children.map((child) => ({
5887
5866
  ...structuredClone(child),
5888
5867
  // Keep child ids in the same store as the group so later edits route
5889
5868
  // correctly: template groups yield template-prefixed child ids.
5890
- id: intoTemplate ? chunkKDJBWJJH_js.makeCloneId(true, child.id || group.id) : child.id || chunkKDJBWJJH_js.generateElementId(),
5869
+ id: intoTemplate ? chunkPJUQQF3I_js.makeCloneId(true, child.id || group.id) : child.id || chunkPJUQQF3I_js.generateElementId(),
5891
5870
  x: child.x + group.x,
5892
5871
  y: child.y + group.y
5893
5872
  }));
@@ -5911,7 +5890,7 @@ function useGroupAlignLayerHandlers(input) {
5911
5890
  if (!edge) {
5912
5891
  return;
5913
5892
  }
5914
- const positions = chunkKDJBWJJH_js.alignElements(selectedElements, edge);
5893
+ const positions = chunkPJUQQF3I_js.alignElements(selectedElements, edge);
5915
5894
  for (const [id, pos] of positions) {
5916
5895
  const el = elementLookup.get(id);
5917
5896
  if (!el) {
@@ -5929,7 +5908,7 @@ function useGroupAlignLayerHandlers(input) {
5929
5908
  if (!distAxis) {
5930
5909
  return;
5931
5910
  }
5932
- const positions = chunkKDJBWJJH_js.distributeElements(selectedElements, distAxis);
5911
+ const positions = chunkPJUQQF3I_js.distributeElements(selectedElements, distAxis);
5933
5912
  for (const [id, pos] of positions) {
5934
5913
  const el = elementLookup.get(id);
5935
5914
  if (!el) {
@@ -5946,7 +5925,7 @@ function useGroupAlignLayerHandlers(input) {
5946
5925
  }
5947
5926
  const id = selectedElement.id;
5948
5927
  ops.updateActiveElements(
5949
- (els) => direction === "forward" ? chunkKDJBWJJH_js.bringForward(els, id) : direction === "backward" ? chunkKDJBWJJH_js.sendBackward(els, id) : els
5928
+ (els) => direction === "forward" ? chunkPJUQQF3I_js.bringForward(els, id) : direction === "backward" ? chunkPJUQQF3I_js.sendBackward(els, id) : els
5950
5929
  );
5951
5930
  history.markDirty();
5952
5931
  };
@@ -5956,7 +5935,7 @@ function useGroupAlignLayerHandlers(input) {
5956
5935
  }
5957
5936
  const id = selectedElement.id;
5958
5937
  ops.updateActiveElements(
5959
- (els) => direction === "front" ? chunkKDJBWJJH_js.bringToFront(els, id) : chunkKDJBWJJH_js.sendToBack(els, id)
5938
+ (els) => direction === "front" ? chunkPJUQQF3I_js.bringToFront(els, id) : chunkPJUQQF3I_js.sendToBack(els, id)
5960
5939
  );
5961
5940
  history.markDirty();
5962
5941
  };
@@ -6078,7 +6057,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
6078
6057
  function useSlideManagement(input) {
6079
6058
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
6080
6059
  const handleAddSlide = () => {
6081
- const newSlide = chunkKDJBWJJH_js.createBlankSlide(slides.length + 1);
6060
+ const newSlide = chunkPJUQQF3I_js.createBlankSlide(slides.length + 1);
6082
6061
  ops.updateSlides((prev) => {
6083
6062
  const next = [...prev];
6084
6063
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6141,7 +6120,7 @@ function useSlideManagement(input) {
6141
6120
  }
6142
6121
  const clone = {
6143
6122
  ...src,
6144
- id: chunkKDJBWJJH_js.makeSlideId(),
6123
+ id: chunkPJUQQF3I_js.makeSlideId(),
6145
6124
  elements: src.elements.map((el) => ({
6146
6125
  ...el,
6147
6126
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6173,7 +6152,7 @@ function useSlideManagement(input) {
6173
6152
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6174
6153
  const insertAt = activeSlideIndex + 1;
6175
6154
  const draft = {
6176
- ...chunkKDJBWJJH_js.createBlankSlide(slides.length + 1),
6155
+ ...chunkPJUQQF3I_js.createBlankSlide(slides.length + 1),
6177
6156
  layoutPath,
6178
6157
  ...layoutName ? { layoutName } : {}
6179
6158
  };
@@ -6234,7 +6213,7 @@ function createTableMergeHandlers(input) {
6234
6213
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6235
6214
  return;
6236
6215
  }
6237
- const newTableData = chunkKDJBWJJH_js.mergeCells(
6216
+ const newTableData = chunkPJUQQF3I_js.mergeCells(
6238
6217
  [
6239
6218
  { row: rowIndex, col: columnIndex },
6240
6219
  { row: rowIndex, col: nextColIdx }
@@ -6242,7 +6221,7 @@ function createTableMergeHandlers(input) {
6242
6221
  td
6243
6222
  );
6244
6223
  const updates = { tableData: newTableData };
6245
- const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6224
+ const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6246
6225
  if (newRawXml) {
6247
6226
  updates.rawXml = newRawXml;
6248
6227
  }
@@ -6268,7 +6247,7 @@ function createTableMergeHandlers(input) {
6268
6247
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6269
6248
  return;
6270
6249
  }
6271
- const newTableData = chunkKDJBWJJH_js.mergeCells(
6250
+ const newTableData = chunkPJUQQF3I_js.mergeCells(
6272
6251
  [
6273
6252
  { row: rowIndex, col: columnIndex },
6274
6253
  { row: targetNextRowIdx, col: columnIndex }
@@ -6276,7 +6255,7 @@ function createTableMergeHandlers(input) {
6276
6255
  td
6277
6256
  );
6278
6257
  const updates = { tableData: newTableData };
6279
- const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6258
+ const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6280
6259
  if (newRawXml) {
6281
6260
  updates.rawXml = newRawXml;
6282
6261
  }
@@ -6291,9 +6270,9 @@ function createTableMergeHandlers(input) {
6291
6270
  return;
6292
6271
  }
6293
6272
  const td = selectedElement.tableData;
6294
- const newTableData = chunkKDJBWJJH_js.mergeCells(ts.selectedCells, td);
6273
+ const newTableData = chunkPJUQQF3I_js.mergeCells(ts.selectedCells, td);
6295
6274
  const updates = { tableData: newTableData };
6296
- const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6275
+ const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6297
6276
  if (newRawXml) {
6298
6277
  updates.rawXml = newRawXml;
6299
6278
  }
@@ -6310,9 +6289,9 @@ function createTableMergeHandlers(input) {
6310
6289
  }
6311
6290
  const { rowIndex, columnIndex } = ts;
6312
6291
  const td = selectedElement.tableData;
6313
- const newTableData = chunkKDJBWJJH_js.splitCell(rowIndex, columnIndex, td);
6292
+ const newTableData = chunkPJUQQF3I_js.splitCell(rowIndex, columnIndex, td);
6314
6293
  const updates = { tableData: newTableData };
6315
- const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6294
+ const newRawXml = chunkPJUQQF3I_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6316
6295
  if (newRawXml) {
6317
6296
  updates.rawXml = newRawXml;
6318
6297
  }
@@ -6356,7 +6335,7 @@ function createTableStructHandlers(input) {
6356
6335
  updates.tableData = { ...el.tableData, rows: newRows };
6357
6336
  }
6358
6337
  if (el.rawXml) {
6359
- const newRawXml = chunkKDJBWJJH_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6338
+ const newRawXml = chunkPJUQQF3I_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6360
6339
  if (newRawXml) {
6361
6340
  updates.rawXml = newRawXml;
6362
6341
  }
@@ -6380,7 +6359,7 @@ function createTableStructHandlers(input) {
6380
6359
  const { rowIndex, columnIndex: colIndex } = ts;
6381
6360
  const updates = {};
6382
6361
  if (selectedElement.rawXml) {
6383
- const newRawXml = chunkKDJBWJJH_js.updateCellTextStyleInRawXml(
6362
+ const newRawXml = chunkPJUQQF3I_js.updateCellTextStyleInRawXml(
6384
6363
  selectedElement,
6385
6364
  rowIndex,
6386
6365
  colIndex,
@@ -6444,9 +6423,9 @@ function createTableStructHandlers(input) {
6444
6423
  return;
6445
6424
  }
6446
6425
  const rowIdx = ts?.rowIndex ?? 0;
6447
- const newTableData = chunkKDJBWJJH_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6426
+ const newTableData = chunkPJUQQF3I_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6448
6427
  const updates = { tableData: newTableData };
6449
- const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6428
+ const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6450
6429
  if (newRawXml) {
6451
6430
  updates.rawXml = newRawXml;
6452
6431
  }
@@ -6459,12 +6438,12 @@ function createTableStructHandlers(input) {
6459
6438
  }
6460
6439
  const td = selectedElement.tableData;
6461
6440
  const rowIdx = ts?.rowIndex ?? 0;
6462
- const newTableData = chunkKDJBWJJH_js.deleteTableRow(td, rowIdx);
6441
+ const newTableData = chunkPJUQQF3I_js.deleteTableRow(td, rowIdx);
6463
6442
  if (newTableData === td) {
6464
6443
  return;
6465
6444
  }
6466
6445
  const updates = { tableData: newTableData };
6467
- const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6446
+ const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6468
6447
  if (newRawXml) {
6469
6448
  updates.rawXml = newRawXml;
6470
6449
  }
@@ -6476,9 +6455,9 @@ function createTableStructHandlers(input) {
6476
6455
  return;
6477
6456
  }
6478
6457
  const colIdx = ts?.columnIndex ?? 0;
6479
- const newTableData = chunkKDJBWJJH_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6458
+ const newTableData = chunkPJUQQF3I_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6480
6459
  const updates = { tableData: newTableData };
6481
- const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6460
+ const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6482
6461
  if (newRawXml) {
6483
6462
  updates.rawXml = newRawXml;
6484
6463
  }
@@ -6491,12 +6470,12 @@ function createTableStructHandlers(input) {
6491
6470
  }
6492
6471
  const td = selectedElement.tableData;
6493
6472
  const colIdx = ts?.columnIndex ?? 0;
6494
- const newTableData = chunkKDJBWJJH_js.deleteTableColumn(td, colIdx);
6473
+ const newTableData = chunkPJUQQF3I_js.deleteTableColumn(td, colIdx);
6495
6474
  if (newTableData === td) {
6496
6475
  return;
6497
6476
  }
6498
6477
  const updates = { tableData: newTableData };
6499
- const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6478
+ const newRawXml = chunkPJUQQF3I_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6500
6479
  if (newRawXml) {
6501
6480
  updates.rawXml = newRawXml;
6502
6481
  }
@@ -6532,8 +6511,8 @@ async function renderToCanvas(element, options = {}) {
6532
6511
  return html2canvasPro(element, {
6533
6512
  ...options,
6534
6513
  onclone: async (doc, clonedEl) => {
6535
- await chunkKDJBWJJH_js.normalizeColorsForCapture(doc, clonedEl);
6536
- chunkKDJBWJJH_js.preprocessCssForCapture(clonedEl);
6514
+ await chunkPJUQQF3I_js.normalizeColorsForCapture(doc, clonedEl);
6515
+ chunkPJUQQF3I_js.preprocessCssForCapture(clonedEl);
6537
6516
  if (typeof userOnClone === "function") {
6538
6517
  userOnClone(doc, clonedEl);
6539
6518
  }
@@ -6589,7 +6568,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6589
6568
  }
6590
6569
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6591
6570
  const blob = await exportSlideToPngBlob(slideElement, options);
6592
- chunkKDJBWJJH_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6571
+ chunkPJUQQF3I_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6593
6572
  }
6594
6573
  async function copySlideToClipboard(slideElement, options = {}) {
6595
6574
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6611,15 +6590,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6611
6590
  continue;
6612
6591
  }
6613
6592
  const canvas = await renderElementToCanvas(stageEl, scale);
6614
- images.push(chunkKDJBWJJH_js.canvasToJpegData(canvas));
6593
+ images.push(chunkPJUQQF3I_js.canvasToJpegData(canvas));
6615
6594
  }
6616
6595
  onProgress?.(totalSlides, totalSlides);
6617
6596
  setActiveSlide(currentSlideIndex);
6618
6597
  if (images.length === 0) {
6619
- throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6598
+ throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6620
6599
  }
6621
- const pdfBlobUrl = chunkFAP6OPLL_js.buildPdfFromImageData(images);
6622
- chunkKDJBWJJH_js.downloadDataUrl(pdfBlobUrl, filename);
6600
+ const pdfBlobUrl = chunk2VUHJNWM_js.buildPdfFromImageData(images);
6601
+ chunkPJUQQF3I_js.downloadDataUrl(pdfBlobUrl, filename);
6623
6602
  }
6624
6603
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6625
6604
  const { scale = 2, onProgress } = options;
@@ -6665,10 +6644,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6665
6644
  onProgress?.(totalSlides, totalSlides);
6666
6645
  setActiveSlide(currentSlideIndex);
6667
6646
  if (pages.length === 0) {
6668
- throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6647
+ throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6669
6648
  }
6670
- const pdfDataUrl = chunkFAP6OPLL_js.buildNotesPdf(pages);
6671
- chunkKDJBWJJH_js.downloadDataUrl(pdfDataUrl, filename);
6649
+ const pdfDataUrl = chunk2VUHJNWM_js.buildNotesPdf(pages);
6650
+ chunkPJUQQF3I_js.downloadDataUrl(pdfDataUrl, filename);
6672
6651
  }
6673
6652
 
6674
6653
  // src/viewer/utils/export-video.ts
@@ -6699,7 +6678,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6699
6678
  }
6700
6679
  setActiveSlide(currentSlideIndex);
6701
6680
  if (slideCanvases.length === 0) {
6702
- throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6681
+ throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6703
6682
  }
6704
6683
  const firstCanvas = slideCanvases[0];
6705
6684
  const recordingCanvas = document.createElement("canvas");
@@ -6707,12 +6686,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6707
6686
  recordingCanvas.height = firstCanvas.height;
6708
6687
  const ctx = recordingCanvas.getContext("2d");
6709
6688
  if (!ctx) {
6710
- throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNo2dContext"]);
6689
+ throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNo2dContext"]);
6711
6690
  }
6712
6691
  const fps = 30;
6713
6692
  const stream = recordingCanvas.captureStream(fps);
6714
6693
  const recorder = new MediaRecorder(stream, {
6715
- mimeType: chunkKDJBWJJH_js.pickSupportedMimeType([...chunkKDJBWJJH_js.WEBM_MIME_CANDIDATES]),
6694
+ mimeType: chunkPJUQQF3I_js.pickSupportedMimeType([...chunkPJUQQF3I_js.WEBM_MIME_CANDIDATES]),
6716
6695
  videoBitsPerSecond: 5e6
6717
6696
  });
6718
6697
  const chunks = [];
@@ -6735,8 +6714,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6735
6714
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6736
6715
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6737
6716
  ctx.drawImage(slideCanvases[i], 0, 0);
6738
- const frameInterval = chunkKDJBWJJH_js.fpsToFrameIntervalMs(fps);
6739
- const framesNeeded = chunkKDJBWJJH_js.segmentFrameCount(duration, fps);
6717
+ const frameInterval = chunkPJUQQF3I_js.fpsToFrameIntervalMs(fps);
6718
+ const framesNeeded = chunkPJUQQF3I_js.segmentFrameCount(duration, fps);
6740
6719
  for (let f = 0; f < framesNeeded; f++) {
6741
6720
  if (signal?.aborted) {
6742
6721
  recorder.stop();
@@ -6783,9 +6762,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6783
6762
  }
6784
6763
  setActiveSlide(currentSlideIndex);
6785
6764
  if (frames.length === 0) {
6786
- throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6765
+ throw new Error(chunk3GNSGGY2_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6787
6766
  }
6788
- const gifBytes = chunkKDJBWJJH_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6767
+ const gifBytes = chunkPJUQQF3I_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6789
6768
  onProgress?.(totalSlides, totalSlides);
6790
6769
  const buf = new ArrayBuffer(gifBytes.length);
6791
6770
  new Uint8Array(buf).set(gifBytes);
@@ -6839,7 +6818,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6839
6818
  continue;
6840
6819
  }
6841
6820
  onProgress?.(processedCount, data.slides.length);
6842
- let svg = chunkKDJBWJJH_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6821
+ let svg = chunkPJUQQF3I_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6843
6822
  if (embedFonts && fontFaces?.length) {
6844
6823
  svg = injectFontFaces(svg, fontFaces);
6845
6824
  }
@@ -6899,7 +6878,7 @@ function useExportSaveAs(input) {
6899
6878
  }
6900
6879
  setExportProgress(70);
6901
6880
  setExportStatusMessage("Writing README...");
6902
- const readme = chunkKDJBWJJH_js.generatePackageReadme(pptxFilename);
6881
+ const readme = chunkPJUQQF3I_js.generatePackageReadme(pptxFilename);
6903
6882
  pkgFolder.file("README.txt", readme);
6904
6883
  if (abortCtrl.signal.aborted) {
6905
6884
  throw new DOMException("Export cancelled", "AbortError");
@@ -6910,7 +6889,7 @@ function useExportSaveAs(input) {
6910
6889
  setExportProgress(95);
6911
6890
  setExportStatusMessage("Downloading...");
6912
6891
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6913
- chunkKDJBWJJH_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6892
+ chunkPJUQQF3I_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6914
6893
  setExportProgress(100);
6915
6894
  } catch (err) {
6916
6895
  if (err.name !== "AbortError") {
@@ -6933,7 +6912,7 @@ function useExportSaveAs(input) {
6933
6912
  const blob = new Blob([data], {
6934
6913
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6935
6914
  });
6936
- chunkKDJBWJJH_js.downloadBlob(blob, `${baseName}.${ext}`);
6915
+ chunkPJUQQF3I_js.downloadBlob(blob, `${baseName}.${ext}`);
6937
6916
  } catch (err) {
6938
6917
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6939
6918
  }
@@ -6946,14 +6925,14 @@ function useExportSaveAs(input) {
6946
6925
  const pptxGuides = guides.map((g) => ({
6947
6926
  id: g.id,
6948
6927
  orientation: g.axis === "h" ? "horz" : "vert",
6949
- positionEmu: chunkKDJBWJJH_js.guidePxToEmu(g.position)
6928
+ positionEmu: chunkPJUQQF3I_js.guidePxToEmu(g.position)
6950
6929
  }));
6951
6930
  return {
6952
6931
  ...slide,
6953
6932
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6954
6933
  };
6955
6934
  });
6956
- const slidesToSave = chunkFAP6OPLL_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6935
+ const slidesToSave = chunk2VUHJNWM_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6957
6936
  const saveOptions = {
6958
6937
  headerFooter,
6959
6938
  presentationProperties,
@@ -7010,7 +6989,7 @@ function safeConfirm(message) {
7010
6989
  }
7011
6990
  }
7012
6991
  function downloadBlob2(blob, filename) {
7013
- chunkKDJBWJJH_js.downloadBlob(blob, chunkKDJBWJJH_js.sanitizeDownloadFilename(filename));
6992
+ chunkPJUQQF3I_js.downloadBlob(blob, chunkPJUQQF3I_js.sanitizeDownloadFilename(filename));
7014
6993
  }
7015
6994
 
7016
6995
  // src/viewer/hooks/useExportHandlers.ts
@@ -7111,21 +7090,21 @@ function useExportHandlers(input) {
7111
7090
  {
7112
7091
  scale: 2,
7113
7092
  onProgress: (current, total) => {
7114
- setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total));
7115
- setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Rendering", current, total));
7093
+ setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total));
7094
+ setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Rendering", current, total));
7116
7095
  },
7117
7096
  signal: abortCtrl.signal
7118
7097
  }
7119
7098
  );
7120
- setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7099
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7121
7100
  setExportStatusMessage("Building PDF...");
7122
7101
  await new Promise((r) => {
7123
7102
  setTimeout(r, 100);
7124
7103
  });
7125
- setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7104
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7126
7105
  setExportStatusMessage("Done!");
7127
7106
  } catch (err) {
7128
- if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7107
+ if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7129
7108
  console.error("[PowerPointViewer] PDF export failed:", err);
7130
7109
  }
7131
7110
  } finally {
@@ -7155,21 +7134,21 @@ function useExportHandlers(input) {
7155
7134
  {
7156
7135
  scale: 2,
7157
7136
  onProgress: (current, total) => {
7158
- setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total));
7159
- setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Rendering", current, total));
7137
+ setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total));
7138
+ setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Rendering", current, total));
7160
7139
  },
7161
7140
  signal: abortCtrl.signal
7162
7141
  }
7163
7142
  );
7164
- setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7143
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7165
7144
  setExportStatusMessage("Building PDF...");
7166
7145
  await new Promise((r) => {
7167
7146
  setTimeout(r, 100);
7168
7147
  });
7169
- setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7148
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7170
7149
  setExportStatusMessage("Done!");
7171
7150
  } catch (err) {
7172
- if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7151
+ if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7173
7152
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7174
7153
  }
7175
7154
  } finally {
@@ -7210,22 +7189,22 @@ function useExportHandlers(input) {
7210
7189
  scale: 1,
7211
7190
  slideDurationMs: 3e3,
7212
7191
  onProgress: (current, total) => {
7213
- setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total, 45));
7214
- setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Capturing", current, total));
7192
+ setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total, 45));
7193
+ setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Capturing", current, total));
7215
7194
  },
7216
7195
  onRecordProgress: (current, total) => {
7217
- setExportProgress(chunkKDJBWJJH_js.recordProgressPercent(current, total));
7218
- setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Recording", current, total));
7196
+ setExportProgress(chunkPJUQQF3I_js.recordProgressPercent(current, total));
7197
+ setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Recording", current, total));
7219
7198
  },
7220
7199
  signal: abortCtrl.signal
7221
7200
  }
7222
7201
  );
7223
- setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7202
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7224
7203
  setExportStatusMessage("Saving file...");
7225
7204
  downloadBlob2(blob, "presentation.webm");
7226
- setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7205
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7227
7206
  } catch (err) {
7228
- if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7207
+ if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7229
7208
  console.error("[PowerPointViewer] Video export failed:", err);
7230
7209
  }
7231
7210
  } finally {
@@ -7253,18 +7232,18 @@ function useExportHandlers(input) {
7253
7232
  scale: 0.5,
7254
7233
  slideDurationMs: 2e3,
7255
7234
  onProgress: (current, total) => {
7256
- setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total));
7257
- setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Encoding", current, total));
7235
+ setExportProgress(chunkPJUQQF3I_js.slideProgressPercent(current, total));
7236
+ setExportStatusMessage(chunkPJUQQF3I_js.slideStatusLabel("Encoding", current, total));
7258
7237
  },
7259
7238
  signal: abortCtrl.signal
7260
7239
  }
7261
7240
  );
7262
- setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7241
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_ASSEMBLING_PERCENT);
7263
7242
  setExportStatusMessage("Saving file...");
7264
7243
  downloadBlob2(blob, "presentation.gif");
7265
- setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7244
+ setExportProgress(chunkPJUQQF3I_js.EXPORT_DONE_PERCENT);
7266
7245
  } catch (err) {
7267
- if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7246
+ if (!chunkPJUQQF3I_js.isExportAbortError(err)) {
7268
7247
  console.error("[PowerPointViewer] GIF export failed:", err);
7269
7248
  }
7270
7249
  } finally {
@@ -7304,7 +7283,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7304
7283
  }
7305
7284
  printWindow.document.open();
7306
7285
  printWindow.document.write(
7307
- chunkKDJBWJJH_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7286
+ chunkPJUQQF3I_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7308
7287
  );
7309
7288
  printWindow.document.close();
7310
7289
  printWindow.focus();
@@ -7365,7 +7344,7 @@ function usePrintHandlers(input) {
7365
7344
  if (svgs.length === 0) {
7366
7345
  return;
7367
7346
  }
7368
- const printDoc = chunkKDJBWJJH_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7347
+ const printDoc = chunkPJUQQF3I_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7369
7348
  title: "Slides (Vector)",
7370
7349
  orientation: settings.orientation,
7371
7350
  colorFilter
@@ -7401,7 +7380,7 @@ function usePrintHandlers(input) {
7401
7380
  if (settings.printWhat === "outline") {
7402
7381
  openPrintWindow(
7403
7382
  "Outline",
7404
- `<div class="outline-page">${chunkKDJBWJJH_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7383
+ `<div class="outline-page">${chunkPJUQQF3I_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7405
7384
  settings.orientation,
7406
7385
  colorFilter,
7407
7386
  settings.frameSlides
@@ -7426,7 +7405,7 @@ function usePrintHandlers(input) {
7426
7405
  if (settings.printWhat === "slides") {
7427
7406
  openPrintWindow(
7428
7407
  "Slides",
7429
- chunkKDJBWJJH_js.buildSlidesHtml(slideImages, slideIndices),
7408
+ chunkPJUQQF3I_js.buildSlidesHtml(slideImages, slideIndices),
7430
7409
  settings.orientation,
7431
7410
  colorFilter,
7432
7411
  settings.frameSlides
@@ -7436,7 +7415,7 @@ function usePrintHandlers(input) {
7436
7415
  if (settings.printWhat === "notes") {
7437
7416
  openPrintWindow(
7438
7417
  "Notes Pages",
7439
- chunkKDJBWJJH_js.buildNotesHtml(slideImages, slideIndices, slides),
7418
+ chunkPJUQQF3I_js.buildNotesHtml(slideImages, slideIndices, slides),
7440
7419
  "portrait",
7441
7420
  colorFilter,
7442
7421
  settings.frameSlides
@@ -7447,7 +7426,7 @@ function usePrintHandlers(input) {
7447
7426
  const spp = settings.slidesPerPage;
7448
7427
  openPrintWindow(
7449
7428
  `Handout ${spp} per page`,
7450
- chunkKDJBWJJH_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7429
+ chunkPJUQQF3I_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7451
7430
  "portrait",
7452
7431
  colorFilter,
7453
7432
  settings.frameSlides
@@ -7511,8 +7490,8 @@ function useThemeHandlers(input) {
7511
7490
  return;
7512
7491
  }
7513
7492
  await handler.updateThemeColorScheme(colorScheme);
7514
- const previousMap = theme?.colorScheme ? chunkKDJBWJJH_js.buildThemeColorMap(theme.colorScheme) : {};
7515
- setSlides((prev) => chunkKDJBWJJH_js.reResolveSlideColors(prev, previousMap, colorScheme));
7493
+ const previousMap = theme?.colorScheme ? chunkPJUQQF3I_js.buildThemeColorMap(theme.colorScheme) : {};
7494
+ setSlides((prev) => chunkPJUQQF3I_js.reResolveSlideColors(prev, previousMap, colorScheme));
7516
7495
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7517
7496
  bumpHistory();
7518
7497
  history.markDirty();
@@ -7617,7 +7596,7 @@ function useThemeSwitching(input) {
7617
7596
  }
7618
7597
  try {
7619
7598
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7620
- const newData = chunkKDJBWJJH_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7599
+ const newData = chunkPJUQQF3I_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7621
7600
  onDataChange(newData);
7622
7601
  onThemeChanged?.(preset);
7623
7602
  } catch (error) {
@@ -7634,7 +7613,7 @@ function useThemeSwitching(input) {
7634
7613
  }
7635
7614
  try {
7636
7615
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7637
- const newData = chunkKDJBWJJH_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7616
+ const newData = chunkPJUQQF3I_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7638
7617
  onDataChange(newData);
7639
7618
  } catch (error) {
7640
7619
  console.error("Failed to switch to custom theme:", error);
@@ -7646,12 +7625,12 @@ function useThemeSwitching(input) {
7646
7625
  if (!data?.theme?.colorScheme) {
7647
7626
  return void 0;
7648
7627
  }
7649
- return chunkKDJBWJJH_js.THEME_PRESETS.find(
7650
- (p) => chunkKDJBWJJH_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7628
+ return chunkPJUQQF3I_js.THEME_PRESETS.find(
7629
+ (p) => chunkPJUQQF3I_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7651
7630
  );
7652
7631
  }, [data?.theme?.colorScheme]);
7653
7632
  return {
7654
- presets: chunkKDJBWJJH_js.THEME_PRESETS,
7633
+ presets: chunkPJUQQF3I_js.THEME_PRESETS,
7655
7634
  switchToPreset,
7656
7635
  switchToCustom,
7657
7636
  currentPreset
@@ -7726,7 +7705,7 @@ function usePropertyHandlers(input) {
7726
7705
  }
7727
7706
  try {
7728
7707
  const ab = await file.arrayBuffer();
7729
- const h = new chunkKDJBWJJH_js.PptxHandler();
7708
+ const h = new chunkPJUQQF3I_js.PptxHandler();
7730
7709
  const other = await h.load(ab);
7731
7710
  if (!other) {
7732
7711
  return;
@@ -7736,7 +7715,7 @@ function usePropertyHandlers(input) {
7736
7715
  width: canvasSize.width,
7737
7716
  height: canvasSize.height
7738
7717
  };
7739
- setCompareResult(chunkKDJBWJJH_js.comparePresentation(cur, other));
7718
+ setCompareResult(chunkPJUQQF3I_js.comparePresentation(cur, other));
7740
7719
  setIsComparePanelOpen(true);
7741
7720
  } catch (err) {
7742
7721
  console.warn("Compare failed:", err);
@@ -7753,7 +7732,7 @@ function usePropertyHandlers(input) {
7753
7732
  if (!diff || diff.status === "unchanged") {
7754
7733
  return;
7755
7734
  }
7756
- setSlides((prev) => chunkKDJBWJJH_js.applyAcceptSlide(prev, diff));
7735
+ setSlides((prev) => chunkPJUQQF3I_js.applyAcceptSlide(prev, diff));
7757
7736
  setIsDirty(true);
7758
7737
  },
7759
7738
  [compareResult, setSlides, setIsDirty]
@@ -7764,10 +7743,10 @@ function usePropertyHandlers(input) {
7764
7743
  if (!compareResult) {
7765
7744
  return;
7766
7745
  }
7767
- setSlides((prev) => chunkKDJBWJJH_js.applyAcceptAllSlides(prev, compareResult));
7746
+ setSlides((prev) => chunkPJUQQF3I_js.applyAcceptAllSlides(prev, compareResult));
7768
7747
  setIsDirty(true);
7769
7748
  }, [compareResult, setSlides, setIsDirty]);
7770
- const usedFontFamilies = react.useMemo(() => chunkKDJBWJJH_js.collectUsedFonts(slides), [slides]);
7749
+ const usedFontFamilies = react.useMemo(() => chunkPJUQQF3I_js.collectUsedFonts(slides), [slides]);
7771
7750
  return {
7772
7751
  handleUpdateNotes,
7773
7752
  handleUpdateSlide,
@@ -7886,7 +7865,7 @@ function useIsMobile(input) {
7886
7865
  const containerRef = input?.containerRef;
7887
7866
  const isTouchDevice = react.useSyncExternalStore(
7888
7867
  subscribeTouchCapability,
7889
- chunkKDJBWJJH_js.detectTouchDevice,
7868
+ chunkPJUQQF3I_js.detectTouchDevice,
7890
7869
  () => false
7891
7870
  // server snapshot
7892
7871
  );
@@ -7902,7 +7881,7 @@ function useIsMobile(input) {
7902
7881
  }
7903
7882
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7904
7883
  });
7905
- const [orientation, setOrientation] = react.useState(chunkKDJBWJJH_js.detectOrientation);
7884
+ const [orientation, setOrientation] = react.useState(chunkPJUQQF3I_js.detectOrientation);
7906
7885
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7907
7886
  const [initialViewportHeight] = react.useState(
7908
7887
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7946,7 +7925,7 @@ function useIsMobile(input) {
7946
7925
  return;
7947
7926
  }
7948
7927
  const handleOrientationChange = () => {
7949
- setOrientation(chunkKDJBWJJH_js.detectOrientation());
7928
+ setOrientation(chunkPJUQQF3I_js.detectOrientation());
7950
7929
  };
7951
7930
  if (screen.orientation) {
7952
7931
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7976,9 +7955,9 @@ function useIsMobile(input) {
7976
7955
  window.addEventListener("resize", handleResize);
7977
7956
  return () => window.removeEventListener("resize", handleResize);
7978
7957
  }, [isTouchDevice, initialViewportHeight]);
7979
- const isMobile = chunkKDJBWJJH_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7980
- const isTablet = !isMobile && containerWidth >= chunkKDJBWJJH_js.MOBILE_BREAKPOINT && containerWidth < chunkKDJBWJJH_js.TABLET_BREAKPOINT;
7981
- const isDesktop = !isMobile && containerWidth >= chunkKDJBWJJH_js.TABLET_BREAKPOINT;
7958
+ const isMobile = chunkPJUQQF3I_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7959
+ const isTablet = !isMobile && containerWidth >= chunkPJUQQF3I_js.MOBILE_BREAKPOINT && containerWidth < chunkPJUQQF3I_js.TABLET_BREAKPOINT;
7960
+ const isDesktop = !isMobile && containerWidth >= chunkPJUQQF3I_js.TABLET_BREAKPOINT;
7982
7961
  return {
7983
7962
  isMobile,
7984
7963
  isTablet,
@@ -8039,11 +8018,11 @@ function useViewerDialogs(input) {
8039
8018
  );
8040
8019
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8041
8020
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8042
- () => typeof window !== "undefined" ? chunkKDJBWJJH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8021
+ () => typeof window !== "undefined" ? chunkPJUQQF3I_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8043
8022
  );
8044
8023
  react.useEffect(() => {
8045
8024
  const handleWindow = () => setIsNarrowViewport(
8046
- chunkKDJBWJJH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8025
+ chunkPJUQQF3I_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8047
8026
  );
8048
8027
  let observer = null;
8049
8028
  let raf = 0;
@@ -8057,12 +8036,12 @@ function useViewerDialogs(input) {
8057
8036
  const entry = entries[0];
8058
8037
  if (entry) {
8059
8038
  setIsNarrowViewport(
8060
- chunkKDJBWJJH_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8039
+ chunkPJUQQF3I_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8061
8040
  );
8062
8041
  }
8063
8042
  });
8064
8043
  observer.observe(el);
8065
- setIsNarrowViewport(chunkKDJBWJJH_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8044
+ setIsNarrowViewport(chunkPJUQQF3I_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8066
8045
  };
8067
8046
  attach();
8068
8047
  window.addEventListener("resize", handleWindow);
@@ -8220,20 +8199,20 @@ function useViewerDialogs(input) {
8220
8199
  }
8221
8200
  function computeGridSpacingPx(presentationGridSpacing) {
8222
8201
  if (presentationGridSpacing) {
8223
- const px = Math.round(presentationGridSpacing.cx / chunkFAP6OPLL_js.EMU_PER_PX);
8202
+ const px = Math.round(presentationGridSpacing.cx / chunk2VUHJNWM_js.EMU_PER_PX);
8224
8203
  if (px > 0) {
8225
8204
  return px;
8226
8205
  }
8227
8206
  }
8228
- return chunkFAP6OPLL_js.GRID_SIZE;
8207
+ return chunk2VUHJNWM_js.GRID_SIZE;
8229
8208
  }
8230
8209
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8231
8210
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8232
- return chunkKDJBWJJH_js.resolveShowSlideIndexes(slides, activeShow);
8211
+ return chunkPJUQQF3I_js.resolveShowSlideIndexes(slides, activeShow);
8233
8212
  }
8234
8213
  function computeSlideSectionGroups(slides, sections) {
8235
- return chunkKDJBWJJH_js.groupSlidesBySection(sections, slides).map((group) => ({
8236
- id: group.section?.id ?? (sections.length > 0 ? chunkFAP6OPLL_js.UNGROUPED_SECTION_ID : "default"),
8214
+ return chunkPJUQQF3I_js.groupSlidesBySection(sections, slides).map((group) => ({
8215
+ id: group.section?.id ?? (sections.length > 0 ? chunk2VUHJNWM_js.UNGROUPED_SECTION_ID : "default"),
8237
8216
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8238
8217
  slideIndexes: group.slideIndexes,
8239
8218
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8288,7 +8267,7 @@ function useDerivedSlideState(input) {
8288
8267
  );
8289
8268
  const slideSectionGroups = react.useMemo(
8290
8269
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8291
- if (group.id === chunkFAP6OPLL_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8270
+ if (group.id === chunk2VUHJNWM_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8292
8271
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8293
8272
  }
8294
8273
  if (group.id === "default" && group.label === "Slides") {
@@ -8391,13 +8370,13 @@ function useAnnotationHandlers(input) {
8391
8370
  }, [annotations, setMode, setSlides, history]);
8392
8371
  const handleSetMode = react.useCallback(
8393
8372
  (nextMode) => {
8394
- if (mode === "present" && nextMode !== "present" && !chunkKDJBWJJH_js.mayLeaveSlideShow()) {
8373
+ if (mode === "present" && nextMode !== "present" && !chunkPJUQQF3I_js.mayLeaveSlideShow()) {
8395
8374
  return;
8396
8375
  }
8397
8376
  if (nextMode === "present") {
8398
8377
  presentation.enterPresentMode();
8399
8378
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8400
- chunkFAP6OPLL_js.stopAllPersistentAudio();
8379
+ chunk2VUHJNWM_js.stopAllPersistentAudio();
8401
8380
  pendingModeAfterAnnotationsRef.current = nextMode;
8402
8381
  if (promptKeepInkAnnotations) {
8403
8382
  setShowKeepAnnotationsDialog(true);
@@ -8406,7 +8385,7 @@ function useAnnotationHandlers(input) {
8406
8385
  }
8407
8386
  } else {
8408
8387
  if (mode === "present") {
8409
- chunkFAP6OPLL_js.stopAllPersistentAudio();
8388
+ chunk2VUHJNWM_js.stopAllPersistentAudio();
8410
8389
  }
8411
8390
  setMode(nextMode);
8412
8391
  }
@@ -8472,13 +8451,13 @@ function useSerialize(input) {
8472
8451
  let processedSlide = slide;
8473
8452
  if (pendingEditId) {
8474
8453
  const updatedElements = slide.elements.map((el) => {
8475
- if (el.id !== pendingEditId || !chunkKDJBWJJH_js.hasTextProperties(el)) {
8454
+ if (el.id !== pendingEditId || !chunkPJUQQF3I_js.hasTextProperties(el)) {
8476
8455
  return el;
8477
8456
  }
8478
8457
  return {
8479
8458
  ...el,
8480
8459
  text: pendingEditText,
8481
- textSegments: chunkKDJBWJJH_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8460
+ textSegments: chunkPJUQQF3I_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8482
8461
  };
8483
8462
  });
8484
8463
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8491,14 +8470,14 @@ function useSerialize(input) {
8491
8470
  const pptxGuides = guides.map((g) => ({
8492
8471
  id: g.id,
8493
8472
  orientation: g.axis === "h" ? "horz" : "vert",
8494
- positionEmu: chunkKDJBWJJH_js.guidePxToEmu(g.position)
8473
+ positionEmu: chunkPJUQQF3I_js.guidePxToEmu(g.position)
8495
8474
  }));
8496
8475
  return {
8497
8476
  ...processedSlide,
8498
8477
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8499
8478
  };
8500
8479
  });
8501
- const slidesToSave = chunkFAP6OPLL_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8480
+ const slidesToSave = chunk2VUHJNWM_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8502
8481
  const saveOptions = {
8503
8482
  headerFooter,
8504
8483
  presentationProperties,
@@ -8667,7 +8646,7 @@ function usePresentationSetup(input) {
8667
8646
  containerRef,
8668
8647
  content,
8669
8648
  onSetMode: (nextMode) => {
8670
- if (mode === "present" && nextMode !== "present" && !chunkKDJBWJJH_js.mayLeaveSlideShow()) {
8649
+ if (mode === "present" && nextMode !== "present" && !chunkPJUQQF3I_js.mayLeaveSlideShow()) {
8671
8650
  return;
8672
8651
  }
8673
8652
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8675,7 +8654,7 @@ function usePresentationSetup(input) {
8675
8654
  setShowKeepAnnotationsDialog(true);
8676
8655
  } else {
8677
8656
  if (mode === "present" && nextMode !== "present") {
8678
- chunkFAP6OPLL_js.stopAllPersistentAudio();
8657
+ chunk2VUHJNWM_js.stopAllPersistentAudio();
8679
8658
  stopAnimationSound();
8680
8659
  }
8681
8660
  setMode(nextMode);
@@ -8729,10 +8708,10 @@ function usePresentationSetup(input) {
8729
8708
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8730
8709
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8731
8710
  onSaveRehearsalTimings: (timings) => {
8732
- setSlides((prev) => chunkKDJBWJJH_js.applyRehearsalTimings(prev, timings));
8711
+ setSlides((prev) => chunkPJUQQF3I_js.applyRehearsalTimings(prev, timings));
8733
8712
  history.markDirty();
8734
8713
  },
8735
- loopContinuously: chunkKDJBWJJH_js.shouldLoopContinuously(presentationProperties),
8714
+ loopContinuously: chunkPJUQQF3I_js.shouldLoopContinuously(presentationProperties),
8736
8715
  showWithAnimation: presentationProperties.showWithAnimation,
8737
8716
  useTimings: presentationProperties.advanceMode !== "manual",
8738
8717
  endWithBlackSlide
@@ -8894,7 +8873,7 @@ function useEditorOperations(input) {
8894
8873
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8895
8874
  react.useEffect(() => {
8896
8875
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8897
- copiedFormatRef.current = chunkKDJBWJJH_js.copyFormatFromElement(selectedElement);
8876
+ copiedFormatRef.current = chunkPJUQQF3I_js.copyFormatFromElement(selectedElement);
8898
8877
  } else if (!formatPainterActive) {
8899
8878
  copiedFormatRef.current = null;
8900
8879
  }
@@ -8920,12 +8899,12 @@ function useEditorOperations(input) {
8920
8899
  e.stopPropagation();
8921
8900
  const element = elementLookup.get(elementId);
8922
8901
  if (element) {
8923
- const updated = chunkKDJBWJJH_js.applyFormatToElement(element, copiedFormatRef.current);
8902
+ const updated = chunkPJUQQF3I_js.applyFormatToElement(element, copiedFormatRef.current);
8924
8903
  const updates = {};
8925
- if (chunkKDJBWJJH_js.hasShapeProperties(updated)) {
8904
+ if (chunkPJUQQF3I_js.hasShapeProperties(updated)) {
8926
8905
  updates.shapeStyle = updated.shapeStyle;
8927
8906
  }
8928
- if (chunkKDJBWJJH_js.hasTextProperties(updated)) {
8907
+ if (chunkPJUQQF3I_js.hasTextProperties(updated)) {
8929
8908
  updates.textStyle = updated.textStyle;
8930
8909
  }
8931
8910
  ops.updateElementById(elementId, updates);
@@ -9072,7 +9051,7 @@ function collectReferencedFontFamilies(slides) {
9072
9051
  const families = /* @__PURE__ */ new Set();
9073
9052
  for (const slide of slides) {
9074
9053
  for (const el of slide.elements) {
9075
- if (chunkKDJBWJJH_js.hasTextProperties(el) && el.textSegments) {
9054
+ if (chunkPJUQQF3I_js.hasTextProperties(el) && el.textSegments) {
9076
9055
  for (const seg of el.textSegments) {
9077
9056
  if (seg.style.fontFamily) {
9078
9057
  families.add(seg.style.fontFamily);
@@ -9284,13 +9263,13 @@ function useKeyboardShortcuts(input) {
9284
9263
  inputRef.current = input;
9285
9264
  const handleKeyDown = react.useCallback((e) => {
9286
9265
  const current = inputRef.current;
9287
- const { action, dx, dy } = chunkKDJBWJJH_js.mapEditorKey(e, {
9266
+ const { action, dx, dy } = chunkPJUQQF3I_js.mapEditorKey(e, {
9288
9267
  canEdit: current.canEdit,
9289
9268
  isPresenting: current.mode !== "edit",
9290
9269
  hasSelection: current.hasSelection,
9291
9270
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9292
9271
  isDrawing: current.activeTool !== "select",
9293
- isTextInputTarget: chunkKDJBWJJH_js.isEditorTextInputTarget(e.target)
9272
+ isTextInputTarget: chunkPJUQQF3I_js.isEditorTextInputTarget(e.target)
9294
9273
  });
9295
9274
  if (action === null) {
9296
9275
  return;
@@ -9583,7 +9562,7 @@ function useViewerIntegration(input) {
9583
9562
  return zoom.scale;
9584
9563
  },
9585
9564
  setZoom(level) {
9586
- zoom.setScale(chunkKDJBWJJH_js.clampZoomScale(level));
9565
+ zoom.setScale(chunkPJUQQF3I_js.clampZoomScale(level));
9587
9566
  },
9588
9567
  zoomIn() {
9589
9568
  zoom.handleZoomIn();
@@ -9798,7 +9777,7 @@ function useReducedMotion() {
9798
9777
  }
9799
9778
  function useViewerOptions() {
9800
9779
  const storeRef = react.useRef(null);
9801
- storeRef.current ??= chunkKDJBWJJH_js.createViewerOptionsStore();
9780
+ storeRef.current ??= chunkPJUQQF3I_js.createViewerOptionsStore();
9802
9781
  const store = storeRef.current;
9803
9782
  const options = react.useSyncExternalStore(
9804
9783
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9807,9 +9786,9 @@ function useViewerOptions() {
9807
9786
  );
9808
9787
  return { optionsStore: store, options };
9809
9788
  }
9810
- var KNOWN_TAB_IDS = new Set(chunkKDJBWJJH_js.TOOLBAR_TABS.map((tab) => tab.id));
9789
+ var KNOWN_TAB_IDS = new Set(chunkPJUQQF3I_js.TOOLBAR_TABS.map((tab) => tab.id));
9811
9790
  function computeToolbarVisibility(hiddenActions) {
9812
- const isHidden = (id) => chunkKDJBWJJH_js.isActionHidden(id, hiddenActions);
9791
+ const isHidden = (id) => chunkPJUQQF3I_js.isActionHidden(id, hiddenActions);
9813
9792
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9814
9793
  return { isHidden, isTabVisible };
9815
9794
  }
@@ -9894,12 +9873,12 @@ function useYjsDocumentSync({
9894
9873
  return;
9895
9874
  }
9896
9875
  try {
9897
- const handler = new chunkKDJBWJJH_js.PptxHandler();
9876
+ const handler = new chunkPJUQQF3I_js.PptxHandler();
9898
9877
  await handler.load(sourceBytes.buffer);
9899
- const currentSlides = chunkKDJBWJJH_js.readSlidesFromYDoc(
9878
+ const currentSlides = chunkPJUQQF3I_js.readSlidesFromYDoc(
9900
9879
  doc
9901
9880
  );
9902
- const slidesToSave = chunkFAP6OPLL_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9881
+ const slidesToSave = chunk2VUHJNWM_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9903
9882
  const bytes = await handler.save(slidesToSave);
9904
9883
  config.onWriteBack(bytes);
9905
9884
  } catch {
@@ -9914,7 +9893,7 @@ function useYjsDocumentSync({
9914
9893
  if (!doc || !isConnected) {
9915
9894
  return;
9916
9895
  }
9917
- const docSlides = chunkKDJBWJJH_js.readSlidesFromYDoc(
9896
+ const docSlides = chunkPJUQQF3I_js.readSlidesFromYDoc(
9918
9897
  doc
9919
9898
  );
9920
9899
  if (docSlides.length === 0) {
@@ -9936,11 +9915,11 @@ function useYjsDocumentSync({
9936
9915
  lastSyncedRef.current = serialized;
9937
9916
  void (async () => {
9938
9917
  const factories = await getFactories();
9939
- chunkKDJBWJJH_js.reconcileSlidesInYDoc(
9918
+ chunkPJUQQF3I_js.reconcileSlidesInYDoc(
9940
9919
  slides,
9941
9920
  doc,
9942
9921
  factories,
9943
- chunkKDJBWJJH_js.LOCAL_SYNC_ORIGIN
9922
+ chunkPJUQQF3I_js.LOCAL_SYNC_ORIGIN
9944
9923
  );
9945
9924
  scheduleWriteBack();
9946
9925
  })();
@@ -9954,10 +9933,10 @@ function useYjsDocumentSync({
9954
9933
  return;
9955
9934
  }
9956
9935
  const handleChange = (_events, transaction) => {
9957
- if (transaction?.origin === chunkKDJBWJJH_js.LOCAL_SYNC_ORIGIN) {
9936
+ if (transaction?.origin === chunkPJUQQF3I_js.LOCAL_SYNC_ORIGIN) {
9958
9937
  return;
9959
9938
  }
9960
- const remoteSlides = chunkKDJBWJJH_js.readSlidesFromYDoc(
9939
+ const remoteSlides = chunkPJUQQF3I_js.readSlidesFromYDoc(
9961
9940
  doc
9962
9941
  );
9963
9942
  if (remoteSlides.length === 0) {
@@ -9973,7 +9952,7 @@ function useYjsDocumentSync({
9973
9952
  isApplyingRemoteRef.current = false;
9974
9953
  scheduleWriteBack();
9975
9954
  };
9976
- const unobserve = chunkKDJBWJJH_js.observeYDocSlides(
9955
+ const unobserve = chunkPJUQQF3I_js.observeYDocSlides(
9977
9956
  doc,
9978
9957
  handleChange
9979
9958
  );
@@ -10011,7 +9990,7 @@ function useBroadcastFollower({
10011
9990
  if (!broadcaster) {
10012
9991
  return;
10013
9992
  }
10014
- if (!chunkKDJBWJJH_js.shouldAutoFollowBroadcaster({
9993
+ if (!chunkPJUQQF3I_js.shouldAutoFollowBroadcaster({
10015
9994
  localRole: collab.config.role,
10016
9995
  broadcasterRole: broadcaster.role
10017
9996
  })) {
@@ -10171,10 +10150,10 @@ function useTouchGestures(input) {
10171
10150
  if (!el || !enabled) {
10172
10151
  return;
10173
10152
  }
10174
- const recognizer = chunkKDJBWJJH_js.createTouchGestureRecognizer({
10153
+ const recognizer = chunkPJUQQF3I_js.createTouchGestureRecognizer({
10175
10154
  getScale: () => scaleRef.current,
10176
- minScale: chunkKDJBWJJH_js.MIN_ZOOM_SCALE,
10177
- maxScale: chunkKDJBWJJH_js.MAX_ZOOM_SCALE,
10155
+ minScale: chunkPJUQQF3I_js.MIN_ZOOM_SCALE,
10156
+ maxScale: chunkPJUQQF3I_js.MAX_ZOOM_SCALE,
10178
10157
  callbacks: {
10179
10158
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10180
10159
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10214,7 +10193,7 @@ function scrollFocusedIntoView(keyboardInset) {
10214
10193
  return;
10215
10194
  }
10216
10195
  const rect = active.getBoundingClientRect();
10217
- const delta = chunkKDJBWJJH_js.computeScrollDelta(
10196
+ const delta = chunkPJUQQF3I_js.computeScrollDelta(
10218
10197
  { top: rect.top, bottom: rect.bottom },
10219
10198
  window.innerHeight,
10220
10199
  keyboardInset
@@ -10234,8 +10213,8 @@ function useKeyboardInsets(enabled = true) {
10234
10213
  return;
10235
10214
  }
10236
10215
  const update = () => {
10237
- const metrics = chunkKDJBWJJH_js.readViewportMetrics(window);
10238
- const inset = metrics ? chunkKDJBWJJH_js.computeKeyboardInset(metrics) : 0;
10216
+ const metrics = chunkPJUQQF3I_js.readViewportMetrics(window);
10217
+ const inset = metrics ? chunkPJUQQF3I_js.computeKeyboardInset(metrics) : 0;
10239
10218
  setKeyboardInset(inset);
10240
10219
  if (inset > 0) {
10241
10220
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10246,8 +10225,8 @@ function useKeyboardInsets(enabled = true) {
10246
10225
  vv.addEventListener("scroll", update);
10247
10226
  const onFocusIn = () => {
10248
10227
  window.requestAnimationFrame(() => {
10249
- const metrics = chunkKDJBWJJH_js.readViewportMetrics(window);
10250
- const inset = metrics ? chunkKDJBWJJH_js.computeKeyboardInset(metrics) : 0;
10228
+ const metrics = chunkPJUQQF3I_js.readViewportMetrics(window);
10229
+ const inset = metrics ? chunkPJUQQF3I_js.computeKeyboardInset(metrics) : 0;
10251
10230
  if (inset > 0) {
10252
10231
  scrollFocusedIntoView(inset);
10253
10232
  }
@@ -10260,7 +10239,7 @@ function useKeyboardInsets(enabled = true) {
10260
10239
  document.removeEventListener("focusin", onFocusIn);
10261
10240
  };
10262
10241
  }, [enabled]);
10263
- return { keyboardInset, isKeyboardOpen: chunkKDJBWJJH_js.isKeyboardOpen(keyboardInset) };
10242
+ return { keyboardInset, isKeyboardOpen: chunkPJUQQF3I_js.isKeyboardOpen(keyboardInset) };
10264
10243
  }
10265
10244
 
10266
10245
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10287,7 +10266,7 @@ function buildCanvasProps(input) {
10287
10266
  } = input;
10288
10267
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10289
10268
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10290
- const fieldContext = chunkKDJBWJJH_js.buildFieldSubstitutionContext({
10269
+ const fieldContext = chunkPJUQQF3I_js.buildFieldSubstitutionContext({
10291
10270
  headerFooter: s.headerFooter,
10292
10271
  customProperties: s.customProperties,
10293
10272
  slide: activeSlide
@@ -10297,13 +10276,13 @@ function buildCanvasProps(input) {
10297
10276
  if (mode === "present") {
10298
10277
  presentation.handlePresentationAction(action);
10299
10278
  } else if (action.url) {
10300
- chunkKDJBWJJH_js.safeOpenUrl(action.url);
10279
+ chunkPJUQQF3I_js.safeOpenUrl(action.url);
10301
10280
  }
10302
10281
  };
10303
10282
  const handleHyperlinkClick = (url) => {
10304
- if (chunkKDJBWJJH_js.isPpactionUrl(url)) {
10283
+ if (chunkPJUQQF3I_js.isPpactionUrl(url)) {
10305
10284
  if (mode === "present") {
10306
- const parsed = chunkKDJBWJJH_js.parsePpactionUrl(url);
10285
+ const parsed = chunkPJUQQF3I_js.parsePpactionUrl(url);
10307
10286
  if (parsed) {
10308
10287
  presentation.handlePresentationAction({
10309
10288
  action: parsed.action,
@@ -10313,7 +10292,7 @@ function buildCanvasProps(input) {
10313
10292
  }
10314
10293
  return;
10315
10294
  }
10316
- chunkKDJBWJJH_js.safeOpenUrl(url);
10295
+ chunkPJUQQF3I_js.safeOpenUrl(url);
10317
10296
  };
10318
10297
  return {
10319
10298
  activeSlide: effectiveSlide,
@@ -10456,7 +10435,7 @@ function buildToolbarAnimationHandlers(input) {
10456
10435
  const current = activeSlide.animations ?? [];
10457
10436
  if (group === "motionPath") {
10458
10437
  propertyHandlers.handleUpdateSlide({
10459
- animations: chunkKDJBWJJH_js.applyMotionPathPreset(current, selectedElement.id, preset)
10438
+ animations: chunkPJUQQF3I_js.applyMotionPathPreset(current, selectedElement.id, preset)
10460
10439
  });
10461
10440
  return;
10462
10441
  }
@@ -10650,7 +10629,7 @@ function buildToolbarProps(input) {
10650
10629
  onOpenFile,
10651
10630
  onOpenRecentFile,
10652
10631
  onCreatePresentation: (templateId) => {
10653
- s.setSlides(chunkKDJBWJJH_js.createBackstagePresentation(templateId));
10632
+ s.setSlides(chunkPJUQQF3I_js.createBackstagePresentation(templateId));
10654
10633
  s.setActiveSlideIndex(0);
10655
10634
  s.setSelectedElementId(null);
10656
10635
  s.setSelectedElementIds([]);
@@ -10707,7 +10686,7 @@ function buildToolbarProps(input) {
10707
10686
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10708
10687
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10709
10688
  formatPainterActive: s.formatPainterActive,
10710
- canActivateFormatPainter: chunkKDJBWJJH_js.hasCopyableFormat(selectedElement),
10689
+ canActivateFormatPainter: chunkPJUQQF3I_js.hasCopyableFormat(selectedElement),
10711
10690
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10712
10691
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10713
10692
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -10976,7 +10955,7 @@ function useViewerBuildingBlocks(input) {
10976
10955
  }, [incomingContent]);
10977
10956
  const onOpenFile = react.useCallback(() => {
10978
10957
  void (async () => {
10979
- const picked = await chunkKDJBWJJH_js.openPptxFile();
10958
+ const picked = await chunkPJUQQF3I_js.openPptxFile();
10980
10959
  if (picked) {
10981
10960
  setContent(picked.buffer);
10982
10961
  }
@@ -10984,7 +10963,7 @@ function useViewerBuildingBlocks(input) {
10984
10963
  }, []);
10985
10964
  const onOpenRecentFile = react.useCallback((key) => {
10986
10965
  void (async () => {
10987
- const bytes = await chunkKDJBWJJH_js.readBackstageRecentFile(key);
10966
+ const bytes = await chunkPJUQQF3I_js.readBackstageRecentFile(key);
10988
10967
  if (bytes) {
10989
10968
  setContent(bytes);
10990
10969
  }