pptx-react-viewer 1.24.0 → 1.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +46 -21
  3. package/dist/{Model3DScene-QTNGCODM.mjs → Model3DScene-E7YIHJ2R.mjs} +1 -1
  4. package/dist/Model3DScene-E7YIHJ2R.mjs.br +0 -0
  5. package/dist/Model3DScene-E7YIHJ2R.mjs.gz +0 -0
  6. package/dist/{Model3DScene-RD4XEC3F.js → Model3DScene-RYR4SSOM.js} +2 -2
  7. package/dist/Model3DScene-RYR4SSOM.js.br +0 -0
  8. package/dist/Model3DScene-RYR4SSOM.js.gz +0 -0
  9. package/dist/{SurfaceChart3DScene-YR3GX4X6.js → SurfaceChart3DScene-PBSZVNAM.js} +2 -2
  10. package/dist/SurfaceChart3DScene-PBSZVNAM.js.br +0 -0
  11. package/dist/SurfaceChart3DScene-PBSZVNAM.js.gz +0 -0
  12. package/dist/{SurfaceChart3DScene-VKS3ELTU.mjs → SurfaceChart3DScene-ZM3J67VQ.mjs} +1 -1
  13. package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.br +0 -0
  14. package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.gz +0 -0
  15. package/dist/{chunk-I5SO5OV4.js → chunk-275WERXZ.js} +2 -1
  16. package/dist/chunk-275WERXZ.js.br +0 -0
  17. package/dist/{chunk-I5SO5OV4.js.gz → chunk-275WERXZ.js.gz} +0 -0
  18. package/dist/{chunk-GKST4OS7.js → chunk-DPTDFK2L.js} +428 -398
  19. package/dist/chunk-DPTDFK2L.js.br +0 -0
  20. package/dist/chunk-DPTDFK2L.js.gz +0 -0
  21. package/dist/{chunk-3YMK5VLS.js → chunk-KVTSERRP.js} +720 -716
  22. package/dist/chunk-KVTSERRP.js.br +0 -0
  23. package/dist/chunk-KVTSERRP.js.gz +0 -0
  24. package/dist/{chunk-KPT54MHG.mjs → chunk-MEVZNYJK.mjs} +2 -1
  25. package/dist/chunk-MEVZNYJK.mjs.br +0 -0
  26. package/dist/{chunk-KPT54MHG.mjs.gz → chunk-MEVZNYJK.mjs.gz} +0 -0
  27. package/dist/{chunk-YJVMOX2Y.mjs → chunk-UCFXE6YS.mjs} +38 -8
  28. package/dist/chunk-UCFXE6YS.mjs.br +0 -0
  29. package/dist/chunk-UCFXE6YS.mjs.gz +0 -0
  30. package/dist/{chunk-PUQ6GIOM.mjs → chunk-UDM2SYE3.mjs} +12 -8
  31. package/dist/chunk-UDM2SYE3.mjs.br +0 -0
  32. package/dist/chunk-UDM2SYE3.mjs.gz +0 -0
  33. package/dist/hooks-unstable.d.ts +24 -2
  34. package/dist/hooks-unstable.d.ts.map +1 -1
  35. package/dist/hooks-unstable.js +76 -76
  36. package/dist/hooks-unstable.js.br +0 -0
  37. package/dist/hooks-unstable.js.gz +0 -0
  38. package/dist/hooks-unstable.mjs +2 -2
  39. package/dist/hooks-unstable.mjs.br +0 -0
  40. package/dist/hooks-unstable.mjs.gz +0 -0
  41. package/dist/{index-hm2FF-FU.d.ts → index-waNAYwmr.d.ts} +10 -2
  42. package/dist/{index-hm2FF-FU.d.ts.map → index-waNAYwmr.d.ts.map} +1 -1
  43. package/dist/index.js +32 -32
  44. package/dist/index.js.br +0 -0
  45. package/dist/index.js.gz +0 -0
  46. package/dist/index.mjs +3 -3
  47. package/dist/index.mjs.br +0 -0
  48. package/dist/index.mjs.gz +0 -0
  49. package/dist/viewer/index.js +19 -19
  50. package/dist/viewer/index.js.br +0 -0
  51. package/dist/viewer/index.js.gz +0 -0
  52. package/dist/viewer/index.mjs +3 -3
  53. package/dist/viewer/index.mjs.br +0 -0
  54. package/dist/viewer/index.mjs.gz +0 -0
  55. package/package.json +1 -1
  56. package/dist/Model3DScene-QTNGCODM.mjs.br +0 -0
  57. package/dist/Model3DScene-QTNGCODM.mjs.gz +0 -0
  58. package/dist/Model3DScene-RD4XEC3F.js.br +0 -0
  59. package/dist/Model3DScene-RD4XEC3F.js.gz +0 -0
  60. package/dist/SurfaceChart3DScene-VKS3ELTU.mjs.br +0 -0
  61. package/dist/SurfaceChart3DScene-VKS3ELTU.mjs.gz +0 -0
  62. package/dist/SurfaceChart3DScene-YR3GX4X6.js.br +0 -0
  63. package/dist/SurfaceChart3DScene-YR3GX4X6.js.gz +0 -0
  64. package/dist/chunk-3YMK5VLS.js.br +0 -0
  65. package/dist/chunk-3YMK5VLS.js.gz +0 -0
  66. package/dist/chunk-GKST4OS7.js.br +0 -0
  67. package/dist/chunk-GKST4OS7.js.gz +0 -0
  68. package/dist/chunk-I5SO5OV4.js.br +0 -0
  69. package/dist/chunk-KPT54MHG.mjs.br +0 -0
  70. package/dist/chunk-PUQ6GIOM.mjs.br +0 -0
  71. package/dist/chunk-PUQ6GIOM.mjs.gz +0 -0
  72. package/dist/chunk-YJVMOX2Y.mjs.br +0 -0
  73. package/dist/chunk-YJVMOX2Y.mjs.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkI5SO5OV4_js = require('./chunk-I5SO5OV4.js');
3
+ var chunk275WERXZ_js = require('./chunk-275WERXZ.js');
4
4
  var chunkZISXRMDJ_js = require('./chunk-ZISXRMDJ.js');
5
5
  var chunkKV3EOLP3_js = require('./chunk-KV3EOLP3.js');
6
6
  var React3 = require('react');
@@ -18,7 +18,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
18
18
 
19
19
  // src/viewer/utils/clone.ts
20
20
  function cloneHistorySnapshot2(snapshot) {
21
- return chunkI5SO5OV4_js.cloneHistorySnapshot(snapshot);
21
+ return chunk275WERXZ_js.cloneHistorySnapshot(snapshot);
22
22
  }
23
23
 
24
24
  // src/viewer/hooks/useEditorHistory.ts
@@ -66,8 +66,8 @@ function useEditorHistory(input) {
66
66
  width: canvasSize.width,
67
67
  height: canvasSize.height,
68
68
  activeSlideIndex,
69
- slides: slides.map(chunkI5SO5OV4_js.cloneSlide),
70
- templateElementsBySlideId: chunkI5SO5OV4_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
69
+ slides: slides.map(chunk275WERXZ_js.cloneSlide),
70
+ templateElementsBySlideId: chunk275WERXZ_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
71
71
  ...actionLabel ? { actionLabel } : {}
72
72
  };
73
73
  },
@@ -80,9 +80,9 @@ function useEditorHistory(input) {
80
80
  width: snapshot.width,
81
81
  height: snapshot.height
82
82
  });
83
- setSlides(snapshot.slides.map(chunkI5SO5OV4_js.cloneSlide));
83
+ setSlides(snapshot.slides.map(chunk275WERXZ_js.cloneSlide));
84
84
  setTemplateElementsBySlideId(
85
- chunkI5SO5OV4_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
85
+ chunk275WERXZ_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
86
86
  );
87
87
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
88
88
  setSelectedElementIds([]);
@@ -345,7 +345,7 @@ var GLYPH_COMPONENTS = {
345
345
  plus: lu.LuPlus,
346
346
  triangle: lu.LuTriangle
347
347
  };
348
- var SHAPE_PRESETS = chunkI5SO5OV4_js.SHAPE_PRESET_DEFS.map(
348
+ var SHAPE_PRESETS = chunk275WERXZ_js.SHAPE_PRESET_DEFS.map(
349
349
  (def) => ({
350
350
  type: def.type,
351
351
  label: def.label,
@@ -662,19 +662,19 @@ function useAnimationPlayback(input) {
662
662
  if (anim.buildType && anim.buildType !== "allAtOnce" && anim.targetId) {
663
663
  const el = slide.elements.find((e) => e.id === anim.targetId);
664
664
  if (el && chunkKV3EOLP3_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
665
- segmentCounts.set(anim.targetId, chunkI5SO5OV4_js.countTextSegments(el.textSegments));
665
+ segmentCounts.set(anim.targetId, chunk275WERXZ_js.countTextSegments(el.textSegments));
666
666
  }
667
667
  }
668
668
  }
669
- const expandedAnims = segmentCounts.size > 0 ? chunkI5SO5OV4_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
670
- const engine = chunkI5SO5OV4_js.TimelineEngine.fromAnimations(expandedAnims);
669
+ const expandedAnims = segmentCounts.size > 0 ? chunk275WERXZ_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
670
+ const engine = chunk275WERXZ_js.TimelineEngine.fromAnimations(expandedAnims);
671
671
  timelineEngineRef.current = engine;
672
672
  setPresentationKeyframesCss(engine.getTimeline().keyframesCss);
673
673
  setInteractiveTriggerShapeIds(engine.getInteractiveTriggerShapeIds());
674
674
  setHoverTriggerShapeIds(engine.getHoverTriggerShapeIds());
675
675
  const allIds = slide.elements.map((element) => element.id);
676
676
  for (const anim of expandedAnims) {
677
- if (anim.targetId && anim.targetId.includes(chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP)) {
677
+ if (anim.targetId && anim.targetId.includes(chunk275WERXZ_js.TEXT_BUILD_ID_SEP)) {
678
678
  allIds.push(anim.targetId);
679
679
  }
680
680
  }
@@ -806,7 +806,7 @@ function useAnimationPlayback(input) {
806
806
  }))
807
807
  );
808
808
  entranceAnimations.forEach((animation, animationIndex) => {
809
- const delay = chunkI5SO5OV4_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
809
+ const delay = chunk275WERXZ_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
810
810
  const timer = window.setTimeout(() => {
811
811
  setPresentationAnimations(
812
812
  (previousAnimations) => previousAnimations.map(
@@ -863,7 +863,7 @@ function openDb() {
863
863
  }
864
864
  async function storeAudienceContent(content, sessionId) {
865
865
  if (sessionId) {
866
- return chunkI5SO5OV4_js.storePresentationDeck(sessionId, content);
866
+ return chunk275WERXZ_js.storePresentationDeck(sessionId, content);
867
867
  }
868
868
  const db = await openDb();
869
869
  return new Promise((resolve, reject) => {
@@ -884,7 +884,7 @@ async function storeAudienceContent(content, sessionId) {
884
884
  }
885
885
  async function loadAudienceContent(sessionId) {
886
886
  if (sessionId) {
887
- return chunkI5SO5OV4_js.loadPresentationDeck(sessionId);
887
+ return chunk275WERXZ_js.loadPresentationDeck(sessionId);
888
888
  }
889
889
  try {
890
890
  const db = await openDb();
@@ -925,7 +925,7 @@ async function loadAudienceContent(sessionId) {
925
925
  }
926
926
  async function clearAudienceContent(sessionId) {
927
927
  if (sessionId) {
928
- return chunkI5SO5OV4_js.clearPresentationDeck(sessionId);
928
+ return chunk275WERXZ_js.clearPresentationDeck(sessionId);
929
929
  }
930
930
  try {
931
931
  const db = await openDb();
@@ -945,12 +945,12 @@ async function clearAudienceContent(sessionId) {
945
945
  } catch {
946
946
  }
947
947
  }
948
- var PRESENTER_CHANNEL_NAME = chunkI5SO5OV4_js.PRESENTATION_CHANNEL_NAME;
949
- var AUDIENCE_HASH = chunkI5SO5OV4_js.PRESENTATION_HASH;
950
- var PRESENTER_MSG_ORIGIN = chunkI5SO5OV4_js.PRESENTATION_MESSAGE_ORIGIN;
951
- var AUDIENCE_NONCE_KEY = chunkI5SO5OV4_js.PRESENTATION_NONCE_KEY;
948
+ var PRESENTER_CHANNEL_NAME = chunk275WERXZ_js.PRESENTATION_CHANNEL_NAME;
949
+ var AUDIENCE_HASH = chunk275WERXZ_js.PRESENTATION_HASH;
950
+ var PRESENTER_MSG_ORIGIN = chunk275WERXZ_js.PRESENTATION_MESSAGE_ORIGIN;
951
+ var AUDIENCE_NONCE_KEY = chunk275WERXZ_js.PRESENTATION_NONCE_KEY;
952
952
  function generateSessionId() {
953
- return chunkI5SO5OV4_js.createPresentationSessionId();
953
+ return chunk275WERXZ_js.createPresentationSessionId();
954
954
  }
955
955
  function parseAudienceNonce() {
956
956
  const hash = window.location.hash;
@@ -986,7 +986,7 @@ function usePresenterWindow(input) {
986
986
  }, []);
987
987
  const swapDisplays = React3.useCallback(async () => {
988
988
  const audience = audienceWindowRef.current;
989
- return audience && !audience.closed ? chunkI5SO5OV4_js.swapPresentationWindows(window, audience) : false;
989
+ return audience && !audience.closed ? chunk275WERXZ_js.swapPresentationWindows(window, audience) : false;
990
990
  }, []);
991
991
  const syncSlideToAudience = React3.useCallback(
992
992
  (slideIndex) => {
@@ -1068,10 +1068,10 @@ function usePresenterWindow(input) {
1068
1068
  audienceWindowRef.current = blankWin;
1069
1069
  const sessionId = generateSessionId();
1070
1070
  sessionIdRef.current = sessionId;
1071
- const audienceUrl = chunkI5SO5OV4_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1072
- void chunkI5SO5OV4_js.resolveAudienceScreenPlacement(window).then((placement) => {
1071
+ const audienceUrl = chunk275WERXZ_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1072
+ void chunk275WERXZ_js.resolveAudienceScreenPlacement(window).then((placement) => {
1073
1073
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1074
- chunkI5SO5OV4_js.placeAudienceWindow(blankWin, placement);
1074
+ chunk275WERXZ_js.placeAudienceWindow(blankWin, placement);
1075
1075
  }
1076
1076
  return void 0;
1077
1077
  });
@@ -1127,7 +1127,7 @@ function usePresenterWindow(input) {
1127
1127
  }
1128
1128
  const handleMessage = (event) => {
1129
1129
  const message = event.data;
1130
- if (chunkI5SO5OV4_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1130
+ if (chunk275WERXZ_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1131
1131
  syncStateToAudience(snapshotRef.current);
1132
1132
  }
1133
1133
  };
@@ -1209,7 +1209,7 @@ function useAudienceMode(input) {
1209
1209
  }
1210
1210
  channel.onmessage = (event) => {
1211
1211
  const data = event.data;
1212
- if (!chunkI5SO5OV4_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1212
+ if (!chunk275WERXZ_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1213
1213
  return;
1214
1214
  }
1215
1215
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1235,7 +1235,7 @@ function useAudienceMode(input) {
1235
1235
  };
1236
1236
  if (expectedSessionId) {
1237
1237
  channel.postMessage({
1238
- origin: chunkI5SO5OV4_js.PRESENTATION_MESSAGE_ORIGIN,
1238
+ origin: chunk275WERXZ_js.PRESENTATION_MESSAGE_ORIGIN,
1239
1239
  type: "audience-ready",
1240
1240
  sessionId: expectedSessionId
1241
1241
  });
@@ -1500,7 +1500,7 @@ function handlePresentationActionImpl(action, deps) {
1500
1500
  return;
1501
1501
  }
1502
1502
  if (action.url && !actionStr.includes("hlinksldjump")) {
1503
- if (chunkI5SO5OV4_js.isUrlSafe(action.url)) {
1503
+ if (chunk275WERXZ_js.isUrlSafe(action.url)) {
1504
1504
  window.open(action.url, "_blank", "noopener,noreferrer");
1505
1505
  }
1506
1506
  }
@@ -1510,7 +1510,7 @@ function handlePresentationActionImpl(action, deps) {
1510
1510
  function executeSlideTransition(nextSlideIndex, deps) {
1511
1511
  const incomingSlide = deps.slides[nextSlideIndex];
1512
1512
  const transition = incomingSlide?.transition;
1513
- const durationMs = deps.playTransition ? chunkI5SO5OV4_js.resolveTransitionDurationMs(transition) : 0;
1513
+ const durationMs = deps.playTransition ? chunk275WERXZ_js.resolveTransitionDurationMs(transition) : 0;
1514
1514
  deps.clearPresentationTimers();
1515
1515
  deps.setPresentationSlideIndex(nextSlideIndex);
1516
1516
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1744,17 +1744,17 @@ function useZoomNavigation(input) {
1744
1744
  };
1745
1745
  }
1746
1746
  function usePresenterConsole(slideIndex) {
1747
- const timerRef = React3.useRef(chunkI5SO5OV4_js.createPresenterTimer());
1748
- const [snapshot, setSnapshot] = React3.useState(() => chunkI5SO5OV4_js.createInitialPresentationSnapshot(slideIndex));
1747
+ const timerRef = React3.useRef(chunk275WERXZ_js.createPresenterTimer());
1748
+ const [snapshot, setSnapshot] = React3.useState(() => chunk275WERXZ_js.createInitialPresentationSnapshot(slideIndex));
1749
1749
  const patch = React3.useCallback((value) => {
1750
- setSnapshot((current) => chunkI5SO5OV4_js.mergePresentationSnapshot(current, value));
1750
+ setSnapshot((current) => chunk275WERXZ_js.mergePresentationSnapshot(current, value));
1751
1751
  }, []);
1752
1752
  React3.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
1753
1753
  React3.useEffect(() => {
1754
1754
  const timer = window.setInterval(() => {
1755
1755
  patch({
1756
1756
  paused: timerRef.current.paused,
1757
- elapsedMs: chunkI5SO5OV4_js.presenterElapsed(timerRef.current)
1757
+ elapsedMs: chunk275WERXZ_js.presenterElapsed(timerRef.current)
1758
1758
  });
1759
1759
  }, 1e3);
1760
1760
  return () => window.clearInterval(timer);
@@ -1764,19 +1764,19 @@ function usePresenterConsole(slideIndex) {
1764
1764
  applyAudienceSnapshot: setSnapshot,
1765
1765
  setBlackout: (blackout) => patch({ blackout }),
1766
1766
  toggleTimer: () => {
1767
- timerRef.current = chunkI5SO5OV4_js.togglePresenterTimer(timerRef.current);
1767
+ timerRef.current = chunk275WERXZ_js.togglePresenterTimer(timerRef.current);
1768
1768
  patch({
1769
1769
  paused: timerRef.current.paused,
1770
- elapsedMs: chunkI5SO5OV4_js.presenterElapsed(timerRef.current)
1770
+ elapsedMs: chunk275WERXZ_js.presenterElapsed(timerRef.current)
1771
1771
  });
1772
1772
  },
1773
1773
  resetTimer: () => {
1774
- timerRef.current = chunkI5SO5OV4_js.resetPresenterTimer();
1774
+ timerRef.current = chunk275WERXZ_js.resetPresenterTimer();
1775
1775
  patch({ paused: false, elapsedMs: 0 });
1776
1776
  },
1777
1777
  stepZoom: (direction) => setSnapshot(
1778
- (current) => chunkI5SO5OV4_js.mergePresentationSnapshot(current, {
1779
- zoom: chunkI5SO5OV4_js.stepPresenterZoom(
1778
+ (current) => chunk275WERXZ_js.mergePresentationSnapshot(current, {
1779
+ zoom: chunk275WERXZ_js.stepPresenterZoom(
1780
1780
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
1781
1781
  direction
1782
1782
  )
@@ -3292,12 +3292,12 @@ function useViewerState(input) {
3292
3292
  function partitionTemplateElements(slides) {
3293
3293
  const templateElementsBySlideId = {};
3294
3294
  const nextSlides = slides.map((slide) => {
3295
- const template = slide.elements.filter((el) => chunkI5SO5OV4_js.isTemplateElement(el));
3295
+ const template = slide.elements.filter((el) => chunk275WERXZ_js.isTemplateElement(el));
3296
3296
  if (template.length === 0) {
3297
3297
  return slide;
3298
3298
  }
3299
3299
  templateElementsBySlideId[slide.id] = template;
3300
- return { ...slide, elements: slide.elements.filter((el) => !chunkI5SO5OV4_js.isTemplateElement(el)) };
3300
+ return { ...slide, elements: slide.elements.filter((el) => !chunk275WERXZ_js.isTemplateElement(el)) };
3301
3301
  });
3302
3302
  return { slides: nextSlides, templateElementsBySlideId };
3303
3303
  }
@@ -3345,7 +3345,8 @@ function useLoadContent({
3345
3345
  setLoading,
3346
3346
  setError,
3347
3347
  setIsDirty,
3348
- setIsEncrypted
3348
+ setIsEncrypted,
3349
+ onContentApplied
3349
3350
  }) {
3350
3351
  const handlerRef = React3.useRef(null);
3351
3352
  const originalBufferRef = React3.useRef(null);
@@ -3382,7 +3383,7 @@ function useLoadContent({
3382
3383
  handlerRef.current = null;
3383
3384
  const mediaElements = [];
3384
3385
  for (const slide of parsed.slides) {
3385
- chunkI5SO5OV4_js.collectMediaElements(slide.elements, mediaElements);
3386
+ chunk275WERXZ_js.collectMediaElements(slide.elements, mediaElements);
3386
3387
  }
3387
3388
  for (const url of mediaDataUrls.values()) {
3388
3389
  if (url.startsWith("blob:")) {
@@ -3423,7 +3424,7 @@ function useLoadContent({
3423
3424
  }
3424
3425
  })
3425
3426
  );
3426
- const { paths: imagePaths, refs: imageRefs } = chunkI5SO5OV4_js.collectImagePaths(parsed.slides);
3427
+ const { paths: imagePaths, refs: imageRefs } = chunk275WERXZ_js.collectImagePaths(parsed.slides);
3427
3428
  let nextSlides = parsed.slides;
3428
3429
  if (imagePaths.size > 0) {
3429
3430
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3512,11 +3513,12 @@ function useLoadContent({
3512
3513
  setHasMacros(parsed.hasMacros === true);
3513
3514
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3514
3515
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3515
- setGuides(chunkI5SO5OV4_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3516
+ setGuides(chunk275WERXZ_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3516
3517
  setActiveSlideIndex(0);
3517
3518
  clearSelection();
3518
3519
  setIsDirty(false);
3519
3520
  history.resetHistory();
3521
+ onContentApplied?.();
3520
3522
  } catch (err) {
3521
3523
  if (!cancelled && token === renderTokenRef.current) {
3522
3524
  if (err instanceof chunkKV3EOLP3_js.EncryptedFileError) {
@@ -3596,7 +3598,7 @@ function useAutosave(input) {
3596
3598
  isSavingRef.current = false;
3597
3599
  return;
3598
3600
  }
3599
- await chunkI5SO5OV4_js.saveAutosaveSnapshot(filePathRef.current, data);
3601
+ await chunk275WERXZ_js.saveAutosaveSnapshot(filePathRef.current, data);
3600
3602
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3601
3603
  } catch (err) {
3602
3604
  setAutosaveStatus({
@@ -3634,7 +3636,7 @@ function useAutosave(input) {
3634
3636
 
3635
3637
  // src/viewer/utils/animation-effects.ts
3636
3638
  function getAnimationInitialStyle2(preset, nativeAnimation) {
3637
- return chunkI5SO5OV4_js.getAnimationInitialStyle(preset, nativeAnimation);
3639
+ return chunk275WERXZ_js.getAnimationInitialStyle(preset, nativeAnimation);
3638
3640
  }
3639
3641
  function cn(...inputs) {
3640
3642
  return tailwindMerge.twMerge(clsx.clsx(inputs));
@@ -3656,20 +3658,20 @@ function getTextStyleForElement(element, fallbackColor) {
3656
3658
  const textDecorationStyle = isDoubleStrike ? "double" : void 0;
3657
3659
  const hasItalicRuns = element.textStyle?.italic || Boolean(element.textSegments?.some((segment) => segment.style?.italic));
3658
3660
  const isRtl = element.textStyle?.rtl === true;
3659
- const resolvedTextColor = element.textStyle?.hyperlink ? chunkI5SO5OV4_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkI5SO5OV4_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3661
+ const resolvedTextColor = element.textStyle?.hyperlink ? chunk275WERXZ_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunk275WERXZ_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3660
3662
  const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
3661
3663
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3662
3664
  const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
3663
3665
  const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
3664
- const writingMode = chunkI5SO5OV4_js.toCssWritingMode(element.textStyle?.textDirection);
3665
- const textOrientation = chunkI5SO5OV4_js.toCssTextOrientation(element.textStyle?.textDirection);
3666
- const verticalDirection = chunkI5SO5OV4_js.toCssVerticalDirection(element.textStyle?.textDirection);
3666
+ const writingMode = chunk275WERXZ_js.toCssWritingMode(element.textStyle?.textDirection);
3667
+ const textOrientation = chunk275WERXZ_js.toCssTextOrientation(element.textStyle?.textDirection);
3668
+ const verticalDirection = chunk275WERXZ_js.toCssVerticalDirection(element.textStyle?.textDirection);
3667
3669
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
3668
3670
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
3669
3671
  const hasSegments = (element.textSegments?.length ?? 0) > 0;
3670
3672
  return {
3671
3673
  color: resolvedTextColor,
3672
- backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkI5SO5OV4_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3674
+ backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunk275WERXZ_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3673
3675
  textAlign: (() => {
3674
3676
  const a = element.textStyle?.align;
3675
3677
  if (a === "justLow" || a === "dist" || a === "thaiDist") {
@@ -3685,7 +3687,7 @@ function getTextStyleForElement(element, fallbackColor) {
3685
3687
  textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
3686
3688
  textDecorationStyle,
3687
3689
  fontFamily: element.textStyle?.fontFamily || DEFAULT_FONT_FAMILY,
3688
- lineHeight: chunkI5SO5OV4_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3690
+ lineHeight: chunk275WERXZ_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3689
3691
  paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
3690
3692
  paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
3691
3693
  paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
@@ -3698,7 +3700,7 @@ function getTextStyleForElement(element, fallbackColor) {
3698
3700
  // Auto-fit: use OOXML-provided fontScale/lnSpcReduction when available,
3699
3701
  // otherwise fall back to heuristic estimation. The pure font-scale maths
3700
3702
  // now lives in pptx-viewer-shared (computeAutoFitTextStyle).
3701
- ...chunkI5SO5OV4_js.computeAutoFitTextStyle({
3703
+ ...chunk275WERXZ_js.computeAutoFitTextStyle({
3702
3704
  textStyle: element.textStyle,
3703
3705
  text: element.text ?? "",
3704
3706
  width: element.width,
@@ -3735,9 +3737,9 @@ function getTextLayoutStyle(element) {
3735
3737
  return {};
3736
3738
  }
3737
3739
  const verticalAlign = element.textStyle?.vAlign || "top";
3738
- const writingMode = chunkI5SO5OV4_js.toCssWritingMode(element.textStyle?.textDirection);
3739
- const textOrientation = chunkI5SO5OV4_js.toCssTextOrientation(element.textStyle?.textDirection);
3740
- const verticalDirection = chunkI5SO5OV4_js.toCssVerticalDirection(element.textStyle?.textDirection);
3740
+ const writingMode = chunk275WERXZ_js.toCssWritingMode(element.textStyle?.textDirection);
3741
+ const textOrientation = chunk275WERXZ_js.toCssTextOrientation(element.textStyle?.textDirection);
3742
+ const verticalDirection = chunk275WERXZ_js.toCssVerticalDirection(element.textStyle?.textDirection);
3741
3743
  const parsedColumnCount = Number(element.textStyle?.columnCount);
3742
3744
  const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
3743
3745
  const hasColumns = columnCount > 1;
@@ -3754,7 +3756,7 @@ function getTextLayoutStyle(element) {
3754
3756
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3755
3757
  const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
3756
3758
  const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
3757
- const kinsokuStyles = chunkI5SO5OV4_js.getKinsokuLineBreakStyles(element.textStyle);
3759
+ const kinsokuStyles = chunk275WERXZ_js.getKinsokuLineBreakStyles(element.textStyle);
3758
3760
  if (hasColumns) {
3759
3761
  return {
3760
3762
  display: "block",
@@ -3797,10 +3799,10 @@ function getTextLayoutStyle(element) {
3797
3799
 
3798
3800
  // src/viewer/utils/text-effects.tsx
3799
3801
  function buildTextFillCss2(style) {
3800
- return chunkI5SO5OV4_js.buildTextFillCss(style);
3802
+ return chunk275WERXZ_js.buildTextFillCss(style);
3801
3803
  }
3802
3804
  function buildTextBody3DSceneStyle2(textStyle) {
3803
- return chunkI5SO5OV4_js.buildTextBody3DSceneStyle(textStyle);
3805
+ return chunk275WERXZ_js.buildTextBody3DSceneStyle(textStyle);
3804
3806
  }
3805
3807
 
3806
3808
  // src/viewer/utils/text-warp-css.tsx
@@ -3985,17 +3987,17 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
3985
3987
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
3986
3988
  return renderedSegments;
3987
3989
  }
3988
- const paraKey = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
3990
+ const paraKey = `${elementId}${chunk275WERXZ_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
3989
3991
  const paraState = subElementAnimStates.get(paraKey);
3990
3992
  if (paraState) {
3991
3993
  const style = buildAnimStyle(paraState);
3992
3994
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
3993
3995
  }
3994
- const firstWordKey = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
3996
+ const firstWordKey = `${elementId}${chunk275WERXZ_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
3995
3997
  if (subElementAnimStates.has(firstWordKey)) {
3996
3998
  return wrapByWord(elementId, paraIndex, paraSegments, subElementAnimStates);
3997
3999
  }
3998
- const firstCharKey = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
4000
+ const firstCharKey = `${elementId}${chunk275WERXZ_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
3999
4001
  if (subElementAnimStates.has(firstCharKey)) {
4000
4002
  return wrapByChar(elementId, paraIndex, paraSegments, subElementAnimStates);
4001
4003
  }
@@ -4016,7 +4018,7 @@ function wrapByWord(elementId, paraIndex, paraSegments, states) {
4016
4018
  nodes.push(/* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: w }, `ws-${i}`));
4017
4019
  continue;
4018
4020
  }
4019
- const key = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4021
+ const key = `${elementId}${chunk275WERXZ_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4020
4022
  const state = states.get(key);
4021
4023
  const style = buildAnimStyle(state);
4022
4024
  nodes.push(
@@ -4030,7 +4032,7 @@ function wrapByChar(elementId, paraIndex, paraSegments, states) {
4030
4032
  const fullText = paraSegments.map((e) => e.segment.text).join("");
4031
4033
  const nodes = [];
4032
4034
  for (let i = 0; i < fullText.length; i++) {
4033
- const key = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4035
+ const key = `${elementId}${chunk275WERXZ_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4034
4036
  const state = states.get(key);
4035
4037
  const style = buildAnimStyle(state);
4036
4038
  nodes.push(
@@ -4043,10 +4045,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4043
4045
  if (!needsScriptFonts || !text) {
4044
4046
  return text;
4045
4047
  }
4046
- const runs = chunkI5SO5OV4_js.segmentByScript(text);
4048
+ const runs = chunk275WERXZ_js.segmentByScript(text);
4047
4049
  if (runs.length <= 1) {
4048
4050
  if (runs.length === 1) {
4049
- const font = chunkI5SO5OV4_js.resolveFontForScript(runs[0].script, scriptFonts);
4051
+ const font = chunk275WERXZ_js.resolveFontForScript(runs[0].script, scriptFonts);
4050
4052
  if (font && font !== baseFontFamily) {
4051
4053
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
4052
4054
  }
@@ -4054,7 +4056,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4054
4056
  return text;
4055
4057
  }
4056
4058
  return runs.map((run, i) => {
4057
- const font = chunkI5SO5OV4_js.resolveFontForScript(run.script, scriptFonts);
4059
+ const font = chunk275WERXZ_js.resolveFontForScript(run.script, scriptFonts);
4058
4060
  if (!font || font === baseFontFamily) {
4059
4061
  return /* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
4060
4062
  }
@@ -4128,8 +4130,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
4128
4130
  );
4129
4131
  }
4130
4132
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
4131
- const mathml = chunkI5SO5OV4_js.convertOmmlToMathMl(equationXml);
4132
- const safeMathml = mathml ? chunkI5SO5OV4_js.sanitizeMathMl(mathml) : "";
4133
+ const mathml = chunk275WERXZ_js.convertOmmlToMathMl(equationXml);
4134
+ const safeMathml = mathml ? chunk275WERXZ_js.sanitizeMathMl(mathml) : "";
4133
4135
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
4134
4136
  "span",
4135
4137
  {
@@ -4179,7 +4181,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
4179
4181
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
4180
4182
  }
4181
4183
  function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
4182
- const picture = chunkI5SO5OV4_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4184
+ const picture = chunk275WERXZ_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4183
4185
  sizePx: baseFontSize,
4184
4186
  fallbackMarker: "\u2022",
4185
4187
  accessibleLabel: "Bullet"
@@ -4229,7 +4231,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4229
4231
  );
4230
4232
  }
4231
4233
  const segmentStyle = segment.style || {};
4232
- const textValue = chunkI5SO5OV4_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4234
+ const textValue = chunk275WERXZ_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4233
4235
  const lines = textValue.split("\n");
4234
4236
  const textDecorationTokens = [];
4235
4237
  if (segmentStyle.underline || segmentStyle.hyperlink) {
@@ -4239,8 +4241,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4239
4241
  textDecorationTokens.push("line-through");
4240
4242
  }
4241
4243
  const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
4242
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4243
- const underlineDecoration = chunkI5SO5OV4_js.resolveUnderlineDecorationStyle(
4244
+ const resolvedSegmentColor = segmentStyle.hyperlink ? chunk275WERXZ_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunk275WERXZ_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4245
+ const underlineDecoration = chunk275WERXZ_js.resolveUnderlineDecorationStyle(
4244
4246
  Boolean(isDoubleStrike),
4245
4247
  segmentStyle.underlineStyle
4246
4248
  );
@@ -4260,7 +4262,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4260
4262
  complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
4261
4263
  symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
4262
4264
  };
4263
- const needsScriptFonts = chunkI5SO5OV4_js.hasDistinctScriptFonts(scriptFonts);
4265
+ const needsScriptFonts = chunk275WERXZ_js.hasDistinctScriptFonts(scriptFonts);
4264
4266
  const spanStyle = {
4265
4267
  color: resolvedSegmentColor,
4266
4268
  fontSize: baseFontSize * baselineFontScale,
@@ -4274,15 +4276,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4274
4276
  verticalAlign: baselineShift,
4275
4277
  letterSpacing,
4276
4278
  fontKerning,
4277
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4279
+ backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunk275WERXZ_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4278
4280
  ...textFillStyles,
4279
- textDecorationColor: segmentStyle.underlineColor ? chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4280
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4281
+ textDecorationColor: segmentStyle.underlineColor ? chunk275WERXZ_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4282
+ WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunk275WERXZ_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4281
4283
  paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
4282
- textShadow: chunkI5SO5OV4_js.buildTextShadowCss(segmentStyle),
4283
- filter: chunkI5SO5OV4_js.buildTextRunFilterChain(segmentStyle),
4284
- opacity: chunkI5SO5OV4_js.getTextAlphaOpacity(segmentStyle),
4285
- WebkitBoxReflect: chunkI5SO5OV4_js.buildTextReflectionCss(segmentStyle)
4284
+ textShadow: chunk275WERXZ_js.buildTextShadowCss(segmentStyle),
4285
+ filter: chunk275WERXZ_js.buildTextRunFilterChain(segmentStyle),
4286
+ opacity: chunk275WERXZ_js.getTextAlphaOpacity(segmentStyle),
4287
+ WebkitBoxReflect: chunk275WERXZ_js.buildTextReflectionCss(segmentStyle)
4286
4288
  };
4287
4289
  const runRtl = segmentStyle.rtl;
4288
4290
  if (runRtl !== void 0 && runRtl !== paragraphRtl) {
@@ -4302,7 +4304,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4302
4304
  spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
4303
4305
  }
4304
4306
  if (bulletInfo.color) {
4305
- spanStyle.color = chunkI5SO5OV4_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4307
+ spanStyle.color = chunk275WERXZ_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4306
4308
  }
4307
4309
  }
4308
4310
  if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
@@ -4334,7 +4336,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4334
4336
  textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
4335
4337
  };
4336
4338
  if (segment.rubyStyle?.color) {
4337
- rubyStyle.color = chunkI5SO5OV4_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4339
+ rubyStyle.color = chunk275WERXZ_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4338
4340
  }
4339
4341
  innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
4340
4342
  baseContent,
@@ -4441,14 +4443,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
4441
4443
  return Boolean(segment.text) && segment.text.trim().length > 0;
4442
4444
  });
4443
4445
  const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
4444
- const paraRtl = chunkI5SO5OV4_js.resolveParagraphRtl(paraSegments, elementRtl);
4446
+ const paraRtl = chunk275WERXZ_js.resolveParagraphRtl(paraSegments, elementRtl);
4445
4447
  const isRtlParagraph = paraRtl === true;
4446
- const paraAlign = chunkI5SO5OV4_js.resolveParagraphAlign(paraSegments, elementAlign);
4447
- const cssTextAlign = chunkI5SO5OV4_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4448
+ const paraAlign = chunk275WERXZ_js.resolveParagraphAlign(paraSegments, elementAlign);
4449
+ const cssTextAlign = chunk275WERXZ_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4448
4450
  const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
4449
4451
  const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
4450
4452
  const paraTextIndent = rawTextIndent;
4451
- const paraKinsokuStyle = chunkI5SO5OV4_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4453
+ const paraKinsokuStyle = chunk275WERXZ_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4452
4454
  const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
4453
4455
  const paraStyle = {
4454
4456
  ...paraKinsokuStyle
@@ -4648,8 +4650,8 @@ function buildLineShadowCss(element) {
4648
4650
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
4649
4651
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
4650
4652
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
4651
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkI5SO5OV4_js.colorWithOpacity(
4652
- chunkI5SO5OV4_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4653
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunk275WERXZ_js.colorWithOpacity(
4654
+ chunk275WERXZ_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4653
4655
  opacity
4654
4656
  )}`;
4655
4657
  }
@@ -4663,7 +4665,7 @@ function buildLineGlowFilter(element) {
4663
4665
  }
4664
4666
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
4665
4667
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
4666
- const glowCol = chunkI5SO5OV4_js.colorWithOpacity(chunkI5SO5OV4_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4668
+ const glowCol = chunk275WERXZ_js.colorWithOpacity(chunk275WERXZ_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4667
4669
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
4668
4670
  }
4669
4671
  function mapDagBlendModeToCss(blend) {
@@ -4750,7 +4752,7 @@ function getRoundRectRadiusPx2(element) {
4750
4752
 
4751
4753
  // src/viewer/utils/shape-visual-3d.ts
4752
4754
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
4753
- return chunkI5SO5OV4_js.build3DExtrusionData(
4755
+ return chunk275WERXZ_js.build3DExtrusionData(
4754
4756
  shape3d,
4755
4757
  scene3d,
4756
4758
  fillColor,
@@ -4759,7 +4761,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
4759
4761
  );
4760
4762
  }
4761
4763
  function apply3dEffects2(base, scene3d, shape3d) {
4762
- chunkI5SO5OV4_js.apply3dEffects(base, scene3d, shape3d);
4764
+ chunk275WERXZ_js.apply3dEffects(base, scene3d, shape3d);
4763
4765
  }
4764
4766
 
4765
4767
  // src/viewer/utils/shape-visual-style.ts
@@ -4768,18 +4770,18 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4768
4770
  return {};
4769
4771
  }
4770
4772
  const normalizedShapeType = getShapeType(element.shapeType);
4771
- const clipPath = chunkI5SO5OV4_js.getResolvedShapeClipPath(element);
4773
+ const clipPath = chunk275WERXZ_js.getResolvedShapeClipPath(element);
4772
4774
  const fillOpacity = element.shapeStyle?.fillOpacity;
4773
4775
  const strokeOpacity = element.shapeStyle?.strokeOpacity;
4774
- const strokeDash = chunkI5SO5OV4_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4775
- const fillGradient = chunkI5SO5OV4_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4776
- const shadowCss = chunkI5SO5OV4_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4777
- const innerShadowCss = chunkI5SO5OV4_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4778
- const resolvedFillColor = chunkI5SO5OV4_js.colorWithOpacity(fillColor, fillOpacity);
4779
- const resolvedStrokeColor = chunkI5SO5OV4_js.colorWithOpacity(strokeColor, strokeOpacity);
4776
+ const strokeDash = chunk275WERXZ_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4777
+ const fillGradient = chunk275WERXZ_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4778
+ const shadowCss = chunk275WERXZ_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4779
+ const innerShadowCss = chunk275WERXZ_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4780
+ const resolvedFillColor = chunk275WERXZ_js.colorWithOpacity(fillColor, fillOpacity);
4781
+ const resolvedStrokeColor = chunk275WERXZ_js.colorWithOpacity(strokeColor, strokeOpacity);
4780
4782
  const ss = element.shapeStyle;
4781
4783
  const combinedShadowParts = [];
4782
- const multiLayerShadow = chunkI5SO5OV4_js.buildMultiLayerShadowCss(element.shapeStyle);
4784
+ const multiLayerShadow = chunk275WERXZ_js.buildMultiLayerShadowCss(element.shapeStyle);
4783
4785
  if (multiLayerShadow) {
4784
4786
  combinedShadowParts.push(multiLayerShadow);
4785
4787
  } else if (shadowCss) {
@@ -4788,7 +4790,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4788
4790
  if (innerShadowCss) {
4789
4791
  combinedShadowParts.push(innerShadowCss);
4790
4792
  }
4791
- const glowBoxShadow = chunkI5SO5OV4_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4793
+ const glowBoxShadow = chunk275WERXZ_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4792
4794
  if (glowBoxShadow) {
4793
4795
  combinedShadowParts.push(glowBoxShadow);
4794
4796
  }
@@ -4796,7 +4798,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4796
4798
  if (lineShadow) {
4797
4799
  combinedShadowParts.push(lineShadow);
4798
4800
  }
4799
- const compoundLineShadow = chunkI5SO5OV4_js.getCompoundLineBoxShadow(
4801
+ const compoundLineShadow = chunk275WERXZ_js.getCompoundLineBoxShadow(
4800
4802
  element.shapeStyle?.compoundLine,
4801
4803
  strokeWidth,
4802
4804
  resolvedStrokeColor
@@ -4809,7 +4811,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4809
4811
  if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
4810
4812
  const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
4811
4813
  const glowRad = Math.round(Math.max(0, ss.glowRadius));
4812
- const glowCol = chunkI5SO5OV4_js.colorWithOpacity(chunkI5SO5OV4_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
4814
+ const glowCol = chunk275WERXZ_js.colorWithOpacity(chunk275WERXZ_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
4813
4815
  filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
4814
4816
  }
4815
4817
  if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
@@ -4822,12 +4824,12 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4822
4824
  if (lineGlowCss) {
4823
4825
  filterParts.push(lineGlowCss);
4824
4826
  }
4825
- const dagFilter = chunkI5SO5OV4_js.getEffectDagFilter(ss, element.id);
4827
+ const dagFilter = chunk275WERXZ_js.getEffectDagFilter(ss, element.id);
4826
4828
  if (dagFilter) {
4827
4829
  filterParts.push(dagFilter);
4828
4830
  }
4829
4831
  const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : void 0;
4830
- const patternFill = chunkI5SO5OV4_js.buildPatternFillCss(element.shapeStyle);
4832
+ const patternFill = chunk275WERXZ_js.buildPatternFillCss(element.shapeStyle);
4831
4833
  const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
4832
4834
  const imageFillMode = ss?.fillImageMode || "stretch";
4833
4835
  let reflectCss;
@@ -4839,7 +4841,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4839
4841
  const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
4840
4842
  const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
4841
4843
  const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
4842
- reflectCss = chunkI5SO5OV4_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
4844
+ reflectCss = chunk275WERXZ_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
4843
4845
  }
4844
4846
  }
4845
4847
  const base = {
@@ -4853,9 +4855,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4853
4855
  filter: filterParts.length > 0 ? filterParts.join(" ") : void 0,
4854
4856
  opacity: typeof ss?.dagAlphaModFix === "number" ? Math.max(0, Math.min(1, ss.dagAlphaModFix / 100)) : void 0,
4855
4857
  mixBlendMode: mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
4856
- borderWidth: strokeWidth > 0 ? chunkI5SO5OV4_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
4858
+ borderWidth: strokeWidth > 0 ? chunk275WERXZ_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
4857
4859
  borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
4858
- borderStyle: strokeWidth > 0 ? chunkI5SO5OV4_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
4860
+ borderStyle: strokeWidth > 0 ? chunk275WERXZ_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
4859
4861
  strokeLinejoin: lineJoinCss,
4860
4862
  strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : void 0
4861
4863
  };
@@ -4896,7 +4898,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4896
4898
  borderWidth: 0,
4897
4899
  borderTopWidth: Math.max(strokeWidth, 2),
4898
4900
  borderTopColor: resolvedStrokeColor,
4899
- borderTopStyle: chunkI5SO5OV4_js.getCssBorderDashStyle(strokeDash)
4901
+ borderTopStyle: chunk275WERXZ_js.getCssBorderDashStyle(strokeDash)
4900
4902
  };
4901
4903
  }
4902
4904
  if (normalizedShapeType === "cylinder") {
@@ -4910,13 +4912,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4910
4912
  function getConnectorAdjustment(element, key, fallback) {
4911
4913
  const direct = element.shapeAdjustments?.[key];
4912
4914
  if (typeof direct === "number" && Number.isFinite(direct)) {
4913
- return chunkI5SO5OV4_js.clampUnitInterval(direct / 1e5);
4915
+ return chunk275WERXZ_js.clampUnitInterval(direct / 1e5);
4914
4916
  }
4915
4917
  const fallbackKey = element.shapeAdjustments?.adj;
4916
4918
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
4917
- return chunkI5SO5OV4_js.clampUnitInterval(fallbackKey / 1e5);
4919
+ return chunk275WERXZ_js.clampUnitInterval(fallbackKey / 1e5);
4918
4920
  }
4919
- return chunkI5SO5OV4_js.clampUnitInterval(fallback);
4921
+ return chunk275WERXZ_js.clampUnitInterval(fallback);
4920
4922
  }
4921
4923
  function getConnectorPathGeometry(element) {
4922
4924
  const width = Math.max(element.width, 1);
@@ -5047,10 +5049,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5047
5049
  return null;
5048
5050
  }
5049
5051
  const normalizedType = (element.shapeType || "").toLowerCase();
5050
- const fillPaint = chunkI5SO5OV4_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5051
- const strokePaint = chunkI5SO5OV4_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5052
- const dashType = chunkI5SO5OV4_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5053
- const dashArray = chunkI5SO5OV4_js.getSvgStrokeDasharray(
5052
+ const fillPaint = chunk275WERXZ_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5053
+ const strokePaint = chunk275WERXZ_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5054
+ const dashType = chunk275WERXZ_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5055
+ const dashArray = chunk275WERXZ_js.getSvgStrokeDasharray(
5054
5056
  dashType,
5055
5057
  Math.max(strokeWidth, 1),
5056
5058
  element.shapeStyle?.customDashSegments
@@ -5209,8 +5211,8 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5209
5211
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
5210
5212
  const compoundLine = element.shapeStyle?.compoundLine;
5211
5213
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
5212
- const offsets = chunkI5SO5OV4_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5213
- const widths = chunkI5SO5OV4_js.getCompoundLineWidths(compoundLine, strokeWidth);
5214
+ const offsets = chunk275WERXZ_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5215
+ const widths = chunk275WERXZ_js.getCompoundLineWidths(compoundLine, strokeWidth);
5214
5216
  return /* @__PURE__ */ jsxRuntime.jsxs(
5215
5217
  "svg",
5216
5218
  {
@@ -5273,7 +5275,7 @@ function getImageMaskStyle(element) {
5273
5275
  }
5274
5276
  const normalized = shapeType.toLowerCase();
5275
5277
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
5276
- const radiusPx = chunkI5SO5OV4_js.getRoundRectRadiusPx(element);
5278
+ const radiusPx = chunk275WERXZ_js.getRoundRectRadiusPx(element);
5277
5279
  if (radiusPx <= 0.01) {
5278
5280
  return void 0;
5279
5281
  }
@@ -5285,7 +5287,7 @@ function getImageMaskStyle(element) {
5285
5287
  if (normalized === "can" || normalized === "cylinder") {
5286
5288
  return { borderRadius: "48% / 12%" };
5287
5289
  }
5288
- const clipPath = chunkI5SO5OV4_js.getResolvedShapeClipPath(element);
5290
+ const clipPath = chunk275WERXZ_js.getResolvedShapeClipPath(element);
5289
5291
  if (!clipPath) {
5290
5292
  return void 0;
5291
5293
  }
@@ -5301,10 +5303,10 @@ function getImageRenderStyle(element) {
5301
5303
  objectFit: "cover"
5302
5304
  };
5303
5305
  }
5304
- const cropLeft = chunkI5SO5OV4_js.clampCropValue(element.cropLeft);
5305
- const cropTop = chunkI5SO5OV4_js.clampCropValue(element.cropTop);
5306
- const cropRight = chunkI5SO5OV4_js.clampCropValue(element.cropRight);
5307
- const cropBottom = chunkI5SO5OV4_js.clampCropValue(element.cropBottom);
5306
+ const cropLeft = chunk275WERXZ_js.clampCropValue(element.cropLeft);
5307
+ const cropTop = chunk275WERXZ_js.clampCropValue(element.cropTop);
5308
+ const cropRight = chunk275WERXZ_js.clampCropValue(element.cropRight);
5309
+ const cropBottom = chunk275WERXZ_js.clampCropValue(element.cropBottom);
5308
5310
  const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
5309
5311
  if (!hasCrop) {
5310
5312
  return {
@@ -5316,10 +5318,10 @@ function getImageRenderStyle(element) {
5316
5318
  }
5317
5319
  const safeHorizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
5318
5320
  const safeVerticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
5319
- const normalizedLeft = chunkI5SO5OV4_js.clampCropValue(cropLeft * safeHorizontalScale);
5320
- const normalizedRight = chunkI5SO5OV4_js.clampCropValue(cropRight * safeHorizontalScale);
5321
- const normalizedTop = chunkI5SO5OV4_js.clampCropValue(cropTop * safeVerticalScale);
5322
- const normalizedBottom = chunkI5SO5OV4_js.clampCropValue(cropBottom * safeVerticalScale);
5321
+ const normalizedLeft = chunk275WERXZ_js.clampCropValue(cropLeft * safeHorizontalScale);
5322
+ const normalizedRight = chunk275WERXZ_js.clampCropValue(cropRight * safeHorizontalScale);
5323
+ const normalizedTop = chunk275WERXZ_js.clampCropValue(cropTop * safeVerticalScale);
5324
+ const normalizedBottom = chunk275WERXZ_js.clampCropValue(cropBottom * safeVerticalScale);
5323
5325
  const remainingWidth = Math.max(0.01, 1 - normalizedLeft - normalizedRight);
5324
5326
  const remainingHeight = Math.max(0.01, 1 - normalizedTop - normalizedBottom);
5325
5327
  const tx = Math.round(-normalizedLeft / remainingWidth * 1e4) / 100;
@@ -5459,9 +5461,9 @@ function parseGradientFillCss(gradFill) {
5459
5461
  }
5460
5462
  const parsed = stops.map((gs) => {
5461
5463
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
5462
- const color = chunkI5SO5OV4_js.parseDrawingColor(gs) ?? "#888888";
5463
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(gs);
5464
- return { pos, color: chunkI5SO5OV4_js.colorWithOpacity(color, opacity) };
5464
+ const color = chunk275WERXZ_js.parseDrawingColor(gs) ?? "#888888";
5465
+ const opacity = chunk275WERXZ_js.parseDrawingColorOpacity(gs);
5466
+ return { pos, color: chunk275WERXZ_js.colorWithOpacity(color, opacity) };
5465
5467
  }).sort((a, b) => a.pos - b.pos);
5466
5468
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
5467
5469
  const lin = gradFill["a:lin"];
@@ -5502,8 +5504,8 @@ function parsePatternFillCss(pattFill) {
5502
5504
  if (!pattFill) {
5503
5505
  return void 0;
5504
5506
  }
5505
- const fgColor = chunkI5SO5OV4_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5506
- const bgColor = chunkI5SO5OV4_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5507
+ const fgColor = chunk275WERXZ_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5508
+ const bgColor = chunk275WERXZ_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5507
5509
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
5508
5510
  switch (preset) {
5509
5511
  case "ltHorz":
@@ -5614,11 +5616,11 @@ function parseCellBorders(cellProperties) {
5614
5616
  const prstDash = ln["a:prstDash"];
5615
5617
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
5616
5618
  const cssBorderStyle = ooxmlDashToCss(dashVal);
5617
- const color = chunkI5SO5OV4_js.parseDrawingColor(ln["a:solidFill"]);
5619
+ const color = chunk275WERXZ_js.parseDrawingColor(ln["a:solidFill"]);
5618
5620
  if (color) {
5619
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5621
+ const opacity = chunk275WERXZ_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5620
5622
  const key = `${edge.prefix}`;
5621
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkI5SO5OV4_js.colorWithOpacity(color, opacity)}`;
5623
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunk275WERXZ_js.colorWithOpacity(color, opacity)}`;
5622
5624
  }
5623
5625
  }
5624
5626
  return borderStyle;
@@ -5631,7 +5633,7 @@ function parseCellTextEffects(runProps) {
5631
5633
  const textShadowParts = [];
5632
5634
  const outerShdw = effectLst["a:outerShdw"];
5633
5635
  if (outerShdw) {
5634
- const shdwColor = chunkI5SO5OV4_js.parseDrawingColor(outerShdw);
5636
+ const shdwColor = chunk275WERXZ_js.parseDrawingColor(outerShdw);
5635
5637
  if (shdwColor) {
5636
5638
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
5637
5639
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -5649,7 +5651,7 @@ function parseCellTextEffects(runProps) {
5649
5651
  }
5650
5652
  const glow = effectLst["a:glow"];
5651
5653
  if (glow) {
5652
- const glowColor = chunkI5SO5OV4_js.parseDrawingColor(glow);
5654
+ const glowColor = chunk275WERXZ_js.parseDrawingColor(glow);
5653
5655
  if (glowColor) {
5654
5656
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
5655
5657
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -5728,10 +5730,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5728
5730
  if (runProps?.["@_u"] !== void 0) {
5729
5731
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
5730
5732
  }
5731
- const runColor = chunkI5SO5OV4_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkI5SO5OV4_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5733
+ const runColor = chunk275WERXZ_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunk275WERXZ_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5732
5734
  if (runColor) {
5733
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5734
- cellStyle.color = chunkI5SO5OV4_js.colorWithOpacity(runColor, opacity);
5735
+ const opacity = chunk275WERXZ_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5736
+ cellStyle.color = chunk275WERXZ_js.colorWithOpacity(runColor, opacity);
5735
5737
  }
5736
5738
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
5737
5739
  if (fontFamily) {
@@ -5741,15 +5743,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5741
5743
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
5742
5744
  }
5743
5745
  const cellProperties = cellXml["a:tcPr"];
5744
- const cellFill = chunkI5SO5OV4_js.parseDrawingColor(
5746
+ const cellFill = chunk275WERXZ_js.parseDrawingColor(
5745
5747
  cellProperties?.["a:solidFill"],
5746
5748
  schemeColorOverrides
5747
5749
  );
5748
5750
  if (cellFill) {
5749
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(
5751
+ const opacity = chunk275WERXZ_js.parseDrawingColorOpacity(
5750
5752
  cellProperties?.["a:solidFill"]
5751
5753
  );
5752
- cellStyle.backgroundColor = chunkI5SO5OV4_js.colorWithOpacity(cellFill, opacity);
5754
+ cellStyle.backgroundColor = chunk275WERXZ_js.colorWithOpacity(cellFill, opacity);
5753
5755
  } else {
5754
5756
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
5755
5757
  if (gradCss) {
@@ -5764,16 +5766,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5764
5766
  const edgeBorders = parseCellBorders(cellProperties);
5765
5767
  Object.assign(cellStyle, edgeBorders);
5766
5768
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
5767
- const borderColor = chunkI5SO5OV4_js.parseDrawingColor(
5769
+ const borderColor = chunk275WERXZ_js.parseDrawingColor(
5768
5770
  cellProperties?.["a:lnL"]?.["a:solidFill"],
5769
5771
  schemeColorOverrides
5770
- ) || chunkI5SO5OV4_js.parseDrawingColor(
5772
+ ) || chunk275WERXZ_js.parseDrawingColor(
5771
5773
  cellProperties?.["a:lnR"]?.["a:solidFill"],
5772
5774
  schemeColorOverrides
5773
- ) || chunkI5SO5OV4_js.parseDrawingColor(
5775
+ ) || chunk275WERXZ_js.parseDrawingColor(
5774
5776
  cellProperties?.["a:lnT"]?.["a:solidFill"],
5775
5777
  schemeColorOverrides
5776
- ) || chunkI5SO5OV4_js.parseDrawingColor(
5778
+ ) || chunk275WERXZ_js.parseDrawingColor(
5777
5779
  cellProperties?.["a:lnB"]?.["a:solidFill"],
5778
5780
  schemeColorOverrides
5779
5781
  );
@@ -5852,10 +5854,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
5852
5854
  }
5853
5855
  let color = base;
5854
5856
  if (fill.tint !== void 0 && fill.tint > 0) {
5855
- color = chunkI5SO5OV4_js.tintColor2(color, fill.tint / 1e5);
5857
+ color = chunk275WERXZ_js.tintColor2(color, fill.tint / 1e5);
5856
5858
  }
5857
5859
  if (fill.shade !== void 0 && fill.shade > 0) {
5858
- color = chunkI5SO5OV4_js.shadeColor2(color, 1 - fill.shade / 1e5);
5860
+ color = chunk275WERXZ_js.shadeColor2(color, 1 - fill.shade / 1e5);
5859
5861
  }
5860
5862
  return color;
5861
5863
  }
@@ -5877,10 +5879,10 @@ function applyTableStyleText(text, colorScheme, style) {
5877
5879
  if (base) {
5878
5880
  let color = base;
5879
5881
  if (text.fontTint !== void 0 && text.fontTint > 0) {
5880
- color = chunkI5SO5OV4_js.tintColor2(color, text.fontTint / 1e5);
5882
+ color = chunk275WERXZ_js.tintColor2(color, text.fontTint / 1e5);
5881
5883
  }
5882
5884
  if (text.fontShade !== void 0 && text.fontShade > 0) {
5883
- color = chunkI5SO5OV4_js.shadeColor2(color, 1 - text.fontShade / 1e5);
5885
+ color = chunk275WERXZ_js.shadeColor2(color, 1 - text.fontShade / 1e5);
5884
5886
  }
5885
5887
  style.color = color;
5886
5888
  applied = true;
@@ -6162,9 +6164,9 @@ function cellStyleToCss(style) {
6162
6164
  if (style.gradientFillCss) {
6163
6165
  css.background = style.gradientFillCss;
6164
6166
  } else if (style.fillMode === "pattern" && style.patternFillPreset) {
6165
- const fg = chunkI5SO5OV4_js.normalizeHexColor(style.patternFillForeground, "#000000");
6166
- const bg = chunkI5SO5OV4_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6167
- const svgPattern = chunkI5SO5OV4_js.getPatternSvg(style.patternFillPreset, fg, bg);
6167
+ const fg = chunk275WERXZ_js.normalizeHexColor(style.patternFillForeground, "#000000");
6168
+ const bg = chunk275WERXZ_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6169
+ const svgPattern = chunk275WERXZ_js.getPatternSvg(style.patternFillPreset, fg, bg);
6168
6170
  if (svgPattern) {
6169
6171
  const encoded = encodeURIComponent(svgPattern);
6170
6172
  css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
@@ -6233,7 +6235,7 @@ function cellStyleToCss(style) {
6233
6235
  if (edge.width || edge.color) {
6234
6236
  const w = edge.width ?? 1;
6235
6237
  const c = edge.color ?? style.borderColor ?? "#000000";
6236
- const s = chunkI5SO5OV4_js.ooxmlDashToCssBorderStyle(edge.dash);
6238
+ const s = chunk275WERXZ_js.ooxmlDashToCssBorderStyle(edge.dash);
6237
6239
  css[edge.prefix] = `${w}px ${s} ${c}`;
6238
6240
  }
6239
6241
  }
@@ -6275,7 +6277,7 @@ function TableResizeOverlay({
6275
6277
  const containerRef = React3.useRef(null);
6276
6278
  const [rowBounds, setRowBounds] = React3.useState([]);
6277
6279
  const dragRef = React3.useRef(null);
6278
- const colBoundaries = React3.useMemo(() => chunkI5SO5OV4_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6280
+ const colBoundaries = React3.useMemo(() => chunk275WERXZ_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6279
6281
  const measureRows = React3.useCallback(() => {
6280
6282
  const container = containerRef.current;
6281
6283
  if (!container) {
@@ -6322,11 +6324,11 @@ function TableResizeOverlay({
6322
6324
  const rect = containerRef.current.getBoundingClientRect();
6323
6325
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
6324
6326
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
6325
- onResizeColumns(chunkI5SO5OV4_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6327
+ onResizeColumns(chunk275WERXZ_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6326
6328
  } else if (drag.type === "row" && onResizeRow) {
6327
6329
  const deltaY = e.clientY - drag.startPos;
6328
- const newHeight = chunkI5SO5OV4_js.computeResizedRowHeight(
6329
- drag.initialRowHeight ?? chunkI5SO5OV4_js.DEFAULT_ROW_HEIGHT,
6330
+ const newHeight = chunk275WERXZ_js.computeResizedRowHeight(
6331
+ drag.initialRowHeight ?? chunk275WERXZ_js.DEFAULT_ROW_HEIGHT,
6330
6332
  deltaY
6331
6333
  );
6332
6334
  onResizeRow(drag.index, newHeight);
@@ -6364,7 +6366,7 @@ function TableResizeOverlay({
6364
6366
  e.stopPropagation();
6365
6367
  const table = containerRef.current?.querySelector("table");
6366
6368
  const tr = table?.querySelectorAll("tbody > tr")[index];
6367
- const actualHeight = tr?.offsetHeight ?? chunkI5SO5OV4_js.DEFAULT_ROW_HEIGHT;
6369
+ const actualHeight = tr?.offsetHeight ?? chunk275WERXZ_js.DEFAULT_ROW_HEIGHT;
6368
6370
  document.body.style.cursor = "row-resize";
6369
6371
  document.body.style.userSelect = "none";
6370
6372
  dragRef.current = {
@@ -6410,7 +6412,7 @@ function renderTableFromTableData(element, textStyle, options) {
6410
6412
  }
6411
6413
  const first = selectedCell.selectedCells[0];
6412
6414
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6413
- return chunkI5SO5OV4_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6415
+ return chunk275WERXZ_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6414
6416
  })();
6415
6417
  return /* @__PURE__ */ jsxRuntime.jsx(
6416
6418
  TableResizeOverlay,
@@ -6443,7 +6445,7 @@ function renderTableFromTableData(element, textStyle, options) {
6443
6445
  return null;
6444
6446
  }
6445
6447
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
6446
- const isInMultiSelection = chunkI5SO5OV4_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6448
+ const isInMultiSelection = chunk275WERXZ_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6447
6449
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
6448
6450
  return /* @__PURE__ */ jsxRuntime.jsx(
6449
6451
  "td",
@@ -6466,7 +6468,7 @@ function renderTableFromTableData(element, textStyle, options) {
6466
6468
  }
6467
6469
  event.stopPropagation();
6468
6470
  if (event.shiftKey && selectedCell) {
6469
- const rect = chunkI5SO5OV4_js.computeSelectionRect(
6471
+ const rect = chunk275WERXZ_js.computeSelectionRect(
6470
6472
  selectedCell.rowIndex,
6471
6473
  selectedCell.columnIndex,
6472
6474
  rowIndex,
@@ -6476,7 +6478,7 @@ function renderTableFromTableData(element, textStyle, options) {
6476
6478
  options?.onSelectCell?.({
6477
6479
  rowIndex: selectedCell.rowIndex,
6478
6480
  columnIndex: selectedCell.columnIndex,
6479
- selectedCells: chunkI5SO5OV4_js.rectToCells(rect)
6481
+ selectedCells: chunk275WERXZ_js.rectToCells(rect)
6480
6482
  });
6481
6483
  } else {
6482
6484
  options?.onSelectCell?.({
@@ -6550,7 +6552,7 @@ function renderTableElement(element, textStyle, options) {
6550
6552
  }
6551
6553
  const first = selectedCell.selectedCells[0];
6552
6554
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6553
- return chunkI5SO5OV4_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6555
+ return chunk275WERXZ_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6554
6556
  })();
6555
6557
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
6556
6558
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6615,7 +6617,7 @@ function renderTableElement(element, textStyle, options) {
6615
6617
  "border px-1 py-0.5 align-top",
6616
6618
  isEditable2 && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
6617
6619
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
6618
- chunkI5SO5OV4_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6620
+ chunk275WERXZ_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6619
6621
  ),
6620
6622
  colSpan,
6621
6623
  rowSpan: rSpan,
@@ -6626,7 +6628,7 @@ function renderTableElement(element, textStyle, options) {
6626
6628
  }
6627
6629
  event.stopPropagation();
6628
6630
  if (event.shiftKey && selectedCell && tableEl.tableData) {
6629
- const rect = chunkI5SO5OV4_js.computeSelectionRect(
6631
+ const rect = chunk275WERXZ_js.computeSelectionRect(
6630
6632
  selectedCell.rowIndex,
6631
6633
  selectedCell.columnIndex,
6632
6634
  rowIndex,
@@ -6636,7 +6638,7 @@ function renderTableElement(element, textStyle, options) {
6636
6638
  options?.onSelectCell?.({
6637
6639
  rowIndex: selectedCell.rowIndex,
6638
6640
  columnIndex: selectedCell.columnIndex,
6639
- selectedCells: chunkI5SO5OV4_js.rectToCells(rect)
6641
+ selectedCells: chunk275WERXZ_js.rectToCells(rect)
6640
6642
  });
6641
6643
  } else {
6642
6644
  options?.onSelectCell?.({
@@ -6688,24 +6690,24 @@ function renderTableElement(element, textStyle, options) {
6688
6690
  }
6689
6691
  var LEGEND_ITEM_WIDTH = 80;
6690
6692
  function partAttrs(part) {
6691
- return part ? chunkI5SO5OV4_js.chartPartToAttrs(part) : void 0;
6693
+ return part ? chunk275WERXZ_js.chartPartToAttrs(part) : void 0;
6692
6694
  }
6693
6695
  function resolveReactPalette(chartData) {
6694
6696
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
6695
6697
  return chartData.colorPalette;
6696
6698
  }
6697
- return [...chunkI5SO5OV4_js.getChartStylePalette(chartData.style?.styleId)];
6699
+ return [...chunk275WERXZ_js.getChartStylePalette(chartData.style?.styleId)];
6698
6700
  }
6699
6701
  function buildReactChartViewModel(element) {
6700
6702
  if (element.type !== "chart" || !element.chartData) {
6701
- return chunkI5SO5OV4_js.buildChartViewModel(element);
6703
+ return chunk275WERXZ_js.buildChartViewModel(element);
6702
6704
  }
6703
6705
  const palette = resolveReactPalette(element.chartData);
6704
6706
  const themedElement = {
6705
6707
  ...element,
6706
6708
  chartData: { ...element.chartData, colorPalette: palette }
6707
6709
  };
6708
- return chunkI5SO5OV4_js.buildChartViewModel(themedElement);
6710
+ return chunk275WERXZ_js.buildChartViewModel(themedElement);
6709
6711
  }
6710
6712
  function renderPrimitive(prim, key) {
6711
6713
  switch (prim.kind) {
@@ -7094,7 +7096,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7094
7096
  const unmatchedRows = [];
7095
7097
  categories.forEach((cat, i) => {
7096
7098
  const value = values[i] ?? 0;
7097
- const code = chunkI5SO5OV4_js.resolveRegionCode(cat);
7099
+ const code = chunk275WERXZ_js.resolveRegionCode(cat);
7098
7100
  if (code) {
7099
7101
  regionValueMap.set(code, { value, label: cat });
7100
7102
  } else {
@@ -7132,8 +7134,8 @@ function renderMapChart(element, chartData, categoryLabels) {
7132
7134
  let fill = "#e2e8f0";
7133
7135
  let dataLabel = null;
7134
7136
  if (entry) {
7135
- const t = chunkI5SO5OV4_js.normalizeValue(entry.value, minVal, maxVal);
7136
- fill = chunkI5SO5OV4_js.sequentialColorScale(t);
7137
+ const t = chunk275WERXZ_js.normalizeValue(entry.value, minVal, maxVal);
7138
+ fill = chunk275WERXZ_js.sequentialColorScale(t);
7137
7139
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
7138
7140
  "text",
7139
7141
  {
@@ -7144,7 +7146,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7144
7146
  fontWeight: 600,
7145
7147
  fill: "#1e293b",
7146
7148
  style: { pointerEvents: "none" },
7147
- children: chunkI5SO5OV4_js.formatAxisValue(entry.value)
7149
+ children: chunk275WERXZ_js.formatAxisValue(entry.value)
7148
7150
  },
7149
7151
  `${element.id}-map-dl-${region.code}`
7150
7152
  );
@@ -7162,7 +7164,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7162
7164
  opacity: 0.9,
7163
7165
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
7164
7166
  region.name,
7165
- entry ? `: ${chunkI5SO5OV4_js.formatAxisValue(entry.value)}` : ""
7167
+ entry ? `: ${chunk275WERXZ_js.formatAxisValue(entry.value)}` : ""
7166
7168
  ] })
7167
7169
  }
7168
7170
  ),
@@ -7200,7 +7202,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7200
7202
  fontSize: 7,
7201
7203
  fill: "#64748b",
7202
7204
  textAnchor: "middle",
7203
- children: chunkI5SO5OV4_js.formatAxisValue(minVal)
7205
+ children: chunk275WERXZ_js.formatAxisValue(minVal)
7204
7206
  },
7205
7207
  `${element.id}-map-legend-min`
7206
7208
  ),
@@ -7212,7 +7214,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7212
7214
  fontSize: 7,
7213
7215
  fill: "#64748b",
7214
7216
  textAnchor: "middle",
7215
- children: chunkI5SO5OV4_js.formatAxisValue(maxVal)
7217
+ children: chunk275WERXZ_js.formatAxisValue(maxVal)
7216
7218
  },
7217
7219
  `${element.id}-map-legend-max`
7218
7220
  )
@@ -7278,7 +7280,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7278
7280
  y,
7279
7281
  fontSize,
7280
7282
  fill: "#475569",
7281
- children: chunkI5SO5OV4_js.formatAxisValue(row.value)
7283
+ children: chunk275WERXZ_js.formatAxisValue(row.value)
7282
7284
  },
7283
7285
  `${element.id}-map-ft-val-${i}`
7284
7286
  )
@@ -7349,7 +7351,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
7349
7351
 
7350
7352
  // src/viewer/utils/chart-overlay-utils.ts
7351
7353
  function sColor(series, idx) {
7352
- return chunkI5SO5OV4_js.seriesColor(series, idx);
7354
+ return chunk275WERXZ_js.seriesColor(series, idx);
7353
7355
  }
7354
7356
  function valToY(val, range, topY, bottomY) {
7355
7357
  const usable = bottomY - topY;
@@ -7844,7 +7846,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
7844
7846
  width: 10,
7845
7847
  height: 10,
7846
7848
  rx: 2,
7847
- fill: chunkI5SO5OV4_js.seriesColor(s, i, style?.styleId, colorPalette)
7849
+ fill: chunk275WERXZ_js.seriesColor(s, i, style?.styleId, colorPalette)
7848
7850
  },
7849
7851
  `${id}-leg-r-${i}`
7850
7852
  )
@@ -7868,7 +7870,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
7868
7870
  width: 10,
7869
7871
  height: 10,
7870
7872
  rx: 2,
7871
- fill: chunkI5SO5OV4_js.seriesColor(s, i, style?.styleId, colorPalette)
7873
+ fill: chunk275WERXZ_js.seriesColor(s, i, style?.styleId, colorPalette)
7872
7874
  }
7873
7875
  ),
7874
7876
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -7881,9 +7883,9 @@ function renderGridlines(id, style, range, layout) {
7881
7883
  }
7882
7884
  const lines = [];
7883
7885
  if (range.logScale && range.logBase) {
7884
- const ticks = chunkI5SO5OV4_js.generateLogTicks(range);
7886
+ const ticks = chunk275WERXZ_js.generateLogTicks(range);
7885
7887
  ticks.forEach((tickVal, i) => {
7886
- const y = chunkI5SO5OV4_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7888
+ const y = chunk275WERXZ_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7887
7889
  lines.push(
7888
7890
  /* @__PURE__ */ jsxRuntime.jsx(
7889
7891
  "line",
@@ -7904,7 +7906,7 @@ function renderGridlines(id, style, range, layout) {
7904
7906
  const steps = 4;
7905
7907
  for (let i = 0; i <= steps; i++) {
7906
7908
  const val = range.min + range.span * i / steps;
7907
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7909
+ const y = chunk275WERXZ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7908
7910
  lines.push(
7909
7911
  /* @__PURE__ */ jsxRuntime.jsx(
7910
7912
  "line",
@@ -7928,9 +7930,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7928
7930
  const labels = [];
7929
7931
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
7930
7932
  if (range.logScale && range.logBase) {
7931
- const ticks = chunkI5SO5OV4_js.generateLogTicks(range);
7933
+ const ticks = chunk275WERXZ_js.generateLogTicks(range);
7932
7934
  ticks.forEach((tickVal, i) => {
7933
- const y = chunkI5SO5OV4_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7935
+ const y = chunk275WERXZ_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7934
7936
  labels.push(
7935
7937
  /* @__PURE__ */ jsxRuntime.jsx(
7936
7938
  "text",
@@ -7940,7 +7942,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7940
7942
  textAnchor: "end",
7941
7943
  fontSize: 8,
7942
7944
  fill: "#64748b",
7943
- children: hasDisplayUnits ? chunkI5SO5OV4_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkI5SO5OV4_js.formatAxisValue(tickVal)
7945
+ children: hasDisplayUnits ? chunk275WERXZ_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunk275WERXZ_js.formatAxisValue(tickVal)
7944
7946
  },
7945
7947
  `${id}-vaxis-log-${i}`
7946
7948
  )
@@ -7950,7 +7952,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7950
7952
  const steps = 4;
7951
7953
  for (let i = 0; i <= steps; i++) {
7952
7954
  const val = range.min + range.span * i / steps;
7953
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7955
+ const y = chunk275WERXZ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7954
7956
  labels.push(
7955
7957
  /* @__PURE__ */ jsxRuntime.jsx(
7956
7958
  "text",
@@ -7960,7 +7962,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7960
7962
  textAnchor: "end",
7961
7963
  fontSize: 8,
7962
7964
  fill: "#64748b",
7963
- children: hasDisplayUnits ? chunkI5SO5OV4_js.formatAxisValueWithUnits(val, axisFormatting) : chunkI5SO5OV4_js.formatAxisValue(val)
7965
+ children: hasDisplayUnits ? chunk275WERXZ_js.formatAxisValueWithUnits(val, axisFormatting) : chunk275WERXZ_js.formatAxisValue(val)
7964
7966
  },
7965
7967
  `${id}-vaxis-${i}`
7966
7968
  )
@@ -7968,7 +7970,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7968
7970
  }
7969
7971
  }
7970
7972
  if (hasDisplayUnits) {
7971
- const unitLabel = chunkI5SO5OV4_js.getDisplayUnitLabel(
7973
+ const unitLabel = chunk275WERXZ_js.getDisplayUnitLabel(
7972
7974
  axisFormatting.displayUnits,
7973
7975
  axisFormatting.displayUnitsLabel
7974
7976
  );
@@ -8043,7 +8045,7 @@ function renderZeroLine(id, range, layout) {
8043
8045
  if (range.min >= 0) {
8044
8046
  return null;
8045
8047
  }
8046
- const y = chunkI5SO5OV4_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8048
+ const y = chunk275WERXZ_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8047
8049
  return /* @__PURE__ */ jsxRuntime.jsx(
8048
8050
  "line",
8049
8051
  {
@@ -8067,7 +8069,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8067
8069
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
8068
8070
  for (let i = 0; i <= steps; i++) {
8069
8071
  const val = range.min + range.span * i / steps;
8070
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8072
+ const y = chunk275WERXZ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8071
8073
  labels.push(
8072
8074
  /* @__PURE__ */ jsxRuntime.jsx(
8073
8075
  "text",
@@ -8079,7 +8081,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8079
8081
  fontFamily,
8080
8082
  fontWeight,
8081
8083
  fill: fontColor,
8082
- children: hasDisplayUnits ? chunkI5SO5OV4_js.formatAxisValueWithUnits(val, axisFormatting) : chunkI5SO5OV4_js.formatAxisValue(val)
8084
+ children: hasDisplayUnits ? chunk275WERXZ_js.formatAxisValueWithUnits(val, axisFormatting) : chunk275WERXZ_js.formatAxisValue(val)
8083
8085
  },
8084
8086
  `${id}-sec-vaxis-${i}`
8085
8087
  )
@@ -8103,7 +8105,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8103
8105
  );
8104
8106
  }
8105
8107
  if (hasDisplayUnits) {
8106
- const unitLabel = chunkI5SO5OV4_js.getDisplayUnitLabel(
8108
+ const unitLabel = chunk275WERXZ_js.getDisplayUnitLabel(
8107
8109
  axisFormatting.displayUnits,
8108
8110
  axisFormatting.displayUnitsLabel
8109
8111
  );
@@ -8134,7 +8136,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
8134
8136
  const ticks = [];
8135
8137
  for (let i = 0; i <= steps; i++) {
8136
8138
  const val = range.min + range.span * i / steps;
8137
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8139
+ const y = chunk275WERXZ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8138
8140
  ticks.push(
8139
8141
  /* @__PURE__ */ jsxRuntime.jsx(
8140
8142
  "line",
@@ -8161,7 +8163,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
8161
8163
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
8162
8164
  for (let i = 0; i <= steps; i++) {
8163
8165
  const val = range.min + range.span * i / steps;
8164
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8166
+ const y = chunk275WERXZ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8165
8167
  lines.push(
8166
8168
  /* @__PURE__ */ jsxRuntime.jsx(
8167
8169
  "line",
@@ -8322,7 +8324,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8322
8324
  width: 8,
8323
8325
  height: 8,
8324
8326
  borderRadius: 2,
8325
- backgroundColor: chunkI5SO5OV4_js.seriesColor(
8327
+ backgroundColor: chunk275WERXZ_js.seriesColor(
8326
8328
  s,
8327
8329
  si,
8328
8330
  chartData.style?.styleId,
@@ -8361,8 +8363,8 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8361
8363
  function renderStockChart(element, chartData, categoryLabels) {
8362
8364
  const style = chartData.style;
8363
8365
  const legendPos = style?.legendPosition || "b";
8364
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8365
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos);
8366
+ const range = chunk275WERXZ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8367
+ const layout = chunk275WERXZ_js.computeLayout(element.width, element.height, style, true, legendPos);
8366
8368
  const catCount = Math.max(categoryLabels.length, 1);
8367
8369
  const barGroupWidth = layout.plotWidth / catCount;
8368
8370
  const candleWidth = barGroupWidth * 0.5;
@@ -8383,10 +8385,10 @@ function renderStockChart(element, chartData, categoryLabels) {
8383
8385
  const close = closeSeries.values[ci] ?? high;
8384
8386
  const isUp = close >= open;
8385
8387
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
8386
- const highY = chunkI5SO5OV4_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8387
- const lowY = chunkI5SO5OV4_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8388
- const openY = chunkI5SO5OV4_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8389
- const closeY = chunkI5SO5OV4_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8388
+ const highY = chunk275WERXZ_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8389
+ const lowY = chunk275WERXZ_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8390
+ const openY = chunk275WERXZ_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8391
+ const closeY = chunk275WERXZ_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8390
8392
  elements.push(
8391
8393
  /* @__PURE__ */ jsxRuntime.jsx(
8392
8394
  "line",
@@ -8429,7 +8431,7 @@ function renderStockChart(element, chartData, categoryLabels) {
8429
8431
  textAnchor: "middle",
8430
8432
  fontSize: 7,
8431
8433
  fill: "#334155",
8432
- children: chunkI5SO5OV4_js.formatAxisValue(close)
8434
+ children: chunk275WERXZ_js.formatAxisValue(close)
8433
8435
  },
8434
8436
  `${element.id}-stock-dl-${ci}`
8435
8437
  )
@@ -8471,7 +8473,7 @@ function FailedToLoad() {
8471
8473
  var LazySurfaceChart3DScene = React3__default.default.lazy(
8472
8474
  async () => {
8473
8475
  try {
8474
- return await import('./SurfaceChart3DScene-YR3GX4X6.js');
8476
+ return await import('./SurfaceChart3DScene-PBSZVNAM.js');
8475
8477
  } catch {
8476
8478
  return { default: FailedToLoad };
8477
8479
  }
@@ -8495,7 +8497,7 @@ var SurfaceChart3DErrorBoundary = class extends React3__default.default.Componen
8495
8497
  function buildSurfaceData(chartData, categoryLabels) {
8496
8498
  const rows = chartData.series.length;
8497
8499
  const cols = Math.max(categoryLabels.length, 1);
8498
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8500
+ const range = chunk275WERXZ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8499
8501
  const heightMap = new Float32Array(rows * cols);
8500
8502
  const colorMap = new Float32Array(rows * cols * 3);
8501
8503
  for (let r = 0; r < rows; r++) {
@@ -8615,8 +8617,8 @@ function darkenRgb(r, g, b, factor) {
8615
8617
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8616
8618
  const style = chartData.style;
8617
8619
  const legendPos = style?.legendPosition || "b";
8618
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, false, legendPos);
8619
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8620
+ const layout = chunk275WERXZ_js.computeLayout(element.width, element.height, style, false, legendPos);
8621
+ const range = chunk275WERXZ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8620
8622
  const catCount = Math.max(categoryLabels.length, 1);
8621
8623
  const seriesCount = chartData.series.length;
8622
8624
  const cols = catCount - 1;
@@ -8706,8 +8708,8 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8706
8708
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
8707
8709
  const style = chartData.style;
8708
8710
  const legendPos = style?.legendPosition || "b";
8709
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos);
8710
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8711
+ const layout = chunk275WERXZ_js.computeLayout(element.width, element.height, style, true, legendPos);
8712
+ const range = chunk275WERXZ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8711
8713
  const catCount = Math.max(categoryLabels.length, 1);
8712
8714
  const seriesCount = chartData.series.length;
8713
8715
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -8770,7 +8772,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
8770
8772
  function renderTreemapChart(element, chartData, categoryLabels) {
8771
8773
  const style = chartData.style;
8772
8774
  const legendPos = style?.legendPosition || "b";
8773
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, false, legendPos);
8775
+ const layout = chunk275WERXZ_js.computeLayout(element.width, element.height, style, false, legendPos);
8774
8776
  const allValues = chartData.series.flatMap((s) => s.values);
8775
8777
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
8776
8778
  const rects = [];
@@ -8793,7 +8795,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
8793
8795
  y: curY,
8794
8796
  width: Math.max(w - 1, 1),
8795
8797
  height: Math.max(h - 1, 1),
8796
- fill: chunkI5SO5OV4_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8798
+ fill: chunk275WERXZ_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8797
8799
  rx: 2,
8798
8800
  opacity: 0.85
8799
8801
  },
@@ -8846,8 +8848,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8846
8848
  const style = chartData.style;
8847
8849
  const legendPos = style?.legendPosition || "b";
8848
8850
  const values = chartData.series[0]?.values ?? [];
8849
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8850
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos);
8851
+ const range = chunk275WERXZ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8852
+ const layout = chunk275WERXZ_js.computeLayout(element.width, element.height, style, true, legendPos);
8851
8853
  const catCount = Math.max(categoryLabels.length, values.length, 1);
8852
8854
  const barWidth = layout.plotWidth / catCount * 0.6;
8853
8855
  const gap = layout.plotWidth / catCount * 0.2;
@@ -8858,8 +8860,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8858
8860
  const isLast = i === values.length - 1;
8859
8861
  const startVal = isLast ? 0 : runningTotal;
8860
8862
  const endVal = isLast ? runningTotal + val : runningTotal + val;
8861
- const barStartY = chunkI5SO5OV4_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
8862
- const barEndY = chunkI5SO5OV4_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
8863
+ const barStartY = chunk275WERXZ_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
8864
+ const barEndY = chunk275WERXZ_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
8863
8865
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
8864
8866
  const y = Math.min(barStartY, barEndY);
8865
8867
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -8888,7 +8890,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8888
8890
  textAnchor: "middle",
8889
8891
  fontSize: 7,
8890
8892
  fill: "#334155",
8891
- children: chunkI5SO5OV4_js.formatAxisValue(isLast ? endVal : val)
8893
+ children: chunk275WERXZ_js.formatAxisValue(isLast ? endVal : val)
8892
8894
  },
8893
8895
  `${element.id}-wf-dl-${i}`
8894
8896
  )
@@ -8936,18 +8938,18 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8936
8938
  function renderComboChart(element, chartData, categoryLabels) {
8937
8939
  const style = chartData.style;
8938
8940
  const legendPos = style?.legendPosition || "b";
8939
- const layoutOpts = chunkI5SO5OV4_js.computeLayoutOptions(
8941
+ const layoutOpts = chunk275WERXZ_js.computeLayoutOptions(
8940
8942
  chartData.axes,
8941
8943
  chartData.dataTable,
8942
8944
  chartData.series.length
8943
8945
  );
8944
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
8945
- const { primary, secondary } = chunkI5SO5OV4_js.splitSeriesByAxis(chartData.series, chartData.axes);
8946
+ const layout = chunk275WERXZ_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
8947
+ const { primary, secondary } = chunk275WERXZ_js.splitSeriesByAxis(chartData.series, chartData.axes);
8946
8948
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
8947
8949
  const secondarySeries = secondary.map((e) => e.series);
8948
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(primarySeries, chartData.axes);
8949
- const secondaryRange = secondarySeries.length > 0 ? chunkI5SO5OV4_js.computeValueRange(secondarySeries) : void 0;
8950
- const secondaryAxisFmt = chunkI5SO5OV4_js.getSecondaryValueAxis(chartData.axes);
8950
+ const range = chunk275WERXZ_js.computeValueRangeForChart(primarySeries, chartData.axes);
8951
+ const secondaryRange = secondarySeries.length > 0 ? chunk275WERXZ_js.computeValueRange(secondarySeries) : void 0;
8952
+ const secondaryAxisFmt = chunk275WERXZ_js.getSecondaryValueAxis(chartData.axes);
8951
8953
  const catCount = Math.max(categoryLabels.length, 1);
8952
8954
  const barSeriesCount = 1;
8953
8955
  const barGroupWidth = layout.plotWidth / catCount;
@@ -8963,8 +8965,8 @@ function renderComboChart(element, chartData, categoryLabels) {
8963
8965
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
8964
8966
  barSeries.values.forEach((val, vi) => {
8965
8967
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
8966
- const zeroY = chunkI5SO5OV4_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
8967
- const valY = chunkI5SO5OV4_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
8968
+ const zeroY = chunk275WERXZ_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
8969
+ const valY = chunk275WERXZ_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
8968
8970
  const y = Math.min(zeroY, valY);
8969
8971
  const h = Math.max(Math.abs(zeroY - valY), 1);
8970
8972
  barElements.push(
@@ -8975,7 +8977,7 @@ function renderComboChart(element, chartData, categoryLabels) {
8975
8977
  y,
8976
8978
  width: barWidth,
8977
8979
  height: h,
8978
- fill: chunkI5SO5OV4_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
8980
+ fill: chunk275WERXZ_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
8979
8981
  rx: 1
8980
8982
  },
8981
8983
  `${element.id}-combo-bar-${vi}`
@@ -8991,7 +8993,7 @@ function renderComboChart(element, chartData, categoryLabels) {
8991
8993
  textAnchor: "middle",
8992
8994
  fontSize: 7,
8993
8995
  fill: "#334155",
8994
- children: chunkI5SO5OV4_js.formatAxisValue(val)
8996
+ children: chunk275WERXZ_js.formatAxisValue(val)
8995
8997
  },
8996
8998
  `${element.id}-combo-bar-dl-${vi}`
8997
8999
  )
@@ -9008,10 +9010,10 @@ function renderComboChart(element, chartData, categoryLabels) {
9008
9010
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
9009
9011
  const points = series.values.map((val, vi) => {
9010
9012
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
9011
- const y = chunkI5SO5OV4_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9013
+ const y = chunk275WERXZ_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9012
9014
  return { x, y, val };
9013
9015
  });
9014
- const c = chunkI5SO5OV4_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9016
+ const c = chunk275WERXZ_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9015
9017
  lineElements.push(
9016
9018
  /* @__PURE__ */ jsxRuntime.jsx(
9017
9019
  "polyline",
@@ -9038,7 +9040,7 @@ function renderComboChart(element, chartData, categoryLabels) {
9038
9040
  textAnchor: "middle",
9039
9041
  fontSize: 7,
9040
9042
  fill: "#334155",
9041
- children: chunkI5SO5OV4_js.formatAxisValue(p.val)
9043
+ children: chunk275WERXZ_js.formatAxisValue(p.val)
9042
9044
  },
9043
9045
  `${element.id}-combo-line-dl-${si}-${vi}`
9044
9046
  )
@@ -10792,14 +10794,14 @@ function buildNotesPdf(pages) {
10792
10794
  notes: page.notes,
10793
10795
  slideNumber: page.slideNumber
10794
10796
  }));
10795
- const bytes = chunkI5SO5OV4_js.buildNotesPdfBytes(images, meta);
10797
+ const bytes = chunk275WERXZ_js.buildNotesPdfBytes(images, meta);
10796
10798
  const blob = new Blob([bytes], { type: "application/pdf" });
10797
10799
  return URL.createObjectURL(blob);
10798
10800
  }
10799
10801
 
10800
10802
  // src/viewer/utils/pdf-builder-slides.ts
10801
10803
  function buildPdfFromImageData(images) {
10802
- const bytes = chunkI5SO5OV4_js.buildSlidesPdfBytes(images);
10804
+ const bytes = chunk275WERXZ_js.buildSlidesPdfBytes(images);
10803
10805
  const blob = new Blob([bytes], { type: "application/pdf" });
10804
10806
  return URL.createObjectURL(blob);
10805
10807
  }
@@ -10808,7 +10810,7 @@ function buildPdfFromImageData(images) {
10808
10810
  var activePreview = null;
10809
10811
  function startPreviewAnimation(elementId, preset, options) {
10810
10812
  stopPreviewAnimation();
10811
- const descriptor = chunkI5SO5OV4_js.buildPreviewAnimation(preset, options);
10813
+ const descriptor = chunk275WERXZ_js.buildPreviewAnimation(preset, options);
10812
10814
  if (!descriptor) {
10813
10815
  return;
10814
10816
  }
@@ -10886,7 +10888,7 @@ function useElementOperations(input) {
10886
10888
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
10887
10889
  const updateElementById = React3.useCallback(
10888
10890
  (elementId, updates) => {
10889
- if (chunkI5SO5OV4_js.isTemplateElementId(elementId)) {
10891
+ if (chunk275WERXZ_js.isTemplateElementId(elementId)) {
10890
10892
  const slideId = activeSlide?.id;
10891
10893
  if (slideId) {
10892
10894
  setTemplateElementsBySlideId((prev) => ({
@@ -10940,14 +10942,14 @@ function useElementOperations(input) {
10940
10942
  if (!selectedElement || !chunkKV3EOLP3_js.hasTextProperties(selectedElement)) {
10941
10943
  return;
10942
10944
  }
10943
- const inlineSel = chunkI5SO5OV4_js.getInlineEditorSelection(selectedElement.textSegments);
10945
+ const inlineSel = chunk275WERXZ_js.getInlineEditorSelection(selectedElement.textSegments);
10944
10946
  if (inlineSel && selectedElement.textSegments) {
10945
- const { newSegments: newSegments2, newSelection } = chunkI5SO5OV4_js.applyStyleToSelectedSegments(
10947
+ const { newSegments: newSegments2, newSelection } = chunk275WERXZ_js.applyStyleToSelectedSegments(
10946
10948
  selectedElement.textSegments,
10947
10949
  inlineSel,
10948
10950
  updates
10949
10951
  );
10950
- chunkI5SO5OV4_js.setPendingSelectionRestore(newSelection);
10952
+ chunk275WERXZ_js.setPendingSelectionRestore(newSelection);
10951
10953
  updateSelectedElement({
10952
10954
  textSegments: newSegments2
10953
10955
  });
@@ -10970,9 +10972,9 @@ function useElementOperations(input) {
10970
10972
  if (!selectedElement || !chunkKV3EOLP3_js.hasTextProperties(selectedElement)) {
10971
10973
  return;
10972
10974
  }
10973
- const inlineSel = chunkI5SO5OV4_js.getInlineEditorSelection(selectedElement.textSegments);
10975
+ const inlineSel = chunk275WERXZ_js.getInlineEditorSelection(selectedElement.textSegments);
10974
10976
  if (inlineSel && selectedElement.textSegments) {
10975
- const newSegments = chunkI5SO5OV4_js.applyCaseTransformToSegments(
10977
+ const newSegments = chunk275WERXZ_js.applyCaseTransformToSegments(
10976
10978
  selectedElement.textSegments,
10977
10979
  inlineSel,
10978
10980
  mode
@@ -10982,14 +10984,14 @@ function useElementOperations(input) {
10982
10984
  }
10983
10985
  const updates = {};
10984
10986
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
10985
- updates.textSegments = chunkI5SO5OV4_js.applyCaseTransformToSegments(
10987
+ updates.textSegments = chunk275WERXZ_js.applyCaseTransformToSegments(
10986
10988
  selectedElement.textSegments,
10987
10989
  null,
10988
10990
  mode
10989
10991
  );
10990
10992
  }
10991
10993
  if (typeof selectedElement.text === "string") {
10992
- updates.text = chunkI5SO5OV4_js.transformTextCase(selectedElement.text, mode);
10994
+ updates.text = chunk275WERXZ_js.transformTextCase(selectedElement.text, mode);
10993
10995
  }
10994
10996
  updateSelectedElement(updates);
10995
10997
  },
@@ -11044,7 +11046,7 @@ function useSectionOperations(input) {
11044
11046
  const { sections, setSections, slides, setSlides, markDirty } = input;
11045
11047
  const addSection2 = React3.useCallback(
11046
11048
  (name, afterSlideIndex) => {
11047
- const result = chunkI5SO5OV4_js.addSection(sections, slides, name, afterSlideIndex);
11049
+ const result = chunk275WERXZ_js.addSection(sections, slides, name, afterSlideIndex);
11048
11050
  setSlides(result.slides);
11049
11051
  setSections(result.sections);
11050
11052
  markDirty();
@@ -11053,7 +11055,7 @@ function useSectionOperations(input) {
11053
11055
  );
11054
11056
  const renameSection2 = React3.useCallback(
11055
11057
  (sectionId, newName) => {
11056
- const result = chunkI5SO5OV4_js.renameSection(sections, slides, sectionId, newName);
11058
+ const result = chunk275WERXZ_js.renameSection(sections, slides, sectionId, newName);
11057
11059
  setSections(result.sections);
11058
11060
  setSlides(result.slides);
11059
11061
  markDirty();
@@ -11062,7 +11064,7 @@ function useSectionOperations(input) {
11062
11064
  );
11063
11065
  const deleteSection2 = React3.useCallback(
11064
11066
  (sectionId) => {
11065
- const result = chunkI5SO5OV4_js.deleteSection(sections, slides, sectionId);
11067
+ const result = chunk275WERXZ_js.deleteSection(sections, slides, sectionId);
11066
11068
  setSections(result.sections);
11067
11069
  setSlides(result.slides);
11068
11070
  markDirty();
@@ -11071,21 +11073,21 @@ function useSectionOperations(input) {
11071
11073
  );
11072
11074
  const moveSectionUp2 = React3.useCallback(
11073
11075
  (sectionId) => {
11074
- setSections(chunkI5SO5OV4_js.moveSectionUp(sections, sectionId));
11076
+ setSections(chunk275WERXZ_js.moveSectionUp(sections, sectionId));
11075
11077
  markDirty();
11076
11078
  },
11077
11079
  [sections, setSections, markDirty]
11078
11080
  );
11079
11081
  const moveSectionDown2 = React3.useCallback(
11080
11082
  (sectionId) => {
11081
- setSections(chunkI5SO5OV4_js.moveSectionDown(sections, sectionId));
11083
+ setSections(chunk275WERXZ_js.moveSectionDown(sections, sectionId));
11082
11084
  markDirty();
11083
11085
  },
11084
11086
  [sections, setSections, markDirty]
11085
11087
  );
11086
11088
  const moveSlidesToSection2 = React3.useCallback(
11087
11089
  (slideIndexes, targetSectionId) => {
11088
- const result = chunkI5SO5OV4_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11090
+ const result = chunk275WERXZ_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11089
11091
  setSlides(result.slides);
11090
11092
  setSections(result.sections);
11091
11093
  markDirty();
@@ -11104,7 +11106,7 @@ function useSectionOperations(input) {
11104
11106
 
11105
11107
  // src/viewer/hooks/pointer-move-handlers.ts
11106
11108
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
11107
- const resized = chunkI5SO5OV4_js.applyResize(
11109
+ const resized = chunk275WERXZ_js.applyResize(
11108
11110
  { x: startX, y: startY, width: startWidth, height: startHeight },
11109
11111
  handle,
11110
11112
  dx,
@@ -11116,7 +11118,7 @@ function computeResizeGeometry(handle, startX, startY, startWidth, startHeight,
11116
11118
  if (!snapToGrid) {
11117
11119
  return box;
11118
11120
  }
11119
- return chunkI5SO5OV4_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11121
+ return chunk275WERXZ_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11120
11122
  }
11121
11123
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
11122
11124
  const range = startWidth || 200;
@@ -11226,7 +11228,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
11226
11228
  width: el.width,
11227
11229
  height: el.height
11228
11230
  }));
11229
- const snapResult = chunkI5SO5OV4_js.computeSnapToShape(
11231
+ const snapResult = chunk275WERXZ_js.computeSnapToShape(
11230
11232
  targetX,
11231
11233
  targetY,
11232
11234
  primaryEl.width,
@@ -11369,13 +11371,13 @@ function processPointerUp(input) {
11369
11371
  if (i !== activeSlideIndex) {
11370
11372
  return s;
11371
11373
  }
11372
- const rerouted = chunkI5SO5OV4_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11374
+ const rerouted = chunk275WERXZ_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11373
11375
  if (rerouted.length === 0) {
11374
11376
  return s;
11375
11377
  }
11376
11378
  return {
11377
11379
  ...s,
11378
- elements: chunkI5SO5OV4_js.applyReroutedConnectors(s.elements, rerouted)
11380
+ elements: chunk275WERXZ_js.applyReroutedConnectors(s.elements, rerouted)
11379
11381
  };
11380
11382
  })
11381
11383
  );
@@ -11394,9 +11396,9 @@ function processPointerUp(input) {
11394
11396
  }
11395
11397
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
11396
11398
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
11397
- const hitIds = chunkI5SO5OV4_js.computeMarqueeHitIds(marquee, sourceElements);
11399
+ const hitIds = chunk275WERXZ_js.computeMarqueeHitIds(marquee, sourceElements);
11398
11400
  if (marquee.additive) {
11399
- const merged = chunkI5SO5OV4_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11401
+ const merged = chunk275WERXZ_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11400
11402
  if (merged.length > 0) {
11401
11403
  applySelection(merged[0], merged);
11402
11404
  } else {
@@ -11419,8 +11421,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
11419
11421
  }
11420
11422
  return { ...el, x: start.x + dx, y: start.y + dy };
11421
11423
  });
11422
- const rerouted = chunkI5SO5OV4_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11423
- return chunkI5SO5OV4_js.applyReroutedConnectors(movedElements, rerouted);
11424
+ const rerouted = chunk275WERXZ_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11425
+ return chunk275WERXZ_js.applyReroutedConnectors(movedElements, rerouted);
11424
11426
  };
11425
11427
  if (editTemplateMode) {
11426
11428
  const slideId = activeSlide?.id;
@@ -11571,7 +11573,7 @@ function useCanvasInteractions(input) {
11571
11573
  }
11572
11574
  const el = elementLookup.get(editId);
11573
11575
  if (el && chunkKV3EOLP3_js.hasTextProperties(el)) {
11574
- const newSegments = chunkI5SO5OV4_js.remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
11576
+ const newSegments = chunk275WERXZ_js.remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
11575
11577
  ops.updateElementById(editId, {
11576
11578
  text: inlineEditingText,
11577
11579
  textSegments: newSegments
@@ -11817,7 +11819,7 @@ function createFileHandlers(deps) {
11817
11819
  h = Math.round(h * scale);
11818
11820
  }
11819
11821
  addElement({
11820
- id: chunkI5SO5OV4_js.generateElementId(),
11822
+ id: chunk275WERXZ_js.generateElementId(),
11821
11823
  type: "image",
11822
11824
  x: Math.round((canvasSize.width - w) / 2),
11823
11825
  y: Math.round((canvasSize.height - h) / 2),
@@ -11828,7 +11830,7 @@ function createFileHandlers(deps) {
11828
11830
  };
11829
11831
  img.onerror = () => {
11830
11832
  addElement({
11831
- id: chunkI5SO5OV4_js.generateElementId(),
11833
+ id: chunk275WERXZ_js.generateElementId(),
11832
11834
  type: "image",
11833
11835
  x: 100,
11834
11836
  y: 100,
@@ -11854,7 +11856,7 @@ function createFileHandlers(deps) {
11854
11856
  const elFilePath = file.path;
11855
11857
  const insertMediaElement = (mediaSourceUrl, width, height) => {
11856
11858
  addElement({
11857
- id: chunkI5SO5OV4_js.generateElementId(),
11859
+ id: chunk275WERXZ_js.generateElementId(),
11858
11860
  type: "media",
11859
11861
  mediaType,
11860
11862
  mediaMimeType: file.type || void 0,
@@ -12029,13 +12031,13 @@ function createStructuredElementHandlers(deps) {
12029
12031
  return;
12030
12032
  }
12031
12033
  addElement({
12032
- id: chunkI5SO5OV4_js.generateElementId(),
12034
+ id: chunk275WERXZ_js.generateElementId(),
12033
12035
  type: "smartArt",
12034
12036
  x: 100,
12035
12037
  y: 120,
12036
12038
  width: 600,
12037
12039
  height: 340,
12038
- smartArtData: chunkI5SO5OV4_js.buildSmartArtPresetData(
12040
+ smartArtData: chunk275WERXZ_js.buildSmartArtPresetData(
12039
12041
  layout,
12040
12042
  defaultItems,
12041
12043
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -12047,7 +12049,7 @@ function createStructuredElementHandlers(deps) {
12047
12049
  return;
12048
12050
  }
12049
12051
  addElement({
12050
- id: chunkI5SO5OV4_js.generateElementId(),
12052
+ id: chunk275WERXZ_js.generateElementId(),
12051
12053
  type: "shape",
12052
12054
  x: 120,
12053
12055
  y: 200,
@@ -12106,7 +12108,7 @@ function createStructuredElementHandlers(deps) {
12106
12108
  const displayText = value || fieldTexts[fieldType] || fieldType;
12107
12109
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
12108
12110
  addElement({
12109
- id: chunkI5SO5OV4_js.generateElementId(),
12111
+ id: chunk275WERXZ_js.generateElementId(),
12110
12112
  type: "shape",
12111
12113
  x: 120,
12112
12114
  y: 200,
@@ -12128,7 +12130,7 @@ function createStructuredElementHandlers(deps) {
12128
12130
  if (!activeSlide) {
12129
12131
  return;
12130
12132
  }
12131
- const preset = chunkI5SO5OV4_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12133
+ const preset = chunk275WERXZ_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12132
12134
  if (!preset) {
12133
12135
  return;
12134
12136
  }
@@ -12141,7 +12143,7 @@ function createStructuredElementHandlers(deps) {
12141
12143
  defaultPptxAction.highlightClick = true;
12142
12144
  }
12143
12145
  addElement({
12144
- id: chunkI5SO5OV4_js.generateElementId(),
12146
+ id: chunk275WERXZ_js.generateElementId(),
12145
12147
  type: "shape",
12146
12148
  x: 150,
12147
12149
  y: 150,
@@ -12208,7 +12210,7 @@ function useInsertElements(input) {
12208
12210
  return;
12209
12211
  }
12210
12212
  addElement({
12211
- id: chunkI5SO5OV4_js.generateElementId(),
12213
+ id: chunk275WERXZ_js.generateElementId(),
12212
12214
  type: "text",
12213
12215
  x: 100,
12214
12216
  y: 100,
@@ -12223,7 +12225,7 @@ function useInsertElements(input) {
12223
12225
  return;
12224
12226
  }
12225
12227
  addElement({
12226
- id: chunkI5SO5OV4_js.generateElementId(),
12228
+ id: chunk275WERXZ_js.generateElementId(),
12227
12229
  type: "shape",
12228
12230
  x: 150,
12229
12231
  y: 150,
@@ -12242,15 +12244,15 @@ function useInsertElements(input) {
12242
12244
  return;
12243
12245
  }
12244
12246
  addElement({
12245
- ...chunkI5SO5OV4_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12246
- id: chunkI5SO5OV4_js.generateElementId()
12247
+ ...chunk275WERXZ_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12248
+ id: chunk275WERXZ_js.generateElementId()
12247
12249
  });
12248
12250
  };
12249
12251
  const handleAddChart = (chartType) => {
12250
12252
  if (!activeSlide) {
12251
12253
  return;
12252
12254
  }
12253
- addElement(chunkI5SO5OV4_js.createDefaultChartElement(chartType));
12255
+ addElement(chunk275WERXZ_js.createDefaultChartElement(chartType));
12254
12256
  };
12255
12257
  const structured = createStructuredElementHandlers({
12256
12258
  activeSlide,
@@ -12320,7 +12322,7 @@ function useClipboardHandlers(input) {
12320
12322
  if (!selectedElement) {
12321
12323
  return;
12322
12324
  }
12323
- setClipboardPayload(chunkI5SO5OV4_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
12325
+ setClipboardPayload(chunk275WERXZ_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
12324
12326
  };
12325
12327
  const handleDelete = () => {
12326
12328
  const idsToDelete = effectiveSelectedIds;
@@ -12337,7 +12339,7 @@ function useClipboardHandlers(input) {
12337
12339
  handleDelete();
12338
12340
  };
12339
12341
  const insertClone = (source) => {
12340
- const clone = chunkI5SO5OV4_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
12342
+ const clone = chunk275WERXZ_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
12341
12343
  ops.updateActiveElements((els) => [...els, clone]);
12342
12344
  ops.applySelection(clone.id);
12343
12345
  history.markDirty();
@@ -12547,7 +12549,7 @@ function useMergeShapesHandler(input) {
12547
12549
  bounds.height
12548
12550
  );
12549
12551
  const newEl = {
12550
- id: chunkI5SO5OV4_js.generateElementId(),
12552
+ id: chunk275WERXZ_js.generateElementId(),
12551
12553
  type: "shape",
12552
12554
  x: bounds.x,
12553
12555
  y: bounds.y,
@@ -12606,7 +12608,7 @@ function useMergeShapesHandler(input) {
12606
12608
  );
12607
12609
  const primary = targets[0];
12608
12610
  const newEl = {
12609
- id: chunkI5SO5OV4_js.generateElementId(),
12611
+ id: chunk275WERXZ_js.generateElementId(),
12610
12612
  type: "shape",
12611
12613
  x: bounds.x,
12612
12614
  y: bounds.y,
@@ -12669,7 +12671,7 @@ function useGroupAlignLayerHandlers(input) {
12669
12671
  if (ids.length < 2 || !activeSlide) {
12670
12672
  return;
12671
12673
  }
12672
- const { elements, groupId } = chunkI5SO5OV4_js.groupElements(ops.activeElements, ids, chunkI5SO5OV4_js.generateElementId());
12674
+ const { elements, groupId } = chunk275WERXZ_js.groupElements(ops.activeElements, ids, chunk275WERXZ_js.generateElementId());
12673
12675
  if (groupId === null) {
12674
12676
  return;
12675
12677
  }
@@ -12682,12 +12684,12 @@ function useGroupAlignLayerHandlers(input) {
12682
12684
  return;
12683
12685
  }
12684
12686
  const group = selectedElement;
12685
- const intoTemplate = chunkI5SO5OV4_js.isTemplateElementId(group.id);
12687
+ const intoTemplate = chunk275WERXZ_js.isTemplateElementId(group.id);
12686
12688
  const ungrouped = group.children.map((child) => ({
12687
12689
  ...structuredClone(child),
12688
12690
  // Keep child ids in the same store as the group so later edits route
12689
12691
  // correctly: template groups yield template-prefixed child ids.
12690
- id: intoTemplate ? chunkI5SO5OV4_js.makeCloneId(true, child.id || group.id) : child.id || chunkI5SO5OV4_js.generateElementId(),
12692
+ id: intoTemplate ? chunk275WERXZ_js.makeCloneId(true, child.id || group.id) : child.id || chunk275WERXZ_js.generateElementId(),
12691
12693
  x: child.x + group.x,
12692
12694
  y: child.y + group.y
12693
12695
  }));
@@ -12711,7 +12713,7 @@ function useGroupAlignLayerHandlers(input) {
12711
12713
  if (!edge) {
12712
12714
  return;
12713
12715
  }
12714
- const positions = chunkI5SO5OV4_js.alignElements(selectedElements, edge);
12716
+ const positions = chunk275WERXZ_js.alignElements(selectedElements, edge);
12715
12717
  for (const [id, pos] of positions) {
12716
12718
  const el = elementLookup.get(id);
12717
12719
  if (!el) {
@@ -12729,7 +12731,7 @@ function useGroupAlignLayerHandlers(input) {
12729
12731
  if (!distAxis) {
12730
12732
  return;
12731
12733
  }
12732
- const positions = chunkI5SO5OV4_js.distributeElements(selectedElements, distAxis);
12734
+ const positions = chunk275WERXZ_js.distributeElements(selectedElements, distAxis);
12733
12735
  for (const [id, pos] of positions) {
12734
12736
  const el = elementLookup.get(id);
12735
12737
  if (!el) {
@@ -12746,7 +12748,7 @@ function useGroupAlignLayerHandlers(input) {
12746
12748
  }
12747
12749
  const id = selectedElement.id;
12748
12750
  ops.updateActiveElements(
12749
- (els) => direction === "forward" ? chunkI5SO5OV4_js.bringForward(els, id) : direction === "backward" ? chunkI5SO5OV4_js.sendBackward(els, id) : els
12751
+ (els) => direction === "forward" ? chunk275WERXZ_js.bringForward(els, id) : direction === "backward" ? chunk275WERXZ_js.sendBackward(els, id) : els
12750
12752
  );
12751
12753
  history.markDirty();
12752
12754
  };
@@ -12756,7 +12758,7 @@ function useGroupAlignLayerHandlers(input) {
12756
12758
  }
12757
12759
  const id = selectedElement.id;
12758
12760
  ops.updateActiveElements(
12759
- (els) => direction === "front" ? chunkI5SO5OV4_js.bringToFront(els, id) : chunkI5SO5OV4_js.sendToBack(els, id)
12761
+ (els) => direction === "front" ? chunk275WERXZ_js.bringToFront(els, id) : chunk275WERXZ_js.sendToBack(els, id)
12760
12762
  );
12761
12763
  history.markDirty();
12762
12764
  };
@@ -12878,7 +12880,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
12878
12880
  function useSlideManagement(input) {
12879
12881
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
12880
12882
  const handleAddSlide = () => {
12881
- const newSlide = chunkI5SO5OV4_js.createBlankSlide(slides.length + 1);
12883
+ const newSlide = chunk275WERXZ_js.createBlankSlide(slides.length + 1);
12882
12884
  ops.updateSlides((prev) => {
12883
12885
  const next = [...prev];
12884
12886
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -12941,7 +12943,7 @@ function useSlideManagement(input) {
12941
12943
  }
12942
12944
  const clone = {
12943
12945
  ...src,
12944
- id: chunkI5SO5OV4_js.makeSlideId(),
12946
+ id: chunk275WERXZ_js.makeSlideId(),
12945
12947
  elements: src.elements.map((el) => ({
12946
12948
  ...el,
12947
12949
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -12973,7 +12975,7 @@ function useSlideManagement(input) {
12973
12975
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
12974
12976
  const insertAt = activeSlideIndex + 1;
12975
12977
  const draft = {
12976
- ...chunkI5SO5OV4_js.createBlankSlide(slides.length + 1),
12978
+ ...chunk275WERXZ_js.createBlankSlide(slides.length + 1),
12977
12979
  layoutPath,
12978
12980
  ...layoutName ? { layoutName } : {}
12979
12981
  };
@@ -13034,7 +13036,7 @@ function createTableMergeHandlers(input) {
13034
13036
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
13035
13037
  return;
13036
13038
  }
13037
- const newTableData = chunkI5SO5OV4_js.mergeCells(
13039
+ const newTableData = chunk275WERXZ_js.mergeCells(
13038
13040
  [
13039
13041
  { row: rowIndex, col: columnIndex },
13040
13042
  { row: rowIndex, col: nextColIdx }
@@ -13068,7 +13070,7 @@ function createTableMergeHandlers(input) {
13068
13070
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
13069
13071
  return;
13070
13072
  }
13071
- const newTableData = chunkI5SO5OV4_js.mergeCells(
13073
+ const newTableData = chunk275WERXZ_js.mergeCells(
13072
13074
  [
13073
13075
  { row: rowIndex, col: columnIndex },
13074
13076
  { row: targetNextRowIdx, col: columnIndex }
@@ -13091,7 +13093,7 @@ function createTableMergeHandlers(input) {
13091
13093
  return;
13092
13094
  }
13093
13095
  const td = selectedElement.tableData;
13094
- const newTableData = chunkI5SO5OV4_js.mergeCells(ts.selectedCells, td);
13096
+ const newTableData = chunk275WERXZ_js.mergeCells(ts.selectedCells, td);
13095
13097
  const updates = { tableData: newTableData };
13096
13098
  const newRawXml = chunkKV3EOLP3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13097
13099
  if (newRawXml) {
@@ -13110,7 +13112,7 @@ function createTableMergeHandlers(input) {
13110
13112
  }
13111
13113
  const { rowIndex, columnIndex } = ts;
13112
13114
  const td = selectedElement.tableData;
13113
- const newTableData = chunkI5SO5OV4_js.splitCell(rowIndex, columnIndex, td);
13115
+ const newTableData = chunk275WERXZ_js.splitCell(rowIndex, columnIndex, td);
13114
13116
  const updates = { tableData: newTableData };
13115
13117
  const newRawXml = chunkKV3EOLP3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13116
13118
  if (newRawXml) {
@@ -13244,7 +13246,7 @@ function createTableStructHandlers(input) {
13244
13246
  return;
13245
13247
  }
13246
13248
  const rowIdx = ts?.rowIndex ?? 0;
13247
- const newTableData = chunkI5SO5OV4_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13249
+ const newTableData = chunk275WERXZ_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13248
13250
  const updates = { tableData: newTableData };
13249
13251
  const newRawXml = chunkKV3EOLP3_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13250
13252
  if (newRawXml) {
@@ -13259,7 +13261,7 @@ function createTableStructHandlers(input) {
13259
13261
  }
13260
13262
  const td = selectedElement.tableData;
13261
13263
  const rowIdx = ts?.rowIndex ?? 0;
13262
- const newTableData = chunkI5SO5OV4_js.deleteTableRow(td, rowIdx);
13264
+ const newTableData = chunk275WERXZ_js.deleteTableRow(td, rowIdx);
13263
13265
  if (newTableData === td) {
13264
13266
  return;
13265
13267
  }
@@ -13276,7 +13278,7 @@ function createTableStructHandlers(input) {
13276
13278
  return;
13277
13279
  }
13278
13280
  const colIdx = ts?.columnIndex ?? 0;
13279
- const newTableData = chunkI5SO5OV4_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13281
+ const newTableData = chunk275WERXZ_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13280
13282
  const updates = { tableData: newTableData };
13281
13283
  const newRawXml = chunkKV3EOLP3_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13282
13284
  if (newRawXml) {
@@ -13291,7 +13293,7 @@ function createTableStructHandlers(input) {
13291
13293
  }
13292
13294
  const td = selectedElement.tableData;
13293
13295
  const colIdx = ts?.columnIndex ?? 0;
13294
- const newTableData = chunkI5SO5OV4_js.deleteTableColumn(td, colIdx);
13296
+ const newTableData = chunk275WERXZ_js.deleteTableColumn(td, colIdx);
13295
13297
  if (newTableData === td) {
13296
13298
  return;
13297
13299
  }
@@ -13332,8 +13334,8 @@ async function renderToCanvas(element, options = {}) {
13332
13334
  return html2canvasPro(element, {
13333
13335
  ...options,
13334
13336
  onclone: async (doc, clonedEl) => {
13335
- await chunkI5SO5OV4_js.normalizeColorsForCapture(doc, clonedEl);
13336
- chunkI5SO5OV4_js.preprocessCssForCapture(clonedEl);
13337
+ await chunk275WERXZ_js.normalizeColorsForCapture(doc, clonedEl);
13338
+ chunk275WERXZ_js.preprocessCssForCapture(clonedEl);
13337
13339
  if (typeof userOnClone === "function") {
13338
13340
  userOnClone(doc, clonedEl);
13339
13341
  }
@@ -13389,7 +13391,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
13389
13391
  }
13390
13392
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
13391
13393
  const blob = await exportSlideToPngBlob(slideElement, options);
13392
- chunkI5SO5OV4_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13394
+ chunk275WERXZ_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13393
13395
  }
13394
13396
  async function copySlideToClipboard(slideElement, options = {}) {
13395
13397
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -13411,7 +13413,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
13411
13413
  continue;
13412
13414
  }
13413
13415
  const canvas = await renderElementToCanvas(stageEl, scale);
13414
- images.push(chunkI5SO5OV4_js.canvasToJpegData(canvas));
13416
+ images.push(chunk275WERXZ_js.canvasToJpegData(canvas));
13415
13417
  }
13416
13418
  onProgress?.(totalSlides, totalSlides);
13417
13419
  setActiveSlide(currentSlideIndex);
@@ -13419,7 +13421,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
13419
13421
  throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
13420
13422
  }
13421
13423
  const pdfBlobUrl = buildPdfFromImageData(images);
13422
- chunkI5SO5OV4_js.downloadDataUrl(pdfBlobUrl, filename);
13424
+ chunk275WERXZ_js.downloadDataUrl(pdfBlobUrl, filename);
13423
13425
  }
13424
13426
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
13425
13427
  const { scale = 2, onProgress } = options;
@@ -13468,7 +13470,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
13468
13470
  throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
13469
13471
  }
13470
13472
  const pdfDataUrl = buildNotesPdf(pages);
13471
- chunkI5SO5OV4_js.downloadDataUrl(pdfDataUrl, filename);
13473
+ chunk275WERXZ_js.downloadDataUrl(pdfDataUrl, filename);
13472
13474
  }
13473
13475
 
13474
13476
  // src/viewer/utils/export-video.ts
@@ -13512,7 +13514,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13512
13514
  const fps = 30;
13513
13515
  const stream = recordingCanvas.captureStream(fps);
13514
13516
  const recorder = new MediaRecorder(stream, {
13515
- mimeType: chunkI5SO5OV4_js.pickSupportedMimeType([...chunkI5SO5OV4_js.WEBM_MIME_CANDIDATES]),
13517
+ mimeType: chunk275WERXZ_js.pickSupportedMimeType([...chunk275WERXZ_js.WEBM_MIME_CANDIDATES]),
13516
13518
  videoBitsPerSecond: 5e6
13517
13519
  });
13518
13520
  const chunks = [];
@@ -13535,8 +13537,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13535
13537
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
13536
13538
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
13537
13539
  ctx.drawImage(slideCanvases[i], 0, 0);
13538
- const frameInterval = chunkI5SO5OV4_js.fpsToFrameIntervalMs(fps);
13539
- const framesNeeded = chunkI5SO5OV4_js.segmentFrameCount(duration, fps);
13540
+ const frameInterval = chunk275WERXZ_js.fpsToFrameIntervalMs(fps);
13541
+ const framesNeeded = chunk275WERXZ_js.segmentFrameCount(duration, fps);
13540
13542
  for (let f = 0; f < framesNeeded; f++) {
13541
13543
  if (signal?.aborted) {
13542
13544
  recorder.stop();
@@ -13585,7 +13587,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
13585
13587
  if (frames.length === 0) {
13586
13588
  throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNoSlidesGif"]);
13587
13589
  }
13588
- const gifBytes = chunkI5SO5OV4_js.encodeGif(frames, Math.round(slideDurationMs / 10));
13590
+ const gifBytes = chunk275WERXZ_js.encodeGif(frames, Math.round(slideDurationMs / 10));
13589
13591
  onProgress?.(totalSlides, totalSlides);
13590
13592
  const buf = new ArrayBuffer(gifBytes.length);
13591
13593
  new Uint8Array(buf).set(gifBytes);
@@ -13699,7 +13701,7 @@ function useExportSaveAs(input) {
13699
13701
  }
13700
13702
  setExportProgress(70);
13701
13703
  setExportStatusMessage("Writing README...");
13702
- const readme = chunkI5SO5OV4_js.generatePackageReadme(pptxFilename);
13704
+ const readme = chunk275WERXZ_js.generatePackageReadme(pptxFilename);
13703
13705
  pkgFolder.file("README.txt", readme);
13704
13706
  if (abortCtrl.signal.aborted) {
13705
13707
  throw new DOMException("Export cancelled", "AbortError");
@@ -13710,7 +13712,7 @@ function useExportSaveAs(input) {
13710
13712
  setExportProgress(95);
13711
13713
  setExportStatusMessage("Downloading...");
13712
13714
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
13713
- chunkI5SO5OV4_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
13715
+ chunk275WERXZ_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
13714
13716
  setExportProgress(100);
13715
13717
  } catch (err) {
13716
13718
  if (err.name !== "AbortError") {
@@ -13733,7 +13735,7 @@ function useExportSaveAs(input) {
13733
13735
  const blob = new Blob([data], {
13734
13736
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
13735
13737
  });
13736
- chunkI5SO5OV4_js.downloadBlob(blob, `${baseName}.${ext}`);
13738
+ chunk275WERXZ_js.downloadBlob(blob, `${baseName}.${ext}`);
13737
13739
  } catch (err) {
13738
13740
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
13739
13741
  }
@@ -13810,7 +13812,7 @@ function safeConfirm(message) {
13810
13812
  }
13811
13813
  }
13812
13814
  function downloadBlob2(blob, filename) {
13813
- chunkI5SO5OV4_js.downloadBlob(blob, chunkI5SO5OV4_js.sanitizeDownloadFilename(filename));
13815
+ chunk275WERXZ_js.downloadBlob(blob, chunk275WERXZ_js.sanitizeDownloadFilename(filename));
13814
13816
  }
13815
13817
 
13816
13818
  // src/viewer/hooks/useExportHandlers.ts
@@ -13911,21 +13913,21 @@ function useExportHandlers(input) {
13911
13913
  {
13912
13914
  scale: 2,
13913
13915
  onProgress: (current, total) => {
13914
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total));
13915
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Rendering", current, total));
13916
+ setExportProgress(chunk275WERXZ_js.slideProgressPercent(current, total));
13917
+ setExportStatusMessage(chunk275WERXZ_js.slideStatusLabel("Rendering", current, total));
13916
13918
  },
13917
13919
  signal: abortCtrl.signal
13918
13920
  }
13919
13921
  );
13920
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
13922
+ setExportProgress(chunk275WERXZ_js.EXPORT_ASSEMBLING_PERCENT);
13921
13923
  setExportStatusMessage("Building PDF...");
13922
13924
  await new Promise((r) => {
13923
13925
  setTimeout(r, 100);
13924
13926
  });
13925
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
13927
+ setExportProgress(chunk275WERXZ_js.EXPORT_DONE_PERCENT);
13926
13928
  setExportStatusMessage("Done!");
13927
13929
  } catch (err) {
13928
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
13930
+ if (!chunk275WERXZ_js.isExportAbortError(err)) {
13929
13931
  console.error("[PowerPointViewer] PDF export failed:", err);
13930
13932
  }
13931
13933
  } finally {
@@ -13955,21 +13957,21 @@ function useExportHandlers(input) {
13955
13957
  {
13956
13958
  scale: 2,
13957
13959
  onProgress: (current, total) => {
13958
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total));
13959
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Rendering", current, total));
13960
+ setExportProgress(chunk275WERXZ_js.slideProgressPercent(current, total));
13961
+ setExportStatusMessage(chunk275WERXZ_js.slideStatusLabel("Rendering", current, total));
13960
13962
  },
13961
13963
  signal: abortCtrl.signal
13962
13964
  }
13963
13965
  );
13964
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
13966
+ setExportProgress(chunk275WERXZ_js.EXPORT_ASSEMBLING_PERCENT);
13965
13967
  setExportStatusMessage("Building PDF...");
13966
13968
  await new Promise((r) => {
13967
13969
  setTimeout(r, 100);
13968
13970
  });
13969
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
13971
+ setExportProgress(chunk275WERXZ_js.EXPORT_DONE_PERCENT);
13970
13972
  setExportStatusMessage("Done!");
13971
13973
  } catch (err) {
13972
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
13974
+ if (!chunk275WERXZ_js.isExportAbortError(err)) {
13973
13975
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
13974
13976
  }
13975
13977
  } finally {
@@ -14010,22 +14012,22 @@ function useExportHandlers(input) {
14010
14012
  scale: 1,
14011
14013
  slideDurationMs: 3e3,
14012
14014
  onProgress: (current, total) => {
14013
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total, 45));
14014
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Capturing", current, total));
14015
+ setExportProgress(chunk275WERXZ_js.slideProgressPercent(current, total, 45));
14016
+ setExportStatusMessage(chunk275WERXZ_js.slideStatusLabel("Capturing", current, total));
14015
14017
  },
14016
14018
  onRecordProgress: (current, total) => {
14017
- setExportProgress(chunkI5SO5OV4_js.recordProgressPercent(current, total));
14018
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Recording", current, total));
14019
+ setExportProgress(chunk275WERXZ_js.recordProgressPercent(current, total));
14020
+ setExportStatusMessage(chunk275WERXZ_js.slideStatusLabel("Recording", current, total));
14019
14021
  },
14020
14022
  signal: abortCtrl.signal
14021
14023
  }
14022
14024
  );
14023
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
14025
+ setExportProgress(chunk275WERXZ_js.EXPORT_ASSEMBLING_PERCENT);
14024
14026
  setExportStatusMessage("Saving file...");
14025
14027
  downloadBlob2(blob, "presentation.webm");
14026
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
14028
+ setExportProgress(chunk275WERXZ_js.EXPORT_DONE_PERCENT);
14027
14029
  } catch (err) {
14028
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
14030
+ if (!chunk275WERXZ_js.isExportAbortError(err)) {
14029
14031
  console.error("[PowerPointViewer] Video export failed:", err);
14030
14032
  }
14031
14033
  } finally {
@@ -14053,18 +14055,18 @@ function useExportHandlers(input) {
14053
14055
  scale: 0.5,
14054
14056
  slideDurationMs: 2e3,
14055
14057
  onProgress: (current, total) => {
14056
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total));
14057
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Encoding", current, total));
14058
+ setExportProgress(chunk275WERXZ_js.slideProgressPercent(current, total));
14059
+ setExportStatusMessage(chunk275WERXZ_js.slideStatusLabel("Encoding", current, total));
14058
14060
  },
14059
14061
  signal: abortCtrl.signal
14060
14062
  }
14061
14063
  );
14062
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
14064
+ setExportProgress(chunk275WERXZ_js.EXPORT_ASSEMBLING_PERCENT);
14063
14065
  setExportStatusMessage("Saving file...");
14064
14066
  downloadBlob2(blob, "presentation.gif");
14065
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
14067
+ setExportProgress(chunk275WERXZ_js.EXPORT_DONE_PERCENT);
14066
14068
  } catch (err) {
14067
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
14069
+ if (!chunk275WERXZ_js.isExportAbortError(err)) {
14068
14070
  console.error("[PowerPointViewer] GIF export failed:", err);
14069
14071
  }
14070
14072
  } finally {
@@ -14104,7 +14106,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
14104
14106
  }
14105
14107
  printWindow.document.open();
14106
14108
  printWindow.document.write(
14107
- chunkI5SO5OV4_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14109
+ chunk275WERXZ_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14108
14110
  );
14109
14111
  printWindow.document.close();
14110
14112
  printWindow.focus();
@@ -14165,7 +14167,7 @@ function usePrintHandlers(input) {
14165
14167
  if (svgs.length === 0) {
14166
14168
  return;
14167
14169
  }
14168
- const printDoc = chunkI5SO5OV4_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14170
+ const printDoc = chunk275WERXZ_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14169
14171
  title: "Slides (Vector)",
14170
14172
  orientation: settings.orientation,
14171
14173
  colorFilter
@@ -14201,7 +14203,7 @@ function usePrintHandlers(input) {
14201
14203
  if (settings.printWhat === "outline") {
14202
14204
  openPrintWindow(
14203
14205
  "Outline",
14204
- `<div class="outline-page">${chunkI5SO5OV4_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14206
+ `<div class="outline-page">${chunk275WERXZ_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14205
14207
  settings.orientation,
14206
14208
  colorFilter,
14207
14209
  settings.frameSlides
@@ -14226,7 +14228,7 @@ function usePrintHandlers(input) {
14226
14228
  if (settings.printWhat === "slides") {
14227
14229
  openPrintWindow(
14228
14230
  "Slides",
14229
- chunkI5SO5OV4_js.buildSlidesHtml(slideImages, slideIndices),
14231
+ chunk275WERXZ_js.buildSlidesHtml(slideImages, slideIndices),
14230
14232
  settings.orientation,
14231
14233
  colorFilter,
14232
14234
  settings.frameSlides
@@ -14236,7 +14238,7 @@ function usePrintHandlers(input) {
14236
14238
  if (settings.printWhat === "notes") {
14237
14239
  openPrintWindow(
14238
14240
  "Notes Pages",
14239
- chunkI5SO5OV4_js.buildNotesHtml(slideImages, slideIndices, slides),
14241
+ chunk275WERXZ_js.buildNotesHtml(slideImages, slideIndices, slides),
14240
14242
  "portrait",
14241
14243
  colorFilter,
14242
14244
  settings.frameSlides
@@ -14247,7 +14249,7 @@ function usePrintHandlers(input) {
14247
14249
  const spp = settings.slidesPerPage;
14248
14250
  openPrintWindow(
14249
14251
  `Handout ${spp} per page`,
14250
- chunkI5SO5OV4_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14252
+ chunk275WERXZ_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14251
14253
  "portrait",
14252
14254
  colorFilter,
14253
14255
  settings.frameSlides
@@ -14530,7 +14532,7 @@ function usePropertyHandlers(input) {
14530
14532
  width: canvasSize.width,
14531
14533
  height: canvasSize.height
14532
14534
  };
14533
- setCompareResult(chunkI5SO5OV4_js.comparePresentation(cur, other));
14535
+ setCompareResult(chunk275WERXZ_js.comparePresentation(cur, other));
14534
14536
  setIsComparePanelOpen(true);
14535
14537
  } catch (err) {
14536
14538
  console.warn("Compare failed:", err);
@@ -14547,7 +14549,7 @@ function usePropertyHandlers(input) {
14547
14549
  if (!diff || diff.status === "unchanged") {
14548
14550
  return;
14549
14551
  }
14550
- setSlides((prev) => chunkI5SO5OV4_js.applyAcceptSlide(prev, diff));
14552
+ setSlides((prev) => chunk275WERXZ_js.applyAcceptSlide(prev, diff));
14551
14553
  setIsDirty(true);
14552
14554
  },
14553
14555
  [compareResult, setSlides, setIsDirty]
@@ -14558,10 +14560,10 @@ function usePropertyHandlers(input) {
14558
14560
  if (!compareResult) {
14559
14561
  return;
14560
14562
  }
14561
- setSlides((prev) => chunkI5SO5OV4_js.applyAcceptAllSlides(prev, compareResult));
14563
+ setSlides((prev) => chunk275WERXZ_js.applyAcceptAllSlides(prev, compareResult));
14562
14564
  setIsDirty(true);
14563
14565
  }, [compareResult, setSlides, setIsDirty]);
14564
- const usedFontFamilies = React3.useMemo(() => chunkI5SO5OV4_js.collectUsedFonts(slides), [slides]);
14566
+ const usedFontFamilies = React3.useMemo(() => chunk275WERXZ_js.collectUsedFonts(slides), [slides]);
14565
14567
  return {
14566
14568
  handleUpdateNotes,
14567
14569
  handleUpdateSlide,
@@ -14680,7 +14682,7 @@ function useIsMobile(input) {
14680
14682
  const containerRef = input?.containerRef;
14681
14683
  const isTouchDevice = React3.useSyncExternalStore(
14682
14684
  subscribeTouchCapability,
14683
- chunkI5SO5OV4_js.detectTouchDevice,
14685
+ chunk275WERXZ_js.detectTouchDevice,
14684
14686
  () => false
14685
14687
  // server snapshot
14686
14688
  );
@@ -14696,7 +14698,7 @@ function useIsMobile(input) {
14696
14698
  }
14697
14699
  return containerRef?.current?.clientHeight ?? window.innerHeight;
14698
14700
  });
14699
- const [orientation, setOrientation] = React3.useState(chunkI5SO5OV4_js.detectOrientation);
14701
+ const [orientation, setOrientation] = React3.useState(chunk275WERXZ_js.detectOrientation);
14700
14702
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = React3.useState(false);
14701
14703
  const [initialViewportHeight] = React3.useState(
14702
14704
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -14740,7 +14742,7 @@ function useIsMobile(input) {
14740
14742
  return;
14741
14743
  }
14742
14744
  const handleOrientationChange = () => {
14743
- setOrientation(chunkI5SO5OV4_js.detectOrientation());
14745
+ setOrientation(chunk275WERXZ_js.detectOrientation());
14744
14746
  };
14745
14747
  if (screen.orientation) {
14746
14748
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -14770,9 +14772,9 @@ function useIsMobile(input) {
14770
14772
  window.addEventListener("resize", handleResize);
14771
14773
  return () => window.removeEventListener("resize", handleResize);
14772
14774
  }, [isTouchDevice, initialViewportHeight]);
14773
- const isMobile = chunkI5SO5OV4_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
14774
- const isTablet = !isMobile && containerWidth >= chunkI5SO5OV4_js.MOBILE_BREAKPOINT && containerWidth < chunkI5SO5OV4_js.TABLET_BREAKPOINT;
14775
- const isDesktop = !isMobile && containerWidth >= chunkI5SO5OV4_js.TABLET_BREAKPOINT;
14775
+ const isMobile = chunk275WERXZ_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
14776
+ const isTablet = !isMobile && containerWidth >= chunk275WERXZ_js.MOBILE_BREAKPOINT && containerWidth < chunk275WERXZ_js.TABLET_BREAKPOINT;
14777
+ const isDesktop = !isMobile && containerWidth >= chunk275WERXZ_js.TABLET_BREAKPOINT;
14776
14778
  return {
14777
14779
  isMobile,
14778
14780
  isTablet,
@@ -14833,11 +14835,11 @@ function useViewerDialogs(input) {
14833
14835
  );
14834
14836
  const [embedFontsEnabled, setEmbedFontsEnabled] = React3.useState(false);
14835
14837
  const [isNarrowViewport, setIsNarrowViewport] = React3.useState(
14836
- () => typeof window !== "undefined" ? chunkI5SO5OV4_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
14838
+ () => typeof window !== "undefined" ? chunk275WERXZ_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
14837
14839
  );
14838
14840
  React3.useEffect(() => {
14839
14841
  const handleWindow = () => setIsNarrowViewport(
14840
- chunkI5SO5OV4_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
14842
+ chunk275WERXZ_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
14841
14843
  );
14842
14844
  let observer = null;
14843
14845
  let raf = 0;
@@ -14851,12 +14853,12 @@ function useViewerDialogs(input) {
14851
14853
  const entry = entries[0];
14852
14854
  if (entry) {
14853
14855
  setIsNarrowViewport(
14854
- chunkI5SO5OV4_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
14856
+ chunk275WERXZ_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
14855
14857
  );
14856
14858
  }
14857
14859
  });
14858
14860
  observer.observe(el);
14859
- setIsNarrowViewport(chunkI5SO5OV4_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
14861
+ setIsNarrowViewport(chunk275WERXZ_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
14860
14862
  };
14861
14863
  attach();
14862
14864
  window.addEventListener("resize", handleWindow);
@@ -15033,7 +15035,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
15033
15035
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
15034
15036
  }
15035
15037
  function computeSlideSectionGroups(slides, sections) {
15036
- return chunkI5SO5OV4_js.groupSlidesBySection(sections, slides).map((group) => ({
15038
+ return chunk275WERXZ_js.groupSlidesBySection(sections, slides).map((group) => ({
15037
15039
  id: group.section?.id ?? (sections.length > 0 ? UNGROUPED_SECTION_ID : "default"),
15038
15040
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
15039
15041
  slideIndexes: group.slideIndexes,
@@ -15257,7 +15259,7 @@ function useSerialize(input) {
15257
15259
  return {
15258
15260
  ...el,
15259
15261
  text: pendingEditText,
15260
- textSegments: chunkI5SO5OV4_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15262
+ textSegments: chunk275WERXZ_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15261
15263
  };
15262
15264
  });
15263
15265
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -15490,10 +15492,10 @@ function usePresentationSetup(input) {
15490
15492
  onToggleEraser: () => annotations.setPresentationTool("eraser"),
15491
15493
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
15492
15494
  onSaveRehearsalTimings: (timings) => {
15493
- setSlides((prev) => chunkI5SO5OV4_js.applyRehearsalTimings(prev, timings));
15495
+ setSlides((prev) => chunk275WERXZ_js.applyRehearsalTimings(prev, timings));
15494
15496
  history.markDirty();
15495
15497
  },
15496
- loopContinuously: chunkI5SO5OV4_js.shouldLoopContinuously(presentationProperties),
15498
+ loopContinuously: chunk275WERXZ_js.shouldLoopContinuously(presentationProperties),
15497
15499
  showWithAnimation: presentationProperties.showWithAnimation,
15498
15500
  useTimings: presentationProperties.advanceMode !== "manual"
15499
15501
  });
@@ -15652,7 +15654,7 @@ function useEditorOperations(input) {
15652
15654
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
15653
15655
  React3.useEffect(() => {
15654
15656
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
15655
- copiedFormatRef.current = chunkI5SO5OV4_js.copyFormatFromElement(selectedElement);
15657
+ copiedFormatRef.current = chunk275WERXZ_js.copyFormatFromElement(selectedElement);
15656
15658
  } else if (!formatPainterActive) {
15657
15659
  copiedFormatRef.current = null;
15658
15660
  }
@@ -15678,7 +15680,7 @@ function useEditorOperations(input) {
15678
15680
  e.stopPropagation();
15679
15681
  const element = elementLookup.get(elementId);
15680
15682
  if (element) {
15681
- const updated = chunkI5SO5OV4_js.applyFormatToElement(element, copiedFormatRef.current);
15683
+ const updated = chunk275WERXZ_js.applyFormatToElement(element, copiedFormatRef.current);
15682
15684
  const updates = {};
15683
15685
  if (chunkKV3EOLP3_js.hasShapeProperties(updated)) {
15684
15686
  updates.shapeStyle = updated.shapeStyle;
@@ -15963,7 +15965,8 @@ function useContentLifecycle(input) {
15963
15965
  ops,
15964
15966
  actionSoundHandlerRef,
15965
15967
  setIsEncryptedDialogOpen,
15966
- password
15968
+ password,
15969
+ onContentApplied
15967
15970
  } = input;
15968
15971
  const { handlerRef } = useLoadContent({
15969
15972
  content,
@@ -15998,7 +16001,8 @@ function useContentLifecycle(input) {
15998
16001
  setLoading: state.setLoading,
15999
16002
  setError: state.setError,
16000
16003
  setIsDirty: state.setIsDirty,
16001
- setIsEncrypted: setIsEncryptedDialogOpen
16004
+ setIsEncrypted: setIsEncryptedDialogOpen,
16005
+ onContentApplied
16002
16006
  });
16003
16007
  React3.useEffect(() => {
16004
16008
  actionSoundHandlerRef.current = handlerRef.current;
@@ -16299,6 +16303,7 @@ function useViewerIntegration(input) {
16299
16303
  markDirty: history.markDirty
16300
16304
  });
16301
16305
  const [isEncryptedDialogOpen, setIsEncryptedDialogOpen] = React3.useState(false);
16306
+ const [loadVersion, setLoadVersion] = React3.useState(0);
16302
16307
  const { handlerRef, serializeSlides, autosaveStatus } = useContentLifecycle({
16303
16308
  content,
16304
16309
  filePath,
@@ -16309,7 +16314,8 @@ function useViewerIntegration(input) {
16309
16314
  ops: editorOps.ops,
16310
16315
  actionSoundHandlerRef,
16311
16316
  setIsEncryptedDialogOpen,
16312
- password: dialogs.presentationPassword ?? void 0
16317
+ password: dialogs.presentationPassword ?? void 0,
16318
+ onContentApplied: () => setLoadVersion((v) => v + 1)
16313
16319
  });
16314
16320
  const { exportHandlers, printHandlers, themeHandlers, propertyHandlers } = useIOHandlers({
16315
16321
  state,
@@ -16555,7 +16561,8 @@ function useViewerIntegration(input) {
16555
16561
  handleEnterRehearsalMode,
16556
16562
  autosaveStatus,
16557
16563
  isEncryptedDialogOpen,
16558
- setIsEncryptedDialogOpen
16564
+ setIsEncryptedDialogOpen,
16565
+ loadVersion
16559
16566
  };
16560
16567
  }
16561
16568
  function getSnapshot() {
@@ -16602,9 +16609,9 @@ function useReducedMotion() {
16602
16609
  setManualReducedMotion
16603
16610
  };
16604
16611
  }
16605
- var KNOWN_TAB_IDS = new Set(chunkI5SO5OV4_js.TOOLBAR_TABS.map((tab) => tab.id));
16612
+ var KNOWN_TAB_IDS = new Set(chunk275WERXZ_js.TOOLBAR_TABS.map((tab) => tab.id));
16606
16613
  function computeToolbarVisibility(hiddenActions) {
16607
- const isHidden = (id) => chunkI5SO5OV4_js.isActionHidden(id, hiddenActions);
16614
+ const isHidden = (id) => chunk275WERXZ_js.isActionHidden(id, hiddenActions);
16608
16615
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
16609
16616
  return { isHidden, isTabVisible };
16610
16617
  }
@@ -16621,7 +16628,7 @@ function useYjsProvider({ config }) {
16621
16628
  const timeoutRef = React3.useRef(null);
16622
16629
  const gateRef = React3.useRef(null);
16623
16630
  if (!gateRef.current) {
16624
- gateRef.current = chunkI5SO5OV4_js.createSyncGate(() => setSynced(true));
16631
+ gateRef.current = chunk275WERXZ_js.createSyncGate(() => setSynced(true));
16625
16632
  }
16626
16633
  const teardown = React3.useCallback(() => {
16627
16634
  if (timeoutRef.current) {
@@ -16659,7 +16666,7 @@ function useYjsProvider({ config }) {
16659
16666
  if (config.authToken) {
16660
16667
  opts.password = config.authToken;
16661
16668
  }
16662
- const provider = new WebrtcProvider(chunkI5SO5OV4_js.validateRoomId(config.roomId), yDoc, opts);
16669
+ const provider = new WebrtcProvider(chunk275WERXZ_js.validateRoomId(config.roomId), yDoc, opts);
16663
16670
  setDoc(yDoc);
16664
16671
  setAwareness(provider.awareness);
16665
16672
  setClientId(provider.awareness.clientID);
@@ -16701,13 +16708,13 @@ function useYjsProvider({ config }) {
16701
16708
  if (!config) {
16702
16709
  return;
16703
16710
  }
16704
- const roomId = chunkI5SO5OV4_js.validateRoomId(config.roomId);
16705
- const transport = config.transport ?? chunkI5SO5OV4_js.resolveTransportForServerUrl(config.serverUrl);
16711
+ const roomId = chunk275WERXZ_js.validateRoomId(config.roomId);
16712
+ const transport = config.transport ?? chunk275WERXZ_js.resolveTransportForServerUrl(config.serverUrl);
16706
16713
  if (transport === "webrtc") {
16707
16714
  await initWebrtc();
16708
16715
  return;
16709
16716
  }
16710
- if (chunkI5SO5OV4_js.isMixedContentBlocked(config.serverUrl)) {
16717
+ if (chunk275WERXZ_js.isMixedContentBlocked(config.serverUrl)) {
16711
16718
  console.warn(
16712
16719
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
16713
16720
  );
@@ -16767,7 +16774,7 @@ function useYjsProvider({ config }) {
16767
16774
  cleanupRef.current = null;
16768
16775
  setStatus("error");
16769
16776
  }
16770
- }, chunkI5SO5OV4_js.CONNECTION_TIMEOUT_MS);
16777
+ }, chunk275WERXZ_js.CONNECTION_TIMEOUT_MS);
16771
16778
  }
16772
16779
  setDoc(yDoc);
16773
16780
  setAwareness(provider.awareness);
@@ -16840,7 +16847,7 @@ function usePresenceTracking({
16840
16847
  awareness.setLocalStateField("presence", state);
16841
16848
  lastBroadcastRef.current = Date.now();
16842
16849
  };
16843
- if (elapsed >= chunkI5SO5OV4_js.BROADCAST_THROTTLE_MS) {
16850
+ if (elapsed >= chunk275WERXZ_js.BROADCAST_THROTTLE_MS) {
16844
16851
  if (pendingBroadcastRef.current) {
16845
16852
  clearTimeout(pendingBroadcastRef.current);
16846
16853
  pendingBroadcastRef.current = null;
@@ -16850,7 +16857,7 @@ function usePresenceTracking({
16850
16857
  pendingBroadcastRef.current = setTimeout(() => {
16851
16858
  pendingBroadcastRef.current = null;
16852
16859
  flush();
16853
- }, chunkI5SO5OV4_js.BROADCAST_THROTTLE_MS - elapsed);
16860
+ }, chunk275WERXZ_js.BROADCAST_THROTTLE_MS - elapsed);
16854
16861
  }
16855
16862
  },
16856
16863
  [awareness, userName, userColor, userAvatar, role]
@@ -16875,7 +16882,7 @@ function usePresenceTracking({
16875
16882
  return;
16876
16883
  }
16877
16884
  const handleChange = () => {
16878
- const users = chunkI5SO5OV4_js.derivePresenceList(
16885
+ const users = chunk275WERXZ_js.derivePresenceList(
16879
16886
  awareness.getStates(),
16880
16887
  localClientId,
16881
16888
  canvasWidth,
@@ -16923,7 +16930,7 @@ function useCollaborativeState({
16923
16930
  canvasWidth,
16924
16931
  canvasHeight
16925
16932
  }) {
16926
- const userColor = chunkI5SO5OV4_js.sanitizeColor(config?.userColor, "#6366f1");
16933
+ const userColor = chunk275WERXZ_js.sanitizeColor(config?.userColor, "#6366f1");
16927
16934
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
16928
16935
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
16929
16936
  awareness,
@@ -16988,13 +16995,15 @@ function useYjsDocumentSync({
16988
16995
  isConnected,
16989
16996
  isSynced = true,
16990
16997
  config,
16991
- getSourceBytes
16998
+ getSourceBytes,
16999
+ loadVersion = 0
16992
17000
  }) {
16993
17001
  const isApplyingRemoteRef = React3.useRef(false);
16994
17002
  const lastSyncedRef = React3.useRef("");
16995
17003
  const hasInitializedRef = React3.useRef(false);
16996
17004
  const writeBackTimerRef = React3.useRef(null);
16997
17005
  const factoriesRef = React3.useRef(null);
17006
+ const lastLoadVersionRef = React3.useRef(loadVersion);
16998
17007
  const getFactories = React3.useCallback(async () => {
16999
17008
  if (factoriesRef.current) {
17000
17009
  return factoriesRef.current;
@@ -17029,7 +17038,7 @@ function useYjsDocumentSync({
17029
17038
  const { PptxHandler: PptxHandler2 } = await import('./dist-XF3QJAEF.js');
17030
17039
  const handler = new PptxHandler2();
17031
17040
  await handler.load(sourceBytes.buffer);
17032
- const currentSlides = chunkI5SO5OV4_js.readSlidesFromYDoc(
17041
+ const currentSlides = chunk275WERXZ_js.readSlidesFromYDoc(
17033
17042
  doc
17034
17043
  );
17035
17044
  const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
@@ -17039,6 +17048,27 @@ function useYjsDocumentSync({
17039
17048
  }
17040
17049
  }, debounceMs);
17041
17050
  }, [doc, config, getSourceBytes, templateElementsBySlideId]);
17051
+ React3.useEffect(() => {
17052
+ if (loadVersion === lastLoadVersionRef.current) {
17053
+ return;
17054
+ }
17055
+ lastLoadVersionRef.current = loadVersion;
17056
+ if (!doc || !isConnected) {
17057
+ return;
17058
+ }
17059
+ const docSlides = chunk275WERXZ_js.readSlidesFromYDoc(
17060
+ doc
17061
+ );
17062
+ if (docSlides.length === 0) {
17063
+ return;
17064
+ }
17065
+ lastSyncedRef.current = JSON.stringify(docSlides);
17066
+ isApplyingRemoteRef.current = true;
17067
+ setSlides(docSlides);
17068
+ requestAnimationFrame(() => {
17069
+ isApplyingRemoteRef.current = false;
17070
+ });
17071
+ }, [loadVersion, doc, isConnected, setSlides]);
17042
17072
  React3.useEffect(() => {
17043
17073
  if (!isConnected || !isSynced || !doc || isApplyingRemoteRef.current || slides.length === 0) {
17044
17074
  return;
@@ -17050,11 +17080,11 @@ function useYjsDocumentSync({
17050
17080
  lastSyncedRef.current = serialized;
17051
17081
  void (async () => {
17052
17082
  const factories = await getFactories();
17053
- chunkI5SO5OV4_js.reconcileSlidesInYDoc(
17083
+ chunk275WERXZ_js.reconcileSlidesInYDoc(
17054
17084
  slides,
17055
17085
  doc,
17056
17086
  factories,
17057
- chunkI5SO5OV4_js.LOCAL_SYNC_ORIGIN
17087
+ chunk275WERXZ_js.LOCAL_SYNC_ORIGIN
17058
17088
  );
17059
17089
  scheduleWriteBack();
17060
17090
  })();
@@ -17064,10 +17094,10 @@ function useYjsDocumentSync({
17064
17094
  return;
17065
17095
  }
17066
17096
  const handleChange = (_events, transaction) => {
17067
- if (transaction?.origin === chunkI5SO5OV4_js.LOCAL_SYNC_ORIGIN) {
17097
+ if (transaction?.origin === chunk275WERXZ_js.LOCAL_SYNC_ORIGIN) {
17068
17098
  return;
17069
17099
  }
17070
- const remoteSlides = chunkI5SO5OV4_js.readSlidesFromYDoc(
17100
+ const remoteSlides = chunk275WERXZ_js.readSlidesFromYDoc(
17071
17101
  doc
17072
17102
  );
17073
17103
  if (remoteSlides.length === 0) {
@@ -17085,7 +17115,7 @@ function useYjsDocumentSync({
17085
17115
  });
17086
17116
  scheduleWriteBack();
17087
17117
  };
17088
- const unobserve = chunkI5SO5OV4_js.observeYDocSlides(
17118
+ const unobserve = chunk275WERXZ_js.observeYDocSlides(
17089
17119
  doc,
17090
17120
  handleChange
17091
17121
  );
@@ -17236,7 +17266,7 @@ function useLayoutSwitching(input) {
17236
17266
  function useVirtualizedSlides({
17237
17267
  totalItems,
17238
17268
  itemHeight,
17239
- overscan = chunkI5SO5OV4_js.DEFAULT_VIRTUAL_OVERSCAN
17269
+ overscan = chunk275WERXZ_js.DEFAULT_VIRTUAL_OVERSCAN
17240
17270
  }) {
17241
17271
  const scrollContainerRef = React3.useRef(null);
17242
17272
  const [scrollTop, setScrollTop] = React3.useState(0);
@@ -17266,7 +17296,7 @@ function useVirtualizedSlides({
17266
17296
  resizeObserver?.disconnect();
17267
17297
  };
17268
17298
  }, []);
17269
- const range = chunkI5SO5OV4_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
17299
+ const range = chunk275WERXZ_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
17270
17300
  const safeItemHeight = Math.max(itemHeight, 1);
17271
17301
  const scrollToIndex = React3.useCallback(
17272
17302
  (index, behavior = "smooth") => {
@@ -17312,7 +17342,7 @@ function useTouchGestures(input) {
17312
17342
  if (!el || !enabled) {
17313
17343
  return;
17314
17344
  }
17315
- const recognizer = chunkI5SO5OV4_js.createTouchGestureRecognizer({
17345
+ const recognizer = chunk275WERXZ_js.createTouchGestureRecognizer({
17316
17346
  getScale: () => scaleRef.current,
17317
17347
  minScale: MIN_ZOOM_SCALE,
17318
17348
  maxScale: MAX_ZOOM_SCALE,
@@ -17355,7 +17385,7 @@ function scrollFocusedIntoView(keyboardInset) {
17355
17385
  return;
17356
17386
  }
17357
17387
  const rect = active.getBoundingClientRect();
17358
- const delta = chunkI5SO5OV4_js.computeScrollDelta(
17388
+ const delta = chunk275WERXZ_js.computeScrollDelta(
17359
17389
  { top: rect.top, bottom: rect.bottom },
17360
17390
  window.innerHeight,
17361
17391
  keyboardInset
@@ -17375,8 +17405,8 @@ function useKeyboardInsets(enabled = true) {
17375
17405
  return;
17376
17406
  }
17377
17407
  const update = () => {
17378
- const metrics = chunkI5SO5OV4_js.readViewportMetrics(window);
17379
- const inset = metrics ? chunkI5SO5OV4_js.computeKeyboardInset(metrics) : 0;
17408
+ const metrics = chunk275WERXZ_js.readViewportMetrics(window);
17409
+ const inset = metrics ? chunk275WERXZ_js.computeKeyboardInset(metrics) : 0;
17380
17410
  setKeyboardInset(inset);
17381
17411
  if (inset > 0) {
17382
17412
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -17387,8 +17417,8 @@ function useKeyboardInsets(enabled = true) {
17387
17417
  vv.addEventListener("scroll", update);
17388
17418
  const onFocusIn = () => {
17389
17419
  window.requestAnimationFrame(() => {
17390
- const metrics = chunkI5SO5OV4_js.readViewportMetrics(window);
17391
- const inset = metrics ? chunkI5SO5OV4_js.computeKeyboardInset(metrics) : 0;
17420
+ const metrics = chunk275WERXZ_js.readViewportMetrics(window);
17421
+ const inset = metrics ? chunk275WERXZ_js.computeKeyboardInset(metrics) : 0;
17392
17422
  if (inset > 0) {
17393
17423
  scrollFocusedIntoView(inset);
17394
17424
  }
@@ -17401,7 +17431,7 @@ function useKeyboardInsets(enabled = true) {
17401
17431
  document.removeEventListener("focusin", onFocusIn);
17402
17432
  };
17403
17433
  }, [enabled]);
17404
- return { keyboardInset, isKeyboardOpen: chunkI5SO5OV4_js.isKeyboardOpen(keyboardInset) };
17434
+ return { keyboardInset, isKeyboardOpen: chunk275WERXZ_js.isKeyboardOpen(keyboardInset) };
17405
17435
  }
17406
17436
 
17407
17437
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -17456,13 +17486,13 @@ function buildCanvasProps(input) {
17456
17486
  if (mode === "present") {
17457
17487
  presentation.handlePresentationAction(action);
17458
17488
  } else if (action.url) {
17459
- chunkI5SO5OV4_js.safeOpenUrl(action.url);
17489
+ chunk275WERXZ_js.safeOpenUrl(action.url);
17460
17490
  }
17461
17491
  };
17462
17492
  const handleHyperlinkClick = (url) => {
17463
- if (chunkI5SO5OV4_js.isPpactionUrl(url)) {
17493
+ if (chunk275WERXZ_js.isPpactionUrl(url)) {
17464
17494
  if (mode === "present") {
17465
- const parsed = chunkI5SO5OV4_js.parsePpactionUrl(url);
17495
+ const parsed = chunk275WERXZ_js.parsePpactionUrl(url);
17466
17496
  if (parsed) {
17467
17497
  presentation.handlePresentationAction({
17468
17498
  action: parsed.action,
@@ -17472,7 +17502,7 @@ function buildCanvasProps(input) {
17472
17502
  }
17473
17503
  return;
17474
17504
  }
17475
- chunkI5SO5OV4_js.safeOpenUrl(url);
17505
+ chunk275WERXZ_js.safeOpenUrl(url);
17476
17506
  };
17477
17507
  return {
17478
17508
  activeSlide: effectiveSlide,
@@ -17792,7 +17822,7 @@ function buildToolbarProps(input) {
17792
17822
  onOpenFile,
17793
17823
  onOpenRecentFile,
17794
17824
  onCreatePresentation: (templateId) => {
17795
- s.setSlides(chunkI5SO5OV4_js.createBackstagePresentation(templateId));
17825
+ s.setSlides(chunk275WERXZ_js.createBackstagePresentation(templateId));
17796
17826
  s.setActiveSlideIndex(0);
17797
17827
  s.setSelectedElementId(null);
17798
17828
  s.setSelectedElementIds([]);
@@ -17847,7 +17877,7 @@ function buildToolbarProps(input) {
17847
17877
  isCommentsPanelOpen: s.isInspectorPaneOpen,
17848
17878
  slideCommentCount: activeSlide?.comments?.length ?? 0,
17849
17879
  formatPainterActive: s.formatPainterActive,
17850
- canActivateFormatPainter: chunkI5SO5OV4_js.hasCopyableFormat(selectedElement),
17880
+ canActivateFormatPainter: chunk275WERXZ_js.hasCopyableFormat(selectedElement),
17851
17881
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
17852
17882
  isSelectionPaneOpen: s.isSelectionPaneOpen,
17853
17883
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -18110,7 +18140,7 @@ function useViewerBuildingBlocks(input) {
18110
18140
  }, [incomingContent]);
18111
18141
  const onOpenFile = React3.useCallback(() => {
18112
18142
  void (async () => {
18113
- const picked = await chunkI5SO5OV4_js.openPptxFile();
18143
+ const picked = await chunk275WERXZ_js.openPptxFile();
18114
18144
  if (picked) {
18115
18145
  setContent(picked.buffer);
18116
18146
  }
@@ -18118,7 +18148,7 @@ function useViewerBuildingBlocks(input) {
18118
18148
  }, []);
18119
18149
  const onOpenRecentFile = React3.useCallback((key) => {
18120
18150
  void (async () => {
18121
- const bytes = await chunkI5SO5OV4_js.readBackstageRecentFile(key);
18151
+ const bytes = await chunk275WERXZ_js.readBackstageRecentFile(key);
18122
18152
  if (bytes) {
18123
18153
  setContent(bytes);
18124
18154
  }