pptx-react-viewer 3.14.0 → 3.15.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 (142) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/{AiChatPanel-42X7I5I2.js → AiChatPanel-7CWOJ3PS.js} +24 -24
  3. package/dist/AiChatPanel-7CWOJ3PS.js.br +0 -0
  4. package/dist/AiChatPanel-7CWOJ3PS.js.gz +0 -0
  5. package/dist/{AiChatPanel-NJBUCO4X.mjs → AiChatPanel-TBIAQSZ7.mjs} +3 -3
  6. package/dist/AiChatPanel-TBIAQSZ7.mjs.br +0 -0
  7. package/dist/AiChatPanel-TBIAQSZ7.mjs.gz +0 -0
  8. package/dist/{Area3DChartScene-TFZPHEZ6.mjs → Area3DChartScene-6FFBYPHF.mjs} +1 -1
  9. package/dist/Area3DChartScene-6FFBYPHF.mjs.br +0 -0
  10. package/dist/Area3DChartScene-6FFBYPHF.mjs.gz +0 -0
  11. package/dist/{Area3DChartScene-IDS5APPJ.js → Area3DChartScene-ZJYR6K66.js} +2 -2
  12. package/dist/Area3DChartScene-ZJYR6K66.js.br +0 -0
  13. package/dist/Area3DChartScene-ZJYR6K66.js.gz +0 -0
  14. package/dist/{Bar3DChartScene-L3VXO7BS.mjs → Bar3DChartScene-42MWINQX.mjs} +1 -1
  15. package/dist/{Bar3DChartScene-L3VXO7BS.mjs.br → Bar3DChartScene-42MWINQX.mjs.br} +0 -0
  16. package/dist/Bar3DChartScene-42MWINQX.mjs.gz +0 -0
  17. package/dist/{Bar3DChartScene-C3CQCKB6.js → Bar3DChartScene-JP3BXEZW.js} +2 -2
  18. package/dist/Bar3DChartScene-JP3BXEZW.js.br +0 -0
  19. package/dist/Bar3DChartScene-JP3BXEZW.js.gz +0 -0
  20. package/dist/{Line3DChartScene-YU4M3VMW.js → Line3DChartScene-JK3AELXZ.js} +2 -2
  21. package/dist/Line3DChartScene-JK3AELXZ.js.br +0 -0
  22. package/dist/Line3DChartScene-JK3AELXZ.js.gz +0 -0
  23. package/dist/{Line3DChartScene-UM4ZJJSY.mjs → Line3DChartScene-YVCSJMWK.mjs} +1 -1
  24. package/dist/Line3DChartScene-YVCSJMWK.mjs.br +0 -0
  25. package/dist/Line3DChartScene-YVCSJMWK.mjs.gz +0 -0
  26. package/dist/{Model3DScene-YRRNSOYK.js → Model3DScene-N6UIMN7T.js} +2 -2
  27. package/dist/Model3DScene-N6UIMN7T.js.br +0 -0
  28. package/dist/Model3DScene-N6UIMN7T.js.gz +0 -0
  29. package/dist/{Model3DScene-YEWZQAN5.mjs → Model3DScene-OXWSYHHK.mjs} +1 -1
  30. package/dist/Model3DScene-OXWSYHHK.mjs.br +0 -0
  31. package/dist/Model3DScene-OXWSYHHK.mjs.gz +0 -0
  32. package/dist/{PieChart3DScene-GH4X3W3E.js → PieChart3DScene-Q2Z3ECL4.js} +2 -2
  33. package/dist/PieChart3DScene-Q2Z3ECL4.js.br +0 -0
  34. package/dist/PieChart3DScene-Q2Z3ECL4.js.gz +0 -0
  35. package/dist/{PieChart3DScene-2OBYYK55.mjs → PieChart3DScene-XK4ETZJC.mjs} +1 -1
  36. package/dist/{PieChart3DScene-2OBYYK55.mjs.br → PieChart3DScene-XK4ETZJC.mjs.br} +0 -0
  37. package/dist/PieChart3DScene-XK4ETZJC.mjs.gz +0 -0
  38. package/dist/{SurfaceChart3DScene-DYG5I5UP.mjs → SurfaceChart3DScene-KNWMKMOL.mjs} +1 -1
  39. package/dist/SurfaceChart3DScene-KNWMKMOL.mjs.br +0 -0
  40. package/dist/SurfaceChart3DScene-KNWMKMOL.mjs.gz +0 -0
  41. package/dist/{SurfaceChart3DScene-J5CAPHVA.js → SurfaceChart3DScene-ULBUIF7T.js} +2 -2
  42. package/dist/SurfaceChart3DScene-ULBUIF7T.js.br +0 -0
  43. package/dist/SurfaceChart3DScene-ULBUIF7T.js.gz +0 -0
  44. package/dist/{chunk-MH4VFSDL.js → chunk-5KAMDV37.js} +4298 -3435
  45. package/dist/chunk-5KAMDV37.js.br +0 -0
  46. package/dist/chunk-5KAMDV37.js.gz +0 -0
  47. package/dist/{chunk-EZ3EI2VM.mjs → chunk-6547ZWC7.mjs} +12 -12
  48. package/dist/chunk-6547ZWC7.mjs.br +0 -0
  49. package/dist/chunk-6547ZWC7.mjs.gz +0 -0
  50. package/dist/{chunk-YFYSY7ZL.mjs → chunk-AT4BJKON.mjs} +1 -1
  51. package/dist/chunk-AT4BJKON.mjs.br +0 -0
  52. package/dist/chunk-AT4BJKON.mjs.gz +0 -0
  53. package/dist/{chunk-GQMVEUHM.mjs → chunk-C4Q4WYAJ.mjs} +14 -7
  54. package/dist/chunk-C4Q4WYAJ.mjs.br +0 -0
  55. package/dist/chunk-C4Q4WYAJ.mjs.gz +0 -0
  56. package/dist/{chunk-H4LMXJ2Z.js → chunk-GLY4OPMY.js} +167 -167
  57. package/dist/chunk-GLY4OPMY.js.br +0 -0
  58. package/dist/chunk-GLY4OPMY.js.gz +0 -0
  59. package/dist/{chunk-OVOXRK7D.mjs → chunk-J7Q7AGN7.mjs} +1 -1
  60. package/dist/chunk-J7Q7AGN7.mjs.br +0 -0
  61. package/dist/chunk-J7Q7AGN7.mjs.gz +0 -0
  62. package/dist/{chunk-7Z7AY4MH.js → chunk-LAB7WX2N.js} +466 -459
  63. package/dist/chunk-LAB7WX2N.js.br +0 -0
  64. package/dist/chunk-LAB7WX2N.js.gz +0 -0
  65. package/dist/{chunk-7OMXJNYI.js → chunk-Q6CSZ7VM.js} +1289 -1289
  66. package/dist/chunk-Q6CSZ7VM.js.br +0 -0
  67. package/dist/chunk-Q6CSZ7VM.js.gz +0 -0
  68. package/dist/{chunk-INKQT4SQ.js → chunk-VVJTEFGP.js} +5 -5
  69. package/dist/chunk-VVJTEFGP.js.br +0 -0
  70. package/dist/chunk-VVJTEFGP.js.gz +0 -0
  71. package/dist/{chunk-HADPGII2.mjs → chunk-YNTZCMRI.mjs} +4298 -3435
  72. package/dist/chunk-YNTZCMRI.mjs.br +0 -0
  73. package/dist/chunk-YNTZCMRI.mjs.gz +0 -0
  74. package/dist/index.d.ts +54 -1
  75. package/dist/index.js +45 -45
  76. package/dist/index.js.br +0 -0
  77. package/dist/index.js.gz +0 -0
  78. package/dist/index.mjs +5 -5
  79. package/dist/index.mjs.br +0 -0
  80. package/dist/index.mjs.gz +0 -0
  81. package/dist/internals.d.ts +55 -1
  82. package/dist/internals.d.ts.map +1 -1
  83. package/dist/internals.js +78 -78
  84. package/dist/internals.js.br +0 -0
  85. package/dist/internals.js.gz +0 -0
  86. package/dist/internals.mjs +3 -3
  87. package/dist/internals.mjs.br +0 -0
  88. package/dist/internals.mjs.gz +0 -0
  89. package/dist/viewer/index.d.ts +54 -1
  90. package/dist/viewer/index.js +26 -26
  91. package/dist/viewer/index.js.br +0 -0
  92. package/dist/viewer/index.js.gz +0 -0
  93. package/dist/viewer/index.mjs +5 -5
  94. package/dist/viewer/index.mjs.br +0 -0
  95. package/dist/viewer/index.mjs.gz +0 -0
  96. package/package.json +1 -1
  97. package/dist/AiChatPanel-42X7I5I2.js.br +0 -0
  98. package/dist/AiChatPanel-42X7I5I2.js.gz +0 -0
  99. package/dist/AiChatPanel-NJBUCO4X.mjs.br +0 -0
  100. package/dist/AiChatPanel-NJBUCO4X.mjs.gz +0 -0
  101. package/dist/Area3DChartScene-IDS5APPJ.js.br +0 -0
  102. package/dist/Area3DChartScene-IDS5APPJ.js.gz +0 -0
  103. package/dist/Area3DChartScene-TFZPHEZ6.mjs.br +0 -0
  104. package/dist/Area3DChartScene-TFZPHEZ6.mjs.gz +0 -0
  105. package/dist/Bar3DChartScene-C3CQCKB6.js.br +0 -0
  106. package/dist/Bar3DChartScene-C3CQCKB6.js.gz +0 -0
  107. package/dist/Bar3DChartScene-L3VXO7BS.mjs.gz +0 -0
  108. package/dist/Line3DChartScene-UM4ZJJSY.mjs.br +0 -0
  109. package/dist/Line3DChartScene-UM4ZJJSY.mjs.gz +0 -0
  110. package/dist/Line3DChartScene-YU4M3VMW.js.br +0 -0
  111. package/dist/Line3DChartScene-YU4M3VMW.js.gz +0 -0
  112. package/dist/Model3DScene-YEWZQAN5.mjs.br +0 -0
  113. package/dist/Model3DScene-YEWZQAN5.mjs.gz +0 -0
  114. package/dist/Model3DScene-YRRNSOYK.js.br +0 -0
  115. package/dist/Model3DScene-YRRNSOYK.js.gz +0 -0
  116. package/dist/PieChart3DScene-2OBYYK55.mjs.gz +0 -0
  117. package/dist/PieChart3DScene-GH4X3W3E.js.br +0 -0
  118. package/dist/PieChart3DScene-GH4X3W3E.js.gz +0 -0
  119. package/dist/SurfaceChart3DScene-DYG5I5UP.mjs.br +0 -0
  120. package/dist/SurfaceChart3DScene-DYG5I5UP.mjs.gz +0 -0
  121. package/dist/SurfaceChart3DScene-J5CAPHVA.js.br +0 -0
  122. package/dist/SurfaceChart3DScene-J5CAPHVA.js.gz +0 -0
  123. package/dist/chunk-7OMXJNYI.js.br +0 -0
  124. package/dist/chunk-7OMXJNYI.js.gz +0 -0
  125. package/dist/chunk-7Z7AY4MH.js.br +0 -0
  126. package/dist/chunk-7Z7AY4MH.js.gz +0 -0
  127. package/dist/chunk-EZ3EI2VM.mjs.br +0 -0
  128. package/dist/chunk-EZ3EI2VM.mjs.gz +0 -0
  129. package/dist/chunk-GQMVEUHM.mjs.br +0 -0
  130. package/dist/chunk-GQMVEUHM.mjs.gz +0 -0
  131. package/dist/chunk-H4LMXJ2Z.js.br +0 -0
  132. package/dist/chunk-H4LMXJ2Z.js.gz +0 -0
  133. package/dist/chunk-HADPGII2.mjs.br +0 -0
  134. package/dist/chunk-HADPGII2.mjs.gz +0 -0
  135. package/dist/chunk-INKQT4SQ.js.br +0 -0
  136. package/dist/chunk-INKQT4SQ.js.gz +0 -0
  137. package/dist/chunk-MH4VFSDL.js.br +0 -0
  138. package/dist/chunk-MH4VFSDL.js.gz +0 -0
  139. package/dist/chunk-OVOXRK7D.mjs.br +0 -0
  140. package/dist/chunk-OVOXRK7D.mjs.gz +0 -0
  141. package/dist/chunk-YFYSY7ZL.mjs.br +0 -0
  142. package/dist/chunk-YFYSY7ZL.mjs.gz +0 -0
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkH4LMXJ2Z_js = require('./chunk-H4LMXJ2Z.js');
4
- var chunkMH4VFSDL_js = require('./chunk-MH4VFSDL.js');
3
+ var chunkGLY4OPMY_js = require('./chunk-GLY4OPMY.js');
4
+ var chunk5KAMDV37_js = require('./chunk-5KAMDV37.js');
5
5
  var chunk3AJ54EAB_js = require('./chunk-3AJ54EAB.js');
6
6
  var react = require('react');
7
7
  var reactI18next = require('react-i18next');
@@ -9,7 +9,7 @@ var reactI18next = require('react-i18next');
9
9
  function useVirtualizedSlides({
10
10
  totalItems,
11
11
  itemHeight,
12
- overscan = chunkMH4VFSDL_js.DEFAULT_VIRTUAL_OVERSCAN
12
+ overscan = chunk5KAMDV37_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 = chunkMH4VFSDL_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
42
+ const range = chunk5KAMDV37_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 ??= chunkMH4VFSDL_js.createPresenceProjector();
83
+ projectorRef.current ??= chunk5KAMDV37_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 >= chunkMH4VFSDL_js.BROADCAST_THROTTLE_MS) {
108
+ if (elapsed >= chunk5KAMDV37_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
- }, chunkMH4VFSDL_js.BROADCAST_THROTTLE_MS - elapsed);
118
+ }, chunk5KAMDV37_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 = chunkMH4VFSDL_js.createSyncGate(() => setSynced(true));
198
+ gateRef.current = chunk5KAMDV37_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
- chunkMH4VFSDL_js.clearLocalAwareness(provider.awareness);
218
+ chunk5KAMDV37_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 = chunkMH4VFSDL_js.validateRoomId(config.roomId);
243
+ const roomId = chunk5KAMDV37_js.validateRoomId(config.roomId);
244
244
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunkMH4VFSDL_js.createDepartureChannel(roomId, provider.awareness);
245
+ departureRef.current = chunk5KAMDV37_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 = chunkMH4VFSDL_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunkMH4VFSDL_js.resolveTransportForServerUrl(config.serverUrl);
287
+ const roomId = chunk5KAMDV37_js.validateRoomId(config.roomId);
288
+ const transport = config.transport ?? chunk5KAMDV37_js.resolveTransportForServerUrl(config.serverUrl);
289
289
  if (transport === "webrtc") {
290
290
  await initWebrtc();
291
291
  return;
292
292
  }
293
- if (chunkMH4VFSDL_js.isMixedContentBlocked(config.serverUrl)) {
293
+ if (chunk5KAMDV37_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 = chunkMH4VFSDL_js.createDepartureChannel(roomId, provider.awareness);
307
+ departureRef.current = chunk5KAMDV37_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
- chunkMH4VFSDL_js.clearLocalAwareness(provider.awareness);
347
+ chunk5KAMDV37_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
- }, chunkMH4VFSDL_js.CONNECTION_TIMEOUT_MS);
356
+ }, chunk5KAMDV37_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
- chunkMH4VFSDL_js.clearLocalAwareness(provider.awareness);
365
+ chunk5KAMDV37_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 = chunkMH4VFSDL_js.registerCollaborationTeardown({
391
+ const disposeTeardown = chunk5KAMDV37_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 = chunkMH4VFSDL_js.sanitizeColor(config?.userColor, "#6366f1");
412
+ const userColor = chunk5KAMDV37_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(chunkMH4VFSDL_js.cloneSlide),
531
- templateElementsBySlideId: chunkMH4VFSDL_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
530
+ slides: slides.map(chunk5KAMDV37_js.cloneSlide),
531
+ templateElementsBySlideId: chunk5KAMDV37_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(chunkMH4VFSDL_js.cloneSlide));
544
+ setSlides(snapshot.slides.map(chunk5KAMDV37_js.cloneSlide));
545
545
  setTemplateElementsBySlideId(
546
- chunkMH4VFSDL_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
546
+ chunk5KAMDV37_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 = chunkH4LMXJ2Z_js.cloneHistorySnapshot(previousSnapshot);
586
- lastHistorySnapshotRef.current = chunkH4LMXJ2Z_js.cloneHistorySnapshot(nextSnapshot);
585
+ const nextSnapshot = chunkGLY4OPMY_js.cloneHistorySnapshot(previousSnapshot);
586
+ lastHistorySnapshotRef.current = chunkGLY4OPMY_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 = chunkH4LMXJ2Z_js.cloneHistorySnapshot(nextSnapshot);
608
- lastHistorySnapshotRef.current = chunkH4LMXJ2Z_js.cloneHistorySnapshot(targetSnapshot);
607
+ const targetSnapshot = chunkGLY4OPMY_js.cloneHistorySnapshot(nextSnapshot);
608
+ lastHistorySnapshotRef.current = chunkGLY4OPMY_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 = chunkH4LMXJ2Z_js.cloneHistorySnapshot(initialSnapshot);
626
+ const clonedInitial = chunkGLY4OPMY_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 = chunkH4LMXJ2Z_js.cloneHistorySnapshot(snapshot);
674
+ lastHistorySnapshotRef.current = chunkGLY4OPMY_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(chunkH4LMXJ2Z_js.cloneHistorySnapshot(previousSnapshot));
681
+ historyPastRef.current.push(chunkGLY4OPMY_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 = chunkH4LMXJ2Z_js.cloneHistorySnapshot(snapshot);
686
+ lastHistorySnapshotRef.current = chunkGLY4OPMY_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(chunkMH4VFSDL_js.createWheelStepBuffer());
746
+ const wheelBufferRef = react.useRef(chunk5KAMDV37_js.createWheelStepBuffer());
747
747
  const storeRef = react.useRef(null);
748
- storeRef.current ??= chunkMH4VFSDL_js.createViewerZoomStore();
748
+ storeRef.current ??= chunk5KAMDV37_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 = chunkMH4VFSDL_js.clampZoomScale(nextScale);
809
+ const boundedScale = chunk5KAMDV37_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, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE));
847
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE));
846
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkGLY4OPMY_js.MIN_ELEMENT_SIZE));
847
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkGLY4OPMY_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, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE);
854
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE);
853
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkGLY4OPMY_js.MIN_ELEMENT_SIZE);
854
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkGLY4OPMY_js.MIN_ELEMENT_SIZE);
855
855
  const availableWidth = Math.max(
856
- effectiveEditorDimensions.width - chunkH4LMXJ2Z_js.ZOOM_TO_SELECTION_PADDING,
857
- chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE
856
+ effectiveEditorDimensions.width - chunkGLY4OPMY_js.ZOOM_TO_SELECTION_PADDING,
857
+ chunkGLY4OPMY_js.MIN_ELEMENT_SIZE
858
858
  );
859
859
  const availableHeight = Math.max(
860
- effectiveEditorDimensions.height - chunkH4LMXJ2Z_js.ZOOM_TO_SELECTION_PADDING,
861
- chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE
860
+ effectiveEditorDimensions.height - chunkGLY4OPMY_js.ZOOM_TO_SELECTION_PADDING,
861
+ chunkGLY4OPMY_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 = chunkMH4VFSDL_js.clampZoomScale(targetEditorScale / safeFitScale);
868
+ const nextScale = chunk5KAMDV37_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 = chunkMH4VFSDL_js.mapEditingWheel(event, wheelBufferRef.current, true);
885
+ const mapped = chunk5KAMDV37_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: chunkMH4VFSDL_js.clampZoomScale(store.getState().zoom + mapped.deltaScale)
892
+ zoom: chunk5KAMDV37_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
- chunkMH4VFSDL_js.playGroup(controller, group, ctx);
988
- chunkMH4VFSDL_js.scheduleAutoAdvanceChain(controller, ctx);
987
+ chunk5KAMDV37_js.playGroup(controller, group, ctx);
988
+ chunk5KAMDV37_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 = chunkMH4VFSDL_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1007
+ const delay = chunk5KAMDV37_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1008
1008
  const timer = window.setTimeout(() => {
1009
1009
  setPresentationAnimations(
1010
1010
  (previousAnimations) => previousAnimations.map(
@@ -1037,7 +1037,7 @@ function useAnimationPlayback(input) {
1037
1037
  const presentationTimersRef = react.useRef([]);
1038
1038
  const controllerRef = react.useRef(null);
1039
1039
  const buildRafRef = react.useRef(null);
1040
- const activeAnimationGroupRef = react.useRef(chunkMH4VFSDL_js.createActiveAnimationGroup());
1040
+ const activeAnimationGroupRef = react.useRef(chunk5KAMDV37_js.createActiveAnimationGroup());
1041
1041
  const seededCompletedRef = react.useRef(false);
1042
1042
  const mediaTimeNodeElementIdsRef = react.useRef(/* @__PURE__ */ new Map());
1043
1043
  const lastSeedCompletedRef = react.useRef(false);
@@ -1054,15 +1054,15 @@ function useAnimationPlayback(input) {
1054
1054
  }, [onPlayActionSound]);
1055
1055
  react.useEffect(() => {
1056
1056
  return () => {
1057
- chunkMH4VFSDL_js.cancelBuildReveal(buildRafRef);
1057
+ chunk5KAMDV37_js.cancelBuildReveal(buildRafRef);
1058
1058
  };
1059
1059
  }, []);
1060
1060
  const clearPresentationTimers = react.useCallback(() => {
1061
- chunkMH4VFSDL_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1061
+ chunk5KAMDV37_js.clearPlaybackTimers(buildPlaybackContext(), activeAnimationGroupRef.current);
1062
1062
  }, [buildPlaybackContext]);
1063
1063
  const resetSlideTimeline = react.useCallback(
1064
1064
  (slideIndex) => {
1065
- chunkMH4VFSDL_js.cancelBuildReveal(buildRafRef);
1065
+ chunk5KAMDV37_js.cancelBuildReveal(buildRafRef);
1066
1066
  const slide = slides[slideIndex];
1067
1067
  if (!slide) {
1068
1068
  controllerRef.current = null;
@@ -1073,14 +1073,14 @@ function useAnimationPlayback(input) {
1073
1073
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1074
1074
  return;
1075
1075
  }
1076
- const controller = chunkMH4VFSDL_js.PresentationAnimationController.fromSlide(slide, {
1076
+ const controller = chunk5KAMDV37_js.PresentationAnimationController.fromSlide(slide, {
1077
1077
  slideHeightPx: canvasSize?.height,
1078
1078
  slideWidthPx: canvasSize?.width,
1079
1079
  themeColorMap,
1080
1080
  pixelateMosaic: pixelateMosaicAnimation
1081
1081
  });
1082
1082
  controllerRef.current = controller;
1083
- mediaTimeNodeElementIdsRef.current = chunkMH4VFSDL_js.resolveMediaTimeNodeElementIds(
1083
+ mediaTimeNodeElementIdsRef.current = chunk5KAMDV37_js.resolveMediaTimeNodeElementIds(
1084
1084
  slide.nativeAnimations ?? []
1085
1085
  );
1086
1086
  setPresentationKeyframesCss(controller.keyframesCss);
@@ -1094,7 +1094,7 @@ function useAnimationPlayback(input) {
1094
1094
  if (!animationsEnabled) {
1095
1095
  return false;
1096
1096
  }
1097
- return chunkMH4VFSDL_js.advanceMainSequence(
1097
+ return chunk5KAMDV37_js.advanceMainSequence(
1098
1098
  controllerRef.current,
1099
1099
  buildPlaybackContext(),
1100
1100
  activeAnimationGroupRef.current
@@ -1110,7 +1110,7 @@ function useAnimationPlayback(input) {
1110
1110
  if (!group) {
1111
1111
  return false;
1112
1112
  }
1113
- chunkMH4VFSDL_js.playGroup(controller, group, buildPlaybackContext());
1113
+ chunk5KAMDV37_js.playGroup(controller, group, buildPlaybackContext());
1114
1114
  return true;
1115
1115
  },
1116
1116
  [buildPlaybackContext]
@@ -1129,7 +1129,7 @@ function useAnimationPlayback(input) {
1129
1129
  if (!group) {
1130
1130
  return false;
1131
1131
  }
1132
- chunkMH4VFSDL_js.playGroup(controller, group, buildPlaybackContext());
1132
+ chunk5KAMDV37_js.playGroup(controller, group, buildPlaybackContext());
1133
1133
  return true;
1134
1134
  },
1135
1135
  [animationsEnabled, buildPlaybackContext]
@@ -1210,12 +1210,12 @@ function useAnimationPlayback(input) {
1210
1210
  presentationTimersRef
1211
1211
  };
1212
1212
  }
1213
- var PRESENTER_CHANNEL_NAME = chunkMH4VFSDL_js.PRESENTATION_CHANNEL_NAME;
1214
- var AUDIENCE_HASH = chunkMH4VFSDL_js.PRESENTATION_HASH;
1215
- var PRESENTER_MSG_ORIGIN = chunkMH4VFSDL_js.PRESENTATION_MESSAGE_ORIGIN;
1216
- var AUDIENCE_NONCE_KEY = chunkMH4VFSDL_js.PRESENTATION_NONCE_KEY;
1213
+ var PRESENTER_CHANNEL_NAME = chunk5KAMDV37_js.PRESENTATION_CHANNEL_NAME;
1214
+ var AUDIENCE_HASH = chunk5KAMDV37_js.PRESENTATION_HASH;
1215
+ var PRESENTER_MSG_ORIGIN = chunk5KAMDV37_js.PRESENTATION_MESSAGE_ORIGIN;
1216
+ var AUDIENCE_NONCE_KEY = chunk5KAMDV37_js.PRESENTATION_NONCE_KEY;
1217
1217
  function generateSessionId() {
1218
- return chunkMH4VFSDL_js.createPresentationSessionId();
1218
+ return chunk5KAMDV37_js.createPresentationSessionId();
1219
1219
  }
1220
1220
  function parseAudienceNonce() {
1221
1221
  const hash = window.location.hash;
@@ -1251,7 +1251,7 @@ function usePresenterWindow(input) {
1251
1251
  }, []);
1252
1252
  const swapDisplays = react.useCallback(async () => {
1253
1253
  const audience = audienceWindowRef.current;
1254
- return audience && !audience.closed ? chunkMH4VFSDL_js.swapPresentationWindows(window, audience) : false;
1254
+ return audience && !audience.closed ? chunk5KAMDV37_js.swapPresentationWindows(window, audience) : false;
1255
1255
  }, []);
1256
1256
  const syncSlideToAudience = react.useCallback(
1257
1257
  (slideIndex) => {
@@ -1315,7 +1315,7 @@ function usePresenterWindow(input) {
1315
1315
  pollTimerRef.current = null;
1316
1316
  }
1317
1317
  if (closingSessionId) {
1318
- void chunkMH4VFSDL_js.clearAudienceContent(closingSessionId);
1318
+ void chunk5KAMDV37_js.clearAudienceContent(closingSessionId);
1319
1319
  }
1320
1320
  }, [getChannel]);
1321
1321
  const openAudienceWindow = react.useCallback(() => {
@@ -1333,10 +1333,10 @@ function usePresenterWindow(input) {
1333
1333
  audienceWindowRef.current = blankWin;
1334
1334
  const sessionId = generateSessionId();
1335
1335
  sessionIdRef.current = sessionId;
1336
- const audienceUrl = chunkMH4VFSDL_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
- void chunkMH4VFSDL_js.resolveAudienceScreenPlacement(window).then((placement) => {
1336
+ const audienceUrl = chunk5KAMDV37_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1337
+ void chunk5KAMDV37_js.resolveAudienceScreenPlacement(window).then((placement) => {
1338
1338
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1339
- chunkMH4VFSDL_js.placeAudienceWindow(blankWin, placement);
1339
+ chunk5KAMDV37_js.placeAudienceWindow(blankWin, placement);
1340
1340
  }
1341
1341
  return void 0;
1342
1342
  });
@@ -1366,7 +1366,7 @@ function usePresenterWindow(input) {
1366
1366
  }
1367
1367
  };
1368
1368
  if (content) {
1369
- void chunkMH4VFSDL_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1369
+ void chunk5KAMDV37_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1370
1370
  } else {
1371
1371
  navigateOrClose(true);
1372
1372
  }
@@ -1392,7 +1392,7 @@ function usePresenterWindow(input) {
1392
1392
  }
1393
1393
  const handleMessage = (event) => {
1394
1394
  const message = event.data;
1395
- if (chunkMH4VFSDL_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1395
+ if (chunk5KAMDV37_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1396
1396
  syncStateToAudience(snapshotRef.current);
1397
1397
  }
1398
1398
  };
@@ -1421,7 +1421,7 @@ function usePresenterWindow(input) {
1421
1421
  react.useEffect(() => {
1422
1422
  const handleBeforeUnload = () => {
1423
1423
  if (sessionIdRef.current) {
1424
- void chunkMH4VFSDL_js.clearAudienceContent(sessionIdRef.current);
1424
+ void chunk5KAMDV37_js.clearAudienceContent(sessionIdRef.current);
1425
1425
  }
1426
1426
  };
1427
1427
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1483,7 +1483,7 @@ function useAudienceMode(input) {
1483
1483
  }
1484
1484
  channel.onmessage = (event) => {
1485
1485
  const data = event.data;
1486
- if (!chunkMH4VFSDL_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1486
+ if (!chunk5KAMDV37_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1487
1487
  return;
1488
1488
  }
1489
1489
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1499,16 +1499,16 @@ function useAudienceMode(input) {
1499
1499
  }
1500
1500
  if (data.type === "presenter-exit") {
1501
1501
  if (expectedSessionId) {
1502
- void chunkMH4VFSDL_js.clearAudienceContent(expectedSessionId);
1502
+ void chunk5KAMDV37_js.clearAudienceContent(expectedSessionId);
1503
1503
  }
1504
- if (chunkMH4VFSDL_js.endAudienceDisplay(window)) {
1504
+ if (chunk5KAMDV37_js.endAudienceDisplay(window)) {
1505
1505
  handlers.onPresenterEnded?.();
1506
1506
  }
1507
1507
  }
1508
1508
  };
1509
1509
  if (expectedSessionId) {
1510
1510
  channel.postMessage({
1511
- origin: chunkMH4VFSDL_js.PRESENTATION_MESSAGE_ORIGIN,
1511
+ origin: chunk5KAMDV37_js.PRESENTATION_MESSAGE_ORIGIN,
1512
1512
  type: "audience-ready",
1513
1513
  sessionId: expectedSessionId
1514
1514
  });
@@ -1522,7 +1522,7 @@ function useAudienceMode(input) {
1522
1522
  }, []);
1523
1523
  }
1524
1524
  function usePresentationKeyboard(input) {
1525
- const wheelBufferRef = react.useRef(chunkMH4VFSDL_js.createWheelStepBuffer());
1525
+ const wheelBufferRef = react.useRef(chunk5KAMDV37_js.createWheelStepBuffer());
1526
1526
  const {
1527
1527
  mode,
1528
1528
  movePresentationSlide,
@@ -1543,14 +1543,14 @@ function usePresentationKeyboard(input) {
1543
1543
  presentationSlideIndex,
1544
1544
  setShowRehearsalSummary
1545
1545
  } = input;
1546
- const keyBufferRef = react.useRef(chunkMH4VFSDL_js.createPresentationKeyBuffer());
1546
+ const keyBufferRef = react.useRef(chunk5KAMDV37_js.createPresentationKeyBuffer());
1547
1547
  react.useEffect(() => {
1548
- if (mode !== "present" || !chunkMH4VFSDL_js.acceptsPresentationInput()) {
1549
- keyBufferRef.current = chunkMH4VFSDL_js.createPresentationKeyBuffer();
1548
+ if (mode !== "present" || !chunk5KAMDV37_js.acceptsPresentationInput()) {
1549
+ keyBufferRef.current = chunk5KAMDV37_js.createPresentationKeyBuffer();
1550
1550
  return;
1551
1551
  }
1552
1552
  const handleKeyDown = (event) => {
1553
- const mapped = chunkMH4VFSDL_js.mapPresentationKey(event, keyBufferRef.current);
1553
+ const mapped = chunk5KAMDV37_js.mapPresentationKey(event, keyBufferRef.current);
1554
1554
  if (mapped.action === "none") {
1555
1555
  return;
1556
1556
  }
@@ -1570,12 +1570,12 @@ function usePresentationKeyboard(input) {
1570
1570
  movePresentationSlide(-1);
1571
1571
  return;
1572
1572
  case "first": {
1573
- const first = chunkMH4VFSDL_js.firstShowSlideIndex(showSlideIndexes);
1573
+ const first = chunk5KAMDV37_js.firstShowSlideIndex(showSlideIndexes);
1574
1574
  navigateToSlide(first ?? 0);
1575
1575
  return;
1576
1576
  }
1577
1577
  case "last": {
1578
- const last = chunkMH4VFSDL_js.lastShowSlideIndex(showSlideIndexes);
1578
+ const last = chunk5KAMDV37_js.lastShowSlideIndex(showSlideIndexes);
1579
1579
  navigateToSlide(last ?? Math.max(0, slideCount - 1));
1580
1580
  return;
1581
1581
  }
@@ -1613,10 +1613,10 @@ function usePresentationKeyboard(input) {
1613
1613
  }
1614
1614
  };
1615
1615
  const handleWheel = (event) => {
1616
- if (mode !== "present" || !chunkMH4VFSDL_js.acceptsPresentationInput()) {
1616
+ if (mode !== "present" || !chunk5KAMDV37_js.acceptsPresentationInput()) {
1617
1617
  return;
1618
1618
  }
1619
- const mapped = chunkMH4VFSDL_js.mapPresentationWheel(event, wheelBufferRef.current);
1619
+ const mapped = chunk5KAMDV37_js.mapPresentationWheel(event, wheelBufferRef.current);
1620
1620
  if (mapped.intent === "next-slide") {
1621
1621
  event.preventDefault();
1622
1622
  movePresentationSlide(1);
@@ -1749,7 +1749,7 @@ function useRehearsalTimings(input) {
1749
1749
 
1750
1750
  // src/viewer/hooks/presentation-mode/presentation-actions.ts
1751
1751
  function handlePresentationActionImpl(action, deps) {
1752
- chunkMH4VFSDL_js.runPresentationAction(
1752
+ chunk5KAMDV37_js.runPresentationAction(
1753
1753
  action,
1754
1754
  { slideCount: deps.slidesLength, ...deps.elementId ? { elementId: deps.elementId } : {} },
1755
1755
  {
@@ -1778,13 +1778,13 @@ function handlePresentationActionImpl(action, deps) {
1778
1778
  function executeSlideTransition(nextSlideIndex, deps) {
1779
1779
  const incomingSlide = deps.slides[nextSlideIndex];
1780
1780
  const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
1781
- const durationMs = deps.playTransition ? chunkMH4VFSDL_js.resolveTransitionDurationMs(transition) : 0;
1781
+ const durationMs = deps.playTransition ? chunk5KAMDV37_js.resolveTransitionDurationMs(transition) : 0;
1782
1782
  deps.clearPresentationTimers();
1783
1783
  deps.setPresentationSlideIndex(nextSlideIndex);
1784
1784
  deps.onSetActiveSlideIndex(nextSlideIndex);
1785
1785
  deps.setPresentationSlideVisible(true);
1786
1786
  deps.seedSlideAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1787
- const soundAction = chunkMH4VFSDL_js.resolveTransitionSoundAction(transition);
1787
+ const soundAction = chunk5KAMDV37_js.resolveTransitionSoundAction(transition);
1788
1788
  if (soundAction.kind === "play" && deps.onPlayActionSound) {
1789
1789
  deps.onPlayActionSound(soundAction.soundPath, { loop: soundAction.loop });
1790
1790
  } else if (soundAction.kind === "stop" && deps.onStopActionSound) {
@@ -1848,7 +1848,7 @@ function useSlideNavigation(input) {
1848
1848
  });
1849
1849
  const scheduleAutoAdvanceForSlide = react.useCallback(
1850
1850
  (slideIndex) => {
1851
- const delayMs = chunkMH4VFSDL_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1851
+ const delayMs = chunk5KAMDV37_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1852
1852
  if (delayMs === void 0) {
1853
1853
  return;
1854
1854
  }
@@ -1871,7 +1871,7 @@ function useSlideNavigation(input) {
1871
1871
  if (availableSlideIndexes.length === 0) {
1872
1872
  return;
1873
1873
  }
1874
- const pastLastSlide = direction === 1 && !chunkMH4VFSDL_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1874
+ const pastLastSlide = direction === 1 && !chunk5KAMDV37_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1875
1875
  if (rehearsing && pastLastSlide) {
1876
1876
  recordCurrentSlideTime(presentationSlideIndex);
1877
1877
  try {
@@ -1889,9 +1889,9 @@ function useSlideNavigation(input) {
1889
1889
  onAdvancePastLastSlide();
1890
1890
  return;
1891
1891
  }
1892
- const nextSlideIndex = direction === 1 ? chunkMH4VFSDL_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1892
+ const nextSlideIndex = direction === 1 ? chunk5KAMDV37_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1893
1893
  loop: Boolean(loopContinuously) && !rehearsing
1894
- }) : chunkMH4VFSDL_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1894
+ }) : chunk5KAMDV37_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1895
1895
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1896
1896
  return;
1897
1897
  }
@@ -2072,7 +2072,7 @@ function createCustomShowRunner(deps) {
2072
2072
  return;
2073
2073
  }
2074
2074
  origin = returnAfter ? { showId: deps.getActiveCustomShowId(), slideIndex: deps.getPresentationSlideIndex() } : null;
2075
- const first = chunkMH4VFSDL_js.firstShowSlideIndex(chunkMH4VFSDL_js.resolveShowSlideIndexes(deps.getSlides(), target));
2075
+ const first = chunk5KAMDV37_js.firstShowSlideIndex(chunk5KAMDV37_js.resolveShowSlideIndexes(deps.getSlides(), target));
2076
2076
  deps.setActiveCustomShowId(customShowId);
2077
2077
  if (first !== void 0) {
2078
2078
  deps.navigateToSlide(first);
@@ -2150,33 +2150,33 @@ function usePresentationActionExtensions(input) {
2150
2150
  }
2151
2151
  }, [navigateToSlideViaRef]);
2152
2152
  const onOpenFile = react.useCallback((target) => {
2153
- chunkMH4VFSDL_js.safeOpenUrl(target);
2153
+ chunk5KAMDV37_js.safeOpenUrl(target);
2154
2154
  }, []);
2155
2155
  const onOpenPresentation = react.useCallback((target) => {
2156
- chunkMH4VFSDL_js.safeOpenUrl(target);
2156
+ chunk5KAMDV37_js.safeOpenUrl(target);
2157
2157
  }, []);
2158
2158
  const onRunProgram = react.useCallback(
2159
2159
  (target) => {
2160
- onAddRunProgramNotice?.(chunkMH4VFSDL_js.buildRunProgramNotice(target));
2160
+ onAddRunProgramNotice?.(chunk5KAMDV37_js.buildRunProgramNotice(target));
2161
2161
  },
2162
2162
  [onAddRunProgramNotice]
2163
2163
  );
2164
2164
  const onPlayMedia = react.useCallback(
2165
2165
  (elementId) => {
2166
- chunkMH4VFSDL_js.toggleStageElementMedia(containerRef.current, elementId);
2166
+ chunk5KAMDV37_js.toggleStageElementMedia(containerRef.current, elementId);
2167
2167
  },
2168
2168
  [containerRef]
2169
2169
  );
2170
2170
  const onOleVerb = react.useCallback(
2171
2171
  (verb, elementId) => {
2172
- const target = chunkMH4VFSDL_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2172
+ const target = chunk5KAMDV37_js.resolveOleVerbTarget(slides[presentationSlideIndex], elementId, verb);
2173
2173
  if (!target) {
2174
2174
  return;
2175
2175
  }
2176
2176
  if (target.action === "download") {
2177
- chunkMH4VFSDL_js.downloadDataUrl(target.url, target.fileName ?? "download");
2177
+ chunk5KAMDV37_js.downloadDataUrl(target.url, target.fileName ?? "download");
2178
2178
  } else {
2179
- chunkMH4VFSDL_js.openUrlInNewTab(target.url);
2179
+ chunk5KAMDV37_js.openUrlInNewTab(target.url);
2180
2180
  }
2181
2181
  },
2182
2182
  [slides, presentationSlideIndex]
@@ -2207,22 +2207,22 @@ function usePresentationActionExtensions(input) {
2207
2207
  };
2208
2208
  }
2209
2209
  function usePresenterConsole(slideIndex, active) {
2210
- const timerRef = react.useRef(chunkMH4VFSDL_js.createPresenterTimer());
2211
- const [snapshot, setSnapshot] = react.useState(() => chunkMH4VFSDL_js.createInitialPresentationSnapshot(slideIndex));
2210
+ const timerRef = react.useRef(chunk5KAMDV37_js.createPresenterTimer());
2211
+ const [snapshot, setSnapshot] = react.useState(() => chunk5KAMDV37_js.createInitialPresentationSnapshot(slideIndex));
2212
2212
  const patch = react.useCallback((value) => {
2213
- setSnapshot((current) => chunkMH4VFSDL_js.mergePresentationSnapshot(current, value));
2213
+ setSnapshot((current) => chunk5KAMDV37_js.mergePresentationSnapshot(current, value));
2214
2214
  }, []);
2215
2215
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2216
2216
  react.useEffect(() => {
2217
2217
  if (!active) {
2218
2218
  return;
2219
2219
  }
2220
- timerRef.current = chunkMH4VFSDL_js.resetPresenterTimer();
2220
+ timerRef.current = chunk5KAMDV37_js.resetPresenterTimer();
2221
2221
  patch({ paused: false, elapsedMs: 0 });
2222
2222
  const timer = window.setInterval(() => {
2223
2223
  patch({
2224
2224
  paused: timerRef.current.paused,
2225
- elapsedMs: chunkMH4VFSDL_js.presenterElapsed(timerRef.current)
2225
+ elapsedMs: chunk5KAMDV37_js.presenterElapsed(timerRef.current)
2226
2226
  });
2227
2227
  }, 1e3);
2228
2228
  return () => window.clearInterval(timer);
@@ -2232,19 +2232,19 @@ function usePresenterConsole(slideIndex, active) {
2232
2232
  applyAudienceSnapshot: setSnapshot,
2233
2233
  setBlackout: (blackout) => patch({ blackout }),
2234
2234
  toggleTimer: () => {
2235
- timerRef.current = chunkMH4VFSDL_js.togglePresenterTimer(timerRef.current);
2235
+ timerRef.current = chunk5KAMDV37_js.togglePresenterTimer(timerRef.current);
2236
2236
  patch({
2237
2237
  paused: timerRef.current.paused,
2238
- elapsedMs: chunkMH4VFSDL_js.presenterElapsed(timerRef.current)
2238
+ elapsedMs: chunk5KAMDV37_js.presenterElapsed(timerRef.current)
2239
2239
  });
2240
2240
  },
2241
2241
  resetTimer: () => {
2242
- timerRef.current = chunkMH4VFSDL_js.resetPresenterTimer();
2242
+ timerRef.current = chunk5KAMDV37_js.resetPresenterTimer();
2243
2243
  patch({ paused: false, elapsedMs: 0 });
2244
2244
  },
2245
2245
  stepZoom: (direction) => setSnapshot(
2246
- (current) => chunkMH4VFSDL_js.mergePresentationSnapshot(current, {
2247
- zoom: chunkMH4VFSDL_js.stepPresenterZoom(
2246
+ (current) => chunk5KAMDV37_js.mergePresentationSnapshot(current, {
2247
+ zoom: chunk5KAMDV37_js.stepPresenterZoom(
2248
2248
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2249
2249
  direction
2250
2250
  )
@@ -2299,7 +2299,7 @@ function usePresentationMode(input) {
2299
2299
  const [allSlidesOpen, setAllSlidesOpen] = react.useState(false);
2300
2300
  const [endOfShowVisible, setEndOfShowVisible] = react.useState(false);
2301
2301
  const [presentationStartTime, setPresentationStartTime] = react.useState(null);
2302
- const showGuard = react.useMemo(() => chunkMH4VFSDL_js.createPresenterShowGuard(), []);
2302
+ const showGuard = react.useMemo(() => chunk5KAMDV37_js.createPresenterShowGuard(), []);
2303
2303
  const {
2304
2304
  presentationAnimations,
2305
2305
  presentationElementStates,
@@ -2399,7 +2399,7 @@ function usePresentationMode(input) {
2399
2399
  actionExtensions.bindNavigateToSlide(navigateToSlide);
2400
2400
  const movePresentationSlide = react.useCallback(
2401
2401
  (direction, trigger = "explicit") => {
2402
- if (!chunkMH4VFSDL_js.acceptsPresentationInput()) {
2402
+ if (!chunk5KAMDV37_js.acceptsPresentationInput()) {
2403
2403
  return;
2404
2404
  }
2405
2405
  if (endOfShowVisible) {
@@ -2468,7 +2468,7 @@ function usePresentationMode(input) {
2468
2468
  onSetMode("present");
2469
2469
  }, [containerRef, onSetMode, setRehearsing]);
2470
2470
  const enterPresentModeFromBeginning = react.useCallback(() => {
2471
- const first = chunkMH4VFSDL_js.firstShowSlideIndex(visibleSlideIndexes);
2471
+ const first = chunk5KAMDV37_js.firstShowSlideIndex(visibleSlideIndexes);
2472
2472
  if (first !== void 0) {
2473
2473
  onSetActiveSlideIndex(first);
2474
2474
  }
@@ -2548,7 +2548,7 @@ function usePresentationMode(input) {
2548
2548
  if (mode !== "present") {
2549
2549
  return;
2550
2550
  }
2551
- return chunkMH4VFSDL_js.attachPresentationVisibilityPause({
2551
+ return chunk5KAMDV37_js.attachPresentationVisibilityPause({
2552
2552
  root: containerRef.current ?? void 0,
2553
2553
  onHidden: () => clearPresentationTimersRef.current(),
2554
2554
  onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
@@ -2556,7 +2556,7 @@ function usePresentationMode(input) {
2556
2556
  }, [mode, containerRef]);
2557
2557
  react.useLayoutEffect(() => {
2558
2558
  if (mode === "present") {
2559
- const idx = chunkMH4VFSDL_js.presentationEntrySlideIndex(
2559
+ const idx = chunk5KAMDV37_js.presentationEntrySlideIndex(
2560
2560
  activeSlideIndexRef.current,
2561
2561
  visibleSlideIndexesRef.current
2562
2562
  );
@@ -2635,11 +2635,11 @@ function usePresentationMode(input) {
2635
2635
  return void 0;
2636
2636
  }
2637
2637
  const incoming = slides[transitionOverlay.incomingSlideIndex];
2638
- return chunkMH4VFSDL_js.buildMorphTransitionPlan(
2638
+ return chunk5KAMDV37_js.buildMorphTransitionPlan(
2639
2639
  slides[transitionOverlay.outgoingSlideIndex],
2640
2640
  incoming,
2641
2641
  transitionOverlay.durationMs,
2642
- chunkMH4VFSDL_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2642
+ chunk5KAMDV37_js.morphOptionToMode(transitionOverlay.transition.morphOption),
2643
2643
  // `PresentationStage` stacks the incoming slide's elements above its
2644
2644
  // template shapes (`zIndex = templateElements.length + index`), so a
2645
2645
  // z-index journey has to start counting where the stage does.
@@ -2664,7 +2664,7 @@ function usePresentationMode(input) {
2664
2664
  if (!morphPlan) {
2665
2665
  return presentationKeyframesCss;
2666
2666
  }
2667
- const imageRules = chunkMH4VFSDL_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2667
+ const imageRules = chunk5KAMDV37_js.buildMorphAnimationRules(morphPlan, "", "incoming", "image");
2668
2668
  return `${presentationKeyframesCss ?? ""}
2669
2669
  ${morphPlan.keyframesCss}
2670
2670
  ${imageRules}`;
@@ -2961,7 +2961,7 @@ function useFindReplace({
2961
2961
  const [findResults, setFindResults] = react.useState([]);
2962
2962
  const [findResultIndex, setFindResultIndex] = react.useState(-1);
2963
2963
  const performFind = react.useCallback(() => {
2964
- const results = chunkMH4VFSDL_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2964
+ const results = chunk5KAMDV37_js.findInSlides(slides, findQuery, { matchCase: findMatchCase });
2965
2965
  if (!findQuery) {
2966
2966
  setFindResults([]);
2967
2967
  setFindResultIndex(-1);
@@ -2995,7 +2995,7 @@ function useFindReplace({
2995
2995
  return;
2996
2996
  }
2997
2997
  onUpdateSlides(
2998
- (prevSlides) => chunkMH4VFSDL_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2998
+ (prevSlides) => chunk5KAMDV37_js.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
2999
2999
  );
3000
3000
  onMarkDirty();
3001
3001
  },
@@ -3017,9 +3017,9 @@ function useFindReplace({
3017
3017
  }, [findResults, applyReplacements, performFind]);
3018
3018
  react.useEffect(() => {
3019
3019
  const handler = (event) => {
3020
- const { action } = chunkMH4VFSDL_js.mapEditorKey(event, {
3020
+ const { action } = chunk5KAMDV37_js.mapEditorKey(event, {
3021
3021
  canEdit: mode === "edit",
3022
- isTextInputTarget: chunkMH4VFSDL_js.isEditorTextInputTarget(event.target)
3022
+ isTextInputTarget: chunk5KAMDV37_js.isEditorTextInputTarget(event.target)
3023
3023
  });
3024
3024
  if (action !== "find") {
3025
3025
  return;
@@ -3130,7 +3130,7 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3130
3130
  if (!slide) {
3131
3131
  return { slides, didAdd: false };
3132
3132
  }
3133
- const next = chunkMH4VFSDL_js.addCommentToList(
3133
+ const next = chunk5KAMDV37_js.addCommentToList(
3134
3134
  slide.comments || [],
3135
3135
  text,
3136
3136
  authorName,
@@ -3151,7 +3151,7 @@ function removeCommentFromSlide(slides, slideIndex, commentId) {
3151
3151
  if (!slide) {
3152
3152
  return { slides, didDelete: false };
3153
3153
  }
3154
- const next = chunkMH4VFSDL_js.removeCommentFromList(slide.comments || [], commentId);
3154
+ const next = chunk5KAMDV37_js.removeCommentFromList(slide.comments || [], commentId);
3155
3155
  if (!next) {
3156
3156
  return { slides, didDelete: false };
3157
3157
  }
@@ -3162,7 +3162,7 @@ function editCommentInSlide(slides, slideIndex, commentId, newText) {
3162
3162
  if (!slide) {
3163
3163
  return { slides, didUpdate: false };
3164
3164
  }
3165
- const next = chunkMH4VFSDL_js.editCommentInList(slide.comments || [], commentId, newText);
3165
+ const next = chunk5KAMDV37_js.editCommentInList(slide.comments || [], commentId, newText);
3166
3166
  if (!next) {
3167
3167
  return { slides, didUpdate: false };
3168
3168
  }
@@ -3173,7 +3173,7 @@ function toggleResolvedInSlide(slides, slideIndex, commentId) {
3173
3173
  if (!slide) {
3174
3174
  return { slides, didUpdate: false };
3175
3175
  }
3176
- const next = chunkMH4VFSDL_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3176
+ const next = chunk5KAMDV37_js.toggleCommentResolvedInList(slide.comments || [], commentId);
3177
3177
  if (!next) {
3178
3178
  return { slides, didUpdate: false };
3179
3179
  }
@@ -3184,7 +3184,7 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3184
3184
  if (!slide) {
3185
3185
  return { slides, didAdd: false };
3186
3186
  }
3187
- const next = chunkMH4VFSDL_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3187
+ const next = chunk5KAMDV37_js.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3188
3188
  if (!next) {
3189
3189
  return { slides, didAdd: false };
3190
3190
  }
@@ -3571,7 +3571,7 @@ function useDerivedElementState(input) {
3571
3571
  return [];
3572
3572
  }
3573
3573
  return [
3574
- ...chunkMH4VFSDL_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3574
+ ...chunk5KAMDV37_js.visibleTemplateElements(activeSlide, templateElementsBySlideId[activeSlide.id] ?? [])
3575
3575
  ];
3576
3576
  }, [activeSlide, templateElementsBySlideId]);
3577
3577
  const activeMaster = slideMasters[activeMasterIndex];
@@ -3638,7 +3638,7 @@ function useViewerCoreState(_input) {
3638
3638
  const marqueeStateRef = react.useRef(null);
3639
3639
  const isDrawingRef = react.useRef(false);
3640
3640
  const justInteractedRef = react.useRef(false);
3641
- const livePatcher = react.useMemo(() => chunkMH4VFSDL_js.createCollaborationLivePatcher(), []);
3641
+ const livePatcher = react.useMemo(() => chunk5KAMDV37_js.createCollaborationLivePatcher(), []);
3642
3642
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3643
3643
  const slidesRef = react.useRef([]);
3644
3644
  const [mode, setMode] = react.useState("edit");
@@ -3647,8 +3647,8 @@ function useViewerCoreState(_input) {
3647
3647
  const [slides, setSlides] = react.useState([]);
3648
3648
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3649
3649
  const [canvasSize, setCanvasSize] = react.useState({
3650
- width: chunkH4LMXJ2Z_js.DEFAULT_CANVAS_WIDTH,
3651
- height: chunkH4LMXJ2Z_js.DEFAULT_CANVAS_HEIGHT
3650
+ width: chunkGLY4OPMY_js.DEFAULT_CANVAS_WIDTH,
3651
+ height: chunkGLY4OPMY_js.DEFAULT_CANVAS_HEIGHT
3652
3652
  });
3653
3653
  const [slideSizeEmu, setSlideSizeEmu] = react.useState();
3654
3654
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
@@ -3669,7 +3669,7 @@ function useViewerCoreState(_input) {
3669
3669
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3670
3670
  inlineEditingTextRef.current = resolved;
3671
3671
  setInlineEditingTextBase(value);
3672
- chunkMH4VFSDL_js.publishLiveInlineText(
3672
+ chunk5KAMDV37_js.publishLiveInlineText(
3673
3673
  livePatcher,
3674
3674
  slidesRef.current[activeSlideIndexRef.current],
3675
3675
  inlineEditingElementIdRef.current,
@@ -3964,8 +3964,8 @@ function useViewerState(input) {
3964
3964
  }
3965
3965
 
3966
3966
  // src/viewer/utils/glyph-outline-cache.ts
3967
- var glyphOutlineFontCache = new chunkMH4VFSDL_js.GlyphOutlineFontCache();
3968
- var getGlyphOutline = chunkMH4VFSDL_js.createGlyphOutlineLookup(glyphOutlineFontCache);
3967
+ var glyphOutlineFontCache = new chunk5KAMDV37_js.GlyphOutlineFontCache();
3968
+ var getGlyphOutline = chunk5KAMDV37_js.createGlyphOutlineLookup(glyphOutlineFontCache);
3969
3969
 
3970
3970
  // src/viewer/hooks/useLoadContent.ts
3971
3971
  function useLoadContent({
@@ -4038,7 +4038,7 @@ function useLoadContent({
4038
4038
  );
4039
4039
  }
4040
4040
  const previousHandler = handlerRef.current;
4041
- const handler = new chunkMH4VFSDL_js.PptxHandler();
4041
+ const handler = new chunk5KAMDV37_js.PptxHandler();
4042
4042
  const parsed = await handler.load(buffer, { allowExternalImages });
4043
4043
  if (cancelled || token !== renderTokenRef.current) {
4044
4044
  handler.dispose();
@@ -4050,7 +4050,7 @@ function useLoadContent({
4050
4050
  handlerRef.current = null;
4051
4051
  const mediaElements = [];
4052
4052
  for (const slide of parsed.slides) {
4053
- chunkMH4VFSDL_js.collectMediaElements(slide.elements, mediaElements);
4053
+ chunk5KAMDV37_js.collectMediaElements(slide.elements, mediaElements);
4054
4054
  }
4055
4055
  for (const url of mediaDataUrls.values()) {
4056
4056
  if (url.startsWith("blob:")) {
@@ -4060,7 +4060,7 @@ function useLoadContent({
4060
4060
  mediaDataUrls.clear();
4061
4061
  await Promise.all(
4062
4062
  mediaElements.map(async (mediaElement) => {
4063
- const resolved = await chunkMH4VFSDL_js.resolveMediaElementSource(mediaElement, handler);
4063
+ const resolved = await chunk5KAMDV37_js.resolveMediaElementSource(mediaElement, handler);
4064
4064
  if (resolved.missing || !resolved.mediaPath || !resolved.url) {
4065
4065
  mediaElement.mediaMissing = true;
4066
4066
  return;
@@ -4071,7 +4071,7 @@ function useLoadContent({
4071
4071
  }
4072
4072
  })
4073
4073
  );
4074
- const { paths: imagePaths, refs: imageRefs } = chunkMH4VFSDL_js.collectImagePaths(parsed.slides);
4074
+ const { paths: imagePaths, refs: imageRefs } = chunk5KAMDV37_js.collectImagePaths(parsed.slides);
4075
4075
  let nextSlides = parsed.slides;
4076
4076
  if (imagePaths.size > 0) {
4077
4077
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -4087,25 +4087,25 @@ function useLoadContent({
4087
4087
  })
4088
4088
  );
4089
4089
  nextSlides = parsed.slides.map((s) => {
4090
- const newElements = chunkMH4VFSDL_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4090
+ const newElements = chunk5KAMDV37_js.applyImagePathPatches(s.elements, resolvedMap, imageRefs);
4091
4091
  return newElements === s.elements ? s : { ...s, elements: newElements };
4092
4092
  });
4093
4093
  }
4094
- nextSlides = await chunkMH4VFSDL_js.resolveTableCellImageUrls(
4094
+ nextSlides = await chunk5KAMDV37_js.resolveTableCellImageUrls(
4095
4095
  nextSlides,
4096
4096
  (path) => handler.getImageData(path)
4097
4097
  );
4098
- const nextTableStyleMap = await chunkMH4VFSDL_js.resolveTableStyleImageUrls(
4098
+ const nextTableStyleMap = await chunk5KAMDV37_js.resolveTableStyleImageUrls(
4099
4099
  parsed.tableStyleMap,
4100
4100
  (path) => handler.getImageData(path)
4101
4101
  );
4102
4102
  handlerRef.current = handler;
4103
- const partition = chunkMH4VFSDL_js.partitionTemplateElements(nextSlides);
4103
+ const partition = chunk5KAMDV37_js.partitionTemplateElements(nextSlides);
4104
4104
  setSlides(partition.slides);
4105
4105
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4106
4106
  setCanvasSize({
4107
- width: parsed.width ?? chunkH4LMXJ2Z_js.DEFAULT_CANVAS_WIDTH,
4108
- height: parsed.height ?? chunkH4LMXJ2Z_js.DEFAULT_CANVAS_HEIGHT
4107
+ width: parsed.width ?? chunkGLY4OPMY_js.DEFAULT_CANVAS_WIDTH,
4108
+ height: parsed.height ?? chunkGLY4OPMY_js.DEFAULT_CANVAS_HEIGHT
4109
4109
  });
4110
4110
  setSlideSizeEmu(
4111
4111
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4118,7 +4118,7 @@ function useLoadContent({
4118
4118
  setLayoutOptions(parsed.layoutOptions ?? []);
4119
4119
  setSlideMasters(parsed.slideMasters ?? []);
4120
4120
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
4121
- setRecentColors(chunkMH4VFSDL_js.seedRecentColors({ mruColors: parsed.mruColors }));
4121
+ setRecentColors(chunk5KAMDV37_js.seedRecentColors({ mruColors: parsed.mruColors }));
4122
4122
  setTheme(parsed.theme);
4123
4123
  setTableStyleMap(nextTableStyleMap);
4124
4124
  setTableStylesDefaultId(parsed.tableStylesDefaultId);
@@ -4126,7 +4126,7 @@ function useLoadContent({
4126
4126
  setThemeOptions(parsed.themeOptions ?? []);
4127
4127
  setCustomShows(parsed.customShows ?? []);
4128
4128
  setActiveCustomShowId(
4129
- chunkMH4VFSDL_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4129
+ chunk5KAMDV37_js.resolveAuthoredCustomShowId(parsed.presentationProperties, parsed.customShows) ?? null
4130
4130
  );
4131
4131
  setSections(parsed.sections ?? []);
4132
4132
  setPresentationProperties(parsed.presentationProperties ?? {});
@@ -4150,11 +4150,11 @@ function useLoadContent({
4150
4150
  setHasMacros(parsed.hasMacros === true);
4151
4151
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
4152
4152
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
4153
- setGuides(chunkMH4VFSDL_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4154
- setReadOnlyRecommendation(chunkMH4VFSDL_js.readOnlyRecommendation(parsed));
4153
+ setGuides(chunk5KAMDV37_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
4154
+ setReadOnlyRecommendation(chunk5KAMDV37_js.readOnlyRecommendation(parsed));
4155
4155
  setModifyVerifier(parsed.modifyVerifier ?? void 0);
4156
4156
  setCompatToasts(
4157
- chunkMH4VFSDL_js.compatibilityWarningToasts([
4157
+ chunk5KAMDV37_js.compatibilityWarningToasts([
4158
4158
  ...parsed.warnings ?? [],
4159
4159
  ...parsed.slides.flatMap((slide) => slide.warnings ?? [])
4160
4160
  ])
@@ -4166,7 +4166,7 @@ function useLoadContent({
4166
4166
  onContentApplied?.();
4167
4167
  } catch (err) {
4168
4168
  if (!cancelled && token === renderTokenRef.current) {
4169
- if (err instanceof chunkMH4VFSDL_js.EncryptedFileError) {
4169
+ if (err instanceof chunk5KAMDV37_js.EncryptedFileError) {
4170
4170
  setIsEncrypted(true);
4171
4171
  } else {
4172
4172
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4194,7 +4194,7 @@ function useLoadContent({
4194
4194
  }
4195
4195
  function useAutosave(input) {
4196
4196
  const { isDirty, filePath, serializeSlides, enabled = true, getChangeSources } = input;
4197
- const intervalMs = chunkMH4VFSDL_js.resolveAutosaveIntervalMs({
4197
+ const intervalMs = chunk5KAMDV37_js.resolveAutosaveIntervalMs({
4198
4198
  hostIntervalMs: input.intervalMs,
4199
4199
  optionsIntervalSeconds: input.intervalSeconds
4200
4200
  });
@@ -4225,7 +4225,7 @@ function useAutosave(input) {
4225
4225
  return;
4226
4226
  }
4227
4227
  const sources = changeSourcesRef.current?.() ?? [];
4228
- if (!chunkMH4VFSDL_js.shouldWriteAutosaveSnapshot({
4228
+ if (!chunk5KAMDV37_js.shouldWriteAutosaveSnapshot({
4229
4229
  filePath: path,
4230
4230
  isDirty: isDirtyRef.current,
4231
4231
  saving: isSavingRef.current,
@@ -4243,8 +4243,8 @@ function useAutosave(input) {
4243
4243
  isSavingRef.current = false;
4244
4244
  return;
4245
4245
  }
4246
- await chunkMH4VFSDL_js.saveAutosaveSnapshot(path, data);
4247
- lastSnapshotRef.current = chunkMH4VFSDL_js.autosaveSnapshotMark(path, sources);
4246
+ await chunk5KAMDV37_js.saveAutosaveSnapshot(path, data);
4247
+ lastSnapshotRef.current = chunk5KAMDV37_js.autosaveSnapshotMark(path, sources);
4248
4248
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4249
4249
  } catch (err) {
4250
4250
  setAutosaveStatus({
@@ -4298,13 +4298,13 @@ function useElementOperations(input) {
4298
4298
  inlineEditingText
4299
4299
  } = input;
4300
4300
  const liveTextSegments = react.useCallback(() => {
4301
- if (!selectedElement || !chunkMH4VFSDL_js.hasTextProperties(selectedElement)) {
4301
+ if (!selectedElement || !chunk5KAMDV37_js.hasTextProperties(selectedElement)) {
4302
4302
  return void 0;
4303
4303
  }
4304
4304
  if (selectedElement.id !== inlineEditingElementId) {
4305
4305
  return selectedElement.textSegments;
4306
4306
  }
4307
- return chunkMH4VFSDL_js.remapTextToSegments(
4307
+ return chunk5KAMDV37_js.remapTextToSegments(
4308
4308
  inlineEditingText,
4309
4309
  selectedElement.textSegments,
4310
4310
  selectedElement.textStyle
@@ -4345,11 +4345,11 @@ function useElementOperations(input) {
4345
4345
  (elementId, updates) => {
4346
4346
  if (masterView?.target) {
4347
4347
  applyMasterViewWrite(
4348
- chunkMH4VFSDL_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4348
+ chunk5KAMDV37_js.updateMasterViewElement(masterView, masterView.target, elementId, updates)
4349
4349
  );
4350
4350
  return;
4351
4351
  }
4352
- if (chunkMH4VFSDL_js.isTemplateElementId(elementId)) {
4352
+ if (chunk5KAMDV37_js.isTemplateElementId(elementId)) {
4353
4353
  const slideId = activeSlide?.id;
4354
4354
  if (slideId) {
4355
4355
  setTemplateElementsBySlideId((prev) => ({
@@ -4360,7 +4360,7 @@ function useElementOperations(input) {
4360
4360
  }));
4361
4361
  }
4362
4362
  } else {
4363
- setSlides((prev) => chunkMH4VFSDL_js.updateElement(prev, activeSlideIndex, elementId, updates));
4363
+ setSlides((prev) => chunk5KAMDV37_js.updateElement(prev, activeSlideIndex, elementId, updates));
4364
4364
  }
4365
4365
  history.markDirty();
4366
4366
  },
@@ -4385,7 +4385,7 @@ function useElementOperations(input) {
4385
4385
  );
4386
4386
  const updateSelectedShapeStyle = react.useCallback(
4387
4387
  (updates) => {
4388
- if (!selectedElement || !chunkMH4VFSDL_js.hasShapeProperties(selectedElement)) {
4388
+ if (!selectedElement || !chunk5KAMDV37_js.hasShapeProperties(selectedElement)) {
4389
4389
  return;
4390
4390
  }
4391
4391
  updateSelectedElement({
@@ -4396,19 +4396,19 @@ function useElementOperations(input) {
4396
4396
  );
4397
4397
  const updateSelectedTextStyle = react.useCallback(
4398
4398
  (updates) => {
4399
- if (!selectedElement || !chunkMH4VFSDL_js.hasTextProperties(selectedElement)) {
4399
+ if (!selectedElement || !chunk5KAMDV37_js.hasTextProperties(selectedElement)) {
4400
4400
  return;
4401
4401
  }
4402
4402
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4403
4403
  const currentSegments = liveTextSegments();
4404
- const inlineSel = chunkMH4VFSDL_js.getInlineEditorSelection(currentSegments);
4404
+ const inlineSel = chunk5KAMDV37_js.getInlineEditorSelection(currentSegments);
4405
4405
  if (inlineSel && currentSegments) {
4406
- const { newSegments: newSegments2, newSelection } = chunkMH4VFSDL_js.applyStyleToSelectedSegments(
4406
+ const { newSegments: newSegments2, newSelection } = chunk5KAMDV37_js.applyStyleToSelectedSegments(
4407
4407
  currentSegments,
4408
4408
  inlineSel,
4409
4409
  updates
4410
4410
  );
4411
- chunkMH4VFSDL_js.setPendingSelectionRestore(newSelection);
4411
+ chunk5KAMDV37_js.setPendingSelectionRestore(newSelection);
4412
4412
  updateSelectedElement({
4413
4413
  textSegments: newSegments2,
4414
4414
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4436,14 +4436,14 @@ function useElementOperations(input) {
4436
4436
  );
4437
4437
  const updateSelectedTextCase = react.useCallback(
4438
4438
  (mode) => {
4439
- if (!selectedElement || !chunkMH4VFSDL_js.hasTextProperties(selectedElement)) {
4439
+ if (!selectedElement || !chunk5KAMDV37_js.hasTextProperties(selectedElement)) {
4440
4440
  return;
4441
4441
  }
4442
4442
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
4443
4443
  const currentSegments = liveTextSegments();
4444
- const inlineSel = chunkMH4VFSDL_js.getInlineEditorSelection(currentSegments);
4444
+ const inlineSel = chunk5KAMDV37_js.getInlineEditorSelection(currentSegments);
4445
4445
  if (inlineSel && currentSegments) {
4446
- const newSegments = chunkMH4VFSDL_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4446
+ const newSegments = chunk5KAMDV37_js.applyCaseTransformToSegments(currentSegments, inlineSel, mode);
4447
4447
  updateSelectedElement({
4448
4448
  textSegments: newSegments,
4449
4449
  ...isLiveEditing ? { text: inlineEditingText } : {}
@@ -4452,7 +4452,7 @@ function useElementOperations(input) {
4452
4452
  }
4453
4453
  const updates = {};
4454
4454
  if (currentSegments && currentSegments.length > 0) {
4455
- updates.textSegments = chunkMH4VFSDL_js.applyCaseTransformToSegments(
4455
+ updates.textSegments = chunk5KAMDV37_js.applyCaseTransformToSegments(
4456
4456
  currentSegments,
4457
4457
  null,
4458
4458
  mode
@@ -4460,7 +4460,7 @@ function useElementOperations(input) {
4460
4460
  }
4461
4461
  const baseText = isLiveEditing ? inlineEditingText : selectedElement.text;
4462
4462
  if (typeof baseText === "string") {
4463
- updates.text = chunkMH4VFSDL_js.transformTextCase(baseText, mode);
4463
+ updates.text = chunk5KAMDV37_js.transformTextCase(baseText, mode);
4464
4464
  }
4465
4465
  updateSelectedElement(updates);
4466
4466
  },
@@ -4479,15 +4479,15 @@ function useElementOperations(input) {
4479
4479
  [setSlides]
4480
4480
  );
4481
4481
  const masterViewTarget = masterView?.target ?? null;
4482
- const activeElements = masterViewTarget ? chunkMH4VFSDL_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4482
+ const activeElements = masterViewTarget ? chunk5KAMDV37_js.masterViewElements(masterView, masterViewTarget) : editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4483
4483
  const updateActiveElements = react.useCallback(
4484
4484
  (updater) => {
4485
4485
  if (masterView?.target) {
4486
4486
  applyMasterViewWrite(
4487
- chunkMH4VFSDL_js.replaceMasterViewElements(
4487
+ chunk5KAMDV37_js.replaceMasterViewElements(
4488
4488
  masterView,
4489
4489
  masterView.target,
4490
- updater(chunkMH4VFSDL_js.masterViewElements(masterView, masterView.target))
4490
+ updater(chunk5KAMDV37_js.masterViewElements(masterView, masterView.target))
4491
4491
  )
4492
4492
  );
4493
4493
  return;
@@ -4540,7 +4540,7 @@ function useSectionOperations(input) {
4540
4540
  const { sections, setSections, slides, setSlides, markDirty } = input;
4541
4541
  const addSection2 = react.useCallback(
4542
4542
  (name, afterSlideIndex) => {
4543
- const result = chunkMH4VFSDL_js.addSection(sections, slides, name, afterSlideIndex);
4543
+ const result = chunk5KAMDV37_js.addSection(sections, slides, name, afterSlideIndex);
4544
4544
  setSlides(result.slides);
4545
4545
  setSections(result.sections);
4546
4546
  markDirty();
@@ -4549,7 +4549,7 @@ function useSectionOperations(input) {
4549
4549
  );
4550
4550
  const renameSection2 = react.useCallback(
4551
4551
  (sectionId, newName) => {
4552
- const result = chunkMH4VFSDL_js.renameSection(sections, slides, sectionId, newName);
4552
+ const result = chunk5KAMDV37_js.renameSection(sections, slides, sectionId, newName);
4553
4553
  setSections(result.sections);
4554
4554
  setSlides(result.slides);
4555
4555
  markDirty();
@@ -4558,7 +4558,7 @@ function useSectionOperations(input) {
4558
4558
  );
4559
4559
  const deleteSection2 = react.useCallback(
4560
4560
  (sectionId) => {
4561
- const result = chunkMH4VFSDL_js.deleteSection(sections, slides, sectionId);
4561
+ const result = chunk5KAMDV37_js.deleteSection(sections, slides, sectionId);
4562
4562
  setSections(result.sections);
4563
4563
  setSlides(result.slides);
4564
4564
  markDirty();
@@ -4567,21 +4567,21 @@ function useSectionOperations(input) {
4567
4567
  );
4568
4568
  const moveSectionUp2 = react.useCallback(
4569
4569
  (sectionId) => {
4570
- setSections(chunkMH4VFSDL_js.moveSectionUp(sections, sectionId));
4570
+ setSections(chunk5KAMDV37_js.moveSectionUp(sections, sectionId));
4571
4571
  markDirty();
4572
4572
  },
4573
4573
  [sections, setSections, markDirty]
4574
4574
  );
4575
4575
  const moveSectionDown2 = react.useCallback(
4576
4576
  (sectionId) => {
4577
- setSections(chunkMH4VFSDL_js.moveSectionDown(sections, sectionId));
4577
+ setSections(chunk5KAMDV37_js.moveSectionDown(sections, sectionId));
4578
4578
  markDirty();
4579
4579
  },
4580
4580
  [sections, setSections, markDirty]
4581
4581
  );
4582
4582
  const moveSlidesToSection2 = react.useCallback(
4583
4583
  (slideIndexes, targetSectionId) => {
4584
- const result = chunkMH4VFSDL_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4584
+ const result = chunk5KAMDV37_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4585
4585
  setSlides(result.slides);
4586
4586
  setSections(result.sections);
4587
4587
  markDirty();
@@ -4647,15 +4647,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
4647
4647
  // src/viewer/hooks/pointer-move-handlers.ts
4648
4648
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
4649
4649
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
4650
- let resized = chunkMH4VFSDL_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE });
4650
+ let resized = chunk5KAMDV37_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkGLY4OPMY_js.MIN_ELEMENT_SIZE });
4651
4651
  if (lockAspect) {
4652
- resized = chunkMH4VFSDL_js.lockResizeAspect(resized, startBox, handle, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE);
4652
+ resized = chunk5KAMDV37_js.lockResizeAspect(resized, startBox, handle, chunkGLY4OPMY_js.MIN_ELEMENT_SIZE);
4653
4653
  }
4654
4654
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4655
4655
  if (!snapToGrid) {
4656
4656
  return box;
4657
4657
  }
4658
- return chunkMH4VFSDL_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE);
4658
+ return chunk5KAMDV37_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkGLY4OPMY_js.MIN_ELEMENT_SIZE);
4659
4659
  }
4660
4660
  function resolveLiveTarget(input) {
4661
4661
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -4768,7 +4768,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4768
4768
  width: el.width,
4769
4769
  height: el.height
4770
4770
  }));
4771
- const snapResult = chunkMH4VFSDL_js.computeSnapToShape(
4771
+ const snapResult = chunk5KAMDV37_js.computeSnapToShape(
4772
4772
  targetX,
4773
4773
  targetY,
4774
4774
  primaryEl.width,
@@ -4810,7 +4810,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4810
4810
  if (live) {
4811
4811
  for (const id of Object.keys(drag.startPositionsById)) {
4812
4812
  const start = drag.startPositionsById[id];
4813
- chunkMH4VFSDL_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4813
+ chunk5KAMDV37_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4814
4814
  x: start.x + appliedDx,
4815
4815
  y: start.y + appliedDy
4816
4816
  });
@@ -4842,8 +4842,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4842
4842
  rs.lastY = geo.y;
4843
4843
  rs.lastWidth = geo.width;
4844
4844
  rs.lastHeight = geo.height;
4845
- const width = Math.max(geo.width, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE);
4846
- const height = Math.max(geo.height, chunkH4LMXJ2Z_js.MIN_ELEMENT_SIZE);
4845
+ const width = Math.max(geo.width, chunkGLY4OPMY_js.MIN_ELEMENT_SIZE);
4846
+ const height = Math.max(geo.height, chunkGLY4OPMY_js.MIN_ELEMENT_SIZE);
4847
4847
  if (rs.domEl) {
4848
4848
  rs.domEl.style.left = `${geo.x}px`;
4849
4849
  rs.domEl.style.top = `${geo.y}px`;
@@ -4852,7 +4852,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4852
4852
  syncSelectionHandleOverlay(rs.domEl, rs.elementId, { x: geo.x, y: geo.y, width, height });
4853
4853
  }
4854
4854
  if (live) {
4855
- chunkMH4VFSDL_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4855
+ chunk5KAMDV37_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4856
4856
  x: geo.x,
4857
4857
  y: geo.y,
4858
4858
  width,
@@ -4863,7 +4863,7 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4863
4863
  function processAdjustmentMove(e, adj, editorScale, updateElementById) {
4864
4864
  const dx = (e.clientX - adj.startClientX) / editorScale;
4865
4865
  const dy = (e.clientY - adj.startClientY) / editorScale;
4866
- const adjustments = chunkMH4VFSDL_js.getDraggedShapeAdjustments(adj, dx, dy);
4866
+ const adjustments = chunk5KAMDV37_js.getDraggedShapeAdjustments(adj, dx, dy);
4867
4867
  if (!adj.moved && Math.hypot(dx, dy) > 2) {
4868
4868
  adj.moved = true;
4869
4869
  }
@@ -4938,13 +4938,13 @@ function processPointerUp(input) {
4938
4938
  if (i !== activeSlideIndex) {
4939
4939
  return s;
4940
4940
  }
4941
- const rerouted = chunkMH4VFSDL_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4941
+ const rerouted = chunk5KAMDV37_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4942
4942
  if (rerouted.length === 0) {
4943
4943
  return s;
4944
4944
  }
4945
4945
  return {
4946
4946
  ...s,
4947
- elements: chunkMH4VFSDL_js.applyReroutedConnectors(s.elements, rerouted)
4947
+ elements: chunk5KAMDV37_js.applyReroutedConnectors(s.elements, rerouted)
4948
4948
  };
4949
4949
  })
4950
4950
  );
@@ -4969,9 +4969,9 @@ function processPointerUp(input) {
4969
4969
  }
4970
4970
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4971
4971
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4972
- const hitIds = chunkMH4VFSDL_js.computeMarqueeHitIds(marquee, sourceElements);
4972
+ const hitIds = chunk5KAMDV37_js.computeMarqueeHitIds(marquee, sourceElements);
4973
4973
  if (marquee.additive) {
4974
- const merged = chunkMH4VFSDL_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4974
+ const merged = chunk5KAMDV37_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4975
4975
  if (merged.length > 0) {
4976
4976
  applySelection(merged[0], merged);
4977
4977
  } else {
@@ -4994,8 +4994,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4994
4994
  }
4995
4995
  return { ...el, x: start.x + dx, y: start.y + dy };
4996
4996
  });
4997
- const rerouted = chunkMH4VFSDL_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4998
- return chunkMH4VFSDL_js.applyReroutedConnectors(movedElements, rerouted);
4997
+ const rerouted = chunk5KAMDV37_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4998
+ return chunk5KAMDV37_js.applyReroutedConnectors(movedElements, rerouted);
4999
4999
  };
5000
5000
  if (editTemplateMode) {
5001
5001
  const slideId = activeSlide?.id;
@@ -5151,17 +5151,17 @@ function useCanvasInteractions(input) {
5151
5151
  return;
5152
5152
  }
5153
5153
  const el = elementLookup.get(editId);
5154
- if (el && chunkMH4VFSDL_js.hasTextProperties(el)) {
5154
+ if (el && chunk5KAMDV37_js.hasTextProperties(el)) {
5155
5155
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
5156
- const textPatch = chunkMH4VFSDL_js.buildInlineTextCommitPatch(el, committedText);
5156
+ const textPatch = chunk5KAMDV37_js.buildInlineTextCommitPatch(el, committedText);
5157
5157
  if (!textPatch) {
5158
5158
  setInlineEditingElementId(null);
5159
5159
  setInlineEditingText("");
5160
5160
  return;
5161
5161
  }
5162
5162
  const editorEl = document.querySelector("[data-inline-editor]");
5163
- const newHeight = chunkMH4VFSDL_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5164
- const shrink = chunkMH4VFSDL_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5163
+ const newHeight = chunk5KAMDV37_js.resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
5164
+ const shrink = chunk5KAMDV37_js.resolveInlineEditNormAutofitShrink(el.textStyle, el.height, editorEl);
5165
5165
  ops.updateElementById(editId, {
5166
5166
  ...textPatch,
5167
5167
  ...newHeight !== void 0 ? { height: newHeight } : {},
@@ -5179,7 +5179,7 @@ function useCanvasInteractions(input) {
5179
5179
  setInlineEditingText("");
5180
5180
  };
5181
5181
  const openEquationEditorForElement = (el) => {
5182
- if (!chunkMH4VFSDL_js.hasTextProperties(el)) {
5182
+ if (!chunk5KAMDV37_js.hasTextProperties(el)) {
5183
5183
  return false;
5184
5184
  }
5185
5185
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5209,7 +5209,7 @@ function useCanvasInteractions(input) {
5209
5209
  justInteractedRef.current = false;
5210
5210
  } else {
5211
5211
  const el = elementLookup.get(elementId);
5212
- if (el && chunkMH4VFSDL_js.hasTextProperties(el) && chunkMH4VFSDL_js.canInteractWithElement(el, "textEdit")) {
5212
+ if (el && chunk5KAMDV37_js.hasTextProperties(el) && chunk5KAMDV37_js.canInteractWithElement(el, "textEdit")) {
5213
5213
  if (!openEquationEditorForElement(el)) {
5214
5214
  setInlineEditingElementId(elementId);
5215
5215
  setInlineEditingText(el.text ?? "");
@@ -5228,7 +5228,7 @@ function useCanvasInteractions(input) {
5228
5228
  if (openEquationEditorForElement(el)) {
5229
5229
  return;
5230
5230
  }
5231
- if (chunkMH4VFSDL_js.hasTextProperties(el) && chunkMH4VFSDL_js.canInteractWithElement(el, "textEdit")) {
5231
+ if (chunk5KAMDV37_js.hasTextProperties(el) && chunk5KAMDV37_js.canInteractWithElement(el, "textEdit")) {
5232
5232
  setInlineEditingElementId(elementId);
5233
5233
  setInlineEditingText(el.text ?? "");
5234
5234
  }
@@ -5251,7 +5251,7 @@ function useCanvasInteractions(input) {
5251
5251
  justSelectedRef.current = false;
5252
5252
  }
5253
5253
  const ids = !wasSelected ? [elementId] : effectiveSelectedIds.length ? effectiveSelectedIds : [elementId];
5254
- const movableIds = chunkMH4VFSDL_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5254
+ const movableIds = chunk5KAMDV37_js.filterInteractableIds(ids, (id) => elementLookup.get(id), "move");
5255
5255
  if (movableIds.length === 0) {
5256
5256
  return;
5257
5257
  }
@@ -5321,7 +5321,7 @@ function useCanvasInteractions(input) {
5321
5321
  const handleResizePointerDown = (elementId, e, handle) => {
5322
5322
  e.stopPropagation();
5323
5323
  const el = elementLookup.get(elementId);
5324
- if (!el || !chunkMH4VFSDL_js.canInteractWithElement(el, "resize")) {
5324
+ if (!el || !chunk5KAMDV37_js.canInteractWithElement(el, "resize")) {
5325
5325
  return;
5326
5326
  }
5327
5327
  resizeStateRef.current = {
@@ -5343,7 +5343,7 @@ function useCanvasInteractions(input) {
5343
5343
  };
5344
5344
  const handleRotate = (elementId, rotationDeg) => {
5345
5345
  const el = elementLookup.get(elementId);
5346
- if (!el || !chunkMH4VFSDL_js.canInteractWithElement(el, "rotate")) {
5346
+ if (!el || !chunk5KAMDV37_js.canInteractWithElement(el, "rotate")) {
5347
5347
  return;
5348
5348
  }
5349
5349
  ops.updateElementById(elementId, { rotation: rotationDeg });
@@ -5363,10 +5363,10 @@ function useCanvasInteractions(input) {
5363
5363
  const handleAdjustmentPointerDown = (elementId, e, descriptor) => {
5364
5364
  e.stopPropagation();
5365
5365
  const el = elementLookup.get(elementId);
5366
- if (!el || !chunkMH4VFSDL_js.canInteractWithElement(el, "adjustHandle")) {
5366
+ if (!el || !chunk5KAMDV37_js.canInteractWithElement(el, "adjustHandle")) {
5367
5367
  return;
5368
5368
  }
5369
- shapeAdjustmentDragStateRef.current = chunkMH4VFSDL_js.beginShapeAdjustment(
5369
+ shapeAdjustmentDragStateRef.current = chunk5KAMDV37_js.beginShapeAdjustment(
5370
5370
  el,
5371
5371
  descriptor,
5372
5372
  e.clientX,
@@ -5413,7 +5413,7 @@ function createFileHandlers(deps) {
5413
5413
  h = Math.round(h * scale);
5414
5414
  }
5415
5415
  addElement({
5416
- id: chunkMH4VFSDL_js.generateElementId(),
5416
+ id: chunk5KAMDV37_js.generateElementId(),
5417
5417
  type: "image",
5418
5418
  x: Math.round((canvasSize.width - w) / 2),
5419
5419
  y: Math.round((canvasSize.height - h) / 2),
@@ -5424,7 +5424,7 @@ function createFileHandlers(deps) {
5424
5424
  };
5425
5425
  img.onerror = () => {
5426
5426
  addElement({
5427
- id: chunkMH4VFSDL_js.generateElementId(),
5427
+ id: chunk5KAMDV37_js.generateElementId(),
5428
5428
  type: "image",
5429
5429
  x: 100,
5430
5430
  y: 100,
@@ -5443,14 +5443,14 @@ function createFileHandlers(deps) {
5443
5443
  return;
5444
5444
  }
5445
5445
  e.target.value = "";
5446
- const mediaType = chunkMH4VFSDL_js.classifyMediaType(file.type);
5446
+ const mediaType = chunk5KAMDV37_js.classifyMediaType(file.type);
5447
5447
  if (!mediaType) {
5448
5448
  return;
5449
5449
  }
5450
5450
  const elFilePath = file.path;
5451
5451
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5452
5452
  addElement({
5453
- id: chunkMH4VFSDL_js.generateElementId(),
5453
+ id: chunk5KAMDV37_js.generateElementId(),
5454
5454
  type: "media",
5455
5455
  mediaType,
5456
5456
  mediaMimeType: file.type || void 0,
@@ -5625,13 +5625,13 @@ function createStructuredElementHandlers(deps) {
5625
5625
  return;
5626
5626
  }
5627
5627
  addElement({
5628
- id: chunkMH4VFSDL_js.generateElementId(),
5628
+ id: chunk5KAMDV37_js.generateElementId(),
5629
5629
  type: "smartArt",
5630
5630
  x: 100,
5631
5631
  y: 120,
5632
5632
  width: 600,
5633
5633
  height: 340,
5634
- smartArtData: chunkMH4VFSDL_js.buildSmartArtPresetData(
5634
+ smartArtData: chunk5KAMDV37_js.buildSmartArtPresetData(
5635
5635
  layout,
5636
5636
  defaultItems,
5637
5637
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5643,7 +5643,7 @@ function createStructuredElementHandlers(deps) {
5643
5643
  return;
5644
5644
  }
5645
5645
  addElement({
5646
- id: chunkMH4VFSDL_js.generateElementId(),
5646
+ id: chunk5KAMDV37_js.generateElementId(),
5647
5647
  type: "shape",
5648
5648
  x: 120,
5649
5649
  y: 200,
@@ -5681,7 +5681,7 @@ function createStructuredElementHandlers(deps) {
5681
5681
  return;
5682
5682
  }
5683
5683
  const resolved = resolveHyperlinkEditResult(data);
5684
- if (resolved.url && !chunkMH4VFSDL_js.isUrlSafe(resolved.url)) {
5684
+ if (resolved.url && !chunk5KAMDV37_js.isUrlSafe(resolved.url)) {
5685
5685
  return;
5686
5686
  }
5687
5687
  const actionClick = {
@@ -5705,7 +5705,7 @@ function createStructuredElementHandlers(deps) {
5705
5705
  const displayText = value || fieldTexts[fieldType] || fieldType;
5706
5706
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5707
5707
  addElement({
5708
- id: chunkMH4VFSDL_js.generateElementId(),
5708
+ id: chunk5KAMDV37_js.generateElementId(),
5709
5709
  type: "shape",
5710
5710
  x: 120,
5711
5711
  y: 200,
@@ -5727,11 +5727,11 @@ function createStructuredElementHandlers(deps) {
5727
5727
  if (!activeSlide) {
5728
5728
  return;
5729
5729
  }
5730
- const preset = chunkMH4VFSDL_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5730
+ const preset = chunk5KAMDV37_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5731
5731
  if (!preset) {
5732
5732
  return;
5733
5733
  }
5734
- const defaultPptxAction = chunkMH4VFSDL_js.elementActionToPptxAction({
5734
+ const defaultPptxAction = chunk5KAMDV37_js.elementActionToPptxAction({
5735
5735
  trigger: "click",
5736
5736
  type: preset.defaultAction
5737
5737
  });
@@ -5740,7 +5740,7 @@ function createStructuredElementHandlers(deps) {
5740
5740
  defaultPptxAction.highlightClick = true;
5741
5741
  }
5742
5742
  addElement({
5743
- id: chunkMH4VFSDL_js.generateElementId(),
5743
+ id: chunk5KAMDV37_js.generateElementId(),
5744
5744
  type: "shape",
5745
5745
  x: 150,
5746
5746
  y: 150,
@@ -5807,14 +5807,14 @@ function useInsertElements(input) {
5807
5807
  return;
5808
5808
  }
5809
5809
  addElement({
5810
- id: chunkMH4VFSDL_js.generateElementId(),
5810
+ id: chunk5KAMDV37_js.generateElementId(),
5811
5811
  type: "text",
5812
5812
  x: 100,
5813
5813
  y: 100,
5814
5814
  width: 300,
5815
5815
  height: 60,
5816
5816
  text: "",
5817
- textStyle: { fontSize: chunkH4LMXJ2Z_js.DEFAULT_TEXT_FONT_SIZE }
5817
+ textStyle: { fontSize: chunkGLY4OPMY_js.DEFAULT_TEXT_FONT_SIZE }
5818
5818
  });
5819
5819
  };
5820
5820
  const handleAddShape = () => {
@@ -5822,7 +5822,7 @@ function useInsertElements(input) {
5822
5822
  return;
5823
5823
  }
5824
5824
  addElement({
5825
- id: chunkMH4VFSDL_js.generateElementId(),
5825
+ id: chunk5KAMDV37_js.generateElementId(),
5826
5826
  type: "shape",
5827
5827
  x: 150,
5828
5828
  y: 150,
@@ -5841,15 +5841,15 @@ function useInsertElements(input) {
5841
5841
  return;
5842
5842
  }
5843
5843
  addElement({
5844
- ...chunkMH4VFSDL_js.newTableElement(chunkH4LMXJ2Z_js.DEFAULT_TABLE_ROWS, chunkH4LMXJ2Z_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5845
- id: chunkMH4VFSDL_js.generateElementId()
5844
+ ...chunk5KAMDV37_js.newTableElement(chunkGLY4OPMY_js.DEFAULT_TABLE_ROWS, chunkGLY4OPMY_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5845
+ id: chunk5KAMDV37_js.generateElementId()
5846
5846
  });
5847
5847
  };
5848
5848
  const handleAddChart = (chartKind) => {
5849
5849
  if (!activeSlide) {
5850
5850
  return;
5851
5851
  }
5852
- addElement(chunkMH4VFSDL_js.createDefaultChartElement(chartKind));
5852
+ addElement(chunk5KAMDV37_js.createDefaultChartElement(chartKind));
5853
5853
  };
5854
5854
  const structured = createStructuredElementHandlers({
5855
5855
  activeSlide,
@@ -5919,7 +5919,7 @@ function useClipboardHandlers(input) {
5919
5919
  if (!selectedElement) {
5920
5920
  return;
5921
5921
  }
5922
- setClipboardPayload(chunkMH4VFSDL_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5922
+ setClipboardPayload(chunk5KAMDV37_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5923
5923
  };
5924
5924
  const handleDelete = () => {
5925
5925
  const idsToDelete = effectiveSelectedIds;
@@ -5936,7 +5936,7 @@ function useClipboardHandlers(input) {
5936
5936
  handleDelete();
5937
5937
  };
5938
5938
  const insertClone = (source) => {
5939
- const clone = chunkMH4VFSDL_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5939
+ const clone = chunk5KAMDV37_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5940
5940
  ops.updateActiveElements((els) => [...els, clone]);
5941
5941
  ops.applySelection(clone.id);
5942
5942
  history.markDirty();
@@ -5971,7 +5971,7 @@ function resolveShapePath(el) {
5971
5971
  return el.pathData;
5972
5972
  }
5973
5973
  if ("shapeType" in el && typeof el.shapeType === "string") {
5974
- const clipPath = chunkMH4VFSDL_js.getPresetShapeClipPath(el.shapeType);
5974
+ const clipPath = chunk5KAMDV37_js.getPresetShapeClipPath(el.shapeType);
5975
5975
  if (clipPath) {
5976
5976
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5977
5977
  if (svgPath) {
@@ -6022,7 +6022,7 @@ function clipPathToSvgPath(clipPath, width, height) {
6022
6022
  return parts.join(" ");
6023
6023
  }
6024
6024
  function transformPathToGlobal(pathData, el) {
6025
- const polys = chunkMH4VFSDL_js.svgPathToPolygons(pathData);
6025
+ const polys = chunk5KAMDV37_js.svgPathToPolygons(pathData);
6026
6026
  if (polys.length === 0) {
6027
6027
  return pathData;
6028
6028
  }
@@ -6042,10 +6042,10 @@ function transformPathToGlobal(pathData, el) {
6042
6042
  y: pt.y * scaleY + el.y
6043
6043
  }))
6044
6044
  );
6045
- return chunkMH4VFSDL_js.polygonsToSvgPath(transformed);
6045
+ return chunk5KAMDV37_js.polygonsToSvgPath(transformed);
6046
6046
  }
6047
6047
  function transformPathToLocal(pathData, x, y, _width, _height) {
6048
- const polys = chunkMH4VFSDL_js.svgPathToPolygons(pathData);
6048
+ const polys = chunk5KAMDV37_js.svgPathToPolygons(pathData);
6049
6049
  if (polys.length === 0) {
6050
6050
  return pathData;
6051
6051
  }
@@ -6055,10 +6055,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
6055
6055
  y: pt.y - y
6056
6056
  }))
6057
6057
  );
6058
- return chunkMH4VFSDL_js.polygonsToSvgPath(transformed);
6058
+ return chunk5KAMDV37_js.polygonsToSvgPath(transformed);
6059
6059
  }
6060
6060
  function pathBounds(pathData) {
6061
- const polys = chunkMH4VFSDL_js.svgPathToPolygons(pathData);
6061
+ const polys = chunk5KAMDV37_js.svgPathToPolygons(pathData);
6062
6062
  let minX = Infinity;
6063
6063
  let minY = Infinity;
6064
6064
  let maxX = -Infinity;
@@ -6117,7 +6117,7 @@ function useMergeShapesHandler(input) {
6117
6117
  let allFragments = [];
6118
6118
  let remaining = globalPaths[0];
6119
6119
  for (let i = 1; i < globalPaths.length; i++) {
6120
- const frags = chunkMH4VFSDL_js.mergeShapes("fragment", remaining, globalPaths[i]);
6120
+ const frags = chunk5KAMDV37_js.mergeShapes("fragment", remaining, globalPaths[i]);
6121
6121
  if (Array.isArray(frags)) {
6122
6122
  allFragments = frags;
6123
6123
  }
@@ -6146,7 +6146,7 @@ function useMergeShapesHandler(input) {
6146
6146
  bounds.height
6147
6147
  );
6148
6148
  const newEl = {
6149
- id: chunkMH4VFSDL_js.generateElementId(),
6149
+ id: chunk5KAMDV37_js.generateElementId(),
6150
6150
  type: "shape",
6151
6151
  x: bounds.x,
6152
6152
  y: bounds.y,
@@ -6184,7 +6184,7 @@ function useMergeShapesHandler(input) {
6184
6184
  } else {
6185
6185
  let resultPath = globalPaths[0];
6186
6186
  for (let i = 1; i < globalPaths.length; i++) {
6187
- const result = chunkMH4VFSDL_js.mergeShapes(operation, resultPath, globalPaths[i]);
6187
+ const result = chunk5KAMDV37_js.mergeShapes(operation, resultPath, globalPaths[i]);
6188
6188
  if (typeof result === "string") {
6189
6189
  resultPath = result;
6190
6190
  }
@@ -6205,7 +6205,7 @@ function useMergeShapesHandler(input) {
6205
6205
  );
6206
6206
  const primary = targets[0];
6207
6207
  const newEl = {
6208
- id: chunkMH4VFSDL_js.generateElementId(),
6208
+ id: chunk5KAMDV37_js.generateElementId(),
6209
6209
  type: "shape",
6210
6210
  x: bounds.x,
6211
6211
  y: bounds.y,
@@ -6268,10 +6268,10 @@ function useGroupAlignLayerHandlers(input) {
6268
6268
  if (ids.length < 2 || !activeSlide) {
6269
6269
  return;
6270
6270
  }
6271
- if (!selectedElements.every((el) => chunkMH4VFSDL_js.canInteractWithElement(el, "group"))) {
6271
+ if (!selectedElements.every((el) => chunk5KAMDV37_js.canInteractWithElement(el, "group"))) {
6272
6272
  return;
6273
6273
  }
6274
- const { elements, groupId } = chunkMH4VFSDL_js.groupElements(ops.activeElements, ids, chunkMH4VFSDL_js.generateElementId());
6274
+ const { elements, groupId } = chunk5KAMDV37_js.groupElements(ops.activeElements, ids, chunk5KAMDV37_js.generateElementId());
6275
6275
  if (groupId === null) {
6276
6276
  return;
6277
6277
  }
@@ -6283,15 +6283,15 @@ function useGroupAlignLayerHandlers(input) {
6283
6283
  if (!selectedElement || selectedElement.type !== "group" || !activeSlide) {
6284
6284
  return;
6285
6285
  }
6286
- if (!chunkMH4VFSDL_js.canInteractWithElement(selectedElement, "group")) {
6286
+ if (!chunk5KAMDV37_js.canInteractWithElement(selectedElement, "group")) {
6287
6287
  return;
6288
6288
  }
6289
6289
  const group = selectedElement;
6290
- const intoTemplate = chunkMH4VFSDL_js.isTemplateElementId(group.id);
6290
+ const intoTemplate = chunk5KAMDV37_js.isTemplateElementId(group.id);
6291
6291
  const childIds = group.children.map(
6292
- (child) => intoTemplate ? chunkMH4VFSDL_js.makeCloneId(true, child.id || group.id) : child.id || chunkMH4VFSDL_js.generateElementId()
6292
+ (child) => intoTemplate ? chunk5KAMDV37_js.makeCloneId(true, child.id || group.id) : child.id || chunk5KAMDV37_js.generateElementId()
6293
6293
  );
6294
- const { elements, childIds: usedIds } = chunkMH4VFSDL_js.ungroupElements(
6294
+ const { elements, childIds: usedIds } = chunk5KAMDV37_js.ungroupElements(
6295
6295
  ops.activeElements,
6296
6296
  group.id,
6297
6297
  childIds,
@@ -6320,7 +6320,7 @@ function useGroupAlignLayerHandlers(input) {
6320
6320
  if (!edge) {
6321
6321
  return;
6322
6322
  }
6323
- const positions = chunkMH4VFSDL_js.alignElements(selectedElements, edge);
6323
+ const positions = chunk5KAMDV37_js.alignElements(selectedElements, edge);
6324
6324
  for (const [id, pos] of positions) {
6325
6325
  const el = elementLookup.get(id);
6326
6326
  if (!el) {
@@ -6338,7 +6338,7 @@ function useGroupAlignLayerHandlers(input) {
6338
6338
  if (!distAxis) {
6339
6339
  return;
6340
6340
  }
6341
- const positions = chunkMH4VFSDL_js.distributeElements(selectedElements, distAxis);
6341
+ const positions = chunk5KAMDV37_js.distributeElements(selectedElements, distAxis);
6342
6342
  for (const [id, pos] of positions) {
6343
6343
  const el = elementLookup.get(id);
6344
6344
  if (!el) {
@@ -6349,14 +6349,14 @@ function useGroupAlignLayerHandlers(input) {
6349
6349
  history.markDirty();
6350
6350
  };
6351
6351
  const canDistribute = selectedElements.length >= 3;
6352
- const selectionGroupable = selectedElements.every((el) => chunkMH4VFSDL_js.canInteractWithElement(el, "group"));
6352
+ const selectionGroupable = selectedElements.every((el) => chunk5KAMDV37_js.canInteractWithElement(el, "group"));
6353
6353
  const handleMoveLayer = (direction) => {
6354
6354
  if (!selectedElement || !activeSlide) {
6355
6355
  return;
6356
6356
  }
6357
6357
  const id = selectedElement.id;
6358
6358
  ops.updateActiveElements(
6359
- (els) => direction === "forward" ? chunkMH4VFSDL_js.bringForward(els, id) : direction === "backward" ? chunkMH4VFSDL_js.sendBackward(els, id) : els
6359
+ (els) => direction === "forward" ? chunk5KAMDV37_js.bringForward(els, id) : direction === "backward" ? chunk5KAMDV37_js.sendBackward(els, id) : els
6360
6360
  );
6361
6361
  history.markDirty();
6362
6362
  };
@@ -6366,7 +6366,7 @@ function useGroupAlignLayerHandlers(input) {
6366
6366
  }
6367
6367
  const id = selectedElement.id;
6368
6368
  ops.updateActiveElements(
6369
- (els) => direction === "front" ? chunkMH4VFSDL_js.bringToFront(els, id) : chunkMH4VFSDL_js.sendToBack(els, id)
6369
+ (els) => direction === "front" ? chunk5KAMDV37_js.bringToFront(els, id) : chunk5KAMDV37_js.sendToBack(els, id)
6370
6370
  );
6371
6371
  history.markDirty();
6372
6372
  };
@@ -6499,16 +6499,18 @@ function useSlideManagement(input) {
6499
6499
  canvasSize,
6500
6500
  theme
6501
6501
  } = input;
6502
- const handleAddSlide = () => {
6503
- const newSlide = chunkMH4VFSDL_js.createBlankSlide(slides.length + 1);
6502
+ const handleAddSlideAfter = (afterIndex) => {
6503
+ const insertAt = Math.max(0, Math.min(afterIndex + 1, slides.length));
6504
+ const newSlide = chunk5KAMDV37_js.createBlankSlide(slides.length + 1);
6504
6505
  ops.updateSlides((prev) => {
6505
6506
  const next = [...prev];
6506
- next.splice(activeSlideIndex + 1, 0, newSlide);
6507
+ next.splice(insertAt, 0, newSlide);
6507
6508
  return next;
6508
6509
  });
6509
- setActiveSlideIndex(activeSlideIndex + 1);
6510
+ setActiveSlideIndex(insertAt);
6510
6511
  history.markDirty();
6511
6512
  };
6513
+ const handleAddSlide = () => handleAddSlideAfter(activeSlideIndex);
6512
6514
  const handleMoveSlide = (fromIndex, toIndex) => {
6513
6515
  if (fromIndex === toIndex) {
6514
6516
  return;
@@ -6563,7 +6565,7 @@ function useSlideManagement(input) {
6563
6565
  }
6564
6566
  const clone = {
6565
6567
  ...src,
6566
- id: chunkMH4VFSDL_js.makeSlideId(),
6568
+ id: chunk5KAMDV37_js.makeSlideId(),
6567
6569
  elements: src.elements.map((el) => ({
6568
6570
  ...el,
6569
6571
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6595,7 +6597,7 @@ function useSlideManagement(input) {
6595
6597
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6596
6598
  const insertAt = activeSlideIndex + 1;
6597
6599
  const draft = {
6598
- ...chunkMH4VFSDL_js.createBlankSlide(slides.length + 1),
6600
+ ...chunk5KAMDV37_js.createBlankSlide(slides.length + 1),
6599
6601
  layoutPath,
6600
6602
  ...layoutName ? { layoutName } : {}
6601
6603
  };
@@ -6628,9 +6630,9 @@ function useSlideManagement(input) {
6628
6630
  };
6629
6631
  const handleInsertSlideFromTemplate = (templateId) => {
6630
6632
  const insertAt = activeSlideIndex + 1;
6631
- const draft = chunkMH4VFSDL_js.buildSlideTemplateSlide(templateId, chunkMH4VFSDL_js.makeSlideId(), slides.length + 1, {
6633
+ const draft = chunk5KAMDV37_js.buildSlideTemplateSlide(templateId, chunk5KAMDV37_js.makeSlideId(), slides.length + 1, {
6632
6634
  ...canvasSize ? { slideWidth: canvasSize.width, slideHeight: canvasSize.height } : {},
6633
- scheme: chunkMH4VFSDL_js.templateSchemeFromTheme(theme?.colorScheme)
6635
+ scheme: chunk5KAMDV37_js.templateSchemeFromTheme(theme?.colorScheme)
6634
6636
  });
6635
6637
  ops.updateSlides((prev) => insertSlideFromLayoutUpdater(prev, activeSlideIndex, draft));
6636
6638
  setActiveSlideIndex(insertAt);
@@ -6638,6 +6640,7 @@ function useSlideManagement(input) {
6638
6640
  };
6639
6641
  return {
6640
6642
  handleAddSlide,
6643
+ handleAddSlideAfter,
6641
6644
  handleMoveSlide,
6642
6645
  handleSlideContextMenu,
6643
6646
  handleDeleteSlides,
@@ -6667,7 +6670,7 @@ function createTableMergeHandlers(input) {
6667
6670
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6668
6671
  return;
6669
6672
  }
6670
- const newTableData = chunkMH4VFSDL_js.mergeCells(
6673
+ const newTableData = chunk5KAMDV37_js.mergeCells(
6671
6674
  [
6672
6675
  { row: rowIndex, col: columnIndex },
6673
6676
  { row: rowIndex, col: nextColIdx }
@@ -6675,7 +6678,7 @@ function createTableMergeHandlers(input) {
6675
6678
  td
6676
6679
  );
6677
6680
  const updates = { tableData: newTableData };
6678
- const newRawXml = chunkMH4VFSDL_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6681
+ const newRawXml = chunk5KAMDV37_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6679
6682
  if (newRawXml) {
6680
6683
  updates.rawXml = newRawXml;
6681
6684
  }
@@ -6701,7 +6704,7 @@ function createTableMergeHandlers(input) {
6701
6704
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6702
6705
  return;
6703
6706
  }
6704
- const newTableData = chunkMH4VFSDL_js.mergeCells(
6707
+ const newTableData = chunk5KAMDV37_js.mergeCells(
6705
6708
  [
6706
6709
  { row: rowIndex, col: columnIndex },
6707
6710
  { row: targetNextRowIdx, col: columnIndex }
@@ -6709,7 +6712,7 @@ function createTableMergeHandlers(input) {
6709
6712
  td
6710
6713
  );
6711
6714
  const updates = { tableData: newTableData };
6712
- const newRawXml = chunkMH4VFSDL_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6715
+ const newRawXml = chunk5KAMDV37_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6713
6716
  if (newRawXml) {
6714
6717
  updates.rawXml = newRawXml;
6715
6718
  }
@@ -6724,9 +6727,9 @@ function createTableMergeHandlers(input) {
6724
6727
  return;
6725
6728
  }
6726
6729
  const td = selectedElement.tableData;
6727
- const newTableData = chunkMH4VFSDL_js.mergeCells(ts.selectedCells, td);
6730
+ const newTableData = chunk5KAMDV37_js.mergeCells(ts.selectedCells, td);
6728
6731
  const updates = { tableData: newTableData };
6729
- const newRawXml = chunkMH4VFSDL_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6732
+ const newRawXml = chunk5KAMDV37_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6730
6733
  if (newRawXml) {
6731
6734
  updates.rawXml = newRawXml;
6732
6735
  }
@@ -6743,9 +6746,9 @@ function createTableMergeHandlers(input) {
6743
6746
  }
6744
6747
  const { rowIndex, columnIndex } = ts;
6745
6748
  const td = selectedElement.tableData;
6746
- const newTableData = chunkMH4VFSDL_js.splitCell(rowIndex, columnIndex, td);
6749
+ const newTableData = chunk5KAMDV37_js.splitCell(rowIndex, columnIndex, td);
6747
6750
  const updates = { tableData: newTableData };
6748
- const newRawXml = chunkMH4VFSDL_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6751
+ const newRawXml = chunk5KAMDV37_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6749
6752
  if (newRawXml) {
6750
6753
  updates.rawXml = newRawXml;
6751
6754
  }
@@ -6779,10 +6782,10 @@ function createTableStructHandlers(input) {
6779
6782
  const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
6780
6783
  const updates = {};
6781
6784
  if (el.tableData) {
6782
- updates.tableData = chunkMH4VFSDL_js.setCellText(el, rowIndex, colIndex, text).tableData;
6785
+ updates.tableData = chunk5KAMDV37_js.setCellText(el, rowIndex, colIndex, text).tableData;
6783
6786
  }
6784
6787
  if (el.rawXml) {
6785
- const newRawXml = chunkMH4VFSDL_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6788
+ const newRawXml = chunk5KAMDV37_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6786
6789
  if (newRawXml) {
6787
6790
  updates.rawXml = newRawXml;
6788
6791
  }
@@ -6806,7 +6809,7 @@ function createTableStructHandlers(input) {
6806
6809
  const { rowIndex, columnIndex: colIndex } = ts;
6807
6810
  const updates = {};
6808
6811
  if (selectedElement.rawXml) {
6809
- const newRawXml = chunkMH4VFSDL_js.updateCellTextStyleInRawXml(
6812
+ const newRawXml = chunk5KAMDV37_js.updateCellTextStyleInRawXml(
6810
6813
  selectedElement,
6811
6814
  rowIndex,
6812
6815
  colIndex,
@@ -6870,9 +6873,9 @@ function createTableStructHandlers(input) {
6870
6873
  return;
6871
6874
  }
6872
6875
  const rowIdx = ts?.rowIndex ?? 0;
6873
- const newTableData = chunkMH4VFSDL_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6876
+ const newTableData = chunk5KAMDV37_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6874
6877
  const updates = { tableData: newTableData };
6875
- const newRawXml = chunkMH4VFSDL_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6878
+ const newRawXml = chunk5KAMDV37_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6876
6879
  if (newRawXml) {
6877
6880
  updates.rawXml = newRawXml;
6878
6881
  }
@@ -6885,12 +6888,12 @@ function createTableStructHandlers(input) {
6885
6888
  }
6886
6889
  const td = selectedElement.tableData;
6887
6890
  const rowIdx = ts?.rowIndex ?? 0;
6888
- const newTableData = chunkMH4VFSDL_js.deleteTableRow(td, rowIdx);
6891
+ const newTableData = chunk5KAMDV37_js.deleteTableRow(td, rowIdx);
6889
6892
  if (newTableData === td) {
6890
6893
  return;
6891
6894
  }
6892
6895
  const updates = { tableData: newTableData };
6893
- const newRawXml = chunkMH4VFSDL_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6896
+ const newRawXml = chunk5KAMDV37_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6894
6897
  if (newRawXml) {
6895
6898
  updates.rawXml = newRawXml;
6896
6899
  }
@@ -6902,9 +6905,9 @@ function createTableStructHandlers(input) {
6902
6905
  return;
6903
6906
  }
6904
6907
  const colIdx = ts?.columnIndex ?? 0;
6905
- const newTableData = chunkMH4VFSDL_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6908
+ const newTableData = chunk5KAMDV37_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6906
6909
  const updates = { tableData: newTableData };
6907
- const newRawXml = chunkMH4VFSDL_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6910
+ const newRawXml = chunk5KAMDV37_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6908
6911
  if (newRawXml) {
6909
6912
  updates.rawXml = newRawXml;
6910
6913
  }
@@ -6917,12 +6920,12 @@ function createTableStructHandlers(input) {
6917
6920
  }
6918
6921
  const td = selectedElement.tableData;
6919
6922
  const colIdx = ts?.columnIndex ?? 0;
6920
- const newTableData = chunkMH4VFSDL_js.deleteTableColumn(td, colIdx);
6923
+ const newTableData = chunk5KAMDV37_js.deleteTableColumn(td, colIdx);
6921
6924
  if (newTableData === td) {
6922
6925
  return;
6923
6926
  }
6924
6927
  const updates = { tableData: newTableData };
6925
- const newRawXml = chunkMH4VFSDL_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6928
+ const newRawXml = chunk5KAMDV37_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6926
6929
  if (newRawXml) {
6927
6930
  updates.rawXml = newRawXml;
6928
6931
  }
@@ -6958,8 +6961,8 @@ async function renderToCanvas(element, options = {}) {
6958
6961
  return html2canvasPro(element, {
6959
6962
  ...options,
6960
6963
  onclone: async (doc, clonedEl) => {
6961
- await chunkMH4VFSDL_js.normalizeColorsForCapture(doc, clonedEl);
6962
- chunkMH4VFSDL_js.preprocessCssForCapture(clonedEl);
6964
+ await chunk5KAMDV37_js.normalizeColorsForCapture(doc, clonedEl);
6965
+ chunk5KAMDV37_js.preprocessCssForCapture(clonedEl);
6963
6966
  if (typeof userOnClone === "function") {
6964
6967
  userOnClone(doc, clonedEl);
6965
6968
  }
@@ -6989,7 +6992,7 @@ function useExportSaveAs(input) {
6989
6992
  slideSizeEmu
6990
6993
  } = input;
6991
6994
  const handleSaveAsFormat = async (format) => {
6992
- const downloadName = chunkMH4VFSDL_js.savedPresentationFileName(filePath, format);
6995
+ const downloadName = chunk5KAMDV37_js.savedPresentationFileName(filePath, format);
6993
6996
  try {
6994
6997
  const data = await serializeSlides(format);
6995
6998
  if (!data) {
@@ -6997,16 +7000,16 @@ function useExportSaveAs(input) {
6997
7000
  }
6998
7001
  const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
6999
7002
  const blob = new Blob([data], { type: mimeType });
7000
- chunkMH4VFSDL_js.downloadBlob(blob, downloadName);
7003
+ chunk5KAMDV37_js.downloadBlob(blob, downloadName);
7001
7004
  } catch (err) {
7002
7005
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
7003
7006
  }
7004
7007
  };
7005
7008
  const handleExportJson = () => {
7006
7009
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7007
- const slideSize = chunkMH4VFSDL_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7010
+ const slideSize = chunk5KAMDV37_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7008
7011
  const data = {
7009
- slides: chunkMH4VFSDL_js.buildSaveSlides(slides, templateElementsBySlideId),
7012
+ slides: chunk5KAMDV37_js.buildSaveSlides(slides, templateElementsBySlideId),
7010
7013
  width: canvasSize.width,
7011
7014
  height: canvasSize.height,
7012
7015
  widthEmu: slideSize.widthEmu,
@@ -7025,7 +7028,7 @@ function useExportSaveAs(input) {
7025
7028
  handoutMaster
7026
7029
  };
7027
7030
  try {
7028
- chunkMH4VFSDL_js.exportDeckJson(data, sourceName);
7031
+ chunk5KAMDV37_js.exportDeckJson(data, sourceName);
7029
7032
  } catch (err) {
7030
7033
  console.error("[PowerPointViewer] JSON export failed:", err);
7031
7034
  }
@@ -7090,7 +7093,7 @@ function buildRasterOptions(element, scale, backgroundColor, mode) {
7090
7093
  }
7091
7094
  async function renderElementToRaster(element, scale = 2, backgroundColor, mode = "auto") {
7092
7095
  const { width, height } = measureNaturalSize(element);
7093
- return chunkMH4VFSDL_js.rasterizeElement(
7096
+ return chunk5KAMDV37_js.rasterizeElement(
7094
7097
  element,
7095
7098
  width,
7096
7099
  height,
@@ -7100,7 +7103,7 @@ async function renderElementToRaster(element, scale = 2, backgroundColor, mode =
7100
7103
  }
7101
7104
  async function renderElementToTiles(element, scale = 2, backgroundColor, mode = "auto") {
7102
7105
  const { width, height } = measureNaturalSize(element);
7103
- return chunkMH4VFSDL_js.rasterizeElementTiles(
7106
+ return chunk5KAMDV37_js.rasterizeElementTiles(
7104
7107
  element,
7105
7108
  width,
7106
7109
  height,
@@ -7110,7 +7113,7 @@ async function renderElementToTiles(element, scale = 2, backgroundColor, mode =
7110
7113
  }
7111
7114
  async function renderElementToTiledCanvas(element, scale = 2, backgroundColor, mode = "auto") {
7112
7115
  const { width, height } = measureNaturalSize(element);
7113
- return chunkMH4VFSDL_js.rasterizeElementTiledToCanvas(
7116
+ return chunk5KAMDV37_js.rasterizeElementTiledToCanvas(
7114
7117
  element,
7115
7118
  width,
7116
7119
  height,
@@ -7132,11 +7135,11 @@ function waitForRender(ms = 100) {
7132
7135
  async function exportSlideToPngBlob(slideElement, options = {}) {
7133
7136
  const { scale = 2, backgroundColor } = options;
7134
7137
  const result = await renderElementToRaster(slideElement, scale, backgroundColor);
7135
- return chunkMH4VFSDL_js.rasterResultToPngBlob(result);
7138
+ return chunk5KAMDV37_js.rasterResultToPngBlob(result);
7136
7139
  }
7137
7140
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
7138
7141
  const blob = await exportSlideToPngBlob(slideElement, options);
7139
- chunkMH4VFSDL_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7142
+ chunk5KAMDV37_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
7140
7143
  }
7141
7144
  async function copySlideToClipboard(slideElement, options = {}) {
7142
7145
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -7165,13 +7168,13 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7165
7168
  // src/viewer/utils/export-pdf.ts
7166
7169
  function tilesToPdfPage(tilesResult) {
7167
7170
  return tilesResult.tiles.map((tile) => ({
7168
- image: chunkMH4VFSDL_js.canvasToJpegData(tile.canvas),
7169
- placement: chunkMH4VFSDL_js.placeTileOnPage(
7171
+ image: chunk5KAMDV37_js.canvasToJpegData(tile.canvas),
7172
+ placement: chunk5KAMDV37_js.placeTileOnPage(
7170
7173
  tile,
7171
7174
  tilesResult.fullWidth,
7172
7175
  tilesResult.fullHeight,
7173
- chunkMH4VFSDL_js.PDF_SLIDES_PAGE_WIDTH_PT,
7174
- chunkMH4VFSDL_js.PDF_SLIDES_PAGE_HEIGHT_PT
7176
+ chunk5KAMDV37_js.PDF_SLIDES_PAGE_WIDTH_PT,
7177
+ chunk5KAMDV37_js.PDF_SLIDES_PAGE_HEIGHT_PT
7175
7178
  )
7176
7179
  }));
7177
7180
  }
@@ -7198,8 +7201,8 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7198
7201
  if (pages.length === 0) {
7199
7202
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
7200
7203
  }
7201
- const pdfBlobUrl = chunkH4LMXJ2Z_js.buildPdfFromTiledImageData(pages);
7202
- chunkMH4VFSDL_js.downloadDataUrl(pdfBlobUrl, filename);
7204
+ const pdfBlobUrl = chunkGLY4OPMY_js.buildPdfFromTiledImageData(pages);
7205
+ chunk5KAMDV37_js.downloadDataUrl(pdfBlobUrl, filename);
7203
7206
  }
7204
7207
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
7205
7208
  const { scale = 2, onProgress, signal } = options;
@@ -7228,8 +7231,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7228
7231
  if (pages.length === 0) {
7229
7232
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7230
7233
  }
7231
- const pdfDataUrl = chunkH4LMXJ2Z_js.buildNotesPdf(pages);
7232
- chunkMH4VFSDL_js.downloadDataUrl(pdfDataUrl, filename);
7234
+ const pdfDataUrl = chunkGLY4OPMY_js.buildNotesPdf(pages);
7235
+ chunk5KAMDV37_js.downloadDataUrl(pdfDataUrl, filename);
7233
7236
  }
7234
7237
 
7235
7238
  // src/viewer/utils/export-video.ts
@@ -7273,7 +7276,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7273
7276
  const fps = 30;
7274
7277
  const stream = recordingCanvas.captureStream(fps);
7275
7278
  const recorder = new MediaRecorder(stream, {
7276
- mimeType: chunkMH4VFSDL_js.pickSupportedMimeType([...chunkMH4VFSDL_js.WEBM_MIME_CANDIDATES]),
7279
+ mimeType: chunk5KAMDV37_js.pickSupportedMimeType([...chunk5KAMDV37_js.WEBM_MIME_CANDIDATES]),
7277
7280
  videoBitsPerSecond: 5e6
7278
7281
  });
7279
7282
  const chunks = [];
@@ -7296,8 +7299,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7296
7299
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
7297
7300
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
7298
7301
  ctx.drawImage(slideCanvases[i], 0, 0);
7299
- const frameInterval = chunkMH4VFSDL_js.fpsToFrameIntervalMs(fps);
7300
- const framesNeeded = chunkMH4VFSDL_js.segmentFrameCount(duration, fps);
7302
+ const frameInterval = chunk5KAMDV37_js.fpsToFrameIntervalMs(fps);
7303
+ const framesNeeded = chunk5KAMDV37_js.segmentFrameCount(duration, fps);
7301
7304
  for (let f = 0; f < framesNeeded; f++) {
7302
7305
  if (signal?.aborted) {
7303
7306
  recorder.stop();
@@ -7317,7 +7320,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
7317
7320
 
7318
7321
  // src/viewer/utils/export-gif.ts
7319
7322
  function frameFromCanvas(canvas, maxSide) {
7320
- const { width, height } = chunkMH4VFSDL_js.clampGifDimensions(canvas.width, canvas.height, maxSide);
7323
+ const { width, height } = chunk5KAMDV37_js.clampGifDimensions(canvas.width, canvas.height, maxSide);
7321
7324
  let source = canvas;
7322
7325
  if (width !== canvas.width || height !== canvas.height) {
7323
7326
  const scaled = canvas.ownerDocument.createElement("canvas");
@@ -7340,7 +7343,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7340
7343
  const {
7341
7344
  scale = 0.5,
7342
7345
  slideDurationMs = 2e3,
7343
- maxSide = chunkMH4VFSDL_js.GIF_POST_CAPTURE_MAX_SIDE,
7346
+ maxSide = chunk5KAMDV37_js.GIF_POST_CAPTURE_MAX_SIDE,
7344
7347
  onProgress,
7345
7348
  signal
7346
7349
  } = options;
@@ -7367,7 +7370,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7367
7370
  if (frames.length === 0) {
7368
7371
  throw new Error(chunk3AJ54EAB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
7369
7372
  }
7370
- const gifBytes = chunkMH4VFSDL_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7373
+ const gifBytes = chunk5KAMDV37_js.encodeGif(frames, Math.round(slideDurationMs / 10));
7371
7374
  onProgress?.(totalSlides, totalSlides);
7372
7375
  const buf = new ArrayBuffer(gifBytes.length);
7373
7376
  new Uint8Array(buf).set(gifBytes);
@@ -7421,7 +7424,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7421
7424
  continue;
7422
7425
  }
7423
7426
  onProgress?.(processedCount, data.slides.length);
7424
- let svg = chunkMH4VFSDL_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7427
+ let svg = chunk5KAMDV37_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7425
7428
  if (embedFonts && fontFaces?.length) {
7426
7429
  svg = injectFontFaces(svg, fontFaces);
7427
7430
  }
@@ -7473,7 +7476,7 @@ function useExportMediaHandlers(input) {
7473
7476
  setExportProgress(0);
7474
7477
  setExportModalOpen(true);
7475
7478
  try {
7476
- const { scale } = chunkMH4VFSDL_js.resolveExportCaptureDecision(imageResolutionScale, "video");
7479
+ const { scale } = chunk5KAMDV37_js.resolveExportCaptureDecision(imageResolutionScale, "video");
7477
7480
  const blob = await exportAllSlidesAsVideo(
7478
7481
  canvasStageRef,
7479
7482
  slides.length,
@@ -7483,22 +7486,22 @@ function useExportMediaHandlers(input) {
7483
7486
  scale,
7484
7487
  slideDurationMs: 3e3,
7485
7488
  onProgress: (current, total) => {
7486
- setExportProgress(chunkMH4VFSDL_js.slideProgressPercent(current, total, 45));
7487
- setExportStatusMessage(chunkMH4VFSDL_js.slideStatusLabel("Capturing", current, total));
7489
+ setExportProgress(chunk5KAMDV37_js.slideProgressPercent(current, total, 45));
7490
+ setExportStatusMessage(chunk5KAMDV37_js.slideStatusLabel("Capturing", current, total));
7488
7491
  },
7489
7492
  onRecordProgress: (current, total) => {
7490
- setExportProgress(chunkMH4VFSDL_js.recordProgressPercent(current, total));
7491
- setExportStatusMessage(chunkMH4VFSDL_js.slideStatusLabel("Recording", current, total));
7493
+ setExportProgress(chunk5KAMDV37_js.recordProgressPercent(current, total));
7494
+ setExportStatusMessage(chunk5KAMDV37_js.slideStatusLabel("Recording", current, total));
7492
7495
  },
7493
7496
  signal: abortCtrl.signal
7494
7497
  }
7495
7498
  );
7496
- setExportProgress(chunkMH4VFSDL_js.EXPORT_ASSEMBLING_PERCENT);
7499
+ setExportProgress(chunk5KAMDV37_js.EXPORT_ASSEMBLING_PERCENT);
7497
7500
  setExportStatusMessage("Saving file...");
7498
- chunkMH4VFSDL_js.downloadBlob(blob, "presentation.webm");
7499
- setExportProgress(chunkMH4VFSDL_js.EXPORT_DONE_PERCENT);
7501
+ chunk5KAMDV37_js.downloadBlob(blob, "presentation.webm");
7502
+ setExportProgress(chunk5KAMDV37_js.EXPORT_DONE_PERCENT);
7500
7503
  } catch (err) {
7501
- if (!chunkMH4VFSDL_js.isExportAbortError(err)) {
7504
+ if (!chunk5KAMDV37_js.isExportAbortError(err)) {
7502
7505
  console.error("[PowerPointViewer] Video export failed:", err);
7503
7506
  }
7504
7507
  } finally {
@@ -7528,7 +7531,7 @@ function useExportMediaHandlers(input) {
7528
7531
  setExportProgress(0);
7529
7532
  setExportModalOpen(true);
7530
7533
  try {
7531
- const { scale, postCaptureMaxSide } = chunkMH4VFSDL_js.resolveExportCaptureDecision(
7534
+ const { scale, postCaptureMaxSide } = chunk5KAMDV37_js.resolveExportCaptureDecision(
7532
7535
  imageResolutionScale,
7533
7536
  "gif"
7534
7537
  );
@@ -7542,18 +7545,18 @@ function useExportMediaHandlers(input) {
7542
7545
  maxSide: postCaptureMaxSide,
7543
7546
  slideDurationMs: 2e3,
7544
7547
  onProgress: (current, total) => {
7545
- setExportProgress(chunkMH4VFSDL_js.slideProgressPercent(current, total));
7546
- setExportStatusMessage(chunkMH4VFSDL_js.slideStatusLabel("Encoding", current, total));
7548
+ setExportProgress(chunk5KAMDV37_js.slideProgressPercent(current, total));
7549
+ setExportStatusMessage(chunk5KAMDV37_js.slideStatusLabel("Encoding", current, total));
7547
7550
  },
7548
7551
  signal: abortCtrl.signal
7549
7552
  }
7550
7553
  );
7551
- setExportProgress(chunkMH4VFSDL_js.EXPORT_ASSEMBLING_PERCENT);
7554
+ setExportProgress(chunk5KAMDV37_js.EXPORT_ASSEMBLING_PERCENT);
7552
7555
  setExportStatusMessage("Saving file...");
7553
- chunkMH4VFSDL_js.downloadBlob(blob, "presentation.gif");
7554
- setExportProgress(chunkMH4VFSDL_js.EXPORT_DONE_PERCENT);
7556
+ chunk5KAMDV37_js.downloadBlob(blob, "presentation.gif");
7557
+ setExportProgress(chunk5KAMDV37_js.EXPORT_DONE_PERCENT);
7555
7558
  } catch (err) {
7556
- if (!chunkMH4VFSDL_js.isExportAbortError(err)) {
7559
+ if (!chunk5KAMDV37_js.isExportAbortError(err)) {
7557
7560
  console.error("[PowerPointViewer] GIF export failed:", err);
7558
7561
  }
7559
7562
  } finally {
@@ -7679,21 +7682,21 @@ function useExportHandlers(input) {
7679
7682
  {
7680
7683
  scale: imageExportScale,
7681
7684
  onProgress: (current, total) => {
7682
- setExportProgress(chunkMH4VFSDL_js.slideProgressPercent(current, total));
7683
- setExportStatusMessage(chunkMH4VFSDL_js.slideStatusLabel("Rendering", current, total));
7685
+ setExportProgress(chunk5KAMDV37_js.slideProgressPercent(current, total));
7686
+ setExportStatusMessage(chunk5KAMDV37_js.slideStatusLabel("Rendering", current, total));
7684
7687
  },
7685
7688
  signal: abortCtrl.signal
7686
7689
  }
7687
7690
  );
7688
- setExportProgress(chunkMH4VFSDL_js.EXPORT_ASSEMBLING_PERCENT);
7691
+ setExportProgress(chunk5KAMDV37_js.EXPORT_ASSEMBLING_PERCENT);
7689
7692
  setExportStatusMessage("Building PDF...");
7690
7693
  await new Promise((r) => {
7691
7694
  setTimeout(r, 100);
7692
7695
  });
7693
- setExportProgress(chunkMH4VFSDL_js.EXPORT_DONE_PERCENT);
7696
+ setExportProgress(chunk5KAMDV37_js.EXPORT_DONE_PERCENT);
7694
7697
  setExportStatusMessage("Done!");
7695
7698
  } catch (err) {
7696
- if (!chunkMH4VFSDL_js.isExportAbortError(err)) {
7699
+ if (!chunk5KAMDV37_js.isExportAbortError(err)) {
7697
7700
  console.error("[PowerPointViewer] PDF export failed:", err);
7698
7701
  }
7699
7702
  } finally {
@@ -7723,21 +7726,21 @@ function useExportHandlers(input) {
7723
7726
  {
7724
7727
  scale: imageExportScale,
7725
7728
  onProgress: (current, total) => {
7726
- setExportProgress(chunkMH4VFSDL_js.slideProgressPercent(current, total));
7727
- setExportStatusMessage(chunkMH4VFSDL_js.slideStatusLabel("Rendering", current, total));
7729
+ setExportProgress(chunk5KAMDV37_js.slideProgressPercent(current, total));
7730
+ setExportStatusMessage(chunk5KAMDV37_js.slideStatusLabel("Rendering", current, total));
7728
7731
  },
7729
7732
  signal: abortCtrl.signal
7730
7733
  }
7731
7734
  );
7732
- setExportProgress(chunkMH4VFSDL_js.EXPORT_ASSEMBLING_PERCENT);
7735
+ setExportProgress(chunk5KAMDV37_js.EXPORT_ASSEMBLING_PERCENT);
7733
7736
  setExportStatusMessage("Building PDF...");
7734
7737
  await new Promise((r) => {
7735
7738
  setTimeout(r, 100);
7736
7739
  });
7737
- setExportProgress(chunkMH4VFSDL_js.EXPORT_DONE_PERCENT);
7740
+ setExportProgress(chunk5KAMDV37_js.EXPORT_DONE_PERCENT);
7738
7741
  setExportStatusMessage("Done!");
7739
7742
  } catch (err) {
7740
- if (!chunkMH4VFSDL_js.isExportAbortError(err)) {
7743
+ if (!chunk5KAMDV37_js.isExportAbortError(err)) {
7741
7744
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7742
7745
  }
7743
7746
  } finally {
@@ -7785,7 +7788,7 @@ function useExportHandlers(input) {
7785
7788
  exportStatusMessage
7786
7789
  };
7787
7790
  }
7788
- var ViewerOptionsContext = react.createContext(chunkMH4VFSDL_js.DEFAULT_VIEWER_OPTIONS);
7791
+ var ViewerOptionsContext = react.createContext(chunk5KAMDV37_js.DEFAULT_VIEWER_OPTIONS);
7789
7792
  function useViewerOptionsContext() {
7790
7793
  return react.useContext(ViewerOptionsContext);
7791
7794
  }
@@ -7797,13 +7800,13 @@ function usePrintHandlers(input) {
7797
7800
  const { t } = reactI18next.useTranslation();
7798
7801
  const viewerOptions = useViewerOptionsContext();
7799
7802
  const includeHiddenSlides = viewerOptions.advanced.printHiddenSlides;
7800
- const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunkMH4VFSDL_js.resolveImageResolutionScale(viewerOptions);
7803
+ const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * chunk5KAMDV37_js.resolveImageResolutionScale(viewerOptions);
7801
7804
  const handlePrint = () => {
7802
7805
  setIsPrintDialogOpen(true);
7803
7806
  };
7804
7807
  const handlePrintSvg = async (settings) => {
7805
7808
  setIsPrintDialogOpen(false);
7806
- const printWindow = chunkMH4VFSDL_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7809
+ const printWindow = chunk5KAMDV37_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7807
7810
  if (!printWindow) {
7808
7811
  console.warn(
7809
7812
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -7813,9 +7816,9 @@ function usePrintHandlers(input) {
7813
7816
  if (!pptxData || settings.printWhat !== "slides") {
7814
7817
  return runRasterPrint(printWindow, settings);
7815
7818
  }
7816
- const colorFilter = chunkMH4VFSDL_js.computeColorFilter(settings.colorMode);
7817
- const slideIndices = chunkMH4VFSDL_js.filterHiddenSlideIndices(
7818
- chunkMH4VFSDL_js.computeSlideIndices(
7819
+ const colorFilter = chunk5KAMDV37_js.computeColorFilter(settings.colorMode);
7820
+ const slideIndices = chunk5KAMDV37_js.filterHiddenSlideIndices(
7821
+ chunk5KAMDV37_js.computeSlideIndices(
7819
7822
  settings.slideRange,
7820
7823
  activeSlideIndex,
7821
7824
  slides.length,
@@ -7833,22 +7836,22 @@ function usePrintHandlers(input) {
7833
7836
  printWindow.close();
7834
7837
  return;
7835
7838
  }
7836
- const printDoc = chunkMH4VFSDL_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7839
+ const printDoc = chunk5KAMDV37_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7837
7840
  title: "Slides (Vector)",
7838
7841
  orientation: settings.orientation,
7839
7842
  colorFilter,
7840
7843
  scaleToFit: settings.scaleToFit
7841
7844
  });
7842
- chunkMH4VFSDL_js.finishPrintWindow(printWindow, printDoc);
7845
+ chunk5KAMDV37_js.finishPrintWindow(printWindow, printDoc);
7843
7846
  } catch (err) {
7844
7847
  console.warn("[PowerPointViewer] SVG print path failed, falling back to raster:", err);
7845
7848
  return runRasterPrint(printWindow, settings);
7846
7849
  }
7847
7850
  };
7848
7851
  const runRasterPrint = async (printWindow, settings) => {
7849
- const colorFilter = chunkMH4VFSDL_js.computeColorFilter(settings.colorMode);
7850
- const slideIndices = chunkMH4VFSDL_js.filterHiddenSlideIndices(
7851
- chunkMH4VFSDL_js.computeSlideIndices(
7852
+ const colorFilter = chunk5KAMDV37_js.computeColorFilter(settings.colorMode);
7853
+ const slideIndices = chunk5KAMDV37_js.filterHiddenSlideIndices(
7854
+ chunk5KAMDV37_js.computeSlideIndices(
7852
7855
  settings.slideRange,
7853
7856
  activeSlideIndex,
7854
7857
  slides.length,
@@ -7859,11 +7862,11 @@ function usePrintHandlers(input) {
7859
7862
  includeHiddenSlides
7860
7863
  );
7861
7864
  if (settings.printWhat === "outline") {
7862
- chunkMH4VFSDL_js.finishPrintWindow(
7865
+ chunk5KAMDV37_js.finishPrintWindow(
7863
7866
  printWindow,
7864
- chunkMH4VFSDL_js.buildPrintHtmlDocument({
7867
+ chunk5KAMDV37_js.buildPrintHtmlDocument({
7865
7868
  title: "Outline",
7866
- bodyHtml: `<div class="outline-page">${chunkMH4VFSDL_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7869
+ bodyHtml: `<div class="outline-page">${chunk5KAMDV37_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7867
7870
  orientation: settings.orientation,
7868
7871
  colorFilter,
7869
7872
  frameSlides: settings.frameSlides,
@@ -7890,11 +7893,11 @@ function usePrintHandlers(input) {
7890
7893
  }
7891
7894
  const slideImages = slideIndices.map((idx) => allImages[idx]).filter(Boolean);
7892
7895
  if (settings.printWhat === "slides") {
7893
- chunkMH4VFSDL_js.finishPrintWindow(
7896
+ chunk5KAMDV37_js.finishPrintWindow(
7894
7897
  printWindow,
7895
- chunkMH4VFSDL_js.buildPrintHtmlDocument({
7898
+ chunk5KAMDV37_js.buildPrintHtmlDocument({
7896
7899
  title: "Slides",
7897
- bodyHtml: chunkMH4VFSDL_js.buildSlidesHtml(slideImages, slideIndices),
7900
+ bodyHtml: chunk5KAMDV37_js.buildSlidesHtml(slideImages, slideIndices),
7898
7901
  orientation: settings.orientation,
7899
7902
  colorFilter,
7900
7903
  frameSlides: settings.frameSlides,
@@ -7904,11 +7907,11 @@ function usePrintHandlers(input) {
7904
7907
  return;
7905
7908
  }
7906
7909
  if (settings.printWhat === "notes") {
7907
- chunkMH4VFSDL_js.finishPrintWindow(
7910
+ chunk5KAMDV37_js.finishPrintWindow(
7908
7911
  printWindow,
7909
- chunkMH4VFSDL_js.buildPrintHtmlDocument({
7912
+ chunk5KAMDV37_js.buildPrintHtmlDocument({
7910
7913
  title: "Notes Pages",
7911
- bodyHtml: chunkMH4VFSDL_js.buildNotesHtml(slideImages, slideIndices, slides),
7914
+ bodyHtml: chunk5KAMDV37_js.buildNotesHtml(slideImages, slideIndices, slides),
7912
7915
  orientation: "portrait",
7913
7916
  colorFilter,
7914
7917
  frameSlides: settings.frameSlides,
@@ -7919,11 +7922,11 @@ function usePrintHandlers(input) {
7919
7922
  }
7920
7923
  if (settings.printWhat === "handouts") {
7921
7924
  const spp = settings.slidesPerPage;
7922
- chunkMH4VFSDL_js.finishPrintWindow(
7925
+ chunk5KAMDV37_js.finishPrintWindow(
7923
7926
  printWindow,
7924
- chunkMH4VFSDL_js.buildPrintHtmlDocument({
7927
+ chunk5KAMDV37_js.buildPrintHtmlDocument({
7925
7928
  title: `Handout ${spp} per page`,
7926
- bodyHtml: chunkMH4VFSDL_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7929
+ bodyHtml: chunk5KAMDV37_js.buildHandoutsHtml(slideImages, slideIndices, spp, pptxData?.handoutMaster),
7927
7930
  orientation: "portrait",
7928
7931
  colorFilter,
7929
7932
  frameSlides: settings.frameSlides,
@@ -7937,7 +7940,7 @@ function usePrintHandlers(input) {
7937
7940
  };
7938
7941
  const handlePrintWithSettings = async (settings) => {
7939
7942
  setIsPrintDialogOpen(false);
7940
- const printWindow = chunkMH4VFSDL_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7943
+ const printWindow = chunk5KAMDV37_js.openPendingPrintWindow(t("pptx.print.preparingToPrint"));
7941
7944
  if (!printWindow) {
7942
7945
  console.warn(
7943
7946
  "[PowerPointViewer] Print window was blocked by the browser. Allow popups for this site to print."
@@ -8002,13 +8005,13 @@ function useThemeHandlers(input) {
8002
8005
  return;
8003
8006
  }
8004
8007
  await handler.updateThemeColorScheme(colorScheme);
8005
- const previousMap = theme?.colorScheme ? chunkMH4VFSDL_js.buildThemeColorMap(theme.colorScheme) : {};
8006
- setSlides((prev) => chunkMH4VFSDL_js.reResolveSlideColors(prev, previousMap, colorScheme));
8008
+ const previousMap = theme?.colorScheme ? chunk5KAMDV37_js.buildThemeColorMap(theme.colorScheme) : {};
8009
+ setSlides((prev) => chunk5KAMDV37_js.reResolveSlideColors(prev, previousMap, colorScheme));
8007
8010
  if (Object.keys(templateElementsBySlideId).length > 0) {
8008
8011
  setTemplateElementsBySlideId((prev) => {
8009
8012
  const next = {};
8010
8013
  for (const [slideId, elements] of Object.entries(prev)) {
8011
- next[slideId] = chunkMH4VFSDL_js.reResolveElementColors(elements, previousMap, colorScheme);
8014
+ next[slideId] = chunk5KAMDV37_js.reResolveElementColors(elements, previousMap, colorScheme);
8012
8015
  }
8013
8016
  return next;
8014
8017
  });
@@ -8117,7 +8120,7 @@ function useThemeSwitching(input) {
8117
8120
  }
8118
8121
  try {
8119
8122
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
8120
- const newData = chunkMH4VFSDL_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8123
+ const newData = chunk5KAMDV37_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8121
8124
  onDataChange(newData);
8122
8125
  onThemeChanged?.(preset);
8123
8126
  } catch (error) {
@@ -8134,7 +8137,7 @@ function useThemeSwitching(input) {
8134
8137
  }
8135
8138
  try {
8136
8139
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8137
- const newData = chunkMH4VFSDL_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8140
+ const newData = chunk5KAMDV37_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
8138
8141
  onDataChange(newData);
8139
8142
  } catch (error) {
8140
8143
  console.error("Failed to switch to custom theme:", error);
@@ -8146,12 +8149,12 @@ function useThemeSwitching(input) {
8146
8149
  if (!data?.theme?.colorScheme) {
8147
8150
  return void 0;
8148
8151
  }
8149
- return chunkMH4VFSDL_js.THEME_PRESETS.find(
8150
- (p) => chunkMH4VFSDL_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8152
+ return chunk5KAMDV37_js.THEME_PRESETS.find(
8153
+ (p) => chunk5KAMDV37_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8151
8154
  );
8152
8155
  }, [data?.theme?.colorScheme]);
8153
8156
  return {
8154
- presets: chunkMH4VFSDL_js.THEME_PRESETS,
8157
+ presets: chunk5KAMDV37_js.THEME_PRESETS,
8155
8158
  switchToPreset,
8156
8159
  switchToCustom,
8157
8160
  currentPreset
@@ -8226,7 +8229,7 @@ function usePropertyHandlers(input) {
8226
8229
  }
8227
8230
  try {
8228
8231
  const ab = await file.arrayBuffer();
8229
- const h = new chunkMH4VFSDL_js.PptxHandler();
8232
+ const h = new chunk5KAMDV37_js.PptxHandler();
8230
8233
  const other = await h.load(ab);
8231
8234
  if (!other) {
8232
8235
  return;
@@ -8236,7 +8239,7 @@ function usePropertyHandlers(input) {
8236
8239
  width: canvasSize.width,
8237
8240
  height: canvasSize.height
8238
8241
  };
8239
- setCompareResult(chunkMH4VFSDL_js.comparePresentation(cur, other));
8242
+ setCompareResult(chunk5KAMDV37_js.comparePresentation(cur, other));
8240
8243
  setIsComparePanelOpen(true);
8241
8244
  } catch (err) {
8242
8245
  console.warn("Compare failed:", err);
@@ -8253,7 +8256,7 @@ function usePropertyHandlers(input) {
8253
8256
  if (!diff || diff.status === "unchanged") {
8254
8257
  return;
8255
8258
  }
8256
- setSlides((prev) => chunkMH4VFSDL_js.applyAcceptSlide(prev, diff));
8259
+ setSlides((prev) => chunk5KAMDV37_js.applyAcceptSlide(prev, diff));
8257
8260
  setIsDirty(true);
8258
8261
  },
8259
8262
  [compareResult, setSlides, setIsDirty]
@@ -8264,10 +8267,10 @@ function usePropertyHandlers(input) {
8264
8267
  if (!compareResult) {
8265
8268
  return;
8266
8269
  }
8267
- setSlides((prev) => chunkMH4VFSDL_js.applyAcceptAllSlides(prev, compareResult));
8270
+ setSlides((prev) => chunk5KAMDV37_js.applyAcceptAllSlides(prev, compareResult));
8268
8271
  setIsDirty(true);
8269
8272
  }, [compareResult, setSlides, setIsDirty]);
8270
- const usedFontFamilies = react.useMemo(() => chunkMH4VFSDL_js.collectUsedFonts(slides), [slides]);
8273
+ const usedFontFamilies = react.useMemo(() => chunk5KAMDV37_js.collectUsedFonts(slides), [slides]);
8271
8274
  return {
8272
8275
  handleUpdateNotes,
8273
8276
  handleUpdateSlide,
@@ -8422,7 +8425,7 @@ function useViewerDialogs(input) {
8422
8425
  );
8423
8426
  const embeddedFontKey = (embeddedFontFamilies ?? []).join("\0");
8424
8427
  const fontEmbedding = react.useMemo(
8425
- () => chunkMH4VFSDL_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8428
+ () => chunk5KAMDV37_js.describeFontEmbedding(embeddedFontKey ? embeddedFontKey.split("\0") : []),
8426
8429
  [embeddedFontKey]
8427
8430
  );
8428
8431
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(fontEmbedding.initialEnabled);
@@ -8432,11 +8435,11 @@ function useViewerDialogs(input) {
8432
8435
  setEmbedFontsEnabled(fontEmbedding.initialEnabled);
8433
8436
  }
8434
8437
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8435
- () => typeof window !== "undefined" ? chunkMH4VFSDL_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8438
+ () => typeof window !== "undefined" ? chunk5KAMDV37_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8436
8439
  );
8437
8440
  react.useEffect(() => {
8438
8441
  const handleWindow = () => setIsNarrowViewport(
8439
- chunkMH4VFSDL_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8442
+ chunk5KAMDV37_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8440
8443
  );
8441
8444
  window.addEventListener("resize", handleWindow);
8442
8445
  return () => window.removeEventListener("resize", handleWindow);
@@ -8589,16 +8592,16 @@ function useViewerDialogs(input) {
8589
8592
  };
8590
8593
  }
8591
8594
  function computeGridSpacingPx2(documentGridSpacing) {
8592
- return chunkMH4VFSDL_js.computeGridSpacingPx(documentGridSpacing, chunkH4LMXJ2Z_js.GRID_SIZE);
8595
+ return chunk5KAMDV37_js.computeGridSpacingPx(documentGridSpacing, chunkGLY4OPMY_js.GRID_SIZE);
8593
8596
  }
8594
8597
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
8595
8598
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8596
- const authoredRange = chunkMH4VFSDL_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8597
- return chunkMH4VFSDL_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8599
+ const authoredRange = chunk5KAMDV37_js.resolveAuthoredSlideRange(presentationProperties, slides.length);
8600
+ return chunk5KAMDV37_js.resolveShowSlideIndexes(slides, activeShow, authoredRange);
8598
8601
  }
8599
8602
  function computeSlideSectionGroups(slides, sections) {
8600
- return chunkMH4VFSDL_js.groupSlidesBySection(sections, slides).map((group) => ({
8601
- id: group.section?.id ?? (sections.length > 0 ? chunkH4LMXJ2Z_js.UNGROUPED_SECTION_ID : chunkH4LMXJ2Z_js.DEFAULT_SECTION_GROUP_ID),
8603
+ return chunk5KAMDV37_js.groupSlidesBySection(sections, slides).map((group) => ({
8604
+ id: group.section?.id ?? (sections.length > 0 ? chunkGLY4OPMY_js.UNGROUPED_SECTION_ID : chunkGLY4OPMY_js.DEFAULT_SECTION_GROUP_ID),
8602
8605
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8603
8606
  slideIndexes: group.slideIndexes,
8604
8607
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8610,7 +8613,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
8610
8613
  return void 0;
8611
8614
  }
8612
8615
  const document2 = activeLayout ? { slideMasters: [{ ...activeMaster, layouts: [activeLayout] }] } : { slideMasters: [activeMaster] };
8613
- return chunkMH4VFSDL_js.masterViewPseudoSlide(document2, {
8616
+ return chunk5KAMDV37_js.masterViewPseudoSlide(document2, {
8614
8617
  tab: "slides",
8615
8618
  masterIndex: 0,
8616
8619
  layoutIndex: activeLayout ? 0 : null
@@ -8638,15 +8641,15 @@ function useDerivedSlideState(input) {
8638
8641
  [slides, activeCustomShowId, customShows, presentationProperties]
8639
8642
  );
8640
8643
  const authoredRange = react.useMemo(
8641
- () => chunkMH4VFSDL_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8644
+ () => chunk5KAMDV37_js.resolveAuthoredSlideRange(presentationProperties, slides.length),
8642
8645
  [presentationProperties, slides.length]
8643
8646
  );
8644
8647
  const slideSectionGroups = react.useMemo(
8645
8648
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8646
- if (group.id === chunkH4LMXJ2Z_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8649
+ if (group.id === chunkGLY4OPMY_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8647
8650
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8648
8651
  }
8649
- if (group.id === chunkH4LMXJ2Z_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8652
+ if (group.id === chunkGLY4OPMY_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
8650
8653
  return { ...group, label: t("pptx.sections.slides") };
8651
8654
  }
8652
8655
  return group;
@@ -8747,13 +8750,13 @@ function useAnnotationHandlers(input) {
8747
8750
  }, [annotations, setMode, setSlides, history]);
8748
8751
  const handleSetMode = react.useCallback(
8749
8752
  (nextMode) => {
8750
- if (mode === "present" && nextMode !== "present" && !chunkMH4VFSDL_js.mayLeaveSlideShow()) {
8753
+ if (mode === "present" && nextMode !== "present" && !chunk5KAMDV37_js.mayLeaveSlideShow()) {
8751
8754
  return;
8752
8755
  }
8753
8756
  if (nextMode === "present") {
8754
8757
  presentation.enterPresentMode();
8755
8758
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8756
- chunkMH4VFSDL_js.stopAllPersistentAudio();
8759
+ chunk5KAMDV37_js.stopAllPersistentAudio();
8757
8760
  if (promptKeepInkAnnotations) {
8758
8761
  pendingModeAfterAnnotationsRef.current = nextMode;
8759
8762
  setShowKeepAnnotationsDialog(true);
@@ -8763,7 +8766,7 @@ function useAnnotationHandlers(input) {
8763
8766
  }
8764
8767
  } else {
8765
8768
  if (mode === "present") {
8766
- chunkMH4VFSDL_js.stopAllPersistentAudio();
8769
+ chunk5KAMDV37_js.stopAllPersistentAudio();
8767
8770
  }
8768
8771
  setMode(nextMode);
8769
8772
  }
@@ -8832,13 +8835,13 @@ function useSerialize(input) {
8832
8835
  let processedSlide = slide;
8833
8836
  if (pendingEditId) {
8834
8837
  const updatedElements = slide.elements.map((el) => {
8835
- if (el.id !== pendingEditId || !chunkMH4VFSDL_js.hasTextProperties(el)) {
8838
+ if (el.id !== pendingEditId || !chunk5KAMDV37_js.hasTextProperties(el)) {
8836
8839
  return el;
8837
8840
  }
8838
8841
  return {
8839
8842
  ...el,
8840
8843
  text: pendingEditText,
8841
- textSegments: chunkMH4VFSDL_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8844
+ textSegments: chunk5KAMDV37_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8842
8845
  };
8843
8846
  });
8844
8847
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8851,19 +8854,19 @@ function useSerialize(input) {
8851
8854
  const pptxGuides = guides.map((g) => ({
8852
8855
  id: g.id,
8853
8856
  orientation: g.axis === "h" ? "horz" : "vert",
8854
- positionEmu: chunkMH4VFSDL_js.guidePxToEmu(g.position)
8857
+ positionEmu: chunk5KAMDV37_js.guidePxToEmu(g.position)
8855
8858
  }));
8856
8859
  return {
8857
8860
  ...processedSlide,
8858
8861
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8859
8862
  };
8860
8863
  });
8861
- const slidesToSave = chunkMH4VFSDL_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8862
- const saveOptions = chunkMH4VFSDL_js.buildDeckSaveOptions({
8864
+ const slidesToSave = chunk5KAMDV37_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8865
+ const saveOptions = chunk5KAMDV37_js.buildDeckSaveOptions({
8863
8866
  // Without this the Slide Size card edited a viewer-only pixel value and
8864
8867
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
8865
8868
  // slide-size edit reaches the file.
8866
- slideSize: chunkMH4VFSDL_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8869
+ slideSize: chunk5KAMDV37_js.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
8867
8870
  headerFooter,
8868
8871
  presentationProperties,
8869
8872
  viewProperties,
@@ -8882,7 +8885,7 @@ function useSerialize(input) {
8882
8885
  embedFonts,
8883
8886
  outputFormat: format
8884
8887
  });
8885
- return chunkMH4VFSDL_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8888
+ return chunk5KAMDV37_js.saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
8886
8889
  },
8887
8890
  [
8888
8891
  slides,
@@ -8923,7 +8926,7 @@ function useRecoveryDetection(input) {
8923
8926
  const onRestore = input.onRestore;
8924
8927
  const openVersionHistory = input.openVersionHistory;
8925
8928
  react.useEffect(() => {
8926
- if (!chunkMH4VFSDL_js.shouldProbeAutosaveRecovery({
8929
+ if (!chunk5KAMDV37_js.shouldProbeAutosaveRecovery({
8927
8930
  alreadyChecked: recoveryCheckedRef.current,
8928
8931
  filePath,
8929
8932
  loading,
@@ -8935,7 +8938,7 @@ function useRecoveryDetection(input) {
8935
8938
  }
8936
8939
  recoveryCheckedRef.current = true;
8937
8940
  void (async () => {
8938
- const offer = await chunkMH4VFSDL_js.probeAutosaveRecovery(filePath);
8941
+ const offer = await chunk5KAMDV37_js.probeAutosaveRecovery(filePath);
8939
8942
  if (!offer) {
8940
8943
  return;
8941
8944
  }
@@ -8948,7 +8951,7 @@ function useRecoveryDetection(input) {
8948
8951
  const record = recordRef.current;
8949
8952
  setPrompt(null);
8950
8953
  if (record && onRestore) {
8951
- onRestore(chunkMH4VFSDL_js.acceptAutosaveRecovery(record));
8954
+ onRestore(chunk5KAMDV37_js.acceptAutosaveRecovery(record));
8952
8955
  }
8953
8956
  recordRef.current = null;
8954
8957
  }, [onRestore]);
@@ -8957,7 +8960,7 @@ function useRecoveryDetection(input) {
8957
8960
  setPrompt(null);
8958
8961
  recordRef.current = null;
8959
8962
  if (record) {
8960
- void chunkMH4VFSDL_js.discardAutosaveRecovery(record);
8963
+ void chunk5KAMDV37_js.discardAutosaveRecovery(record);
8961
8964
  }
8962
8965
  }, []);
8963
8966
  return { prompt, restore, discard };
@@ -9008,11 +9011,11 @@ function usePresentationSetup(input) {
9008
9011
  containerRef,
9009
9012
  content,
9010
9013
  onSetMode: (nextMode) => {
9011
- if (mode === "present" && nextMode !== "present" && !chunkMH4VFSDL_js.mayLeaveSlideShow()) {
9014
+ if (mode === "present" && nextMode !== "present" && !chunk5KAMDV37_js.mayLeaveSlideShow()) {
9012
9015
  return;
9013
9016
  }
9014
9017
  if (mode === "present" && nextMode !== "present") {
9015
- chunkMH4VFSDL_js.stopAllPersistentAudio();
9018
+ chunk5KAMDV37_js.stopAllPersistentAudio();
9016
9019
  stopAnimationSound();
9017
9020
  const exitHandler = exitModeHandlerRef.current;
9018
9021
  if (exitHandler) {
@@ -9080,10 +9083,10 @@ function usePresentationSetup(input) {
9080
9083
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
9081
9084
  onToggleSubtitles,
9082
9085
  onSaveRehearsalTimings: (timings) => {
9083
- setSlides((prev) => chunkMH4VFSDL_js.applyRehearsalTimings(prev, timings));
9086
+ setSlides((prev) => chunk5KAMDV37_js.applyRehearsalTimings(prev, timings));
9084
9087
  history.markDirty();
9085
9088
  },
9086
- loopContinuously: chunkMH4VFSDL_js.shouldLoopContinuously(presentationProperties),
9089
+ loopContinuously: chunk5KAMDV37_js.shouldLoopContinuously(presentationProperties),
9087
9090
  showWithAnimation: presentationProperties.showWithAnimation,
9088
9091
  useTimings: presentationProperties.advanceMode !== "manual",
9089
9092
  endWithBlackSlide,
@@ -9290,7 +9293,7 @@ function useEditorOperations(input) {
9290
9293
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
9291
9294
  react.useEffect(() => {
9292
9295
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9293
- copiedFormatRef.current = chunkMH4VFSDL_js.copyFormatFromElement(selectedElement);
9296
+ copiedFormatRef.current = chunk5KAMDV37_js.copyFormatFromElement(selectedElement);
9294
9297
  } else if (!formatPainterActive) {
9295
9298
  copiedFormatRef.current = null;
9296
9299
  }
@@ -9316,12 +9319,12 @@ function useEditorOperations(input) {
9316
9319
  e.stopPropagation();
9317
9320
  const element = elementLookup.get(elementId);
9318
9321
  if (element) {
9319
- const updated = chunkMH4VFSDL_js.applyFormatToElement(element, copiedFormatRef.current);
9322
+ const updated = chunk5KAMDV37_js.applyFormatToElement(element, copiedFormatRef.current);
9320
9323
  const updates = {};
9321
- if (chunkMH4VFSDL_js.hasShapeProperties(updated)) {
9324
+ if (chunk5KAMDV37_js.hasShapeProperties(updated)) {
9322
9325
  updates.shapeStyle = updated.shapeStyle;
9323
9326
  }
9324
- if (chunkMH4VFSDL_js.hasTextProperties(updated)) {
9327
+ if (chunk5KAMDV37_js.hasTextProperties(updated)) {
9325
9328
  updates.textStyle = updated.textStyle;
9326
9329
  }
9327
9330
  ops.updateElementById(elementId, updates);
@@ -9507,10 +9510,10 @@ function useFontInjection({ embeddedFonts, slides }) {
9507
9510
  }
9508
9511
  };
9509
9512
  }, [embeddedFonts]);
9510
- const referencedFamilies = react.useMemo(() => chunkMH4VFSDL_js.collectReferencedFontFamilies(slides), [slides]);
9513
+ const referencedFamilies = react.useMemo(() => chunk5KAMDV37_js.collectReferencedFontFamilies(slides), [slides]);
9511
9514
  react.useEffect(() => {
9512
9515
  let cancelled = false;
9513
- void chunkMH4VFSDL_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9516
+ void chunk5KAMDV37_js.resolveGoogleWebfontHref(slides, embeddedFonts).then((href) => {
9514
9517
  if (cancelled) {
9515
9518
  return null;
9516
9519
  }
@@ -9535,15 +9538,15 @@ function useFontInjection({ embeddedFonts, slides }) {
9535
9538
  const [, setOutlineFontsTick] = react.useState(0);
9536
9539
  react.useEffect(() => {
9537
9540
  let cancelled = false;
9538
- const referenced = chunkMH4VFSDL_js.collectReferencedFontFamilies(slides);
9539
- const candidates = chunkMH4VFSDL_js.selectGoogleWebfontFamilies(
9541
+ const referenced = chunk5KAMDV37_js.collectReferencedFontFamilies(slides);
9542
+ const candidates = chunk5KAMDV37_js.selectGoogleWebfontFamilies(
9540
9543
  referenced,
9541
9544
  embeddedFonts.map((font) => font.name)
9542
9545
  );
9543
9546
  if (candidates.length === 0) {
9544
9547
  return;
9545
9548
  }
9546
- void chunkMH4VFSDL_js.resolveGoogleWebfontHref(slides, embeddedFonts).then(async (href) => {
9549
+ void chunk5KAMDV37_js.resolveGoogleWebfontHref(slides, embeddedFonts).then(async (href) => {
9547
9550
  if (cancelled || !href) {
9548
9551
  return;
9549
9552
  }
@@ -9557,7 +9560,7 @@ function useFontInjection({ embeddedFonts, slides }) {
9557
9560
  if (cancelled) {
9558
9561
  return;
9559
9562
  }
9560
- const bytes = await chunkMH4VFSDL_js.fetchGoogleWebfontOutlineBytes(
9563
+ const bytes = await chunk5KAMDV37_js.fetchGoogleWebfontOutlineBytes(
9561
9564
  href,
9562
9565
  family,
9563
9566
  variant.bold,
@@ -9746,7 +9749,7 @@ function useKeyboardShortcuts(input) {
9746
9749
  inputRef.current = input;
9747
9750
  const handleKeyDown = react.useCallback((e) => {
9748
9751
  const current = inputRef.current;
9749
- const startAction = chunkMH4VFSDL_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9752
+ const startAction = chunk5KAMDV37_js.mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
9750
9753
  if (startAction !== null) {
9751
9754
  e.preventDefault();
9752
9755
  if (startAction === "fromBeginning") {
@@ -9756,7 +9759,7 @@ function useKeyboardShortcuts(input) {
9756
9759
  }
9757
9760
  return;
9758
9761
  }
9759
- const { action, dx, dy } = chunkMH4VFSDL_js.mapEditorKey(e, {
9762
+ const { action, dx, dy } = chunk5KAMDV37_js.mapEditorKey(e, {
9760
9763
  canEdit: current.canEdit,
9761
9764
  // The Slide Master view is an editing surface, not a viewing one.
9762
9765
  // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
@@ -9769,7 +9772,7 @@ function useKeyboardShortcuts(input) {
9769
9772
  hasSelection: current.hasSelection,
9770
9773
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9771
9774
  isDrawing: current.activeTool !== "select",
9772
- isTextInputTarget: chunkMH4VFSDL_js.isEditorTextInputTarget(e.target)
9775
+ isTextInputTarget: chunk5KAMDV37_js.isEditorTextInputTarget(e.target)
9773
9776
  });
9774
9777
  if (action === null) {
9775
9778
  return;
@@ -10101,7 +10104,7 @@ function useViewerIntegration(input) {
10101
10104
  return zoom.scale;
10102
10105
  },
10103
10106
  setZoom(level) {
10104
- zoom.setScale(chunkMH4VFSDL_js.clampZoomScale(level));
10107
+ zoom.setScale(chunk5KAMDV37_js.clampZoomScale(level));
10105
10108
  },
10106
10109
  zoomIn() {
10107
10110
  zoom.handleZoomIn();
@@ -10155,8 +10158,12 @@ function useViewerIntegration(input) {
10155
10158
  return slides[activeSlideIndex];
10156
10159
  },
10157
10160
  // -- Slide manipulation --
10158
- addSlide(_afterIndex) {
10159
- editorOps.slideOps.handleAddSlide();
10161
+ addSlide(afterIndex) {
10162
+ if (afterIndex === void 0) {
10163
+ editorOps.slideOps.handleAddSlide();
10164
+ } else {
10165
+ editorOps.slideOps.handleAddSlideAfter(afterIndex);
10166
+ }
10160
10167
  },
10161
10168
  deleteSlides(indexes) {
10162
10169
  editorOps.slideOps.handleDeleteSlides(indexes);
@@ -10319,7 +10326,7 @@ function useReducedMotion() {
10319
10326
  }
10320
10327
  function useViewerOptions() {
10321
10328
  const storeRef = react.useRef(null);
10322
- storeRef.current ??= chunkMH4VFSDL_js.createViewerOptionsStore();
10329
+ storeRef.current ??= chunk5KAMDV37_js.createViewerOptionsStore();
10323
10330
  const store = storeRef.current;
10324
10331
  const options = react.useSyncExternalStore(
10325
10332
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -10328,9 +10335,9 @@ function useViewerOptions() {
10328
10335
  );
10329
10336
  return { optionsStore: store, options };
10330
10337
  }
10331
- var KNOWN_TAB_IDS = new Set(chunkMH4VFSDL_js.TOOLBAR_TABS.map((tab) => tab.id));
10338
+ var KNOWN_TAB_IDS = new Set(chunk5KAMDV37_js.TOOLBAR_TABS.map((tab) => tab.id));
10332
10339
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
10333
- const isHidden = (id) => chunkMH4VFSDL_js.isActionHidden(id, hiddenActions);
10340
+ const isHidden = (id) => chunk5KAMDV37_js.isActionHidden(id, hiddenActions);
10334
10341
  const userHidden = new Set(hiddenTabIds);
10335
10342
  userHidden.delete("file");
10336
10343
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id) && !userHidden.has(id);
@@ -10423,12 +10430,12 @@ function useYjsDocumentSync({
10423
10430
  return;
10424
10431
  }
10425
10432
  try {
10426
- const handler = new chunkMH4VFSDL_js.PptxHandler();
10433
+ const handler = new chunk5KAMDV37_js.PptxHandler();
10427
10434
  await handler.load(sourceBytes.buffer);
10428
- const currentSlides = chunkMH4VFSDL_js.readSlidesFromYDoc(
10435
+ const currentSlides = chunk5KAMDV37_js.readSlidesFromYDoc(
10429
10436
  doc
10430
10437
  );
10431
- const slidesToSave = chunkMH4VFSDL_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10438
+ const slidesToSave = chunk5KAMDV37_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
10432
10439
  const bytes = await handler.save(slidesToSave, getSaveOptions?.());
10433
10440
  config.onWriteBack(bytes);
10434
10441
  } catch {
@@ -10443,10 +10450,10 @@ function useYjsDocumentSync({
10443
10450
  if (!doc || !isConnected) {
10444
10451
  return;
10445
10452
  }
10446
- const docSlides = chunkMH4VFSDL_js.readSlidesFromYDoc(
10453
+ const docSlides = chunk5KAMDV37_js.readSlidesFromYDoc(
10447
10454
  doc
10448
10455
  );
10449
- if (!chunkMH4VFSDL_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10456
+ if (!chunk5KAMDV37_js.shouldRoomSlidesReplaceLoad(loadOrigin, docSlides.length)) {
10450
10457
  return;
10451
10458
  }
10452
10459
  lastSyncedRef.current = JSON.stringify(docSlides);
@@ -10465,11 +10472,11 @@ function useYjsDocumentSync({
10465
10472
  lastSyncedRef.current = serialized;
10466
10473
  void (async () => {
10467
10474
  const factories = await getFactories();
10468
- chunkMH4VFSDL_js.reconcileSlidesInYDoc(
10475
+ chunk5KAMDV37_js.reconcileSlidesInYDoc(
10469
10476
  slides,
10470
10477
  doc,
10471
10478
  factories,
10472
- chunkMH4VFSDL_js.LOCAL_SYNC_ORIGIN
10479
+ chunk5KAMDV37_js.LOCAL_SYNC_ORIGIN
10473
10480
  );
10474
10481
  scheduleWriteBack();
10475
10482
  })();
@@ -10483,10 +10490,10 @@ function useYjsDocumentSync({
10483
10490
  return;
10484
10491
  }
10485
10492
  const handleChange = (_events, transaction) => {
10486
- if (transaction?.origin === chunkMH4VFSDL_js.LOCAL_SYNC_ORIGIN) {
10493
+ if (transaction?.origin === chunk5KAMDV37_js.LOCAL_SYNC_ORIGIN) {
10487
10494
  return;
10488
10495
  }
10489
- const remoteSlides = chunkMH4VFSDL_js.readSlidesFromYDoc(
10496
+ const remoteSlides = chunk5KAMDV37_js.readSlidesFromYDoc(
10490
10497
  doc
10491
10498
  );
10492
10499
  if (remoteSlides.length === 0) {
@@ -10502,7 +10509,7 @@ function useYjsDocumentSync({
10502
10509
  isApplyingRemoteRef.current = false;
10503
10510
  scheduleWriteBack();
10504
10511
  };
10505
- const unobserve = chunkMH4VFSDL_js.observeYDocSlides(
10512
+ const unobserve = chunk5KAMDV37_js.observeYDocSlides(
10506
10513
  doc,
10507
10514
  handleChange
10508
10515
  );
@@ -10540,7 +10547,7 @@ function useBroadcastFollower({
10540
10547
  if (!broadcaster) {
10541
10548
  return;
10542
10549
  }
10543
- if (!chunkMH4VFSDL_js.shouldAutoFollowBroadcaster({
10550
+ if (!chunk5KAMDV37_js.shouldAutoFollowBroadcaster({
10544
10551
  localRole: collab.config.role,
10545
10552
  broadcasterRole: broadcaster.role
10546
10553
  })) {
@@ -10698,7 +10705,7 @@ function useLayoutSwitching(input) {
10698
10705
  currentLayoutPath
10699
10706
  };
10700
10707
  }
10701
- var MIN_TOUCH_TARGET = chunkMH4VFSDL_js.MIN_TOUCH_TARGET_PX;
10708
+ var MIN_TOUCH_TARGET = chunk5KAMDV37_js.MIN_TOUCH_TARGET_PX;
10702
10709
  function subscribeTouchCapability(callback) {
10703
10710
  if (typeof window === "undefined") {
10704
10711
  return () => {
@@ -10711,7 +10718,7 @@ function subscribeTouchCapability(callback) {
10711
10718
  function useIsMobile() {
10712
10719
  const isTouchDevice = react.useSyncExternalStore(
10713
10720
  subscribeTouchCapability,
10714
- chunkMH4VFSDL_js.detectTouchDevice,
10721
+ chunk5KAMDV37_js.detectTouchDevice,
10715
10722
  () => false
10716
10723
  // server snapshot
10717
10724
  );
@@ -10721,7 +10728,7 @@ function useIsMobile() {
10721
10728
  const [viewportHeight, setViewportHeight] = react.useState(
10722
10729
  () => typeof window === "undefined" ? 768 : window.innerHeight
10723
10730
  );
10724
- const [orientation, setOrientation] = react.useState(chunkMH4VFSDL_js.detectOrientation);
10731
+ const [orientation, setOrientation] = react.useState(chunk5KAMDV37_js.detectOrientation);
10725
10732
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
10726
10733
  const [initialViewportHeight] = react.useState(
10727
10734
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -10742,7 +10749,7 @@ function useIsMobile() {
10742
10749
  return;
10743
10750
  }
10744
10751
  const handleOrientationChange = () => {
10745
- setOrientation(chunkMH4VFSDL_js.detectOrientation());
10752
+ setOrientation(chunk5KAMDV37_js.detectOrientation());
10746
10753
  };
10747
10754
  if (screen.orientation) {
10748
10755
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -10772,7 +10779,7 @@ function useIsMobile() {
10772
10779
  window.addEventListener("resize", handleResize);
10773
10780
  return () => window.removeEventListener("resize", handleResize);
10774
10781
  }, [isTouchDevice, initialViewportHeight]);
10775
- const { isMobile, isTablet, isDesktop } = chunkMH4VFSDL_js.deriveViewportBreakpoints(
10782
+ const { isMobile, isTablet, isDesktop } = chunk5KAMDV37_js.deriveViewportBreakpoints(
10776
10783
  viewportWidth,
10777
10784
  viewportHeight,
10778
10785
  isTouchDevice
@@ -10805,10 +10812,10 @@ function useTouchGestures(input) {
10805
10812
  if (!el || !enabled) {
10806
10813
  return;
10807
10814
  }
10808
- const recognizer = chunkMH4VFSDL_js.createTouchGestureRecognizer({
10815
+ const recognizer = chunk5KAMDV37_js.createTouchGestureRecognizer({
10809
10816
  getScale: () => scaleRef.current,
10810
- minScale: chunkMH4VFSDL_js.MIN_ZOOM_SCALE,
10811
- maxScale: chunkMH4VFSDL_js.MAX_ZOOM_SCALE,
10817
+ minScale: chunk5KAMDV37_js.MIN_ZOOM_SCALE,
10818
+ maxScale: chunk5KAMDV37_js.MAX_ZOOM_SCALE,
10812
10819
  callbacks: {
10813
10820
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10814
10821
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10848,7 +10855,7 @@ function scrollFocusedIntoView(keyboardInset) {
10848
10855
  return;
10849
10856
  }
10850
10857
  const rect = active.getBoundingClientRect();
10851
- const delta = chunkMH4VFSDL_js.computeScrollDelta(
10858
+ const delta = chunk5KAMDV37_js.computeScrollDelta(
10852
10859
  { top: rect.top, bottom: rect.bottom },
10853
10860
  window.innerHeight,
10854
10861
  keyboardInset
@@ -10868,8 +10875,8 @@ function useKeyboardInsets(enabled = true) {
10868
10875
  return;
10869
10876
  }
10870
10877
  const update = () => {
10871
- const metrics = chunkMH4VFSDL_js.readViewportMetrics(window);
10872
- const inset = metrics ? chunkMH4VFSDL_js.computeKeyboardInset(metrics) : 0;
10878
+ const metrics = chunk5KAMDV37_js.readViewportMetrics(window);
10879
+ const inset = metrics ? chunk5KAMDV37_js.computeKeyboardInset(metrics) : 0;
10873
10880
  setKeyboardInset(inset);
10874
10881
  if (inset > 0) {
10875
10882
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10880,8 +10887,8 @@ function useKeyboardInsets(enabled = true) {
10880
10887
  vv.addEventListener("scroll", update);
10881
10888
  const onFocusIn = () => {
10882
10889
  window.requestAnimationFrame(() => {
10883
- const metrics = chunkMH4VFSDL_js.readViewportMetrics(window);
10884
- const inset = metrics ? chunkMH4VFSDL_js.computeKeyboardInset(metrics) : 0;
10890
+ const metrics = chunk5KAMDV37_js.readViewportMetrics(window);
10891
+ const inset = metrics ? chunk5KAMDV37_js.computeKeyboardInset(metrics) : 0;
10885
10892
  if (inset > 0) {
10886
10893
  scrollFocusedIntoView(inset);
10887
10894
  }
@@ -10894,7 +10901,7 @@ function useKeyboardInsets(enabled = true) {
10894
10901
  document.removeEventListener("focusin", onFocusIn);
10895
10902
  };
10896
10903
  }, [enabled]);
10897
- return { keyboardInset, isKeyboardOpen: chunkMH4VFSDL_js.isKeyboardOpen(keyboardInset) };
10904
+ return { keyboardInset, isKeyboardOpen: chunk5KAMDV37_js.isKeyboardOpen(keyboardInset) };
10898
10905
  }
10899
10906
 
10900
10907
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10923,21 +10930,21 @@ function buildCanvasProps(input) {
10923
10930
  } = input;
10924
10931
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10925
10932
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10926
- const fieldContext = chunkMH4VFSDL_js.buildFieldSubstitutionContext({
10933
+ const fieldContext = chunk5KAMDV37_js.buildFieldSubstitutionContext({
10927
10934
  headerFooter: s.headerFooter,
10928
10935
  customProperties: s.customProperties,
10929
10936
  slide: activeSlide
10930
10937
  });
10931
10938
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
10932
10939
  const openExternalUrl = (url, target) => {
10933
- if (chunkMH4VFSDL_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10940
+ if (chunk5KAMDV37_js.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
10934
10941
  return;
10935
10942
  }
10936
- chunkMH4VFSDL_js.safeOpenUrl(url, target);
10943
+ chunk5KAMDV37_js.safeOpenUrl(url, target);
10937
10944
  };
10938
10945
  const handleActionClick = (elementId, action) => {
10939
10946
  if (mode === "present") {
10940
- const resolved = chunkMH4VFSDL_js.resolvePresentationAction(action, { slideCount: slides.length });
10947
+ const resolved = chunk5KAMDV37_js.resolvePresentationAction(action, { slideCount: slides.length });
10941
10948
  if (resolved.intent.kind === "openUrl") {
10942
10949
  openExternalUrl(resolved.intent.url);
10943
10950
  return;
@@ -10948,9 +10955,9 @@ function buildCanvasProps(input) {
10948
10955
  }
10949
10956
  };
10950
10957
  const handleHyperlinkClick = (url, target) => {
10951
- if (chunkMH4VFSDL_js.isPpactionUrl(url)) {
10958
+ if (chunk5KAMDV37_js.isPpactionUrl(url)) {
10952
10959
  if (mode === "present") {
10953
- const parsed = chunkMH4VFSDL_js.parsePpactionUrl(url);
10960
+ const parsed = chunk5KAMDV37_js.parsePpactionUrl(url);
10954
10961
  if (parsed) {
10955
10962
  presentation.handlePresentationAction({
10956
10963
  action: parsed.action,
@@ -11056,7 +11063,7 @@ function buildCanvasProps(input) {
11056
11063
 
11057
11064
  // src/viewer/hooks/useScopedLayoutOptions.ts
11058
11065
  function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
11059
- return chunkMH4VFSDL_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
11066
+ return chunk5KAMDV37_js.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
11060
11067
  }
11061
11068
 
11062
11069
  // src/viewer/hooks/useViewerBuildingBlocks-toolbar-handlers.ts
@@ -11069,7 +11076,7 @@ function buildToolbarAnimationHandlers(input) {
11069
11076
  const current = activeSlide.animations ?? [];
11070
11077
  if (group === "motionPath") {
11071
11078
  propertyHandlers.handleUpdateSlide({
11072
- animations: chunkMH4VFSDL_js.applyMotionPathPreset(current, selectedElement.id, preset)
11079
+ animations: chunk5KAMDV37_js.applyMotionPathPreset(current, selectedElement.id, preset)
11073
11080
  });
11074
11081
  return;
11075
11082
  }
@@ -11265,7 +11272,7 @@ function buildToolbarProps(input) {
11265
11272
  onOpenFile,
11266
11273
  onOpenRecentFile,
11267
11274
  onCreatePresentation: (templateId) => {
11268
- s.setSlides(chunkMH4VFSDL_js.createBackstagePresentation(templateId));
11275
+ s.setSlides(chunk5KAMDV37_js.createBackstagePresentation(templateId));
11269
11276
  s.setActiveSlideIndex(0);
11270
11277
  s.setSelectedElementId(null);
11271
11278
  s.setSelectedElementIds([]);
@@ -11295,7 +11302,7 @@ function buildToolbarProps(input) {
11295
11302
  loadLayoutPreviews: input.loadLayoutPreviews,
11296
11303
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
11297
11304
  onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
11298
- templateScheme: chunkMH4VFSDL_js.templateSchemeFromTheme(s.theme?.colorScheme),
11305
+ templateScheme: chunk5KAMDV37_js.templateSchemeFromTheme(s.theme?.colorScheme),
11299
11306
  customShows: s.customShows,
11300
11307
  activeCustomShowId: s.activeCustomShowId,
11301
11308
  onSetActiveCustomShowId: s.setActiveCustomShowId,
@@ -11336,7 +11343,7 @@ function buildToolbarProps(input) {
11336
11343
  isCommentsPanelOpen: s.isInspectorPaneOpen,
11337
11344
  slideCommentCount: activeSlide?.comments?.length ?? 0,
11338
11345
  formatPainterActive: s.formatPainterActive,
11339
- canActivateFormatPainter: chunkMH4VFSDL_js.hasCopyableFormat(selectedElement),
11346
+ canActivateFormatPainter: chunk5KAMDV37_js.hasCopyableFormat(selectedElement),
11340
11347
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
11341
11348
  isSelectionPaneOpen: s.isSelectionPaneOpen,
11342
11349
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -11414,7 +11421,7 @@ function useViewerBuildingBlocksCore(input) {
11414
11421
  headerFooter: state.headerFooter,
11415
11422
  loading,
11416
11423
  error,
11417
- maxHistoryEntries: chunkMH4VFSDL_js.resolveHistoryDepth(viewerOptions),
11424
+ maxHistoryEntries: chunk5KAMDV37_js.resolveHistoryDepth(viewerOptions),
11418
11425
  hasActivePointerInteraction,
11419
11426
  pointerCommitNonce: state.pointerCommitNonce,
11420
11427
  onDirty: markDocumentDirty,
@@ -11439,7 +11446,7 @@ function useViewerBuildingBlocksCore(input) {
11439
11446
  documentGridSpacing: state.viewProperties?.gridSpacing
11440
11447
  });
11441
11448
  const themeColorMap = react.useMemo(
11442
- () => state.theme?.colorScheme ? chunkMH4VFSDL_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11449
+ () => state.theme?.colorScheme ? chunk5KAMDV37_js.buildThemeColorMap(state.theme.colorScheme) : void 0,
11443
11450
  [state.theme?.colorScheme]
11444
11451
  );
11445
11452
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -11488,8 +11495,8 @@ function useViewerBuildingBlocksCore(input) {
11488
11495
  gridSpacingPx,
11489
11496
  // Multiplied against the pre-existing 2x baseline; see the matching
11490
11497
  // comment in `PowerPointViewer.tsx`.
11491
- imageExportScale: 2 * chunkMH4VFSDL_js.resolveImageResolutionScale(viewerOptions),
11492
- imageResolutionScale: chunkMH4VFSDL_js.resolveImageResolutionScale(viewerOptions),
11498
+ imageExportScale: 2 * chunk5KAMDV37_js.resolveImageResolutionScale(viewerOptions),
11499
+ imageResolutionScale: chunk5KAMDV37_js.resolveImageResolutionScale(viewerOptions),
11493
11500
  viewerOptions
11494
11501
  };
11495
11502
  }
@@ -11505,7 +11512,7 @@ function useCompatibilityToastsState() {
11505
11512
  }
11506
11513
  function useReadOnlyRecommendationState(content) {
11507
11514
  const [recommendation, setRecommendation] = react.useState(
11508
- () => chunkMH4VFSDL_js.readOnlyRecommendation(void 0)
11515
+ () => chunk5KAMDV37_js.readOnlyRecommendation(void 0)
11509
11516
  );
11510
11517
  const [modifyVerifier, setModifyVerifier] = react.useState(void 0);
11511
11518
  const [bannerHidden, setBannerHidden] = react.useState(false);
@@ -11545,7 +11552,7 @@ function useReadOnlyRecommendationState(content) {
11545
11552
  async (password) => {
11546
11553
  setCheckingPassword(true);
11547
11554
  try {
11548
- const result = await chunkMH4VFSDL_js.checkModifyPassword(modifyVerifier, password);
11555
+ const result = await chunk5KAMDV37_js.checkModifyPassword(modifyVerifier, password);
11549
11556
  if (result.ok) {
11550
11557
  unlock();
11551
11558
  } else {
@@ -11590,9 +11597,9 @@ function useViewPreferencesSync(input) {
11590
11597
  setShowGuides
11591
11598
  } = input;
11592
11599
  react.useEffect(() => {
11593
- const seeded = chunkMH4VFSDL_js.viewerPreferencesFromViewProperties(
11600
+ const seeded = chunk5KAMDV37_js.viewerPreferencesFromViewProperties(
11594
11601
  { viewProperties },
11595
- { ...chunkMH4VFSDL_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11602
+ { ...chunk5KAMDV37_js.DEFAULT_VIEWER_PREFERENCES, snapToGrid, snapToObjects: snapToShape, showGuides }
11596
11603
  );
11597
11604
  setSnapToGrid(seeded.snapToGrid);
11598
11605
  setSnapToShape(seeded.snapToObjects ?? snapToShape);
@@ -11602,7 +11609,7 @@ function useViewPreferencesSync(input) {
11602
11609
  (prefsOverride) => {
11603
11610
  setViewProperties((prev) => {
11604
11611
  const merged = {
11605
- ...chunkMH4VFSDL_js.DEFAULT_VIEWER_PREFERENCES,
11612
+ ...chunk5KAMDV37_js.DEFAULT_VIEWER_PREFERENCES,
11606
11613
  snapToGrid,
11607
11614
  snapToObjects: snapToShape,
11608
11615
  showGuides,
@@ -11610,7 +11617,7 @@ function useViewPreferencesSync(input) {
11610
11617
  gridSpacingCy: prev?.gridSpacing?.cy,
11611
11618
  ...prefsOverride
11612
11619
  };
11613
- const patch = chunkMH4VFSDL_js.viewPropertiesPatchFromPreferences(merged);
11620
+ const patch = chunk5KAMDV37_js.viewPropertiesPatchFromPreferences(merged);
11614
11621
  return {
11615
11622
  ...prev,
11616
11623
  slideViewPr: { ...prev?.slideViewPr, ...patch.slideViewPr },
@@ -11831,7 +11838,7 @@ function useViewerBuildingBlocks(input) {
11831
11838
  }, [incomingContent]);
11832
11839
  const onOpenFile = react.useCallback(() => {
11833
11840
  void (async () => {
11834
- const picked = await chunkMH4VFSDL_js.openPptxFile();
11841
+ const picked = await chunk5KAMDV37_js.openPptxFile();
11835
11842
  if (picked) {
11836
11843
  setContent(picked.buffer);
11837
11844
  }
@@ -11839,7 +11846,7 @@ function useViewerBuildingBlocks(input) {
11839
11846
  }, []);
11840
11847
  const onOpenRecentFile = react.useCallback((key) => {
11841
11848
  void (async () => {
11842
- const bytes = await chunkMH4VFSDL_js.readBackstageRecentFile(key);
11849
+ const bytes = await chunk5KAMDV37_js.readBackstageRecentFile(key);
11843
11850
  if (bytes) {
11844
11851
  setContent(bytes);
11845
11852
  }