ooxml-ui 1.49.0 → 1.50.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 +10 -2
- package/dist/building-block-styles.d.ts +1 -0
- package/dist/chart/format-pane-effects.d.ts +1 -0
- package/dist/chart/format-pane-options.d.ts.map +1 -1
- package/dist/chart/format-pane-space.d.ts.map +1 -1
- package/dist/chart/format-pane-targets.d.ts +1 -0
- package/dist/chart/format-pane-view.d.ts +5 -0
- package/dist/chart/format-pane-view.d.ts.map +1 -1
- package/dist/chrome/find-replace-fields.d.ts +1 -0
- package/dist/{chunk-ZTLP52FH.js → chunk-2JHM6UO3.js} +1 -1
- package/dist/{chunk-J3ROBM74.js → chunk-63ELC26U.js} +2 -2
- package/dist/{chunk-MUY444GW.js → chunk-BY7X2LNM.js} +1 -1
- package/dist/{chunk-G5CALQUW.js → chunk-IHZK4NPQ.js} +1 -1
- package/dist/{chunk-UEFVC6V4.js → chunk-SRYBCJC2.js} +8 -2
- package/dist/controls.js +1 -1
- package/dist/docx/building-blocks-read-aloud.d.ts +24 -0
- package/dist/docx/building-blocks.d.ts +5 -0
- package/dist/docx/editor-core.d.ts +3 -0
- package/dist/docx/element-api.d.ts +7 -0
- package/dist/docx/index.d.ts +2 -0
- package/dist/docx/read-aloud-session.d.ts +39 -0
- package/dist/docx/read-aloud.d.ts +14 -1
- package/dist/docx/view-options.d.ts +3 -0
- package/dist/docx.js +276 -158
- package/dist/index.js +4 -4
- package/dist/pptx/{chunk-WBGU7BWD.cjs → chunk-2JR2CHTG.cjs} +31 -1
- package/dist/pptx/{chunk-UFJBHFSD.cjs → chunk-3JGYWDMR.cjs} +5 -0
- package/dist/pptx/{chunk-Q6YXUH4R.cjs → chunk-3YKUOEZ5.cjs} +42 -42
- package/dist/pptx/{chunk-4OM7WS6M.mjs → chunk-74ESWHDZ.mjs} +1 -1
- package/dist/pptx/{chunk-JOQIMYHE.cjs → chunk-N7RS46HM.cjs} +2494 -555
- package/dist/pptx/{chunk-JJP24O2L.mjs → chunk-OWXWCDNG.mjs} +2401 -554
- package/dist/pptx/{chunk-PTIGQSTY.mjs → chunk-QYBBLVGY.mjs} +31 -1
- package/dist/pptx/{chunk-2P6TH4ZE.mjs → chunk-VOBKKF45.mjs} +5 -0
- package/dist/pptx/dom/index.cjs +375 -375
- package/dist/pptx/dom/index.mjs +7 -7
- 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 +3443 -3075
- package/dist/pptx/index.mjs +3 -3
- package/dist/pptx/render/building-block-actions.d.ts +106 -0
- package/dist/pptx/render/building-block-actions.d.ts.map +1 -0
- package/dist/pptx/render/building-block-custom-shows.d.ts +74 -0
- package/dist/pptx/render/building-block-custom-shows.d.ts.map +1 -0
- package/dist/pptx/render/building-block-document-properties.d.ts +78 -0
- package/dist/pptx/render/building-block-document-properties.d.ts.map +1 -0
- package/dist/pptx/render/building-block-font-embedding.d.ts +42 -0
- package/dist/pptx/render/building-block-font-embedding.d.ts.map +1 -0
- package/dist/pptx/render/building-block-password.d.ts +71 -0
- package/dist/pptx/render/building-block-password.d.ts.map +1 -0
- package/dist/pptx/render/building-block-show-dialogs.d.ts +61 -0
- package/dist/pptx/render/building-block-show-dialogs.d.ts.map +1 -0
- package/dist/pptx/render/building-block-show-settings.d.ts +61 -0
- package/dist/pptx/render/building-block-show-settings.d.ts.map +1 -0
- package/dist/pptx/render/building-block-signatures.d.ts +68 -0
- package/dist/pptx/render/building-block-signatures.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/action-groups.d.ts +61 -0
- package/dist/pptx/render/building-blocks/action-groups.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/actions-types.d.ts +110 -0
- package/dist/pptx/render/building-blocks/actions-types.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/find-bar-controller.d.ts +18 -0
- package/dist/pptx/render/building-blocks/find-bar-controller.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/find-highlight-dom.d.ts +20 -0
- package/dist/pptx/render/building-blocks/find-highlight-dom.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/find-layout.d.ts +62 -0
- package/dist/pptx/render/building-blocks/find-layout.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/groups/file-dialog-groups.d.ts +45 -0
- package/dist/pptx/render/building-blocks/groups/file-dialog-groups.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/groups/index.d.ts +25 -0
- package/dist/pptx/render/building-blocks/groups/index.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/groups/show-dialog-groups.d.ts +79 -0
- package/dist/pptx/render/building-blocks/groups/show-dialog-groups.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/hyperlink-edit-data.d.ts +57 -0
- package/dist/pptx/render/building-blocks/hyperlink-edit-data.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/index.d.ts +19 -0
- package/dist/pptx/render/building-blocks/index.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/media-element-from-file.d.ts +23 -0
- package/dist/pptx/render/building-blocks/media-element-from-file.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/mode.d.ts +11 -0
- package/dist/pptx/render/building-blocks/mode.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/requests.d.ts +96 -0
- package/dist/pptx/render/building-blocks/requests.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/session.d.ts +84 -0
- package/dist/pptx/render/building-blocks/session.d.ts.map +1 -0
- package/dist/pptx/render/building-blocks/toolbar.d.ts +56 -0
- package/dist/pptx/render/building-blocks/toolbar.d.ts.map +1 -0
- package/dist/pptx/render/chart-format/chart-format-source.d.ts.map +1 -1
- package/dist/pptx/render/controller/index.d.ts +4 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/controller/ribbon-display-controller.d.ts +80 -0
- package/dist/pptx/render/controller/ribbon-display-controller.d.ts.map +1 -0
- package/dist/pptx/render/controller/save-revision.d.ts +83 -0
- package/dist/pptx/render/controller/save-revision.d.ts.map +1 -0
- package/dist/pptx/render/editor-chrome/ribbon-css.d.ts +1 -1
- package/dist/pptx/render/editor-chrome/ribbon-css.d.ts.map +1 -1
- package/dist/pptx/render/font-catalog.cjs +3 -3
- package/dist/pptx/render/font-catalog.d.ts +27 -3
- package/dist/pptx/render/font-catalog.d.ts.map +1 -1
- package/dist/pptx/render/font-catalog.mjs +1 -1
- package/dist/pptx/render/index.d.ts +12 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/insert-chart.d.ts +12 -0
- package/dist/pptx/render/insert-chart.d.ts.map +1 -1
- package/dist/pptx/render/read-only-recommendation.d.ts +2 -0
- package/dist/pptx/render/read-only-recommendation.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-display.d.ts +50 -0
- package/dist/pptx/render/ribbon-display.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-home-state-extras.d.ts.map +1 -1
- package/dist/pptx/render/stage-element-ids.d.ts +9 -0
- package/dist/pptx/render/stage-element-ids.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/render/viewer-zoom-store.d.ts.map +1 -1
- package/dist/pptx/render/viewport-navigation.d.ts +93 -0
- package/dist/pptx/render/viewport-navigation.d.ts.map +1 -0
- package/dist/pptx/render/zoom-step.d.ts +9 -2
- package/dist/pptx/render/zoom-step.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-I6S2OSWU.cjs → smartart-insert-preview-WPIGM6UQ.cjs} +5 -5
- package/dist/pptx/{smartart-insert-preview-KQJPGRDR.mjs → smartart-insert-preview-ZHDQ5QDD.mjs} +4 -4
- package/dist/pptx/types.d.ts +20 -0
- package/dist/pptx/types.d.ts.map +1 -1
- package/dist/ribbon/color-preview.d.ts +0 -1
- package/dist/teams.js +2 -2
- package/dist/visio/controller.d.ts +11 -0
- package/dist/visio/index.d.ts +1 -0
- package/dist/visio/text-edit-outcome.d.ts +41 -0
- package/dist/visio/viewer-inline-text.d.ts +7 -0
- package/dist/visio.js +137 -14
- package/dist/xlsx/building-blocks.d.ts +24 -0
- package/dist/xlsx/commands/test-support.d.ts +1 -0
- package/dist/xlsx/component.d.ts +7 -0
- package/dist/xlsx/context-menu/host-api.d.ts +55 -0
- package/dist/xlsx/context-menu/menu.d.ts +9 -0
- package/dist/xlsx/dialogs/find-replace.d.ts +2 -4
- package/dist/xlsx/editor-core.d.ts +2 -0
- package/dist/xlsx/host-find.d.ts +3 -0
- package/dist/xlsx/host-function.d.ts +3 -0
- package/dist/xlsx/host-open.d.ts +10 -0
- package/dist/xlsx/host-workflows.d.ts +9 -0
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/surface-actions.d.ts +20 -4
- package/dist/xlsx/surface-workflows.d.ts +132 -0
- package/dist/xlsx.js +543 -205
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ var chunkWSTWYZFM_cjs = require('./chunk-WSTWYZFM.cjs');
|
|
|
7
7
|
var chunkX7FS7XHU_cjs = require('./chunk-X7FS7XHU.cjs');
|
|
8
8
|
var chunkXFQ2RD4I_cjs = require('./chunk-XFQ2RD4I.cjs');
|
|
9
9
|
var chunk52LKIMK3_cjs = require('./chunk-52LKIMK3.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunk2JR2CHTG_cjs = require('./chunk-2JR2CHTG.cjs');
|
|
11
11
|
var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
|
|
12
12
|
var chunkWB25PCHQ_cjs = require('./chunk-WB25PCHQ.cjs');
|
|
13
13
|
var chunkFFWLDANS_cjs = require('./chunk-FFWLDANS.cjs');
|
|
@@ -24,7 +24,7 @@ var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
|
24
24
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
25
25
|
var chunkXZSGVMRN_cjs = require('./chunk-XZSGVMRN.cjs');
|
|
26
26
|
var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
|
|
27
|
-
var
|
|
27
|
+
var chunk3JGYWDMR_cjs = require('./chunk-3JGYWDMR.cjs');
|
|
28
28
|
var chunk3RIGT7H6_cjs = require('./chunk-3RIGT7H6.cjs');
|
|
29
29
|
var chunkPBZWDEXQ_cjs = require('./chunk-PBZWDEXQ.cjs');
|
|
30
30
|
var pptx = require('ooxml-core/pptx');
|
|
@@ -5099,8 +5099,8 @@ function createGlyphOutlineLookup(cache3) {
|
|
|
5099
5099
|
|
|
5100
5100
|
// src/pptx/render/text-warp-outline-font-cache.ts
|
|
5101
5101
|
function toArrayBuffer(bytes) {
|
|
5102
|
-
const
|
|
5103
|
-
return
|
|
5102
|
+
const copy2 = bytes.slice();
|
|
5103
|
+
return copy2.buffer;
|
|
5104
5104
|
}
|
|
5105
5105
|
function primaryFontFamily(family2) {
|
|
5106
5106
|
const first = family2.split(",")[0] ?? family2;
|
|
@@ -7889,7 +7889,10 @@ function labelOptions(labels) {
|
|
|
7889
7889
|
fields.push(check("labels.showPercent", "labelPercentage", "Percentage", labels.showPercent));
|
|
7890
7890
|
}
|
|
7891
7891
|
fields.push(check("labels.showLegendKey", "labelLegendKey", "Legend key", labels.showLegendKey));
|
|
7892
|
-
const
|
|
7892
|
+
const accepted = labels.positions;
|
|
7893
|
+
const positions2 = labelPositions(type).filter(
|
|
7894
|
+
([value]) => accepted === void 0 || accepted.includes(value)
|
|
7895
|
+
);
|
|
7893
7896
|
if (positions2.length > 0) {
|
|
7894
7897
|
fields.push({
|
|
7895
7898
|
id: "labels.position",
|
|
@@ -8191,11 +8194,15 @@ function pptxChartFormatSource(data) {
|
|
|
8191
8194
|
showValue: labels.showValue,
|
|
8192
8195
|
showPercent: labels.showPercent,
|
|
8193
8196
|
showLegendKey: labels.showLegendKey,
|
|
8194
|
-
position: labels.position
|
|
8197
|
+
position: labels.position,
|
|
8198
|
+
...positionsOf(pptx.chartModelLabelPositions(data, seriesIndex))
|
|
8195
8199
|
};
|
|
8196
8200
|
}
|
|
8197
8201
|
};
|
|
8198
8202
|
}
|
|
8203
|
+
function positionsOf(positions2) {
|
|
8204
|
+
return positions2 ? { positions: positions2 } : {};
|
|
8205
|
+
}
|
|
8199
8206
|
|
|
8200
8207
|
// src/pptx/render/chart-format/chart-format-pane-model.ts
|
|
8201
8208
|
function chartFormatTabs(data, targetKey, mode = "chart") {
|
|
@@ -24897,6 +24904,119 @@ function newEquationElement(x = DEFAULT_X, y = EQUATION_DEFAULT_Y) {
|
|
|
24897
24904
|
]
|
|
24898
24905
|
};
|
|
24899
24906
|
}
|
|
24907
|
+
|
|
24908
|
+
// src/pptx/render/ribbon-display.ts
|
|
24909
|
+
var RIBBON_DISPLAY_MODES = ["fullScreen", "tabs", "always"];
|
|
24910
|
+
var DEFAULT_RIBBON_DISPLAY_MODE = "always";
|
|
24911
|
+
var LABEL_KEYS = {
|
|
24912
|
+
fullScreen: "pptx.ribbon.display.fullScreen",
|
|
24913
|
+
tabs: "pptx.ribbon.display.tabs",
|
|
24914
|
+
always: "pptx.ribbon.display.always"
|
|
24915
|
+
};
|
|
24916
|
+
var RIBBON_DISPLAY_OPTIONS_LABEL_KEY = "pptx.ribbon.displayOptions";
|
|
24917
|
+
var RIBBON_DISPLAY_REVEAL_LABEL_KEY = "pptx.ribbon.showRibbon";
|
|
24918
|
+
function normalizeRibbonDisplayMode(value) {
|
|
24919
|
+
return RIBBON_DISPLAY_MODES.includes(value) ? value : DEFAULT_RIBBON_DISPLAY_MODE;
|
|
24920
|
+
}
|
|
24921
|
+
function ribbonDisplayMenu(current) {
|
|
24922
|
+
return RIBBON_DISPLAY_MODES.map((mode) => ({
|
|
24923
|
+
mode,
|
|
24924
|
+
labelKey: LABEL_KEYS[mode],
|
|
24925
|
+
checked: mode === current
|
|
24926
|
+
}));
|
|
24927
|
+
}
|
|
24928
|
+
function toggleRibbonCollapsed(mode) {
|
|
24929
|
+
return mode === "always" ? "tabs" : "always";
|
|
24930
|
+
}
|
|
24931
|
+
function ribbonDisplayLayout(mode, peek) {
|
|
24932
|
+
if (mode === "always") return { titleBar: true, tabs: true, commands: "docked", reveal: false };
|
|
24933
|
+
if (mode === "tabs")
|
|
24934
|
+
return { titleBar: true, tabs: true, commands: peek ? "overlay" : "hidden", reveal: false };
|
|
24935
|
+
return { titleBar: false, tabs: peek, commands: peek ? "overlay" : "hidden", reveal: !peek };
|
|
24936
|
+
}
|
|
24937
|
+
|
|
24938
|
+
// src/pptx/render/controller/ribbon-display-controller.ts
|
|
24939
|
+
var RIBBON_AUTO_COLLAPSE_MEDIA = "(max-height: 500px)";
|
|
24940
|
+
function derive(inputs) {
|
|
24941
|
+
const automatic = inputs.mode === "always" && inputs.autoCollapse && inputs.shortViewport && !inputs.chosen;
|
|
24942
|
+
const effectiveMode = automatic ? "tabs" : inputs.mode;
|
|
24943
|
+
const peek = effectiveMode === "always" ? false : inputs.peek;
|
|
24944
|
+
return {
|
|
24945
|
+
mode: inputs.mode,
|
|
24946
|
+
effectiveMode,
|
|
24947
|
+
peek,
|
|
24948
|
+
menuOpen: inputs.menuOpen,
|
|
24949
|
+
layout: ribbonDisplayLayout(effectiveMode, peek),
|
|
24950
|
+
menu: ribbonDisplayMenu(effectiveMode)
|
|
24951
|
+
};
|
|
24952
|
+
}
|
|
24953
|
+
function createRibbonDisplayController(options = {}) {
|
|
24954
|
+
let inputs = {
|
|
24955
|
+
mode: normalizeRibbonDisplayMode(options.initial),
|
|
24956
|
+
peek: false,
|
|
24957
|
+
menuOpen: false,
|
|
24958
|
+
autoCollapse: false,
|
|
24959
|
+
shortViewport: false,
|
|
24960
|
+
chosen: false
|
|
24961
|
+
};
|
|
24962
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore(derive(inputs));
|
|
24963
|
+
const commit = (patch) => {
|
|
24964
|
+
const next2 = { ...inputs, ...patch };
|
|
24965
|
+
if (Object.keys(next2).every((key) => next2[key] === inputs[key])) {
|
|
24966
|
+
return;
|
|
24967
|
+
}
|
|
24968
|
+
inputs = next2;
|
|
24969
|
+
store.set(derive(inputs));
|
|
24970
|
+
};
|
|
24971
|
+
const choose = (mode) => {
|
|
24972
|
+
const changed = mode !== store.getSnapshot().effectiveMode;
|
|
24973
|
+
commit({ mode, chosen: true, peek: false, menuOpen: false });
|
|
24974
|
+
if (changed) {
|
|
24975
|
+
options.onChange?.(mode);
|
|
24976
|
+
}
|
|
24977
|
+
};
|
|
24978
|
+
const dismiss = () => commit({ peek: false, menuOpen: false });
|
|
24979
|
+
return {
|
|
24980
|
+
getSnapshot: store.getSnapshot,
|
|
24981
|
+
subscribe: store.subscribe,
|
|
24982
|
+
setMode: (mode) => commit({ mode: normalizeRibbonDisplayMode(mode), peek: false, menuOpen: false }),
|
|
24983
|
+
choose,
|
|
24984
|
+
toggleCollapsed: () => choose(toggleRibbonCollapsed(store.getSnapshot().effectiveMode)),
|
|
24985
|
+
tabChosen(tab) {
|
|
24986
|
+
if (tab !== "file" && store.getSnapshot().effectiveMode === "tabs") {
|
|
24987
|
+
commit({ peek: true });
|
|
24988
|
+
}
|
|
24989
|
+
},
|
|
24990
|
+
reveal() {
|
|
24991
|
+
if (store.getSnapshot().effectiveMode === "fullScreen") {
|
|
24992
|
+
commit({ peek: true });
|
|
24993
|
+
}
|
|
24994
|
+
},
|
|
24995
|
+
dismiss,
|
|
24996
|
+
setMenuOpen: (open) => commit({ menuOpen: open }),
|
|
24997
|
+
toggleMenu: () => commit({ menuOpen: !inputs.menuOpen }),
|
|
24998
|
+
// Changing the setting is a fresh instruction: it applies again even after the user
|
|
24999
|
+
// picked a mode by hand.
|
|
25000
|
+
setAutoCollapse: (enabled) => commit({
|
|
25001
|
+
autoCollapse: enabled,
|
|
25002
|
+
chosen: enabled === inputs.autoCollapse ? inputs.chosen : false
|
|
25003
|
+
}),
|
|
25004
|
+
setShortViewport: (short) => commit({ shortViewport: short }),
|
|
25005
|
+
handleKeydown(event) {
|
|
25006
|
+
if (event.key === "F1" && event.ctrlKey) {
|
|
25007
|
+
event.preventDefault();
|
|
25008
|
+
choose(toggleRibbonCollapsed(store.getSnapshot().effectiveMode));
|
|
25009
|
+
return true;
|
|
25010
|
+
}
|
|
25011
|
+
const { peek, menuOpen } = store.getSnapshot();
|
|
25012
|
+
if (event.key === "Escape" && (peek || menuOpen)) {
|
|
25013
|
+
dismiss();
|
|
25014
|
+
return true;
|
|
25015
|
+
}
|
|
25016
|
+
return false;
|
|
25017
|
+
}
|
|
25018
|
+
};
|
|
25019
|
+
}
|
|
24900
25020
|
function clampDepth(depth) {
|
|
24901
25021
|
const value = depth ?? editorHistory.DEFAULT_EDITOR_HISTORY_DEPTH;
|
|
24902
25022
|
return Number.isFinite(value) ? Math.max(1, Math.floor(value)) : editorHistory.DEFAULT_EDITOR_HISTORY_DEPTH;
|
|
@@ -27120,6 +27240,49 @@ function withSaveProgress(storage, controller) {
|
|
|
27120
27240
|
}
|
|
27121
27241
|
});
|
|
27122
27242
|
}
|
|
27243
|
+
|
|
27244
|
+
// src/pptx/render/controller/save-revision.ts
|
|
27245
|
+
function createSaveRevisionController(deps) {
|
|
27246
|
+
let revision = 0;
|
|
27247
|
+
let mark;
|
|
27248
|
+
let savedRevision = 0;
|
|
27249
|
+
const observe = () => {
|
|
27250
|
+
const sources = deps.getSources();
|
|
27251
|
+
if (sources.length === 0 || autosaveSourcesChanged(mark, sources)) {
|
|
27252
|
+
revision += 1;
|
|
27253
|
+
mark = autosaveSnapshotMark("", sources);
|
|
27254
|
+
}
|
|
27255
|
+
return revision;
|
|
27256
|
+
};
|
|
27257
|
+
return {
|
|
27258
|
+
getRevision: observe,
|
|
27259
|
+
getSavedRevision: () => savedRevision,
|
|
27260
|
+
async snapshot() {
|
|
27261
|
+
const at = observe();
|
|
27262
|
+
const content = await deps.serialize();
|
|
27263
|
+
return { revision: at, content };
|
|
27264
|
+
},
|
|
27265
|
+
acknowledge(acknowledged) {
|
|
27266
|
+
const current = observe();
|
|
27267
|
+
if (!Number.isInteger(acknowledged) || acknowledged < 1 || acknowledged > current) {
|
|
27268
|
+
return { status: "unknown", revision: acknowledged };
|
|
27269
|
+
}
|
|
27270
|
+
if (acknowledged < savedRevision) {
|
|
27271
|
+
return { status: "stale", revision: acknowledged, savedRevision };
|
|
27272
|
+
}
|
|
27273
|
+
const repeated = acknowledged === savedRevision;
|
|
27274
|
+
savedRevision = acknowledged;
|
|
27275
|
+
if (acknowledged !== current) {
|
|
27276
|
+
return { status: "pending", revision: acknowledged, currentRevision: current };
|
|
27277
|
+
}
|
|
27278
|
+
deps.markClean();
|
|
27279
|
+
if (!repeated) {
|
|
27280
|
+
deps.discardRecovery();
|
|
27281
|
+
}
|
|
27282
|
+
return { status: "clean", revision: acknowledged };
|
|
27283
|
+
}
|
|
27284
|
+
};
|
|
27285
|
+
}
|
|
27123
27286
|
var TEMPLATE_REF_WIDTH_EMU = 12192e3;
|
|
27124
27287
|
var TEMPLATE_REF_HEIGHT_EMU = 6858e3;
|
|
27125
27288
|
var DEFAULT_SLIDE_WIDTH_PX = 1280;
|
|
@@ -27161,7 +27324,7 @@ function createTemplateContext(options = {}) {
|
|
|
27161
27324
|
const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
|
|
27162
27325
|
let counter = 0;
|
|
27163
27326
|
const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
|
|
27164
|
-
const dictionary =
|
|
27327
|
+
const dictionary = chunk3JGYWDMR_cjs.translationsEn;
|
|
27165
27328
|
const translate2 = options.translate ?? ((key) => dictionary[key] ?? key);
|
|
27166
27329
|
return {
|
|
27167
27330
|
scheme,
|
|
@@ -37271,10 +37434,10 @@ function buildMorphTextBodyPlan(pairs, context3, durationMs, measure2) {
|
|
|
37271
37434
|
plan.parts.set(outgoingId, part2);
|
|
37272
37435
|
plan.parts.set(incomingId, part2);
|
|
37273
37436
|
const body = part2 === "body";
|
|
37274
|
-
const
|
|
37437
|
+
const copy2 = body ? morphBodyCopy : morphTextCopy;
|
|
37275
37438
|
plan.groups.push({
|
|
37276
|
-
outgoing:
|
|
37277
|
-
incoming:
|
|
37439
|
+
outgoing: copy2(body ? from : upright.from, outgoingId),
|
|
37440
|
+
incoming: copy2(body ? to : upright.to, incomingId)
|
|
37278
37441
|
});
|
|
37279
37442
|
}
|
|
37280
37443
|
}
|
|
@@ -48020,18 +48183,18 @@ function recordLiveColorLeaves(leaves, value, patch) {
|
|
|
48020
48183
|
}
|
|
48021
48184
|
function writeLeaf(container, path, leaf) {
|
|
48022
48185
|
const [head, ...rest] = path;
|
|
48023
|
-
const
|
|
48024
|
-
const record =
|
|
48186
|
+
const copy2 = Array.isArray(container) ? [...container] : { ...isContainer(container) ? container : {} };
|
|
48187
|
+
const record = copy2;
|
|
48025
48188
|
if (rest.length > 0) {
|
|
48026
48189
|
record[head] = writeLeaf(record[head], rest, leaf);
|
|
48027
48190
|
} else if (leaf.present) {
|
|
48028
48191
|
record[head] = leaf.value;
|
|
48029
|
-
} else if (Array.isArray(
|
|
48192
|
+
} else if (Array.isArray(copy2)) {
|
|
48030
48193
|
record[head] = void 0;
|
|
48031
48194
|
} else {
|
|
48032
48195
|
delete record[head];
|
|
48033
48196
|
}
|
|
48034
|
-
return
|
|
48197
|
+
return copy2;
|
|
48035
48198
|
}
|
|
48036
48199
|
function isEmptyContainer(value) {
|
|
48037
48200
|
return isContainer(value) && Object.keys(value).length === 0;
|
|
@@ -49091,9 +49254,9 @@ var mintObjectUrl = (bytes, mime) => {
|
|
|
49091
49254
|
if (!hasObjectUrlSupport()) {
|
|
49092
49255
|
return null;
|
|
49093
49256
|
}
|
|
49094
|
-
const
|
|
49095
|
-
|
|
49096
|
-
return URL.createObjectURL(new Blob([
|
|
49257
|
+
const copy2 = new Uint8Array(bytes.length);
|
|
49258
|
+
copy2.set(bytes);
|
|
49259
|
+
return URL.createObjectURL(new Blob([copy2], { type: mime }));
|
|
49097
49260
|
};
|
|
49098
49261
|
function createEmbeddedFontsSheet(doc, styleId) {
|
|
49099
49262
|
let liveUrls = [];
|
|
@@ -50521,7 +50684,7 @@ function createViewerCommandStore(initial, reduce) {
|
|
|
50521
50684
|
|
|
50522
50685
|
// src/pptx/render/zoom-step.ts
|
|
50523
50686
|
var ZOOM_STEP = 0.1;
|
|
50524
|
-
var MIN_ZOOM_SCALE = 0.
|
|
50687
|
+
var MIN_ZOOM_SCALE = 0.1;
|
|
50525
50688
|
var MAX_ZOOM_SCALE = 5;
|
|
50526
50689
|
function roundZoom(scale3) {
|
|
50527
50690
|
return Math.round(scale3 * 100) / 100;
|
|
@@ -50553,8 +50716,14 @@ var DEFAULT_VIEWER_ZOOM_STATE = {
|
|
|
50553
50716
|
fitScale: 1,
|
|
50554
50717
|
manual: false
|
|
50555
50718
|
};
|
|
50719
|
+
function atFit(state) {
|
|
50720
|
+
return state.zoom === 1 && !state.manual ? state : { ...state, zoom: 1, manual: false };
|
|
50721
|
+
}
|
|
50556
50722
|
function withZoom(state, zoom) {
|
|
50557
50723
|
const clamped = clampZoomScale(zoom);
|
|
50724
|
+
if (clamped === 1) {
|
|
50725
|
+
return atFit(state);
|
|
50726
|
+
}
|
|
50558
50727
|
if (clamped === state.zoom && state.manual) {
|
|
50559
50728
|
return state;
|
|
50560
50729
|
}
|
|
@@ -50569,7 +50738,7 @@ function reduceViewerZoom(state, command2) {
|
|
|
50569
50738
|
case "set-zoom":
|
|
50570
50739
|
return withZoom(state, command2.zoom);
|
|
50571
50740
|
case "zoom-to-fit":
|
|
50572
|
-
return state
|
|
50741
|
+
return atFit(state);
|
|
50573
50742
|
case "set-fit-scale": {
|
|
50574
50743
|
const fitScale = Number.isFinite(command2.fitScale) && command2.fitScale > 0 ? command2.fitScale : 1;
|
|
50575
50744
|
return fitScale === state.fitScale ? state : { ...state, fitScale };
|
|
@@ -50591,6 +50760,344 @@ function viewerZoomPercent(zoom) {
|
|
|
50591
50760
|
return Math.round(zoom * 100);
|
|
50592
50761
|
}
|
|
50593
50762
|
|
|
50763
|
+
// src/pptx/render/viewport-navigation.ts
|
|
50764
|
+
var VIEWPORT_STAGE_SELECTOR = '[aria-roledescription="slide"]';
|
|
50765
|
+
var DRAG_PAN_THRESHOLD_PX = 4;
|
|
50766
|
+
var MAX_LAYOUT_FRAMES = 6;
|
|
50767
|
+
var ANCHOR_REUSE_MS = 400;
|
|
50768
|
+
var ANCHOR_REUSE_DISTANCE_PX = 2;
|
|
50769
|
+
function zoomAnchorAt(stage, clientX, clientY) {
|
|
50770
|
+
if (!(stage.width > 0) || !(stage.height > 0)) {
|
|
50771
|
+
return null;
|
|
50772
|
+
}
|
|
50773
|
+
return {
|
|
50774
|
+
fx: (clientX - stage.left) / stage.width,
|
|
50775
|
+
fy: (clientY - stage.top) / stage.height,
|
|
50776
|
+
clientX,
|
|
50777
|
+
clientY
|
|
50778
|
+
};
|
|
50779
|
+
}
|
|
50780
|
+
function anchoredScrollPosition(scroll, stage, anchor) {
|
|
50781
|
+
return {
|
|
50782
|
+
left: scroll.left + stage.left + anchor.fx * stage.width - anchor.clientX,
|
|
50783
|
+
top: scroll.top + stage.top + anchor.fy * stage.height - anchor.clientY
|
|
50784
|
+
};
|
|
50785
|
+
}
|
|
50786
|
+
function viewportCanPan(viewport) {
|
|
50787
|
+
return viewport.scrollWidth > viewport.clientWidth || viewport.scrollHeight > viewport.clientHeight;
|
|
50788
|
+
}
|
|
50789
|
+
function resetViewportScroll(viewport) {
|
|
50790
|
+
viewport.scrollLeft = 0;
|
|
50791
|
+
viewport.scrollTop = 0;
|
|
50792
|
+
}
|
|
50793
|
+
var SPACE_OWNER_SELECTOR = [
|
|
50794
|
+
"input",
|
|
50795
|
+
"textarea",
|
|
50796
|
+
"select",
|
|
50797
|
+
"button",
|
|
50798
|
+
"a[href]",
|
|
50799
|
+
// Space toggles a disclosure and plays or pauses media with native controls.
|
|
50800
|
+
"summary",
|
|
50801
|
+
"video[controls]",
|
|
50802
|
+
"audio[controls]",
|
|
50803
|
+
'[role="button"]',
|
|
50804
|
+
'[role="checkbox"]',
|
|
50805
|
+
'[role="combobox"]',
|
|
50806
|
+
'[role="menuitem"]',
|
|
50807
|
+
'[role="menuitemcheckbox"]',
|
|
50808
|
+
'[role="menuitemradio"]',
|
|
50809
|
+
'[role="option"]',
|
|
50810
|
+
'[role="radio"]',
|
|
50811
|
+
'[role="searchbox"]',
|
|
50812
|
+
'[role="switch"]',
|
|
50813
|
+
'[role="tab"]',
|
|
50814
|
+
'[role="textbox"]'
|
|
50815
|
+
].join(",");
|
|
50816
|
+
function eventOwnsSpaceKey(event) {
|
|
50817
|
+
return targetOwnsSpaceKey(event.composedPath?.()[0] ?? event.target);
|
|
50818
|
+
}
|
|
50819
|
+
function targetOwnsSpaceKey(target) {
|
|
50820
|
+
const element = target;
|
|
50821
|
+
if (!element || typeof element.closest !== "function") {
|
|
50822
|
+
return false;
|
|
50823
|
+
}
|
|
50824
|
+
return element.isContentEditable === true || element.closest(SPACE_OWNER_SELECTOR) !== null;
|
|
50825
|
+
}
|
|
50826
|
+
var TOUCH_EVENTS = ["touchstart", "touchend", "touchcancel"];
|
|
50827
|
+
function attachViewportNavigation(viewport, options) {
|
|
50828
|
+
const doc = viewport.ownerDocument;
|
|
50829
|
+
const win = doc.defaultView;
|
|
50830
|
+
const requestFrame = options.requestFrame ?? ((callback) => win?.requestAnimationFrame(callback) ?? 0);
|
|
50831
|
+
const cancelFrame = options.cancelFrame ?? ((handle) => win?.cancelAnimationFrame(handle));
|
|
50832
|
+
const now = options.now ?? (() => win?.performance.now() ?? Date.now());
|
|
50833
|
+
const isActive = () => options.isActive?.() ?? true;
|
|
50834
|
+
const wheelBuffer = createWheelStepBuffer();
|
|
50835
|
+
const originalCursor = viewport.style.cursor;
|
|
50836
|
+
let pending3 = null;
|
|
50837
|
+
let gesture = null;
|
|
50838
|
+
let frame = 0;
|
|
50839
|
+
let gestureStartZoom = null;
|
|
50840
|
+
let fingers = 0;
|
|
50841
|
+
let hovering = false;
|
|
50842
|
+
let spaceHeld = false;
|
|
50843
|
+
let pan = null;
|
|
50844
|
+
const findStage = () => viewport.querySelector(VIEWPORT_STAGE_SELECTOR);
|
|
50845
|
+
const applyPending = () => {
|
|
50846
|
+
frame = 0;
|
|
50847
|
+
if (!pending3) {
|
|
50848
|
+
return;
|
|
50849
|
+
}
|
|
50850
|
+
const rect3 = findStage()?.getBoundingClientRect();
|
|
50851
|
+
if (!rect3 || rect3.width === pending3.width) {
|
|
50852
|
+
pending3.frames += 1;
|
|
50853
|
+
if (pending3.frames < MAX_LAYOUT_FRAMES) {
|
|
50854
|
+
frame = requestFrame(applyPending);
|
|
50855
|
+
} else {
|
|
50856
|
+
pending3 = null;
|
|
50857
|
+
}
|
|
50858
|
+
return;
|
|
50859
|
+
}
|
|
50860
|
+
const next2 = anchoredScrollPosition(
|
|
50861
|
+
{ left: viewport.scrollLeft, top: viewport.scrollTop },
|
|
50862
|
+
rect3,
|
|
50863
|
+
pending3.anchor
|
|
50864
|
+
);
|
|
50865
|
+
pending3 = null;
|
|
50866
|
+
viewport.scrollLeft = next2.left;
|
|
50867
|
+
viewport.scrollTop = next2.top;
|
|
50868
|
+
};
|
|
50869
|
+
const gestureAnchor = (rect3, clientX, clientY) => {
|
|
50870
|
+
const time = now();
|
|
50871
|
+
const continues = gesture !== null && time - gesture.time <= ANCHOR_REUSE_MS && Math.abs(clientX - gesture.anchor.clientX) <= ANCHOR_REUSE_DISTANCE_PX && Math.abs(clientY - gesture.anchor.clientY) <= ANCHOR_REUSE_DISTANCE_PX;
|
|
50872
|
+
const anchor = continues ? { ...gesture.anchor, clientX, clientY } : rect3 ? zoomAnchorAt(rect3, clientX, clientY) : null;
|
|
50873
|
+
gesture = anchor ? { anchor, time } : null;
|
|
50874
|
+
return anchor;
|
|
50875
|
+
};
|
|
50876
|
+
const zoomAt = (zoom, clientX, clientY) => {
|
|
50877
|
+
const before = options.getZoom();
|
|
50878
|
+
const rect3 = findStage()?.getBoundingClientRect();
|
|
50879
|
+
const anchor = gestureAnchor(rect3, clientX, clientY);
|
|
50880
|
+
if (rect3 && pending3 && pending3.width === rect3.width) {
|
|
50881
|
+
if (anchor) {
|
|
50882
|
+
pending3.anchor = anchor;
|
|
50883
|
+
}
|
|
50884
|
+
} else {
|
|
50885
|
+
pending3 = rect3 && anchor ? { anchor, width: rect3.width, frames: 0 } : null;
|
|
50886
|
+
}
|
|
50887
|
+
options.setZoom(zoom);
|
|
50888
|
+
if (options.getZoom() === before) {
|
|
50889
|
+
pending3 = null;
|
|
50890
|
+
return;
|
|
50891
|
+
}
|
|
50892
|
+
if (pending3 && frame === 0) {
|
|
50893
|
+
frame = requestFrame(applyPending);
|
|
50894
|
+
}
|
|
50895
|
+
};
|
|
50896
|
+
const onWheel = (event) => {
|
|
50897
|
+
if (!isActive()) {
|
|
50898
|
+
return;
|
|
50899
|
+
}
|
|
50900
|
+
const mapped = mapEditingWheel(event, wheelBuffer, true);
|
|
50901
|
+
if (mapped.intent !== "zoom") {
|
|
50902
|
+
return;
|
|
50903
|
+
}
|
|
50904
|
+
event.preventDefault();
|
|
50905
|
+
zoomAt(options.getZoom() + mapped.deltaScale, event.clientX, event.clientY);
|
|
50906
|
+
};
|
|
50907
|
+
const onTouches = (event) => {
|
|
50908
|
+
fingers = event.touches.length;
|
|
50909
|
+
};
|
|
50910
|
+
const onGestureStart = (event) => {
|
|
50911
|
+
if (!isActive() || fingers > 0) {
|
|
50912
|
+
return;
|
|
50913
|
+
}
|
|
50914
|
+
event.preventDefault();
|
|
50915
|
+
gestureStartZoom = options.getZoom();
|
|
50916
|
+
};
|
|
50917
|
+
const onGestureChange = (event) => {
|
|
50918
|
+
if (gestureStartZoom === null) {
|
|
50919
|
+
return;
|
|
50920
|
+
}
|
|
50921
|
+
event.preventDefault();
|
|
50922
|
+
const gesture2 = event;
|
|
50923
|
+
zoomAt(gestureStartZoom * gesture2.scale, gesture2.clientX, gesture2.clientY);
|
|
50924
|
+
};
|
|
50925
|
+
const onGestureEnd = (event) => {
|
|
50926
|
+
if (gestureStartZoom === null) {
|
|
50927
|
+
return;
|
|
50928
|
+
}
|
|
50929
|
+
event.preventDefault();
|
|
50930
|
+
gestureStartZoom = null;
|
|
50931
|
+
};
|
|
50932
|
+
const updateCursor = () => {
|
|
50933
|
+
if (pan?.started) {
|
|
50934
|
+
viewport.style.cursor = "grabbing";
|
|
50935
|
+
} else if (spaceHeld && hovering) {
|
|
50936
|
+
viewport.style.cursor = "grab";
|
|
50937
|
+
} else {
|
|
50938
|
+
viewport.style.cursor = originalCursor;
|
|
50939
|
+
}
|
|
50940
|
+
};
|
|
50941
|
+
const onPointerEnter = () => {
|
|
50942
|
+
hovering = true;
|
|
50943
|
+
updateCursor();
|
|
50944
|
+
};
|
|
50945
|
+
const onPointerLeave = () => {
|
|
50946
|
+
hovering = false;
|
|
50947
|
+
updateCursor();
|
|
50948
|
+
};
|
|
50949
|
+
const onKeyDown = (event) => {
|
|
50950
|
+
if (event.key !== " " || event.ctrlKey || event.metaKey || event.altKey) {
|
|
50951
|
+
return;
|
|
50952
|
+
}
|
|
50953
|
+
if (spaceHeld) {
|
|
50954
|
+
event.preventDefault();
|
|
50955
|
+
return;
|
|
50956
|
+
}
|
|
50957
|
+
if (!hovering || !isActive() || eventOwnsSpaceKey(event) || !viewportCanPan(viewport)) {
|
|
50958
|
+
return;
|
|
50959
|
+
}
|
|
50960
|
+
event.preventDefault();
|
|
50961
|
+
spaceHeld = true;
|
|
50962
|
+
updateCursor();
|
|
50963
|
+
};
|
|
50964
|
+
const releaseSpace = () => {
|
|
50965
|
+
if (!spaceHeld) {
|
|
50966
|
+
return;
|
|
50967
|
+
}
|
|
50968
|
+
spaceHeld = false;
|
|
50969
|
+
updateCursor();
|
|
50970
|
+
};
|
|
50971
|
+
const onKeyUp = (event) => {
|
|
50972
|
+
if (event.key === " " && spaceHeld) {
|
|
50973
|
+
event.preventDefault();
|
|
50974
|
+
releaseSpace();
|
|
50975
|
+
}
|
|
50976
|
+
};
|
|
50977
|
+
const suppressNextClick = () => {
|
|
50978
|
+
const onClick = (event) => {
|
|
50979
|
+
event.preventDefault();
|
|
50980
|
+
event.stopPropagation();
|
|
50981
|
+
};
|
|
50982
|
+
viewport.addEventListener("click", onClick, { capture: true, once: true });
|
|
50983
|
+
win?.setTimeout(() => viewport.removeEventListener("click", onClick, true), 0);
|
|
50984
|
+
};
|
|
50985
|
+
const startPanning = (event) => {
|
|
50986
|
+
if (!pan) {
|
|
50987
|
+
return;
|
|
50988
|
+
}
|
|
50989
|
+
pan.started = true;
|
|
50990
|
+
try {
|
|
50991
|
+
viewport.setPointerCapture(event.pointerId);
|
|
50992
|
+
} catch {
|
|
50993
|
+
}
|
|
50994
|
+
updateCursor();
|
|
50995
|
+
};
|
|
50996
|
+
const onPointerDown = (event) => {
|
|
50997
|
+
if (pan || !isActive() || !viewportCanPan(viewport)) {
|
|
50998
|
+
return;
|
|
50999
|
+
}
|
|
51000
|
+
const middle = event.button === 1;
|
|
51001
|
+
const spaceDrag = event.button === 0 && spaceHeld;
|
|
51002
|
+
const plainDrag = event.button === 0 && !spaceHeld && event.pointerType !== "touch" && (options.dragPans?.() ?? false);
|
|
51003
|
+
if (!middle && !spaceDrag && !plainDrag) {
|
|
51004
|
+
return;
|
|
51005
|
+
}
|
|
51006
|
+
pan = {
|
|
51007
|
+
pointerId: event.pointerId,
|
|
51008
|
+
startX: event.clientX,
|
|
51009
|
+
startY: event.clientY,
|
|
51010
|
+
left: viewport.scrollLeft,
|
|
51011
|
+
top: viewport.scrollTop,
|
|
51012
|
+
started: false,
|
|
51013
|
+
thresholded: plainDrag
|
|
51014
|
+
};
|
|
51015
|
+
if (!plainDrag) {
|
|
51016
|
+
event.preventDefault();
|
|
51017
|
+
event.stopPropagation();
|
|
51018
|
+
startPanning(event);
|
|
51019
|
+
}
|
|
51020
|
+
};
|
|
51021
|
+
const onPointerMove = (event) => {
|
|
51022
|
+
if (!pan || event.pointerId !== pan.pointerId) {
|
|
51023
|
+
return;
|
|
51024
|
+
}
|
|
51025
|
+
const dx = event.clientX - pan.startX;
|
|
51026
|
+
const dy = event.clientY - pan.startY;
|
|
51027
|
+
if (!pan.started) {
|
|
51028
|
+
if (Math.hypot(dx, dy) < DRAG_PAN_THRESHOLD_PX) {
|
|
51029
|
+
return;
|
|
51030
|
+
}
|
|
51031
|
+
startPanning(event);
|
|
51032
|
+
}
|
|
51033
|
+
event.preventDefault();
|
|
51034
|
+
viewport.scrollLeft = pan.left - dx;
|
|
51035
|
+
viewport.scrollTop = pan.top - dy;
|
|
51036
|
+
};
|
|
51037
|
+
const endPan = (event) => {
|
|
51038
|
+
if (!pan || event.pointerId !== pan.pointerId) {
|
|
51039
|
+
return;
|
|
51040
|
+
}
|
|
51041
|
+
const { started, thresholded } = pan;
|
|
51042
|
+
pan = null;
|
|
51043
|
+
if (started) {
|
|
51044
|
+
try {
|
|
51045
|
+
viewport.releasePointerCapture(event.pointerId);
|
|
51046
|
+
} catch {
|
|
51047
|
+
}
|
|
51048
|
+
if (thresholded && event.type === "pointerup") {
|
|
51049
|
+
suppressNextClick();
|
|
51050
|
+
}
|
|
51051
|
+
}
|
|
51052
|
+
updateCursor();
|
|
51053
|
+
};
|
|
51054
|
+
const onWindowBlur = () => {
|
|
51055
|
+
releaseSpace();
|
|
51056
|
+
};
|
|
51057
|
+
viewport.addEventListener("wheel", onWheel, { passive: false });
|
|
51058
|
+
for (const type of TOUCH_EVENTS) {
|
|
51059
|
+
viewport.addEventListener(type, onTouches, { passive: true });
|
|
51060
|
+
}
|
|
51061
|
+
viewport.addEventListener("gesturestart", onGestureStart);
|
|
51062
|
+
viewport.addEventListener("gesturechange", onGestureChange);
|
|
51063
|
+
viewport.addEventListener("gestureend", onGestureEnd);
|
|
51064
|
+
viewport.addEventListener("pointerenter", onPointerEnter);
|
|
51065
|
+
viewport.addEventListener("pointerleave", onPointerLeave);
|
|
51066
|
+
viewport.addEventListener("pointerdown", onPointerDown, true);
|
|
51067
|
+
viewport.addEventListener("pointermove", onPointerMove, true);
|
|
51068
|
+
viewport.addEventListener("pointerup", endPan, true);
|
|
51069
|
+
viewport.addEventListener("pointercancel", endPan, true);
|
|
51070
|
+
doc.addEventListener("keydown", onKeyDown, true);
|
|
51071
|
+
doc.addEventListener("keyup", onKeyUp, true);
|
|
51072
|
+
win?.addEventListener("blur", onWindowBlur);
|
|
51073
|
+
return () => {
|
|
51074
|
+
if (frame !== 0) {
|
|
51075
|
+
cancelFrame(frame);
|
|
51076
|
+
frame = 0;
|
|
51077
|
+
}
|
|
51078
|
+
pending3 = null;
|
|
51079
|
+
pan = null;
|
|
51080
|
+
spaceHeld = false;
|
|
51081
|
+
viewport.style.cursor = originalCursor;
|
|
51082
|
+
viewport.removeEventListener("wheel", onWheel);
|
|
51083
|
+
for (const type of TOUCH_EVENTS) {
|
|
51084
|
+
viewport.removeEventListener(type, onTouches);
|
|
51085
|
+
}
|
|
51086
|
+
viewport.removeEventListener("gesturestart", onGestureStart);
|
|
51087
|
+
viewport.removeEventListener("gesturechange", onGestureChange);
|
|
51088
|
+
viewport.removeEventListener("gestureend", onGestureEnd);
|
|
51089
|
+
viewport.removeEventListener("pointerenter", onPointerEnter);
|
|
51090
|
+
viewport.removeEventListener("pointerleave", onPointerLeave);
|
|
51091
|
+
viewport.removeEventListener("pointerdown", onPointerDown, true);
|
|
51092
|
+
viewport.removeEventListener("pointermove", onPointerMove, true);
|
|
51093
|
+
viewport.removeEventListener("pointerup", endPan, true);
|
|
51094
|
+
viewport.removeEventListener("pointercancel", endPan, true);
|
|
51095
|
+
doc.removeEventListener("keydown", onKeyDown, true);
|
|
51096
|
+
doc.removeEventListener("keyup", onKeyUp, true);
|
|
51097
|
+
win?.removeEventListener("blur", onWindowBlur);
|
|
51098
|
+
};
|
|
51099
|
+
}
|
|
51100
|
+
|
|
50594
51101
|
// src/pptx/render/audience-content-store.ts
|
|
50595
51102
|
var DB_NAME3 = "pptx-viewer-audience";
|
|
50596
51103
|
var DB_VERSION3 = 1;
|
|
@@ -52701,7 +53208,7 @@ function resolveSlidePaneClick(input) {
|
|
|
52701
53208
|
}
|
|
52702
53209
|
|
|
52703
53210
|
// src/pptx/render/slide-pane-context-menu.ts
|
|
52704
|
-
var
|
|
53211
|
+
var LABEL_KEYS2 = {
|
|
52705
53212
|
"new-slide": "pptx.slidesPane.contextMenu.newSlide",
|
|
52706
53213
|
duplicate: "pptx.slidesPane.contextMenu.duplicate",
|
|
52707
53214
|
delete: "pptx.slidesPane.contextMenu.delete",
|
|
@@ -52714,11 +53221,11 @@ var COUNT_LABEL_KEYS = {
|
|
|
52714
53221
|
delete: "pptx.slidesPane.contextMenu.deleteCount"
|
|
52715
53222
|
};
|
|
52716
53223
|
function slidePaneContextMenuLabelKey(id) {
|
|
52717
|
-
return
|
|
53224
|
+
return LABEL_KEYS2[id];
|
|
52718
53225
|
}
|
|
52719
53226
|
function entry(id, context3, extra = {}) {
|
|
52720
53227
|
const countKey = context3.selectedCount > 1 ? COUNT_LABEL_KEYS[id] : void 0;
|
|
52721
|
-
return { id, labelKey: countKey ??
|
|
53228
|
+
return { id, labelKey: countKey ?? LABEL_KEYS2[id], countLabelKey: countKey, ...extra };
|
|
52722
53229
|
}
|
|
52723
53230
|
function buildSlidePaneContextMenuEntries(context3) {
|
|
52724
53231
|
const showsHide = context3.hasVisibleInSelection || !context3.hasHiddenInSelection;
|
|
@@ -52736,7 +53243,7 @@ function buildSlidePaneContextMenuEntries(context3) {
|
|
|
52736
53243
|
}
|
|
52737
53244
|
|
|
52738
53245
|
// src/pptx/render/section-context-menu.ts
|
|
52739
|
-
var
|
|
53246
|
+
var LABEL_KEYS3 = {
|
|
52740
53247
|
rename: "pptx.sections.rename",
|
|
52741
53248
|
delete: "pptx.sections.delete",
|
|
52742
53249
|
"move-up": "pptx.sections.moveUp",
|
|
@@ -52744,24 +53251,24 @@ var LABEL_KEYS2 = {
|
|
|
52744
53251
|
"add-after": "pptx.sections.addAfter"
|
|
52745
53252
|
};
|
|
52746
53253
|
function sectionContextMenuLabelKey(id) {
|
|
52747
|
-
return
|
|
53254
|
+
return LABEL_KEYS3[id];
|
|
52748
53255
|
}
|
|
52749
53256
|
function buildSectionContextMenuEntries(context3) {
|
|
52750
53257
|
return [
|
|
52751
|
-
{ id: "rename", labelKey:
|
|
52752
|
-
{ id: "delete", labelKey:
|
|
53258
|
+
{ id: "rename", labelKey: LABEL_KEYS3.rename },
|
|
53259
|
+
{ id: "delete", labelKey: LABEL_KEYS3.delete },
|
|
52753
53260
|
{
|
|
52754
53261
|
id: "move-up",
|
|
52755
|
-
labelKey:
|
|
53262
|
+
labelKey: LABEL_KEYS3["move-up"],
|
|
52756
53263
|
separatorBefore: true,
|
|
52757
53264
|
disabled: context3.sectionIndex <= 0
|
|
52758
53265
|
},
|
|
52759
53266
|
{
|
|
52760
53267
|
id: "move-down",
|
|
52761
|
-
labelKey:
|
|
53268
|
+
labelKey: LABEL_KEYS3["move-down"],
|
|
52762
53269
|
disabled: context3.sectionIndex >= context3.totalSections - 1
|
|
52763
53270
|
},
|
|
52764
|
-
{ id: "add-after", labelKey:
|
|
53271
|
+
{ id: "add-after", labelKey: LABEL_KEYS3["add-after"], separatorBefore: true }
|
|
52765
53272
|
];
|
|
52766
53273
|
}
|
|
52767
53274
|
function sectionAddAfterSlideIndex(lastSlideIndexOfSection, totalSlides) {
|
|
@@ -53532,7 +54039,7 @@ function hasMultipleSelectedTableCells(cells, tableData) {
|
|
|
53532
54039
|
}
|
|
53533
54040
|
return false;
|
|
53534
54041
|
}
|
|
53535
|
-
var
|
|
54042
|
+
var LABEL_KEYS4 = {
|
|
53536
54043
|
copy: "pptx.contextMenu.copy",
|
|
53537
54044
|
cut: "pptx.contextMenu.cut",
|
|
53538
54045
|
paste: "pptx.contextMenu.paste",
|
|
@@ -53573,10 +54080,10 @@ var LABEL_KEYS3 = {
|
|
|
53573
54080
|
delete: "pptx.contextMenu.delete"
|
|
53574
54081
|
};
|
|
53575
54082
|
function contextMenuLabelKey(id) {
|
|
53576
|
-
return
|
|
54083
|
+
return LABEL_KEYS4[id];
|
|
53577
54084
|
}
|
|
53578
54085
|
function entry2(id, extra = {}) {
|
|
53579
|
-
return { id, labelKey:
|
|
54086
|
+
return { id, labelKey: LABEL_KEYS4[id], ...extra };
|
|
53580
54087
|
}
|
|
53581
54088
|
function tableEntries(table2) {
|
|
53582
54089
|
if (!table2) {
|
|
@@ -53672,7 +54179,7 @@ function buildContextMenuEntries(context3 = {}) {
|
|
|
53672
54179
|
}
|
|
53673
54180
|
|
|
53674
54181
|
// src/pptx/render/canvas-context-menu-commands.ts
|
|
53675
|
-
var
|
|
54182
|
+
var LABEL_KEYS5 = {
|
|
53676
54183
|
paste: "pptx.contextMenu.paste",
|
|
53677
54184
|
layout: "pptx.canvasContextMenu.layout",
|
|
53678
54185
|
"reset-slide": "pptx.canvasContextMenu.resetSlide",
|
|
@@ -53681,10 +54188,10 @@ var LABEL_KEYS4 = {
|
|
|
53681
54188
|
ruler: "pptx.canvasContextMenu.ruler"
|
|
53682
54189
|
};
|
|
53683
54190
|
function canvasContextMenuLabelKey(id) {
|
|
53684
|
-
return
|
|
54191
|
+
return LABEL_KEYS5[id];
|
|
53685
54192
|
}
|
|
53686
54193
|
function entry3(id, extra = {}) {
|
|
53687
|
-
return { id, labelKey:
|
|
54194
|
+
return { id, labelKey: LABEL_KEYS5[id], ...extra };
|
|
53688
54195
|
}
|
|
53689
54196
|
function buildCanvasContextMenuEntries(context3 = {}) {
|
|
53690
54197
|
const { hasClipboard, showGrid, showRulers } = context3;
|
|
@@ -56486,16 +56993,22 @@ var GROUPED_INSERT_CHART_KINDS = [
|
|
|
56486
56993
|
"line",
|
|
56487
56994
|
"area"
|
|
56488
56995
|
];
|
|
56996
|
+
function isValidInsertChartData(data) {
|
|
56997
|
+
return data !== void 0 && data.categories.length > 0 && data.series.length > 0 && data.series.every(
|
|
56998
|
+
(series) => series.values.length === data.categories.length && series.values.every((value) => Number.isFinite(value))
|
|
56999
|
+
);
|
|
57000
|
+
}
|
|
56489
57001
|
function createDefaultChartElement(chartKind = DEFAULT_INSERT_CHART_KIND, position, options = {}) {
|
|
56490
57002
|
const option = INSERT_CHART_TYPES.find((entry6) => entry6.id === chartKind);
|
|
56491
57003
|
const chartType = option?.type ?? chartKind;
|
|
56492
57004
|
const chartExData = buildChartExInsertData(option?.id ?? chartKind);
|
|
57005
|
+
const hostData = isValidInsertChartData(options.data) ? options.data : void 0;
|
|
56493
57006
|
return pptx.createChartElement(
|
|
56494
57007
|
chartType,
|
|
56495
57008
|
{
|
|
56496
|
-
categories: chartExData?.categories ?? [...DEFAULT_CATEGORIES],
|
|
56497
|
-
series: chartExData?.series ?? [{ name: "Series 1", values: [...DEFAULT_SERIES_VALUES] }],
|
|
56498
|
-
|
|
57009
|
+
categories: hostData ? [...hostData.categories] : chartExData?.categories ?? [...DEFAULT_CATEGORIES],
|
|
57010
|
+
series: hostData ? hostData.series.map((s) => ({ name: s.name, values: [...s.values] })) : chartExData?.series ?? [{ name: "Series 1", values: [...DEFAULT_SERIES_VALUES] }],
|
|
57011
|
+
...!hostData && chartExData?.categoryLevels ? { categoryLevels: chartExData.categoryLevels } : {},
|
|
56499
57012
|
...options.title === void 0 ? { title: "Chart Title" } : options.title.trim() ? { title: options.title.trim() } : {},
|
|
56500
57013
|
hasLegend: options.hasLegend ?? true,
|
|
56501
57014
|
...options.grouping !== void 0 && GROUPED_INSERT_CHART_KINDS.includes(option?.id ?? chartKind) ? { grouping: options.grouping } : {},
|
|
@@ -57721,97 +58234,1820 @@ function classifyMediaType(mimeType) {
|
|
|
57721
58234
|
return null;
|
|
57722
58235
|
}
|
|
57723
58236
|
|
|
57724
|
-
// src/pptx/render/
|
|
57725
|
-
|
|
57726
|
-
|
|
57727
|
-
|
|
57728
|
-
|
|
57729
|
-
|
|
57730
|
-
|
|
57731
|
-
|
|
58237
|
+
// src/pptx/render/building-block-actions.ts
|
|
58238
|
+
var BUILDING_BLOCK_OK = { ok: true };
|
|
58239
|
+
function buildingBlockFailure(code) {
|
|
58240
|
+
return { ok: false, code };
|
|
58241
|
+
}
|
|
58242
|
+
var HOST_IMAGE_MAX_BYTES = 25 * 1024 * 1024;
|
|
58243
|
+
var HOST_MEDIA_MAX_BYTES = 100 * 1024 * 1024;
|
|
58244
|
+
function validateHostImageFile(file, maxBytes = HOST_IMAGE_MAX_BYTES) {
|
|
58245
|
+
if (!file) {
|
|
58246
|
+
return buildingBlockFailure("no-file");
|
|
58247
|
+
}
|
|
58248
|
+
if (!file.type.startsWith("image/")) {
|
|
58249
|
+
return buildingBlockFailure("unsupported-type");
|
|
58250
|
+
}
|
|
58251
|
+
if (file.size === 0) {
|
|
58252
|
+
return buildingBlockFailure("empty-file");
|
|
58253
|
+
}
|
|
58254
|
+
return file.size > maxBytes ? buildingBlockFailure("file-too-large") : BUILDING_BLOCK_OK;
|
|
58255
|
+
}
|
|
58256
|
+
function validateHostMediaFile(file, maxBytes = HOST_MEDIA_MAX_BYTES) {
|
|
58257
|
+
if (!file) {
|
|
58258
|
+
return buildingBlockFailure("no-file");
|
|
58259
|
+
}
|
|
58260
|
+
const mediaType = classifyMediaType(file.type);
|
|
58261
|
+
if (!mediaType) {
|
|
58262
|
+
return buildingBlockFailure("unsupported-type");
|
|
58263
|
+
}
|
|
58264
|
+
if (file.size === 0) {
|
|
58265
|
+
return buildingBlockFailure("empty-file");
|
|
58266
|
+
}
|
|
58267
|
+
return file.size > maxBytes ? buildingBlockFailure("file-too-large") : { ok: true, mediaType };
|
|
58268
|
+
}
|
|
58269
|
+
var BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS = [
|
|
58270
|
+
// The other dialogs raise host requests now (`actions.passwordProtection`, `.documentProperties`,
|
|
58271
|
+
// `.fontEmbedding`, `.digitalSignatures`, `.setUpSlideShow`, `.customShows`, `.shortcuts`);
|
|
58272
|
+
// Broadcast cannot be completed.
|
|
58273
|
+
"onOpenBroadcastDialog"
|
|
58274
|
+
];
|
|
58275
|
+
function describeBuildingBlockActions(input) {
|
|
58276
|
+
const gate = () => {
|
|
58277
|
+
if (!input.ready) {
|
|
58278
|
+
return "not-ready";
|
|
58279
|
+
}
|
|
58280
|
+
if (!input.canEdit || !input.editing) {
|
|
58281
|
+
return "read-only";
|
|
58282
|
+
}
|
|
58283
|
+
return input.canInsert ? void 0 : "protected";
|
|
58284
|
+
};
|
|
58285
|
+
const state = (needsHostUi, ...conditions) => {
|
|
58286
|
+
const reason = [gate(), ...conditions].find((code) => code !== void 0);
|
|
58287
|
+
return reason === void 0 ? { available: true, needsHostUi } : { available: false, reason, needsHostUi };
|
|
58288
|
+
};
|
|
58289
|
+
const slide = input.hasActiveSlide ? void 0 : "no-slide";
|
|
58290
|
+
const selection = input.hasSelection ? void 0 : "no-selection";
|
|
58291
|
+
return {
|
|
58292
|
+
insertImage: state(true, slide),
|
|
58293
|
+
insertMedia: state(true, slide),
|
|
58294
|
+
hyperlink: state(true, selection),
|
|
58295
|
+
removeHyperlink: state(
|
|
58296
|
+
false,
|
|
58297
|
+
selection,
|
|
58298
|
+
input.selectionHasHyperlink ? void 0 : "no-hyperlink"
|
|
58299
|
+
),
|
|
58300
|
+
insertSmartArt: state(true, slide),
|
|
58301
|
+
insertChart: state(true, slide),
|
|
58302
|
+
insertEquation: state(true, slide),
|
|
58303
|
+
editEquation: state(true, selection, input.selectionHasEquation ? void 0 : "no-equation"),
|
|
58304
|
+
replace: state(false),
|
|
58305
|
+
applyLayout: state(
|
|
58306
|
+
false,
|
|
58307
|
+
slide,
|
|
58308
|
+
input.hasHandler && input.layoutCount > 0 ? void 0 : "no-layout"
|
|
58309
|
+
),
|
|
58310
|
+
resetLayout: state(
|
|
58311
|
+
false,
|
|
58312
|
+
slide,
|
|
58313
|
+
input.hasHandler && input.hasCurrentLayout ? void 0 : "no-layout"
|
|
58314
|
+
),
|
|
58315
|
+
// Apply is gated like an edit; the request itself also fires read-only (see the file dialogs).
|
|
58316
|
+
passwordProtection: state(true),
|
|
58317
|
+
documentProperties: state(true),
|
|
58318
|
+
fontEmbedding: state(true),
|
|
58319
|
+
digitalSignatures: state(true)
|
|
58320
|
+
};
|
|
58321
|
+
}
|
|
58322
|
+
|
|
58323
|
+
// src/pptx/render/building-block-document-properties.ts
|
|
58324
|
+
var EDITABLE_CORE_PROPERTY_KEYS = [
|
|
58325
|
+
"title",
|
|
58326
|
+
"subject",
|
|
58327
|
+
"creator",
|
|
58328
|
+
"keywords",
|
|
58329
|
+
"description",
|
|
58330
|
+
"category"
|
|
58331
|
+
];
|
|
58332
|
+
var EDITABLE_APP_PROPERTY_KEYS = ["company", "manager"];
|
|
58333
|
+
var CUSTOM_PROPERTY_TYPES = ["lpwstr", "i4", "filetime", "bool"];
|
|
58334
|
+
function documentPropertiesChanged(current, draft) {
|
|
58335
|
+
return EDITABLE_CORE_PROPERTY_KEYS.some(
|
|
58336
|
+
(key) => (draft.core[key] ?? "") !== (current.core[key] ?? "")
|
|
58337
|
+
) || appPropertiesChanged(current.app, draft.app) || draft.custom.length !== current.custom.length || draft.custom.some((property, index) => {
|
|
58338
|
+
const existing = current.custom[index];
|
|
58339
|
+
return property.name !== existing?.name || property.value !== existing?.value || property.type !== existing?.type;
|
|
58340
|
+
});
|
|
58341
|
+
}
|
|
58342
|
+
function appPropertiesChanged(current, draft) {
|
|
58343
|
+
return EDITABLE_APP_PROPERTY_KEYS.some((key) => (draft?.[key] ?? "") !== (current?.[key] ?? ""));
|
|
58344
|
+
}
|
|
58345
|
+
function validCustomProperty(property) {
|
|
58346
|
+
if (typeof property.name !== "string" || property.name.trim() === "") {
|
|
58347
|
+
return false;
|
|
58348
|
+
}
|
|
58349
|
+
if (!CUSTOM_PROPERTY_TYPES.includes(property.type)) {
|
|
58350
|
+
return false;
|
|
58351
|
+
}
|
|
58352
|
+
if (typeof property.value !== "string") {
|
|
58353
|
+
return false;
|
|
58354
|
+
}
|
|
58355
|
+
switch (property.type) {
|
|
58356
|
+
case "i4":
|
|
58357
|
+
return /^-?\d+$/u.test(property.value.trim());
|
|
58358
|
+
case "bool":
|
|
58359
|
+
return property.value === "true" || property.value === "false";
|
|
58360
|
+
case "filetime":
|
|
58361
|
+
return !Number.isNaN(Date.parse(property.value));
|
|
58362
|
+
default:
|
|
58363
|
+
return true;
|
|
58364
|
+
}
|
|
58365
|
+
}
|
|
58366
|
+
function planDocumentPropertiesPatch(current, patch) {
|
|
58367
|
+
const invalid = { ok: false, code: "invalid-data" };
|
|
58368
|
+
const coreEntries = Object.entries(patch.core ?? {});
|
|
58369
|
+
const appEntries = Object.entries(patch.app ?? {});
|
|
58370
|
+
for (const [key, value] of coreEntries) {
|
|
58371
|
+
if (!EDITABLE_CORE_PROPERTY_KEYS.includes(key) || typeof value !== "string") {
|
|
58372
|
+
return invalid;
|
|
58373
|
+
}
|
|
58374
|
+
}
|
|
58375
|
+
for (const [key, value] of appEntries) {
|
|
58376
|
+
if (!EDITABLE_APP_PROPERTY_KEYS.includes(key) || typeof value !== "string") {
|
|
58377
|
+
return invalid;
|
|
58378
|
+
}
|
|
58379
|
+
}
|
|
58380
|
+
const set = patch.custom?.set ?? [];
|
|
58381
|
+
if (!set.every(validCustomProperty)) {
|
|
58382
|
+
return invalid;
|
|
58383
|
+
}
|
|
58384
|
+
const core = Object.fromEntries(coreEntries);
|
|
58385
|
+
const app = Object.fromEntries(appEntries);
|
|
58386
|
+
const hasCustom = set.length > 0 || (patch.custom?.remove?.length ?? 0) > 0;
|
|
58387
|
+
let custom = current.custom;
|
|
58388
|
+
if (hasCustom) {
|
|
58389
|
+
const removed = new Set(patch.custom?.remove ?? []);
|
|
58390
|
+
custom = [
|
|
58391
|
+
...current.custom.flatMap((property) => {
|
|
58392
|
+
if (removed.has(property.name)) {
|
|
58393
|
+
return [];
|
|
58394
|
+
}
|
|
58395
|
+
const replacement = set.find((next2) => next2.name === property.name);
|
|
58396
|
+
return [replacement ? { ...replacement } : property];
|
|
58397
|
+
}),
|
|
58398
|
+
...set.filter((next2) => !current.custom.some((property) => property.name === next2.name))
|
|
58399
|
+
];
|
|
58400
|
+
}
|
|
58401
|
+
const changed = documentPropertiesChanged(
|
|
58402
|
+
{ core: current.core, custom: current.custom, app: current.app },
|
|
58403
|
+
{ core: { ...current.core, ...core }, custom, app: { ...current.app, ...app } }
|
|
58404
|
+
);
|
|
58405
|
+
return {
|
|
58406
|
+
ok: true,
|
|
58407
|
+
changed,
|
|
58408
|
+
...coreEntries.length > 0 ? { core } : {},
|
|
58409
|
+
...hasCustom ? { custom } : {},
|
|
58410
|
+
...appPropertiesChanged(current.app, { ...current.app, ...app }) ? { app } : {}
|
|
58411
|
+
};
|
|
58412
|
+
}
|
|
58413
|
+
function copy(snapshot) {
|
|
58414
|
+
return {
|
|
58415
|
+
core: { ...snapshot.core },
|
|
58416
|
+
custom: snapshot.custom.map((property) => ({ ...property })),
|
|
58417
|
+
app: { ...snapshot.app }
|
|
58418
|
+
};
|
|
58419
|
+
}
|
|
58420
|
+
function buildDocumentPropertiesActions(input) {
|
|
58421
|
+
return {
|
|
58422
|
+
current: copy(input.current()),
|
|
58423
|
+
apply: (patch) => {
|
|
58424
|
+
const denied = input.refuse();
|
|
58425
|
+
if (denied) {
|
|
58426
|
+
return denied;
|
|
58427
|
+
}
|
|
58428
|
+
const plan = planDocumentPropertiesPatch(input.current(), patch);
|
|
58429
|
+
if (!plan.ok) {
|
|
58430
|
+
return buildingBlockFailure(plan.code);
|
|
58431
|
+
}
|
|
58432
|
+
if (plan.changed) {
|
|
58433
|
+
input.applyUpdate({
|
|
58434
|
+
...plan.core ? { core: plan.core } : {},
|
|
58435
|
+
...plan.custom ? { custom: plan.custom } : {},
|
|
58436
|
+
...plan.app ? { app: plan.app } : {}
|
|
58437
|
+
});
|
|
58438
|
+
}
|
|
58439
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58440
|
+
}
|
|
58441
|
+
};
|
|
58442
|
+
}
|
|
58443
|
+
|
|
58444
|
+
// src/pptx/render/font-embedding.ts
|
|
58445
|
+
var FONT_EMBEDDING_UNAVAILABLE_KEY = "pptx.fonts.embedUnavailable";
|
|
58446
|
+
function describeFontEmbedding(embeddedFamilies) {
|
|
58447
|
+
const seen = /* @__PURE__ */ new Set();
|
|
58448
|
+
const families = [];
|
|
58449
|
+
for (const raw of embeddedFamilies ?? []) {
|
|
58450
|
+
const family2 = raw?.trim();
|
|
58451
|
+
if (!family2) {
|
|
58452
|
+
continue;
|
|
58453
|
+
}
|
|
58454
|
+
const key = family2.toLowerCase();
|
|
58455
|
+
if (seen.has(key)) {
|
|
58456
|
+
continue;
|
|
58457
|
+
}
|
|
58458
|
+
seen.add(key);
|
|
58459
|
+
families.push(family2);
|
|
58460
|
+
}
|
|
58461
|
+
const hasAny = families.length > 0;
|
|
58462
|
+
return {
|
|
58463
|
+
embeddedFamilies: families,
|
|
58464
|
+
interactive: hasAny,
|
|
58465
|
+
initialEnabled: hasAny,
|
|
58466
|
+
...hasAny ? {} : { disabledReasonKey: FONT_EMBEDDING_UNAVAILABLE_KEY }
|
|
58467
|
+
};
|
|
58468
|
+
}
|
|
58469
|
+
function embeddedFontSaveOptions(embedFonts) {
|
|
58470
|
+
return embedFonts ? { embedTrueTypeFonts: true } : { embeddedFontList: null, embedTrueTypeFonts: false };
|
|
58471
|
+
}
|
|
58472
|
+
|
|
58473
|
+
// src/pptx/render/building-block-font-embedding.ts
|
|
58474
|
+
function describeFontEmbeddingState(input) {
|
|
58475
|
+
const descriptor = input.descriptor ?? describeFontEmbedding(input.embeddedFamilies);
|
|
58476
|
+
return {
|
|
58477
|
+
embedFonts: input.embedFonts,
|
|
58478
|
+
embeddedFamilies: descriptor.embeddedFamilies,
|
|
58479
|
+
usedFamilies: [...input.usedFamilies],
|
|
58480
|
+
canEmbed: descriptor.interactive,
|
|
58481
|
+
...descriptor.disabledReasonKey ? { unavailableReasonKey: descriptor.disabledReasonKey } : {}
|
|
58482
|
+
};
|
|
58483
|
+
}
|
|
58484
|
+
function buildFontEmbeddingActions(input) {
|
|
58485
|
+
return {
|
|
58486
|
+
state: input.state,
|
|
58487
|
+
setEmbedFonts: (enabled) => {
|
|
58488
|
+
const denied = input.refuse();
|
|
58489
|
+
if (denied) {
|
|
58490
|
+
return denied;
|
|
58491
|
+
}
|
|
58492
|
+
const latest = input.latest();
|
|
58493
|
+
if (enabled && !latest.canEmbed) {
|
|
58494
|
+
return buildingBlockFailure("unsupported");
|
|
58495
|
+
}
|
|
58496
|
+
if (latest.embedFonts !== enabled) {
|
|
58497
|
+
input.apply(enabled);
|
|
58498
|
+
input.markDirty();
|
|
58499
|
+
}
|
|
58500
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58501
|
+
}
|
|
58502
|
+
};
|
|
58503
|
+
}
|
|
58504
|
+
|
|
58505
|
+
// src/pptx/render/password-protection.ts
|
|
58506
|
+
function getPasswordStrength(password) {
|
|
58507
|
+
if (!password) {
|
|
58508
|
+
return 0;
|
|
58509
|
+
}
|
|
58510
|
+
let score2 = 0;
|
|
58511
|
+
if (password.length >= 8) {
|
|
58512
|
+
score2 += 1;
|
|
58513
|
+
}
|
|
58514
|
+
if (password.length >= 12) {
|
|
58515
|
+
score2 += 1;
|
|
58516
|
+
}
|
|
58517
|
+
if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
|
|
58518
|
+
score2 += 1;
|
|
58519
|
+
}
|
|
58520
|
+
if (/\d/u.test(password)) {
|
|
58521
|
+
score2 += 1;
|
|
58522
|
+
}
|
|
58523
|
+
if (/[^A-Za-z0-9]/u.test(password)) {
|
|
58524
|
+
score2 += 1;
|
|
58525
|
+
}
|
|
58526
|
+
return Math.min(score2, 4);
|
|
58527
|
+
}
|
|
58528
|
+
function validatePasswordPair(password, confirmation) {
|
|
58529
|
+
if (!password) {
|
|
58530
|
+
return "required";
|
|
58531
|
+
}
|
|
58532
|
+
if (password !== confirmation) {
|
|
58533
|
+
return "mismatch";
|
|
58534
|
+
}
|
|
58535
|
+
if (password.length < 4) {
|
|
58536
|
+
return "tooShort";
|
|
58537
|
+
}
|
|
58538
|
+
return null;
|
|
58539
|
+
}
|
|
58540
|
+
var NOT_RECOMMENDED = {
|
|
58541
|
+
kind: null,
|
|
58542
|
+
messageKey: "",
|
|
58543
|
+
defaultReadOnly: false,
|
|
58544
|
+
requiresPassword: false
|
|
58545
|
+
};
|
|
58546
|
+
var MARK_AS_FINAL_PROPERTY_NAME = "_MarkAsFinal";
|
|
58547
|
+
function isTruthyCustomPropertyValue(value) {
|
|
58548
|
+
const normalized = value.trim().toLowerCase();
|
|
58549
|
+
return normalized === "true" || normalized === "1" || normalized === "yes";
|
|
58550
|
+
}
|
|
58551
|
+
function isMarkedAsFinal(customProperties) {
|
|
58552
|
+
if (!customProperties) {
|
|
58553
|
+
return false;
|
|
58554
|
+
}
|
|
58555
|
+
return customProperties.some(
|
|
58556
|
+
(property) => property.name === MARK_AS_FINAL_PROPERTY_NAME && isTruthyCustomPropertyValue(property.value)
|
|
58557
|
+
);
|
|
58558
|
+
}
|
|
58559
|
+
function readOnlyRecommendation(data) {
|
|
58560
|
+
if (!data) {
|
|
58561
|
+
return NOT_RECOMMENDED;
|
|
58562
|
+
}
|
|
58563
|
+
const verifier = data.modifyVerifier;
|
|
58564
|
+
if (verifier && (verifier.hashData || verifier.algorithmName)) {
|
|
58565
|
+
return {
|
|
58566
|
+
kind: "modifyVerifier",
|
|
58567
|
+
messageKey: "pptx.readOnly.modifyVerifierRecommended",
|
|
58568
|
+
defaultReadOnly: true,
|
|
58569
|
+
// A hash this viewer can actually check requires the password before
|
|
58570
|
+
// "Edit anyway" can lift the lock; `saltData` is deliberately NOT part
|
|
58571
|
+
// of this check (see the field doc comment above): only a missing hash
|
|
58572
|
+
// or an unrecognised algorithm falls back to the plain "Edit anyway"
|
|
58573
|
+
// every other recommendation already has.
|
|
58574
|
+
requiresPassword: Boolean(verifier.hashData && pptx.resolveModifyVerifierAlgorithmName(verifier))
|
|
57732
58575
|
};
|
|
57733
58576
|
}
|
|
57734
|
-
|
|
57735
|
-
|
|
57736
|
-
|
|
57737
|
-
|
|
57738
|
-
|
|
57739
|
-
|
|
58577
|
+
if (isMarkedAsFinal(data.customProperties)) {
|
|
58578
|
+
return {
|
|
58579
|
+
kind: "markedFinal",
|
|
58580
|
+
messageKey: "pptx.readOnly.markedFinal",
|
|
58581
|
+
defaultReadOnly: true,
|
|
58582
|
+
requiresPassword: false
|
|
57740
58583
|
};
|
|
57741
58584
|
}
|
|
57742
|
-
return
|
|
58585
|
+
return NOT_RECOMMENDED;
|
|
57743
58586
|
}
|
|
57744
58587
|
|
|
57745
|
-
// src/pptx/render/
|
|
57746
|
-
|
|
57747
|
-
|
|
57748
|
-
|
|
58588
|
+
// src/pptx/render/building-block-password.ts
|
|
58589
|
+
var MIN_OPEN_PASSWORD_LENGTH = 4;
|
|
58590
|
+
var PASSWORD_CODES = {
|
|
58591
|
+
required: "password-required",
|
|
58592
|
+
mismatch: "password-mismatch",
|
|
58593
|
+
tooShort: "password-too-short"
|
|
58594
|
+
};
|
|
58595
|
+
var MARK_AS_FINAL_PROPERTY = "_MarkAsFinal";
|
|
58596
|
+
function validateOpenPassword(password, confirmation) {
|
|
58597
|
+
const invalid = validatePasswordPair(password, confirmation);
|
|
58598
|
+
return invalid === null ? BUILDING_BLOCK_OK : buildingBlockFailure(PASSWORD_CODES[invalid]);
|
|
58599
|
+
}
|
|
58600
|
+
function describePasswordProtection(input) {
|
|
58601
|
+
return {
|
|
58602
|
+
openPassword: input.openPasswordSet,
|
|
58603
|
+
modifyPassword: input.hasModifyVerifier,
|
|
58604
|
+
readOnlyRecommended: input.recommendation.kind !== null,
|
|
58605
|
+
markedFinal: isMarkedAsFinal(input.customProperties),
|
|
58606
|
+
supported: {
|
|
58607
|
+
openPassword: true,
|
|
58608
|
+
markedFinal: true,
|
|
58609
|
+
modifyPassword: false,
|
|
58610
|
+
readOnlyRecommended: false
|
|
58611
|
+
}
|
|
58612
|
+
};
|
|
58613
|
+
}
|
|
58614
|
+
function markAsFinalProperties(customProperties, final) {
|
|
58615
|
+
if (isMarkedAsFinal(customProperties) === final) {
|
|
58616
|
+
return void 0;
|
|
58617
|
+
}
|
|
58618
|
+
const others = customProperties.filter((property) => property.name !== MARK_AS_FINAL_PROPERTY);
|
|
58619
|
+
return final ? [...others, { name: MARK_AS_FINAL_PROPERTY, value: "true", type: "bool" }] : others;
|
|
58620
|
+
}
|
|
58621
|
+
function buildPasswordProtectionActions(input) {
|
|
58622
|
+
const guard = (run2) => input.refuse() ?? run2();
|
|
58623
|
+
return {
|
|
58624
|
+
state: input.state,
|
|
58625
|
+
setOpenPassword: (password, confirmation) => guard(() => {
|
|
58626
|
+
const checked = validateOpenPassword(password, confirmation);
|
|
58627
|
+
if (!checked.ok) {
|
|
58628
|
+
return checked;
|
|
58629
|
+
}
|
|
58630
|
+
input.applyOpenPassword(password);
|
|
58631
|
+
input.markDirty();
|
|
58632
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58633
|
+
}),
|
|
58634
|
+
clearOpenPassword: () => guard(() => {
|
|
58635
|
+
input.applyOpenPassword(null);
|
|
58636
|
+
input.markDirty();
|
|
58637
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58638
|
+
}),
|
|
58639
|
+
setMarkedFinal: (final) => guard(() => {
|
|
58640
|
+
const next2 = markAsFinalProperties(input.customProperties(), final);
|
|
58641
|
+
if (next2) {
|
|
58642
|
+
input.applyCustomProperties(next2);
|
|
58643
|
+
}
|
|
58644
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58645
|
+
}),
|
|
58646
|
+
setModifyPassword: () => input.refuse() ?? buildingBlockFailure("unsupported")
|
|
58647
|
+
};
|
|
58648
|
+
}
|
|
58649
|
+
function describeSignaturesState(input) {
|
|
58650
|
+
return {
|
|
58651
|
+
signed: input.signed,
|
|
58652
|
+
count: input.count,
|
|
58653
|
+
removedOnSave: true,
|
|
58654
|
+
supported: { list: true, remove: true, create: false, trust: false }
|
|
58655
|
+
};
|
|
58656
|
+
}
|
|
58657
|
+
function toHostSignatureInfo(signature) {
|
|
58658
|
+
const { certificate } = signature;
|
|
58659
|
+
return {
|
|
58660
|
+
path: signature.signaturePath,
|
|
58661
|
+
...certificate?.subject ? { signer: certificate.subject } : {},
|
|
58662
|
+
...certificate?.issuer ? { issuer: certificate.issuer } : {},
|
|
58663
|
+
...certificate?.validFrom ? { validFrom: certificate.validFrom } : {},
|
|
58664
|
+
...certificate?.validTo ? { validTo: certificate.validTo } : {},
|
|
58665
|
+
expired: signature.status === "expired",
|
|
58666
|
+
integrity: signature.integrity
|
|
58667
|
+
};
|
|
58668
|
+
}
|
|
58669
|
+
async function listPackageSignatures(content) {
|
|
58670
|
+
if (!content) {
|
|
58671
|
+
return [];
|
|
58672
|
+
}
|
|
58673
|
+
return (await pptx.inspectSignaturesFromBuffer(content)).map(toHostSignatureInfo);
|
|
58674
|
+
}
|
|
58675
|
+
function buildSignatureActions(input) {
|
|
58676
|
+
return {
|
|
58677
|
+
state: input.state,
|
|
58678
|
+
list: () => listPackageSignatures(input.content()),
|
|
58679
|
+
remove: () => {
|
|
58680
|
+
const denied = input.refuse();
|
|
58681
|
+
if (denied) {
|
|
58682
|
+
return denied;
|
|
58683
|
+
}
|
|
58684
|
+
if (!input.state.signed) {
|
|
58685
|
+
return buildingBlockFailure("no-signatures");
|
|
58686
|
+
}
|
|
58687
|
+
input.markDirty();
|
|
58688
|
+
return input.complete(BUILDING_BLOCK_OK);
|
|
58689
|
+
},
|
|
58690
|
+
sign: () => buildingBlockFailure("unsupported")
|
|
58691
|
+
};
|
|
57749
58692
|
}
|
|
57750
58693
|
|
|
57751
|
-
// src/pptx/render/
|
|
57752
|
-
var
|
|
57753
|
-
|
|
57754
|
-
|
|
57755
|
-
|
|
57756
|
-
|
|
57757
|
-
|
|
58694
|
+
// src/pptx/render/building-block-show-settings.ts
|
|
58695
|
+
var SHOW_TYPES = ["presented", "browsed", "kiosk"];
|
|
58696
|
+
var ADVANCE_MODES = ["manual", "useTimings"];
|
|
58697
|
+
var SLIDES_MODES = ["all", "range", "customShow"];
|
|
58698
|
+
function applySlideShowSettingsPatch(current, patch, context3) {
|
|
58699
|
+
const next2 = { ...current, ...patch };
|
|
58700
|
+
if (patch.showType === "kiosk") {
|
|
58701
|
+
next2.loopContinuously = true;
|
|
57758
58702
|
}
|
|
57759
|
-
|
|
58703
|
+
if (patch.showSlidesMode === "range") {
|
|
58704
|
+
next2.showSlidesFrom = patch.showSlidesFrom ?? current.showSlidesFrom ?? 1;
|
|
58705
|
+
next2.showSlidesTo = patch.showSlidesTo ?? current.showSlidesTo ?? context3.slideCount;
|
|
58706
|
+
}
|
|
58707
|
+
if (patch.showSlidesMode === "customShow") {
|
|
58708
|
+
const id = patch.showSlidesCustomShowId ?? current.showSlidesCustomShowId ?? context3.customShows[0]?.id;
|
|
58709
|
+
if (id !== void 0) {
|
|
58710
|
+
next2.showSlidesCustomShowId = id;
|
|
58711
|
+
}
|
|
58712
|
+
}
|
|
58713
|
+
return next2;
|
|
57760
58714
|
}
|
|
57761
|
-
|
|
57762
|
-
|
|
57763
|
-
|
|
57764
|
-
|
|
57765
|
-
|
|
57766
|
-
|
|
58715
|
+
function validateSlideShowSettings(settings, context3) {
|
|
58716
|
+
const known = (value, list2) => value === void 0 || list2.includes(value);
|
|
58717
|
+
if (!known(settings.showType, SHOW_TYPES) || !known(settings.advanceMode, ADVANCE_MODES) || !known(settings.showSlidesMode, SLIDES_MODES)) {
|
|
58718
|
+
return buildingBlockFailure("invalid-data");
|
|
58719
|
+
}
|
|
58720
|
+
if (settings.showSlidesMode === "range") {
|
|
58721
|
+
const from = settings.showSlidesFrom ?? 1;
|
|
58722
|
+
const to = settings.showSlidesTo ?? context3.slideCount;
|
|
58723
|
+
if (!Number.isInteger(from) || !Number.isInteger(to) || from < 1 || to > context3.slideCount || from > to) {
|
|
58724
|
+
return buildingBlockFailure("invalid-range");
|
|
58725
|
+
}
|
|
58726
|
+
}
|
|
58727
|
+
if (settings.showSlidesMode === "customShow" && !context3.customShows.some((show) => show.id === settings.showSlidesCustomShowId)) {
|
|
58728
|
+
return buildingBlockFailure("unknown-show");
|
|
58729
|
+
}
|
|
58730
|
+
if (settings.penColor !== void 0 && !/^#?[0-9a-f]{6}$/i.test(settings.penColor)) {
|
|
58731
|
+
return buildingBlockFailure("invalid-data");
|
|
58732
|
+
}
|
|
58733
|
+
return BUILDING_BLOCK_OK;
|
|
58734
|
+
}
|
|
58735
|
+
function describeSlideShowSettings(settings, context3) {
|
|
58736
|
+
return {
|
|
58737
|
+
showType: settings.showType ?? "presented",
|
|
58738
|
+
loop: Boolean(settings.loopContinuously),
|
|
58739
|
+
playNarration: settings.showWithNarration !== false,
|
|
58740
|
+
playAnimation: settings.showWithAnimation !== false,
|
|
58741
|
+
subtitles: Boolean(settings.showSubtitles),
|
|
58742
|
+
advanceMode: settings.advanceMode ?? "useTimings",
|
|
58743
|
+
slidesMode: settings.showSlidesMode ?? "all",
|
|
58744
|
+
rangeFrom: settings.showSlidesFrom ?? 1,
|
|
58745
|
+
rangeTo: settings.showSlidesTo ?? context3.slideCount,
|
|
58746
|
+
customShowId: settings.showSlidesCustomShowId,
|
|
58747
|
+
penColor: settings.penColor,
|
|
58748
|
+
kioskRestartTime: settings.kioskRestartTime,
|
|
58749
|
+
showScrollbar: settings.showScrollbar ?? true,
|
|
58750
|
+
slideCount: context3.slideCount,
|
|
58751
|
+
customShows: context3.customShows.map(({ id, name }) => ({ id, name }))
|
|
58752
|
+
};
|
|
58753
|
+
}
|
|
58754
|
+
function resolveSlideShowSettings(current, patch, context3) {
|
|
58755
|
+
const settings = applySlideShowSettingsPatch(current, patch, context3);
|
|
58756
|
+
const checked = validateSlideShowSettings(settings, context3);
|
|
58757
|
+
return checked.ok ? { ok: true, settings } : { ok: false, code: checked.code };
|
|
58758
|
+
}
|
|
58759
|
+
function applyCustomShowEdit(shows, slides, edit) {
|
|
58760
|
+
const known = new Set(slides.map((slide) => slide.rId));
|
|
58761
|
+
const fail = (code) => ({ ok: false, code });
|
|
58762
|
+
if ("id" in edit && !shows.some((show) => show.id === edit.id)) {
|
|
58763
|
+
return fail("unknown-show");
|
|
58764
|
+
}
|
|
58765
|
+
if ((edit.kind === "create" || edit.kind === "rename") && edit.name.trim() === "") {
|
|
58766
|
+
return fail("invalid-name");
|
|
58767
|
+
}
|
|
58768
|
+
const rIds = edit.kind === "create" || edit.kind === "setSlides" ? edit.slideRIds : void 0;
|
|
58769
|
+
if (rIds?.some((rId) => !known.has(rId))) {
|
|
58770
|
+
return fail("unknown-slide");
|
|
58771
|
+
}
|
|
58772
|
+
const controller = createCustomShowsController(shows, "id" in edit ? edit.id : null);
|
|
58773
|
+
let showId = "id" in edit ? edit.id : void 0;
|
|
58774
|
+
let next2;
|
|
58775
|
+
if (edit.kind === "setSlides") {
|
|
58776
|
+
next2 = customShowOperations.setCustomShowSlides(shows, edit.id, edit.slideRIds).shows;
|
|
58777
|
+
} else {
|
|
58778
|
+
if (edit.kind === "create") {
|
|
58779
|
+
controller.create(edit.name);
|
|
58780
|
+
} else if (edit.kind === "rename") {
|
|
58781
|
+
controller.rename(edit.name);
|
|
58782
|
+
} else if (edit.kind === "copy") {
|
|
58783
|
+
controller.copySelected(edit.name);
|
|
58784
|
+
} else {
|
|
58785
|
+
controller.removeSelected();
|
|
58786
|
+
}
|
|
58787
|
+
const state = controller.getSnapshot();
|
|
58788
|
+
next2 = state.shows;
|
|
58789
|
+
showId = edit.kind === "remove" ? void 0 : state.selectedId ?? void 0;
|
|
58790
|
+
}
|
|
58791
|
+
if (edit.kind === "create" && rIds && rIds.length > 0 && showId !== void 0) {
|
|
58792
|
+
next2 = customShowOperations.setCustomShowSlides(next2, showId, rIds).shows;
|
|
58793
|
+
}
|
|
58794
|
+
const result = controller.result(slides);
|
|
57767
58795
|
return {
|
|
57768
|
-
|
|
57769
|
-
|
|
57770
|
-
|
|
57771
|
-
|
|
57772
|
-
|
|
57773
|
-
|
|
57774
|
-
|
|
58796
|
+
ok: true,
|
|
58797
|
+
shows: next2.map((show) => ({ ...show, slideRIds: [...show.slideRIds] })),
|
|
58798
|
+
slides: result.slides,
|
|
58799
|
+
showId
|
|
58800
|
+
};
|
|
58801
|
+
}
|
|
58802
|
+
function resolveCustomShowStart(shows, slides, id) {
|
|
58803
|
+
const show = shows.find((candidate) => candidate.id === id);
|
|
58804
|
+
if (!show) {
|
|
58805
|
+
return { ok: false, code: "unknown-show" };
|
|
58806
|
+
}
|
|
58807
|
+
const first = customShowOperations.customShowSlides(show, slides)[0];
|
|
58808
|
+
return first ? { ok: true, firstSlideIndex: slides.indexOf(first) } : { ok: false, code: "no-slide" };
|
|
58809
|
+
}
|
|
58810
|
+
function describeCustomShows(shows, slides) {
|
|
58811
|
+
return {
|
|
58812
|
+
shows: shows.map((show) => ({
|
|
58813
|
+
id: show.id,
|
|
58814
|
+
name: show.name,
|
|
58815
|
+
slideRIds: [...show.slideRIds],
|
|
58816
|
+
slideCount: customShowOperations.customShowSlides(show, slides).length
|
|
58817
|
+
})),
|
|
58818
|
+
slides: slides.map((slide, index) => ({ rId: slide.rId, number: index + 1 }))
|
|
57775
58819
|
};
|
|
57776
58820
|
}
|
|
57777
58821
|
|
|
57778
|
-
// src/pptx/render/
|
|
57779
|
-
var
|
|
58822
|
+
// src/pptx/render/viewer-preferences.ts
|
|
58823
|
+
var DEFAULT_VIEWER_PREFERENCES = {
|
|
58824
|
+
autoSave: true,
|
|
58825
|
+
spellCheck: false,
|
|
58826
|
+
showGrid: false,
|
|
58827
|
+
showRulers: false,
|
|
58828
|
+
snapToGrid: false,
|
|
58829
|
+
reducedMotion: false
|
|
58830
|
+
};
|
|
58831
|
+
var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
|
|
58832
|
+
var VIEWER_SHORTCUT_REFERENCE = [
|
|
58833
|
+
{ actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z", group: "history" },
|
|
57780
58834
|
{
|
|
57781
|
-
|
|
57782
|
-
|
|
57783
|
-
|
|
57784
|
-
glyph: "square",
|
|
57785
|
-
glyphClass: ""
|
|
58835
|
+
actionKey: "pptx.toolbar.redo",
|
|
58836
|
+
shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y",
|
|
58837
|
+
group: "history"
|
|
57786
58838
|
},
|
|
58839
|
+
{ actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C", group: "clipboard" },
|
|
58840
|
+
{ actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X", group: "clipboard" },
|
|
58841
|
+
{ actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V", group: "clipboard" },
|
|
57787
58842
|
{
|
|
57788
|
-
|
|
57789
|
-
|
|
57790
|
-
|
|
57791
|
-
glyph: "square",
|
|
57792
|
-
glyphClass: ""
|
|
58843
|
+
actionKey: "pptx.shortcuts.action.duplicateElement",
|
|
58844
|
+
shortcut: "Ctrl/Cmd+D",
|
|
58845
|
+
group: "editing"
|
|
57793
58846
|
},
|
|
57794
58847
|
{
|
|
57795
|
-
|
|
57796
|
-
|
|
57797
|
-
|
|
57798
|
-
glyph: "circle",
|
|
57799
|
-
glyphClass: ""
|
|
58848
|
+
actionKey: "pptx.shortcuts.action.deleteElement",
|
|
58849
|
+
shortcut: "Delete / Backspace",
|
|
58850
|
+
group: "editing"
|
|
57800
58851
|
},
|
|
58852
|
+
{ actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A", group: "editing" },
|
|
58853
|
+
{ actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G", group: "editing" },
|
|
58854
|
+
{ actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G", group: "editing" },
|
|
58855
|
+
{ actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys", group: "editing" },
|
|
57801
58856
|
{
|
|
57802
|
-
|
|
57803
|
-
|
|
57804
|
-
|
|
57805
|
-
glyph: "database",
|
|
57806
|
-
glyphClass: ""
|
|
58857
|
+
actionKey: "pptx.shortcuts.action.nudgeElementLarge",
|
|
58858
|
+
shortcut: "Shift+Arrow keys",
|
|
58859
|
+
group: "editing"
|
|
57807
58860
|
},
|
|
57808
58861
|
{
|
|
57809
|
-
|
|
57810
|
-
|
|
57811
|
-
|
|
57812
|
-
|
|
57813
|
-
|
|
57814
|
-
|
|
58862
|
+
actionKey: "pptx.shortcuts.action.prevSlide",
|
|
58863
|
+
shortcut: "Left or Up arrow, Page Up",
|
|
58864
|
+
group: "navigation"
|
|
58865
|
+
},
|
|
58866
|
+
{
|
|
58867
|
+
actionKey: "pptx.shortcuts.action.nextSlide",
|
|
58868
|
+
shortcut: "Right or Down arrow, Page Down",
|
|
58869
|
+
group: "navigation"
|
|
58870
|
+
},
|
|
58871
|
+
{
|
|
58872
|
+
actionKey: "pptx.shortcuts.action.zoomCanvas",
|
|
58873
|
+
shortcut: "Ctrl/Cmd+Mouse wheel",
|
|
58874
|
+
group: "navigation"
|
|
58875
|
+
},
|
|
58876
|
+
{
|
|
58877
|
+
actionKey: "pptx.shortcuts.action.commitTextEdit",
|
|
58878
|
+
shortcut: "Ctrl/Cmd+Enter",
|
|
58879
|
+
group: "editing"
|
|
58880
|
+
},
|
|
58881
|
+
{ actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape", group: "editing" },
|
|
58882
|
+
// Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
|
|
58883
|
+
// bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
|
|
58884
|
+
// was advertising neither. The help panel is the keymap's documentation: a
|
|
58885
|
+
// chord missing here is a chord nobody discovers.
|
|
58886
|
+
{ actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F", group: "general" },
|
|
58887
|
+
{ actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5", group: "general" },
|
|
58888
|
+
{ actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5", group: "general" },
|
|
58889
|
+
{ actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/", group: "general" }
|
|
58890
|
+
];
|
|
58891
|
+
var SHORTCUT_REFERENCE_GROUP_LABEL_KEYS = {
|
|
58892
|
+
history: "pptx.editorToolbar.history",
|
|
58893
|
+
clipboard: "pptx.ribbon.clipboard",
|
|
58894
|
+
editing: "pptx.shortcuts.group.editing",
|
|
58895
|
+
navigation: "pptx.shortcuts.group.navigation",
|
|
58896
|
+
general: "pptx.settings.general"
|
|
58897
|
+
};
|
|
58898
|
+
function groupShortcutReference(items = VIEWER_SHORTCUT_REFERENCE) {
|
|
58899
|
+
const order = Object.keys(SHORTCUT_REFERENCE_GROUP_LABEL_KEYS);
|
|
58900
|
+
return order.map((group) => ({
|
|
58901
|
+
group,
|
|
58902
|
+
labelKey: SHORTCUT_REFERENCE_GROUP_LABEL_KEYS[group],
|
|
58903
|
+
shortcuts: items.filter((item4) => item4.group === group)
|
|
58904
|
+
})).filter((bucket) => bucket.shortcuts.length > 0);
|
|
58905
|
+
}
|
|
58906
|
+
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
58907
|
+
var VIEWER_PREFERENCE_TOGGLES = [
|
|
58908
|
+
{ key: "autoSave", labelKey: "pptx.settings.autoSave" },
|
|
58909
|
+
{ key: "spellCheck", labelKey: "pptx.settings.spellCheck" },
|
|
58910
|
+
{ key: "showGrid", labelKey: "pptx.settings.showGrid" },
|
|
58911
|
+
{ key: "showRulers", labelKey: "pptx.settings.showRulers" },
|
|
58912
|
+
{ key: "snapToGrid", labelKey: "pptx.settings.snapToGrid" },
|
|
58913
|
+
{ key: "reducedMotion", labelKey: "pptx.settings.reducedMotion" }
|
|
58914
|
+
];
|
|
58915
|
+
var SETTING_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
|
|
58916
|
+
function updateViewerPreference(preferences, key, value) {
|
|
58917
|
+
return { ...preferences, [key]: value };
|
|
58918
|
+
}
|
|
58919
|
+
function viewerPreferencesFromViewProperties(data, defaults) {
|
|
58920
|
+
const slideViewPr = data.viewProperties?.slideViewPr;
|
|
58921
|
+
const gridSpacing = data.viewProperties?.gridSpacing;
|
|
58922
|
+
return {
|
|
58923
|
+
...defaults,
|
|
58924
|
+
snapToGrid: slideViewPr?.snapToGrid ?? defaults.snapToGrid,
|
|
58925
|
+
snapToObjects: slideViewPr?.snapToObjects ?? defaults.snapToObjects,
|
|
58926
|
+
showGuides: slideViewPr?.showGuides ?? defaults.showGuides,
|
|
58927
|
+
gridSpacingCx: gridSpacing?.cx ?? defaults.gridSpacingCx,
|
|
58928
|
+
gridSpacingCy: gridSpacing?.cy ?? defaults.gridSpacingCy
|
|
58929
|
+
};
|
|
58930
|
+
}
|
|
58931
|
+
function viewPropertiesPatchFromPreferences(preferences) {
|
|
58932
|
+
const patch = {
|
|
58933
|
+
slideViewPr: {
|
|
58934
|
+
snapToGrid: preferences.snapToGrid,
|
|
58935
|
+
snapToObjects: preferences.snapToObjects ?? false,
|
|
58936
|
+
showGuides: preferences.showGuides ?? false
|
|
58937
|
+
}
|
|
58938
|
+
};
|
|
58939
|
+
if (typeof preferences.gridSpacingCx === "number" && typeof preferences.gridSpacingCy === "number") {
|
|
58940
|
+
patch.gridSpacing = { cx: preferences.gridSpacingCx, cy: preferences.gridSpacingCy };
|
|
58941
|
+
}
|
|
58942
|
+
return patch;
|
|
58943
|
+
}
|
|
58944
|
+
|
|
58945
|
+
// src/pptx/render/building-block-show-dialogs.ts
|
|
58946
|
+
function describeShowDialogActions(input) {
|
|
58947
|
+
const gate = describeBuildingBlockActions(input).replace;
|
|
58948
|
+
const edit = () => gate.available ? { available: true, needsHostUi: true } : { available: false, reason: gate.reason ?? "not-ready", needsHostUi: true };
|
|
58949
|
+
return {
|
|
58950
|
+
setUpSlideShow: edit(),
|
|
58951
|
+
customShows: edit(),
|
|
58952
|
+
broadcast: { available: false, reason: "unsupported", needsHostUi: true },
|
|
58953
|
+
shortcuts: { available: true, needsHostUi: true }
|
|
58954
|
+
};
|
|
58955
|
+
}
|
|
58956
|
+
function describeBroadcastSupport() {
|
|
58957
|
+
return { supported: false, reason: "unsupported", requires: "collaboration-service" };
|
|
58958
|
+
}
|
|
58959
|
+
function describeShortcutCatalogue(translate2) {
|
|
58960
|
+
return groupShortcutReference(VIEWER_SHORTCUT_REFERENCE).flatMap(
|
|
58961
|
+
(bucket) => bucket.shortcuts.map((item4) => ({
|
|
58962
|
+
id: item4.actionKey.replace(/^pptx\./, "").replace(/^shortcuts\.action\./, ""),
|
|
58963
|
+
descriptionKey: item4.actionKey,
|
|
58964
|
+
description: translate2(item4.actionKey),
|
|
58965
|
+
keys: item4.shortcut,
|
|
58966
|
+
alternatives: item4.shortcut.split(" or ").map((part2) => part2.trim()),
|
|
58967
|
+
group: item4.group,
|
|
58968
|
+
groupLabel: translate2(bucket.labelKey)
|
|
58969
|
+
}))
|
|
58970
|
+
);
|
|
58971
|
+
}
|
|
58972
|
+
|
|
58973
|
+
// src/pptx/render/building-blocks/action-groups.ts
|
|
58974
|
+
function defineBuildingBlockActionGroup(group) {
|
|
58975
|
+
return group;
|
|
58976
|
+
}
|
|
58977
|
+
function createBuildingBlockGroupContext(requests, refuse, ready) {
|
|
58978
|
+
return {
|
|
58979
|
+
refuse,
|
|
58980
|
+
ready,
|
|
58981
|
+
request: (next2) => requests.request(next2),
|
|
58982
|
+
complete: (kind, result) => requests.complete(kind, result)
|
|
58983
|
+
};
|
|
58984
|
+
}
|
|
58985
|
+
|
|
58986
|
+
// src/pptx/render/find-replace-session.ts
|
|
58987
|
+
var DEFAULT_FIND_REPLACE_OPTIONS = Object.freeze({
|
|
58988
|
+
matchCase: false,
|
|
58989
|
+
includeNotes: false,
|
|
58990
|
+
includeChartTitles: true,
|
|
58991
|
+
includeChartData: false
|
|
58992
|
+
});
|
|
58993
|
+
var INITIAL_FIND_REPLACE_SESSION = Object.freeze({
|
|
58994
|
+
query: "",
|
|
58995
|
+
replacement: "",
|
|
58996
|
+
options: DEFAULT_FIND_REPLACE_OPTIONS,
|
|
58997
|
+
matches: Object.freeze([]),
|
|
58998
|
+
current: -1,
|
|
58999
|
+
pendingRefind: null
|
|
59000
|
+
});
|
|
59001
|
+
function search(slides, session) {
|
|
59002
|
+
return session.query ? findReplace.findInSlides(slides, session.query, session.options) : [];
|
|
59003
|
+
}
|
|
59004
|
+
function cursorAfterReplace(pending3, count) {
|
|
59005
|
+
if (count === 0) {
|
|
59006
|
+
return -1;
|
|
59007
|
+
}
|
|
59008
|
+
if (pending3.scope === "all") {
|
|
59009
|
+
return 0;
|
|
59010
|
+
}
|
|
59011
|
+
const created = Math.max(0, count - (pending3.count - 1));
|
|
59012
|
+
return (pending3.index + created) % count;
|
|
59013
|
+
}
|
|
59014
|
+
function reduceFindReplaceSession(session, event) {
|
|
59015
|
+
switch (event.type) {
|
|
59016
|
+
case "search": {
|
|
59017
|
+
const next2 = {
|
|
59018
|
+
...session,
|
|
59019
|
+
query: event.query ?? session.query,
|
|
59020
|
+
options: event.options ? { ...session.options, ...event.options } : session.options,
|
|
59021
|
+
pendingRefind: null
|
|
59022
|
+
};
|
|
59023
|
+
const matches = search(event.slides, next2);
|
|
59024
|
+
return { ...next2, matches, current: matches.length > 0 ? 0 : -1 };
|
|
59025
|
+
}
|
|
59026
|
+
case "setReplacement":
|
|
59027
|
+
return event.replacement === session.replacement ? session : { ...session, replacement: event.replacement };
|
|
59028
|
+
case "step": {
|
|
59029
|
+
const count = session.matches.length;
|
|
59030
|
+
if (count === 0) {
|
|
59031
|
+
return session;
|
|
59032
|
+
}
|
|
59033
|
+
const from = session.current < 0 ? event.direction > 0 ? -1 : 0 : session.current;
|
|
59034
|
+
const current = (from + event.direction + count) % count;
|
|
59035
|
+
return current === session.current ? session : { ...session, current };
|
|
59036
|
+
}
|
|
59037
|
+
case "replaced":
|
|
59038
|
+
return {
|
|
59039
|
+
...session,
|
|
59040
|
+
pendingRefind: {
|
|
59041
|
+
scope: event.plan.scope,
|
|
59042
|
+
index: event.plan.index,
|
|
59043
|
+
count: event.plan.count,
|
|
59044
|
+
base: event.slides
|
|
59045
|
+
}
|
|
59046
|
+
};
|
|
59047
|
+
case "slidesChanged": {
|
|
59048
|
+
const pending3 = session.pendingRefind;
|
|
59049
|
+
if (!pending3 || event.slides === pending3.base) {
|
|
59050
|
+
return session;
|
|
59051
|
+
}
|
|
59052
|
+
const matches = search(event.slides, session);
|
|
59053
|
+
return {
|
|
59054
|
+
...session,
|
|
59055
|
+
matches,
|
|
59056
|
+
current: cursorAfterReplace(pending3, matches.length),
|
|
59057
|
+
pendingRefind: null
|
|
59058
|
+
};
|
|
59059
|
+
}
|
|
59060
|
+
case "close":
|
|
59061
|
+
return session.matches.length === 0 && session.current === -1 && !session.pendingRefind ? session : { ...session, matches: [], current: -1, pendingRefind: null };
|
|
59062
|
+
}
|
|
59063
|
+
}
|
|
59064
|
+
function findReplaceStatus(session) {
|
|
59065
|
+
const total = session.matches.length;
|
|
59066
|
+
return { current: total > 0 && session.current >= 0 ? session.current + 1 : 0, total };
|
|
59067
|
+
}
|
|
59068
|
+
function findReplaceTarget(session) {
|
|
59069
|
+
const match = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
59070
|
+
if (!match) {
|
|
59071
|
+
return null;
|
|
59072
|
+
}
|
|
59073
|
+
return { slideIndex: match.slideIndex, elementId: match.notes ? null : match.elementId };
|
|
59074
|
+
}
|
|
59075
|
+
function matchKey(match) {
|
|
59076
|
+
return JSON.stringify([
|
|
59077
|
+
match.slideIndex,
|
|
59078
|
+
match.elementId,
|
|
59079
|
+
match.elementPath ?? null,
|
|
59080
|
+
match.tableCell ?? null,
|
|
59081
|
+
match.smartArtNodeId ?? null,
|
|
59082
|
+
match.notes ?? false,
|
|
59083
|
+
match.chartTitle ?? false,
|
|
59084
|
+
match.chartSeriesIndex ?? null,
|
|
59085
|
+
match.chartCategoryIndex ?? null,
|
|
59086
|
+
match.segmentIndex,
|
|
59087
|
+
match.startOffset,
|
|
59088
|
+
match.length
|
|
59089
|
+
]);
|
|
59090
|
+
}
|
|
59091
|
+
function planFindReplace(session, slides, scope) {
|
|
59092
|
+
const found = search(slides, session);
|
|
59093
|
+
let matches = found;
|
|
59094
|
+
let index = -1;
|
|
59095
|
+
if (scope === "current") {
|
|
59096
|
+
const current = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
59097
|
+
const key = current ? matchKey(current) : null;
|
|
59098
|
+
index = key === null ? -1 : found.findIndex((match) => matchKey(match) === key);
|
|
59099
|
+
matches = index >= 0 ? [found[index]] : [];
|
|
59100
|
+
}
|
|
59101
|
+
if (matches.length === 0 || matches.some((match) => match.readOnly)) {
|
|
59102
|
+
return null;
|
|
59103
|
+
}
|
|
59104
|
+
return { scope, matches, replacement: session.replacement, count: found.length, index };
|
|
59105
|
+
}
|
|
59106
|
+
|
|
59107
|
+
// src/pptx/render/find-replace-session-actions.ts
|
|
59108
|
+
function findReplaceSessionActions(store, host2) {
|
|
59109
|
+
const apply7 = (event) => {
|
|
59110
|
+
const current = store.get();
|
|
59111
|
+
const next2 = reduceFindReplaceSession(current, event);
|
|
59112
|
+
if (next2 !== current) {
|
|
59113
|
+
store.set(next2);
|
|
59114
|
+
}
|
|
59115
|
+
return next2 !== current;
|
|
59116
|
+
};
|
|
59117
|
+
const show = () => {
|
|
59118
|
+
const target = findReplaceTarget(store.get());
|
|
59119
|
+
if (target) {
|
|
59120
|
+
host2.navigate(target);
|
|
59121
|
+
}
|
|
59122
|
+
};
|
|
59123
|
+
const step2 = (direction) => {
|
|
59124
|
+
apply7({ type: "step", direction });
|
|
59125
|
+
show();
|
|
59126
|
+
};
|
|
59127
|
+
const slidesChanged = () => {
|
|
59128
|
+
if (apply7({ type: "slidesChanged", slides: host2.slides() })) {
|
|
59129
|
+
show();
|
|
59130
|
+
}
|
|
59131
|
+
};
|
|
59132
|
+
const replace = (scope) => {
|
|
59133
|
+
const slides = host2.slides();
|
|
59134
|
+
const plan = planFindReplace(store.get(), slides, scope);
|
|
59135
|
+
if (!plan) {
|
|
59136
|
+
return 0;
|
|
59137
|
+
}
|
|
59138
|
+
const result = findReplace.applyFindReplacements(slides, plan.matches, plan.replacement);
|
|
59139
|
+
if (result.replacements === 0) {
|
|
59140
|
+
return 0;
|
|
59141
|
+
}
|
|
59142
|
+
host2.commit(result.slides, scope);
|
|
59143
|
+
apply7({ type: "replaced", plan, slides });
|
|
59144
|
+
slidesChanged();
|
|
59145
|
+
return result.replacements;
|
|
59146
|
+
};
|
|
59147
|
+
return {
|
|
59148
|
+
search: (change = {}) => {
|
|
59149
|
+
apply7({ type: "search", slides: host2.slides(), ...change });
|
|
59150
|
+
show();
|
|
59151
|
+
},
|
|
59152
|
+
setReplacement: (replacement) => {
|
|
59153
|
+
apply7({ type: "setReplacement", replacement });
|
|
59154
|
+
},
|
|
59155
|
+
next: () => step2(1),
|
|
59156
|
+
previous: () => step2(-1),
|
|
59157
|
+
replaceCurrent: () => replace("current"),
|
|
59158
|
+
replaceAll: () => replace("all"),
|
|
59159
|
+
slidesChanged,
|
|
59160
|
+
close: () => {
|
|
59161
|
+
apply7({ type: "close" });
|
|
59162
|
+
}
|
|
59163
|
+
};
|
|
59164
|
+
}
|
|
59165
|
+
|
|
59166
|
+
// src/pptx/render/building-blocks/find-bar-controller.ts
|
|
59167
|
+
function createFindBarController(host2) {
|
|
59168
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore({
|
|
59169
|
+
open: false,
|
|
59170
|
+
session: INITIAL_FIND_REPLACE_SESSION
|
|
59171
|
+
});
|
|
59172
|
+
const actions = findReplaceSessionActions(
|
|
59173
|
+
{
|
|
59174
|
+
get: () => store.getSnapshot().session,
|
|
59175
|
+
set: (session) => store.update((current) => ({ ...current, session }))
|
|
59176
|
+
},
|
|
59177
|
+
host2
|
|
59178
|
+
);
|
|
59179
|
+
const setOpen = (open) => {
|
|
59180
|
+
if (store.getSnapshot().open === open) {
|
|
59181
|
+
return;
|
|
59182
|
+
}
|
|
59183
|
+
if (!open) {
|
|
59184
|
+
actions.close();
|
|
59185
|
+
}
|
|
59186
|
+
store.update((current) => ({ ...current, open }));
|
|
59187
|
+
};
|
|
59188
|
+
return {
|
|
59189
|
+
getSnapshot: store.getSnapshot,
|
|
59190
|
+
subscribe: store.subscribe,
|
|
59191
|
+
setOpen,
|
|
59192
|
+
toggle: () => setOpen(!store.getSnapshot().open),
|
|
59193
|
+
slidesChanged: () => actions.slidesChanged(),
|
|
59194
|
+
port() {
|
|
59195
|
+
const { open, session } = store.getSnapshot();
|
|
59196
|
+
return {
|
|
59197
|
+
open,
|
|
59198
|
+
setOpen,
|
|
59199
|
+
query: session.query,
|
|
59200
|
+
replacement: session.replacement,
|
|
59201
|
+
options: session.options,
|
|
59202
|
+
matches: session.matches,
|
|
59203
|
+
currentIndex: session.current,
|
|
59204
|
+
setQuery: (query) => actions.search({ query }),
|
|
59205
|
+
setReplacement: (replacement) => actions.setReplacement(replacement),
|
|
59206
|
+
setOptions: (change) => actions.search({ options: change }),
|
|
59207
|
+
find: () => actions.search(),
|
|
59208
|
+
navigate: (delta) => delta > 0 ? actions.next() : actions.previous(),
|
|
59209
|
+
replaceCurrent: () => void actions.replaceCurrent(),
|
|
59210
|
+
replaceAll: () => void actions.replaceAll()
|
|
59211
|
+
};
|
|
59212
|
+
}
|
|
59213
|
+
};
|
|
59214
|
+
}
|
|
59215
|
+
|
|
59216
|
+
// src/pptx/render/building-blocks/find-layout.ts
|
|
59217
|
+
function buildFindReplaceActions(port, refuseReplace) {
|
|
59218
|
+
const { matches, currentIndex } = port;
|
|
59219
|
+
return {
|
|
59220
|
+
open: port.open,
|
|
59221
|
+
setOpen: port.setOpen,
|
|
59222
|
+
query: port.query,
|
|
59223
|
+
replacement: port.replacement,
|
|
59224
|
+
options: port.options,
|
|
59225
|
+
matches,
|
|
59226
|
+
currentIndex,
|
|
59227
|
+
currentMatch: matches[currentIndex] ?? null,
|
|
59228
|
+
setQuery: port.setQuery,
|
|
59229
|
+
setReplacement: port.setReplacement,
|
|
59230
|
+
setOptions: port.setOptions,
|
|
59231
|
+
find: port.find,
|
|
59232
|
+
next: () => port.navigate(1),
|
|
59233
|
+
previous: () => port.navigate(-1),
|
|
59234
|
+
replaceCurrent: () => refuseReplace() ?? (matches[currentIndex] === void 0 ? buildingBlockFailure("no-match") : (port.replaceCurrent(), BUILDING_BLOCK_OK)),
|
|
59235
|
+
replaceAll: () => refuseReplace() ?? (matches.length === 0 ? buildingBlockFailure("no-match") : (port.replaceAll(), BUILDING_BLOCK_OK))
|
|
59236
|
+
};
|
|
59237
|
+
}
|
|
59238
|
+
function findHighlightTargets(matches, currentIndex, slideIndex) {
|
|
59239
|
+
const targets = /* @__PURE__ */ new Map();
|
|
59240
|
+
matches.forEach((match, index) => {
|
|
59241
|
+
if (match.slideIndex === slideIndex) {
|
|
59242
|
+
targets.set(
|
|
59243
|
+
match.elementId,
|
|
59244
|
+
(targets.get(match.elementId) ?? false) || index === currentIndex
|
|
59245
|
+
);
|
|
59246
|
+
}
|
|
59247
|
+
});
|
|
59248
|
+
return [...targets].map(([elementId, current]) => ({ elementId, current }));
|
|
59249
|
+
}
|
|
59250
|
+
function buildLayoutActions(deps) {
|
|
59251
|
+
const apply7 = async (path, requireListed) => {
|
|
59252
|
+
const denied = deps.refuse("applyLayout");
|
|
59253
|
+
if (denied) {
|
|
59254
|
+
return denied;
|
|
59255
|
+
}
|
|
59256
|
+
if (requireListed && !deps.getScopedLayouts().some((layout) => layout.path === path)) {
|
|
59257
|
+
return buildingBlockFailure("unknown-layout");
|
|
59258
|
+
}
|
|
59259
|
+
try {
|
|
59260
|
+
await deps.applyLayout(path);
|
|
59261
|
+
return BUILDING_BLOCK_OK;
|
|
59262
|
+
} catch {
|
|
59263
|
+
return buildingBlockFailure("unknown-layout");
|
|
59264
|
+
}
|
|
59265
|
+
};
|
|
59266
|
+
const reset = async () => {
|
|
59267
|
+
const path = chunkCWWL7MCL_cjs.resetSlideLayoutPath(deps.getActiveSlide());
|
|
59268
|
+
if (path === void 0) {
|
|
59269
|
+
return buildingBlockFailure("no-layout");
|
|
59270
|
+
}
|
|
59271
|
+
return deps.refuse("resetLayout") ?? apply7(path, false);
|
|
59272
|
+
};
|
|
59273
|
+
return {
|
|
59274
|
+
layout: {
|
|
59275
|
+
current: deps.scopedLayouts.find((layout) => layout.path === deps.activeSlide?.layoutPath),
|
|
59276
|
+
currentPath: deps.activeSlide?.layoutPath,
|
|
59277
|
+
available: deps.scopedLayouts,
|
|
59278
|
+
apply: (path) => apply7(path, true),
|
|
59279
|
+
reset
|
|
59280
|
+
},
|
|
59281
|
+
apply: apply7,
|
|
59282
|
+
reset
|
|
59283
|
+
};
|
|
59284
|
+
}
|
|
59285
|
+
|
|
59286
|
+
// src/pptx/render/building-blocks/find-highlight-dom.ts
|
|
59287
|
+
var FIND_MATCH_ATTRIBUTE = "data-pptx-find-match";
|
|
59288
|
+
function markFindHighlights(root, targets) {
|
|
59289
|
+
const marks = new Map(
|
|
59290
|
+
targets.map((target) => [target.elementId, target.current ? "current" : "match"])
|
|
59291
|
+
);
|
|
59292
|
+
for (const node of root.querySelectorAll(`[${FIND_MATCH_ATTRIBUTE}]`)) {
|
|
59293
|
+
if (!marks.has(node.getAttribute("data-element-id") ?? "")) {
|
|
59294
|
+
node.removeAttribute(FIND_MATCH_ATTRIBUTE);
|
|
59295
|
+
}
|
|
59296
|
+
}
|
|
59297
|
+
if (marks.size === 0) {
|
|
59298
|
+
return;
|
|
59299
|
+
}
|
|
59300
|
+
for (const node of root.querySelectorAll("[data-element-id]")) {
|
|
59301
|
+
const mark = marks.get(node.getAttribute("data-element-id") ?? "");
|
|
59302
|
+
if (mark && node.getAttribute(FIND_MATCH_ATTRIBUTE) !== mark) {
|
|
59303
|
+
node.setAttribute(FIND_MATCH_ATTRIBUTE, mark);
|
|
59304
|
+
}
|
|
59305
|
+
}
|
|
59306
|
+
}
|
|
59307
|
+
function syncFindHighlights(root, matches, currentIndex, slideIndex) {
|
|
59308
|
+
markFindHighlights(root, findHighlightTargets(matches, currentIndex, slideIndex));
|
|
59309
|
+
}
|
|
59310
|
+
|
|
59311
|
+
// src/pptx/render/building-blocks/groups/file-dialog-groups.ts
|
|
59312
|
+
var passwordProtectionGroup = defineBuildingBlockActionGroup({
|
|
59313
|
+
id: "passwordProtection",
|
|
59314
|
+
create: (context3, port) => buildPasswordProtectionActions({
|
|
59315
|
+
state: describePasswordProtection(port.input()),
|
|
59316
|
+
customProperties: () => port.customProperties(),
|
|
59317
|
+
refuse: () => context3.refuse("passwordProtection"),
|
|
59318
|
+
applyOpenPassword: (password) => port.applyOpenPassword(password),
|
|
59319
|
+
applyCustomProperties: (next2) => port.applyCustomProperties(next2),
|
|
59320
|
+
markDirty: () => port.markDirty(),
|
|
59321
|
+
complete: (result) => context3.complete("passwordProtection", result)
|
|
59322
|
+
})
|
|
59323
|
+
});
|
|
59324
|
+
var documentPropertiesGroup = defineBuildingBlockActionGroup({
|
|
59325
|
+
id: "documentProperties",
|
|
59326
|
+
create: (context3, port) => buildDocumentPropertiesActions({
|
|
59327
|
+
current: () => port.current(),
|
|
59328
|
+
refuse: () => context3.refuse("documentProperties"),
|
|
59329
|
+
applyUpdate: (update) => port.applyUpdate(update),
|
|
59330
|
+
complete: (result) => context3.complete("documentProperties", result)
|
|
59331
|
+
})
|
|
59332
|
+
});
|
|
59333
|
+
var fontEmbeddingGroup = defineBuildingBlockActionGroup({
|
|
59334
|
+
id: "fontEmbedding",
|
|
59335
|
+
create: (context3, port) => buildFontEmbeddingActions({
|
|
59336
|
+
state: describeFontEmbeddingState(port.input()),
|
|
59337
|
+
refuse: () => context3.refuse("fontEmbedding"),
|
|
59338
|
+
latest: () => {
|
|
59339
|
+
const { embedFonts, canEmbed } = describeFontEmbeddingState(port.input());
|
|
59340
|
+
return { embedFonts, canEmbed };
|
|
59341
|
+
},
|
|
59342
|
+
apply: (enabled) => port.apply(enabled),
|
|
59343
|
+
markDirty: () => port.markDirty(),
|
|
59344
|
+
complete: (result) => context3.complete("fontEmbedding", result)
|
|
59345
|
+
})
|
|
59346
|
+
});
|
|
59347
|
+
var digitalSignaturesGroup = defineBuildingBlockActionGroup({
|
|
59348
|
+
id: "digitalSignatures",
|
|
59349
|
+
create: (context3, port) => buildSignatureActions({
|
|
59350
|
+
state: describeSignaturesState({ signed: port.signed(), count: port.count() }),
|
|
59351
|
+
content: () => port.content(),
|
|
59352
|
+
refuse: () => context3.refuse("digitalSignatures"),
|
|
59353
|
+
markDirty: () => port.markDirty(),
|
|
59354
|
+
complete: (result) => context3.complete("digitalSignatures", result)
|
|
59355
|
+
})
|
|
59356
|
+
});
|
|
59357
|
+
|
|
59358
|
+
// src/pptx/render/building-blocks/groups/show-dialog-groups.ts
|
|
59359
|
+
var settingsContext = (port) => ({
|
|
59360
|
+
slideCount: port.slideCount(),
|
|
59361
|
+
customShows: [...port.customShows()]
|
|
59362
|
+
});
|
|
59363
|
+
var setUpSlideShowGroup = defineBuildingBlockActionGroup({
|
|
59364
|
+
id: "setUpSlideShow",
|
|
59365
|
+
create: (context3, port) => ({
|
|
59366
|
+
current: describeSlideShowSettings(port.presentationProperties(), settingsContext(port)),
|
|
59367
|
+
apply: (patch) => {
|
|
59368
|
+
const denied = context3.refuse("setUpSlideShow");
|
|
59369
|
+
if (denied) {
|
|
59370
|
+
return denied;
|
|
59371
|
+
}
|
|
59372
|
+
const resolved2 = resolveSlideShowSettings(
|
|
59373
|
+
port.presentationProperties(),
|
|
59374
|
+
patch,
|
|
59375
|
+
settingsContext(port)
|
|
59376
|
+
);
|
|
59377
|
+
if (!resolved2.ok) {
|
|
59378
|
+
return buildingBlockFailure(resolved2.code);
|
|
59379
|
+
}
|
|
59380
|
+
port.save(resolved2.settings);
|
|
59381
|
+
return context3.complete("setUpSlideShow", BUILDING_BLOCK_OK);
|
|
59382
|
+
}
|
|
59383
|
+
})
|
|
59384
|
+
});
|
|
59385
|
+
var customShowsGroup = defineBuildingBlockActionGroup({
|
|
59386
|
+
id: "customShows",
|
|
59387
|
+
create: (context3, port) => {
|
|
59388
|
+
const edit = (change) => {
|
|
59389
|
+
const denied = context3.refuse("customShows");
|
|
59390
|
+
if (denied) {
|
|
59391
|
+
return denied;
|
|
59392
|
+
}
|
|
59393
|
+
const outcome = applyCustomShowEdit(port.customShows(), port.slides(), change);
|
|
59394
|
+
if (!outcome.ok) {
|
|
59395
|
+
return buildingBlockFailure(outcome.code);
|
|
59396
|
+
}
|
|
59397
|
+
port.commit(outcome.shows, outcome.slides);
|
|
59398
|
+
return BUILDING_BLOCK_OK;
|
|
59399
|
+
};
|
|
59400
|
+
return {
|
|
59401
|
+
...describeCustomShows(port.customShows(), port.slides()),
|
|
59402
|
+
activeId: port.activeId(),
|
|
59403
|
+
create: (name, slideRIds) => edit({ kind: "create", name, ...slideRIds ? { slideRIds } : {} }),
|
|
59404
|
+
rename: (id, name) => edit({ kind: "rename", id, name }),
|
|
59405
|
+
setSlides: (id, slideRIds) => edit({ kind: "setSlides", id, slideRIds }),
|
|
59406
|
+
copy: (id, name) => edit({ kind: "copy", id, ...name === void 0 ? {} : { name } }),
|
|
59407
|
+
remove: (id) => edit({ kind: "remove", id }),
|
|
59408
|
+
start: (id) => {
|
|
59409
|
+
if (!context3.ready()) {
|
|
59410
|
+
return buildingBlockFailure("not-ready");
|
|
59411
|
+
}
|
|
59412
|
+
const target = resolveCustomShowStart(port.customShows(), port.slides(), id);
|
|
59413
|
+
if (!target.ok) {
|
|
59414
|
+
return buildingBlockFailure(target.code);
|
|
59415
|
+
}
|
|
59416
|
+
port.start(id);
|
|
59417
|
+
return context3.complete("customShows", BUILDING_BLOCK_OK);
|
|
59418
|
+
}
|
|
59419
|
+
};
|
|
59420
|
+
}
|
|
59421
|
+
});
|
|
59422
|
+
var broadcastGroup = defineBuildingBlockActionGroup({
|
|
59423
|
+
id: "broadcast",
|
|
59424
|
+
create: (_context, _port) => describeBroadcastSupport()
|
|
59425
|
+
});
|
|
59426
|
+
var shortcutsGroup = defineBuildingBlockActionGroup({
|
|
59427
|
+
id: "shortcuts",
|
|
59428
|
+
create: (_context, port) => ({
|
|
59429
|
+
open: port.open(),
|
|
59430
|
+
setOpen: (open) => port.setOpen(open),
|
|
59431
|
+
toggle: () => port.toggle(),
|
|
59432
|
+
catalogue: describeShortcutCatalogue((key) => port.translate(key))
|
|
59433
|
+
})
|
|
59434
|
+
});
|
|
59435
|
+
|
|
59436
|
+
// src/pptx/render/building-blocks/groups/index.ts
|
|
59437
|
+
var BUILDING_BLOCK_GROUP_IDS = [
|
|
59438
|
+
"passwordProtection",
|
|
59439
|
+
"documentProperties",
|
|
59440
|
+
"fontEmbedding",
|
|
59441
|
+
"digitalSignatures",
|
|
59442
|
+
"setUpSlideShow",
|
|
59443
|
+
"customShows",
|
|
59444
|
+
"broadcast",
|
|
59445
|
+
"shortcuts"
|
|
59446
|
+
];
|
|
59447
|
+
function registerBuildingBlockGroups(session, ports) {
|
|
59448
|
+
const stops = [
|
|
59449
|
+
session.register(passwordProtectionGroup, ports.passwordProtection),
|
|
59450
|
+
session.register(documentPropertiesGroup, ports.documentProperties),
|
|
59451
|
+
session.register(fontEmbeddingGroup, ports.fontEmbedding),
|
|
59452
|
+
session.register(digitalSignaturesGroup, ports.digitalSignatures),
|
|
59453
|
+
session.register(setUpSlideShowGroup, ports.setUpSlideShow),
|
|
59454
|
+
session.register(customShowsGroup, ports.customShows),
|
|
59455
|
+
session.register(broadcastGroup, null),
|
|
59456
|
+
session.register(shortcutsGroup, ports.shortcuts)
|
|
59457
|
+
];
|
|
59458
|
+
return () => {
|
|
59459
|
+
for (const stop of stops) {
|
|
59460
|
+
stop();
|
|
59461
|
+
}
|
|
59462
|
+
};
|
|
59463
|
+
}
|
|
59464
|
+
|
|
59465
|
+
// src/pptx/render/building-blocks/hyperlink-edit-data.ts
|
|
59466
|
+
var HYPERLINK_ACTION_VERB_MAP = {
|
|
59467
|
+
"ppaction://hlinkshowjump?jump=nextslide": "nextSlide",
|
|
59468
|
+
"ppaction://hlinkshowjump?jump=previousslide": "prevSlide",
|
|
59469
|
+
"ppaction://hlinkshowjump?jump=firstslide": "firstSlide",
|
|
59470
|
+
"ppaction://hlinkshowjump?jump=lastslide": "lastSlide",
|
|
59471
|
+
"ppaction://hlinkshowjump?jump=endshow": "endShow"
|
|
59472
|
+
};
|
|
59473
|
+
var HYPERLINK_ACTION_VERB_TO_PPACTION = {
|
|
59474
|
+
nextSlide: "ppaction://hlinkshowjump?jump=nextslide",
|
|
59475
|
+
prevSlide: "ppaction://hlinkshowjump?jump=previousslide",
|
|
59476
|
+
firstSlide: "ppaction://hlinkshowjump?jump=firstslide",
|
|
59477
|
+
lastSlide: "ppaction://hlinkshowjump?jump=lastslide",
|
|
59478
|
+
endShow: "ppaction://hlinkshowjump?jump=endshow"
|
|
59479
|
+
};
|
|
59480
|
+
function detectHyperlinkTargetType(url, action) {
|
|
59481
|
+
if (action && action.startsWith("ppaction://")) {
|
|
59482
|
+
if (action.includes("hlinksldjump")) {
|
|
59483
|
+
return "slide";
|
|
59484
|
+
}
|
|
59485
|
+
return "action";
|
|
59486
|
+
}
|
|
59487
|
+
if (!url) {
|
|
59488
|
+
return "url";
|
|
59489
|
+
}
|
|
59490
|
+
if (url.startsWith("mailto:")) {
|
|
59491
|
+
return "email";
|
|
59492
|
+
}
|
|
59493
|
+
if (/^[a-zA-Z]:\\|^\.\.?[/\\]|^file:/i.test(url)) {
|
|
59494
|
+
return "file";
|
|
59495
|
+
}
|
|
59496
|
+
return "url";
|
|
59497
|
+
}
|
|
59498
|
+
function parseHyperlinkEmailUrl(url) {
|
|
59499
|
+
if (!url.startsWith("mailto:")) {
|
|
59500
|
+
return { address: url, subject: "" };
|
|
59501
|
+
}
|
|
59502
|
+
const withoutScheme = url.slice(7);
|
|
59503
|
+
const qIdx = withoutScheme.indexOf("?");
|
|
59504
|
+
if (qIdx < 0) {
|
|
59505
|
+
return { address: withoutScheme, subject: "" };
|
|
59506
|
+
}
|
|
59507
|
+
const address = withoutScheme.slice(0, qIdx);
|
|
59508
|
+
const params = new URLSearchParams(withoutScheme.slice(qIdx + 1));
|
|
59509
|
+
return { address, subject: params.get("subject") || "" };
|
|
59510
|
+
}
|
|
59511
|
+
function parseHyperlinkSlideNumber(url, action) {
|
|
59512
|
+
if (action === "ppaction://hlinksldjump" && url) {
|
|
59513
|
+
const match = url.match(/slide(\d+)\.xml$/i);
|
|
59514
|
+
if (match?.[1]) {
|
|
59515
|
+
return parseInt(match[1], 10);
|
|
59516
|
+
}
|
|
59517
|
+
}
|
|
59518
|
+
if (url) {
|
|
59519
|
+
const hashMatch = url.match(/#\s*Slide\s+(\d+)/i);
|
|
59520
|
+
if (hashMatch?.[1]) {
|
|
59521
|
+
return parseInt(hashMatch[1], 10);
|
|
59522
|
+
}
|
|
59523
|
+
}
|
|
59524
|
+
return 1;
|
|
59525
|
+
}
|
|
59526
|
+
function resolveHyperlinkEditResult(data) {
|
|
59527
|
+
const tooltip = data.tooltip.trim() || void 0;
|
|
59528
|
+
const withTooltip = (value) => tooltip === void 0 ? value : { ...value, tooltip };
|
|
59529
|
+
switch (data.targetType) {
|
|
59530
|
+
case "email": {
|
|
59531
|
+
const mailto = data.emailSubject ? `mailto:${data.emailAddress}?subject=${encodeURIComponent(data.emailSubject)}` : `mailto:${data.emailAddress}`;
|
|
59532
|
+
return withTooltip({ url: mailto });
|
|
59533
|
+
}
|
|
59534
|
+
case "slide":
|
|
59535
|
+
return withTooltip({
|
|
59536
|
+
url: `slide${data.slideNumber}.xml`,
|
|
59537
|
+
action: "ppaction://hlinksldjump"
|
|
59538
|
+
});
|
|
59539
|
+
case "file":
|
|
59540
|
+
return withTooltip({ url: data.filePath });
|
|
59541
|
+
case "action":
|
|
59542
|
+
return withTooltip({ url: "", action: HYPERLINK_ACTION_VERB_TO_PPACTION[data.actionVerb] });
|
|
59543
|
+
case "url":
|
|
59544
|
+
default:
|
|
59545
|
+
return withTooltip({ url: data.url });
|
|
59546
|
+
}
|
|
59547
|
+
}
|
|
59548
|
+
function hyperlinkEditDataFromAction(actionClick) {
|
|
59549
|
+
if (!actionClick || !actionClick.url && !actionClick.action) {
|
|
59550
|
+
return null;
|
|
59551
|
+
}
|
|
59552
|
+
const { url, action, tooltip } = actionClick;
|
|
59553
|
+
const targetType = detectHyperlinkTargetType(url, action);
|
|
59554
|
+
const email = parseHyperlinkEmailUrl(url ?? "");
|
|
59555
|
+
return {
|
|
59556
|
+
targetType,
|
|
59557
|
+
url: targetType === "url" ? url ?? "" : "",
|
|
59558
|
+
tooltip: tooltip ?? "",
|
|
59559
|
+
emailAddress: targetType === "email" ? email.address : "",
|
|
59560
|
+
emailSubject: targetType === "email" ? email.subject : "",
|
|
59561
|
+
slideNumber: parseHyperlinkSlideNumber(url, action),
|
|
59562
|
+
filePath: targetType === "file" ? url ?? "" : "",
|
|
59563
|
+
actionVerb: action && HYPERLINK_ACTION_VERB_MAP[action.toLowerCase()] || "nextSlide"
|
|
59564
|
+
};
|
|
59565
|
+
}
|
|
59566
|
+
function hyperlinkEditPatch(data) {
|
|
59567
|
+
const resolved2 = resolveHyperlinkEditResult(data);
|
|
59568
|
+
if (resolved2.url && !chunkFFWLDANS_cjs.isUrlSafe(resolved2.url)) {
|
|
59569
|
+
return { ok: false, code: "unsafe-url" };
|
|
59570
|
+
}
|
|
59571
|
+
const actionClick = {};
|
|
59572
|
+
if (resolved2.url) {
|
|
59573
|
+
actionClick.url = resolved2.url;
|
|
59574
|
+
}
|
|
59575
|
+
if (resolved2.action !== void 0) {
|
|
59576
|
+
actionClick.action = resolved2.action;
|
|
59577
|
+
}
|
|
59578
|
+
if (resolved2.tooltip !== void 0) {
|
|
59579
|
+
actionClick.tooltip = resolved2.tooltip;
|
|
59580
|
+
}
|
|
59581
|
+
return { ok: true, actionClick };
|
|
59582
|
+
}
|
|
59583
|
+
var MEDIA_AUDIO_SIZE = { width: 420, height: 64 };
|
|
59584
|
+
var MEDIA_VIDEO_MAX_SIZE = { width: 640, height: 360 };
|
|
59585
|
+
function probeVideoSize(doc, dataUrl) {
|
|
59586
|
+
const max = MEDIA_VIDEO_MAX_SIZE;
|
|
59587
|
+
return new Promise((resolve) => {
|
|
59588
|
+
const probe = doc.createElement("video");
|
|
59589
|
+
probe.preload = "metadata";
|
|
59590
|
+
probe.onloadedmetadata = () => {
|
|
59591
|
+
const width = probe.videoWidth || max.width;
|
|
59592
|
+
const height = probe.videoHeight || max.height;
|
|
59593
|
+
if (width > max.width || height > max.height) {
|
|
59594
|
+
const scale3 = Math.min(max.width / width, max.height / height);
|
|
59595
|
+
resolve({ width: Math.round(width * scale3), height: Math.round(height * scale3) });
|
|
59596
|
+
return;
|
|
59597
|
+
}
|
|
59598
|
+
resolve({ width, height });
|
|
59599
|
+
};
|
|
59600
|
+
probe.onerror = () => resolve({ width: max.width, height: max.height });
|
|
59601
|
+
probe.src = dataUrl;
|
|
59602
|
+
});
|
|
59603
|
+
}
|
|
59604
|
+
function mediaElementFromFile(file, canvasSize, doc = document) {
|
|
59605
|
+
const mediaType = classifyMediaType(file.type);
|
|
59606
|
+
if (!mediaType) {
|
|
59607
|
+
return Promise.resolve(null);
|
|
59608
|
+
}
|
|
59609
|
+
return new Promise((resolve) => {
|
|
59610
|
+
const reader = new FileReader();
|
|
59611
|
+
reader.onload = async () => {
|
|
59612
|
+
const dataUrl = typeof reader.result === "string" ? reader.result : "";
|
|
59613
|
+
if (!dataUrl) {
|
|
59614
|
+
resolve(null);
|
|
59615
|
+
return;
|
|
59616
|
+
}
|
|
59617
|
+
const size2 = mediaType === "audio" ? { ...MEDIA_AUDIO_SIZE } : await probeVideoSize(doc, dataUrl);
|
|
59618
|
+
resolve({
|
|
59619
|
+
id: pptx.createEditorId("media"),
|
|
59620
|
+
type: "media",
|
|
59621
|
+
mediaType,
|
|
59622
|
+
mediaMimeType: file.type || void 0,
|
|
59623
|
+
mediaData: dataUrl,
|
|
59624
|
+
x: Math.max(0, Math.round((canvasSize.width - size2.width) / 2)),
|
|
59625
|
+
y: Math.max(0, Math.round((canvasSize.height - size2.height) / 2)),
|
|
59626
|
+
width: size2.width,
|
|
59627
|
+
height: size2.height
|
|
59628
|
+
});
|
|
59629
|
+
};
|
|
59630
|
+
reader.onerror = () => resolve(null);
|
|
59631
|
+
reader.readAsDataURL(file);
|
|
59632
|
+
});
|
|
59633
|
+
}
|
|
59634
|
+
|
|
59635
|
+
// src/pptx/render/building-blocks/mode.ts
|
|
59636
|
+
function resolveBuildingBlockMode(mode, canEdit) {
|
|
59637
|
+
return mode === "edit" && !canEdit ? "preview" : mode;
|
|
59638
|
+
}
|
|
59639
|
+
|
|
59640
|
+
// src/pptx/render/building-blocks/requests.ts
|
|
59641
|
+
var BUILDING_BLOCK_REQUEST_ACTIONS = {
|
|
59642
|
+
image: () => "insertImage",
|
|
59643
|
+
media: () => "insertMedia",
|
|
59644
|
+
hyperlink: () => "hyperlink",
|
|
59645
|
+
smartArt: () => "insertSmartArt",
|
|
59646
|
+
chart: () => "insertChart",
|
|
59647
|
+
equation: (request) => request.existingOmml ? "editEquation" : "insertEquation",
|
|
59648
|
+
passwordProtection: () => "passwordProtection",
|
|
59649
|
+
documentProperties: () => "documentProperties",
|
|
59650
|
+
fontEmbedding: () => "fontEmbedding",
|
|
59651
|
+
digitalSignatures: () => "digitalSignatures",
|
|
59652
|
+
setUpSlideShow: () => "setUpSlideShow",
|
|
59653
|
+
customShows: () => "customShows",
|
|
59654
|
+
shortcuts: () => "shortcuts"
|
|
59655
|
+
};
|
|
59656
|
+
var BUILDING_BLOCK_VIEWABLE_REQUESTS = /* @__PURE__ */ new Set([
|
|
59657
|
+
"passwordProtection",
|
|
59658
|
+
"documentProperties",
|
|
59659
|
+
"fontEmbedding",
|
|
59660
|
+
"digitalSignatures"
|
|
59661
|
+
]);
|
|
59662
|
+
function buildingBlockRequestAction(request) {
|
|
59663
|
+
const resolve = BUILDING_BLOCK_REQUEST_ACTIONS[request.kind];
|
|
59664
|
+
return resolve(request);
|
|
59665
|
+
}
|
|
59666
|
+
function createBuildingBlockRequests(deps) {
|
|
59667
|
+
const store = chunk3RIGT7H6_cjs.createControllerStore(null);
|
|
59668
|
+
return {
|
|
59669
|
+
getSnapshot: store.getSnapshot,
|
|
59670
|
+
subscribe: store.subscribe,
|
|
59671
|
+
request(next2) {
|
|
59672
|
+
const { available, reason } = deps.state(buildingBlockRequestAction(next2));
|
|
59673
|
+
const allowed = BUILDING_BLOCK_VIEWABLE_REQUESTS.has(next2.kind) ? reason !== "not-ready" : available;
|
|
59674
|
+
if (!allowed) {
|
|
59675
|
+
return false;
|
|
59676
|
+
}
|
|
59677
|
+
store.set(next2);
|
|
59678
|
+
deps.onRequest?.(next2);
|
|
59679
|
+
return true;
|
|
59680
|
+
},
|
|
59681
|
+
complete(kind, result) {
|
|
59682
|
+
if (result.ok) {
|
|
59683
|
+
store.update((current) => current?.kind === kind ? null : current);
|
|
59684
|
+
}
|
|
59685
|
+
return result;
|
|
59686
|
+
},
|
|
59687
|
+
cancel: () => store.set(null),
|
|
59688
|
+
announce(next2, open) {
|
|
59689
|
+
if (open) {
|
|
59690
|
+
store.set(next2);
|
|
59691
|
+
} else {
|
|
59692
|
+
store.update((current) => current?.kind === next2.kind ? null : current);
|
|
59693
|
+
}
|
|
59694
|
+
deps.onRequest?.(next2);
|
|
59695
|
+
}
|
|
59696
|
+
};
|
|
59697
|
+
}
|
|
59698
|
+
|
|
59699
|
+
// src/pptx/render/building-blocks/session.ts
|
|
59700
|
+
function describeBuildingBlockAvailability(input) {
|
|
59701
|
+
return { ...describeBuildingBlockActions(input), ...describeShowDialogActions(input) };
|
|
59702
|
+
}
|
|
59703
|
+
function selectionEquation(element) {
|
|
59704
|
+
const segments = element?.textSegments;
|
|
59705
|
+
const found = segments?.find((segment) => segment.equationXml)?.equationXml;
|
|
59706
|
+
return found ? found : null;
|
|
59707
|
+
}
|
|
59708
|
+
function createPptxBuildingBlockSession(port) {
|
|
59709
|
+
const availability = () => describeBuildingBlockAvailability(port.availabilityInput());
|
|
59710
|
+
const refuse = (id) => {
|
|
59711
|
+
const { available, reason } = availability()[id];
|
|
59712
|
+
return available ? void 0 : buildingBlockFailure(reason ?? "not-ready");
|
|
59713
|
+
};
|
|
59714
|
+
const requests = createBuildingBlockRequests({
|
|
59715
|
+
state: (id) => availability()[id],
|
|
59716
|
+
onRequest: (request) => port.onRequest?.(request)
|
|
59717
|
+
});
|
|
59718
|
+
const context3 = createBuildingBlockGroupContext(
|
|
59719
|
+
requests,
|
|
59720
|
+
refuse,
|
|
59721
|
+
() => port.availabilityInput().ready
|
|
59722
|
+
);
|
|
59723
|
+
const groups = /* @__PURE__ */ new Map();
|
|
59724
|
+
const gated = (id, kind, run2) => {
|
|
59725
|
+
const denied = refuse(id);
|
|
59726
|
+
if (denied) {
|
|
59727
|
+
return denied;
|
|
59728
|
+
}
|
|
59729
|
+
run2();
|
|
59730
|
+
return requests.complete(kind, BUILDING_BLOCK_OK);
|
|
59731
|
+
};
|
|
59732
|
+
const insertImage = async (file) => {
|
|
59733
|
+
const denied = refuse("insertImage");
|
|
59734
|
+
if (denied) {
|
|
59735
|
+
return denied;
|
|
59736
|
+
}
|
|
59737
|
+
const checked = validateHostImageFile(file, port.fileLimits()?.imageBytes);
|
|
59738
|
+
if (!checked.ok) {
|
|
59739
|
+
return checked;
|
|
59740
|
+
}
|
|
59741
|
+
const before = port.target();
|
|
59742
|
+
const decode = port.decodeImage ?? chunkZJFN5POF_cjs.createImageElementFromFile;
|
|
59743
|
+
const element = await decode(file, port.canvasSize());
|
|
59744
|
+
if (!element) {
|
|
59745
|
+
return buildingBlockFailure("decode-failed");
|
|
59746
|
+
}
|
|
59747
|
+
const now = port.target();
|
|
59748
|
+
if (now.deck !== before.deck || now.slideId !== before.slideId) {
|
|
59749
|
+
return buildingBlockFailure("stale-target");
|
|
59750
|
+
}
|
|
59751
|
+
const stillDenied = refuse("insertImage");
|
|
59752
|
+
if (stillDenied) {
|
|
59753
|
+
return stillDenied;
|
|
59754
|
+
}
|
|
59755
|
+
port.addElement(element);
|
|
59756
|
+
return requests.complete("image", BUILDING_BLOCK_OK);
|
|
59757
|
+
};
|
|
59758
|
+
const insertMedia = async (file) => {
|
|
59759
|
+
const denied = refuse("insertMedia");
|
|
59760
|
+
if (denied) {
|
|
59761
|
+
return denied;
|
|
59762
|
+
}
|
|
59763
|
+
const checked = validateHostMediaFile(file, port.fileLimits()?.mediaBytes);
|
|
59764
|
+
if (!checked.ok) {
|
|
59765
|
+
return checked;
|
|
59766
|
+
}
|
|
59767
|
+
const before = port.target();
|
|
59768
|
+
const sameTarget = () => {
|
|
59769
|
+
const now = port.target();
|
|
59770
|
+
return now.deck === before.deck && now.slideId === before.slideId && now.slideIndex === before.slideIndex && availability().insertMedia.available;
|
|
59771
|
+
};
|
|
59772
|
+
return requests.complete("media", await port.insertMediaFile(file, sameTarget));
|
|
59773
|
+
};
|
|
59774
|
+
const layoutActions = () => buildLayoutActions({
|
|
59775
|
+
activeSlide: port.activeSlide(),
|
|
59776
|
+
scopedLayouts: port.scopedLayouts(),
|
|
59777
|
+
getScopedLayouts: () => port.scopedLayouts(),
|
|
59778
|
+
getActiveSlide: () => port.activeSlide(),
|
|
59779
|
+
refuse: (id) => refuse(id),
|
|
59780
|
+
applyLayout: (path) => port.applyLayout(path)
|
|
59781
|
+
});
|
|
59782
|
+
const hyperlinkApply = (data) => {
|
|
59783
|
+
const denied = refuse("hyperlink");
|
|
59784
|
+
if (denied) {
|
|
59785
|
+
return denied;
|
|
59786
|
+
}
|
|
59787
|
+
const resolved2 = resolveHyperlinkEditResult(data);
|
|
59788
|
+
if (!resolved2.url && !resolved2.action) {
|
|
59789
|
+
return buildingBlockFailure("invalid-target");
|
|
59790
|
+
}
|
|
59791
|
+
return requests.complete("hyperlink", port.applyHyperlink(data));
|
|
59792
|
+
};
|
|
59793
|
+
const hyperlinkRemove = () => refuse("removeHyperlink") ?? port.removeHyperlink();
|
|
59794
|
+
const smartArtInsert = (layout, items) => gated("insertSmartArt", "smartArt", () => port.insertSmartArt(layout, items));
|
|
59795
|
+
const chartInsert = (kind, options) => {
|
|
59796
|
+
if (options?.data !== void 0 && !isValidInsertChartData(options.data)) {
|
|
59797
|
+
return refuse("insertChart") ?? buildingBlockFailure("invalid-data");
|
|
59798
|
+
}
|
|
59799
|
+
return gated("insertChart", "chart", () => port.insertChart(kind, options));
|
|
59800
|
+
};
|
|
59801
|
+
const equationInsert = (omml) => gated("insertEquation", "equation", () => port.insertEquation(omml));
|
|
59802
|
+
const equationUpdate = (omml) => gated("editEquation", "equation", () => port.updateEquation(omml));
|
|
59803
|
+
const cancel = () => {
|
|
59804
|
+
requests.cancel();
|
|
59805
|
+
port.onCancel?.();
|
|
59806
|
+
};
|
|
59807
|
+
return {
|
|
59808
|
+
requests,
|
|
59809
|
+
context: context3,
|
|
59810
|
+
request: (next2) => requests.request(next2),
|
|
59811
|
+
announce: (next2, open) => requests.announce(next2, open),
|
|
59812
|
+
applyLayout: (path) => layoutActions().apply(path, true),
|
|
59813
|
+
resetSlide: () => layoutActions().reset(),
|
|
59814
|
+
register(group, groupPort) {
|
|
59815
|
+
const create = () => group.create(context3, groupPort);
|
|
59816
|
+
groups.set(group.id, create);
|
|
59817
|
+
return () => {
|
|
59818
|
+
if (groups.get(group.id) === create) {
|
|
59819
|
+
groups.delete(group.id);
|
|
59820
|
+
}
|
|
59821
|
+
};
|
|
59822
|
+
},
|
|
59823
|
+
actions() {
|
|
59824
|
+
const selected = port.selectedElement();
|
|
59825
|
+
const extensions = {};
|
|
59826
|
+
for (const [id, create] of groups) {
|
|
59827
|
+
Reflect.set(extensions, id, create());
|
|
59828
|
+
}
|
|
59829
|
+
return {
|
|
59830
|
+
...extensions,
|
|
59831
|
+
availability: availability(),
|
|
59832
|
+
unmountedDialogActions: BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS,
|
|
59833
|
+
pending: requests.getSnapshot(),
|
|
59834
|
+
cancel,
|
|
59835
|
+
insertImage,
|
|
59836
|
+
insertMedia,
|
|
59837
|
+
hyperlink: {
|
|
59838
|
+
current: hyperlinkEditDataFromAction(selected?.actionClick),
|
|
59839
|
+
slideCount: port.slideCount(),
|
|
59840
|
+
apply: hyperlinkApply,
|
|
59841
|
+
remove: hyperlinkRemove
|
|
59842
|
+
},
|
|
59843
|
+
smartArt: { insert: smartArtInsert },
|
|
59844
|
+
chart: { insert: chartInsert },
|
|
59845
|
+
equation: {
|
|
59846
|
+
current: selectionEquation(selected),
|
|
59847
|
+
insert: equationInsert,
|
|
59848
|
+
update: equationUpdate
|
|
59849
|
+
},
|
|
59850
|
+
findReplace: buildFindReplaceActions(port.findReplace(), () => refuse("replace")),
|
|
59851
|
+
layout: layoutActions().layout
|
|
59852
|
+
};
|
|
59853
|
+
}
|
|
59854
|
+
};
|
|
59855
|
+
}
|
|
59856
|
+
|
|
59857
|
+
// src/pptx/render/building-blocks/toolbar.ts
|
|
59858
|
+
var LABELS = {
|
|
59859
|
+
undo: "pptx.toolbar.undo",
|
|
59860
|
+
redo: "pptx.toolbar.redo",
|
|
59861
|
+
insertImage: "pptx.insert.pictures",
|
|
59862
|
+
insertMedia: "pptx.ribbon.media",
|
|
59863
|
+
insertChart: "pptx.ribbon.chart",
|
|
59864
|
+
insertSmartArt: "pptx.ribbon.smartArt",
|
|
59865
|
+
insertEquation: "pptx.ribbon.equation",
|
|
59866
|
+
hyperlink: "pptx.ribbon.link",
|
|
59867
|
+
find: "pptx.toolbar.findAndReplace",
|
|
59868
|
+
resetLayout: "pptx.ribbon.groupReset",
|
|
59869
|
+
zoomOut: "pptx.statusBar.zoomOut",
|
|
59870
|
+
zoomIn: "pptx.statusBar.zoomIn",
|
|
59871
|
+
zoomToFit: "pptx.statusBar.zoomToFit",
|
|
59872
|
+
previousSlide: "pptx.mobileBar.previousSlide",
|
|
59873
|
+
nextSlide: "pptx.mobileBar.nextSlide"
|
|
59874
|
+
};
|
|
59875
|
+
var HIDDEN_BY = {
|
|
59876
|
+
undo: "undo",
|
|
59877
|
+
redo: "redo",
|
|
59878
|
+
insertImage: "insert",
|
|
59879
|
+
insertMedia: "insert",
|
|
59880
|
+
insertChart: "insert",
|
|
59881
|
+
insertSmartArt: "insert",
|
|
59882
|
+
insertEquation: "insert",
|
|
59883
|
+
hyperlink: "insert",
|
|
59884
|
+
zoomOut: "zoom",
|
|
59885
|
+
zoomIn: "zoom",
|
|
59886
|
+
zoomToFit: "zoom",
|
|
59887
|
+
previousSlide: "navigation",
|
|
59888
|
+
nextSlide: "navigation"
|
|
59889
|
+
};
|
|
59890
|
+
function describeBuildingBlockToolbar(input) {
|
|
59891
|
+
const hidden = new Set(input.hiddenActions ?? []);
|
|
59892
|
+
const control4 = (id, disabled, pressed) => {
|
|
59893
|
+
const by = HIDDEN_BY[id];
|
|
59894
|
+
if (by !== void 0 && hidden.has(by)) {
|
|
59895
|
+
return void 0;
|
|
59896
|
+
}
|
|
59897
|
+
const base2 = { id, labelKey: LABELS[id], disabled };
|
|
59898
|
+
return pressed === void 0 ? base2 : { ...base2, pressed };
|
|
59899
|
+
};
|
|
59900
|
+
const action = (id) => control4(id, !input.availability[id].available);
|
|
59901
|
+
const groups = [
|
|
59902
|
+
["history", [control4("undo", !input.canUndo), control4("redo", !input.canRedo)]],
|
|
59903
|
+
[
|
|
59904
|
+
"insert",
|
|
59905
|
+
[
|
|
59906
|
+
action("insertImage"),
|
|
59907
|
+
action("insertMedia"),
|
|
59908
|
+
action("insertChart"),
|
|
59909
|
+
action("insertSmartArt"),
|
|
59910
|
+
action("insertEquation"),
|
|
59911
|
+
action("hyperlink")
|
|
59912
|
+
]
|
|
59913
|
+
],
|
|
59914
|
+
["editing", [control4("find", false, input.findOpen), action("resetLayout")]],
|
|
59915
|
+
["view", [control4("zoomOut", false), control4("zoomIn", false), control4("zoomToFit", false)]],
|
|
59916
|
+
[
|
|
59917
|
+
"navigation",
|
|
59918
|
+
[
|
|
59919
|
+
control4("previousSlide", input.slideIndex <= 0),
|
|
59920
|
+
control4("nextSlide", input.slideIndex >= input.slideCount - 1)
|
|
59921
|
+
]
|
|
59922
|
+
]
|
|
59923
|
+
];
|
|
59924
|
+
return groups.map(([id, controls2]) => ({
|
|
59925
|
+
id,
|
|
59926
|
+
controls: controls2.filter((entry6) => !!entry6)
|
|
59927
|
+
})).filter((group) => group.controls.length > 0);
|
|
59928
|
+
}
|
|
59929
|
+
function runBuildingBlockToolbarControl(id, session, view2) {
|
|
59930
|
+
switch (id) {
|
|
59931
|
+
case "insertImage":
|
|
59932
|
+
session.request({ kind: "image" });
|
|
59933
|
+
return;
|
|
59934
|
+
case "insertMedia":
|
|
59935
|
+
session.request({ kind: "media" });
|
|
59936
|
+
return;
|
|
59937
|
+
case "insertChart":
|
|
59938
|
+
session.request({ kind: "chart" });
|
|
59939
|
+
return;
|
|
59940
|
+
case "insertSmartArt":
|
|
59941
|
+
session.request({ kind: "smartArt" });
|
|
59942
|
+
return;
|
|
59943
|
+
case "insertEquation":
|
|
59944
|
+
session.request({ kind: "equation", existingOmml: null });
|
|
59945
|
+
return;
|
|
59946
|
+
case "hyperlink":
|
|
59947
|
+
session.request({ kind: "hyperlink" });
|
|
59948
|
+
return;
|
|
59949
|
+
case "resetLayout":
|
|
59950
|
+
void session.resetSlide();
|
|
59951
|
+
return;
|
|
59952
|
+
case "find":
|
|
59953
|
+
view2.toggleFind();
|
|
59954
|
+
return;
|
|
59955
|
+
default:
|
|
59956
|
+
view2[id]();
|
|
59957
|
+
}
|
|
59958
|
+
}
|
|
59959
|
+
|
|
59960
|
+
// src/pptx/render/template-background-rows.ts
|
|
59961
|
+
function resolveTemplateBackgroundRows(activeSlide, slideMasters, fallbackLayoutLabel, fallbackMasterLabel) {
|
|
59962
|
+
const result = {};
|
|
59963
|
+
if (activeSlide.layoutPath) {
|
|
59964
|
+
result.layout = {
|
|
59965
|
+
path: activeSlide.layoutPath,
|
|
59966
|
+
label: activeSlide.layoutName ?? fallbackLayoutLabel,
|
|
59967
|
+
title: activeSlide.layoutName ?? activeSlide.layoutPath
|
|
59968
|
+
};
|
|
59969
|
+
}
|
|
59970
|
+
const master = slideMasters?.find((m) => m.layoutPaths?.includes(activeSlide.layoutPath ?? ""));
|
|
59971
|
+
if (master) {
|
|
59972
|
+
result.master = {
|
|
59973
|
+
path: master.path,
|
|
59974
|
+
label: master.name ?? fallbackMasterLabel,
|
|
59975
|
+
title: master.name ?? master.path
|
|
59976
|
+
};
|
|
59977
|
+
}
|
|
59978
|
+
return result;
|
|
59979
|
+
}
|
|
59980
|
+
|
|
59981
|
+
// src/pptx/render/transition-template-elements.ts
|
|
59982
|
+
function transitionTemplateElements(outgoingSlide, incomingSlide, templateElementsBySlideId) {
|
|
59983
|
+
const of = (slide) => slide ? [...templateEditing.visibleTemplateElements(slide, templateElementsBySlideId[slide.id] ?? [])] : [];
|
|
59984
|
+
return { outgoing: of(outgoingSlide), incoming: of(incomingSlide) };
|
|
59985
|
+
}
|
|
59986
|
+
|
|
59987
|
+
// src/pptx/render/preview-elements.ts
|
|
59988
|
+
var DEFAULT_PREVIEW_ELEMENT_CAP = 500;
|
|
59989
|
+
function buildPreviewElements(slide, templateElements = [], options) {
|
|
59990
|
+
const cap = options?.cap ?? DEFAULT_PREVIEW_ELEMENT_CAP;
|
|
59991
|
+
const merged = [...templateEditing.visibleTemplateElements(slide, templateElements), ...slide.elements];
|
|
59992
|
+
if (cap > 0 && merged.length > cap) {
|
|
59993
|
+
return merged.slice(0, cap);
|
|
59994
|
+
}
|
|
59995
|
+
return merged;
|
|
59996
|
+
}
|
|
59997
|
+
var SMARTART_PREVIEW_ELEMENT_WIDTH = 600;
|
|
59998
|
+
var SMARTART_PREVIEW_ELEMENT_HEIGHT = 340;
|
|
59999
|
+
var SMARTART_PREVIEW_FALLBACK_ITEMS = ["1", "2", "3"];
|
|
60000
|
+
function buildSmartArtPreviewElement(layout, defaultItems) {
|
|
60001
|
+
const preset2 = PRESETS.find((p) => p.layout === layout);
|
|
60002
|
+
const items = [...defaultItems ?? preset2?.defaultItems ?? SMARTART_PREVIEW_FALLBACK_ITEMS];
|
|
60003
|
+
return {
|
|
60004
|
+
id: `smartart-preview-${layout}`,
|
|
60005
|
+
type: "smartArt",
|
|
60006
|
+
x: 0,
|
|
60007
|
+
y: 0,
|
|
60008
|
+
width: SMARTART_PREVIEW_ELEMENT_WIDTH,
|
|
60009
|
+
height: SMARTART_PREVIEW_ELEMENT_HEIGHT,
|
|
60010
|
+
smartArtData: buildSmartArtPresetData(layout, items)
|
|
60011
|
+
};
|
|
60012
|
+
}
|
|
60013
|
+
|
|
60014
|
+
// src/pptx/render/shape-preset-catalog.ts
|
|
60015
|
+
var SHAPE_PRESET_DEFS = [
|
|
60016
|
+
{
|
|
60017
|
+
type: "rect",
|
|
60018
|
+
label: "Rectangle",
|
|
60019
|
+
i18nKey: "pptx.editorToolbar.shapeRectangle",
|
|
60020
|
+
glyph: "square",
|
|
60021
|
+
glyphClass: ""
|
|
60022
|
+
},
|
|
60023
|
+
{
|
|
60024
|
+
type: "roundRect",
|
|
60025
|
+
label: "Rounded",
|
|
60026
|
+
i18nKey: "pptx.shapePresets.rounded",
|
|
60027
|
+
glyph: "square",
|
|
60028
|
+
glyphClass: ""
|
|
60029
|
+
},
|
|
60030
|
+
{
|
|
60031
|
+
type: "ellipse",
|
|
60032
|
+
label: "Circle",
|
|
60033
|
+
i18nKey: "pptx.shapePresets.circle",
|
|
60034
|
+
glyph: "circle",
|
|
60035
|
+
glyphClass: ""
|
|
60036
|
+
},
|
|
60037
|
+
{
|
|
60038
|
+
type: "cylinder",
|
|
60039
|
+
label: "Cylinder",
|
|
60040
|
+
i18nKey: "pptx.shapePresets.cylinder",
|
|
60041
|
+
glyph: "database",
|
|
60042
|
+
glyphClass: ""
|
|
60043
|
+
},
|
|
60044
|
+
{
|
|
60045
|
+
type: "rtArrow",
|
|
60046
|
+
label: "Right Arrow",
|
|
60047
|
+
i18nKey: "pptx.shapePresets.rightArrow",
|
|
60048
|
+
glyph: "moveRight",
|
|
60049
|
+
glyphClass: ""
|
|
60050
|
+
},
|
|
57815
60051
|
{
|
|
57816
60052
|
type: "leftArrow",
|
|
57817
60053
|
label: "Left Arrow",
|
|
@@ -58741,35 +60977,6 @@ function homeRow(item4, sectionId, groupKey, group) {
|
|
|
58741
60977
|
};
|
|
58742
60978
|
}
|
|
58743
60979
|
var homeShapeValue = (value) => value.replace(/^recent:/u, "");
|
|
58744
|
-
|
|
58745
|
-
// src/pptx/render/font-embedding.ts
|
|
58746
|
-
var FONT_EMBEDDING_UNAVAILABLE_KEY = "pptx.fonts.embedUnavailable";
|
|
58747
|
-
function describeFontEmbedding(embeddedFamilies) {
|
|
58748
|
-
const seen = /* @__PURE__ */ new Set();
|
|
58749
|
-
const families = [];
|
|
58750
|
-
for (const raw of embeddedFamilies ?? []) {
|
|
58751
|
-
const family2 = raw?.trim();
|
|
58752
|
-
if (!family2) {
|
|
58753
|
-
continue;
|
|
58754
|
-
}
|
|
58755
|
-
const key = family2.toLowerCase();
|
|
58756
|
-
if (seen.has(key)) {
|
|
58757
|
-
continue;
|
|
58758
|
-
}
|
|
58759
|
-
seen.add(key);
|
|
58760
|
-
families.push(family2);
|
|
58761
|
-
}
|
|
58762
|
-
const hasAny = families.length > 0;
|
|
58763
|
-
return {
|
|
58764
|
-
embeddedFamilies: families,
|
|
58765
|
-
interactive: hasAny,
|
|
58766
|
-
initialEnabled: hasAny,
|
|
58767
|
-
...hasAny ? {} : { disabledReasonKey: FONT_EMBEDDING_UNAVAILABLE_KEY }
|
|
58768
|
-
};
|
|
58769
|
-
}
|
|
58770
|
-
function embeddedFontSaveOptions(embedFonts) {
|
|
58771
|
-
return embedFonts ? { embedTrueTypeFonts: true } : { embeddedFontList: null, embedTrueTypeFonts: false };
|
|
58772
|
-
}
|
|
58773
60980
|
var OFFICE_COLOR_SWATCHES = [
|
|
58774
60981
|
{ hex: "#000000", label: "Black", labelKey: "pptx.colorPicker.standard.black" },
|
|
58775
60982
|
{ hex: "#ffffff", label: "White", labelKey: "pptx.colorPicker.standard.white" },
|
|
@@ -60784,42 +62991,6 @@ async function scanAvailableFontFamilies(families, source = browserFontSource())
|
|
|
60784
62991
|
}
|
|
60785
62992
|
}
|
|
60786
62993
|
|
|
60787
|
-
// src/pptx/render/password-protection.ts
|
|
60788
|
-
function getPasswordStrength(password) {
|
|
60789
|
-
if (!password) {
|
|
60790
|
-
return 0;
|
|
60791
|
-
}
|
|
60792
|
-
let score2 = 0;
|
|
60793
|
-
if (password.length >= 8) {
|
|
60794
|
-
score2 += 1;
|
|
60795
|
-
}
|
|
60796
|
-
if (password.length >= 12) {
|
|
60797
|
-
score2 += 1;
|
|
60798
|
-
}
|
|
60799
|
-
if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
|
|
60800
|
-
score2 += 1;
|
|
60801
|
-
}
|
|
60802
|
-
if (/\d/u.test(password)) {
|
|
60803
|
-
score2 += 1;
|
|
60804
|
-
}
|
|
60805
|
-
if (/[^A-Za-z0-9]/u.test(password)) {
|
|
60806
|
-
score2 += 1;
|
|
60807
|
-
}
|
|
60808
|
-
return Math.min(score2, 4);
|
|
60809
|
-
}
|
|
60810
|
-
function validatePasswordPair(password, confirmation) {
|
|
60811
|
-
if (!password) {
|
|
60812
|
-
return "required";
|
|
60813
|
-
}
|
|
60814
|
-
if (password !== confirmation) {
|
|
60815
|
-
return "mismatch";
|
|
60816
|
-
}
|
|
60817
|
-
if (password.length < 4) {
|
|
60818
|
-
return "tooShort";
|
|
60819
|
-
}
|
|
60820
|
-
return null;
|
|
60821
|
-
}
|
|
60822
|
-
|
|
60823
62994
|
// src/pptx/render/theme-write-queue.ts
|
|
60824
62995
|
var pendingWrites = /* @__PURE__ */ new WeakMap();
|
|
60825
62996
|
function startWrite(write) {
|
|
@@ -61033,129 +63204,6 @@ function buildDeckSaveOptions(state) {
|
|
|
61033
63204
|
};
|
|
61034
63205
|
}
|
|
61035
63206
|
|
|
61036
|
-
// src/pptx/render/viewer-preferences.ts
|
|
61037
|
-
var DEFAULT_VIEWER_PREFERENCES = {
|
|
61038
|
-
autoSave: true,
|
|
61039
|
-
spellCheck: false,
|
|
61040
|
-
showGrid: false,
|
|
61041
|
-
showRulers: false,
|
|
61042
|
-
snapToGrid: false,
|
|
61043
|
-
reducedMotion: false
|
|
61044
|
-
};
|
|
61045
|
-
var DEFAULT_VIEWER_SETTINGS = DEFAULT_VIEWER_PREFERENCES;
|
|
61046
|
-
var VIEWER_SHORTCUT_REFERENCE = [
|
|
61047
|
-
{ actionKey: "pptx.toolbar.undo", shortcut: "Ctrl/Cmd+Z", group: "history" },
|
|
61048
|
-
{
|
|
61049
|
-
actionKey: "pptx.toolbar.redo",
|
|
61050
|
-
shortcut: "Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y",
|
|
61051
|
-
group: "history"
|
|
61052
|
-
},
|
|
61053
|
-
{ actionKey: "pptx.shortcuts.action.copyElement", shortcut: "Ctrl/Cmd+C", group: "clipboard" },
|
|
61054
|
-
{ actionKey: "pptx.shortcuts.action.cutElement", shortcut: "Ctrl/Cmd+X", group: "clipboard" },
|
|
61055
|
-
{ actionKey: "pptx.shortcuts.action.pasteElement", shortcut: "Ctrl/Cmd+V", group: "clipboard" },
|
|
61056
|
-
{
|
|
61057
|
-
actionKey: "pptx.shortcuts.action.duplicateElement",
|
|
61058
|
-
shortcut: "Ctrl/Cmd+D",
|
|
61059
|
-
group: "editing"
|
|
61060
|
-
},
|
|
61061
|
-
{
|
|
61062
|
-
actionKey: "pptx.shortcuts.action.deleteElement",
|
|
61063
|
-
shortcut: "Delete / Backspace",
|
|
61064
|
-
group: "editing"
|
|
61065
|
-
},
|
|
61066
|
-
{ actionKey: "pptx.shortcuts.action.selectAll", shortcut: "Ctrl/Cmd+A", group: "editing" },
|
|
61067
|
-
{ actionKey: "pptx.ribbon.group", shortcut: "Ctrl/Cmd+G", group: "editing" },
|
|
61068
|
-
{ actionKey: "pptx.ribbon.ungroup", shortcut: "Ctrl/Cmd+Shift+G", group: "editing" },
|
|
61069
|
-
{ actionKey: "pptx.shortcuts.action.nudgeElement", shortcut: "Arrow keys", group: "editing" },
|
|
61070
|
-
{
|
|
61071
|
-
actionKey: "pptx.shortcuts.action.nudgeElementLarge",
|
|
61072
|
-
shortcut: "Shift+Arrow keys",
|
|
61073
|
-
group: "editing"
|
|
61074
|
-
},
|
|
61075
|
-
{
|
|
61076
|
-
actionKey: "pptx.shortcuts.action.prevSlide",
|
|
61077
|
-
shortcut: "Left or Up arrow, Page Up",
|
|
61078
|
-
group: "navigation"
|
|
61079
|
-
},
|
|
61080
|
-
{
|
|
61081
|
-
actionKey: "pptx.shortcuts.action.nextSlide",
|
|
61082
|
-
shortcut: "Right or Down arrow, Page Down",
|
|
61083
|
-
group: "navigation"
|
|
61084
|
-
},
|
|
61085
|
-
{
|
|
61086
|
-
actionKey: "pptx.shortcuts.action.zoomCanvas",
|
|
61087
|
-
shortcut: "Ctrl/Cmd+Mouse wheel",
|
|
61088
|
-
group: "navigation"
|
|
61089
|
-
},
|
|
61090
|
-
{
|
|
61091
|
-
actionKey: "pptx.shortcuts.action.commitTextEdit",
|
|
61092
|
-
shortcut: "Ctrl/Cmd+Enter",
|
|
61093
|
-
group: "editing"
|
|
61094
|
-
},
|
|
61095
|
-
{ actionKey: "pptx.shortcuts.action.cancelTextEdit", shortcut: "Escape", group: "editing" },
|
|
61096
|
-
// Both of these reached the shared keymap late (Ctrl+F was hand-wired in two
|
|
61097
|
-
// bindings, Ctrl+/ in one), so the panel that is supposed to teach the keymap
|
|
61098
|
-
// was advertising neither. The help panel is the keymap's documentation: a
|
|
61099
|
-
// chord missing here is a chord nobody discovers.
|
|
61100
|
-
{ actionKey: "pptx.findReplace.title", shortcut: "Ctrl/Cmd+F", group: "general" },
|
|
61101
|
-
{ actionKey: "pptx.slideShow.fromBeginning", shortcut: "F5", group: "general" },
|
|
61102
|
-
{ actionKey: "pptx.slideShow.fromCurrent", shortcut: "Shift+F5", group: "general" },
|
|
61103
|
-
{ actionKey: "pptx.shortcuts.title", shortcut: "? or Ctrl/Cmd+/", group: "general" }
|
|
61104
|
-
];
|
|
61105
|
-
var SHORTCUT_REFERENCE_GROUP_LABEL_KEYS = {
|
|
61106
|
-
history: "pptx.editorToolbar.history",
|
|
61107
|
-
clipboard: "pptx.ribbon.clipboard",
|
|
61108
|
-
editing: "pptx.shortcuts.group.editing",
|
|
61109
|
-
navigation: "pptx.shortcuts.group.navigation",
|
|
61110
|
-
general: "pptx.settings.general"
|
|
61111
|
-
};
|
|
61112
|
-
function groupShortcutReference(items = VIEWER_SHORTCUT_REFERENCE) {
|
|
61113
|
-
const order = Object.keys(SHORTCUT_REFERENCE_GROUP_LABEL_KEYS);
|
|
61114
|
-
return order.map((group) => ({
|
|
61115
|
-
group,
|
|
61116
|
-
labelKey: SHORTCUT_REFERENCE_GROUP_LABEL_KEYS[group],
|
|
61117
|
-
shortcuts: items.filter((item4) => item4.group === group)
|
|
61118
|
-
})).filter((bucket) => bucket.shortcuts.length > 0);
|
|
61119
|
-
}
|
|
61120
|
-
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
61121
|
-
var VIEWER_PREFERENCE_TOGGLES = [
|
|
61122
|
-
{ key: "autoSave", labelKey: "pptx.settings.autoSave" },
|
|
61123
|
-
{ key: "spellCheck", labelKey: "pptx.settings.spellCheck" },
|
|
61124
|
-
{ key: "showGrid", labelKey: "pptx.settings.showGrid" },
|
|
61125
|
-
{ key: "showRulers", labelKey: "pptx.settings.showRulers" },
|
|
61126
|
-
{ key: "snapToGrid", labelKey: "pptx.settings.snapToGrid" },
|
|
61127
|
-
{ key: "reducedMotion", labelKey: "pptx.settings.reducedMotion" }
|
|
61128
|
-
];
|
|
61129
|
-
var SETTING_TOGGLES = VIEWER_PREFERENCE_TOGGLES;
|
|
61130
|
-
function updateViewerPreference(preferences, key, value) {
|
|
61131
|
-
return { ...preferences, [key]: value };
|
|
61132
|
-
}
|
|
61133
|
-
function viewerPreferencesFromViewProperties(data, defaults) {
|
|
61134
|
-
const slideViewPr = data.viewProperties?.slideViewPr;
|
|
61135
|
-
const gridSpacing = data.viewProperties?.gridSpacing;
|
|
61136
|
-
return {
|
|
61137
|
-
...defaults,
|
|
61138
|
-
snapToGrid: slideViewPr?.snapToGrid ?? defaults.snapToGrid,
|
|
61139
|
-
snapToObjects: slideViewPr?.snapToObjects ?? defaults.snapToObjects,
|
|
61140
|
-
showGuides: slideViewPr?.showGuides ?? defaults.showGuides,
|
|
61141
|
-
gridSpacingCx: gridSpacing?.cx ?? defaults.gridSpacingCx,
|
|
61142
|
-
gridSpacingCy: gridSpacing?.cy ?? defaults.gridSpacingCy
|
|
61143
|
-
};
|
|
61144
|
-
}
|
|
61145
|
-
function viewPropertiesPatchFromPreferences(preferences) {
|
|
61146
|
-
const patch = {
|
|
61147
|
-
slideViewPr: {
|
|
61148
|
-
snapToGrid: preferences.snapToGrid,
|
|
61149
|
-
snapToObjects: preferences.snapToObjects ?? false,
|
|
61150
|
-
showGuides: preferences.showGuides ?? false
|
|
61151
|
-
}
|
|
61152
|
-
};
|
|
61153
|
-
if (typeof preferences.gridSpacingCx === "number" && typeof preferences.gridSpacingCy === "number") {
|
|
61154
|
-
patch.gridSpacing = { cx: preferences.gridSpacingCx, cy: preferences.gridSpacingCy };
|
|
61155
|
-
}
|
|
61156
|
-
return patch;
|
|
61157
|
-
}
|
|
61158
|
-
|
|
61159
63207
|
// src/pptx/render/presentation-ole-verb.ts
|
|
61160
63208
|
var SHOW_VERBS = /* @__PURE__ */ new Set([1, -2]);
|
|
61161
63209
|
function resolveOleVerbTarget(slide, elementId, verb) {
|
|
@@ -72526,53 +74574,6 @@ function placeholderPromptDescriptor(element, mode) {
|
|
|
72526
74574
|
}
|
|
72527
74575
|
return { text: promptText, style: PLACEHOLDER_PROMPT_STYLE };
|
|
72528
74576
|
}
|
|
72529
|
-
var NOT_RECOMMENDED = {
|
|
72530
|
-
kind: null,
|
|
72531
|
-
messageKey: "",
|
|
72532
|
-
defaultReadOnly: false,
|
|
72533
|
-
requiresPassword: false
|
|
72534
|
-
};
|
|
72535
|
-
var MARK_AS_FINAL_PROPERTY_NAME = "_MarkAsFinal";
|
|
72536
|
-
function isTruthyCustomPropertyValue(value) {
|
|
72537
|
-
const normalized = value.trim().toLowerCase();
|
|
72538
|
-
return normalized === "true" || normalized === "1" || normalized === "yes";
|
|
72539
|
-
}
|
|
72540
|
-
function isMarkedAsFinal(customProperties) {
|
|
72541
|
-
if (!customProperties) {
|
|
72542
|
-
return false;
|
|
72543
|
-
}
|
|
72544
|
-
return customProperties.some(
|
|
72545
|
-
(property) => property.name === MARK_AS_FINAL_PROPERTY_NAME && isTruthyCustomPropertyValue(property.value)
|
|
72546
|
-
);
|
|
72547
|
-
}
|
|
72548
|
-
function readOnlyRecommendation(data) {
|
|
72549
|
-
if (!data) {
|
|
72550
|
-
return NOT_RECOMMENDED;
|
|
72551
|
-
}
|
|
72552
|
-
const verifier = data.modifyVerifier;
|
|
72553
|
-
if (verifier && (verifier.hashData || verifier.algorithmName)) {
|
|
72554
|
-
return {
|
|
72555
|
-
kind: "modifyVerifier",
|
|
72556
|
-
messageKey: "pptx.readOnly.modifyVerifierRecommended",
|
|
72557
|
-
defaultReadOnly: true,
|
|
72558
|
-
// A hash this viewer can actually check requires the password before
|
|
72559
|
-
// "Edit anyway" can lift the lock; `saltData` is deliberately NOT part
|
|
72560
|
-
// of this check (see the field doc comment above): only a missing hash
|
|
72561
|
-
// or an unrecognised algorithm falls back to the plain "Edit anyway"
|
|
72562
|
-
// every other recommendation already has.
|
|
72563
|
-
requiresPassword: Boolean(verifier.hashData && pptx.resolveModifyVerifierAlgorithmName(verifier))
|
|
72564
|
-
};
|
|
72565
|
-
}
|
|
72566
|
-
if (isMarkedAsFinal(data.customProperties)) {
|
|
72567
|
-
return {
|
|
72568
|
-
kind: "markedFinal",
|
|
72569
|
-
messageKey: "pptx.readOnly.markedFinal",
|
|
72570
|
-
defaultReadOnly: true,
|
|
72571
|
-
requiresPassword: false
|
|
72572
|
-
};
|
|
72573
|
-
}
|
|
72574
|
-
return NOT_RECOMMENDED;
|
|
72575
|
-
}
|
|
72576
74577
|
async function checkModifyPassword(verifier, password) {
|
|
72577
74578
|
if (!verifier?.hashData || !pptx.resolveModifyVerifierAlgorithmName(verifier)) {
|
|
72578
74579
|
return { ok: false, reason: "unsupported-algorithm" };
|
|
@@ -74173,7 +76174,7 @@ var EDIT_POINTS_COMMAND_IDS = [
|
|
|
74173
76174
|
"curved-segment",
|
|
74174
76175
|
"exit"
|
|
74175
76176
|
];
|
|
74176
|
-
var
|
|
76177
|
+
var LABEL_KEYS6 = {
|
|
74177
76178
|
"add-point": "pptx.editPoints.addPoint",
|
|
74178
76179
|
"delete-point": "pptx.editPoints.deletePoint",
|
|
74179
76180
|
"delete-segment": "pptx.editPoints.deleteSegment",
|
|
@@ -74187,10 +76188,10 @@ var LABEL_KEYS5 = {
|
|
|
74187
76188
|
exit: "pptx.editPoints.exit"
|
|
74188
76189
|
};
|
|
74189
76190
|
function editPointsCommandLabelKey(id) {
|
|
74190
|
-
return
|
|
76191
|
+
return LABEL_KEYS6[id];
|
|
74191
76192
|
}
|
|
74192
76193
|
function entry4(id, extra = {}) {
|
|
74193
|
-
return { id, labelKey:
|
|
76194
|
+
return { id, labelKey: LABEL_KEYS6[id], ...extra };
|
|
74194
76195
|
}
|
|
74195
76196
|
function pointCount2(geometry) {
|
|
74196
76197
|
return geometry.subpaths.reduce((sum, sub) => sum + sub.nodes.length, 0);
|
|
@@ -75762,6 +77763,16 @@ var EDITOR_RIBBON_CSS = `
|
|
|
75762
77763
|
background: color-mix(in oklab, var(--pptx-secondary) 50%, transparent);
|
|
75763
77764
|
color: var(--pptx-foreground); border-bottom: 1px solid var(--pptx-border);
|
|
75764
77765
|
}
|
|
77766
|
+
/* Full-screen mode lays the whole ribbon over the slide: the half-transparent fill above
|
|
77767
|
+
would let the slide show through, so the page background goes underneath it. */
|
|
77768
|
+
[data-pptx-editor-chrome] [data-pptx-chrome="ribbon"][data-ribbon-display="fullScreen"][data-ribbon-peek] {
|
|
77769
|
+
background:
|
|
77770
|
+
linear-gradient(
|
|
77771
|
+
color-mix(in oklab, var(--pptx-secondary) 50%, transparent),
|
|
77772
|
+
color-mix(in oklab, var(--pptx-secondary) 50%, transparent)
|
|
77773
|
+
),
|
|
77774
|
+
var(--pptx-background);
|
|
77775
|
+
}
|
|
75765
77776
|
[data-pptx-editor-chrome] [data-pptx-chrome="ribbon-primary"] {
|
|
75766
77777
|
min-height: 32px; height: 32px; padding: 2px 6px; gap: 2px;
|
|
75767
77778
|
border: 0; box-sizing: border-box;
|
|
@@ -78191,14 +80202,27 @@ function homeGalleryApply(family2, controlId, itemId, context3) {
|
|
|
78191
80202
|
return spec5?.gallery ? applyRibbonGalleryItem(spec5.gallery.id, itemId, context3) : void 0;
|
|
78192
80203
|
}
|
|
78193
80204
|
function fontFamilyItems(catalog, t2) {
|
|
78194
|
-
|
|
78195
|
-
|
|
78196
|
-
|
|
78197
|
-
|
|
78198
|
-
|
|
78199
|
-
|
|
78200
|
-
|
|
78201
|
-
|
|
80205
|
+
const groups = chunk2JR2CHTG_cjs.buildFontCatalog({ ...catalog, includeWeightVariants: true });
|
|
80206
|
+
const claimed = new Set(
|
|
80207
|
+
groups.flatMap((group) => group.entries.map((entry6) => entry6.family.toLowerCase()))
|
|
80208
|
+
);
|
|
80209
|
+
return groups.flatMap(
|
|
80210
|
+
(group) => group.entries.flatMap((entry6) => {
|
|
80211
|
+
const row2 = {
|
|
80212
|
+
value: entry6.family,
|
|
80213
|
+
label: entry6.family,
|
|
80214
|
+
group: t2(group.labelKey),
|
|
80215
|
+
fontFamily: entry6.family,
|
|
80216
|
+
...entry6.themeRole && { description: t2(`pptx.font.role.${entry6.themeRole}`) }
|
|
80217
|
+
};
|
|
80218
|
+
const variants = (entry6.variants ?? []).flatMap(({ family: family2 }) => {
|
|
80219
|
+
const key = family2.toLowerCase();
|
|
80220
|
+
if (claimed.has(key)) return [];
|
|
80221
|
+
claimed.add(key);
|
|
80222
|
+
return [{ value: family2, label: family2, group: row2.group, fontFamily: family2 }];
|
|
80223
|
+
});
|
|
80224
|
+
return [row2, ...variants];
|
|
80225
|
+
})
|
|
78202
80226
|
);
|
|
78203
80227
|
}
|
|
78204
80228
|
function fontPickerHomeControls(input, t2) {
|
|
@@ -79361,186 +81385,6 @@ function autosaveStatusKind(status) {
|
|
|
79361
81385
|
return state === "saving" || state === "saved" || state === "error" ? state : "idle";
|
|
79362
81386
|
}
|
|
79363
81387
|
|
|
79364
|
-
// src/pptx/render/find-replace-session.ts
|
|
79365
|
-
var DEFAULT_FIND_REPLACE_OPTIONS = Object.freeze({
|
|
79366
|
-
matchCase: false,
|
|
79367
|
-
includeNotes: false,
|
|
79368
|
-
includeChartTitles: true,
|
|
79369
|
-
includeChartData: false
|
|
79370
|
-
});
|
|
79371
|
-
var INITIAL_FIND_REPLACE_SESSION = Object.freeze({
|
|
79372
|
-
query: "",
|
|
79373
|
-
replacement: "",
|
|
79374
|
-
options: DEFAULT_FIND_REPLACE_OPTIONS,
|
|
79375
|
-
matches: Object.freeze([]),
|
|
79376
|
-
current: -1,
|
|
79377
|
-
pendingRefind: null
|
|
79378
|
-
});
|
|
79379
|
-
function search(slides, session) {
|
|
79380
|
-
return session.query ? findReplace.findInSlides(slides, session.query, session.options) : [];
|
|
79381
|
-
}
|
|
79382
|
-
function cursorAfterReplace(pending3, count) {
|
|
79383
|
-
if (count === 0) {
|
|
79384
|
-
return -1;
|
|
79385
|
-
}
|
|
79386
|
-
if (pending3.scope === "all") {
|
|
79387
|
-
return 0;
|
|
79388
|
-
}
|
|
79389
|
-
const created = Math.max(0, count - (pending3.count - 1));
|
|
79390
|
-
return (pending3.index + created) % count;
|
|
79391
|
-
}
|
|
79392
|
-
function reduceFindReplaceSession(session, event) {
|
|
79393
|
-
switch (event.type) {
|
|
79394
|
-
case "search": {
|
|
79395
|
-
const next2 = {
|
|
79396
|
-
...session,
|
|
79397
|
-
query: event.query ?? session.query,
|
|
79398
|
-
options: event.options ? { ...session.options, ...event.options } : session.options,
|
|
79399
|
-
pendingRefind: null
|
|
79400
|
-
};
|
|
79401
|
-
const matches = search(event.slides, next2);
|
|
79402
|
-
return { ...next2, matches, current: matches.length > 0 ? 0 : -1 };
|
|
79403
|
-
}
|
|
79404
|
-
case "setReplacement":
|
|
79405
|
-
return event.replacement === session.replacement ? session : { ...session, replacement: event.replacement };
|
|
79406
|
-
case "step": {
|
|
79407
|
-
const count = session.matches.length;
|
|
79408
|
-
if (count === 0) {
|
|
79409
|
-
return session;
|
|
79410
|
-
}
|
|
79411
|
-
const from = session.current < 0 ? event.direction > 0 ? -1 : 0 : session.current;
|
|
79412
|
-
const current = (from + event.direction + count) % count;
|
|
79413
|
-
return current === session.current ? session : { ...session, current };
|
|
79414
|
-
}
|
|
79415
|
-
case "replaced":
|
|
79416
|
-
return {
|
|
79417
|
-
...session,
|
|
79418
|
-
pendingRefind: {
|
|
79419
|
-
scope: event.plan.scope,
|
|
79420
|
-
index: event.plan.index,
|
|
79421
|
-
count: event.plan.count,
|
|
79422
|
-
base: event.slides
|
|
79423
|
-
}
|
|
79424
|
-
};
|
|
79425
|
-
case "slidesChanged": {
|
|
79426
|
-
const pending3 = session.pendingRefind;
|
|
79427
|
-
if (!pending3 || event.slides === pending3.base) {
|
|
79428
|
-
return session;
|
|
79429
|
-
}
|
|
79430
|
-
const matches = search(event.slides, session);
|
|
79431
|
-
return {
|
|
79432
|
-
...session,
|
|
79433
|
-
matches,
|
|
79434
|
-
current: cursorAfterReplace(pending3, matches.length),
|
|
79435
|
-
pendingRefind: null
|
|
79436
|
-
};
|
|
79437
|
-
}
|
|
79438
|
-
case "close":
|
|
79439
|
-
return session.matches.length === 0 && session.current === -1 && !session.pendingRefind ? session : { ...session, matches: [], current: -1, pendingRefind: null };
|
|
79440
|
-
}
|
|
79441
|
-
}
|
|
79442
|
-
function findReplaceStatus(session) {
|
|
79443
|
-
const total = session.matches.length;
|
|
79444
|
-
return { current: total > 0 && session.current >= 0 ? session.current + 1 : 0, total };
|
|
79445
|
-
}
|
|
79446
|
-
function findReplaceTarget(session) {
|
|
79447
|
-
const match = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
79448
|
-
if (!match) {
|
|
79449
|
-
return null;
|
|
79450
|
-
}
|
|
79451
|
-
return { slideIndex: match.slideIndex, elementId: match.notes ? null : match.elementId };
|
|
79452
|
-
}
|
|
79453
|
-
function matchKey(match) {
|
|
79454
|
-
return JSON.stringify([
|
|
79455
|
-
match.slideIndex,
|
|
79456
|
-
match.elementId,
|
|
79457
|
-
match.elementPath ?? null,
|
|
79458
|
-
match.tableCell ?? null,
|
|
79459
|
-
match.smartArtNodeId ?? null,
|
|
79460
|
-
match.notes ?? false,
|
|
79461
|
-
match.chartTitle ?? false,
|
|
79462
|
-
match.chartSeriesIndex ?? null,
|
|
79463
|
-
match.chartCategoryIndex ?? null,
|
|
79464
|
-
match.segmentIndex,
|
|
79465
|
-
match.startOffset,
|
|
79466
|
-
match.length
|
|
79467
|
-
]);
|
|
79468
|
-
}
|
|
79469
|
-
function planFindReplace(session, slides, scope) {
|
|
79470
|
-
const found = search(slides, session);
|
|
79471
|
-
let matches = found;
|
|
79472
|
-
let index = -1;
|
|
79473
|
-
if (scope === "current") {
|
|
79474
|
-
const current = session.current >= 0 ? session.matches[session.current] : void 0;
|
|
79475
|
-
const key = current ? matchKey(current) : null;
|
|
79476
|
-
index = key === null ? -1 : found.findIndex((match) => matchKey(match) === key);
|
|
79477
|
-
matches = index >= 0 ? [found[index]] : [];
|
|
79478
|
-
}
|
|
79479
|
-
if (matches.length === 0 || matches.some((match) => match.readOnly)) {
|
|
79480
|
-
return null;
|
|
79481
|
-
}
|
|
79482
|
-
return { scope, matches, replacement: session.replacement, count: found.length, index };
|
|
79483
|
-
}
|
|
79484
|
-
|
|
79485
|
-
// src/pptx/render/find-replace-session-actions.ts
|
|
79486
|
-
function findReplaceSessionActions(store, host2) {
|
|
79487
|
-
const apply7 = (event) => {
|
|
79488
|
-
const current = store.get();
|
|
79489
|
-
const next2 = reduceFindReplaceSession(current, event);
|
|
79490
|
-
if (next2 !== current) {
|
|
79491
|
-
store.set(next2);
|
|
79492
|
-
}
|
|
79493
|
-
return next2 !== current;
|
|
79494
|
-
};
|
|
79495
|
-
const show = () => {
|
|
79496
|
-
const target = findReplaceTarget(store.get());
|
|
79497
|
-
if (target) {
|
|
79498
|
-
host2.navigate(target);
|
|
79499
|
-
}
|
|
79500
|
-
};
|
|
79501
|
-
const step2 = (direction) => {
|
|
79502
|
-
apply7({ type: "step", direction });
|
|
79503
|
-
show();
|
|
79504
|
-
};
|
|
79505
|
-
const slidesChanged = () => {
|
|
79506
|
-
if (apply7({ type: "slidesChanged", slides: host2.slides() })) {
|
|
79507
|
-
show();
|
|
79508
|
-
}
|
|
79509
|
-
};
|
|
79510
|
-
const replace = (scope) => {
|
|
79511
|
-
const slides = host2.slides();
|
|
79512
|
-
const plan = planFindReplace(store.get(), slides, scope);
|
|
79513
|
-
if (!plan) {
|
|
79514
|
-
return 0;
|
|
79515
|
-
}
|
|
79516
|
-
const result = findReplace.applyFindReplacements(slides, plan.matches, plan.replacement);
|
|
79517
|
-
if (result.replacements === 0) {
|
|
79518
|
-
return 0;
|
|
79519
|
-
}
|
|
79520
|
-
host2.commit(result.slides, scope);
|
|
79521
|
-
apply7({ type: "replaced", plan, slides });
|
|
79522
|
-
slidesChanged();
|
|
79523
|
-
return result.replacements;
|
|
79524
|
-
};
|
|
79525
|
-
return {
|
|
79526
|
-
search: (change = {}) => {
|
|
79527
|
-
apply7({ type: "search", slides: host2.slides(), ...change });
|
|
79528
|
-
show();
|
|
79529
|
-
},
|
|
79530
|
-
setReplacement: (replacement) => {
|
|
79531
|
-
apply7({ type: "setReplacement", replacement });
|
|
79532
|
-
},
|
|
79533
|
-
next: () => step2(1),
|
|
79534
|
-
previous: () => step2(-1),
|
|
79535
|
-
replaceCurrent: () => replace("current"),
|
|
79536
|
-
replaceAll: () => replace("all"),
|
|
79537
|
-
slidesChanged,
|
|
79538
|
-
close: () => {
|
|
79539
|
-
apply7({ type: "close" });
|
|
79540
|
-
}
|
|
79541
|
-
};
|
|
79542
|
-
}
|
|
79543
|
-
|
|
79544
81388
|
// src/pptx/render/viewer-api-guard.ts
|
|
79545
81389
|
var GATED_VIEWER_EDIT_METHODS = [
|
|
79546
81390
|
"addSlide",
|
|
@@ -79882,7 +81726,7 @@ function createMobileIcon(doc, icon2) {
|
|
|
79882
81726
|
|
|
79883
81727
|
// src/pptx/web-components/mobile-bar.ts
|
|
79884
81728
|
var identity = (key) => key;
|
|
79885
|
-
var
|
|
81729
|
+
var LABEL_KEYS7 = {
|
|
79886
81730
|
slides: "pptx.sections.slides",
|
|
79887
81731
|
insert: "pptx.mobileBar.insert",
|
|
79888
81732
|
inspector: "pptx.field.format",
|
|
@@ -79953,7 +81797,7 @@ function definePptxMobileBar(registry2) {
|
|
|
79953
81797
|
if (id === "notes") {
|
|
79954
81798
|
button.setAttribute("aria-label", t2("pptx.statusBar.toggleNotes"));
|
|
79955
81799
|
}
|
|
79956
|
-
label2.textContent = t2(
|
|
81800
|
+
label2.textContent = t2(LABEL_KEYS7[id]);
|
|
79957
81801
|
const count = id === "comments" ? s.commentCount ?? 0 : 0;
|
|
79958
81802
|
badge.hidden = count <= 0;
|
|
79959
81803
|
badge.textContent = count > 99 ? "99+" : String(count);
|
|
@@ -83204,28 +85048,28 @@ function axisView(axis, advanced = false) {
|
|
|
83204
85048
|
logScale: axis.scaling.logBase !== void 0,
|
|
83205
85049
|
numberFormat: axis.numberFormat && !axis.numberFormat.sourceLinked ? axis.numberFormat.formatCode : ""
|
|
83206
85050
|
};
|
|
83207
|
-
const
|
|
85051
|
+
const copy2 = (key, value) => {
|
|
83208
85052
|
if (value !== void 0) view2[key] = value;
|
|
83209
85053
|
};
|
|
83210
|
-
|
|
83211
|
-
|
|
83212
|
-
|
|
83213
|
-
|
|
83214
|
-
|
|
83215
|
-
|
|
83216
|
-
|
|
83217
|
-
|
|
83218
|
-
|
|
83219
|
-
|
|
83220
|
-
|
|
85054
|
+
copy2("min", axis.scaling.min);
|
|
85055
|
+
copy2("max", axis.scaling.max);
|
|
85056
|
+
copy2("logBase", axis.scaling.logBase);
|
|
85057
|
+
copy2("majorUnit", axis.majorUnit);
|
|
85058
|
+
copy2("minorUnit", axis.minorUnit);
|
|
85059
|
+
copy2("crosses", axis.crosses);
|
|
85060
|
+
copy2("crossesAt", axis.crossesAt);
|
|
85061
|
+
copy2("displayUnits", axis.displayUnits?.builtInUnit);
|
|
85062
|
+
copy2("majorTickMark", axis.majorTickMark);
|
|
85063
|
+
copy2("minorTickMark", axis.minorTickMark);
|
|
85064
|
+
copy2("tickLabelPosition", axis.tickLabelPosition);
|
|
83221
85065
|
if (advanced) {
|
|
83222
85066
|
view2.title = axis.title?.text ?? "";
|
|
83223
85067
|
if (axis.numberFormat) view2.numberFormatSourceLinked = axis.numberFormat.sourceLinked ?? true;
|
|
83224
85068
|
if (axis.kind === "date") {
|
|
83225
85069
|
view2.timeUnitsEditable = true;
|
|
83226
|
-
|
|
83227
|
-
|
|
83228
|
-
|
|
85070
|
+
copy2("baseTimeUnit", axis.baseTimeUnit);
|
|
85071
|
+
copy2("majorTimeUnit", axis.majorTimeUnit);
|
|
85072
|
+
copy2("minorTimeUnit", axis.minorTimeUnit);
|
|
83229
85073
|
}
|
|
83230
85074
|
}
|
|
83231
85075
|
return view2;
|
|
@@ -83302,9 +85146,9 @@ function chartSpaceFormatSource(space, options = {}) {
|
|
|
83302
85146
|
const entry6 = seriesIndex === void 0 ? void 0 : entries2[seriesIndex];
|
|
83303
85147
|
if (seriesIndex !== void 0 && !entry6) return void 0;
|
|
83304
85148
|
const group = entry6?.group ?? space.plotArea.groups[0];
|
|
83305
|
-
const chart = group?.dataLabels;
|
|
85149
|
+
const chart$1 = group?.dataLabels;
|
|
83306
85150
|
const own = entry6?.series.dataLabels;
|
|
83307
|
-
const pick = (key) => own?.[key] ?? chart?.[key];
|
|
85151
|
+
const pick = (key) => own?.[key] ?? chart$1?.[key];
|
|
83308
85152
|
const view2 = { seriesScoped: entry6 !== void 0 };
|
|
83309
85153
|
const set = (key, value) => {
|
|
83310
85154
|
if (value !== void 0) view2[key] = value;
|
|
@@ -83316,6 +85160,9 @@ function chartSpaceFormatSource(space, options = {}) {
|
|
|
83316
85160
|
set("showPercent", pick("showPercent"));
|
|
83317
85161
|
set("showLegendKey", pick("showLegendKey"));
|
|
83318
85162
|
set("position", pick("position"));
|
|
85163
|
+
const edited = entry6 ? [entry6.group] : space.plotArea.groups.filter((item4) => item4.kind !== "surface");
|
|
85164
|
+
if (edited.length > 0)
|
|
85165
|
+
view2.positions = edited.map((item4) => chart.chartLabelPositions(item4.element, item4.grouping)).reduce((all, own2) => all.filter((value) => own2.includes(value)));
|
|
83319
85166
|
return view2;
|
|
83320
85167
|
};
|
|
83321
85168
|
return {
|
|
@@ -83348,13 +85195,13 @@ function chartSpaceFormatSource(space, options = {}) {
|
|
|
83348
85195
|
labelOptions: labels
|
|
83349
85196
|
};
|
|
83350
85197
|
}
|
|
83351
|
-
var chartFormatLocale = (value) => i18n.normalizeLocale(value,
|
|
85198
|
+
var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunk3JGYWDMR_cjs.CHART_FORMAT_LOCALES, "en");
|
|
83352
85199
|
function chartFormatTranslator(locale, override) {
|
|
83353
|
-
const strings =
|
|
85200
|
+
const strings = chunk3JGYWDMR_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
|
|
83354
85201
|
return (key, params, fallback) => {
|
|
83355
85202
|
const own = override?.(key, params, fallback);
|
|
83356
85203
|
if (own && own !== key) return own;
|
|
83357
|
-
return strings[key] ??
|
|
85204
|
+
return strings[key] ?? chunk3JGYWDMR_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
|
|
83358
85205
|
};
|
|
83359
85206
|
}
|
|
83360
85207
|
|
|
@@ -88475,7 +90322,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
88475
90322
|
if (this.#live || this.#draw) {
|
|
88476
90323
|
return;
|
|
88477
90324
|
}
|
|
88478
|
-
this.#live = import('./smartart-insert-preview-
|
|
90325
|
+
this.#live = import('./smartart-insert-preview-WPIGM6UQ.cjs').then((module) => {
|
|
88479
90326
|
if (this.#draw || !this.#picker) {
|
|
88480
90327
|
return;
|
|
88481
90328
|
}
|
|
@@ -97429,6 +99276,11 @@ exports.BI_LEVEL_THRESHOLDS = BI_LEVEL_THRESHOLDS;
|
|
|
97429
99276
|
exports.BOTTOM_TRIGGER_FRACTION = BOTTOM_TRIGGER_FRACTION;
|
|
97430
99277
|
exports.BRIGHTNESS_CONTRAST_STEPS = BRIGHTNESS_CONTRAST_STEPS;
|
|
97431
99278
|
exports.BROADCAST_THROTTLE_MS = BROADCAST_THROTTLE_MS;
|
|
99279
|
+
exports.BUILDING_BLOCK_GROUP_IDS = BUILDING_BLOCK_GROUP_IDS;
|
|
99280
|
+
exports.BUILDING_BLOCK_OK = BUILDING_BLOCK_OK;
|
|
99281
|
+
exports.BUILDING_BLOCK_REQUEST_ACTIONS = BUILDING_BLOCK_REQUEST_ACTIONS;
|
|
99282
|
+
exports.BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS = BUILDING_BLOCK_UNMOUNTED_DIALOG_ACTIONS;
|
|
99283
|
+
exports.BUILDING_BLOCK_VIEWABLE_REQUESTS = BUILDING_BLOCK_VIEWABLE_REQUESTS;
|
|
97432
99284
|
exports.CANVAS_CONTEXT_MENU_COMMAND_IDS = CANVAS_CONTEXT_MENU_COMMAND_IDS;
|
|
97433
99285
|
exports.CANVAS_DIMENSION_CANDIDATES = CANVAS_DIMENSION_CANDIDATES;
|
|
97434
99286
|
exports.CATEGORIES = CATEGORIES;
|
|
@@ -97486,6 +99338,7 @@ exports.CROP_HANDLE_THICKNESS_PX = CROP_HANDLE_THICKNESS_PX;
|
|
|
97486
99338
|
exports.CROP_LABEL_KEY = CROP_LABEL_KEY;
|
|
97487
99339
|
exports.CROP_MODE_HINT_KEY = CROP_MODE_HINT_KEY;
|
|
97488
99340
|
exports.CURSOR_PALETTE = CURSOR_PALETTE;
|
|
99341
|
+
exports.CUSTOM_PROPERTY_TYPES = CUSTOM_PROPERTY_TYPES;
|
|
97489
99342
|
exports.DATA_LABEL_CONTENT_OPTIONS = DATA_LABEL_CONTENT_OPTIONS;
|
|
97490
99343
|
exports.DATA_LABEL_POSITION_OPTIONS = DATA_LABEL_POSITION_OPTIONS;
|
|
97491
99344
|
exports.DEBOUNCE_MS = DEBOUNCE_MS;
|
|
@@ -97514,6 +99367,7 @@ exports.DEFAULT_PALETTE = DEFAULT_PALETTE;
|
|
|
97514
99367
|
exports.DEFAULT_POINTER_PRESSURE = DEFAULT_POINTER_PRESSURE;
|
|
97515
99368
|
exports.DEFAULT_PREVIEW_ELEMENT_CAP = DEFAULT_PREVIEW_ELEMENT_CAP;
|
|
97516
99369
|
exports.DEFAULT_QUICK_ACCESS_COMMAND_IDS = DEFAULT_QUICK_ACCESS_COMMAND_IDS;
|
|
99370
|
+
exports.DEFAULT_RIBBON_DISPLAY_MODE = DEFAULT_RIBBON_DISPLAY_MODE;
|
|
97517
99371
|
exports.DEFAULT_RIBBON_TRANSITION_DURATION_SEC = DEFAULT_RIBBON_TRANSITION_DURATION_SEC;
|
|
97518
99372
|
exports.DEFAULT_ROUND_RECT_ADJUSTMENT = DEFAULT_ROUND_RECT_ADJUSTMENT;
|
|
97519
99373
|
exports.DEFAULT_ROW_HEIGHT = DEFAULT_ROW_HEIGHT;
|
|
@@ -97537,7 +99391,9 @@ exports.DRAW_RIBBON_TOOLS = DRAW_RIBBON_TOOLS;
|
|
|
97537
99391
|
exports.DRAW_WIDTH_PRESETS = DRAW_WIDTH_PRESETS;
|
|
97538
99392
|
exports.DUOTONE_PRESETS = DUOTONE_PRESETS;
|
|
97539
99393
|
exports.EASE = EASE;
|
|
99394
|
+
exports.EDITABLE_APP_PROPERTY_KEYS = EDITABLE_APP_PROPERTY_KEYS;
|
|
97540
99395
|
exports.EDITABLE_AXIS_ROWS = EDITABLE_AXIS_ROWS;
|
|
99396
|
+
exports.EDITABLE_CORE_PROPERTY_KEYS = EDITABLE_CORE_PROPERTY_KEYS;
|
|
97541
99397
|
exports.EDITOR_CHROME_CSS = EDITOR_CHROME_CSS;
|
|
97542
99398
|
exports.EDITOR_SHORTCUT_ACTION_IDS = EDITOR_SHORTCUT_ACTION_IDS;
|
|
97543
99399
|
exports.EDITOR_SHORTCUT_DESCRIPTIONS = EDITOR_SHORTCUT_DESCRIPTIONS;
|
|
@@ -97584,6 +99440,7 @@ exports.EditPointsSession = EditPointsSession;
|
|
|
97584
99440
|
exports.FEATURE_ENTRY_POINTS = FEATURE_ENTRY_POINTS;
|
|
97585
99441
|
exports.FILL_MODE_OPTIONS = FILL_MODE_OPTIONS;
|
|
97586
99442
|
exports.FILL_PATTERN_LABEL_KEYS = FILL_PATTERN_LABEL_KEYS;
|
|
99443
|
+
exports.FIND_MATCH_ATTRIBUTE = FIND_MATCH_ATTRIBUTE;
|
|
97587
99444
|
exports.FIXED_SPACING_RUN_LINE_HEIGHT = FIXED_SPACING_RUN_LINE_HEIGHT;
|
|
97588
99445
|
exports.FIXED_TAB_GALLERIES = FIXED_TAB_GALLERIES;
|
|
97589
99446
|
exports.FLY_SUBTYPE_TO_EDGE = FLY_SUBTYPE_TO_EDGE;
|
|
@@ -97638,6 +99495,10 @@ exports.HOME_MERGE_ITEMS = HOME_MERGE_ITEMS;
|
|
|
97638
99495
|
exports.HOME_SELECT_ITEMS = HOME_SELECT_ITEMS;
|
|
97639
99496
|
exports.HOME_SHAPE_ITEMS = HOME_SHAPE_ITEMS;
|
|
97640
99497
|
exports.HOME_TEXT_DIRECTION_ITEMS = HOME_TEXT_DIRECTION_ITEMS;
|
|
99498
|
+
exports.HOST_IMAGE_MAX_BYTES = HOST_IMAGE_MAX_BYTES;
|
|
99499
|
+
exports.HOST_MEDIA_MAX_BYTES = HOST_MEDIA_MAX_BYTES;
|
|
99500
|
+
exports.HYPERLINK_ACTION_VERB_MAP = HYPERLINK_ACTION_VERB_MAP;
|
|
99501
|
+
exports.HYPERLINK_ACTION_VERB_TO_PPACTION = HYPERLINK_ACTION_VERB_TO_PPACTION;
|
|
97641
99502
|
exports.INDENT_PX = INDENT_PX;
|
|
97642
99503
|
exports.INITIAL_FIND_REPLACE_SESSION = INITIAL_FIND_REPLACE_SESSION;
|
|
97643
99504
|
exports.INITIAL_READ_ONLY_SESSION = INITIAL_READ_ONLY_SESSION;
|
|
@@ -97684,9 +99545,11 @@ exports.MAX_INDENT_LEVEL = MAX_INDENT_LEVEL;
|
|
|
97684
99545
|
exports.MAX_LABEL_CHARS = MAX_LABEL_CHARS;
|
|
97685
99546
|
exports.MAX_PARAGRAPH_LEVEL = MAX_PARAGRAPH_LEVEL;
|
|
97686
99547
|
exports.MAX_ZOOM_SCALE = MAX_ZOOM_SCALE;
|
|
99548
|
+
exports.MEDIA_AUDIO_SIZE = MEDIA_AUDIO_SIZE;
|
|
97687
99549
|
exports.MEDIA_CHROME_ATTRIBUTE = MEDIA_CHROME_ATTRIBUTE;
|
|
97688
99550
|
exports.MEDIA_FALLBACK_ICONS = MEDIA_FALLBACK_ICONS;
|
|
97689
99551
|
exports.MEDIA_FULLSCREEN_OVERLAY_STYLE = MEDIA_FULLSCREEN_OVERLAY_STYLE;
|
|
99552
|
+
exports.MEDIA_VIDEO_MAX_SIZE = MEDIA_VIDEO_MAX_SIZE;
|
|
97690
99553
|
exports.MERGE_CURVE_SEGMENTS = MERGE_CURVE_SEGMENTS;
|
|
97691
99554
|
exports.MERGE_SHAPES_HINT_KEY = MERGE_SHAPES_HINT_KEY;
|
|
97692
99555
|
exports.MERGE_SHAPES_LABEL_KEY = MERGE_SHAPES_LABEL_KEY;
|
|
@@ -97696,6 +99559,7 @@ exports.MIN_COLUMN_PROPORTION = MIN_COLUMN_PROPORTION;
|
|
|
97696
99559
|
exports.MIN_COLUMN_WIDTH_FRACTION = MIN_COLUMN_WIDTH_FRACTION;
|
|
97697
99560
|
exports.MIN_CROP_FRAME_PX = MIN_CROP_FRAME_PX;
|
|
97698
99561
|
exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE4;
|
|
99562
|
+
exports.MIN_OPEN_PASSWORD_LENGTH = MIN_OPEN_PASSWORD_LENGTH;
|
|
97699
99563
|
exports.MIN_ROW_HEIGHT = MIN_ROW_HEIGHT;
|
|
97700
99564
|
exports.MIN_TOUCH_TARGET_PX = MIN_TOUCH_TARGET_PX;
|
|
97701
99565
|
exports.MIN_ZOOM_SCALE = MIN_ZOOM_SCALE;
|
|
@@ -97837,6 +99701,7 @@ exports.RECORD_COMMAND_GROUPS = RECORD_COMMAND_GROUPS;
|
|
|
97837
99701
|
exports.REVIEW_COMMENT_COMMAND_IDS = REVIEW_COMMENT_COMMAND_IDS;
|
|
97838
99702
|
exports.RGBA_BYTES_PER_PIXEL = RGBA_BYTES_PER_PIXEL;
|
|
97839
99703
|
exports.RIBBON_ADD_IN_TAB_ATTR = RIBBON_ADD_IN_TAB_ATTR;
|
|
99704
|
+
exports.RIBBON_AUTO_COLLAPSE_MEDIA = RIBBON_AUTO_COLLAPSE_MEDIA;
|
|
97840
99705
|
exports.RIBBON_CONTEXTUAL_TABS = RIBBON_CONTEXTUAL_TABS;
|
|
97841
99706
|
exports.RIBBON_CONTEXTUAL_TAB_ATTR = RIBBON_CONTEXTUAL_TAB_ATTR;
|
|
97842
99707
|
exports.RIBBON_CONTROL_ALIASES = RIBBON_CONTROL_ALIASES;
|
|
@@ -97844,6 +99709,9 @@ exports.RIBBON_CONTROL_ATTR = RIBBON_CONTROL_ATTR;
|
|
|
97844
99709
|
exports.RIBBON_CONTROL_CATALOG = RIBBON_CONTROL_CATALOG;
|
|
97845
99710
|
exports.RIBBON_CONTROL_ICONS = RIBBON_CONTROL_ICONS;
|
|
97846
99711
|
exports.RIBBON_CONTROL_IDS = RIBBON_CONTROL_IDS;
|
|
99712
|
+
exports.RIBBON_DISPLAY_MODES = RIBBON_DISPLAY_MODES;
|
|
99713
|
+
exports.RIBBON_DISPLAY_OPTIONS_LABEL_KEY = RIBBON_DISPLAY_OPTIONS_LABEL_KEY;
|
|
99714
|
+
exports.RIBBON_DISPLAY_REVEAL_LABEL_KEY = RIBBON_DISPLAY_REVEAL_LABEL_KEY;
|
|
97847
99715
|
exports.RIBBON_GALLERY_ATTR = RIBBON_GALLERY_ATTR;
|
|
97848
99716
|
exports.RIBBON_GALLERY_IDS = RIBBON_GALLERY_IDS;
|
|
97849
99717
|
exports.RIBBON_GALLERY_ITEM_ATTR = RIBBON_GALLERY_ITEM_ATTR;
|
|
@@ -98037,6 +99905,7 @@ exports.alignPatch = alignPatch;
|
|
|
98037
99905
|
exports.angularAdjustmentKeys = angularAdjustmentKeys;
|
|
98038
99906
|
exports.annotationCapturesPointer = annotationCapturesPointer;
|
|
98039
99907
|
exports.annotationOverlayZIndex = annotationOverlayZIndex;
|
|
99908
|
+
exports.appPropertiesChanged = appPropertiesChanged;
|
|
98040
99909
|
exports.appendPresentationInkPoint = appendPresentationInkPoint;
|
|
98041
99910
|
exports.apply3dEffects = apply3dEffects;
|
|
98042
99911
|
exports.applyAcceptAllSlides = applyAcceptAllSlides;
|
|
@@ -98056,6 +99925,7 @@ exports.applyChartFormatField = applyChartFormatField;
|
|
|
98056
99925
|
exports.applyChartRevealDescriptor = applyChartRevealDescriptor;
|
|
98057
99926
|
exports.applyChartStylePreset = applyChartStylePreset;
|
|
98058
99927
|
exports.applyColorChange = applyColorChange;
|
|
99928
|
+
exports.applyCustomShowEdit = applyCustomShowEdit;
|
|
98059
99929
|
exports.applyDiagramRevealDescriptor = applyDiagramRevealDescriptor;
|
|
98060
99930
|
exports.applyDrawingColorTransforms = applyDrawingColorTransforms;
|
|
98061
99931
|
exports.applyDuotone = applyDuotone;
|
|
@@ -98086,6 +99956,7 @@ exports.applyRenderedElementAccessibility = applyRenderedElementAccessibility;
|
|
|
98086
99956
|
exports.applyReroutedConnectors = applyReroutedConnectors;
|
|
98087
99957
|
exports.applyRibbonGalleryItem = applyRibbonGalleryItem;
|
|
98088
99958
|
exports.applyRibbonTransitionDraft = applyRibbonTransitionDraft;
|
|
99959
|
+
exports.applySlideShowSettingsPatch = applySlideShowSettingsPatch;
|
|
98089
99960
|
exports.applySlideTransitionSound = applySlideTransitionSound;
|
|
98090
99961
|
exports.applySmartArtTextPaneRequest = applySmartArtTextPaneRequest;
|
|
98091
99962
|
exports.applySorterAction = applySorterAction;
|
|
@@ -98120,6 +99991,7 @@ exports.attachPresentationVisibilityPause = attachPresentationVisibilityPause;
|
|
|
98120
99991
|
exports.attachRibbonOverflow = attachRibbonOverflow;
|
|
98121
99992
|
exports.attachRotateHandlePlacement = attachRotateHandlePlacement;
|
|
98122
99993
|
exports.attachViewerHyperlinks = attachViewerHyperlinks;
|
|
99994
|
+
exports.attachViewportNavigation = attachViewportNavigation;
|
|
98123
99995
|
exports.authorConnectorBetweenSites = authorConnectorBetweenSites;
|
|
98124
99996
|
exports.authoredLetterSpacingPx = authoredLetterSpacingPx;
|
|
98125
99997
|
exports.autoFitModeOf = autoFitModeOf;
|
|
@@ -98155,6 +100027,7 @@ exports.boundsOf = boundsOf;
|
|
|
98155
100027
|
exports.boxForAnimation = boxForAnimation;
|
|
98156
100028
|
exports.boxOverlapRatio = boxOverlapRatio;
|
|
98157
100029
|
exports.boxesOverlap = boxesOverlap;
|
|
100030
|
+
exports.broadcastGroup = broadcastGroup;
|
|
98158
100031
|
exports.build3DExtrusionData = build3DExtrusionData;
|
|
98159
100032
|
exports.buildAbsoluteRotationKeyframe = buildAbsoluteRotationKeyframe;
|
|
98160
100033
|
exports.buildAbsoluteScaleKeyframe = buildAbsoluteScaleKeyframe;
|
|
@@ -98190,6 +100063,7 @@ exports.buildCropOverlay = buildCropOverlay;
|
|
|
98190
100063
|
exports.buildDeckJson = buildDeckJson;
|
|
98191
100064
|
exports.buildDeckSaveOptions = buildDeckSaveOptions;
|
|
98192
100065
|
exports.buildDirectionGrid = buildDirectionGrid;
|
|
100066
|
+
exports.buildDocumentPropertiesActions = buildDocumentPropertiesActions;
|
|
98193
100067
|
exports.buildDuotoneCacheKey = buildDuotoneCacheKey;
|
|
98194
100068
|
exports.buildDynamicKeyframe = buildDynamicKeyframe;
|
|
98195
100069
|
exports.buildDynamicKeyframes = buildDynamicKeyframes;
|
|
@@ -98199,6 +100073,8 @@ exports.buildElementClipboardPayload = buildElementClipboardPayload;
|
|
|
98199
100073
|
exports.buildEmbeddedFontStyles = buildEmbeddedFontStyles;
|
|
98200
100074
|
exports.buildEquationBlockStyle = buildEquationBlockStyle;
|
|
98201
100075
|
exports.buildFieldSubstitutionContext = buildFieldSubstitutionContext;
|
|
100076
|
+
exports.buildFindReplaceActions = buildFindReplaceActions;
|
|
100077
|
+
exports.buildFontEmbeddingActions = buildFontEmbeddingActions;
|
|
98202
100078
|
exports.buildFontFaceRule = buildFontFaceRule;
|
|
98203
100079
|
exports.buildForeignObjectSvgBody = buildForeignObjectSvgBody;
|
|
98204
100080
|
exports.buildFreeformShapeElement = buildFreeformShapeElement;
|
|
@@ -98219,6 +100095,7 @@ exports.buildInlineListStylePatch = buildInlineListStylePatch;
|
|
|
98219
100095
|
exports.buildInlineStyleText = buildInlineStyleText;
|
|
98220
100096
|
exports.buildInlineTextCommitPatch = buildInlineTextCommitPatch;
|
|
98221
100097
|
exports.buildJoinCollaborationConfig = buildJoinCollaborationConfig;
|
|
100098
|
+
exports.buildLayoutActions = buildLayoutActions;
|
|
98222
100099
|
exports.buildLiveInkStrokeView = buildLiveInkStrokeView;
|
|
98223
100100
|
exports.buildMirrorTiledBackground = buildMirrorTiledBackground;
|
|
98224
100101
|
exports.buildMorphAnimationRules = buildMorphAnimationRules;
|
|
@@ -98240,6 +100117,7 @@ exports.buildOptionsBaseline = buildOptionsBaseline;
|
|
|
98240
100117
|
exports.buildOutline = buildOutline;
|
|
98241
100118
|
exports.buildOutlinePrintJobDocument = buildOutlinePrintJobDocument;
|
|
98242
100119
|
exports.buildParagraphs = buildParagraphs;
|
|
100120
|
+
exports.buildPasswordProtectionActions = buildPasswordProtectionActions;
|
|
98243
100121
|
exports.buildPngChunk = buildPngChunk;
|
|
98244
100122
|
exports.buildPptxOptionCategories = buildPptxOptionCategories;
|
|
98245
100123
|
exports.buildPresentationAudienceUrl = buildPresentationAudienceUrl;
|
|
@@ -98262,6 +100140,7 @@ exports.buildRunTabLines = buildRunTabLines;
|
|
|
98262
100140
|
exports.buildSectionContextMenuEntries = buildSectionContextMenuEntries;
|
|
98263
100141
|
exports.buildShareConfig = buildShareConfig;
|
|
98264
100142
|
exports.buildShareUrl = buildShareUrl;
|
|
100143
|
+
exports.buildSignatureActions = buildSignatureActions;
|
|
98265
100144
|
exports.buildSlideOverflowMap = buildSlideOverflowMap;
|
|
98266
100145
|
exports.buildSlidePaneContextMenuEntries = buildSlidePaneContextMenuEntries;
|
|
98267
100146
|
exports.buildSlideSorterContextMenuEntries = buildSlideSorterContextMenuEntries;
|
|
@@ -98310,6 +100189,8 @@ exports.buildWarpPath = buildWarpPath;
|
|
|
98310
100189
|
exports.buildWarpedGlyphOutlinePathD = buildWarpedGlyphOutlinePathD;
|
|
98311
100190
|
exports.buildWrapperStyle = buildWrapperStyle;
|
|
98312
100191
|
exports.buildZoomTransitionOverride = buildZoomTransitionOverride;
|
|
100192
|
+
exports.buildingBlockFailure = buildingBlockFailure;
|
|
100193
|
+
exports.buildingBlockRequestAction = buildingBlockRequestAction;
|
|
98313
100194
|
exports.builtinTableStyleMap = builtinTableStyleMap;
|
|
98314
100195
|
exports.calculateContinuationPageMaxLines = calculateContinuationPageMaxLines;
|
|
98315
100196
|
exports.calculateNotesPageLayout = calculateNotesPageLayout;
|
|
@@ -98531,6 +100412,8 @@ exports.createActiveAnimationGroup = createActiveAnimationGroup;
|
|
|
98531
100412
|
exports.createAutosaveController = createAutosaveController;
|
|
98532
100413
|
exports.createAutosaveRecoveryController = createAutosaveRecoveryController;
|
|
98533
100414
|
exports.createBackstagePresentation = createBackstagePresentation;
|
|
100415
|
+
exports.createBuildingBlockGroupContext = createBuildingBlockGroupContext;
|
|
100416
|
+
exports.createBuildingBlockRequests = createBuildingBlockRequests;
|
|
98534
100417
|
exports.createCloudDocumentController = createCloudDocumentController;
|
|
98535
100418
|
exports.createCollabProvider = createCollabProvider;
|
|
98536
100419
|
exports.createCollaborationHistory = createCollaborationHistory;
|
|
@@ -98547,6 +100430,7 @@ exports.createEditorHistoryController = createEditorHistoryController;
|
|
|
98547
100430
|
exports.createEmbeddedFontsSheet = createEmbeddedFontsSheet;
|
|
98548
100431
|
exports.createEmbeddedOutlineFontsSlot = createEmbeddedOutlineFontsSlot;
|
|
98549
100432
|
exports.createEnvelopeWarp = createEnvelopeWarp;
|
|
100433
|
+
exports.createFindBarController = createFindBarController;
|
|
98550
100434
|
exports.createGalleryPreviewController = createGalleryPreviewController;
|
|
98551
100435
|
exports.createGestureController = createGestureController;
|
|
98552
100436
|
exports.createGlyphOutlineLookup = createGlyphOutlineLookup;
|
|
@@ -98557,6 +100441,7 @@ exports.createInlineListSeed = createInlineListSeed;
|
|
|
98557
100441
|
exports.createInspectorColorFields = createInspectorColorFields;
|
|
98558
100442
|
exports.createLiveColorInput = createLiveColorInput;
|
|
98559
100443
|
exports.createPlainNotesSegments = createPlainNotesSegments;
|
|
100444
|
+
exports.createPptxBuildingBlockSession = createPptxBuildingBlockSession;
|
|
98560
100445
|
exports.createPresenceProjector = createPresenceProjector;
|
|
98561
100446
|
exports.createPresencePublisher = createPresencePublisher;
|
|
98562
100447
|
exports.createPresentationKeyBuffer = createPresentationKeyBuffer;
|
|
@@ -98566,7 +100451,9 @@ exports.createPresenterShowGuard = createPresenterShowGuard;
|
|
|
98566
100451
|
exports.createPresenterTimer = createPresenterTimer;
|
|
98567
100452
|
exports.createPreviewEditGuard = createPreviewEditGuard;
|
|
98568
100453
|
exports.createRibbonControlIcon = createRibbonControlIcon;
|
|
100454
|
+
exports.createRibbonDisplayController = createRibbonDisplayController;
|
|
98569
100455
|
exports.createSaveProgressController = createSaveProgressController;
|
|
100456
|
+
exports.createSaveRevisionController = createSaveRevisionController;
|
|
98570
100457
|
exports.createSheetDismissGesture = createSheetDismissGesture;
|
|
98571
100458
|
exports.createSlidePackageClipboard = createSlidePackageClipboard;
|
|
98572
100459
|
exports.createSlideSorterState = createSlideSorterState;
|
|
@@ -98600,6 +100487,7 @@ exports.cssKeyframeName = cssKeyframeName;
|
|
|
98600
100487
|
exports.cubicBounds = cubicBounds;
|
|
98601
100488
|
exports.cubicPointAt = cubicPointAt;
|
|
98602
100489
|
exports.cursorForTool = cursorForTool;
|
|
100490
|
+
exports.customShowsGroup = customShowsGroup;
|
|
98603
100491
|
exports.customizeBackstageCards = customizeBackstageCards;
|
|
98604
100492
|
exports.customizeBackstageNav = customizeBackstageNav;
|
|
98605
100493
|
exports.customizeCanvasContextMenuEntries = customizeCanvasContextMenuEntries;
|
|
@@ -98613,6 +100501,7 @@ exports.defaultDuration = defaultDuration;
|
|
|
98613
100501
|
exports.defaultGradientState = defaultGradientState;
|
|
98614
100502
|
exports.defaultMentionId = defaultMentionId;
|
|
98615
100503
|
exports.defaultRichEnabled = defaultRichEnabled;
|
|
100504
|
+
exports.defineBuildingBlockActionGroup = defineBuildingBlockActionGroup;
|
|
98616
100505
|
exports.deleteAutosaveSnapshot = deleteAutosaveSnapshot;
|
|
98617
100506
|
exports.deleteEditPoint = deleteEditPoint;
|
|
98618
100507
|
exports.deleteEditSegment = deleteEditSegment;
|
|
@@ -98625,20 +100514,33 @@ exports.derivePresenceList = derivePresenceList;
|
|
|
98625
100514
|
exports.derivePresetAdjustmentHandles = derivePresetAdjustmentHandles;
|
|
98626
100515
|
exports.deriveSlideFieldContext = deriveSlideFieldContext;
|
|
98627
100516
|
exports.deriveViewportBreakpoints = deriveViewportBreakpoints;
|
|
100517
|
+
exports.describeBroadcastSupport = describeBroadcastSupport;
|
|
100518
|
+
exports.describeBuildingBlockActions = describeBuildingBlockActions;
|
|
100519
|
+
exports.describeBuildingBlockAvailability = describeBuildingBlockAvailability;
|
|
100520
|
+
exports.describeBuildingBlockToolbar = describeBuildingBlockToolbar;
|
|
98628
100521
|
exports.describeCollaborationShellState = describeCollaborationShellState;
|
|
100522
|
+
exports.describeCustomShows = describeCustomShows;
|
|
98629
100523
|
exports.describeElementChange = describeElementChange;
|
|
98630
100524
|
exports.describeFontEmbedding = describeFontEmbedding;
|
|
100525
|
+
exports.describeFontEmbeddingState = describeFontEmbeddingState;
|
|
100526
|
+
exports.describePasswordProtection = describePasswordProtection;
|
|
98631
100527
|
exports.describePptxChart = describePptxChart;
|
|
100528
|
+
exports.describeShortcutCatalogue = describeShortcutCatalogue;
|
|
100529
|
+
exports.describeShowDialogActions = describeShowDialogActions;
|
|
100530
|
+
exports.describeSignaturesState = describeSignaturesState;
|
|
100531
|
+
exports.describeSlideShowSettings = describeSlideShowSettings;
|
|
98632
100532
|
exports.describeSmartArtBounds = describeSmartArtBounds;
|
|
98633
100533
|
exports.describeSmartArtDiagram = describeSmartArtDiagram;
|
|
98634
100534
|
exports.deserializeElementClipboard = deserializeElementClipboard;
|
|
98635
100535
|
exports.designCommandState = designCommandState;
|
|
100536
|
+
exports.detectHyperlinkTargetType = detectHyperlinkTargetType;
|
|
98636
100537
|
exports.detectOrientation = detectOrientation;
|
|
98637
100538
|
exports.detectTouchDevice = detectTouchDevice;
|
|
98638
100539
|
exports.diffOptionsAgainstBaseline = diffOptionsAgainstBaseline;
|
|
98639
100540
|
exports.diffSlideElements = diffSlideElements;
|
|
98640
100541
|
exports.diffTokens = diffTokens;
|
|
98641
100542
|
exports.diffViewerOptions = diffViewerOptions;
|
|
100543
|
+
exports.digitalSignaturesGroup = digitalSignaturesGroup;
|
|
98642
100544
|
exports.disableGlowPatch = disableGlowPatch;
|
|
98643
100545
|
exports.disableInnerShadowPatch = disableInnerShadowPatch;
|
|
98644
100546
|
exports.disableOuterShadowPatch = disableOuterShadowPatch;
|
|
@@ -98650,6 +100552,8 @@ exports.dispatchCropRequest = dispatchCropRequest;
|
|
|
98650
100552
|
exports.dispatchEditorKey = dispatchEditorKey;
|
|
98651
100553
|
exports.dispatchReadOnlyBannerIntent = dispatchReadOnlyBannerIntent;
|
|
98652
100554
|
exports.dispatchStatusBarIntent = dispatchStatusBarIntent;
|
|
100555
|
+
exports.documentPropertiesChanged = documentPropertiesChanged;
|
|
100556
|
+
exports.documentPropertiesGroup = documentPropertiesGroup;
|
|
98653
100557
|
exports.dominantDisplacement = dominantDisplacement;
|
|
98654
100558
|
exports.downloadBlob = downloadBlob;
|
|
98655
100559
|
exports.downloadDataUrl = downloadDataUrl;
|
|
@@ -98754,6 +100658,7 @@ exports.findConnectorSiteNear = findConnectorSiteNear;
|
|
|
98754
100658
|
exports.findEffectSoundCatalogueEntry = findEffectSoundCatalogueEntry;
|
|
98755
100659
|
exports.findEraserHitElementId = findEraserHitElementId;
|
|
98756
100660
|
exports.findHighlightClickTarget = findHighlightClickTarget;
|
|
100661
|
+
exports.findHighlightTargets = findHighlightTargets;
|
|
98757
100662
|
exports.findMediaBookmarkGatedSteps = findMediaBookmarkGatedSteps;
|
|
98758
100663
|
exports.findMediaElementByElementId = findMediaElementByElementId;
|
|
98759
100664
|
exports.findMediaEndGatedSteps = findMediaEndGatedSteps;
|
|
@@ -98780,6 +100685,7 @@ exports.flattenViewerOptions = flattenViewerOptions;
|
|
|
98780
100685
|
exports.followCommentEdit = followCommentEdit;
|
|
98781
100686
|
exports.followingText = followingText;
|
|
98782
100687
|
exports.fontAlignmentVerticalAlign = fontAlignmentVerticalAlign;
|
|
100688
|
+
exports.fontEmbeddingGroup = fontEmbeddingGroup;
|
|
98783
100689
|
exports.fontFamilyItems = fontFamilyItems;
|
|
98784
100690
|
exports.fontHomeControls = fontHomeControls;
|
|
98785
100691
|
exports.fontMimeForFormat = fontMimeForFormat;
|
|
@@ -99021,6 +100927,8 @@ exports.homeSnapshotTranslator = homeSnapshotTranslator;
|
|
|
99021
100927
|
exports.hostFontDownloadLock = hostFontDownloadLock;
|
|
99022
100928
|
exports.hostMenuLabel = hostMenuLabel;
|
|
99023
100929
|
exports.hslToRgb = hslToRgb;
|
|
100930
|
+
exports.hyperlinkEditDataFromAction = hyperlinkEditDataFromAction;
|
|
100931
|
+
exports.hyperlinkEditPatch = hyperlinkEditPatch;
|
|
99024
100932
|
exports.imageAdjustmentsPatch = imageAdjustmentsPatch;
|
|
99025
100933
|
exports.imageAdjustmentsStateOf = imageAdjustmentsStateOf;
|
|
99026
100934
|
exports.imageCropPatch = imageCropPatch;
|
|
@@ -99105,6 +101013,7 @@ exports.isKoreanLanguage = isKoreanLanguage;
|
|
|
99105
101013
|
exports.isLegacyBinaryPresentation = isLegacyBinaryPresentation;
|
|
99106
101014
|
exports.isLinkedTextBox = isLinkedTextBox;
|
|
99107
101015
|
exports.isLinkedTextBoxHead = isLinkedTextBoxHead;
|
|
101016
|
+
exports.isMarkedAsFinal = isMarkedAsFinal;
|
|
99108
101017
|
exports.isMasterViewEditable = isMasterViewEditable;
|
|
99109
101018
|
exports.isMediaCommandAnimation = isMediaCommandAnimation;
|
|
99110
101019
|
exports.isMediaEndGated = isMediaEndGated;
|
|
@@ -99142,6 +101051,7 @@ exports.isSettingLocked = isSettingLocked;
|
|
|
99142
101051
|
exports.isSettingVisible = isSettingVisible;
|
|
99143
101052
|
exports.isSupportedPresentationFile = isSupportedPresentationFile;
|
|
99144
101053
|
exports.isTabletViewport = isTabletViewport;
|
|
101054
|
+
exports.isValidInsertChartData = isValidInsertChartData;
|
|
99145
101055
|
exports.isValidRoomId = isValidRoomId;
|
|
99146
101056
|
exports.isVerticalTextDirection = isVerticalTextDirection;
|
|
99147
101057
|
exports.issueTrackKey = issueTrackKey;
|
|
@@ -99161,6 +101071,7 @@ exports.listChartFormatTargets = listChartFormatTargets;
|
|
|
99161
101071
|
exports.listChartUserShapeRows = listChartUserShapeRows;
|
|
99162
101072
|
exports.listCommentLocations = listCommentLocations;
|
|
99163
101073
|
exports.listMediaBookmarkOptions = listMediaBookmarkOptions;
|
|
101074
|
+
exports.listPackageSignatures = listPackageSignatures;
|
|
99164
101075
|
exports.listenForOutlineViewDismiss = listenForOutlineViewDismiss;
|
|
99165
101076
|
exports.loadAudienceContent = loadAudienceContent;
|
|
99166
101077
|
exports.loadDeckWebfontOutlines = loadDeckWebfontOutlines;
|
|
@@ -99184,6 +101095,8 @@ exports.mapReadingViewKey = mapReadingViewKey;
|
|
|
99184
101095
|
exports.mapSlideShowStartKey = mapSlideShowStartKey;
|
|
99185
101096
|
exports.mapSlideSorterKey = mapSlideSorterKey;
|
|
99186
101097
|
exports.markAnimationGroupActive = markAnimationGroupActive;
|
|
101098
|
+
exports.markAsFinalProperties = markAsFinalProperties;
|
|
101099
|
+
exports.markFindHighlights = markFindHighlights;
|
|
99187
101100
|
exports.markInsertedParagraph = markInsertedParagraph;
|
|
99188
101101
|
exports.maskEdgeDecl = maskEdgeDecl;
|
|
99189
101102
|
exports.maskEdgeInitialStyle = maskEdgeInitialStyle;
|
|
@@ -99217,6 +101130,7 @@ exports.measureViewportClientSize = measureViewportClientSize;
|
|
|
99217
101130
|
exports.measureWarpParagraphWidth = measureWarpParagraphWidth;
|
|
99218
101131
|
exports.mediaControlBarEnabled = mediaControlBarEnabled;
|
|
99219
101132
|
exports.mediaControlBarVisible = mediaControlBarVisible;
|
|
101133
|
+
exports.mediaElementFromFile = mediaElementFromFile;
|
|
99220
101134
|
exports.mediaFallbackIcon = mediaFallbackIcon;
|
|
99221
101135
|
exports.mediaFallbackLabelKey = mediaFallbackLabelKey;
|
|
99222
101136
|
exports.mediaFallbackVisual = mediaFallbackVisual;
|
|
@@ -99294,6 +101208,7 @@ exports.normalizeFontFormat = normalizeFontFormat;
|
|
|
99294
101208
|
exports.normalizeNotesLinkUrl = normalizeNotesLinkUrl;
|
|
99295
101209
|
exports.normalizeOutlinePair = normalizeOutlinePair;
|
|
99296
101210
|
exports.normalizeRegion = normalizeRegion;
|
|
101211
|
+
exports.normalizeRibbonDisplayMode = normalizeRibbonDisplayMode;
|
|
99297
101212
|
exports.normalizeSegments = normalizeSegments;
|
|
99298
101213
|
exports.normalizeSubtitleSettings = normalizeSubtitleSettings;
|
|
99299
101214
|
exports.normalizeWheelDelta = normalizeWheelDelta;
|
|
@@ -99354,6 +101269,8 @@ exports.parseEditPointsTarget = parseEditPointsTarget;
|
|
|
99354
101269
|
exports.parseGradientCssStops = parseGradientCssStops;
|
|
99355
101270
|
exports.parseHexColor = parseHexColor;
|
|
99356
101271
|
exports.parseHexToRgb = parseHexToRgb;
|
|
101272
|
+
exports.parseHyperlinkEmailUrl = parseHyperlinkEmailUrl;
|
|
101273
|
+
exports.parseHyperlinkSlideNumber = parseHyperlinkSlideNumber;
|
|
99357
101274
|
exports.parseMediaCommand = parseMediaCommand;
|
|
99358
101275
|
exports.parseOoxmlBezierCurve = parseOoxmlBezierCurve;
|
|
99359
101276
|
exports.parseOptionValueKey = parseOptionValueKey;
|
|
@@ -99368,6 +101285,7 @@ exports.parseSvgPath = parseSvgPath;
|
|
|
99368
101285
|
exports.parseViewBox = parseViewBox;
|
|
99369
101286
|
exports.partitionMasterViewElements = partitionMasterViewElements;
|
|
99370
101287
|
exports.passesClicksThroughBox = passesClicksThroughBox;
|
|
101288
|
+
exports.passwordProtectionGroup = passwordProtectionGroup;
|
|
99371
101289
|
exports.pasteElementHasText = pasteElementHasText;
|
|
99372
101290
|
exports.patchChartData = patchChartData;
|
|
99373
101291
|
exports.patchHeaderFooterDraft = patchHeaderFooterDraft;
|
|
@@ -99387,6 +101305,7 @@ exports.placeCaretAt = placeCaretAt;
|
|
|
99387
101305
|
exports.placeCaretAtEnd = placeCaretAtEnd;
|
|
99388
101306
|
exports.placeTileOnPage = placeTileOnPage;
|
|
99389
101307
|
exports.placeholderPromptDescriptor = placeholderPromptDescriptor;
|
|
101308
|
+
exports.planDocumentPropertiesPatch = planDocumentPropertiesPatch;
|
|
99390
101309
|
exports.planFindReplace = planFindReplace;
|
|
99391
101310
|
exports.planGifFrames = planGifFrames;
|
|
99392
101311
|
exports.planMergeShapes = planMergeShapes;
|
|
@@ -99439,6 +101358,7 @@ exports.printJobRasterFallback = printJobRasterFallback;
|
|
|
99439
101358
|
exports.probeAutosaveRecovery = probeAutosaveRecovery;
|
|
99440
101359
|
exports.probeMaxCanvasDimension = probeMaxCanvasDimension;
|
|
99441
101360
|
exports.probeNativeImageSize = probeNativeImageSize;
|
|
101361
|
+
exports.probeVideoSize = probeVideoSize;
|
|
99442
101362
|
exports.projectDrawingShapes = projectDrawingShapes;
|
|
99443
101363
|
exports.projectSmartArtViewBoxRect = projectSmartArtViewBoxRect;
|
|
99444
101364
|
exports.promote = promote;
|
|
@@ -99514,6 +101434,7 @@ exports.reflowToDrawingShapes = reflowToDrawingShapes;
|
|
|
99514
101434
|
exports.refreshSilhouetteMorphFilters = refreshSilhouetteMorphFilters;
|
|
99515
101435
|
exports.refreshSmartArtPictureImage = refreshSmartArtPictureImage;
|
|
99516
101436
|
exports.regionArea = regionArea;
|
|
101437
|
+
exports.registerBuildingBlockGroups = registerBuildingBlockGroups;
|
|
99517
101438
|
exports.registerCollaborationTeardown = registerCollaborationTeardown;
|
|
99518
101439
|
exports.registerCrossSlideAudio = registerCrossSlideAudio;
|
|
99519
101440
|
exports.registerInlineListParagraphFormat = registerInlineListParagraphFormat;
|
|
@@ -99545,6 +101466,7 @@ exports.resetGlyphTraceCache = resetGlyphTraceCache;
|
|
|
99545
101466
|
exports.resetGoogleWebfontSessionCache = resetGoogleWebfontSessionCache;
|
|
99546
101467
|
exports.resetMetricTrackingCache = resetMetricTrackingCache;
|
|
99547
101468
|
exports.resetPresenterTimer = resetPresenterTimer;
|
|
101469
|
+
exports.resetViewportScroll = resetViewportScroll;
|
|
99548
101470
|
exports.resizeSelection = resizeSelection;
|
|
99549
101471
|
exports.resolve3DRenderingFlags = resolve3DRenderingFlags;
|
|
99550
101472
|
exports.resolveAbuttingEdgeBleeds = resolveAbuttingEdgeBleeds;
|
|
@@ -99567,6 +101489,7 @@ exports.resolveAutosaveFileKey = resolveAutosaveFileKey;
|
|
|
99567
101489
|
exports.resolveAutosaveIntervalMs = resolveAutosaveIntervalMs;
|
|
99568
101490
|
exports.resolveAutosaveIntervalSeconds = resolveAutosaveIntervalSeconds;
|
|
99569
101491
|
exports.resolveBlockFont = resolveBlockFont;
|
|
101492
|
+
exports.resolveBuildingBlockMode = resolveBuildingBlockMode;
|
|
99570
101493
|
exports.resolveChartBuildMode = resolveChartBuildMode;
|
|
99571
101494
|
exports.resolveChartFormatTarget = resolveChartFormatTarget;
|
|
99572
101495
|
exports.resolveChartRevealDescriptor = resolveChartRevealDescriptor;
|
|
@@ -99580,6 +101503,7 @@ exports.resolveColorChangedImageSource = resolveColorChangedImageSource;
|
|
|
99580
101503
|
exports.resolveConnectorEndpointUpdate = resolveConnectorEndpointUpdate;
|
|
99581
101504
|
exports.resolveCssProperties = resolveCssProperties;
|
|
99582
101505
|
exports.resolveCssTextAlign = resolveCssTextAlign;
|
|
101506
|
+
exports.resolveCustomShowStart = resolveCustomShowStart;
|
|
99583
101507
|
exports.resolveCustomization = resolveCustomization;
|
|
99584
101508
|
exports.resolveDefaultPrintSettings = resolveDefaultPrintSettings;
|
|
99585
101509
|
exports.resolveDiagramBuildMode = resolveDiagramBuildMode;
|
|
@@ -99617,6 +101541,7 @@ exports.resolveGroupDoubleClickTarget = resolveGroupDoubleClickTarget;
|
|
|
99617
101541
|
exports.resolveGroupPressTarget = resolveGroupPressTarget;
|
|
99618
101542
|
exports.resolveHighlightClickForElementId = resolveHighlightClickForElementId;
|
|
99619
101543
|
exports.resolveHistoryDepth = resolveHistoryDepth;
|
|
101544
|
+
exports.resolveHyperlinkEditResult = resolveHyperlinkEditResult;
|
|
99620
101545
|
exports.resolveHyperlinkTargetAttrs = resolveHyperlinkTargetAttrs;
|
|
99621
101546
|
exports.resolveImageResolutionPpi = resolveImageResolutionPpi;
|
|
99622
101547
|
exports.resolveImageResolutionScale = resolveImageResolutionScale;
|
|
@@ -99679,6 +101604,7 @@ exports.resolveShowForward = resolveShowForward;
|
|
|
99679
101604
|
exports.resolveShowSlideIndexes = resolveShowSlideIndexes;
|
|
99680
101605
|
exports.resolveSlideOutlineElements = resolveSlideOutlineElements;
|
|
99681
101606
|
exports.resolveSlidePaneClick = resolveSlidePaneClick;
|
|
101607
|
+
exports.resolveSlideShowSettings = resolveSlideShowSettings;
|
|
99682
101608
|
exports.resolveSlideSizeSelection = resolveSlideSizeSelection;
|
|
99683
101609
|
exports.resolveSlideTitle = resolveSlideTitle;
|
|
99684
101610
|
exports.resolveSlideTransition = resolveSlideTransition;
|
|
@@ -99740,6 +101666,8 @@ exports.ribbonAddInControlId = ribbonAddInControlId;
|
|
|
99740
101666
|
exports.ribbonAddInGroupViews = ribbonAddInGroupViews;
|
|
99741
101667
|
exports.ribbonControlAttrs = ribbonControlAttrs;
|
|
99742
101668
|
exports.ribbonCustomizationCss = ribbonCustomizationCss;
|
|
101669
|
+
exports.ribbonDisplayLayout = ribbonDisplayLayout;
|
|
101670
|
+
exports.ribbonDisplayMenu = ribbonDisplayMenu;
|
|
99743
101671
|
exports.ribbonGroupAttrs = ribbonGroupAttrs;
|
|
99744
101672
|
exports.ribbonGroupOfControl = ribbonGroupOfControl;
|
|
99745
101673
|
exports.ribbonGroupViews = ribbonGroupViews;
|
|
@@ -99753,6 +101681,7 @@ exports.routeEditLayerPointerToNodes = routeEditLayerPointerToNodes;
|
|
|
99753
101681
|
exports.rowHandleSegments = rowHandleSegments;
|
|
99754
101682
|
exports.rowIndexAtOffset = rowIndexAtOffset;
|
|
99755
101683
|
exports.rulerDragToGuidePosition = rulerDragToGuidePosition;
|
|
101684
|
+
exports.runBuildingBlockToolbarControl = runBuildingBlockToolbarControl;
|
|
99756
101685
|
exports.runEditPointsCommand = runEditPointsCommand;
|
|
99757
101686
|
exports.runEquationMathMl = runEquationMathMl;
|
|
99758
101687
|
exports.runMediaCommand = runMediaCommand;
|
|
@@ -99817,6 +101746,7 @@ exports.selectedBookmarkOptionValue = selectedBookmarkOptionValue;
|
|
|
99817
101746
|
exports.selectedParagraphBulletKind = selectedParagraphBulletKind;
|
|
99818
101747
|
exports.selectionBounds = selectionBounds;
|
|
99819
101748
|
exports.selectionBulletKind = selectionBulletKind;
|
|
101749
|
+
exports.selectionEquation = selectionEquation;
|
|
99820
101750
|
exports.serializeElementClipboard = serializeElementClipboard;
|
|
99821
101751
|
exports.serializeShapeAdjustments = serializeShapeAdjustments;
|
|
99822
101752
|
exports.serializeSvgPath = serializeSvgPath;
|
|
@@ -99836,6 +101766,7 @@ exports.setPendingCaretPoint = setPendingCaretPoint;
|
|
|
99836
101766
|
exports.setPendingSelectionRestore = setPendingSelectionRestore;
|
|
99837
101767
|
exports.setSelectionBullets = setSelectionBullets;
|
|
99838
101768
|
exports.setTriggerBookmark = setTriggerBookmark;
|
|
101769
|
+
exports.setUpSlideShowGroup = setUpSlideShowGroup;
|
|
99839
101770
|
exports.settleBaselines = settleBaselines;
|
|
99840
101771
|
exports.settleThemeWrites = settleThemeWrites;
|
|
99841
101772
|
exports.shapeGalleryItem = shapeGalleryItem;
|
|
@@ -99847,6 +101778,7 @@ exports.shapeStyleWithoutFormatting = shapeStyleWithoutFormatting;
|
|
|
99847
101778
|
exports.shapeThumbnailPath = shapeThumbnailPath;
|
|
99848
101779
|
exports.shapeTileSvg = shapeTileSvg;
|
|
99849
101780
|
exports.sheetAfterNavigate = sheetAfterNavigate;
|
|
101781
|
+
exports.shortcutsGroup = shortcutsGroup;
|
|
99850
101782
|
exports.shortestRotationTarget = shortestRotationTarget;
|
|
99851
101783
|
exports.shouldAutoFollowBroadcaster = shouldAutoFollowBroadcaster;
|
|
99852
101784
|
exports.shouldAutoHide = shouldAutoHide;
|
|
@@ -99957,6 +101889,7 @@ exports.svgTile = svgTile;
|
|
|
99957
101889
|
exports.svgToDataUrl = svgToDataUrl;
|
|
99958
101890
|
exports.swapPresentationWindows = swapPresentationWindows;
|
|
99959
101891
|
exports.switchSmartArtLayoutData = switchSmartArtLayoutData;
|
|
101892
|
+
exports.syncFindHighlights = syncFindHighlights;
|
|
99960
101893
|
exports.syncGoogleWebfontStylesheet = syncGoogleWebfontStylesheet;
|
|
99961
101894
|
exports.tabRowActionsAttributes = tabRowActionsAttributes;
|
|
99962
101895
|
exports.tableCellCss = tableCellCss;
|
|
@@ -100002,12 +101935,14 @@ exports.toCssVerticalDirection = toCssVerticalDirection;
|
|
|
100002
101935
|
exports.toCssWritingMode = toCssWritingMode;
|
|
100003
101936
|
exports.toElementAxes = toElementAxes;
|
|
100004
101937
|
exports.toGestureTransform = toGestureTransform;
|
|
101938
|
+
exports.toHostSignatureInfo = toHostSignatureInfo;
|
|
100005
101939
|
exports.toSlideIndex = toSlideIndex;
|
|
100006
101940
|
exports.toggle = toggle;
|
|
100007
101941
|
exports.toggleBlackboard = toggleBlackboard;
|
|
100008
101942
|
exports.toggleCommentResolvedInList = toggleCommentResolvedInList;
|
|
100009
101943
|
exports.toggleInList = toggleInList;
|
|
100010
101944
|
exports.togglePresenterTimer = togglePresenterTimer;
|
|
101945
|
+
exports.toggleRibbonCollapsed = toggleRibbonCollapsed;
|
|
100011
101946
|
exports.toggleSelectionBullets = toggleSelectionBullets;
|
|
100012
101947
|
exports.toggleSheet = toggleSheet;
|
|
100013
101948
|
exports.toggleStageElementMedia = toggleStageElementMedia;
|
|
@@ -100039,9 +101974,13 @@ exports.updateSubtitleSettings = updateSubtitleSettings;
|
|
|
100039
101974
|
exports.updateTagInCollections = updateTagInCollections;
|
|
100040
101975
|
exports.updateViewerPreference = updateViewerPreference;
|
|
100041
101976
|
exports.vAlignPatch = vAlignPatch;
|
|
101977
|
+
exports.validateHostImageFile = validateHostImageFile;
|
|
101978
|
+
exports.validateHostMediaFile = validateHostMediaFile;
|
|
100042
101979
|
exports.validateMediaTrimRange = validateMediaTrimRange;
|
|
101980
|
+
exports.validateOpenPassword = validateOpenPassword;
|
|
100043
101981
|
exports.validatePasswordPair = validatePasswordPair;
|
|
100044
101982
|
exports.validateRoomId = validateRoomId;
|
|
101983
|
+
exports.validateSlideShowSettings = validateSlideShowSettings;
|
|
100045
101984
|
exports.viewLabel = viewLabel;
|
|
100046
101985
|
exports.viewPropertiesPatchFromPreferences = viewPropertiesPatchFromPreferences;
|
|
100047
101986
|
exports.viewerOptionsToPreferences = viewerOptionsToPreferences;
|