ooxml-ui 1.43.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{chunk-NH5ZSZMI.js → chunk-2YRHRV4H.js} +1 -1
- package/dist/{chunk-JWBWLGEY.js → chunk-LPI7LT4B.js} +2 -2
- package/dist/{chunk-2ZYRZANE.js → chunk-MWDG776V.js} +1 -1
- package/dist/{chunk-I57TCM2Q.js → chunk-UEFVC6V4.js} +1 -1
- package/dist/{chunk-M4ARYL3L.js → chunk-ZTLP52FH.js} +1 -1
- package/dist/controls.js +1 -1
- package/dist/docx.js +4 -4
- package/dist/index.js +4 -4
- package/dist/pptx/{chart-3d-view-scene-CGLU6ISD.mjs → chart-3d-view-scene-7LIMCTEM.mjs} +3 -2
- package/dist/pptx/{chart-3d-view-scene-C7QUQTXD.cjs → chart-3d-view-scene-RCWYLVC3.cjs} +38 -37
- package/dist/pptx/{chunk-W2QJX2ON.mjs → chunk-2P6TH4ZE.mjs} +3 -0
- package/dist/pptx/{chunk-DH6EKOVI.mjs → chunk-3DJZBAQ2.mjs} +1 -1
- package/dist/pptx/{chunk-5BINBXFV.mjs → chunk-6JTQ7AG6.mjs} +3 -3
- package/dist/pptx/{chunk-P4NVINSK.cjs → chunk-CWBVJ4DC.cjs} +9257 -8918
- package/dist/pptx/chunk-FI2ATACZ.cjs +147 -0
- package/dist/pptx/chunk-G5NEBI7N.mjs +135 -0
- package/dist/pptx/{chunk-CK6RYGB4.cjs → chunk-GYI2TFSW.cjs} +3 -126
- package/dist/pptx/{chunk-7FTP7OOA.mjs → chunk-HGT3CA36.mjs} +6221 -5845
- package/dist/pptx/{chunk-YZWKNFPU.cjs → chunk-HTFYAGHG.cjs} +2864 -167
- package/dist/pptx/{chunk-JP26TA3Q.cjs → chunk-LOUVYGWX.cjs} +12 -12
- package/dist/pptx/{chunk-UGSMMZU6.cjs → chunk-MZCAYJ7H.cjs} +49 -49
- package/dist/pptx/{chunk-BA4CJI4U.mjs → chunk-S6P7UWGZ.mjs} +3 -115
- package/dist/pptx/{chunk-ZHVKGGLQ.cjs → chunk-UFJBHFSD.cjs} +3 -0
- package/dist/pptx/{chunk-TW5UQCZS.mjs → chunk-XL5AF4U3.mjs} +2750 -175
- package/dist/pptx/dom/elements/connector.d.ts.map +1 -1
- package/dist/pptx/dom/elements/equation.d.ts.map +1 -1
- package/dist/pptx/dom/elements/media.d.ts.map +1 -1
- package/dist/pptx/dom/elements/ole.d.ts.map +1 -1
- package/dist/pptx/dom/elements/reflection-mirror-content.d.ts.map +1 -1
- package/dist/pptx/dom/elements/shape-filter-defs.d.ts +5 -0
- package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
- package/dist/pptx/dom/elements/table.d.ts.map +1 -1
- package/dist/pptx/dom/elements/text-shape.d.ts.map +1 -1
- package/dist/pptx/dom/elements/text-warp.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +546 -459
- package/dist/pptx/dom/index.mjs +136 -50
- package/dist/pptx/export/html2canvas-clone.cjs +7 -6
- package/dist/pptx/export/html2canvas-clone.mjs +2 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3917 -3664
- package/dist/pptx/index.mjs +6 -5
- package/dist/pptx/render/chart-combo-stock.cjs +4 -3
- package/dist/pptx/render/chart-combo-stock.mjs +2 -1
- package/dist/pptx/render/chart-overlays.cjs +8 -7
- package/dist/pptx/render/chart-overlays.mjs +2 -1
- package/dist/pptx/render/chart-surface-treemap.cjs +5 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +2 -1
- package/dist/pptx/render/chart-view-model.cjs +45 -44
- package/dist/pptx/render/chart-view-model.mjs +2 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +7 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +2 -1
- package/dist/pptx/render/connector-dash.d.ts +17 -1
- package/dist/pptx/render/connector-dash.d.ts.map +1 -1
- package/dist/pptx/render/connector-path.d.ts +2 -2
- package/dist/pptx/render/connector-path.d.ts.map +1 -1
- package/dist/pptx/render/connector-style.d.ts +4 -2
- package/dist/pptx/render/connector-style.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-controller.d.ts +8 -0
- package/dist/pptx/render/customization/customization-controller.d.ts.map +1 -1
- package/dist/pptx/render/dash-path-start.d.ts +38 -0
- package/dist/pptx/render/dash-path-start.d.ts.map +1 -0
- package/dist/pptx/render/dash-pattern.d.ts +10 -0
- package/dist/pptx/render/dash-pattern.d.ts.map +1 -0
- package/dist/pptx/render/dash-square-cap.d.ts +34 -0
- package/dist/pptx/render/dash-square-cap.d.ts.map +1 -0
- package/dist/pptx/render/deck-webfont-outlines.d.ts +25 -0
- package/dist/pptx/render/deck-webfont-outlines.d.ts.map +1 -0
- package/dist/pptx/render/deck-webfont-readiness.d.ts +59 -0
- package/dist/pptx/render/deck-webfont-readiness.d.ts.map +1 -0
- package/dist/pptx/render/device-pixel-exact.d.ts +34 -0
- package/dist/pptx/render/device-pixel-exact.d.ts.map +1 -0
- package/dist/pptx/render/device-pixel-group.d.ts +42 -0
- package/dist/pptx/render/device-pixel-group.d.ts.map +1 -0
- package/dist/pptx/render/device-pixel-stroke.d.ts +21 -3
- package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -1
- package/dist/pptx/render/element-style-transform.d.ts +6 -5
- package/dist/pptx/render/element-style-transform.d.ts.map +1 -1
- package/dist/pptx/render/embedded-fonts-sheet.d.ts +6 -0
- package/dist/pptx/render/embedded-fonts-sheet.d.ts.map +1 -1
- package/dist/pptx/render/equation-box-style.d.ts +23 -0
- package/dist/pptx/render/equation-box-style.d.ts.map +1 -0
- package/dist/pptx/render/fill-style.d.ts +22 -1
- package/dist/pptx/render/fill-style.d.ts.map +1 -1
- package/dist/pptx/render/font-line-gap.d.ts +0 -18
- package/dist/pptx/render/font-line-gap.d.ts.map +1 -1
- package/dist/pptx/render/google-webfonts.d.ts +11 -1
- package/dist/pptx/render/google-webfonts.d.ts.map +1 -1
- package/dist/pptx/render/gradient-svg-image.d.ts +29 -0
- package/dist/pptx/render/gradient-svg-image.d.ts.map +1 -0
- package/dist/pptx/render/group-fill.d.ts.map +1 -1
- package/dist/pptx/render/hollow-shape-hit-test.d.ts +23 -1
- package/dist/pptx/render/hollow-shape-hit-test.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +15 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/linked-text-box-overflow.d.ts +20 -5
- package/dist/pptx/render/linked-text-box-overflow.d.ts.map +1 -1
- package/dist/pptx/render/media-control-bar.d.ts +41 -0
- package/dist/pptx/render/media-control-bar.d.ts.map +1 -0
- package/dist/pptx/render/media-playback.d.ts +6 -6
- package/dist/pptx/render/media-playback.d.ts.map +1 -1
- package/dist/pptx/render/morph-animation.d.ts.map +1 -1
- package/dist/pptx/render/morph-carry.d.ts.map +1 -1
- package/dist/pptx/render/morph-connector-carry.d.ts +43 -0
- package/dist/pptx/render/morph-connector-carry.d.ts.map +1 -0
- package/dist/pptx/render/morph-effect-carry.d.ts +2 -0
- package/dist/pptx/render/morph-effect-carry.d.ts.map +1 -1
- package/dist/pptx/render/morph-effect-silhouette.d.ts +23 -0
- package/dist/pptx/render/morph-effect-silhouette.d.ts.map +1 -0
- package/dist/pptx/render/morph-geometry-key.d.ts.map +1 -1
- package/dist/pptx/render/morph-line-carry.d.ts +27 -0
- package/dist/pptx/render/morph-line-carry.d.ts.map +1 -1
- package/dist/pptx/render/morph-line-ends.d.ts +27 -0
- package/dist/pptx/render/morph-line-ends.d.ts.map +1 -0
- package/dist/pptx/render/morph-line-reach.d.ts +72 -0
- package/dist/pptx/render/morph-line-reach.d.ts.map +1 -0
- package/dist/pptx/render/morph-overlay-order.d.ts.map +1 -1
- package/dist/pptx/render/morph-plan-css.d.ts +0 -7
- package/dist/pptx/render/morph-plan-css.d.ts.map +1 -1
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/render/morph-shape-carry.d.ts.map +1 -1
- package/dist/pptx/render/options/font-download-policy.d.ts +52 -0
- package/dist/pptx/render/options/font-download-policy.d.ts.map +1 -0
- package/dist/pptx/render/options/index.d.ts +1 -0
- package/dist/pptx/render/options/index.d.ts.map +1 -1
- package/dist/pptx/render/options/viewer-options-tabs-advanced.d.ts.map +1 -1
- package/dist/pptx/render/options/viewer-options.d.ts +2 -0
- package/dist/pptx/render/options/viewer-options.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-baseline.d.ts +46 -2
- package/dist/pptx/render/paragraph-baseline.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-run-build.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-trailing-break.d.ts +15 -0
- package/dist/pptx/render/paragraph-trailing-break.d.ts.map +1 -0
- package/dist/pptx/render/path-gradient-rect.d.ts +1 -1
- package/dist/pptx/render/path-gradient-rect.d.ts.map +1 -1
- package/dist/pptx/render/shape-geometry-base.d.ts +73 -0
- package/dist/pptx/render/shape-geometry-base.d.ts.map +1 -0
- package/dist/pptx/render/shape-geometry-cascade.d.ts +7 -37
- package/dist/pptx/render/shape-geometry-cascade.d.ts.map +1 -1
- package/dist/pptx/render/shape-path-gradient-fill.d.ts +20 -0
- package/dist/pptx/render/shape-path-gradient-fill.d.ts.map +1 -0
- package/dist/pptx/render/silhouette-effects.d.ts +118 -0
- package/dist/pptx/render/silhouette-effects.d.ts.map +1 -0
- package/dist/pptx/render/silhouette-fill-layer.d.ts +19 -0
- package/dist/pptx/render/silhouette-fill-layer.d.ts.map +1 -0
- package/dist/pptx/render/silhouette-morph-refresh.d.ts +6 -0
- package/dist/pptx/render/silhouette-morph-refresh.d.ts.map +1 -0
- package/dist/pptx/render/silhouette-morph-registry.d.ts +36 -0
- package/dist/pptx/render/silhouette-morph-registry.d.ts.map +1 -0
- package/dist/pptx/render/stroke-only-preset.d.ts +22 -0
- package/dist/pptx/render/stroke-only-preset.d.ts.map +1 -1
- package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
- package/dist/pptx/render/subpath-fill-overlay.d.ts +11 -5
- package/dist/pptx/render/subpath-fill-overlay.d.ts.map +1 -1
- package/dist/pptx/render/subpath-geometry.d.ts +38 -0
- package/dist/pptx/render/subpath-geometry.d.ts.map +1 -0
- package/dist/pptx/render/svg-attr-escape.d.ts +30 -0
- package/dist/pptx/render/svg-attr-escape.d.ts.map +1 -0
- package/dist/pptx/render/svg-gradient-paint.d.ts +6 -1
- package/dist/pptx/render/svg-gradient-paint.d.ts.map +1 -1
- package/dist/pptx/render/svg-id-scope.d.ts +8 -0
- package/dist/pptx/render/svg-id-scope.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-baseline.d.ts +37 -0
- package/dist/pptx/render/table-cell-baseline.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-border-inset.d.ts +21 -0
- package/dist/pptx/render/table-cell-border-inset.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-css.d.ts.map +1 -1
- package/dist/pptx/render/table-cell-paragraphs.d.ts +13 -1
- package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -1
- package/dist/pptx/render/table-style-bg-settle.d.ts +43 -0
- package/dist/pptx/render/table-style-bg-settle.d.ts.map +1 -0
- package/dist/pptx/render/table-style-bg-span.d.ts +26 -0
- package/dist/pptx/render/table-style-bg-span.d.ts.map +1 -0
- package/dist/pptx/render/table-style-borders.d.ts.map +1 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts +1 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts.map +1 -1
- package/dist/pptx/render/table-style-fill.d.ts.map +1 -1
- package/dist/pptx/render/table-style-shadow.d.ts +20 -0
- package/dist/pptx/render/table-style-shadow.d.ts.map +1 -0
- package/dist/pptx/render/table-style-theme-refs.d.ts.map +1 -1
- package/dist/pptx/render/table-style.d.ts +9 -0
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/render/text-block-style.d.ts +5 -0
- package/dist/pptx/render/text-block-style.d.ts.map +1 -1
- package/dist/pptx/render/text-body-top-snap.d.ts +43 -0
- package/dist/pptx/render/text-body-top-snap.d.ts.map +1 -0
- package/dist/pptx/render/text-design-tracking.d.ts +20 -0
- package/dist/pptx/render/text-design-tracking.d.ts.map +1 -0
- package/dist/pptx/render/text-line-height.d.ts +8 -0
- package/dist/pptx/render/text-line-height.d.ts.map +1 -1
- package/dist/pptx/render/text-metric-tracking.d.ts.map +1 -1
- package/dist/pptx/render/text-paragraphs.d.ts +11 -1
- package/dist/pptx/render/text-paragraphs.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-arch-fit.d.ts +51 -0
- package/dist/pptx/render/text-warp-arch-fit.d.ts.map +1 -0
- package/dist/pptx/render/text-warp-arch.d.ts +65 -0
- package/dist/pptx/render/text-warp-arch.d.ts.map +1 -0
- package/dist/pptx/render/text-warp-closed-paths.d.ts +53 -0
- package/dist/pptx/render/text-warp-closed-paths.d.ts.map +1 -0
- package/dist/pptx/render/text-warp-envelope-curves.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-map.d.ts +12 -0
- package/dist/pptx/render/text-warp-envelope-map.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-envelope-measure.d.ts +5 -0
- package/dist/pptx/render/text-warp-envelope-measure.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-glyph-outline.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-outline-webfont-fetch.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-polygon-clip.d.ts +21 -0
- package/dist/pptx/render/text-warp-polygon-clip.d.ts.map +1 -0
- package/dist/pptx/render/text-warp-preset-definitions-extra.d.ts +21 -0
- package/dist/pptx/render/text-warp-preset-definitions-extra.d.ts.map +1 -0
- package/dist/pptx/render/text-warp-preset-definitions.d.ts +19 -0
- package/dist/pptx/render/text-warp-preset-definitions.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-preset-sampler.d.ts.map +1 -1
- package/dist/pptx/render/text-warp-run-paint.d.ts +19 -0
- package/dist/pptx/render/text-warp-run-paint.d.ts.map +1 -0
- package/dist/pptx/render/text-warp.d.ts +3 -1
- package/dist/pptx/render/text-warp.d.ts.map +1 -1
- package/dist/pptx/render/visual-effects.d.ts +11 -21
- package/dist/pptx/render/visual-effects.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-UP6DYY42.cjs → smartart-insert-preview-R7USUBIX.cjs} +8 -7
- package/dist/pptx/{smartart-insert-preview-DXFDFDSC.mjs → smartart-insert-preview-ZKVFXFSI.mjs} +7 -6
- package/dist/teams.js +2 -2
- package/dist/visio.js +23 -6
- package/dist/xlsx.js +7 -7
- package/package.json +2 -2
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkMZCAYJ7H_cjs = require('../chunk-MZCAYJ7H.cjs');
|
|
4
|
+
var chunkCWBVJ4DC_cjs = require('../chunk-CWBVJ4DC.cjs');
|
|
5
|
+
var chunkLOUVYGWX_cjs = require('../chunk-LOUVYGWX.cjs');
|
|
6
6
|
require('../chunk-XOAXPD2W.cjs');
|
|
7
7
|
require('../chunk-W3X2UVYQ.cjs');
|
|
8
8
|
require('../chunk-WSTWYZFM.cjs');
|
|
@@ -22,11 +22,12 @@ require('../chunk-FFWLDANS.cjs');
|
|
|
22
22
|
require('../chunk-ZJFN5POF.cjs');
|
|
23
23
|
require('../chunk-OJFD3SHS.cjs');
|
|
24
24
|
require('../chunk-USBRSEJK.cjs');
|
|
25
|
-
var
|
|
25
|
+
var chunkHTFYAGHG_cjs = require('../chunk-HTFYAGHG.cjs');
|
|
26
26
|
var chunkFOE75Z6N_cjs = require('../chunk-FOE75Z6N.cjs');
|
|
27
27
|
var chunkNTXHQHCS_cjs = require('../chunk-NTXHQHCS.cjs');
|
|
28
|
-
|
|
28
|
+
require('../chunk-GYI2TFSW.cjs');
|
|
29
29
|
require('../chunk-G4WRLFMJ.cjs');
|
|
30
|
+
var chunkFI2ATACZ_cjs = require('../chunk-FI2ATACZ.cjs');
|
|
30
31
|
require('../chunk-HJ3JZXOL.cjs');
|
|
31
32
|
require('../chunk-73IDQGYI.cjs');
|
|
32
33
|
var chunk3CYWRMYZ_cjs = require('../chunk-3CYWRMYZ.cjs');
|
|
@@ -36,21 +37,21 @@ require('../chunk-UPN5FFKP.cjs');
|
|
|
36
37
|
require('../chunk-FQUX6AUU.cjs');
|
|
37
38
|
require('../chunk-XZSGVMRN.cjs');
|
|
38
39
|
var chunkU47LRWDT_cjs = require('../chunk-U47LRWDT.cjs');
|
|
39
|
-
var
|
|
40
|
+
var chunkUFJBHFSD_cjs = require('../chunk-UFJBHFSD.cjs');
|
|
40
41
|
require('../chunk-3RIGT7H6.cjs');
|
|
41
42
|
require('../chunk-PBZWDEXQ.cjs');
|
|
42
43
|
var pptx = require('ooxml-core/pptx');
|
|
43
44
|
|
|
44
45
|
// src/pptx/dom/activex-controls-overlay.ts
|
|
45
46
|
function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
46
|
-
const overlay =
|
|
47
|
+
const overlay = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-activex-overlay", {
|
|
47
48
|
position: "absolute",
|
|
48
49
|
inset: "0",
|
|
49
50
|
pointerEvents: "none",
|
|
50
51
|
zIndex: "40"
|
|
51
52
|
});
|
|
52
53
|
controls.forEach((control, index) => {
|
|
53
|
-
const view =
|
|
54
|
+
const view = chunkCWBVJ4DC_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
54
55
|
const style = {
|
|
55
56
|
position: "absolute",
|
|
56
57
|
left: `${view.left}px`,
|
|
@@ -59,7 +60,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
59
60
|
height: `${view.height}px`
|
|
60
61
|
};
|
|
61
62
|
if (view.className === "image" && view.imageUrl) {
|
|
62
|
-
const img =
|
|
63
|
+
const img = chunkMZCAYJ7H_cjs.createEl(doc, "img", "pptxv-activex-overlay-image", style);
|
|
63
64
|
img.src = view.imageUrl;
|
|
64
65
|
img.alt = view.label;
|
|
65
66
|
img.setAttribute("draggable", "false");
|
|
@@ -67,7 +68,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
67
68
|
overlay.appendChild(img);
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
|
-
const badge =
|
|
71
|
+
const badge = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-activex-overlay-placeholder", style);
|
|
71
72
|
badge.title = `ActiveX control: ${view.label} (interactive controls are not supported in the viewer)`;
|
|
72
73
|
badge.textContent = view.label;
|
|
73
74
|
overlay.appendChild(badge);
|
|
@@ -80,25 +81,25 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
80
81
|
if (comments.length === 0) {
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
83
|
-
const overlay =
|
|
84
|
+
const overlay = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-comment-markers", {
|
|
84
85
|
position: "absolute",
|
|
85
86
|
inset: "0",
|
|
86
87
|
pointerEvents: "none",
|
|
87
88
|
zIndex: "45"
|
|
88
89
|
});
|
|
89
|
-
const markers =
|
|
90
|
+
const markers = chunkCWBVJ4DC_cjs.buildCommentMarkers(
|
|
90
91
|
comments,
|
|
91
92
|
canvasSize.width,
|
|
92
93
|
canvasSize.height,
|
|
93
94
|
t("pptx.comments.unknownAuthor")
|
|
94
95
|
);
|
|
95
96
|
for (const marker of markers) {
|
|
96
|
-
const dot =
|
|
97
|
+
const dot = chunkMZCAYJ7H_cjs.createEl(doc, "button", "pptxv-comment-marker", {
|
|
97
98
|
position: "absolute",
|
|
98
|
-
left: `${marker.x -
|
|
99
|
-
top: `${marker.y -
|
|
100
|
-
width: `${
|
|
101
|
-
height: `${
|
|
99
|
+
left: `${marker.x - chunkCWBVJ4DC_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
100
|
+
top: `${marker.y - chunkCWBVJ4DC_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
101
|
+
width: `${chunkCWBVJ4DC_cjs.COMMENT_MARKER_SIZE}px`,
|
|
102
|
+
height: `${chunkCWBVJ4DC_cjs.COMMENT_MARKER_SIZE}px`,
|
|
102
103
|
display: "flex",
|
|
103
104
|
alignItems: "center",
|
|
104
105
|
justifyContent: "center",
|
|
@@ -165,7 +166,7 @@ function merge3dStyle(base, computed) {
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
168
|
-
const frame =
|
|
169
|
+
const frame = chunkCWBVJ4DC_cjs.getFrameEffectStyle(el);
|
|
169
170
|
if (frame) {
|
|
170
171
|
return { ...frame };
|
|
171
172
|
}
|
|
@@ -175,13 +176,13 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
175
176
|
const ss = el.shapeStyle;
|
|
176
177
|
const style = {};
|
|
177
178
|
if (ss) {
|
|
178
|
-
const fill = animatesFill ? void 0 :
|
|
179
|
+
const fill = animatesFill ? void 0 : chunkHTFYAGHG_cjs.getComputedFillStyle(el);
|
|
179
180
|
for (const [key, value] of Object.entries(fill ?? {})) {
|
|
180
181
|
if (value !== void 0) {
|
|
181
182
|
style[key] = value;
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
|
-
const stroke =
|
|
185
|
+
const stroke = chunkHTFYAGHG_cjs.getComputedStrokeStyle(el);
|
|
185
186
|
if (stroke.borderWidth > 0) {
|
|
186
187
|
if (animatesStroke) {
|
|
187
188
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -200,7 +201,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
200
201
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
|
-
const fx =
|
|
204
|
+
const fx = chunkHTFYAGHG_cjs.getComputedEffectStyle(el);
|
|
204
205
|
if (fx.boxShadow) {
|
|
205
206
|
style["boxShadow"] = fx.boxShadow;
|
|
206
207
|
}
|
|
@@ -217,11 +218,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
217
218
|
if (fx.overflowVisible) {
|
|
218
219
|
style["overflow"] = "visible";
|
|
219
220
|
}
|
|
220
|
-
merge3dStyle(style,
|
|
221
|
-
if (
|
|
221
|
+
merge3dStyle(style, chunkCWBVJ4DC_cjs.getComputed3dStyle(el));
|
|
222
|
+
if (chunkCWBVJ4DC_cjs.passesClicksThroughBox(el)) {
|
|
222
223
|
style["pointerEvents"] = "none";
|
|
223
224
|
}
|
|
224
|
-
const geometry =
|
|
225
|
+
const geometry = chunkCWBVJ4DC_cjs.resolveShapeGeometry(el);
|
|
225
226
|
switch (geometry.kind) {
|
|
226
227
|
case "bare":
|
|
227
228
|
style["backgroundColor"] = "transparent";
|
|
@@ -241,10 +242,10 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
241
242
|
case "lineEdge":
|
|
242
243
|
style["backgroundColor"] = "transparent";
|
|
243
244
|
style["border"] = "none";
|
|
244
|
-
style["borderTop"] =
|
|
245
|
+
style["borderTop"] = chunkFI2ATACZ_cjs.screenBorder(
|
|
245
246
|
geometry.strokeWidth,
|
|
246
|
-
|
|
247
|
-
el.shapeStyle?.strokeColor ??
|
|
247
|
+
chunkHTFYAGHG_cjs.getCssBorderDashStyle(el.shapeStyle?.strokeDash),
|
|
248
|
+
el.shapeStyle?.strokeColor ?? chunkHTFYAGHG_cjs.DEFAULT_STROKE_COLOR
|
|
248
249
|
);
|
|
249
250
|
return style;
|
|
250
251
|
default:
|
|
@@ -255,17 +256,17 @@ function getTextBlockStyle(el) {
|
|
|
255
256
|
if (!pptx.hasTextProperties(el)) {
|
|
256
257
|
return {};
|
|
257
258
|
}
|
|
258
|
-
const base =
|
|
259
|
-
fallbackColor:
|
|
259
|
+
const base = chunkCWBVJ4DC_cjs.buildTextBlockStyle(el, {
|
|
260
|
+
fallbackColor: chunkHTFYAGHG_cjs.DEFAULT_TEXT_COLOR,
|
|
260
261
|
bodyLayout: true,
|
|
261
262
|
pxLengths: true
|
|
262
263
|
});
|
|
263
|
-
const scene3d =
|
|
264
|
+
const scene3d = chunkCWBVJ4DC_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
264
265
|
if (!scene3d) {
|
|
265
266
|
return base;
|
|
266
267
|
}
|
|
267
268
|
const merged = { ...base, ...scene3d };
|
|
268
|
-
const transform =
|
|
269
|
+
const transform = chunkMZCAYJ7H_cjs.composeTransforms(base.transform, scene3d.transform);
|
|
269
270
|
if (transform !== void 0) {
|
|
270
271
|
merged.transform = transform;
|
|
271
272
|
}
|
|
@@ -277,7 +278,7 @@ var subscriptions = /* @__PURE__ */ new WeakMap();
|
|
|
277
278
|
function subscribeChartPixelRepaint(container, repaint) {
|
|
278
279
|
const entry = { container, unsubscribe: () => {
|
|
279
280
|
} };
|
|
280
|
-
entry.unsubscribe =
|
|
281
|
+
entry.unsubscribe = chunkHTFYAGHG_cjs.subscribeBarFacePicturePixelSamples(() => {
|
|
281
282
|
if (!entry.container.isConnected) {
|
|
282
283
|
disposeChartPixelSubscriptions(entry.container);
|
|
283
284
|
return;
|
|
@@ -353,7 +354,7 @@ function renderSlideStage(options) {
|
|
|
353
354
|
const { document: doc, slide, canvasSize, mediaDataUrls, registry, t } = options;
|
|
354
355
|
const scale = options.scale ?? 1;
|
|
355
356
|
const interactive = options.interactive ?? false;
|
|
356
|
-
const stage =
|
|
357
|
+
const stage = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-stage", {
|
|
357
358
|
width: `${canvasSize.width}px`,
|
|
358
359
|
height: `${canvasSize.height}px`,
|
|
359
360
|
transform: `scale(${scale})`,
|
|
@@ -369,8 +370,8 @@ function renderSlideStage(options) {
|
|
|
369
370
|
"--pptx-slide-h": `${canvasSize.height}px`,
|
|
370
371
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
371
372
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
372
|
-
...
|
|
373
|
-
...
|
|
373
|
+
...chunkFI2ATACZ_cjs.deviceStrokeStageStyle(scale),
|
|
374
|
+
...chunkCWBVJ4DC_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
374
375
|
});
|
|
375
376
|
if (interactive || options.reading) {
|
|
376
377
|
stage.setAttribute("role", "region");
|
|
@@ -411,10 +412,10 @@ function renderSlideStage(options) {
|
|
|
411
412
|
chartPartSelection: options.chartPartSelection,
|
|
412
413
|
onChartPartSelect: options.onChartPartSelect,
|
|
413
414
|
selectedElementIds: options.selectedElementIds,
|
|
414
|
-
edgeBleeds:
|
|
415
|
+
edgeBleeds: chunkCWBVJ4DC_cjs.resolveStageEdgeBleeds(void 0, slide, options.selectedElementIds),
|
|
415
416
|
registry,
|
|
416
417
|
renderElement(element, zIndex) {
|
|
417
|
-
if (!
|
|
418
|
+
if (!chunkCWBVJ4DC_cjs.isElementRendered(element)) {
|
|
418
419
|
return null;
|
|
419
420
|
}
|
|
420
421
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
@@ -426,10 +427,10 @@ function renderSlideStage(options) {
|
|
|
426
427
|
}
|
|
427
428
|
node.setAttribute("data-pptx-element", "true");
|
|
428
429
|
}
|
|
429
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
430
|
-
const hitTargetStyle =
|
|
430
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkCWBVJ4DC_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
431
|
+
const hitTargetStyle = chunkCWBVJ4DC_cjs.elementHitTargetStyle(element);
|
|
431
432
|
if (hitTargetStyle) {
|
|
432
|
-
const hitTarget =
|
|
433
|
+
const hitTarget = chunkMZCAYJ7H_cjs.createEl(doc, "div", void 0, hitTargetStyle);
|
|
433
434
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
434
435
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
435
436
|
node.appendChild(hitTarget);
|
|
@@ -447,12 +448,12 @@ function renderSlideStage(options) {
|
|
|
447
448
|
}
|
|
448
449
|
});
|
|
449
450
|
if (interactive || options.reading) {
|
|
450
|
-
|
|
451
|
+
chunkCWBVJ4DC_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
451
452
|
presenting: options.presenting ?? false
|
|
452
453
|
});
|
|
453
454
|
}
|
|
454
455
|
if (interactive) {
|
|
455
|
-
|
|
456
|
+
chunkCWBVJ4DC_cjs.applyElementActionAffordances(
|
|
456
457
|
stage,
|
|
457
458
|
slide.elements.filter(
|
|
458
459
|
(element) => options.templateEditing || !chunk3CYWRMYZ_cjs.isTemplateElementId(element.id)
|
|
@@ -460,7 +461,7 @@ function renderSlideStage(options) {
|
|
|
460
461
|
{
|
|
461
462
|
canInteract: true,
|
|
462
463
|
presenting: options.presenting ?? false,
|
|
463
|
-
labels:
|
|
464
|
+
labels: chunkCWBVJ4DC_cjs.actionAffordanceLabels((key) => t(key))
|
|
464
465
|
}
|
|
465
466
|
);
|
|
466
467
|
}
|
|
@@ -537,13 +538,13 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
537
538
|
if (!context.selectedElementIds?.has(element.id)) {
|
|
538
539
|
return;
|
|
539
540
|
}
|
|
540
|
-
|
|
541
|
-
container.classList.add(
|
|
541
|
+
chunkLOUVYGWX_cjs.ensureChartInteractionStyles();
|
|
542
|
+
container.classList.add(chunkLOUVYGWX_cjs.CHART_INTERACTIVE_CLASS);
|
|
542
543
|
let active = null;
|
|
543
544
|
let activeMark = null;
|
|
544
545
|
let selected = context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
545
546
|
let badge = null;
|
|
546
|
-
|
|
547
|
+
chunkLOUVYGWX_cjs.applyChartPartHighlight(container, selected);
|
|
547
548
|
const showBadge = (text) => {
|
|
548
549
|
if (!badge) {
|
|
549
550
|
badge = container.ownerDocument.createElement("div");
|
|
@@ -567,26 +568,26 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
567
568
|
if (!rect) {
|
|
568
569
|
return;
|
|
569
570
|
}
|
|
570
|
-
const step2 =
|
|
571
|
+
const step2 = chunkCWBVJ4DC_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
571
572
|
if (!step2) {
|
|
572
573
|
return;
|
|
573
574
|
}
|
|
574
575
|
repaint(step2.chartData);
|
|
575
|
-
|
|
576
|
-
showBadge(
|
|
576
|
+
chunkLOUVYGWX_cjs.applyChartPartHighlight(container, selected);
|
|
577
|
+
showBadge(chunkHTFYAGHG_cjs.formatAxisValue(step2.value));
|
|
577
578
|
return;
|
|
578
579
|
}
|
|
579
580
|
if (!active) {
|
|
580
581
|
return;
|
|
581
582
|
}
|
|
582
583
|
const height = container.querySelector("svg")?.getBoundingClientRect().height ?? 0;
|
|
583
|
-
const step =
|
|
584
|
+
const step = chunkLOUVYGWX_cjs.advanceChartValueDrag(active, event.clientY, height);
|
|
584
585
|
if (!step) {
|
|
585
586
|
return;
|
|
586
587
|
}
|
|
587
588
|
repaint(step.chartData);
|
|
588
|
-
|
|
589
|
-
showBadge(
|
|
589
|
+
chunkLOUVYGWX_cjs.applyChartPartHighlight(container, selected);
|
|
590
|
+
showBadge(chunkHTFYAGHG_cjs.formatAxisValue(step.value));
|
|
590
591
|
};
|
|
591
592
|
const onUp = () => {
|
|
592
593
|
if (active || activeMark) {
|
|
@@ -612,12 +613,12 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
612
613
|
}
|
|
613
614
|
if ((finished?.moved || finishedMark?.moved) && chart.chartData) {
|
|
614
615
|
repaint(chart.chartData);
|
|
615
|
-
|
|
616
|
+
chunkLOUVYGWX_cjs.applyChartPartHighlight(container, selected);
|
|
616
617
|
}
|
|
617
618
|
}
|
|
618
619
|
const openTitleEditor = createChartTitleEditor(container, (value) => {
|
|
619
620
|
if (chart.chartData) {
|
|
620
|
-
context.onChartPointChange?.(element,
|
|
621
|
+
context.onChartPointChange?.(element, chunkLOUVYGWX_cjs.withChartTitle(chart.chartData, value));
|
|
621
622
|
}
|
|
622
623
|
});
|
|
623
624
|
const requestFormat = (event, open) => {
|
|
@@ -626,7 +627,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
626
627
|
bubbles: true,
|
|
627
628
|
detail: {
|
|
628
629
|
elementId: element.id,
|
|
629
|
-
target:
|
|
630
|
+
target: chunkCWBVJ4DC_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
630
631
|
open
|
|
631
632
|
}
|
|
632
633
|
})
|
|
@@ -649,19 +650,19 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
649
650
|
});
|
|
650
651
|
container.addEventListener("pointerdown", (event) => {
|
|
651
652
|
requestFormat(event, false);
|
|
652
|
-
const part =
|
|
653
|
+
const part = chunkLOUVYGWX_cjs.findChartPartTarget(event.target);
|
|
653
654
|
if (!part || !chart.chartData) {
|
|
654
655
|
return;
|
|
655
656
|
}
|
|
656
657
|
event.stopPropagation();
|
|
657
658
|
selected = part;
|
|
658
|
-
|
|
659
|
+
chunkLOUVYGWX_cjs.applyChartPartHighlight(container, selected);
|
|
659
660
|
context.onChartPartSelect?.(element, part);
|
|
660
|
-
const vm =
|
|
661
|
+
const vm = chunkHTFYAGHG_cjs.buildChartViewModel(chart);
|
|
661
662
|
let captured = false;
|
|
662
|
-
const chartKind =
|
|
663
|
+
const chartKind = chunkHTFYAGHG_cjs.resolveChartKind(chart.chartData.chartType ?? "bar");
|
|
663
664
|
if (part.pointIndex !== void 0 && chartKind !== "unsupported") {
|
|
664
|
-
const markGeometry =
|
|
665
|
+
const markGeometry = chunkLOUVYGWX_cjs.buildChartMarkDragGeometry({
|
|
665
666
|
kind: chartKind,
|
|
666
667
|
element: chart,
|
|
667
668
|
chartData: chart.chartData,
|
|
@@ -669,7 +670,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
669
670
|
seriesIndex: part.seriesIndex,
|
|
670
671
|
pointIndex: part.pointIndex
|
|
671
672
|
});
|
|
672
|
-
const startedMark =
|
|
673
|
+
const startedMark = chunkCWBVJ4DC_cjs.beginChartMarkDrag({
|
|
673
674
|
part,
|
|
674
675
|
geometry: markGeometry,
|
|
675
676
|
chartData: chart.chartData,
|
|
@@ -684,7 +685,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
684
685
|
}
|
|
685
686
|
}
|
|
686
687
|
if (!captured) {
|
|
687
|
-
const started =
|
|
688
|
+
const started = chunkLOUVYGWX_cjs.beginChartValueDrag({
|
|
688
689
|
part,
|
|
689
690
|
viewModel: vm,
|
|
690
691
|
chartData: chart.chartData,
|
|
@@ -713,17 +714,17 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
713
714
|
// src/pptx/dom/elements/chart.ts
|
|
714
715
|
var renderChartElement = (element, zIndex, context) => {
|
|
715
716
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
716
|
-
const spec = wrapper ?
|
|
717
|
+
const spec = wrapper ? chunkCWBVJ4DC_cjs.resolveChartThreeViewSpec(element, chunkMZCAYJ7H_cjs.rendering3DFlagsOf(context)) : null;
|
|
717
718
|
if (!wrapper || !spec) {
|
|
718
719
|
return wrapper;
|
|
719
720
|
}
|
|
720
|
-
const view =
|
|
721
|
+
const view = chunkMZCAYJ7H_cjs.mountThreeViewInto(context.document, wrapper, {
|
|
721
722
|
spec,
|
|
722
|
-
interactive:
|
|
723
|
-
selectedPart:
|
|
723
|
+
interactive: chunkMZCAYJ7H_cjs.isChart3DEditable(element, context),
|
|
724
|
+
selectedPart: chunkMZCAYJ7H_cjs.selectedChartPartOf(element, context),
|
|
724
725
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
725
726
|
});
|
|
726
|
-
|
|
727
|
+
chunkMZCAYJ7H_cjs.wireChartThreeViewEvents(view, element, context, wrapper);
|
|
727
728
|
return wrapper;
|
|
728
729
|
};
|
|
729
730
|
var renderChartSvgElement = (element, zIndex, context) => {
|
|
@@ -731,21 +732,21 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
731
732
|
return null;
|
|
732
733
|
}
|
|
733
734
|
const doc = context.document;
|
|
734
|
-
const container =
|
|
735
|
+
const container = chunkMZCAYJ7H_cjs.createEl(
|
|
735
736
|
doc,
|
|
736
737
|
"div",
|
|
737
738
|
"pptxv-element pptxv-chart",
|
|
738
739
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
739
|
-
{ ...
|
|
740
|
+
{ ...chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex), ...chunkCWBVJ4DC_cjs.getFrameEffectStyle(element) }
|
|
740
741
|
);
|
|
741
742
|
container.dataset.elementId = element.id;
|
|
742
743
|
const animationState = context.presentationStates?.get(element.id);
|
|
743
|
-
const chartData = element.chartData ?
|
|
744
|
+
const chartData = element.chartData ? chunkCWBVJ4DC_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
744
745
|
if (!chartData || chartData.series.length === 0) {
|
|
745
746
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
746
747
|
return container;
|
|
747
748
|
}
|
|
748
|
-
const kind =
|
|
749
|
+
const kind = chunkHTFYAGHG_cjs.resolveChartKind(chartData.chartType ?? "bar");
|
|
749
750
|
if (kind === "unsupported") {
|
|
750
751
|
container.appendChild(renderChartPlaceholder(doc, chartData.chartType, context.t));
|
|
751
752
|
return container;
|
|
@@ -758,9 +759,9 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
758
759
|
};
|
|
759
760
|
target.querySelector("svg")?.remove();
|
|
760
761
|
target.appendChild(
|
|
761
|
-
|
|
762
|
+
chunkLOUVYGWX_cjs.renderChartViewModelSvg(
|
|
762
763
|
doc,
|
|
763
|
-
|
|
764
|
+
chunkHTFYAGHG_cjs.buildChartViewModel(themedElement),
|
|
764
765
|
preserveAspectRatio,
|
|
765
766
|
(key) => context.t(key)
|
|
766
767
|
)
|
|
@@ -772,10 +773,10 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
772
773
|
return container;
|
|
773
774
|
};
|
|
774
775
|
function resolveChartPalette2(chartData) {
|
|
775
|
-
return
|
|
776
|
+
return chunkHTFYAGHG_cjs.resolveChartPalette(chartData);
|
|
776
777
|
}
|
|
777
778
|
function renderChartPlaceholder(doc, chartType, t) {
|
|
778
|
-
const placeholder =
|
|
779
|
+
const placeholder = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-placeholder pptxv-chart-placeholder", {
|
|
779
780
|
display: "flex",
|
|
780
781
|
alignItems: "center",
|
|
781
782
|
justifyContent: "center",
|
|
@@ -787,7 +788,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
787
788
|
border: "1px dashed #cbd5e1",
|
|
788
789
|
boxSizing: "border-box"
|
|
789
790
|
});
|
|
790
|
-
placeholder.textContent =
|
|
791
|
+
placeholder.textContent = chunkCWBVJ4DC_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
791
792
|
return placeholder;
|
|
792
793
|
}
|
|
793
794
|
|
|
@@ -806,19 +807,19 @@ function appendRunContent(doc, host, run) {
|
|
|
806
807
|
}
|
|
807
808
|
function appendTabLines(doc, host, lines) {
|
|
808
809
|
lines.forEach((line, li) => {
|
|
809
|
-
const lineHost =
|
|
810
|
+
const lineHost = chunkMZCAYJ7H_cjs.createEl(doc, "span", void 0, {
|
|
810
811
|
display: "inline-block",
|
|
811
812
|
whiteSpace: "nowrap"
|
|
812
813
|
});
|
|
813
814
|
for (const piece of line.pieces) {
|
|
814
815
|
if (piece.leaderStyle) {
|
|
815
|
-
const leader =
|
|
816
|
+
const leader = chunkMZCAYJ7H_cjs.createEl(doc, "span", void 0, piece.leaderStyle);
|
|
816
817
|
leader.setAttribute("aria-hidden", "true");
|
|
817
818
|
leader.textContent = piece.leaderText ?? "";
|
|
818
819
|
lineHost.appendChild(leader);
|
|
819
820
|
}
|
|
820
821
|
for (const word of piece.words ?? [piece]) {
|
|
821
|
-
const textSpan =
|
|
822
|
+
const textSpan = chunkMZCAYJ7H_cjs.createEl(doc, "span", void 0, word.style);
|
|
822
823
|
textSpan.textContent = word.text;
|
|
823
824
|
lineHost.appendChild(textSpan);
|
|
824
825
|
}
|
|
@@ -832,7 +833,7 @@ function appendTabLines(doc, host, lines) {
|
|
|
832
833
|
function appendStyledPieces(doc, host, pieces) {
|
|
833
834
|
for (const piece of pieces) {
|
|
834
835
|
if (piece.style) {
|
|
835
|
-
const span =
|
|
836
|
+
const span = chunkMZCAYJ7H_cjs.createEl(doc, "span", void 0, piece.style);
|
|
836
837
|
span.textContent = piece.text;
|
|
837
838
|
host.appendChild(span);
|
|
838
839
|
} else {
|
|
@@ -845,16 +846,16 @@ function appendStyledPieces(doc, host, pieces) {
|
|
|
845
846
|
var NEWLINE_RUN = "\n";
|
|
846
847
|
function createRunBaseNode(doc, run) {
|
|
847
848
|
if (run.equation) {
|
|
848
|
-
const host =
|
|
849
|
-
const math =
|
|
849
|
+
const host = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-inline-equation", run.style);
|
|
850
|
+
const math = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-equation-math", {
|
|
850
851
|
display: "inline-block",
|
|
851
852
|
verticalAlign: "middle",
|
|
852
853
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
853
854
|
});
|
|
854
|
-
math.innerHTML =
|
|
855
|
+
math.innerHTML = chunkCWBVJ4DC_cjs.runEquationMathMl(run.equation);
|
|
855
856
|
host.appendChild(math);
|
|
856
857
|
if (run.equation.number) {
|
|
857
|
-
const number =
|
|
858
|
+
const number = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-equation-number", {
|
|
858
859
|
whiteSpace: "nowrap",
|
|
859
860
|
marginInlineStart: "0.5em"
|
|
860
861
|
});
|
|
@@ -863,8 +864,8 @@ function createRunBaseNode(doc, run) {
|
|
|
863
864
|
}
|
|
864
865
|
return host;
|
|
865
866
|
}
|
|
866
|
-
if (run.hyperlink &&
|
|
867
|
-
const link =
|
|
867
|
+
if (run.hyperlink && chunkCWBVJ4DC_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
868
|
+
const link = chunkMZCAYJ7H_cjs.createEl(doc, "a", "pptxv-link", run.style);
|
|
868
869
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
869
870
|
link.setAttribute("role", "link");
|
|
870
871
|
link.tabIndex = 0;
|
|
@@ -880,13 +881,13 @@ function createRunBaseNode(doc, run) {
|
|
|
880
881
|
}
|
|
881
882
|
if (run.ruby) {
|
|
882
883
|
const ruby = doc.createElement("ruby");
|
|
883
|
-
|
|
884
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(ruby, run.style);
|
|
884
885
|
appendRunContent(doc, ruby, run);
|
|
885
886
|
const openParen = doc.createElement("rp");
|
|
886
887
|
openParen.textContent = "(";
|
|
887
888
|
ruby.appendChild(openParen);
|
|
888
889
|
const annotation = doc.createElement("rt");
|
|
889
|
-
|
|
890
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(annotation, run.ruby.style);
|
|
890
891
|
annotation.textContent = run.ruby.text;
|
|
891
892
|
ruby.appendChild(annotation);
|
|
892
893
|
const closeParen = doc.createElement("rp");
|
|
@@ -894,8 +895,8 @@ function createRunBaseNode(doc, run) {
|
|
|
894
895
|
ruby.appendChild(closeParen);
|
|
895
896
|
return ruby;
|
|
896
897
|
}
|
|
897
|
-
const span =
|
|
898
|
-
|
|
898
|
+
const span = chunkMZCAYJ7H_cjs.createEl(doc, "span");
|
|
899
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(span, run.style);
|
|
899
900
|
appendRunContent(doc, span, run);
|
|
900
901
|
return span;
|
|
901
902
|
}
|
|
@@ -904,22 +905,22 @@ function createRunNode(doc, run) {
|
|
|
904
905
|
if (!run.reflection) {
|
|
905
906
|
return base;
|
|
906
907
|
}
|
|
907
|
-
const wrapper =
|
|
908
|
+
const wrapper = chunkMZCAYJ7H_cjs.createEl(doc, "span", void 0, {
|
|
908
909
|
position: "relative",
|
|
909
910
|
display: "inline-block"
|
|
910
911
|
});
|
|
911
912
|
wrapper.appendChild(base);
|
|
912
|
-
const mirror =
|
|
913
|
+
const mirror = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-text-reflection", { ...run.reflection });
|
|
913
914
|
mirror.setAttribute("aria-hidden", "true");
|
|
914
|
-
const mirrorInner =
|
|
915
|
-
|
|
915
|
+
const mirrorInner = chunkMZCAYJ7H_cjs.createEl(doc, "span");
|
|
916
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(mirrorInner, run.style);
|
|
916
917
|
appendRunContent(doc, mirrorInner, run);
|
|
917
918
|
mirror.appendChild(mirrorInner);
|
|
918
919
|
wrapper.appendChild(mirror);
|
|
919
920
|
return wrapper;
|
|
920
921
|
}
|
|
921
922
|
function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
922
|
-
const block =
|
|
923
|
+
const block = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-text", textStyle);
|
|
923
924
|
for (const para of paragraphs) {
|
|
924
925
|
const paraStyle = {
|
|
925
926
|
// This paragraph's own `text-align` / BiDi `direction` / kinsoku rules,
|
|
@@ -941,13 +942,13 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
941
942
|
if (para.strutFontSizePx !== void 0) {
|
|
942
943
|
paraStyle.fontSize = `${para.strutFontSizePx}px`;
|
|
943
944
|
}
|
|
944
|
-
const p =
|
|
945
|
+
const p = chunkMZCAYJ7H_cjs.createEl(doc, "p", "pptxv-para", paraStyle);
|
|
945
946
|
if (para.textIndentPx !== void 0) {
|
|
946
947
|
p.style.textIndent = `${para.textIndentPx}px`;
|
|
947
948
|
}
|
|
948
949
|
const picture = para.bulletPicture;
|
|
949
950
|
if (picture?.src) {
|
|
950
|
-
const image =
|
|
951
|
+
const image = chunkMZCAYJ7H_cjs.createEl(doc, "img", "pptxv-bullet-image", {
|
|
951
952
|
width: `${picture.sizePx}px`,
|
|
952
953
|
height: `${picture.sizePx}px`,
|
|
953
954
|
display: "inline-block",
|
|
@@ -960,15 +961,15 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
960
961
|
image.setAttribute("draggable", "false");
|
|
961
962
|
p.appendChild(image);
|
|
962
963
|
} else if (para.bulletMarker !== void 0) {
|
|
963
|
-
const bullet =
|
|
964
|
-
|
|
964
|
+
const bullet = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-bullet");
|
|
965
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(bullet, para.bulletStyle);
|
|
965
966
|
if (para.bulletPicture) {
|
|
966
967
|
bullet.setAttribute("aria-label", para.bulletPicture.accessibleLabel);
|
|
967
968
|
}
|
|
968
969
|
bullet.textContent = para.bulletMarker;
|
|
969
970
|
p.appendChild(bullet);
|
|
970
971
|
}
|
|
971
|
-
const spec = build ?
|
|
972
|
+
const spec = build ? chunkCWBVJ4DC_cjs.buildTextBuildSpec(
|
|
972
973
|
build.elementId,
|
|
973
974
|
paragraphs.indexOf(para),
|
|
974
975
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -976,8 +977,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
976
977
|
) : void 0;
|
|
977
978
|
if (spec && spec.granularity !== "paragraph") {
|
|
978
979
|
for (const span of spec.spans ?? []) {
|
|
979
|
-
const node =
|
|
980
|
-
|
|
980
|
+
const node = chunkMZCAYJ7H_cjs.createEl(doc, "span");
|
|
981
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(node, { ...span.style ?? {}, ...chunkCWBVJ4DC_cjs.textBuildSpanStyle(span) });
|
|
981
982
|
if (span.animId) {
|
|
982
983
|
node.setAttribute("data-anim-id", span.animId);
|
|
983
984
|
}
|
|
@@ -989,8 +990,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
989
990
|
}
|
|
990
991
|
let runHost = p;
|
|
991
992
|
if (spec) {
|
|
992
|
-
const wrapper =
|
|
993
|
-
|
|
993
|
+
const wrapper = chunkMZCAYJ7H_cjs.createEl(doc, "span");
|
|
994
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(wrapper, chunkCWBVJ4DC_cjs.textBuildSpanStyle(spec));
|
|
994
995
|
if (spec.animId) {
|
|
995
996
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
996
997
|
}
|
|
@@ -1017,12 +1018,17 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1017
1018
|
const doc = context.document;
|
|
1018
1019
|
const ss = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
1019
1020
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
1020
|
-
const strokeColor = ss?.strokeColor ??
|
|
1021
|
+
const strokeColor = ss?.strokeColor ?? chunkHTFYAGHG_cjs.DEFAULT_STROKE_COLOR;
|
|
1021
1022
|
const strokeOpacity = ss?.strokeOpacity ?? 1;
|
|
1022
|
-
const dashArray =
|
|
1023
|
+
const dashArray = chunkHTFYAGHG_cjs.buildDashArray(
|
|
1024
|
+
ss?.strokeDash,
|
|
1025
|
+
strokeWidth,
|
|
1026
|
+
ss?.customDashSegments,
|
|
1027
|
+
ss?.lineCap
|
|
1028
|
+
);
|
|
1023
1029
|
const w = Math.max(element.width, 1);
|
|
1024
1030
|
const h = Math.max(element.height, 1);
|
|
1025
|
-
const wrapper =
|
|
1031
|
+
const wrapper = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-element pptxv-connector", {
|
|
1026
1032
|
position: "absolute",
|
|
1027
1033
|
left: `${element.x}px`,
|
|
1028
1034
|
top: `${element.y}px`,
|
|
@@ -1046,18 +1052,18 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1046
1052
|
if (element.hidden) {
|
|
1047
1053
|
wrapper.style.display = "none";
|
|
1048
1054
|
}
|
|
1049
|
-
const lineGlow =
|
|
1055
|
+
const lineGlow = chunkHTFYAGHG_cjs.getLineGlowFilterCss(ss);
|
|
1050
1056
|
if (lineGlow) {
|
|
1051
1057
|
wrapper.style.filter = lineGlow;
|
|
1052
1058
|
}
|
|
1053
|
-
const svg =
|
|
1059
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", { width: w, height: h, viewBox: `0 0 ${w} ${h}` });
|
|
1054
1060
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1055
1061
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1056
|
-
const defs =
|
|
1057
|
-
const lineShadow =
|
|
1062
|
+
const defs = chunkMZCAYJ7H_cjs.createSvgEl(doc, "defs");
|
|
1063
|
+
const lineShadow = chunkHTFYAGHG_cjs.getLineShadowParams(ss);
|
|
1058
1064
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1059
1065
|
if (lineShadow && shadowId) {
|
|
1060
|
-
const filter =
|
|
1066
|
+
const filter = chunkMZCAYJ7H_cjs.createSvgEl(doc, "filter", {
|
|
1061
1067
|
id: shadowId,
|
|
1062
1068
|
x: "-50%",
|
|
1063
1069
|
y: "-50%",
|
|
@@ -1065,7 +1071,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1065
1071
|
height: "200%"
|
|
1066
1072
|
});
|
|
1067
1073
|
filter.appendChild(
|
|
1068
|
-
|
|
1074
|
+
chunkMZCAYJ7H_cjs.createSvgEl(doc, "feDropShadow", {
|
|
1069
1075
|
dx: lineShadow.offsetX,
|
|
1070
1076
|
dy: lineShadow.offsetY,
|
|
1071
1077
|
stdDeviation: lineShadow.blur / 2,
|
|
@@ -1075,8 +1081,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1075
1081
|
);
|
|
1076
1082
|
defs.appendChild(filter);
|
|
1077
1083
|
}
|
|
1078
|
-
const startArrow =
|
|
1079
|
-
const endArrow =
|
|
1084
|
+
const startArrow = chunkHTFYAGHG_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1085
|
+
const endArrow = chunkHTFYAGHG_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1080
1086
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1081
1087
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1082
1088
|
if (startArrow && startMarkerId) {
|
|
@@ -1099,10 +1105,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1099
1105
|
svg.appendChild(defs);
|
|
1100
1106
|
}
|
|
1101
1107
|
const compound = ss?.compoundLine;
|
|
1102
|
-
const offsets =
|
|
1103
|
-
const widths =
|
|
1108
|
+
const offsets = chunkHTFYAGHG_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1109
|
+
const widths = chunkHTFYAGHG_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1104
1110
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1105
|
-
const usePath =
|
|
1111
|
+
const usePath = chunkHTFYAGHG_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1106
1112
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1107
1113
|
const rw = Math.max(element.width, 0);
|
|
1108
1114
|
const rh = Math.max(element.height, 0);
|
|
@@ -1110,18 +1116,25 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1110
1116
|
const y1 = element.flipVertical ? rh : 0;
|
|
1111
1117
|
const x2 = element.flipHorizontal ? 0 : rw;
|
|
1112
1118
|
const y2 = element.flipVertical ? 0 : rh;
|
|
1113
|
-
const snapTransform =
|
|
1114
|
-
const hit =
|
|
1119
|
+
const snapTransform = chunkCWBVJ4DC_cjs.connectorSnapTransform(element, !usePath, offsets.length, strokeWidth);
|
|
1120
|
+
const hit = chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", {
|
|
1115
1121
|
class: "pptxv-connector-hit",
|
|
1116
1122
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1117
1123
|
fill: "none",
|
|
1118
1124
|
stroke: "transparent",
|
|
1119
|
-
"stroke-width":
|
|
1125
|
+
"stroke-width": chunkCWBVJ4DC_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1120
1126
|
"stroke-linecap": "round",
|
|
1121
1127
|
"stroke-linejoin": "round"
|
|
1122
1128
|
});
|
|
1123
1129
|
hit.style.pointerEvents = "stroke";
|
|
1124
1130
|
svg.appendChild(hit);
|
|
1131
|
+
const cappedD = chunkHTFYAGHG_cjs.connectorSquareCapPath(
|
|
1132
|
+
pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1133
|
+
ss,
|
|
1134
|
+
strokeWidth,
|
|
1135
|
+
offsets.length > 1 || startMarkerId !== void 0 || endMarkerId !== void 0
|
|
1136
|
+
);
|
|
1137
|
+
const paintD = cappedD ?? pathData;
|
|
1125
1138
|
offsets.forEach((offset, idx) => {
|
|
1126
1139
|
const strandWidth = Math.max(widths[idx] ?? strokeWidth, 1);
|
|
1127
1140
|
const stroke = {
|
|
@@ -1130,15 +1143,15 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1130
1143
|
"stroke-width": strandWidth,
|
|
1131
1144
|
"stroke-opacity": strokeOpacity,
|
|
1132
1145
|
"stroke-dasharray": dashArray,
|
|
1133
|
-
"stroke-linecap":
|
|
1146
|
+
"stroke-linecap": chunkHTFYAGHG_cjs.svgLineCap(ss?.lineCap, dashArray !== void 0),
|
|
1134
1147
|
"marker-start": idx === 0 && startMarkerId ? `url(#${startMarkerId})` : void 0,
|
|
1135
1148
|
"marker-end": idx === offsets.length - 1 && endMarkerId ? `url(#${endMarkerId})` : void 0,
|
|
1136
1149
|
filter: shadowId ? `url(#${shadowId})` : void 0
|
|
1137
1150
|
};
|
|
1138
1151
|
let node;
|
|
1139
|
-
if (
|
|
1140
|
-
node =
|
|
1141
|
-
d:
|
|
1152
|
+
if (paintD !== void 0) {
|
|
1153
|
+
node = chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", {
|
|
1154
|
+
d: paintD,
|
|
1142
1155
|
fill: "none",
|
|
1143
1156
|
"stroke-linejoin": "round",
|
|
1144
1157
|
...stroke
|
|
@@ -1147,7 +1160,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1147
1160
|
node.style.transform = `translate(0, ${offset}px)`;
|
|
1148
1161
|
}
|
|
1149
1162
|
} else {
|
|
1150
|
-
node =
|
|
1163
|
+
node = chunkMZCAYJ7H_cjs.createSvgEl(doc, "line", {
|
|
1151
1164
|
x1,
|
|
1152
1165
|
y1: y1 + offset,
|
|
1153
1166
|
x2,
|
|
@@ -1156,7 +1169,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1156
1169
|
});
|
|
1157
1170
|
}
|
|
1158
1171
|
node.setAttribute("data-pptx-line", "");
|
|
1159
|
-
node.style.setProperty("stroke-width",
|
|
1172
|
+
node.style.setProperty("stroke-width", chunkHTFYAGHG_cjs.connectorStrandScreenWidth(widths, strokeWidth, idx));
|
|
1160
1173
|
if (snapTransform) {
|
|
1161
1174
|
node.style.transform = snapTransform;
|
|
1162
1175
|
}
|
|
@@ -1170,7 +1183,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1170
1183
|
if (!pptx.hasTextProperties(element)) {
|
|
1171
1184
|
return;
|
|
1172
1185
|
}
|
|
1173
|
-
const paragraphs =
|
|
1186
|
+
const paragraphs = chunkCWBVJ4DC_cjs.buildParagraphs(element, context.fieldContext);
|
|
1174
1187
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1175
1188
|
return;
|
|
1176
1189
|
}
|
|
@@ -1190,8 +1203,8 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1190
1203
|
}
|
|
1191
1204
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1192
1205
|
const doc = context.document;
|
|
1193
|
-
const shape =
|
|
1194
|
-
const marker =
|
|
1206
|
+
const shape = chunkHTFYAGHG_cjs.markerPath(arrow, size.width, size.length);
|
|
1207
|
+
const marker = chunkMZCAYJ7H_cjs.createSvgEl(doc, "marker", {
|
|
1195
1208
|
id,
|
|
1196
1209
|
viewBox: "0 0 10 10",
|
|
1197
1210
|
refX: shape.refX,
|
|
@@ -1203,11 +1216,11 @@ function buildMarker(context, id, arrow, strokeColor, size) {
|
|
|
1203
1216
|
preserveAspectRatio: "none"
|
|
1204
1217
|
});
|
|
1205
1218
|
if (shape.shape === "circle") {
|
|
1206
|
-
marker.appendChild(
|
|
1219
|
+
marker.appendChild(chunkMZCAYJ7H_cjs.createSvgEl(doc, "circle", { cx: 5, cy: 5, r: 4, fill: strokeColor }));
|
|
1207
1220
|
} else if (shape.strokeOnly) {
|
|
1208
|
-
marker.appendChild(
|
|
1221
|
+
marker.appendChild(chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", { d: shape.d, fill: "none", stroke: strokeColor }));
|
|
1209
1222
|
} else {
|
|
1210
|
-
marker.appendChild(
|
|
1223
|
+
marker.appendChild(chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", { d: shape.d, fill: strokeColor }));
|
|
1211
1224
|
}
|
|
1212
1225
|
return marker;
|
|
1213
1226
|
}
|
|
@@ -1246,13 +1259,13 @@ function stripAbuttingEdgeBleeds(root) {
|
|
|
1246
1259
|
// src/pptx/dom/elements/ink-stroke-svg.ts
|
|
1247
1260
|
function buildStrokeSvg(doc, view, replay) {
|
|
1248
1261
|
if (view.nibMarks) {
|
|
1249
|
-
const g =
|
|
1262
|
+
const g = chunkMZCAYJ7H_cjs.createSvgEl(doc, "g", {
|
|
1250
1263
|
opacity: view.opacity,
|
|
1251
1264
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1252
1265
|
});
|
|
1253
1266
|
for (const m of view.nibMarks) {
|
|
1254
1267
|
g.appendChild(
|
|
1255
|
-
|
|
1268
|
+
chunkMZCAYJ7H_cjs.createSvgEl(doc, "ellipse", {
|
|
1256
1269
|
cx: m.cx,
|
|
1257
1270
|
cy: m.cy,
|
|
1258
1271
|
rx: m.rPerp,
|
|
@@ -1265,16 +1278,16 @@ function buildStrokeSvg(doc, view, replay) {
|
|
|
1265
1278
|
return g;
|
|
1266
1279
|
}
|
|
1267
1280
|
if (view.circles) {
|
|
1268
|
-
const g =
|
|
1281
|
+
const g = chunkMZCAYJ7H_cjs.createSvgEl(doc, "g", {
|
|
1269
1282
|
opacity: view.opacity,
|
|
1270
1283
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1271
1284
|
});
|
|
1272
1285
|
for (const c of view.circles) {
|
|
1273
|
-
g.appendChild(
|
|
1286
|
+
g.appendChild(chunkMZCAYJ7H_cjs.createSvgEl(doc, "circle", { cx: c.cx, cy: c.cy, r: c.r, fill: view.color }));
|
|
1274
1287
|
}
|
|
1275
1288
|
return g;
|
|
1276
1289
|
}
|
|
1277
|
-
const path =
|
|
1290
|
+
const path = chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", {
|
|
1278
1291
|
d: view.d,
|
|
1279
1292
|
fill: "none",
|
|
1280
1293
|
stroke: view.color,
|
|
@@ -1302,24 +1315,24 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1302
1315
|
return null;
|
|
1303
1316
|
}
|
|
1304
1317
|
const doc = context.document;
|
|
1305
|
-
const el =
|
|
1318
|
+
const el = chunkMZCAYJ7H_cjs.createEl(
|
|
1306
1319
|
doc,
|
|
1307
1320
|
"div",
|
|
1308
1321
|
"pptxv-element pptxv-contentpart",
|
|
1309
|
-
|
|
1322
|
+
chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex)
|
|
1310
1323
|
);
|
|
1311
1324
|
el.dataset.elementId = element.id;
|
|
1312
1325
|
const strokes = element.inkStrokes;
|
|
1313
1326
|
if (!strokes || strokes.length === 0) {
|
|
1314
1327
|
el.classList.add("pptxv-placeholder");
|
|
1315
|
-
const label =
|
|
1328
|
+
const label = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
1316
1329
|
label.textContent = context.t("pptx.ink.contentPartFallback");
|
|
1317
1330
|
el.appendChild(label);
|
|
1318
1331
|
return el;
|
|
1319
1332
|
}
|
|
1320
1333
|
const w = Math.max(element.width, 1);
|
|
1321
1334
|
const h = Math.max(element.height, 1);
|
|
1322
|
-
const svg =
|
|
1335
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
1323
1336
|
viewBox: `0 0 ${w} ${h}`,
|
|
1324
1337
|
preserveAspectRatio: "none"
|
|
1325
1338
|
});
|
|
@@ -1327,7 +1340,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1327
1340
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1328
1341
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getContentPartReplayStyles(strokes) : [];
|
|
1329
1342
|
if (context.presenting) {
|
|
1330
|
-
const keyframes =
|
|
1343
|
+
const keyframes = chunkMZCAYJ7H_cjs.createSvgEl(doc, "style");
|
|
1331
1344
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1332
1345
|
svg.appendChild(keyframes);
|
|
1333
1346
|
}
|
|
@@ -1339,38 +1352,33 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1339
1352
|
return el;
|
|
1340
1353
|
};
|
|
1341
1354
|
function renderEquations(element, context) {
|
|
1342
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1355
|
+
if (!pptx.hasTextProperties(element) || !chunkCWBVJ4DC_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1343
1356
|
return null;
|
|
1344
1357
|
}
|
|
1345
1358
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
1346
1359
|
if (equations.length === 0) {
|
|
1347
1360
|
return null;
|
|
1348
1361
|
}
|
|
1349
|
-
const wrapper =
|
|
1350
|
-
...getTextBlockStyle(element),
|
|
1351
|
-
alignItems: "center",
|
|
1352
|
-
gap: "0.25em",
|
|
1353
|
-
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1354
|
-
});
|
|
1362
|
+
const wrapper = chunkMZCAYJ7H_cjs.createEl(context.document, "div", "pptxv-equations", chunkCWBVJ4DC_cjs.buildEquationBlockStyle(getTextBlockStyle(element)));
|
|
1355
1363
|
for (const segment of equations) {
|
|
1356
|
-
const mathml =
|
|
1364
|
+
const mathml = chunkCWBVJ4DC_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1357
1365
|
if (!mathml) {
|
|
1358
1366
|
continue;
|
|
1359
1367
|
}
|
|
1360
|
-
const row =
|
|
1368
|
+
const row = chunkMZCAYJ7H_cjs.createEl(context.document, "span", "pptxv-equation", {
|
|
1361
1369
|
display: "flex",
|
|
1362
1370
|
alignItems: "center",
|
|
1363
1371
|
justifyContent: "center",
|
|
1364
1372
|
width: "100%"
|
|
1365
1373
|
});
|
|
1366
|
-
const math =
|
|
1374
|
+
const math = chunkMZCAYJ7H_cjs.createEl(context.document, "span", "pptxv-equation-math", {
|
|
1367
1375
|
flex: 1,
|
|
1368
1376
|
textAlign: "center"
|
|
1369
1377
|
});
|
|
1370
|
-
math.innerHTML =
|
|
1378
|
+
math.innerHTML = chunkCWBVJ4DC_cjs.sanitizeMathMl(mathml);
|
|
1371
1379
|
row.appendChild(math);
|
|
1372
1380
|
if (segment.equationNumber) {
|
|
1373
|
-
const number =
|
|
1381
|
+
const number = chunkMZCAYJ7H_cjs.createEl(context.document, "span", "pptxv-equation-number", {
|
|
1374
1382
|
whiteSpace: "nowrap"
|
|
1375
1383
|
});
|
|
1376
1384
|
number.textContent = `(${segment.equationNumber})`;
|
|
@@ -1384,8 +1392,8 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1384
1392
|
if (!pptx.hasShapeProperties(element)) {
|
|
1385
1393
|
return null;
|
|
1386
1394
|
}
|
|
1387
|
-
const fill =
|
|
1388
|
-
const data =
|
|
1395
|
+
const fill = chunkHTFYAGHG_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1396
|
+
const data = chunkCWBVJ4DC_cjs.build3DExtrusionData(
|
|
1389
1397
|
element.shapeStyle?.shape3d,
|
|
1390
1398
|
element.shapeStyle?.scene3d,
|
|
1391
1399
|
fill,
|
|
@@ -1395,11 +1403,11 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1395
1403
|
if (!data.hasExtrusion || data.panels.length === 0) {
|
|
1396
1404
|
return null;
|
|
1397
1405
|
}
|
|
1398
|
-
const wrapper =
|
|
1406
|
+
const wrapper = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-extrusion-3d", toCss(data.wrapperStyle));
|
|
1399
1407
|
wrapper.setAttribute("aria-hidden", "true");
|
|
1400
1408
|
for (const panel of data.panels) {
|
|
1401
1409
|
wrapper.appendChild(
|
|
1402
|
-
|
|
1410
|
+
chunkMZCAYJ7H_cjs.createEl(
|
|
1403
1411
|
doc,
|
|
1404
1412
|
"div",
|
|
1405
1413
|
`pptxv-extrusion-3d-panel pptxv-extrusion-3d-panel--${panel.side}`,
|
|
@@ -1409,7 +1417,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1409
1417
|
}
|
|
1410
1418
|
if (data.materialOverlay) {
|
|
1411
1419
|
wrapper.appendChild(
|
|
1412
|
-
|
|
1420
|
+
chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-extrusion-3d-material", {
|
|
1413
1421
|
position: "absolute",
|
|
1414
1422
|
inset: 0,
|
|
1415
1423
|
backgroundImage: data.materialOverlay,
|
|
@@ -1447,18 +1455,18 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1447
1455
|
if (suppressOwnReflection) {
|
|
1448
1456
|
return;
|
|
1449
1457
|
}
|
|
1450
|
-
const wrapperStyle =
|
|
1458
|
+
const wrapperStyle = chunkHTFYAGHG_cjs.getComputedEffectStyle(element).reflection;
|
|
1451
1459
|
if (!wrapperStyle) {
|
|
1452
1460
|
return;
|
|
1453
1461
|
}
|
|
1454
|
-
const layer =
|
|
1462
|
+
const layer = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1455
1463
|
layer.setAttribute("aria-hidden", "true");
|
|
1456
1464
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1457
1465
|
host.appendChild(layer);
|
|
1458
1466
|
}
|
|
1459
1467
|
function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFill, suppressOwnReflection = false) {
|
|
1460
1468
|
if (element.type === "group") {
|
|
1461
|
-
const wrap =
|
|
1469
|
+
const wrap = chunkMZCAYJ7H_cjs.createEl(doc, "div", void 0, {
|
|
1462
1470
|
position: "relative",
|
|
1463
1471
|
width: "100%",
|
|
1464
1472
|
height: "100%",
|
|
@@ -1471,9 +1479,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1471
1479
|
if (groupFilterDefs) {
|
|
1472
1480
|
wrap.appendChild(groupFilterDefs);
|
|
1473
1481
|
}
|
|
1474
|
-
const childParentFill =
|
|
1482
|
+
const childParentFill = chunkCWBVJ4DC_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1475
1483
|
for (const child of element.children ?? []) {
|
|
1476
|
-
const childWrap =
|
|
1484
|
+
const childWrap = chunkMZCAYJ7H_cjs.createEl(doc, "div", void 0, chunkCWBVJ4DC_cjs.getContainerStyle(child, 0));
|
|
1477
1485
|
childWrap.appendChild(
|
|
1478
1486
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1479
1487
|
);
|
|
@@ -1482,15 +1490,19 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1482
1490
|
appendOwnReflection(doc, wrap, element, mediaDataUrls, suppressOwnReflection);
|
|
1483
1491
|
return wrap;
|
|
1484
1492
|
}
|
|
1485
|
-
const box =
|
|
1493
|
+
const box = chunkMZCAYJ7H_cjs.createEl(doc, "div", void 0, {
|
|
1486
1494
|
width: "100%",
|
|
1487
1495
|
height: "100%",
|
|
1488
1496
|
...getShapeFillStrokeStyle(element)
|
|
1489
1497
|
});
|
|
1490
|
-
const inheritedFill =
|
|
1498
|
+
const inheritedFill = chunkCWBVJ4DC_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1491
1499
|
if (inheritedFill) {
|
|
1492
1500
|
applyInheritedFill(box, inheritedFill);
|
|
1493
1501
|
}
|
|
1502
|
+
const fillLayer = renderShapeFillLayer(doc, element);
|
|
1503
|
+
if (fillLayer) {
|
|
1504
|
+
box.appendChild(fillLayer);
|
|
1505
|
+
}
|
|
1494
1506
|
const subpathFill = renderShapeSubpathFillOverlay(doc, element);
|
|
1495
1507
|
if (subpathFill) {
|
|
1496
1508
|
box.appendChild(subpathFill);
|
|
@@ -1508,12 +1520,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1508
1520
|
box.appendChild(gradientOutline);
|
|
1509
1521
|
}
|
|
1510
1522
|
if (pptx.isImageLikeElement(element)) {
|
|
1511
|
-
const src =
|
|
1523
|
+
const src = chunkCWBVJ4DC_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1512
1524
|
if (src) {
|
|
1513
|
-
const img =
|
|
1525
|
+
const img = chunkMZCAYJ7H_cjs.createEl(doc, "img", void 0, {
|
|
1514
1526
|
width: "100%",
|
|
1515
1527
|
height: "100%",
|
|
1516
|
-
...
|
|
1528
|
+
...chunkCWBVJ4DC_cjs.getImageFitStyle(element)
|
|
1517
1529
|
});
|
|
1518
1530
|
img.setAttribute("src", src);
|
|
1519
1531
|
img.setAttribute("alt", "");
|
|
@@ -1523,7 +1535,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1523
1535
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1524
1536
|
return box;
|
|
1525
1537
|
}
|
|
1526
|
-
const paragraphs =
|
|
1538
|
+
const paragraphs = chunkCWBVJ4DC_cjs.buildParagraphs(element);
|
|
1527
1539
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1528
1540
|
if (hasText) {
|
|
1529
1541
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1535,29 +1547,29 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1535
1547
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1536
1548
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1537
1549
|
function renderShapeFilterDefs(doc, element) {
|
|
1538
|
-
const style =
|
|
1550
|
+
const style = chunkHTFYAGHG_cjs.getEffectStyleSource(element);
|
|
1539
1551
|
if (!style) {
|
|
1540
1552
|
return null;
|
|
1541
1553
|
}
|
|
1542
1554
|
const markups = [];
|
|
1543
|
-
const duotone =
|
|
1555
|
+
const duotone = chunkHTFYAGHG_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1544
1556
|
if (duotone) {
|
|
1545
1557
|
markups.push(duotone.filterMarkup);
|
|
1546
1558
|
}
|
|
1547
|
-
const
|
|
1548
|
-
if (
|
|
1549
|
-
markups.push(
|
|
1559
|
+
const effectDefs = chunkHTFYAGHG_cjs.getShapeEffectFilterDefs(element);
|
|
1560
|
+
if (effectDefs) {
|
|
1561
|
+
markups.push(effectDefs.filterMarkup);
|
|
1550
1562
|
}
|
|
1551
|
-
const bevelLighting =
|
|
1563
|
+
const bevelLighting = chunkCWBVJ4DC_cjs.getBevelLightingSvgFilter(element);
|
|
1552
1564
|
if (bevelLighting) {
|
|
1553
1565
|
markups.push(bevelLighting.filterMarkup);
|
|
1554
1566
|
}
|
|
1555
1567
|
if (markups.length === 0) {
|
|
1556
1568
|
return null;
|
|
1557
1569
|
}
|
|
1558
|
-
const svg =
|
|
1570
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1559
1571
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1560
|
-
const defs =
|
|
1572
|
+
const defs = chunkMZCAYJ7H_cjs.createSvgEl(doc, "defs");
|
|
1561
1573
|
defs.innerHTML = markups.join("");
|
|
1562
1574
|
svg.appendChild(defs);
|
|
1563
1575
|
return svg;
|
|
@@ -1566,11 +1578,11 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1566
1578
|
if (!pptx.hasShapeProperties(element)) {
|
|
1567
1579
|
return null;
|
|
1568
1580
|
}
|
|
1569
|
-
const overlay =
|
|
1581
|
+
const overlay = chunkHTFYAGHG_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1570
1582
|
if (!overlay) {
|
|
1571
1583
|
return null;
|
|
1572
1584
|
}
|
|
1573
|
-
const layer =
|
|
1585
|
+
const layer = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-fill-overlay", {
|
|
1574
1586
|
position: "absolute",
|
|
1575
1587
|
inset: 0,
|
|
1576
1588
|
background: overlay.color,
|
|
@@ -1581,77 +1593,94 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1581
1593
|
return layer;
|
|
1582
1594
|
}
|
|
1583
1595
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1584
|
-
const wrapperStyle =
|
|
1596
|
+
const wrapperStyle = chunkHTFYAGHG_cjs.getComputedEffectStyle(element).reflection;
|
|
1585
1597
|
if (!wrapperStyle) {
|
|
1586
1598
|
return null;
|
|
1587
1599
|
}
|
|
1588
|
-
const layer =
|
|
1600
|
+
const layer = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1589
1601
|
layer.setAttribute("aria-hidden", "true");
|
|
1590
1602
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1591
1603
|
return layer;
|
|
1592
1604
|
}
|
|
1593
1605
|
function renderHollowHitOutline(doc, element) {
|
|
1594
|
-
const hit =
|
|
1606
|
+
const hit = chunkCWBVJ4DC_cjs.buildHollowHitOutline(element);
|
|
1595
1607
|
if (!hit) {
|
|
1596
1608
|
return null;
|
|
1597
1609
|
}
|
|
1598
|
-
const svg =
|
|
1610
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
1599
1611
|
"aria-hidden": "true",
|
|
1600
|
-
viewBox:
|
|
1612
|
+
viewBox: chunkHTFYAGHG_cjs.strokeOutlineViewBox(element),
|
|
1601
1613
|
preserveAspectRatio: "none"
|
|
1602
1614
|
});
|
|
1603
1615
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1604
|
-
const path =
|
|
1616
|
+
const path = chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", {
|
|
1605
1617
|
d: hit.d,
|
|
1606
|
-
fill:
|
|
1607
|
-
stroke:
|
|
1618
|
+
fill: hit.fill,
|
|
1619
|
+
stroke: hit.stroke,
|
|
1608
1620
|
"stroke-width": hit.strokeWidth
|
|
1609
1621
|
});
|
|
1610
|
-
path.setAttribute("style",
|
|
1622
|
+
path.setAttribute("style", `pointer-events:${hit.pointerEvents}`);
|
|
1611
1623
|
svg.appendChild(path);
|
|
1624
|
+
if (hit.textCss) {
|
|
1625
|
+
const style = chunkMZCAYJ7H_cjs.createSvgEl(doc, "style", {});
|
|
1626
|
+
style.textContent = hit.textCss;
|
|
1627
|
+
svg.appendChild(style);
|
|
1628
|
+
}
|
|
1612
1629
|
return svg;
|
|
1613
1630
|
}
|
|
1631
|
+
function renderShapeFillLayer(doc, element) {
|
|
1632
|
+
const layer = chunkCWBVJ4DC_cjs.getSilhouetteFillLayer(element);
|
|
1633
|
+
if (!layer) {
|
|
1634
|
+
return null;
|
|
1635
|
+
}
|
|
1636
|
+
const div = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptx-vanilla-silhouette-fill", { ...layer.style });
|
|
1637
|
+
div.setAttribute("aria-hidden", "true");
|
|
1638
|
+
return div;
|
|
1639
|
+
}
|
|
1614
1640
|
function renderShapeSubpathFillOverlay(doc, element) {
|
|
1615
|
-
const overlay =
|
|
1641
|
+
const overlay = chunkHTFYAGHG_cjs.buildSubpathFillOverlay(element);
|
|
1616
1642
|
if (!overlay) {
|
|
1617
1643
|
return null;
|
|
1618
1644
|
}
|
|
1619
|
-
const svg =
|
|
1645
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
1620
1646
|
class: "pptx-vanilla-subpath-fill",
|
|
1621
1647
|
"aria-hidden": "true",
|
|
1622
1648
|
viewBox: `0 0 ${overlay.viewBoxWidth} ${overlay.viewBoxHeight}`,
|
|
1623
1649
|
preserveAspectRatio: "none"
|
|
1624
1650
|
});
|
|
1625
1651
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%");
|
|
1652
|
+
if (overlay.silhouette) {
|
|
1653
|
+
svg.setAttribute("data-pptx-silhouette-fill", "");
|
|
1654
|
+
}
|
|
1626
1655
|
for (const paint of overlay.paints) {
|
|
1627
|
-
const path =
|
|
1656
|
+
const path = chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", { d: paint.d, fill: paint.fill, stroke: "none" });
|
|
1628
1657
|
svg.appendChild(path);
|
|
1629
1658
|
}
|
|
1630
1659
|
return svg;
|
|
1631
1660
|
}
|
|
1632
1661
|
function renderStrokeOutline(doc, element) {
|
|
1633
|
-
const outline =
|
|
1662
|
+
const outline = chunkHTFYAGHG_cjs.buildStrokeOutline(element);
|
|
1634
1663
|
if (!outline) {
|
|
1635
1664
|
return null;
|
|
1636
1665
|
}
|
|
1637
|
-
const svg =
|
|
1666
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
1638
1667
|
class: "pptx-vanilla-gradient-outline",
|
|
1639
1668
|
"data-pptx-outline": "",
|
|
1640
1669
|
"aria-hidden": "true",
|
|
1641
|
-
viewBox:
|
|
1670
|
+
viewBox: chunkHTFYAGHG_cjs.strokeOutlineViewBox(element),
|
|
1642
1671
|
preserveAspectRatio: "none"
|
|
1643
1672
|
});
|
|
1644
1673
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1645
1674
|
if (outline.paint) {
|
|
1646
|
-
const defs =
|
|
1647
|
-
if (
|
|
1648
|
-
const pattern =
|
|
1675
|
+
const defs = chunkMZCAYJ7H_cjs.createSvgEl(doc, "defs");
|
|
1676
|
+
if (chunkHTFYAGHG_cjs.isPatternPaint(outline.paint)) {
|
|
1677
|
+
const pattern = chunkMZCAYJ7H_cjs.createSvgEl(doc, "pattern", {
|
|
1649
1678
|
id: outline.paint.id,
|
|
1650
1679
|
width: outline.paint.width,
|
|
1651
1680
|
height: outline.paint.height,
|
|
1652
1681
|
patternUnits: "userSpaceOnUse"
|
|
1653
1682
|
});
|
|
1654
|
-
const image =
|
|
1683
|
+
const image = chunkMZCAYJ7H_cjs.createSvgEl(doc, "image", {
|
|
1655
1684
|
href: outline.paint.href,
|
|
1656
1685
|
width: outline.paint.width,
|
|
1657
1686
|
height: outline.paint.height
|
|
@@ -1659,12 +1688,12 @@ function renderStrokeOutline(doc, element) {
|
|
|
1659
1688
|
pattern.appendChild(image);
|
|
1660
1689
|
defs.appendChild(pattern);
|
|
1661
1690
|
} else {
|
|
1662
|
-
defs.innerHTML =
|
|
1691
|
+
defs.innerHTML = chunkHTFYAGHG_cjs.svgGradientMarkup(outline.paint);
|
|
1663
1692
|
}
|
|
1664
1693
|
svg.appendChild(defs);
|
|
1665
1694
|
}
|
|
1666
1695
|
for (const strand of outline.strands) {
|
|
1667
|
-
const path =
|
|
1696
|
+
const path = chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", {
|
|
1668
1697
|
d: strand.d ?? outline.d,
|
|
1669
1698
|
fill: "none",
|
|
1670
1699
|
stroke: outline.stroke,
|
|
@@ -1685,7 +1714,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1685
1714
|
svg.appendChild(path);
|
|
1686
1715
|
}
|
|
1687
1716
|
if (outline.markers) {
|
|
1688
|
-
const defs =
|
|
1717
|
+
const defs = chunkMZCAYJ7H_cjs.createSvgEl(doc, "defs");
|
|
1689
1718
|
defs.innerHTML = outline.markers.markup;
|
|
1690
1719
|
svg.prepend(defs);
|
|
1691
1720
|
const path = svg.querySelector(":scope > path");
|
|
@@ -1721,14 +1750,14 @@ function indexRenderedNodes(root) {
|
|
|
1721
1750
|
return byId;
|
|
1722
1751
|
}
|
|
1723
1752
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1724
|
-
const inherited =
|
|
1753
|
+
const inherited = chunkCWBVJ4DC_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1725
1754
|
if (inherited) {
|
|
1726
1755
|
applyGroupChildFill(node, inherited);
|
|
1727
1756
|
}
|
|
1728
1757
|
if (element.type !== "group") {
|
|
1729
1758
|
return;
|
|
1730
1759
|
}
|
|
1731
|
-
const childFill =
|
|
1760
|
+
const childFill = chunkCWBVJ4DC_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1732
1761
|
if (!childFill) {
|
|
1733
1762
|
return;
|
|
1734
1763
|
}
|
|
@@ -1741,8 +1770,8 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1741
1770
|
}
|
|
1742
1771
|
}
|
|
1743
1772
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1744
|
-
const el =
|
|
1745
|
-
...
|
|
1773
|
+
const el = chunkMZCAYJ7H_cjs.createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1774
|
+
...chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex),
|
|
1746
1775
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1747
1776
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1748
1777
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1759,7 +1788,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1759
1788
|
el.appendChild(reflection);
|
|
1760
1789
|
}
|
|
1761
1790
|
if (element.type === "group" && element.children?.length) {
|
|
1762
|
-
const parentGroupFill =
|
|
1791
|
+
const parentGroupFill = chunkCWBVJ4DC_cjs.getGroupChildParentFill(element);
|
|
1763
1792
|
element.children.forEach((child, index) => {
|
|
1764
1793
|
const childEl = context.renderElement(child, index);
|
|
1765
1794
|
if (childEl) {
|
|
@@ -1774,20 +1803,20 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1774
1803
|
// src/pptx/dom/elements/image.ts
|
|
1775
1804
|
var renderImageElement = (element, zIndex, context) => {
|
|
1776
1805
|
const doc = context.document;
|
|
1777
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1806
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkCWBVJ4DC_cjs.resolveShapeGeometry(element) : void 0;
|
|
1778
1807
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1779
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1780
|
-
const layers =
|
|
1781
|
-
overflow:
|
|
1808
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkCWBVJ4DC_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1809
|
+
const layers = chunkCWBVJ4DC_cjs.getPictureFrameLayers(element, {
|
|
1810
|
+
overflow: chunkCWBVJ4DC_cjs.getImageOverflow(element),
|
|
1782
1811
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1783
1812
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1784
1813
|
});
|
|
1785
|
-
const el =
|
|
1786
|
-
...
|
|
1814
|
+
const el = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1815
|
+
...chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex),
|
|
1787
1816
|
...layers.box
|
|
1788
1817
|
});
|
|
1789
1818
|
el.dataset.elementId = element.id;
|
|
1790
|
-
const surface = layers.surface ?
|
|
1819
|
+
const surface = layers.surface ? chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-image-surface", layers.surface) : el;
|
|
1791
1820
|
if (surface !== el) {
|
|
1792
1821
|
el.appendChild(surface);
|
|
1793
1822
|
const outline = renderStrokeOutline(doc, element);
|
|
@@ -1795,36 +1824,36 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1795
1824
|
el.appendChild(outline);
|
|
1796
1825
|
}
|
|
1797
1826
|
}
|
|
1798
|
-
const src =
|
|
1827
|
+
const src = chunkCWBVJ4DC_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1799
1828
|
if (!src) {
|
|
1800
1829
|
return el;
|
|
1801
1830
|
}
|
|
1802
|
-
const fx =
|
|
1831
|
+
const fx = chunkCWBVJ4DC_cjs.getComputedImageStyle(element);
|
|
1803
1832
|
for (const f of fx.svgFilters) {
|
|
1804
|
-
const svg =
|
|
1833
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1805
1834
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1806
|
-
const defs =
|
|
1807
|
-
const filter =
|
|
1808
|
-
|
|
1835
|
+
const defs = chunkMZCAYJ7H_cjs.createSvgEl(doc, "defs");
|
|
1836
|
+
const filter = chunkMZCAYJ7H_cjs.createSvgEl(doc, "filter");
|
|
1837
|
+
chunkMZCAYJ7H_cjs.setSvgAttrs(filter, { id: f.id, "color-interpolation-filters": "sRGB" });
|
|
1809
1838
|
filter.innerHTML = f.markup;
|
|
1810
1839
|
defs.appendChild(filter);
|
|
1811
1840
|
svg.appendChild(defs);
|
|
1812
1841
|
surface.appendChild(svg);
|
|
1813
1842
|
}
|
|
1814
1843
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1815
|
-
const tiling =
|
|
1844
|
+
const tiling = chunkCWBVJ4DC_cjs.getImageTilingStyle(element, chunkCWBVJ4DC_cjs.getCachedNativeImageSize(src));
|
|
1816
1845
|
if (tiling) {
|
|
1817
|
-
const tile =
|
|
1846
|
+
const tile = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1818
1847
|
if (fx.filter) {
|
|
1819
1848
|
tile.style.filter = fx.filter;
|
|
1820
1849
|
}
|
|
1821
1850
|
if (fx.opacity !== void 0) {
|
|
1822
1851
|
tile.style.opacity = String(fx.opacity);
|
|
1823
1852
|
}
|
|
1824
|
-
if (!
|
|
1825
|
-
void
|
|
1853
|
+
if (!chunkCWBVJ4DC_cjs.getCachedNativeImageSize(src)) {
|
|
1854
|
+
void chunkCWBVJ4DC_cjs.probeNativeImageSize(src).then((size) => {
|
|
1826
1855
|
if (size) {
|
|
1827
|
-
|
|
1856
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(tile, chunkCWBVJ4DC_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1828
1857
|
}
|
|
1829
1858
|
return void 0;
|
|
1830
1859
|
});
|
|
@@ -1835,9 +1864,9 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1835
1864
|
}
|
|
1836
1865
|
return el;
|
|
1837
1866
|
}
|
|
1838
|
-
const fit =
|
|
1839
|
-
const fillCounterTransform =
|
|
1840
|
-
const img =
|
|
1867
|
+
const fit = chunkCWBVJ4DC_cjs.getImageFitStyle(element);
|
|
1868
|
+
const fillCounterTransform = chunkCWBVJ4DC_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1869
|
+
const img = chunkMZCAYJ7H_cjs.createEl(doc, "img", void 0, {
|
|
1841
1870
|
...fit,
|
|
1842
1871
|
display: "block",
|
|
1843
1872
|
...fillCounterTransform ? { transform: fillCounterTransform, transformOrigin: "center" } : {}
|
|
@@ -1855,17 +1884,17 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1855
1884
|
if (element.type === "image" || element.type === "picture") {
|
|
1856
1885
|
const clrChange = element.imageEffects?.clrChange;
|
|
1857
1886
|
if (clrChange) {
|
|
1858
|
-
void
|
|
1887
|
+
void chunkCWBVJ4DC_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1859
1888
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1860
1889
|
img.src = resolved;
|
|
1861
1890
|
}
|
|
1862
1891
|
return void 0;
|
|
1863
1892
|
});
|
|
1864
1893
|
}
|
|
1865
|
-
const wash =
|
|
1894
|
+
const wash = chunkCWBVJ4DC_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1866
1895
|
if (wash) {
|
|
1867
1896
|
surface.appendChild(
|
|
1868
|
-
|
|
1897
|
+
chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-image-color-wash", {
|
|
1869
1898
|
position: "absolute",
|
|
1870
1899
|
inset: "0",
|
|
1871
1900
|
pointerEvents: "none",
|
|
@@ -1887,11 +1916,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1887
1916
|
return null;
|
|
1888
1917
|
}
|
|
1889
1918
|
const doc = context.document;
|
|
1890
|
-
const wrapper =
|
|
1919
|
+
const wrapper = chunkMZCAYJ7H_cjs.createEl(
|
|
1891
1920
|
doc,
|
|
1892
1921
|
"div",
|
|
1893
1922
|
"pptxv-element pptxv-ink",
|
|
1894
|
-
|
|
1923
|
+
chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex)
|
|
1895
1924
|
);
|
|
1896
1925
|
wrapper.dataset.elementId = element.id;
|
|
1897
1926
|
const paths = element.inkPaths;
|
|
@@ -1900,7 +1929,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1900
1929
|
}
|
|
1901
1930
|
const w = Math.max(element.width, 1);
|
|
1902
1931
|
const h = Math.max(element.height, 1);
|
|
1903
|
-
const svg =
|
|
1932
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
1904
1933
|
viewBox: `0 0 ${w} ${h}`,
|
|
1905
1934
|
preserveAspectRatio: "none"
|
|
1906
1935
|
});
|
|
@@ -1908,11 +1937,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1908
1937
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1909
1938
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getInkReplayStyles(element) : [];
|
|
1910
1939
|
if (context.presenting) {
|
|
1911
|
-
const keyframes =
|
|
1940
|
+
const keyframes = chunkMZCAYJ7H_cjs.createSvgEl(doc, "style");
|
|
1912
1941
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1913
1942
|
svg.appendChild(keyframes);
|
|
1914
1943
|
}
|
|
1915
|
-
const views =
|
|
1944
|
+
const views = chunkCWBVJ4DC_cjs.buildInkGroupStrokes(element, { color: chunkHTFYAGHG_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1916
1945
|
for (const [i, view] of views.entries()) {
|
|
1917
1946
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1918
1947
|
}
|
|
@@ -1935,7 +1964,7 @@ function mediaFullscreenResetStyle(baseStyle) {
|
|
|
1935
1964
|
};
|
|
1936
1965
|
}
|
|
1937
1966
|
function buildFullscreenStopButton(doc, label, onStop) {
|
|
1938
|
-
const button =
|
|
1967
|
+
const button = chunkMZCAYJ7H_cjs.createEl(doc, "button", "pptxv-media-fullscreen-stop", {
|
|
1939
1968
|
position: "absolute",
|
|
1940
1969
|
bottom: "12px",
|
|
1941
1970
|
right: "12px",
|
|
@@ -1951,14 +1980,14 @@ function buildFullscreenStopButton(doc, label, onStop) {
|
|
|
1951
1980
|
button.type = "button";
|
|
1952
1981
|
button.setAttribute("aria-label", label);
|
|
1953
1982
|
button.addEventListener("click", onStop);
|
|
1954
|
-
const icon =
|
|
1983
|
+
const icon = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
1955
1984
|
width: 18,
|
|
1956
1985
|
height: 18,
|
|
1957
1986
|
viewBox: "0 0 24 24",
|
|
1958
1987
|
fill: "currentColor",
|
|
1959
1988
|
stroke: "none"
|
|
1960
1989
|
});
|
|
1961
|
-
icon.appendChild(
|
|
1990
|
+
icon.appendChild(chunkMZCAYJ7H_cjs.createSvgEl(doc, "rect", { x: 6, y: 6, width: 12, height: 12, rx: 1 }));
|
|
1962
1991
|
button.appendChild(icon);
|
|
1963
1992
|
return button;
|
|
1964
1993
|
}
|
|
@@ -1966,12 +1995,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
1966
1995
|
let stopButton = null;
|
|
1967
1996
|
const update = (playing) => {
|
|
1968
1997
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
1969
|
-
const active =
|
|
1970
|
-
|
|
1998
|
+
const active = chunkCWBVJ4DC_cjs.isMediaFullscreenActive(input);
|
|
1999
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(
|
|
1971
2000
|
container,
|
|
1972
|
-
active ?
|
|
2001
|
+
active ? chunkCWBVJ4DC_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
1973
2002
|
);
|
|
1974
|
-
if (
|
|
2003
|
+
if (chunkCWBVJ4DC_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
1975
2004
|
if (!stopButton) {
|
|
1976
2005
|
stopButton = buildFullscreenStopButton(
|
|
1977
2006
|
doc,
|
|
@@ -1996,12 +2025,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
1996
2025
|
|
|
1997
2026
|
// src/pptx/dom/elements/media.ts
|
|
1998
2027
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
1999
|
-
|
|
2028
|
+
chunkCWBVJ4DC_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2000
2029
|
if (presenting) {
|
|
2001
|
-
|
|
2002
|
-
|
|
2030
|
+
chunkCWBVJ4DC_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2031
|
+
chunkCWBVJ4DC_cjs.scheduleMediaTrimAndFade(el, {
|
|
2003
2032
|
...playback,
|
|
2004
|
-
volume:
|
|
2033
|
+
volume: chunkCWBVJ4DC_cjs.mediaPlaybackAttributes(playback).volume
|
|
2005
2034
|
});
|
|
2006
2035
|
} else if (!el.paused) {
|
|
2007
2036
|
el.pause();
|
|
@@ -2011,20 +2040,31 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2011
2040
|
if (element.type !== "media") {
|
|
2012
2041
|
return null;
|
|
2013
2042
|
}
|
|
2014
|
-
const surface =
|
|
2043
|
+
const surface = chunkCWBVJ4DC_cjs.mediaSurfaceOf({
|
|
2015
2044
|
interactive: context.interactive === true || context.reading === true,
|
|
2016
2045
|
presenting: context.presenting
|
|
2017
2046
|
});
|
|
2018
|
-
const showTransport =
|
|
2047
|
+
const showTransport = chunkCWBVJ4DC_cjs.mediaTransportVisible({
|
|
2048
|
+
...surface,
|
|
2049
|
+
canvasTransport: context.reading === true
|
|
2050
|
+
});
|
|
2051
|
+
const attachAuthoringBar = (host, media) => {
|
|
2052
|
+
if (chunkCWBVJ4DC_cjs.mediaControlBarEnabled({ ...surface, reading: context.reading === true })) {
|
|
2053
|
+
chunkCWBVJ4DC_cjs.attachMediaControlBar(host, media, {
|
|
2054
|
+
t: context.t,
|
|
2055
|
+
selected: context.selectedElementIds?.has(element.id) === true
|
|
2056
|
+
});
|
|
2057
|
+
}
|
|
2058
|
+
};
|
|
2019
2059
|
const doc = context.document;
|
|
2020
|
-
const baseStyle =
|
|
2021
|
-
const el =
|
|
2060
|
+
const baseStyle = chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex);
|
|
2061
|
+
const el = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2022
2062
|
el.dataset.elementId = element.id;
|
|
2023
2063
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2024
|
-
const posterSrc =
|
|
2025
|
-
const onlineVideoEmbedUrl =
|
|
2064
|
+
const posterSrc = chunkCWBVJ4DC_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2065
|
+
const onlineVideoEmbedUrl = chunkCWBVJ4DC_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2026
2066
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2027
|
-
const iframe =
|
|
2067
|
+
const iframe = chunkMZCAYJ7H_cjs.createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2028
2068
|
width: "100%",
|
|
2029
2069
|
height: "100%",
|
|
2030
2070
|
border: "0",
|
|
@@ -2032,14 +2072,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2032
2072
|
});
|
|
2033
2073
|
iframe.src = onlineVideoEmbedUrl;
|
|
2034
2074
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2035
|
-
iframe.allow =
|
|
2036
|
-
iframe.sandbox.value =
|
|
2075
|
+
iframe.allow = chunkCWBVJ4DC_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2076
|
+
iframe.sandbox.value = chunkCWBVJ4DC_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2037
2077
|
iframe.allowFullscreen = true;
|
|
2038
2078
|
el.appendChild(iframe);
|
|
2039
2079
|
return el;
|
|
2040
2080
|
}
|
|
2041
2081
|
if (mediaSrc && element.mediaType === "video") {
|
|
2042
|
-
const video =
|
|
2082
|
+
const video = chunkMZCAYJ7H_cjs.createEl(doc, "video", "pptxv-media-video", {
|
|
2043
2083
|
width: "100%",
|
|
2044
2084
|
height: "100%",
|
|
2045
2085
|
objectFit: "contain",
|
|
@@ -2054,31 +2094,33 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2054
2094
|
}
|
|
2055
2095
|
el.appendChild(video);
|
|
2056
2096
|
applyMediaPresentingState(video, context.presenting, element);
|
|
2097
|
+
attachAuthoringBar(el, video);
|
|
2057
2098
|
wireMediaFullscreenOverlay(doc, el, video, element, context, baseStyle);
|
|
2058
2099
|
return el;
|
|
2059
2100
|
}
|
|
2060
2101
|
if (mediaSrc && element.mediaType === "audio") {
|
|
2061
|
-
const audio =
|
|
2102
|
+
const audio = chunkMZCAYJ7H_cjs.createEl(doc, "audio", "pptxv-media-audio", { width: "100%" });
|
|
2062
2103
|
audio.src = mediaSrc;
|
|
2063
2104
|
audio.controls = showTransport;
|
|
2064
2105
|
el.appendChild(audio);
|
|
2065
|
-
if (context.presenting &&
|
|
2106
|
+
if (context.presenting && chunkCWBVJ4DC_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2066
2107
|
audio.muted = true;
|
|
2067
|
-
|
|
2108
|
+
chunkCWBVJ4DC_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2068
2109
|
return el;
|
|
2069
2110
|
}
|
|
2070
2111
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2112
|
+
attachAuthoringBar(el, audio);
|
|
2071
2113
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2072
2114
|
return el;
|
|
2073
2115
|
}
|
|
2074
|
-
const fallback =
|
|
2116
|
+
const fallback = chunkCWBVJ4DC_cjs.mediaFallbackVisual(surface, {
|
|
2075
2117
|
hasPoster: Boolean(posterSrc),
|
|
2076
2118
|
missing: element.mediaMissing === true
|
|
2077
2119
|
});
|
|
2078
|
-
const icon =
|
|
2079
|
-
const labelKey =
|
|
2120
|
+
const icon = chunkCWBVJ4DC_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2121
|
+
const labelKey = chunkCWBVJ4DC_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2080
2122
|
if (fallback.poster && posterSrc) {
|
|
2081
|
-
const img =
|
|
2123
|
+
const img = chunkMZCAYJ7H_cjs.createEl(doc, "img", "pptxv-media-poster", {
|
|
2082
2124
|
width: "100%",
|
|
2083
2125
|
height: "100%",
|
|
2084
2126
|
objectFit: "contain",
|
|
@@ -2090,14 +2132,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2090
2132
|
img.setAttribute("draggable", "false");
|
|
2091
2133
|
el.appendChild(img);
|
|
2092
2134
|
if (fallback.badge !== "none") {
|
|
2093
|
-
const badge =
|
|
2135
|
+
const badge = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-media-badge");
|
|
2094
2136
|
if (fallback.badge === "missing") {
|
|
2095
2137
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2096
2138
|
}
|
|
2097
|
-
badge.setAttribute(
|
|
2139
|
+
badge.setAttribute(chunkCWBVJ4DC_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2098
2140
|
badge.appendChild(buildIcon(doc, icon));
|
|
2099
2141
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2100
|
-
const text =
|
|
2142
|
+
const text = chunkMZCAYJ7H_cjs.createEl(doc, "span");
|
|
2101
2143
|
text.textContent = context.t(labelKey);
|
|
2102
2144
|
badge.appendChild(text);
|
|
2103
2145
|
}
|
|
@@ -2107,12 +2149,12 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2107
2149
|
}
|
|
2108
2150
|
if (fallback.placeholder !== "none") {
|
|
2109
2151
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2110
|
-
el.setAttribute(
|
|
2152
|
+
el.setAttribute(chunkCWBVJ4DC_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2111
2153
|
if (icon.length > 0) {
|
|
2112
2154
|
el.appendChild(buildIcon(doc, icon));
|
|
2113
2155
|
}
|
|
2114
2156
|
if (labelKey !== void 0) {
|
|
2115
|
-
const label =
|
|
2157
|
+
const label = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
2116
2158
|
label.textContent = context.t(labelKey);
|
|
2117
2159
|
el.appendChild(label);
|
|
2118
2160
|
}
|
|
@@ -2139,11 +2181,11 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2139
2181
|
return null;
|
|
2140
2182
|
}
|
|
2141
2183
|
const doc = context.document;
|
|
2142
|
-
const el =
|
|
2184
|
+
const el = chunkMZCAYJ7H_cjs.createEl(
|
|
2143
2185
|
doc,
|
|
2144
2186
|
"div",
|
|
2145
2187
|
"pptxv-element pptxv-model3d",
|
|
2146
|
-
|
|
2188
|
+
chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex)
|
|
2147
2189
|
);
|
|
2148
2190
|
el.dataset.elementId = element.id;
|
|
2149
2191
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2156,7 +2198,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2156
2198
|
return el;
|
|
2157
2199
|
};
|
|
2158
2200
|
function buildPoster(doc, src, alt) {
|
|
2159
|
-
const img =
|
|
2201
|
+
const img = chunkMZCAYJ7H_cjs.createEl(doc, "img", "pptxv-model3d-poster", {
|
|
2160
2202
|
width: "100%",
|
|
2161
2203
|
height: "100%",
|
|
2162
2204
|
objectFit: "contain",
|
|
@@ -2170,7 +2212,7 @@ function buildPoster(doc, src, alt) {
|
|
|
2170
2212
|
return img;
|
|
2171
2213
|
}
|
|
2172
2214
|
function buildPlaceholder(doc, label) {
|
|
2173
|
-
const box =
|
|
2215
|
+
const box = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-model3d-placeholder", {
|
|
2174
2216
|
width: "100%",
|
|
2175
2217
|
height: "100%",
|
|
2176
2218
|
display: "flex",
|
|
@@ -2184,7 +2226,7 @@ function buildPlaceholder(doc, label) {
|
|
|
2184
2226
|
borderRadius: "4px",
|
|
2185
2227
|
boxSizing: "border-box"
|
|
2186
2228
|
});
|
|
2187
|
-
const icon =
|
|
2229
|
+
const icon = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
2188
2230
|
width: 24,
|
|
2189
2231
|
height: 24,
|
|
2190
2232
|
viewBox: "0 0 24 24",
|
|
@@ -2197,20 +2239,20 @@ function buildPlaceholder(doc, label) {
|
|
|
2197
2239
|
icon.setAttribute("class", "pptxv-model3d-icon");
|
|
2198
2240
|
icon.setAttribute("style", "margin-bottom:4px;color:#d1d5db");
|
|
2199
2241
|
icon.appendChild(
|
|
2200
|
-
|
|
2242
|
+
chunkMZCAYJ7H_cjs.createSvgEl(doc, "path", {
|
|
2201
2243
|
d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"
|
|
2202
2244
|
})
|
|
2203
2245
|
);
|
|
2204
|
-
icon.appendChild(
|
|
2205
|
-
icon.appendChild(
|
|
2246
|
+
icon.appendChild(chunkMZCAYJ7H_cjs.createSvgEl(doc, "polyline", { points: "3.27 6.96 12 12.01 20.73 6.96" }));
|
|
2247
|
+
icon.appendChild(chunkMZCAYJ7H_cjs.createSvgEl(doc, "line", { x1: 12, y1: 22.08, x2: 12, y2: 12 }));
|
|
2206
2248
|
box.appendChild(icon);
|
|
2207
|
-
const text =
|
|
2249
|
+
const text = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-model3d-label");
|
|
2208
2250
|
text.textContent = label;
|
|
2209
2251
|
box.appendChild(text);
|
|
2210
2252
|
return box;
|
|
2211
2253
|
}
|
|
2212
2254
|
function buildViewButton(doc, root, poster, element, context) {
|
|
2213
|
-
const button =
|
|
2255
|
+
const button = chunkMZCAYJ7H_cjs.createEl(doc, "button", "pptxv-model3d-view", {
|
|
2214
2256
|
position: "absolute",
|
|
2215
2257
|
bottom: "4px",
|
|
2216
2258
|
right: "4px",
|
|
@@ -2245,7 +2287,7 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2245
2287
|
button.remove();
|
|
2246
2288
|
return;
|
|
2247
2289
|
}
|
|
2248
|
-
const sceneHost =
|
|
2290
|
+
const sceneHost = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-model3d-scene", {
|
|
2249
2291
|
position: "absolute",
|
|
2250
2292
|
inset: 0,
|
|
2251
2293
|
willChange: "transform"
|
|
@@ -2273,15 +2315,15 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2273
2315
|
|
|
2274
2316
|
// src/pptx/dom/elements/ole-icons.ts
|
|
2275
2317
|
function buildOleIcon(doc, type, color) {
|
|
2276
|
-
const svg =
|
|
2318
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
2277
2319
|
width: 36,
|
|
2278
2320
|
height: 36,
|
|
2279
2321
|
viewBox: "0 0 24 24",
|
|
2280
2322
|
fill: "none",
|
|
2281
2323
|
"aria-hidden": "true"
|
|
2282
2324
|
});
|
|
2283
|
-
for (const shape of
|
|
2284
|
-
const node =
|
|
2325
|
+
for (const shape of chunkCWBVJ4DC_cjs.getOleIconShapes(type)) {
|
|
2326
|
+
const node = chunkMZCAYJ7H_cjs.createSvgEl(doc, shape.tag, shape.attrs);
|
|
2285
2327
|
if (shape.tag === "text") {
|
|
2286
2328
|
node.setAttribute("fill", color);
|
|
2287
2329
|
node.textContent = shape.text ?? "";
|
|
@@ -2299,37 +2341,55 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2299
2341
|
return null;
|
|
2300
2342
|
}
|
|
2301
2343
|
const doc = context.document;
|
|
2302
|
-
const oleType =
|
|
2303
|
-
const typeColor =
|
|
2304
|
-
const typeLabel =
|
|
2305
|
-
const el =
|
|
2344
|
+
const oleType = chunkCWBVJ4DC_cjs.resolveOleType(element);
|
|
2345
|
+
const typeColor = chunkCWBVJ4DC_cjs.getOleTypeColor(oleType);
|
|
2346
|
+
const typeLabel = chunkCWBVJ4DC_cjs.getOleTypeLabel(oleType);
|
|
2347
|
+
const el = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-element pptxv-ole", chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex));
|
|
2306
2348
|
el.dataset.elementId = element.id;
|
|
2307
2349
|
el.setAttribute("role", "group");
|
|
2308
|
-
el.setAttribute("aria-label",
|
|
2350
|
+
el.setAttribute("aria-label", chunkCWBVJ4DC_cjs.getOleAriaLabel(element));
|
|
2309
2351
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2310
2352
|
if (element.previewImageData) {
|
|
2311
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2353
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkCWBVJ4DC_cjs.getOleBadgeLabel(oleType)));
|
|
2312
2354
|
} else {
|
|
2313
2355
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2314
2356
|
}
|
|
2315
|
-
const showActions =
|
|
2316
|
-
|
|
2357
|
+
const showActions = chunkCWBVJ4DC_cjs.oleActionsVisible(
|
|
2358
|
+
chunkCWBVJ4DC_cjs.mediaSurfaceOf({
|
|
2317
2359
|
interactive: context.interactive === true,
|
|
2318
2360
|
presenting: context.presenting
|
|
2319
2361
|
})
|
|
2320
2362
|
);
|
|
2321
2363
|
if (element.oleEmbeddedData && showActions) {
|
|
2322
|
-
|
|
2364
|
+
const bar = buildActionBar(doc, element, typeLabel, context);
|
|
2365
|
+
el.appendChild(bar);
|
|
2366
|
+
revealOnHover(el, bar);
|
|
2323
2367
|
}
|
|
2324
2368
|
return el;
|
|
2325
2369
|
};
|
|
2370
|
+
function revealOnHover(host, bar) {
|
|
2371
|
+
bar.style.opacity = "0";
|
|
2372
|
+
bar.style.transition = "opacity 0.12s ease-in-out";
|
|
2373
|
+
const show = () => {
|
|
2374
|
+
bar.style.opacity = "1";
|
|
2375
|
+
};
|
|
2376
|
+
const hide = () => {
|
|
2377
|
+
if (!host.matches(":hover") && !bar.matches(":focus-within")) {
|
|
2378
|
+
bar.style.opacity = "0";
|
|
2379
|
+
}
|
|
2380
|
+
};
|
|
2381
|
+
host.addEventListener("pointerenter", show);
|
|
2382
|
+
host.addEventListener("pointerleave", hide);
|
|
2383
|
+
bar.addEventListener("focusin", show);
|
|
2384
|
+
bar.addEventListener("focusout", hide);
|
|
2385
|
+
}
|
|
2326
2386
|
function infoLines(el, typeLabel) {
|
|
2327
2387
|
const lines = [typeLabel];
|
|
2328
2388
|
const name = el.oleEmbeddedFileName ?? el.fileName;
|
|
2329
2389
|
if (name) {
|
|
2330
2390
|
lines.push(name);
|
|
2331
2391
|
}
|
|
2332
|
-
const size =
|
|
2392
|
+
const size = chunkCWBVJ4DC_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2333
2393
|
if (size) {
|
|
2334
2394
|
lines.push(size);
|
|
2335
2395
|
}
|
|
@@ -2339,12 +2399,12 @@ function infoLines(el, typeLabel) {
|
|
|
2339
2399
|
return lines;
|
|
2340
2400
|
}
|
|
2341
2401
|
function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
2342
|
-
const preview =
|
|
2402
|
+
const preview = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-ole-preview", {
|
|
2343
2403
|
position: "relative",
|
|
2344
2404
|
width: "100%",
|
|
2345
2405
|
height: "100%"
|
|
2346
2406
|
});
|
|
2347
|
-
const img =
|
|
2407
|
+
const img = chunkMZCAYJ7H_cjs.createEl(doc, "img", "pptxv-ole-img", {
|
|
2348
2408
|
width: "100%",
|
|
2349
2409
|
height: "100%",
|
|
2350
2410
|
objectFit: "contain",
|
|
@@ -2353,19 +2413,19 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2353
2413
|
display: "block"
|
|
2354
2414
|
});
|
|
2355
2415
|
img.src = el.previewImageData ?? "";
|
|
2356
|
-
img.alt =
|
|
2416
|
+
img.alt = chunkCWBVJ4DC_cjs.getOleAriaLabel(el);
|
|
2357
2417
|
img.draggable = false;
|
|
2358
2418
|
preview.appendChild(img);
|
|
2359
|
-
const badge =
|
|
2419
|
+
const badge = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
2360
2420
|
badge.setAttribute("class", "pptxv-ole-badge");
|
|
2361
2421
|
badge.setAttribute(
|
|
2362
2422
|
"style",
|
|
2363
2423
|
"position:absolute;bottom:4px;right:4px;z-index:10;pointer-events:none"
|
|
2364
2424
|
);
|
|
2365
2425
|
badge.appendChild(
|
|
2366
|
-
|
|
2426
|
+
chunkMZCAYJ7H_cjs.createSvgEl(doc, "rect", { x: 2, y: 2, width: 20, height: 20, rx: 3, fill: typeColor })
|
|
2367
2427
|
);
|
|
2368
|
-
const badgeText =
|
|
2428
|
+
const badgeText = chunkMZCAYJ7H_cjs.createSvgEl(doc, "text", {
|
|
2369
2429
|
x: 12,
|
|
2370
2430
|
y: 16,
|
|
2371
2431
|
"text-anchor": "middle",
|
|
@@ -2379,8 +2439,8 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2379
2439
|
return preview;
|
|
2380
2440
|
}
|
|
2381
2441
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2382
|
-
const box =
|
|
2383
|
-
...
|
|
2442
|
+
const box = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2443
|
+
...chunkCWBVJ4DC_cjs.getPlaceholderStyle(oleType),
|
|
2384
2444
|
width: "100%",
|
|
2385
2445
|
height: "100%",
|
|
2386
2446
|
display: "flex",
|
|
@@ -2391,7 +2451,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2391
2451
|
boxSizing: "border-box"
|
|
2392
2452
|
});
|
|
2393
2453
|
box.appendChild(buildOleIcon(doc, oleType, typeColor));
|
|
2394
|
-
const name =
|
|
2454
|
+
const name = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-ole-name", {
|
|
2395
2455
|
marginTop: "8px",
|
|
2396
2456
|
fontSize: "12px",
|
|
2397
2457
|
fontWeight: 500,
|
|
@@ -2401,10 +2461,10 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2401
2461
|
whiteSpace: "nowrap",
|
|
2402
2462
|
color: typeColor
|
|
2403
2463
|
});
|
|
2404
|
-
name.textContent =
|
|
2464
|
+
name.textContent = chunkCWBVJ4DC_cjs.getOleDisplayName(el);
|
|
2405
2465
|
box.appendChild(name);
|
|
2406
2466
|
if (el.fileName) {
|
|
2407
|
-
const sublabel =
|
|
2467
|
+
const sublabel = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
2408
2468
|
marginTop: "2px",
|
|
2409
2469
|
fontSize: "10px",
|
|
2410
2470
|
color: "rgba(0,0,0,0.45)",
|
|
@@ -2434,7 +2494,7 @@ var ACTION_STYLE = {
|
|
|
2434
2494
|
function buildActionBar(doc, el, typeLabel, context) {
|
|
2435
2495
|
const data = el.oleEmbeddedData ?? "";
|
|
2436
2496
|
const downloadName = el.oleEmbeddedFileName ?? el.fileName ?? typeLabel;
|
|
2437
|
-
const bar =
|
|
2497
|
+
const bar = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-ole-actions", {
|
|
2438
2498
|
position: "absolute",
|
|
2439
2499
|
left: 0,
|
|
2440
2500
|
right: 0,
|
|
@@ -2453,9 +2513,9 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2453
2513
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2454
2514
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2455
2515
|
}
|
|
2456
|
-
const size =
|
|
2516
|
+
const size = chunkCWBVJ4DC_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2457
2517
|
if (size) {
|
|
2458
|
-
const meta =
|
|
2518
|
+
const meta = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-ole-meta", {
|
|
2459
2519
|
marginRight: "auto",
|
|
2460
2520
|
color: "rgba(0,0,0,0.55)",
|
|
2461
2521
|
overflow: "hidden",
|
|
@@ -2465,7 +2525,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2465
2525
|
meta.textContent = size;
|
|
2466
2526
|
bar.appendChild(meta);
|
|
2467
2527
|
}
|
|
2468
|
-
const download =
|
|
2528
|
+
const download = chunkMZCAYJ7H_cjs.createEl(doc, "a", "pptxv-ole-action", ACTION_STYLE);
|
|
2469
2529
|
download.href = data;
|
|
2470
2530
|
download.download = downloadName;
|
|
2471
2531
|
const downloadTitle = context.t("pptx.ole.downloadName", { name: downloadName });
|
|
@@ -2473,14 +2533,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2473
2533
|
download.title = downloadTitle;
|
|
2474
2534
|
download.textContent = context.t("pptx.ole.download");
|
|
2475
2535
|
bar.appendChild(download);
|
|
2476
|
-
if (
|
|
2477
|
-
const open =
|
|
2536
|
+
if (chunkCWBVJ4DC_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2537
|
+
const open = chunkMZCAYJ7H_cjs.createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2478
2538
|
open.type = "button";
|
|
2479
2539
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2480
2540
|
open.setAttribute("aria-label", openTitle);
|
|
2481
2541
|
open.title = openTitle;
|
|
2482
2542
|
open.textContent = context.t("pptx.ole.open");
|
|
2483
|
-
open.addEventListener("click", () =>
|
|
2543
|
+
open.addEventListener("click", () => chunkCWBVJ4DC_cjs.openUrlInNewTab(data));
|
|
2484
2544
|
bar.appendChild(open);
|
|
2485
2545
|
}
|
|
2486
2546
|
return bar;
|
|
@@ -2488,16 +2548,16 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2488
2548
|
|
|
2489
2549
|
// src/pptx/dom/elements/placeholder.ts
|
|
2490
2550
|
var renderPlaceholderElement = (element, zIndex, context) => {
|
|
2491
|
-
const el =
|
|
2551
|
+
const el = chunkMZCAYJ7H_cjs.createEl(
|
|
2492
2552
|
context.document,
|
|
2493
2553
|
"div",
|
|
2494
2554
|
"pptxv-element pptxv-placeholder",
|
|
2495
|
-
|
|
2555
|
+
chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex)
|
|
2496
2556
|
);
|
|
2497
2557
|
el.dataset.elementId = element.id;
|
|
2498
2558
|
el.dataset.elementType = element.type;
|
|
2499
|
-
const label =
|
|
2500
|
-
label.textContent =
|
|
2559
|
+
const label = chunkMZCAYJ7H_cjs.createEl(context.document, "div", "pptxv-placeholder-label");
|
|
2560
|
+
label.textContent = chunkUFJBHFSD_cjs.keyToLabel(element.type);
|
|
2501
2561
|
el.appendChild(label);
|
|
2502
2562
|
return el;
|
|
2503
2563
|
};
|
|
@@ -2508,7 +2568,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2508
2568
|
return null;
|
|
2509
2569
|
}
|
|
2510
2570
|
const doc = context.document;
|
|
2511
|
-
const summaryView =
|
|
2571
|
+
const summaryView = chunkCWBVJ4DC_cjs.buildSummaryZoomView(
|
|
2512
2572
|
element,
|
|
2513
2573
|
(index) => {
|
|
2514
2574
|
const slide = context.slides?.[index];
|
|
@@ -2524,19 +2584,19 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2524
2584
|
(key, params) => context.t(key, params)
|
|
2525
2585
|
);
|
|
2526
2586
|
if (summaryView) {
|
|
2527
|
-
const root =
|
|
2587
|
+
const root = chunkMZCAYJ7H_cjs.createEl(
|
|
2528
2588
|
doc,
|
|
2529
2589
|
"div",
|
|
2530
2590
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2531
|
-
|
|
2591
|
+
chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex)
|
|
2532
2592
|
);
|
|
2533
|
-
const content =
|
|
2593
|
+
const content = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2534
2594
|
root.dataset.elementId = element.id;
|
|
2535
2595
|
root.dataset.zoomType = "summary";
|
|
2536
2596
|
root.setAttribute("role", "group");
|
|
2537
2597
|
root.setAttribute("aria-label", summaryView.ariaLabel);
|
|
2538
2598
|
for (const tile2 of summaryView.tiles) {
|
|
2539
|
-
const tileElement =
|
|
2599
|
+
const tileElement = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-summary-zoom-tile", {
|
|
2540
2600
|
...tile2.style,
|
|
2541
2601
|
backgroundColor: tile2.backgroundColor,
|
|
2542
2602
|
overflow: "hidden",
|
|
@@ -2570,22 +2630,22 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2570
2630
|
});
|
|
2571
2631
|
}
|
|
2572
2632
|
if (tile2.imageSrc) {
|
|
2573
|
-
const image =
|
|
2633
|
+
const image = chunkMZCAYJ7H_cjs.createEl(doc, "img");
|
|
2574
2634
|
image.src = tile2.imageSrc;
|
|
2575
2635
|
image.alt = tile2.ariaLabel;
|
|
2576
2636
|
image.setAttribute("draggable", "false");
|
|
2577
2637
|
image.style.cssText = "width:100%;height:100%;object-fit:contain";
|
|
2578
2638
|
tileElement.appendChild(image);
|
|
2579
2639
|
} else {
|
|
2580
|
-
const label =
|
|
2640
|
+
const label = chunkMZCAYJ7H_cjs.createEl(doc, "div");
|
|
2581
2641
|
label.textContent = tile2.label;
|
|
2582
|
-
const slideLabel =
|
|
2642
|
+
const slideLabel = chunkMZCAYJ7H_cjs.createEl(doc, "div");
|
|
2583
2643
|
slideLabel.textContent = tile2.slideLabel;
|
|
2584
2644
|
tileElement.append(label, slideLabel);
|
|
2585
2645
|
}
|
|
2586
2646
|
content.appendChild(tileElement);
|
|
2587
2647
|
}
|
|
2588
|
-
const badge2 =
|
|
2648
|
+
const badge2 = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-zoom-badge");
|
|
2589
2649
|
badge2.textContent = context.t("pptx.zoom.summaryZoom");
|
|
2590
2650
|
content.appendChild(badge2);
|
|
2591
2651
|
root.appendChild(content);
|
|
@@ -2595,7 +2655,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2595
2655
|
const target = element.targetSlideIndex ?? 0;
|
|
2596
2656
|
const targetSlide = context.slides?.[target];
|
|
2597
2657
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2598
|
-
const el =
|
|
2658
|
+
const el = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-element pptxv-zoom", chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex));
|
|
2599
2659
|
el.dataset.elementId = element.id;
|
|
2600
2660
|
el.dataset.zoomType = zoomType;
|
|
2601
2661
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2605,7 +2665,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2605
2665
|
el.tabIndex = 0;
|
|
2606
2666
|
el.style.cursor = "pointer";
|
|
2607
2667
|
const activate = () => {
|
|
2608
|
-
const zoomTarget =
|
|
2668
|
+
const zoomTarget = chunkCWBVJ4DC_cjs.resolveZoomNavigationTarget(element);
|
|
2609
2669
|
if (zoomTarget) {
|
|
2610
2670
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2611
2671
|
}
|
|
@@ -2630,7 +2690,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2630
2690
|
section: element.targetSectionId
|
|
2631
2691
|
}) : context.t("pptx.zoom.ariaLabel", { number: target + 1 })
|
|
2632
2692
|
);
|
|
2633
|
-
const tile =
|
|
2693
|
+
const tile = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-zoom-tile", {
|
|
2634
2694
|
position: "relative",
|
|
2635
2695
|
width: "100%",
|
|
2636
2696
|
height: "100%",
|
|
@@ -2639,7 +2699,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2639
2699
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
2640
2700
|
});
|
|
2641
2701
|
if (element.imageData) {
|
|
2642
|
-
const img =
|
|
2702
|
+
const img = chunkMZCAYJ7H_cjs.createEl(doc, "img", "pptxv-zoom-img", {
|
|
2643
2703
|
width: "100%",
|
|
2644
2704
|
height: "100%",
|
|
2645
2705
|
objectFit: "contain",
|
|
@@ -2662,7 +2722,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2662
2722
|
)
|
|
2663
2723
|
);
|
|
2664
2724
|
}
|
|
2665
|
-
const badge =
|
|
2725
|
+
const badge = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-zoom-badge", {
|
|
2666
2726
|
position: "absolute",
|
|
2667
2727
|
bottom: "4px",
|
|
2668
2728
|
right: "4px",
|
|
@@ -2680,7 +2740,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2680
2740
|
return el;
|
|
2681
2741
|
};
|
|
2682
2742
|
function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
2683
|
-
const box =
|
|
2743
|
+
const box = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-zoom-thumbnail", {
|
|
2684
2744
|
width: "100%",
|
|
2685
2745
|
height: "100%",
|
|
2686
2746
|
display: "flex",
|
|
@@ -2691,7 +2751,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2691
2751
|
border: "1px solid rgba(0, 0, 0, 0.1)",
|
|
2692
2752
|
boxSizing: "border-box"
|
|
2693
2753
|
});
|
|
2694
|
-
const slideLabel =
|
|
2754
|
+
const slideLabel = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-zoom-slide-label", {
|
|
2695
2755
|
fontSize: "14px",
|
|
2696
2756
|
fontWeight: 600,
|
|
2697
2757
|
color: "rgba(0, 0, 0, 0.5)",
|
|
@@ -2700,7 +2760,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2700
2760
|
slideLabel.textContent = t("pptx.notes.slideN", { n: slideNumber });
|
|
2701
2761
|
box.appendChild(slideLabel);
|
|
2702
2762
|
if (sectionText) {
|
|
2703
|
-
const sectionLabel =
|
|
2763
|
+
const sectionLabel = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-zoom-section-label", {
|
|
2704
2764
|
fontSize: "10px",
|
|
2705
2765
|
color: "rgba(0, 0, 0, 0.4)"
|
|
2706
2766
|
});
|
|
@@ -2719,7 +2779,7 @@ function registerExtraRenderers(registry) {
|
|
|
2719
2779
|
|
|
2720
2780
|
// src/pptx/dom/elements/register-rich-media.ts
|
|
2721
2781
|
function registerRichMediaRenderers(registry) {
|
|
2722
|
-
registry.register("smartArt",
|
|
2782
|
+
registry.register("smartArt", chunkMZCAYJ7H_cjs.renderSmartArtElement);
|
|
2723
2783
|
registry.register("media", renderMediaElement);
|
|
2724
2784
|
registry.register("ink", renderInkElement);
|
|
2725
2785
|
registry.register("ole", renderOleElement);
|
|
@@ -2755,10 +2815,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2755
2815
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
2756
2816
|
handle.remove();
|
|
2757
2817
|
}
|
|
2758
|
-
const crossings =
|
|
2818
|
+
const crossings = chunkCWBVJ4DC_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2759
2819
|
const rowBounds = measureRowBoundaries(table);
|
|
2760
|
-
colHandles =
|
|
2761
|
-
const handle =
|
|
2820
|
+
colHandles = chunkCWBVJ4DC_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
2821
|
+
const handle = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-table-resize-col", {
|
|
2762
2822
|
position: "absolute",
|
|
2763
2823
|
top: "0",
|
|
2764
2824
|
bottom: "0",
|
|
@@ -2767,14 +2827,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2767
2827
|
zIndex: "10",
|
|
2768
2828
|
pointerEvents: "none"
|
|
2769
2829
|
});
|
|
2770
|
-
const segments =
|
|
2830
|
+
const segments = chunkCWBVJ4DC_cjs.columnHandleSegments(
|
|
2771
2831
|
crossings.columns[i] ?? [],
|
|
2772
2832
|
rowBounds,
|
|
2773
2833
|
table.offsetHeight
|
|
2774
2834
|
);
|
|
2775
2835
|
for (const { top, height } of segments) {
|
|
2776
2836
|
handle.appendChild(
|
|
2777
|
-
|
|
2837
|
+
chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2778
2838
|
position: "absolute",
|
|
2779
2839
|
left: "0",
|
|
2780
2840
|
right: "0",
|
|
@@ -2788,7 +2848,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2788
2848
|
return handle;
|
|
2789
2849
|
});
|
|
2790
2850
|
rowHandles = rowBounds.map((topPx, i) => {
|
|
2791
|
-
const handle =
|
|
2851
|
+
const handle = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-table-resize-row", {
|
|
2792
2852
|
position: "absolute",
|
|
2793
2853
|
left: "0",
|
|
2794
2854
|
right: "0",
|
|
@@ -2797,10 +2857,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2797
2857
|
zIndex: "10",
|
|
2798
2858
|
pointerEvents: "none"
|
|
2799
2859
|
});
|
|
2800
|
-
const segments =
|
|
2860
|
+
const segments = chunkCWBVJ4DC_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
2801
2861
|
for (const { leftPct, widthPct } of segments) {
|
|
2802
2862
|
handle.appendChild(
|
|
2803
|
-
|
|
2863
|
+
chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2804
2864
|
position: "absolute",
|
|
2805
2865
|
top: "0",
|
|
2806
2866
|
bottom: "0",
|
|
@@ -2841,14 +2901,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2841
2901
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
2842
2902
|
context.onTableResizeColumns?.(
|
|
2843
2903
|
element,
|
|
2844
|
-
|
|
2904
|
+
chunkCWBVJ4DC_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
2845
2905
|
);
|
|
2846
2906
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
2847
2907
|
const deltaY = event.clientY - active.startPos;
|
|
2848
2908
|
context.onTableResizeRow?.(
|
|
2849
2909
|
element,
|
|
2850
2910
|
active.index,
|
|
2851
|
-
|
|
2911
|
+
chunkCWBVJ4DC_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkCWBVJ4DC_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
2852
2912
|
);
|
|
2853
2913
|
}
|
|
2854
2914
|
drawHandles();
|
|
@@ -2857,13 +2917,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
2857
2917
|
const rect = container.getBoundingClientRect();
|
|
2858
2918
|
const localX = event.clientX - rect.left;
|
|
2859
2919
|
const localY = event.clientY - rect.top;
|
|
2860
|
-
const scaleY =
|
|
2861
|
-
const crossings =
|
|
2920
|
+
const scaleY = chunkCWBVJ4DC_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
2921
|
+
const crossings = chunkCWBVJ4DC_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2862
2922
|
const rowBounds = measureRowBoundaries(table);
|
|
2863
|
-
const colBoundaries =
|
|
2923
|
+
const colBoundaries = chunkCWBVJ4DC_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
2864
2924
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
2865
2925
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
2866
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
2926
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunkCWBVJ4DC_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
2867
2927
|
event.preventDefault();
|
|
2868
2928
|
event.stopPropagation();
|
|
2869
2929
|
doc.body.style.cursor = "col-resize";
|
|
@@ -2881,7 +2941,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2881
2941
|
}
|
|
2882
2942
|
}
|
|
2883
2943
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
2884
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
2944
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunkCWBVJ4DC_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
2885
2945
|
event.preventDefault();
|
|
2886
2946
|
event.stopPropagation();
|
|
2887
2947
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -2892,7 +2952,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2892
2952
|
index: i,
|
|
2893
2953
|
startPos: event.clientY,
|
|
2894
2954
|
handleEl: rowHandles[i] ?? container,
|
|
2895
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
2955
|
+
initialRowHeight: tr?.offsetHeight ?? chunkCWBVJ4DC_cjs.DEFAULT_ROW_HEIGHT
|
|
2896
2956
|
};
|
|
2897
2957
|
win.addEventListener("mousemove", onMouseMove);
|
|
2898
2958
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -2912,21 +2972,29 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
2912
2972
|
return null;
|
|
2913
2973
|
}
|
|
2914
2974
|
const doc = context.document;
|
|
2915
|
-
const
|
|
2916
|
-
|
|
2975
|
+
const styleContext = {
|
|
2976
|
+
colorScheme: context.colorScheme,
|
|
2977
|
+
tableStyleMap: context.tableStyleMap,
|
|
2978
|
+
fontScheme: context.fontScheme,
|
|
2979
|
+
formatScheme: context.formatScheme
|
|
2980
|
+
};
|
|
2981
|
+
const container = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
2982
|
+
// The table style's drop shadow (Themed Style 1/2) sits on the clipping frame.
|
|
2983
|
+
...chunkCWBVJ4DC_cjs.tableFrameCss(tableData, styleContext),
|
|
2984
|
+
...chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex),
|
|
2917
2985
|
overflow: "hidden"
|
|
2918
2986
|
});
|
|
2919
2987
|
container.dataset.elementId = element.id;
|
|
2920
|
-
const table =
|
|
2988
|
+
const table = chunkMZCAYJ7H_cjs.createEl(doc, "table", "pptxv-table-grid", {
|
|
2921
2989
|
width: "100%",
|
|
2922
2990
|
height: "100%",
|
|
2923
2991
|
borderCollapse: "collapse",
|
|
2924
2992
|
tableLayout: "fixed",
|
|
2925
2993
|
// Load-bearing: an unstyled cell otherwise inherits the HOST chrome's
|
|
2926
2994
|
// font stack; all five bindings declare the same shared default here.
|
|
2927
|
-
fontFamily:
|
|
2995
|
+
fontFamily: chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
|
|
2928
2996
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
2929
|
-
...
|
|
2997
|
+
...chunkCWBVJ4DC_cjs.tableContainerCss(tableData)
|
|
2930
2998
|
});
|
|
2931
2999
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
2932
3000
|
const tbody = doc.createElement("tbody");
|
|
@@ -2988,13 +3056,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
2988
3056
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
2989
3057
|
td.rowSpan = cell.rowSpan;
|
|
2990
3058
|
}
|
|
2991
|
-
const style =
|
|
3059
|
+
const style = chunkCWBVJ4DC_cjs.tableCellCss(
|
|
2992
3060
|
tableData,
|
|
2993
3061
|
cell,
|
|
2994
3062
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
2995
3063
|
styleContext
|
|
2996
3064
|
);
|
|
2997
|
-
const patternFill = cell.style ?
|
|
3065
|
+
const patternFill = cell.style ? chunkCWBVJ4DC_cjs.cellPatternFillCss(cell.style) : null;
|
|
2998
3066
|
if (patternFill) {
|
|
2999
3067
|
delete style["backgroundColor"];
|
|
3000
3068
|
delete style["background"];
|
|
@@ -3005,9 +3073,9 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3005
3073
|
style["backgroundColor"] = patternFill.backgroundColor;
|
|
3006
3074
|
}
|
|
3007
3075
|
}
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
const diagonals =
|
|
3076
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(td, CELL_BASE_STYLE);
|
|
3077
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(td, style);
|
|
3078
|
+
const diagonals = chunkCWBVJ4DC_cjs.getCellDiagonalBorders(
|
|
3011
3079
|
cell.style,
|
|
3012
3080
|
tableData,
|
|
3013
3081
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3016,21 +3084,21 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3016
3084
|
if (diagonals) {
|
|
3017
3085
|
td.appendChild(renderDiagonalOverlay(doc, diagonals));
|
|
3018
3086
|
}
|
|
3019
|
-
appendCellText(doc, td, cell, style);
|
|
3087
|
+
appendCellText(doc, td, cell, style, tableData.defaultCellFontSize);
|
|
3020
3088
|
return td;
|
|
3021
3089
|
}
|
|
3022
3090
|
function diagonalLine(doc, x1, y1, x2, y2, stroke, width) {
|
|
3023
|
-
const line =
|
|
3024
|
-
line.style.setProperty("stroke-width",
|
|
3091
|
+
const line = chunkMZCAYJ7H_cjs.createSvgEl(doc, "line", { x1, y1, x2, y2, stroke, "stroke-width": width });
|
|
3092
|
+
line.style.setProperty("stroke-width", chunkFI2ATACZ_cjs.screenStrokeWidth(width));
|
|
3025
3093
|
return line;
|
|
3026
3094
|
}
|
|
3027
3095
|
function renderDiagonalOverlay(doc, diagonals) {
|
|
3028
|
-
const svg =
|
|
3096
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(doc, "svg", {
|
|
3029
3097
|
class: "pptxv-table-diag",
|
|
3030
3098
|
"aria-hidden": "true",
|
|
3031
3099
|
preserveAspectRatio: "none"
|
|
3032
3100
|
});
|
|
3033
|
-
|
|
3101
|
+
chunkMZCAYJ7H_cjs.applyStyleMap(svg, {
|
|
3034
3102
|
position: "absolute",
|
|
3035
3103
|
inset: 0,
|
|
3036
3104
|
width: "100%",
|
|
@@ -3050,11 +3118,11 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3050
3118
|
}
|
|
3051
3119
|
return svg;
|
|
3052
3120
|
}
|
|
3053
|
-
function appendCellText(doc, td, cell, cellCss) {
|
|
3054
|
-
const blocks =
|
|
3121
|
+
function appendCellText(doc, td, cell, cellCss, defaultFontPt) {
|
|
3122
|
+
const blocks = chunkCWBVJ4DC_cjs.cellParagraphBlocks(cell, { cellCss, defaultFontPt });
|
|
3055
3123
|
if (blocks) {
|
|
3056
3124
|
for (const block of blocks) {
|
|
3057
|
-
const div =
|
|
3125
|
+
const div = chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
3058
3126
|
appendRuns(doc, div, block.runs, cellCss);
|
|
3059
3127
|
td.appendChild(div);
|
|
3060
3128
|
}
|
|
@@ -3063,7 +3131,7 @@ function appendCellText(doc, td, cell, cellCss) {
|
|
|
3063
3131
|
const richCell = cell;
|
|
3064
3132
|
const textRuns = richCell.textRuns && richCell.textRuns.length > 0 ? richCell.textRuns : null;
|
|
3065
3133
|
if (!textRuns) {
|
|
3066
|
-
const span =
|
|
3134
|
+
const span = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-table-text", { position: "relative" });
|
|
3067
3135
|
span.textContent = cell.text || " ";
|
|
3068
3136
|
td.appendChild(span);
|
|
3069
3137
|
return;
|
|
@@ -3071,7 +3139,7 @@ function appendCellText(doc, td, cell, cellCss) {
|
|
|
3071
3139
|
for (const run of textRuns) {
|
|
3072
3140
|
if (run.isParagraphBreak) {
|
|
3073
3141
|
td.appendChild(
|
|
3074
|
-
|
|
3142
|
+
chunkMZCAYJ7H_cjs.createEl(doc, "div", "pptxv-table-para-break", { display: "block", height: 0 })
|
|
3075
3143
|
);
|
|
3076
3144
|
continue;
|
|
3077
3145
|
}
|
|
@@ -3084,9 +3152,9 @@ function appendRuns(doc, parent, runs, cellCss) {
|
|
|
3084
3152
|
parent.appendChild(doc.createElement("br"));
|
|
3085
3153
|
continue;
|
|
3086
3154
|
}
|
|
3087
|
-
const span =
|
|
3155
|
+
const span = chunkMZCAYJ7H_cjs.createEl(doc, "span", "pptxv-table-run", {
|
|
3088
3156
|
position: "relative",
|
|
3089
|
-
...
|
|
3157
|
+
...chunkCWBVJ4DC_cjs.cellRunStyle(run, cellCss)
|
|
3090
3158
|
});
|
|
3091
3159
|
span.textContent = run.text;
|
|
3092
3160
|
parent.appendChild(span);
|
|
@@ -3100,8 +3168,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3100
3168
|
}
|
|
3101
3169
|
|
|
3102
3170
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3103
|
-
var glyphOutlineFontCache = new
|
|
3104
|
-
var getGlyphOutline =
|
|
3171
|
+
var glyphOutlineFontCache = new chunkCWBVJ4DC_cjs.GlyphOutlineFontCache();
|
|
3172
|
+
var getGlyphOutline = chunkCWBVJ4DC_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3105
3173
|
|
|
3106
3174
|
// src/pptx/dom/elements/text-warp.ts
|
|
3107
3175
|
function renderWarpedText(element, context) {
|
|
@@ -3113,16 +3181,16 @@ function renderWarpedText(element, context) {
|
|
|
3113
3181
|
if (!preset || preset === "textNoShape") {
|
|
3114
3182
|
return null;
|
|
3115
3183
|
}
|
|
3116
|
-
const paragraphs =
|
|
3184
|
+
const paragraphs = chunkCWBVJ4DC_cjs.groupIntoParagraphs(element);
|
|
3117
3185
|
if (paragraphs.length === 0) {
|
|
3118
3186
|
return null;
|
|
3119
3187
|
}
|
|
3120
|
-
if (!
|
|
3121
|
-
const transform =
|
|
3188
|
+
if (!chunkCWBVJ4DC_cjs.shouldUseSvgWarp(preset)) {
|
|
3189
|
+
const transform = chunkCWBVJ4DC_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3122
3190
|
if (!transform) {
|
|
3123
3191
|
return null;
|
|
3124
3192
|
}
|
|
3125
|
-
const text =
|
|
3193
|
+
const text = chunkMZCAYJ7H_cjs.createEl(context.document, "div", "pptxv-wordart", {
|
|
3126
3194
|
width: "100%",
|
|
3127
3195
|
height: "100%",
|
|
3128
3196
|
display: "flex",
|
|
@@ -3140,14 +3208,14 @@ function renderWarpedText(element, context) {
|
|
|
3140
3208
|
if (style?.fontSize) {
|
|
3141
3209
|
text.style.fontSize = `${style.fontSize}px`;
|
|
3142
3210
|
}
|
|
3143
|
-
const fontWeight =
|
|
3211
|
+
const fontWeight = chunkCWBVJ4DC_cjs.fontWeightAttribute(style?.fontFamily, style?.bold);
|
|
3144
3212
|
if (fontWeight) {
|
|
3145
3213
|
text.style.fontWeight = fontWeight;
|
|
3146
3214
|
}
|
|
3147
3215
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3148
3216
|
return text;
|
|
3149
3217
|
}
|
|
3150
|
-
if (
|
|
3218
|
+
if (chunkCWBVJ4DC_cjs.hasGlyphEnvelope(preset)) {
|
|
3151
3219
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3152
3220
|
}
|
|
3153
3221
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3156,7 +3224,7 @@ function segmentFont(segment, elementStyle) {
|
|
|
3156
3224
|
const s = segment.style ?? {};
|
|
3157
3225
|
const family = s.fontFamily || elementStyle.fontFamily;
|
|
3158
3226
|
return {
|
|
3159
|
-
fontFamily: family ? pptx.getSubstituteFontFamily(family) :
|
|
3227
|
+
fontFamily: family ? pptx.getSubstituteFontFamily(family) : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
|
|
3160
3228
|
fontSizePx: s.fontSize ?? elementStyle.fontSize ?? 18,
|
|
3161
3229
|
bold: s.bold ?? elementStyle.bold,
|
|
3162
3230
|
italic: s.italic ?? elementStyle.italic
|
|
@@ -3167,13 +3235,13 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3167
3235
|
const preset = style.textWarpPreset;
|
|
3168
3236
|
const width = Math.max(element.width, 1);
|
|
3169
3237
|
const height = Math.max(element.height, 1);
|
|
3170
|
-
const svg =
|
|
3238
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "svg", {
|
|
3171
3239
|
viewBox: `0 0 ${width} ${height}`,
|
|
3172
3240
|
"aria-hidden": "true"
|
|
3173
3241
|
});
|
|
3174
3242
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3175
3243
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3176
|
-
const perLine =
|
|
3244
|
+
const perLine = chunkCWBVJ4DC_cjs.buildGlyphEnvelopeBlock(
|
|
3177
3245
|
preset,
|
|
3178
3246
|
paragraphs.map(
|
|
3179
3247
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3194,23 +3262,23 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3194
3262
|
const segments = paragraph.segments;
|
|
3195
3263
|
const glyphs = perLine[lineIndex] ?? [];
|
|
3196
3264
|
glyphs.forEach((g, glyphIndex) => {
|
|
3197
|
-
const
|
|
3198
|
-
const fill =
|
|
3199
|
-
const renderedFamily = s.fontFamily || style.fontFamily;
|
|
3265
|
+
const paint = chunkCWBVJ4DC_cjs.resolveWarpRunPaint(segments[g.segmentIndex], style);
|
|
3266
|
+
const fill = paint.fill;
|
|
3200
3267
|
const textAttrs = {
|
|
3201
3268
|
fill,
|
|
3202
|
-
"font-family":
|
|
3203
|
-
"font-size":
|
|
3204
|
-
"font-weight":
|
|
3205
|
-
"font-style":
|
|
3269
|
+
"font-family": paint.fontFamily,
|
|
3270
|
+
"font-size": paint.fontSizePx,
|
|
3271
|
+
"font-weight": paint.fontWeight,
|
|
3272
|
+
"font-style": paint.fontStyle,
|
|
3273
|
+
"text-decoration": paint.textDecoration
|
|
3206
3274
|
};
|
|
3207
3275
|
if (g.outlinePath) {
|
|
3208
|
-
const path =
|
|
3276
|
+
const path = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "path", { d: g.outlinePath, fill });
|
|
3209
3277
|
svg.appendChild(path);
|
|
3210
3278
|
return;
|
|
3211
3279
|
}
|
|
3212
3280
|
if (!g.slices || g.slices.length <= 1) {
|
|
3213
|
-
const text =
|
|
3281
|
+
const text = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "text", {
|
|
3214
3282
|
x: g.x,
|
|
3215
3283
|
y: g.y,
|
|
3216
3284
|
transform: g.transform,
|
|
@@ -3220,17 +3288,17 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3220
3288
|
svg.appendChild(text);
|
|
3221
3289
|
return;
|
|
3222
3290
|
}
|
|
3223
|
-
const group =
|
|
3291
|
+
const group = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "g", {
|
|
3224
3292
|
"data-glyph-slices": g.slices.length
|
|
3225
3293
|
});
|
|
3226
3294
|
g.slices.forEach((slice, sliceIndex) => {
|
|
3227
3295
|
const clipId = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-l${lineIndex}-g${glyphIndex}-s${sliceIndex}`;
|
|
3228
|
-
const clipPath =
|
|
3296
|
+
const clipPath = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "clipPath", {
|
|
3229
3297
|
id: clipId,
|
|
3230
3298
|
clipPathUnits: "userSpaceOnUse"
|
|
3231
3299
|
});
|
|
3232
3300
|
clipPath.appendChild(
|
|
3233
|
-
|
|
3301
|
+
chunkMZCAYJ7H_cjs.createSvgEl(context.document, "rect", {
|
|
3234
3302
|
x: slice.clipX0,
|
|
3235
3303
|
y: -1e5,
|
|
3236
3304
|
width: slice.clipX1 - slice.clipX0,
|
|
@@ -3238,7 +3306,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3238
3306
|
})
|
|
3239
3307
|
);
|
|
3240
3308
|
group.appendChild(clipPath);
|
|
3241
|
-
const text =
|
|
3309
|
+
const text = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "text", {
|
|
3242
3310
|
x: g.x,
|
|
3243
3311
|
y: g.y,
|
|
3244
3312
|
transform: slice.transform,
|
|
@@ -3256,43 +3324,57 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3256
3324
|
function renderPathWarp(element, paragraphs, context) {
|
|
3257
3325
|
const style = element.textStyle;
|
|
3258
3326
|
const preset = style.textWarpPreset;
|
|
3259
|
-
const svg =
|
|
3327
|
+
const svg = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "svg", {
|
|
3260
3328
|
viewBox: `0 0 ${Math.max(element.width, 1)} ${Math.max(element.height, 1)}`,
|
|
3261
3329
|
preserveAspectRatio: "none",
|
|
3262
3330
|
"aria-hidden": "true"
|
|
3263
3331
|
});
|
|
3264
3332
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3265
3333
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3266
|
-
const defs =
|
|
3334
|
+
const defs = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "defs");
|
|
3335
|
+
const layouts = chunkCWBVJ4DC_cjs.warpParagraphLayouts(
|
|
3336
|
+
preset,
|
|
3337
|
+
element.width,
|
|
3338
|
+
element.height,
|
|
3339
|
+
paragraphs,
|
|
3340
|
+
style.textWarpAdj,
|
|
3341
|
+
style.textWarpAdj2,
|
|
3342
|
+
style
|
|
3343
|
+
);
|
|
3267
3344
|
paragraphs.forEach((paragraph, index) => {
|
|
3268
3345
|
const id = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-${index}`;
|
|
3269
3346
|
defs.appendChild(
|
|
3270
|
-
|
|
3347
|
+
chunkMZCAYJ7H_cjs.createSvgEl(context.document, "path", {
|
|
3271
3348
|
id,
|
|
3272
|
-
d:
|
|
3273
|
-
preset,
|
|
3274
|
-
element.width,
|
|
3275
|
-
element.height,
|
|
3276
|
-
index,
|
|
3277
|
-
paragraphs.length,
|
|
3278
|
-
style.textWarpAdj,
|
|
3279
|
-
style.textWarpAdj2
|
|
3280
|
-
)
|
|
3349
|
+
d: layouts[index]?.d
|
|
3281
3350
|
})
|
|
3282
3351
|
);
|
|
3283
|
-
const text =
|
|
3352
|
+
const text = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "text", {
|
|
3284
3353
|
fill: style.color ?? "#000000",
|
|
3285
|
-
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) :
|
|
3354
|
+
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
|
|
3286
3355
|
"font-size": style.fontSize ?? 18,
|
|
3287
|
-
"font-weight":
|
|
3288
|
-
"font-style":
|
|
3356
|
+
"font-weight": chunkCWBVJ4DC_cjs.fontWeightAttribute(style.fontFamily, style.bold),
|
|
3357
|
+
"font-style": chunkCWBVJ4DC_cjs.resolveFontItalic(style.fontFamily, style.italic) ? "italic" : void 0
|
|
3289
3358
|
});
|
|
3290
|
-
const textPath =
|
|
3359
|
+
const textPath = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "textPath", {
|
|
3291
3360
|
href: `#${id}`,
|
|
3292
3361
|
startOffset: "50%",
|
|
3293
3362
|
"text-anchor": "middle"
|
|
3294
3363
|
});
|
|
3295
|
-
|
|
3364
|
+
const fit = layouts[index]?.fitScale ?? 1;
|
|
3365
|
+
for (const segment of paragraph.segments) {
|
|
3366
|
+
const paint = chunkCWBVJ4DC_cjs.resolveWarpRunPaint(segment, style);
|
|
3367
|
+
const tspan = chunkMZCAYJ7H_cjs.createSvgEl(context.document, "tspan", {
|
|
3368
|
+
fill: paint.fill,
|
|
3369
|
+
"font-family": paint.fontFamily,
|
|
3370
|
+
"font-size": paint.fontSizePx * fit,
|
|
3371
|
+
"font-weight": paint.fontWeight ?? "normal",
|
|
3372
|
+
"font-style": paint.fontStyle ?? "normal",
|
|
3373
|
+
"text-decoration": paint.textDecoration
|
|
3374
|
+
});
|
|
3375
|
+
tspan.textContent = segment.text;
|
|
3376
|
+
textPath.appendChild(tspan);
|
|
3377
|
+
}
|
|
3296
3378
|
text.appendChild(textPath);
|
|
3297
3379
|
svg.appendChild(text);
|
|
3298
3380
|
});
|
|
@@ -3302,9 +3384,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3302
3384
|
|
|
3303
3385
|
// src/pptx/dom/elements/text-shape.ts
|
|
3304
3386
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3305
|
-
const container =
|
|
3387
|
+
const container = chunkCWBVJ4DC_cjs.getContainerStyle(element, zIndex);
|
|
3306
3388
|
const animState = context.presentationStates?.get(element.id);
|
|
3307
|
-
const background =
|
|
3389
|
+
const background = chunkCWBVJ4DC_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3308
3390
|
const visualState = background ?? animState;
|
|
3309
3391
|
const shape = getShapeFillStrokeStyle(
|
|
3310
3392
|
element,
|
|
@@ -3312,32 +3394,36 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3312
3394
|
visualState?.animatesStroke
|
|
3313
3395
|
);
|
|
3314
3396
|
const merged = { ...container, ...shape };
|
|
3315
|
-
const bleedPatch =
|
|
3397
|
+
const bleedPatch = chunkCWBVJ4DC_cjs.abuttingEdgeBleedStyle(element, context.edgeBleeds?.get(element.id), merged);
|
|
3316
3398
|
const beforeBleed = { ...merged };
|
|
3317
3399
|
Object.assign(merged, bleedPatch);
|
|
3318
|
-
const transform =
|
|
3400
|
+
const transform = chunkMZCAYJ7H_cjs.composeTransforms(container["transform"], shape["transform"]);
|
|
3319
3401
|
if (transform !== void 0) {
|
|
3320
3402
|
merged["transform"] = transform;
|
|
3321
3403
|
}
|
|
3322
|
-
const layers =
|
|
3323
|
-
const el =
|
|
3404
|
+
const layers = chunkCWBVJ4DC_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3405
|
+
const el = chunkMZCAYJ7H_cjs.createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3324
3406
|
el.dataset.elementId = element.id;
|
|
3325
3407
|
markAbuttingEdgeBleed(el, bleedPatch, beforeBleed);
|
|
3326
|
-
const paint = layers.paint ?
|
|
3408
|
+
const paint = layers.paint ? chunkMZCAYJ7H_cjs.createEl(context.document, "div", void 0, layers.paint) : el;
|
|
3327
3409
|
if (paint !== el) {
|
|
3328
3410
|
paint.dataset.animId = layers.targetId;
|
|
3329
3411
|
paint.dataset.pptxAnimationLayer = "background";
|
|
3330
3412
|
el.appendChild(paint);
|
|
3331
3413
|
}
|
|
3332
3414
|
if (context.interactive && !context.presenting) {
|
|
3333
|
-
const hitTargetStyle =
|
|
3415
|
+
const hitTargetStyle = chunkCWBVJ4DC_cjs.elementHitTargetStyle(element);
|
|
3334
3416
|
if (hitTargetStyle) {
|
|
3335
|
-
const hitTarget =
|
|
3417
|
+
const hitTarget = chunkMZCAYJ7H_cjs.createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3336
3418
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
3337
3419
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
3338
3420
|
el.appendChild(hitTarget);
|
|
3339
3421
|
}
|
|
3340
3422
|
}
|
|
3423
|
+
const fillLayer = renderShapeFillLayer(context.document, element);
|
|
3424
|
+
if (fillLayer) {
|
|
3425
|
+
paint.appendChild(fillLayer);
|
|
3426
|
+
}
|
|
3341
3427
|
const subpathFill = renderShapeSubpathFillOverlay(context.document, element);
|
|
3342
3428
|
if (subpathFill) {
|
|
3343
3429
|
paint.appendChild(subpathFill);
|
|
@@ -3373,8 +3459,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3373
3459
|
} else if (warped) {
|
|
3374
3460
|
el.appendChild(warped);
|
|
3375
3461
|
} else {
|
|
3376
|
-
const linkedSegments =
|
|
3377
|
-
const paragraphs =
|
|
3462
|
+
const linkedSegments = chunkCWBVJ4DC_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3463
|
+
const paragraphs = chunkCWBVJ4DC_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3378
3464
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3379
3465
|
if (hasText) {
|
|
3380
3466
|
el.appendChild(
|
|
@@ -3385,9 +3471,9 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3385
3471
|
);
|
|
3386
3472
|
} else {
|
|
3387
3473
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3388
|
-
const prompt =
|
|
3474
|
+
const prompt = chunkCWBVJ4DC_cjs.placeholderPromptDescriptor(element, mode);
|
|
3389
3475
|
if (prompt) {
|
|
3390
|
-
const hint =
|
|
3476
|
+
const hint = chunkMZCAYJ7H_cjs.createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3391
3477
|
...getTextBlockStyle(element),
|
|
3392
3478
|
...prompt.style
|
|
3393
3479
|
});
|
|
@@ -3401,7 +3487,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3401
3487
|
|
|
3402
3488
|
// src/pptx/dom/elements/index.ts
|
|
3403
3489
|
function createDefaultRegistry() {
|
|
3404
|
-
const registry =
|
|
3490
|
+
const registry = chunkMZCAYJ7H_cjs.createElementRendererRegistry();
|
|
3405
3491
|
registry.register("text", renderTextShapeElement);
|
|
3406
3492
|
registry.register("shape", renderTextShapeElement);
|
|
3407
3493
|
registry.register("image", renderImageElement);
|
|
@@ -3451,8 +3537,8 @@ async function loadPresentation(buffer, options) {
|
|
|
3451
3537
|
digitalSignatureCount: parsed.digitalSignatureCount ?? 0,
|
|
3452
3538
|
isPasswordProtected: parsed.isPasswordProtected ?? false,
|
|
3453
3539
|
canvasSize: {
|
|
3454
|
-
width: parsed.width ??
|
|
3455
|
-
height: parsed.height ??
|
|
3540
|
+
width: parsed.width ?? chunkHTFYAGHG_cjs.DEFAULT_CANVAS_WIDTH,
|
|
3541
|
+
height: parsed.height ?? chunkHTFYAGHG_cjs.DEFAULT_CANVAS_HEIGHT
|
|
3456
3542
|
},
|
|
3457
3543
|
mediaDataUrls,
|
|
3458
3544
|
colorScheme: parsed.theme?.colorScheme,
|
|
@@ -3553,119 +3639,119 @@ async function resolveImageUrls(handler, slides) {
|
|
|
3553
3639
|
|
|
3554
3640
|
Object.defineProperty(exports, "SMARTART_SVG_STYLE", {
|
|
3555
3641
|
enumerable: true,
|
|
3556
|
-
get: function () { return
|
|
3642
|
+
get: function () { return chunkMZCAYJ7H_cjs.SMARTART_SVG_STYLE; }
|
|
3557
3643
|
});
|
|
3558
3644
|
Object.defineProperty(exports, "appendSvgTextLines", {
|
|
3559
3645
|
enumerable: true,
|
|
3560
|
-
get: function () { return
|
|
3646
|
+
get: function () { return chunkMZCAYJ7H_cjs.appendSvgTextLines; }
|
|
3561
3647
|
});
|
|
3562
3648
|
Object.defineProperty(exports, "applyStyleMap", {
|
|
3563
3649
|
enumerable: true,
|
|
3564
|
-
get: function () { return
|
|
3650
|
+
get: function () { return chunkMZCAYJ7H_cjs.applyStyleMap; }
|
|
3565
3651
|
});
|
|
3566
3652
|
Object.defineProperty(exports, "applyThreeViewTextStyle", {
|
|
3567
3653
|
enumerable: true,
|
|
3568
|
-
get: function () { return
|
|
3654
|
+
get: function () { return chunkMZCAYJ7H_cjs.applyThreeViewTextStyle; }
|
|
3569
3655
|
});
|
|
3570
3656
|
Object.defineProperty(exports, "buildSmartArtFallbackSvg", {
|
|
3571
3657
|
enumerable: true,
|
|
3572
|
-
get: function () { return
|
|
3658
|
+
get: function () { return chunkMZCAYJ7H_cjs.buildSmartArtFallbackSvg; }
|
|
3573
3659
|
});
|
|
3574
3660
|
Object.defineProperty(exports, "buildSmartArtInsertPreview", {
|
|
3575
3661
|
enumerable: true,
|
|
3576
|
-
get: function () { return
|
|
3662
|
+
get: function () { return chunkMZCAYJ7H_cjs.buildSmartArtInsertPreview; }
|
|
3577
3663
|
});
|
|
3578
3664
|
Object.defineProperty(exports, "buildSvgGradientDefs", {
|
|
3579
3665
|
enumerable: true,
|
|
3580
|
-
get: function () { return
|
|
3666
|
+
get: function () { return chunkMZCAYJ7H_cjs.buildSvgGradientDefs; }
|
|
3581
3667
|
});
|
|
3582
3668
|
Object.defineProperty(exports, "collectThreeViews", {
|
|
3583
3669
|
enumerable: true,
|
|
3584
|
-
get: function () { return
|
|
3670
|
+
get: function () { return chunkMZCAYJ7H_cjs.collectThreeViews; }
|
|
3585
3671
|
});
|
|
3586
3672
|
Object.defineProperty(exports, "composeTransforms", {
|
|
3587
3673
|
enumerable: true,
|
|
3588
|
-
get: function () { return
|
|
3674
|
+
get: function () { return chunkMZCAYJ7H_cjs.composeTransforms; }
|
|
3589
3675
|
});
|
|
3590
3676
|
Object.defineProperty(exports, "createEl", {
|
|
3591
3677
|
enumerable: true,
|
|
3592
|
-
get: function () { return
|
|
3678
|
+
get: function () { return chunkMZCAYJ7H_cjs.createEl; }
|
|
3593
3679
|
});
|
|
3594
3680
|
Object.defineProperty(exports, "createElementRendererRegistry", {
|
|
3595
3681
|
enumerable: true,
|
|
3596
|
-
get: function () { return
|
|
3682
|
+
get: function () { return chunkMZCAYJ7H_cjs.createElementRendererRegistry; }
|
|
3597
3683
|
});
|
|
3598
3684
|
Object.defineProperty(exports, "createSvgEl", {
|
|
3599
3685
|
enumerable: true,
|
|
3600
|
-
get: function () { return
|
|
3686
|
+
get: function () { return chunkMZCAYJ7H_cjs.createSvgEl; }
|
|
3601
3687
|
});
|
|
3602
3688
|
Object.defineProperty(exports, "enableSmartArtEditing", {
|
|
3603
3689
|
enumerable: true,
|
|
3604
|
-
get: function () { return
|
|
3690
|
+
get: function () { return chunkMZCAYJ7H_cjs.enableSmartArtEditing; }
|
|
3605
3691
|
});
|
|
3606
3692
|
Object.defineProperty(exports, "isChart3DEditable", {
|
|
3607
3693
|
enumerable: true,
|
|
3608
|
-
get: function () { return
|
|
3694
|
+
get: function () { return chunkMZCAYJ7H_cjs.isChart3DEditable; }
|
|
3609
3695
|
});
|
|
3610
3696
|
Object.defineProperty(exports, "mountThreeViewInto", {
|
|
3611
3697
|
enumerable: true,
|
|
3612
|
-
get: function () { return
|
|
3698
|
+
get: function () { return chunkMZCAYJ7H_cjs.mountThreeViewInto; }
|
|
3613
3699
|
});
|
|
3614
3700
|
Object.defineProperty(exports, "renderSmartArt3DElement", {
|
|
3615
3701
|
enumerable: true,
|
|
3616
|
-
get: function () { return
|
|
3702
|
+
get: function () { return chunkMZCAYJ7H_cjs.renderSmartArt3DElement; }
|
|
3617
3703
|
});
|
|
3618
3704
|
Object.defineProperty(exports, "renderSmartArtElement", {
|
|
3619
3705
|
enumerable: true,
|
|
3620
|
-
get: function () { return
|
|
3706
|
+
get: function () { return chunkMZCAYJ7H_cjs.renderSmartArtElement; }
|
|
3621
3707
|
});
|
|
3622
3708
|
Object.defineProperty(exports, "renderSmartArtSvg", {
|
|
3623
3709
|
enumerable: true,
|
|
3624
|
-
get: function () { return
|
|
3710
|
+
get: function () { return chunkMZCAYJ7H_cjs.renderSmartArtSvg; }
|
|
3625
3711
|
});
|
|
3626
3712
|
Object.defineProperty(exports, "rendering3DFlagsOf", {
|
|
3627
3713
|
enumerable: true,
|
|
3628
|
-
get: function () { return
|
|
3714
|
+
get: function () { return chunkMZCAYJ7H_cjs.rendering3DFlagsOf; }
|
|
3629
3715
|
});
|
|
3630
3716
|
Object.defineProperty(exports, "selectedChartPartOf", {
|
|
3631
3717
|
enumerable: true,
|
|
3632
|
-
get: function () { return
|
|
3718
|
+
get: function () { return chunkMZCAYJ7H_cjs.selectedChartPartOf; }
|
|
3633
3719
|
});
|
|
3634
3720
|
Object.defineProperty(exports, "setSvgAttrs", {
|
|
3635
3721
|
enumerable: true,
|
|
3636
|
-
get: function () { return
|
|
3722
|
+
get: function () { return chunkMZCAYJ7H_cjs.setSvgAttrs; }
|
|
3637
3723
|
});
|
|
3638
3724
|
Object.defineProperty(exports, "takeReusableThreeView", {
|
|
3639
3725
|
enumerable: true,
|
|
3640
|
-
get: function () { return
|
|
3726
|
+
get: function () { return chunkMZCAYJ7H_cjs.takeReusableThreeView; }
|
|
3641
3727
|
});
|
|
3642
3728
|
Object.defineProperty(exports, "wireChartThreeViewEvents", {
|
|
3643
3729
|
enumerable: true,
|
|
3644
|
-
get: function () { return
|
|
3730
|
+
get: function () { return chunkMZCAYJ7H_cjs.wireChartThreeViewEvents; }
|
|
3645
3731
|
});
|
|
3646
3732
|
Object.defineProperty(exports, "withReusableThreeViews", {
|
|
3647
3733
|
enumerable: true,
|
|
3648
|
-
get: function () { return
|
|
3734
|
+
get: function () { return chunkMZCAYJ7H_cjs.withReusableThreeViews; }
|
|
3649
3735
|
});
|
|
3650
3736
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
3651
3737
|
enumerable: true,
|
|
3652
|
-
get: function () { return
|
|
3738
|
+
get: function () { return chunkCWBVJ4DC_cjs.buildEmbeddedFontStyles; }
|
|
3653
3739
|
});
|
|
3654
3740
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
3655
3741
|
enumerable: true,
|
|
3656
|
-
get: function () { return
|
|
3742
|
+
get: function () { return chunkCWBVJ4DC_cjs.buildFieldSubstitutionContext; }
|
|
3657
3743
|
});
|
|
3658
3744
|
Object.defineProperty(exports, "releasePptxRenderCaches", {
|
|
3659
3745
|
enumerable: true,
|
|
3660
|
-
get: function () { return
|
|
3746
|
+
get: function () { return chunkCWBVJ4DC_cjs.releasePptxRenderCaches; }
|
|
3661
3747
|
});
|
|
3662
3748
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
3663
3749
|
enumerable: true,
|
|
3664
|
-
get: function () { return
|
|
3750
|
+
get: function () { return chunkLOUVYGWX_cjs.renderChartViewModelSvg; }
|
|
3665
3751
|
});
|
|
3666
3752
|
Object.defineProperty(exports, "createTranslator", {
|
|
3667
3753
|
enumerable: true,
|
|
3668
|
-
get: function () { return
|
|
3754
|
+
get: function () { return chunkUFJBHFSD_cjs.createTranslator; }
|
|
3669
3755
|
});
|
|
3670
3756
|
exports.CHART_FORMAT_REQUEST_EVENT = CHART_FORMAT_REQUEST_EVENT;
|
|
3671
3757
|
exports.appendCommentMarkers = appendCommentMarkers;
|
|
@@ -3705,6 +3791,7 @@ exports.renderModel3dElement = renderModel3dElement;
|
|
|
3705
3791
|
exports.renderOleElement = renderOleElement;
|
|
3706
3792
|
exports.renderPlaceholderElement = renderPlaceholderElement;
|
|
3707
3793
|
exports.renderReflectionOverlay = renderReflectionOverlay;
|
|
3794
|
+
exports.renderShapeFillLayer = renderShapeFillLayer;
|
|
3708
3795
|
exports.renderShapeFillOverlay = renderShapeFillOverlay;
|
|
3709
3796
|
exports.renderShapeFilterDefs = renderShapeFilterDefs;
|
|
3710
3797
|
exports.renderShapeSubpathFillOverlay = renderShapeSubpathFillOverlay;
|