pptx-react-viewer 2.16.5 → 2.16.7

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 (109) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-6B26AZGA.mjs → AiChatPanel-2YYL6AKX.mjs} +3 -9
  3. package/dist/AiChatPanel-2YYL6AKX.mjs.br +0 -0
  4. package/dist/AiChatPanel-2YYL6AKX.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-FGEIZQCD.js → AiChatPanel-XSXMU2Q5.js} +23 -29
  6. package/dist/AiChatPanel-XSXMU2Q5.js.br +0 -0
  7. package/dist/AiChatPanel-XSXMU2Q5.js.gz +0 -0
  8. package/dist/{Model3DScene-2JX5CUPK.js → Model3DScene-36UJZLCO.js} +2 -2
  9. package/dist/Model3DScene-36UJZLCO.js.br +0 -0
  10. package/dist/Model3DScene-36UJZLCO.js.gz +0 -0
  11. package/dist/{Model3DScene-NKYNKUPP.mjs → Model3DScene-NVFP3JBJ.mjs} +1 -1
  12. package/dist/Model3DScene-NVFP3JBJ.mjs.br +0 -0
  13. package/dist/Model3DScene-NVFP3JBJ.mjs.gz +0 -0
  14. package/dist/PowerPointViewer-Du7u4INi.d.ts.map +1 -1
  15. package/dist/{SurfaceChart3DScene-TTL2FTEG.mjs → SurfaceChart3DScene-BMFEDBLF.mjs} +1 -1
  16. package/dist/{SurfaceChart3DScene-TTL2FTEG.mjs.br → SurfaceChart3DScene-BMFEDBLF.mjs.br} +0 -0
  17. package/dist/SurfaceChart3DScene-BMFEDBLF.mjs.gz +0 -0
  18. package/dist/{SurfaceChart3DScene-AE5SKG7U.js → SurfaceChart3DScene-W6I255VU.js} +2 -2
  19. package/dist/SurfaceChart3DScene-W6I255VU.js.br +0 -0
  20. package/dist/SurfaceChart3DScene-W6I255VU.js.gz +0 -0
  21. package/dist/{chunk-LCWZ4TD4.js → chunk-77TMRPDU.js} +2144 -1527
  22. package/dist/chunk-77TMRPDU.js.br +0 -0
  23. package/dist/chunk-77TMRPDU.js.gz +0 -0
  24. package/dist/{chunk-247XH4EN.mjs → chunk-D5TAZ5NL.mjs} +1214 -53
  25. package/dist/chunk-D5TAZ5NL.mjs.br +0 -0
  26. package/dist/chunk-D5TAZ5NL.mjs.gz +0 -0
  27. package/dist/{chunk-EFZ4K6V5.mjs → chunk-J56KVWI5.mjs} +1132 -515
  28. package/dist/chunk-J56KVWI5.mjs.br +0 -0
  29. package/dist/chunk-J56KVWI5.mjs.gz +0 -0
  30. package/dist/{chunk-5YGTUHNO.mjs → chunk-J5V7UCD2.mjs} +15 -1403
  31. package/dist/chunk-J5V7UCD2.mjs.br +0 -0
  32. package/dist/chunk-J5V7UCD2.mjs.gz +0 -0
  33. package/dist/{chunk-VZI35LEF.js → chunk-JSJZWA43.js} +9 -3
  34. package/dist/chunk-JSJZWA43.js.br +0 -0
  35. package/dist/chunk-JSJZWA43.js.gz +0 -0
  36. package/dist/{chunk-Y6W5LGTR.mjs → chunk-KVNZGR3L.mjs} +14 -93
  37. package/dist/chunk-KVNZGR3L.mjs.br +0 -0
  38. package/dist/chunk-KVNZGR3L.mjs.gz +0 -0
  39. package/dist/{chunk-P65VL2I6.js → chunk-NFJLF7TX.js} +258 -1676
  40. package/dist/chunk-NFJLF7TX.js.br +0 -0
  41. package/dist/chunk-NFJLF7TX.js.gz +0 -0
  42. package/dist/{chunk-MZN2UIYT.mjs → chunk-QNKJUUKD.mjs} +7 -2
  43. package/dist/chunk-QNKJUUKD.mjs.br +0 -0
  44. package/dist/chunk-QNKJUUKD.mjs.gz +0 -0
  45. package/dist/{chunk-UNWU6D2M.js → chunk-S7HPAJRX.js} +350 -429
  46. package/dist/chunk-S7HPAJRX.js.br +0 -0
  47. package/dist/chunk-S7HPAJRX.js.gz +0 -0
  48. package/dist/{chunk-6QGTRYSC.js → chunk-USAJMMF2.js} +1248 -59
  49. package/dist/chunk-USAJMMF2.js.br +0 -0
  50. package/dist/chunk-USAJMMF2.js.gz +0 -0
  51. package/dist/index.d.ts +14 -0
  52. package/dist/index.js +39 -39
  53. package/dist/index.js.br +0 -0
  54. package/dist/index.js.gz +0 -0
  55. package/dist/index.mjs +5 -5
  56. package/dist/index.mjs.br +0 -0
  57. package/dist/index.mjs.gz +0 -0
  58. package/dist/internals.d.ts +37 -7
  59. package/dist/internals.d.ts.map +1 -1
  60. package/dist/internals.js +78 -78
  61. package/dist/internals.js.br +5 -4
  62. package/dist/internals.js.gz +0 -0
  63. package/dist/internals.mjs +3 -3
  64. package/dist/internals.mjs.br +0 -0
  65. package/dist/internals.mjs.gz +0 -0
  66. package/dist/pptx-viewer.css +1 -1
  67. package/dist/pptx-viewer.css.br +0 -0
  68. package/dist/pptx-viewer.css.gz +0 -0
  69. package/dist/{useViewerBuildingBlocks-CBZrHhxl.d.ts → useViewerBuildingBlocks-Xddn6SFj.d.ts} +15 -1
  70. package/dist/useViewerBuildingBlocks-Xddn6SFj.d.ts.map +1 -0
  71. package/dist/viewer/index.js +26 -26
  72. package/dist/viewer/index.js.br +0 -0
  73. package/dist/viewer/index.js.gz +0 -0
  74. package/dist/viewer/index.mjs +5 -5
  75. package/dist/viewer/index.mjs.br +0 -0
  76. package/dist/viewer/index.mjs.gz +0 -0
  77. package/package.json +1 -1
  78. package/dist/AiChatPanel-6B26AZGA.mjs.br +0 -0
  79. package/dist/AiChatPanel-6B26AZGA.mjs.gz +0 -0
  80. package/dist/AiChatPanel-FGEIZQCD.js.br +0 -0
  81. package/dist/AiChatPanel-FGEIZQCD.js.gz +0 -0
  82. package/dist/Model3DScene-2JX5CUPK.js.br +0 -0
  83. package/dist/Model3DScene-2JX5CUPK.js.gz +0 -0
  84. package/dist/Model3DScene-NKYNKUPP.mjs.br +0 -0
  85. package/dist/Model3DScene-NKYNKUPP.mjs.gz +0 -0
  86. package/dist/SurfaceChart3DScene-AE5SKG7U.js.br +0 -0
  87. package/dist/SurfaceChart3DScene-AE5SKG7U.js.gz +0 -0
  88. package/dist/SurfaceChart3DScene-TTL2FTEG.mjs.gz +0 -0
  89. package/dist/chunk-247XH4EN.mjs.br +0 -0
  90. package/dist/chunk-247XH4EN.mjs.gz +0 -0
  91. package/dist/chunk-5YGTUHNO.mjs.br +0 -0
  92. package/dist/chunk-5YGTUHNO.mjs.gz +0 -0
  93. package/dist/chunk-6QGTRYSC.js.br +0 -0
  94. package/dist/chunk-6QGTRYSC.js.gz +0 -0
  95. package/dist/chunk-EFZ4K6V5.mjs.br +0 -0
  96. package/dist/chunk-EFZ4K6V5.mjs.gz +0 -0
  97. package/dist/chunk-LCWZ4TD4.js.br +0 -0
  98. package/dist/chunk-LCWZ4TD4.js.gz +0 -0
  99. package/dist/chunk-MZN2UIYT.mjs.br +0 -0
  100. package/dist/chunk-MZN2UIYT.mjs.gz +0 -0
  101. package/dist/chunk-P65VL2I6.js.br +0 -0
  102. package/dist/chunk-P65VL2I6.js.gz +0 -0
  103. package/dist/chunk-UNWU6D2M.js.br +0 -0
  104. package/dist/chunk-UNWU6D2M.js.gz +0 -0
  105. package/dist/chunk-VZI35LEF.js.br +0 -0
  106. package/dist/chunk-VZI35LEF.js.gz +0 -0
  107. package/dist/chunk-Y6W5LGTR.mjs.br +0 -0
  108. package/dist/chunk-Y6W5LGTR.mjs.gz +0 -0
  109. package/dist/useViewerBuildingBlocks-CBZrHhxl.d.ts.map +0 -1
@@ -30542,6 +30542,52 @@ function getPresetShapeClipPath(presetName) {
30542
30542
  }
30543
30543
  return PRESET_SHAPE_CLIP_PATHS[presetName.toLowerCase()];
30544
30544
  }
30545
+ function getShapeType(shapeType) {
30546
+ if (!shapeType) {
30547
+ return "rect";
30548
+ }
30549
+ const normalized = shapeType.toLowerCase();
30550
+ if (normalized === "rect") {
30551
+ return "rect";
30552
+ }
30553
+ if (normalized === "roundrect") {
30554
+ return "roundRect";
30555
+ }
30556
+ if (normalized === "ellipse" || normalized === "oval") {
30557
+ return "ellipse";
30558
+ }
30559
+ if (normalized === "cylinder" || normalized === "can") {
30560
+ return "cylinder";
30561
+ }
30562
+ if (normalized === "triangle") {
30563
+ return "triangle";
30564
+ }
30565
+ if (normalized === "diamond") {
30566
+ return "diamond";
30567
+ }
30568
+ if (normalized === "line" || normalized === "lineinv") {
30569
+ return "line";
30570
+ }
30571
+ if (normalized === "rtarrow" || normalized === "rightarrow") {
30572
+ return "rtArrow";
30573
+ }
30574
+ if (normalized === "leftarrow") {
30575
+ return "leftArrow";
30576
+ }
30577
+ if (normalized === "uparrow") {
30578
+ return "upArrow";
30579
+ }
30580
+ if (normalized === "downarrow") {
30581
+ return "downArrow";
30582
+ }
30583
+ if (normalized.includes("connector")) {
30584
+ return "connector";
30585
+ }
30586
+ if (PRESET_SHAPE_CLIP_PATHS[normalized] !== void 0) {
30587
+ return "rect";
30588
+ }
30589
+ return "rect";
30590
+ }
30545
30591
  function getShapeClipPath(shapeType) {
30546
30592
  return getPresetShapeClipPath(shapeType);
30547
30593
  }
@@ -100715,6 +100761,29 @@ function apply3dEffects(base, scene3d, shape3d, fillColorFallback) {
100715
100761
  base.backgroundImage = base.backgroundImage ? `${lightRig.backgroundImage}, ${base.backgroundImage}` : lightRig.backgroundImage;
100716
100762
  }
100717
100763
  }
100764
+ function edgesFromSection(borders, regionTop, regionBottom, regionLeft, regionRight) {
100765
+ if (!borders) {
100766
+ return void 0;
100767
+ }
100768
+ return {
100769
+ top: regionTop ? borders.top ?? borders.insideH : borders.insideH,
100770
+ bottom: regionBottom ? borders.bottom ?? borders.insideH : borders.insideH,
100771
+ left: regionLeft ? borders.left ?? borders.insideV : borders.insideV,
100772
+ right: regionRight ? borders.right ?? borders.insideV : borders.insideV
100773
+ };
100774
+ }
100775
+ function borderToCss(border, resolve2) {
100776
+ if (!border) {
100777
+ return void 0;
100778
+ }
100779
+ if (border.noFill) {
100780
+ return "none";
100781
+ }
100782
+ const width = border.width ?? 1;
100783
+ const dash = ooxmlDashToCssBorderStyle(border.dash);
100784
+ const color2 = border.color ?? resolve2(border.fill) ?? "#000000";
100785
+ return `${width}px ${dash} ${color2}`;
100786
+ }
100718
100787
  function collectSections(entry2, tableData, pos2) {
100719
100788
  const { rowIndex, cellIndex, rowCount, columnCount } = pos2;
100720
100789
  const isTop = rowIndex === 0;
@@ -100766,6 +100835,51 @@ function collectSections(entry2, tableData, pos2) {
100766
100835
  }
100767
100836
  return sections2;
100768
100837
  }
100838
+ function collectLayers(entry2, tableData, pos2) {
100839
+ const layers = [];
100840
+ for (const section of collectSections(entry2, tableData, pos2)) {
100841
+ layers.push(
100842
+ edgesFromSection(
100843
+ section.borders,
100844
+ section.regionTop,
100845
+ section.regionBottom,
100846
+ section.regionLeft,
100847
+ section.regionRight
100848
+ )
100849
+ );
100850
+ }
100851
+ return layers.filter((layer) => layer !== void 0);
100852
+ }
100853
+ function resolveCellBorderCss(entry2, tableData, pos2, resolve2) {
100854
+ if (!entry2) {
100855
+ return void 0;
100856
+ }
100857
+ const layers = collectLayers(entry2, tableData, pos2);
100858
+ if (layers.length === 0) {
100859
+ return void 0;
100860
+ }
100861
+ const pick = (edge) => {
100862
+ let winner;
100863
+ for (const layer of layers) {
100864
+ if (layer[edge]) {
100865
+ winner = layer[edge];
100866
+ }
100867
+ }
100868
+ return winner;
100869
+ };
100870
+ const css = {};
100871
+ let applied = false;
100872
+ const edges = ["top", "bottom", "left", "right"];
100873
+ for (const edge of edges) {
100874
+ const value = borderToCss(pick(edge), resolve2);
100875
+ if (value) {
100876
+ const key = `border${edge[0].toUpperCase()}${edge.slice(1)}`;
100877
+ css[key] = value;
100878
+ applied = true;
100879
+ }
100880
+ }
100881
+ return applied ? css : void 0;
100882
+ }
100769
100883
  function resolveStyleDiagonalBorders(entry2, tableData, pos2, resolve2) {
100770
100884
  if (!entry2) {
100771
100885
  return void 0;
@@ -100848,6 +100962,66 @@ function resolveStyleFillColor(fill, colorScheme) {
100848
100962
  }
100849
100963
  return applyTintShade(base, fill);
100850
100964
  }
100965
+ function clearBackground(css) {
100966
+ delete css.background;
100967
+ delete css.backgroundColor;
100968
+ delete css.backgroundImage;
100969
+ }
100970
+ function gradientCssFromFill(fill, colorScheme) {
100971
+ const gradient = fill.gradient;
100972
+ if (!gradient || gradient.stops.length === 0) {
100973
+ return void 0;
100974
+ }
100975
+ const shapeLike = {
100976
+ fillMode: "gradient",
100977
+ fillGradientType: gradient.type,
100978
+ fillGradientAngle: gradient.angle ?? 90,
100979
+ fillGradientStops: gradient.stops.map((stop) => ({
100980
+ color: resolveStyleFillColor(stop.fill, colorScheme) ?? stop.fill.color ?? "#000000",
100981
+ position: stop.position
100982
+ }))
100983
+ };
100984
+ return buildGradientCss(shapeLike);
100985
+ }
100986
+ function applyStyleFill(fill, colorScheme, css, fallback) {
100987
+ if (fill?.noFill) {
100988
+ clearBackground(css);
100989
+ css.backgroundColor = "transparent";
100990
+ return true;
100991
+ }
100992
+ if (fill?.gradient) {
100993
+ const gradientCss = gradientCssFromFill(fill, colorScheme);
100994
+ if (gradientCss) {
100995
+ clearBackground(css);
100996
+ css.background = gradientCss;
100997
+ return true;
100998
+ }
100999
+ }
101000
+ if (fill?.pattern) {
101001
+ const fg = normalizeHexColor(
101002
+ resolveStyleFillColor(fill.pattern.foreground, colorScheme),
101003
+ "#000000"
101004
+ );
101005
+ const bg = normalizeHexColor(
101006
+ resolveStyleFillColor(fill.pattern.background, colorScheme),
101007
+ "#ffffff"
101008
+ );
101009
+ const svg = getPatternSvg(fill.pattern.preset, fg, bg);
101010
+ clearBackground(css);
101011
+ if (svg) {
101012
+ css.backgroundImage = `url("data:image/svg+xml,${encodeURIComponent(svg)}")`;
101013
+ }
101014
+ css.backgroundColor = bg;
101015
+ return true;
101016
+ }
101017
+ const color2 = resolveStyleFillColor(fill, colorScheme) ?? fallback;
101018
+ if (color2) {
101019
+ clearBackground(css);
101020
+ css.backgroundColor = color2;
101021
+ return true;
101022
+ }
101023
+ return false;
101024
+ }
100851
101025
  function resolveFontRefIdx(idx, fontScheme) {
100852
101026
  if (!idx || !fontScheme) {
100853
101027
  return void 0;
@@ -100860,6 +101034,52 @@ function resolveFontRefIdx(idx, fontScheme) {
100860
101034
  }
100861
101035
  return void 0;
100862
101036
  }
101037
+ function applyStyleText(text2, colorScheme, css, fontScheme) {
101038
+ if (!text2) {
101039
+ return false;
101040
+ }
101041
+ let applied = false;
101042
+ if (text2.bold) {
101043
+ css.fontWeight = 700;
101044
+ applied = true;
101045
+ }
101046
+ if (text2.italic) {
101047
+ css.fontStyle = "italic";
101048
+ applied = true;
101049
+ }
101050
+ if (text2.underline) {
101051
+ css.textDecorationLine = "underline";
101052
+ applied = true;
101053
+ }
101054
+ if (text2.fontFace) {
101055
+ css.fontFamily = text2.fontFace;
101056
+ applied = true;
101057
+ } else {
101058
+ const refFont = resolveFontRefIdx(text2.fontRefIdx, fontScheme);
101059
+ if (refFont) {
101060
+ css.fontFamily = refFont;
101061
+ applied = true;
101062
+ }
101063
+ }
101064
+ if (text2.fontSchemeColor && colorScheme) {
101065
+ const base = colorScheme[text2.fontSchemeColor];
101066
+ if (base) {
101067
+ let color2 = base;
101068
+ if (text2.fontTint !== void 0 && text2.fontTint > 0) {
101069
+ color2 = tintColor(color2, text2.fontTint / 1e5);
101070
+ }
101071
+ if (text2.fontShade !== void 0 && text2.fontShade > 0) {
101072
+ color2 = shadeColor(color2, 1 - text2.fontShade / 1e5);
101073
+ }
101074
+ css.color = color2;
101075
+ applied = true;
101076
+ }
101077
+ } else if (text2.fontColor) {
101078
+ css.color = text2.fontColor;
101079
+ applied = true;
101080
+ }
101081
+ return applied;
101082
+ }
100863
101083
  var BEVEL_LIGHT_OFFSETS = {
100864
101084
  tl: { x: 1, y: 1 },
100865
101085
  t: { x: 0, y: 1 },
@@ -100878,6 +101098,23 @@ function cell3DBevelCss(cell3D) {
100878
101098
  const shadow = `inset ${-off.x * size}px ${-off.y * size}px ${size}px rgba(0,0,0,0.4)`;
100879
101099
  return { boxShadow: `${highlight}, ${shadow}` };
100880
101100
  }
101101
+ function cellPatternFillCss(style) {
101102
+ if (style.fillMode !== "pattern" || !style.patternFillPreset) {
101103
+ return null;
101104
+ }
101105
+ const fg = normalizeHexColor(style.patternFillForeground, "#000000");
101106
+ const bg = normalizeHexColor(style.patternFillBackground, "#ffffff");
101107
+ const svgMarkup = getPatternSvg(style.patternFillPreset, fg, bg);
101108
+ if (svgMarkup) {
101109
+ const encoded = encodeURIComponent(svgMarkup);
101110
+ return {
101111
+ backgroundImage: `url("data:image/svg+xml,${encoded}")`,
101112
+ backgroundColor: bg
101113
+ };
101114
+ }
101115
+ const fallback = style.patternFillBackground ?? style.backgroundColor;
101116
+ return fallback ? { backgroundColor: fallback } : null;
101117
+ }
100881
101118
  function resolveTableStyleEntry(tableStyleId, tableStyleMap) {
100882
101119
  if (!tableStyleId || !tableStyleMap) {
100883
101120
  return void 0;
@@ -100911,6 +101148,146 @@ function ooxmlDashToCssBorderStyle(dashVal) {
100911
101148
  return "solid";
100912
101149
  }
100913
101150
  }
101151
+ function cellStyleToCss(style) {
101152
+ if (!style) {
101153
+ return {};
101154
+ }
101155
+ const css = {};
101156
+ if (style.fontSize) {
101157
+ css.fontSize = `${style.fontSize}px`;
101158
+ }
101159
+ if (style.bold) {
101160
+ css.fontWeight = "bold";
101161
+ }
101162
+ if (style.italic) {
101163
+ css.fontStyle = "italic";
101164
+ }
101165
+ if (style.underline) {
101166
+ css.textDecorationLine = "underline";
101167
+ }
101168
+ if (style.color) {
101169
+ css.color = style.color;
101170
+ }
101171
+ if (style.gradientFillCss) {
101172
+ css.background = style.gradientFillCss;
101173
+ } else if (style.fillMode === "pattern") {
101174
+ const patternResult = cellPatternFillCss(style);
101175
+ if (patternResult) {
101176
+ if (patternResult.backgroundImage) {
101177
+ css.backgroundImage = patternResult.backgroundImage;
101178
+ }
101179
+ if (patternResult.backgroundColor) {
101180
+ css.backgroundColor = patternResult.backgroundColor;
101181
+ }
101182
+ } else {
101183
+ const fallback = style.patternFillBackground ?? style.backgroundColor;
101184
+ if (fallback) {
101185
+ css.backgroundColor = fallback;
101186
+ }
101187
+ }
101188
+ } else if (style.backgroundColor) {
101189
+ css.backgroundColor = style.backgroundColor;
101190
+ }
101191
+ if (style.align) {
101192
+ css.textAlign = style.align;
101193
+ } else if (style.anchorCtr) {
101194
+ css.textAlign = "center";
101195
+ }
101196
+ if (style.vAlign) {
101197
+ css.verticalAlign = style.vAlign;
101198
+ }
101199
+ if (style.horzOverflow === "clip") {
101200
+ css.overflowX = "hidden";
101201
+ } else if (style.horzOverflow === "overflow") {
101202
+ css.overflowX = "visible";
101203
+ }
101204
+ if (style.textDirection) {
101205
+ switch (style.textDirection) {
101206
+ case "vert":
101207
+ case "eaVert":
101208
+ case "wordArtVert":
101209
+ case "wordArtVertRtl":
101210
+ css.writingMode = "vertical-rl";
101211
+ break;
101212
+ case "vert270":
101213
+ case "mongolianVert":
101214
+ css.writingMode = "vertical-lr";
101215
+ break;
101216
+ }
101217
+ if (style.textDirection === "wordArtVert") {
101218
+ css.textOrientation = "upright";
101219
+ } else if (css.writingMode) {
101220
+ css.textOrientation = "mixed";
101221
+ }
101222
+ if (style.textDirection === "wordArtVertRtl") {
101223
+ css.direction = "rtl";
101224
+ }
101225
+ }
101226
+ const borderEdges = [
101227
+ {
101228
+ prefix: "borderTop",
101229
+ width: style.borderTopWidth,
101230
+ color: style.borderTopColor,
101231
+ dash: style.borderTopDash
101232
+ },
101233
+ {
101234
+ prefix: "borderBottom",
101235
+ width: style.borderBottomWidth,
101236
+ color: style.borderBottomColor,
101237
+ dash: style.borderBottomDash
101238
+ },
101239
+ {
101240
+ prefix: "borderLeft",
101241
+ width: style.borderLeftWidth,
101242
+ color: style.borderLeftColor,
101243
+ dash: style.borderLeftDash
101244
+ },
101245
+ {
101246
+ prefix: "borderRight",
101247
+ width: style.borderRightWidth,
101248
+ color: style.borderRightColor,
101249
+ dash: style.borderRightDash
101250
+ }
101251
+ ];
101252
+ for (const edge of borderEdges) {
101253
+ if (edge.width || edge.color) {
101254
+ const w = edge.width ?? 1;
101255
+ const c = edge.color ?? style.borderColor ?? "#000000";
101256
+ const s = ooxmlDashToCssBorderStyle(edge.dash);
101257
+ css[edge.prefix] = `${w}px ${s} ${c}`;
101258
+ }
101259
+ }
101260
+ if (style.marginLeft) {
101261
+ css.paddingLeft = `${style.marginLeft}px`;
101262
+ }
101263
+ if (style.marginRight) {
101264
+ css.paddingRight = `${style.marginRight}px`;
101265
+ }
101266
+ if (style.marginTop) {
101267
+ css.paddingTop = `${style.marginTop}px`;
101268
+ }
101269
+ if (style.marginBottom) {
101270
+ css.paddingBottom = `${style.marginBottom}px`;
101271
+ }
101272
+ const textShadowParts = [];
101273
+ if (style.textShadowColor) {
101274
+ const offX = style.textShadowOffsetX ?? 1;
101275
+ const offY = style.textShadowOffsetY ?? 1;
101276
+ const blur = style.textShadowBlur ?? 0;
101277
+ textShadowParts.push(`${offX}px ${offY}px ${blur}px ${style.textShadowColor}`);
101278
+ }
101279
+ if (style.textGlowColor) {
101280
+ const radius = style.textGlowRadius ?? 2;
101281
+ textShadowParts.push(`0px 0px ${radius}px ${style.textGlowColor}`);
101282
+ }
101283
+ if (textShadowParts.length > 0) {
101284
+ css.textShadow = textShadowParts.join(", ");
101285
+ }
101286
+ if (style.cell3D) {
101287
+ Object.assign(css, cell3DBevelCss(style.cell3D));
101288
+ }
101289
+ return css;
101290
+ }
100914
101291
  function getDiagonalBorders(style, styleDiagonals) {
100915
101292
  const cellHasDown = Boolean(style?.borderDiagDownColor && style?.borderDiagDownWidth);
100916
101293
  const cellHasUp = Boolean(style?.borderDiagUpColor && style?.borderDiagUpWidth);
@@ -100949,6 +101326,138 @@ function getCellDiagonalBorders(style, tableData, pos2, styleCtx) {
100949
101326
  }
100950
101327
  return getDiagonalBorders(style, styleDiagonals);
100951
101328
  }
101329
+ function getTableCellBandStyle(tableData, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
101330
+ if (!tableData) {
101331
+ return void 0;
101332
+ }
101333
+ const styleEntry = resolveTableStyleEntry(tableData.tableStyleId, styleCtx?.tableStyleMap);
101334
+ const colorScheme = styleCtx?.colorScheme;
101335
+ const fontScheme = styleCtx?.fontScheme;
101336
+ const resolveFill = (fill, fallback) => resolveStyleFillColor(fill, colorScheme) ?? fallback;
101337
+ const style = {};
101338
+ let applied = false;
101339
+ if (styleEntry?.wholeTblFill) {
101340
+ if (applyStyleFill(styleEntry.wholeTblFill, colorScheme, style, "")) {
101341
+ applied = true;
101342
+ }
101343
+ }
101344
+ if (applyStyleText(styleEntry?.wholeTblText, colorScheme, style, fontScheme)) {
101345
+ applied = true;
101346
+ }
101347
+ const bandStartRow = tableData.firstRowHeader ? 1 : 0;
101348
+ const bandEndRow = tableData.lastRow ? rowCount - 1 : rowCount;
101349
+ if (tableData.bandedRows && rowIndex >= bandStartRow && rowIndex < bandEndRow) {
101350
+ const bandIndex = rowIndex - bandStartRow;
101351
+ const rowCycle = Math.max(tableData.bandRowCycle ?? 1, 1);
101352
+ const bandGroup = Math.floor(bandIndex / rowCycle) % 2;
101353
+ if (bandGroup === 0) {
101354
+ applyStyleFill(styleEntry?.band1HFill, colorScheme, style, "rgba(217, 226, 243, 0.5)");
101355
+ applyStyleText(styleEntry?.band1HText, colorScheme, style, fontScheme);
101356
+ applied = true;
101357
+ } else if (styleEntry?.band2HFill) {
101358
+ if (applyStyleFill(styleEntry.band2HFill, colorScheme, style, "")) {
101359
+ applyStyleText(styleEntry.band2HText, colorScheme, style, fontScheme);
101360
+ applied = true;
101361
+ }
101362
+ }
101363
+ }
101364
+ if (tableData.bandedColumns) {
101365
+ const isFirstCol = tableData.firstCol;
101366
+ const isLastCol = tableData.lastCol;
101367
+ const colBandIndex = isFirstCol && cellIndex > 0 ? cellIndex - 1 : cellIndex;
101368
+ const skipCol = isFirstCol && cellIndex === 0 || isLastCol && cellIndex === columnCount - 1;
101369
+ if (!skipCol) {
101370
+ const colCycle = Math.max(tableData.bandColCycle ?? 1, 1);
101371
+ const colBandGroup = Math.floor(colBandIndex / colCycle) % 2;
101372
+ const canOverride = !style.backgroundColor || !tableData.bandedRows;
101373
+ if (colBandGroup === 0) {
101374
+ if (canOverride) {
101375
+ applyStyleFill(styleEntry?.band1VFill, colorScheme, style, "rgba(217, 226, 243, 0.35)");
101376
+ applyStyleText(styleEntry?.band1VText, colorScheme, style, fontScheme);
101377
+ applied = true;
101378
+ }
101379
+ } else if (styleEntry?.band2VFill && canOverride) {
101380
+ if (applyStyleFill(styleEntry.band2VFill, colorScheme, style, "")) {
101381
+ applyStyleText(styleEntry.band2VText, colorScheme, style, fontScheme);
101382
+ applied = true;
101383
+ }
101384
+ }
101385
+ }
101386
+ }
101387
+ if (tableData.firstRowHeader && rowIndex === 0) {
101388
+ style.fontWeight = 700;
101389
+ applyStyleFill(styleEntry?.firstRowFill, colorScheme, style, "rgba(68, 114, 196, 0.85)");
101390
+ if (!styleEntry?.firstRowFill?.noFill) {
101391
+ style.color = "#ffffff";
101392
+ }
101393
+ applyStyleText(styleEntry?.firstRowText, colorScheme, style, fontScheme);
101394
+ applied = true;
101395
+ }
101396
+ if (tableData.lastRow && rowIndex === rowCount - 1) {
101397
+ style.fontWeight = 700;
101398
+ if (styleEntry?.lastRowFill) {
101399
+ applyStyleFill(styleEntry.lastRowFill, colorScheme, style, "");
101400
+ }
101401
+ const borderColor = resolveFill(styleEntry?.firstRowFill, "rgba(68, 114, 196, 0.7)");
101402
+ style.borderTop = `2px solid ${borderColor}`;
101403
+ applyStyleText(styleEntry?.lastRowText, colorScheme, style, fontScheme);
101404
+ applied = true;
101405
+ }
101406
+ if (tableData.firstCol && cellIndex === 0) {
101407
+ style.fontWeight = 700;
101408
+ if (styleEntry?.firstColFill) {
101409
+ applyStyleFill(styleEntry.firstColFill, colorScheme, style, "");
101410
+ }
101411
+ applyStyleText(styleEntry?.firstColText, colorScheme, style, fontScheme);
101412
+ applied = true;
101413
+ }
101414
+ if (tableData.lastCol && cellIndex === columnCount - 1) {
101415
+ style.fontWeight = 700;
101416
+ if (styleEntry?.lastColFill) {
101417
+ applyStyleFill(styleEntry.lastColFill, colorScheme, style, "");
101418
+ }
101419
+ applyStyleText(styleEntry?.lastColText, colorScheme, style, fontScheme);
101420
+ applied = true;
101421
+ }
101422
+ if (styleEntry) {
101423
+ const atTop = Boolean(tableData.firstRowHeader) && rowIndex === 0;
101424
+ const atBottom = Boolean(tableData.lastRow) && rowIndex === rowCount - 1;
101425
+ const atLeft = Boolean(tableData.firstCol) && cellIndex === 0;
101426
+ const atRight = Boolean(tableData.lastCol) && cellIndex === columnCount - 1;
101427
+ let cornerFill;
101428
+ let cornerText = void 0;
101429
+ if (atTop && atLeft) {
101430
+ cornerFill = styleEntry.nwCellFill;
101431
+ cornerText = styleEntry.nwCellText;
101432
+ } else if (atTop && atRight) {
101433
+ cornerFill = styleEntry.neCellFill;
101434
+ cornerText = styleEntry.neCellText;
101435
+ } else if (atBottom && atLeft) {
101436
+ cornerFill = styleEntry.swCellFill;
101437
+ cornerText = styleEntry.swCellText;
101438
+ } else if (atBottom && atRight) {
101439
+ cornerFill = styleEntry.seCellFill;
101440
+ cornerText = styleEntry.seCellText;
101441
+ }
101442
+ if (cornerFill && applyStyleFill(cornerFill, colorScheme, style, "")) {
101443
+ applied = true;
101444
+ }
101445
+ if (applyStyleText(cornerText, colorScheme, style, fontScheme)) {
101446
+ applied = true;
101447
+ }
101448
+ }
101449
+ const borderCss = resolveCellBorderCss(
101450
+ styleEntry,
101451
+ tableData,
101452
+ { rowIndex, cellIndex, rowCount, columnCount },
101453
+ (fill) => resolveStyleFillColor(fill, colorScheme)
101454
+ );
101455
+ if (borderCss) {
101456
+ Object.assign(style, borderCss);
101457
+ applied = true;
101458
+ }
101459
+ return applied ? style : void 0;
101460
+ }
100952
101461
  function computeBoundingRect(cells) {
100953
101462
  if (cells.length === 0) {
100954
101463
  return void 0;
@@ -106933,6 +107442,167 @@ function resolvePictureBullet(info, baseFontSize) {
106933
107442
  ...info.imageRelId ? { imageRelId: info.imageRelId } : {}
106934
107443
  };
106935
107444
  }
107445
+ var DEBOUNCE_MS = 600;
107446
+ var EXPANDED_MAX_HEIGHT = 200;
107447
+ var PX_TO_PT = 0.75;
107448
+ var MAX_INDENT_LEVEL = 4;
107449
+ var INDENT_PX = 24;
107450
+ function escapeHtml2(value) {
107451
+ return value.replace(/&/gu, "&amp;").replace(/</gu, "&lt;").replace(/>/gu, "&gt;").replace(/"/gu, "&quot;").replace(/'/gu, "&#39;");
107452
+ }
107453
+ function createPlainNotesSegments(text2) {
107454
+ const lines = text2.split("\n");
107455
+ const segments = [];
107456
+ lines.forEach((line22, index) => {
107457
+ segments.push({ text: line22, style: {} });
107458
+ if (index < lines.length - 1) {
107459
+ segments.push({ text: "", style: {}, isParagraphBreak: true });
107460
+ }
107461
+ });
107462
+ if (segments.length === 0) {
107463
+ segments.push({ text: "", style: {} });
107464
+ }
107465
+ return segments;
107466
+ }
107467
+ function segmentsToPlainText(segments) {
107468
+ return segments.map((segment) => segment.isParagraphBreak ? "\n" : segment.text).join("");
107469
+ }
107470
+ function normalizeSegments(segments) {
107471
+ const cleaned = segments.filter((segment) => segment.isParagraphBreak || segment.text.length > 0);
107472
+ while (cleaned.length > 0 && cleaned[cleaned.length - 1].isParagraphBreak) {
107473
+ cleaned.pop();
107474
+ }
107475
+ return cleaned.length > 0 ? cleaned : [{ text: "", style: {} }];
107476
+ }
107477
+ function parsePt(value) {
107478
+ if (!value) {
107479
+ return void 0;
107480
+ }
107481
+ const numeric = Number.parseFloat(value);
107482
+ if (Number.isNaN(numeric) || !Number.isFinite(numeric)) {
107483
+ return void 0;
107484
+ }
107485
+ if (value.endsWith("px")) {
107486
+ return numeric * PX_TO_PT;
107487
+ }
107488
+ return numeric;
107489
+ }
107490
+ function buildParagraph(segments) {
107491
+ const first = segments[0];
107492
+ let bulletType = "none";
107493
+ let indentLevel = 0;
107494
+ if (first?.bulletInfo) {
107495
+ if (first.bulletInfo.char) {
107496
+ bulletType = "bullet";
107497
+ } else if (first.bulletInfo.autoNumType) {
107498
+ bulletType = "numbered";
107499
+ }
107500
+ }
107501
+ if (first?.style.paragraphMarginLeft) {
107502
+ indentLevel = Math.min(
107503
+ MAX_INDENT_LEVEL,
107504
+ Math.max(0, Math.round(first.style.paragraphMarginLeft / INDENT_PX))
107505
+ );
107506
+ }
107507
+ return {
107508
+ segments: segments.length > 0 ? segments : [{ text: "", style: {} }],
107509
+ bulletType,
107510
+ indentLevel
107511
+ };
107512
+ }
107513
+ function segmentsToParagraphs(segments) {
107514
+ const normalized = normalizeSegments(segments);
107515
+ const paragraphs = [];
107516
+ let current = [];
107517
+ for (const seg of normalized) {
107518
+ if (seg.isParagraphBreak) {
107519
+ paragraphs.push(buildParagraph(current));
107520
+ current = [];
107521
+ } else {
107522
+ current.push(seg);
107523
+ }
107524
+ }
107525
+ if (current.length > 0) {
107526
+ paragraphs.push(buildParagraph(current));
107527
+ }
107528
+ if (paragraphs.length === 0) {
107529
+ paragraphs.push({
107530
+ segments: [{ text: "", style: {} }],
107531
+ bulletType: "none",
107532
+ indentLevel: 0
107533
+ });
107534
+ }
107535
+ return paragraphs;
107536
+ }
107537
+ function paragraphsToSegments(paragraphs) {
107538
+ const result = [];
107539
+ let numberedCounter = 0;
107540
+ paragraphs.forEach((para, pIdx) => {
107541
+ if (para.bulletType === "numbered") {
107542
+ numberedCounter++;
107543
+ } else {
107544
+ numberedCounter = 0;
107545
+ }
107546
+ para.segments.forEach((seg, sIdx) => {
107547
+ const updated = { ...seg, style: { ...seg.style } };
107548
+ if (para.indentLevel > 0) {
107549
+ updated.style.paragraphMarginLeft = para.indentLevel * INDENT_PX;
107550
+ } else {
107551
+ delete updated.style.paragraphMarginLeft;
107552
+ }
107553
+ if (sIdx === 0) {
107554
+ if (para.bulletType === "bullet") {
107555
+ updated.bulletInfo = { char: "\u2022" };
107556
+ } else if (para.bulletType === "numbered") {
107557
+ updated.bulletInfo = {
107558
+ autoNumType: "arabicPeriod",
107559
+ paragraphIndex: numberedCounter - 1
107560
+ };
107561
+ } else {
107562
+ delete updated.bulletInfo;
107563
+ }
107564
+ }
107565
+ result.push(updated);
107566
+ });
107567
+ if (pIdx < paragraphs.length - 1) {
107568
+ result.push({ text: "", style: {}, isParagraphBreak: true });
107569
+ }
107570
+ });
107571
+ return result;
107572
+ }
107573
+ function getCurrentParagraphIndex(editorEl, segments) {
107574
+ const sel = window.getSelection();
107575
+ if (!sel || sel.rangeCount === 0) {
107576
+ return 0;
107577
+ }
107578
+ const range = sel.getRangeAt(0);
107579
+ let charOffset = 0;
107580
+ const walker = document.createTreeWalker(editorEl, NodeFilter.SHOW_TEXT);
107581
+ let node = walker.nextNode();
107582
+ while (node) {
107583
+ if (range.startContainer === node) {
107584
+ charOffset += range.startOffset;
107585
+ break;
107586
+ }
107587
+ charOffset += (node.textContent ?? "").length;
107588
+ node = walker.nextNode();
107589
+ }
107590
+ let paraIdx = 0;
107591
+ let pos2 = 0;
107592
+ for (const seg of segments) {
107593
+ if (seg.isParagraphBreak) {
107594
+ paraIdx++;
107595
+ pos2++;
107596
+ continue;
107597
+ }
107598
+ const segLen = seg.text.length;
107599
+ if (pos2 + segLen > charOffset) {
107600
+ return paraIdx;
107601
+ }
107602
+ pos2 += segLen;
107603
+ }
107604
+ return paraIdx;
107605
+ }
106936
107606
  var BLOCKED_PROTOCOLS = /* @__PURE__ */ new Set([
106937
107607
  `${"javascript"}:`,
106938
107608
  "data:",
@@ -106999,6 +107669,186 @@ function parsePpactionUrl(url) {
106999
107669
  }
107000
107670
  return { action: url, targetSlideIndex };
107001
107671
  }
107672
+ var CSS_VALUE_SAFE = /^[a-zA-Z0-9 _,.\-+#'%/]{1,100}$/u;
107673
+ function isCssValueSafe(value) {
107674
+ if (value === void 0 || value === null) {
107675
+ return false;
107676
+ }
107677
+ const str = String(value);
107678
+ return str.length > 0 && CSS_VALUE_SAFE.test(str);
107679
+ }
107680
+ function deriveStyleFromElement(element, inheritedStyle) {
107681
+ const style = { ...inheritedStyle };
107682
+ const tagName = element.tagName.toLowerCase();
107683
+ if (tagName === "b" || tagName === "strong") {
107684
+ style.bold = true;
107685
+ }
107686
+ if (tagName === "i" || tagName === "em") {
107687
+ style.italic = true;
107688
+ }
107689
+ if (tagName === "u") {
107690
+ style.underline = true;
107691
+ }
107692
+ if (tagName === "s" || tagName === "strike") {
107693
+ style.strikethrough = true;
107694
+ }
107695
+ if (tagName === "a") {
107696
+ const href = element.getAttribute("href");
107697
+ if (href) {
107698
+ style.hyperlink = href;
107699
+ }
107700
+ style.underline = true;
107701
+ style.color = "#4a9eff";
107702
+ }
107703
+ const inlineStyle = element.style;
107704
+ if (inlineStyle.fontWeight === "bold" || Number(inlineStyle.fontWeight) >= 600) {
107705
+ style.bold = true;
107706
+ }
107707
+ if (inlineStyle.fontStyle === "italic") {
107708
+ style.italic = true;
107709
+ }
107710
+ if (inlineStyle.textDecoration.includes("underline") || inlineStyle.textDecorationLine.includes("underline")) {
107711
+ style.underline = true;
107712
+ }
107713
+ if (inlineStyle.textDecoration.includes("line-through") || inlineStyle.textDecorationLine.includes("line-through")) {
107714
+ style.strikethrough = true;
107715
+ }
107716
+ if (inlineStyle.color) {
107717
+ style.color = inlineStyle.color;
107718
+ }
107719
+ const fontSizePt = parsePt(inlineStyle.fontSize);
107720
+ if (fontSizePt !== void 0) {
107721
+ style.fontSize = fontSizePt;
107722
+ }
107723
+ if (inlineStyle.fontFamily) {
107724
+ style.fontFamily = inlineStyle.fontFamily;
107725
+ }
107726
+ return style;
107727
+ }
107728
+ function parseSegmentsFromRichEditor(root) {
107729
+ const segments = [];
107730
+ const walk2 = (node, inheritedStyle) => {
107731
+ if (node.nodeType === Node.TEXT_NODE) {
107732
+ const value = node.textContent ?? "";
107733
+ if (value.length > 0) {
107734
+ segments.push({ text: value, style: { ...inheritedStyle } });
107735
+ }
107736
+ return;
107737
+ }
107738
+ if (!(node instanceof HTMLElement)) {
107739
+ return;
107740
+ }
107741
+ if (node.tagName.toLowerCase() === "br") {
107742
+ segments.push({ text: "", style: {}, isParagraphBreak: true });
107743
+ return;
107744
+ }
107745
+ const nextStyle = deriveStyleFromElement(node, inheritedStyle);
107746
+ const tag = node.tagName.toLowerCase();
107747
+ const isBlock = ["div", "p", "li"].includes(tag);
107748
+ let bulletInfo;
107749
+ let paraIndent = 0;
107750
+ if (isBlock && node.dataset.bulletType) {
107751
+ const bt = node.dataset.bulletType;
107752
+ if (bt === "bullet") {
107753
+ bulletInfo = { char: "\u2022" };
107754
+ } else if (bt === "numbered") {
107755
+ bulletInfo = { autoNumType: "arabicPeriod" };
107756
+ }
107757
+ }
107758
+ if (isBlock && node.dataset.indentLevel) {
107759
+ paraIndent = Number.parseInt(node.dataset.indentLevel, 10) || 0;
107760
+ }
107761
+ const segStartIdx = segments.length;
107762
+ node.childNodes.forEach((child22) => walk2(child22, nextStyle));
107763
+ if (isBlock && (bulletInfo || paraIndent > 0)) {
107764
+ for (let i = segStartIdx; i < segments.length; i++) {
107765
+ if (!segments[i].isParagraphBreak) {
107766
+ if (bulletInfo) {
107767
+ segments[i].bulletInfo = bulletInfo;
107768
+ }
107769
+ if (paraIndent > 0) {
107770
+ segments[i].style = {
107771
+ ...segments[i].style,
107772
+ paragraphMarginLeft: paraIndent * INDENT_PX
107773
+ };
107774
+ }
107775
+ break;
107776
+ }
107777
+ }
107778
+ }
107779
+ if (isBlock) {
107780
+ segments.push({ text: "", style: {}, isParagraphBreak: true });
107781
+ }
107782
+ };
107783
+ root.childNodes.forEach((child22) => walk2(child22, {}));
107784
+ return normalizeSegments(segments);
107785
+ }
107786
+ function segmentsToEditorHtml(segments) {
107787
+ const paragraphs = segmentsToParagraphs(segments);
107788
+ let numberedCounter = 0;
107789
+ return paragraphs.map((para) => {
107790
+ if (para.bulletType === "numbered") {
107791
+ numberedCounter++;
107792
+ } else {
107793
+ numberedCounter = 0;
107794
+ }
107795
+ const runsHtml = para.segments.map((segment) => {
107796
+ if (segment.isParagraphBreak) {
107797
+ return "";
107798
+ }
107799
+ const inlineStyles = [];
107800
+ if (segment.style.bold) {
107801
+ inlineStyles.push("font-weight:700");
107802
+ }
107803
+ if (segment.style.italic) {
107804
+ inlineStyles.push("font-style:italic");
107805
+ }
107806
+ if (segment.style.underline) {
107807
+ inlineStyles.push("text-decoration:underline");
107808
+ }
107809
+ if (segment.style.strikethrough) {
107810
+ inlineStyles.push("text-decoration:line-through");
107811
+ }
107812
+ if (segment.style.color && isCssValueSafe(segment.style.color)) {
107813
+ inlineStyles.push(`color:${segment.style.color}`);
107814
+ }
107815
+ if (segment.style.fontSize && Number.isFinite(Number(segment.style.fontSize))) {
107816
+ inlineStyles.push(`font-size:${Number(segment.style.fontSize)}pt`);
107817
+ }
107818
+ if (segment.style.fontFamily && isCssValueSafe(segment.style.fontFamily)) {
107819
+ inlineStyles.push(`font-family:${segment.style.fontFamily}`);
107820
+ }
107821
+ const text2 = escapeHtml2(segment.text);
107822
+ if (segment.style.hyperlink && isUrlSafe(segment.style.hyperlink)) {
107823
+ const href = escapeHtml2(segment.style.hyperlink);
107824
+ return `<a href="${href}" style="color:#4a9eff;text-decoration:underline;cursor:pointer" data-hyperlink="${href}">${text2}</a>`;
107825
+ }
107826
+ const styleAttr = inlineStyles.length > 0 ? ` style="${inlineStyles.join(";")}"` : "";
107827
+ return `<span${styleAttr}>${text2}</span>`;
107828
+ }).join("");
107829
+ const attrs3 = [];
107830
+ if (para.bulletType !== "none") {
107831
+ attrs3.push(`data-bullet-type="${para.bulletType}"`);
107832
+ }
107833
+ if (para.indentLevel > 0) {
107834
+ attrs3.push(`data-indent-level="${para.indentLevel}"`);
107835
+ }
107836
+ const indent = para.indentLevel * INDENT_PX;
107837
+ const divStyles = [];
107838
+ if (indent > 0) {
107839
+ divStyles.push(`padding-left:${indent}px`);
107840
+ }
107841
+ let prefix = "";
107842
+ if (para.bulletType === "bullet") {
107843
+ prefix = `<span style="margin-right:6px;color:#9ca3af" contenteditable="false">\u2022</span>`;
107844
+ } else if (para.bulletType === "numbered") {
107845
+ prefix = `<span style="margin-right:6px;color:#9ca3af" contenteditable="false">${numberedCounter}.</span>`;
107846
+ }
107847
+ const styleStr = divStyles.length > 0 ? ` style="${divStyles.join(";")}"` : "";
107848
+ const attrStr = attrs3.length > 0 ? ` ${attrs3.join(" ")}` : "";
107849
+ return `<div${attrStr}${styleStr}>${prefix}${runsHtml || "<br />"}</div>`;
107850
+ }).join("");
107851
+ }
107002
107852
  var MOBILE_BREAKPOINT = 768;
107003
107853
  var TABLET_BREAKPOINT = 1024;
107004
107854
  var MOBILE_LANDSCAPE_MAX_HEIGHT = 500;
@@ -108057,6 +108907,29 @@ function resolveParagraphStrutFontSize(segments, bodyFontSize) {
108057
108907
  }
108058
108908
  return largest;
108059
108909
  }
108910
+ var PT_TO_PX = 96 / 72;
108911
+ function resolveParagraphSpacing(input) {
108912
+ const { paraProps, bodyStyle, isFirst = false, isLast = false, spaceFirstLast = true } = input;
108913
+ const out = {};
108914
+ const before = paraProps?.paragraphSpacingBefore ?? bodyStyle?.paragraphSpacingBefore;
108915
+ if (typeof before === "number" && before > 0 && (!isFirst || spaceFirstLast)) {
108916
+ out.spaceBeforePx = before;
108917
+ }
108918
+ const after = paraProps?.paragraphSpacingAfter ?? bodyStyle?.paragraphSpacingAfter;
108919
+ if (typeof after === "number" && after > 0 && (!isLast || spaceFirstLast)) {
108920
+ out.spaceAfterPx = after;
108921
+ }
108922
+ const hasOwnLineSpacing = paraProps?.lineSpacing !== void 0 || paraProps?.lineSpacingExactPt !== void 0;
108923
+ const lineSource = hasOwnLineSpacing ? paraProps : bodyStyle;
108924
+ const exactPt = lineSource?.lineSpacingExactPt;
108925
+ const multiplier = lineSource?.lineSpacing;
108926
+ if (typeof exactPt === "number" && exactPt > 0) {
108927
+ out.lineHeight = `${exactPt * PT_TO_PX}px`;
108928
+ } else if (typeof multiplier === "number" && multiplier > 0) {
108929
+ out.lineHeight = proportionalLineHeight(multiplier);
108930
+ }
108931
+ return out;
108932
+ }
108060
108933
  function parseHexColor(hex10) {
108061
108934
  if (!hex10 || typeof hex10 !== "string") {
108062
108935
  return null;
@@ -113287,6 +114160,17 @@ function fitFontSize(text2, maxWidth, maxHeight, baseSize) {
113287
114160
  const maxByHeight = maxHeight * 0.5;
113288
114161
  return Math.max(6, Math.min(baseSize, maxByWidth, maxByHeight));
113289
114162
  }
114163
+ function chevronPoints(x, y, w, h) {
114164
+ const depth = Math.min(w * 0.2, h * 0.4);
114165
+ return [
114166
+ `${x},${y}`,
114167
+ `${x + w - depth},${y}`,
114168
+ `${x + w},${y + h / 2}`,
114169
+ `${x + w - depth},${y + h}`,
114170
+ `${x},${y + h}`,
114171
+ `${x + depth},${y + h / 2}`
114172
+ ].join(" ");
114173
+ }
113290
114174
  function strokeFor(sw) {
113291
114175
  return sw > 0 ? "rgba(255,255,255,0.3)" : "none";
113292
114176
  }
@@ -114928,6 +115812,21 @@ function computeSmartArtLayout2(nodes, box, palette, style, elementId, resolvedL
114928
115812
  return computeTargetLayout(flat, box, pal, style, elementId);
114929
115813
  }
114930
115814
  }
115815
+ function parseHex(hex10) {
115816
+ let h = hex10.trim().replace(/^#/u, "");
115817
+ if (h.length === 3) {
115818
+ h = h.split("").map((c) => c + c).join("");
115819
+ }
115820
+ if (h.length !== 6 || /[^0-9a-fA-F]/u.test(h)) {
115821
+ return [128, 128, 128];
115822
+ }
115823
+ return [parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)];
115824
+ }
115825
+ function contrastTextColor(fill) {
115826
+ const [r, g, b] = parseHex(fill);
115827
+ const lum = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
115828
+ return lum > 0.6 ? "#1a1a1a" : "#ffffff";
115829
+ }
114931
115830
  function parseViewBox(viewBox) {
114932
115831
  const parts = viewBox.trim().split(/\s+/u).map(Number);
114933
115832
  const width = parts[2];
@@ -115077,21 +115976,6 @@ function boundsOf(points3) {
115077
115976
  height: maxY - minY
115078
115977
  };
115079
115978
  }
115080
- function parseHex(hex10) {
115081
- let h = hex10.trim().replace(/^#/u, "");
115082
- if (h.length === 3) {
115083
- h = h.split("").map((c) => c + c).join("");
115084
- }
115085
- if (h.length !== 6 || /[^0-9a-fA-F]/u.test(h)) {
115086
- return [128, 128, 128];
115087
- }
115088
- return [parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)];
115089
- }
115090
- function contrastTextColor(fill) {
115091
- const [r, g, b] = parseHex(fill);
115092
- const lum = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
115093
- return lum > 0.6 ? "#1a1a1a" : "#ffffff";
115094
- }
115095
115979
  function ringPoint(x, y) {
115096
115980
  const radius = Math.hypot(x, y);
115097
115981
  const angle = Math.atan2(x, y);
@@ -115749,6 +116633,205 @@ async function mountSurfaceChart3D(container, options) {
115749
116633
  }
115750
116634
  };
115751
116635
  }
116636
+ var AVERAGE_ADVANCE_RATIO = 0.5;
116637
+ function wrapTextByEstimatedWidth(text2, maxWidth, fontSize, options = {}) {
116638
+ if (!text2 || text2.trim().length === 0) {
116639
+ return [];
116640
+ }
116641
+ const charactersPerLine = Math.floor(maxWidth / Math.max(fontSize * AVERAGE_ADVANCE_RATIO, 1));
116642
+ if (charactersPerLine <= 0) {
116643
+ return [];
116644
+ }
116645
+ const lines = [];
116646
+ for (const paragraph of text2.split(/\r?\n/u)) {
116647
+ if (paragraph.trim().length === 0) {
116648
+ if (options.keepBlankLines) {
116649
+ lines.push("");
116650
+ }
116651
+ continue;
116652
+ }
116653
+ let current = "";
116654
+ for (const word of paragraph.split(/\s+/u)) {
116655
+ if (current.length === 0) {
116656
+ current = word;
116657
+ } else if (current.length + 1 + word.length <= charactersPerLine) {
116658
+ current += ` ${word}`;
116659
+ } else {
116660
+ lines.push(current);
116661
+ current = word;
116662
+ }
116663
+ }
116664
+ if (current.length > 0) {
116665
+ lines.push(current);
116666
+ }
116667
+ }
116668
+ return lines;
116669
+ }
116670
+ var LINE_HEIGHT_RATIO = 1.2;
116671
+ function centeredSvgTextLines(text2, fontSize, options = {}) {
116672
+ const lines = options.maxWidth !== void 0 ? wrapTextByEstimatedWidth(text2, options.maxWidth, fontSize) : text2.split("\n").filter((line22) => line22.length > 0);
116673
+ const centerY = options.centerY ?? 0;
116674
+ if (lines.length === 0) {
116675
+ return [{ text: "", y: centerY }];
116676
+ }
116677
+ const lineHeight = fontSize * LINE_HEIGHT_RATIO;
116678
+ const blockTop = centerY - lines.length * lineHeight / 2;
116679
+ return lines.map((line22, index) => ({
116680
+ text: line22,
116681
+ y: blockTop + lineHeight / 2 + index * lineHeight
116682
+ }));
116683
+ }
116684
+ var PALETTES = {
116685
+ colorful1: ["#3b82f6", "#22c55e", "#f97316", "#eab308", "#a855f7", "#ec4899"],
116686
+ colorful2: ["#6366f1", "#14b8a6", "#f59e0b", "#ef4444", "#8b5cf6", "#06b6d4"],
116687
+ colorful3: ["#0ea5e9", "#84cc16", "#f43e5e", "#a855f7", "#f97316", "#10b981"],
116688
+ monochromatic1: ["#3b82f6", "#60a5fa", "#93c5fd", "#bfdbfe", "#2563eb", "#1d4ed8"],
116689
+ monochromatic2: ["#6366f1", "#818cf8", "#a5b4fc", "#c7d2fe", "#4f46e5", "#4338ca"]
116690
+ };
116691
+ var DEFAULT_PALETTE2 = PALETTES.colorful1;
116692
+ function paletteColour(index, palette) {
116693
+ return palette[index % palette.length];
116694
+ }
116695
+ function resolvePalette(data) {
116696
+ if (!data) {
116697
+ return DEFAULT_PALETTE2;
116698
+ }
116699
+ const ctFills = data.colorTransform?.fillColors;
116700
+ if (ctFills && ctFills.length > 0) {
116701
+ return ctFills;
116702
+ }
116703
+ return PALETTES[data.colorScheme ?? "colorful1"] ?? DEFAULT_PALETTE2;
116704
+ }
116705
+ var TEXT_WIDTH_FRACTION = 0.82;
116706
+ function underlyingFill(shape, shapes, index) {
116707
+ const centerX = shape.x + shape.width / 2;
116708
+ const centerY = shape.y + shape.height / 2;
116709
+ for (let below = index - 1; below >= 0; below--) {
116710
+ const candidate = shapes[below];
116711
+ if (!candidate || candidate.fillNone || !candidate.fillColor) {
116712
+ continue;
116713
+ }
116714
+ if (centerX >= candidate.x && centerX <= candidate.x + candidate.width && centerY >= candidate.y && centerY <= candidate.y + candidate.height) {
116715
+ return candidate.fillColor;
116716
+ }
116717
+ }
116718
+ return void 0;
116719
+ }
116720
+ function drawingShapeLabelColor(shape, shapes, index, resolvedFill) {
116721
+ const basis = resolvedFill === "none" || resolvedFill.startsWith("url(") ? underlyingFill(shape, shapes, index) : resolvedFill;
116722
+ return basis ? contrastTextColor(basis) : "#1a1a1a";
116723
+ }
116724
+ function computeDrawingViewBox(shapes) {
116725
+ let minX = Infinity;
116726
+ let minY = Infinity;
116727
+ let maxX = -Infinity;
116728
+ let maxY = -Infinity;
116729
+ for (const s of shapes) {
116730
+ if (s.x < minX) {
116731
+ minX = s.x;
116732
+ }
116733
+ if (s.y < minY) {
116734
+ minY = s.y;
116735
+ }
116736
+ if (s.x + s.width > maxX) {
116737
+ maxX = s.x + s.width;
116738
+ }
116739
+ if (s.y + s.height > maxY) {
116740
+ maxY = s.y + s.height;
116741
+ }
116742
+ }
116743
+ if (!Number.isFinite(minX)) {
116744
+ return { minX: 0, minY: 0, width: 1, height: 1 };
116745
+ }
116746
+ return {
116747
+ minX,
116748
+ minY,
116749
+ width: maxX - minX || 1,
116750
+ height: maxY - minY || 1
116751
+ };
116752
+ }
116753
+ function resolveGradient(shape, id) {
116754
+ const stops = shape.fillGradientStops;
116755
+ if (!stops || stops.length === 0) {
116756
+ return void 0;
116757
+ }
116758
+ const mapped = stops.map((stop) => ({
116759
+ offset: `${Math.max(0, Math.min(100, stop.position))}%`,
116760
+ color: stop.color,
116761
+ ...stop.opacity !== void 0 ? { opacity: stop.opacity } : {}
116762
+ }));
116763
+ if (shape.fillGradientType === "radial") {
116764
+ return { id, kind: "radial", cx: "50%", cy: "50%", r: "50%", stops: mapped };
116765
+ }
116766
+ const radians = (shape.fillGradientAngle ?? 0) * Math.PI / 180;
116767
+ const dx = Math.cos(radians) / 2;
116768
+ const dy = Math.sin(radians) / 2;
116769
+ return {
116770
+ id,
116771
+ kind: "linear",
116772
+ x1: `${(0.5 - dx) * 100}%`,
116773
+ y1: `${(0.5 - dy) * 100}%`,
116774
+ x2: `${(0.5 + dx) * 100}%`,
116775
+ y2: `${(0.5 + dy) * 100}%`,
116776
+ stops: mapped
116777
+ };
116778
+ }
116779
+ function resolveShapeKind(shape, hasImage) {
116780
+ if (hasImage) {
116781
+ return "image";
116782
+ }
116783
+ const normalized = (shape.shapeType ?? "").trim().toLowerCase();
116784
+ if (normalized === "chevron" || normalized === "homeplate") {
116785
+ return "polygon";
116786
+ }
116787
+ return getShapeType(shape.shapeType) === "ellipse" ? "ellipse" : "rect";
116788
+ }
116789
+ function projectDrawingShapes(elementId, shapes, viewBox, palette, style) {
116790
+ const { minX, minY } = viewBox;
116791
+ const sw = styleStroke(style);
116792
+ return shapes.map((shape, i) => {
116793
+ const gradient = shape.fillNone ? void 0 : resolveGradient(shape, `${elementId}-dspgrad-${shape.id}-${i}`);
116794
+ const fill = shape.fillNone ? "none" : gradient ? `url(#${gradient.id})` : shape.fillPatternForegroundColor ?? shape.fillColor ?? paletteColour(i, palette);
116795
+ const relX = shape.x - minX;
116796
+ const relY = shape.y - minY;
116797
+ const kind = resolveShapeKind(shape, Boolean(shape.fillImageUrl));
116798
+ const rx = getShapeType(shape.shapeType) === "roundRect" ? Math.min(shape.width, shape.height) * 0.1 : 0;
116799
+ const cx = relX + shape.width / 2;
116800
+ const cy = relY + shape.height / 2;
116801
+ const stroke = shape.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none");
116802
+ const transform = shape.rotation !== void 0 ? `rotate(${shape.rotation} ${cx} ${cy})` : void 0;
116803
+ const fontSize = shape.fontSize ?? Math.max(8, Math.min(14, shape.height * 0.2));
116804
+ return {
116805
+ key: `${elementId}-dsp-${shape.id}-${i}`,
116806
+ kind,
116807
+ ...kind === "polygon" ? { points: chevronPoints(relX, relY, shape.width, shape.height) } : {},
116808
+ ...gradient ? { gradient } : {},
116809
+ x: relX,
116810
+ y: relY,
116811
+ width: shape.width,
116812
+ height: shape.height,
116813
+ rx,
116814
+ cx,
116815
+ cy,
116816
+ fill,
116817
+ stroke,
116818
+ strokeWidth: shape.strokeWidth ?? sw,
116819
+ transform,
116820
+ imageUrl: shape.fillImageUrl,
116821
+ textLines: shape.text ? centeredSvgTextLines(shape.text, fontSize, {
116822
+ maxWidth: shape.width * TEXT_WIDTH_FRACTION,
116823
+ centerY: cy
116824
+ }) : [],
116825
+ textX: cx,
116826
+ textY: cy,
116827
+ fontColor: shape.fontColor ?? drawingShapeLabelColor(shape, shapes, i, fill),
116828
+ fontSize
116829
+ };
116830
+ });
116831
+ }
116832
+ function styleShadowFilter(style) {
116833
+ return styleShadow(style);
116834
+ }
115752
116835
  var FONT_NAME_UNSAFE_CHARS = /["\\\n\r;}<>]/u;
115753
116836
  var FONT_FORMAT_ALLOWED = /* @__PURE__ */ new Set(["truetype", "opentype", "woff", "woff2"]);
115754
116837
  var FONT_DATA_URL_PATTERN = /^data:font\/[a-z0-9+.-]+(?:;charset=[a-z0-9-]+)?;base64,[a-z0-9+/=]+$/iu;
@@ -118731,6 +119814,97 @@ var DUOTONE_PRESETS = [
118731
119814
  highlight: "#F5DEB3"
118732
119815
  }
118733
119816
  ];
119817
+ function findInSlides(slides, query, opts = {}) {
119818
+ if (!query) {
119819
+ return [];
119820
+ }
119821
+ const matchCase = opts.matchCase ?? false;
119822
+ const normalised = matchCase ? query : query.toLowerCase();
119823
+ const results = [];
119824
+ for (let slideIndex = 0; slideIndex < slides.length; slideIndex++) {
119825
+ const slide = slides[slideIndex];
119826
+ for (const element of slide.elements) {
119827
+ if (!hasTextProperties(element)) {
119828
+ continue;
119829
+ }
119830
+ const segments = element.textSegments ?? [];
119831
+ for (let segIndex = 0; segIndex < segments.length; segIndex++) {
119832
+ const raw = segments[segIndex].text ?? "";
119833
+ const haystack = matchCase ? raw : raw.toLowerCase();
119834
+ let offset = 0;
119835
+ while (offset < haystack.length) {
119836
+ const pos2 = haystack.indexOf(normalised, offset);
119837
+ if (pos2 === -1) {
119838
+ break;
119839
+ }
119840
+ results.push({
119841
+ slideIndex,
119842
+ elementId: element.id,
119843
+ segmentIndex: segIndex,
119844
+ startOffset: pos2,
119845
+ length: query.length
119846
+ });
119847
+ offset = pos2 + 1;
119848
+ }
119849
+ }
119850
+ }
119851
+ }
119852
+ return results;
119853
+ }
119854
+ function applyFindReplacements(slides, toReplace, replacement) {
119855
+ if (toReplace.length === 0) {
119856
+ return { slides, replacements: 0 };
119857
+ }
119858
+ const grouped = /* @__PURE__ */ new Map();
119859
+ for (const match of toReplace) {
119860
+ const key = `${match.slideIndex}::${match.elementId}::${match.segmentIndex}`;
119861
+ let bucket = grouped.get(key);
119862
+ if (!bucket) {
119863
+ bucket = [];
119864
+ grouped.set(key, bucket);
119865
+ }
119866
+ bucket.push(match);
119867
+ }
119868
+ const nextSlides = slides.slice();
119869
+ let totalReplacements = 0;
119870
+ for (const [, matches] of grouped) {
119871
+ const sorted = matches.slice().sort((a, b) => b.startOffset - a.startOffset);
119872
+ for (const match of sorted) {
119873
+ const slide = nextSlides[match.slideIndex];
119874
+ if (!slide) {
119875
+ continue;
119876
+ }
119877
+ const elIdx = slide.elements.findIndex((e) => e.id === match.elementId);
119878
+ if (elIdx === -1) {
119879
+ continue;
119880
+ }
119881
+ const element = slide.elements[elIdx];
119882
+ if (!hasTextProperties(element)) {
119883
+ continue;
119884
+ }
119885
+ const segments = element.textSegments ?? [];
119886
+ const seg = segments[match.segmentIndex];
119887
+ if (!seg) {
119888
+ continue;
119889
+ }
119890
+ const before = seg.text.slice(0, match.startOffset);
119891
+ const after = seg.text.slice(match.startOffset + match.length);
119892
+ const newSegText = before + replacement + after;
119893
+ const nextSegments = segments.slice();
119894
+ nextSegments[match.segmentIndex] = { ...seg, text: newSegText };
119895
+ const nextText = nextSegments.map((s) => s.text).join("");
119896
+ const nextElements = slide.elements.slice();
119897
+ nextElements[elIdx] = {
119898
+ ...element,
119899
+ text: nextText,
119900
+ textSegments: nextSegments
119901
+ };
119902
+ nextSlides[match.slideIndex] = { ...slide, elements: nextElements };
119903
+ totalReplacements++;
119904
+ }
119905
+ }
119906
+ return { slides: nextSlides, replacements: totalReplacements };
119907
+ }
118734
119908
  function isElementHidden(element) {
118735
119909
  return element?.hidden === true;
118736
119910
  }
@@ -120422,6 +121596,24 @@ var COMMON_FONTS = [
120422
121596
  "Tw Cen MT",
120423
121597
  "Verdana"
120424
121598
  ];
121599
+ function partitionTemplateElements(slides) {
121600
+ const templateElementsBySlideId = {};
121601
+ const nextSlides = slides.map((slide) => {
121602
+ const template = slide.elements.filter(isTemplateElement);
121603
+ if (template.length === 0) {
121604
+ return slide;
121605
+ }
121606
+ templateElementsBySlideId[slide.id] = template;
121607
+ return { ...slide, elements: slide.elements.filter((element) => !isTemplateElement(element)) };
121608
+ });
121609
+ return { slides: nextSlides, templateElementsBySlideId };
121610
+ }
121611
+ function buildSaveSlides(slides, templateElementsBySlideId) {
121612
+ return slides.map((slide) => {
121613
+ const template = templateElementsBySlideId[slide.id];
121614
+ return template?.length ? { ...slide, elements: [...template, ...slide.elements] } : slide;
121615
+ });
121616
+ }
120425
121617
  var DEFAULT_PREVIEW_ELEMENT_CAP = 500;
120426
121618
  function buildPreviewElements(slide, templateElements = [], options) {
120427
121619
  const cap = options?.cap ?? DEFAULT_PREVIEW_ELEMENT_CAP;
@@ -122816,38 +124008,7 @@ function calculateNotesPageLayout(slideWidth, slideHeight) {
122816
124008
  };
122817
124009
  }
122818
124010
  function wrapNotesText(text2, maxWidth, fontSize) {
122819
- if (!text2 || text2.trim().length === 0) {
122820
- return [];
122821
- }
122822
- const avgCharWidth = fontSize * 0.5;
122823
- const maxCharsPerLine = Math.floor(maxWidth / avgCharWidth);
122824
- if (maxCharsPerLine <= 0) {
122825
- return [];
122826
- }
122827
- const lines = [];
122828
- const paragraphs = text2.split(/\r?\n/u);
122829
- for (const paragraph of paragraphs) {
122830
- if (paragraph.trim().length === 0) {
122831
- lines.push("");
122832
- continue;
122833
- }
122834
- const words = paragraph.split(/\s+/u);
122835
- let currentLine = "";
122836
- for (const word of words) {
122837
- if (currentLine.length === 0) {
122838
- currentLine = word;
122839
- } else if (currentLine.length + 1 + word.length <= maxCharsPerLine) {
122840
- currentLine += ` ${word}`;
122841
- } else {
122842
- lines.push(currentLine);
122843
- currentLine = word;
122844
- }
122845
- }
122846
- if (currentLine.length > 0) {
122847
- lines.push(currentLine);
122848
- }
122849
- }
122850
- return lines;
124011
+ return wrapTextByEstimatedWidth(text2, maxWidth, fontSize, { keepBlankLines: true });
122851
124012
  }
122852
124013
  function calculateContinuationPageMaxLines() {
122853
124014
  const contentHeight = NOTES_PAGE_H - 2 * NOTES_MARGIN;
@@ -123736,14 +124897,14 @@ ${xrefPos}
123736
124897
  }
123737
124898
  var NOTE_LINE_COUNT = 8;
123738
124899
  var TRANSPARENT_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgAAIAAAUAAen63NgAAAAASUVORK5CYII=";
123739
- function escapeHtml2(value) {
124900
+ function escapeHtml22(value) {
123740
124901
  return value.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;").split("'").join("&#39;");
123741
124902
  }
123742
124903
  function safeDataImageSrc(src) {
123743
124904
  if (typeof src !== "string" || !src.startsWith("data:image/")) {
123744
124905
  return TRANSPARENT_PNG;
123745
124906
  }
123746
- return escapeHtml2(src);
124907
+ return escapeHtml22(src);
123747
124908
  }
123748
124909
  function slideTitle(slide, index) {
123749
124910
  const fallback = `Slide ${index + 1}`;
@@ -123769,7 +124930,7 @@ function buildOutlineHtml(slideIndices, slides) {
123769
124930
  }
123770
124931
  const titleText = slideTitle(slide, idx);
123771
124932
  const notes = (slide.notes ?? "").trim();
123772
- return `<h2>${escapeHtml2(titleText)}</h2>${notes ? `<p>${escapeHtml2(notes)}</p>` : ""}`;
124933
+ return `<h2>${escapeHtml22(titleText)}</h2>${notes ? `<p>${escapeHtml22(notes)}</p>` : ""}`;
123773
124934
  }).join("");
123774
124935
  }
123775
124936
  function buildSlidesHtml(slideImages, slideIndices) {
@@ -123783,7 +124944,7 @@ function buildNotesHtml(slideImages, slideIndices, slides) {
123783
124944
  const notes = (slides[idx]?.notes ?? "").trim();
123784
124945
  return `<section class="page notes-page">
123785
124946
  <img class="notes-slide" src="${safeDataImageSrc(img)}" alt="Slide ${idx + 1}" />
123786
- <div class="notes-text">${escapeHtml2(notes)}</div>
124947
+ <div class="notes-text">${escapeHtml22(notes)}</div>
123787
124948
  </section>`;
123788
124949
  }).join("");
123789
124950
  }
@@ -123851,7 +125012,7 @@ function buildPrintHtmlDocument(options) {
123851
125012
  <html>
123852
125013
  <head>
123853
125014
  <meta charset="utf-8" />
123854
- <title>${escapeHtml2(title)}</title>
125015
+ <title>${escapeHtml22(title)}</title>
123855
125016
  <style>
123856
125017
  :root { color-scheme: light; }
123857
125018
  * { box-sizing: border-box; }
@@ -123960,12 +125121,14 @@ exports.CHARACTER_SPACING_OPTIONS = CHARACTER_SPACING_OPTIONS;
123960
125121
  exports.COLOR_MAP_ALIAS_KEYS = COLOR_MAP_ALIAS_KEYS;
123961
125122
  exports.COMMON_FONTS = COMMON_FONTS;
123962
125123
  exports.CONNECTION_TIMEOUT_MS = CONNECTION_TIMEOUT_MS;
125124
+ exports.DEBOUNCE_MS = DEBOUNCE_MS;
123963
125125
  exports.DEFAULT_BROADCAST_SERVER_URL = DEFAULT_BROADCAST_SERVER_URL;
123964
125126
  exports.DEFAULT_COLOR_CHANGE_TOLERANCE = DEFAULT_COLOR_CHANGE_TOLERANCE;
123965
125127
  exports.DEFAULT_COLOR_MAP = DEFAULT_COLOR_MAP;
123966
125128
  exports.DEFAULT_FONT_FAMILY = DEFAULT_FONT_FAMILY;
123967
125129
  exports.DEFAULT_INSERT_CHART_KIND = DEFAULT_INSERT_CHART_KIND;
123968
125130
  exports.DEFAULT_MOTION_PATH_PRESET_ID = DEFAULT_MOTION_PATH_PRESET_ID;
125131
+ exports.DEFAULT_PALETTE2 = DEFAULT_PALETTE2;
123969
125132
  exports.DEFAULT_QUICK_ACCESS_COMMAND_IDS = DEFAULT_QUICK_ACCESS_COMMAND_IDS;
123970
125133
  exports.DEFAULT_ROW_HEIGHT = DEFAULT_ROW_HEIGHT;
123971
125134
  exports.DEFAULT_VIEWER_OPTIONS = DEFAULT_VIEWER_OPTIONS;
@@ -123978,6 +125141,7 @@ exports.EMPHASIS_PRESET_VALUES = EMPHASIS_PRESET_VALUES;
123978
125141
  exports.ENTRANCE_PRESET_VALUES = ENTRANCE_PRESET_VALUES;
123979
125142
  exports.EQUATION_TEMPLATES = EQUATION_TEMPLATES;
123980
125143
  exports.EXIT_PRESET_VALUES = EXIT_PRESET_VALUES;
125144
+ exports.EXPANDED_MAX_HEIGHT = EXPANDED_MAX_HEIGHT;
123981
125145
  exports.EXPORT_ASSEMBLING_PERCENT = EXPORT_ASSEMBLING_PERCENT;
123982
125146
  exports.EXPORT_DONE_PERCENT = EXPORT_DONE_PERCENT;
123983
125147
  exports.EncryptedFileError = EncryptedFileError;
@@ -123988,6 +125152,7 @@ exports.HANDOUT_OPTIONS = HANDOUT_OPTIONS;
123988
125152
  exports.HIDDEN_SLIDE_LABEL_KEY = HIDDEN_SLIDE_LABEL_KEY;
123989
125153
  exports.HIDDEN_SLIDE_SLASH_GRADIENT = HIDDEN_SLIDE_SLASH_GRADIENT;
123990
125154
  exports.HIGHLIGHTER_COLORS = HIGHLIGHTER_COLORS;
125155
+ exports.INDENT_PX = INDENT_PX;
123991
125156
  exports.INK_REPLAY_KEYFRAMES = INK_REPLAY_KEYFRAMES;
123992
125157
  exports.INSERT_CHART_TYPES = INSERT_CHART_TYPES;
123993
125158
  exports.LBL = LBL;
@@ -123998,6 +125163,7 @@ exports.LINK_TOOLTIP_LABEL_CLASS = LINK_TOOLTIP_LABEL_CLASS;
123998
125163
  exports.LINK_TOOLTIP_PANEL_CLASS = LINK_TOOLTIP_PANEL_CLASS;
123999
125164
  exports.LOCAL_SYNC_ORIGIN = LOCAL_SYNC_ORIGIN;
124000
125165
  exports.MATERIAL_PRESETS = MATERIAL_PRESETS;
125166
+ exports.MAX_INDENT_LEVEL = MAX_INDENT_LEVEL;
124001
125167
  exports.MAX_ZOOM_SCALE = MAX_ZOOM_SCALE;
124002
125168
  exports.MEDIA_CHROME_ATTRIBUTE = MEDIA_CHROME_ATTRIBUTE;
124003
125169
  exports.MIN_ZOOM_SCALE = MIN_ZOOM_SCALE;
@@ -124091,6 +125257,7 @@ exports.applyCaseTransformToSegments = applyCaseTransformToSegments;
124091
125257
  exports.applyChartBuildReveal = applyChartBuildReveal;
124092
125258
  exports.applyColorChange = applyColorChange;
124093
125259
  exports.applyDuotone = applyDuotone;
125260
+ exports.applyFindReplacements = applyFindReplacements;
124094
125261
  exports.applyFormatToElement = applyFormatToElement;
124095
125262
  exports.applyMotionPathPreset = applyMotionPathPreset;
124096
125263
  exports.applyOutlineEdit = applyOutlineEdit;
@@ -124141,6 +125308,7 @@ exports.buildPreviewElements = buildPreviewElements;
124141
125308
  exports.buildPrintDocument = buildPrintDocument;
124142
125309
  exports.buildPrintHtmlDocument = buildPrintHtmlDocument;
124143
125310
  exports.buildReflectionCss = buildReflectionCss;
125311
+ exports.buildSaveSlides = buildSaveSlides;
124144
125312
  exports.buildShadowCssFromShapeStyle = buildShadowCssFromShapeStyle;
124145
125313
  exports.buildSlideTemplateContent = buildSlideTemplateContent;
124146
125314
  exports.buildSlideTemplateSlide = buildSlideTemplateSlide;
@@ -124162,12 +125330,14 @@ exports.buildTextRunFilterChain = buildTextRunFilterChain;
124162
125330
  exports.buildTextShadowCss = buildTextShadowCss;
124163
125331
  exports.buildThemeColorGrid = buildThemeColorGrid;
124164
125332
  exports.buildThemeColorMap = buildThemeColorMap;
125333
+ exports.buildTree = buildTree;
124165
125334
  exports.buildUserFontFaceStyles = buildUserFontFaceStyles;
124166
125335
  exports.canCommitActionType = canCommitActionType;
124167
125336
  exports.canGoNext = canGoNext;
124168
125337
  exports.canGoPrevious = canGoPrevious;
124169
125338
  exports.canvasToJpegData = canvasToJpegData;
124170
- exports.cell3DBevelCss = cell3DBevelCss;
125339
+ exports.cellStyleToCss = cellStyleToCss;
125340
+ exports.centeredSvgTextLines = centeredSvgTextLines;
124171
125341
  exports.chartAreaFill = chartAreaFill;
124172
125342
  exports.chartDataChangeType = chartDataChangeType;
124173
125343
  exports.chartPartToAttrs = chartPartToAttrs;
@@ -124195,6 +125365,7 @@ exports.compileEquationTemplateMathMl = compileEquationTemplateMathMl;
124195
125365
  exports.compileLatexEquation = compileLatexEquation;
124196
125366
  exports.computeAllNotesPages = computeAllNotesPages;
124197
125367
  exports.computeColumnBoundaries = computeColumnBoundaries;
125368
+ exports.computeDrawingViewBox = computeDrawingViewBox;
124198
125369
  exports.computeEntranceAnimationDelay = computeEntranceAnimationDelay;
124199
125370
  exports.computeHandoutLayout = computeHandoutLayout;
124200
125371
  exports.computeInlineEditorRect = computeInlineEditorRect;
@@ -124224,6 +125395,7 @@ exports.createCollaborationLivePatcher = createCollaborationLivePatcher;
124224
125395
  exports.createDefaultChartElement = createDefaultChartElement;
124225
125396
  exports.createDepartureChannel = createDepartureChannel;
124226
125397
  exports.createInitialPresentationSnapshot = createInitialPresentationSnapshot;
125398
+ exports.createPlainNotesSegments = createPlainNotesSegments;
124227
125399
  exports.createPresenceProjector = createPresenceProjector;
124228
125400
  exports.createPresentationKeyBuffer = createPresentationKeyBuffer;
124229
125401
  exports.createPresentationSessionId = createPresentationSessionId;
@@ -124257,15 +125429,18 @@ exports.encodeGif = encodeGif;
124257
125429
  exports.endAudienceDisplay = endAudienceDisplay;
124258
125430
  exports.ensureActionAffordanceStyles = ensureActionAffordanceStyles;
124259
125431
  exports.erasePresentationInkAt = erasePresentationInkAt;
125432
+ exports.escapeHtml2 = escapeHtml22;
124260
125433
  exports.exportDeckJson = exportDeckJson;
124261
125434
  exports.extraQuickAccessCommands = extraQuickAccessCommands;
124262
125435
  exports.extractPathPoints = extractPathPoints;
124263
125436
  exports.filterCommands = filterCommands;
124264
125437
  exports.filterRenderedElements = filterRenderedElements;
124265
125438
  exports.findChartPartTarget = findChartPartTarget;
125439
+ exports.findInSlides = findInSlides;
124266
125440
  exports.findMediaElementByElementId = findMediaElementByElementId;
124267
125441
  exports.findSmartArtNodeText = findSmartArtNodeText;
124268
125442
  exports.firstShowSlideIndex = firstShowSlideIndex;
125443
+ exports.fitFontSize = fitFontSize;
124269
125444
  exports.flattenTagCollections = flattenTagCollections;
124270
125445
  exports.forgetSessionDeck = forgetSessionDeck;
124271
125446
  exports.formatAxisValue = formatAxisValue;
@@ -124306,6 +125481,7 @@ exports.getComputedEffectStyle = getComputedEffectStyle;
124306
125481
  exports.getConnectionSites = getConnectionSites;
124307
125482
  exports.getContentPartReplayStyles = getContentPartReplayStyles;
124308
125483
  exports.getCssBorderDashStyle = getCssBorderDashStyle;
125484
+ exports.getCurrentParagraphIndex = getCurrentParagraphIndex;
124309
125485
  exports.getDisplayUnitLabel = getDisplayUnitLabel;
124310
125486
  exports.getDuotoneCachedResult = getDuotoneCachedResult;
124311
125487
  exports.getEffectDagFilter = getEffectDagFilter;
@@ -124345,6 +125521,7 @@ exports.getSoftEdgeFilterId = getSoftEdgeFilterId;
124345
125521
  exports.getSoftEdgeSvgFilter = getSoftEdgeSvgFilter;
124346
125522
  exports.getSubstituteFontFamily = getSubstituteFontFamily;
124347
125523
  exports.getSvgStrokeDasharray = getSvgStrokeDasharray;
125524
+ exports.getTableCellBandStyle = getTableCellBandStyle;
124348
125525
  exports.getTextAlphaOpacity = getTextAlphaOpacity;
124349
125526
  exports.getTextCompensationTransform = getTextCompensationTransform;
124350
125527
  exports.getWarpPath = getWarpPath;
@@ -124386,7 +125563,6 @@ exports.isPpactionUrl = isPpactionUrl;
124386
125563
  exports.isPresentationAdvanceClick = isPresentationAdvanceClick;
124387
125564
  exports.isPresentationSessionMessage = isPresentationSessionMessage;
124388
125565
  exports.isStrokeOnlyPresetElement = isStrokeOnlyPresetElement;
124389
- exports.isTemplateElement = isTemplateElement;
124390
125566
  exports.isTemplateElementId = isTemplateElementId2;
124391
125567
  exports.isUrlSafe = isUrlSafe;
124392
125568
  exports.lastShowSlideIndex = lastShowSlideIndex;
@@ -124432,13 +125608,14 @@ exports.moveSlidesToSection = moveSlidesToSection;
124432
125608
  exports.newTableElement = newTableElement;
124433
125609
  exports.nextPresentedSlide = nextPresentedSlide;
124434
125610
  exports.nextShowSlideIndex = nextShowSlideIndex;
125611
+ exports.nodeOpacity = nodeOpacity;
124435
125612
  exports.normalizeColorsForCapture = normalizeColorsForCapture;
124436
125613
  exports.normalizeHexColor = normalizeHexColor;
125614
+ exports.normalizeSegments = normalizeSegments;
124437
125615
  exports.normalizeStrokeDashType = normalizeStrokeDashType;
124438
125616
  exports.normalizeValue = normalizeValue;
124439
125617
  exports.notesSegmentsToSpans = notesSegmentsToSpans;
124440
125618
  exports.observeYDocSlides = observeYDocSlides;
124441
- exports.ooxmlDashToCssBorderStyle = ooxmlDashToCssBorderStyle;
124442
125619
  exports.ooxmlGradientAngleToCssDegrees = ooxmlGradientAngleToCssDegrees;
124443
125620
  exports.openNativeEyeDropper = openNativeEyeDropper;
124444
125621
  exports.openPptxFile = openPptxFile;
@@ -124446,10 +125623,14 @@ exports.openReadingView = openReadingView;
124446
125623
  exports.openUrlInNewTab = openUrlInNewTab;
124447
125624
  exports.paintedStrokeWidth = paintedStrokeWidth;
124448
125625
  exports.paletteColor = paletteColor;
125626
+ exports.paletteColour = paletteColour;
125627
+ exports.paragraphsToSegments = paragraphsToSegments;
124449
125628
  exports.parseDrawingColor = parseDrawingColor;
124450
125629
  exports.parseDrawingColorOpacity = parseDrawingColorOpacity;
124451
125630
  exports.parsePanoseString = parsePanoseString;
124452
125631
  exports.parsePpactionUrl = parsePpactionUrl;
125632
+ exports.parseSegmentsFromRichEditor = parseSegmentsFromRichEditor;
125633
+ exports.partitionTemplateElements = partitionTemplateElements;
124453
125634
  exports.pickSupportedMimeType = pickSupportedMimeType;
124454
125635
  exports.pieceLetterSpacing = pieceLetterSpacing;
124455
125636
  exports.placeAudienceWindow = placeAudienceWindow;
@@ -124467,8 +125648,8 @@ exports.pressuresToWidths = pressuresToWidths;
124467
125648
  exports.previousShowSlideIndex = previousShowSlideIndex;
124468
125649
  exports.printPropertiesFrameSlides = printPropertiesFrameSlides;
124469
125650
  exports.printPropertiesSlidesPerPage = printPropertiesSlidesPerPage;
125651
+ exports.projectDrawingShapes = projectDrawingShapes;
124470
125652
  exports.promoteSmartArtNode = promoteSmartArtNode;
124471
- exports.proportionalLineHeight = proportionalLineHeight;
124472
125653
  exports.publishLiveGeometry = publishLiveGeometry;
124473
125654
  exports.publishLiveInlineText = publishLiveInlineText;
124474
125655
  exports.quickStyleSwatchCss = quickStyleSwatchCss;
@@ -124507,15 +125688,16 @@ exports.resolveCssTextAlign = resolveCssTextAlign;
124507
125688
  exports.resolveDrawingShapeNodeId = resolveDrawingShapeNodeId;
124508
125689
  exports.resolveElementActionAffordance = resolveElementActionAffordance;
124509
125690
  exports.resolveFontForScript = resolveFontForScript;
124510
- exports.resolveFontRefIdx = resolveFontRefIdx;
124511
125691
  exports.resolveGroupChildFill = resolveGroupChildFill;
124512
125692
  exports.resolveInkColor = resolveInkColor;
124513
125693
  exports.resolveInkOpacity = resolveInkOpacity;
124514
125694
  exports.resolveInkWidth = resolveInkWidth;
124515
125695
  exports.resolveMetricTrackingPx = resolveMetricTrackingPx;
124516
125696
  exports.resolveOleType = resolveOleType;
125697
+ exports.resolvePalette = resolvePalette;
124517
125698
  exports.resolveParagraphAlign = resolveParagraphAlign;
124518
125699
  exports.resolveParagraphRtl = resolveParagraphRtl;
125700
+ exports.resolveParagraphSpacing = resolveParagraphSpacing;
124519
125701
  exports.resolveParagraphStrutFontSize = resolveParagraphStrutFontSize;
124520
125702
  exports.resolvePictureBullet = resolvePictureBullet;
124521
125703
  exports.resolveProfileInitial = resolveProfileInitial;
@@ -124544,6 +125726,9 @@ exports.scanAvailableFontFamilies = scanAvailableFontFamilies;
124544
125726
  exports.schemaLabel = schemaLabel;
124545
125727
  exports.segmentByScript = segmentByScript;
124546
125728
  exports.segmentFrameCount = segmentFrameCount;
125729
+ exports.segmentsToEditorHtml = segmentsToEditorHtml;
125730
+ exports.segmentsToParagraphs = segmentsToParagraphs;
125731
+ exports.segmentsToPlainText = segmentsToPlainText;
124547
125732
  exports.sendBackward = sendBackward;
124548
125733
  exports.sendToBack = sendToBack;
124549
125734
  exports.sequentialColorScale = sequentialColorScale;
@@ -124566,7 +125751,6 @@ exports.setMotionPathEnd = setMotionPathEnd;
124566
125751
  exports.setPendingSelectionRestore = setPendingSelectionRestore;
124567
125752
  exports.setSmartArtNodeStyle = setSmartArtNodeStyle;
124568
125753
  exports.setTableElementCellText = setTableElementCellText;
124569
- exports.shadeColor2 = shadeColor2;
124570
125754
  exports.shouldAutoFollowBroadcaster = shouldAutoFollowBroadcaster;
124571
125755
  exports.shouldCommitSmartArtNodeText = shouldCommitSmartArtNodeText;
124572
125756
  exports.shouldConfirmExternalHyperlink = shouldConfirmExternalHyperlink;
@@ -124582,6 +125766,9 @@ exports.stepPresenterZoom = stepPresenterZoom;
124582
125766
  exports.stopAllPersistentAudio = stopAllPersistentAudio;
124583
125767
  exports.storeAudienceContent = storeAudienceContent;
124584
125768
  exports.strokeOutlineViewBox = strokeOutlineViewBox;
125769
+ exports.styleShadow = styleShadow;
125770
+ exports.styleShadowFilter = styleShadowFilter;
125771
+ exports.styleStroke = styleStroke;
124585
125772
  exports.substituteFieldText = substituteFieldText;
124586
125773
  exports.suppressesCssBorder = suppressesCssBorder;
124587
125774
  exports.svgGradientFillRef = svgGradientFillRef;
@@ -124596,7 +125783,6 @@ exports.textBuildSpanStyle = textBuildSpanStyle;
124596
125783
  exports.themeColorLabel = themeColorLabel;
124597
125784
  exports.themeColorSchemesEqual = themeColorSchemesEqual;
124598
125785
  exports.themeToCssVars = themeToCssVars;
124599
- exports.tintColor2 = tintColor2;
124600
125786
  exports.toCssTextOrientation = toCssTextOrientation;
124601
125787
  exports.toCssVerticalDirection = toCssVerticalDirection;
124602
125788
  exports.toCssWritingMode = toCssWritingMode;
@@ -124605,6 +125791,9 @@ exports.toggleBlackboard = toggleBlackboard;
124605
125791
  exports.togglePresenterTimer = togglePresenterTimer;
124606
125792
  exports.toggleText3dExtrusion = toggleText3dExtrusion;
124607
125793
  exports.transformTextCase = transformTextCase;
125794
+ exports.treeDepth = treeDepth2;
125795
+ exports.treeWidth = treeWidth2;
125796
+ exports.truncate = truncate;
124608
125797
  exports.updateCellTextInRawXml = updateCellTextInRawXml;
124609
125798
  exports.updateCellTextStyleInRawXml = updateCellTextStyleInRawXml;
124610
125799
  exports.updateMergeAttrsInRawXml = updateMergeAttrsInRawXml;