pptx-react-viewer 2.2.1 → 2.4.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 (152) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-O4NYWO3D.js → AiChatPanel-HLLGXBZF.js} +23 -24
  3. package/dist/AiChatPanel-HLLGXBZF.js.br +0 -0
  4. package/dist/AiChatPanel-HLLGXBZF.js.gz +0 -0
  5. package/dist/{AiChatPanel-XRKEPXAM.mjs → AiChatPanel-SXYMXFYS.mjs} +4 -5
  6. package/dist/AiChatPanel-SXYMXFYS.mjs.br +0 -0
  7. package/dist/AiChatPanel-SXYMXFYS.mjs.gz +0 -0
  8. package/dist/{Model3DScene-JN5F5C4Z.mjs → Model3DScene-IECT4RWT.mjs} +1 -2
  9. package/dist/Model3DScene-IECT4RWT.mjs.br +0 -0
  10. package/dist/Model3DScene-IECT4RWT.mjs.gz +0 -0
  11. package/dist/{Model3DScene-HYE6HA2C.js → Model3DScene-ZQBWLAMC.js} +2 -3
  12. package/dist/Model3DScene-ZQBWLAMC.js.br +0 -0
  13. package/dist/Model3DScene-ZQBWLAMC.js.gz +0 -0
  14. package/dist/{PowerPointViewer-gmU5rc7K.d.ts → PowerPointViewer-Cjn1RgSz.d.ts} +2 -2
  15. package/dist/{PowerPointViewer-gmU5rc7K.d.ts.map → PowerPointViewer-Cjn1RgSz.d.ts.map} +1 -1
  16. package/dist/{SurfaceChart3DScene-FDJ6LC4E.js → SurfaceChart3DScene-4KRMRWW6.js} +2 -3
  17. package/dist/SurfaceChart3DScene-4KRMRWW6.js.br +0 -0
  18. package/dist/SurfaceChart3DScene-4KRMRWW6.js.gz +0 -0
  19. package/dist/{SurfaceChart3DScene-V7P3LQVV.mjs → SurfaceChart3DScene-52C3IMPQ.mjs} +1 -2
  20. package/dist/SurfaceChart3DScene-52C3IMPQ.mjs.br +0 -0
  21. package/dist/SurfaceChart3DScene-52C3IMPQ.mjs.gz +0 -0
  22. package/dist/audience-content-store-BMlth_3U.d.ts +386 -0
  23. package/dist/audience-content-store-BMlth_3U.d.ts.map +1 -0
  24. package/dist/{chunk-YIFO3WQO.js → chunk-25VSL2BB.js} +1 -0
  25. package/dist/chunk-25VSL2BB.js.br +0 -0
  26. package/dist/chunk-25VSL2BB.js.gz +0 -0
  27. package/dist/{chunk-XJTWUXXC.js → chunk-5GHLRHBR.js} +3 -3
  28. package/dist/chunk-5GHLRHBR.js.br +0 -0
  29. package/dist/chunk-5GHLRHBR.js.gz +0 -0
  30. package/dist/{chunk-2U243ZEP.js → chunk-5TPQJWEO.js} +267 -252
  31. package/dist/chunk-5TPQJWEO.js.br +0 -0
  32. package/dist/chunk-5TPQJWEO.js.gz +0 -0
  33. package/dist/{chunk-O75FHZQJ.mjs → chunk-G6Q3NXRV.mjs} +23 -8
  34. package/dist/chunk-G6Q3NXRV.mjs.br +0 -0
  35. package/dist/chunk-G6Q3NXRV.mjs.gz +0 -0
  36. package/dist/{chunk-RYHBWTPI.mjs → chunk-KK7FWBGO.mjs} +89 -69
  37. package/dist/chunk-KK7FWBGO.mjs.br +0 -0
  38. package/dist/chunk-KK7FWBGO.mjs.gz +0 -0
  39. package/dist/{chunk-7NSLKNCT.mjs → chunk-LRIXPSVT.mjs} +4 -6
  40. package/dist/chunk-LRIXPSVT.mjs.br +0 -0
  41. package/dist/chunk-LRIXPSVT.mjs.gz +0 -0
  42. package/dist/{chunk-I2HF7ZPO.mjs → chunk-Q6FC2552.mjs} +1 -1
  43. package/dist/chunk-Q6FC2552.mjs.br +0 -0
  44. package/dist/chunk-Q6FC2552.mjs.gz +0 -0
  45. package/dist/{chunk-R2H3FHK6.js → chunk-QBZA2GMB.mjs} +47788 -32364
  46. package/dist/chunk-QBZA2GMB.mjs.br +0 -0
  47. package/dist/chunk-QBZA2GMB.mjs.gz +0 -0
  48. package/dist/{chunk-K2AW5UXT.js → chunk-VEZO33T2.js} +314 -316
  49. package/dist/chunk-VEZO33T2.js.br +0 -0
  50. package/dist/chunk-VEZO33T2.js.gz +0 -0
  51. package/dist/{chunk-PE2I5L6R.mjs → chunk-WK56SFN7.js} +48287 -31794
  52. package/dist/chunk-WK56SFN7.js.br +0 -0
  53. package/dist/chunk-WK56SFN7.js.gz +0 -0
  54. package/dist/{chunk-QULJW7LU.js → chunk-XSBFV6TL.js} +929 -909
  55. package/dist/chunk-XSBFV6TL.js.br +0 -0
  56. package/dist/chunk-XSBFV6TL.js.gz +0 -0
  57. package/dist/{chunk-PZTPX3HK.mjs → chunk-Z6HIZWIQ.mjs} +1 -0
  58. package/dist/chunk-Z6HIZWIQ.mjs.br +0 -0
  59. package/dist/chunk-Z6HIZWIQ.mjs.gz +0 -0
  60. package/dist/i18n.js +4 -4
  61. package/dist/i18n.js.br +0 -0
  62. package/dist/i18n.js.gz +0 -0
  63. package/dist/i18n.mjs +1 -1
  64. package/dist/i18n.mjs.br +0 -0
  65. package/dist/i18n.mjs.gz +0 -0
  66. package/dist/index.d.ts +92 -87
  67. package/dist/index.js +39 -40
  68. package/dist/index.js.br +0 -0
  69. package/dist/index.js.gz +0 -0
  70. package/dist/index.mjs +6 -7
  71. package/dist/index.mjs.br +0 -0
  72. package/dist/index.mjs.gz +0 -0
  73. package/dist/internals.d.ts +519 -514
  74. package/dist/internals.d.ts.map +1 -1
  75. package/dist/internals.js +79 -81
  76. package/dist/internals.js.br +0 -0
  77. package/dist/internals.js.gz +0 -0
  78. package/dist/internals.mjs +4 -6
  79. package/dist/internals.mjs.br +0 -0
  80. package/dist/internals.mjs.gz +0 -0
  81. package/dist/pptx-viewer.css +1 -1
  82. package/dist/pptx-viewer.css.br +0 -0
  83. package/dist/pptx-viewer.css.gz +0 -0
  84. package/dist/{animation-timeline-eb5z0SHW.d.ts → types-DciBT90G.d.ts} +4 -3
  85. package/dist/types-DciBT90G.d.ts.map +1 -0
  86. package/dist/{useViewerBuildingBlocks-CjureTRf.d.ts → useViewerBuildingBlocks-DMDZRawe.d.ts} +4 -4
  87. package/dist/{useViewerBuildingBlocks-CjureTRf.d.ts.map → useViewerBuildingBlocks-DMDZRawe.d.ts.map} +1 -1
  88. package/dist/viewer/index.d.ts +92 -88
  89. package/dist/viewer/index.js +22 -24
  90. package/dist/viewer/index.js.br +0 -0
  91. package/dist/viewer/index.js.gz +0 -0
  92. package/dist/viewer/index.mjs +6 -8
  93. package/dist/viewer/index.mjs.br +0 -0
  94. package/dist/viewer/index.mjs.gz +0 -0
  95. package/package.json +4 -4
  96. package/dist/AiChatPanel-O4NYWO3D.js.br +0 -0
  97. package/dist/AiChatPanel-O4NYWO3D.js.gz +0 -0
  98. package/dist/AiChatPanel-XRKEPXAM.mjs.br +0 -0
  99. package/dist/AiChatPanel-XRKEPXAM.mjs.gz +0 -0
  100. package/dist/Model3DScene-HYE6HA2C.js.br +0 -0
  101. package/dist/Model3DScene-HYE6HA2C.js.gz +0 -0
  102. package/dist/Model3DScene-JN5F5C4Z.mjs.br +0 -0
  103. package/dist/Model3DScene-JN5F5C4Z.mjs.gz +0 -0
  104. package/dist/SurfaceChart3DScene-FDJ6LC4E.js.br +0 -0
  105. package/dist/SurfaceChart3DScene-FDJ6LC4E.js.gz +0 -0
  106. package/dist/SurfaceChart3DScene-V7P3LQVV.mjs.br +0 -0
  107. package/dist/SurfaceChart3DScene-V7P3LQVV.mjs.gz +0 -0
  108. package/dist/animation-timeline-eb5z0SHW.d.ts.map +0 -1
  109. package/dist/chunk-2QHCOESN.js +0 -28037
  110. package/dist/chunk-2QHCOESN.js.br +0 -0
  111. package/dist/chunk-2QHCOESN.js.gz +0 -0
  112. package/dist/chunk-2U243ZEP.js.br +0 -0
  113. package/dist/chunk-2U243ZEP.js.gz +0 -0
  114. package/dist/chunk-6G6S7PEI.mjs +0 -27604
  115. package/dist/chunk-6G6S7PEI.mjs.br +0 -0
  116. package/dist/chunk-6G6S7PEI.mjs.gz +0 -0
  117. package/dist/chunk-7NSLKNCT.mjs.br +0 -0
  118. package/dist/chunk-7NSLKNCT.mjs.gz +0 -0
  119. package/dist/chunk-I2HF7ZPO.mjs.br +0 -0
  120. package/dist/chunk-I2HF7ZPO.mjs.gz +0 -0
  121. package/dist/chunk-IKBO6CZC.js +0 -2
  122. package/dist/chunk-IKBO6CZC.js.br +0 -3
  123. package/dist/chunk-IKBO6CZC.js.gz +0 -0
  124. package/dist/chunk-K2AW5UXT.js.br +0 -0
  125. package/dist/chunk-K2AW5UXT.js.gz +0 -0
  126. package/dist/chunk-O75FHZQJ.mjs.br +0 -0
  127. package/dist/chunk-O75FHZQJ.mjs.gz +0 -0
  128. package/dist/chunk-PE2I5L6R.mjs.br +0 -0
  129. package/dist/chunk-PE2I5L6R.mjs.gz +0 -0
  130. package/dist/chunk-PZTPX3HK.mjs.br +0 -0
  131. package/dist/chunk-PZTPX3HK.mjs.gz +0 -0
  132. package/dist/chunk-QULJW7LU.js.br +0 -0
  133. package/dist/chunk-QULJW7LU.js.gz +0 -0
  134. package/dist/chunk-R2H3FHK6.js.br +0 -0
  135. package/dist/chunk-R2H3FHK6.js.gz +0 -0
  136. package/dist/chunk-RYHBWTPI.mjs.br +0 -0
  137. package/dist/chunk-RYHBWTPI.mjs.gz +0 -0
  138. package/dist/chunk-T5U6P2JH.mjs +0 -1
  139. package/dist/chunk-T5U6P2JH.mjs.br +0 -0
  140. package/dist/chunk-T5U6P2JH.mjs.gz +0 -0
  141. package/dist/chunk-XJTWUXXC.js.br +0 -0
  142. package/dist/chunk-XJTWUXXC.js.gz +0 -0
  143. package/dist/chunk-YIFO3WQO.js.br +0 -0
  144. package/dist/chunk-YIFO3WQO.js.gz +0 -0
  145. package/dist/dist-VEWYRBTB.mjs +0 -2
  146. package/dist/dist-VEWYRBTB.mjs.br +0 -0
  147. package/dist/dist-VEWYRBTB.mjs.gz +0 -0
  148. package/dist/dist-ZCJLIRYG.js +0 -2275
  149. package/dist/dist-ZCJLIRYG.js.br +0 -0
  150. package/dist/dist-ZCJLIRYG.js.gz +0 -0
  151. package/dist/index-CDCSXtK3.d.ts +0 -685
  152. package/dist/index-CDCSXtK3.d.ts.map +0 -1
@@ -1,9 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk2U243ZEP_js = require('./chunk-2U243ZEP.js');
4
- var chunk2QHCOESN_js = require('./chunk-2QHCOESN.js');
5
- var chunkYIFO3WQO_js = require('./chunk-YIFO3WQO.js');
6
- var chunkR2H3FHK6_js = require('./chunk-R2H3FHK6.js');
3
+ var chunk5TPQJWEO_js = require('./chunk-5TPQJWEO.js');
4
+ var chunk25VSL2BB_js = require('./chunk-25VSL2BB.js');
5
+ var chunkWK56SFN7_js = require('./chunk-WK56SFN7.js');
7
6
  var react = require('react');
8
7
  var JSZip = require('jszip');
9
8
  var reactI18next = require('react-i18next');
@@ -15,7 +14,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
15
14
  function useVirtualizedSlides({
16
15
  totalItems,
17
16
  itemHeight,
18
- overscan = chunk2QHCOESN_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkWK56SFN7_js.DEFAULT_VIRTUAL_OVERSCAN
19
18
  }) {
20
19
  const scrollContainerRef = react.useRef(null);
21
20
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -45,7 +44,7 @@ function useVirtualizedSlides({
45
44
  resizeObserver?.disconnect();
46
45
  };
47
46
  }, []);
48
- const range = chunk2QHCOESN_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkWK56SFN7_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
49
48
  const safeItemHeight = Math.max(itemHeight, 1);
50
49
  const scrollToIndex = react.useCallback(
51
50
  (index, behavior = "smooth") => {
@@ -108,7 +107,7 @@ function usePresenceTracking({
108
107
  awareness.setLocalStateField("presence", state);
109
108
  lastBroadcastRef.current = Date.now();
110
109
  };
111
- if (elapsed >= chunk2QHCOESN_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkWK56SFN7_js.BROADCAST_THROTTLE_MS) {
112
111
  if (pendingBroadcastRef.current) {
113
112
  clearTimeout(pendingBroadcastRef.current);
114
113
  pendingBroadcastRef.current = null;
@@ -118,7 +117,7 @@ function usePresenceTracking({
118
117
  pendingBroadcastRef.current = setTimeout(() => {
119
118
  pendingBroadcastRef.current = null;
120
119
  flush();
121
- }, chunk2QHCOESN_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkWK56SFN7_js.BROADCAST_THROTTLE_MS - elapsed);
122
121
  }
123
122
  },
124
123
  [awareness, userName, userColor, userAvatar, role]
@@ -143,7 +142,7 @@ function usePresenceTracking({
143
142
  return;
144
143
  }
145
144
  const handleChange = () => {
146
- const users = chunk2QHCOESN_js.derivePresenceList(
145
+ const users = chunkWK56SFN7_js.derivePresenceList(
147
146
  awareness.getStates(),
148
147
  localClientId,
149
148
  canvasWidth,
@@ -195,7 +194,7 @@ function useYjsProvider({ config }) {
195
194
  const departureRef = react.useRef(null);
196
195
  const gateRef = react.useRef(null);
197
196
  if (!gateRef.current) {
198
- gateRef.current = chunk2QHCOESN_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkWK56SFN7_js.createSyncGate(() => setSynced(true));
199
198
  }
200
199
  const teardown = react.useCallback(() => {
201
200
  if (timeoutRef.current) {
@@ -215,7 +214,7 @@ function useYjsProvider({ config }) {
215
214
  const buildCleanup = react.useCallback(
216
215
  (provider, yDoc) => () => {
217
216
  announceDeparture();
218
- chunk2QHCOESN_js.clearLocalAwareness(provider.awareness);
217
+ chunkWK56SFN7_js.clearLocalAwareness(provider.awareness);
219
218
  provider.destroy();
220
219
  yDoc.destroy();
221
220
  setDoc(null);
@@ -240,9 +239,9 @@ function useYjsProvider({ config }) {
240
239
  if (config.authToken) {
241
240
  opts.password = config.authToken;
242
241
  }
243
- const roomId = chunk2QHCOESN_js.validateRoomId(config.roomId);
242
+ const roomId = chunkWK56SFN7_js.validateRoomId(config.roomId);
244
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
245
- departureRef.current = chunk2QHCOESN_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkWK56SFN7_js.createDepartureChannel(roomId, provider.awareness);
246
245
  setDoc(yDoc);
247
246
  setAwareness(provider.awareness);
248
247
  setClientId(provider.awareness.clientID);
@@ -284,13 +283,13 @@ function useYjsProvider({ config }) {
284
283
  if (!config) {
285
284
  return;
286
285
  }
287
- const roomId = chunk2QHCOESN_js.validateRoomId(config.roomId);
288
- const transport = config.transport ?? chunk2QHCOESN_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkWK56SFN7_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkWK56SFN7_js.resolveTransportForServerUrl(config.serverUrl);
289
288
  if (transport === "webrtc") {
290
289
  await initWebrtc();
291
290
  return;
292
291
  }
293
- if (chunk2QHCOESN_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkWK56SFN7_js.isMixedContentBlocked(config.serverUrl)) {
294
293
  console.warn(
295
294
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
296
295
  );
@@ -304,7 +303,7 @@ function useYjsProvider({ config }) {
304
303
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
305
304
  params: config.authToken ? { token: config.authToken } : void 0
306
305
  });
307
- departureRef.current = chunk2QHCOESN_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkWK56SFN7_js.createDepartureChannel(roomId, provider.awareness);
308
307
  let connected = false;
309
308
  const handleStatus = (event) => {
310
309
  if (event.status === "connected") {
@@ -344,7 +343,7 @@ function useYjsProvider({ config }) {
344
343
  provider.off("status", handleStatus);
345
344
  provider.off("sync", handleSynced);
346
345
  announceDeparture();
347
- chunk2QHCOESN_js.clearLocalAwareness(provider.awareness);
346
+ chunkWK56SFN7_js.clearLocalAwareness(provider.awareness);
348
347
  provider.destroy();
349
348
  yDoc.destroy();
350
349
  setDoc(null);
@@ -353,7 +352,7 @@ function useYjsProvider({ config }) {
353
352
  cleanupRef.current = null;
354
353
  setStatus("error");
355
354
  }
356
- }, chunk2QHCOESN_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkWK56SFN7_js.CONNECTION_TIMEOUT_MS);
357
356
  }
358
357
  setDoc(yDoc);
359
358
  setAwareness(provider.awareness);
@@ -362,7 +361,7 @@ function useYjsProvider({ config }) {
362
361
  provider.off("status", handleStatus);
363
362
  provider.off("sync", handleSynced);
364
363
  announceDeparture();
365
- chunk2QHCOESN_js.clearLocalAwareness(provider.awareness);
364
+ chunkWK56SFN7_js.clearLocalAwareness(provider.awareness);
366
365
  provider.destroy();
367
366
  yDoc.destroy();
368
367
  setDoc(null);
@@ -388,7 +387,7 @@ function useYjsProvider({ config }) {
388
387
  ]);
389
388
  react.useEffect(() => {
390
389
  init();
391
- const disposeTeardown = chunk2QHCOESN_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkWK56SFN7_js.registerCollaborationTeardown({
392
391
  leave: teardown,
393
392
  rejoin: init
394
393
  });
@@ -409,7 +408,7 @@ function useCollaborativeState({
409
408
  canvasWidth,
410
409
  canvasHeight
411
410
  }) {
412
- const userColor = chunk2QHCOESN_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkWK56SFN7_js.sanitizeColor(config?.userColor, "#6366f1");
413
412
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
414
413
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
415
414
  awareness,
@@ -518,8 +517,8 @@ function useEditorHistory(input) {
518
517
  width: canvasSize.width,
519
518
  height: canvasSize.height,
520
519
  activeSlideIndex,
521
- slides: slides.map(chunk2QHCOESN_js.cloneSlide),
522
- templateElementsBySlideId: chunk2QHCOESN_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkWK56SFN7_js.cloneSlide),
521
+ templateElementsBySlideId: chunkWK56SFN7_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
523
522
  ...actionLabel ? { actionLabel } : {}
524
523
  };
525
524
  },
@@ -532,9 +531,9 @@ function useEditorHistory(input) {
532
531
  width: snapshot.width,
533
532
  height: snapshot.height
534
533
  });
535
- setSlides(snapshot.slides.map(chunk2QHCOESN_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkWK56SFN7_js.cloneSlide));
536
535
  setTemplateElementsBySlideId(
537
- chunk2QHCOESN_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkWK56SFN7_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
538
537
  );
539
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
540
539
  setSelectedElementIds([]);
@@ -568,8 +567,8 @@ function useEditorHistory(input) {
568
567
  const currentSnapshot = buildHistorySnapshot();
569
568
  historyFutureRef.current.push(currentSnapshot);
570
569
  isApplyingHistoryRef.current = true;
571
- const nextSnapshot = chunk2U243ZEP_js.cloneHistorySnapshot(previousSnapshot);
572
- lastHistorySnapshotRef.current = chunk2U243ZEP_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunk5TPQJWEO_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(nextSnapshot);
573
572
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
574
573
  applyHistorySnapshot(nextSnapshot);
575
574
  updateHistoryAvailability();
@@ -590,8 +589,8 @@ function useEditorHistory(input) {
590
589
  const currentSnapshot = buildHistorySnapshot();
591
590
  historyPastRef.current.push(currentSnapshot);
592
591
  isApplyingHistoryRef.current = true;
593
- const targetSnapshot = chunk2U243ZEP_js.cloneHistorySnapshot(nextSnapshot);
594
- lastHistorySnapshotRef.current = chunk2U243ZEP_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunk5TPQJWEO_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(targetSnapshot);
595
594
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
596
595
  applyHistorySnapshot(targetSnapshot);
597
596
  updateHistoryAvailability();
@@ -609,7 +608,7 @@ function useEditorHistory(input) {
609
608
  historyPastRef.current = [];
610
609
  historyFutureRef.current = [];
611
610
  if (initialSnapshot) {
612
- const clonedInitial = chunk2U243ZEP_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunk5TPQJWEO_js.cloneHistorySnapshot(initialSnapshot);
613
612
  lastHistorySnapshotRef.current = clonedInitial;
614
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
615
614
  } else {
@@ -650,18 +649,18 @@ function useEditorHistory(input) {
650
649
  }
651
650
  const previousSnapshot = lastHistorySnapshotRef.current;
652
651
  if (!previousSnapshot) {
653
- lastHistorySnapshotRef.current = chunk2U243ZEP_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(snapshot);
654
653
  lastHistorySerializedRef.current = serialized;
655
654
  lastCheapHashRef.current = cheapHash;
656
655
  updateHistoryAvailability();
657
656
  return;
658
657
  }
659
- historyPastRef.current.push(chunk2U243ZEP_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunk5TPQJWEO_js.cloneHistorySnapshot(previousSnapshot));
660
659
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
661
660
  historyPastRef.current.shift();
662
661
  }
663
662
  historyFutureRef.current = [];
664
- lastHistorySnapshotRef.current = chunk2U243ZEP_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(snapshot);
665
664
  lastHistorySerializedRef.current = serialized;
666
665
  lastCheapHashRef.current = cheapHash;
667
666
  updateHistoryAvailability();
@@ -750,7 +749,7 @@ function useZoomViewport({
750
749
  if (!wrapper || !canvasViewport) {
751
750
  return;
752
751
  }
753
- const boundedScale = Math.min(Math.max(nextScale, chunk2U243ZEP_js.MIN_ZOOM_SCALE), chunk2U243ZEP_js.MAX_ZOOM_SCALE);
752
+ const boundedScale = Math.min(Math.max(nextScale, chunk5TPQJWEO_js.MIN_ZOOM_SCALE), chunk5TPQJWEO_js.MAX_ZOOM_SCALE);
754
753
  const nextEditorScale = fitScale * boundedScale;
755
754
  const centerX = (bounds.minX + bounds.maxX) / 2;
756
755
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -765,10 +764,10 @@ function useZoomViewport({
765
764
  [fitScale]
766
765
  );
767
766
  const handleZoomIn = react.useCallback(() => {
768
- setScale((currentScale) => Math.min(currentScale + 0.1, chunk2U243ZEP_js.MAX_ZOOM_SCALE));
767
+ setScale((currentScale) => Math.min(currentScale + 0.1, chunk5TPQJWEO_js.MAX_ZOOM_SCALE));
769
768
  }, []);
770
769
  const handleZoomOut = react.useCallback(() => {
771
- setScale((currentScale) => Math.max(currentScale - 0.1, chunk2U243ZEP_js.MIN_ZOOM_SCALE));
770
+ setScale((currentScale) => Math.max(currentScale - 0.1, chunk5TPQJWEO_js.MIN_ZOOM_SCALE));
772
771
  }, []);
773
772
  const handleResetZoom = react.useCallback(() => {
774
773
  setScale(1);
@@ -787,22 +786,22 @@ function useZoomViewport({
787
786
  selectedElements.forEach((element) => {
788
787
  minX = Math.min(minX, element.x);
789
788
  minY = Math.min(minY, element.y);
790
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk2U243ZEP_js.MIN_ELEMENT_SIZE));
791
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk2U243ZEP_js.MIN_ELEMENT_SIZE));
789
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE));
790
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE));
792
791
  });
793
792
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
794
793
  return;
795
794
  }
796
795
  const selectionBounds = { minX, minY, maxX, maxY };
797
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk2U243ZEP_js.MIN_ELEMENT_SIZE);
798
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk2U243ZEP_js.MIN_ELEMENT_SIZE);
796
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE);
797
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE);
799
798
  const availableWidth = Math.max(
800
- effectiveEditorDimensions.width - chunk2U243ZEP_js.ZOOM_TO_SELECTION_PADDING,
801
- chunk2U243ZEP_js.MIN_ELEMENT_SIZE
799
+ effectiveEditorDimensions.width - chunk5TPQJWEO_js.ZOOM_TO_SELECTION_PADDING,
800
+ chunk5TPQJWEO_js.MIN_ELEMENT_SIZE
802
801
  );
803
802
  const availableHeight = Math.max(
804
- effectiveEditorDimensions.height - chunk2U243ZEP_js.ZOOM_TO_SELECTION_PADDING,
805
- chunk2U243ZEP_js.MIN_ELEMENT_SIZE
803
+ effectiveEditorDimensions.height - chunk5TPQJWEO_js.ZOOM_TO_SELECTION_PADDING,
804
+ chunk5TPQJWEO_js.MIN_ELEMENT_SIZE
806
805
  );
807
806
  const targetEditorScale = Math.min(
808
807
  availableWidth / boundsWidth,
@@ -810,8 +809,8 @@ function useZoomViewport({
810
809
  );
811
810
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
812
811
  const nextScale = Math.min(
813
- Math.max(targetEditorScale / safeFitScale, chunk2U243ZEP_js.MIN_ZOOM_SCALE),
814
- chunk2U243ZEP_js.MAX_ZOOM_SCALE
812
+ Math.max(targetEditorScale / safeFitScale, chunk5TPQJWEO_js.MIN_ZOOM_SCALE),
813
+ chunk5TPQJWEO_js.MAX_ZOOM_SCALE
815
814
  );
816
815
  setScale(nextScale);
817
816
  window.requestAnimationFrame(() => {
@@ -833,7 +832,7 @@ function useZoomViewport({
833
832
  event.preventDefault();
834
833
  const delta = event.deltaY * -1e-3;
835
834
  setScale(
836
- (currentScale) => Math.min(Math.max(currentScale + delta, chunk2U243ZEP_js.MIN_ZOOM_SCALE), chunk2U243ZEP_js.MAX_ZOOM_SCALE)
835
+ (currentScale) => Math.min(Math.max(currentScale + delta, chunk5TPQJWEO_js.MIN_ZOOM_SCALE), chunk5TPQJWEO_js.MAX_ZOOM_SCALE)
837
836
  );
838
837
  }, []);
839
838
  react.useEffect(() => {
@@ -911,7 +910,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
911
910
  const command = step.command;
912
911
  const timer = window.setTimeout(
913
912
  () => {
914
- chunk2U243ZEP_js.executeMediaCommand(command);
913
+ chunk5TPQJWEO_js.executeMediaCommand(command);
915
914
  },
916
915
  Math.max(0, step.delayMs)
917
916
  );
@@ -1026,7 +1025,7 @@ function useAnimationPlayback(input) {
1026
1025
  (controller, group) => {
1027
1026
  driveBuildReveal(
1028
1027
  controller,
1029
- chunk2QHCOESN_js.PresentationAnimationController.collectBuildStepIds(group),
1028
+ chunkWK56SFN7_js.PresentationAnimationController.collectBuildStepIds(group),
1030
1029
  setPresentationElementStates,
1031
1030
  buildRafRef
1032
1031
  );
@@ -1089,7 +1088,7 @@ function useAnimationPlayback(input) {
1089
1088
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1090
1089
  return;
1091
1090
  }
1092
- const controller = chunk2QHCOESN_js.PresentationAnimationController.fromSlide(slide);
1091
+ const controller = chunkWK56SFN7_js.PresentationAnimationController.fromSlide(slide);
1093
1092
  controllerRef.current = controller;
1094
1093
  setPresentationKeyframesCss(controller.keyframesCss);
1095
1094
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1226,7 +1225,7 @@ function useAnimationPlayback(input) {
1226
1225
  }))
1227
1226
  );
1228
1227
  entranceAnimations.forEach((animation, animationIndex) => {
1229
- const delay = chunk2QHCOESN_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1228
+ const delay = chunkWK56SFN7_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1230
1229
  const timer = window.setTimeout(() => {
1231
1230
  setPresentationAnimations(
1232
1231
  (previousAnimations) => previousAnimations.map(
@@ -1262,12 +1261,12 @@ function useAnimationPlayback(input) {
1262
1261
  presentationTimersRef
1263
1262
  };
1264
1263
  }
1265
- var PRESENTER_CHANNEL_NAME = chunk2QHCOESN_js.PRESENTATION_CHANNEL_NAME;
1266
- var AUDIENCE_HASH = chunk2QHCOESN_js.PRESENTATION_HASH;
1267
- var PRESENTER_MSG_ORIGIN = chunk2QHCOESN_js.PRESENTATION_MESSAGE_ORIGIN;
1268
- var AUDIENCE_NONCE_KEY = chunk2QHCOESN_js.PRESENTATION_NONCE_KEY;
1264
+ var PRESENTER_CHANNEL_NAME = chunkWK56SFN7_js.PRESENTATION_CHANNEL_NAME;
1265
+ var AUDIENCE_HASH = chunkWK56SFN7_js.PRESENTATION_HASH;
1266
+ var PRESENTER_MSG_ORIGIN = chunkWK56SFN7_js.PRESENTATION_MESSAGE_ORIGIN;
1267
+ var AUDIENCE_NONCE_KEY = chunkWK56SFN7_js.PRESENTATION_NONCE_KEY;
1269
1268
  function generateSessionId() {
1270
- return chunk2QHCOESN_js.createPresentationSessionId();
1269
+ return chunkWK56SFN7_js.createPresentationSessionId();
1271
1270
  }
1272
1271
  function parseAudienceNonce() {
1273
1272
  const hash = window.location.hash;
@@ -1303,7 +1302,7 @@ function usePresenterWindow(input) {
1303
1302
  }, []);
1304
1303
  const swapDisplays = react.useCallback(async () => {
1305
1304
  const audience = audienceWindowRef.current;
1306
- return audience && !audience.closed ? chunk2QHCOESN_js.swapPresentationWindows(window, audience) : false;
1305
+ return audience && !audience.closed ? chunkWK56SFN7_js.swapPresentationWindows(window, audience) : false;
1307
1306
  }, []);
1308
1307
  const syncSlideToAudience = react.useCallback(
1309
1308
  (slideIndex) => {
@@ -1367,7 +1366,7 @@ function usePresenterWindow(input) {
1367
1366
  pollTimerRef.current = null;
1368
1367
  }
1369
1368
  if (closingSessionId) {
1370
- void chunk2QHCOESN_js.clearAudienceContent(closingSessionId);
1369
+ void chunkWK56SFN7_js.clearAudienceContent(closingSessionId);
1371
1370
  }
1372
1371
  }, [getChannel]);
1373
1372
  const openAudienceWindow = react.useCallback(() => {
@@ -1385,10 +1384,10 @@ function usePresenterWindow(input) {
1385
1384
  audienceWindowRef.current = blankWin;
1386
1385
  const sessionId = generateSessionId();
1387
1386
  sessionIdRef.current = sessionId;
1388
- const audienceUrl = chunk2QHCOESN_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1389
- void chunk2QHCOESN_js.resolveAudienceScreenPlacement(window).then((placement) => {
1387
+ const audienceUrl = chunkWK56SFN7_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1388
+ void chunkWK56SFN7_js.resolveAudienceScreenPlacement(window).then((placement) => {
1390
1389
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1391
- chunk2QHCOESN_js.placeAudienceWindow(blankWin, placement);
1390
+ chunkWK56SFN7_js.placeAudienceWindow(blankWin, placement);
1392
1391
  }
1393
1392
  return void 0;
1394
1393
  });
@@ -1418,7 +1417,7 @@ function usePresenterWindow(input) {
1418
1417
  }
1419
1418
  };
1420
1419
  if (content) {
1421
- void chunk2QHCOESN_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1420
+ void chunkWK56SFN7_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1422
1421
  } else {
1423
1422
  navigateOrClose(true);
1424
1423
  }
@@ -1444,7 +1443,7 @@ function usePresenterWindow(input) {
1444
1443
  }
1445
1444
  const handleMessage = (event) => {
1446
1445
  const message = event.data;
1447
- if (chunk2QHCOESN_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1446
+ if (chunkWK56SFN7_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1448
1447
  syncStateToAudience(snapshotRef.current);
1449
1448
  }
1450
1449
  };
@@ -1473,7 +1472,7 @@ function usePresenterWindow(input) {
1473
1472
  react.useEffect(() => {
1474
1473
  const handleBeforeUnload = () => {
1475
1474
  if (sessionIdRef.current) {
1476
- void chunk2QHCOESN_js.clearAudienceContent(sessionIdRef.current);
1475
+ void chunkWK56SFN7_js.clearAudienceContent(sessionIdRef.current);
1477
1476
  }
1478
1477
  };
1479
1478
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1526,7 +1525,7 @@ function useAudienceMode(input) {
1526
1525
  }
1527
1526
  channel.onmessage = (event) => {
1528
1527
  const data = event.data;
1529
- if (!chunk2QHCOESN_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1528
+ if (!chunkWK56SFN7_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1530
1529
  return;
1531
1530
  }
1532
1531
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1541,7 +1540,7 @@ function useAudienceMode(input) {
1541
1540
  }
1542
1541
  if (data.type === "presenter-exit") {
1543
1542
  if (expectedSessionId) {
1544
- void chunk2QHCOESN_js.clearAudienceContent(expectedSessionId);
1543
+ void chunkWK56SFN7_js.clearAudienceContent(expectedSessionId);
1545
1544
  }
1546
1545
  onSetMode("edit");
1547
1546
  try {
@@ -1552,7 +1551,7 @@ function useAudienceMode(input) {
1552
1551
  };
1553
1552
  if (expectedSessionId) {
1554
1553
  channel.postMessage({
1555
- origin: chunk2QHCOESN_js.PRESENTATION_MESSAGE_ORIGIN,
1554
+ origin: chunkWK56SFN7_js.PRESENTATION_MESSAGE_ORIGIN,
1556
1555
  type: "audience-ready",
1557
1556
  sessionId: expectedSessionId
1558
1557
  });
@@ -1584,14 +1583,14 @@ function usePresentationKeyboard(input) {
1584
1583
  presentationSlideIndex,
1585
1584
  setShowRehearsalSummary
1586
1585
  } = input;
1587
- const keyBufferRef = react.useRef(chunk2QHCOESN_js.createPresentationKeyBuffer());
1586
+ const keyBufferRef = react.useRef(chunkWK56SFN7_js.createPresentationKeyBuffer());
1588
1587
  react.useEffect(() => {
1589
1588
  if (mode !== "present") {
1590
- keyBufferRef.current = chunk2QHCOESN_js.createPresentationKeyBuffer();
1589
+ keyBufferRef.current = chunkWK56SFN7_js.createPresentationKeyBuffer();
1591
1590
  return;
1592
1591
  }
1593
1592
  const handleKeyDown = (event) => {
1594
- const mapped = chunk2QHCOESN_js.mapPresentationKey(event, keyBufferRef.current);
1593
+ const mapped = chunkWK56SFN7_js.mapPresentationKey(event, keyBufferRef.current);
1595
1594
  if (mapped.action === "none") {
1596
1595
  return;
1597
1596
  }
@@ -1799,7 +1798,7 @@ function handlePresentationActionImpl(action, deps) {
1799
1798
  return;
1800
1799
  }
1801
1800
  if (action.url && !actionStr.includes("hlinksldjump")) {
1802
- if (chunk2QHCOESN_js.isUrlSafe(action.url)) {
1801
+ if (chunkWK56SFN7_js.isUrlSafe(action.url)) {
1803
1802
  window.open(action.url, "_blank", "noopener,noreferrer");
1804
1803
  }
1805
1804
  }
@@ -1809,7 +1808,7 @@ function handlePresentationActionImpl(action, deps) {
1809
1808
  function executeSlideTransition(nextSlideIndex, deps) {
1810
1809
  const incomingSlide = deps.slides[nextSlideIndex];
1811
1810
  const transition = incomingSlide?.transition;
1812
- const durationMs = deps.playTransition ? chunk2QHCOESN_js.resolveTransitionDurationMs(transition) : 0;
1811
+ const durationMs = deps.playTransition ? chunkWK56SFN7_js.resolveTransitionDurationMs(transition) : 0;
1813
1812
  deps.clearPresentationTimers();
1814
1813
  deps.setPresentationSlideIndex(nextSlideIndex);
1815
1814
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -2055,17 +2054,17 @@ function useZoomNavigation(input) {
2055
2054
  };
2056
2055
  }
2057
2056
  function usePresenterConsole(slideIndex) {
2058
- const timerRef = react.useRef(chunk2QHCOESN_js.createPresenterTimer());
2059
- const [snapshot, setSnapshot] = react.useState(() => chunk2QHCOESN_js.createInitialPresentationSnapshot(slideIndex));
2057
+ const timerRef = react.useRef(chunkWK56SFN7_js.createPresenterTimer());
2058
+ const [snapshot, setSnapshot] = react.useState(() => chunkWK56SFN7_js.createInitialPresentationSnapshot(slideIndex));
2060
2059
  const patch = react.useCallback((value) => {
2061
- setSnapshot((current) => chunk2QHCOESN_js.mergePresentationSnapshot(current, value));
2060
+ setSnapshot((current) => chunkWK56SFN7_js.mergePresentationSnapshot(current, value));
2062
2061
  }, []);
2063
2062
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2064
2063
  react.useEffect(() => {
2065
2064
  const timer = window.setInterval(() => {
2066
2065
  patch({
2067
2066
  paused: timerRef.current.paused,
2068
- elapsedMs: chunk2QHCOESN_js.presenterElapsed(timerRef.current)
2067
+ elapsedMs: chunkWK56SFN7_js.presenterElapsed(timerRef.current)
2069
2068
  });
2070
2069
  }, 1e3);
2071
2070
  return () => window.clearInterval(timer);
@@ -2075,19 +2074,19 @@ function usePresenterConsole(slideIndex) {
2075
2074
  applyAudienceSnapshot: setSnapshot,
2076
2075
  setBlackout: (blackout) => patch({ blackout }),
2077
2076
  toggleTimer: () => {
2078
- timerRef.current = chunk2QHCOESN_js.togglePresenterTimer(timerRef.current);
2077
+ timerRef.current = chunkWK56SFN7_js.togglePresenterTimer(timerRef.current);
2079
2078
  patch({
2080
2079
  paused: timerRef.current.paused,
2081
- elapsedMs: chunk2QHCOESN_js.presenterElapsed(timerRef.current)
2080
+ elapsedMs: chunkWK56SFN7_js.presenterElapsed(timerRef.current)
2082
2081
  });
2083
2082
  },
2084
2083
  resetTimer: () => {
2085
- timerRef.current = chunk2QHCOESN_js.resetPresenterTimer();
2084
+ timerRef.current = chunkWK56SFN7_js.resetPresenterTimer();
2086
2085
  patch({ paused: false, elapsedMs: 0 });
2087
2086
  },
2088
2087
  stepZoom: (direction) => setSnapshot(
2089
- (current) => chunk2QHCOESN_js.mergePresentationSnapshot(current, {
2090
- zoom: chunk2QHCOESN_js.stepPresenterZoom(
2088
+ (current) => chunkWK56SFN7_js.mergePresentationSnapshot(current, {
2089
+ zoom: chunkWK56SFN7_js.stepPresenterZoom(
2091
2090
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2092
2091
  direction
2093
2092
  )
@@ -2666,7 +2665,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2666
2665
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2667
2666
  slides.forEach((slide, slideIndex) => {
2668
2667
  for (const element of slide.elements || []) {
2669
- if (!chunkR2H3FHK6_js.hasTextProperties(element)) {
2668
+ if (!chunkWK56SFN7_js.hasTextProperties(element)) {
2670
2669
  continue;
2671
2670
  }
2672
2671
  const segments = element.textSegments ?? [];
@@ -2717,7 +2716,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2717
2716
  continue;
2718
2717
  }
2719
2718
  const element = slide.elements[elIdx];
2720
- if (!chunkR2H3FHK6_js.hasTextProperties(element)) {
2719
+ if (!chunkWK56SFN7_js.hasTextProperties(element)) {
2721
2720
  continue;
2722
2721
  }
2723
2722
  const segments = [...element.textSegments ?? []];
@@ -3315,7 +3314,7 @@ function useViewerCoreState(_input) {
3315
3314
  const shapeAdjustmentDragStateRef = react.useRef(null);
3316
3315
  const marqueeStateRef = react.useRef(null);
3317
3316
  const isDrawingRef = react.useRef(false);
3318
- const livePatcher = react.useMemo(() => chunk2QHCOESN_js.createCollaborationLivePatcher(), []);
3317
+ const livePatcher = react.useMemo(() => chunkWK56SFN7_js.createCollaborationLivePatcher(), []);
3319
3318
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3320
3319
  const slidesRef = react.useRef([]);
3321
3320
  const [mode, setMode] = react.useState("edit");
@@ -3324,8 +3323,8 @@ function useViewerCoreState(_input) {
3324
3323
  const [slides, setSlides] = react.useState([]);
3325
3324
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3326
3325
  const [canvasSize, setCanvasSize] = react.useState({
3327
- width: chunk2U243ZEP_js.DEFAULT_CANVAS_WIDTH,
3328
- height: chunk2U243ZEP_js.DEFAULT_CANVAS_HEIGHT
3326
+ width: chunk5TPQJWEO_js.DEFAULT_CANVAS_WIDTH,
3327
+ height: chunk5TPQJWEO_js.DEFAULT_CANVAS_HEIGHT
3329
3328
  });
3330
3329
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3331
3330
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3345,7 +3344,7 @@ function useViewerCoreState(_input) {
3345
3344
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3346
3345
  inlineEditingTextRef.current = resolved;
3347
3346
  setInlineEditingTextBase(value);
3348
- chunk2QHCOESN_js.publishLiveInlineText(
3347
+ chunkWK56SFN7_js.publishLiveInlineText(
3349
3348
  livePatcher,
3350
3349
  slidesRef.current[activeSlideIndexRef.current],
3351
3350
  inlineEditingElementIdRef.current,
@@ -3670,7 +3669,7 @@ function useLoadContent({
3670
3669
  );
3671
3670
  }
3672
3671
  const previousHandler = handlerRef.current;
3673
- const handler = new chunkR2H3FHK6_js.PptxHandler();
3672
+ const handler = new chunkWK56SFN7_js.PptxHandler();
3674
3673
  const parsed = await handler.load(buffer);
3675
3674
  if (cancelled || token !== renderTokenRef.current) {
3676
3675
  handler.dispose();
@@ -3682,7 +3681,7 @@ function useLoadContent({
3682
3681
  handlerRef.current = null;
3683
3682
  const mediaElements = [];
3684
3683
  for (const slide of parsed.slides) {
3685
- chunk2QHCOESN_js.collectMediaElements(slide.elements, mediaElements);
3684
+ chunkWK56SFN7_js.collectMediaElements(slide.elements, mediaElements);
3686
3685
  }
3687
3686
  for (const url of mediaDataUrls.values()) {
3688
3687
  if (url.startsWith("blob:")) {
@@ -3723,7 +3722,7 @@ function useLoadContent({
3723
3722
  }
3724
3723
  })
3725
3724
  );
3726
- const { paths: imagePaths, refs: imageRefs } = chunk2QHCOESN_js.collectImagePaths(parsed.slides);
3725
+ const { paths: imagePaths, refs: imageRefs } = chunkWK56SFN7_js.collectImagePaths(parsed.slides);
3727
3726
  let nextSlides = parsed.slides;
3728
3727
  if (imagePaths.size > 0) {
3729
3728
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3778,12 +3777,12 @@ function useLoadContent({
3778
3777
  }
3779
3778
  }
3780
3779
  handlerRef.current = handler;
3781
- const partition = chunk2U243ZEP_js.partitionTemplateElements(nextSlides);
3780
+ const partition = chunk5TPQJWEO_js.partitionTemplateElements(nextSlides);
3782
3781
  setSlides(partition.slides);
3783
3782
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3784
3783
  setCanvasSize({
3785
- width: parsed.width ?? chunk2U243ZEP_js.DEFAULT_CANVAS_WIDTH,
3786
- height: parsed.height ?? chunk2U243ZEP_js.DEFAULT_CANVAS_HEIGHT
3784
+ width: parsed.width ?? chunk5TPQJWEO_js.DEFAULT_CANVAS_WIDTH,
3785
+ height: parsed.height ?? chunk5TPQJWEO_js.DEFAULT_CANVAS_HEIGHT
3787
3786
  });
3788
3787
  setHeaderFooter(parsed.headerFooter ?? {});
3789
3788
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3812,7 +3811,7 @@ function useLoadContent({
3812
3811
  setHasMacros(parsed.hasMacros === true);
3813
3812
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3814
3813
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3815
- setGuides(chunk2QHCOESN_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3814
+ setGuides(chunkWK56SFN7_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3816
3815
  setActiveSlideIndex(0);
3817
3816
  clearSelection();
3818
3817
  setIsDirty(false);
@@ -3820,7 +3819,7 @@ function useLoadContent({
3820
3819
  onContentApplied?.();
3821
3820
  } catch (err) {
3822
3821
  if (!cancelled && token === renderTokenRef.current) {
3823
- if (err instanceof chunkR2H3FHK6_js.EncryptedFileError) {
3822
+ if (err instanceof chunkWK56SFN7_js.EncryptedFileError) {
3824
3823
  setIsEncrypted(true);
3825
3824
  } else {
3826
3825
  setError(err instanceof Error ? err.message : String(err));
@@ -3897,7 +3896,7 @@ function useAutosave(input) {
3897
3896
  isSavingRef.current = false;
3898
3897
  return;
3899
3898
  }
3900
- await chunk2QHCOESN_js.saveAutosaveSnapshot(filePathRef.current, data);
3899
+ await chunkWK56SFN7_js.saveAutosaveSnapshot(filePathRef.current, data);
3901
3900
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3902
3901
  } catch (err) {
3903
3902
  setAutosaveStatus({
@@ -3962,7 +3961,7 @@ function useElementOperations(input) {
3962
3961
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
3963
3962
  const updateElementById = react.useCallback(
3964
3963
  (elementId, updates) => {
3965
- if (chunk2QHCOESN_js.isTemplateElementId(elementId)) {
3964
+ if (chunkWK56SFN7_js.isTemplateElementId(elementId)) {
3966
3965
  const slideId = activeSlide?.id;
3967
3966
  if (slideId) {
3968
3967
  setTemplateElementsBySlideId((prev) => ({
@@ -4002,7 +4001,7 @@ function useElementOperations(input) {
4002
4001
  );
4003
4002
  const updateSelectedShapeStyle = react.useCallback(
4004
4003
  (updates) => {
4005
- if (!selectedElement || !chunkR2H3FHK6_js.hasShapeProperties(selectedElement)) {
4004
+ if (!selectedElement || !chunkWK56SFN7_js.hasShapeProperties(selectedElement)) {
4006
4005
  return;
4007
4006
  }
4008
4007
  updateSelectedElement({
@@ -4013,17 +4012,17 @@ function useElementOperations(input) {
4013
4012
  );
4014
4013
  const updateSelectedTextStyle = react.useCallback(
4015
4014
  (updates) => {
4016
- if (!selectedElement || !chunkR2H3FHK6_js.hasTextProperties(selectedElement)) {
4015
+ if (!selectedElement || !chunkWK56SFN7_js.hasTextProperties(selectedElement)) {
4017
4016
  return;
4018
4017
  }
4019
- const inlineSel = chunk2QHCOESN_js.getInlineEditorSelection(selectedElement.textSegments);
4018
+ const inlineSel = chunkWK56SFN7_js.getInlineEditorSelection(selectedElement.textSegments);
4020
4019
  if (inlineSel && selectedElement.textSegments) {
4021
- const { newSegments: newSegments2, newSelection } = chunk2QHCOESN_js.applyStyleToSelectedSegments(
4020
+ const { newSegments: newSegments2, newSelection } = chunkWK56SFN7_js.applyStyleToSelectedSegments(
4022
4021
  selectedElement.textSegments,
4023
4022
  inlineSel,
4024
4023
  updates
4025
4024
  );
4026
- chunk2QHCOESN_js.setPendingSelectionRestore(newSelection);
4025
+ chunkWK56SFN7_js.setPendingSelectionRestore(newSelection);
4027
4026
  updateSelectedElement({
4028
4027
  textSegments: newSegments2
4029
4028
  });
@@ -4043,12 +4042,12 @@ function useElementOperations(input) {
4043
4042
  );
4044
4043
  const updateSelectedTextCase = react.useCallback(
4045
4044
  (mode) => {
4046
- if (!selectedElement || !chunkR2H3FHK6_js.hasTextProperties(selectedElement)) {
4045
+ if (!selectedElement || !chunkWK56SFN7_js.hasTextProperties(selectedElement)) {
4047
4046
  return;
4048
4047
  }
4049
- const inlineSel = chunk2QHCOESN_js.getInlineEditorSelection(selectedElement.textSegments);
4048
+ const inlineSel = chunkWK56SFN7_js.getInlineEditorSelection(selectedElement.textSegments);
4050
4049
  if (inlineSel && selectedElement.textSegments) {
4051
- const newSegments = chunk2QHCOESN_js.applyCaseTransformToSegments(
4050
+ const newSegments = chunkWK56SFN7_js.applyCaseTransformToSegments(
4052
4051
  selectedElement.textSegments,
4053
4052
  inlineSel,
4054
4053
  mode
@@ -4058,14 +4057,14 @@ function useElementOperations(input) {
4058
4057
  }
4059
4058
  const updates = {};
4060
4059
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4061
- updates.textSegments = chunk2QHCOESN_js.applyCaseTransformToSegments(
4060
+ updates.textSegments = chunkWK56SFN7_js.applyCaseTransformToSegments(
4062
4061
  selectedElement.textSegments,
4063
4062
  null,
4064
4063
  mode
4065
4064
  );
4066
4065
  }
4067
4066
  if (typeof selectedElement.text === "string") {
4068
- updates.text = chunk2QHCOESN_js.transformTextCase(selectedElement.text, mode);
4067
+ updates.text = chunkWK56SFN7_js.transformTextCase(selectedElement.text, mode);
4069
4068
  }
4070
4069
  updateSelectedElement(updates);
4071
4070
  },
@@ -4120,7 +4119,7 @@ function useSectionOperations(input) {
4120
4119
  const { sections, setSections, slides, setSlides, markDirty } = input;
4121
4120
  const addSection2 = react.useCallback(
4122
4121
  (name, afterSlideIndex) => {
4123
- const result = chunk2QHCOESN_js.addSection(sections, slides, name, afterSlideIndex);
4122
+ const result = chunkWK56SFN7_js.addSection(sections, slides, name, afterSlideIndex);
4124
4123
  setSlides(result.slides);
4125
4124
  setSections(result.sections);
4126
4125
  markDirty();
@@ -4129,7 +4128,7 @@ function useSectionOperations(input) {
4129
4128
  );
4130
4129
  const renameSection2 = react.useCallback(
4131
4130
  (sectionId, newName) => {
4132
- const result = chunk2QHCOESN_js.renameSection(sections, slides, sectionId, newName);
4131
+ const result = chunkWK56SFN7_js.renameSection(sections, slides, sectionId, newName);
4133
4132
  setSections(result.sections);
4134
4133
  setSlides(result.slides);
4135
4134
  markDirty();
@@ -4138,7 +4137,7 @@ function useSectionOperations(input) {
4138
4137
  );
4139
4138
  const deleteSection2 = react.useCallback(
4140
4139
  (sectionId) => {
4141
- const result = chunk2QHCOESN_js.deleteSection(sections, slides, sectionId);
4140
+ const result = chunkWK56SFN7_js.deleteSection(sections, slides, sectionId);
4142
4141
  setSections(result.sections);
4143
4142
  setSlides(result.slides);
4144
4143
  markDirty();
@@ -4147,21 +4146,21 @@ function useSectionOperations(input) {
4147
4146
  );
4148
4147
  const moveSectionUp2 = react.useCallback(
4149
4148
  (sectionId) => {
4150
- setSections(chunk2QHCOESN_js.moveSectionUp(sections, sectionId));
4149
+ setSections(chunkWK56SFN7_js.moveSectionUp(sections, sectionId));
4151
4150
  markDirty();
4152
4151
  },
4153
4152
  [sections, setSections, markDirty]
4154
4153
  );
4155
4154
  const moveSectionDown2 = react.useCallback(
4156
4155
  (sectionId) => {
4157
- setSections(chunk2QHCOESN_js.moveSectionDown(sections, sectionId));
4156
+ setSections(chunkWK56SFN7_js.moveSectionDown(sections, sectionId));
4158
4157
  markDirty();
4159
4158
  },
4160
4159
  [sections, setSections, markDirty]
4161
4160
  );
4162
4161
  const moveSlidesToSection2 = react.useCallback(
4163
4162
  (slideIndexes, targetSectionId) => {
4164
- const result = chunk2QHCOESN_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4163
+ const result = chunkWK56SFN7_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4165
4164
  setSlides(result.slides);
4166
4165
  setSections(result.sections);
4167
4166
  markDirty();
@@ -4180,19 +4179,19 @@ function useSectionOperations(input) {
4180
4179
 
4181
4180
  // src/viewer/hooks/pointer-move-handlers.ts
4182
4181
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4183
- const resized = chunk2QHCOESN_js.applyResize(
4182
+ const resized = chunkWK56SFN7_js.applyResize(
4184
4183
  { x: startX, y: startY, width: startWidth, height: startHeight },
4185
4184
  handle,
4186
4185
  dx,
4187
4186
  dy,
4188
4187
  1,
4189
- { minSize: chunk2U243ZEP_js.MIN_ELEMENT_SIZE }
4188
+ { minSize: chunk5TPQJWEO_js.MIN_ELEMENT_SIZE }
4190
4189
  );
4191
4190
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4192
4191
  if (!snapToGrid) {
4193
4192
  return box;
4194
4193
  }
4195
- return chunk2QHCOESN_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk2U243ZEP_js.MIN_ELEMENT_SIZE);
4194
+ return chunkWK56SFN7_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE);
4196
4195
  }
4197
4196
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4198
4197
  const range = startWidth || 200;
@@ -4310,7 +4309,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4310
4309
  width: el.width,
4311
4310
  height: el.height
4312
4311
  }));
4313
- const snapResult = chunk2QHCOESN_js.computeSnapToShape(
4312
+ const snapResult = chunkWK56SFN7_js.computeSnapToShape(
4314
4313
  targetX,
4315
4314
  targetY,
4316
4315
  primaryEl.width,
@@ -4349,7 +4348,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4349
4348
  if (live) {
4350
4349
  for (const id of Object.keys(drag.startPositionsById)) {
4351
4350
  const start = drag.startPositionsById[id];
4352
- chunk2QHCOESN_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4351
+ chunkWK56SFN7_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4353
4352
  x: start.x + appliedDx,
4354
4353
  y: start.y + appliedDy
4355
4354
  });
@@ -4383,15 +4382,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4383
4382
  if (rs.domEl) {
4384
4383
  rs.domEl.style.left = `${geo.x}px`;
4385
4384
  rs.domEl.style.top = `${geo.y}px`;
4386
- rs.domEl.style.width = `${Math.max(geo.width, chunk2U243ZEP_js.MIN_ELEMENT_SIZE)}px`;
4387
- rs.domEl.style.height = `${Math.max(geo.height, chunk2U243ZEP_js.MIN_ELEMENT_SIZE)}px`;
4385
+ rs.domEl.style.width = `${Math.max(geo.width, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE)}px`;
4386
+ rs.domEl.style.height = `${Math.max(geo.height, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE)}px`;
4388
4387
  }
4389
4388
  if (live) {
4390
- chunk2QHCOESN_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4389
+ chunkWK56SFN7_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4391
4390
  x: geo.x,
4392
4391
  y: geo.y,
4393
- width: Math.max(geo.width, chunk2U243ZEP_js.MIN_ELEMENT_SIZE),
4394
- height: Math.max(geo.height, chunk2U243ZEP_js.MIN_ELEMENT_SIZE)
4392
+ width: Math.max(geo.width, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE),
4393
+ height: Math.max(geo.height, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE)
4395
4394
  });
4396
4395
  }
4397
4396
  }
@@ -4471,13 +4470,13 @@ function processPointerUp(input) {
4471
4470
  if (i !== activeSlideIndex) {
4472
4471
  return s;
4473
4472
  }
4474
- const rerouted = chunk2QHCOESN_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4473
+ const rerouted = chunkWK56SFN7_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4475
4474
  if (rerouted.length === 0) {
4476
4475
  return s;
4477
4476
  }
4478
4477
  return {
4479
4478
  ...s,
4480
- elements: chunk2QHCOESN_js.applyReroutedConnectors(s.elements, rerouted)
4479
+ elements: chunkWK56SFN7_js.applyReroutedConnectors(s.elements, rerouted)
4481
4480
  };
4482
4481
  })
4483
4482
  );
@@ -4499,9 +4498,9 @@ function processPointerUp(input) {
4499
4498
  }
4500
4499
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4501
4500
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4502
- const hitIds = chunk2QHCOESN_js.computeMarqueeHitIds(marquee, sourceElements);
4501
+ const hitIds = chunkWK56SFN7_js.computeMarqueeHitIds(marquee, sourceElements);
4503
4502
  if (marquee.additive) {
4504
- const merged = chunk2QHCOESN_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4503
+ const merged = chunkWK56SFN7_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4505
4504
  if (merged.length > 0) {
4506
4505
  applySelection(merged[0], merged);
4507
4506
  } else {
@@ -4524,8 +4523,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4524
4523
  }
4525
4524
  return { ...el, x: start.x + dx, y: start.y + dy };
4526
4525
  });
4527
- const rerouted = chunk2QHCOESN_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4528
- return chunk2QHCOESN_js.applyReroutedConnectors(movedElements, rerouted);
4526
+ const rerouted = chunkWK56SFN7_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4527
+ return chunkWK56SFN7_js.applyReroutedConnectors(movedElements, rerouted);
4529
4528
  };
4530
4529
  if (editTemplateMode) {
4531
4530
  const slideId = activeSlide?.id;
@@ -4678,9 +4677,9 @@ function useCanvasInteractions(input) {
4678
4677
  return;
4679
4678
  }
4680
4679
  const el = elementLookup.get(editId);
4681
- if (el && chunkR2H3FHK6_js.hasTextProperties(el)) {
4680
+ if (el && chunkWK56SFN7_js.hasTextProperties(el)) {
4682
4681
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4683
- const newSegments = chunk2QHCOESN_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4682
+ const newSegments = chunkWK56SFN7_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4684
4683
  ops.updateElementById(editId, {
4685
4684
  text: committedText,
4686
4685
  textSegments: newSegments
@@ -4691,7 +4690,7 @@ function useCanvasInteractions(input) {
4691
4690
  setInlineEditingText("");
4692
4691
  };
4693
4692
  const openEquationEditorForElement = (el) => {
4694
- if (!chunkR2H3FHK6_js.hasTextProperties(el)) {
4693
+ if (!chunkWK56SFN7_js.hasTextProperties(el)) {
4695
4694
  return false;
4696
4695
  }
4697
4696
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4720,7 +4719,7 @@ function useCanvasInteractions(input) {
4720
4719
  justSelectedRef.current = false;
4721
4720
  } else {
4722
4721
  const el = elementLookup.get(elementId);
4723
- if (el && chunkR2H3FHK6_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4722
+ if (el && chunkWK56SFN7_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4724
4723
  if (!openEquationEditorForElement(el)) {
4725
4724
  setInlineEditingElementId(elementId);
4726
4725
  setInlineEditingText(el.text ?? "");
@@ -4739,7 +4738,7 @@ function useCanvasInteractions(input) {
4739
4738
  if (openEquationEditorForElement(el)) {
4740
4739
  return;
4741
4740
  }
4742
- if (chunkR2H3FHK6_js.hasTextProperties(el)) {
4741
+ if (chunkWK56SFN7_js.hasTextProperties(el)) {
4743
4742
  setInlineEditingElementId(elementId);
4744
4743
  setInlineEditingText(el.text ?? "");
4745
4744
  }
@@ -4929,7 +4928,7 @@ function createFileHandlers(deps) {
4929
4928
  h = Math.round(h * scale);
4930
4929
  }
4931
4930
  addElement({
4932
- id: chunk2QHCOESN_js.generateElementId(),
4931
+ id: chunkWK56SFN7_js.generateElementId(),
4933
4932
  type: "image",
4934
4933
  x: Math.round((canvasSize.width - w) / 2),
4935
4934
  y: Math.round((canvasSize.height - h) / 2),
@@ -4940,7 +4939,7 @@ function createFileHandlers(deps) {
4940
4939
  };
4941
4940
  img.onerror = () => {
4942
4941
  addElement({
4943
- id: chunk2QHCOESN_js.generateElementId(),
4942
+ id: chunkWK56SFN7_js.generateElementId(),
4944
4943
  type: "image",
4945
4944
  x: 100,
4946
4945
  y: 100,
@@ -4966,7 +4965,7 @@ function createFileHandlers(deps) {
4966
4965
  const elFilePath = file.path;
4967
4966
  const insertMediaElement = (mediaSourceUrl, width, height) => {
4968
4967
  addElement({
4969
- id: chunk2QHCOESN_js.generateElementId(),
4968
+ id: chunkWK56SFN7_js.generateElementId(),
4970
4969
  type: "media",
4971
4970
  mediaType,
4972
4971
  mediaMimeType: file.type || void 0,
@@ -5141,13 +5140,13 @@ function createStructuredElementHandlers(deps) {
5141
5140
  return;
5142
5141
  }
5143
5142
  addElement({
5144
- id: chunk2QHCOESN_js.generateElementId(),
5143
+ id: chunkWK56SFN7_js.generateElementId(),
5145
5144
  type: "smartArt",
5146
5145
  x: 100,
5147
5146
  y: 120,
5148
5147
  width: 600,
5149
5148
  height: 340,
5150
- smartArtData: chunk2QHCOESN_js.buildSmartArtPresetData(
5149
+ smartArtData: chunkWK56SFN7_js.buildSmartArtPresetData(
5151
5150
  layout,
5152
5151
  defaultItems,
5153
5152
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5159,7 +5158,7 @@ function createStructuredElementHandlers(deps) {
5159
5158
  return;
5160
5159
  }
5161
5160
  addElement({
5162
- id: chunk2QHCOESN_js.generateElementId(),
5161
+ id: chunkWK56SFN7_js.generateElementId(),
5163
5162
  type: "shape",
5164
5163
  x: 120,
5165
5164
  y: 200,
@@ -5218,7 +5217,7 @@ function createStructuredElementHandlers(deps) {
5218
5217
  const displayText = value || fieldTexts[fieldType] || fieldType;
5219
5218
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5220
5219
  addElement({
5221
- id: chunk2QHCOESN_js.generateElementId(),
5220
+ id: chunkWK56SFN7_js.generateElementId(),
5222
5221
  type: "shape",
5223
5222
  x: 120,
5224
5223
  y: 200,
@@ -5240,11 +5239,11 @@ function createStructuredElementHandlers(deps) {
5240
5239
  if (!activeSlide) {
5241
5240
  return;
5242
5241
  }
5243
- const preset = chunk2QHCOESN_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5242
+ const preset = chunkWK56SFN7_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5244
5243
  if (!preset) {
5245
5244
  return;
5246
5245
  }
5247
- const defaultPptxAction = chunkR2H3FHK6_js.elementActionToPptxAction({
5246
+ const defaultPptxAction = chunkWK56SFN7_js.elementActionToPptxAction({
5248
5247
  trigger: "click",
5249
5248
  type: preset.defaultAction
5250
5249
  });
@@ -5253,7 +5252,7 @@ function createStructuredElementHandlers(deps) {
5253
5252
  defaultPptxAction.highlightClick = true;
5254
5253
  }
5255
5254
  addElement({
5256
- id: chunk2QHCOESN_js.generateElementId(),
5255
+ id: chunkWK56SFN7_js.generateElementId(),
5257
5256
  type: "shape",
5258
5257
  x: 150,
5259
5258
  y: 150,
@@ -5320,14 +5319,14 @@ function useInsertElements(input) {
5320
5319
  return;
5321
5320
  }
5322
5321
  addElement({
5323
- id: chunk2QHCOESN_js.generateElementId(),
5322
+ id: chunkWK56SFN7_js.generateElementId(),
5324
5323
  type: "text",
5325
5324
  x: 100,
5326
5325
  y: 100,
5327
5326
  width: 300,
5328
5327
  height: 60,
5329
5328
  text: "",
5330
- textStyle: { fontSize: chunk2U243ZEP_js.DEFAULT_TEXT_FONT_SIZE }
5329
+ textStyle: { fontSize: chunk5TPQJWEO_js.DEFAULT_TEXT_FONT_SIZE }
5331
5330
  });
5332
5331
  };
5333
5332
  const handleAddShape = () => {
@@ -5335,7 +5334,7 @@ function useInsertElements(input) {
5335
5334
  return;
5336
5335
  }
5337
5336
  addElement({
5338
- id: chunk2QHCOESN_js.generateElementId(),
5337
+ id: chunkWK56SFN7_js.generateElementId(),
5339
5338
  type: "shape",
5340
5339
  x: 150,
5341
5340
  y: 150,
@@ -5354,15 +5353,15 @@ function useInsertElements(input) {
5354
5353
  return;
5355
5354
  }
5356
5355
  addElement({
5357
- ...chunk2QHCOESN_js.newTableElement(chunk2U243ZEP_js.DEFAULT_TABLE_ROWS, chunk2U243ZEP_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5358
- id: chunk2QHCOESN_js.generateElementId()
5356
+ ...chunkWK56SFN7_js.newTableElement(chunk5TPQJWEO_js.DEFAULT_TABLE_ROWS, chunk5TPQJWEO_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5357
+ id: chunkWK56SFN7_js.generateElementId()
5359
5358
  });
5360
5359
  };
5361
5360
  const handleAddChart = (chartType) => {
5362
5361
  if (!activeSlide) {
5363
5362
  return;
5364
5363
  }
5365
- addElement(chunk2QHCOESN_js.createDefaultChartElement(chartType));
5364
+ addElement(chunkWK56SFN7_js.createDefaultChartElement(chartType));
5366
5365
  };
5367
5366
  const structured = createStructuredElementHandlers({
5368
5367
  activeSlide,
@@ -5432,7 +5431,7 @@ function useClipboardHandlers(input) {
5432
5431
  if (!selectedElement) {
5433
5432
  return;
5434
5433
  }
5435
- setClipboardPayload(chunk2QHCOESN_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5434
+ setClipboardPayload(chunkWK56SFN7_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5436
5435
  };
5437
5436
  const handleDelete = () => {
5438
5437
  const idsToDelete = effectiveSelectedIds;
@@ -5449,7 +5448,7 @@ function useClipboardHandlers(input) {
5449
5448
  handleDelete();
5450
5449
  };
5451
5450
  const insertClone = (source) => {
5452
- const clone = chunk2QHCOESN_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5451
+ const clone = chunkWK56SFN7_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5453
5452
  ops.updateActiveElements((els) => [...els, clone]);
5454
5453
  ops.applySelection(clone.id);
5455
5454
  history.markDirty();
@@ -5484,7 +5483,7 @@ function resolveShapePath(el) {
5484
5483
  return el.pathData;
5485
5484
  }
5486
5485
  if ("shapeType" in el && typeof el.shapeType === "string") {
5487
- const clipPath = chunkR2H3FHK6_js.getPresetShapeClipPath(el.shapeType);
5486
+ const clipPath = chunkWK56SFN7_js.getPresetShapeClipPath(el.shapeType);
5488
5487
  if (clipPath) {
5489
5488
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5490
5489
  if (svgPath) {
@@ -5535,7 +5534,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5535
5534
  return parts.join(" ");
5536
5535
  }
5537
5536
  function transformPathToGlobal(pathData, el) {
5538
- const polys = chunkR2H3FHK6_js.svgPathToPolygons(pathData);
5537
+ const polys = chunkWK56SFN7_js.svgPathToPolygons(pathData);
5539
5538
  if (polys.length === 0) {
5540
5539
  return pathData;
5541
5540
  }
@@ -5555,10 +5554,10 @@ function transformPathToGlobal(pathData, el) {
5555
5554
  y: pt.y * scaleY + el.y
5556
5555
  }))
5557
5556
  );
5558
- return chunkR2H3FHK6_js.polygonsToSvgPath(transformed);
5557
+ return chunkWK56SFN7_js.polygonsToSvgPath(transformed);
5559
5558
  }
5560
5559
  function transformPathToLocal(pathData, x, y, _width, _height) {
5561
- const polys = chunkR2H3FHK6_js.svgPathToPolygons(pathData);
5560
+ const polys = chunkWK56SFN7_js.svgPathToPolygons(pathData);
5562
5561
  if (polys.length === 0) {
5563
5562
  return pathData;
5564
5563
  }
@@ -5568,10 +5567,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5568
5567
  y: pt.y - y
5569
5568
  }))
5570
5569
  );
5571
- return chunkR2H3FHK6_js.polygonsToSvgPath(transformed);
5570
+ return chunkWK56SFN7_js.polygonsToSvgPath(transformed);
5572
5571
  }
5573
5572
  function pathBounds(pathData) {
5574
- const polys = chunkR2H3FHK6_js.svgPathToPolygons(pathData);
5573
+ const polys = chunkWK56SFN7_js.svgPathToPolygons(pathData);
5575
5574
  let minX = Infinity;
5576
5575
  let minY = Infinity;
5577
5576
  let maxX = -Infinity;
@@ -5630,7 +5629,7 @@ function useMergeShapesHandler(input) {
5630
5629
  let allFragments = [];
5631
5630
  let remaining = globalPaths[0];
5632
5631
  for (let i = 1; i < globalPaths.length; i++) {
5633
- const frags = chunkR2H3FHK6_js.mergeShapes("fragment", remaining, globalPaths[i]);
5632
+ const frags = chunkWK56SFN7_js.mergeShapes("fragment", remaining, globalPaths[i]);
5634
5633
  if (Array.isArray(frags)) {
5635
5634
  allFragments = frags;
5636
5635
  }
@@ -5659,7 +5658,7 @@ function useMergeShapesHandler(input) {
5659
5658
  bounds.height
5660
5659
  );
5661
5660
  const newEl = {
5662
- id: chunk2QHCOESN_js.generateElementId(),
5661
+ id: chunkWK56SFN7_js.generateElementId(),
5663
5662
  type: "shape",
5664
5663
  x: bounds.x,
5665
5664
  y: bounds.y,
@@ -5697,7 +5696,7 @@ function useMergeShapesHandler(input) {
5697
5696
  } else {
5698
5697
  let resultPath = globalPaths[0];
5699
5698
  for (let i = 1; i < globalPaths.length; i++) {
5700
- const result = chunkR2H3FHK6_js.mergeShapes(operation, resultPath, globalPaths[i]);
5699
+ const result = chunkWK56SFN7_js.mergeShapes(operation, resultPath, globalPaths[i]);
5701
5700
  if (typeof result === "string") {
5702
5701
  resultPath = result;
5703
5702
  }
@@ -5718,7 +5717,7 @@ function useMergeShapesHandler(input) {
5718
5717
  );
5719
5718
  const primary = targets[0];
5720
5719
  const newEl = {
5721
- id: chunk2QHCOESN_js.generateElementId(),
5720
+ id: chunkWK56SFN7_js.generateElementId(),
5722
5721
  type: "shape",
5723
5722
  x: bounds.x,
5724
5723
  y: bounds.y,
@@ -5781,7 +5780,7 @@ function useGroupAlignLayerHandlers(input) {
5781
5780
  if (ids.length < 2 || !activeSlide) {
5782
5781
  return;
5783
5782
  }
5784
- const { elements, groupId } = chunk2QHCOESN_js.groupElements(ops.activeElements, ids, chunk2QHCOESN_js.generateElementId());
5783
+ const { elements, groupId } = chunkWK56SFN7_js.groupElements(ops.activeElements, ids, chunkWK56SFN7_js.generateElementId());
5785
5784
  if (groupId === null) {
5786
5785
  return;
5787
5786
  }
@@ -5794,12 +5793,12 @@ function useGroupAlignLayerHandlers(input) {
5794
5793
  return;
5795
5794
  }
5796
5795
  const group = selectedElement;
5797
- const intoTemplate = chunk2QHCOESN_js.isTemplateElementId(group.id);
5796
+ const intoTemplate = chunkWK56SFN7_js.isTemplateElementId(group.id);
5798
5797
  const ungrouped = group.children.map((child) => ({
5799
5798
  ...structuredClone(child),
5800
5799
  // Keep child ids in the same store as the group so later edits route
5801
5800
  // correctly: template groups yield template-prefixed child ids.
5802
- id: intoTemplate ? chunk2QHCOESN_js.makeCloneId(true, child.id || group.id) : child.id || chunk2QHCOESN_js.generateElementId(),
5801
+ id: intoTemplate ? chunkWK56SFN7_js.makeCloneId(true, child.id || group.id) : child.id || chunkWK56SFN7_js.generateElementId(),
5803
5802
  x: child.x + group.x,
5804
5803
  y: child.y + group.y
5805
5804
  }));
@@ -5823,7 +5822,7 @@ function useGroupAlignLayerHandlers(input) {
5823
5822
  if (!edge) {
5824
5823
  return;
5825
5824
  }
5826
- const positions = chunk2QHCOESN_js.alignElements(selectedElements, edge);
5825
+ const positions = chunkWK56SFN7_js.alignElements(selectedElements, edge);
5827
5826
  for (const [id, pos] of positions) {
5828
5827
  const el = elementLookup.get(id);
5829
5828
  if (!el) {
@@ -5841,7 +5840,7 @@ function useGroupAlignLayerHandlers(input) {
5841
5840
  if (!distAxis) {
5842
5841
  return;
5843
5842
  }
5844
- const positions = chunk2QHCOESN_js.distributeElements(selectedElements, distAxis);
5843
+ const positions = chunkWK56SFN7_js.distributeElements(selectedElements, distAxis);
5845
5844
  for (const [id, pos] of positions) {
5846
5845
  const el = elementLookup.get(id);
5847
5846
  if (!el) {
@@ -5858,7 +5857,7 @@ function useGroupAlignLayerHandlers(input) {
5858
5857
  }
5859
5858
  const id = selectedElement.id;
5860
5859
  ops.updateActiveElements(
5861
- (els) => direction === "forward" ? chunk2QHCOESN_js.bringForward(els, id) : direction === "backward" ? chunk2QHCOESN_js.sendBackward(els, id) : els
5860
+ (els) => direction === "forward" ? chunkWK56SFN7_js.bringForward(els, id) : direction === "backward" ? chunkWK56SFN7_js.sendBackward(els, id) : els
5862
5861
  );
5863
5862
  history.markDirty();
5864
5863
  };
@@ -5868,7 +5867,7 @@ function useGroupAlignLayerHandlers(input) {
5868
5867
  }
5869
5868
  const id = selectedElement.id;
5870
5869
  ops.updateActiveElements(
5871
- (els) => direction === "front" ? chunk2QHCOESN_js.bringToFront(els, id) : chunk2QHCOESN_js.sendToBack(els, id)
5870
+ (els) => direction === "front" ? chunkWK56SFN7_js.bringToFront(els, id) : chunkWK56SFN7_js.sendToBack(els, id)
5872
5871
  );
5873
5872
  history.markDirty();
5874
5873
  };
@@ -5990,7 +5989,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
5990
5989
  function useSlideManagement(input) {
5991
5990
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
5992
5991
  const handleAddSlide = () => {
5993
- const newSlide = chunk2QHCOESN_js.createBlankSlide(slides.length + 1);
5992
+ const newSlide = chunkWK56SFN7_js.createBlankSlide(slides.length + 1);
5994
5993
  ops.updateSlides((prev) => {
5995
5994
  const next = [...prev];
5996
5995
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6053,7 +6052,7 @@ function useSlideManagement(input) {
6053
6052
  }
6054
6053
  const clone = {
6055
6054
  ...src,
6056
- id: chunk2QHCOESN_js.makeSlideId(),
6055
+ id: chunkWK56SFN7_js.makeSlideId(),
6057
6056
  elements: src.elements.map((el) => ({
6058
6057
  ...el,
6059
6058
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6085,7 +6084,7 @@ function useSlideManagement(input) {
6085
6084
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6086
6085
  const insertAt = activeSlideIndex + 1;
6087
6086
  const draft = {
6088
- ...chunk2QHCOESN_js.createBlankSlide(slides.length + 1),
6087
+ ...chunkWK56SFN7_js.createBlankSlide(slides.length + 1),
6089
6088
  layoutPath,
6090
6089
  ...layoutName ? { layoutName } : {}
6091
6090
  };
@@ -6146,7 +6145,7 @@ function createTableMergeHandlers(input) {
6146
6145
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6147
6146
  return;
6148
6147
  }
6149
- const newTableData = chunk2QHCOESN_js.mergeCells(
6148
+ const newTableData = chunkWK56SFN7_js.mergeCells(
6150
6149
  [
6151
6150
  { row: rowIndex, col: columnIndex },
6152
6151
  { row: rowIndex, col: nextColIdx }
@@ -6154,7 +6153,7 @@ function createTableMergeHandlers(input) {
6154
6153
  td
6155
6154
  );
6156
6155
  const updates = { tableData: newTableData };
6157
- const newRawXml = chunkR2H3FHK6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6156
+ const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6158
6157
  if (newRawXml) {
6159
6158
  updates.rawXml = newRawXml;
6160
6159
  }
@@ -6180,7 +6179,7 @@ function createTableMergeHandlers(input) {
6180
6179
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6181
6180
  return;
6182
6181
  }
6183
- const newTableData = chunk2QHCOESN_js.mergeCells(
6182
+ const newTableData = chunkWK56SFN7_js.mergeCells(
6184
6183
  [
6185
6184
  { row: rowIndex, col: columnIndex },
6186
6185
  { row: targetNextRowIdx, col: columnIndex }
@@ -6188,7 +6187,7 @@ function createTableMergeHandlers(input) {
6188
6187
  td
6189
6188
  );
6190
6189
  const updates = { tableData: newTableData };
6191
- const newRawXml = chunkR2H3FHK6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6190
+ const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6192
6191
  if (newRawXml) {
6193
6192
  updates.rawXml = newRawXml;
6194
6193
  }
@@ -6203,9 +6202,9 @@ function createTableMergeHandlers(input) {
6203
6202
  return;
6204
6203
  }
6205
6204
  const td = selectedElement.tableData;
6206
- const newTableData = chunk2QHCOESN_js.mergeCells(ts.selectedCells, td);
6205
+ const newTableData = chunkWK56SFN7_js.mergeCells(ts.selectedCells, td);
6207
6206
  const updates = { tableData: newTableData };
6208
- const newRawXml = chunkR2H3FHK6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6207
+ const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6209
6208
  if (newRawXml) {
6210
6209
  updates.rawXml = newRawXml;
6211
6210
  }
@@ -6222,9 +6221,9 @@ function createTableMergeHandlers(input) {
6222
6221
  }
6223
6222
  const { rowIndex, columnIndex } = ts;
6224
6223
  const td = selectedElement.tableData;
6225
- const newTableData = chunk2QHCOESN_js.splitCell(rowIndex, columnIndex, td);
6224
+ const newTableData = chunkWK56SFN7_js.splitCell(rowIndex, columnIndex, td);
6226
6225
  const updates = { tableData: newTableData };
6227
- const newRawXml = chunkR2H3FHK6_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6226
+ const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6228
6227
  if (newRawXml) {
6229
6228
  updates.rawXml = newRawXml;
6230
6229
  }
@@ -6268,7 +6267,7 @@ function createTableStructHandlers(input) {
6268
6267
  updates.tableData = { ...el.tableData, rows: newRows };
6269
6268
  }
6270
6269
  if (el.rawXml) {
6271
- const newRawXml = chunkR2H3FHK6_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6270
+ const newRawXml = chunkWK56SFN7_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6272
6271
  if (newRawXml) {
6273
6272
  updates.rawXml = newRawXml;
6274
6273
  }
@@ -6292,7 +6291,7 @@ function createTableStructHandlers(input) {
6292
6291
  const { rowIndex, columnIndex: colIndex } = ts;
6293
6292
  const updates = {};
6294
6293
  if (selectedElement.rawXml) {
6295
- const newRawXml = chunkR2H3FHK6_js.updateCellTextStyleInRawXml(
6294
+ const newRawXml = chunkWK56SFN7_js.updateCellTextStyleInRawXml(
6296
6295
  selectedElement,
6297
6296
  rowIndex,
6298
6297
  colIndex,
@@ -6356,9 +6355,9 @@ function createTableStructHandlers(input) {
6356
6355
  return;
6357
6356
  }
6358
6357
  const rowIdx = ts?.rowIndex ?? 0;
6359
- const newTableData = chunk2QHCOESN_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6358
+ const newTableData = chunkWK56SFN7_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6360
6359
  const updates = { tableData: newTableData };
6361
- const newRawXml = chunkR2H3FHK6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6360
+ const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6362
6361
  if (newRawXml) {
6363
6362
  updates.rawXml = newRawXml;
6364
6363
  }
@@ -6371,12 +6370,12 @@ function createTableStructHandlers(input) {
6371
6370
  }
6372
6371
  const td = selectedElement.tableData;
6373
6372
  const rowIdx = ts?.rowIndex ?? 0;
6374
- const newTableData = chunk2QHCOESN_js.deleteTableRow(td, rowIdx);
6373
+ const newTableData = chunkWK56SFN7_js.deleteTableRow(td, rowIdx);
6375
6374
  if (newTableData === td) {
6376
6375
  return;
6377
6376
  }
6378
6377
  const updates = { tableData: newTableData };
6379
- const newRawXml = chunkR2H3FHK6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6378
+ const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6380
6379
  if (newRawXml) {
6381
6380
  updates.rawXml = newRawXml;
6382
6381
  }
@@ -6388,9 +6387,9 @@ function createTableStructHandlers(input) {
6388
6387
  return;
6389
6388
  }
6390
6389
  const colIdx = ts?.columnIndex ?? 0;
6391
- const newTableData = chunk2QHCOESN_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6390
+ const newTableData = chunkWK56SFN7_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6392
6391
  const updates = { tableData: newTableData };
6393
- const newRawXml = chunkR2H3FHK6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6392
+ const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6394
6393
  if (newRawXml) {
6395
6394
  updates.rawXml = newRawXml;
6396
6395
  }
@@ -6403,12 +6402,12 @@ function createTableStructHandlers(input) {
6403
6402
  }
6404
6403
  const td = selectedElement.tableData;
6405
6404
  const colIdx = ts?.columnIndex ?? 0;
6406
- const newTableData = chunk2QHCOESN_js.deleteTableColumn(td, colIdx);
6405
+ const newTableData = chunkWK56SFN7_js.deleteTableColumn(td, colIdx);
6407
6406
  if (newTableData === td) {
6408
6407
  return;
6409
6408
  }
6410
6409
  const updates = { tableData: newTableData };
6411
- const newRawXml = chunkR2H3FHK6_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6410
+ const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6412
6411
  if (newRawXml) {
6413
6412
  updates.rawXml = newRawXml;
6414
6413
  }
@@ -6444,8 +6443,8 @@ async function renderToCanvas(element, options = {}) {
6444
6443
  return html2canvasPro(element, {
6445
6444
  ...options,
6446
6445
  onclone: async (doc, clonedEl) => {
6447
- await chunk2QHCOESN_js.normalizeColorsForCapture(doc, clonedEl);
6448
- chunk2QHCOESN_js.preprocessCssForCapture(clonedEl);
6446
+ await chunkWK56SFN7_js.normalizeColorsForCapture(doc, clonedEl);
6447
+ chunkWK56SFN7_js.preprocessCssForCapture(clonedEl);
6449
6448
  if (typeof userOnClone === "function") {
6450
6449
  userOnClone(doc, clonedEl);
6451
6450
  }
@@ -6501,7 +6500,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6501
6500
  }
6502
6501
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6503
6502
  const blob = await exportSlideToPngBlob(slideElement, options);
6504
- chunk2QHCOESN_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6503
+ chunkWK56SFN7_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6505
6504
  }
6506
6505
  async function copySlideToClipboard(slideElement, options = {}) {
6507
6506
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6523,15 +6522,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6523
6522
  continue;
6524
6523
  }
6525
6524
  const canvas = await renderElementToCanvas(stageEl, scale);
6526
- images.push(chunk2QHCOESN_js.canvasToJpegData(canvas));
6525
+ images.push(chunkWK56SFN7_js.canvasToJpegData(canvas));
6527
6526
  }
6528
6527
  onProgress?.(totalSlides, totalSlides);
6529
6528
  setActiveSlide(currentSlideIndex);
6530
6529
  if (images.length === 0) {
6531
- throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6530
+ throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6532
6531
  }
6533
- const pdfBlobUrl = chunk2U243ZEP_js.buildPdfFromImageData(images);
6534
- chunk2QHCOESN_js.downloadDataUrl(pdfBlobUrl, filename);
6532
+ const pdfBlobUrl = chunk5TPQJWEO_js.buildPdfFromImageData(images);
6533
+ chunkWK56SFN7_js.downloadDataUrl(pdfBlobUrl, filename);
6535
6534
  }
6536
6535
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6537
6536
  const { scale = 2, onProgress } = options;
@@ -6577,10 +6576,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6577
6576
  onProgress?.(totalSlides, totalSlides);
6578
6577
  setActiveSlide(currentSlideIndex);
6579
6578
  if (pages.length === 0) {
6580
- throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6579
+ throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6581
6580
  }
6582
- const pdfDataUrl = chunk2U243ZEP_js.buildNotesPdf(pages);
6583
- chunk2QHCOESN_js.downloadDataUrl(pdfDataUrl, filename);
6581
+ const pdfDataUrl = chunk5TPQJWEO_js.buildNotesPdf(pages);
6582
+ chunkWK56SFN7_js.downloadDataUrl(pdfDataUrl, filename);
6584
6583
  }
6585
6584
 
6586
6585
  // src/viewer/utils/export-video.ts
@@ -6611,7 +6610,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6611
6610
  }
6612
6611
  setActiveSlide(currentSlideIndex);
6613
6612
  if (slideCanvases.length === 0) {
6614
- throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6613
+ throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6615
6614
  }
6616
6615
  const firstCanvas = slideCanvases[0];
6617
6616
  const recordingCanvas = document.createElement("canvas");
@@ -6619,12 +6618,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6619
6618
  recordingCanvas.height = firstCanvas.height;
6620
6619
  const ctx = recordingCanvas.getContext("2d");
6621
6620
  if (!ctx) {
6622
- throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNo2dContext"]);
6621
+ throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNo2dContext"]);
6623
6622
  }
6624
6623
  const fps = 30;
6625
6624
  const stream = recordingCanvas.captureStream(fps);
6626
6625
  const recorder = new MediaRecorder(stream, {
6627
- mimeType: chunk2QHCOESN_js.pickSupportedMimeType([...chunk2QHCOESN_js.WEBM_MIME_CANDIDATES]),
6626
+ mimeType: chunkWK56SFN7_js.pickSupportedMimeType([...chunkWK56SFN7_js.WEBM_MIME_CANDIDATES]),
6628
6627
  videoBitsPerSecond: 5e6
6629
6628
  });
6630
6629
  const chunks = [];
@@ -6647,8 +6646,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6647
6646
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6648
6647
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6649
6648
  ctx.drawImage(slideCanvases[i], 0, 0);
6650
- const frameInterval = chunk2QHCOESN_js.fpsToFrameIntervalMs(fps);
6651
- const framesNeeded = chunk2QHCOESN_js.segmentFrameCount(duration, fps);
6649
+ const frameInterval = chunkWK56SFN7_js.fpsToFrameIntervalMs(fps);
6650
+ const framesNeeded = chunkWK56SFN7_js.segmentFrameCount(duration, fps);
6652
6651
  for (let f = 0; f < framesNeeded; f++) {
6653
6652
  if (signal?.aborted) {
6654
6653
  recorder.stop();
@@ -6695,9 +6694,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6695
6694
  }
6696
6695
  setActiveSlide(currentSlideIndex);
6697
6696
  if (frames.length === 0) {
6698
- throw new Error(chunkYIFO3WQO_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6697
+ throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6699
6698
  }
6700
- const gifBytes = chunk2QHCOESN_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6699
+ const gifBytes = chunkWK56SFN7_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6701
6700
  onProgress?.(totalSlides, totalSlides);
6702
6701
  const buf = new ArrayBuffer(gifBytes.length);
6703
6702
  new Uint8Array(buf).set(gifBytes);
@@ -6751,7 +6750,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6751
6750
  continue;
6752
6751
  }
6753
6752
  onProgress?.(processedCount, data.slides.length);
6754
- let svg = chunkR2H3FHK6_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6753
+ let svg = chunkWK56SFN7_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6755
6754
  if (embedFonts && fontFaces?.length) {
6756
6755
  svg = injectFontFaces(svg, fontFaces);
6757
6756
  }
@@ -6811,7 +6810,7 @@ function useExportSaveAs(input) {
6811
6810
  }
6812
6811
  setExportProgress(70);
6813
6812
  setExportStatusMessage("Writing README...");
6814
- const readme = chunk2QHCOESN_js.generatePackageReadme(pptxFilename);
6813
+ const readme = chunkWK56SFN7_js.generatePackageReadme(pptxFilename);
6815
6814
  pkgFolder.file("README.txt", readme);
6816
6815
  if (abortCtrl.signal.aborted) {
6817
6816
  throw new DOMException("Export cancelled", "AbortError");
@@ -6822,7 +6821,7 @@ function useExportSaveAs(input) {
6822
6821
  setExportProgress(95);
6823
6822
  setExportStatusMessage("Downloading...");
6824
6823
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6825
- chunk2QHCOESN_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6824
+ chunkWK56SFN7_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6826
6825
  setExportProgress(100);
6827
6826
  } catch (err) {
6828
6827
  if (err.name !== "AbortError") {
@@ -6845,7 +6844,7 @@ function useExportSaveAs(input) {
6845
6844
  const blob = new Blob([data], {
6846
6845
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6847
6846
  });
6848
- chunk2QHCOESN_js.downloadBlob(blob, `${baseName}.${ext}`);
6847
+ chunkWK56SFN7_js.downloadBlob(blob, `${baseName}.${ext}`);
6849
6848
  } catch (err) {
6850
6849
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6851
6850
  }
@@ -6858,14 +6857,14 @@ function useExportSaveAs(input) {
6858
6857
  const pptxGuides = guides.map((g) => ({
6859
6858
  id: g.id,
6860
6859
  orientation: g.axis === "h" ? "horz" : "vert",
6861
- positionEmu: chunkR2H3FHK6_js.guidePxToEmu(g.position)
6860
+ positionEmu: chunkWK56SFN7_js.guidePxToEmu(g.position)
6862
6861
  }));
6863
6862
  return {
6864
6863
  ...slide,
6865
6864
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6866
6865
  };
6867
6866
  });
6868
- const slidesToSave = chunk2U243ZEP_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6867
+ const slidesToSave = chunk5TPQJWEO_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6869
6868
  const saveOptions = {
6870
6869
  headerFooter,
6871
6870
  presentationProperties,
@@ -6922,7 +6921,7 @@ function safeConfirm(message) {
6922
6921
  }
6923
6922
  }
6924
6923
  function downloadBlob2(blob, filename) {
6925
- chunk2QHCOESN_js.downloadBlob(blob, chunk2QHCOESN_js.sanitizeDownloadFilename(filename));
6924
+ chunkWK56SFN7_js.downloadBlob(blob, chunkWK56SFN7_js.sanitizeDownloadFilename(filename));
6926
6925
  }
6927
6926
 
6928
6927
  // src/viewer/hooks/useExportHandlers.ts
@@ -7023,21 +7022,21 @@ function useExportHandlers(input) {
7023
7022
  {
7024
7023
  scale: 2,
7025
7024
  onProgress: (current, total) => {
7026
- setExportProgress(chunk2QHCOESN_js.slideProgressPercent(current, total));
7027
- setExportStatusMessage(chunk2QHCOESN_js.slideStatusLabel("Rendering", current, total));
7025
+ setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total));
7026
+ setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Rendering", current, total));
7028
7027
  },
7029
7028
  signal: abortCtrl.signal
7030
7029
  }
7031
7030
  );
7032
- setExportProgress(chunk2QHCOESN_js.EXPORT_ASSEMBLING_PERCENT);
7031
+ setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7033
7032
  setExportStatusMessage("Building PDF...");
7034
7033
  await new Promise((r) => {
7035
7034
  setTimeout(r, 100);
7036
7035
  });
7037
- setExportProgress(chunk2QHCOESN_js.EXPORT_DONE_PERCENT);
7036
+ setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7038
7037
  setExportStatusMessage("Done!");
7039
7038
  } catch (err) {
7040
- if (!chunk2QHCOESN_js.isExportAbortError(err)) {
7039
+ if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7041
7040
  console.error("[PowerPointViewer] PDF export failed:", err);
7042
7041
  }
7043
7042
  } finally {
@@ -7067,21 +7066,21 @@ function useExportHandlers(input) {
7067
7066
  {
7068
7067
  scale: 2,
7069
7068
  onProgress: (current, total) => {
7070
- setExportProgress(chunk2QHCOESN_js.slideProgressPercent(current, total));
7071
- setExportStatusMessage(chunk2QHCOESN_js.slideStatusLabel("Rendering", current, total));
7069
+ setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total));
7070
+ setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Rendering", current, total));
7072
7071
  },
7073
7072
  signal: abortCtrl.signal
7074
7073
  }
7075
7074
  );
7076
- setExportProgress(chunk2QHCOESN_js.EXPORT_ASSEMBLING_PERCENT);
7075
+ setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7077
7076
  setExportStatusMessage("Building PDF...");
7078
7077
  await new Promise((r) => {
7079
7078
  setTimeout(r, 100);
7080
7079
  });
7081
- setExportProgress(chunk2QHCOESN_js.EXPORT_DONE_PERCENT);
7080
+ setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7082
7081
  setExportStatusMessage("Done!");
7083
7082
  } catch (err) {
7084
- if (!chunk2QHCOESN_js.isExportAbortError(err)) {
7083
+ if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7085
7084
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7086
7085
  }
7087
7086
  } finally {
@@ -7122,22 +7121,22 @@ function useExportHandlers(input) {
7122
7121
  scale: 1,
7123
7122
  slideDurationMs: 3e3,
7124
7123
  onProgress: (current, total) => {
7125
- setExportProgress(chunk2QHCOESN_js.slideProgressPercent(current, total, 45));
7126
- setExportStatusMessage(chunk2QHCOESN_js.slideStatusLabel("Capturing", current, total));
7124
+ setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total, 45));
7125
+ setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Capturing", current, total));
7127
7126
  },
7128
7127
  onRecordProgress: (current, total) => {
7129
- setExportProgress(chunk2QHCOESN_js.recordProgressPercent(current, total));
7130
- setExportStatusMessage(chunk2QHCOESN_js.slideStatusLabel("Recording", current, total));
7128
+ setExportProgress(chunkWK56SFN7_js.recordProgressPercent(current, total));
7129
+ setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Recording", current, total));
7131
7130
  },
7132
7131
  signal: abortCtrl.signal
7133
7132
  }
7134
7133
  );
7135
- setExportProgress(chunk2QHCOESN_js.EXPORT_ASSEMBLING_PERCENT);
7134
+ setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7136
7135
  setExportStatusMessage("Saving file...");
7137
7136
  downloadBlob2(blob, "presentation.webm");
7138
- setExportProgress(chunk2QHCOESN_js.EXPORT_DONE_PERCENT);
7137
+ setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7139
7138
  } catch (err) {
7140
- if (!chunk2QHCOESN_js.isExportAbortError(err)) {
7139
+ if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7141
7140
  console.error("[PowerPointViewer] Video export failed:", err);
7142
7141
  }
7143
7142
  } finally {
@@ -7165,18 +7164,18 @@ function useExportHandlers(input) {
7165
7164
  scale: 0.5,
7166
7165
  slideDurationMs: 2e3,
7167
7166
  onProgress: (current, total) => {
7168
- setExportProgress(chunk2QHCOESN_js.slideProgressPercent(current, total));
7169
- setExportStatusMessage(chunk2QHCOESN_js.slideStatusLabel("Encoding", current, total));
7167
+ setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total));
7168
+ setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Encoding", current, total));
7170
7169
  },
7171
7170
  signal: abortCtrl.signal
7172
7171
  }
7173
7172
  );
7174
- setExportProgress(chunk2QHCOESN_js.EXPORT_ASSEMBLING_PERCENT);
7173
+ setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7175
7174
  setExportStatusMessage("Saving file...");
7176
7175
  downloadBlob2(blob, "presentation.gif");
7177
- setExportProgress(chunk2QHCOESN_js.EXPORT_DONE_PERCENT);
7176
+ setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7178
7177
  } catch (err) {
7179
- if (!chunk2QHCOESN_js.isExportAbortError(err)) {
7178
+ if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7180
7179
  console.error("[PowerPointViewer] GIF export failed:", err);
7181
7180
  }
7182
7181
  } finally {
@@ -7216,7 +7215,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7216
7215
  }
7217
7216
  printWindow.document.open();
7218
7217
  printWindow.document.write(
7219
- chunk2QHCOESN_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7218
+ chunkWK56SFN7_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7220
7219
  );
7221
7220
  printWindow.document.close();
7222
7221
  printWindow.focus();
@@ -7277,7 +7276,7 @@ function usePrintHandlers(input) {
7277
7276
  if (svgs.length === 0) {
7278
7277
  return;
7279
7278
  }
7280
- const printDoc = chunk2QHCOESN_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7279
+ const printDoc = chunkWK56SFN7_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7281
7280
  title: "Slides (Vector)",
7282
7281
  orientation: settings.orientation,
7283
7282
  colorFilter
@@ -7313,7 +7312,7 @@ function usePrintHandlers(input) {
7313
7312
  if (settings.printWhat === "outline") {
7314
7313
  openPrintWindow(
7315
7314
  "Outline",
7316
- `<div class="outline-page">${chunk2QHCOESN_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7315
+ `<div class="outline-page">${chunkWK56SFN7_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7317
7316
  settings.orientation,
7318
7317
  colorFilter,
7319
7318
  settings.frameSlides
@@ -7338,7 +7337,7 @@ function usePrintHandlers(input) {
7338
7337
  if (settings.printWhat === "slides") {
7339
7338
  openPrintWindow(
7340
7339
  "Slides",
7341
- chunk2QHCOESN_js.buildSlidesHtml(slideImages, slideIndices),
7340
+ chunkWK56SFN7_js.buildSlidesHtml(slideImages, slideIndices),
7342
7341
  settings.orientation,
7343
7342
  colorFilter,
7344
7343
  settings.frameSlides
@@ -7348,7 +7347,7 @@ function usePrintHandlers(input) {
7348
7347
  if (settings.printWhat === "notes") {
7349
7348
  openPrintWindow(
7350
7349
  "Notes Pages",
7351
- chunk2QHCOESN_js.buildNotesHtml(slideImages, slideIndices, slides),
7350
+ chunkWK56SFN7_js.buildNotesHtml(slideImages, slideIndices, slides),
7352
7351
  "portrait",
7353
7352
  colorFilter,
7354
7353
  settings.frameSlides
@@ -7359,7 +7358,7 @@ function usePrintHandlers(input) {
7359
7358
  const spp = settings.slidesPerPage;
7360
7359
  openPrintWindow(
7361
7360
  `Handout ${spp} per page`,
7362
- chunk2QHCOESN_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7361
+ chunkWK56SFN7_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7363
7362
  "portrait",
7364
7363
  colorFilter,
7365
7364
  settings.frameSlides
@@ -7423,8 +7422,8 @@ function useThemeHandlers(input) {
7423
7422
  return;
7424
7423
  }
7425
7424
  await handler.updateThemeColorScheme(colorScheme);
7426
- const previousMap = theme?.colorScheme ? chunkR2H3FHK6_js.buildThemeColorMap(theme.colorScheme) : {};
7427
- setSlides((prev) => chunkR2H3FHK6_js.reResolveSlideColors(prev, previousMap, colorScheme));
7425
+ const previousMap = theme?.colorScheme ? chunkWK56SFN7_js.buildThemeColorMap(theme.colorScheme) : {};
7426
+ setSlides((prev) => chunkWK56SFN7_js.reResolveSlideColors(prev, previousMap, colorScheme));
7428
7427
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7429
7428
  bumpHistory();
7430
7429
  history.markDirty();
@@ -7529,7 +7528,7 @@ function useThemeSwitching(input) {
7529
7528
  }
7530
7529
  try {
7531
7530
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7532
- const newData = chunkR2H3FHK6_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7531
+ const newData = chunkWK56SFN7_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7533
7532
  onDataChange(newData);
7534
7533
  onThemeChanged?.(preset);
7535
7534
  } catch (error) {
@@ -7546,7 +7545,7 @@ function useThemeSwitching(input) {
7546
7545
  }
7547
7546
  try {
7548
7547
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7549
- const newData = chunkR2H3FHK6_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7548
+ const newData = chunkWK56SFN7_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7550
7549
  onDataChange(newData);
7551
7550
  } catch (error) {
7552
7551
  console.error("Failed to switch to custom theme:", error);
@@ -7558,12 +7557,12 @@ function useThemeSwitching(input) {
7558
7557
  if (!data?.theme?.colorScheme) {
7559
7558
  return void 0;
7560
7559
  }
7561
- return chunkR2H3FHK6_js.THEME_PRESETS.find(
7562
- (p) => chunkR2H3FHK6_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7560
+ return chunkWK56SFN7_js.THEME_PRESETS.find(
7561
+ (p) => chunkWK56SFN7_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7563
7562
  );
7564
7563
  }, [data?.theme?.colorScheme]);
7565
7564
  return {
7566
- presets: chunkR2H3FHK6_js.THEME_PRESETS,
7565
+ presets: chunkWK56SFN7_js.THEME_PRESETS,
7567
7566
  switchToPreset,
7568
7567
  switchToCustom,
7569
7568
  currentPreset
@@ -7638,7 +7637,7 @@ function usePropertyHandlers(input) {
7638
7637
  }
7639
7638
  try {
7640
7639
  const ab = await file.arrayBuffer();
7641
- const h = new chunkR2H3FHK6_js.PptxHandler();
7640
+ const h = new chunkWK56SFN7_js.PptxHandler();
7642
7641
  const other = await h.load(ab);
7643
7642
  if (!other) {
7644
7643
  return;
@@ -7648,7 +7647,7 @@ function usePropertyHandlers(input) {
7648
7647
  width: canvasSize.width,
7649
7648
  height: canvasSize.height
7650
7649
  };
7651
- setCompareResult(chunk2QHCOESN_js.comparePresentation(cur, other));
7650
+ setCompareResult(chunkWK56SFN7_js.comparePresentation(cur, other));
7652
7651
  setIsComparePanelOpen(true);
7653
7652
  } catch (err) {
7654
7653
  console.warn("Compare failed:", err);
@@ -7665,7 +7664,7 @@ function usePropertyHandlers(input) {
7665
7664
  if (!diff || diff.status === "unchanged") {
7666
7665
  return;
7667
7666
  }
7668
- setSlides((prev) => chunk2QHCOESN_js.applyAcceptSlide(prev, diff));
7667
+ setSlides((prev) => chunkWK56SFN7_js.applyAcceptSlide(prev, diff));
7669
7668
  setIsDirty(true);
7670
7669
  },
7671
7670
  [compareResult, setSlides, setIsDirty]
@@ -7676,10 +7675,10 @@ function usePropertyHandlers(input) {
7676
7675
  if (!compareResult) {
7677
7676
  return;
7678
7677
  }
7679
- setSlides((prev) => chunk2QHCOESN_js.applyAcceptAllSlides(prev, compareResult));
7678
+ setSlides((prev) => chunkWK56SFN7_js.applyAcceptAllSlides(prev, compareResult));
7680
7679
  setIsDirty(true);
7681
7680
  }, [compareResult, setSlides, setIsDirty]);
7682
- const usedFontFamilies = react.useMemo(() => chunk2QHCOESN_js.collectUsedFonts(slides), [slides]);
7681
+ const usedFontFamilies = react.useMemo(() => chunkWK56SFN7_js.collectUsedFonts(slides), [slides]);
7683
7682
  return {
7684
7683
  handleUpdateNotes,
7685
7684
  handleUpdateSlide,
@@ -7798,7 +7797,7 @@ function useIsMobile(input) {
7798
7797
  const containerRef = input?.containerRef;
7799
7798
  const isTouchDevice = react.useSyncExternalStore(
7800
7799
  subscribeTouchCapability,
7801
- chunk2QHCOESN_js.detectTouchDevice,
7800
+ chunkWK56SFN7_js.detectTouchDevice,
7802
7801
  () => false
7803
7802
  // server snapshot
7804
7803
  );
@@ -7814,7 +7813,7 @@ function useIsMobile(input) {
7814
7813
  }
7815
7814
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7816
7815
  });
7817
- const [orientation, setOrientation] = react.useState(chunk2QHCOESN_js.detectOrientation);
7816
+ const [orientation, setOrientation] = react.useState(chunkWK56SFN7_js.detectOrientation);
7818
7817
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7819
7818
  const [initialViewportHeight] = react.useState(
7820
7819
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7858,7 +7857,7 @@ function useIsMobile(input) {
7858
7857
  return;
7859
7858
  }
7860
7859
  const handleOrientationChange = () => {
7861
- setOrientation(chunk2QHCOESN_js.detectOrientation());
7860
+ setOrientation(chunkWK56SFN7_js.detectOrientation());
7862
7861
  };
7863
7862
  if (screen.orientation) {
7864
7863
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7888,9 +7887,9 @@ function useIsMobile(input) {
7888
7887
  window.addEventListener("resize", handleResize);
7889
7888
  return () => window.removeEventListener("resize", handleResize);
7890
7889
  }, [isTouchDevice, initialViewportHeight]);
7891
- const isMobile = chunk2QHCOESN_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7892
- const isTablet = !isMobile && containerWidth >= chunk2QHCOESN_js.MOBILE_BREAKPOINT && containerWidth < chunk2QHCOESN_js.TABLET_BREAKPOINT;
7893
- const isDesktop = !isMobile && containerWidth >= chunk2QHCOESN_js.TABLET_BREAKPOINT;
7890
+ const isMobile = chunkWK56SFN7_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7891
+ const isTablet = !isMobile && containerWidth >= chunkWK56SFN7_js.MOBILE_BREAKPOINT && containerWidth < chunkWK56SFN7_js.TABLET_BREAKPOINT;
7892
+ const isDesktop = !isMobile && containerWidth >= chunkWK56SFN7_js.TABLET_BREAKPOINT;
7894
7893
  return {
7895
7894
  isMobile,
7896
7895
  isTablet,
@@ -7951,11 +7950,11 @@ function useViewerDialogs(input) {
7951
7950
  );
7952
7951
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
7953
7952
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
7954
- () => typeof window !== "undefined" ? chunk2QHCOESN_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
7953
+ () => typeof window !== "undefined" ? chunkWK56SFN7_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
7955
7954
  );
7956
7955
  react.useEffect(() => {
7957
7956
  const handleWindow = () => setIsNarrowViewport(
7958
- chunk2QHCOESN_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
7957
+ chunkWK56SFN7_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
7959
7958
  );
7960
7959
  let observer = null;
7961
7960
  let raf = 0;
@@ -7969,12 +7968,12 @@ function useViewerDialogs(input) {
7969
7968
  const entry = entries[0];
7970
7969
  if (entry) {
7971
7970
  setIsNarrowViewport(
7972
- chunk2QHCOESN_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
7971
+ chunkWK56SFN7_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
7973
7972
  );
7974
7973
  }
7975
7974
  });
7976
7975
  observer.observe(el);
7977
- setIsNarrowViewport(chunk2QHCOESN_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
7976
+ setIsNarrowViewport(chunkWK56SFN7_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
7978
7977
  };
7979
7978
  attach();
7980
7979
  window.addEventListener("resize", handleWindow);
@@ -8132,12 +8131,12 @@ function useViewerDialogs(input) {
8132
8131
  }
8133
8132
  function computeGridSpacingPx(presentationGridSpacing) {
8134
8133
  if (presentationGridSpacing) {
8135
- const px = Math.round(presentationGridSpacing.cx / chunk2U243ZEP_js.EMU_PER_PX);
8134
+ const px = Math.round(presentationGridSpacing.cx / chunk5TPQJWEO_js.EMU_PER_PX);
8136
8135
  if (px > 0) {
8137
8136
  return px;
8138
8137
  }
8139
8138
  }
8140
- return chunk2U243ZEP_js.GRID_SIZE;
8139
+ return chunk5TPQJWEO_js.GRID_SIZE;
8141
8140
  }
8142
8141
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8143
8142
  if (activeCustomShowId) {
@@ -8151,8 +8150,8 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8151
8150
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
8152
8151
  }
8153
8152
  function computeSlideSectionGroups(slides, sections) {
8154
- return chunk2QHCOESN_js.groupSlidesBySection(sections, slides).map((group) => ({
8155
- id: group.section?.id ?? (sections.length > 0 ? chunk2U243ZEP_js.UNGROUPED_SECTION_ID : "default"),
8153
+ return chunkWK56SFN7_js.groupSlidesBySection(sections, slides).map((group) => ({
8154
+ id: group.section?.id ?? (sections.length > 0 ? chunk5TPQJWEO_js.UNGROUPED_SECTION_ID : "default"),
8156
8155
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8157
8156
  slideIndexes: group.slideIndexes,
8158
8157
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8207,7 +8206,7 @@ function useDerivedSlideState(input) {
8207
8206
  );
8208
8207
  const slideSectionGroups = react.useMemo(
8209
8208
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8210
- if (group.id === chunk2U243ZEP_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8209
+ if (group.id === chunk5TPQJWEO_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8211
8210
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8212
8211
  }
8213
8212
  if (group.id === "default" && group.label === "Slides") {
@@ -8313,7 +8312,7 @@ function useAnnotationHandlers(input) {
8313
8312
  if (nextMode === "present") {
8314
8313
  presentation.enterPresentMode();
8315
8314
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8316
- chunk2U243ZEP_js.stopAllPersistentAudio();
8315
+ chunk5TPQJWEO_js.stopAllPersistentAudio();
8317
8316
  pendingModeAfterAnnotationsRef.current = nextMode;
8318
8317
  if (promptKeepInkAnnotations) {
8319
8318
  setShowKeepAnnotationsDialog(true);
@@ -8322,7 +8321,7 @@ function useAnnotationHandlers(input) {
8322
8321
  }
8323
8322
  } else {
8324
8323
  if (mode === "present") {
8325
- chunk2U243ZEP_js.stopAllPersistentAudio();
8324
+ chunk5TPQJWEO_js.stopAllPersistentAudio();
8326
8325
  }
8327
8326
  setMode(nextMode);
8328
8327
  }
@@ -8388,13 +8387,13 @@ function useSerialize(input) {
8388
8387
  let processedSlide = slide;
8389
8388
  if (pendingEditId) {
8390
8389
  const updatedElements = slide.elements.map((el) => {
8391
- if (el.id !== pendingEditId || !chunkR2H3FHK6_js.hasTextProperties(el)) {
8390
+ if (el.id !== pendingEditId || !chunkWK56SFN7_js.hasTextProperties(el)) {
8392
8391
  return el;
8393
8392
  }
8394
8393
  return {
8395
8394
  ...el,
8396
8395
  text: pendingEditText,
8397
- textSegments: chunk2QHCOESN_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8396
+ textSegments: chunkWK56SFN7_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8398
8397
  };
8399
8398
  });
8400
8399
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8407,14 +8406,14 @@ function useSerialize(input) {
8407
8406
  const pptxGuides = guides.map((g) => ({
8408
8407
  id: g.id,
8409
8408
  orientation: g.axis === "h" ? "horz" : "vert",
8410
- positionEmu: chunkR2H3FHK6_js.guidePxToEmu(g.position)
8409
+ positionEmu: chunkWK56SFN7_js.guidePxToEmu(g.position)
8411
8410
  }));
8412
8411
  return {
8413
8412
  ...processedSlide,
8414
8413
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8415
8414
  };
8416
8415
  });
8417
- const slidesToSave = chunk2U243ZEP_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8416
+ const slidesToSave = chunk5TPQJWEO_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8418
8417
  const saveOptions = {
8419
8418
  headerFooter,
8420
8419
  presentationProperties,
@@ -8588,7 +8587,7 @@ function usePresentationSetup(input) {
8588
8587
  setShowKeepAnnotationsDialog(true);
8589
8588
  } else {
8590
8589
  if (mode === "present" && nextMode !== "present") {
8591
- chunk2U243ZEP_js.stopAllPersistentAudio();
8590
+ chunk5TPQJWEO_js.stopAllPersistentAudio();
8592
8591
  stopAnimationSound();
8593
8592
  }
8594
8593
  setMode(nextMode);
@@ -8642,10 +8641,10 @@ function usePresentationSetup(input) {
8642
8641
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8643
8642
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8644
8643
  onSaveRehearsalTimings: (timings) => {
8645
- setSlides((prev) => chunk2QHCOESN_js.applyRehearsalTimings(prev, timings));
8644
+ setSlides((prev) => chunkWK56SFN7_js.applyRehearsalTimings(prev, timings));
8646
8645
  history.markDirty();
8647
8646
  },
8648
- loopContinuously: chunk2QHCOESN_js.shouldLoopContinuously(presentationProperties),
8647
+ loopContinuously: chunkWK56SFN7_js.shouldLoopContinuously(presentationProperties),
8649
8648
  showWithAnimation: presentationProperties.showWithAnimation,
8650
8649
  useTimings: presentationProperties.advanceMode !== "manual",
8651
8650
  endWithBlackSlide
@@ -8807,7 +8806,7 @@ function useEditorOperations(input) {
8807
8806
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8808
8807
  react.useEffect(() => {
8809
8808
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8810
- copiedFormatRef.current = chunk2QHCOESN_js.copyFormatFromElement(selectedElement);
8809
+ copiedFormatRef.current = chunkWK56SFN7_js.copyFormatFromElement(selectedElement);
8811
8810
  } else if (!formatPainterActive) {
8812
8811
  copiedFormatRef.current = null;
8813
8812
  }
@@ -8833,12 +8832,12 @@ function useEditorOperations(input) {
8833
8832
  e.stopPropagation();
8834
8833
  const element = elementLookup.get(elementId);
8835
8834
  if (element) {
8836
- const updated = chunk2QHCOESN_js.applyFormatToElement(element, copiedFormatRef.current);
8835
+ const updated = chunkWK56SFN7_js.applyFormatToElement(element, copiedFormatRef.current);
8837
8836
  const updates = {};
8838
- if (chunkR2H3FHK6_js.hasShapeProperties(updated)) {
8837
+ if (chunkWK56SFN7_js.hasShapeProperties(updated)) {
8839
8838
  updates.shapeStyle = updated.shapeStyle;
8840
8839
  }
8841
- if (chunkR2H3FHK6_js.hasTextProperties(updated)) {
8840
+ if (chunkWK56SFN7_js.hasTextProperties(updated)) {
8842
8841
  updates.textStyle = updated.textStyle;
8843
8842
  }
8844
8843
  ops.updateElementById(elementId, updates);
@@ -8985,7 +8984,7 @@ function collectReferencedFontFamilies(slides) {
8985
8984
  const families = /* @__PURE__ */ new Set();
8986
8985
  for (const slide of slides) {
8987
8986
  for (const el of slide.elements) {
8988
- if (chunkR2H3FHK6_js.hasTextProperties(el) && el.textSegments) {
8987
+ if (chunkWK56SFN7_js.hasTextProperties(el) && el.textSegments) {
8989
8988
  for (const seg of el.textSegments) {
8990
8989
  if (seg.style.fontFamily) {
8991
8990
  families.add(seg.style.fontFamily);
@@ -9554,7 +9553,7 @@ function useViewerIntegration(input) {
9554
9553
  return zoom.scale;
9555
9554
  },
9556
9555
  setZoom(level) {
9557
- zoom.setScale(Math.min(Math.max(level, chunk2U243ZEP_js.MIN_ZOOM_SCALE), chunk2U243ZEP_js.MAX_ZOOM_SCALE));
9556
+ zoom.setScale(Math.min(Math.max(level, chunk5TPQJWEO_js.MIN_ZOOM_SCALE), chunk5TPQJWEO_js.MAX_ZOOM_SCALE));
9558
9557
  },
9559
9558
  zoomIn() {
9560
9559
  zoom.handleZoomIn();
@@ -9769,7 +9768,7 @@ function useReducedMotion() {
9769
9768
  }
9770
9769
  function useViewerOptions() {
9771
9770
  const storeRef = react.useRef(null);
9772
- storeRef.current ??= chunk2QHCOESN_js.createViewerOptionsStore();
9771
+ storeRef.current ??= chunkWK56SFN7_js.createViewerOptionsStore();
9773
9772
  const store = storeRef.current;
9774
9773
  const options = react.useSyncExternalStore(
9775
9774
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9778,9 +9777,9 @@ function useViewerOptions() {
9778
9777
  );
9779
9778
  return { optionsStore: store, options };
9780
9779
  }
9781
- var KNOWN_TAB_IDS = new Set(chunk2QHCOESN_js.TOOLBAR_TABS.map((tab) => tab.id));
9780
+ var KNOWN_TAB_IDS = new Set(chunkWK56SFN7_js.TOOLBAR_TABS.map((tab) => tab.id));
9782
9781
  function computeToolbarVisibility(hiddenActions) {
9783
- const isHidden = (id) => chunk2QHCOESN_js.isActionHidden(id, hiddenActions);
9782
+ const isHidden = (id) => chunkWK56SFN7_js.isActionHidden(id, hiddenActions);
9784
9783
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9785
9784
  return { isHidden, isTabVisible };
9786
9785
  }
@@ -9865,13 +9864,12 @@ function useYjsDocumentSync({
9865
9864
  return;
9866
9865
  }
9867
9866
  try {
9868
- const { PptxHandler: PptxHandler2 } = await import('./dist-ZCJLIRYG.js');
9869
- const handler = new PptxHandler2();
9867
+ const handler = new chunkWK56SFN7_js.PptxHandler();
9870
9868
  await handler.load(sourceBytes.buffer);
9871
- const currentSlides = chunk2QHCOESN_js.readSlidesFromYDoc(
9869
+ const currentSlides = chunkWK56SFN7_js.readSlidesFromYDoc(
9872
9870
  doc
9873
9871
  );
9874
- const slidesToSave = chunk2U243ZEP_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9872
+ const slidesToSave = chunk5TPQJWEO_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9875
9873
  const bytes = await handler.save(slidesToSave);
9876
9874
  config.onWriteBack(bytes);
9877
9875
  } catch {
@@ -9886,7 +9884,7 @@ function useYjsDocumentSync({
9886
9884
  if (!doc || !isConnected) {
9887
9885
  return;
9888
9886
  }
9889
- const docSlides = chunk2QHCOESN_js.readSlidesFromYDoc(
9887
+ const docSlides = chunkWK56SFN7_js.readSlidesFromYDoc(
9890
9888
  doc
9891
9889
  );
9892
9890
  if (docSlides.length === 0) {
@@ -9908,11 +9906,11 @@ function useYjsDocumentSync({
9908
9906
  lastSyncedRef.current = serialized;
9909
9907
  void (async () => {
9910
9908
  const factories = await getFactories();
9911
- chunk2QHCOESN_js.reconcileSlidesInYDoc(
9909
+ chunkWK56SFN7_js.reconcileSlidesInYDoc(
9912
9910
  slides,
9913
9911
  doc,
9914
9912
  factories,
9915
- chunk2QHCOESN_js.LOCAL_SYNC_ORIGIN
9913
+ chunkWK56SFN7_js.LOCAL_SYNC_ORIGIN
9916
9914
  );
9917
9915
  scheduleWriteBack();
9918
9916
  })();
@@ -9926,10 +9924,10 @@ function useYjsDocumentSync({
9926
9924
  return;
9927
9925
  }
9928
9926
  const handleChange = (_events, transaction) => {
9929
- if (transaction?.origin === chunk2QHCOESN_js.LOCAL_SYNC_ORIGIN) {
9927
+ if (transaction?.origin === chunkWK56SFN7_js.LOCAL_SYNC_ORIGIN) {
9930
9928
  return;
9931
9929
  }
9932
- const remoteSlides = chunk2QHCOESN_js.readSlidesFromYDoc(
9930
+ const remoteSlides = chunkWK56SFN7_js.readSlidesFromYDoc(
9933
9931
  doc
9934
9932
  );
9935
9933
  if (remoteSlides.length === 0) {
@@ -9945,7 +9943,7 @@ function useYjsDocumentSync({
9945
9943
  isApplyingRemoteRef.current = false;
9946
9944
  scheduleWriteBack();
9947
9945
  };
9948
- const unobserve = chunk2QHCOESN_js.observeYDocSlides(
9946
+ const unobserve = chunkWK56SFN7_js.observeYDocSlides(
9949
9947
  doc,
9950
9948
  handleChange
9951
9949
  );
@@ -9983,7 +9981,7 @@ function useBroadcastFollower({
9983
9981
  if (!broadcaster) {
9984
9982
  return;
9985
9983
  }
9986
- if (!chunk2QHCOESN_js.shouldAutoFollowBroadcaster({
9984
+ if (!chunkWK56SFN7_js.shouldAutoFollowBroadcaster({
9987
9985
  localRole: collab.config.role,
9988
9986
  broadcasterRole: broadcaster.role
9989
9987
  })) {
@@ -10143,10 +10141,10 @@ function useTouchGestures(input) {
10143
10141
  if (!el || !enabled) {
10144
10142
  return;
10145
10143
  }
10146
- const recognizer = chunk2QHCOESN_js.createTouchGestureRecognizer({
10144
+ const recognizer = chunkWK56SFN7_js.createTouchGestureRecognizer({
10147
10145
  getScale: () => scaleRef.current,
10148
- minScale: chunk2U243ZEP_js.MIN_ZOOM_SCALE,
10149
- maxScale: chunk2U243ZEP_js.MAX_ZOOM_SCALE,
10146
+ minScale: chunk5TPQJWEO_js.MIN_ZOOM_SCALE,
10147
+ maxScale: chunk5TPQJWEO_js.MAX_ZOOM_SCALE,
10150
10148
  callbacks: {
10151
10149
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10152
10150
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10186,7 +10184,7 @@ function scrollFocusedIntoView(keyboardInset) {
10186
10184
  return;
10187
10185
  }
10188
10186
  const rect = active.getBoundingClientRect();
10189
- const delta = chunk2QHCOESN_js.computeScrollDelta(
10187
+ const delta = chunkWK56SFN7_js.computeScrollDelta(
10190
10188
  { top: rect.top, bottom: rect.bottom },
10191
10189
  window.innerHeight,
10192
10190
  keyboardInset
@@ -10206,8 +10204,8 @@ function useKeyboardInsets(enabled = true) {
10206
10204
  return;
10207
10205
  }
10208
10206
  const update = () => {
10209
- const metrics = chunk2QHCOESN_js.readViewportMetrics(window);
10210
- const inset = metrics ? chunk2QHCOESN_js.computeKeyboardInset(metrics) : 0;
10207
+ const metrics = chunkWK56SFN7_js.readViewportMetrics(window);
10208
+ const inset = metrics ? chunkWK56SFN7_js.computeKeyboardInset(metrics) : 0;
10211
10209
  setKeyboardInset(inset);
10212
10210
  if (inset > 0) {
10213
10211
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10218,8 +10216,8 @@ function useKeyboardInsets(enabled = true) {
10218
10216
  vv.addEventListener("scroll", update);
10219
10217
  const onFocusIn = () => {
10220
10218
  window.requestAnimationFrame(() => {
10221
- const metrics = chunk2QHCOESN_js.readViewportMetrics(window);
10222
- const inset = metrics ? chunk2QHCOESN_js.computeKeyboardInset(metrics) : 0;
10219
+ const metrics = chunkWK56SFN7_js.readViewportMetrics(window);
10220
+ const inset = metrics ? chunkWK56SFN7_js.computeKeyboardInset(metrics) : 0;
10223
10221
  if (inset > 0) {
10224
10222
  scrollFocusedIntoView(inset);
10225
10223
  }
@@ -10232,7 +10230,7 @@ function useKeyboardInsets(enabled = true) {
10232
10230
  document.removeEventListener("focusin", onFocusIn);
10233
10231
  };
10234
10232
  }, [enabled]);
10235
- return { keyboardInset, isKeyboardOpen: chunk2QHCOESN_js.isKeyboardOpen(keyboardInset) };
10233
+ return { keyboardInset, isKeyboardOpen: chunkWK56SFN7_js.isKeyboardOpen(keyboardInset) };
10236
10234
  }
10237
10235
 
10238
10236
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10287,13 +10285,13 @@ function buildCanvasProps(input) {
10287
10285
  if (mode === "present") {
10288
10286
  presentation.handlePresentationAction(action);
10289
10287
  } else if (action.url) {
10290
- chunk2QHCOESN_js.safeOpenUrl(action.url);
10288
+ chunkWK56SFN7_js.safeOpenUrl(action.url);
10291
10289
  }
10292
10290
  };
10293
10291
  const handleHyperlinkClick = (url) => {
10294
- if (chunk2QHCOESN_js.isPpactionUrl(url)) {
10292
+ if (chunkWK56SFN7_js.isPpactionUrl(url)) {
10295
10293
  if (mode === "present") {
10296
- const parsed = chunk2QHCOESN_js.parsePpactionUrl(url);
10294
+ const parsed = chunkWK56SFN7_js.parsePpactionUrl(url);
10297
10295
  if (parsed) {
10298
10296
  presentation.handlePresentationAction({
10299
10297
  action: parsed.action,
@@ -10303,7 +10301,7 @@ function buildCanvasProps(input) {
10303
10301
  }
10304
10302
  return;
10305
10303
  }
10306
- chunk2QHCOESN_js.safeOpenUrl(url);
10304
+ chunkWK56SFN7_js.safeOpenUrl(url);
10307
10305
  };
10308
10306
  return {
10309
10307
  activeSlide: effectiveSlide,
@@ -10623,7 +10621,7 @@ function buildToolbarProps(input) {
10623
10621
  onOpenFile,
10624
10622
  onOpenRecentFile,
10625
10623
  onCreatePresentation: (templateId) => {
10626
- s.setSlides(chunk2QHCOESN_js.createBackstagePresentation(templateId));
10624
+ s.setSlides(chunkWK56SFN7_js.createBackstagePresentation(templateId));
10627
10625
  s.setActiveSlideIndex(0);
10628
10626
  s.setSelectedElementId(null);
10629
10627
  s.setSelectedElementIds([]);
@@ -10678,7 +10676,7 @@ function buildToolbarProps(input) {
10678
10676
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10679
10677
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10680
10678
  formatPainterActive: s.formatPainterActive,
10681
- canActivateFormatPainter: chunk2QHCOESN_js.hasCopyableFormat(selectedElement),
10679
+ canActivateFormatPainter: chunkWK56SFN7_js.hasCopyableFormat(selectedElement),
10682
10680
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10683
10681
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10684
10682
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -10941,7 +10939,7 @@ function useViewerBuildingBlocks(input) {
10941
10939
  }, [incomingContent]);
10942
10940
  const onOpenFile = react.useCallback(() => {
10943
10941
  void (async () => {
10944
- const picked = await chunk2QHCOESN_js.openPptxFile();
10942
+ const picked = await chunkWK56SFN7_js.openPptxFile();
10945
10943
  if (picked) {
10946
10944
  setContent(picked.buffer);
10947
10945
  }
@@ -10949,7 +10947,7 @@ function useViewerBuildingBlocks(input) {
10949
10947
  }, []);
10950
10948
  const onOpenRecentFile = react.useCallback((key) => {
10951
10949
  void (async () => {
10952
- const bytes = await chunk2QHCOESN_js.readBackstageRecentFile(key);
10950
+ const bytes = await chunkWK56SFN7_js.readBackstageRecentFile(key);
10953
10951
  if (bytes) {
10954
10952
  setContent(bytes);
10955
10953
  }