pptx-react-viewer 2.13.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/{AiChatPanel-DEI3EQFM.js → AiChatPanel-FXPGFU6H.js} +35 -27
- package/dist/AiChatPanel-FXPGFU6H.js.br +0 -0
- package/dist/AiChatPanel-FXPGFU6H.js.gz +0 -0
- package/dist/{AiChatPanel-4YS6DEIT.mjs → AiChatPanel-WMGS5TNX.mjs} +15 -7
- package/dist/AiChatPanel-WMGS5TNX.mjs.br +0 -0
- package/dist/AiChatPanel-WMGS5TNX.mjs.gz +0 -0
- package/dist/{Model3DScene-JSNQCKCJ.mjs → Model3DScene-E2XRQAMR.mjs} +1 -1
- package/dist/Model3DScene-E2XRQAMR.mjs.br +0 -0
- package/dist/Model3DScene-E2XRQAMR.mjs.gz +0 -0
- package/dist/{Model3DScene-X4W7GZVY.js → Model3DScene-K5FPZTRG.js} +2 -2
- package/dist/Model3DScene-K5FPZTRG.js.br +0 -0
- package/dist/Model3DScene-K5FPZTRG.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-3MSU74YH.mjs → SurfaceChart3DScene-2W2IFPLE.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-3MSU74YH.mjs.br → SurfaceChart3DScene-2W2IFPLE.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-2W2IFPLE.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-IZLUWT27.js → SurfaceChart3DScene-JDCFTXYT.js} +2 -2
- package/dist/SurfaceChart3DScene-JDCFTXYT.js.br +0 -0
- package/dist/SurfaceChart3DScene-JDCFTXYT.js.gz +0 -0
- package/dist/{chunk-YA7VFYTW.mjs → chunk-3OV4FR6S.mjs} +16 -7
- package/dist/chunk-3OV4FR6S.mjs.br +0 -0
- package/dist/chunk-3OV4FR6S.mjs.gz +0 -0
- package/dist/{chunk-IDW5UPXW.js → chunk-66ZHD7Y4.js} +259 -295
- package/dist/chunk-66ZHD7Y4.js.br +0 -0
- package/dist/chunk-66ZHD7Y4.js.gz +0 -0
- package/dist/{chunk-WEU5EMKK.mjs → chunk-CQ2CKMG4.mjs} +1 -1
- package/dist/chunk-CQ2CKMG4.mjs.br +0 -0
- package/dist/{chunk-WEU5EMKK.mjs.gz → chunk-CQ2CKMG4.mjs.gz} +0 -0
- package/dist/{chunk-EFSQW6S5.js → chunk-DD2YRS6Z.js} +557 -303
- package/dist/chunk-DD2YRS6Z.js.br +0 -0
- package/dist/chunk-DD2YRS6Z.js.gz +0 -0
- package/dist/{chunk-HRLF4REI.mjs → chunk-GJEH27GD.mjs} +21 -56
- package/dist/chunk-GJEH27GD.mjs.br +0 -0
- package/dist/chunk-GJEH27GD.mjs.gz +0 -0
- package/dist/{chunk-6KRNQ2KF.mjs → chunk-H5H57XMH.mjs} +16 -2
- package/dist/chunk-H5H57XMH.mjs.br +0 -0
- package/dist/chunk-H5H57XMH.mjs.gz +0 -0
- package/dist/{chunk-4TD7EINA.mjs → chunk-OWGPRVRK.mjs} +553 -304
- package/dist/chunk-OWGPRVRK.mjs.br +0 -0
- package/dist/chunk-OWGPRVRK.mjs.gz +0 -0
- package/dist/{chunk-G2LZT5SV.js → chunk-PTFCMG3A.js} +3 -3
- package/dist/chunk-PTFCMG3A.js.br +0 -0
- package/dist/chunk-PTFCMG3A.js.gz +0 -0
- package/dist/{chunk-RWIQHVZQ.js → chunk-QFNJCEMS.js} +340 -326
- package/dist/chunk-QFNJCEMS.js.br +0 -0
- package/dist/chunk-QFNJCEMS.js.gz +0 -0
- package/dist/{chunk-SHZ3GWOD.js → chunk-ZMIFFURL.js} +1046 -1037
- package/dist/chunk-ZMIFFURL.js.br +0 -0
- package/dist/chunk-ZMIFFURL.js.gz +0 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +34 -34
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +14 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +14 -0
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-4YS6DEIT.mjs.br +0 -0
- package/dist/AiChatPanel-4YS6DEIT.mjs.gz +0 -0
- package/dist/AiChatPanel-DEI3EQFM.js.br +0 -0
- package/dist/AiChatPanel-DEI3EQFM.js.gz +0 -0
- package/dist/Model3DScene-JSNQCKCJ.mjs.br +0 -0
- package/dist/Model3DScene-JSNQCKCJ.mjs.gz +0 -0
- package/dist/Model3DScene-X4W7GZVY.js.br +0 -0
- package/dist/Model3DScene-X4W7GZVY.js.gz +0 -0
- package/dist/SurfaceChart3DScene-3MSU74YH.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-IZLUWT27.js.br +0 -0
- package/dist/SurfaceChart3DScene-IZLUWT27.js.gz +0 -0
- package/dist/chunk-4TD7EINA.mjs.br +0 -0
- package/dist/chunk-4TD7EINA.mjs.gz +0 -0
- package/dist/chunk-6KRNQ2KF.mjs.br +0 -0
- package/dist/chunk-6KRNQ2KF.mjs.gz +0 -0
- package/dist/chunk-EFSQW6S5.js.br +0 -0
- package/dist/chunk-EFSQW6S5.js.gz +0 -0
- package/dist/chunk-G2LZT5SV.js.br +0 -0
- package/dist/chunk-G2LZT5SV.js.gz +0 -0
- package/dist/chunk-HRLF4REI.mjs.br +0 -0
- package/dist/chunk-HRLF4REI.mjs.gz +0 -0
- package/dist/chunk-IDW5UPXW.js.br +0 -0
- package/dist/chunk-IDW5UPXW.js.gz +0 -0
- package/dist/chunk-RWIQHVZQ.js.br +0 -0
- package/dist/chunk-RWIQHVZQ.js.gz +0 -0
- package/dist/chunk-SHZ3GWOD.js.br +0 -0
- package/dist/chunk-SHZ3GWOD.js.gz +0 -0
- package/dist/chunk-WEU5EMKK.mjs.br +0 -0
- package/dist/chunk-YA7VFYTW.mjs.br +0 -0
- package/dist/chunk-YA7VFYTW.mjs.gz +0 -0
|
@@ -15903,30 +15903,133 @@ var PptxCommentXmlFactoryProvider = class {
|
|
|
15903
15903
|
return new PptxCommentAuthorsXmlFactory();
|
|
15904
15904
|
}
|
|
15905
15905
|
};
|
|
15906
|
+
var P14_TRANSITION_TYPES = /* @__PURE__ */ new Set([
|
|
15907
|
+
"conveyor",
|
|
15908
|
+
"doors",
|
|
15909
|
+
"ferris",
|
|
15910
|
+
"flash",
|
|
15911
|
+
"flythrough",
|
|
15912
|
+
"gallery",
|
|
15913
|
+
"glitter",
|
|
15914
|
+
"honeycomb",
|
|
15915
|
+
"pan",
|
|
15916
|
+
"prism",
|
|
15917
|
+
"reveal",
|
|
15918
|
+
"ripple",
|
|
15919
|
+
"shred",
|
|
15920
|
+
"switch",
|
|
15921
|
+
"vortex",
|
|
15922
|
+
"warp",
|
|
15923
|
+
"wheelReverse",
|
|
15924
|
+
"window",
|
|
15925
|
+
"cube",
|
|
15926
|
+
"flip",
|
|
15927
|
+
"rotate",
|
|
15928
|
+
"orbit"
|
|
15929
|
+
]);
|
|
15930
|
+
function readP14Details(localName22, value) {
|
|
15931
|
+
const type = localName22;
|
|
15932
|
+
let direction;
|
|
15933
|
+
let orient;
|
|
15934
|
+
let pattern;
|
|
15935
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
15936
|
+
const detail = value;
|
|
15937
|
+
const rawDir = String(detail["@_dir"] || "").trim();
|
|
15938
|
+
if (rawDir.length > 0) {
|
|
15939
|
+
direction = rawDir;
|
|
15940
|
+
}
|
|
15941
|
+
const rawOrient = String(detail["@_orient"] || "").trim();
|
|
15942
|
+
if (rawOrient === "horz" || rawOrient === "vert") {
|
|
15943
|
+
orient = rawOrient;
|
|
15944
|
+
}
|
|
15945
|
+
const rawPattern = String(detail["@_pattern"] || "").trim();
|
|
15946
|
+
if (rawPattern.length > 0) {
|
|
15947
|
+
pattern = rawPattern;
|
|
15948
|
+
}
|
|
15949
|
+
}
|
|
15950
|
+
return { type, direction, orient, pattern };
|
|
15951
|
+
}
|
|
15952
|
+
function parseP14DirectChild(transitionNode, getXmlLocalName) {
|
|
15953
|
+
for (const [key, value] of Object.entries(transitionNode)) {
|
|
15954
|
+
if (key.startsWith("@_")) {
|
|
15955
|
+
continue;
|
|
15956
|
+
}
|
|
15957
|
+
const localName22 = getXmlLocalName(key);
|
|
15958
|
+
if (P14_TRANSITION_TYPES.has(localName22)) {
|
|
15959
|
+
return readP14Details(localName22, value);
|
|
15960
|
+
}
|
|
15961
|
+
}
|
|
15962
|
+
return void 0;
|
|
15963
|
+
}
|
|
15964
|
+
function parseP14FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
15965
|
+
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
15966
|
+
for (const ext of extEntries) {
|
|
15967
|
+
if (!ext) {
|
|
15968
|
+
continue;
|
|
15969
|
+
}
|
|
15970
|
+
for (const [key, value] of Object.entries(ext)) {
|
|
15971
|
+
if (key.startsWith("@_")) {
|
|
15972
|
+
continue;
|
|
15973
|
+
}
|
|
15974
|
+
const localName22 = getXmlLocalName(key);
|
|
15975
|
+
if (!P14_TRANSITION_TYPES.has(localName22)) {
|
|
15976
|
+
continue;
|
|
15977
|
+
}
|
|
15978
|
+
return readP14Details(localName22, value);
|
|
15979
|
+
}
|
|
15980
|
+
}
|
|
15981
|
+
return void 0;
|
|
15982
|
+
}
|
|
15983
|
+
function buildP14ExtLst(transitionType, direction, orient, pattern, rawExtLst, xmlLookupService, getXmlLocalName) {
|
|
15984
|
+
const p14Child = {};
|
|
15985
|
+
const dir = String(direction || "").trim();
|
|
15986
|
+
if (dir.length > 0) {
|
|
15987
|
+
p14Child["@_dir"] = dir;
|
|
15988
|
+
}
|
|
15989
|
+
if (orient) {
|
|
15990
|
+
p14Child["@_orient"] = orient;
|
|
15991
|
+
}
|
|
15992
|
+
if (pattern) {
|
|
15993
|
+
p14Child["@_pattern"] = pattern;
|
|
15994
|
+
}
|
|
15995
|
+
const transitionExt = {
|
|
15996
|
+
"@_uri": "{CE6CE671-F284-4235-B8B7-4F3F06D5A82C}",
|
|
15997
|
+
[`p14:${transitionType}`]: p14Child
|
|
15998
|
+
};
|
|
15999
|
+
if (rawExtLst) {
|
|
16000
|
+
const existing = xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
16001
|
+
const otherExts = existing.filter((ext) => {
|
|
16002
|
+
if (!ext) {
|
|
16003
|
+
return false;
|
|
16004
|
+
}
|
|
16005
|
+
for (const key of Object.keys(ext)) {
|
|
16006
|
+
if (key.startsWith("@_")) {
|
|
16007
|
+
continue;
|
|
16008
|
+
}
|
|
16009
|
+
const localName22 = getXmlLocalName(key);
|
|
16010
|
+
if (P14_TRANSITION_TYPES.has(localName22)) {
|
|
16011
|
+
return false;
|
|
16012
|
+
}
|
|
16013
|
+
}
|
|
16014
|
+
return true;
|
|
16015
|
+
});
|
|
16016
|
+
const allExts = [transitionExt, ...otherExts];
|
|
16017
|
+
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
16018
|
+
}
|
|
16019
|
+
return { "p:ext": transitionExt };
|
|
16020
|
+
}
|
|
15906
16021
|
var MC_NAMESPACE_CAPABILITIES = {
|
|
16022
|
+
// Office 2010 (p14) transitions are shared with the parser's canonical
|
|
16023
|
+
// list (`P14_TRANSITION_TYPES`) so the two can never drift apart again:
|
|
16024
|
+
// this set used to be a hand-copied subset that was missing `reveal` and
|
|
16025
|
+
// `ripple`, so every `mc:Choice Requires="p14"` carrying one of them
|
|
16026
|
+
// reported `UNSUPPORTED_ALTERNATE_CONTENT_CHOICE` and silently used the
|
|
16027
|
+
// fallback fade even though the parser handles both. The extra names are
|
|
16028
|
+
// the non-transition p14 features we also parse.
|
|
15907
16029
|
p14: /* @__PURE__ */ new Set([
|
|
16030
|
+
...P14_TRANSITION_TYPES,
|
|
15908
16031
|
"transition",
|
|
15909
|
-
"conveyor",
|
|
15910
|
-
"pan",
|
|
15911
|
-
"glitter",
|
|
15912
|
-
"prism",
|
|
15913
|
-
"vortex",
|
|
15914
|
-
"switch",
|
|
15915
|
-
"flip",
|
|
15916
|
-
"gallery",
|
|
15917
|
-
"honeycomb",
|
|
15918
|
-
"flash",
|
|
15919
|
-
"shred",
|
|
15920
|
-
"warp",
|
|
15921
|
-
"flythrough",
|
|
15922
|
-
"doors",
|
|
15923
|
-
"window",
|
|
15924
|
-
"ferris",
|
|
15925
16032
|
"newsflash",
|
|
15926
|
-
"wheelReverse",
|
|
15927
|
-
"rotate",
|
|
15928
|
-
"orbit",
|
|
15929
|
-
"cube",
|
|
15930
16033
|
"media",
|
|
15931
16034
|
"trim",
|
|
15932
16035
|
"fade",
|
|
@@ -15935,6 +16038,17 @@ var MC_NAMESPACE_CAPABILITIES = {
|
|
|
15935
16038
|
"hiddenFill",
|
|
15936
16039
|
"hiddenLine"
|
|
15937
16040
|
]),
|
|
16041
|
+
// PowerPoint 2013+ writes its preset transitions (Origami, Fracture, Peel
|
|
16042
|
+
// Off, Page Curl, ...) as `<p15:prstTrans prst="...">`, either inside an
|
|
16043
|
+
// `mc:Choice Requires="p15"` or in a `p:transition/p:extLst` extension.
|
|
16044
|
+
// Both forms are parsed (see `PptxSlideTransitionService`), so the choice
|
|
16045
|
+
// IS supported: without this entry every p15 slide reported
|
|
16046
|
+
// `UNSUPPORTED_ALTERNATE_CONTENT_CHOICE`, which reads as "the transition
|
|
16047
|
+
// was dropped and the fallback fade was used" when in fact the preset
|
|
16048
|
+
// plays. `prstTrans` alone is listed on purpose: any OTHER `p15:*`
|
|
16049
|
+
// element still makes the choice unsupported and falls back, which is
|
|
16050
|
+
// the honest answer.
|
|
16051
|
+
p15: /* @__PURE__ */ new Set(["prstTrans"]),
|
|
15938
16052
|
// PowerPoint 2016+ writes the Morph transition as `<p159:morph @option>`,
|
|
15939
16053
|
// either inside an `mc:Choice Requires="p159"` or in a `p:transition/p:extLst`
|
|
15940
16054
|
// extension. Both forms are parsed (see `PptxSlideTransitionService`), so the
|
|
@@ -19911,6 +20025,74 @@ function extractChildBehaviourDurationMs(cTn, toArray2) {
|
|
|
19911
20025
|
}
|
|
19912
20026
|
return longest;
|
|
19913
20027
|
}
|
|
20028
|
+
var defaultLookup = new PptxXmlLookupService();
|
|
20029
|
+
function resolveSlideTimingNode(slideRoot) {
|
|
20030
|
+
const direct = slideRoot?.["p:timing"];
|
|
20031
|
+
if (direct && typeof direct === "object" && !Array.isArray(direct)) {
|
|
20032
|
+
return direct;
|
|
20033
|
+
}
|
|
20034
|
+
return findEnvelopeChildByLocalName(slideRoot, "timing", defaultLookup);
|
|
20035
|
+
}
|
|
20036
|
+
function findTransitionInAlternateContent(slideRoot, lookup) {
|
|
20037
|
+
return findEnvelopeChildByLocalName(slideRoot, "transition", lookup);
|
|
20038
|
+
}
|
|
20039
|
+
function findEnvelopeChildByLocalName(slideRoot, localName22, lookup) {
|
|
20040
|
+
for (const envelope of lookup.getChildrenArrayByLocalName(slideRoot, "AlternateContent")) {
|
|
20041
|
+
let unsupportedChoiceNode;
|
|
20042
|
+
for (const choice of lookup.getChildrenArrayByLocalName(envelope, "Choice")) {
|
|
20043
|
+
const node = lookup.getChildByLocalName(choice, localName22);
|
|
20044
|
+
if (!node) {
|
|
20045
|
+
continue;
|
|
20046
|
+
}
|
|
20047
|
+
if (isAlternateContentChoiceSupported(choice)) {
|
|
20048
|
+
return node;
|
|
20049
|
+
}
|
|
20050
|
+
unsupportedChoiceNode ??= node;
|
|
20051
|
+
}
|
|
20052
|
+
const fallbackNode = lookup.getChildByLocalName(
|
|
20053
|
+
lookup.getChildByLocalName(envelope, "Fallback"),
|
|
20054
|
+
localName22
|
|
20055
|
+
);
|
|
20056
|
+
const found = fallbackNode ?? unsupportedChoiceNode;
|
|
20057
|
+
if (found) {
|
|
20058
|
+
return found;
|
|
20059
|
+
}
|
|
20060
|
+
}
|
|
20061
|
+
return void 0;
|
|
20062
|
+
}
|
|
20063
|
+
function preservedP14ChildKey(node, transitionType, getXmlLocalName) {
|
|
20064
|
+
for (const key of Object.keys(node)) {
|
|
20065
|
+
if (!key.startsWith("@_") && getXmlLocalName(key) === transitionType) {
|
|
20066
|
+
return key;
|
|
20067
|
+
}
|
|
20068
|
+
}
|
|
20069
|
+
return void 0;
|
|
20070
|
+
}
|
|
20071
|
+
function preservedP15ChildKey(node, transitionType, getXmlLocalName) {
|
|
20072
|
+
for (const [key, value] of Object.entries(node)) {
|
|
20073
|
+
if (key.startsWith("@_") || getXmlLocalName(key) !== "prstTrans") {
|
|
20074
|
+
continue;
|
|
20075
|
+
}
|
|
20076
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
20077
|
+
continue;
|
|
20078
|
+
}
|
|
20079
|
+
if (String(value["@_prst"] || "").trim() === transitionType) {
|
|
20080
|
+
return key;
|
|
20081
|
+
}
|
|
20082
|
+
}
|
|
20083
|
+
return void 0;
|
|
20084
|
+
}
|
|
20085
|
+
function pruneDirectExtensionChildren(node, getXmlLocalName, keepKey) {
|
|
20086
|
+
for (const key of Object.keys(node)) {
|
|
20087
|
+
if (key === keepKey || key.startsWith("@_")) {
|
|
20088
|
+
continue;
|
|
20089
|
+
}
|
|
20090
|
+
const localName22 = getXmlLocalName(key);
|
|
20091
|
+
if (P14_TRANSITION_TYPES.has(localName22) || localName22 === "prstTrans") {
|
|
20092
|
+
delete node[key];
|
|
20093
|
+
}
|
|
20094
|
+
}
|
|
20095
|
+
}
|
|
19914
20096
|
function isInteractiveSequence(seq) {
|
|
19915
20097
|
const cTn = seq["p:cTn"];
|
|
19916
20098
|
if (!cTn || String(cTn["@_nodeType"] || "") === "mainSeq") {
|
|
@@ -19932,7 +20114,7 @@ var PptxNativeAnimationService = class {
|
|
|
19932
20114
|
*/
|
|
19933
20115
|
parseNativeAnimations(slideXml2) {
|
|
19934
20116
|
try {
|
|
19935
|
-
const timing = slideXml2?.["p:sld"]
|
|
20117
|
+
const timing = resolveSlideTimingNode(slideXml2?.["p:sld"]);
|
|
19936
20118
|
if (!timing || typeof timing !== "object") {
|
|
19937
20119
|
return void 0;
|
|
19938
20120
|
}
|
|
@@ -20310,106 +20492,6 @@ var PptxNativeAnimationService = class {
|
|
|
20310
20492
|
}
|
|
20311
20493
|
}
|
|
20312
20494
|
};
|
|
20313
|
-
var P14_TRANSITION_TYPES = /* @__PURE__ */ new Set([
|
|
20314
|
-
"conveyor",
|
|
20315
|
-
"doors",
|
|
20316
|
-
"ferris",
|
|
20317
|
-
"flash",
|
|
20318
|
-
"flythrough",
|
|
20319
|
-
"gallery",
|
|
20320
|
-
"glitter",
|
|
20321
|
-
"honeycomb",
|
|
20322
|
-
"pan",
|
|
20323
|
-
"prism",
|
|
20324
|
-
"reveal",
|
|
20325
|
-
"ripple",
|
|
20326
|
-
"shred",
|
|
20327
|
-
"switch",
|
|
20328
|
-
"vortex",
|
|
20329
|
-
"warp",
|
|
20330
|
-
"wheelReverse",
|
|
20331
|
-
"window",
|
|
20332
|
-
"cube",
|
|
20333
|
-
"flip",
|
|
20334
|
-
"rotate",
|
|
20335
|
-
"orbit"
|
|
20336
|
-
]);
|
|
20337
|
-
function parseP14FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
20338
|
-
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20339
|
-
for (const ext of extEntries) {
|
|
20340
|
-
if (!ext) {
|
|
20341
|
-
continue;
|
|
20342
|
-
}
|
|
20343
|
-
for (const [key, value] of Object.entries(ext)) {
|
|
20344
|
-
if (key.startsWith("@_")) {
|
|
20345
|
-
continue;
|
|
20346
|
-
}
|
|
20347
|
-
const localName22 = getXmlLocalName(key);
|
|
20348
|
-
if (!P14_TRANSITION_TYPES.has(localName22)) {
|
|
20349
|
-
continue;
|
|
20350
|
-
}
|
|
20351
|
-
const type = localName22;
|
|
20352
|
-
let direction;
|
|
20353
|
-
let orient;
|
|
20354
|
-
let pattern;
|
|
20355
|
-
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
20356
|
-
const detail = value;
|
|
20357
|
-
const rawDir = String(detail["@_dir"] || "").trim();
|
|
20358
|
-
if (rawDir.length > 0) {
|
|
20359
|
-
direction = rawDir;
|
|
20360
|
-
}
|
|
20361
|
-
const rawOrient = String(detail["@_orient"] || "").trim();
|
|
20362
|
-
if (rawOrient === "horz" || rawOrient === "vert") {
|
|
20363
|
-
orient = rawOrient;
|
|
20364
|
-
}
|
|
20365
|
-
const rawPattern = String(detail["@_pattern"] || "").trim();
|
|
20366
|
-
if (rawPattern.length > 0) {
|
|
20367
|
-
pattern = rawPattern;
|
|
20368
|
-
}
|
|
20369
|
-
}
|
|
20370
|
-
return { type, direction, orient, pattern };
|
|
20371
|
-
}
|
|
20372
|
-
}
|
|
20373
|
-
return void 0;
|
|
20374
|
-
}
|
|
20375
|
-
function buildP14ExtLst(transitionType, direction, orient, pattern, rawExtLst, xmlLookupService, getXmlLocalName) {
|
|
20376
|
-
const p14Child = {};
|
|
20377
|
-
const dir = String(direction || "").trim();
|
|
20378
|
-
if (dir.length > 0) {
|
|
20379
|
-
p14Child["@_dir"] = dir;
|
|
20380
|
-
}
|
|
20381
|
-
if (orient) {
|
|
20382
|
-
p14Child["@_orient"] = orient;
|
|
20383
|
-
}
|
|
20384
|
-
if (pattern) {
|
|
20385
|
-
p14Child["@_pattern"] = pattern;
|
|
20386
|
-
}
|
|
20387
|
-
const transitionExt = {
|
|
20388
|
-
"@_uri": "{CE6CE671-F284-4235-B8B7-4F3F06D5A82C}",
|
|
20389
|
-
[`p14:${transitionType}`]: p14Child
|
|
20390
|
-
};
|
|
20391
|
-
if (rawExtLst) {
|
|
20392
|
-
const existing = xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
20393
|
-
const otherExts = existing.filter((ext) => {
|
|
20394
|
-
if (!ext) {
|
|
20395
|
-
return false;
|
|
20396
|
-
}
|
|
20397
|
-
for (const key of Object.keys(ext)) {
|
|
20398
|
-
if (key.startsWith("@_")) {
|
|
20399
|
-
continue;
|
|
20400
|
-
}
|
|
20401
|
-
const localName22 = getXmlLocalName(key);
|
|
20402
|
-
if (P14_TRANSITION_TYPES.has(localName22)) {
|
|
20403
|
-
return false;
|
|
20404
|
-
}
|
|
20405
|
-
}
|
|
20406
|
-
return true;
|
|
20407
|
-
});
|
|
20408
|
-
const allExts = [transitionExt, ...otherExts];
|
|
20409
|
-
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
20410
|
-
}
|
|
20411
|
-
return { "p:ext": transitionExt };
|
|
20412
|
-
}
|
|
20413
20495
|
var P15_TRANSITION_PRESETS = /* @__PURE__ */ new Set([
|
|
20414
20496
|
"fallOver",
|
|
20415
20497
|
"drape",
|
|
@@ -20435,6 +20517,36 @@ function optionalBoolean(value) {
|
|
|
20435
20517
|
}
|
|
20436
20518
|
return void 0;
|
|
20437
20519
|
}
|
|
20520
|
+
function readPrstTrans(value) {
|
|
20521
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
20522
|
+
return void 0;
|
|
20523
|
+
}
|
|
20524
|
+
const detail = value;
|
|
20525
|
+
const prst = String(detail["@_prst"] || "").trim();
|
|
20526
|
+
if (!P15_TRANSITION_PRESETS.has(prst)) {
|
|
20527
|
+
return void 0;
|
|
20528
|
+
}
|
|
20529
|
+
return {
|
|
20530
|
+
type: prst,
|
|
20531
|
+
invX: optionalBoolean(detail["@_invX"]),
|
|
20532
|
+
invY: optionalBoolean(detail["@_invY"])
|
|
20533
|
+
};
|
|
20534
|
+
}
|
|
20535
|
+
function parseP15DirectChild(transitionNode, getXmlLocalName) {
|
|
20536
|
+
for (const [key, value] of Object.entries(transitionNode)) {
|
|
20537
|
+
if (key.startsWith("@_")) {
|
|
20538
|
+
continue;
|
|
20539
|
+
}
|
|
20540
|
+
if (getXmlLocalName(key) !== "prstTrans") {
|
|
20541
|
+
continue;
|
|
20542
|
+
}
|
|
20543
|
+
const result = readPrstTrans(value);
|
|
20544
|
+
if (result) {
|
|
20545
|
+
return result;
|
|
20546
|
+
}
|
|
20547
|
+
}
|
|
20548
|
+
return void 0;
|
|
20549
|
+
}
|
|
20438
20550
|
function parseP15FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
20439
20551
|
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20440
20552
|
for (const ext of extEntries) {
|
|
@@ -20448,19 +20560,10 @@ function parseP15FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
|
20448
20560
|
if (getXmlLocalName(key) !== "prstTrans") {
|
|
20449
20561
|
continue;
|
|
20450
20562
|
}
|
|
20451
|
-
|
|
20452
|
-
|
|
20453
|
-
|
|
20454
|
-
const detail = value;
|
|
20455
|
-
const prst = String(detail["@_prst"] || "").trim();
|
|
20456
|
-
if (!P15_TRANSITION_PRESETS.has(prst)) {
|
|
20457
|
-
continue;
|
|
20563
|
+
const result = readPrstTrans(value);
|
|
20564
|
+
if (result) {
|
|
20565
|
+
return result;
|
|
20458
20566
|
}
|
|
20459
|
-
return {
|
|
20460
|
-
type: prst,
|
|
20461
|
-
invX: optionalBoolean(detail["@_invX"]),
|
|
20462
|
-
invY: optionalBoolean(detail["@_invY"])
|
|
20463
|
-
};
|
|
20464
20567
|
}
|
|
20465
20568
|
}
|
|
20466
20569
|
return void 0;
|
|
@@ -20709,6 +20812,69 @@ function validUnsignedInteger(value, min = 0) {
|
|
|
20709
20812
|
return Number.isInteger(value) && Number(value) >= min && Number(value) <= UINT_MAX;
|
|
20710
20813
|
}
|
|
20711
20814
|
var MORPH_EXT_URI = "{C7C9D14B-FE2A-4D35-B620-AB07D5B017F4}";
|
|
20815
|
+
function parseMorphFromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
20816
|
+
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20817
|
+
for (const ext of extEntries) {
|
|
20818
|
+
if (!ext) {
|
|
20819
|
+
continue;
|
|
20820
|
+
}
|
|
20821
|
+
for (const [key, value] of Object.entries(ext)) {
|
|
20822
|
+
if (key.startsWith("@_")) {
|
|
20823
|
+
continue;
|
|
20824
|
+
}
|
|
20825
|
+
if (getXmlLocalName(key) === "morph") {
|
|
20826
|
+
return {
|
|
20827
|
+
morphOption: normalizeMorphOption(value?.["@_option"])
|
|
20828
|
+
};
|
|
20829
|
+
}
|
|
20830
|
+
}
|
|
20831
|
+
}
|
|
20832
|
+
return void 0;
|
|
20833
|
+
}
|
|
20834
|
+
function hasDirectMorphChild(node, getXmlLocalName) {
|
|
20835
|
+
for (const key of Object.keys(node)) {
|
|
20836
|
+
if (!key.startsWith("@_") && getXmlLocalName(key) === "morph") {
|
|
20837
|
+
return true;
|
|
20838
|
+
}
|
|
20839
|
+
}
|
|
20840
|
+
return false;
|
|
20841
|
+
}
|
|
20842
|
+
function buildMorphExtLst(rawExtLst, morphOption, xmlLookupService, getXmlLocalName) {
|
|
20843
|
+
const morphNode = {
|
|
20844
|
+
"@_xmlns:p159": "http://schemas.microsoft.com/office/powerpoint/2015/09/main"
|
|
20845
|
+
};
|
|
20846
|
+
if (morphOption) {
|
|
20847
|
+
morphNode["@_option"] = morphOption;
|
|
20848
|
+
}
|
|
20849
|
+
const morphExt = {
|
|
20850
|
+
"@_uri": MORPH_EXT_URI,
|
|
20851
|
+
"p159:morph": morphNode
|
|
20852
|
+
};
|
|
20853
|
+
if (!rawExtLst) {
|
|
20854
|
+
return { "p:ext": morphExt };
|
|
20855
|
+
}
|
|
20856
|
+
const existing = xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
20857
|
+
const otherExts = existing.filter((ext) => {
|
|
20858
|
+
if (!ext) {
|
|
20859
|
+
return false;
|
|
20860
|
+
}
|
|
20861
|
+
const uri = String(ext["@_uri"] || "").trim();
|
|
20862
|
+
if (uri.toUpperCase() === MORPH_EXT_URI.toUpperCase()) {
|
|
20863
|
+
return false;
|
|
20864
|
+
}
|
|
20865
|
+
for (const key of Object.keys(ext)) {
|
|
20866
|
+
if (key.startsWith("@_")) {
|
|
20867
|
+
continue;
|
|
20868
|
+
}
|
|
20869
|
+
if (getXmlLocalName(key) === "morph") {
|
|
20870
|
+
return false;
|
|
20871
|
+
}
|
|
20872
|
+
}
|
|
20873
|
+
return true;
|
|
20874
|
+
});
|
|
20875
|
+
const allExts = [morphExt, ...otherExts];
|
|
20876
|
+
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
20877
|
+
}
|
|
20712
20878
|
var PptxSlideTransitionService = class {
|
|
20713
20879
|
xmlLookupService;
|
|
20714
20880
|
getXmlLocalName;
|
|
@@ -20718,7 +20884,7 @@ var PptxSlideTransitionService = class {
|
|
|
20718
20884
|
}
|
|
20719
20885
|
parseSlideTransition(slideXml2) {
|
|
20720
20886
|
const slideRoot = this.xmlLookupService.getChildByLocalName(slideXml2, "sld");
|
|
20721
|
-
const transitionNode = this.xmlLookupService.getChildByLocalName(slideRoot, "transition") ||
|
|
20887
|
+
const transitionNode = this.xmlLookupService.getChildByLocalName(slideRoot, "transition") || findTransitionInAlternateContent(slideRoot, this.xmlLookupService);
|
|
20722
20888
|
if (!transitionNode) {
|
|
20723
20889
|
return void 0;
|
|
20724
20890
|
}
|
|
@@ -20727,6 +20893,18 @@ var PptxSlideTransitionService = class {
|
|
|
20727
20893
|
let { direction, orient, pattern } = details;
|
|
20728
20894
|
const { spokes, thruBlk, rawSoundAction, rawExtLst } = details;
|
|
20729
20895
|
let { morphOption } = details;
|
|
20896
|
+
if (transitionType === "cut") {
|
|
20897
|
+
const p14Direct = parseP14DirectChild(transitionNode, this.getXmlLocalName);
|
|
20898
|
+
const p15Direct = p14Direct ? void 0 : parseP15DirectChild(transitionNode, this.getXmlLocalName);
|
|
20899
|
+
if (p14Direct) {
|
|
20900
|
+
transitionType = p14Direct.type;
|
|
20901
|
+
direction = p14Direct.direction ?? direction;
|
|
20902
|
+
orient = p14Direct.orient ?? orient;
|
|
20903
|
+
pattern = p14Direct.pattern ?? pattern;
|
|
20904
|
+
} else if (p15Direct) {
|
|
20905
|
+
transitionType = p15Direct.type;
|
|
20906
|
+
}
|
|
20907
|
+
}
|
|
20730
20908
|
if (rawExtLst && transitionType === "cut") {
|
|
20731
20909
|
const p14Result = parseP14FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
|
|
20732
20910
|
const p15Result = p14Result ? void 0 : parseP15FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
|
|
@@ -20744,7 +20922,11 @@ var PptxSlideTransitionService = class {
|
|
|
20744
20922
|
} else if (p15Result) {
|
|
20745
20923
|
transitionType = p15Result.type;
|
|
20746
20924
|
} else {
|
|
20747
|
-
const morphResult =
|
|
20925
|
+
const morphResult = parseMorphFromExtLst(
|
|
20926
|
+
rawExtLst,
|
|
20927
|
+
this.xmlLookupService,
|
|
20928
|
+
this.getXmlLocalName
|
|
20929
|
+
);
|
|
20748
20930
|
if (morphResult) {
|
|
20749
20931
|
transitionType = "morph";
|
|
20750
20932
|
morphOption = morphResult.morphOption;
|
|
@@ -20768,58 +20950,6 @@ var PptxSlideTransitionService = class {
|
|
|
20768
20950
|
rawTransition: transitionNode
|
|
20769
20951
|
};
|
|
20770
20952
|
}
|
|
20771
|
-
/**
|
|
20772
|
-
* Locate a `<p:transition>` wrapped in a slide-root `mc:AlternateContent`
|
|
20773
|
-
* envelope.
|
|
20774
|
-
*
|
|
20775
|
-
* Real PowerPoint (verified via COM-authored fixtures) wraps the
|
|
20776
|
-
* transition in `mc:AlternateContent` whenever it carries an Office
|
|
20777
|
-
* 2010+ attribute such as `p14:dur` (sub-second transition duration):
|
|
20778
|
-
* an `mc:Choice Requires="p14"` branch carries the richer transition,
|
|
20779
|
-
* and `mc:Fallback` carries a plain one for older readers. Without this
|
|
20780
|
-
* unwrap, `p:sld`'s direct-child lookup for `transition` finds nothing
|
|
20781
|
-
* and the whole transition (including plain ones falling back with no
|
|
20782
|
-
* p14 data) is silently dropped, even though `mc:Choice` is otherwise a
|
|
20783
|
-
* complete, directly usable `p:transition` node.
|
|
20784
|
-
*/
|
|
20785
|
-
findTransitionInAlternateContent(slideRoot) {
|
|
20786
|
-
const altContent = this.xmlLookupService.getChildByLocalName(slideRoot, "AlternateContent");
|
|
20787
|
-
if (!altContent) {
|
|
20788
|
-
return void 0;
|
|
20789
|
-
}
|
|
20790
|
-
const choices2 = this.xmlLookupService.getChildrenArrayByLocalName(altContent, "Choice");
|
|
20791
|
-
for (const choice of choices2) {
|
|
20792
|
-
const transitionNode = this.xmlLookupService.getChildByLocalName(choice, "transition");
|
|
20793
|
-
if (transitionNode) {
|
|
20794
|
-
return transitionNode;
|
|
20795
|
-
}
|
|
20796
|
-
}
|
|
20797
|
-
const fallback = this.xmlLookupService.getChildByLocalName(altContent, "Fallback");
|
|
20798
|
-
return this.xmlLookupService.getChildByLocalName(fallback, "transition");
|
|
20799
|
-
}
|
|
20800
|
-
/**
|
|
20801
|
-
* Detects the PowerPoint 2016+ `morph` transition stored as a p159 extension
|
|
20802
|
-
* inside the transition's extLst.
|
|
20803
|
-
*/
|
|
20804
|
-
parseMorphFromExtLst(extLstNode) {
|
|
20805
|
-
const extEntries = this.xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20806
|
-
for (const ext of extEntries) {
|
|
20807
|
-
if (!ext) {
|
|
20808
|
-
continue;
|
|
20809
|
-
}
|
|
20810
|
-
for (const [key, value] of Object.entries(ext)) {
|
|
20811
|
-
if (key.startsWith("@_")) {
|
|
20812
|
-
continue;
|
|
20813
|
-
}
|
|
20814
|
-
if (this.getXmlLocalName(key) === "morph") {
|
|
20815
|
-
return {
|
|
20816
|
-
morphOption: normalizeMorphOption(value?.["@_option"])
|
|
20817
|
-
};
|
|
20818
|
-
}
|
|
20819
|
-
}
|
|
20820
|
-
}
|
|
20821
|
-
return void 0;
|
|
20822
|
-
}
|
|
20823
20953
|
buildSlideTransitionXml(transition) {
|
|
20824
20954
|
if (!transition || transition.type === "none") {
|
|
20825
20955
|
return void 0;
|
|
@@ -20829,21 +20959,33 @@ var PptxSlideTransitionService = class {
|
|
|
20829
20959
|
const isP15Type = P15_TRANSITION_PRESETS.has(transitionType);
|
|
20830
20960
|
const isMorphType = transitionType === "morph";
|
|
20831
20961
|
const node = createPreservedTransitionNode(transition.rawTransition, this.getXmlLocalName);
|
|
20962
|
+
const p14ChildKey = isP14Type ? preservedP14ChildKey(node, transitionType, this.getXmlLocalName) : void 0;
|
|
20963
|
+
const p15ChildKey = isP15Type ? preservedP15ChildKey(node, transitionType, this.getXmlLocalName) : void 0;
|
|
20964
|
+
pruneDirectExtensionChildren(node, this.getXmlLocalName, p14ChildKey ?? p15ChildKey);
|
|
20832
20965
|
if (isP14Type) {
|
|
20833
|
-
|
|
20834
|
-
|
|
20835
|
-
|
|
20836
|
-
|
|
20837
|
-
|
|
20838
|
-
|
|
20839
|
-
|
|
20840
|
-
|
|
20841
|
-
|
|
20966
|
+
if (!p14ChildKey) {
|
|
20967
|
+
node["p:extLst"] = buildP14ExtLst(
|
|
20968
|
+
transitionType,
|
|
20969
|
+
transition.direction,
|
|
20970
|
+
transition.orient,
|
|
20971
|
+
transition.pattern,
|
|
20972
|
+
transition.rawExtLst,
|
|
20973
|
+
this.xmlLookupService,
|
|
20974
|
+
this.getXmlLocalName
|
|
20975
|
+
);
|
|
20976
|
+
}
|
|
20842
20977
|
} else if (isP15Type) {
|
|
20843
|
-
|
|
20978
|
+
if (!p15ChildKey) {
|
|
20979
|
+
node["p:extLst"] = transition.rawExtLst ?? buildP15ExtLst(transitionType);
|
|
20980
|
+
}
|
|
20844
20981
|
} else if (isMorphType) {
|
|
20845
|
-
if (!
|
|
20846
|
-
node["p:extLst"] =
|
|
20982
|
+
if (!hasDirectMorphChild(node, this.getXmlLocalName)) {
|
|
20983
|
+
node["p:extLst"] = buildMorphExtLst(
|
|
20984
|
+
transition.rawExtLst,
|
|
20985
|
+
transition.morphOption,
|
|
20986
|
+
this.xmlLookupService,
|
|
20987
|
+
this.getXmlLocalName
|
|
20988
|
+
);
|
|
20847
20989
|
}
|
|
20848
20990
|
} else {
|
|
20849
20991
|
node[`p:${transitionType}`] = buildStandardTransitionChild(transition);
|
|
@@ -20858,58 +21000,6 @@ var PptxSlideTransitionService = class {
|
|
|
20858
21000
|
}
|
|
20859
21001
|
return node;
|
|
20860
21002
|
}
|
|
20861
|
-
/**
|
|
20862
|
-
* True when the (preserved) transition node already carries a `morph`
|
|
20863
|
-
* element as a direct child, in any namespace prefix.
|
|
20864
|
-
*/
|
|
20865
|
-
hasDirectMorphChild(node) {
|
|
20866
|
-
for (const key of Object.keys(node)) {
|
|
20867
|
-
if (!key.startsWith("@_") && this.getXmlLocalName(key) === "morph") {
|
|
20868
|
-
return true;
|
|
20869
|
-
}
|
|
20870
|
-
}
|
|
20871
|
-
return false;
|
|
20872
|
-
}
|
|
20873
|
-
/**
|
|
20874
|
-
* Build the extLst XML node for a morph (p159) transition, preserving any
|
|
20875
|
-
* non-morph extensions from rawExtLst.
|
|
20876
|
-
*/
|
|
20877
|
-
buildMorphExtLst(rawExtLst, morphOption) {
|
|
20878
|
-
const morphNode = {
|
|
20879
|
-
"@_xmlns:p159": "http://schemas.microsoft.com/office/powerpoint/2015/09/main"
|
|
20880
|
-
};
|
|
20881
|
-
if (morphOption) {
|
|
20882
|
-
morphNode["@_option"] = morphOption;
|
|
20883
|
-
}
|
|
20884
|
-
const morphExt = {
|
|
20885
|
-
"@_uri": MORPH_EXT_URI,
|
|
20886
|
-
"p159:morph": morphNode
|
|
20887
|
-
};
|
|
20888
|
-
if (!rawExtLst) {
|
|
20889
|
-
return { "p:ext": morphExt };
|
|
20890
|
-
}
|
|
20891
|
-
const existing = this.xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
20892
|
-
const otherExts = existing.filter((ext) => {
|
|
20893
|
-
if (!ext) {
|
|
20894
|
-
return false;
|
|
20895
|
-
}
|
|
20896
|
-
const uri = String(ext["@_uri"] || "").trim();
|
|
20897
|
-
if (uri.toUpperCase() === MORPH_EXT_URI.toUpperCase()) {
|
|
20898
|
-
return false;
|
|
20899
|
-
}
|
|
20900
|
-
for (const key of Object.keys(ext)) {
|
|
20901
|
-
if (key.startsWith("@_")) {
|
|
20902
|
-
continue;
|
|
20903
|
-
}
|
|
20904
|
-
if (this.getXmlLocalName(key) === "morph") {
|
|
20905
|
-
return false;
|
|
20906
|
-
}
|
|
20907
|
-
}
|
|
20908
|
-
return true;
|
|
20909
|
-
});
|
|
20910
|
-
const allExts = [morphExt, ...otherExts];
|
|
20911
|
-
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
20912
|
-
}
|
|
20913
21003
|
};
|
|
20914
21004
|
var PRESET_TO_OOXML = {
|
|
20915
21005
|
// ---- Entrance effects (typed `PptxAnimationPreset` names) ----
|
|
@@ -47188,6 +47278,16 @@ function parseCtnMediaTiming(cTn, mediaTag) {
|
|
|
47188
47278
|
}
|
|
47189
47279
|
return { trimStartMs, trimEndMs, loop, autoPlay, playAcrossSlides };
|
|
47190
47280
|
}
|
|
47281
|
+
function resolvePlayAcrossSlides(cMediaNode, ctnPlayAcrossSlides, mediaTag) {
|
|
47282
|
+
if (ctnPlayAcrossSlides) {
|
|
47283
|
+
return true;
|
|
47284
|
+
}
|
|
47285
|
+
if (mediaTag !== "p:audio") {
|
|
47286
|
+
return false;
|
|
47287
|
+
}
|
|
47288
|
+
const numSld = Number.parseInt(String(cMediaNode["@_numSld"] ?? ""), 10);
|
|
47289
|
+
return Number.isFinite(numSld) && numSld > 1;
|
|
47290
|
+
}
|
|
47191
47291
|
function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray17) {
|
|
47192
47292
|
let fadeInDuration;
|
|
47193
47293
|
let fadeOutDuration;
|
|
@@ -48648,6 +48748,11 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
48648
48748
|
}
|
|
48649
48749
|
}
|
|
48650
48750
|
const hideWhenNotPlaying = cMediaNode["@_showWhenStopped"] === "0";
|
|
48751
|
+
const playAcrossSlides = resolvePlayAcrossSlides(
|
|
48752
|
+
cMediaNode,
|
|
48753
|
+
timing.playAcrossSlides,
|
|
48754
|
+
mediaTag
|
|
48755
|
+
);
|
|
48651
48756
|
let posterFramePath;
|
|
48652
48757
|
const posterRId = cMediaNode["@_posterFrame"];
|
|
48653
48758
|
if (posterRId) {
|
|
@@ -48672,7 +48777,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
48672
48777
|
fadeInDuration: extData.fadeInDuration,
|
|
48673
48778
|
fadeOutDuration: extData.fadeOutDuration,
|
|
48674
48779
|
autoPlay: timing.autoPlay || void 0,
|
|
48675
|
-
playAcrossSlides:
|
|
48780
|
+
playAcrossSlides: playAcrossSlides || void 0,
|
|
48676
48781
|
hideWhenNotPlaying: hideWhenNotPlaying || void 0,
|
|
48677
48782
|
bookmarks: extData.bookmarks.length > 0 ? extData.bookmarks : void 0,
|
|
48678
48783
|
playbackSpeed: extData.playbackSpeed,
|
|
@@ -48709,7 +48814,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
48709
48814
|
extractMediaTimingMap(slideXml2, slidePath) {
|
|
48710
48815
|
const result = /* @__PURE__ */ new Map();
|
|
48711
48816
|
try {
|
|
48712
|
-
const timing = slideXml2?.["p:sld"]
|
|
48817
|
+
const timing = resolveSlideTimingNode(slideXml2?.["p:sld"]);
|
|
48713
48818
|
if (!timing) {
|
|
48714
48819
|
return result;
|
|
48715
48820
|
}
|
|
@@ -62270,31 +62375,35 @@ var PptxHandlerRuntime57 = class _PptxHandlerRuntime23 extends PptxHandlerRuntim
|
|
|
62270
62375
|
return normalized;
|
|
62271
62376
|
}
|
|
62272
62377
|
readImageCropFromBlipFill(blipFill) {
|
|
62378
|
+
const result = {};
|
|
62273
62379
|
const sourceRect = blipFill?.["a:srcRect"];
|
|
62274
62380
|
if (sourceRect) {
|
|
62275
|
-
|
|
62276
|
-
|
|
62277
|
-
|
|
62278
|
-
|
|
62279
|
-
return { cropLeft, cropTop, cropRight, cropBottom };
|
|
62381
|
+
result.cropLeft = this.parseCropFraction(sourceRect["@_l"]);
|
|
62382
|
+
result.cropTop = this.parseCropFraction(sourceRect["@_t"]);
|
|
62383
|
+
result.cropRight = this.parseCropFraction(sourceRect["@_r"]);
|
|
62384
|
+
result.cropBottom = this.parseCropFraction(sourceRect["@_b"]);
|
|
62280
62385
|
}
|
|
62281
62386
|
const stretchNode = blipFill?.["a:stretch"];
|
|
62282
62387
|
const fillRect = stretchNode?.["a:fillRect"];
|
|
62283
62388
|
if (fillRect) {
|
|
62284
|
-
|
|
62285
|
-
|
|
62286
|
-
|
|
62287
|
-
|
|
62288
|
-
if (l !== void 0 || t !== void 0 || r !== void 0 || b !== void 0) {
|
|
62289
|
-
return {
|
|
62290
|
-
cropLeft: l,
|
|
62291
|
-
cropTop: t,
|
|
62292
|
-
cropRight: r,
|
|
62293
|
-
cropBottom: b
|
|
62294
|
-
};
|
|
62295
|
-
}
|
|
62389
|
+
result.fillRectLeft = this.parseSignedRectFraction(fillRect["@_l"]);
|
|
62390
|
+
result.fillRectTop = this.parseSignedRectFraction(fillRect["@_t"]);
|
|
62391
|
+
result.fillRectRight = this.parseSignedRectFraction(fillRect["@_r"]);
|
|
62392
|
+
result.fillRectBottom = this.parseSignedRectFraction(fillRect["@_b"]);
|
|
62296
62393
|
}
|
|
62297
|
-
return
|
|
62394
|
+
return result;
|
|
62395
|
+
}
|
|
62396
|
+
/**
|
|
62397
|
+
* Parse a signed ST_Percentage rect offset (thousandths of a percent) to a
|
|
62398
|
+
* fraction. Unlike {@link parseCropFraction} the sign is preserved; the
|
|
62399
|
+
* magnitude is capped at 10x the frame to bound hostile input.
|
|
62400
|
+
*/
|
|
62401
|
+
parseSignedRectFraction(value) {
|
|
62402
|
+
const raw = Number.parseInt(String(value ?? ""), 10);
|
|
62403
|
+
if (!Number.isFinite(raw)) {
|
|
62404
|
+
return void 0;
|
|
62405
|
+
}
|
|
62406
|
+
return Math.max(-1e6, Math.min(1e6, raw)) / 1e5;
|
|
62298
62407
|
}
|
|
62299
62408
|
extractShapeStyle(spPr, styleNode) {
|
|
62300
62409
|
return this.shapeStyleExtractor.extractShapeStyle(spPr, styleNode);
|
|
@@ -63133,6 +63242,19 @@ var PptxHandlerRuntime61 = class _PptxHandlerRuntime25 extends PptxHandlerRuntim
|
|
|
63133
63242
|
}
|
|
63134
63243
|
};
|
|
63135
63244
|
var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntime61 {
|
|
63245
|
+
/**
|
|
63246
|
+
* A copy of an `a:lstStyle` level entry without its `a:defRPr`: run
|
|
63247
|
+
* defaults follow their own precedence chain, so only the paragraph-level
|
|
63248
|
+
* keys (algn, lnSpc, spacing, margins, tabs) may join the pPr merge.
|
|
63249
|
+
*/
|
|
63250
|
+
withoutDefaultRunProperties(node) {
|
|
63251
|
+
if (!node || typeof node !== "object") {
|
|
63252
|
+
return void 0;
|
|
63253
|
+
}
|
|
63254
|
+
const copy2 = { ...node };
|
|
63255
|
+
delete copy2["a:defRPr"];
|
|
63256
|
+
return copy2;
|
|
63257
|
+
}
|
|
63136
63258
|
/**
|
|
63137
63259
|
* Extract a paragraph's OWN `a:pPr` geometry (align, spacing, margins,
|
|
63138
63260
|
* indent, tabs, rtl) as a partial {@link TextStyle} so per-paragraph
|
|
@@ -63196,10 +63318,26 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63196
63318
|
*/
|
|
63197
63319
|
resolveShapeParagraphStyle(p, textStyle, ctx) {
|
|
63198
63320
|
const inheritedParagraph = this.ensureArray(ctx.inheritedTxBody?.["a:p"])[0];
|
|
63199
|
-
const
|
|
63321
|
+
const directPPr = this.mergeXmlObjects(
|
|
63200
63322
|
inheritedParagraph?.["a:pPr"],
|
|
63201
63323
|
p["a:pPr"]
|
|
63202
63324
|
);
|
|
63325
|
+
const parsedLevel = Number.parseInt(String(directPPr?.["@_lvl"] ?? "0"), 10);
|
|
63326
|
+
const level = Number.isFinite(parsedLevel) ? Math.min(Math.max(parsedLevel, 0), 8) : 0;
|
|
63327
|
+
const levelKey = `a:lvl${level + 1}pPr`;
|
|
63328
|
+
const ownLstStyle = ctx.txBody?.["a:lstStyle"];
|
|
63329
|
+
const inheritedLstStyle = ctx.inheritedTxBody?.["a:lstStyle"];
|
|
63330
|
+
const lstStyleParagraphDefaults = this.mergeXmlObjects(
|
|
63331
|
+
this.mergeXmlObjects(
|
|
63332
|
+
this.withoutDefaultRunProperties(inheritedLstStyle?.["a:defPPr"]),
|
|
63333
|
+
this.withoutDefaultRunProperties(inheritedLstStyle?.[levelKey])
|
|
63334
|
+
),
|
|
63335
|
+
this.mergeXmlObjects(
|
|
63336
|
+
this.withoutDefaultRunProperties(ownLstStyle?.["a:defPPr"]),
|
|
63337
|
+
this.withoutDefaultRunProperties(ownLstStyle?.[levelKey])
|
|
63338
|
+
)
|
|
63339
|
+
);
|
|
63340
|
+
const pPr = this.mergeXmlObjects(lstStyleParagraphDefaults, directPPr);
|
|
63203
63341
|
const paragraphRtl = this.parseOptionalBooleanAttr(pPr?.["@_rtl"]);
|
|
63204
63342
|
if (paragraphRtl !== void 0 && textStyle.rtl === void 0) {
|
|
63205
63343
|
textStyle.rtl = paragraphRtl;
|
|
@@ -63323,8 +63461,6 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63323
63461
|
ctx.slideRelationshipMap,
|
|
63324
63462
|
false
|
|
63325
63463
|
);
|
|
63326
|
-
const level = pPr?.["@_lvl"] === void 0 ? -1 : Number.parseInt(String(pPr["@_lvl"]), 10);
|
|
63327
|
-
const levelKey = level === -1 ? "a:defPPr" : `a:lvl${Number.isFinite(level) ? Math.min(Math.max(level + 1, 1), 9) : 1}pPr`;
|
|
63328
63464
|
const inheritedLevelStyle = this.extractTextRunStyle(
|
|
63329
63465
|
ctx.inheritedTxBody?.["a:lstStyle"]?.[levelKey]?.["a:defRPr"],
|
|
63330
63466
|
paraAlign,
|
|
@@ -63357,12 +63493,16 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63357
63493
|
mergedDefaultRunStyle.fontFamily = ctx.styleFontRefTypeface;
|
|
63358
63494
|
}
|
|
63359
63495
|
if (ctx.effectiveLevelStyles) {
|
|
63360
|
-
const
|
|
63361
|
-
const
|
|
63496
|
+
const phLevel = ctx.effectiveLevelStyles[level];
|
|
63497
|
+
const phBase = ctx.effectiveLevelStyles[-1];
|
|
63362
63498
|
if (phLevel) {
|
|
63363
63499
|
this.applyPlaceholderLevelDefaults(mergedDefaultRunStyle, phLevel);
|
|
63364
63500
|
this.applyPlaceholderLevelDefaults(textStyle, phLevel);
|
|
63365
63501
|
}
|
|
63502
|
+
if (phBase) {
|
|
63503
|
+
this.applyPlaceholderLevelDefaults(mergedDefaultRunStyle, phBase);
|
|
63504
|
+
this.applyPlaceholderLevelDefaults(textStyle, phBase);
|
|
63505
|
+
}
|
|
63366
63506
|
}
|
|
63367
63507
|
if (pPr?.["@_algn"] === void 0 && textStyle.align !== void 0) {
|
|
63368
63508
|
paraAlign = textStyle.align;
|
|
@@ -63372,15 +63512,13 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63372
63512
|
let effectiveMarginLeft = parMarginLeft;
|
|
63373
63513
|
let effectiveIndent = parIndent;
|
|
63374
63514
|
if (ctx.effectiveLevelStyles) {
|
|
63375
|
-
const
|
|
63376
|
-
const
|
|
63377
|
-
if (
|
|
63378
|
-
|
|
63379
|
-
|
|
63380
|
-
|
|
63381
|
-
|
|
63382
|
-
effectiveIndent = phLevel.indent;
|
|
63383
|
-
}
|
|
63515
|
+
const phLevel = ctx.effectiveLevelStyles[level];
|
|
63516
|
+
const phBase = ctx.effectiveLevelStyles[-1];
|
|
63517
|
+
if (effectiveMarginLeft === void 0) {
|
|
63518
|
+
effectiveMarginLeft = phLevel?.marginLeft ?? phBase?.marginLeft;
|
|
63519
|
+
}
|
|
63520
|
+
if (effectiveIndent === void 0) {
|
|
63521
|
+
effectiveIndent = phLevel?.indent ?? phBase?.indent;
|
|
63384
63522
|
}
|
|
63385
63523
|
}
|
|
63386
63524
|
return {
|
|
@@ -98263,25 +98401,39 @@ function getImageFitStyle(el) {
|
|
|
98263
98401
|
if (!isImageLikeElement(el)) {
|
|
98264
98402
|
return uncropped;
|
|
98265
98403
|
}
|
|
98404
|
+
const frLeft = el.fillRectLeft ?? 0;
|
|
98405
|
+
const frTop = el.fillRectTop ?? 0;
|
|
98406
|
+
const frRight = el.fillRectRight ?? 0;
|
|
98407
|
+
const frBottom = el.fillRectBottom ?? 0;
|
|
98408
|
+
const hasFillRect = Math.abs(frLeft) + Math.abs(frTop) + Math.abs(frRight) + Math.abs(frBottom) > 1e-4;
|
|
98409
|
+
const placementTransform = hasFillRect ? `translate(${round2(frLeft * 100)}%, ${round2(frTop * 100)}%) scale(${round6(
|
|
98410
|
+
Math.max(0.01, 1 - frLeft - frRight)
|
|
98411
|
+
)}, ${round6(Math.max(0.01, 1 - frTop - frBottom))})` : "";
|
|
98266
98412
|
const cropLeft = clampCropValue(el.cropLeft);
|
|
98267
98413
|
const cropTop = clampCropValue(el.cropTop);
|
|
98268
98414
|
const cropRight = clampCropValue(el.cropRight);
|
|
98269
98415
|
const cropBottom = clampCropValue(el.cropBottom);
|
|
98270
|
-
|
|
98416
|
+
const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
|
|
98417
|
+
if (!hasCrop && !hasFillRect) {
|
|
98271
98418
|
return uncropped;
|
|
98272
98419
|
}
|
|
98273
|
-
|
|
98274
|
-
|
|
98275
|
-
|
|
98276
|
-
|
|
98277
|
-
|
|
98278
|
-
|
|
98279
|
-
|
|
98280
|
-
|
|
98281
|
-
|
|
98282
|
-
|
|
98283
|
-
|
|
98284
|
-
|
|
98420
|
+
let cropTransform = "";
|
|
98421
|
+
if (hasCrop) {
|
|
98422
|
+
const horizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
|
|
98423
|
+
const verticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
|
|
98424
|
+
const left = clampCropValue(cropLeft * horizontalScale);
|
|
98425
|
+
const right = clampCropValue(cropRight * horizontalScale);
|
|
98426
|
+
const top = clampCropValue(cropTop * verticalScale);
|
|
98427
|
+
const bottom = clampCropValue(cropBottom * verticalScale);
|
|
98428
|
+
const remainingWidth = Math.max(0.01, 1 - left - right);
|
|
98429
|
+
const remainingHeight = Math.max(0.01, 1 - top - bottom);
|
|
98430
|
+
const tx = Math.round(-left / remainingWidth * 1e4) / 100;
|
|
98431
|
+
const ty = Math.round(-top / remainingHeight * 1e4) / 100;
|
|
98432
|
+
const sx = Math.round(1 / remainingWidth * 1e6) / 1e6;
|
|
98433
|
+
const sy = Math.round(1 / remainingHeight * 1e6) / 1e6;
|
|
98434
|
+
cropTransform = `translate(${tx}%, ${ty}%) scale(${sx}, ${sy})`;
|
|
98435
|
+
}
|
|
98436
|
+
const transform = [placementTransform, cropTransform].filter(Boolean).join(" ");
|
|
98285
98437
|
return {
|
|
98286
98438
|
position: "absolute",
|
|
98287
98439
|
width: "100%",
|
|
@@ -98290,9 +98442,15 @@ function getImageFitStyle(el) {
|
|
|
98290
98442
|
maxHeight: "none",
|
|
98291
98443
|
objectFit: "fill",
|
|
98292
98444
|
transformOrigin: "top left",
|
|
98293
|
-
transform
|
|
98445
|
+
transform
|
|
98294
98446
|
};
|
|
98295
98447
|
}
|
|
98448
|
+
function round2(value) {
|
|
98449
|
+
return Math.round(value * 100) / 100;
|
|
98450
|
+
}
|
|
98451
|
+
function round6(value) {
|
|
98452
|
+
return Math.round(value * 1e6) / 1e6;
|
|
98453
|
+
}
|
|
98296
98454
|
function groupElements(elements, ids, groupId) {
|
|
98297
98455
|
const idSet = new Set(ids);
|
|
98298
98456
|
const gathered = [];
|
|
@@ -99078,7 +99236,10 @@ function resolveLineHeight(textStyle, hasItalicRuns2) {
|
|
|
99078
99236
|
if (typeof textStyle?.lineSpacingExactPt === "number" && textStyle.lineSpacingExactPt > 0) {
|
|
99079
99237
|
return `${textStyle.lineSpacingExactPt}pt`;
|
|
99080
99238
|
}
|
|
99081
|
-
return textStyle?.lineSpacing
|
|
99239
|
+
return proportionalLineHeight(textStyle?.lineSpacing);
|
|
99240
|
+
}
|
|
99241
|
+
function proportionalLineHeight(lineSpacing) {
|
|
99242
|
+
return typeof lineSpacing === "number" && lineSpacing > 0 ? lineSpacing * DEFAULT_LINE_HEIGHT : DEFAULT_LINE_HEIGHT;
|
|
99082
99243
|
}
|
|
99083
99244
|
function toCssWritingMode(textDirection) {
|
|
99084
99245
|
switch (textDirection) {
|
|
@@ -99129,7 +99290,7 @@ function computeAutoFitTextStyle(input) {
|
|
|
99129
99290
|
result.fontSize = Math.max(6, Math.round(baseFontSize * ts.autoFitFontScale));
|
|
99130
99291
|
} else if (ts.autoFitMode !== "normal") {
|
|
99131
99292
|
const textLength = text2.length;
|
|
99132
|
-
const lineHeight = ts.lineSpacingExactPt ? ts.lineSpacingExactPt / baseFontSize : ts.lineSpacing
|
|
99293
|
+
const lineHeight = ts.lineSpacingExactPt ? ts.lineSpacingExactPt / baseFontSize : proportionalLineHeight(ts.lineSpacing);
|
|
99133
99294
|
const approxCharsPerLine = Math.max(1, Math.floor(width / (baseFontSize * 0.6)));
|
|
99134
99295
|
const estimatedLines = Math.max(1, Math.ceil(textLength / approxCharsPerLine));
|
|
99135
99296
|
const requiredHeight = estimatedLines * baseFontSize * lineHeight;
|
|
@@ -99140,8 +99301,7 @@ function computeAutoFitTextStyle(input) {
|
|
|
99140
99301
|
}
|
|
99141
99302
|
}
|
|
99142
99303
|
if (ts.autoFitLineSpacingReduction !== void 0 && ts.autoFitLineSpacingReduction > 0) {
|
|
99143
|
-
|
|
99144
|
-
result.lineHeight = baseLineHeight * (1 - ts.autoFitLineSpacingReduction);
|
|
99304
|
+
result.lineHeight = proportionalLineHeight(ts.lineSpacing) * (1 - ts.autoFitLineSpacingReduction);
|
|
99145
99305
|
}
|
|
99146
99306
|
return result;
|
|
99147
99307
|
}
|
|
@@ -99961,6 +100121,8 @@ function buildTextRunFilterChain(style) {
|
|
|
99961
100121
|
}
|
|
99962
100122
|
return parts.length > 0 ? parts.join(" ") : void 0;
|
|
99963
100123
|
}
|
|
100124
|
+
var POWERPOINT_METRIC_TRACKING_EM = 3e-3;
|
|
100125
|
+
var POWERPOINT_METRIC_TRACKING = `${POWERPOINT_METRIC_TRACKING_EM}em`;
|
|
99964
100126
|
function resolveParagraphStrutFontSize(segments, bodyFontSize) {
|
|
99965
100127
|
let largest;
|
|
99966
100128
|
for (const segment of segments) {
|
|
@@ -110531,6 +110693,93 @@ function mediaTransportVisible(surface) {
|
|
|
110531
110693
|
}
|
|
110532
110694
|
return surface.canvasTransport;
|
|
110533
110695
|
}
|
|
110696
|
+
var persistentAudioMap = /* @__PURE__ */ new Map();
|
|
110697
|
+
function registerPersistentAudio(elementId, dataUrl, mimetype, loop, volume, trimStartSec) {
|
|
110698
|
+
if (persistentAudioMap.has(elementId) || typeof document === "undefined") {
|
|
110699
|
+
return;
|
|
110700
|
+
}
|
|
110701
|
+
const audio = document.createElement("audio");
|
|
110702
|
+
audio.src = dataUrl;
|
|
110703
|
+
if (mimetype) {
|
|
110704
|
+
const source = document.createElement("source");
|
|
110705
|
+
source.src = dataUrl;
|
|
110706
|
+
source.type = mimetype;
|
|
110707
|
+
audio.appendChild(source);
|
|
110708
|
+
}
|
|
110709
|
+
audio.loop = loop;
|
|
110710
|
+
audio.volume = Math.max(0, Math.min(1, volume));
|
|
110711
|
+
if (trimStartSec > 0) {
|
|
110712
|
+
try {
|
|
110713
|
+
audio.currentTime = trimStartSec;
|
|
110714
|
+
} catch {
|
|
110715
|
+
}
|
|
110716
|
+
}
|
|
110717
|
+
audio.style.display = "none";
|
|
110718
|
+
audio.setAttribute("data-pptx-persistent-audio", elementId);
|
|
110719
|
+
document.body.appendChild(audio);
|
|
110720
|
+
persistentAudioMap.set(elementId, { elementId, audio, loop, pausedByVisibility: false });
|
|
110721
|
+
void audio.play().catch(() => {
|
|
110722
|
+
});
|
|
110723
|
+
}
|
|
110724
|
+
function stopAllPersistentAudio() {
|
|
110725
|
+
for (const entry2 of persistentAudioMap.values()) {
|
|
110726
|
+
entry2.audio.pause();
|
|
110727
|
+
entry2.audio.remove();
|
|
110728
|
+
}
|
|
110729
|
+
persistentAudioMap.clear();
|
|
110730
|
+
}
|
|
110731
|
+
function pauseAllPersistentAudio() {
|
|
110732
|
+
for (const entry2 of persistentAudioMap.values()) {
|
|
110733
|
+
if (!entry2.audio.paused) {
|
|
110734
|
+
entry2.pausedByVisibility = true;
|
|
110735
|
+
entry2.audio.pause();
|
|
110736
|
+
}
|
|
110737
|
+
}
|
|
110738
|
+
}
|
|
110739
|
+
function resumeAllPersistentAudio() {
|
|
110740
|
+
for (const entry2 of persistentAudioMap.values()) {
|
|
110741
|
+
if (entry2.pausedByVisibility) {
|
|
110742
|
+
entry2.pausedByVisibility = false;
|
|
110743
|
+
void entry2.audio.play().catch(() => {
|
|
110744
|
+
});
|
|
110745
|
+
}
|
|
110746
|
+
}
|
|
110747
|
+
}
|
|
110748
|
+
function attachPresentationVisibilityPause(options = {}) {
|
|
110749
|
+
if (typeof document === "undefined") {
|
|
110750
|
+
return () => {
|
|
110751
|
+
};
|
|
110752
|
+
}
|
|
110753
|
+
const root = options.root ?? document;
|
|
110754
|
+
let pausedMedia = [];
|
|
110755
|
+
const onVisibilityChange = () => {
|
|
110756
|
+
if (document.visibilityState === "hidden") {
|
|
110757
|
+
pausedMedia = [];
|
|
110758
|
+
for (const media of root.querySelectorAll("audio, video")) {
|
|
110759
|
+
if (!media.paused && !media.ended) {
|
|
110760
|
+
pausedMedia.push(media);
|
|
110761
|
+
media.pause();
|
|
110762
|
+
}
|
|
110763
|
+
}
|
|
110764
|
+
pauseAllPersistentAudio();
|
|
110765
|
+
options.onHidden?.();
|
|
110766
|
+
return;
|
|
110767
|
+
}
|
|
110768
|
+
for (const media of pausedMedia) {
|
|
110769
|
+
if (media.isConnected) {
|
|
110770
|
+
void media.play().catch(() => {
|
|
110771
|
+
});
|
|
110772
|
+
}
|
|
110773
|
+
}
|
|
110774
|
+
pausedMedia = [];
|
|
110775
|
+
resumeAllPersistentAudio();
|
|
110776
|
+
options.onVisible?.();
|
|
110777
|
+
};
|
|
110778
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
110779
|
+
return () => {
|
|
110780
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
110781
|
+
};
|
|
110782
|
+
}
|
|
110534
110783
|
function buildSummaryZoomView(element, lookup) {
|
|
110535
110784
|
if (element.zoomType !== "summary" || !element.summaryTargets?.length) {
|
|
110536
110785
|
return void 0;
|
|
@@ -114866,6 +115115,7 @@ exports.OUTLINE_SLIDE_ATTR = OUTLINE_SLIDE_ATTR;
|
|
|
114866
115115
|
exports.OUTLINE_VIEW_ATTR = OUTLINE_VIEW_ATTR;
|
|
114867
115116
|
exports.PATTERN_OPTIONS = PATTERN_OPTIONS;
|
|
114868
115117
|
exports.PEN_COLORS = PEN_COLORS;
|
|
115118
|
+
exports.POWERPOINT_METRIC_TRACKING = POWERPOINT_METRIC_TRACKING;
|
|
114869
115119
|
exports.PRESENTATION_CHANNEL_NAME = PRESENTATION_CHANNEL_NAME;
|
|
114870
115120
|
exports.PRESENTATION_HASH = PRESENTATION_HASH;
|
|
114871
115121
|
exports.PRESENTATION_MESSAGE_ORIGIN = PRESENTATION_MESSAGE_ORIGIN;
|
|
@@ -114952,6 +115202,7 @@ exports.applyResize = applyResize;
|
|
|
114952
115202
|
exports.applyStyleToSelectedSegments = applyStyleToSelectedSegments;
|
|
114953
115203
|
exports.applyThemeOverrideToSlide = applyThemeOverrideToSlide;
|
|
114954
115204
|
exports.applyThemeToData = applyThemeToData;
|
|
115205
|
+
exports.attachPresentationVisibilityPause = attachPresentationVisibilityPause;
|
|
114955
115206
|
exports.availableQuickAccessCommands = availableQuickAccessCommands;
|
|
114956
115207
|
exports.backstageCardsFor = backstageCardsFor;
|
|
114957
115208
|
exports.bringForward = bringForward;
|
|
@@ -115296,6 +115547,7 @@ exports.previousShowSlideIndex = previousShowSlideIndex;
|
|
|
115296
115547
|
exports.printPropertiesFrameSlides = printPropertiesFrameSlides;
|
|
115297
115548
|
exports.printPropertiesSlidesPerPage = printPropertiesSlidesPerPage;
|
|
115298
115549
|
exports.promoteSmartArtNode = promoteSmartArtNode;
|
|
115550
|
+
exports.proportionalLineHeight = proportionalLineHeight;
|
|
115299
115551
|
exports.publishLiveGeometry = publishLiveGeometry;
|
|
115300
115552
|
exports.publishLiveInlineText = publishLiveInlineText;
|
|
115301
115553
|
exports.quickStyleSwatchCss = quickStyleSwatchCss;
|
|
@@ -115311,6 +115563,7 @@ exports.reconcileSlidesInYDoc = reconcileSlidesInYDoc;
|
|
|
115311
115563
|
exports.recordProgressPercent = recordProgressPercent;
|
|
115312
115564
|
exports.rectToCells = rectToCells;
|
|
115313
115565
|
exports.registerCollaborationTeardown = registerCollaborationTeardown;
|
|
115566
|
+
exports.registerPersistentAudio = registerPersistentAudio;
|
|
115314
115567
|
exports.remapTextToSegments = remapTextToSegments;
|
|
115315
115568
|
exports.removeChartCategory = removeChartCategory;
|
|
115316
115569
|
exports.removeChartSeries = removeChartSeries;
|
|
@@ -115401,6 +115654,7 @@ exports.snapBoxToGrid = snapBoxToGrid;
|
|
|
115401
115654
|
exports.splitCell = splitCell;
|
|
115402
115655
|
exports.splitSeriesByAxis = splitSeriesByAxis;
|
|
115403
115656
|
exports.stepPresenterZoom = stepPresenterZoom;
|
|
115657
|
+
exports.stopAllPersistentAudio = stopAllPersistentAudio;
|
|
115404
115658
|
exports.storeAudienceContent = storeAudienceContent;
|
|
115405
115659
|
exports.substituteFieldText = substituteFieldText;
|
|
115406
115660
|
exports.suppressesCssBorder = suppressesCssBorder;
|