pptx-react-viewer 2.16.1 → 2.16.2

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 (97) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-OHB6CVLY.js → AiChatPanel-MCGNCS7Q.js} +22 -22
  3. package/dist/AiChatPanel-MCGNCS7Q.js.br +0 -0
  4. package/dist/AiChatPanel-MCGNCS7Q.js.gz +0 -0
  5. package/dist/{AiChatPanel-UPNVIENY.mjs → AiChatPanel-WJXPCHQK.mjs} +3 -3
  6. package/dist/AiChatPanel-WJXPCHQK.mjs.br +0 -0
  7. package/dist/AiChatPanel-WJXPCHQK.mjs.gz +0 -0
  8. package/dist/{Model3DScene-KEUY3M7X.mjs → Model3DScene-IXW2AKAU.mjs} +1 -1
  9. package/dist/{Model3DScene-KEUY3M7X.mjs.br → Model3DScene-IXW2AKAU.mjs.br} +0 -0
  10. package/dist/Model3DScene-IXW2AKAU.mjs.gz +0 -0
  11. package/dist/{Model3DScene-7FKWPESH.js → Model3DScene-Q2DTGVQ7.js} +2 -2
  12. package/dist/Model3DScene-Q2DTGVQ7.js.br +0 -0
  13. package/dist/Model3DScene-Q2DTGVQ7.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-NPJQXIGW.js → SurfaceChart3DScene-AD43LAOO.js} +2 -2
  15. package/dist/SurfaceChart3DScene-AD43LAOO.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-AD43LAOO.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-2MLBPJ63.mjs → SurfaceChart3DScene-MODEHQ6G.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-2MLBPJ63.mjs.br → SurfaceChart3DScene-MODEHQ6G.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-MODEHQ6G.mjs.gz +0 -0
  20. package/dist/{chunk-3NDRTC7T.js → chunk-4GX347MG.js} +235 -46
  21. package/dist/chunk-4GX347MG.js.br +0 -0
  22. package/dist/{chunk-3NDRTC7T.js.gz → chunk-4GX347MG.js.gz} +0 -0
  23. package/dist/{chunk-7UBDMCI7.js → chunk-CIK6XUOH.js} +3 -3
  24. package/dist/chunk-CIK6XUOH.js.br +0 -0
  25. package/dist/chunk-CIK6XUOH.js.gz +0 -0
  26. package/dist/{chunk-N6IE34HX.js → chunk-JV6DI7AK.js} +1096 -1074
  27. package/dist/chunk-JV6DI7AK.js.br +0 -0
  28. package/dist/chunk-JV6DI7AK.js.gz +0 -0
  29. package/dist/{chunk-6ROCCY4M.mjs → chunk-LDD2UVCV.mjs} +49 -27
  30. package/dist/chunk-LDD2UVCV.mjs.br +0 -0
  31. package/dist/chunk-LDD2UVCV.mjs.gz +0 -0
  32. package/dist/{chunk-ENOHLGJ2.mjs → chunk-MDFCBYEM.mjs} +234 -47
  33. package/dist/chunk-MDFCBYEM.mjs.br +0 -0
  34. package/dist/{chunk-ENOHLGJ2.mjs.gz → chunk-MDFCBYEM.mjs.gz} +0 -0
  35. package/dist/{chunk-DQTTI6D4.js → chunk-NKE64XVV.js} +340 -340
  36. package/dist/chunk-NKE64XVV.js.br +0 -0
  37. package/dist/chunk-NKE64XVV.js.gz +0 -0
  38. package/dist/{chunk-IN7D2T4R.js → chunk-P6KM7RO5.js} +297 -276
  39. package/dist/chunk-P6KM7RO5.js.br +0 -0
  40. package/dist/chunk-P6KM7RO5.js.gz +0 -0
  41. package/dist/{chunk-LJZFG6YP.mjs → chunk-QI2JCXTH.mjs} +1 -1
  42. package/dist/chunk-QI2JCXTH.mjs.br +0 -0
  43. package/dist/chunk-QI2JCXTH.mjs.gz +0 -0
  44. package/dist/{chunk-RUK5XZGO.mjs → chunk-UWYHBCLM.mjs} +2 -2
  45. package/dist/chunk-UWYHBCLM.mjs.br +0 -0
  46. package/dist/chunk-UWYHBCLM.mjs.gz +0 -0
  47. package/dist/{chunk-ZOOGEDYG.mjs → chunk-Z4CS2ZYN.mjs} +48 -27
  48. package/dist/chunk-Z4CS2ZYN.mjs.br +0 -0
  49. package/dist/chunk-Z4CS2ZYN.mjs.gz +0 -0
  50. package/dist/index.js +39 -39
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +5 -5
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.d.ts +27 -0
  57. package/dist/internals.js +78 -78
  58. package/dist/internals.js.br +0 -0
  59. package/dist/internals.js.gz +0 -0
  60. package/dist/internals.mjs +3 -3
  61. package/dist/internals.mjs.br +0 -0
  62. package/dist/internals.mjs.gz +0 -0
  63. package/dist/viewer/index.js +26 -26
  64. package/dist/viewer/index.js.br +0 -0
  65. package/dist/viewer/index.js.gz +0 -0
  66. package/dist/viewer/index.mjs +5 -5
  67. package/dist/viewer/index.mjs.br +0 -0
  68. package/dist/viewer/index.mjs.gz +0 -0
  69. package/package.json +1 -1
  70. package/dist/AiChatPanel-OHB6CVLY.js.br +0 -0
  71. package/dist/AiChatPanel-OHB6CVLY.js.gz +0 -0
  72. package/dist/AiChatPanel-UPNVIENY.mjs.br +0 -0
  73. package/dist/AiChatPanel-UPNVIENY.mjs.gz +0 -0
  74. package/dist/Model3DScene-7FKWPESH.js.br +0 -0
  75. package/dist/Model3DScene-7FKWPESH.js.gz +0 -0
  76. package/dist/Model3DScene-KEUY3M7X.mjs.gz +0 -0
  77. package/dist/SurfaceChart3DScene-2MLBPJ63.mjs.gz +0 -0
  78. package/dist/SurfaceChart3DScene-NPJQXIGW.js.br +0 -0
  79. package/dist/SurfaceChart3DScene-NPJQXIGW.js.gz +0 -0
  80. package/dist/chunk-3NDRTC7T.js.br +0 -0
  81. package/dist/chunk-6ROCCY4M.mjs.br +0 -0
  82. package/dist/chunk-6ROCCY4M.mjs.gz +0 -0
  83. package/dist/chunk-7UBDMCI7.js.br +0 -0
  84. package/dist/chunk-7UBDMCI7.js.gz +0 -0
  85. package/dist/chunk-DQTTI6D4.js.br +0 -0
  86. package/dist/chunk-DQTTI6D4.js.gz +0 -0
  87. package/dist/chunk-ENOHLGJ2.mjs.br +0 -0
  88. package/dist/chunk-IN7D2T4R.js.br +0 -0
  89. package/dist/chunk-IN7D2T4R.js.gz +0 -0
  90. package/dist/chunk-LJZFG6YP.mjs.br +0 -0
  91. package/dist/chunk-LJZFG6YP.mjs.gz +0 -0
  92. package/dist/chunk-N6IE34HX.js.br +0 -0
  93. package/dist/chunk-N6IE34HX.js.gz +0 -0
  94. package/dist/chunk-RUK5XZGO.mjs.br +0 -0
  95. package/dist/chunk-RUK5XZGO.mjs.gz +0 -0
  96. package/dist/chunk-ZOOGEDYG.mjs.br +0 -0
  97. package/dist/chunk-ZOOGEDYG.mjs.gz +0 -0
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk3ISYPBSX_js = require('./chunk-3ISYPBSX.js');
4
- var chunk3NDRTC7T_js = require('./chunk-3NDRTC7T.js');
4
+ var chunk4GX347MG_js = require('./chunk-4GX347MG.js');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var React6 = require('react');
@@ -15,7 +15,7 @@ var React6__default = /*#__PURE__*/_interopDefault(React6);
15
15
 
16
16
  // src/viewer/utils/animation-effects.ts
17
17
  function getAnimationInitialStyle2(preset, nativeAnimation) {
18
- return chunk3NDRTC7T_js.getAnimationInitialStyle(preset, nativeAnimation);
18
+ return chunk4GX347MG_js.getAnimationInitialStyle(preset, nativeAnimation);
19
19
  }
20
20
  function cn(...inputs) {
21
21
  return tailwindMerge.twMerge(clsx.clsx(inputs));
@@ -23,7 +23,7 @@ function cn(...inputs) {
23
23
 
24
24
  // src/viewer/utils/clone.ts
25
25
  function cloneHistorySnapshot2(snapshot) {
26
- return chunk3NDRTC7T_js.cloneHistorySnapshot(snapshot);
26
+ return chunk4GX347MG_js.cloneHistorySnapshot(snapshot);
27
27
  }
28
28
 
29
29
  // src/viewer/constants/scalar.ts
@@ -63,7 +63,7 @@ var TOOLBAR_SECTIONS = [
63
63
  { id: "view", labelKey: "pptx.ribbon.tab.view" },
64
64
  { id: "help", labelKey: "pptx.ribbon.tab.help" }
65
65
  ];
66
- var SHORTCUT_REFERENCE_ITEMS = chunk3NDRTC7T_js.VIEWER_SHORTCUT_REFERENCE;
66
+ var SHORTCUT_REFERENCE_ITEMS = chunk4GX347MG_js.VIEWER_SHORTCUT_REFERENCE;
67
67
 
68
68
  // src/viewer/constants/theme.ts
69
69
  var THEME_COLOR_SWATCHES = [
@@ -107,7 +107,7 @@ var GLYPH_COMPONENTS = {
107
107
  plus: lu.LuPlus,
108
108
  triangle: lu.LuTriangle
109
109
  };
110
- var SHAPE_PRESETS = chunk3NDRTC7T_js.SHAPE_PRESET_DEFS.map(
110
+ var SHAPE_PRESETS = chunk4GX347MG_js.SHAPE_PRESET_DEFS.map(
111
111
  (def) => ({
112
112
  type: def.type,
113
113
  label: def.label,
@@ -266,7 +266,7 @@ function isConnectorOrLineElement(element) {
266
266
  if (element.type === "connector") {
267
267
  return true;
268
268
  }
269
- if (!chunk3NDRTC7T_js.hasShapeProperties(element)) {
269
+ if (!chunk4GX347MG_js.hasShapeProperties(element)) {
270
270
  return false;
271
271
  }
272
272
  const st = getShapeType(element.shapeType);
@@ -277,12 +277,12 @@ function isConnectorOrLineElement(element) {
277
277
  function partitionTemplateElements(slides) {
278
278
  const templateElementsBySlideId = {};
279
279
  const nextSlides = slides.map((slide) => {
280
- const template = slide.elements.filter((el) => chunk3NDRTC7T_js.isTemplateElement(el));
280
+ const template = slide.elements.filter((el) => chunk4GX347MG_js.isTemplateElement(el));
281
281
  if (template.length === 0) {
282
282
  return slide;
283
283
  }
284
284
  templateElementsBySlideId[slide.id] = template;
285
- return { ...slide, elements: slide.elements.filter((el) => !chunk3NDRTC7T_js.isTemplateElement(el)) };
285
+ return { ...slide, elements: slide.elements.filter((el) => !chunk4GX347MG_js.isTemplateElement(el)) };
286
286
  });
287
287
  return { slides: nextSlides, templateElementsBySlideId };
288
288
  }
@@ -298,7 +298,7 @@ function buildSaveSlides(slides, templateElementsBySlideId) {
298
298
 
299
299
  // src/viewer/utils/image-style.ts
300
300
  function getImageMaskStyle(element) {
301
- if (!chunk3NDRTC7T_js.hasShapeProperties(element)) {
301
+ if (!chunk4GX347MG_js.hasShapeProperties(element)) {
302
302
  return void 0;
303
303
  }
304
304
  const shapeType = element.shapeType;
@@ -307,7 +307,7 @@ function getImageMaskStyle(element) {
307
307
  }
308
308
  const normalized = shapeType.toLowerCase();
309
309
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
310
- const radiusPx = chunk3NDRTC7T_js.getRoundRectRadiusPx2(element);
310
+ const radiusPx = chunk4GX347MG_js.getRoundRectRadiusPx2(element);
311
311
  if (radiusPx <= 0.01) {
312
312
  return void 0;
313
313
  }
@@ -319,7 +319,7 @@ function getImageMaskStyle(element) {
319
319
  if (normalized === "can" || normalized === "cylinder") {
320
320
  return { borderRadius: "48% / 12%" };
321
321
  }
322
- const clipPath = chunk3NDRTC7T_js.getResolvedShapeClipPath(element);
322
+ const clipPath = chunk4GX347MG_js.getResolvedShapeClipPath(element);
323
323
  if (!clipPath) {
324
324
  return void 0;
325
325
  }
@@ -328,7 +328,7 @@ function getImageMaskStyle(element) {
328
328
  function getImageRenderStyle(element) {
329
329
  return {
330
330
  ...getImageMaskStyle(element) || {},
331
- ...chunk3NDRTC7T_js.getImageFitStyle(element)
331
+ ...chunk4GX347MG_js.getImageFitStyle(element)
332
332
  };
333
333
  }
334
334
  var CROP_SHAPE_CLIP_PATHS = {
@@ -341,7 +341,7 @@ var CROP_SHAPE_CLIP_PATHS = {
341
341
  star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
342
342
  };
343
343
  function getCropShapeClipPath(element) {
344
- if (!chunk3NDRTC7T_js.isImageLikeElement(element)) {
344
+ if (!chunk4GX347MG_js.isImageLikeElement(element)) {
345
345
  return void 0;
346
346
  }
347
347
  const shape = element.cropShape;
@@ -351,7 +351,7 @@ function getCropShapeClipPath(element) {
351
351
  return CROP_SHAPE_CLIP_PATHS[shape];
352
352
  }
353
353
  function isImageTiled(element) {
354
- if (!chunk3NDRTC7T_js.isImageLikeElement(element)) {
354
+ if (!chunk4GX347MG_js.isImageLikeElement(element)) {
355
355
  return false;
356
356
  }
357
357
  return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
@@ -409,7 +409,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
409
409
  };
410
410
  }
411
411
  function getImageTilingStyle(element) {
412
- if (!chunk3NDRTC7T_js.isImageLikeElement(element) || !isImageTiled(element)) {
412
+ if (!chunk4GX347MG_js.isImageLikeElement(element) || !isImageTiled(element)) {
413
413
  return void 0;
414
414
  }
415
415
  const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
@@ -629,9 +629,9 @@ function registerMediaElement(elementId, el) {
629
629
  };
630
630
  }
631
631
  function executeMediaCommand(command, frameRoot) {
632
- return chunk3NDRTC7T_js.runMediaCommand(
632
+ return chunk4GX347MG_js.runMediaCommand(
633
633
  command,
634
- (targetId) => registry.get(targetId) ?? chunk3NDRTC7T_js.findMediaElementByElementId(targetId, frameRoot?.())
634
+ (targetId) => registry.get(targetId) ?? chunk4GX347MG_js.findMediaElementByElementId(targetId, frameRoot?.())
635
635
  );
636
636
  }
637
637
  function PresentationMediaController({
@@ -675,7 +675,7 @@ function PresentationMediaController({
675
675
  loop: shouldLoop,
676
676
  volume: playbackVolume,
677
677
  playbackRate
678
- } = chunk3NDRTC7T_js.mediaPlaybackAttributes({
678
+ } = chunk4GX347MG_js.mediaPlaybackAttributes({
679
679
  loop: element.loop,
680
680
  volume: element.volume,
681
681
  playbackSpeed: element.playbackSpeed
@@ -811,7 +811,7 @@ function PresentationMediaController({
811
811
  if (element.playAcrossSlides && element.mediaType === "audio") {
812
812
  const dataUrl = element.mediaData ?? resolvedDataUrl;
813
813
  if (dataUrl) {
814
- chunk3NDRTC7T_js.registerPersistentAudio(
814
+ chunk4GX347MG_js.registerPersistentAudio(
815
815
  element.id,
816
816
  dataUrl,
817
817
  element.mediaMimeType,
@@ -909,17 +909,17 @@ function Badge({
909
909
  "div",
910
910
  {
911
911
  className: `absolute inset-0 flex flex-col items-center justify-center ${isMissing ? "gap-1" : ""}`,
912
- ...{ [chunk3NDRTC7T_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
912
+ ...{ [chunk4GX347MG_js.MEDIA_CHROME_ATTRIBUTE]: visual.badge },
913
913
  children: [
914
914
  /* @__PURE__ */ jsxRuntime.jsx(
915
915
  FallbackIcon,
916
916
  {
917
- paths: chunk3NDRTC7T_js.mediaFallbackIcon(visual, element.mediaType),
917
+ paths: chunk4GX347MG_js.mediaFallbackIcon(visual, element.mediaType),
918
918
  size: isMissing ? 32 : 48,
919
919
  className: isMissing ? "text-white/60" : "text-white/80 drop-shadow-md"
920
920
  }
921
921
  ),
922
- isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunk3NDRTC7T_js.mediaFallbackLabelKey(visual, element.mediaType)) })
922
+ isMissing && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: label(chunk4GX347MG_js.mediaFallbackLabelKey(visual, element.mediaType)) })
923
923
  ]
924
924
  }
925
925
  );
@@ -936,17 +936,17 @@ function Placeholder({
936
936
  "div",
937
937
  {
938
938
  className: `w-full h-full flex flex-col items-center justify-center gap-1 pointer-events-none rounded ${isMissing ? "bg-black/30 border border-dashed border-white/20" : element.mediaType === "audio" ? "bg-black/10" : "bg-black/20"}`,
939
- ...{ [chunk3NDRTC7T_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
939
+ ...{ [chunk4GX347MG_js.MEDIA_CHROME_ATTRIBUTE]: visual.placeholder },
940
940
  children: [
941
941
  /* @__PURE__ */ jsxRuntime.jsx(
942
942
  FallbackIcon,
943
943
  {
944
- paths: chunk3NDRTC7T_js.mediaFallbackIcon(visual, element.mediaType),
944
+ paths: chunk4GX347MG_js.mediaFallbackIcon(visual, element.mediaType),
945
945
  size: isMissing ? 36 : element.mediaType === "audio" ? 24 : 32,
946
946
  className: isMissing ? "text-white/50" : "text-white/70"
947
947
  }
948
948
  ),
949
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunk3NDRTC7T_js.mediaFallbackLabelKey(visual, element.mediaType)) })
949
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${isMissing ? "text-white/50" : "text-white/70"}`, children: label(chunk4GX347MG_js.mediaFallbackLabelKey(visual, element.mediaType)) })
950
950
  ]
951
951
  }
952
952
  );
@@ -956,7 +956,7 @@ function renderMediaFallback({
956
956
  posterUrl,
957
957
  surface
958
958
  }) {
959
- const visual = chunk3NDRTC7T_js.mediaFallbackVisual(surface, {
959
+ const visual = chunk4GX347MG_js.mediaFallbackVisual(surface, {
960
960
  hasPoster: Boolean(posterUrl),
961
961
  missing: element.mediaMissing === true
962
962
  });
@@ -985,7 +985,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
985
985
  const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
986
986
  const trimFragment = buildTrimFragment(element);
987
987
  const posterUrl = element.posterFrameData ?? void 0;
988
- const shouldLoop = chunk3NDRTC7T_js.mediaPlaybackAttributes(element).loop;
988
+ const shouldLoop = chunk4GX347MG_js.mediaPlaybackAttributes(element).loop;
989
989
  const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
990
990
  const isFullScreen = options?.fullScreen === true;
991
991
  const isPresentationMode = options?.isPresentationMode === true;
@@ -1068,7 +1068,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
1068
1068
 
1069
1069
  // src/viewer/utils/text-utils.tsx
1070
1070
  function getTextStyleForElement(element, fallbackColor) {
1071
- return chunk3NDRTC7T_js.buildTextBlockStyle(element, { fallbackColor });
1071
+ return chunk4GX347MG_js.buildTextBlockStyle(element, { fallbackColor });
1072
1072
  }
1073
1073
 
1074
1074
  // src/viewer/utils/text-layout.tsx
@@ -1093,13 +1093,13 @@ function computeTabSize(tabStops, defaultTabSize) {
1093
1093
  return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
1094
1094
  }
1095
1095
  function getTextLayoutStyle(element) {
1096
- if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
1096
+ if (!chunk4GX347MG_js.hasTextProperties(element)) {
1097
1097
  return {};
1098
1098
  }
1099
1099
  const verticalAlign = element.textStyle?.vAlign || "top";
1100
- const writingMode = chunk3NDRTC7T_js.toCssWritingMode(element.textStyle?.textDirection);
1101
- const textOrientation = chunk3NDRTC7T_js.toCssTextOrientation(element.textStyle?.textDirection);
1102
- const verticalDirection = chunk3NDRTC7T_js.toCssVerticalDirection(element.textStyle?.textDirection);
1100
+ const writingMode = chunk4GX347MG_js.toCssWritingMode(element.textStyle?.textDirection);
1101
+ const textOrientation = chunk4GX347MG_js.toCssTextOrientation(element.textStyle?.textDirection);
1102
+ const verticalDirection = chunk4GX347MG_js.toCssVerticalDirection(element.textStyle?.textDirection);
1103
1103
  const parsedColumnCount = Number(element.textStyle?.columnCount);
1104
1104
  const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
1105
1105
  const hasColumns = columnCount > 1;
@@ -1107,7 +1107,7 @@ function getTextLayoutStyle(element) {
1107
1107
  const tabStops = element.textStyle?.tabStops;
1108
1108
  const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
1109
1109
  const textWrapNone = element.textStyle?.textWrap === "none";
1110
- const hasParagraphIndents = chunk3NDRTC7T_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
1110
+ const hasParagraphIndents = chunk4GX347MG_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
1111
1111
  const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
1112
1112
  const paragraphIndent = element.textStyle?.paragraphIndent;
1113
1113
  const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
@@ -1116,7 +1116,7 @@ function getTextLayoutStyle(element) {
1116
1116
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
1117
1117
  const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
1118
1118
  const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
1119
- const kinsokuStyles = chunk3NDRTC7T_js.getKinsokuLineBreakStyles(element.textStyle);
1119
+ const kinsokuStyles = chunk4GX347MG_js.getKinsokuLineBreakStyles(element.textStyle);
1120
1120
  if (hasColumns) {
1121
1121
  return {
1122
1122
  display: "block",
@@ -1163,10 +1163,10 @@ function getTextLayoutStyle(element) {
1163
1163
 
1164
1164
  // src/viewer/utils/text-effects.tsx
1165
1165
  function buildTextFillCss2(style) {
1166
- return chunk3NDRTC7T_js.buildTextFillCss(style);
1166
+ return chunk4GX347MG_js.buildTextFillCss(style);
1167
1167
  }
1168
1168
  function buildTextBody3DSceneStyle2(textStyle) {
1169
- return chunk3NDRTC7T_js.buildTextBody3DSceneStyle(textStyle);
1169
+ return chunk4GX347MG_js.buildTextBody3DSceneStyle(textStyle);
1170
1170
  }
1171
1171
 
1172
1172
  // src/viewer/utils/text-warp-css.tsx
@@ -1351,13 +1351,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
1351
1351
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
1352
1352
  return renderedSegments;
1353
1353
  }
1354
- const paraKey = `${elementId}${chunk3NDRTC7T_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
1354
+ const paraKey = `${elementId}${chunk4GX347MG_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
1355
1355
  const paraState = subElementAnimStates.get(paraKey);
1356
1356
  if (paraState) {
1357
1357
  const style = buildAnimStyle(paraState);
1358
1358
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
1359
1359
  }
1360
- const spec = chunk3NDRTC7T_js.buildTextBuildSpec(
1360
+ const spec = chunk4GX347MG_js.buildTextBuildSpec(
1361
1361
  elementId,
1362
1362
  paraIndex,
1363
1363
  paraSegments.map((entry) => ({ text: entry.segment.text, style: entry })),
@@ -1375,7 +1375,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
1375
1375
  "span",
1376
1376
  {
1377
1377
  "data-anim-id": span.animId,
1378
- style: chunk3NDRTC7T_js.textBuildSpanStyle(span),
1378
+ style: chunk4GX347MG_js.textBuildSpanStyle(span),
1379
1379
  children: content
1380
1380
  },
1381
1381
  span.animId
@@ -1519,10 +1519,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
1519
1519
  if (!needsScriptFonts || !text) {
1520
1520
  return text;
1521
1521
  }
1522
- const runs = chunk3NDRTC7T_js.segmentByScript(text);
1522
+ const runs = chunk4GX347MG_js.segmentByScript(text);
1523
1523
  if (runs.length <= 1) {
1524
1524
  if (runs.length === 1) {
1525
- const font = chunk3NDRTC7T_js.resolveFontForScript(runs[0].script, scriptFonts);
1525
+ const font = chunk4GX347MG_js.resolveFontForScript(runs[0].script, scriptFonts);
1526
1526
  if (font && font !== baseFontFamily) {
1527
1527
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
1528
1528
  }
@@ -1530,19 +1530,41 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
1530
1530
  return text;
1531
1531
  }
1532
1532
  return runs.map((run, i) => {
1533
- const font = chunk3NDRTC7T_js.resolveFontForScript(run.script, scriptFonts);
1533
+ const font = chunk4GX347MG_js.resolveFontForScript(run.script, scriptFonts);
1534
1534
  if (!font || font === baseFontFamily) {
1535
1535
  return /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
1536
1536
  }
1537
1537
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: run.text }, `${keyPrefix}-r${i}`);
1538
1538
  });
1539
1539
  }
1540
- function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsScriptFonts, scriptFonts, baseFontFamily, findHighlights, tabContext) {
1540
+ function renderMetricPieces(text, metric, keyPrefix, inner) {
1541
+ if (!metric || !text) {
1542
+ return inner(text, keyPrefix);
1543
+ }
1544
+ const pieces = chunk4GX347MG_js.splitRunForMetrics(text, metric.font);
1545
+ if (pieces.length <= 1) {
1546
+ return inner(text, keyPrefix);
1547
+ }
1548
+ return pieces.map((piece, i) => /* @__PURE__ */ jsxRuntime.jsx(
1549
+ "span",
1550
+ {
1551
+ style: { letterSpacing: chunk4GX347MG_js.pieceLetterSpacing(metric.authoredPx, piece.tracking) },
1552
+ children: inner(piece.text, `${keyPrefix}-w${i}`)
1553
+ },
1554
+ `${keyPrefix}-w${i}`
1555
+ ));
1556
+ }
1557
+ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsScriptFonts, scriptFonts, baseFontFamily, findHighlights, tabContext, metric) {
1541
1558
  const segHl = findHighlights?.get(segmentIndex);
1542
1559
  if (!segHl || segHl.length === 0) {
1543
1560
  return lines.map((line, lineIndex) => {
1544
1561
  const lineKey = `${elementId}-seg-${segmentIndex}-line-${lineIndex}`;
1545
- const renderPiece = (text, key) => renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFamily, key);
1562
+ const renderPiece = (text, key) => renderMetricPieces(
1563
+ text,
1564
+ metric,
1565
+ key,
1566
+ (pieceText, pieceKey) => renderScriptAwareText(pieceText, needsScriptFonts, scriptFonts, baseFontFamily, pieceKey)
1567
+ );
1546
1568
  return /* @__PURE__ */ jsxRuntime.jsxs(React6__default.default.Fragment, { children: [
1547
1569
  tabContext && line.includes(" ") ? renderTabbedLine(line, tabContext, lineKey, renderPiece) : renderPiece(line, lineKey),
1548
1570
  lineIndex < lines.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
@@ -1574,8 +1596,15 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
1574
1596
  isCurrent: false
1575
1597
  });
1576
1598
  }
1577
- return chunks.map(
1578
- (chunk, ci) => chunk.highlighted ? /* @__PURE__ */ jsxRuntime.jsx(
1599
+ const renderChunk = (text, key) => renderMetricPieces(
1600
+ text,
1601
+ metric,
1602
+ key,
1603
+ (pieceText, pieceKey) => renderScriptAwareText(pieceText, needsScriptFonts, scriptFonts, baseFontFamily, pieceKey)
1604
+ );
1605
+ return chunks.map((chunk, ci) => {
1606
+ const chunkKey = `${elementId}-seg-${segmentIndex}-hl-${ci}`;
1607
+ return chunk.highlighted ? /* @__PURE__ */ jsxRuntime.jsx(
1579
1608
  "mark",
1580
1609
  {
1581
1610
  style: {
@@ -1583,27 +1612,15 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
1583
1612
  color: "inherit",
1584
1613
  borderRadius: 2
1585
1614
  },
1586
- children: renderScriptAwareText(
1587
- chunk.text,
1588
- needsScriptFonts,
1589
- scriptFonts,
1590
- baseFontFamily,
1591
- `${elementId}-seg-${segmentIndex}-hl-${ci}`
1592
- )
1615
+ children: renderChunk(chunk.text, chunkKey)
1593
1616
  },
1594
- `${elementId}-seg-${segmentIndex}-hl-${ci}`
1595
- ) : /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: renderScriptAwareText(
1596
- chunk.text,
1597
- needsScriptFonts,
1598
- scriptFonts,
1599
- baseFontFamily,
1600
- `${elementId}-seg-${segmentIndex}-hl-${ci}`
1601
- ) }, `${elementId}-seg-${segmentIndex}-hl-${ci}`)
1602
- );
1617
+ chunkKey
1618
+ ) : /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: renderChunk(chunk.text, chunkKey) }, chunkKey);
1619
+ });
1603
1620
  }
1604
1621
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
1605
- const mathml = chunk3NDRTC7T_js.convertOmmlToMathMl(equationXml);
1606
- const safeMathml = mathml ? chunk3NDRTC7T_js.sanitizeMathMl(mathml) : "";
1622
+ const mathml = chunk4GX347MG_js.convertOmmlToMathMl(equationXml);
1623
+ const safeMathml = mathml ? chunk4GX347MG_js.sanitizeMathMl(mathml) : "";
1607
1624
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
1608
1625
  "span",
1609
1626
  {
@@ -1653,7 +1670,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
1653
1670
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
1654
1671
  }
1655
1672
  function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
1656
- const picture = chunk3NDRTC7T_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
1673
+ const picture = chunk4GX347MG_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
1657
1674
  sizePx: baseFontSize,
1658
1675
  fallbackMarker: "\u2022",
1659
1676
  accessibleLabel: "Bullet"
@@ -1704,7 +1721,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1704
1721
  }
1705
1722
  const segmentStyle = segment.style || {};
1706
1723
  const rawText = bulletInfo && typeof bulletHangPx === "number" ? (segment.text || "").trimEnd() : segment.text || "";
1707
- const textValue = chunk3NDRTC7T_js.substituteFieldText(rawText, segment.fieldType, fieldContext);
1724
+ const textValue = chunk4GX347MG_js.substituteFieldText(rawText, segment.fieldType, fieldContext);
1708
1725
  const lines = textValue.split("\n");
1709
1726
  const textDecorationTokens = [];
1710
1727
  if (segmentStyle.underline || segmentStyle.hyperlink) {
@@ -1714,8 +1731,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1714
1731
  textDecorationTokens.push("line-through");
1715
1732
  }
1716
1733
  const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
1717
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunk3NDRTC7T_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunk3NDRTC7T_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
1718
- const underlineDecoration = chunk3NDRTC7T_js.resolveUnderlineDecorationStyle(
1734
+ const resolvedSegmentColor = segmentStyle.hyperlink ? chunk4GX347MG_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunk4GX347MG_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
1735
+ const underlineDecoration = chunk4GX347MG_js.resolveUnderlineDecorationStyle(
1719
1736
  Boolean(isDoubleStrike),
1720
1737
  segmentStyle.underlineStyle
1721
1738
  );
@@ -1725,17 +1742,17 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1725
1742
  const authoredLetterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? segmentStyle.characterSpacing / 100 * (96 / 72) : 0;
1726
1743
  const textFillStyles = buildTextFillCss2(segmentStyle);
1727
1744
  const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
1728
- const autoFitScale = chunk3NDRTC7T_js.resolveAutoFitFontScale(element.textStyle);
1745
+ const autoFitScale = chunk4GX347MG_js.resolveAutoFitFontScale(element.textStyle);
1729
1746
  const baseFontSize = rawFontSize * autoFitScale;
1730
1747
  const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
1731
1748
  const baseFontSizePt = baseFontSize * (72 / 96);
1732
1749
  const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
1733
1750
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
1734
- const baseFontFamily = rawFontFamily ? chunk3NDRTC7T_js.getSubstituteFontFamily(
1751
+ const baseFontFamily = rawFontFamily ? chunk4GX347MG_js.getSubstituteFontFamily(
1735
1752
  rawFontFamily,
1736
- chunk3NDRTC7T_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
1753
+ chunk4GX347MG_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
1737
1754
  ) : DEFAULT_FONT_FAMILY2;
1738
- const scriptFont = (name, panose) => name ? chunk3NDRTC7T_js.getSubstituteFontFamily(name, chunk3NDRTC7T_js.parsePanoseString(panose)) : baseFontFamily;
1755
+ const scriptFont = (name, panose) => name ? chunk4GX347MG_js.getSubstituteFontFamily(name, chunk4GX347MG_js.parsePanoseString(panose)) : baseFontFamily;
1739
1756
  const scriptFonts = {
1740
1757
  latin: baseFontFamily,
1741
1758
  eastAsia: scriptFont(
@@ -1751,15 +1768,18 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1751
1768
  segmentStyle.symbolFontPanose ?? element.textStyle?.symbolFontPanose
1752
1769
  )
1753
1770
  };
1754
- const needsScriptFonts = chunk3NDRTC7T_js.hasDistinctScriptFonts(scriptFonts);
1755
- const metricTracking = chunk3NDRTC7T_js.resolveMetricTrackingPx(textValue, {
1771
+ const needsScriptFonts = chunk4GX347MG_js.hasDistinctScriptFonts(scriptFonts);
1772
+ const metricFont = {
1756
1773
  fontFamily: baseFontFamily,
1757
1774
  fontSizePx: baseFontSize * baselineFontScale,
1758
1775
  bold: Boolean(segmentStyle.bold),
1759
1776
  italic: Boolean(segmentStyle.italic)
1760
- });
1761
- const totalLetterSpacing = authoredLetterSpacing + metricTracking;
1762
- const letterSpacing = totalLetterSpacing === 0 ? void 0 : `${totalLetterSpacing}px`;
1777
+ };
1778
+ const metricContext = { font: metricFont, authoredPx: authoredLetterSpacing };
1779
+ const letterSpacing = chunk4GX347MG_js.pieceLetterSpacing(
1780
+ authoredLetterSpacing,
1781
+ chunk4GX347MG_js.resolveMetricTrackingPx(textValue, metricFont)
1782
+ );
1763
1783
  const spanStyle = {
1764
1784
  color: resolvedSegmentColor,
1765
1785
  fontSize: baseFontSize * baselineFontScale,
@@ -1777,15 +1797,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1777
1797
  fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
1778
1798
  letterSpacing,
1779
1799
  fontKerning,
1780
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunk3NDRTC7T_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
1800
+ backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunk4GX347MG_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
1781
1801
  ...textFillStyles,
1782
- textDecorationColor: segmentStyle.underlineColor ? chunk3NDRTC7T_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
1783
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunk3NDRTC7T_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
1802
+ textDecorationColor: segmentStyle.underlineColor ? chunk4GX347MG_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
1803
+ WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunk4GX347MG_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
1784
1804
  paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
1785
- textShadow: chunk3NDRTC7T_js.buildTextShadowCss(segmentStyle),
1786
- filter: chunk3NDRTC7T_js.buildTextRunFilterChain(segmentStyle),
1787
- opacity: chunk3NDRTC7T_js.getTextAlphaOpacity(segmentStyle),
1788
- WebkitBoxReflect: chunk3NDRTC7T_js.buildTextReflectionCss(segmentStyle)
1805
+ textShadow: chunk4GX347MG_js.buildTextShadowCss(segmentStyle),
1806
+ filter: chunk4GX347MG_js.buildTextRunFilterChain(segmentStyle),
1807
+ opacity: chunk4GX347MG_js.getTextAlphaOpacity(segmentStyle),
1808
+ WebkitBoxReflect: chunk4GX347MG_js.buildTextReflectionCss(segmentStyle)
1789
1809
  };
1790
1810
  const runRtl = segmentStyle.rtl;
1791
1811
  if (runRtl !== void 0 && runRtl !== paragraphRtl) {
@@ -1805,7 +1825,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1805
1825
  spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
1806
1826
  }
1807
1827
  if (bulletInfo.color) {
1808
- spanStyle.color = chunk3NDRTC7T_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
1828
+ spanStyle.color = chunk4GX347MG_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
1809
1829
  }
1810
1830
  if (typeof bulletHangPx === "number" && bulletHangPx > 0) {
1811
1831
  spanStyle.display = "inline-block";
@@ -1839,7 +1859,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1839
1859
  baseFontFamily,
1840
1860
  Boolean(segmentStyle.bold),
1841
1861
  Boolean(segmentStyle.italic)
1842
- )
1862
+ ),
1863
+ metricContext
1843
1864
  );
1844
1865
  let innerContent;
1845
1866
  if (hasRuby) {
@@ -1850,7 +1871,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1850
1871
  textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
1851
1872
  };
1852
1873
  if (segment.rubyStyle?.color) {
1853
- rubyStyle.color = chunk3NDRTC7T_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
1874
+ rubyStyle.color = chunk4GX347MG_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
1854
1875
  }
1855
1876
  innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
1856
1877
  baseContent,
@@ -1923,7 +1944,7 @@ function resolveParagraphSpacing(input) {
1923
1944
  if (typeof exactPt === "number" && exactPt > 0) {
1924
1945
  result.lineHeight = `${exactPt * PT_TO_PX}px`;
1925
1946
  } else if (typeof multiplier === "number" && multiplier > 0) {
1926
- result.lineHeight = chunk3NDRTC7T_js.proportionalLineHeight(multiplier);
1947
+ result.lineHeight = chunk4GX347MG_js.proportionalLineHeight(multiplier);
1927
1948
  }
1928
1949
  return result;
1929
1950
  }
@@ -1945,7 +1966,7 @@ function groupSegmentsIntoParagraphs(segments) {
1945
1966
  return paragraphs;
1946
1967
  }
1947
1968
  function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
1948
- if (!chunk3NDRTC7T_js.hasTextProperties(element)) {
1969
+ if (!chunk4GX347MG_js.hasTextProperties(element)) {
1949
1970
  return emptyFallback || null;
1950
1971
  }
1951
1972
  const effectiveSegments = segmentOverrides ?? element.textSegments;
@@ -1966,10 +1987,10 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
1966
1987
  return element.text || emptyFallback || "";
1967
1988
  }
1968
1989
  const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
1969
- const paragraphIndents = chunk3NDRTC7T_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
1970
- const elementRtl = chunk3NDRTC7T_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
1971
- const elementAlign = chunk3NDRTC7T_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
1972
- const bodyStyle = chunk3NDRTC7T_js.hasTextProperties(element) ? element.textStyle : void 0;
1990
+ const paragraphIndents = chunk4GX347MG_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
1991
+ const elementRtl = chunk4GX347MG_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
1992
+ const elementAlign = chunk4GX347MG_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
1993
+ const bodyStyle = chunk4GX347MG_js.hasTextProperties(element) ? element.textStyle : void 0;
1973
1994
  const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
1974
1995
  return paragraphs.map(({ entries: paraSegments, terminator }, paraIndex) => {
1975
1996
  const paraIndent = paragraphIndents?.[paraIndex];
@@ -1984,14 +2005,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
1984
2005
  return Boolean(segment.text) && segment.text.trim().length > 0;
1985
2006
  });
1986
2007
  const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
1987
- const paraRtl = chunk3NDRTC7T_js.resolveParagraphRtl(paraSegments, elementRtl);
2008
+ const paraRtl = chunk4GX347MG_js.resolveParagraphRtl(paraSegments, elementRtl);
1988
2009
  const isRtlParagraph = paraRtl === true;
1989
- const paraAlign = chunk3NDRTC7T_js.resolveParagraphAlign(paraSegments, elementAlign);
1990
- const cssTextAlign = chunk3NDRTC7T_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
2010
+ const paraAlign = chunk4GX347MG_js.resolveParagraphAlign(paraSegments, elementAlign);
2011
+ const cssTextAlign = chunk4GX347MG_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
1991
2012
  const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
1992
2013
  const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
1993
2014
  const paraTextIndent = rawTextIndent;
1994
- const paraKinsokuStyle = chunk3NDRTC7T_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
2015
+ const paraKinsokuStyle = chunk4GX347MG_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
1995
2016
  const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
1996
2017
  const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties ?? (paraSegments.length === 0 ? terminator?.paragraphProperties : void 0);
1997
2018
  const spacing = resolveParagraphSpacing({
@@ -2001,7 +2022,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
2001
2022
  isLast: paraIndex === paragraphs.length - 1,
2002
2023
  spaceFirstLast
2003
2024
  });
2004
- const strutFontSize = chunk3NDRTC7T_js.resolveParagraphStrutFontSize(
2025
+ const strutFontSize = chunk4GX347MG_js.resolveParagraphStrutFontSize(
2005
2026
  paraSegments.length > 0 ? paraSegments.map(({ segment }) => segment) : terminator ? [terminator] : [],
2006
2027
  bodyStyle?.fontSize
2007
2028
  );
@@ -2105,13 +2126,13 @@ function hexToRgbUnit(hex) {
2105
2126
  };
2106
2127
  }
2107
2128
  function getDuotoneColors(element) {
2108
- if (!chunk3NDRTC7T_js.isImageLikeElement(element)) {
2129
+ if (!chunk4GX347MG_js.isImageLikeElement(element)) {
2109
2130
  return void 0;
2110
2131
  }
2111
2132
  return element.imageEffects?.duotone;
2112
2133
  }
2113
2134
  function buildLineShadowCss(element) {
2114
- if (!chunk3NDRTC7T_js.hasShapeProperties(element)) {
2135
+ if (!chunk4GX347MG_js.hasShapeProperties(element)) {
2115
2136
  return void 0;
2116
2137
  }
2117
2138
  const ss = element.shapeStyle;
@@ -2122,13 +2143,13 @@ function buildLineShadowCss(element) {
2122
2143
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
2123
2144
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
2124
2145
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
2125
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunk3NDRTC7T_js.colorWithOpacity(
2126
- chunk3NDRTC7T_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
2146
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunk4GX347MG_js.colorWithOpacity(
2147
+ chunk4GX347MG_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
2127
2148
  opacity
2128
2149
  )}`;
2129
2150
  }
2130
2151
  function buildLineGlowFilter(element) {
2131
- if (!chunk3NDRTC7T_js.hasShapeProperties(element)) {
2152
+ if (!chunk4GX347MG_js.hasShapeProperties(element)) {
2132
2153
  return void 0;
2133
2154
  }
2134
2155
  const ss = element.shapeStyle;
@@ -2137,7 +2158,7 @@ function buildLineGlowFilter(element) {
2137
2158
  }
2138
2159
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
2139
2160
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
2140
- const glowCol = chunk3NDRTC7T_js.colorWithOpacity(chunk3NDRTC7T_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
2161
+ const glowCol = chunk4GX347MG_js.colorWithOpacity(chunk4GX347MG_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
2141
2162
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
2142
2163
  }
2143
2164
  function mapDagBlendModeToCss(blend) {
@@ -2161,7 +2182,7 @@ function getDagDuotoneFilterId(elementId) {
2161
2182
  return `dag-duotone-${elementId}`;
2162
2183
  }
2163
2184
  function hasDagDuotoneEffect(element) {
2164
- if (!chunk3NDRTC7T_js.hasShapeProperties(element)) {
2185
+ if (!chunk4GX347MG_js.hasShapeProperties(element)) {
2165
2186
  return false;
2166
2187
  }
2167
2188
  return Boolean(element.shapeStyle?.dagDuotone);
@@ -2224,7 +2245,7 @@ function getRoundRectRadiusPx(element) {
2224
2245
 
2225
2246
  // src/viewer/utils/shape-visual-3d.ts
2226
2247
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
2227
- return chunk3NDRTC7T_js.build3DExtrusionData(
2248
+ return chunk4GX347MG_js.build3DExtrusionData(
2228
2249
  shape3d,
2229
2250
  scene3d,
2230
2251
  fillColor,
@@ -2233,7 +2254,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
2233
2254
  );
2234
2255
  }
2235
2256
  function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
2236
- chunk3NDRTC7T_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
2257
+ chunk4GX347MG_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
2237
2258
  }
2238
2259
 
2239
2260
  // src/viewer/utils/shape-visual-style.ts
@@ -2241,43 +2262,43 @@ function getGradientTilingCss(style) {
2241
2262
  if (!style || style.fillMode !== "gradient") {
2242
2263
  return void 0;
2243
2264
  }
2244
- const isStructuredLinear = (style.fillGradientType || "linear") === "linear" && chunk3NDRTC7T_js.sanitizeGradientStops(style.fillGradientStops).length > 0;
2265
+ const isStructuredLinear = (style.fillGradientType || "linear") === "linear" && chunk4GX347MG_js.sanitizeGradientStops(style.fillGradientStops).length > 0;
2245
2266
  if (isStructuredLinear) {
2246
- const flip = chunk3NDRTC7T_js.getGradientTileFlipCss(style.fillGradientFlip);
2267
+ const flip = chunk4GX347MG_js.getGradientTileFlipCss(style.fillGradientFlip);
2247
2268
  if (flip) {
2248
2269
  return flip;
2249
2270
  }
2250
2271
  }
2251
- return chunk3NDRTC7T_js.getGradientTileRectCss(style.fillGradientTileRect);
2272
+ return chunk4GX347MG_js.getGradientTileRectCss(style.fillGradientTileRect);
2252
2273
  }
2253
2274
  function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
2254
- if (!chunk3NDRTC7T_js.hasShapeProperties(element)) {
2275
+ if (!chunk4GX347MG_js.hasShapeProperties(element)) {
2255
2276
  return {};
2256
2277
  }
2257
2278
  const normalizedShapeType = getShapeType(element.shapeType);
2258
- const clipPath = chunk3NDRTC7T_js.isIdentityRectClip(element) ? void 0 : chunk3NDRTC7T_js.getResolvedShapeClipPath(element);
2279
+ const clipPath = chunk4GX347MG_js.isIdentityRectClip(element) ? void 0 : chunk4GX347MG_js.getResolvedShapeClipPath(element);
2259
2280
  const rendersCustomVectorPath = (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
2260
- const rendersStrokeOnlyPreset = chunk3NDRTC7T_js.isStrokeOnlyPresetElement(element);
2281
+ const rendersStrokeOnlyPreset = chunk4GX347MG_js.isStrokeOnlyPresetElement(element);
2261
2282
  const fillOpacity = element.shapeStyle?.fillOpacity;
2262
2283
  const strokeOpacity = element.shapeStyle?.strokeOpacity;
2263
- const strokeDash = chunk3NDRTC7T_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
2264
- const fillGradient = chunk3NDRTC7T_js.buildCssGradientFromShapeStyle(element.shapeStyle, {
2284
+ const strokeDash = chunk4GX347MG_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
2285
+ const fillGradient = chunk4GX347MG_js.buildCssGradientFromShapeStyle(element.shapeStyle, {
2265
2286
  rotation: element.rotation,
2266
2287
  width: element.width,
2267
2288
  height: element.height
2268
2289
  }) || element.shapeStyle?.fillGradient;
2269
- const shadowCss = chunk3NDRTC7T_js.buildShadowCssFromShapeStyle(element.shapeStyle);
2270
- const innerShadowCss = chunk3NDRTC7T_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
2271
- const resolvedFillColor = chunk3NDRTC7T_js.colorWithOpacity(fillColor, fillOpacity);
2272
- const resolvedStrokeColor = chunk3NDRTC7T_js.colorWithOpacity(strokeColor, strokeOpacity);
2290
+ const shadowCss = chunk4GX347MG_js.buildShadowCssFromShapeStyle(element.shapeStyle);
2291
+ const innerShadowCss = chunk4GX347MG_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
2292
+ const resolvedFillColor = chunk4GX347MG_js.colorWithOpacity(fillColor, fillOpacity);
2293
+ const resolvedStrokeColor = chunk4GX347MG_js.colorWithOpacity(strokeColor, strokeOpacity);
2273
2294
  const ss = element.shapeStyle;
2274
2295
  const gradientTiling = getGradientTilingCss(ss);
2275
- const paintsGradientOutline = chunk3NDRTC7T_js.suppressesCssBorder(element);
2296
+ const paintsGradientOutline = chunk4GX347MG_js.suppressesCssBorder(element);
2276
2297
  const hasFillOverlayColor = Boolean(
2277
2298
  ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
2278
2299
  );
2279
2300
  const combinedShadowParts = [];
2280
- const multiLayerShadow = chunk3NDRTC7T_js.buildMultiLayerShadowCss(element.shapeStyle);
2301
+ const multiLayerShadow = chunk4GX347MG_js.buildMultiLayerShadowCss(element.shapeStyle);
2281
2302
  if (multiLayerShadow) {
2282
2303
  combinedShadowParts.push(multiLayerShadow);
2283
2304
  } else if (shadowCss) {
@@ -2286,7 +2307,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2286
2307
  if (innerShadowCss) {
2287
2308
  combinedShadowParts.push(innerShadowCss);
2288
2309
  }
2289
- const glowBoxShadow = chunk3NDRTC7T_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
2310
+ const glowBoxShadow = chunk4GX347MG_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
2290
2311
  if (glowBoxShadow) {
2291
2312
  combinedShadowParts.push(glowBoxShadow);
2292
2313
  }
@@ -2294,7 +2315,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2294
2315
  if (lineShadow) {
2295
2316
  combinedShadowParts.push(lineShadow);
2296
2317
  }
2297
- const compoundLineShadow = chunk3NDRTC7T_js.getCompoundLineBoxShadow(
2318
+ const compoundLineShadow = chunk4GX347MG_js.getCompoundLineBoxShadow(
2298
2319
  element.shapeStyle?.compoundLine,
2299
2320
  strokeWidth,
2300
2321
  resolvedStrokeColor
@@ -2307,11 +2328,11 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2307
2328
  if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
2308
2329
  const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
2309
2330
  const glowRad = Math.round(Math.max(0, ss.glowRadius));
2310
- const glowCol = chunk3NDRTC7T_js.colorWithOpacity(chunk3NDRTC7T_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
2331
+ const glowCol = chunk4GX347MG_js.colorWithOpacity(chunk4GX347MG_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
2311
2332
  filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
2312
2333
  }
2313
2334
  if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
2314
- filterParts.push(`url(#${chunk3NDRTC7T_js.getSoftEdgeFilterId(element.id)})`);
2335
+ filterParts.push(`url(#${chunk4GX347MG_js.getSoftEdgeFilterId(element.id)})`);
2315
2336
  }
2316
2337
  if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
2317
2338
  filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
@@ -2320,13 +2341,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2320
2341
  if (lineGlowCss) {
2321
2342
  filterParts.push(lineGlowCss);
2322
2343
  }
2323
- const dagFilter = chunk3NDRTC7T_js.getEffectDagFilter(ss, element.id);
2344
+ const dagFilter = chunk4GX347MG_js.getEffectDagFilter(ss, element.id);
2324
2345
  if (dagFilter) {
2325
2346
  filterParts.push(dagFilter);
2326
2347
  }
2327
2348
  const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
2328
2349
  const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
2329
- const patternFill = chunk3NDRTC7T_js.buildPatternFillCss(element.shapeStyle);
2350
+ const patternFill = chunk4GX347MG_js.buildPatternFillCss(element.shapeStyle);
2330
2351
  const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
2331
2352
  const imageFillMode = ss?.fillImageMode || "stretch";
2332
2353
  let reflectCss;
@@ -2338,7 +2359,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2338
2359
  const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
2339
2360
  const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
2340
2361
  const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
2341
- reflectCss = chunk3NDRTC7T_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
2362
+ reflectCss = chunk4GX347MG_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
2342
2363
  }
2343
2364
  }
2344
2365
  const base = {
@@ -2384,9 +2405,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2384
2405
  // path following the shape's geometry, because a CSS border can only take
2385
2406
  // one colour. Keeping the border too would draw the parser's averaged
2386
2407
  // solid underneath the gradient.
2387
- borderWidth: strokeWidth > 0 && !paintsGradientOutline ? chunk3NDRTC7T_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
2408
+ borderWidth: strokeWidth > 0 && !paintsGradientOutline ? chunk4GX347MG_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
2388
2409
  borderColor: strokeWidth > 0 && !paintsGradientOutline ? resolvedStrokeColor : void 0,
2389
- borderStyle: strokeWidth > 0 && !paintsGradientOutline ? chunk3NDRTC7T_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
2410
+ borderStyle: strokeWidth > 0 && !paintsGradientOutline ? chunk4GX347MG_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
2390
2411
  strokeLinejoin: lineJoinCss,
2391
2412
  strokeMiterlimit: miterLimitCss,
2392
2413
  strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
@@ -2446,7 +2467,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2446
2467
  borderWidth: 0,
2447
2468
  borderTopWidth: Math.max(strokeWidth, 2),
2448
2469
  borderTopColor: resolvedStrokeColor,
2449
- borderTopStyle: chunk3NDRTC7T_js.getCssBorderDashStyle(strokeDash)
2470
+ borderTopStyle: chunk4GX347MG_js.getCssBorderDashStyle(strokeDash)
2450
2471
  };
2451
2472
  }
2452
2473
  if (normalizedShapeType === "cylinder") {
@@ -2460,13 +2481,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2460
2481
  function getConnectorAdjustment(element, key, fallback) {
2461
2482
  const direct = element.shapeAdjustments?.[key];
2462
2483
  if (typeof direct === "number" && Number.isFinite(direct)) {
2463
- return chunk3NDRTC7T_js.clampUnitInterval(direct / 1e5);
2484
+ return chunk4GX347MG_js.clampUnitInterval(direct / 1e5);
2464
2485
  }
2465
2486
  const fallbackKey = element.shapeAdjustments?.adj;
2466
2487
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
2467
- return chunk3NDRTC7T_js.clampUnitInterval(fallbackKey / 1e5);
2488
+ return chunk4GX347MG_js.clampUnitInterval(fallbackKey / 1e5);
2468
2489
  }
2469
- return chunk3NDRTC7T_js.clampUnitInterval(fallback);
2490
+ return chunk4GX347MG_js.clampUnitInterval(fallback);
2470
2491
  }
2471
2492
  function getConnectorPathGeometry(element) {
2472
2493
  const width = Math.max(element.width, 0);
@@ -2599,7 +2620,7 @@ function toHexByte(value) {
2599
2620
  return clamped.toString(16).padStart(2, "0");
2600
2621
  }
2601
2622
  function shiftHex(hex, factor, towardsWhite) {
2602
- const channels = chunk3NDRTC7T_js.hexToRgbChannels(hex);
2623
+ const channels = chunk4GX347MG_js.hexToRgbChannels(hex);
2603
2624
  if (!channels) {
2604
2625
  return hex;
2605
2626
  }
@@ -2625,7 +2646,7 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
2625
2646
  const fillOff = subpath.fillMode === "none" || !hasFill;
2626
2647
  return {
2627
2648
  d: subpath.d,
2628
- fill: fillOff ? "none" : chunk3NDRTC7T_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
2649
+ fill: fillOff ? "none" : chunk4GX347MG_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
2629
2650
  stroked: subpath.stroke !== false
2630
2651
  };
2631
2652
  });
@@ -2641,11 +2662,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
2641
2662
  strokePaint,
2642
2663
  strokeWidth,
2643
2664
  dashArray,
2644
- lineCap: chunk3NDRTC7T_js.svgLineCap(shapeStyle?.lineCap),
2665
+ lineCap: chunk4GX347MG_js.svgLineCap(shapeStyle?.lineCap),
2645
2666
  lineJoin,
2646
2667
  miterLimit,
2647
- offsets: chunk3NDRTC7T_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
2648
- widths: chunk3NDRTC7T_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
2668
+ offsets: chunk4GX347MG_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
2669
+ widths: chunk4GX347MG_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
2649
2670
  };
2650
2671
  }
2651
2672
  function strokeStrands(d, keyBase, ctx) {
@@ -2693,9 +2714,9 @@ function gradientDefs(gradient) {
2693
2714
  }
2694
2715
  function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
2695
2716
  const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
2696
- const subpaths = structuredPaths && structuredPaths.length > 0 ? chunk3NDRTC7T_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
2717
+ const subpaths = structuredPaths && structuredPaths.length > 0 ? chunk4GX347MG_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
2697
2718
  const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
2698
- const gradientPaint = gradient ? chunk3NDRTC7T_js.svgGradientFillRef(gradient) : void 0;
2719
+ const gradientPaint = gradient ? chunk4GX347MG_js.svgGradientFillRef(gradient) : void 0;
2699
2720
  const nodes = [];
2700
2721
  if (subpaths && needsPerSubpath) {
2701
2722
  const paints = buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
@@ -2727,7 +2748,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
2727
2748
  "path",
2728
2749
  {
2729
2750
  d: pathData,
2730
- fill: animatesFill ? "inherit" : gradientPaint ?? chunk3NDRTC7T_js.colorWithOpacity(fillColor, fillOpacity),
2751
+ fill: animatesFill ? "inherit" : gradientPaint ?? chunk4GX347MG_js.colorWithOpacity(fillColor, fillOpacity),
2731
2752
  stroke: "none",
2732
2753
  vectorEffect: "non-scaling-stroke"
2733
2754
  },
@@ -2753,14 +2774,14 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
2753
2774
  );
2754
2775
  }
2755
2776
  function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
2756
- if (!chunk3NDRTC7T_js.hasShapeProperties(element)) {
2777
+ if (!chunk4GX347MG_js.hasShapeProperties(element)) {
2757
2778
  return null;
2758
2779
  }
2759
2780
  const normalizedType = (element.shapeType || "").toLowerCase();
2760
- const fillPaint = animatesFill ? "inherit" : chunk3NDRTC7T_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
2761
- const strokePaint = animatesStroke ? "inherit" : chunk3NDRTC7T_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
2762
- const dashType = chunk3NDRTC7T_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
2763
- const dashArray = chunk3NDRTC7T_js.getSvgStrokeDasharray(
2781
+ const fillPaint = animatesFill ? "inherit" : chunk4GX347MG_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
2782
+ const strokePaint = animatesStroke ? "inherit" : chunk4GX347MG_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
2783
+ const dashType = chunk4GX347MG_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
2784
+ const dashArray = chunk4GX347MG_js.getSvgStrokeDasharray(
2764
2785
  dashType,
2765
2786
  Math.max(strokeWidth, 1),
2766
2787
  element.shapeStyle?.customDashSegments
@@ -2841,21 +2862,21 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2841
2862
  // container's `background-image` is suppressed for custom geometry, so
2842
2863
  // without this the shape fell back to the parser's representative solid
2843
2864
  // and lost every fade (issue #132).
2844
- chunk3NDRTC7T_js.buildSvgGradientDef(element.shapeStyle, element.id)
2865
+ chunk4GX347MG_js.buildSvgGradientDef(element.shapeStyle, element.id)
2845
2866
  );
2846
2867
  }
2847
- if (chunk3NDRTC7T_js.isCalloutShape(normalizedType)) {
2868
+ if (chunk4GX347MG_js.isCalloutShape(normalizedType)) {
2848
2869
  const width = Math.max(element.width, 1);
2849
2870
  const height = Math.max(element.height, 1);
2850
- const geometry = chunk3NDRTC7T_js.getCalloutLeaderLineGeometry(
2871
+ const geometry = chunk4GX347MG_js.getCalloutLeaderLineGeometry(
2851
2872
  normalizedType,
2852
2873
  width,
2853
2874
  height,
2854
2875
  element.shapeAdjustments
2855
2876
  );
2856
2877
  if (geometry && geometry.points.length >= 2) {
2857
- const leaderPath = chunk3NDRTC7T_js.buildCalloutLeaderLineSvgPath(geometry);
2858
- const bounds = chunk3NDRTC7T_js.getCalloutViewBoxBounds(width, height, geometry);
2878
+ const leaderPath = chunk4GX347MG_js.buildCalloutLeaderLineSvgPath(geometry);
2879
+ const bounds = chunk4GX347MG_js.getCalloutViewBoxBounds(width, height, geometry);
2859
2880
  const lineStroke = Math.max(strokeWidth, 1);
2860
2881
  const offsetLeft = bounds.minX;
2861
2882
  const offsetTop = bounds.minY;
@@ -2918,10 +2939,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2918
2939
  const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
2919
2940
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
2920
2941
  const compoundLine = element.shapeStyle?.compoundLine;
2921
- const connectorLineCap = chunk3NDRTC7T_js.svgLineCap(element.shapeStyle?.lineCap);
2942
+ const connectorLineCap = chunk4GX347MG_js.svgLineCap(element.shapeStyle?.lineCap);
2922
2943
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
2923
- const offsets = chunk3NDRTC7T_js.getCompoundLineOffsets(compoundLine, strokeWidth);
2924
- const widths = chunk3NDRTC7T_js.getCompoundLineWidths(compoundLine, strokeWidth);
2944
+ const offsets = chunk4GX347MG_js.getCompoundLineOffsets(compoundLine, strokeWidth);
2945
+ const widths = chunk4GX347MG_js.getCompoundLineWidths(compoundLine, strokeWidth);
2925
2946
  return /* @__PURE__ */ jsxRuntime.jsxs(
2926
2947
  "svg",
2927
2948
  {
@@ -2988,15 +3009,15 @@ function parseGradientFillCss(gradFill) {
2988
3009
  }
2989
3010
  const parsed = stops.map((gs) => {
2990
3011
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
2991
- const color = chunk3NDRTC7T_js.parseDrawingColor(gs) ?? "#888888";
2992
- const opacity = chunk3NDRTC7T_js.parseDrawingColorOpacity(gs);
2993
- return { pos, color: chunk3NDRTC7T_js.colorWithOpacity(color, opacity) };
3012
+ const color = chunk4GX347MG_js.parseDrawingColor(gs) ?? "#888888";
3013
+ const opacity = chunk4GX347MG_js.parseDrawingColorOpacity(gs);
3014
+ return { pos, color: chunk4GX347MG_js.colorWithOpacity(color, opacity) };
2994
3015
  }).sort((a, b) => a.pos - b.pos);
2995
3016
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
2996
3017
  const lin = gradFill["a:lin"];
2997
3018
  if (lin) {
2998
3019
  const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
2999
- const angleDeg = Math.round(chunk3NDRTC7T_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
3020
+ const angleDeg = Math.round(chunk4GX347MG_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
3000
3021
  return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
3001
3022
  }
3002
3023
  const path = gradFill["a:path"];
@@ -3031,8 +3052,8 @@ function parsePatternFillCss(pattFill) {
3031
3052
  if (!pattFill) {
3032
3053
  return void 0;
3033
3054
  }
3034
- const fgColor = chunk3NDRTC7T_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
3035
- const bgColor = chunk3NDRTC7T_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
3055
+ const fgColor = chunk4GX347MG_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
3056
+ const bgColor = chunk4GX347MG_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
3036
3057
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
3037
3058
  switch (preset) {
3038
3059
  case "ltHorz":
@@ -3143,11 +3164,11 @@ function parseCellBorders(cellProperties) {
3143
3164
  const prstDash = ln["a:prstDash"];
3144
3165
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
3145
3166
  const cssBorderStyle = ooxmlDashToCss(dashVal);
3146
- const color = chunk3NDRTC7T_js.parseDrawingColor(ln["a:solidFill"]);
3167
+ const color = chunk4GX347MG_js.parseDrawingColor(ln["a:solidFill"]);
3147
3168
  if (color) {
3148
- const opacity = chunk3NDRTC7T_js.parseDrawingColorOpacity(ln["a:solidFill"]);
3169
+ const opacity = chunk4GX347MG_js.parseDrawingColorOpacity(ln["a:solidFill"]);
3149
3170
  const key = `${edge.prefix}`;
3150
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunk3NDRTC7T_js.colorWithOpacity(color, opacity)}`;
3171
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunk4GX347MG_js.colorWithOpacity(color, opacity)}`;
3151
3172
  }
3152
3173
  }
3153
3174
  return borderStyle;
@@ -3160,7 +3181,7 @@ function parseCellTextEffects(runProps) {
3160
3181
  const textShadowParts = [];
3161
3182
  const outerShdw = effectLst["a:outerShdw"];
3162
3183
  if (outerShdw) {
3163
- const shdwColor = chunk3NDRTC7T_js.parseDrawingColor(outerShdw);
3184
+ const shdwColor = chunk4GX347MG_js.parseDrawingColor(outerShdw);
3164
3185
  if (shdwColor) {
3165
3186
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
3166
3187
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -3178,7 +3199,7 @@ function parseCellTextEffects(runProps) {
3178
3199
  }
3179
3200
  const glow = effectLst["a:glow"];
3180
3201
  if (glow) {
3181
- const glowColor = chunk3NDRTC7T_js.parseDrawingColor(glow);
3202
+ const glowColor = chunk4GX347MG_js.parseDrawingColor(glow);
3182
3203
  if (glowColor) {
3183
3204
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
3184
3205
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -3257,10 +3278,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
3257
3278
  if (runProps?.["@_u"] !== void 0) {
3258
3279
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
3259
3280
  }
3260
- const runColor = chunk3NDRTC7T_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunk3NDRTC7T_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
3281
+ const runColor = chunk4GX347MG_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunk4GX347MG_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
3261
3282
  if (runColor) {
3262
- const opacity = chunk3NDRTC7T_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
3263
- cellStyle.color = chunk3NDRTC7T_js.colorWithOpacity(runColor, opacity);
3283
+ const opacity = chunk4GX347MG_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
3284
+ cellStyle.color = chunk4GX347MG_js.colorWithOpacity(runColor, opacity);
3264
3285
  }
3265
3286
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
3266
3287
  if (fontFamily) {
@@ -3270,15 +3291,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
3270
3291
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
3271
3292
  }
3272
3293
  const cellProperties = cellXml["a:tcPr"];
3273
- const cellFill = chunk3NDRTC7T_js.parseDrawingColor(
3294
+ const cellFill = chunk4GX347MG_js.parseDrawingColor(
3274
3295
  cellProperties?.["a:solidFill"],
3275
3296
  schemeColorOverrides
3276
3297
  );
3277
3298
  if (cellFill) {
3278
- const opacity = chunk3NDRTC7T_js.parseDrawingColorOpacity(
3299
+ const opacity = chunk4GX347MG_js.parseDrawingColorOpacity(
3279
3300
  cellProperties?.["a:solidFill"]
3280
3301
  );
3281
- cellStyle.backgroundColor = chunk3NDRTC7T_js.colorWithOpacity(cellFill, opacity);
3302
+ cellStyle.backgroundColor = chunk4GX347MG_js.colorWithOpacity(cellFill, opacity);
3282
3303
  } else {
3283
3304
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
3284
3305
  if (gradCss) {
@@ -3293,16 +3314,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
3293
3314
  const edgeBorders = parseCellBorders(cellProperties);
3294
3315
  Object.assign(cellStyle, edgeBorders);
3295
3316
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
3296
- const borderColor = chunk3NDRTC7T_js.parseDrawingColor(
3317
+ const borderColor = chunk4GX347MG_js.parseDrawingColor(
3297
3318
  cellProperties?.["a:lnL"]?.["a:solidFill"],
3298
3319
  schemeColorOverrides
3299
- ) || chunk3NDRTC7T_js.parseDrawingColor(
3320
+ ) || chunk4GX347MG_js.parseDrawingColor(
3300
3321
  cellProperties?.["a:lnR"]?.["a:solidFill"],
3301
3322
  schemeColorOverrides
3302
- ) || chunk3NDRTC7T_js.parseDrawingColor(
3323
+ ) || chunk4GX347MG_js.parseDrawingColor(
3303
3324
  cellProperties?.["a:lnT"]?.["a:solidFill"],
3304
3325
  schemeColorOverrides
3305
- ) || chunk3NDRTC7T_js.parseDrawingColor(
3326
+ ) || chunk4GX347MG_js.parseDrawingColor(
3306
3327
  cellProperties?.["a:lnB"]?.["a:solidFill"],
3307
3328
  schemeColorOverrides
3308
3329
  );
@@ -3381,10 +3402,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
3381
3402
  }
3382
3403
  let color = base;
3383
3404
  if (fill.tint !== void 0 && fill.tint > 0) {
3384
- color = chunk3NDRTC7T_js.tintColor2(color, fill.tint / 1e5);
3405
+ color = chunk4GX347MG_js.tintColor2(color, fill.tint / 1e5);
3385
3406
  }
3386
3407
  if (fill.shade !== void 0 && fill.shade > 0) {
3387
- color = chunk3NDRTC7T_js.shadeColor2(color, 1 - fill.shade / 1e5);
3408
+ color = chunk4GX347MG_js.shadeColor2(color, 1 - fill.shade / 1e5);
3388
3409
  }
3389
3410
  return color;
3390
3411
  }
@@ -3409,7 +3430,7 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
3409
3430
  style.fontFamily = text.fontFace;
3410
3431
  applied = true;
3411
3432
  } else {
3412
- const refFont = chunk3NDRTC7T_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
3433
+ const refFont = chunk4GX347MG_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
3413
3434
  if (refFont) {
3414
3435
  style.fontFamily = refFont;
3415
3436
  applied = true;
@@ -3420,10 +3441,10 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
3420
3441
  if (base) {
3421
3442
  let color = base;
3422
3443
  if (text.fontTint !== void 0 && text.fontTint > 0) {
3423
- color = chunk3NDRTC7T_js.tintColor2(color, text.fontTint / 1e5);
3444
+ color = chunk4GX347MG_js.tintColor2(color, text.fontTint / 1e5);
3424
3445
  }
3425
3446
  if (text.fontShade !== void 0 && text.fontShade > 0) {
3426
- color = chunk3NDRTC7T_js.shadeColor2(color, 1 - text.fontShade / 1e5);
3447
+ color = chunk4GX347MG_js.shadeColor2(color, 1 - text.fontShade / 1e5);
3427
3448
  }
3428
3449
  style.color = color;
3429
3450
  applied = true;
@@ -3612,7 +3633,7 @@ function parseTableElementData(element, fallbackTextStyle) {
3612
3633
  };
3613
3634
  }
3614
3635
  function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
3615
- return chunk3NDRTC7T_js.getCellDiagonalBorders(style, tableData, pos, {
3636
+ return chunk4GX347MG_js.getCellDiagonalBorders(style, tableData, pos, {
3616
3637
  tableStyleMap: styleCtx?.tableStyleMap,
3617
3638
  colorScheme: styleCtx?.theme?.colorScheme,
3618
3639
  fontScheme: styleCtx?.theme?.fontScheme
@@ -3760,9 +3781,9 @@ function cellStyleToCss(style) {
3760
3781
  if (style.gradientFillCss) {
3761
3782
  css.background = style.gradientFillCss;
3762
3783
  } else if (style.fillMode === "pattern" && style.patternFillPreset) {
3763
- const fg = chunk3NDRTC7T_js.normalizeHexColor(style.patternFillForeground, "#000000");
3764
- const bg = chunk3NDRTC7T_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
3765
- const svgPattern = chunk3NDRTC7T_js.getPatternSvg(style.patternFillPreset, fg, bg);
3784
+ const fg = chunk4GX347MG_js.normalizeHexColor(style.patternFillForeground, "#000000");
3785
+ const bg = chunk4GX347MG_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
3786
+ const svgPattern = chunk4GX347MG_js.getPatternSvg(style.patternFillPreset, fg, bg);
3766
3787
  if (svgPattern) {
3767
3788
  const encoded = encodeURIComponent(svgPattern);
3768
3789
  css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
@@ -3838,7 +3859,7 @@ function cellStyleToCss(style) {
3838
3859
  if (edge.width || edge.color) {
3839
3860
  const w = edge.width ?? 1;
3840
3861
  const c = edge.color ?? style.borderColor ?? "#000000";
3841
- const s = chunk3NDRTC7T_js.ooxmlDashToCssBorderStyle(edge.dash);
3862
+ const s = chunk4GX347MG_js.ooxmlDashToCssBorderStyle(edge.dash);
3842
3863
  css[edge.prefix] = `${w}px ${s} ${c}`;
3843
3864
  }
3844
3865
  }
@@ -3869,7 +3890,7 @@ function cellStyleToCss(style) {
3869
3890
  css.textShadow = textShadowParts.join(", ");
3870
3891
  }
3871
3892
  if (style.cell3D) {
3872
- Object.assign(css, chunk3NDRTC7T_js.cell3DBevelCss(style.cell3D));
3893
+ Object.assign(css, chunk4GX347MG_js.cell3DBevelCss(style.cell3D));
3873
3894
  }
3874
3895
  return css;
3875
3896
  }
@@ -3883,7 +3904,7 @@ function TableResizeOverlay({
3883
3904
  const containerRef = React6.useRef(null);
3884
3905
  const [rowBounds, setRowBounds] = React6.useState([]);
3885
3906
  const dragRef = React6.useRef(null);
3886
- const colBoundaries = React6.useMemo(() => chunk3NDRTC7T_js.computeColumnBoundaries(columnWidths), [columnWidths]);
3907
+ const colBoundaries = React6.useMemo(() => chunk4GX347MG_js.computeColumnBoundaries(columnWidths), [columnWidths]);
3887
3908
  const measureRows = React6.useCallback(() => {
3888
3909
  const container = containerRef.current;
3889
3910
  if (!container) {
@@ -3930,11 +3951,11 @@ function TableResizeOverlay({
3930
3951
  const rect = containerRef.current.getBoundingClientRect();
3931
3952
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
3932
3953
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
3933
- onResizeColumns(chunk3NDRTC7T_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
3954
+ onResizeColumns(chunk4GX347MG_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
3934
3955
  } else if (drag.type === "row" && onResizeRow) {
3935
3956
  const deltaY = e.clientY - drag.startPos;
3936
- const newHeight = chunk3NDRTC7T_js.computeResizedRowHeight(
3937
- drag.initialRowHeight ?? chunk3NDRTC7T_js.DEFAULT_ROW_HEIGHT,
3957
+ const newHeight = chunk4GX347MG_js.computeResizedRowHeight(
3958
+ drag.initialRowHeight ?? chunk4GX347MG_js.DEFAULT_ROW_HEIGHT,
3938
3959
  deltaY
3939
3960
  );
3940
3961
  onResizeRow(drag.index, newHeight);
@@ -3972,7 +3993,7 @@ function TableResizeOverlay({
3972
3993
  e.stopPropagation();
3973
3994
  const table = containerRef.current?.querySelector("table");
3974
3995
  const tr = table?.querySelectorAll("tbody > tr")[index];
3975
- const actualHeight = tr?.offsetHeight ?? chunk3NDRTC7T_js.DEFAULT_ROW_HEIGHT;
3996
+ const actualHeight = tr?.offsetHeight ?? chunk4GX347MG_js.DEFAULT_ROW_HEIGHT;
3976
3997
  document.body.style.cursor = "row-resize";
3977
3998
  document.body.style.userSelect = "none";
3978
3999
  dragRef.current = {
@@ -4020,7 +4041,7 @@ function renderTableFromTableData(element, textStyle, options) {
4020
4041
  }
4021
4042
  const first = selectedCell.selectedCells[0];
4022
4043
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
4023
- return chunk3NDRTC7T_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
4044
+ return chunk4GX347MG_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
4024
4045
  })();
4025
4046
  return /* @__PURE__ */ jsxRuntime.jsx(
4026
4047
  TableResizeOverlay,
@@ -4040,7 +4061,7 @@ function renderTableFromTableData(element, textStyle, options) {
4040
4061
  "table",
4041
4062
  {
4042
4063
  className: "w-full h-full border-collapse table-fixed",
4043
- style: { fontFamily: chunk3NDRTC7T_js.DEFAULT_FONT_FAMILY },
4064
+ style: { fontFamily: chunk4GX347MG_js.DEFAULT_FONT_FAMILY },
4044
4065
  children: [
4045
4066
  tableData.columnWidths.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsxRuntime.jsx(
4046
4067
  "col",
@@ -4058,7 +4079,7 @@ function renderTableFromTableData(element, textStyle, options) {
4058
4079
  return null;
4059
4080
  }
4060
4081
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
4061
- const isInMultiSelection = chunk3NDRTC7T_js.isCellInRect(rowIndex, cellIndex, selectionRect);
4082
+ const isInMultiSelection = chunk4GX347MG_js.isCellInRect(rowIndex, cellIndex, selectionRect);
4062
4083
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
4063
4084
  const diag = getCellDiagonalBorders2(
4064
4085
  cell.style,
@@ -4088,7 +4109,7 @@ function renderTableFromTableData(element, textStyle, options) {
4088
4109
  }
4089
4110
  event.stopPropagation();
4090
4111
  if (event.shiftKey && selectedCell) {
4091
- const rect = chunk3NDRTC7T_js.computeSelectionRect(
4112
+ const rect = chunk4GX347MG_js.computeSelectionRect(
4092
4113
  selectedCell.rowIndex,
4093
4114
  selectedCell.columnIndex,
4094
4115
  rowIndex,
@@ -4098,7 +4119,7 @@ function renderTableFromTableData(element, textStyle, options) {
4098
4119
  options?.onSelectCell?.({
4099
4120
  rowIndex: selectedCell.rowIndex,
4100
4121
  columnIndex: selectedCell.columnIndex,
4101
- selectedCells: chunk3NDRTC7T_js.rectToCells(rect)
4122
+ selectedCells: chunk4GX347MG_js.rectToCells(rect)
4102
4123
  });
4103
4124
  } else {
4104
4125
  options?.onSelectCell?.({
@@ -4177,7 +4198,7 @@ function renderTableElement(element, textStyle, options) {
4177
4198
  }
4178
4199
  const first = selectedCell.selectedCells[0];
4179
4200
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
4180
- return chunk3NDRTC7T_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
4201
+ return chunk4GX347MG_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
4181
4202
  })();
4182
4203
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
4183
4204
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -4198,7 +4219,7 @@ function renderTableElement(element, textStyle, options) {
4198
4219
  "table",
4199
4220
  {
4200
4221
  className: "w-full h-full border-collapse table-fixed",
4201
- style: { fontFamily: chunk3NDRTC7T_js.DEFAULT_FONT_FAMILY },
4222
+ style: { fontFamily: chunk4GX347MG_js.DEFAULT_FONT_FAMILY },
4202
4223
  children: [
4203
4224
  parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsxRuntime.jsx(
4204
4225
  "col",
@@ -4259,7 +4280,7 @@ function renderTableElement(element, textStyle, options) {
4259
4280
  "border px-1 py-0.5 align-top",
4260
4281
  isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
4261
4282
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
4262
- chunk3NDRTC7T_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
4283
+ chunk4GX347MG_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
4263
4284
  ),
4264
4285
  colSpan,
4265
4286
  rowSpan: rSpan,
@@ -4270,7 +4291,7 @@ function renderTableElement(element, textStyle, options) {
4270
4291
  }
4271
4292
  event.stopPropagation();
4272
4293
  if (event.shiftKey && selectedCell && tableEl.tableData) {
4273
- const rect = chunk3NDRTC7T_js.computeSelectionRect(
4294
+ const rect = chunk4GX347MG_js.computeSelectionRect(
4274
4295
  selectedCell.rowIndex,
4275
4296
  selectedCell.columnIndex,
4276
4297
  rowIndex,
@@ -4280,7 +4301,7 @@ function renderTableElement(element, textStyle, options) {
4280
4301
  options?.onSelectCell?.({
4281
4302
  rowIndex: selectedCell.rowIndex,
4282
4303
  columnIndex: selectedCell.columnIndex,
4283
- selectedCells: chunk3NDRTC7T_js.rectToCells(rect)
4304
+ selectedCells: chunk4GX347MG_js.rectToCells(rect)
4284
4305
  });
4285
4306
  } else {
4286
4307
  options?.onSelectCell?.({
@@ -4337,24 +4358,24 @@ function renderTableElement(element, textStyle, options) {
4337
4358
  }
4338
4359
  var LEGEND_ITEM_WIDTH = 80;
4339
4360
  function partAttrs(part) {
4340
- return part ? chunk3NDRTC7T_js.chartPartToAttrs(part) : void 0;
4361
+ return part ? chunk4GX347MG_js.chartPartToAttrs(part) : void 0;
4341
4362
  }
4342
4363
  function resolveReactPalette(chartData) {
4343
4364
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
4344
4365
  return chartData.colorPalette;
4345
4366
  }
4346
- return [...chunk3NDRTC7T_js.getChartStylePalette(chartData.style?.styleId)];
4367
+ return [...chunk4GX347MG_js.getChartStylePalette(chartData.style?.styleId)];
4347
4368
  }
4348
4369
  function buildReactChartViewModel(element) {
4349
4370
  if (element.type !== "chart" || !element.chartData) {
4350
- return chunk3NDRTC7T_js.buildChartViewModel(element);
4371
+ return chunk4GX347MG_js.buildChartViewModel(element);
4351
4372
  }
4352
4373
  const palette = resolveReactPalette(element.chartData);
4353
4374
  const themedElement = {
4354
4375
  ...element,
4355
4376
  chartData: { ...element.chartData, colorPalette: palette }
4356
4377
  };
4357
- return chunk3NDRTC7T_js.buildChartViewModel(themedElement);
4378
+ return chunk4GX347MG_js.buildChartViewModel(themedElement);
4358
4379
  }
4359
4380
  function renderPrimitive(prim, key) {
4360
4381
  switch (prim.kind) {
@@ -4743,7 +4764,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4743
4764
  const unmatchedRows = [];
4744
4765
  categories.forEach((cat, i) => {
4745
4766
  const value = values[i] ?? 0;
4746
- const code = chunk3NDRTC7T_js.resolveRegionCode(cat);
4767
+ const code = chunk4GX347MG_js.resolveRegionCode(cat);
4747
4768
  if (code) {
4748
4769
  regionValueMap.set(code, { value, label: cat });
4749
4770
  } else {
@@ -4781,8 +4802,8 @@ function renderMapChart(element, chartData, categoryLabels) {
4781
4802
  let fill = "#e2e8f0";
4782
4803
  let dataLabel = null;
4783
4804
  if (entry) {
4784
- const t = chunk3NDRTC7T_js.normalizeValue(entry.value, minVal, maxVal);
4785
- fill = chunk3NDRTC7T_js.sequentialColorScale(t);
4805
+ const t = chunk4GX347MG_js.normalizeValue(entry.value, minVal, maxVal);
4806
+ fill = chunk4GX347MG_js.sequentialColorScale(t);
4786
4807
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
4787
4808
  "text",
4788
4809
  {
@@ -4793,7 +4814,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4793
4814
  fontWeight: 600,
4794
4815
  fill: "#1e293b",
4795
4816
  style: { pointerEvents: "none" },
4796
- children: chunk3NDRTC7T_js.formatAxisValue(entry.value)
4817
+ children: chunk4GX347MG_js.formatAxisValue(entry.value)
4797
4818
  },
4798
4819
  `${element.id}-map-dl-${region.code}`
4799
4820
  );
@@ -4811,7 +4832,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4811
4832
  opacity: 0.9,
4812
4833
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
4813
4834
  region.name,
4814
- entry ? `: ${chunk3NDRTC7T_js.formatAxisValue(entry.value)}` : ""
4835
+ entry ? `: ${chunk4GX347MG_js.formatAxisValue(entry.value)}` : ""
4815
4836
  ] })
4816
4837
  }
4817
4838
  ),
@@ -4849,7 +4870,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4849
4870
  fontSize: 7,
4850
4871
  fill: "#64748b",
4851
4872
  textAnchor: "middle",
4852
- children: chunk3NDRTC7T_js.formatAxisValue(minVal)
4873
+ children: chunk4GX347MG_js.formatAxisValue(minVal)
4853
4874
  },
4854
4875
  `${element.id}-map-legend-min`
4855
4876
  ),
@@ -4861,7 +4882,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4861
4882
  fontSize: 7,
4862
4883
  fill: "#64748b",
4863
4884
  textAnchor: "middle",
4864
- children: chunk3NDRTC7T_js.formatAxisValue(maxVal)
4885
+ children: chunk4GX347MG_js.formatAxisValue(maxVal)
4865
4886
  },
4866
4887
  `${element.id}-map-legend-max`
4867
4888
  )
@@ -4927,7 +4948,7 @@ function renderMapChart(element, chartData, categoryLabels) {
4927
4948
  y,
4928
4949
  fontSize,
4929
4950
  fill: "#475569",
4930
- children: chunk3NDRTC7T_js.formatAxisValue(row.value)
4951
+ children: chunk4GX347MG_js.formatAxisValue(row.value)
4931
4952
  },
4932
4953
  `${element.id}-map-ft-val-${i}`
4933
4954
  )
@@ -4998,7 +5019,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
4998
5019
 
4999
5020
  // src/viewer/utils/chart-overlay-utils.ts
5000
5021
  function sColor(series, idx) {
5001
- return chunk3NDRTC7T_js.seriesColor(series, idx);
5022
+ return chunk4GX347MG_js.seriesColor(series, idx);
5002
5023
  }
5003
5024
  function valToY(val, range, topY, bottomY) {
5004
5025
  const usable = bottomY - topY;
@@ -5537,7 +5558,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
5537
5558
  width: 10,
5538
5559
  height: 10,
5539
5560
  rx: 2,
5540
- fill: chunk3NDRTC7T_js.seriesColor(s, i, style?.styleId, colorPalette)
5561
+ fill: chunk4GX347MG_js.seriesColor(s, i, style?.styleId, colorPalette)
5541
5562
  },
5542
5563
  `${id}-leg-r-${i}`
5543
5564
  )
@@ -5561,7 +5582,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
5561
5582
  width: 10,
5562
5583
  height: 10,
5563
5584
  rx: 2,
5564
- fill: chunk3NDRTC7T_js.seriesColor(s, i, style?.styleId, colorPalette)
5585
+ fill: chunk4GX347MG_js.seriesColor(s, i, style?.styleId, colorPalette)
5565
5586
  }
5566
5587
  ),
5567
5588
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -5574,9 +5595,9 @@ function renderGridlines(id, style, range, layout) {
5574
5595
  }
5575
5596
  const lines = [];
5576
5597
  if (range.logScale && range.logBase) {
5577
- const ticks = chunk3NDRTC7T_js.generateLogTicks(range);
5598
+ const ticks = chunk4GX347MG_js.generateLogTicks(range);
5578
5599
  ticks.forEach((tickVal, i) => {
5579
- const y = chunk3NDRTC7T_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
5600
+ const y = chunk4GX347MG_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
5580
5601
  lines.push(
5581
5602
  /* @__PURE__ */ jsxRuntime.jsx(
5582
5603
  "line",
@@ -5597,7 +5618,7 @@ function renderGridlines(id, style, range, layout) {
5597
5618
  const steps = 4;
5598
5619
  for (let i = 0; i <= steps; i++) {
5599
5620
  const val = range.min + range.span * i / steps;
5600
- const y = chunk3NDRTC7T_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5621
+ const y = chunk4GX347MG_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5601
5622
  lines.push(
5602
5623
  /* @__PURE__ */ jsxRuntime.jsx(
5603
5624
  "line",
@@ -5621,9 +5642,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5621
5642
  const labels = [];
5622
5643
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
5623
5644
  if (range.logScale && range.logBase) {
5624
- const ticks = chunk3NDRTC7T_js.generateLogTicks(range);
5645
+ const ticks = chunk4GX347MG_js.generateLogTicks(range);
5625
5646
  ticks.forEach((tickVal, i) => {
5626
- const y = chunk3NDRTC7T_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
5647
+ const y = chunk4GX347MG_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
5627
5648
  labels.push(
5628
5649
  /* @__PURE__ */ jsxRuntime.jsx(
5629
5650
  "text",
@@ -5633,7 +5654,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5633
5654
  textAnchor: "end",
5634
5655
  fontSize: 8,
5635
5656
  fill: "#64748b",
5636
- children: hasDisplayUnits ? chunk3NDRTC7T_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunk3NDRTC7T_js.formatAxisValue(tickVal)
5657
+ children: hasDisplayUnits ? chunk4GX347MG_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunk4GX347MG_js.formatAxisValue(tickVal)
5637
5658
  },
5638
5659
  `${id}-vaxis-log-${i}`
5639
5660
  )
@@ -5643,7 +5664,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5643
5664
  const steps = 4;
5644
5665
  for (let i = 0; i <= steps; i++) {
5645
5666
  const val = range.min + range.span * i / steps;
5646
- const y = chunk3NDRTC7T_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5667
+ const y = chunk4GX347MG_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5647
5668
  labels.push(
5648
5669
  /* @__PURE__ */ jsxRuntime.jsx(
5649
5670
  "text",
@@ -5653,7 +5674,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5653
5674
  textAnchor: "end",
5654
5675
  fontSize: 8,
5655
5676
  fill: "#64748b",
5656
- children: hasDisplayUnits ? chunk3NDRTC7T_js.formatAxisValueWithUnits(val, axisFormatting) : chunk3NDRTC7T_js.formatAxisValue(val)
5677
+ children: hasDisplayUnits ? chunk4GX347MG_js.formatAxisValueWithUnits(val, axisFormatting) : chunk4GX347MG_js.formatAxisValue(val)
5657
5678
  },
5658
5679
  `${id}-vaxis-${i}`
5659
5680
  )
@@ -5661,7 +5682,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
5661
5682
  }
5662
5683
  }
5663
5684
  if (hasDisplayUnits) {
5664
- const unitLabel = chunk3NDRTC7T_js.getDisplayUnitLabel(
5685
+ const unitLabel = chunk4GX347MG_js.getDisplayUnitLabel(
5665
5686
  axisFormatting.displayUnits,
5666
5687
  axisFormatting.displayUnitsLabel
5667
5688
  );
@@ -5736,7 +5757,7 @@ function renderZeroLine(id, range, layout) {
5736
5757
  if (range.min >= 0) {
5737
5758
  return null;
5738
5759
  }
5739
- const y = chunk3NDRTC7T_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
5760
+ const y = chunk4GX347MG_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
5740
5761
  return /* @__PURE__ */ jsxRuntime.jsx(
5741
5762
  "line",
5742
5763
  {
@@ -5760,7 +5781,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
5760
5781
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
5761
5782
  for (let i = 0; i <= steps; i++) {
5762
5783
  const val = range.min + range.span * i / steps;
5763
- const y = chunk3NDRTC7T_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5784
+ const y = chunk4GX347MG_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5764
5785
  labels.push(
5765
5786
  /* @__PURE__ */ jsxRuntime.jsx(
5766
5787
  "text",
@@ -5772,7 +5793,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
5772
5793
  fontFamily,
5773
5794
  fontWeight,
5774
5795
  fill: fontColor,
5775
- children: hasDisplayUnits ? chunk3NDRTC7T_js.formatAxisValueWithUnits(val, axisFormatting) : chunk3NDRTC7T_js.formatAxisValue(val)
5796
+ children: hasDisplayUnits ? chunk4GX347MG_js.formatAxisValueWithUnits(val, axisFormatting) : chunk4GX347MG_js.formatAxisValue(val)
5776
5797
  },
5777
5798
  `${id}-sec-vaxis-${i}`
5778
5799
  )
@@ -5796,7 +5817,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
5796
5817
  );
5797
5818
  }
5798
5819
  if (hasDisplayUnits) {
5799
- const unitLabel = chunk3NDRTC7T_js.getDisplayUnitLabel(
5820
+ const unitLabel = chunk4GX347MG_js.getDisplayUnitLabel(
5800
5821
  axisFormatting.displayUnits,
5801
5822
  axisFormatting.displayUnitsLabel
5802
5823
  );
@@ -5827,7 +5848,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
5827
5848
  const ticks = [];
5828
5849
  for (let i = 0; i <= steps; i++) {
5829
5850
  const val = range.min + range.span * i / steps;
5830
- const y = chunk3NDRTC7T_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5851
+ const y = chunk4GX347MG_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5831
5852
  ticks.push(
5832
5853
  /* @__PURE__ */ jsxRuntime.jsx(
5833
5854
  "line",
@@ -5854,7 +5875,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
5854
5875
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
5855
5876
  for (let i = 0; i <= steps; i++) {
5856
5877
  const val = range.min + range.span * i / steps;
5857
- const y = chunk3NDRTC7T_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5878
+ const y = chunk4GX347MG_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
5858
5879
  lines.push(
5859
5880
  /* @__PURE__ */ jsxRuntime.jsx(
5860
5881
  "line",
@@ -6016,7 +6037,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
6016
6037
  width: 8,
6017
6038
  height: 8,
6018
6039
  borderRadius: 2,
6019
- backgroundColor: chunk3NDRTC7T_js.seriesColor(
6040
+ backgroundColor: chunk4GX347MG_js.seriesColor(
6020
6041
  s,
6021
6042
  si,
6022
6043
  chartData.style?.styleId,
@@ -6054,10 +6075,10 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
6054
6075
  }
6055
6076
  function renderStockChart(element, chartData, categoryLabels) {
6056
6077
  const style = chartData.style;
6057
- const areaFill = chunk3NDRTC7T_js.chartAreaFill(chartData);
6078
+ const areaFill = chunk4GX347MG_js.chartAreaFill(chartData);
6058
6079
  const legendPos = style?.legendPosition || "b";
6059
- const range = chunk3NDRTC7T_js.computeValueRangeForChart(chartData.series, chartData.axes);
6060
- const layout = chunk3NDRTC7T_js.computeLayout(element.width, element.height, style, true, legendPos);
6080
+ const range = chunk4GX347MG_js.computeValueRangeForChart(chartData.series, chartData.axes);
6081
+ const layout = chunk4GX347MG_js.computeLayout(element.width, element.height, style, true, legendPos);
6061
6082
  const catCount = Math.max(categoryLabels.length, 1);
6062
6083
  const barGroupWidth = layout.plotWidth / catCount;
6063
6084
  const candleWidth = barGroupWidth * 0.5;
@@ -6078,10 +6099,10 @@ function renderStockChart(element, chartData, categoryLabels) {
6078
6099
  const close = closeSeries.values[ci] ?? high;
6079
6100
  const isUp = close >= open;
6080
6101
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
6081
- const highY = chunk3NDRTC7T_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
6082
- const lowY = chunk3NDRTC7T_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
6083
- const openY = chunk3NDRTC7T_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
6084
- const closeY = chunk3NDRTC7T_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
6102
+ const highY = chunk4GX347MG_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
6103
+ const lowY = chunk4GX347MG_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
6104
+ const openY = chunk4GX347MG_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
6105
+ const closeY = chunk4GX347MG_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
6085
6106
  elements.push(
6086
6107
  /* @__PURE__ */ jsxRuntime.jsx(
6087
6108
  "line",
@@ -6124,7 +6145,7 @@ function renderStockChart(element, chartData, categoryLabels) {
6124
6145
  textAnchor: "middle",
6125
6146
  fontSize: 7,
6126
6147
  fill: "#334155",
6127
- children: chunk3NDRTC7T_js.formatAxisValue(close)
6148
+ children: chunk4GX347MG_js.formatAxisValue(close)
6128
6149
  },
6129
6150
  `${element.id}-stock-dl-${ci}`
6130
6151
  )
@@ -6166,7 +6187,7 @@ function FailedToLoad() {
6166
6187
  var LazySurfaceChart3DScene = React6__default.default.lazy(
6167
6188
  async () => {
6168
6189
  try {
6169
- return await import('./SurfaceChart3DScene-NPJQXIGW.js');
6190
+ return await import('./SurfaceChart3DScene-AD43LAOO.js');
6170
6191
  } catch {
6171
6192
  return { default: FailedToLoad };
6172
6193
  }
@@ -6190,7 +6211,7 @@ var SurfaceChart3DErrorBoundary = class extends React6__default.default.Componen
6190
6211
  function buildSurfaceData(chartData, categoryLabels) {
6191
6212
  const rows = chartData.series.length;
6192
6213
  const cols = Math.max(categoryLabels.length, 1);
6193
- const range = chunk3NDRTC7T_js.computeValueRangeForChart(chartData.series, chartData.axes);
6214
+ const range = chunk4GX347MG_js.computeValueRangeForChart(chartData.series, chartData.axes);
6194
6215
  const heightMap = new Float32Array(rows * cols);
6195
6216
  const colorMap = new Float32Array(rows * cols * 3);
6196
6217
  for (let r = 0; r < rows; r++) {
@@ -6309,10 +6330,10 @@ function darkenRgb(r, g, b, factor) {
6309
6330
  }
6310
6331
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
6311
6332
  const style = chartData.style;
6312
- const areaFill = chunk3NDRTC7T_js.chartAreaFill(chartData);
6333
+ const areaFill = chunk4GX347MG_js.chartAreaFill(chartData);
6313
6334
  const legendPos = style?.legendPosition || "b";
6314
- const layout = chunk3NDRTC7T_js.computeLayout(element.width, element.height, style, false, legendPos);
6315
- const range = chunk3NDRTC7T_js.computeValueRangeForChart(chartData.series, chartData.axes);
6335
+ const layout = chunk4GX347MG_js.computeLayout(element.width, element.height, style, false, legendPos);
6336
+ const range = chunk4GX347MG_js.computeValueRangeForChart(chartData.series, chartData.axes);
6316
6337
  const catCount = Math.max(categoryLabels.length, 1);
6317
6338
  const seriesCount = chartData.series.length;
6318
6339
  const cols = catCount - 1;
@@ -6401,10 +6422,10 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
6401
6422
  }
6402
6423
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
6403
6424
  const style = chartData.style;
6404
- const areaFill = chunk3NDRTC7T_js.chartAreaFill(chartData);
6425
+ const areaFill = chunk4GX347MG_js.chartAreaFill(chartData);
6405
6426
  const legendPos = style?.legendPosition || "b";
6406
- const layout = chunk3NDRTC7T_js.computeLayout(element.width, element.height, style, true, legendPos);
6407
- const range = chunk3NDRTC7T_js.computeValueRangeForChart(chartData.series, chartData.axes);
6427
+ const layout = chunk4GX347MG_js.computeLayout(element.width, element.height, style, true, legendPos);
6428
+ const range = chunk4GX347MG_js.computeValueRangeForChart(chartData.series, chartData.axes);
6408
6429
  const catCount = Math.max(categoryLabels.length, 1);
6409
6430
  const seriesCount = chartData.series.length;
6410
6431
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -6466,9 +6487,9 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
6466
6487
  }
6467
6488
  function renderTreemapChart(element, chartData, categoryLabels) {
6468
6489
  const style = chartData.style;
6469
- const areaFill = chunk3NDRTC7T_js.chartAreaFill(chartData);
6490
+ const areaFill = chunk4GX347MG_js.chartAreaFill(chartData);
6470
6491
  const legendPos = style?.legendPosition || "b";
6471
- const layout = chunk3NDRTC7T_js.computeLayout(element.width, element.height, style, false, legendPos);
6492
+ const layout = chunk4GX347MG_js.computeLayout(element.width, element.height, style, false, legendPos);
6472
6493
  const allValues = chartData.series.flatMap((s) => s.values);
6473
6494
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
6474
6495
  const rects = [];
@@ -6491,7 +6512,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
6491
6512
  y: curY,
6492
6513
  width: Math.max(w - 1, 1),
6493
6514
  height: Math.max(h - 1, 1),
6494
- fill: chunk3NDRTC7T_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
6515
+ fill: chunk4GX347MG_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
6495
6516
  rx: 2,
6496
6517
  opacity: 0.85
6497
6518
  },
@@ -6542,11 +6563,11 @@ function renderTreemapChart(element, chartData, categoryLabels) {
6542
6563
  }
6543
6564
  function renderWaterfallChart(element, chartData, categoryLabels) {
6544
6565
  const style = chartData.style;
6545
- const areaFill = chunk3NDRTC7T_js.chartAreaFill(chartData);
6566
+ const areaFill = chunk4GX347MG_js.chartAreaFill(chartData);
6546
6567
  const legendPos = style?.legendPosition || "b";
6547
6568
  const values = chartData.series[0]?.values ?? [];
6548
- const range = chunk3NDRTC7T_js.computeValueRangeForChart(chartData.series, chartData.axes);
6549
- const layout = chunk3NDRTC7T_js.computeLayout(element.width, element.height, style, true, legendPos);
6569
+ const range = chunk4GX347MG_js.computeValueRangeForChart(chartData.series, chartData.axes);
6570
+ const layout = chunk4GX347MG_js.computeLayout(element.width, element.height, style, true, legendPos);
6550
6571
  const catCount = Math.max(categoryLabels.length, values.length, 1);
6551
6572
  const barWidth = layout.plotWidth / catCount * 0.6;
6552
6573
  const gap = layout.plotWidth / catCount * 0.2;
@@ -6557,8 +6578,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6557
6578
  const isLast = i === values.length - 1;
6558
6579
  const startVal = isLast ? 0 : runningTotal;
6559
6580
  const endVal = isLast ? runningTotal + val : runningTotal + val;
6560
- const barStartY = chunk3NDRTC7T_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
6561
- const barEndY = chunk3NDRTC7T_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
6581
+ const barStartY = chunk4GX347MG_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
6582
+ const barEndY = chunk4GX347MG_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
6562
6583
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
6563
6584
  const y = Math.min(barStartY, barEndY);
6564
6585
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -6587,7 +6608,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6587
6608
  textAnchor: "middle",
6588
6609
  fontSize: 7,
6589
6610
  fill: "#334155",
6590
- children: chunk3NDRTC7T_js.formatAxisValue(isLast ? endVal : val)
6611
+ children: chunk4GX347MG_js.formatAxisValue(isLast ? endVal : val)
6591
6612
  },
6592
6613
  `${element.id}-wf-dl-${i}`
6593
6614
  )
@@ -6634,20 +6655,20 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6634
6655
  }
6635
6656
  function renderComboChart(element, chartData, categoryLabels) {
6636
6657
  const style = chartData.style;
6637
- const areaFill = chunk3NDRTC7T_js.chartAreaFill(chartData);
6658
+ const areaFill = chunk4GX347MG_js.chartAreaFill(chartData);
6638
6659
  const legendPos = style?.legendPosition || "b";
6639
- const layoutOpts = chunk3NDRTC7T_js.computeLayoutOptions(
6660
+ const layoutOpts = chunk4GX347MG_js.computeLayoutOptions(
6640
6661
  chartData.axes,
6641
6662
  chartData.dataTable,
6642
6663
  chartData.series.length
6643
6664
  );
6644
- const layout = chunk3NDRTC7T_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
6645
- const { primary, secondary } = chunk3NDRTC7T_js.splitSeriesByAxis(chartData.series, chartData.axes);
6665
+ const layout = chunk4GX347MG_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
6666
+ const { primary, secondary } = chunk4GX347MG_js.splitSeriesByAxis(chartData.series, chartData.axes);
6646
6667
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
6647
6668
  const secondarySeries = secondary.map((e) => e.series);
6648
- const range = chunk3NDRTC7T_js.computeValueRangeForChart(primarySeries, chartData.axes);
6649
- const secondaryRange = secondarySeries.length > 0 ? chunk3NDRTC7T_js.computeValueRange(secondarySeries) : void 0;
6650
- const secondaryAxisFmt = chunk3NDRTC7T_js.getSecondaryValueAxis(chartData.axes);
6669
+ const range = chunk4GX347MG_js.computeValueRangeForChart(primarySeries, chartData.axes);
6670
+ const secondaryRange = secondarySeries.length > 0 ? chunk4GX347MG_js.computeValueRange(secondarySeries) : void 0;
6671
+ const secondaryAxisFmt = chunk4GX347MG_js.getSecondaryValueAxis(chartData.axes);
6651
6672
  const catCount = Math.max(categoryLabels.length, 1);
6652
6673
  const barSeriesCount = 1;
6653
6674
  const barGroupWidth = layout.plotWidth / catCount;
@@ -6663,8 +6684,8 @@ function renderComboChart(element, chartData, categoryLabels) {
6663
6684
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
6664
6685
  barSeries.values.forEach((val, vi) => {
6665
6686
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
6666
- const zeroY = chunk3NDRTC7T_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
6667
- const valY = chunk3NDRTC7T_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
6687
+ const zeroY = chunk4GX347MG_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
6688
+ const valY = chunk4GX347MG_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
6668
6689
  const y = Math.min(zeroY, valY);
6669
6690
  const h = Math.max(Math.abs(zeroY - valY), 1);
6670
6691
  barElements.push(
@@ -6675,7 +6696,7 @@ function renderComboChart(element, chartData, categoryLabels) {
6675
6696
  y,
6676
6697
  width: barWidth,
6677
6698
  height: h,
6678
- fill: chunk3NDRTC7T_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
6699
+ fill: chunk4GX347MG_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
6679
6700
  rx: 1
6680
6701
  },
6681
6702
  `${element.id}-combo-bar-${vi}`
@@ -6691,7 +6712,7 @@ function renderComboChart(element, chartData, categoryLabels) {
6691
6712
  textAnchor: "middle",
6692
6713
  fontSize: 7,
6693
6714
  fill: "#334155",
6694
- children: chunk3NDRTC7T_js.formatAxisValue(val)
6715
+ children: chunk4GX347MG_js.formatAxisValue(val)
6695
6716
  },
6696
6717
  `${element.id}-combo-bar-dl-${vi}`
6697
6718
  )
@@ -6708,10 +6729,10 @@ function renderComboChart(element, chartData, categoryLabels) {
6708
6729
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
6709
6730
  const points = series.values.map((val, vi) => {
6710
6731
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
6711
- const y = chunk3NDRTC7T_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
6732
+ const y = chunk4GX347MG_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
6712
6733
  return { x, y, val };
6713
6734
  });
6714
- const c = chunk3NDRTC7T_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
6735
+ const c = chunk4GX347MG_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
6715
6736
  lineElements.push(
6716
6737
  /* @__PURE__ */ jsxRuntime.jsx(
6717
6738
  "polyline",
@@ -6738,7 +6759,7 @@ function renderComboChart(element, chartData, categoryLabels) {
6738
6759
  textAnchor: "middle",
6739
6760
  fontSize: 7,
6740
6761
  fill: "#334155",
6741
- children: chunk3NDRTC7T_js.formatAxisValue(p.val)
6762
+ children: chunk4GX347MG_js.formatAxisValue(p.val)
6742
6763
  },
6743
6764
  `${element.id}-combo-line-dl-${si}-${vi}`
6744
6765
  )
@@ -7884,14 +7905,14 @@ function buildNotesPdf(pages) {
7884
7905
  notes: page.notes,
7885
7906
  slideNumber: page.slideNumber
7886
7907
  }));
7887
- const bytes = chunk3NDRTC7T_js.buildNotesPdfBytes(images, meta);
7908
+ const bytes = chunk4GX347MG_js.buildNotesPdfBytes(images, meta);
7888
7909
  const blob = new Blob([bytes], { type: "application/pdf" });
7889
7910
  return URL.createObjectURL(blob);
7890
7911
  }
7891
7912
 
7892
7913
  // src/viewer/utils/pdf-builder-slides.ts
7893
7914
  function buildPdfFromImageData(images) {
7894
- const bytes = chunk3NDRTC7T_js.buildSlidesPdfBytes(images);
7915
+ const bytes = chunk4GX347MG_js.buildSlidesPdfBytes(images);
7895
7916
  const blob = new Blob([bytes], { type: "application/pdf" });
7896
7917
  return URL.createObjectURL(blob);
7897
7918
  }
@@ -7900,7 +7921,7 @@ function buildPdfFromImageData(images) {
7900
7921
  var activePreview = null;
7901
7922
  function startPreviewAnimation(elementId, preset, options) {
7902
7923
  stopPreviewAnimation();
7903
- const descriptor = chunk3NDRTC7T_js.buildPreviewAnimation(preset, options);
7924
+ const descriptor = chunk4GX347MG_js.buildPreviewAnimation(preset, options);
7904
7925
  if (!descriptor) {
7905
7926
  return;
7906
7927
  }
@@ -7913,7 +7934,7 @@ function startMotionPathPreview(elementId, path, options) {
7913
7934
  return;
7914
7935
  }
7915
7936
  const stage = domEl.offsetParent;
7916
- const descriptor = chunk3NDRTC7T_js.buildMotionPathPreview({
7937
+ const descriptor = chunk4GX347MG_js.buildMotionPathPreview({
7917
7938
  path,
7918
7939
  slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
7919
7940
  slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,