pptx-react-viewer 3.9.0 → 3.10.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 (161) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AiChatPanel-II6VOOAL.mjs → AiChatPanel-BQSUE2OO.mjs} +4 -4
  3. package/dist/AiChatPanel-BQSUE2OO.mjs.br +0 -0
  4. package/dist/AiChatPanel-BQSUE2OO.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-3A42W7RW.js → AiChatPanel-NSVSBJC7.js} +25 -25
  6. package/dist/AiChatPanel-NSVSBJC7.js.br +0 -0
  7. package/dist/AiChatPanel-NSVSBJC7.js.gz +0 -0
  8. package/dist/{Area3DChartScene-JM3CQ3WQ.mjs → Area3DChartScene-2FQHPGNE.mjs} +1 -1
  9. package/dist/{Area3DChartScene-JM3CQ3WQ.mjs.br → Area3DChartScene-2FQHPGNE.mjs.br} +0 -0
  10. package/dist/Area3DChartScene-2FQHPGNE.mjs.gz +0 -0
  11. package/dist/{Area3DChartScene-XJK4ZA4R.js → Area3DChartScene-V3W2V7N5.js} +2 -2
  12. package/dist/{Area3DChartScene-XJK4ZA4R.js.br → Area3DChartScene-V3W2V7N5.js.br} +0 -0
  13. package/dist/Area3DChartScene-V3W2V7N5.js.gz +0 -0
  14. package/dist/{Bar3DChartScene-RGRZY5P6.js → Bar3DChartScene-55XMAUC7.js} +2 -2
  15. package/dist/Bar3DChartScene-55XMAUC7.js.br +0 -0
  16. package/dist/Bar3DChartScene-55XMAUC7.js.gz +0 -0
  17. package/dist/{Bar3DChartScene-VNFWI2QG.mjs → Bar3DChartScene-PSJEVANA.mjs} +1 -1
  18. package/dist/{Bar3DChartScene-VNFWI2QG.mjs.br → Bar3DChartScene-PSJEVANA.mjs.br} +0 -0
  19. package/dist/Bar3DChartScene-PSJEVANA.mjs.gz +0 -0
  20. package/dist/{Line3DChartScene-MEY42DBF.js → Line3DChartScene-5KACYRSQ.js} +2 -2
  21. package/dist/{Line3DChartScene-MEY42DBF.js.br → Line3DChartScene-5KACYRSQ.js.br} +0 -0
  22. package/dist/Line3DChartScene-5KACYRSQ.js.gz +0 -0
  23. package/dist/{Line3DChartScene-GXOWGIFJ.mjs → Line3DChartScene-BUVNUFNO.mjs} +1 -1
  24. package/dist/{Line3DChartScene-GXOWGIFJ.mjs.br → Line3DChartScene-BUVNUFNO.mjs.br} +0 -0
  25. package/dist/Line3DChartScene-BUVNUFNO.mjs.gz +0 -0
  26. package/dist/{Model3DScene-MWXTGHDM.js → Model3DScene-6U6TN36M.js} +2 -2
  27. package/dist/Model3DScene-6U6TN36M.js.br +0 -0
  28. package/dist/Model3DScene-6U6TN36M.js.gz +0 -0
  29. package/dist/{Model3DScene-WJ3MMIZH.mjs → Model3DScene-REKMR2L6.mjs} +1 -1
  30. package/dist/Model3DScene-REKMR2L6.mjs.br +0 -0
  31. package/dist/Model3DScene-REKMR2L6.mjs.gz +0 -0
  32. package/dist/{PieChart3DScene-WXJEDYMK.mjs → PieChart3DScene-4L2VVIUJ.mjs} +1 -1
  33. package/dist/{PieChart3DScene-WXJEDYMK.mjs.br → PieChart3DScene-4L2VVIUJ.mjs.br} +0 -0
  34. package/dist/PieChart3DScene-4L2VVIUJ.mjs.gz +0 -0
  35. package/dist/{PieChart3DScene-FJJGOQIS.js → PieChart3DScene-MV3JF7EM.js} +2 -2
  36. package/dist/{PieChart3DScene-FJJGOQIS.js.br → PieChart3DScene-MV3JF7EM.js.br} +0 -0
  37. package/dist/PieChart3DScene-MV3JF7EM.js.gz +0 -0
  38. package/dist/{SurfaceChart3DScene-IKPE2SVE.mjs → SurfaceChart3DScene-ARE7OBFI.mjs} +1 -1
  39. package/dist/SurfaceChart3DScene-ARE7OBFI.mjs.br +0 -0
  40. package/dist/SurfaceChart3DScene-ARE7OBFI.mjs.gz +0 -0
  41. package/dist/{SurfaceChart3DScene-VDK3F224.js → SurfaceChart3DScene-SFIOK3G3.js} +2 -2
  42. package/dist/{SurfaceChart3DScene-VDK3F224.js.br → SurfaceChart3DScene-SFIOK3G3.js.br} +0 -0
  43. package/dist/SurfaceChart3DScene-SFIOK3G3.js.gz +0 -0
  44. package/dist/{chunk-G3JPCRKN.js → chunk-2Q2NFPXA.js} +70189 -52226
  45. package/dist/chunk-2Q2NFPXA.js.br +0 -0
  46. package/dist/chunk-2Q2NFPXA.js.gz +0 -0
  47. package/dist/{chunk-3NIJ5HIZ.js → chunk-DZ3HWACD.js} +1818 -1279
  48. package/dist/chunk-DZ3HWACD.js.br +0 -0
  49. package/dist/chunk-DZ3HWACD.js.gz +0 -0
  50. package/dist/{chunk-5CPGDXD6.js → chunk-FHOUTYMB.js} +457 -445
  51. package/dist/chunk-FHOUTYMB.js.br +0 -0
  52. package/dist/chunk-FHOUTYMB.js.gz +0 -0
  53. package/dist/{chunk-PCCM7NVY.mjs → chunk-HJZA3O3S.mjs} +21 -10
  54. package/dist/chunk-HJZA3O3S.mjs.br +0 -0
  55. package/dist/chunk-HJZA3O3S.mjs.gz +0 -0
  56. package/dist/{chunk-K6Q6KLA6.js → chunk-HYUPPQJW.js} +6168 -1929
  57. package/dist/chunk-HYUPPQJW.js.br +0 -0
  58. package/dist/chunk-HYUPPQJW.js.gz +0 -0
  59. package/dist/{chunk-76Z3X6JX.mjs → chunk-KWHURCVT.mjs} +599 -60
  60. package/dist/chunk-KWHURCVT.mjs.br +0 -0
  61. package/dist/chunk-KWHURCVT.mjs.gz +0 -0
  62. package/dist/{chunk-NTWFXLZX.mjs → chunk-M6GIPAY4.mjs} +2 -2
  63. package/dist/chunk-M6GIPAY4.mjs.br +0 -0
  64. package/dist/chunk-M6GIPAY4.mjs.gz +0 -0
  65. package/dist/{chunk-3Y63XPIN.mjs → chunk-T4ZRSRQZ.mjs} +6164 -1925
  66. package/dist/chunk-T4ZRSRQZ.mjs.br +0 -0
  67. package/dist/chunk-T4ZRSRQZ.mjs.gz +0 -0
  68. package/dist/{chunk-JBSAKP4Z.mjs → chunk-TAGG5YNA.mjs} +61 -1
  69. package/dist/chunk-TAGG5YNA.mjs.br +0 -0
  70. package/dist/chunk-TAGG5YNA.mjs.gz +0 -0
  71. package/dist/{chunk-VQX7G75Z.mjs → chunk-UKPGYJ7G.mjs} +70151 -52196
  72. package/dist/chunk-UKPGYJ7G.mjs.br +0 -0
  73. package/dist/chunk-UKPGYJ7G.mjs.gz +0 -0
  74. package/dist/{chunk-LBJAVP3H.js → chunk-XW46A7DN.js} +176 -176
  75. package/dist/chunk-XW46A7DN.js.br +0 -0
  76. package/dist/chunk-XW46A7DN.js.gz +0 -0
  77. package/dist/{chunk-TEVGDXVW.js → chunk-Y6GG2OOW.js} +61 -1
  78. package/dist/chunk-Y6GG2OOW.js.br +0 -0
  79. package/dist/chunk-Y6GG2OOW.js.gz +0 -0
  80. package/dist/i18n.js +4 -4
  81. package/dist/i18n.js.br +0 -0
  82. package/dist/i18n.js.gz +0 -0
  83. package/dist/i18n.mjs +1 -1
  84. package/dist/i18n.mjs.br +0 -0
  85. package/dist/i18n.mjs.gz +0 -0
  86. package/dist/index-CGKutKk1.d.ts.map +1 -1
  87. package/dist/index.d.ts +228 -19
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +47 -47
  90. package/dist/index.js.br +0 -0
  91. package/dist/index.js.gz +0 -0
  92. package/dist/index.mjs +6 -6
  93. package/dist/index.mjs.br +0 -0
  94. package/dist/index.mjs.gz +0 -0
  95. package/dist/internals.d.ts +217 -10
  96. package/dist/internals.d.ts.map +1 -1
  97. package/dist/internals.js +79 -79
  98. package/dist/internals.js.br +0 -0
  99. package/dist/internals.js.gz +0 -0
  100. package/dist/internals.mjs +4 -4
  101. package/dist/internals.mjs.br +0 -0
  102. package/dist/internals.mjs.gz +0 -0
  103. package/dist/pptx-viewer.css +1 -1
  104. package/dist/pptx-viewer.css.br +0 -0
  105. package/dist/pptx-viewer.css.gz +0 -0
  106. package/dist/{useViewerBuildingBlocks-C8F_4Pzb.d.ts → useViewerBuildingBlocks-FbK-4ORi.d.ts} +2 -1
  107. package/dist/useViewerBuildingBlocks-FbK-4ORi.d.ts.map +1 -0
  108. package/dist/viewer/index.d.ts +207 -5
  109. package/dist/viewer/index.d.ts.map +1 -1
  110. package/dist/viewer/index.js +27 -27
  111. package/dist/viewer/index.js.br +0 -0
  112. package/dist/viewer/index.js.gz +0 -0
  113. package/dist/viewer/index.mjs +6 -6
  114. package/dist/viewer/index.mjs.br +0 -0
  115. package/dist/viewer/index.mjs.gz +0 -0
  116. package/package.json +9 -9
  117. package/dist/AiChatPanel-3A42W7RW.js.br +0 -0
  118. package/dist/AiChatPanel-3A42W7RW.js.gz +0 -0
  119. package/dist/AiChatPanel-II6VOOAL.mjs.br +0 -0
  120. package/dist/AiChatPanel-II6VOOAL.mjs.gz +0 -0
  121. package/dist/Area3DChartScene-JM3CQ3WQ.mjs.gz +0 -0
  122. package/dist/Area3DChartScene-XJK4ZA4R.js.gz +0 -0
  123. package/dist/Bar3DChartScene-RGRZY5P6.js.br +0 -0
  124. package/dist/Bar3DChartScene-RGRZY5P6.js.gz +0 -0
  125. package/dist/Bar3DChartScene-VNFWI2QG.mjs.gz +0 -0
  126. package/dist/Line3DChartScene-GXOWGIFJ.mjs.gz +0 -0
  127. package/dist/Line3DChartScene-MEY42DBF.js.gz +0 -0
  128. package/dist/Model3DScene-MWXTGHDM.js.br +0 -0
  129. package/dist/Model3DScene-MWXTGHDM.js.gz +0 -0
  130. package/dist/Model3DScene-WJ3MMIZH.mjs.br +0 -0
  131. package/dist/Model3DScene-WJ3MMIZH.mjs.gz +0 -0
  132. package/dist/PieChart3DScene-FJJGOQIS.js.gz +0 -0
  133. package/dist/PieChart3DScene-WXJEDYMK.mjs.gz +0 -0
  134. package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.br +0 -0
  135. package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.gz +0 -0
  136. package/dist/SurfaceChart3DScene-VDK3F224.js.gz +0 -0
  137. package/dist/chunk-3NIJ5HIZ.js.br +0 -0
  138. package/dist/chunk-3NIJ5HIZ.js.gz +0 -0
  139. package/dist/chunk-3Y63XPIN.mjs.br +0 -0
  140. package/dist/chunk-3Y63XPIN.mjs.gz +0 -0
  141. package/dist/chunk-5CPGDXD6.js.br +0 -0
  142. package/dist/chunk-5CPGDXD6.js.gz +0 -0
  143. package/dist/chunk-76Z3X6JX.mjs.br +0 -0
  144. package/dist/chunk-76Z3X6JX.mjs.gz +0 -0
  145. package/dist/chunk-G3JPCRKN.js.br +0 -0
  146. package/dist/chunk-G3JPCRKN.js.gz +0 -0
  147. package/dist/chunk-JBSAKP4Z.mjs.br +0 -0
  148. package/dist/chunk-JBSAKP4Z.mjs.gz +0 -0
  149. package/dist/chunk-K6Q6KLA6.js.br +0 -0
  150. package/dist/chunk-K6Q6KLA6.js.gz +0 -0
  151. package/dist/chunk-LBJAVP3H.js.br +0 -0
  152. package/dist/chunk-LBJAVP3H.js.gz +0 -0
  153. package/dist/chunk-NTWFXLZX.mjs.br +0 -0
  154. package/dist/chunk-NTWFXLZX.mjs.gz +0 -0
  155. package/dist/chunk-PCCM7NVY.mjs.br +0 -0
  156. package/dist/chunk-PCCM7NVY.mjs.gz +0 -0
  157. package/dist/chunk-TEVGDXVW.js.br +0 -0
  158. package/dist/chunk-TEVGDXVW.js.gz +0 -0
  159. package/dist/chunk-VQX7G75Z.mjs.br +0 -0
  160. package/dist/chunk-VQX7G75Z.mjs.gz +0 -0
  161. package/dist/useViewerBuildingBlocks-C8F_4Pzb.d.ts.map +0 -1
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkLBJAVP3H_js = require('./chunk-LBJAVP3H.js');
4
- var chunkG3JPCRKN_js = require('./chunk-G3JPCRKN.js');
5
- var chunkTEVGDXVW_js = require('./chunk-TEVGDXVW.js');
3
+ var chunkXW46A7DN_js = require('./chunk-XW46A7DN.js');
4
+ var chunk2Q2NFPXA_js = require('./chunk-2Q2NFPXA.js');
5
+ var chunkY6GG2OOW_js = require('./chunk-Y6GG2OOW.js');
6
6
  var react = require('react');
7
7
  var reactI18next = require('react-i18next');
8
8
 
9
9
  function useVirtualizedSlides({
10
10
  totalItems,
11
11
  itemHeight,
12
- overscan = chunkG3JPCRKN_js.DEFAULT_VIRTUAL_OVERSCAN
12
+ overscan = chunk2Q2NFPXA_js.DEFAULT_VIRTUAL_OVERSCAN
13
13
  }) {
14
14
  const scrollContainerRef = react.useRef(null);
15
15
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -39,7 +39,7 @@ function useVirtualizedSlides({
39
39
  resizeObserver?.disconnect();
40
40
  };
41
41
  }, []);
42
- const range = chunkG3JPCRKN_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
42
+ const range = chunk2Q2NFPXA_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
43
43
  const safeItemHeight = Math.max(itemHeight, 1);
44
44
  const scrollToIndex = react.useCallback(
45
45
  (index, behavior = "smooth") => {
@@ -80,7 +80,7 @@ function usePresenceTracking({
80
80
  }) {
81
81
  const [remoteUsers, setRemoteUsers] = react.useState([]);
82
82
  const projectorRef = react.useRef(null);
83
- projectorRef.current ??= chunkG3JPCRKN_js.createPresenceProjector();
83
+ projectorRef.current ??= chunk2Q2NFPXA_js.createPresenceProjector();
84
84
  const projector = projectorRef.current;
85
85
  const lastBroadcastRef = react.useRef(0);
86
86
  const pendingBroadcastRef = react.useRef(null);
@@ -105,7 +105,7 @@ function usePresenceTracking({
105
105
  awareness.setLocalStateField("presence", state);
106
106
  lastBroadcastRef.current = Date.now();
107
107
  };
108
- if (elapsed >= chunkG3JPCRKN_js.BROADCAST_THROTTLE_MS) {
108
+ if (elapsed >= chunk2Q2NFPXA_js.BROADCAST_THROTTLE_MS) {
109
109
  if (pendingBroadcastRef.current) {
110
110
  clearTimeout(pendingBroadcastRef.current);
111
111
  pendingBroadcastRef.current = null;
@@ -115,7 +115,7 @@ function usePresenceTracking({
115
115
  pendingBroadcastRef.current = setTimeout(() => {
116
116
  pendingBroadcastRef.current = null;
117
117
  flush();
118
- }, chunkG3JPCRKN_js.BROADCAST_THROTTLE_MS - elapsed);
118
+ }, chunk2Q2NFPXA_js.BROADCAST_THROTTLE_MS - elapsed);
119
119
  }
120
120
  },
121
121
  [awareness, userName, userColor, userAvatar, role]
@@ -195,7 +195,7 @@ function useYjsProvider({ config }) {
195
195
  const departureRef = react.useRef(null);
196
196
  const gateRef = react.useRef(null);
197
197
  if (!gateRef.current) {
198
- gateRef.current = chunkG3JPCRKN_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunk2Q2NFPXA_js.createSyncGate(() => setSynced(true));
199
199
  }
200
200
  const teardown = react.useCallback(() => {
201
201
  if (timeoutRef.current) {
@@ -215,7 +215,7 @@ function useYjsProvider({ config }) {
215
215
  const buildCleanup = react.useCallback(
216
216
  (provider, yDoc) => () => {
217
217
  announceDeparture();
218
- chunkG3JPCRKN_js.clearLocalAwareness(provider.awareness);
218
+ chunk2Q2NFPXA_js.clearLocalAwareness(provider.awareness);
219
219
  provider.destroy();
220
220
  yDoc.destroy();
221
221
  setDoc(null);
@@ -240,9 +240,9 @@ function useYjsProvider({ config }) {
240
240
  if (config.authToken) {
241
241
  opts.password = config.authToken;
242
242
  }
243
- const roomId = chunkG3JPCRKN_js.validateRoomId(config.roomId);
243
+ const roomId = chunk2Q2NFPXA_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunkG3JPCRKN_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunk2Q2NFPXA_js.createDepartureChannel(roomId, provider.awareness);
246
246
  setDoc(yDoc);
247
247
  setAwareness(provider.awareness);
248
248
  setClientId(provider.awareness.clientID);
@@ -284,13 +284,13 @@ function useYjsProvider({ config }) {
284
284
  if (!config) {
285
285
  return;
286
286
  }
287
- const roomId = chunkG3JPCRKN_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunkG3JPCRKN_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunk2Q2NFPXA_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunk2Q2NFPXA_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunkG3JPCRKN_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunk2Q2NFPXA_js.isMixedContentBlocked(config.serverUrl)) {
294
294
  console.warn(
295
295
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
296
296
  );
@@ -304,7 +304,7 @@ function useYjsProvider({ config }) {
304
304
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
305
305
  params: config.authToken ? { token: config.authToken } : void 0
306
306
  });
307
- departureRef.current = chunkG3JPCRKN_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunk2Q2NFPXA_js.createDepartureChannel(roomId, provider.awareness);
308
308
  let connected = false;
309
309
  const handleStatus = (event) => {
310
310
  if (event.status === "connected") {
@@ -344,7 +344,7 @@ function useYjsProvider({ config }) {
344
344
  provider.off("status", handleStatus);
345
345
  provider.off("sync", handleSynced);
346
346
  announceDeparture();
347
- chunkG3JPCRKN_js.clearLocalAwareness(provider.awareness);
347
+ chunk2Q2NFPXA_js.clearLocalAwareness(provider.awareness);
348
348
  provider.destroy();
349
349
  yDoc.destroy();
350
350
  setDoc(null);
@@ -353,7 +353,7 @@ function useYjsProvider({ config }) {
353
353
  cleanupRef.current = null;
354
354
  setStatus("error");
355
355
  }
356
- }, chunkG3JPCRKN_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunk2Q2NFPXA_js.CONNECTION_TIMEOUT_MS);
357
357
  }
358
358
  setDoc(yDoc);
359
359
  setAwareness(provider.awareness);
@@ -362,7 +362,7 @@ function useYjsProvider({ config }) {
362
362
  provider.off("status", handleStatus);
363
363
  provider.off("sync", handleSynced);
364
364
  announceDeparture();
365
- chunkG3JPCRKN_js.clearLocalAwareness(provider.awareness);
365
+ chunk2Q2NFPXA_js.clearLocalAwareness(provider.awareness);
366
366
  provider.destroy();
367
367
  yDoc.destroy();
368
368
  setDoc(null);
@@ -388,7 +388,7 @@ function useYjsProvider({ config }) {
388
388
  ]);
389
389
  react.useEffect(() => {
390
390
  init();
391
- const disposeTeardown = chunkG3JPCRKN_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunk2Q2NFPXA_js.registerCollaborationTeardown({
392
392
  leave: teardown,
393
393
  rejoin: init
394
394
  });
@@ -409,7 +409,7 @@ function useCollaborativeState({
409
409
  canvasWidth,
410
410
  canvasHeight
411
411
  }) {
412
- const userColor = chunkG3JPCRKN_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunk2Q2NFPXA_js.sanitizeColor(config?.userColor, "#6366f1");
413
413
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
414
414
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
415
415
  awareness,
@@ -527,8 +527,8 @@ function useEditorHistory(input) {
527
527
  width: canvasSize.width,
528
528
  height: canvasSize.height,
529
529
  activeSlideIndex,
530
- slides: slides.map(chunkG3JPCRKN_js.cloneSlide),
531
- templateElementsBySlideId: chunkG3JPCRKN_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
530
+ slides: slides.map(chunk2Q2NFPXA_js.cloneSlide),
531
+ templateElementsBySlideId: chunk2Q2NFPXA_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
532
532
  ...actionLabel ? { actionLabel } : {}
533
533
  };
534
534
  },
@@ -541,9 +541,9 @@ function useEditorHistory(input) {
541
541
  width: snapshot.width,
542
542
  height: snapshot.height
543
543
  });
544
- setSlides(snapshot.slides.map(chunkG3JPCRKN_js.cloneSlide));
544
+ setSlides(snapshot.slides.map(chunk2Q2NFPXA_js.cloneSlide));
545
545
  setTemplateElementsBySlideId(
546
- chunkG3JPCRKN_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
546
+ chunk2Q2NFPXA_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
547
547
  );
548
548
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
549
549
  setSelectedElementIds([]);
@@ -582,8 +582,8 @@ function useEditorHistory(input) {
582
582
  const currentSnapshot = buildHistorySnapshot();
583
583
  historyFutureRef.current.push(currentSnapshot);
584
584
  isApplyingHistoryRef.current = true;
585
- const nextSnapshot = chunkLBJAVP3H_js.cloneHistorySnapshot(previousSnapshot);
586
- lastHistorySnapshotRef.current = chunkLBJAVP3H_js.cloneHistorySnapshot(nextSnapshot);
585
+ const nextSnapshot = chunkXW46A7DN_js.cloneHistorySnapshot(previousSnapshot);
586
+ lastHistorySnapshotRef.current = chunkXW46A7DN_js.cloneHistorySnapshot(nextSnapshot);
587
587
  lastHistorySerializedRef.current = serializeDocument(nextSnapshot);
588
588
  applyHistorySnapshot(nextSnapshot);
589
589
  updateHistoryAvailability();
@@ -604,8 +604,8 @@ function useEditorHistory(input) {
604
604
  const currentSnapshot = buildHistorySnapshot();
605
605
  historyPastRef.current.push(currentSnapshot);
606
606
  isApplyingHistoryRef.current = true;
607
- const targetSnapshot = chunkLBJAVP3H_js.cloneHistorySnapshot(nextSnapshot);
608
- lastHistorySnapshotRef.current = chunkLBJAVP3H_js.cloneHistorySnapshot(targetSnapshot);
607
+ const targetSnapshot = chunkXW46A7DN_js.cloneHistorySnapshot(nextSnapshot);
608
+ lastHistorySnapshotRef.current = chunkXW46A7DN_js.cloneHistorySnapshot(targetSnapshot);
609
609
  lastHistorySerializedRef.current = serializeDocument(targetSnapshot);
610
610
  applyHistorySnapshot(targetSnapshot);
611
611
  updateHistoryAvailability();
@@ -623,7 +623,7 @@ function useEditorHistory(input) {
623
623
  historyPastRef.current = [];
624
624
  historyFutureRef.current = [];
625
625
  if (initialSnapshot) {
626
- const clonedInitial = chunkLBJAVP3H_js.cloneHistorySnapshot(initialSnapshot);
626
+ const clonedInitial = chunkXW46A7DN_js.cloneHistorySnapshot(initialSnapshot);
627
627
  lastHistorySnapshotRef.current = clonedInitial;
628
628
  lastHistorySerializedRef.current = serializeDocument(clonedInitial);
629
629
  } else {
@@ -671,19 +671,19 @@ function useEditorHistory(input) {
671
671
  }
672
672
  const previousSnapshot = lastHistorySnapshotRef.current;
673
673
  if (!previousSnapshot) {
674
- lastHistorySnapshotRef.current = chunkLBJAVP3H_js.cloneHistorySnapshot(snapshot);
674
+ lastHistorySnapshotRef.current = chunkXW46A7DN_js.cloneHistorySnapshot(snapshot);
675
675
  lastHistorySerializedRef.current = serialized;
676
676
  lastCheapHashRef.current = cheapHash;
677
677
  updateHistoryAvailability();
678
678
  return;
679
679
  }
680
680
  onDirtyRef.current?.();
681
- historyPastRef.current.push(chunkLBJAVP3H_js.cloneHistorySnapshot(previousSnapshot));
681
+ historyPastRef.current.push(chunkXW46A7DN_js.cloneHistorySnapshot(previousSnapshot));
682
682
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
683
683
  historyPastRef.current.shift();
684
684
  }
685
685
  historyFutureRef.current = [];
686
- lastHistorySnapshotRef.current = chunkLBJAVP3H_js.cloneHistorySnapshot(snapshot);
686
+ lastHistorySnapshotRef.current = chunkXW46A7DN_js.cloneHistorySnapshot(snapshot);
687
687
  lastHistorySerializedRef.current = serialized;
688
688
  lastCheapHashRef.current = cheapHash;
689
689
  updateHistoryAvailability();
@@ -743,9 +743,9 @@ function useZoomViewport({
743
743
  const canvasStageRef = react.useRef(null);
744
744
  const canvasViewportRef = react.useRef(null);
745
745
  const renderScaleRef = react.useRef(1);
746
- const wheelBufferRef = react.useRef(chunkG3JPCRKN_js.createWheelStepBuffer());
746
+ const wheelBufferRef = react.useRef(chunk2Q2NFPXA_js.createWheelStepBuffer());
747
747
  const storeRef = react.useRef(null);
748
- storeRef.current ??= chunkG3JPCRKN_js.createViewerZoomStore();
748
+ storeRef.current ??= chunk2Q2NFPXA_js.createViewerZoomStore();
749
749
  const store = storeRef.current;
750
750
  const scale = useViewerStore(store, selectZoom);
751
751
  const setScale = react.useCallback(
@@ -806,7 +806,7 @@ function useZoomViewport({
806
806
  if (!wrapper || !canvasViewport) {
807
807
  return;
808
808
  }
809
- const boundedScale = chunkG3JPCRKN_js.clampZoomScale(nextScale);
809
+ const boundedScale = chunk2Q2NFPXA_js.clampZoomScale(nextScale);
810
810
  const nextEditorScale = fitScale * boundedScale;
811
811
  const centerX = (bounds.minX + bounds.maxX) / 2;
812
812
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -843,29 +843,29 @@ function useZoomViewport({
843
843
  selectedElements.forEach((element) => {
844
844
  minX = Math.min(minX, element.x);
845
845
  minY = Math.min(minY, element.y);
846
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE));
847
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE));
846
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkXW46A7DN_js.MIN_ELEMENT_SIZE));
847
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkXW46A7DN_js.MIN_ELEMENT_SIZE));
848
848
  });
849
849
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
850
850
  return;
851
851
  }
852
852
  const selectionBounds = { minX, minY, maxX, maxY };
853
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE);
854
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE);
853
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
854
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
855
855
  const availableWidth = Math.max(
856
- effectiveEditorDimensions.width - chunkLBJAVP3H_js.ZOOM_TO_SELECTION_PADDING,
857
- chunkLBJAVP3H_js.MIN_ELEMENT_SIZE
856
+ effectiveEditorDimensions.width - chunkXW46A7DN_js.ZOOM_TO_SELECTION_PADDING,
857
+ chunkXW46A7DN_js.MIN_ELEMENT_SIZE
858
858
  );
859
859
  const availableHeight = Math.max(
860
- effectiveEditorDimensions.height - chunkLBJAVP3H_js.ZOOM_TO_SELECTION_PADDING,
861
- chunkLBJAVP3H_js.MIN_ELEMENT_SIZE
860
+ effectiveEditorDimensions.height - chunkXW46A7DN_js.ZOOM_TO_SELECTION_PADDING,
861
+ chunkXW46A7DN_js.MIN_ELEMENT_SIZE
862
862
  );
863
863
  const targetEditorScale = Math.min(
864
864
  availableWidth / boundsWidth,
865
865
  availableHeight / boundsHeight
866
866
  );
867
867
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
868
- const nextScale = chunkG3JPCRKN_js.clampZoomScale(targetEditorScale / safeFitScale);
868
+ const nextScale = chunk2Q2NFPXA_js.clampZoomScale(targetEditorScale / safeFitScale);
869
869
  setScale(nextScale);
870
870
  window.requestAnimationFrame(() => {
871
871
  window.requestAnimationFrame(() => {
@@ -882,14 +882,14 @@ function useZoomViewport({
882
882
  ]);
883
883
  const handleWheel = react.useCallback(
884
884
  (event) => {
885
- const mapped = chunkG3JPCRKN_js.mapEditingWheel(event, wheelBufferRef.current, true);
885
+ const mapped = chunk2Q2NFPXA_js.mapEditingWheel(event, wheelBufferRef.current, true);
886
886
  if (mapped.intent !== "zoom") {
887
887
  return;
888
888
  }
889
889
  event.preventDefault();
890
890
  store.dispatch({
891
891
  type: "set-zoom",
892
- zoom: chunkG3JPCRKN_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
892
+ zoom: chunk2Q2NFPXA_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
893
893
  });
894
894
  },
895
895
  [store]
@@ -984,8 +984,8 @@ function scheduleOpeningAutoPlayGroup(controller, ctx) {
984
984
  if (!group) {
985
985
  return;
986
986
  }
987
- chunkG3JPCRKN_js.playGroup(controller, group, ctx);
988
- chunkG3JPCRKN_js.scheduleAutoAdvanceChain(controller, ctx);
987
+ chunk2Q2NFPXA_js.playGroup(controller, group, ctx);
988
+ chunk2Q2NFPXA_js.scheduleAutoAdvanceChain(controller, ctx);
989
989
  }, firstGroup.autoAdvanceDelayMs ?? 0);
990
990
  ctx.timers.push(timer);
991
991
  }
@@ -1004,7 +1004,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
1004
1004
  }))
1005
1005
  );
1006
1006
  entranceAnimations.forEach((animation, animationIndex) => {
1007
- const delay = chunkG3JPCRKN_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1007
+ const delay = chunk2Q2NFPXA_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1008
1008
  const timer = window.setTimeout(() => {
1009
1009
  setPresentationAnimations(
1010
1010
  (previousAnimations) => previousAnimations.map(
@@ -1030,7 +1030,7 @@ function useAnimationPlayback(input) {
1030
1030
  const presentationTimersRef = react.useRef([]);
1031
1031
  const controllerRef = react.useRef(null);
1032
1032
  const buildRafRef = react.useRef(null);
1033
- const activeAnimationGroupRef = react.useRef(chunkG3JPCRKN_js.createActiveAnimationGroup());
1033
+ const activeAnimationGroupRef = react.useRef(chunk2Q2NFPXA_js.createActiveAnimationGroup());
1034
1034
  const seededCompletedRef = react.useRef(false);
1035
1035
  const mediaTimeNodeElementIdsRef = react.useRef(/* @__PURE__ */ new Map());
1036
1036
  const lastSeedCompletedRef = react.useRef(false);
@@ -1047,15 +1047,15 @@ function useAnimationPlayback(input) {
1047
1047
  }, [onPlayActionSound]);
1048
1048
  react.useEffect(() => {
1049
1049
  return () => {
1050
- chunkG3JPCRKN_js.cancelBuildReveal(buildRafRef);
1050
+ chunk2Q2NFPXA_js.cancelBuildReveal(buildRafRef);
1051
1051
  };
1052
1052
  }, []);
1053
1053
  const clearPresentationTimers = react.useCallback(() => {
1054
- chunkG3JPCRKN_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1054
+ chunk2Q2NFPXA_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1055
1055
  }, [buildPlaybackContext]);
1056
1056
  const resetSlideTimeline = react.useCallback(
1057
1057
  (slideIndex) => {
1058
- chunkG3JPCRKN_js.cancelBuildReveal(buildRafRef);
1058
+ chunk2Q2NFPXA_js.cancelBuildReveal(buildRafRef);
1059
1059
  const slide = slides[slideIndex];
1060
1060
  if (!slide) {
1061
1061
  controllerRef.current = null;
@@ -1066,13 +1066,13 @@ function useAnimationPlayback(input) {
1066
1066
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1067
1067
  return;
1068
1068
  }
1069
- const controller = chunkG3JPCRKN_js.PresentationAnimationController.fromSlide(slide, {
1069
+ const controller = chunk2Q2NFPXA_js.PresentationAnimationController.fromSlide(slide, {
1070
1070
  slideHeightPx: canvasSize?.height,
1071
1071
  slideWidthPx: canvasSize?.width,
1072
1072
  themeColorMap
1073
1073
  });
1074
1074
  controllerRef.current = controller;
1075
- mediaTimeNodeElementIdsRef.current = chunkG3JPCRKN_js.resolveMediaTimeNodeElementIds(
1075
+ mediaTimeNodeElementIdsRef.current = chunk2Q2NFPXA_js.resolveMediaTimeNodeElementIds(
1076
1076
  slide.nativeAnimations ?? []
1077
1077
  );
1078
1078
  setPresentationKeyframesCss(controller.keyframesCss);
@@ -1086,7 +1086,7 @@ function useAnimationPlayback(input) {
1086
1086
  if (!animationsEnabled) {
1087
1087
  return false;
1088
1088
  }
1089
- return chunkG3JPCRKN_js.advanceMainSequence(
1089
+ return chunk2Q2NFPXA_js.advanceMainSequence(
1090
1090
  controllerRef.current,
1091
1091
  buildPlaybackContext(),
1092
1092
  activeAnimationGroupRef.current
@@ -1102,7 +1102,7 @@ function useAnimationPlayback(input) {
1102
1102
  if (!group) {
1103
1103
  return false;
1104
1104
  }
1105
- chunkG3JPCRKN_js.playGroup(controller, group, buildPlaybackContext());
1105
+ chunk2Q2NFPXA_js.playGroup(controller, group, buildPlaybackContext());
1106
1106
  return true;
1107
1107
  },
1108
1108
  [buildPlaybackContext]
@@ -1121,7 +1121,7 @@ function useAnimationPlayback(input) {
1121
1121
  if (!group) {
1122
1122
  return false;
1123
1123
  }
1124
- chunkG3JPCRKN_js.playGroup(controller, group, buildPlaybackContext());
1124
+ chunk2Q2NFPXA_js.playGroup(controller, group, buildPlaybackContext());
1125
1125
  return true;
1126
1126
  },
1127
1127
  [animationsEnabled, buildPlaybackContext]
@@ -1202,12 +1202,12 @@ function useAnimationPlayback(input) {
1202
1202
  presentationTimersRef
1203
1203
  };
1204
1204
  }
1205
- var PRESENTER_CHANNEL_NAME = chunkG3JPCRKN_js.PRESENTATION_CHANNEL_NAME;
1206
- var AUDIENCE_HASH = chunkG3JPCRKN_js.PRESENTATION_HASH;
1207
- var PRESENTER_MSG_ORIGIN = chunkG3JPCRKN_js.PRESENTATION_MESSAGE_ORIGIN;
1208
- var AUDIENCE_NONCE_KEY = chunkG3JPCRKN_js.PRESENTATION_NONCE_KEY;
1205
+ var PRESENTER_CHANNEL_NAME = chunk2Q2NFPXA_js.PRESENTATION_CHANNEL_NAME;
1206
+ var AUDIENCE_HASH = chunk2Q2NFPXA_js.PRESENTATION_HASH;
1207
+ var PRESENTER_MSG_ORIGIN = chunk2Q2NFPXA_js.PRESENTATION_MESSAGE_ORIGIN;
1208
+ var AUDIENCE_NONCE_KEY = chunk2Q2NFPXA_js.PRESENTATION_NONCE_KEY;
1209
1209
  function generateSessionId() {
1210
- return chunkG3JPCRKN_js.createPresentationSessionId();
1210
+ return chunk2Q2NFPXA_js.createPresentationSessionId();
1211
1211
  }
1212
1212
  function parseAudienceNonce() {
1213
1213
  const hash = window.location.hash;
@@ -1243,7 +1243,7 @@ function usePresenterWindow(input) {
1243
1243
  }, []);
1244
1244
  const swapDisplays = react.useCallback(async () => {
1245
1245
  const audience = audienceWindowRef.current;
1246
- return audience && !audience.closed ? chunkG3JPCRKN_js.swapPresentationWindows(window, audience) : false;
1246
+ return audience && !audience.closed ? chunk2Q2NFPXA_js.swapPresentationWindows(window, audience) : false;
1247
1247
  }, []);
1248
1248
  const syncSlideToAudience = react.useCallback(
1249
1249
  (slideIndex) => {
@@ -1307,7 +1307,7 @@ function usePresenterWindow(input) {
1307
1307
  pollTimerRef.current = null;
1308
1308
  }
1309
1309
  if (closingSessionId) {
1310
- void chunkG3JPCRKN_js.clearAudienceContent(closingSessionId);
1310
+ void chunk2Q2NFPXA_js.clearAudienceContent(closingSessionId);
1311
1311
  }
1312
1312
  }, [getChannel]);
1313
1313
  const openAudienceWindow = react.useCallback(() => {
@@ -1325,10 +1325,10 @@ function usePresenterWindow(input) {
1325
1325
  audienceWindowRef.current = blankWin;
1326
1326
  const sessionId = generateSessionId();
1327
1327
  sessionIdRef.current = sessionId;
1328
- const audienceUrl = chunkG3JPCRKN_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1329
- void chunkG3JPCRKN_js.resolveAudienceScreenPlacement(window).then((placement) => {
1328
+ const audienceUrl = chunk2Q2NFPXA_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1329
+ void chunk2Q2NFPXA_js.resolveAudienceScreenPlacement(window).then((placement) => {
1330
1330
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1331
- chunkG3JPCRKN_js.placeAudienceWindow(blankWin, placement);
1331
+ chunk2Q2NFPXA_js.placeAudienceWindow(blankWin, placement);
1332
1332
  }
1333
1333
  return void 0;
1334
1334
  });
@@ -1358,7 +1358,7 @@ function usePresenterWindow(input) {
1358
1358
  }
1359
1359
  };
1360
1360
  if (content) {
1361
- void chunkG3JPCRKN_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1361
+ void chunk2Q2NFPXA_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1362
1362
  } else {
1363
1363
  navigateOrClose(true);
1364
1364
  }
@@ -1384,7 +1384,7 @@ function usePresenterWindow(input) {
1384
1384
  }
1385
1385
  const handleMessage = (event) => {
1386
1386
  const message = event.data;
1387
- if (chunkG3JPCRKN_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1387
+ if (chunk2Q2NFPXA_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1388
1388
  syncStateToAudience(snapshotRef.current);
1389
1389
  }
1390
1390
  };
@@ -1413,7 +1413,7 @@ function usePresenterWindow(input) {
1413
1413
  react.useEffect(() => {
1414
1414
  const handleBeforeUnload = () => {
1415
1415
  if (sessionIdRef.current) {
1416
- void chunkG3JPCRKN_js.clearAudienceContent(sessionIdRef.current);
1416
+ void chunk2Q2NFPXA_js.clearAudienceContent(sessionIdRef.current);
1417
1417
  }
1418
1418
  };
1419
1419
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1475,7 +1475,7 @@ function useAudienceMode(input) {
1475
1475
  }
1476
1476
  channel.onmessage = (event) => {
1477
1477
  const data = event.data;
1478
- if (!chunkG3JPCRKN_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1478
+ if (!chunk2Q2NFPXA_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1479
1479
  return;
1480
1480
  }
1481
1481
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1491,16 +1491,16 @@ function useAudienceMode(input) {
1491
1491
  }
1492
1492
  if (data.type === "presenter-exit") {
1493
1493
  if (expectedSessionId) {
1494
- void chunkG3JPCRKN_js.clearAudienceContent(expectedSessionId);
1494
+ void chunk2Q2NFPXA_js.clearAudienceContent(expectedSessionId);
1495
1495
  }
1496
- if (chunkG3JPCRKN_js.endAudienceDisplay(window)) {
1496
+ if (chunk2Q2NFPXA_js.endAudienceDisplay(window)) {
1497
1497
  handlers.onPresenterEnded?.();
1498
1498
  }
1499
1499
  }
1500
1500
  };
1501
1501
  if (expectedSessionId) {
1502
1502
  channel.postMessage({
1503
- origin: chunkG3JPCRKN_js.PRESENTATION_MESSAGE_ORIGIN,
1503
+ origin: chunk2Q2NFPXA_js.PRESENTATION_MESSAGE_ORIGIN,
1504
1504
  type: "audience-ready",
1505
1505
  sessionId: expectedSessionId
1506
1506
  });
@@ -1514,7 +1514,7 @@ function useAudienceMode(input) {
1514
1514
  }, []);
1515
1515
  }
1516
1516
  function usePresentationKeyboard(input) {
1517
- const wheelBufferRef = react.useRef(chunkG3JPCRKN_js.createWheelStepBuffer());
1517
+ const wheelBufferRef = react.useRef(chunk2Q2NFPXA_js.createWheelStepBuffer());
1518
1518
  const {
1519
1519
  mode,
1520
1520
  movePresentationSlide,
@@ -1535,14 +1535,14 @@ function usePresentationKeyboard(input) {
1535
1535
  presentationSlideIndex,
1536
1536
  setShowRehearsalSummary
1537
1537
  } = input;
1538
- const keyBufferRef = react.useRef(chunkG3JPCRKN_js.createPresentationKeyBuffer());
1538
+ const keyBufferRef = react.useRef(chunk2Q2NFPXA_js.createPresentationKeyBuffer());
1539
1539
  react.useEffect(() => {
1540
- if (mode !== "present" || !chunkG3JPCRKN_js.acceptsPresentationInput()) {
1541
- keyBufferRef.current = chunkG3JPCRKN_js.createPresentationKeyBuffer();
1540
+ if (mode !== "present" || !chunk2Q2NFPXA_js.acceptsPresentationInput()) {
1541
+ keyBufferRef.current = chunk2Q2NFPXA_js.createPresentationKeyBuffer();
1542
1542
  return;
1543
1543
  }
1544
1544
  const handleKeyDown = (event) => {
1545
- const mapped = chunkG3JPCRKN_js.mapPresentationKey(event, keyBufferRef.current);
1545
+ const mapped = chunk2Q2NFPXA_js.mapPresentationKey(event, keyBufferRef.current);
1546
1546
  if (mapped.action === "none") {
1547
1547
  return;
1548
1548
  }
@@ -1562,12 +1562,12 @@ function usePresentationKeyboard(input) {
1562
1562
  movePresentationSlide(-1);
1563
1563
  return;
1564
1564
  case "first": {
1565
- const first = chunkG3JPCRKN_js.firstShowSlideIndex(showSlideIndexes);
1565
+ const first = chunk2Q2NFPXA_js.firstShowSlideIndex(showSlideIndexes);
1566
1566
  navigateToSlide(first ?? 0);
1567
1567
  return;
1568
1568
  }
1569
1569
  case "last": {
1570
- const last = chunkG3JPCRKN_js.lastShowSlideIndex(showSlideIndexes);
1570
+ const last = chunk2Q2NFPXA_js.lastShowSlideIndex(showSlideIndexes);
1571
1571
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1572
1572
  return;
1573
1573
  }
@@ -1605,10 +1605,10 @@ function usePresentationKeyboard(input) {
1605
1605
  }
1606
1606
  };
1607
1607
  const handleWheel = (event) => {
1608
- if (mode !== "present" || !chunkG3JPCRKN_js.acceptsPresentationInput()) {
1608
+ if (mode !== "present" || !chunk2Q2NFPXA_js.acceptsPresentationInput()) {
1609
1609
  return;
1610
1610
  }
1611
- const mapped = chunkG3JPCRKN_js.mapPresentationWheel(event, wheelBufferRef.current);
1611
+ const mapped = chunk2Q2NFPXA_js.mapPresentationWheel(event, wheelBufferRef.current);
1612
1612
  if (mapped.intent === "next-slide") {
1613
1613
  event.preventDefault();
1614
1614
  movePresentationSlide(1);
@@ -1741,7 +1741,7 @@ function useRehearsalTimings(input) {
1741
1741
 
1742
1742
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1743
1743
  function handlePresentationActionImpl(action, deps) {
1744
- chunkG3JPCRKN_js.runPresentationAction(
1744
+ chunk2Q2NFPXA_js.runPresentationAction(
1745
1745
  action,
1746
1746
  { slideCount: deps.slidesLength, ...deps.elementId ? { elementId: deps.elementId } : {} },
1747
1747
  {
@@ -1769,13 +1769,13 @@ function handlePresentationActionImpl(action, deps) {
1769
1769
  function executeSlideTransition(nextSlideIndex, deps) {
1770
1770
  const incomingSlide = deps.slides[nextSlideIndex];
1771
1771
  const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
1772
- const durationMs = deps.playTransition ? chunkG3JPCRKN_js.resolveTransitionDurationMs(transition) : 0;
1772
+ const durationMs = deps.playTransition ? chunk2Q2NFPXA_js.resolveTransitionDurationMs(transition) : 0;
1773
1773
  deps.clearPresentationTimers();
1774
1774
  deps.setPresentationSlideIndex(nextSlideIndex);
1775
1775
  deps.onSetActiveSlideIndex(nextSlideIndex);
1776
1776
  deps.setPresentationSlideVisible(true);
1777
1777
  deps.seedSlideAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1778
- const soundAction = chunkG3JPCRKN_js.resolveTransitionSoundAction(transition);
1778
+ const soundAction = chunk2Q2NFPXA_js.resolveTransitionSoundAction(transition);
1779
1779
  if (soundAction.kind === "play" && deps.onPlayActionSound) {
1780
1780
  deps.onPlayActionSound(soundAction.soundPath, { loop: soundAction.loop });
1781
1781
  } else if (soundAction.kind === "stop" && deps.onStopActionSound) {
@@ -1838,7 +1838,7 @@ function useSlideNavigation(input) {
1838
1838
  });
1839
1839
  const scheduleAutoAdvanceForSlide = react.useCallback(
1840
1840
  (slideIndex) => {
1841
- const delayMs = chunkG3JPCRKN_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1841
+ const delayMs = chunk2Q2NFPXA_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1842
1842
  if (delayMs === void 0) {
1843
1843
  return;
1844
1844
  }
@@ -1861,7 +1861,7 @@ function useSlideNavigation(input) {
1861
1861
  if (availableSlideIndexes.length === 0) {
1862
1862
  return;
1863
1863
  }
1864
- const pastLastSlide = direction === 1 && !chunkG3JPCRKN_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1864
+ const pastLastSlide = direction === 1 && !chunk2Q2NFPXA_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1865
1865
  if (rehearsing && pastLastSlide) {
1866
1866
  recordCurrentSlideTime(presentationSlideIndex);
1867
1867
  try {
@@ -1879,9 +1879,9 @@ function useSlideNavigation(input) {
1879
1879
  onAdvancePastLastSlide();
1880
1880
  return;
1881
1881
  }
1882
- const nextSlideIndex = direction === 1 ? chunkG3JPCRKN_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1882
+ const nextSlideIndex = direction === 1 ? chunk2Q2NFPXA_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1883
1883
  loop: Boolean(loopContinuously) && !rehearsing
1884
- }) : chunkG3JPCRKN_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1884
+ }) : chunk2Q2NFPXA_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1885
1885
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1886
1886
  return;
1887
1887
  }
@@ -2060,7 +2060,7 @@ function createCustomShowRunner(deps) {
2060
2060
  return;
2061
2061
  }
2062
2062
  origin = returnAfter ? { showId: deps.getActiveCustomShowId(), slideIndex: deps.getPresentationSlideIndex() } : null;
2063
- const first = chunkG3JPCRKN_js.firstShowSlideIndex(chunkG3JPCRKN_js.resolveShowSlideIndexes(deps.getSlides(), target));
2063
+ const first = chunk2Q2NFPXA_js.firstShowSlideIndex(chunk2Q2NFPXA_js.resolveShowSlideIndexes(deps.getSlides(), target));
2064
2064
  deps.setActiveCustomShowId(customShowId);
2065
2065
  if (first !== void 0) {
2066
2066
  deps.navigateToSlide(first);
@@ -2137,22 +2137,27 @@ function usePresentationActionExtensions(input) {
2137
2137
  }
2138
2138
  }, [navigateToSlideViaRef]);
2139
2139
  const onOpenFile = react.useCallback((target) => {
2140
- chunkG3JPCRKN_js.safeOpenUrl(target);
2140
+ chunk2Q2NFPXA_js.safeOpenUrl(target);
2141
2141
  }, []);
2142
2142
  const onOpenPresentation = react.useCallback((target) => {
2143
- chunkG3JPCRKN_js.safeOpenUrl(target);
2143
+ chunk2Q2NFPXA_js.safeOpenUrl(target);
2144
2144
  }, []);
2145
2145
  const onPlayMedia = react.useCallback(
2146
2146
  (elementId) => {
2147
- chunkG3JPCRKN_js.toggleStageElementMedia(containerRef.current, elementId);
2147
+ chunk2Q2NFPXA_js.toggleStageElementMedia(containerRef.current, elementId);
2148
2148
  },
2149
2149
  [containerRef]
2150
2150
  );
2151
2151
  const onOleVerb = react.useCallback(
2152
2152
  (verb, elementId) => {
2153
- const target = chunkG3JPCRKN_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2154
- if (target) {
2155
- chunkG3JPCRKN_js.openUrlInNewTab(target.url);
2153
+ const target = chunk2Q2NFPXA_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2154
+ if (!target) {
2155
+ return;
2156
+ }
2157
+ if (target.action === "download") {
2158
+ chunk2Q2NFPXA_js.downloadDataUrl(target.url, target.fileName ?? "download");
2159
+ } else {
2160
+ chunk2Q2NFPXA_js.openUrlInNewTab(target.url);
2156
2161
  }
2157
2162
  },
2158
2163
  [slides, presentationSlideIndex]
@@ -2182,22 +2187,22 @@ function usePresentationActionExtensions(input) {
2182
2187
  };
2183
2188
  }
2184
2189
  function usePresenterConsole(slideIndex, active) {
2185
- const timerRef = react.useRef(chunkG3JPCRKN_js.createPresenterTimer());
2186
- const [snapshot, setSnapshot] = react.useState(() => chunkG3JPCRKN_js.createInitialPresentationSnapshot(slideIndex));
2190
+ const timerRef = react.useRef(chunk2Q2NFPXA_js.createPresenterTimer());
2191
+ const [snapshot, setSnapshot] = react.useState(() => chunk2Q2NFPXA_js.createInitialPresentationSnapshot(slideIndex));
2187
2192
  const patch = react.useCallback((value) => {
2188
- setSnapshot((current) => chunkG3JPCRKN_js.mergePresentationSnapshot(current, value));
2193
+ setSnapshot((current) => chunk2Q2NFPXA_js.mergePresentationSnapshot(current, value));
2189
2194
  }, []);
2190
2195
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2191
2196
  react.useEffect(() => {
2192
2197
  if (!active) {
2193
2198
  return;
2194
2199
  }
2195
- timerRef.current = chunkG3JPCRKN_js.resetPresenterTimer();
2200
+ timerRef.current = chunk2Q2NFPXA_js.resetPresenterTimer();
2196
2201
  patch({ paused: false, elapsedMs: 0 });
2197
2202
  const timer = window.setInterval(() => {
2198
2203
  patch({
2199
2204
  paused: timerRef.current.paused,
2200
- elapsedMs: chunkG3JPCRKN_js.presenterElapsed(timerRef.current)
2205
+ elapsedMs: chunk2Q2NFPXA_js.presenterElapsed(timerRef.current)
2201
2206
  });
2202
2207
  }, 1e3);
2203
2208
  return () => window.clearInterval(timer);
@@ -2207,19 +2212,19 @@ function usePresenterConsole(slideIndex, active) {
2207
2212
  applyAudienceSnapshot: setSnapshot,
2208
2213
  setBlackout: (blackout) => patch({ blackout }),
2209
2214
  toggleTimer: () => {
2210
- timerRef.current = chunkG3JPCRKN_js.togglePresenterTimer(timerRef.current);
2215
+ timerRef.current = chunk2Q2NFPXA_js.togglePresenterTimer(timerRef.current);
2211
2216
  patch({
2212
2217
  paused: timerRef.current.paused,
2213
- elapsedMs: chunkG3JPCRKN_js.presenterElapsed(timerRef.current)
2218
+ elapsedMs: chunk2Q2NFPXA_js.presenterElapsed(timerRef.current)
2214
2219
  });
2215
2220
  },
2216
2221
  resetTimer: () => {
2217
- timerRef.current = chunkG3JPCRKN_js.resetPresenterTimer();
2222
+ timerRef.current = chunk2Q2NFPXA_js.resetPresenterTimer();
2218
2223
  patch({ paused: false, elapsedMs: 0 });
2219
2224
  },
2220
2225
  stepZoom: (direction) => setSnapshot(
2221
- (current) => chunkG3JPCRKN_js.mergePresentationSnapshot(current, {
2222
- zoom: chunkG3JPCRKN_js.stepPresenterZoom(
2226
+ (current) => chunk2Q2NFPXA_js.mergePresentationSnapshot(current, {
2227
+ zoom: chunk2Q2NFPXA_js.stepPresenterZoom(
2223
2228
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2224
2229
  direction
2225
2230
  )
@@ -2272,7 +2277,7 @@ function usePresentationMode(input) {
2272
2277
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2273
2278
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2274
2279
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2275
- const showGuard = react.useMemo(() => chunkG3JPCRKN_js.createPresenterShowGuard(), []);
2280
+ const showGuard = react.useMemo(() => chunk2Q2NFPXA_js.createPresenterShowGuard(), []);
2276
2281
  const {
2277
2282
  presentationAnimations,
2278
2283
  presentationElementStates,
@@ -2369,7 +2374,7 @@ function usePresentationMode(input) {
2369
2374
  actionExtensions.bindNavigateToSlide(navigateToSlide);
2370
2375
  const movePresentationSlide = react.useCallback(
2371
2376
  (direction, trigger = "explicit") => {
2372
- if (!chunkG3JPCRKN_js.acceptsPresentationInput()) {
2377
+ if (!chunk2Q2NFPXA_js.acceptsPresentationInput()) {
2373
2378
  return;
2374
2379
  }
2375
2380
  if (endOfShowVisible) {
@@ -2438,7 +2443,7 @@ function usePresentationMode(input) {
2438
2443
  onSetMode("present");
2439
2444
  }, [containerRef, onSetMode, setRehearsing]);
2440
2445
  const enterPresentModeFromBeginning = react.useCallback(() => {
2441
- const first = chunkG3JPCRKN_js.firstShowSlideIndex(visibleSlideIndexes);
2446
+ const first = chunk2Q2NFPXA_js.firstShowSlideIndex(visibleSlideIndexes);
2442
2447
  if (first !== void 0) {
2443
2448
  onSetActiveSlideIndex(first);
2444
2449
  }
@@ -2518,7 +2523,7 @@ function usePresentationMode(input) {
2518
2523
  if (mode !== "present") {
2519
2524
  return;
2520
2525
  }
2521
- return chunkG3JPCRKN_js.attachPresentationVisibilityPause({
2526
+ return chunk2Q2NFPXA_js.attachPresentationVisibilityPause({
2522
2527
  root: containerRef.current ?? void 0,
2523
2528
  onHidden: () => clearPresentationTimersRef.current(),
2524
2529
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2526,7 +2531,7 @@ function usePresentationMode(input) {
2526
2531
  }, [mode, containerRef]);
2527
2532
  react.useLayoutEffect(() => {
2528
2533
  if (mode === "present") {
2529
- const idx = chunkG3JPCRKN_js.presentationEntrySlideIndex(
2534
+ const idx = chunk2Q2NFPXA_js.presentationEntrySlideIndex(
2530
2535
  activeSlideIndexRef.current,
2531
2536
  visibleSlideIndexesRef.current
2532
2537
  );
@@ -2605,11 +2610,11 @@ function usePresentationMode(input) {
2605
2610
  return void 0;
2606
2611
  }
2607
2612
  const incoming = slides[transitionOverlay.incomingSlideIndex];
2608
- return chunkG3JPCRKN_js.buildMorphTransitionPlan(
2613
+ return chunk2Q2NFPXA_js.buildMorphTransitionPlan(
2609
2614
  slides[transitionOverlay.outgoingSlideIndex],
2610
2615
  incoming,
2611
2616
  transitionOverlay.durationMs,
2612
- chunkG3JPCRKN_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2617
+ chunk2Q2NFPXA_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2613
2618
  // `PresentationStage` stacks the incoming slide's elements above its
2614
2619
  // template shapes (`zIndex = templateElements.length + index`), so a
2615
2620
  // z-index journey has to start counting where the stage does.
@@ -2634,7 +2639,7 @@ function usePresentationMode(input) {
2634
2639
  if (!morphPlan) {
2635
2640
  return presentationKeyframesCss;
2636
2641
  }
2637
- const imageRules = chunkG3JPCRKN_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2642
+ const imageRules = chunk2Q2NFPXA_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2638
2643
  return `${presentationKeyframesCss ?? ""}
2639
2644
  ${morphPlan.keyframesCss}
2640
2645
  ${imageRules}`;
@@ -2931,7 +2936,7 @@ function useFindReplace({
2931
2936
  const [findResults, setFindResults] = react.useState([]);
2932
2937
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2933
2938
  const performFind = react.useCallback(() => {
2934
- const results = chunkG3JPCRKN_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2939
+ const results = chunk2Q2NFPXA_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2935
2940
  if (!findQuery) {
2936
2941
  setFindResults([]);
2937
2942
  setFindResultIndex(-1);
@@ -2965,7 +2970,7 @@ function useFindReplace({
2965
2970
  return;
2966
2971
  }
2967
2972
  onUpdateSlides(
2968
- (prevSlides) => chunkG3JPCRKN_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2973
+ (prevSlides) => chunk2Q2NFPXA_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2969
2974
  );
2970
2975
  onMarkDirty();
2971
2976
  },
@@ -2987,9 +2992,9 @@ function useFindReplace({
2987
2992
  }, [findResults, applyReplacements, performFind]);
2988
2993
  react.useEffect(() => {
2989
2994
  const handler = (event) => {
2990
- const { action } = chunkG3JPCRKN_js.mapEditorKey(event, {
2995
+ const { action } = chunk2Q2NFPXA_js.mapEditorKey(event, {
2991
2996
  canEdit: mode === "edit",
2992
- isTextInputTarget: chunkG3JPCRKN_js.isEditorTextInputTarget(event.target)
2997
+ isTextInputTarget: chunk2Q2NFPXA_js.isEditorTextInputTarget(event.target)
2993
2998
  });
2994
2999
  if (action !== "find") {
2995
3000
  return;
@@ -3100,7 +3105,7 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3100
3105
  if (!slide) {
3101
3106
  return { slides, didAdd: false };
3102
3107
  }
3103
- const next = chunkG3JPCRKN_js.addCommentToList(
3108
+ const next = chunk2Q2NFPXA_js.addCommentToList(
3104
3109
  slide.comments || [],
3105
3110
  text,
3106
3111
  authorName,
@@ -3121,7 +3126,7 @@ function removeCommentFromSlide(slides, slideIndex, commentId) {
3121
3126
  if (!slide) {
3122
3127
  return { slides, didDelete: false };
3123
3128
  }
3124
- const next = chunkG3JPCRKN_js.removeCommentFromList(slide.comments || [], commentId);
3129
+ const next = chunk2Q2NFPXA_js.removeCommentFromList(slide.comments || [], commentId);
3125
3130
  if (!next) {
3126
3131
  return { slides, didDelete: false };
3127
3132
  }
@@ -3132,7 +3137,7 @@ function editCommentInSlide(slides, slideIndex, commentId, newText) {
3132
3137
  if (!slide) {
3133
3138
  return { slides, didUpdate: false };
3134
3139
  }
3135
- const next = chunkG3JPCRKN_js.editCommentInList(slide.comments || [], commentId, newText);
3140
+ const next = chunk2Q2NFPXA_js.editCommentInList(slide.comments || [], commentId, newText);
3136
3141
  if (!next) {
3137
3142
  return { slides, didUpdate: false };
3138
3143
  }
@@ -3143,7 +3148,7 @@ function toggleResolvedInSlide(slides, slideIndex, commentId) {
3143
3148
  if (!slide) {
3144
3149
  return { slides, didUpdate: false };
3145
3150
  }
3146
- const next = chunkG3JPCRKN_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3151
+ const next = chunk2Q2NFPXA_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3147
3152
  if (!next) {
3148
3153
  return { slides, didUpdate: false };
3149
3154
  }
@@ -3154,7 +3159,7 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3154
3159
  if (!slide) {
3155
3160
  return { slides, didAdd: false };
3156
3161
  }
3157
- const next = chunkG3JPCRKN_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3162
+ const next = chunk2Q2NFPXA_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3158
3163
  if (!next) {
3159
3164
  return { slides, didAdd: false };
3160
3165
  }
@@ -3541,7 +3546,7 @@ function useDerivedElementState(input) {
3541
3546
  return [];
3542
3547
  }
3543
3548
  return [
3544
- ...chunkG3JPCRKN_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3549
+ ...chunk2Q2NFPXA_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3545
3550
  ];
3546
3551
  }, [activeSlide, templateElementsBySlideId]);
3547
3552
  const activeMaster = slideMasters[activeMasterIndex];
@@ -3608,7 +3613,7 @@ function useViewerCoreState(_input) {
3608
3613
  const marqueeStateRef = react.useRef(null);
3609
3614
  const isDrawingRef = react.useRef(false);
3610
3615
  const justInteractedRef = react.useRef(false);
3611
- const livePatcher = react.useMemo(() => chunkG3JPCRKN_js.createCollaborationLivePatcher(), []);
3616
+ const livePatcher = react.useMemo(() => chunk2Q2NFPXA_js.createCollaborationLivePatcher(), []);
3612
3617
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3613
3618
  const slidesRef = react.useRef([]);
3614
3619
  const [mode, setMode] = react.useState("edit");
@@ -3617,8 +3622,8 @@ function useViewerCoreState(_input) {
3617
3622
  const [slides, setSlides] = react.useState([]);
3618
3623
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3619
3624
  const [canvasSize, setCanvasSize] = react.useState({
3620
- width: chunkLBJAVP3H_js.DEFAULT_CANVAS_WIDTH,
3621
- height: chunkLBJAVP3H_js.DEFAULT_CANVAS_HEIGHT
3625
+ width: chunkXW46A7DN_js.DEFAULT_CANVAS_WIDTH,
3626
+ height: chunkXW46A7DN_js.DEFAULT_CANVAS_HEIGHT
3622
3627
  });
3623
3628
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3624
3629
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3639,7 +3644,7 @@ function useViewerCoreState(_input) {
3639
3644
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3640
3645
  inlineEditingTextRef.current = resolved;
3641
3646
  setInlineEditingTextBase(value);
3642
- chunkG3JPCRKN_js.publishLiveInlineText(
3647
+ chunk2Q2NFPXA_js.publishLiveInlineText(
3643
3648
  livePatcher,
3644
3649
  slidesRef.current[activeSlideIndexRef.current],
3645
3650
  inlineEditingElementIdRef.current,
@@ -4002,7 +4007,7 @@ function useLoadContent({
4002
4007
  );
4003
4008
  }
4004
4009
  const previousHandler = handlerRef.current;
4005
- const handler = new chunkG3JPCRKN_js.PptxHandler();
4010
+ const handler = new chunk2Q2NFPXA_js.PptxHandler();
4006
4011
  const parsed = await handler.load(buffer, { allowExternalImages });
4007
4012
  if (cancelled || token !== renderTokenRef.current) {
4008
4013
  handler.dispose();
@@ -4014,7 +4019,7 @@ function useLoadContent({
4014
4019
  handlerRef.current = null;
4015
4020
  const mediaElements = [];
4016
4021
  for (const slide of parsed.slides) {
4017
- chunkG3JPCRKN_js.collectMediaElements(slide.elements, mediaElements);
4022
+ chunk2Q2NFPXA_js.collectMediaElements(slide.elements, mediaElements);
4018
4023
  }
4019
4024
  for (const url of mediaDataUrls.values()) {
4020
4025
  if (url.startsWith("blob:")) {
@@ -4024,7 +4029,7 @@ function useLoadContent({
4024
4029
  mediaDataUrls.clear();
4025
4030
  await Promise.all(
4026
4031
  mediaElements.map(async (mediaElement) => {
4027
- const resolved = await chunkG3JPCRKN_js.resolveMediaElementSource(mediaElement, handler);
4032
+ const resolved = await chunk2Q2NFPXA_js.resolveMediaElementSource(mediaElement, handler);
4028
4033
  if (resolved.missing || !resolved.mediaPath || !resolved.url) {
4029
4034
  mediaElement.mediaMissing = true;
4030
4035
  return;
@@ -4035,7 +4040,7 @@ function useLoadContent({
4035
4040
  }
4036
4041
  })
4037
4042
  );
4038
- const { paths: imagePaths, refs: imageRefs } = chunkG3JPCRKN_js.collectImagePaths(parsed.slides);
4043
+ const { paths: imagePaths, refs: imageRefs } = chunk2Q2NFPXA_js.collectImagePaths(parsed.slides);
4039
4044
  let nextSlides = parsed.slides;
4040
4045
  if (imagePaths.size > 0) {
4041
4046
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4051,25 +4056,25 @@ function useLoadContent({
4051
4056
  })
4052
4057
  );
4053
4058
  nextSlides = parsed.slides.map((s) => {
4054
- const newElements = chunkG3JPCRKN_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4059
+ const newElements = chunk2Q2NFPXA_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4055
4060
  return newElements === s.elements ? s : { ...s, elements: newElements };
4056
4061
  });
4057
4062
  }
4058
- nextSlides = await chunkG3JPCRKN_js.resolveTableCellImageUrls(
4063
+ nextSlides = await chunk2Q2NFPXA_js.resolveTableCellImageUrls(
4059
4064
  nextSlides,
4060
4065
  (path) => handler.getImageData(path)
4061
4066
  );
4062
- const nextTableStyleMap = await chunkG3JPCRKN_js.resolveTableStyleImageUrls(
4067
+ const nextTableStyleMap = await chunk2Q2NFPXA_js.resolveTableStyleImageUrls(
4063
4068
  parsed.tableStyleMap,
4064
4069
  (path) => handler.getImageData(path)
4065
4070
  );
4066
4071
  handlerRef.current = handler;
4067
- const partition = chunkG3JPCRKN_js.partitionTemplateElements(nextSlides);
4072
+ const partition = chunk2Q2NFPXA_js.partitionTemplateElements(nextSlides);
4068
4073
  setSlides(partition.slides);
4069
4074
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4070
4075
  setCanvasSize({
4071
- width: parsed.width ?? chunkLBJAVP3H_js.DEFAULT_CANVAS_WIDTH,
4072
- height: parsed.height ?? chunkLBJAVP3H_js.DEFAULT_CANVAS_HEIGHT
4076
+ width: parsed.width ?? chunkXW46A7DN_js.DEFAULT_CANVAS_WIDTH,
4077
+ height: parsed.height ?? chunkXW46A7DN_js.DEFAULT_CANVAS_HEIGHT
4073
4078
  });
4074
4079
  setSlideSizeEmu(
4075
4080
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4082,7 +4087,7 @@ function useLoadContent({
4082
4087
  setLayoutOptions(parsed.layoutOptions ?? []);
4083
4088
  setSlideMasters(parsed.slideMasters ?? []);
4084
4089
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
4085
- setRecentColors(chunkG3JPCRKN_js.seedRecentColors({ mruColors: parsed.mruColors }));
4090
+ setRecentColors(chunk2Q2NFPXA_js.seedRecentColors({ mruColors: parsed.mruColors }));
4086
4091
  setTheme(parsed.theme);
4087
4092
  setTableStyleMap(nextTableStyleMap);
4088
4093
  setTableStylesDefaultId(parsed.tableStylesDefaultId);
@@ -4090,7 +4095,7 @@ function useLoadContent({
4090
4095
  setThemeOptions(parsed.themeOptions ?? []);
4091
4096
  setCustomShows(parsed.customShows ?? []);
4092
4097
  setActiveCustomShowId(
4093
- chunkG3JPCRKN_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4098
+ chunk2Q2NFPXA_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4094
4099
  );
4095
4100
  setSections(parsed.sections ?? []);
4096
4101
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -4113,11 +4118,11 @@ function useLoadContent({
4113
4118
  setHasMacros(parsed.hasMacros === true);
4114
4119
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4115
4120
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4116
- setGuides(chunkG3JPCRKN_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4117
- setReadOnlyRecommendation(chunkG3JPCRKN_js.readOnlyRecommendation(parsed));
4121
+ setGuides(chunk2Q2NFPXA_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4122
+ setReadOnlyRecommendation(chunk2Q2NFPXA_js.readOnlyRecommendation(parsed));
4118
4123
  setModifyVerifier(parsed.modifyVerifier ?? void 0);
4119
4124
  setCompatToasts(
4120
- chunkG3JPCRKN_js.compatibilityWarningToasts([
4125
+ chunk2Q2NFPXA_js.compatibilityWarningToasts([
4121
4126
  ...parsed.warnings ?? [],
4122
4127
  ...parsed.slides.flatMap((slide) => slide.warnings ?? [])
4123
4128
  ])
@@ -4129,7 +4134,7 @@ function useLoadContent({
4129
4134
  onContentApplied?.();
4130
4135
  } catch (err) {
4131
4136
  if (!cancelled && token === renderTokenRef.current) {
4132
- if (err instanceof chunkG3JPCRKN_js.EncryptedFileError) {
4137
+ if (err instanceof chunk2Q2NFPXA_js.EncryptedFileError) {
4133
4138
  setIsEncrypted(true);
4134
4139
  } else {
4135
4140
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4157,7 +4162,7 @@ function useLoadContent({
4157
4162
  }
4158
4163
  function useAutosave(input) {
4159
4164
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4160
- const intervalMs = chunkG3JPCRKN_js.resolveAutosaveIntervalMs({
4165
+ const intervalMs = chunk2Q2NFPXA_js.resolveAutosaveIntervalMs({
4161
4166
  hostIntervalMs: input.intervalMs,
4162
4167
  optionsIntervalSeconds: input.intervalSeconds
4163
4168
  });
@@ -4188,7 +4193,7 @@ function useAutosave(input) {
4188
4193
  return;
4189
4194
  }
4190
4195
  const sources = changeSourcesRef.current?.() ?? [];
4191
- if (!chunkG3JPCRKN_js.shouldWriteAutosaveSnapshot({
4196
+ if (!chunk2Q2NFPXA_js.shouldWriteAutosaveSnapshot({
4192
4197
  filePath: path,
4193
4198
  isDirty: isDirtyRef.current,
4194
4199
  saving: isSavingRef.current,
@@ -4206,8 +4211,8 @@ function useAutosave(input) {
4206
4211
  isSavingRef.current = false;
4207
4212
  return;
4208
4213
  }
4209
- await chunkG3JPCRKN_js.saveAutosaveSnapshot(path, data);
4210
- lastSnapshotRef.current = chunkG3JPCRKN_js.autosaveSnapshotMark(path, sources);
4214
+ await chunk2Q2NFPXA_js.saveAutosaveSnapshot(path, data);
4215
+ lastSnapshotRef.current = chunk2Q2NFPXA_js.autosaveSnapshotMark(path, sources);
4211
4216
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4212
4217
  } catch (err) {
4213
4218
  setAutosaveStatus({
@@ -4261,13 +4266,13 @@ function useElementOperations(input) {
4261
4266
  inlineEditingText
4262
4267
  } = input;
4263
4268
  const liveTextSegments = react.useCallback(() => {
4264
- if (!selectedElement || !chunkG3JPCRKN_js.hasTextProperties(selectedElement)) {
4269
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasTextProperties(selectedElement)) {
4265
4270
  return void 0;
4266
4271
  }
4267
4272
  if (selectedElement.id !== inlineEditingElementId) {
4268
4273
  return selectedElement.textSegments;
4269
4274
  }
4270
- return chunkG3JPCRKN_js.remapTextToSegments(
4275
+ return chunk2Q2NFPXA_js.remapTextToSegments(
4271
4276
  inlineEditingText,
4272
4277
  selectedElement.textSegments,
4273
4278
  selectedElement.textStyle
@@ -4308,11 +4313,11 @@ function useElementOperations(input) {
4308
4313
  (elementId, updates) => {
4309
4314
  if (masterView?.target) {
4310
4315
  applyMasterViewWrite(
4311
- chunkG3JPCRKN_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4316
+ chunk2Q2NFPXA_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4312
4317
  );
4313
4318
  return;
4314
4319
  }
4315
- if (chunkG3JPCRKN_js.isTemplateElementId(elementId)) {
4320
+ if (chunk2Q2NFPXA_js.isTemplateElementId(elementId)) {
4316
4321
  const slideId = activeSlide?.id;
4317
4322
  if (slideId) {
4318
4323
  setTemplateElementsBySlideId((prev) => ({
@@ -4323,7 +4328,7 @@ function useElementOperations(input) {
4323
4328
  }));
4324
4329
  }
4325
4330
  } else {
4326
- setSlides((prev) => chunkG3JPCRKN_js.updateElement(prev, activeSlideIndex, elementId, updates));
4331
+ setSlides((prev) => chunk2Q2NFPXA_js.updateElement(prev, activeSlideIndex, elementId, updates));
4327
4332
  }
4328
4333
  history.markDirty();
4329
4334
  },
@@ -4348,7 +4353,7 @@ function useElementOperations(input) {
4348
4353
  );
4349
4354
  const updateSelectedShapeStyle = react.useCallback(
4350
4355
  (updates) => {
4351
- if (!selectedElement || !chunkG3JPCRKN_js.hasShapeProperties(selectedElement)) {
4356
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasShapeProperties(selectedElement)) {
4352
4357
  return;
4353
4358
  }
4354
4359
  updateSelectedElement({
@@ -4359,19 +4364,19 @@ function useElementOperations(input) {
4359
4364
  );
4360
4365
  const updateSelectedTextStyle = react.useCallback(
4361
4366
  (updates) => {
4362
- if (!selectedElement || !chunkG3JPCRKN_js.hasTextProperties(selectedElement)) {
4367
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasTextProperties(selectedElement)) {
4363
4368
  return;
4364
4369
  }
4365
4370
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4366
4371
  const currentSegments = liveTextSegments();
4367
- const inlineSel = chunkG3JPCRKN_js.getInlineEditorSelection(currentSegments);
4372
+ const inlineSel = chunk2Q2NFPXA_js.getInlineEditorSelection(currentSegments);
4368
4373
  if (inlineSel && currentSegments) {
4369
- const { newSegments: newSegments2, newSelection } = chunkG3JPCRKN_js.applyStyleToSelectedSegments(
4374
+ const { newSegments: newSegments2, newSelection } = chunk2Q2NFPXA_js.applyStyleToSelectedSegments(
4370
4375
  currentSegments,
4371
4376
  inlineSel,
4372
4377
  updates
4373
4378
  );
4374
- chunkG3JPCRKN_js.setPendingSelectionRestore(newSelection);
4379
+ chunk2Q2NFPXA_js.setPendingSelectionRestore(newSelection);
4375
4380
  updateSelectedElement({
4376
4381
  textSegments: newSegments2,
4377
4382
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4399,14 +4404,14 @@ function useElementOperations(input) {
4399
4404
  );
4400
4405
  const updateSelectedTextCase = react.useCallback(
4401
4406
  (mode) => {
4402
- if (!selectedElement || !chunkG3JPCRKN_js.hasTextProperties(selectedElement)) {
4407
+ if (!selectedElement || !chunk2Q2NFPXA_js.hasTextProperties(selectedElement)) {
4403
4408
  return;
4404
4409
  }
4405
4410
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4406
4411
  const currentSegments = liveTextSegments();
4407
- const inlineSel = chunkG3JPCRKN_js.getInlineEditorSelection(currentSegments);
4412
+ const inlineSel = chunk2Q2NFPXA_js.getInlineEditorSelection(currentSegments);
4408
4413
  if (inlineSel && currentSegments) {
4409
- const newSegments = chunkG3JPCRKN_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4414
+ const newSegments = chunk2Q2NFPXA_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4410
4415
  updateSelectedElement({
4411
4416
  textSegments: newSegments,
4412
4417
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4415,7 +4420,7 @@ function useElementOperations(input) {
4415
4420
  }
4416
4421
  const updates = {};
4417
4422
  if (currentSegments && currentSegments.length > 0) {
4418
- updates.textSegments = chunkG3JPCRKN_js.applyCaseTransformToSegments(
4423
+ updates.textSegments = chunk2Q2NFPXA_js.applyCaseTransformToSegments(
4419
4424
  currentSegments,
4420
4425
  null,
4421
4426
  mode
@@ -4423,7 +4428,7 @@ function useElementOperations(input) {
4423
4428
  }
4424
4429
  const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
4425
4430
  if (typeof baseText === "string") {
4426
- updates.text = chunkG3JPCRKN_js.transformTextCase(baseText, mode);
4431
+ updates.text = chunk2Q2NFPXA_js.transformTextCase(baseText, mode);
4427
4432
  }
4428
4433
  updateSelectedElement(updates);
4429
4434
  },
@@ -4442,15 +4447,15 @@ function useElementOperations(input) {
4442
4447
  [setSlides]
4443
4448
  );
4444
4449
  const masterViewTarget = masterView?.target ?? null;
4445
- const activeElements = masterViewTarget ? chunkG3JPCRKN_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4450
+ const activeElements = masterViewTarget ? chunk2Q2NFPXA_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4446
4451
  const updateActiveElements = react.useCallback(
4447
4452
  (updater) => {
4448
4453
  if (masterView?.target) {
4449
4454
  applyMasterViewWrite(
4450
- chunkG3JPCRKN_js.replaceMasterViewElements(
4455
+ chunk2Q2NFPXA_js.replaceMasterViewElements(
4451
4456
  masterView,
4452
4457
  masterView.target,
4453
- updater(chunkG3JPCRKN_js.masterViewElements(masterView, masterView.target))
4458
+ updater(chunk2Q2NFPXA_js.masterViewElements(masterView, masterView.target))
4454
4459
  )
4455
4460
  );
4456
4461
  return;
@@ -4503,7 +4508,7 @@ function useSectionOperations(input) {
4503
4508
  const { sections, setSections, slides, setSlides, markDirty } = input;
4504
4509
  const addSection2 = react.useCallback(
4505
4510
  (name, afterSlideIndex) => {
4506
- const result = chunkG3JPCRKN_js.addSection(sections, slides, name, afterSlideIndex);
4511
+ const result = chunk2Q2NFPXA_js.addSection(sections, slides, name, afterSlideIndex);
4507
4512
  setSlides(result.slides);
4508
4513
  setSections(result.sections);
4509
4514
  markDirty();
@@ -4512,7 +4517,7 @@ function useSectionOperations(input) {
4512
4517
  );
4513
4518
  const renameSection2 = react.useCallback(
4514
4519
  (sectionId, newName) => {
4515
- const result = chunkG3JPCRKN_js.renameSection(sections, slides, sectionId, newName);
4520
+ const result = chunk2Q2NFPXA_js.renameSection(sections, slides, sectionId, newName);
4516
4521
  setSections(result.sections);
4517
4522
  setSlides(result.slides);
4518
4523
  markDirty();
@@ -4521,7 +4526,7 @@ function useSectionOperations(input) {
4521
4526
  );
4522
4527
  const deleteSection2 = react.useCallback(
4523
4528
  (sectionId) => {
4524
- const result = chunkG3JPCRKN_js.deleteSection(sections, slides, sectionId);
4529
+ const result = chunk2Q2NFPXA_js.deleteSection(sections, slides, sectionId);
4525
4530
  setSections(result.sections);
4526
4531
  setSlides(result.slides);
4527
4532
  markDirty();
@@ -4530,21 +4535,21 @@ function useSectionOperations(input) {
4530
4535
  );
4531
4536
  const moveSectionUp2 = react.useCallback(
4532
4537
  (sectionId) => {
4533
- setSections(chunkG3JPCRKN_js.moveSectionUp(sections, sectionId));
4538
+ setSections(chunk2Q2NFPXA_js.moveSectionUp(sections, sectionId));
4534
4539
  markDirty();
4535
4540
  },
4536
4541
  [sections, setSections, markDirty]
4537
4542
  );
4538
4543
  const moveSectionDown2 = react.useCallback(
4539
4544
  (sectionId) => {
4540
- setSections(chunkG3JPCRKN_js.moveSectionDown(sections, sectionId));
4545
+ setSections(chunk2Q2NFPXA_js.moveSectionDown(sections, sectionId));
4541
4546
  markDirty();
4542
4547
  },
4543
4548
  [sections, setSections, markDirty]
4544
4549
  );
4545
4550
  const moveSlidesToSection2 = react.useCallback(
4546
4551
  (slideIndexes, targetSectionId) => {
4547
- const result = chunkG3JPCRKN_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4552
+ const result = chunk2Q2NFPXA_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4548
4553
  setSlides(result.slides);
4549
4554
  setSections(result.sections);
4550
4555
  markDirty();
@@ -4610,15 +4615,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
4610
4615
  // src/viewer/hooks/pointer-move-handlers.ts
4611
4616
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
4612
4617
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
4613
- let resized = chunkG3JPCRKN_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkLBJAVP3H_js.MIN_ELEMENT_SIZE });
4618
+ let resized = chunk2Q2NFPXA_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkXW46A7DN_js.MIN_ELEMENT_SIZE });
4614
4619
  if (lockAspect) {
4615
- resized = chunkG3JPCRKN_js.lockResizeAspect(resized, startBox, handle, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE);
4620
+ resized = chunk2Q2NFPXA_js.lockResizeAspect(resized, startBox, handle, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4616
4621
  }
4617
4622
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4618
4623
  if (!snapToGrid) {
4619
4624
  return box;
4620
4625
  }
4621
- return chunkG3JPCRKN_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE);
4626
+ return chunk2Q2NFPXA_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4622
4627
  }
4623
4628
  function resolveLiveTarget(input) {
4624
4629
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4731,7 +4736,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4731
4736
  width: el.width,
4732
4737
  height: el.height
4733
4738
  }));
4734
- const snapResult = chunkG3JPCRKN_js.computeSnapToShape(
4739
+ const snapResult = chunk2Q2NFPXA_js.computeSnapToShape(
4735
4740
  targetX,
4736
4741
  targetY,
4737
4742
  primaryEl.width,
@@ -4773,7 +4778,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4773
4778
  if (live) {
4774
4779
  for (const id of Object.keys(drag.startPositionsById)) {
4775
4780
  const start = drag.startPositionsById[id];
4776
- chunkG3JPCRKN_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4781
+ chunk2Q2NFPXA_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4777
4782
  x: start.x + appliedDx,
4778
4783
  y: start.y + appliedDy
4779
4784
  });
@@ -4805,8 +4810,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4805
4810
  rs.lastY = geo.y;
4806
4811
  rs.lastWidth = geo.width;
4807
4812
  rs.lastHeight = geo.height;
4808
- const width = Math.max(geo.width, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE);
4809
- const height = Math.max(geo.height, chunkLBJAVP3H_js.MIN_ELEMENT_SIZE);
4813
+ const width = Math.max(geo.width, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4814
+ const height = Math.max(geo.height, chunkXW46A7DN_js.MIN_ELEMENT_SIZE);
4810
4815
  if (rs.domEl) {
4811
4816
  rs.domEl.style.left = `${geo.x}px`;
4812
4817
  rs.domEl.style.top = `${geo.y}px`;
@@ -4815,7 +4820,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4815
4820
  syncSelectionHandleOverlay(rs.domEl, rs.elementId, { x: geo.x, y: geo.y, width, height });
4816
4821
  }
4817
4822
  if (live) {
4818
- chunkG3JPCRKN_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4823
+ chunk2Q2NFPXA_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4819
4824
  x: geo.x,
4820
4825
  y: geo.y,
4821
4826
  width,
@@ -4826,7 +4831,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4826
4831
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4827
4832
  const dx = (e.clientX - adj.startClientX) / editorScale;
4828
4833
  const dy = (e.clientY - adj.startClientY) / editorScale;
4829
- const adjustments = chunkG3JPCRKN_js.getDraggedShapeAdjustments(adj, dx, dy);
4834
+ const adjustments = chunk2Q2NFPXA_js.getDraggedShapeAdjustments(adj, dx, dy);
4830
4835
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4831
4836
  adj.moved = true;
4832
4837
  }
@@ -4901,13 +4906,13 @@ function processPointerUp(input) {
4901
4906
  if (i !== activeSlideIndex) {
4902
4907
  return s;
4903
4908
  }
4904
- const rerouted = chunkG3JPCRKN_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4909
+ const rerouted = chunk2Q2NFPXA_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4905
4910
  if (rerouted.length === 0) {
4906
4911
  return s;
4907
4912
  }
4908
4913
  return {
4909
4914
  ...s,
4910
- elements: chunkG3JPCRKN_js.applyReroutedConnectors(s.elements, rerouted)
4915
+ elements: chunk2Q2NFPXA_js.applyReroutedConnectors(s.elements, rerouted)
4911
4916
  };
4912
4917
  })
4913
4918
  );
@@ -4932,9 +4937,9 @@ function processPointerUp(input) {
4932
4937
  }
4933
4938
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4934
4939
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4935
- const hitIds = chunkG3JPCRKN_js.computeMarqueeHitIds(marquee, sourceElements);
4940
+ const hitIds = chunk2Q2NFPXA_js.computeMarqueeHitIds(marquee, sourceElements);
4936
4941
  if (marquee.additive) {
4937
- const merged = chunkG3JPCRKN_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4942
+ const merged = chunk2Q2NFPXA_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4938
4943
  if (merged.length > 0) {
4939
4944
  applySelection(merged[0], merged);
4940
4945
  } else {
@@ -4957,8 +4962,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4957
4962
  }
4958
4963
  return { ...el, x: start.x + dx, y: start.y + dy };
4959
4964
  });
4960
- const rerouted = chunkG3JPCRKN_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4961
- return chunkG3JPCRKN_js.applyReroutedConnectors(movedElements, rerouted);
4965
+ const rerouted = chunk2Q2NFPXA_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4966
+ return chunk2Q2NFPXA_js.applyReroutedConnectors(movedElements, rerouted);
4962
4967
  };
4963
4968
  if (editTemplateMode) {
4964
4969
  const slideId = activeSlide?.id;
@@ -5114,12 +5119,12 @@ function useCanvasInteractions(input) {
5114
5119
  return;
5115
5120
  }
5116
5121
  const el = elementLookup.get(editId);
5117
- if (el && chunkG3JPCRKN_js.hasTextProperties(el)) {
5122
+ if (el && chunk2Q2NFPXA_js.hasTextProperties(el)) {
5118
5123
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
5119
- const newSegments = chunkG3JPCRKN_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
5124
+ const newSegments = chunk2Q2NFPXA_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
5120
5125
  const editorEl = document.querySelector("[data-inline-editor]");
5121
- const newHeight = chunkG3JPCRKN_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5122
- const shrink = chunkG3JPCRKN_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5126
+ const newHeight = chunk2Q2NFPXA_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5127
+ const shrink = chunk2Q2NFPXA_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5123
5128
  ops.updateElementById(editId, {
5124
5129
  text: committedText,
5125
5130
  textSegments: newSegments,
@@ -5138,7 +5143,7 @@ function useCanvasInteractions(input) {
5138
5143
  setInlineEditingText("");
5139
5144
  };
5140
5145
  const openEquationEditorForElement = (el) => {
5141
- if (!chunkG3JPCRKN_js.hasTextProperties(el)) {
5146
+ if (!chunk2Q2NFPXA_js.hasTextProperties(el)) {
5142
5147
  return false;
5143
5148
  }
5144
5149
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5168,7 +5173,7 @@ function useCanvasInteractions(input) {
5168
5173
  justInteractedRef.current = false;
5169
5174
  } else {
5170
5175
  const el = elementLookup.get(elementId);
5171
- if (el && chunkG3JPCRKN_js.hasTextProperties(el) && chunkG3JPCRKN_js.canInteractWithElement(el, "textEdit")) {
5176
+ if (el && chunk2Q2NFPXA_js.hasTextProperties(el) && chunk2Q2NFPXA_js.canInteractWithElement(el, "textEdit")) {
5172
5177
  if (!openEquationEditorForElement(el)) {
5173
5178
  setInlineEditingElementId(elementId);
5174
5179
  setInlineEditingText(el.text ?? "");
@@ -5187,7 +5192,7 @@ function useCanvasInteractions(input) {
5187
5192
  if (openEquationEditorForElement(el)) {
5188
5193
  return;
5189
5194
  }
5190
- if (chunkG3JPCRKN_js.hasTextProperties(el) && chunkG3JPCRKN_js.canInteractWithElement(el, "textEdit")) {
5195
+ if (chunk2Q2NFPXA_js.hasTextProperties(el) && chunk2Q2NFPXA_js.canInteractWithElement(el, "textEdit")) {
5191
5196
  setInlineEditingElementId(elementId);
5192
5197
  setInlineEditingText(el.text ?? "");
5193
5198
  }
@@ -5210,7 +5215,7 @@ function useCanvasInteractions(input) {
5210
5215
  justSelectedRef.current = false;
5211
5216
  }
5212
5217
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
5213
- const movableIds = chunkG3JPCRKN_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5218
+ const movableIds = chunk2Q2NFPXA_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5214
5219
  if (movableIds.length === 0) {
5215
5220
  return;
5216
5221
  }
@@ -5280,7 +5285,7 @@ function useCanvasInteractions(input) {
5280
5285
  const handleResizePointerDown = (elementId, e, handle) => {
5281
5286
  e.stopPropagation();
5282
5287
  const el = elementLookup.get(elementId);
5283
- if (!el || !chunkG3JPCRKN_js.canInteractWithElement(el, "resize")) {
5288
+ if (!el || !chunk2Q2NFPXA_js.canInteractWithElement(el, "resize")) {
5284
5289
  return;
5285
5290
  }
5286
5291
  resizeStateRef.current = {
@@ -5302,7 +5307,7 @@ function useCanvasInteractions(input) {
5302
5307
  };
5303
5308
  const handleRotate = (elementId, rotationDeg) => {
5304
5309
  const el = elementLookup.get(elementId);
5305
- if (!el || !chunkG3JPCRKN_js.canInteractWithElement(el, "rotate")) {
5310
+ if (!el || !chunk2Q2NFPXA_js.canInteractWithElement(el, "rotate")) {
5306
5311
  return;
5307
5312
  }
5308
5313
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5322,10 +5327,10 @@ function useCanvasInteractions(input) {
5322
5327
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5323
5328
  e.stopPropagation();
5324
5329
  const el = elementLookup.get(elementId);
5325
- if (!el || !chunkG3JPCRKN_js.canInteractWithElement(el, "adjustHandle")) {
5330
+ if (!el || !chunk2Q2NFPXA_js.canInteractWithElement(el, "adjustHandle")) {
5326
5331
  return;
5327
5332
  }
5328
- shapeAdjustmentDragStateRef.current = chunkG3JPCRKN_js.beginShapeAdjustment(
5333
+ shapeAdjustmentDragStateRef.current = chunk2Q2NFPXA_js.beginShapeAdjustment(
5329
5334
  el,
5330
5335
  descriptor,
5331
5336
  e.clientX,
@@ -5372,7 +5377,7 @@ function createFileHandlers(deps) {
5372
5377
  h = Math.round(h * scale);
5373
5378
  }
5374
5379
  addElement({
5375
- id: chunkG3JPCRKN_js.generateElementId(),
5380
+ id: chunk2Q2NFPXA_js.generateElementId(),
5376
5381
  type: "image",
5377
5382
  x: Math.round((canvasSize.width - w) / 2),
5378
5383
  y: Math.round((canvasSize.height - h) / 2),
@@ -5383,7 +5388,7 @@ function createFileHandlers(deps) {
5383
5388
  };
5384
5389
  img.onerror = () => {
5385
5390
  addElement({
5386
- id: chunkG3JPCRKN_js.generateElementId(),
5391
+ id: chunk2Q2NFPXA_js.generateElementId(),
5387
5392
  type: "image",
5388
5393
  x: 100,
5389
5394
  y: 100,
@@ -5402,14 +5407,14 @@ function createFileHandlers(deps) {
5402
5407
  return;
5403
5408
  }
5404
5409
  e.target.value = "";
5405
- const mediaType = chunkG3JPCRKN_js.classifyMediaType(file.type);
5410
+ const mediaType = chunk2Q2NFPXA_js.classifyMediaType(file.type);
5406
5411
  if (!mediaType) {
5407
5412
  return;
5408
5413
  }
5409
5414
  const elFilePath = file.path;
5410
5415
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5411
5416
  addElement({
5412
- id: chunkG3JPCRKN_js.generateElementId(),
5417
+ id: chunk2Q2NFPXA_js.generateElementId(),
5413
5418
  type: "media",
5414
5419
  mediaType,
5415
5420
  mediaMimeType: file.type || void 0,
@@ -5584,13 +5589,13 @@ function createStructuredElementHandlers(deps) {
5584
5589
  return;
5585
5590
  }
5586
5591
  addElement({
5587
- id: chunkG3JPCRKN_js.generateElementId(),
5592
+ id: chunk2Q2NFPXA_js.generateElementId(),
5588
5593
  type: "smartArt",
5589
5594
  x: 100,
5590
5595
  y: 120,
5591
5596
  width: 600,
5592
5597
  height: 340,
5593
- smartArtData: chunkG3JPCRKN_js.buildSmartArtPresetData(
5598
+ smartArtData: chunk2Q2NFPXA_js.buildSmartArtPresetData(
5594
5599
  layout,
5595
5600
  defaultItems,
5596
5601
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5602,7 +5607,7 @@ function createStructuredElementHandlers(deps) {
5602
5607
  return;
5603
5608
  }
5604
5609
  addElement({
5605
- id: chunkG3JPCRKN_js.generateElementId(),
5610
+ id: chunk2Q2NFPXA_js.generateElementId(),
5606
5611
  type: "shape",
5607
5612
  x: 120,
5608
5613
  y: 200,
@@ -5640,7 +5645,7 @@ function createStructuredElementHandlers(deps) {
5640
5645
  return;
5641
5646
  }
5642
5647
  const resolved = resolveHyperlinkEditResult(data);
5643
- if (resolved.url && !chunkG3JPCRKN_js.isUrlSafe(resolved.url)) {
5648
+ if (resolved.url && !chunk2Q2NFPXA_js.isUrlSafe(resolved.url)) {
5644
5649
  return;
5645
5650
  }
5646
5651
  const actionClick = {
@@ -5664,7 +5669,7 @@ function createStructuredElementHandlers(deps) {
5664
5669
  const displayText = value || fieldTexts[fieldType] || fieldType;
5665
5670
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5666
5671
  addElement({
5667
- id: chunkG3JPCRKN_js.generateElementId(),
5672
+ id: chunk2Q2NFPXA_js.generateElementId(),
5668
5673
  type: "shape",
5669
5674
  x: 120,
5670
5675
  y: 200,
@@ -5686,11 +5691,11 @@ function createStructuredElementHandlers(deps) {
5686
5691
  if (!activeSlide) {
5687
5692
  return;
5688
5693
  }
5689
- const preset = chunkG3JPCRKN_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5694
+ const preset = chunk2Q2NFPXA_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5690
5695
  if (!preset) {
5691
5696
  return;
5692
5697
  }
5693
- const defaultPptxAction = chunkG3JPCRKN_js.elementActionToPptxAction({
5698
+ const defaultPptxAction = chunk2Q2NFPXA_js.elementActionToPptxAction({
5694
5699
  trigger: "click",
5695
5700
  type: preset.defaultAction
5696
5701
  });
@@ -5699,7 +5704,7 @@ function createStructuredElementHandlers(deps) {
5699
5704
  defaultPptxAction.highlightClick = true;
5700
5705
  }
5701
5706
  addElement({
5702
- id: chunkG3JPCRKN_js.generateElementId(),
5707
+ id: chunk2Q2NFPXA_js.generateElementId(),
5703
5708
  type: "shape",
5704
5709
  x: 150,
5705
5710
  y: 150,
@@ -5766,14 +5771,14 @@ function useInsertElements(input) {
5766
5771
  return;
5767
5772
  }
5768
5773
  addElement({
5769
- id: chunkG3JPCRKN_js.generateElementId(),
5774
+ id: chunk2Q2NFPXA_js.generateElementId(),
5770
5775
  type: "text",
5771
5776
  x: 100,
5772
5777
  y: 100,
5773
5778
  width: 300,
5774
5779
  height: 60,
5775
5780
  text: "",
5776
- textStyle: { fontSize: chunkLBJAVP3H_js.DEFAULT_TEXT_FONT_SIZE }
5781
+ textStyle: { fontSize: chunkXW46A7DN_js.DEFAULT_TEXT_FONT_SIZE }
5777
5782
  });
5778
5783
  };
5779
5784
  const handleAddShape = () => {
@@ -5781,7 +5786,7 @@ function useInsertElements(input) {
5781
5786
  return;
5782
5787
  }
5783
5788
  addElement({
5784
- id: chunkG3JPCRKN_js.generateElementId(),
5789
+ id: chunk2Q2NFPXA_js.generateElementId(),
5785
5790
  type: "shape",
5786
5791
  x: 150,
5787
5792
  y: 150,
@@ -5800,15 +5805,15 @@ function useInsertElements(input) {
5800
5805
  return;
5801
5806
  }
5802
5807
  addElement({
5803
- ...chunkG3JPCRKN_js.newTableElement(chunkLBJAVP3H_js.DEFAULT_TABLE_ROWS, chunkLBJAVP3H_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5804
- id: chunkG3JPCRKN_js.generateElementId()
5808
+ ...chunk2Q2NFPXA_js.newTableElement(chunkXW46A7DN_js.DEFAULT_TABLE_ROWS, chunkXW46A7DN_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5809
+ id: chunk2Q2NFPXA_js.generateElementId()
5805
5810
  });
5806
5811
  };
5807
5812
  const handleAddChart = (chartKind) => {
5808
5813
  if (!activeSlide) {
5809
5814
  return;
5810
5815
  }
5811
- addElement(chunkG3JPCRKN_js.createDefaultChartElement(chartKind));
5816
+ addElement(chunk2Q2NFPXA_js.createDefaultChartElement(chartKind));
5812
5817
  };
5813
5818
  const structured = createStructuredElementHandlers({
5814
5819
  activeSlide,
@@ -5878,7 +5883,7 @@ function useClipboardHandlers(input) {
5878
5883
  if (!selectedElement) {
5879
5884
  return;
5880
5885
  }
5881
- setClipboardPayload(chunkG3JPCRKN_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5886
+ setClipboardPayload(chunk2Q2NFPXA_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5882
5887
  };
5883
5888
  const handleDelete = () => {
5884
5889
  const idsToDelete = effectiveSelectedIds;
@@ -5895,7 +5900,7 @@ function useClipboardHandlers(input) {
5895
5900
  handleDelete();
5896
5901
  };
5897
5902
  const insertClone = (source) => {
5898
- const clone = chunkG3JPCRKN_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5903
+ const clone = chunk2Q2NFPXA_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5899
5904
  ops.updateActiveElements((els) => [...els, clone]);
5900
5905
  ops.applySelection(clone.id);
5901
5906
  history.markDirty();
@@ -5930,7 +5935,7 @@ function resolveShapePath(el) {
5930
5935
  return el.pathData;
5931
5936
  }
5932
5937
  if ("shapeType" in el && typeof el.shapeType === "string") {
5933
- const clipPath = chunkG3JPCRKN_js.getPresetShapeClipPath(el.shapeType);
5938
+ const clipPath = chunk2Q2NFPXA_js.getPresetShapeClipPath(el.shapeType);
5934
5939
  if (clipPath) {
5935
5940
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5936
5941
  if (svgPath) {
@@ -5981,7 +5986,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5981
5986
  return parts.join(" ");
5982
5987
  }
5983
5988
  function transformPathToGlobal(pathData, el) {
5984
- const polys = chunkG3JPCRKN_js.svgPathToPolygons(pathData);
5989
+ const polys = chunk2Q2NFPXA_js.svgPathToPolygons(pathData);
5985
5990
  if (polys.length === 0) {
5986
5991
  return pathData;
5987
5992
  }
@@ -6001,10 +6006,10 @@ function transformPathToGlobal(pathData, el) {
6001
6006
  y: pt.y * scaleY + el.y
6002
6007
  }))
6003
6008
  );
6004
- return chunkG3JPCRKN_js.polygonsToSvgPath(transformed);
6009
+ return chunk2Q2NFPXA_js.polygonsToSvgPath(transformed);
6005
6010
  }
6006
6011
  function transformPathToLocal(pathData, x, y, _width, _height) {
6007
- const polys = chunkG3JPCRKN_js.svgPathToPolygons(pathData);
6012
+ const polys = chunk2Q2NFPXA_js.svgPathToPolygons(pathData);
6008
6013
  if (polys.length === 0) {
6009
6014
  return pathData;
6010
6015
  }
@@ -6014,10 +6019,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
6014
6019
  y: pt.y - y
6015
6020
  }))
6016
6021
  );
6017
- return chunkG3JPCRKN_js.polygonsToSvgPath(transformed);
6022
+ return chunk2Q2NFPXA_js.polygonsToSvgPath(transformed);
6018
6023
  }
6019
6024
  function pathBounds(pathData) {
6020
- const polys = chunkG3JPCRKN_js.svgPathToPolygons(pathData);
6025
+ const polys = chunk2Q2NFPXA_js.svgPathToPolygons(pathData);
6021
6026
  let minX = Infinity;
6022
6027
  let minY = Infinity;
6023
6028
  let maxX = -Infinity;
@@ -6076,7 +6081,7 @@ function useMergeShapesHandler(input) {
6076
6081
  let allFragments = [];
6077
6082
  let remaining = globalPaths[0];
6078
6083
  for (let i = 1; i < globalPaths.length; i++) {
6079
- const frags = chunkG3JPCRKN_js.mergeShapes("fragment", remaining, globalPaths[i]);
6084
+ const frags = chunk2Q2NFPXA_js.mergeShapes("fragment", remaining, globalPaths[i]);
6080
6085
  if (Array.isArray(frags)) {
6081
6086
  allFragments = frags;
6082
6087
  }
@@ -6105,7 +6110,7 @@ function useMergeShapesHandler(input) {
6105
6110
  bounds.height
6106
6111
  );
6107
6112
  const newEl = {
6108
- id: chunkG3JPCRKN_js.generateElementId(),
6113
+ id: chunk2Q2NFPXA_js.generateElementId(),
6109
6114
  type: "shape",
6110
6115
  x: bounds.x,
6111
6116
  y: bounds.y,
@@ -6143,7 +6148,7 @@ function useMergeShapesHandler(input) {
6143
6148
  } else {
6144
6149
  let resultPath = globalPaths[0];
6145
6150
  for (let i = 1; i < globalPaths.length; i++) {
6146
- const result = chunkG3JPCRKN_js.mergeShapes(operation, resultPath, globalPaths[i]);
6151
+ const result = chunk2Q2NFPXA_js.mergeShapes(operation, resultPath, globalPaths[i]);
6147
6152
  if (typeof result === "string") {
6148
6153
  resultPath = result;
6149
6154
  }
@@ -6164,7 +6169,7 @@ function useMergeShapesHandler(input) {
6164
6169
  );
6165
6170
  const primary = targets[0];
6166
6171
  const newEl = {
6167
- id: chunkG3JPCRKN_js.generateElementId(),
6172
+ id: chunk2Q2NFPXA_js.generateElementId(),
6168
6173
  type: "shape",
6169
6174
  x: bounds.x,
6170
6175
  y: bounds.y,
@@ -6227,10 +6232,10 @@ function useGroupAlignLayerHandlers(input) {
6227
6232
  if (ids.length < 2 || !activeSlide) {
6228
6233
  return;
6229
6234
  }
6230
- if (!selectedElements.every((el) => chunkG3JPCRKN_js.canInteractWithElement(el, "group"))) {
6235
+ if (!selectedElements.every((el) => chunk2Q2NFPXA_js.canInteractWithElement(el, "group"))) {
6231
6236
  return;
6232
6237
  }
6233
- const { elements, groupId } = chunkG3JPCRKN_js.groupElements(ops.activeElements, ids, chunkG3JPCRKN_js.generateElementId());
6238
+ const { elements, groupId } = chunk2Q2NFPXA_js.groupElements(ops.activeElements, ids, chunk2Q2NFPXA_js.generateElementId());
6234
6239
  if (groupId === null) {
6235
6240
  return;
6236
6241
  }
@@ -6242,15 +6247,15 @@ function useGroupAlignLayerHandlers(input) {
6242
6247
  if (!selectedElement || selectedElement.type !== "group" || !activeSlide) {
6243
6248
  return;
6244
6249
  }
6245
- if (!chunkG3JPCRKN_js.canInteractWithElement(selectedElement, "group")) {
6250
+ if (!chunk2Q2NFPXA_js.canInteractWithElement(selectedElement, "group")) {
6246
6251
  return;
6247
6252
  }
6248
6253
  const group = selectedElement;
6249
- const intoTemplate = chunkG3JPCRKN_js.isTemplateElementId(group.id);
6254
+ const intoTemplate = chunk2Q2NFPXA_js.isTemplateElementId(group.id);
6250
6255
  const childIds = group.children.map(
6251
- (child) => intoTemplate ? chunkG3JPCRKN_js.makeCloneId(true, child.id || group.id) : child.id || chunkG3JPCRKN_js.generateElementId()
6256
+ (child) => intoTemplate ? chunk2Q2NFPXA_js.makeCloneId(true, child.id || group.id) : child.id || chunk2Q2NFPXA_js.generateElementId()
6252
6257
  );
6253
- const { elements, childIds: usedIds } = chunkG3JPCRKN_js.ungroupElements(
6258
+ const { elements, childIds: usedIds } = chunk2Q2NFPXA_js.ungroupElements(
6254
6259
  ops.activeElements,
6255
6260
  group.id,
6256
6261
  childIds,
@@ -6279,7 +6284,7 @@ function useGroupAlignLayerHandlers(input) {
6279
6284
  if (!edge) {
6280
6285
  return;
6281
6286
  }
6282
- const positions = chunkG3JPCRKN_js.alignElements(selectedElements, edge);
6287
+ const positions = chunk2Q2NFPXA_js.alignElements(selectedElements, edge);
6283
6288
  for (const [id, pos] of positions) {
6284
6289
  const el = elementLookup.get(id);
6285
6290
  if (!el) {
@@ -6297,7 +6302,7 @@ function useGroupAlignLayerHandlers(input) {
6297
6302
  if (!distAxis) {
6298
6303
  return;
6299
6304
  }
6300
- const positions = chunkG3JPCRKN_js.distributeElements(selectedElements, distAxis);
6305
+ const positions = chunk2Q2NFPXA_js.distributeElements(selectedElements, distAxis);
6301
6306
  for (const [id, pos] of positions) {
6302
6307
  const el = elementLookup.get(id);
6303
6308
  if (!el) {
@@ -6308,14 +6313,14 @@ function useGroupAlignLayerHandlers(input) {
6308
6313
  history.markDirty();
6309
6314
  };
6310
6315
  const canDistribute = selectedElements.length >= 3;
6311
- const selectionGroupable = selectedElements.every((el) => chunkG3JPCRKN_js.canInteractWithElement(el, "group"));
6316
+ const selectionGroupable = selectedElements.every((el) => chunk2Q2NFPXA_js.canInteractWithElement(el, "group"));
6312
6317
  const handleMoveLayer = (direction) => {
6313
6318
  if (!selectedElement || !activeSlide) {
6314
6319
  return;
6315
6320
  }
6316
6321
  const id = selectedElement.id;
6317
6322
  ops.updateActiveElements(
6318
- (els) => direction === "forward" ? chunkG3JPCRKN_js.bringForward(els, id) : direction === "backward" ? chunkG3JPCRKN_js.sendBackward(els, id) : els
6323
+ (els) => direction === "forward" ? chunk2Q2NFPXA_js.bringForward(els, id) : direction === "backward" ? chunk2Q2NFPXA_js.sendBackward(els, id) : els
6319
6324
  );
6320
6325
  history.markDirty();
6321
6326
  };
@@ -6325,7 +6330,7 @@ function useGroupAlignLayerHandlers(input) {
6325
6330
  }
6326
6331
  const id = selectedElement.id;
6327
6332
  ops.updateActiveElements(
6328
- (els) => direction === "front" ? chunkG3JPCRKN_js.bringToFront(els, id) : chunkG3JPCRKN_js.sendToBack(els, id)
6333
+ (els) => direction === "front" ? chunk2Q2NFPXA_js.bringToFront(els, id) : chunk2Q2NFPXA_js.sendToBack(els, id)
6329
6334
  );
6330
6335
  history.markDirty();
6331
6336
  };
@@ -6459,7 +6464,7 @@ function useSlideManagement(input) {
6459
6464
  theme
6460
6465
  } = input;
6461
6466
  const handleAddSlide = () => {
6462
- const newSlide = chunkG3JPCRKN_js.createBlankSlide(slides.length + 1);
6467
+ const newSlide = chunk2Q2NFPXA_js.createBlankSlide(slides.length + 1);
6463
6468
  ops.updateSlides((prev) => {
6464
6469
  const next = [...prev];
6465
6470
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6522,7 +6527,7 @@ function useSlideManagement(input) {
6522
6527
  }
6523
6528
  const clone = {
6524
6529
  ...src,
6525
- id: chunkG3JPCRKN_js.makeSlideId(),
6530
+ id: chunk2Q2NFPXA_js.makeSlideId(),
6526
6531
  elements: src.elements.map((el) => ({
6527
6532
  ...el,
6528
6533
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6554,7 +6559,7 @@ function useSlideManagement(input) {
6554
6559
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6555
6560
  const insertAt = activeSlideIndex + 1;
6556
6561
  const draft = {
6557
- ...chunkG3JPCRKN_js.createBlankSlide(slides.length + 1),
6562
+ ...chunk2Q2NFPXA_js.createBlankSlide(slides.length + 1),
6558
6563
  layoutPath,
6559
6564
  ...layoutName ? { layoutName } : {}
6560
6565
  };
@@ -6587,9 +6592,9 @@ function useSlideManagement(input) {
6587
6592
  };
6588
6593
  const handleInsertSlideFromTemplate = (templateId) => {
6589
6594
  const insertAt = activeSlideIndex + 1;
6590
- const draft = chunkG3JPCRKN_js.buildSlideTemplateSlide(templateId, chunkG3JPCRKN_js.makeSlideId(), slides.length + 1, {
6595
+ const draft = chunk2Q2NFPXA_js.buildSlideTemplateSlide(templateId, chunk2Q2NFPXA_js.makeSlideId(), slides.length + 1, {
6591
6596
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6592
- scheme: chunkG3JPCRKN_js.templateSchemeFromTheme(theme?.colorScheme)
6597
+ scheme: chunk2Q2NFPXA_js.templateSchemeFromTheme(theme?.colorScheme)
6593
6598
  });
6594
6599
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6595
6600
  setActiveSlideIndex(insertAt);
@@ -6626,7 +6631,7 @@ function createTableMergeHandlers(input) {
6626
6631
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6627
6632
  return;
6628
6633
  }
6629
- const newTableData = chunkG3JPCRKN_js.mergeCells(
6634
+ const newTableData = chunk2Q2NFPXA_js.mergeCells(
6630
6635
  [
6631
6636
  { row: rowIndex, col: columnIndex },
6632
6637
  { row: rowIndex, col: nextColIdx }
@@ -6634,7 +6639,7 @@ function createTableMergeHandlers(input) {
6634
6639
  td
6635
6640
  );
6636
6641
  const updates = { tableData: newTableData };
6637
- const newRawXml = chunkG3JPCRKN_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6642
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6638
6643
  if (newRawXml) {
6639
6644
  updates.rawXml = newRawXml;
6640
6645
  }
@@ -6660,7 +6665,7 @@ function createTableMergeHandlers(input) {
6660
6665
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6661
6666
  return;
6662
6667
  }
6663
- const newTableData = chunkG3JPCRKN_js.mergeCells(
6668
+ const newTableData = chunk2Q2NFPXA_js.mergeCells(
6664
6669
  [
6665
6670
  { row: rowIndex, col: columnIndex },
6666
6671
  { row: targetNextRowIdx, col: columnIndex }
@@ -6668,7 +6673,7 @@ function createTableMergeHandlers(input) {
6668
6673
  td
6669
6674
  );
6670
6675
  const updates = { tableData: newTableData };
6671
- const newRawXml = chunkG3JPCRKN_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6676
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6672
6677
  if (newRawXml) {
6673
6678
  updates.rawXml = newRawXml;
6674
6679
  }
@@ -6683,9 +6688,9 @@ function createTableMergeHandlers(input) {
6683
6688
  return;
6684
6689
  }
6685
6690
  const td = selectedElement.tableData;
6686
- const newTableData = chunkG3JPCRKN_js.mergeCells(ts.selectedCells, td);
6691
+ const newTableData = chunk2Q2NFPXA_js.mergeCells(ts.selectedCells, td);
6687
6692
  const updates = { tableData: newTableData };
6688
- const newRawXml = chunkG3JPCRKN_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6693
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6689
6694
  if (newRawXml) {
6690
6695
  updates.rawXml = newRawXml;
6691
6696
  }
@@ -6702,9 +6707,9 @@ function createTableMergeHandlers(input) {
6702
6707
  }
6703
6708
  const { rowIndex, columnIndex } = ts;
6704
6709
  const td = selectedElement.tableData;
6705
- const newTableData = chunkG3JPCRKN_js.splitCell(rowIndex, columnIndex, td);
6710
+ const newTableData = chunk2Q2NFPXA_js.splitCell(rowIndex, columnIndex, td);
6706
6711
  const updates = { tableData: newTableData };
6707
- const newRawXml = chunkG3JPCRKN_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6712
+ const newRawXml = chunk2Q2NFPXA_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6708
6713
  if (newRawXml) {
6709
6714
  updates.rawXml = newRawXml;
6710
6715
  }
@@ -6738,10 +6743,10 @@ function createTableStructHandlers(input) {
6738
6743
  const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
6739
6744
  const updates = {};
6740
6745
  if (el.tableData) {
6741
- updates.tableData = chunkG3JPCRKN_js.setCellText(el, rowIndex, colIndex, text).tableData;
6746
+ updates.tableData = chunk2Q2NFPXA_js.setCellText(el, rowIndex, colIndex, text).tableData;
6742
6747
  }
6743
6748
  if (el.rawXml) {
6744
- const newRawXml = chunkG3JPCRKN_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6749
+ const newRawXml = chunk2Q2NFPXA_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6745
6750
  if (newRawXml) {
6746
6751
  updates.rawXml = newRawXml;
6747
6752
  }
@@ -6765,7 +6770,7 @@ function createTableStructHandlers(input) {
6765
6770
  const { rowIndex, columnIndex: colIndex } = ts;
6766
6771
  const updates = {};
6767
6772
  if (selectedElement.rawXml) {
6768
- const newRawXml = chunkG3JPCRKN_js.updateCellTextStyleInRawXml(
6773
+ const newRawXml = chunk2Q2NFPXA_js.updateCellTextStyleInRawXml(
6769
6774
  selectedElement,
6770
6775
  rowIndex,
6771
6776
  colIndex,
@@ -6829,9 +6834,9 @@ function createTableStructHandlers(input) {
6829
6834
  return;
6830
6835
  }
6831
6836
  const rowIdx = ts?.rowIndex ?? 0;
6832
- const newTableData = chunkG3JPCRKN_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6837
+ const newTableData = chunk2Q2NFPXA_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6833
6838
  const updates = { tableData: newTableData };
6834
- const newRawXml = chunkG3JPCRKN_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6839
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6835
6840
  if (newRawXml) {
6836
6841
  updates.rawXml = newRawXml;
6837
6842
  }
@@ -6844,12 +6849,12 @@ function createTableStructHandlers(input) {
6844
6849
  }
6845
6850
  const td = selectedElement.tableData;
6846
6851
  const rowIdx = ts?.rowIndex ?? 0;
6847
- const newTableData = chunkG3JPCRKN_js.deleteTableRow(td, rowIdx);
6852
+ const newTableData = chunk2Q2NFPXA_js.deleteTableRow(td, rowIdx);
6848
6853
  if (newTableData === td) {
6849
6854
  return;
6850
6855
  }
6851
6856
  const updates = { tableData: newTableData };
6852
- const newRawXml = chunkG3JPCRKN_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6857
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6853
6858
  if (newRawXml) {
6854
6859
  updates.rawXml = newRawXml;
6855
6860
  }
@@ -6861,9 +6866,9 @@ function createTableStructHandlers(input) {
6861
6866
  return;
6862
6867
  }
6863
6868
  const colIdx = ts?.columnIndex ?? 0;
6864
- const newTableData = chunkG3JPCRKN_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6869
+ const newTableData = chunk2Q2NFPXA_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6865
6870
  const updates = { tableData: newTableData };
6866
- const newRawXml = chunkG3JPCRKN_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6871
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6867
6872
  if (newRawXml) {
6868
6873
  updates.rawXml = newRawXml;
6869
6874
  }
@@ -6876,12 +6881,12 @@ function createTableStructHandlers(input) {
6876
6881
  }
6877
6882
  const td = selectedElement.tableData;
6878
6883
  const colIdx = ts?.columnIndex ?? 0;
6879
- const newTableData = chunkG3JPCRKN_js.deleteTableColumn(td, colIdx);
6884
+ const newTableData = chunk2Q2NFPXA_js.deleteTableColumn(td, colIdx);
6880
6885
  if (newTableData === td) {
6881
6886
  return;
6882
6887
  }
6883
6888
  const updates = { tableData: newTableData };
6884
- const newRawXml = chunkG3JPCRKN_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6889
+ const newRawXml = chunk2Q2NFPXA_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6885
6890
  if (newRawXml) {
6886
6891
  updates.rawXml = newRawXml;
6887
6892
  }
@@ -6917,8 +6922,8 @@ async function renderToCanvas(element, options = {}) {
6917
6922
  return html2canvasPro(element, {
6918
6923
  ...options,
6919
6924
  onclone: async (doc, clonedEl) => {
6920
- await chunkG3JPCRKN_js.normalizeColorsForCapture(doc, clonedEl);
6921
- chunkG3JPCRKN_js.preprocessCssForCapture(clonedEl);
6925
+ await chunk2Q2NFPXA_js.normalizeColorsForCapture(doc, clonedEl);
6926
+ chunk2Q2NFPXA_js.preprocessCssForCapture(clonedEl);
6922
6927
  if (typeof userOnClone === "function") {
6923
6928
  userOnClone(doc, clonedEl);
6924
6929
  }
@@ -6948,25 +6953,24 @@ function useExportSaveAs(input) {
6948
6953
  slideSizeEmu
6949
6954
  } = input;
6950
6955
  const handleSaveAsFormat = async (format) => {
6951
- const downloadName = chunkG3JPCRKN_js.savedPresentationFileName(filePath, format);
6956
+ const downloadName = chunk2Q2NFPXA_js.savedPresentationFileName(filePath, format);
6952
6957
  try {
6953
6958
  const data = await serializeSlides(format);
6954
6959
  if (!data) {
6955
6960
  return;
6956
6961
  }
6957
- const blob = new Blob([data], {
6958
- type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6959
- });
6960
- chunkG3JPCRKN_js.downloadBlob(blob, downloadName);
6962
+ const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
6963
+ const blob = new Blob([data], { type: mimeType });
6964
+ chunk2Q2NFPXA_js.downloadBlob(blob, downloadName);
6961
6965
  } catch (err) {
6962
6966
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
6963
6967
  }
6964
6968
  };
6965
6969
  const handleExportJson = () => {
6966
6970
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
6967
- const slideSize = chunkG3JPCRKN_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6971
+ const slideSize = chunk2Q2NFPXA_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
6968
6972
  const data = {
6969
- slides: chunkG3JPCRKN_js.buildSaveSlides(slides, templateElementsBySlideId),
6973
+ slides: chunk2Q2NFPXA_js.buildSaveSlides(slides, templateElementsBySlideId),
6970
6974
  width: canvasSize.width,
6971
6975
  height: canvasSize.height,
6972
6976
  widthEmu: slideSize.widthEmu,
@@ -6985,7 +6989,7 @@ function useExportSaveAs(input) {
6985
6989
  handoutMaster
6986
6990
  };
6987
6991
  try {
6988
- chunkG3JPCRKN_js.exportDeckJson(data, sourceName);
6992
+ chunk2Q2NFPXA_js.exportDeckJson(data, sourceName);
6989
6993
  } catch (err) {
6990
6994
  console.error("[PowerPointViewer] JSON export failed:", err);
6991
6995
  }
@@ -6999,12 +7003,16 @@ function useExportSaveAs(input) {
6999
7003
  const handleSaveAsPptm = () => {
7000
7004
  void handleSaveAsFormat("pptm");
7001
7005
  };
7006
+ const handleSaveAsPpt = () => {
7007
+ void handleSaveAsFormat("ppt");
7008
+ };
7002
7009
  return {
7003
7010
  handleExportJson,
7004
7011
  handleSaveAsFormat,
7005
7012
  handleSaveAsPptx,
7006
7013
  handleSaveAsPpsx,
7007
- handleSaveAsPptm
7014
+ handleSaveAsPptm,
7015
+ handleSaveAsPpt
7008
7016
  };
7009
7017
  }
7010
7018
 
@@ -7072,7 +7080,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
7072
7080
  }
7073
7081
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
7074
7082
  const blob = await exportSlideToPngBlob(slideElement, options);
7075
- chunkG3JPCRKN_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7083
+ chunk2Q2NFPXA_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7076
7084
  }
7077
7085
  async function copySlideToClipboard(slideElement, options = {}) {
7078
7086
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -7094,15 +7102,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7094
7102
  continue;
7095
7103
  }
7096
7104
  const canvas = await renderElementToCanvas(stageEl, scale);
7097
- images.push(chunkG3JPCRKN_js.canvasToJpegData(canvas));
7105
+ images.push(chunk2Q2NFPXA_js.canvasToJpegData(canvas));
7098
7106
  }
7099
7107
  onProgress?.(totalSlides, totalSlides);
7100
7108
  setActiveSlide(currentSlideIndex);
7101
7109
  if (images.length === 0) {
7102
- throw new Error(chunkTEVGDXVW_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7110
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7103
7111
  }
7104
- const pdfBlobUrl = chunkLBJAVP3H_js.buildPdfFromImageData(images);
7105
- chunkG3JPCRKN_js.downloadDataUrl(pdfBlobUrl, filename);
7112
+ const pdfBlobUrl = chunkXW46A7DN_js.buildPdfFromImageData(images);
7113
+ chunk2Q2NFPXA_js.downloadDataUrl(pdfBlobUrl, filename);
7106
7114
  }
7107
7115
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
7108
7116
  const { scale = 2, onProgress } = options;
@@ -7148,10 +7156,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7148
7156
  onProgress?.(totalSlides, totalSlides);
7149
7157
  setActiveSlide(currentSlideIndex);
7150
7158
  if (pages.length === 0) {
7151
- throw new Error(chunkTEVGDXVW_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7159
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7152
7160
  }
7153
- const pdfDataUrl = chunkLBJAVP3H_js.buildNotesPdf(pages);
7154
- chunkG3JPCRKN_js.downloadDataUrl(pdfDataUrl, filename);
7161
+ const pdfDataUrl = chunkXW46A7DN_js.buildNotesPdf(pages);
7162
+ chunk2Q2NFPXA_js.downloadDataUrl(pdfDataUrl, filename);
7155
7163
  }
7156
7164
 
7157
7165
  // src/viewer/utils/export-video.ts
@@ -7182,7 +7190,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7182
7190
  }
7183
7191
  setActiveSlide(currentSlideIndex);
7184
7192
  if (slideCanvases.length === 0) {
7185
- throw new Error(chunkTEVGDXVW_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7193
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
7186
7194
  }
7187
7195
  const firstCanvas = slideCanvases[0];
7188
7196
  const recordingCanvas = document.createElement("canvas");
@@ -7190,12 +7198,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7190
7198
  recordingCanvas.height = firstCanvas.height;
7191
7199
  const ctx = recordingCanvas.getContext("2d");
7192
7200
  if (!ctx) {
7193
- throw new Error(chunkTEVGDXVW_js.translationsEn["pptx.export.errorNo2dContext"]);
7201
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNo2dContext"]);
7194
7202
  }
7195
7203
  const fps = 30;
7196
7204
  const stream = recordingCanvas.captureStream(fps);
7197
7205
  const recorder = new MediaRecorder(stream, {
7198
- mimeType: chunkG3JPCRKN_js.pickSupportedMimeType([...chunkG3JPCRKN_js.WEBM_MIME_CANDIDATES]),
7206
+ mimeType: chunk2Q2NFPXA_js.pickSupportedMimeType([...chunk2Q2NFPXA_js.WEBM_MIME_CANDIDATES]),
7199
7207
  videoBitsPerSecond: 5e6
7200
7208
  });
7201
7209
  const chunks = [];
@@ -7218,8 +7226,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7218
7226
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
7219
7227
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
7220
7228
  ctx.drawImage(slideCanvases[i], 0, 0);
7221
- const frameInterval = chunkG3JPCRKN_js.fpsToFrameIntervalMs(fps);
7222
- const framesNeeded = chunkG3JPCRKN_js.segmentFrameCount(duration, fps);
7229
+ const frameInterval = chunk2Q2NFPXA_js.fpsToFrameIntervalMs(fps);
7230
+ const framesNeeded = chunk2Q2NFPXA_js.segmentFrameCount(duration, fps);
7223
7231
  for (let f = 0; f < framesNeeded; f++) {
7224
7232
  if (signal?.aborted) {
7225
7233
  recorder.stop();
@@ -7266,9 +7274,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7266
7274
  }
7267
7275
  setActiveSlide(currentSlideIndex);
7268
7276
  if (frames.length === 0) {
7269
- throw new Error(chunkTEVGDXVW_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7277
+ throw new Error(chunkY6GG2OOW_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7270
7278
  }
7271
- const gifBytes = chunkG3JPCRKN_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7279
+ const gifBytes = chunk2Q2NFPXA_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7272
7280
  onProgress?.(totalSlides, totalSlides);
7273
7281
  const buf = new ArrayBuffer(gifBytes.length);
7274
7282
  new Uint8Array(buf).set(gifBytes);
@@ -7322,7 +7330,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7322
7330
  continue;
7323
7331
  }
7324
7332
  onProgress?.(processedCount, data.slides.length);
7325
- let svg = chunkG3JPCRKN_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7333
+ let svg = chunk2Q2NFPXA_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7326
7334
  if (embedFonts && fontFaces?.length) {
7327
7335
  svg = injectFontFaces(svg, fontFaces);
7328
7336
  }
@@ -7369,7 +7377,8 @@ function useExportHandlers(input) {
7369
7377
  handleSaveAsFormat,
7370
7378
  handleSaveAsPptx,
7371
7379
  handleSaveAsPpsx,
7372
- handleSaveAsPptm
7380
+ handleSaveAsPptm,
7381
+ handleSaveAsPpt
7373
7382
  } = useExportSaveAs({
7374
7383
  slides,
7375
7384
  templateElementsBySlideId,
@@ -7423,21 +7432,21 @@ function useExportHandlers(input) {
7423
7432
  {
7424
7433
  scale: imageExportScale,
7425
7434
  onProgress: (current, total) => {
7426
- setExportProgress(chunkG3JPCRKN_js.slideProgressPercent(current, total));
7427
- setExportStatusMessage(chunkG3JPCRKN_js.slideStatusLabel("Rendering", current, total));
7435
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total));
7436
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Rendering", current, total));
7428
7437
  },
7429
7438
  signal: abortCtrl.signal
7430
7439
  }
7431
7440
  );
7432
- setExportProgress(chunkG3JPCRKN_js.EXPORT_ASSEMBLING_PERCENT);
7441
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7433
7442
  setExportStatusMessage("Building PDF...");
7434
7443
  await new Promise((r) => {
7435
7444
  setTimeout(r, 100);
7436
7445
  });
7437
- setExportProgress(chunkG3JPCRKN_js.EXPORT_DONE_PERCENT);
7446
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7438
7447
  setExportStatusMessage("Done!");
7439
7448
  } catch (err) {
7440
- if (!chunkG3JPCRKN_js.isExportAbortError(err)) {
7449
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7441
7450
  console.error("[PowerPointViewer] PDF export failed:", err);
7442
7451
  }
7443
7452
  } finally {
@@ -7467,21 +7476,21 @@ function useExportHandlers(input) {
7467
7476
  {
7468
7477
  scale: imageExportScale,
7469
7478
  onProgress: (current, total) => {
7470
- setExportProgress(chunkG3JPCRKN_js.slideProgressPercent(current, total));
7471
- setExportStatusMessage(chunkG3JPCRKN_js.slideStatusLabel("Rendering", current, total));
7479
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total));
7480
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Rendering", current, total));
7472
7481
  },
7473
7482
  signal: abortCtrl.signal
7474
7483
  }
7475
7484
  );
7476
- setExportProgress(chunkG3JPCRKN_js.EXPORT_ASSEMBLING_PERCENT);
7485
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7477
7486
  setExportStatusMessage("Building PDF...");
7478
7487
  await new Promise((r) => {
7479
7488
  setTimeout(r, 100);
7480
7489
  });
7481
- setExportProgress(chunkG3JPCRKN_js.EXPORT_DONE_PERCENT);
7490
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7482
7491
  setExportStatusMessage("Done!");
7483
7492
  } catch (err) {
7484
- if (!chunkG3JPCRKN_js.isExportAbortError(err)) {
7493
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7485
7494
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7486
7495
  }
7487
7496
  } finally {
@@ -7523,22 +7532,22 @@ function useExportHandlers(input) {
7523
7532
  scale: 1,
7524
7533
  slideDurationMs: 3e3,
7525
7534
  onProgress: (current, total) => {
7526
- setExportProgress(chunkG3JPCRKN_js.slideProgressPercent(current, total, 45));
7527
- setExportStatusMessage(chunkG3JPCRKN_js.slideStatusLabel("Capturing", current, total));
7535
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total, 45));
7536
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Capturing", current, total));
7528
7537
  },
7529
7538
  onRecordProgress: (current, total) => {
7530
- setExportProgress(chunkG3JPCRKN_js.recordProgressPercent(current, total));
7531
- setExportStatusMessage(chunkG3JPCRKN_js.slideStatusLabel("Recording", current, total));
7539
+ setExportProgress(chunk2Q2NFPXA_js.recordProgressPercent(current, total));
7540
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Recording", current, total));
7532
7541
  },
7533
7542
  signal: abortCtrl.signal
7534
7543
  }
7535
7544
  );
7536
- setExportProgress(chunkG3JPCRKN_js.EXPORT_ASSEMBLING_PERCENT);
7545
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7537
7546
  setExportStatusMessage("Saving file...");
7538
- chunkG3JPCRKN_js.downloadBlob(blob, "presentation.webm");
7539
- setExportProgress(chunkG3JPCRKN_js.EXPORT_DONE_PERCENT);
7547
+ chunk2Q2NFPXA_js.downloadBlob(blob, "presentation.webm");
7548
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7540
7549
  } catch (err) {
7541
- if (!chunkG3JPCRKN_js.isExportAbortError(err)) {
7550
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7542
7551
  console.error("[PowerPointViewer] Video export failed:", err);
7543
7552
  }
7544
7553
  } finally {
@@ -7566,18 +7575,18 @@ function useExportHandlers(input) {
7566
7575
  scale: 0.5,
7567
7576
  slideDurationMs: 2e3,
7568
7577
  onProgress: (current, total) => {
7569
- setExportProgress(chunkG3JPCRKN_js.slideProgressPercent(current, total));
7570
- setExportStatusMessage(chunkG3JPCRKN_js.slideStatusLabel("Encoding", current, total));
7578
+ setExportProgress(chunk2Q2NFPXA_js.slideProgressPercent(current, total));
7579
+ setExportStatusMessage(chunk2Q2NFPXA_js.slideStatusLabel("Encoding", current, total));
7571
7580
  },
7572
7581
  signal: abortCtrl.signal
7573
7582
  }
7574
7583
  );
7575
- setExportProgress(chunkG3JPCRKN_js.EXPORT_ASSEMBLING_PERCENT);
7584
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_ASSEMBLING_PERCENT);
7576
7585
  setExportStatusMessage("Saving file...");
7577
- chunkG3JPCRKN_js.downloadBlob(blob, "presentation.gif");
7578
- setExportProgress(chunkG3JPCRKN_js.EXPORT_DONE_PERCENT);
7586
+ chunk2Q2NFPXA_js.downloadBlob(blob, "presentation.gif");
7587
+ setExportProgress(chunk2Q2NFPXA_js.EXPORT_DONE_PERCENT);
7579
7588
  } catch (err) {
7580
- if (!chunkG3JPCRKN_js.isExportAbortError(err)) {
7589
+ if (!chunk2Q2NFPXA_js.isExportAbortError(err)) {
7581
7590
  console.error("[PowerPointViewer] GIF export failed:", err);
7582
7591
  }
7583
7592
  } finally {
@@ -7603,6 +7612,7 @@ function useExportHandlers(input) {
7603
7612
  handleSaveAsPptx,
7604
7613
  handleSaveAsPpsx,
7605
7614
  handleSaveAsPptm,
7615
+ handleSaveAsPpt,
7606
7616
  handleCancelExport,
7607
7617
  exportModalOpen,
7608
7618
  exportModalTitle,
@@ -7610,7 +7620,7 @@ function useExportHandlers(input) {
7610
7620
  exportStatusMessage
7611
7621
  };
7612
7622
  }
7613
- var ViewerOptionsContext = react.createContext(chunkG3JPCRKN_js.DEFAULT_VIEWER_OPTIONS);
7623
+ var ViewerOptionsContext = react.createContext(chunk2Q2NFPXA_js.DEFAULT_VIEWER_OPTIONS);
7614
7624
  function useViewerOptionsContext() {
7615
7625
  return react.useContext(ViewerOptionsContext);
7616
7626
  }
@@ -7622,13 +7632,13 @@ function usePrintHandlers(input) {
7622
7632
  const { t } = reactI18next.useTranslation();
7623
7633
  const viewerOptions = useViewerOptionsContext();
7624
7634
  const includeHiddenSlides = viewerOptions.advanced.printHiddenSlides;
7625
- const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkG3JPCRKN_js.resolveImageResolutionScale(viewerOptions);
7635
+ const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunk2Q2NFPXA_js.resolveImageResolutionScale(viewerOptions);
7626
7636
  const handlePrint = () => {
7627
7637
  setIsPrintDialogOpen(true);
7628
7638
  };
7629
7639
  const handlePrintSvg = async (settings) => {
7630
7640
  setIsPrintDialogOpen(false);
7631
- const printWindow = chunkG3JPCRKN_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7641
+ const printWindow = chunk2Q2NFPXA_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7632
7642
  if (!printWindow) {
7633
7643
  console.warn(
7634
7644
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7638,9 +7648,9 @@ function usePrintHandlers(input) {
7638
7648
  if (!pptxData || settings.printWhat !== "slides") {
7639
7649
  return runRasterPrint(printWindow, settings);
7640
7650
  }
7641
- const colorFilter = chunkG3JPCRKN_js.computeColorFilter(settings.colorMode);
7642
- const slideIndices = chunkG3JPCRKN_js.filterHiddenSlideIndices(
7643
- chunkG3JPCRKN_js.computeSlideIndices(
7651
+ const colorFilter = chunk2Q2NFPXA_js.computeColorFilter(settings.colorMode);
7652
+ const slideIndices = chunk2Q2NFPXA_js.filterHiddenSlideIndices(
7653
+ chunk2Q2NFPXA_js.computeSlideIndices(
7644
7654
  settings.slideRange,
7645
7655
  activeSlideIndex,
7646
7656
  slides.length,
@@ -7658,22 +7668,22 @@ function usePrintHandlers(input) {
7658
7668
  printWindow.close();
7659
7669
  return;
7660
7670
  }
7661
- const printDoc = chunkG3JPCRKN_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7671
+ const printDoc = chunk2Q2NFPXA_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7662
7672
  title: "Slides (Vector)",
7663
7673
  orientation: settings.orientation,
7664
7674
  colorFilter,
7665
7675
  scaleToFit: settings.scaleToFit
7666
7676
  });
7667
- chunkG3JPCRKN_js.finishPrintWindow(printWindow, printDoc);
7677
+ chunk2Q2NFPXA_js.finishPrintWindow(printWindow, printDoc);
7668
7678
  } catch (err) {
7669
7679
  console.warn("[PowerPointViewer] SVG print path failed, falling back to raster:", err);
7670
7680
  return runRasterPrint(printWindow, settings);
7671
7681
  }
7672
7682
  };
7673
7683
  const runRasterPrint = async (printWindow, settings) => {
7674
- const colorFilter = chunkG3JPCRKN_js.computeColorFilter(settings.colorMode);
7675
- const slideIndices = chunkG3JPCRKN_js.filterHiddenSlideIndices(
7676
- chunkG3JPCRKN_js.computeSlideIndices(
7684
+ const colorFilter = chunk2Q2NFPXA_js.computeColorFilter(settings.colorMode);
7685
+ const slideIndices = chunk2Q2NFPXA_js.filterHiddenSlideIndices(
7686
+ chunk2Q2NFPXA_js.computeSlideIndices(
7677
7687
  settings.slideRange,
7678
7688
  activeSlideIndex,
7679
7689
  slides.length,
@@ -7684,11 +7694,11 @@ function usePrintHandlers(input) {
7684
7694
  includeHiddenSlides
7685
7695
  );
7686
7696
  if (settings.printWhat === "outline") {
7687
- chunkG3JPCRKN_js.finishPrintWindow(
7697
+ chunk2Q2NFPXA_js.finishPrintWindow(
7688
7698
  printWindow,
7689
- chunkG3JPCRKN_js.buildPrintHtmlDocument({
7699
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7690
7700
  title: "Outline",
7691
- bodyHtml: `<div class="outline-page">${chunkG3JPCRKN_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7701
+ bodyHtml: `<div class="outline-page">${chunk2Q2NFPXA_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7692
7702
  orientation: settings.orientation,
7693
7703
  colorFilter,
7694
7704
  frameSlides: settings.frameSlides,
@@ -7715,11 +7725,11 @@ function usePrintHandlers(input) {
7715
7725
  }
7716
7726
  const slideImages = slideIndices.map((idx) => allImages[idx]).filter(Boolean);
7717
7727
  if (settings.printWhat === "slides") {
7718
- chunkG3JPCRKN_js.finishPrintWindow(
7728
+ chunk2Q2NFPXA_js.finishPrintWindow(
7719
7729
  printWindow,
7720
- chunkG3JPCRKN_js.buildPrintHtmlDocument({
7730
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7721
7731
  title: "Slides",
7722
- bodyHtml: chunkG3JPCRKN_js.buildSlidesHtml(slideImages, slideIndices),
7732
+ bodyHtml: chunk2Q2NFPXA_js.buildSlidesHtml(slideImages, slideIndices),
7723
7733
  orientation: settings.orientation,
7724
7734
  colorFilter,
7725
7735
  frameSlides: settings.frameSlides,
@@ -7729,11 +7739,11 @@ function usePrintHandlers(input) {
7729
7739
  return;
7730
7740
  }
7731
7741
  if (settings.printWhat === "notes") {
7732
- chunkG3JPCRKN_js.finishPrintWindow(
7742
+ chunk2Q2NFPXA_js.finishPrintWindow(
7733
7743
  printWindow,
7734
- chunkG3JPCRKN_js.buildPrintHtmlDocument({
7744
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7735
7745
  title: "Notes Pages",
7736
- bodyHtml: chunkG3JPCRKN_js.buildNotesHtml(slideImages, slideIndices, slides),
7746
+ bodyHtml: chunk2Q2NFPXA_js.buildNotesHtml(slideImages, slideIndices, slides),
7737
7747
  orientation: "portrait",
7738
7748
  colorFilter,
7739
7749
  frameSlides: settings.frameSlides,
@@ -7744,11 +7754,11 @@ function usePrintHandlers(input) {
7744
7754
  }
7745
7755
  if (settings.printWhat === "handouts") {
7746
7756
  const spp = settings.slidesPerPage;
7747
- chunkG3JPCRKN_js.finishPrintWindow(
7757
+ chunk2Q2NFPXA_js.finishPrintWindow(
7748
7758
  printWindow,
7749
- chunkG3JPCRKN_js.buildPrintHtmlDocument({
7759
+ chunk2Q2NFPXA_js.buildPrintHtmlDocument({
7750
7760
  title: `Handout ${spp} per page`,
7751
- bodyHtml: chunkG3JPCRKN_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7761
+ bodyHtml: chunk2Q2NFPXA_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7752
7762
  orientation: "portrait",
7753
7763
  colorFilter,
7754
7764
  frameSlides: settings.frameSlides,
@@ -7762,7 +7772,7 @@ function usePrintHandlers(input) {
7762
7772
  };
7763
7773
  const handlePrintWithSettings = async (settings) => {
7764
7774
  setIsPrintDialogOpen(false);
7765
- const printWindow = chunkG3JPCRKN_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7775
+ const printWindow = chunk2Q2NFPXA_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7766
7776
  if (!printWindow) {
7767
7777
  console.warn(
7768
7778
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7827,13 +7837,13 @@ function useThemeHandlers(input) {
7827
7837
  return;
7828
7838
  }
7829
7839
  await handler.updateThemeColorScheme(colorScheme);
7830
- const previousMap = theme?.colorScheme ? chunkG3JPCRKN_js.buildThemeColorMap(theme.colorScheme) : {};
7831
- setSlides((prev) => chunkG3JPCRKN_js.reResolveSlideColors(prev, previousMap, colorScheme));
7840
+ const previousMap = theme?.colorScheme ? chunk2Q2NFPXA_js.buildThemeColorMap(theme.colorScheme) : {};
7841
+ setSlides((prev) => chunk2Q2NFPXA_js.reResolveSlideColors(prev, previousMap, colorScheme));
7832
7842
  if (Object.keys(templateElementsBySlideId).length > 0) {
7833
7843
  setTemplateElementsBySlideId((prev) => {
7834
7844
  const next = {};
7835
7845
  for (const [slideId, elements] of Object.entries(prev)) {
7836
- next[slideId] = chunkG3JPCRKN_js.reResolveElementColors(elements, previousMap, colorScheme);
7846
+ next[slideId] = chunk2Q2NFPXA_js.reResolveElementColors(elements, previousMap, colorScheme);
7837
7847
  }
7838
7848
  return next;
7839
7849
  });
@@ -7942,7 +7952,7 @@ function useThemeSwitching(input) {
7942
7952
  }
7943
7953
  try {
7944
7954
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7945
- const newData = chunkG3JPCRKN_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7955
+ const newData = chunk2Q2NFPXA_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7946
7956
  onDataChange(newData);
7947
7957
  onThemeChanged?.(preset);
7948
7958
  } catch (error) {
@@ -7959,7 +7969,7 @@ function useThemeSwitching(input) {
7959
7969
  }
7960
7970
  try {
7961
7971
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7962
- const newData = chunkG3JPCRKN_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7972
+ const newData = chunk2Q2NFPXA_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7963
7973
  onDataChange(newData);
7964
7974
  } catch (error) {
7965
7975
  console.error("Failed to switch to custom theme:", error);
@@ -7971,12 +7981,12 @@ function useThemeSwitching(input) {
7971
7981
  if (!data?.theme?.colorScheme) {
7972
7982
  return void 0;
7973
7983
  }
7974
- return chunkG3JPCRKN_js.THEME_PRESETS.find(
7975
- (p) => chunkG3JPCRKN_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7984
+ return chunk2Q2NFPXA_js.THEME_PRESETS.find(
7985
+ (p) => chunk2Q2NFPXA_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7976
7986
  );
7977
7987
  }, [data?.theme?.colorScheme]);
7978
7988
  return {
7979
- presets: chunkG3JPCRKN_js.THEME_PRESETS,
7989
+ presets: chunk2Q2NFPXA_js.THEME_PRESETS,
7980
7990
  switchToPreset,
7981
7991
  switchToCustom,
7982
7992
  currentPreset
@@ -8051,7 +8061,7 @@ function usePropertyHandlers(input) {
8051
8061
  }
8052
8062
  try {
8053
8063
  const ab = await file.arrayBuffer();
8054
- const h = new chunkG3JPCRKN_js.PptxHandler();
8064
+ const h = new chunk2Q2NFPXA_js.PptxHandler();
8055
8065
  const other = await h.load(ab);
8056
8066
  if (!other) {
8057
8067
  return;
@@ -8061,7 +8071,7 @@ function usePropertyHandlers(input) {
8061
8071
  width: canvasSize.width,
8062
8072
  height: canvasSize.height
8063
8073
  };
8064
- setCompareResult(chunkG3JPCRKN_js.comparePresentation(cur, other));
8074
+ setCompareResult(chunk2Q2NFPXA_js.comparePresentation(cur, other));
8065
8075
  setIsComparePanelOpen(true);
8066
8076
  } catch (err) {
8067
8077
  console.warn("Compare failed:", err);
@@ -8078,7 +8088,7 @@ function usePropertyHandlers(input) {
8078
8088
  if (!diff || diff.status === "unchanged") {
8079
8089
  return;
8080
8090
  }
8081
- setSlides((prev) => chunkG3JPCRKN_js.applyAcceptSlide(prev, diff));
8091
+ setSlides((prev) => chunk2Q2NFPXA_js.applyAcceptSlide(prev, diff));
8082
8092
  setIsDirty(true);
8083
8093
  },
8084
8094
  [compareResult, setSlides, setIsDirty]
@@ -8089,10 +8099,10 @@ function usePropertyHandlers(input) {
8089
8099
  if (!compareResult) {
8090
8100
  return;
8091
8101
  }
8092
- setSlides((prev) => chunkG3JPCRKN_js.applyAcceptAllSlides(prev, compareResult));
8102
+ setSlides((prev) => chunk2Q2NFPXA_js.applyAcceptAllSlides(prev, compareResult));
8093
8103
  setIsDirty(true);
8094
8104
  }, [compareResult, setSlides, setIsDirty]);
8095
- const usedFontFamilies = react.useMemo(() => chunkG3JPCRKN_js.collectUsedFonts(slides), [slides]);
8105
+ const usedFontFamilies = react.useMemo(() => chunk2Q2NFPXA_js.collectUsedFonts(slides), [slides]);
8096
8106
  return {
8097
8107
  handleUpdateNotes,
8098
8108
  handleUpdateSlide,
@@ -8247,7 +8257,7 @@ function useViewerDialogs(input) {
8247
8257
  );
8248
8258
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8249
8259
  const fontEmbedding = react.useMemo(
8250
- () => chunkG3JPCRKN_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8260
+ () => chunk2Q2NFPXA_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8251
8261
  [embeddedFontKey]
8252
8262
  );
8253
8263
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8257,11 +8267,11 @@ function useViewerDialogs(input) {
8257
8267
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8258
8268
  }
8259
8269
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8260
- () => typeof window !== "undefined" ? chunkG3JPCRKN_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8270
+ () => typeof window !== "undefined" ? chunk2Q2NFPXA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8261
8271
  );
8262
8272
  react.useEffect(() => {
8263
8273
  const handleWindow = () => setIsNarrowViewport(
8264
- chunkG3JPCRKN_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8274
+ chunk2Q2NFPXA_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8265
8275
  );
8266
8276
  window.addEventListener("resize", handleWindow);
8267
8277
  return () => window.removeEventListener("resize", handleWindow);
@@ -8414,16 +8424,16 @@ function useViewerDialogs(input) {
8414
8424
  };
8415
8425
  }
8416
8426
  function computeGridSpacingPx2(documentGridSpacing) {
8417
- return chunkG3JPCRKN_js.computeGridSpacingPx(documentGridSpacing, chunkLBJAVP3H_js.GRID_SIZE);
8427
+ return chunk2Q2NFPXA_js.computeGridSpacingPx(documentGridSpacing, chunkXW46A7DN_js.GRID_SIZE);
8418
8428
  }
8419
8429
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8420
8430
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8421
- const authoredRange = chunkG3JPCRKN_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8422
- return chunkG3JPCRKN_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8431
+ const authoredRange = chunk2Q2NFPXA_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8432
+ return chunk2Q2NFPXA_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8423
8433
  }
8424
8434
  function computeSlideSectionGroups(slides, sections) {
8425
- return chunkG3JPCRKN_js.groupSlidesBySection(sections, slides).map((group) => ({
8426
- id: group.section?.id ?? (sections.length > 0 ? chunkLBJAVP3H_js.UNGROUPED_SECTION_ID : chunkLBJAVP3H_js.DEFAULT_SECTION_GROUP_ID),
8435
+ return chunk2Q2NFPXA_js.groupSlidesBySection(sections, slides).map((group) => ({
8436
+ id: group.section?.id ?? (sections.length > 0 ? chunkXW46A7DN_js.UNGROUPED_SECTION_ID : chunkXW46A7DN_js.DEFAULT_SECTION_GROUP_ID),
8427
8437
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8428
8438
  slideIndexes: group.slideIndexes,
8429
8439
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8435,7 +8445,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8435
8445
  return void 0;
8436
8446
  }
8437
8447
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8438
- return chunkG3JPCRKN_js.masterViewPseudoSlide(document2, {
8448
+ return chunk2Q2NFPXA_js.masterViewPseudoSlide(document2, {
8439
8449
  tab: "slides",
8440
8450
  masterIndex: 0,
8441
8451
  layoutIndex: activeLayout ? 0 : null
@@ -8463,15 +8473,15 @@ function useDerivedSlideState(input) {
8463
8473
  [slides, activeCustomShowId, customShows, presentationProperties]
8464
8474
  );
8465
8475
  const authoredRange = react.useMemo(
8466
- () => chunkG3JPCRKN_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8476
+ () => chunk2Q2NFPXA_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8467
8477
  [presentationProperties, slides.length]
8468
8478
  );
8469
8479
  const slideSectionGroups = react.useMemo(
8470
8480
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8471
- if (group.id === chunkLBJAVP3H_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8481
+ if (group.id === chunkXW46A7DN_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8472
8482
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8473
8483
  }
8474
- if (group.id === chunkLBJAVP3H_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8484
+ if (group.id === chunkXW46A7DN_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8475
8485
  return { ...group, label: t("pptx.sections.slides") };
8476
8486
  }
8477
8487
  return group;
@@ -8572,13 +8582,13 @@ function useAnnotationHandlers(input) {
8572
8582
  }, [annotations, setMode, setSlides, history]);
8573
8583
  const handleSetMode = react.useCallback(
8574
8584
  (nextMode) => {
8575
- if (mode === "present" && nextMode !== "present" && !chunkG3JPCRKN_js.mayLeaveSlideShow()) {
8585
+ if (mode === "present" && nextMode !== "present" && !chunk2Q2NFPXA_js.mayLeaveSlideShow()) {
8576
8586
  return;
8577
8587
  }
8578
8588
  if (nextMode === "present") {
8579
8589
  presentation.enterPresentMode();
8580
8590
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8581
- chunkG3JPCRKN_js.stopAllPersistentAudio();
8591
+ chunk2Q2NFPXA_js.stopAllPersistentAudio();
8582
8592
  if (promptKeepInkAnnotations) {
8583
8593
  pendingModeAfterAnnotationsRef.current = nextMode;
8584
8594
  setShowKeepAnnotationsDialog(true);
@@ -8588,7 +8598,7 @@ function useAnnotationHandlers(input) {
8588
8598
  }
8589
8599
  } else {
8590
8600
  if (mode === "present") {
8591
- chunkG3JPCRKN_js.stopAllPersistentAudio();
8601
+ chunk2Q2NFPXA_js.stopAllPersistentAudio();
8592
8602
  }
8593
8603
  setMode(nextMode);
8594
8604
  }
@@ -8657,13 +8667,13 @@ function useSerialize(input) {
8657
8667
  let processedSlide = slide;
8658
8668
  if (pendingEditId) {
8659
8669
  const updatedElements = slide.elements.map((el) => {
8660
- if (el.id !== pendingEditId || !chunkG3JPCRKN_js.hasTextProperties(el)) {
8670
+ if (el.id !== pendingEditId || !chunk2Q2NFPXA_js.hasTextProperties(el)) {
8661
8671
  return el;
8662
8672
  }
8663
8673
  return {
8664
8674
  ...el,
8665
8675
  text: pendingEditText,
8666
- textSegments: chunkG3JPCRKN_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8676
+ textSegments: chunk2Q2NFPXA_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8667
8677
  };
8668
8678
  });
8669
8679
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8676,19 +8686,19 @@ function useSerialize(input) {
8676
8686
  const pptxGuides = guides.map((g) => ({
8677
8687
  id: g.id,
8678
8688
  orientation: g.axis === "h" ? "horz" : "vert",
8679
- positionEmu: chunkG3JPCRKN_js.guidePxToEmu(g.position)
8689
+ positionEmu: chunk2Q2NFPXA_js.guidePxToEmu(g.position)
8680
8690
  }));
8681
8691
  return {
8682
8692
  ...processedSlide,
8683
8693
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8684
8694
  };
8685
8695
  });
8686
- const slidesToSave = chunkG3JPCRKN_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8687
- const saveOptions = chunkG3JPCRKN_js.buildDeckSaveOptions({
8696
+ const slidesToSave = chunk2Q2NFPXA_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8697
+ const saveOptions = chunk2Q2NFPXA_js.buildDeckSaveOptions({
8688
8698
  // Without this the Slide Size card edited a viewer-only pixel value and
8689
8699
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8690
8700
  // slide-size edit reaches the file.
8691
- slideSize: chunkG3JPCRKN_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8701
+ slideSize: chunk2Q2NFPXA_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8692
8702
  headerFooter,
8693
8703
  presentationProperties,
8694
8704
  viewProperties,
@@ -8707,7 +8717,7 @@ function useSerialize(input) {
8707
8717
  embedFonts,
8708
8718
  outputFormat: format
8709
8719
  });
8710
- return chunkG3JPCRKN_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8720
+ return chunk2Q2NFPXA_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8711
8721
  },
8712
8722
  [
8713
8723
  slides,
@@ -8748,7 +8758,7 @@ function useRecoveryDetection(input) {
8748
8758
  const onRestore = input.onRestore;
8749
8759
  const openVersionHistory = input.openVersionHistory;
8750
8760
  react.useEffect(() => {
8751
- if (!chunkG3JPCRKN_js.shouldProbeAutosaveRecovery({
8761
+ if (!chunk2Q2NFPXA_js.shouldProbeAutosaveRecovery({
8752
8762
  alreadyChecked: recoveryCheckedRef.current,
8753
8763
  filePath,
8754
8764
  loading,
@@ -8760,7 +8770,7 @@ function useRecoveryDetection(input) {
8760
8770
  }
8761
8771
  recoveryCheckedRef.current = true;
8762
8772
  void (async () => {
8763
- const offer = await chunkG3JPCRKN_js.probeAutosaveRecovery(filePath);
8773
+ const offer = await chunk2Q2NFPXA_js.probeAutosaveRecovery(filePath);
8764
8774
  if (!offer) {
8765
8775
  return;
8766
8776
  }
@@ -8773,7 +8783,7 @@ function useRecoveryDetection(input) {
8773
8783
  const record = recordRef.current;
8774
8784
  setPrompt(null);
8775
8785
  if (record && onRestore) {
8776
- onRestore(chunkG3JPCRKN_js.acceptAutosaveRecovery(record));
8786
+ onRestore(chunk2Q2NFPXA_js.acceptAutosaveRecovery(record));
8777
8787
  }
8778
8788
  recordRef.current = null;
8779
8789
  }, [onRestore]);
@@ -8782,7 +8792,7 @@ function useRecoveryDetection(input) {
8782
8792
  setPrompt(null);
8783
8793
  recordRef.current = null;
8784
8794
  if (record) {
8785
- void chunkG3JPCRKN_js.discardAutosaveRecovery(record);
8795
+ void chunk2Q2NFPXA_js.discardAutosaveRecovery(record);
8786
8796
  }
8787
8797
  }, []);
8788
8798
  return { prompt, restore, discard };
@@ -8830,11 +8840,11 @@ function usePresentationSetup(input) {
8830
8840
  containerRef,
8831
8841
  content,
8832
8842
  onSetMode: (nextMode) => {
8833
- if (mode === "present" && nextMode !== "present" && !chunkG3JPCRKN_js.mayLeaveSlideShow()) {
8843
+ if (mode === "present" && nextMode !== "present" && !chunk2Q2NFPXA_js.mayLeaveSlideShow()) {
8834
8844
  return;
8835
8845
  }
8836
8846
  if (mode === "present" && nextMode !== "present") {
8837
- chunkG3JPCRKN_js.stopAllPersistentAudio();
8847
+ chunk2Q2NFPXA_js.stopAllPersistentAudio();
8838
8848
  stopAnimationSound();
8839
8849
  const exitHandler = exitModeHandlerRef.current;
8840
8850
  if (exitHandler) {
@@ -8902,10 +8912,10 @@ function usePresentationSetup(input) {
8902
8912
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8903
8913
  onToggleSubtitles,
8904
8914
  onSaveRehearsalTimings: (timings) => {
8905
- setSlides((prev) => chunkG3JPCRKN_js.applyRehearsalTimings(prev, timings));
8915
+ setSlides((prev) => chunk2Q2NFPXA_js.applyRehearsalTimings(prev, timings));
8906
8916
  history.markDirty();
8907
8917
  },
8908
- loopContinuously: chunkG3JPCRKN_js.shouldLoopContinuously(presentationProperties),
8918
+ loopContinuously: chunk2Q2NFPXA_js.shouldLoopContinuously(presentationProperties),
8909
8919
  showWithAnimation: presentationProperties.showWithAnimation,
8910
8920
  useTimings: presentationProperties.advanceMode !== "manual",
8911
8921
  endWithBlackSlide,
@@ -9111,7 +9121,7 @@ function useEditorOperations(input) {
9111
9121
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9112
9122
  react.useEffect(() => {
9113
9123
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9114
- copiedFormatRef.current = chunkG3JPCRKN_js.copyFormatFromElement(selectedElement);
9124
+ copiedFormatRef.current = chunk2Q2NFPXA_js.copyFormatFromElement(selectedElement);
9115
9125
  } else if (!formatPainterActive) {
9116
9126
  copiedFormatRef.current = null;
9117
9127
  }
@@ -9137,12 +9147,12 @@ function useEditorOperations(input) {
9137
9147
  e.stopPropagation();
9138
9148
  const element = elementLookup.get(elementId);
9139
9149
  if (element) {
9140
- const updated = chunkG3JPCRKN_js.applyFormatToElement(element, copiedFormatRef.current);
9150
+ const updated = chunk2Q2NFPXA_js.applyFormatToElement(element, copiedFormatRef.current);
9141
9151
  const updates = {};
9142
- if (chunkG3JPCRKN_js.hasShapeProperties(updated)) {
9152
+ if (chunk2Q2NFPXA_js.hasShapeProperties(updated)) {
9143
9153
  updates.shapeStyle = updated.shapeStyle;
9144
9154
  }
9145
- if (chunkG3JPCRKN_js.hasTextProperties(updated)) {
9155
+ if (chunk2Q2NFPXA_js.hasTextProperties(updated)) {
9146
9156
  updates.textStyle = updated.textStyle;
9147
9157
  }
9148
9158
  ops.updateElementById(elementId, updates);
@@ -9326,10 +9336,10 @@ function useFontInjection({ embeddedFonts, slides }) {
9326
9336
  }
9327
9337
  };
9328
9338
  }, [embeddedFonts]);
9329
- const referencedFamilies = react.useMemo(() => chunkG3JPCRKN_js.collectReferencedFontFamilies(slides), [slides]);
9339
+ const referencedFamilies = react.useMemo(() => chunk2Q2NFPXA_js.collectReferencedFontFamilies(slides), [slides]);
9330
9340
  react.useEffect(() => {
9331
9341
  let cancelled = false;
9332
- void chunkG3JPCRKN_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9342
+ void chunk2Q2NFPXA_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9333
9343
  if (cancelled) {
9334
9344
  return null;
9335
9345
  }
@@ -9519,7 +9529,7 @@ function useKeyboardShortcuts(input) {
9519
9529
  inputRef.current = input;
9520
9530
  const handleKeyDown = react.useCallback((e) => {
9521
9531
  const current = inputRef.current;
9522
- const startAction = chunkG3JPCRKN_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9532
+ const startAction = chunk2Q2NFPXA_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9523
9533
  if (startAction !== null) {
9524
9534
  e.preventDefault();
9525
9535
  if (startAction === "fromBeginning") {
@@ -9529,7 +9539,7 @@ function useKeyboardShortcuts(input) {
9529
9539
  }
9530
9540
  return;
9531
9541
  }
9532
- const { action, dx, dy } = chunkG3JPCRKN_js.mapEditorKey(e, {
9542
+ const { action, dx, dy } = chunk2Q2NFPXA_js.mapEditorKey(e, {
9533
9543
  canEdit: current.canEdit,
9534
9544
  // The Slide Master view is an editing surface, not a viewing one.
9535
9545
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9542,7 +9552,7 @@ function useKeyboardShortcuts(input) {
9542
9552
  hasSelection: current.hasSelection,
9543
9553
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9544
9554
  isDrawing: current.activeTool !== "select",
9545
- isTextInputTarget: chunkG3JPCRKN_js.isEditorTextInputTarget(e.target)
9555
+ isTextInputTarget: chunk2Q2NFPXA_js.isEditorTextInputTarget(e.target)
9546
9556
  });
9547
9557
  if (action === null) {
9548
9558
  return;
@@ -9872,7 +9882,7 @@ function useViewerIntegration(input) {
9872
9882
  return zoom.scale;
9873
9883
  },
9874
9884
  setZoom(level) {
9875
- zoom.setScale(chunkG3JPCRKN_js.clampZoomScale(level));
9885
+ zoom.setScale(chunk2Q2NFPXA_js.clampZoomScale(level));
9876
9886
  },
9877
9887
  zoomIn() {
9878
9888
  zoom.handleZoomIn();
@@ -10090,7 +10100,7 @@ function useReducedMotion() {
10090
10100
  }
10091
10101
  function useViewerOptions() {
10092
10102
  const storeRef = react.useRef(null);
10093
- storeRef.current ??= chunkG3JPCRKN_js.createViewerOptionsStore();
10103
+ storeRef.current ??= chunk2Q2NFPXA_js.createViewerOptionsStore();
10094
10104
  const store = storeRef.current;
10095
10105
  const options = react.useSyncExternalStore(
10096
10106
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10099,9 +10109,9 @@ function useViewerOptions() {
10099
10109
  );
10100
10110
  return { optionsStore: store, options };
10101
10111
  }
10102
- var KNOWN_TAB_IDS = new Set(chunkG3JPCRKN_js.TOOLBAR_TABS.map((tab) => tab.id));
10112
+ var KNOWN_TAB_IDS = new Set(chunk2Q2NFPXA_js.TOOLBAR_TABS.map((tab) => tab.id));
10103
10113
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
10104
- const isHidden = (id) => chunkG3JPCRKN_js.isActionHidden(id, hiddenActions);
10114
+ const isHidden = (id) => chunk2Q2NFPXA_js.isActionHidden(id, hiddenActions);
10105
10115
  const userHidden = new Set(hiddenTabIds);
10106
10116
  userHidden.delete("file");
10107
10117
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id) && !userHidden.has(id);
@@ -10194,12 +10204,12 @@ function useYjsDocumentSync({
10194
10204
  return;
10195
10205
  }
10196
10206
  try {
10197
- const handler = new chunkG3JPCRKN_js.PptxHandler();
10207
+ const handler = new chunk2Q2NFPXA_js.PptxHandler();
10198
10208
  await handler.load(sourceBytes.buffer);
10199
- const currentSlides = chunkG3JPCRKN_js.readSlidesFromYDoc(
10209
+ const currentSlides = chunk2Q2NFPXA_js.readSlidesFromYDoc(
10200
10210
  doc
10201
10211
  );
10202
- const slidesToSave = chunkG3JPCRKN_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10212
+ const slidesToSave = chunk2Q2NFPXA_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10203
10213
  const bytes = await handler.save(slidesToSave, getSaveOptions?.());
10204
10214
  config.onWriteBack(bytes);
10205
10215
  } catch {
@@ -10214,10 +10224,10 @@ function useYjsDocumentSync({
10214
10224
  if (!doc || !isConnected) {
10215
10225
  return;
10216
10226
  }
10217
- const docSlides = chunkG3JPCRKN_js.readSlidesFromYDoc(
10227
+ const docSlides = chunk2Q2NFPXA_js.readSlidesFromYDoc(
10218
10228
  doc
10219
10229
  );
10220
- if (!chunkG3JPCRKN_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10230
+ if (!chunk2Q2NFPXA_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10221
10231
  return;
10222
10232
  }
10223
10233
  lastSyncedRef.current = JSON.stringify(docSlides);
@@ -10236,11 +10246,11 @@ function useYjsDocumentSync({
10236
10246
  lastSyncedRef.current = serialized;
10237
10247
  void (async () => {
10238
10248
  const factories = await getFactories();
10239
- chunkG3JPCRKN_js.reconcileSlidesInYDoc(
10249
+ chunk2Q2NFPXA_js.reconcileSlidesInYDoc(
10240
10250
  slides,
10241
10251
  doc,
10242
10252
  factories,
10243
- chunkG3JPCRKN_js.LOCAL_SYNC_ORIGIN
10253
+ chunk2Q2NFPXA_js.LOCAL_SYNC_ORIGIN
10244
10254
  );
10245
10255
  scheduleWriteBack();
10246
10256
  })();
@@ -10254,10 +10264,10 @@ function useYjsDocumentSync({
10254
10264
  return;
10255
10265
  }
10256
10266
  const handleChange = (_events, transaction) => {
10257
- if (transaction?.origin === chunkG3JPCRKN_js.LOCAL_SYNC_ORIGIN) {
10267
+ if (transaction?.origin === chunk2Q2NFPXA_js.LOCAL_SYNC_ORIGIN) {
10258
10268
  return;
10259
10269
  }
10260
- const remoteSlides = chunkG3JPCRKN_js.readSlidesFromYDoc(
10270
+ const remoteSlides = chunk2Q2NFPXA_js.readSlidesFromYDoc(
10261
10271
  doc
10262
10272
  );
10263
10273
  if (remoteSlides.length === 0) {
@@ -10273,7 +10283,7 @@ function useYjsDocumentSync({
10273
10283
  isApplyingRemoteRef.current = false;
10274
10284
  scheduleWriteBack();
10275
10285
  };
10276
- const unobserve = chunkG3JPCRKN_js.observeYDocSlides(
10286
+ const unobserve = chunk2Q2NFPXA_js.observeYDocSlides(
10277
10287
  doc,
10278
10288
  handleChange
10279
10289
  );
@@ -10311,7 +10321,7 @@ function useBroadcastFollower({
10311
10321
  if (!broadcaster) {
10312
10322
  return;
10313
10323
  }
10314
- if (!chunkG3JPCRKN_js.shouldAutoFollowBroadcaster({
10324
+ if (!chunk2Q2NFPXA_js.shouldAutoFollowBroadcaster({
10315
10325
  localRole: collab.config.role,
10316
10326
  broadcasterRole: broadcaster.role
10317
10327
  })) {
@@ -10482,7 +10492,7 @@ function subscribeTouchCapability(callback) {
10482
10492
  function useIsMobile() {
10483
10493
  const isTouchDevice = react.useSyncExternalStore(
10484
10494
  subscribeTouchCapability,
10485
- chunkG3JPCRKN_js.detectTouchDevice,
10495
+ chunk2Q2NFPXA_js.detectTouchDevice,
10486
10496
  () => false
10487
10497
  // server snapshot
10488
10498
  );
@@ -10492,7 +10502,7 @@ function useIsMobile() {
10492
10502
  const [viewportHeight, setViewportHeight] = react.useState(
10493
10503
  () => typeof window === "undefined" ? 768 : window.innerHeight
10494
10504
  );
10495
- const [orientation, setOrientation] = react.useState(chunkG3JPCRKN_js.detectOrientation);
10505
+ const [orientation, setOrientation] = react.useState(chunk2Q2NFPXA_js.detectOrientation);
10496
10506
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
10497
10507
  const [initialViewportHeight] = react.useState(
10498
10508
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -10513,7 +10523,7 @@ function useIsMobile() {
10513
10523
  return;
10514
10524
  }
10515
10525
  const handleOrientationChange = () => {
10516
- setOrientation(chunkG3JPCRKN_js.detectOrientation());
10526
+ setOrientation(chunk2Q2NFPXA_js.detectOrientation());
10517
10527
  };
10518
10528
  if (screen.orientation) {
10519
10529
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -10543,7 +10553,7 @@ function useIsMobile() {
10543
10553
  window.addEventListener("resize", handleResize);
10544
10554
  return () => window.removeEventListener("resize", handleResize);
10545
10555
  }, [isTouchDevice, initialViewportHeight]);
10546
- const { isMobile, isTablet, isDesktop } = chunkG3JPCRKN_js.deriveViewportBreakpoints(
10556
+ const { isMobile, isTablet, isDesktop } = chunk2Q2NFPXA_js.deriveViewportBreakpoints(
10547
10557
  viewportWidth,
10548
10558
  viewportHeight,
10549
10559
  isTouchDevice
@@ -10574,10 +10584,10 @@ function useTouchGestures(input) {
10574
10584
  if (!el || !enabled) {
10575
10585
  return;
10576
10586
  }
10577
- const recognizer = chunkG3JPCRKN_js.createTouchGestureRecognizer({
10587
+ const recognizer = chunk2Q2NFPXA_js.createTouchGestureRecognizer({
10578
10588
  getScale: () => scaleRef.current,
10579
- minScale: chunkG3JPCRKN_js.MIN_ZOOM_SCALE,
10580
- maxScale: chunkG3JPCRKN_js.MAX_ZOOM_SCALE,
10589
+ minScale: chunk2Q2NFPXA_js.MIN_ZOOM_SCALE,
10590
+ maxScale: chunk2Q2NFPXA_js.MAX_ZOOM_SCALE,
10581
10591
  callbacks: {
10582
10592
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10583
10593
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10617,7 +10627,7 @@ function scrollFocusedIntoView(keyboardInset) {
10617
10627
  return;
10618
10628
  }
10619
10629
  const rect = active.getBoundingClientRect();
10620
- const delta = chunkG3JPCRKN_js.computeScrollDelta(
10630
+ const delta = chunk2Q2NFPXA_js.computeScrollDelta(
10621
10631
  { top: rect.top, bottom: rect.bottom },
10622
10632
  window.innerHeight,
10623
10633
  keyboardInset
@@ -10637,8 +10647,8 @@ function useKeyboardInsets(enabled = true) {
10637
10647
  return;
10638
10648
  }
10639
10649
  const update = () => {
10640
- const metrics = chunkG3JPCRKN_js.readViewportMetrics(window);
10641
- const inset = metrics ? chunkG3JPCRKN_js.computeKeyboardInset(metrics) : 0;
10650
+ const metrics = chunk2Q2NFPXA_js.readViewportMetrics(window);
10651
+ const inset = metrics ? chunk2Q2NFPXA_js.computeKeyboardInset(metrics) : 0;
10642
10652
  setKeyboardInset(inset);
10643
10653
  if (inset > 0) {
10644
10654
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10649,8 +10659,8 @@ function useKeyboardInsets(enabled = true) {
10649
10659
  vv.addEventListener("scroll", update);
10650
10660
  const onFocusIn = () => {
10651
10661
  window.requestAnimationFrame(() => {
10652
- const metrics = chunkG3JPCRKN_js.readViewportMetrics(window);
10653
- const inset = metrics ? chunkG3JPCRKN_js.computeKeyboardInset(metrics) : 0;
10662
+ const metrics = chunk2Q2NFPXA_js.readViewportMetrics(window);
10663
+ const inset = metrics ? chunk2Q2NFPXA_js.computeKeyboardInset(metrics) : 0;
10654
10664
  if (inset > 0) {
10655
10665
  scrollFocusedIntoView(inset);
10656
10666
  }
@@ -10663,7 +10673,7 @@ function useKeyboardInsets(enabled = true) {
10663
10673
  document.removeEventListener("focusin", onFocusIn);
10664
10674
  };
10665
10675
  }, [enabled]);
10666
- return { keyboardInset, isKeyboardOpen: chunkG3JPCRKN_js.isKeyboardOpen(keyboardInset) };
10676
+ return { keyboardInset, isKeyboardOpen: chunk2Q2NFPXA_js.isKeyboardOpen(keyboardInset) };
10667
10677
  }
10668
10678
 
10669
10679
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10692,21 +10702,21 @@ function buildCanvasProps(input) {
10692
10702
  } = input;
10693
10703
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10694
10704
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10695
- const fieldContext = chunkG3JPCRKN_js.buildFieldSubstitutionContext({
10705
+ const fieldContext = chunk2Q2NFPXA_js.buildFieldSubstitutionContext({
10696
10706
  headerFooter: s.headerFooter,
10697
10707
  customProperties: s.customProperties,
10698
10708
  slide: activeSlide
10699
10709
  });
10700
10710
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10701
10711
  const openExternalUrl = (url, target) => {
10702
- if (chunkG3JPCRKN_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10712
+ if (chunk2Q2NFPXA_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10703
10713
  return;
10704
10714
  }
10705
- chunkG3JPCRKN_js.safeOpenUrl(url, target);
10715
+ chunk2Q2NFPXA_js.safeOpenUrl(url, target);
10706
10716
  };
10707
10717
  const handleActionClick = (elementId, action) => {
10708
10718
  if (mode === "present") {
10709
- const resolved = chunkG3JPCRKN_js.resolvePresentationAction(action, { slideCount: slides.length });
10719
+ const resolved = chunk2Q2NFPXA_js.resolvePresentationAction(action, { slideCount: slides.length });
10710
10720
  if (resolved.intent.kind === "openUrl") {
10711
10721
  openExternalUrl(resolved.intent.url);
10712
10722
  return;
@@ -10717,9 +10727,9 @@ function buildCanvasProps(input) {
10717
10727
  }
10718
10728
  };
10719
10729
  const handleHyperlinkClick = (url, target) => {
10720
- if (chunkG3JPCRKN_js.isPpactionUrl(url)) {
10730
+ if (chunk2Q2NFPXA_js.isPpactionUrl(url)) {
10721
10731
  if (mode === "present") {
10722
- const parsed = chunkG3JPCRKN_js.parsePpactionUrl(url);
10732
+ const parsed = chunk2Q2NFPXA_js.parsePpactionUrl(url);
10723
10733
  if (parsed) {
10724
10734
  presentation.handlePresentationAction({
10725
10735
  action: parsed.action,
@@ -10825,7 +10835,7 @@ function buildCanvasProps(input) {
10825
10835
 
10826
10836
  // src/viewer/hooks/useScopedLayoutOptions.ts
10827
10837
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
10828
- return chunkG3JPCRKN_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10838
+ return chunk2Q2NFPXA_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
10829
10839
  }
10830
10840
 
10831
10841
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -10838,7 +10848,7 @@ function buildToolbarAnimationHandlers(input) {
10838
10848
  const current = activeSlide.animations ?? [];
10839
10849
  if (group === "motionPath") {
10840
10850
  propertyHandlers.handleUpdateSlide({
10841
- animations: chunkG3JPCRKN_js.applyMotionPathPreset(current, selectedElement.id, preset)
10851
+ animations: chunk2Q2NFPXA_js.applyMotionPathPreset(current, selectedElement.id, preset)
10842
10852
  });
10843
10853
  return;
10844
10854
  }
@@ -11034,7 +11044,7 @@ function buildToolbarProps(input) {
11034
11044
  onOpenFile,
11035
11045
  onOpenRecentFile,
11036
11046
  onCreatePresentation: (templateId) => {
11037
- s.setSlides(chunkG3JPCRKN_js.createBackstagePresentation(templateId));
11047
+ s.setSlides(chunk2Q2NFPXA_js.createBackstagePresentation(templateId));
11038
11048
  s.setActiveSlideIndex(0);
11039
11049
  s.setSelectedElementId(null);
11040
11050
  s.setSelectedElementIds([]);
@@ -11045,6 +11055,7 @@ function buildToolbarProps(input) {
11045
11055
  onSaveAsPptx: exportHandlers.handleSaveAsPptx,
11046
11056
  onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
11047
11057
  onSaveAsPptm: exportHandlers.handleSaveAsPptm,
11058
+ onSaveAsPpt: exportHandlers.handleSaveAsPpt,
11048
11059
  hasMacros: s.hasMacros,
11049
11060
  onCopySlideAsImage: exportHandlers.handleCopySlideAsImage,
11050
11061
  onPrint: printHandlers.handlePrint,
@@ -11063,7 +11074,7 @@ function buildToolbarProps(input) {
11063
11074
  loadLayoutPreviews: input.loadLayoutPreviews,
11064
11075
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
11065
11076
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
11066
- templateScheme: chunkG3JPCRKN_js.templateSchemeFromTheme(s.theme?.colorScheme),
11077
+ templateScheme: chunk2Q2NFPXA_js.templateSchemeFromTheme(s.theme?.colorScheme),
11067
11078
  customShows: s.customShows,
11068
11079
  activeCustomShowId: s.activeCustomShowId,
11069
11080
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -11104,7 +11115,7 @@ function buildToolbarProps(input) {
11104
11115
  isCommentsPanelOpen: s.isInspectorPaneOpen,
11105
11116
  slideCommentCount: activeSlide?.comments?.length ?? 0,
11106
11117
  formatPainterActive: s.formatPainterActive,
11107
- canActivateFormatPainter: chunkG3JPCRKN_js.hasCopyableFormat(selectedElement),
11118
+ canActivateFormatPainter: chunk2Q2NFPXA_js.hasCopyableFormat(selectedElement),
11108
11119
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
11109
11120
  isSelectionPaneOpen: s.isSelectionPaneOpen,
11110
11121
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11182,7 +11193,7 @@ function useViewerBuildingBlocksCore(input) {
11182
11193
  headerFooter: state.headerFooter,
11183
11194
  loading,
11184
11195
  error,
11185
- maxHistoryEntries: chunkG3JPCRKN_js.resolveHistoryDepth(viewerOptions),
11196
+ maxHistoryEntries: chunk2Q2NFPXA_js.resolveHistoryDepth(viewerOptions),
11186
11197
  hasActivePointerInteraction,
11187
11198
  pointerCommitNonce: state.pointerCommitNonce,
11188
11199
  onDirty: markDocumentDirty,
@@ -11207,7 +11218,7 @@ function useViewerBuildingBlocksCore(input) {
11207
11218
  documentGridSpacing: state.viewProperties?.gridSpacing
11208
11219
  });
11209
11220
  const themeColorMap = react.useMemo(
11210
- () => state.theme?.colorScheme ? chunkG3JPCRKN_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11221
+ () => state.theme?.colorScheme ? chunk2Q2NFPXA_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11211
11222
  [state.theme?.colorScheme]
11212
11223
  );
11213
11224
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -11256,7 +11267,7 @@ function useViewerBuildingBlocksCore(input) {
11256
11267
  gridSpacingPx,
11257
11268
  // Multiplied against the pre-existing 2x baseline; see the matching
11258
11269
  // comment in `PowerPointViewer.tsx`.
11259
- imageExportScale: 2 * chunkG3JPCRKN_js.resolveImageResolutionScale(viewerOptions),
11270
+ imageExportScale: 2 * chunk2Q2NFPXA_js.resolveImageResolutionScale(viewerOptions),
11260
11271
  viewerOptions
11261
11272
  };
11262
11273
  }
@@ -11272,7 +11283,7 @@ function useCompatibilityToastsState() {
11272
11283
  }
11273
11284
  function useReadOnlyRecommendationState(content) {
11274
11285
  const [recommendation, setRecommendation] = react.useState(
11275
- () => chunkG3JPCRKN_js.readOnlyRecommendation(void 0)
11286
+ () => chunk2Q2NFPXA_js.readOnlyRecommendation(void 0)
11276
11287
  );
11277
11288
  const [modifyVerifier, setModifyVerifier] = react.useState(void 0);
11278
11289
  const [bannerHidden, setBannerHidden] = react.useState(false);
@@ -11312,7 +11323,7 @@ function useReadOnlyRecommendationState(content) {
11312
11323
  async (password) => {
11313
11324
  setCheckingPassword(true);
11314
11325
  try {
11315
- const result = await chunkG3JPCRKN_js.checkModifyPassword(modifyVerifier, password);
11326
+ const result = await chunk2Q2NFPXA_js.checkModifyPassword(modifyVerifier, password);
11316
11327
  if (result.ok) {
11317
11328
  unlock();
11318
11329
  } else {
@@ -11357,9 +11368,9 @@ function useViewPreferencesSync(input) {
11357
11368
  setShowGuides
11358
11369
  } = input;
11359
11370
  react.useEffect(() => {
11360
- const seeded = chunkG3JPCRKN_js.viewerPreferencesFromViewProperties(
11371
+ const seeded = chunk2Q2NFPXA_js.viewerPreferencesFromViewProperties(
11361
11372
  { viewProperties },
11362
- { ...chunkG3JPCRKN_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11373
+ { ...chunk2Q2NFPXA_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11363
11374
  );
11364
11375
  setSnapToGrid(seeded.snapToGrid);
11365
11376
  setSnapToShape(seeded.snapToObjects ?? snapToShape);
@@ -11369,7 +11380,7 @@ function useViewPreferencesSync(input) {
11369
11380
  (prefsOverride) => {
11370
11381
  setViewProperties((prev) => {
11371
11382
  const merged = {
11372
- ...chunkG3JPCRKN_js.DEFAULT_VIEWER_PREFERENCES,
11383
+ ...chunk2Q2NFPXA_js.DEFAULT_VIEWER_PREFERENCES,
11373
11384
  snapToGrid,
11374
11385
  snapToObjects: snapToShape,
11375
11386
  showGuides,
@@ -11377,7 +11388,7 @@ function useViewPreferencesSync(input) {
11377
11388
  gridSpacingCy: prev?.gridSpacing?.cy,
11378
11389
  ...prefsOverride
11379
11390
  };
11380
- const patch = chunkG3JPCRKN_js.viewPropertiesPatchFromPreferences(merged);
11391
+ const patch = chunk2Q2NFPXA_js.viewPropertiesPatchFromPreferences(merged);
11381
11392
  return {
11382
11393
  ...prev,
11383
11394
  slideViewPr: { ...prev?.slideViewPr, ...patch.slideViewPr },
@@ -11596,7 +11607,7 @@ function useViewerBuildingBlocks(input) {
11596
11607
  }, [incomingContent]);
11597
11608
  const onOpenFile = react.useCallback(() => {
11598
11609
  void (async () => {
11599
- const picked = await chunkG3JPCRKN_js.openPptxFile();
11610
+ const picked = await chunk2Q2NFPXA_js.openPptxFile();
11600
11611
  if (picked) {
11601
11612
  setContent(picked.buffer);
11602
11613
  }
@@ -11604,7 +11615,7 @@ function useViewerBuildingBlocks(input) {
11604
11615
  }, []);
11605
11616
  const onOpenRecentFile = react.useCallback((key) => {
11606
11617
  void (async () => {
11607
- const bytes = await chunkG3JPCRKN_js.readBackstageRecentFile(key);
11618
+ const bytes = await chunk2Q2NFPXA_js.readBackstageRecentFile(key);
11608
11619
  if (bytes) {
11609
11620
  setContent(bytes);
11610
11621
  }
@@ -11790,6 +11801,7 @@ exports.isAudienceTab = isAudienceTab;
11790
11801
  exports.parseAudienceNonce = parseAudienceNonce;
11791
11802
  exports.parseEmailUrl = parseEmailUrl;
11792
11803
  exports.parseSlideFromUrl = parseSlideFromUrl;
11804
+ exports.playAnimationSound = playAnimationSound;
11793
11805
  exports.renderToCanvas = renderToCanvas;
11794
11806
  exports.safePrompt = safePrompt;
11795
11807
  exports.scopeLayoutOptionsToActiveSlide = scopeLayoutOptionsToActiveSlide;