pptx-react-viewer 2.12.1 → 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 +4 -0
- package/dist/{AiChatPanel-UEFYTUJN.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-CGGUPVQX.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-TU4NTHRM.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-QYXJNALP.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-VTJBKUQY.mjs → SurfaceChart3DScene-2W2IFPLE.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-VTJBKUQY.mjs.br → SurfaceChart3DScene-2W2IFPLE.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-2W2IFPLE.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-4VCO3DRP.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-4SGXEGVL.mjs → chunk-3OV4FR6S.mjs} +26 -14
- package/dist/chunk-3OV4FR6S.mjs.br +0 -0
- package/dist/chunk-3OV4FR6S.mjs.gz +0 -0
- package/dist/{chunk-LE6YA5WB.js → chunk-66ZHD7Y4.js} +282 -299
- package/dist/chunk-66ZHD7Y4.js.br +0 -0
- package/dist/chunk-66ZHD7Y4.js.gz +0 -0
- package/dist/{chunk-N3NKU7SC.mjs → chunk-CQ2CKMG4.mjs} +1 -1
- package/dist/chunk-CQ2CKMG4.mjs.br +0 -0
- package/dist/chunk-CQ2CKMG4.mjs.gz +0 -0
- package/dist/{chunk-TDUDH7S4.js → chunk-DD2YRS6Z.js} +1328 -660
- package/dist/chunk-DD2YRS6Z.js.br +0 -0
- package/dist/chunk-DD2YRS6Z.js.gz +0 -0
- package/dist/{chunk-YIPR3GKG.mjs → chunk-GJEH27GD.mjs} +53 -69
- package/dist/chunk-GJEH27GD.mjs.br +0 -0
- package/dist/chunk-GJEH27GD.mjs.gz +0 -0
- package/dist/{chunk-4GYNTY2G.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-CABQXGPI.mjs → chunk-OWGPRVRK.mjs} +1322 -661
- package/dist/chunk-OWGPRVRK.mjs.br +0 -0
- package/dist/chunk-OWGPRVRK.mjs.gz +0 -0
- package/dist/{chunk-UIWY4XJT.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-NUDH7TI2.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-GBKIWNW6.js → chunk-ZMIFFURL.js} +1054 -1042
- package/dist/chunk-ZMIFFURL.js.br +0 -0
- package/dist/chunk-ZMIFFURL.js.gz +0 -0
- package/dist/index.d.ts +32 -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 +32 -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 +32 -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-CGGUPVQX.mjs.br +0 -0
- package/dist/AiChatPanel-CGGUPVQX.mjs.gz +0 -0
- package/dist/AiChatPanel-UEFYTUJN.js.br +0 -0
- package/dist/AiChatPanel-UEFYTUJN.js.gz +0 -0
- package/dist/Model3DScene-QYXJNALP.js.br +0 -0
- package/dist/Model3DScene-QYXJNALP.js.gz +0 -0
- package/dist/Model3DScene-TU4NTHRM.mjs.br +0 -0
- package/dist/Model3DScene-TU4NTHRM.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-4VCO3DRP.js.br +0 -0
- package/dist/SurfaceChart3DScene-4VCO3DRP.js.gz +0 -0
- package/dist/SurfaceChart3DScene-VTJBKUQY.mjs.gz +0 -0
- package/dist/chunk-4GYNTY2G.mjs.br +0 -0
- package/dist/chunk-4GYNTY2G.mjs.gz +0 -0
- package/dist/chunk-4SGXEGVL.mjs.br +0 -0
- package/dist/chunk-4SGXEGVL.mjs.gz +0 -0
- package/dist/chunk-CABQXGPI.mjs.br +0 -0
- package/dist/chunk-CABQXGPI.mjs.gz +0 -0
- package/dist/chunk-GBKIWNW6.js.br +0 -0
- package/dist/chunk-GBKIWNW6.js.gz +0 -0
- package/dist/chunk-LE6YA5WB.js.br +0 -0
- package/dist/chunk-LE6YA5WB.js.gz +0 -0
- package/dist/chunk-N3NKU7SC.mjs.br +0 -0
- package/dist/chunk-N3NKU7SC.mjs.gz +0 -0
- package/dist/chunk-NUDH7TI2.js.br +0 -0
- package/dist/chunk-NUDH7TI2.js.gz +0 -0
- package/dist/chunk-TDUDH7S4.js.br +0 -0
- package/dist/chunk-TDUDH7S4.js.gz +0 -0
- package/dist/chunk-UIWY4XJT.js.br +0 -0
- package/dist/chunk-UIWY4XJT.js.gz +0 -0
- package/dist/chunk-YIPR3GKG.mjs.br +0 -0
- package/dist/chunk-YIPR3GKG.mjs.gz +0 -0
|
@@ -2152,9 +2152,9 @@ function getStockObject(index) {
|
|
|
2152
2152
|
}
|
|
2153
2153
|
}
|
|
2154
2154
|
async function blobToDataUrl(blob) {
|
|
2155
|
-
return new Promise((
|
|
2155
|
+
return new Promise((resolve2, reject) => {
|
|
2156
2156
|
const reader = new FileReader();
|
|
2157
|
-
reader.onload = () =>
|
|
2157
|
+
reader.onload = () => resolve2(reader.result);
|
|
2158
2158
|
reader.onerror = () => reject(reader.error);
|
|
2159
2159
|
reader.readAsDataURL(blob);
|
|
2160
2160
|
});
|
|
@@ -9757,12 +9757,12 @@ function updateSection(section) {
|
|
|
9757
9757
|
}
|
|
9758
9758
|
return node;
|
|
9759
9759
|
}
|
|
9760
|
-
function applySections(presentation,
|
|
9761
|
-
if (
|
|
9760
|
+
function applySections(presentation, sections2, lookup, remap) {
|
|
9761
|
+
if (sections2 === void 0) {
|
|
9762
9762
|
return;
|
|
9763
9763
|
}
|
|
9764
9764
|
let location = findSectionList(presentation, lookup);
|
|
9765
|
-
if (
|
|
9765
|
+
if (sections2.length === 0) {
|
|
9766
9766
|
if (location) {
|
|
9767
9767
|
delete location.parent[location.key];
|
|
9768
9768
|
}
|
|
@@ -9779,14 +9779,14 @@ function applySections(presentation, sections, lookup, remap) {
|
|
|
9779
9779
|
location = { parent: ext, key: "p14:sectionLst", list: ext["p14:sectionLst"] };
|
|
9780
9780
|
}
|
|
9781
9781
|
const list = cloneXmlObject(location.list) ?? {};
|
|
9782
|
-
const effectiveSections = remap && remap.changed ?
|
|
9782
|
+
const effectiveSections = remap && remap.changed ? sections2.map((section) => ({
|
|
9783
9783
|
...section,
|
|
9784
9784
|
slideIds: remapReferenceList(
|
|
9785
9785
|
section.slideIds,
|
|
9786
9786
|
remap.sldIdByOldSldId,
|
|
9787
9787
|
remap.removedSldIds
|
|
9788
9788
|
)
|
|
9789
|
-
})) :
|
|
9789
|
+
})) : sections2;
|
|
9790
9790
|
replaceChildren(list, "section", effectiveSections.map(updateSection), "p14:section");
|
|
9791
9791
|
location.parent[location.key] = list;
|
|
9792
9792
|
}
|
|
@@ -13830,10 +13830,11 @@ var PptxShapeStyleExtractor = class {
|
|
|
13830
13830
|
this.context.resolveThemeFillRef(styleNode["a:fillRef"], style);
|
|
13831
13831
|
}
|
|
13832
13832
|
const lineNode = shapeProps["a:ln"];
|
|
13833
|
+
if (styleNode?.["a:lnRef"]) {
|
|
13834
|
+
this.context.resolveThemeLineRef(styleNode["a:lnRef"], style);
|
|
13835
|
+
}
|
|
13833
13836
|
if (lineNode) {
|
|
13834
13837
|
applyLineProperties(lineNode, style, this.context);
|
|
13835
|
-
} else if (styleNode?.["a:lnRef"]) {
|
|
13836
|
-
this.context.resolveThemeLineRef(styleNode["a:lnRef"], style);
|
|
13837
13838
|
}
|
|
13838
13839
|
Object.assign(style, this.context.extractShadowStyle(shapeProps));
|
|
13839
13840
|
Object.assign(style, this.context.extractInnerShadowStyle(shapeProps));
|
|
@@ -15159,7 +15160,10 @@ var PptxConnectorParser = class {
|
|
|
15159
15160
|
const skewY = transform["@_skewY"] ? parseInt(String(transform["@_skewY"]), 10) / 6e4 : void 0;
|
|
15160
15161
|
const { flipHorizontal, flipVertical } = this.context.readFlipState(transform);
|
|
15161
15162
|
const cNvConnectionShapeProperties = connector2?.["p:nvCxnSpPr"]?.["p:cNvCxnSpPr"];
|
|
15162
|
-
const shapeStyle = this.context.extractShapeStyle(
|
|
15163
|
+
const shapeStyle = this.context.extractShapeStyle(
|
|
15164
|
+
shapeProperties,
|
|
15165
|
+
connector2["p:style"]
|
|
15166
|
+
);
|
|
15163
15167
|
const startConnectionNode = cNvConnectionShapeProperties?.["a:stCxn"];
|
|
15164
15168
|
if (startConnectionNode) {
|
|
15165
15169
|
const startConnection = {};
|
|
@@ -15309,8 +15313,8 @@ var PptxLoadDataBuilder = class {
|
|
|
15309
15313
|
this.customShows = customShows;
|
|
15310
15314
|
return this;
|
|
15311
15315
|
}
|
|
15312
|
-
withSections(
|
|
15313
|
-
this.sections =
|
|
15316
|
+
withSections(sections2) {
|
|
15317
|
+
this.sections = sections2;
|
|
15314
15318
|
return this;
|
|
15315
15319
|
}
|
|
15316
15320
|
withWarnings(warnings) {
|
|
@@ -15892,30 +15896,133 @@ var PptxCommentXmlFactoryProvider = class {
|
|
|
15892
15896
|
return new PptxCommentAuthorsXmlFactory();
|
|
15893
15897
|
}
|
|
15894
15898
|
};
|
|
15899
|
+
var P14_TRANSITION_TYPES = /* @__PURE__ */ new Set([
|
|
15900
|
+
"conveyor",
|
|
15901
|
+
"doors",
|
|
15902
|
+
"ferris",
|
|
15903
|
+
"flash",
|
|
15904
|
+
"flythrough",
|
|
15905
|
+
"gallery",
|
|
15906
|
+
"glitter",
|
|
15907
|
+
"honeycomb",
|
|
15908
|
+
"pan",
|
|
15909
|
+
"prism",
|
|
15910
|
+
"reveal",
|
|
15911
|
+
"ripple",
|
|
15912
|
+
"shred",
|
|
15913
|
+
"switch",
|
|
15914
|
+
"vortex",
|
|
15915
|
+
"warp",
|
|
15916
|
+
"wheelReverse",
|
|
15917
|
+
"window",
|
|
15918
|
+
"cube",
|
|
15919
|
+
"flip",
|
|
15920
|
+
"rotate",
|
|
15921
|
+
"orbit"
|
|
15922
|
+
]);
|
|
15923
|
+
function readP14Details(localName22, value) {
|
|
15924
|
+
const type = localName22;
|
|
15925
|
+
let direction;
|
|
15926
|
+
let orient;
|
|
15927
|
+
let pattern;
|
|
15928
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
15929
|
+
const detail = value;
|
|
15930
|
+
const rawDir = String(detail["@_dir"] || "").trim();
|
|
15931
|
+
if (rawDir.length > 0) {
|
|
15932
|
+
direction = rawDir;
|
|
15933
|
+
}
|
|
15934
|
+
const rawOrient = String(detail["@_orient"] || "").trim();
|
|
15935
|
+
if (rawOrient === "horz" || rawOrient === "vert") {
|
|
15936
|
+
orient = rawOrient;
|
|
15937
|
+
}
|
|
15938
|
+
const rawPattern = String(detail["@_pattern"] || "").trim();
|
|
15939
|
+
if (rawPattern.length > 0) {
|
|
15940
|
+
pattern = rawPattern;
|
|
15941
|
+
}
|
|
15942
|
+
}
|
|
15943
|
+
return { type, direction, orient, pattern };
|
|
15944
|
+
}
|
|
15945
|
+
function parseP14DirectChild(transitionNode, getXmlLocalName) {
|
|
15946
|
+
for (const [key, value] of Object.entries(transitionNode)) {
|
|
15947
|
+
if (key.startsWith("@_")) {
|
|
15948
|
+
continue;
|
|
15949
|
+
}
|
|
15950
|
+
const localName22 = getXmlLocalName(key);
|
|
15951
|
+
if (P14_TRANSITION_TYPES.has(localName22)) {
|
|
15952
|
+
return readP14Details(localName22, value);
|
|
15953
|
+
}
|
|
15954
|
+
}
|
|
15955
|
+
return void 0;
|
|
15956
|
+
}
|
|
15957
|
+
function parseP14FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
15958
|
+
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
15959
|
+
for (const ext of extEntries) {
|
|
15960
|
+
if (!ext) {
|
|
15961
|
+
continue;
|
|
15962
|
+
}
|
|
15963
|
+
for (const [key, value] of Object.entries(ext)) {
|
|
15964
|
+
if (key.startsWith("@_")) {
|
|
15965
|
+
continue;
|
|
15966
|
+
}
|
|
15967
|
+
const localName22 = getXmlLocalName(key);
|
|
15968
|
+
if (!P14_TRANSITION_TYPES.has(localName22)) {
|
|
15969
|
+
continue;
|
|
15970
|
+
}
|
|
15971
|
+
return readP14Details(localName22, value);
|
|
15972
|
+
}
|
|
15973
|
+
}
|
|
15974
|
+
return void 0;
|
|
15975
|
+
}
|
|
15976
|
+
function buildP14ExtLst(transitionType, direction, orient, pattern, rawExtLst, xmlLookupService, getXmlLocalName) {
|
|
15977
|
+
const p14Child = {};
|
|
15978
|
+
const dir = String(direction || "").trim();
|
|
15979
|
+
if (dir.length > 0) {
|
|
15980
|
+
p14Child["@_dir"] = dir;
|
|
15981
|
+
}
|
|
15982
|
+
if (orient) {
|
|
15983
|
+
p14Child["@_orient"] = orient;
|
|
15984
|
+
}
|
|
15985
|
+
if (pattern) {
|
|
15986
|
+
p14Child["@_pattern"] = pattern;
|
|
15987
|
+
}
|
|
15988
|
+
const transitionExt = {
|
|
15989
|
+
"@_uri": "{CE6CE671-F284-4235-B8B7-4F3F06D5A82C}",
|
|
15990
|
+
[`p14:${transitionType}`]: p14Child
|
|
15991
|
+
};
|
|
15992
|
+
if (rawExtLst) {
|
|
15993
|
+
const existing = xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
15994
|
+
const otherExts = existing.filter((ext) => {
|
|
15995
|
+
if (!ext) {
|
|
15996
|
+
return false;
|
|
15997
|
+
}
|
|
15998
|
+
for (const key of Object.keys(ext)) {
|
|
15999
|
+
if (key.startsWith("@_")) {
|
|
16000
|
+
continue;
|
|
16001
|
+
}
|
|
16002
|
+
const localName22 = getXmlLocalName(key);
|
|
16003
|
+
if (P14_TRANSITION_TYPES.has(localName22)) {
|
|
16004
|
+
return false;
|
|
16005
|
+
}
|
|
16006
|
+
}
|
|
16007
|
+
return true;
|
|
16008
|
+
});
|
|
16009
|
+
const allExts = [transitionExt, ...otherExts];
|
|
16010
|
+
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
16011
|
+
}
|
|
16012
|
+
return { "p:ext": transitionExt };
|
|
16013
|
+
}
|
|
15895
16014
|
var MC_NAMESPACE_CAPABILITIES = {
|
|
16015
|
+
// Office 2010 (p14) transitions are shared with the parser's canonical
|
|
16016
|
+
// list (`P14_TRANSITION_TYPES`) so the two can never drift apart again:
|
|
16017
|
+
// this set used to be a hand-copied subset that was missing `reveal` and
|
|
16018
|
+
// `ripple`, so every `mc:Choice Requires="p14"` carrying one of them
|
|
16019
|
+
// reported `UNSUPPORTED_ALTERNATE_CONTENT_CHOICE` and silently used the
|
|
16020
|
+
// fallback fade even though the parser handles both. The extra names are
|
|
16021
|
+
// the non-transition p14 features we also parse.
|
|
15896
16022
|
p14: /* @__PURE__ */ new Set([
|
|
16023
|
+
...P14_TRANSITION_TYPES,
|
|
15897
16024
|
"transition",
|
|
15898
|
-
"conveyor",
|
|
15899
|
-
"pan",
|
|
15900
|
-
"glitter",
|
|
15901
|
-
"prism",
|
|
15902
|
-
"vortex",
|
|
15903
|
-
"switch",
|
|
15904
|
-
"flip",
|
|
15905
|
-
"gallery",
|
|
15906
|
-
"honeycomb",
|
|
15907
|
-
"flash",
|
|
15908
|
-
"shred",
|
|
15909
|
-
"warp",
|
|
15910
|
-
"flythrough",
|
|
15911
|
-
"doors",
|
|
15912
|
-
"window",
|
|
15913
|
-
"ferris",
|
|
15914
16025
|
"newsflash",
|
|
15915
|
-
"wheelReverse",
|
|
15916
|
-
"rotate",
|
|
15917
|
-
"orbit",
|
|
15918
|
-
"cube",
|
|
15919
16026
|
"media",
|
|
15920
16027
|
"trim",
|
|
15921
16028
|
"fade",
|
|
@@ -15924,6 +16031,17 @@ var MC_NAMESPACE_CAPABILITIES = {
|
|
|
15924
16031
|
"hiddenFill",
|
|
15925
16032
|
"hiddenLine"
|
|
15926
16033
|
]),
|
|
16034
|
+
// PowerPoint 2013+ writes its preset transitions (Origami, Fracture, Peel
|
|
16035
|
+
// Off, Page Curl, ...) as `<p15:prstTrans prst="...">`, either inside an
|
|
16036
|
+
// `mc:Choice Requires="p15"` or in a `p:transition/p:extLst` extension.
|
|
16037
|
+
// Both forms are parsed (see `PptxSlideTransitionService`), so the choice
|
|
16038
|
+
// IS supported: without this entry every p15 slide reported
|
|
16039
|
+
// `UNSUPPORTED_ALTERNATE_CONTENT_CHOICE`, which reads as "the transition
|
|
16040
|
+
// was dropped and the fallback fade was used" when in fact the preset
|
|
16041
|
+
// plays. `prstTrans` alone is listed on purpose: any OTHER `p15:*`
|
|
16042
|
+
// element still makes the choice unsupported and falls back, which is
|
|
16043
|
+
// the honest answer.
|
|
16044
|
+
p15: /* @__PURE__ */ new Set(["prstTrans"]),
|
|
15927
16045
|
// PowerPoint 2016+ writes the Morph transition as `<p159:morph @option>`,
|
|
15928
16046
|
// either inside an `mc:Choice Requires="p159"` or in a `p:transition/p:extLst`
|
|
15929
16047
|
// extension. Both forms are parsed (see `PptxSlideTransitionService`), so the
|
|
@@ -18972,7 +19090,7 @@ function remapEditorAnimationsToShapeIds(elements2, animations, reservedMaxId =
|
|
|
18972
19090
|
byId.set(el.id, el);
|
|
18973
19091
|
}
|
|
18974
19092
|
let nextId2 = Math.max(maxShapeId(flat), reservedMaxId) + 1;
|
|
18975
|
-
const
|
|
19093
|
+
const resolve2 = (elementId) => {
|
|
18976
19094
|
const el = byId.get(elementId);
|
|
18977
19095
|
if (!el) {
|
|
18978
19096
|
return void 0;
|
|
@@ -18984,8 +19102,8 @@ function remapEditorAnimationsToShapeIds(elements2, animations, reservedMaxId =
|
|
|
18984
19102
|
return el.shapeId;
|
|
18985
19103
|
};
|
|
18986
19104
|
return animations.map((anim) => {
|
|
18987
|
-
const resolvedElement =
|
|
18988
|
-
const resolvedTrigger = anim.triggerShapeId !== void 0 ?
|
|
19105
|
+
const resolvedElement = resolve2(anim.elementId);
|
|
19106
|
+
const resolvedTrigger = anim.triggerShapeId !== void 0 ? resolve2(anim.triggerShapeId) : void 0;
|
|
18989
19107
|
if (resolvedElement === void 0 && resolvedTrigger === void 0) {
|
|
18990
19108
|
return anim;
|
|
18991
19109
|
}
|
|
@@ -19900,6 +20018,74 @@ function extractChildBehaviourDurationMs(cTn, toArray2) {
|
|
|
19900
20018
|
}
|
|
19901
20019
|
return longest;
|
|
19902
20020
|
}
|
|
20021
|
+
var defaultLookup = new PptxXmlLookupService();
|
|
20022
|
+
function resolveSlideTimingNode(slideRoot) {
|
|
20023
|
+
const direct = slideRoot?.["p:timing"];
|
|
20024
|
+
if (direct && typeof direct === "object" && !Array.isArray(direct)) {
|
|
20025
|
+
return direct;
|
|
20026
|
+
}
|
|
20027
|
+
return findEnvelopeChildByLocalName(slideRoot, "timing", defaultLookup);
|
|
20028
|
+
}
|
|
20029
|
+
function findTransitionInAlternateContent(slideRoot, lookup) {
|
|
20030
|
+
return findEnvelopeChildByLocalName(slideRoot, "transition", lookup);
|
|
20031
|
+
}
|
|
20032
|
+
function findEnvelopeChildByLocalName(slideRoot, localName22, lookup) {
|
|
20033
|
+
for (const envelope of lookup.getChildrenArrayByLocalName(slideRoot, "AlternateContent")) {
|
|
20034
|
+
let unsupportedChoiceNode;
|
|
20035
|
+
for (const choice of lookup.getChildrenArrayByLocalName(envelope, "Choice")) {
|
|
20036
|
+
const node = lookup.getChildByLocalName(choice, localName22);
|
|
20037
|
+
if (!node) {
|
|
20038
|
+
continue;
|
|
20039
|
+
}
|
|
20040
|
+
if (isAlternateContentChoiceSupported(choice)) {
|
|
20041
|
+
return node;
|
|
20042
|
+
}
|
|
20043
|
+
unsupportedChoiceNode ??= node;
|
|
20044
|
+
}
|
|
20045
|
+
const fallbackNode = lookup.getChildByLocalName(
|
|
20046
|
+
lookup.getChildByLocalName(envelope, "Fallback"),
|
|
20047
|
+
localName22
|
|
20048
|
+
);
|
|
20049
|
+
const found = fallbackNode ?? unsupportedChoiceNode;
|
|
20050
|
+
if (found) {
|
|
20051
|
+
return found;
|
|
20052
|
+
}
|
|
20053
|
+
}
|
|
20054
|
+
return void 0;
|
|
20055
|
+
}
|
|
20056
|
+
function preservedP14ChildKey(node, transitionType, getXmlLocalName) {
|
|
20057
|
+
for (const key of Object.keys(node)) {
|
|
20058
|
+
if (!key.startsWith("@_") && getXmlLocalName(key) === transitionType) {
|
|
20059
|
+
return key;
|
|
20060
|
+
}
|
|
20061
|
+
}
|
|
20062
|
+
return void 0;
|
|
20063
|
+
}
|
|
20064
|
+
function preservedP15ChildKey(node, transitionType, getXmlLocalName) {
|
|
20065
|
+
for (const [key, value] of Object.entries(node)) {
|
|
20066
|
+
if (key.startsWith("@_") || getXmlLocalName(key) !== "prstTrans") {
|
|
20067
|
+
continue;
|
|
20068
|
+
}
|
|
20069
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
20070
|
+
continue;
|
|
20071
|
+
}
|
|
20072
|
+
if (String(value["@_prst"] || "").trim() === transitionType) {
|
|
20073
|
+
return key;
|
|
20074
|
+
}
|
|
20075
|
+
}
|
|
20076
|
+
return void 0;
|
|
20077
|
+
}
|
|
20078
|
+
function pruneDirectExtensionChildren(node, getXmlLocalName, keepKey) {
|
|
20079
|
+
for (const key of Object.keys(node)) {
|
|
20080
|
+
if (key === keepKey || key.startsWith("@_")) {
|
|
20081
|
+
continue;
|
|
20082
|
+
}
|
|
20083
|
+
const localName22 = getXmlLocalName(key);
|
|
20084
|
+
if (P14_TRANSITION_TYPES.has(localName22) || localName22 === "prstTrans") {
|
|
20085
|
+
delete node[key];
|
|
20086
|
+
}
|
|
20087
|
+
}
|
|
20088
|
+
}
|
|
19903
20089
|
function isInteractiveSequence(seq) {
|
|
19904
20090
|
const cTn = seq["p:cTn"];
|
|
19905
20091
|
if (!cTn || String(cTn["@_nodeType"] || "") === "mainSeq") {
|
|
@@ -19921,7 +20107,7 @@ var PptxNativeAnimationService = class {
|
|
|
19921
20107
|
*/
|
|
19922
20108
|
parseNativeAnimations(slideXml2) {
|
|
19923
20109
|
try {
|
|
19924
|
-
const timing = slideXml2?.["p:sld"]
|
|
20110
|
+
const timing = resolveSlideTimingNode(slideXml2?.["p:sld"]);
|
|
19925
20111
|
if (!timing || typeof timing !== "object") {
|
|
19926
20112
|
return void 0;
|
|
19927
20113
|
}
|
|
@@ -19987,7 +20173,7 @@ var PptxNativeAnimationService = class {
|
|
|
19987
20173
|
* parent node. See `animation-group-context` for why the flat list
|
|
19988
20174
|
* needs it.
|
|
19989
20175
|
*/
|
|
19990
|
-
walkTimingTree(node, animations, currentTrigger,
|
|
20176
|
+
walkTimingTree(node, animations, currentTrigger, group2 = createGroupContext()) {
|
|
19991
20177
|
if (!node) {
|
|
19992
20178
|
return;
|
|
19993
20179
|
}
|
|
@@ -20086,8 +20272,8 @@ var PptxNativeAnimationService = class {
|
|
|
20086
20272
|
textTarget: textTarget ?? void 0,
|
|
20087
20273
|
cTnAttributes: roundTripAttrs,
|
|
20088
20274
|
afterEffect: afterEffectFlag,
|
|
20089
|
-
groupAutoStart:
|
|
20090
|
-
parGroupIndex:
|
|
20275
|
+
groupAutoStart: group2.groupAutoStart,
|
|
20276
|
+
parGroupIndex: group2.parGroupIndex
|
|
20091
20277
|
});
|
|
20092
20278
|
}
|
|
20093
20279
|
const childTnList = cTn["p:childTnLst"];
|
|
@@ -20101,7 +20287,7 @@ var PptxNativeAnimationService = class {
|
|
|
20101
20287
|
parallel,
|
|
20102
20288
|
animations,
|
|
20103
20289
|
trigger,
|
|
20104
|
-
childGroupContext(
|
|
20290
|
+
childGroupContext(group2, parallel["p:cTn"], {
|
|
20105
20291
|
isClickLevelGroup: isClickLevel
|
|
20106
20292
|
})
|
|
20107
20293
|
);
|
|
@@ -20110,11 +20296,11 @@ var PptxNativeAnimationService = class {
|
|
|
20110
20296
|
if (isInteractiveSequence(sequence)) {
|
|
20111
20297
|
continue;
|
|
20112
20298
|
}
|
|
20113
|
-
this.walkTimingTree(sequence, animations, trigger,
|
|
20299
|
+
this.walkTimingTree(sequence, animations, trigger, group2);
|
|
20114
20300
|
}
|
|
20115
20301
|
for (const excl of exclusives) {
|
|
20116
20302
|
const exclAnims = [];
|
|
20117
|
-
this.walkTimingTree(excl, exclAnims, trigger,
|
|
20303
|
+
this.walkTimingTree(excl, exclAnims, trigger, group2);
|
|
20118
20304
|
for (const a of exclAnims) {
|
|
20119
20305
|
a.exclusive = true;
|
|
20120
20306
|
animations.push(a);
|
|
@@ -20129,7 +20315,7 @@ var PptxNativeAnimationService = class {
|
|
|
20129
20315
|
parallel,
|
|
20130
20316
|
animations,
|
|
20131
20317
|
currentTrigger,
|
|
20132
|
-
childGroupContext(
|
|
20318
|
+
childGroupContext(group2, parallel["p:cTn"], {
|
|
20133
20319
|
isClickLevelGroup: false
|
|
20134
20320
|
})
|
|
20135
20321
|
);
|
|
@@ -20138,7 +20324,7 @@ var PptxNativeAnimationService = class {
|
|
|
20138
20324
|
if (isInteractiveSequence(sequence)) {
|
|
20139
20325
|
continue;
|
|
20140
20326
|
}
|
|
20141
|
-
this.walkTimingTree(sequence, animations, currentTrigger,
|
|
20327
|
+
this.walkTimingTree(sequence, animations, currentTrigger, group2);
|
|
20142
20328
|
}
|
|
20143
20329
|
}
|
|
20144
20330
|
/**
|
|
@@ -20299,106 +20485,6 @@ var PptxNativeAnimationService = class {
|
|
|
20299
20485
|
}
|
|
20300
20486
|
}
|
|
20301
20487
|
};
|
|
20302
|
-
var P14_TRANSITION_TYPES = /* @__PURE__ */ new Set([
|
|
20303
|
-
"conveyor",
|
|
20304
|
-
"doors",
|
|
20305
|
-
"ferris",
|
|
20306
|
-
"flash",
|
|
20307
|
-
"flythrough",
|
|
20308
|
-
"gallery",
|
|
20309
|
-
"glitter",
|
|
20310
|
-
"honeycomb",
|
|
20311
|
-
"pan",
|
|
20312
|
-
"prism",
|
|
20313
|
-
"reveal",
|
|
20314
|
-
"ripple",
|
|
20315
|
-
"shred",
|
|
20316
|
-
"switch",
|
|
20317
|
-
"vortex",
|
|
20318
|
-
"warp",
|
|
20319
|
-
"wheelReverse",
|
|
20320
|
-
"window",
|
|
20321
|
-
"cube",
|
|
20322
|
-
"flip",
|
|
20323
|
-
"rotate",
|
|
20324
|
-
"orbit"
|
|
20325
|
-
]);
|
|
20326
|
-
function parseP14FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
20327
|
-
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20328
|
-
for (const ext of extEntries) {
|
|
20329
|
-
if (!ext) {
|
|
20330
|
-
continue;
|
|
20331
|
-
}
|
|
20332
|
-
for (const [key, value] of Object.entries(ext)) {
|
|
20333
|
-
if (key.startsWith("@_")) {
|
|
20334
|
-
continue;
|
|
20335
|
-
}
|
|
20336
|
-
const localName22 = getXmlLocalName(key);
|
|
20337
|
-
if (!P14_TRANSITION_TYPES.has(localName22)) {
|
|
20338
|
-
continue;
|
|
20339
|
-
}
|
|
20340
|
-
const type = localName22;
|
|
20341
|
-
let direction;
|
|
20342
|
-
let orient;
|
|
20343
|
-
let pattern;
|
|
20344
|
-
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
20345
|
-
const detail = value;
|
|
20346
|
-
const rawDir = String(detail["@_dir"] || "").trim();
|
|
20347
|
-
if (rawDir.length > 0) {
|
|
20348
|
-
direction = rawDir;
|
|
20349
|
-
}
|
|
20350
|
-
const rawOrient = String(detail["@_orient"] || "").trim();
|
|
20351
|
-
if (rawOrient === "horz" || rawOrient === "vert") {
|
|
20352
|
-
orient = rawOrient;
|
|
20353
|
-
}
|
|
20354
|
-
const rawPattern = String(detail["@_pattern"] || "").trim();
|
|
20355
|
-
if (rawPattern.length > 0) {
|
|
20356
|
-
pattern = rawPattern;
|
|
20357
|
-
}
|
|
20358
|
-
}
|
|
20359
|
-
return { type, direction, orient, pattern };
|
|
20360
|
-
}
|
|
20361
|
-
}
|
|
20362
|
-
return void 0;
|
|
20363
|
-
}
|
|
20364
|
-
function buildP14ExtLst(transitionType, direction, orient, pattern, rawExtLst, xmlLookupService, getXmlLocalName) {
|
|
20365
|
-
const p14Child = {};
|
|
20366
|
-
const dir = String(direction || "").trim();
|
|
20367
|
-
if (dir.length > 0) {
|
|
20368
|
-
p14Child["@_dir"] = dir;
|
|
20369
|
-
}
|
|
20370
|
-
if (orient) {
|
|
20371
|
-
p14Child["@_orient"] = orient;
|
|
20372
|
-
}
|
|
20373
|
-
if (pattern) {
|
|
20374
|
-
p14Child["@_pattern"] = pattern;
|
|
20375
|
-
}
|
|
20376
|
-
const transitionExt = {
|
|
20377
|
-
"@_uri": "{CE6CE671-F284-4235-B8B7-4F3F06D5A82C}",
|
|
20378
|
-
[`p14:${transitionType}`]: p14Child
|
|
20379
|
-
};
|
|
20380
|
-
if (rawExtLst) {
|
|
20381
|
-
const existing = xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
20382
|
-
const otherExts = existing.filter((ext) => {
|
|
20383
|
-
if (!ext) {
|
|
20384
|
-
return false;
|
|
20385
|
-
}
|
|
20386
|
-
for (const key of Object.keys(ext)) {
|
|
20387
|
-
if (key.startsWith("@_")) {
|
|
20388
|
-
continue;
|
|
20389
|
-
}
|
|
20390
|
-
const localName22 = getXmlLocalName(key);
|
|
20391
|
-
if (P14_TRANSITION_TYPES.has(localName22)) {
|
|
20392
|
-
return false;
|
|
20393
|
-
}
|
|
20394
|
-
}
|
|
20395
|
-
return true;
|
|
20396
|
-
});
|
|
20397
|
-
const allExts = [transitionExt, ...otherExts];
|
|
20398
|
-
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
20399
|
-
}
|
|
20400
|
-
return { "p:ext": transitionExt };
|
|
20401
|
-
}
|
|
20402
20488
|
var P15_TRANSITION_PRESETS = /* @__PURE__ */ new Set([
|
|
20403
20489
|
"fallOver",
|
|
20404
20490
|
"drape",
|
|
@@ -20424,6 +20510,36 @@ function optionalBoolean(value) {
|
|
|
20424
20510
|
}
|
|
20425
20511
|
return void 0;
|
|
20426
20512
|
}
|
|
20513
|
+
function readPrstTrans(value) {
|
|
20514
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
20515
|
+
return void 0;
|
|
20516
|
+
}
|
|
20517
|
+
const detail = value;
|
|
20518
|
+
const prst = String(detail["@_prst"] || "").trim();
|
|
20519
|
+
if (!P15_TRANSITION_PRESETS.has(prst)) {
|
|
20520
|
+
return void 0;
|
|
20521
|
+
}
|
|
20522
|
+
return {
|
|
20523
|
+
type: prst,
|
|
20524
|
+
invX: optionalBoolean(detail["@_invX"]),
|
|
20525
|
+
invY: optionalBoolean(detail["@_invY"])
|
|
20526
|
+
};
|
|
20527
|
+
}
|
|
20528
|
+
function parseP15DirectChild(transitionNode, getXmlLocalName) {
|
|
20529
|
+
for (const [key, value] of Object.entries(transitionNode)) {
|
|
20530
|
+
if (key.startsWith("@_")) {
|
|
20531
|
+
continue;
|
|
20532
|
+
}
|
|
20533
|
+
if (getXmlLocalName(key) !== "prstTrans") {
|
|
20534
|
+
continue;
|
|
20535
|
+
}
|
|
20536
|
+
const result = readPrstTrans(value);
|
|
20537
|
+
if (result) {
|
|
20538
|
+
return result;
|
|
20539
|
+
}
|
|
20540
|
+
}
|
|
20541
|
+
return void 0;
|
|
20542
|
+
}
|
|
20427
20543
|
function parseP15FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
20428
20544
|
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20429
20545
|
for (const ext of extEntries) {
|
|
@@ -20437,19 +20553,10 @@ function parseP15FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
|
20437
20553
|
if (getXmlLocalName(key) !== "prstTrans") {
|
|
20438
20554
|
continue;
|
|
20439
20555
|
}
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
const detail = value;
|
|
20444
|
-
const prst = String(detail["@_prst"] || "").trim();
|
|
20445
|
-
if (!P15_TRANSITION_PRESETS.has(prst)) {
|
|
20446
|
-
continue;
|
|
20556
|
+
const result = readPrstTrans(value);
|
|
20557
|
+
if (result) {
|
|
20558
|
+
return result;
|
|
20447
20559
|
}
|
|
20448
|
-
return {
|
|
20449
|
-
type: prst,
|
|
20450
|
-
invX: optionalBoolean(detail["@_invX"]),
|
|
20451
|
-
invY: optionalBoolean(detail["@_invY"])
|
|
20452
|
-
};
|
|
20453
20560
|
}
|
|
20454
20561
|
}
|
|
20455
20562
|
return void 0;
|
|
@@ -20698,6 +20805,69 @@ function validUnsignedInteger(value, min = 0) {
|
|
|
20698
20805
|
return Number.isInteger(value) && Number(value) >= min && Number(value) <= UINT_MAX;
|
|
20699
20806
|
}
|
|
20700
20807
|
var MORPH_EXT_URI = "{C7C9D14B-FE2A-4D35-B620-AB07D5B017F4}";
|
|
20808
|
+
function parseMorphFromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
|
|
20809
|
+
const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20810
|
+
for (const ext of extEntries) {
|
|
20811
|
+
if (!ext) {
|
|
20812
|
+
continue;
|
|
20813
|
+
}
|
|
20814
|
+
for (const [key, value] of Object.entries(ext)) {
|
|
20815
|
+
if (key.startsWith("@_")) {
|
|
20816
|
+
continue;
|
|
20817
|
+
}
|
|
20818
|
+
if (getXmlLocalName(key) === "morph") {
|
|
20819
|
+
return {
|
|
20820
|
+
morphOption: normalizeMorphOption(value?.["@_option"])
|
|
20821
|
+
};
|
|
20822
|
+
}
|
|
20823
|
+
}
|
|
20824
|
+
}
|
|
20825
|
+
return void 0;
|
|
20826
|
+
}
|
|
20827
|
+
function hasDirectMorphChild(node, getXmlLocalName) {
|
|
20828
|
+
for (const key of Object.keys(node)) {
|
|
20829
|
+
if (!key.startsWith("@_") && getXmlLocalName(key) === "morph") {
|
|
20830
|
+
return true;
|
|
20831
|
+
}
|
|
20832
|
+
}
|
|
20833
|
+
return false;
|
|
20834
|
+
}
|
|
20835
|
+
function buildMorphExtLst(rawExtLst, morphOption, xmlLookupService, getXmlLocalName) {
|
|
20836
|
+
const morphNode = {
|
|
20837
|
+
"@_xmlns:p159": "http://schemas.microsoft.com/office/powerpoint/2015/09/main"
|
|
20838
|
+
};
|
|
20839
|
+
if (morphOption) {
|
|
20840
|
+
morphNode["@_option"] = morphOption;
|
|
20841
|
+
}
|
|
20842
|
+
const morphExt = {
|
|
20843
|
+
"@_uri": MORPH_EXT_URI,
|
|
20844
|
+
"p159:morph": morphNode
|
|
20845
|
+
};
|
|
20846
|
+
if (!rawExtLst) {
|
|
20847
|
+
return { "p:ext": morphExt };
|
|
20848
|
+
}
|
|
20849
|
+
const existing = xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
20850
|
+
const otherExts = existing.filter((ext) => {
|
|
20851
|
+
if (!ext) {
|
|
20852
|
+
return false;
|
|
20853
|
+
}
|
|
20854
|
+
const uri = String(ext["@_uri"] || "").trim();
|
|
20855
|
+
if (uri.toUpperCase() === MORPH_EXT_URI.toUpperCase()) {
|
|
20856
|
+
return false;
|
|
20857
|
+
}
|
|
20858
|
+
for (const key of Object.keys(ext)) {
|
|
20859
|
+
if (key.startsWith("@_")) {
|
|
20860
|
+
continue;
|
|
20861
|
+
}
|
|
20862
|
+
if (getXmlLocalName(key) === "morph") {
|
|
20863
|
+
return false;
|
|
20864
|
+
}
|
|
20865
|
+
}
|
|
20866
|
+
return true;
|
|
20867
|
+
});
|
|
20868
|
+
const allExts = [morphExt, ...otherExts];
|
|
20869
|
+
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
20870
|
+
}
|
|
20701
20871
|
var PptxSlideTransitionService = class {
|
|
20702
20872
|
xmlLookupService;
|
|
20703
20873
|
getXmlLocalName;
|
|
@@ -20707,7 +20877,7 @@ var PptxSlideTransitionService = class {
|
|
|
20707
20877
|
}
|
|
20708
20878
|
parseSlideTransition(slideXml2) {
|
|
20709
20879
|
const slideRoot = this.xmlLookupService.getChildByLocalName(slideXml2, "sld");
|
|
20710
|
-
const transitionNode = this.xmlLookupService.getChildByLocalName(slideRoot, "transition") ||
|
|
20880
|
+
const transitionNode = this.xmlLookupService.getChildByLocalName(slideRoot, "transition") || findTransitionInAlternateContent(slideRoot, this.xmlLookupService);
|
|
20711
20881
|
if (!transitionNode) {
|
|
20712
20882
|
return void 0;
|
|
20713
20883
|
}
|
|
@@ -20716,6 +20886,18 @@ var PptxSlideTransitionService = class {
|
|
|
20716
20886
|
let { direction, orient, pattern } = details;
|
|
20717
20887
|
const { spokes, thruBlk, rawSoundAction, rawExtLst } = details;
|
|
20718
20888
|
let { morphOption } = details;
|
|
20889
|
+
if (transitionType === "cut") {
|
|
20890
|
+
const p14Direct = parseP14DirectChild(transitionNode, this.getXmlLocalName);
|
|
20891
|
+
const p15Direct = p14Direct ? void 0 : parseP15DirectChild(transitionNode, this.getXmlLocalName);
|
|
20892
|
+
if (p14Direct) {
|
|
20893
|
+
transitionType = p14Direct.type;
|
|
20894
|
+
direction = p14Direct.direction ?? direction;
|
|
20895
|
+
orient = p14Direct.orient ?? orient;
|
|
20896
|
+
pattern = p14Direct.pattern ?? pattern;
|
|
20897
|
+
} else if (p15Direct) {
|
|
20898
|
+
transitionType = p15Direct.type;
|
|
20899
|
+
}
|
|
20900
|
+
}
|
|
20719
20901
|
if (rawExtLst && transitionType === "cut") {
|
|
20720
20902
|
const p14Result = parseP14FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
|
|
20721
20903
|
const p15Result = p14Result ? void 0 : parseP15FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
|
|
@@ -20733,7 +20915,11 @@ var PptxSlideTransitionService = class {
|
|
|
20733
20915
|
} else if (p15Result) {
|
|
20734
20916
|
transitionType = p15Result.type;
|
|
20735
20917
|
} else {
|
|
20736
|
-
const morphResult =
|
|
20918
|
+
const morphResult = parseMorphFromExtLst(
|
|
20919
|
+
rawExtLst,
|
|
20920
|
+
this.xmlLookupService,
|
|
20921
|
+
this.getXmlLocalName
|
|
20922
|
+
);
|
|
20737
20923
|
if (morphResult) {
|
|
20738
20924
|
transitionType = "morph";
|
|
20739
20925
|
morphOption = morphResult.morphOption;
|
|
@@ -20757,58 +20943,6 @@ var PptxSlideTransitionService = class {
|
|
|
20757
20943
|
rawTransition: transitionNode
|
|
20758
20944
|
};
|
|
20759
20945
|
}
|
|
20760
|
-
/**
|
|
20761
|
-
* Locate a `<p:transition>` wrapped in a slide-root `mc:AlternateContent`
|
|
20762
|
-
* envelope.
|
|
20763
|
-
*
|
|
20764
|
-
* Real PowerPoint (verified via COM-authored fixtures) wraps the
|
|
20765
|
-
* transition in `mc:AlternateContent` whenever it carries an Office
|
|
20766
|
-
* 2010+ attribute such as `p14:dur` (sub-second transition duration):
|
|
20767
|
-
* an `mc:Choice Requires="p14"` branch carries the richer transition,
|
|
20768
|
-
* and `mc:Fallback` carries a plain one for older readers. Without this
|
|
20769
|
-
* unwrap, `p:sld`'s direct-child lookup for `transition` finds nothing
|
|
20770
|
-
* and the whole transition (including plain ones falling back with no
|
|
20771
|
-
* p14 data) is silently dropped, even though `mc:Choice` is otherwise a
|
|
20772
|
-
* complete, directly usable `p:transition` node.
|
|
20773
|
-
*/
|
|
20774
|
-
findTransitionInAlternateContent(slideRoot) {
|
|
20775
|
-
const altContent = this.xmlLookupService.getChildByLocalName(slideRoot, "AlternateContent");
|
|
20776
|
-
if (!altContent) {
|
|
20777
|
-
return void 0;
|
|
20778
|
-
}
|
|
20779
|
-
const choices2 = this.xmlLookupService.getChildrenArrayByLocalName(altContent, "Choice");
|
|
20780
|
-
for (const choice of choices2) {
|
|
20781
|
-
const transitionNode = this.xmlLookupService.getChildByLocalName(choice, "transition");
|
|
20782
|
-
if (transitionNode) {
|
|
20783
|
-
return transitionNode;
|
|
20784
|
-
}
|
|
20785
|
-
}
|
|
20786
|
-
const fallback = this.xmlLookupService.getChildByLocalName(altContent, "Fallback");
|
|
20787
|
-
return this.xmlLookupService.getChildByLocalName(fallback, "transition");
|
|
20788
|
-
}
|
|
20789
|
-
/**
|
|
20790
|
-
* Detects the PowerPoint 2016+ `morph` transition stored as a p159 extension
|
|
20791
|
-
* inside the transition's extLst.
|
|
20792
|
-
*/
|
|
20793
|
-
parseMorphFromExtLst(extLstNode) {
|
|
20794
|
-
const extEntries = this.xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
|
|
20795
|
-
for (const ext of extEntries) {
|
|
20796
|
-
if (!ext) {
|
|
20797
|
-
continue;
|
|
20798
|
-
}
|
|
20799
|
-
for (const [key, value] of Object.entries(ext)) {
|
|
20800
|
-
if (key.startsWith("@_")) {
|
|
20801
|
-
continue;
|
|
20802
|
-
}
|
|
20803
|
-
if (this.getXmlLocalName(key) === "morph") {
|
|
20804
|
-
return {
|
|
20805
|
-
morphOption: normalizeMorphOption(value?.["@_option"])
|
|
20806
|
-
};
|
|
20807
|
-
}
|
|
20808
|
-
}
|
|
20809
|
-
}
|
|
20810
|
-
return void 0;
|
|
20811
|
-
}
|
|
20812
20946
|
buildSlideTransitionXml(transition) {
|
|
20813
20947
|
if (!transition || transition.type === "none") {
|
|
20814
20948
|
return void 0;
|
|
@@ -20818,21 +20952,33 @@ var PptxSlideTransitionService = class {
|
|
|
20818
20952
|
const isP15Type = P15_TRANSITION_PRESETS.has(transitionType);
|
|
20819
20953
|
const isMorphType = transitionType === "morph";
|
|
20820
20954
|
const node = createPreservedTransitionNode(transition.rawTransition, this.getXmlLocalName);
|
|
20955
|
+
const p14ChildKey = isP14Type ? preservedP14ChildKey(node, transitionType, this.getXmlLocalName) : void 0;
|
|
20956
|
+
const p15ChildKey = isP15Type ? preservedP15ChildKey(node, transitionType, this.getXmlLocalName) : void 0;
|
|
20957
|
+
pruneDirectExtensionChildren(node, this.getXmlLocalName, p14ChildKey ?? p15ChildKey);
|
|
20821
20958
|
if (isP14Type) {
|
|
20822
|
-
|
|
20823
|
-
|
|
20824
|
-
|
|
20825
|
-
|
|
20826
|
-
|
|
20827
|
-
|
|
20828
|
-
|
|
20829
|
-
|
|
20830
|
-
|
|
20959
|
+
if (!p14ChildKey) {
|
|
20960
|
+
node["p:extLst"] = buildP14ExtLst(
|
|
20961
|
+
transitionType,
|
|
20962
|
+
transition.direction,
|
|
20963
|
+
transition.orient,
|
|
20964
|
+
transition.pattern,
|
|
20965
|
+
transition.rawExtLst,
|
|
20966
|
+
this.xmlLookupService,
|
|
20967
|
+
this.getXmlLocalName
|
|
20968
|
+
);
|
|
20969
|
+
}
|
|
20831
20970
|
} else if (isP15Type) {
|
|
20832
|
-
|
|
20971
|
+
if (!p15ChildKey) {
|
|
20972
|
+
node["p:extLst"] = transition.rawExtLst ?? buildP15ExtLst(transitionType);
|
|
20973
|
+
}
|
|
20833
20974
|
} else if (isMorphType) {
|
|
20834
|
-
if (!
|
|
20835
|
-
node["p:extLst"] =
|
|
20975
|
+
if (!hasDirectMorphChild(node, this.getXmlLocalName)) {
|
|
20976
|
+
node["p:extLst"] = buildMorphExtLst(
|
|
20977
|
+
transition.rawExtLst,
|
|
20978
|
+
transition.morphOption,
|
|
20979
|
+
this.xmlLookupService,
|
|
20980
|
+
this.getXmlLocalName
|
|
20981
|
+
);
|
|
20836
20982
|
}
|
|
20837
20983
|
} else {
|
|
20838
20984
|
node[`p:${transitionType}`] = buildStandardTransitionChild(transition);
|
|
@@ -20847,58 +20993,6 @@ var PptxSlideTransitionService = class {
|
|
|
20847
20993
|
}
|
|
20848
20994
|
return node;
|
|
20849
20995
|
}
|
|
20850
|
-
/**
|
|
20851
|
-
* True when the (preserved) transition node already carries a `morph`
|
|
20852
|
-
* element as a direct child, in any namespace prefix.
|
|
20853
|
-
*/
|
|
20854
|
-
hasDirectMorphChild(node) {
|
|
20855
|
-
for (const key of Object.keys(node)) {
|
|
20856
|
-
if (!key.startsWith("@_") && this.getXmlLocalName(key) === "morph") {
|
|
20857
|
-
return true;
|
|
20858
|
-
}
|
|
20859
|
-
}
|
|
20860
|
-
return false;
|
|
20861
|
-
}
|
|
20862
|
-
/**
|
|
20863
|
-
* Build the extLst XML node for a morph (p159) transition, preserving any
|
|
20864
|
-
* non-morph extensions from rawExtLst.
|
|
20865
|
-
*/
|
|
20866
|
-
buildMorphExtLst(rawExtLst, morphOption) {
|
|
20867
|
-
const morphNode = {
|
|
20868
|
-
"@_xmlns:p159": "http://schemas.microsoft.com/office/powerpoint/2015/09/main"
|
|
20869
|
-
};
|
|
20870
|
-
if (morphOption) {
|
|
20871
|
-
morphNode["@_option"] = morphOption;
|
|
20872
|
-
}
|
|
20873
|
-
const morphExt = {
|
|
20874
|
-
"@_uri": MORPH_EXT_URI,
|
|
20875
|
-
"p159:morph": morphNode
|
|
20876
|
-
};
|
|
20877
|
-
if (!rawExtLst) {
|
|
20878
|
-
return { "p:ext": morphExt };
|
|
20879
|
-
}
|
|
20880
|
-
const existing = this.xmlLookupService.getChildrenArrayByLocalName(rawExtLst, "ext");
|
|
20881
|
-
const otherExts = existing.filter((ext) => {
|
|
20882
|
-
if (!ext) {
|
|
20883
|
-
return false;
|
|
20884
|
-
}
|
|
20885
|
-
const uri = String(ext["@_uri"] || "").trim();
|
|
20886
|
-
if (uri.toUpperCase() === MORPH_EXT_URI.toUpperCase()) {
|
|
20887
|
-
return false;
|
|
20888
|
-
}
|
|
20889
|
-
for (const key of Object.keys(ext)) {
|
|
20890
|
-
if (key.startsWith("@_")) {
|
|
20891
|
-
continue;
|
|
20892
|
-
}
|
|
20893
|
-
if (this.getXmlLocalName(key) === "morph") {
|
|
20894
|
-
return false;
|
|
20895
|
-
}
|
|
20896
|
-
}
|
|
20897
|
-
return true;
|
|
20898
|
-
});
|
|
20899
|
-
const allExts = [morphExt, ...otherExts];
|
|
20900
|
-
return { "p:ext": allExts.length === 1 ? allExts[0] : allExts };
|
|
20901
|
-
}
|
|
20902
20996
|
};
|
|
20903
20997
|
var PRESET_TO_OOXML = {
|
|
20904
20998
|
// ---- Entrance effects (typed `PptxAnimationPreset` names) ----
|
|
@@ -22041,7 +22135,7 @@ var PptxAnimationWriteService = class {
|
|
|
22041
22135
|
if (currentGroup.length > 0) {
|
|
22042
22136
|
clickGroups.push(currentGroup);
|
|
22043
22137
|
}
|
|
22044
|
-
const nodes = clickGroups.map((
|
|
22138
|
+
const nodes = clickGroups.map((group2) => {
|
|
22045
22139
|
const groupId = this.allocateId();
|
|
22046
22140
|
return {
|
|
22047
22141
|
"p:cTn": {
|
|
@@ -22053,7 +22147,7 @@ var PptxAnimationWriteService = class {
|
|
|
22053
22147
|
}
|
|
22054
22148
|
},
|
|
22055
22149
|
"p:childTnLst": {
|
|
22056
|
-
"p:par":
|
|
22150
|
+
"p:par": group2.length === 1 ? group2[0] : group2
|
|
22057
22151
|
}
|
|
22058
22152
|
}
|
|
22059
22153
|
};
|
|
@@ -23844,17 +23938,20 @@ var stripedRightArrow = {
|
|
|
23844
23938
|
name: "stripedRightArrow",
|
|
23845
23939
|
avLst: { adj1: 5e4, adj2: 5e4 },
|
|
23846
23940
|
gdLst: [
|
|
23941
|
+
// Head length runs off `ss`, the short side, not `w`. See the note on
|
|
23942
|
+
// `rightArrow` in `preset-shape-definitions-table.ts`.
|
|
23943
|
+
gd3("maxAdj2", "*/ 84375 w ss"),
|
|
23847
23944
|
gd3("a1", "pin 0 adj1 100000"),
|
|
23848
|
-
gd3("a2", "pin 0 adj2
|
|
23945
|
+
gd3("a2", "pin 0 adj2 maxAdj2"),
|
|
23849
23946
|
gd3("y1", "*/ hd2 a1 100000"),
|
|
23850
23947
|
gd3("y2", "+- vc 0 y1"),
|
|
23851
23948
|
gd3("y3", "+- vc y1 0"),
|
|
23852
23949
|
gd3("x2", "*/ ss 1 32"),
|
|
23853
23950
|
gd3("x3", "*/ ss 2 32"),
|
|
23854
23951
|
gd3("x4", "*/ ss 5 32"),
|
|
23855
|
-
gd3("x5", "*/
|
|
23952
|
+
gd3("x5", "*/ ss a2 100000"),
|
|
23856
23953
|
gd3("x6", "+- r 0 x5"),
|
|
23857
|
-
gd3("dx", "*/
|
|
23954
|
+
gd3("dx", "*/ y1 x5 hd2"),
|
|
23858
23955
|
gd3("x7", "+- x6 dx 0")
|
|
23859
23956
|
],
|
|
23860
23957
|
rect: { l: "x4", t: "y2", r: "x7", b: "y3" },
|
|
@@ -23889,14 +23986,17 @@ var notchedRightArrow = {
|
|
|
23889
23986
|
name: "notchedRightArrow",
|
|
23890
23987
|
avLst: { adj1: 5e4, adj2: 5e4 },
|
|
23891
23988
|
gdLst: [
|
|
23989
|
+
// Head length runs off `ss`, the short side, not `w`. See the note on
|
|
23990
|
+
// `rightArrow` in `preset-shape-definitions-table.ts`.
|
|
23991
|
+
gd3("maxAdj2", "*/ 100000 w ss"),
|
|
23892
23992
|
gd3("a1", "pin 0 adj1 100000"),
|
|
23893
|
-
gd3("a2", "pin 0 adj2
|
|
23993
|
+
gd3("a2", "pin 0 adj2 maxAdj2"),
|
|
23894
23994
|
gd3("y1", "*/ hd2 a1 100000"),
|
|
23895
23995
|
gd3("y2", "+- vc 0 y1"),
|
|
23896
23996
|
gd3("y3", "+- vc y1 0"),
|
|
23897
|
-
gd3("x2", "*/
|
|
23997
|
+
gd3("x2", "*/ ss a2 100000"),
|
|
23898
23998
|
gd3("x1", "+- r 0 x2"),
|
|
23899
|
-
gd3("dx2", "*/
|
|
23999
|
+
gd3("dx2", "*/ y1 x2 hd2"),
|
|
23900
24000
|
gd3("x3", "+- x1 dx2 0"),
|
|
23901
24001
|
gd3("nx", "*/ y1 1 1")
|
|
23902
24002
|
],
|
|
@@ -23920,7 +24020,12 @@ var notchedRightArrow = {
|
|
|
23920
24020
|
var homePlate = {
|
|
23921
24021
|
name: "homePlate",
|
|
23922
24022
|
avLst: { adj: 5e4 },
|
|
23923
|
-
gdLst: [
|
|
24023
|
+
gdLst: [
|
|
24024
|
+
gd3("maxAdj", "*/ 100000 w ss"),
|
|
24025
|
+
gd3("a", "pin 0 adj maxAdj"),
|
|
24026
|
+
gd3("dx1", "*/ ss a 100000"),
|
|
24027
|
+
gd3("x1", "+- r 0 dx1")
|
|
24028
|
+
],
|
|
23924
24029
|
rect: { l: "l", t: "t", r: "x1", b: "b" },
|
|
23925
24030
|
pathLst: [
|
|
23926
24031
|
{
|
|
@@ -23938,8 +24043,13 @@ var homePlate = {
|
|
|
23938
24043
|
var chevron = {
|
|
23939
24044
|
name: "chevron",
|
|
23940
24045
|
avLst: { adj: 5e4 },
|
|
23941
|
-
gdLst: [
|
|
23942
|
-
|
|
24046
|
+
gdLst: [
|
|
24047
|
+
gd3("maxAdj", "*/ 100000 w ss"),
|
|
24048
|
+
gd3("a", "pin 0 adj maxAdj"),
|
|
24049
|
+
gd3("x1", "*/ ss a 100000"),
|
|
24050
|
+
gd3("x2", "+- r 0 x1")
|
|
24051
|
+
],
|
|
24052
|
+
rect: { l: "x1", t: "t", r: "x2", b: "b" },
|
|
23943
24053
|
pathLst: [
|
|
23944
24054
|
{
|
|
23945
24055
|
commands: [
|
|
@@ -29025,27 +29135,28 @@ var rightArrow = {
|
|
|
29025
29135
|
name: "rightArrow",
|
|
29026
29136
|
avLst: { adj1: 5e4, adj2: 5e4 },
|
|
29027
29137
|
gdLst: [
|
|
29138
|
+
gd13("maxAdj2", "*/ 100000 w ss"),
|
|
29028
29139
|
gd13("a1", "pin 0 adj1 100000"),
|
|
29029
|
-
gd13("a2", "pin 0 adj2
|
|
29030
|
-
gd13("
|
|
29031
|
-
gd13("
|
|
29032
|
-
gd13("
|
|
29033
|
-
gd13("
|
|
29034
|
-
gd13("
|
|
29035
|
-
gd13("dx2", "*/
|
|
29036
|
-
gd13("
|
|
29140
|
+
gd13("a2", "pin 0 adj2 maxAdj2"),
|
|
29141
|
+
gd13("dx1", "*/ ss a2 100000"),
|
|
29142
|
+
gd13("x1", "+- r 0 dx1"),
|
|
29143
|
+
gd13("dy1", "*/ h a1 200000"),
|
|
29144
|
+
gd13("y1", "+- vc 0 dy1"),
|
|
29145
|
+
gd13("y2", "+- vc dy1 0"),
|
|
29146
|
+
gd13("dx2", "*/ y1 dx1 hd2"),
|
|
29147
|
+
gd13("x2", "+- x1 dx2 0")
|
|
29037
29148
|
],
|
|
29038
|
-
rect: { l: "l", t: "
|
|
29149
|
+
rect: { l: "l", t: "y1", r: "x2", b: "y2" },
|
|
29039
29150
|
pathLst: [
|
|
29040
29151
|
{
|
|
29041
29152
|
commands: [
|
|
29042
|
-
{ kind: "moveTo", x: "l", y: "
|
|
29043
|
-
{ kind: "lnTo", x: "x1", y: "
|
|
29153
|
+
{ kind: "moveTo", x: "l", y: "y1" },
|
|
29154
|
+
{ kind: "lnTo", x: "x1", y: "y1" },
|
|
29044
29155
|
{ kind: "lnTo", x: "x1", y: "t" },
|
|
29045
29156
|
{ kind: "lnTo", x: "r", y: "vc" },
|
|
29046
29157
|
{ kind: "lnTo", x: "x1", y: "b" },
|
|
29047
|
-
{ kind: "lnTo", x: "x1", y: "
|
|
29048
|
-
{ kind: "lnTo", x: "l", y: "
|
|
29158
|
+
{ kind: "lnTo", x: "x1", y: "y2" },
|
|
29159
|
+
{ kind: "lnTo", x: "l", y: "y2" },
|
|
29049
29160
|
{ kind: "close" }
|
|
29050
29161
|
]
|
|
29051
29162
|
}
|
|
@@ -29055,26 +29166,28 @@ var leftArrow = {
|
|
|
29055
29166
|
name: "leftArrow",
|
|
29056
29167
|
avLst: { adj1: 5e4, adj2: 5e4 },
|
|
29057
29168
|
gdLst: [
|
|
29169
|
+
gd13("maxAdj2", "*/ 100000 w ss"),
|
|
29058
29170
|
gd13("a1", "pin 0 adj1 100000"),
|
|
29059
|
-
gd13("a2", "pin 0 adj2
|
|
29060
|
-
gd13("
|
|
29061
|
-
gd13("
|
|
29062
|
-
gd13("
|
|
29063
|
-
gd13("
|
|
29064
|
-
gd13("
|
|
29065
|
-
gd13("
|
|
29171
|
+
gd13("a2", "pin 0 adj2 maxAdj2"),
|
|
29172
|
+
gd13("dx2", "*/ ss a2 100000"),
|
|
29173
|
+
gd13("x2", "+- l dx2 0"),
|
|
29174
|
+
gd13("dy1", "*/ h a1 200000"),
|
|
29175
|
+
gd13("y1", "+- vc 0 dy1"),
|
|
29176
|
+
gd13("y2", "+- vc dy1 0"),
|
|
29177
|
+
gd13("dx1", "*/ y1 dx2 hd2"),
|
|
29178
|
+
gd13("x1", "+- dx2 0 dx1")
|
|
29066
29179
|
],
|
|
29067
|
-
rect: { l: "
|
|
29180
|
+
rect: { l: "x1", t: "y1", r: "r", b: "y2" },
|
|
29068
29181
|
pathLst: [
|
|
29069
29182
|
{
|
|
29070
29183
|
commands: [
|
|
29071
29184
|
{ kind: "moveTo", x: "l", y: "vc" },
|
|
29072
|
-
{ kind: "lnTo", x: "
|
|
29073
|
-
{ kind: "lnTo", x: "
|
|
29185
|
+
{ kind: "lnTo", x: "x2", y: "t" },
|
|
29186
|
+
{ kind: "lnTo", x: "x2", y: "y1" },
|
|
29187
|
+
{ kind: "lnTo", x: "r", y: "y1" },
|
|
29074
29188
|
{ kind: "lnTo", x: "r", y: "y2" },
|
|
29075
|
-
{ kind: "lnTo", x: "
|
|
29076
|
-
{ kind: "lnTo", x: "
|
|
29077
|
-
{ kind: "lnTo", x: "x1", y: "b" },
|
|
29189
|
+
{ kind: "lnTo", x: "x2", y: "y2" },
|
|
29190
|
+
{ kind: "lnTo", x: "x2", y: "b" },
|
|
29078
29191
|
{ kind: "close" }
|
|
29079
29192
|
]
|
|
29080
29193
|
}
|
|
@@ -29084,26 +29197,28 @@ var upArrow = {
|
|
|
29084
29197
|
name: "upArrow",
|
|
29085
29198
|
avLst: { adj1: 5e4, adj2: 5e4 },
|
|
29086
29199
|
gdLst: [
|
|
29200
|
+
gd13("maxAdj2", "*/ 100000 h ss"),
|
|
29087
29201
|
gd13("a1", "pin 0 adj1 100000"),
|
|
29088
|
-
gd13("a2", "pin 0 adj2
|
|
29089
|
-
gd13("
|
|
29090
|
-
gd13("
|
|
29091
|
-
gd13("
|
|
29092
|
-
gd13("
|
|
29093
|
-
gd13("
|
|
29094
|
-
gd13("
|
|
29202
|
+
gd13("a2", "pin 0 adj2 maxAdj2"),
|
|
29203
|
+
gd13("dy2", "*/ ss a2 100000"),
|
|
29204
|
+
gd13("y2", "+- t dy2 0"),
|
|
29205
|
+
gd13("dx1", "*/ w a1 200000"),
|
|
29206
|
+
gd13("x1", "+- hc 0 dx1"),
|
|
29207
|
+
gd13("x2", "+- hc dx1 0"),
|
|
29208
|
+
gd13("dy1", "*/ x1 dy2 wd2"),
|
|
29209
|
+
gd13("y1", "+- y2 0 dy1")
|
|
29095
29210
|
],
|
|
29096
|
-
rect: { l: "
|
|
29211
|
+
rect: { l: "x1", t: "y1", r: "x2", b: "b" },
|
|
29097
29212
|
pathLst: [
|
|
29098
29213
|
{
|
|
29099
29214
|
commands: [
|
|
29100
|
-
{ kind: "moveTo", x: "
|
|
29215
|
+
{ kind: "moveTo", x: "l", y: "y2" },
|
|
29216
|
+
{ kind: "lnTo", x: "hc", y: "t" },
|
|
29101
29217
|
{ kind: "lnTo", x: "r", y: "y2" },
|
|
29102
|
-
{ kind: "lnTo", x: "x3", y: "y2" },
|
|
29103
|
-
{ kind: "lnTo", x: "x3", y: "b" },
|
|
29104
|
-
{ kind: "lnTo", x: "x2", y: "b" },
|
|
29105
29218
|
{ kind: "lnTo", x: "x2", y: "y2" },
|
|
29106
|
-
{ kind: "lnTo", x: "
|
|
29219
|
+
{ kind: "lnTo", x: "x2", y: "b" },
|
|
29220
|
+
{ kind: "lnTo", x: "x1", y: "b" },
|
|
29221
|
+
{ kind: "lnTo", x: "x1", y: "y2" },
|
|
29107
29222
|
{ kind: "close" }
|
|
29108
29223
|
]
|
|
29109
29224
|
}
|
|
@@ -29113,26 +29228,27 @@ var downArrow = {
|
|
|
29113
29228
|
name: "downArrow",
|
|
29114
29229
|
avLst: { adj1: 5e4, adj2: 5e4 },
|
|
29115
29230
|
gdLst: [
|
|
29231
|
+
gd13("maxAdj2", "*/ 100000 h ss"),
|
|
29116
29232
|
gd13("a1", "pin 0 adj1 100000"),
|
|
29117
|
-
gd13("a2", "pin 0 adj2
|
|
29118
|
-
gd13("
|
|
29119
|
-
gd13("
|
|
29120
|
-
gd13("
|
|
29121
|
-
gd13("
|
|
29122
|
-
gd13("
|
|
29123
|
-
gd13("dy2", "*/
|
|
29124
|
-
gd13("
|
|
29233
|
+
gd13("a2", "pin 0 adj2 maxAdj2"),
|
|
29234
|
+
gd13("dy1", "*/ ss a2 100000"),
|
|
29235
|
+
gd13("y1", "+- b 0 dy1"),
|
|
29236
|
+
gd13("dx1", "*/ w a1 200000"),
|
|
29237
|
+
gd13("x1", "+- hc 0 dx1"),
|
|
29238
|
+
gd13("x2", "+- hc dx1 0"),
|
|
29239
|
+
gd13("dy2", "*/ x1 dy1 wd2"),
|
|
29240
|
+
gd13("y2", "+- b 0 dy2")
|
|
29125
29241
|
],
|
|
29126
|
-
rect: { l: "
|
|
29242
|
+
rect: { l: "x1", t: "t", r: "x2", b: "y2" },
|
|
29127
29243
|
pathLst: [
|
|
29128
29244
|
{
|
|
29129
29245
|
commands: [
|
|
29130
|
-
{ kind: "moveTo", x: "l", y: "
|
|
29131
|
-
{ kind: "lnTo", x: "
|
|
29246
|
+
{ kind: "moveTo", x: "l", y: "y1" },
|
|
29247
|
+
{ kind: "lnTo", x: "x1", y: "y1" },
|
|
29248
|
+
{ kind: "lnTo", x: "x1", y: "t" },
|
|
29132
29249
|
{ kind: "lnTo", x: "x2", y: "t" },
|
|
29133
|
-
{ kind: "lnTo", x: "
|
|
29134
|
-
{ kind: "lnTo", x: "
|
|
29135
|
-
{ kind: "lnTo", x: "r", y: "y2" },
|
|
29250
|
+
{ kind: "lnTo", x: "x2", y: "y1" },
|
|
29251
|
+
{ kind: "lnTo", x: "r", y: "y1" },
|
|
29136
29252
|
{ kind: "lnTo", x: "hc", y: "b" },
|
|
29137
29253
|
{ kind: "close" }
|
|
29138
29254
|
]
|
|
@@ -32312,8 +32428,8 @@ function extractSectionMap(presentationData, lookup) {
|
|
|
32312
32428
|
const orderedSections = [];
|
|
32313
32429
|
const presentation = presentationData ? lookup.getChildByLocalName(presentationData, "presentation") : void 0;
|
|
32314
32430
|
const sectionList = findSectionList2(presentation, lookup);
|
|
32315
|
-
const
|
|
32316
|
-
|
|
32431
|
+
const sections2 = lookup.getChildrenArrayByLocalName(sectionList, "section");
|
|
32432
|
+
sections2.forEach((section, index) => {
|
|
32317
32433
|
const sectionId = String(section["@_id"] || `section-${index + 1}`);
|
|
32318
32434
|
const rawName = String(section["@_name"] || "").trim();
|
|
32319
32435
|
const sectionName = rawName || `Section ${index + 1}`;
|
|
@@ -32788,8 +32904,8 @@ function scalar(parent, name, xmlLookup) {
|
|
|
32788
32904
|
return node?.["#text"] === void 0 ? void 0 : String(node["#text"]);
|
|
32789
32905
|
}
|
|
32790
32906
|
function parseSeriesDataLabels(seriesNode, xmlLookup) {
|
|
32791
|
-
const
|
|
32792
|
-
const nodes =
|
|
32907
|
+
const group2 = xmlLookup.getChildByLocalName(seriesNode, "dLbls");
|
|
32908
|
+
const nodes = group2 ? xmlLookup.getChildrenArrayByLocalName(group2, "dLbl") : xmlLookup.getChildrenArrayByLocalName(seriesNode, "dLbl");
|
|
32793
32909
|
return nodes.flatMap((node) => {
|
|
32794
32910
|
const idx = uint32(xmlLookup.getChildByLocalName(node, "idx")?.["@_val"]);
|
|
32795
32911
|
if (idx === void 0) {
|
|
@@ -32834,7 +32950,7 @@ function parseSeriesDataLabels(seriesNode, xmlLookup) {
|
|
|
32834
32950
|
return [result];
|
|
32835
32951
|
});
|
|
32836
32952
|
}
|
|
32837
|
-
function parseChartDataLabelOptions(
|
|
32953
|
+
function parseChartDataLabelOptions(group2, xmlLookup) {
|
|
32838
32954
|
const result = {};
|
|
32839
32955
|
const fields = [
|
|
32840
32956
|
["showVal", "showValue"],
|
|
@@ -32846,16 +32962,16 @@ function parseChartDataLabelOptions(group, xmlLookup) {
|
|
|
32846
32962
|
["showLeaderLines", "showLeaderLines"]
|
|
32847
32963
|
];
|
|
32848
32964
|
for (const [xmlName, property] of fields) {
|
|
32849
|
-
const value = bool(xmlLookup.getChildByLocalName(
|
|
32965
|
+
const value = bool(xmlLookup.getChildByLocalName(group2, xmlName));
|
|
32850
32966
|
if (value !== void 0) {
|
|
32851
32967
|
result[property] = value;
|
|
32852
32968
|
}
|
|
32853
32969
|
}
|
|
32854
|
-
const pos2 = position(xmlLookup.getChildByLocalName(
|
|
32970
|
+
const pos2 = position(xmlLookup.getChildByLocalName(group2, "dLblPos"));
|
|
32855
32971
|
if (pos2) {
|
|
32856
32972
|
result.position = pos2;
|
|
32857
32973
|
}
|
|
32858
|
-
const separator = scalar(
|
|
32974
|
+
const separator = scalar(group2, "separator", xmlLookup);
|
|
32859
32975
|
if (separator !== void 0) {
|
|
32860
32976
|
result.separator = separator;
|
|
32861
32977
|
}
|
|
@@ -38175,12 +38291,12 @@ function layoutGroupedList(nodes, bounds, themeColorMap) {
|
|
|
38175
38291
|
const usableW = bounds.width - padding * 2;
|
|
38176
38292
|
const groupW = (usableW - gap * (groups.length - 1)) / groups.length;
|
|
38177
38293
|
const usableH = bounds.height - padding * 2;
|
|
38178
|
-
groups.forEach((
|
|
38294
|
+
groups.forEach((group2, gi) => {
|
|
38179
38295
|
const fill = accentColor(gi, themeColorMap);
|
|
38180
38296
|
const gx = bounds.x + padding + gi * (groupW + gap);
|
|
38181
38297
|
const headerH = usableH * 0.2;
|
|
38182
38298
|
const subItemGap = 3;
|
|
38183
|
-
const subItemH = (usableH - headerH - 4 - subItemGap * (
|
|
38299
|
+
const subItemH = (usableH - headerH - 4 - subItemGap * (group2.length - 1)) / group2.length;
|
|
38184
38300
|
elements2.push(
|
|
38185
38301
|
makeShapeElement(
|
|
38186
38302
|
nextId("sa-grp-header"),
|
|
@@ -38198,7 +38314,7 @@ function layoutGroupedList(nodes, bounds, themeColorMap) {
|
|
|
38198
38314
|
}
|
|
38199
38315
|
)
|
|
38200
38316
|
);
|
|
38201
|
-
|
|
38317
|
+
group2.forEach((node, si) => {
|
|
38202
38318
|
const sy = bounds.y + padding + headerH + 4 + si * (subItemH + subItemGap);
|
|
38203
38319
|
elements2.push(
|
|
38204
38320
|
makeShapeElement(
|
|
@@ -41479,6 +41595,23 @@ var GENERIC_FAMILY_CONCRETE_FONTS = {
|
|
|
41479
41595
|
cursive: ["Comic Sans MS", "cursive"],
|
|
41480
41596
|
fantasy: ["Impact", "fantasy"]
|
|
41481
41597
|
};
|
|
41598
|
+
function parsePanoseString(panoseStr) {
|
|
41599
|
+
if (!panoseStr) {
|
|
41600
|
+
return void 0;
|
|
41601
|
+
}
|
|
41602
|
+
const cleaned = panoseStr.trim();
|
|
41603
|
+
if (cleaned.length !== 20) {
|
|
41604
|
+
return void 0;
|
|
41605
|
+
}
|
|
41606
|
+
if (!/^[0-9a-fA-F]{20}$/.test(cleaned)) {
|
|
41607
|
+
return void 0;
|
|
41608
|
+
}
|
|
41609
|
+
const bytes = [];
|
|
41610
|
+
for (let i = 0; i < 20; i += 2) {
|
|
41611
|
+
bytes.push(parseInt(cleaned.substring(i, i + 2), 16));
|
|
41612
|
+
}
|
|
41613
|
+
return bytes;
|
|
41614
|
+
}
|
|
41482
41615
|
function classifyPanose(panose) {
|
|
41483
41616
|
if (!panose || panose.length < 4) {
|
|
41484
41617
|
return "sans-serif";
|
|
@@ -47138,6 +47271,16 @@ function parseCtnMediaTiming(cTn, mediaTag) {
|
|
|
47138
47271
|
}
|
|
47139
47272
|
return { trimStartMs, trimEndMs, loop, autoPlay, playAcrossSlides };
|
|
47140
47273
|
}
|
|
47274
|
+
function resolvePlayAcrossSlides(cMediaNode, ctnPlayAcrossSlides, mediaTag) {
|
|
47275
|
+
if (ctnPlayAcrossSlides) {
|
|
47276
|
+
return true;
|
|
47277
|
+
}
|
|
47278
|
+
if (mediaTag !== "p:audio") {
|
|
47279
|
+
return false;
|
|
47280
|
+
}
|
|
47281
|
+
const numSld = Number.parseInt(String(cMediaNode["@_numSld"] ?? ""), 10);
|
|
47282
|
+
return Number.isFinite(numSld) && numSld > 1;
|
|
47283
|
+
}
|
|
47141
47284
|
function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray17) {
|
|
47142
47285
|
let fadeInDuration;
|
|
47143
47286
|
let fadeOutDuration;
|
|
@@ -48598,6 +48741,11 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
48598
48741
|
}
|
|
48599
48742
|
}
|
|
48600
48743
|
const hideWhenNotPlaying = cMediaNode["@_showWhenStopped"] === "0";
|
|
48744
|
+
const playAcrossSlides = resolvePlayAcrossSlides(
|
|
48745
|
+
cMediaNode,
|
|
48746
|
+
timing.playAcrossSlides,
|
|
48747
|
+
mediaTag
|
|
48748
|
+
);
|
|
48601
48749
|
let posterFramePath;
|
|
48602
48750
|
const posterRId = cMediaNode["@_posterFrame"];
|
|
48603
48751
|
if (posterRId) {
|
|
@@ -48622,7 +48770,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
48622
48770
|
fadeInDuration: extData.fadeInDuration,
|
|
48623
48771
|
fadeOutDuration: extData.fadeOutDuration,
|
|
48624
48772
|
autoPlay: timing.autoPlay || void 0,
|
|
48625
|
-
playAcrossSlides:
|
|
48773
|
+
playAcrossSlides: playAcrossSlides || void 0,
|
|
48626
48774
|
hideWhenNotPlaying: hideWhenNotPlaying || void 0,
|
|
48627
48775
|
bookmarks: extData.bookmarks.length > 0 ? extData.bookmarks : void 0,
|
|
48628
48776
|
playbackSpeed: extData.playbackSpeed,
|
|
@@ -48659,7 +48807,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
48659
48807
|
extractMediaTimingMap(slideXml2, slidePath) {
|
|
48660
48808
|
const result = /* @__PURE__ */ new Map();
|
|
48661
48809
|
try {
|
|
48662
|
-
const timing = slideXml2?.["p:sld"]
|
|
48810
|
+
const timing = resolveSlideTimingNode(slideXml2?.["p:sld"]);
|
|
48663
48811
|
if (!timing) {
|
|
48664
48812
|
return result;
|
|
48665
48813
|
}
|
|
@@ -49646,6 +49794,29 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
49646
49794
|
return void 0;
|
|
49647
49795
|
}
|
|
49648
49796
|
}
|
|
49797
|
+
/**
|
|
49798
|
+
* Resolve the `c:spPr` fill of a chart container (`c:chartSpace` or
|
|
49799
|
+
* `c:plotArea`) to a colour string, or the literal `'none'` for
|
|
49800
|
+
* `<a:noFill/>`. Returns `undefined` when the container declares no fill at
|
|
49801
|
+
* all, which leaves the choice to the renderer.
|
|
49802
|
+
*
|
|
49803
|
+
* `<a:noFill/>` parses to the empty STRING, so presence - not truthiness -
|
|
49804
|
+
* has to decide.
|
|
49805
|
+
*/
|
|
49806
|
+
parseChartContainerFill(container) {
|
|
49807
|
+
const shapeProperties = this.xmlLookupService.getChildByLocalName(container, "spPr");
|
|
49808
|
+
if (!shapeProperties) {
|
|
49809
|
+
return void 0;
|
|
49810
|
+
}
|
|
49811
|
+
const hasNoFill = Object.keys(shapeProperties).some(
|
|
49812
|
+
(key) => this.compatibilityService.getXmlLocalName(key) === "noFill"
|
|
49813
|
+
);
|
|
49814
|
+
if (hasNoFill) {
|
|
49815
|
+
return "none";
|
|
49816
|
+
}
|
|
49817
|
+
const solidFill2 = this.xmlLookupService.getChildByLocalName(shapeProperties, "solidFill");
|
|
49818
|
+
return solidFill2 ? this.parseColor(solidFill2) : void 0;
|
|
49819
|
+
}
|
|
49649
49820
|
/**
|
|
49650
49821
|
* Extract chart style metadata from chart XML.
|
|
49651
49822
|
*/
|
|
@@ -49660,6 +49831,11 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
49660
49831
|
style.styleId = parseInt(String(styleNode["@_val"]));
|
|
49661
49832
|
hasStyle = true;
|
|
49662
49833
|
}
|
|
49834
|
+
const chartAreaFill2 = this.parseChartContainerFill(chartSpace);
|
|
49835
|
+
if (chartAreaFill2) {
|
|
49836
|
+
style.chartAreaFill = chartAreaFill2;
|
|
49837
|
+
hasStyle = true;
|
|
49838
|
+
}
|
|
49663
49839
|
if (chartRoot) {
|
|
49664
49840
|
const legend = this.xmlLookupService.getChildByLocalName(chartRoot, "legend");
|
|
49665
49841
|
if (legend) {
|
|
@@ -49685,6 +49861,11 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
49685
49861
|
}
|
|
49686
49862
|
const plotArea = this.xmlLookupService.getChildByLocalName(chartRoot, "plotArea");
|
|
49687
49863
|
if (plotArea) {
|
|
49864
|
+
const plotAreaFill2 = this.parseChartContainerFill(plotArea);
|
|
49865
|
+
if (plotAreaFill2) {
|
|
49866
|
+
style.plotAreaFill = plotAreaFill2;
|
|
49867
|
+
hasStyle = true;
|
|
49868
|
+
}
|
|
49688
49869
|
const valAx = this.xmlLookupService.getChildByLocalName(plotArea, "valAx");
|
|
49689
49870
|
if (valAx) {
|
|
49690
49871
|
const majorGridlines = this.xmlLookupService.getChildByLocalName(valAx, "majorGridlines");
|
|
@@ -51018,32 +51199,32 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime3 extends PptxHandlerRuntime
|
|
|
51018
51199
|
* Build a p:grpSp XML object from a GroupPptxElement.
|
|
51019
51200
|
* Children are stored with coordinates relative to the group origin.
|
|
51020
51201
|
*/
|
|
51021
|
-
buildGroupShapeXml(
|
|
51022
|
-
if (
|
|
51023
|
-
return
|
|
51202
|
+
buildGroupShapeXml(group2) {
|
|
51203
|
+
if (group2.rawXml && group2.children.length === 0) {
|
|
51204
|
+
return group2.rawXml;
|
|
51024
51205
|
}
|
|
51025
51206
|
const EMU = _PptxHandlerRuntime3.EMU_PER_PX;
|
|
51026
|
-
const offX = Math.round(
|
|
51027
|
-
const offY = Math.round(
|
|
51028
|
-
const extCx = Math.round(
|
|
51029
|
-
const extCy = Math.round(
|
|
51207
|
+
const offX = Math.round(group2.x * EMU);
|
|
51208
|
+
const offY = Math.round(group2.y * EMU);
|
|
51209
|
+
const extCx = Math.round(group2.width * EMU);
|
|
51210
|
+
const extCy = Math.round(group2.height * EMU);
|
|
51030
51211
|
const chOffX = 0;
|
|
51031
51212
|
const chOffY = 0;
|
|
51032
51213
|
const chExtCx = extCx;
|
|
51033
51214
|
const chExtCy = extCy;
|
|
51034
51215
|
const xfrmAttrs = {};
|
|
51035
|
-
if (typeof
|
|
51036
|
-
xfrmAttrs["@_rot"] = String(Math.round(
|
|
51216
|
+
if (typeof group2.rotation === "number" && group2.rotation !== 0) {
|
|
51217
|
+
xfrmAttrs["@_rot"] = String(Math.round(group2.rotation * 6e4));
|
|
51037
51218
|
}
|
|
51038
|
-
if (
|
|
51219
|
+
if (group2.flipHorizontal) {
|
|
51039
51220
|
xfrmAttrs["@_flipH"] = "1";
|
|
51040
51221
|
}
|
|
51041
|
-
if (
|
|
51222
|
+
if (group2.flipVertical) {
|
|
51042
51223
|
xfrmAttrs["@_flipV"] = "1";
|
|
51043
51224
|
}
|
|
51044
51225
|
const grpXml = {
|
|
51045
51226
|
"p:nvGrpSpPr": {
|
|
51046
|
-
"p:cNvPr": { "@_id": "0", "@_name":
|
|
51227
|
+
"p:cNvPr": { "@_id": "0", "@_name": group2.id },
|
|
51047
51228
|
"p:cNvGrpSpPr": {},
|
|
51048
51229
|
"p:nvPr": {}
|
|
51049
51230
|
},
|
|
@@ -51072,7 +51253,7 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime3 extends PptxHandlerRuntime
|
|
|
51072
51253
|
const childShapes = [];
|
|
51073
51254
|
const childPics = [];
|
|
51074
51255
|
const childConnectors = [];
|
|
51075
|
-
for (const child202 of
|
|
51256
|
+
for (const child202 of group2.children) {
|
|
51076
51257
|
let xml = child202.rawXml;
|
|
51077
51258
|
if (!xml && (child202.type === "text" || child202.type === "shape")) {
|
|
51078
51259
|
xml = this.createElementXml(child202);
|
|
@@ -58594,12 +58775,12 @@ var PptxHandlerRuntime37 = class _PptxHandlerRuntime13 extends PptxHandlerRuntim
|
|
|
58594
58775
|
updateSummaryFallback(shape, el, targets, relationships) {
|
|
58595
58776
|
const block = this.alternateContentBlockByRawXml.get(shape);
|
|
58596
58777
|
const fallback = block?.rawAc["mc:Fallback"];
|
|
58597
|
-
const
|
|
58598
|
-
if (!
|
|
58778
|
+
const group2 = fallback?.["p:grpSp"];
|
|
58779
|
+
if (!group2) {
|
|
58599
58780
|
return;
|
|
58600
58781
|
}
|
|
58601
|
-
const existing = this.ensureArray(
|
|
58602
|
-
|
|
58782
|
+
const existing = this.ensureArray(group2["p:pic"]);
|
|
58783
|
+
group2["p:pic"] = targets.map((target, index) => {
|
|
58603
58784
|
const tile = this.summaryTileElement(el, target, index);
|
|
58604
58785
|
const picture = existing[index] ?? this.buildZoomFallbackPicture(tile, relationships[index]);
|
|
58605
58786
|
this.applyZoomTransform(picture["p:spPr"] ??= {}, tile);
|
|
@@ -59985,7 +60166,7 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
|
|
|
59985
60166
|
*/
|
|
59986
60167
|
buildFontSchemeObject(schemeName, fontMap, majorScripts, minorScripts) {
|
|
59987
60168
|
const buildFontGroup = (latinKey, eaKey, csKey, scripts) => {
|
|
59988
|
-
const
|
|
60169
|
+
const group2 = {
|
|
59989
60170
|
"a:latin": { "@_typeface": fontMap[latinKey] || "Calibri" },
|
|
59990
60171
|
"a:ea": { "@_typeface": fontMap[eaKey] || "" },
|
|
59991
60172
|
"a:cs": { "@_typeface": fontMap[csKey] || "" }
|
|
@@ -59996,9 +60177,9 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
|
|
|
59996
60177
|
"@_script": script,
|
|
59997
60178
|
"@_typeface": scripts[script]
|
|
59998
60179
|
}));
|
|
59999
|
-
|
|
60180
|
+
group2["a:font"] = fontEntries.length === 1 ? fontEntries[0] : fontEntries;
|
|
60000
60181
|
}
|
|
60001
|
-
return
|
|
60182
|
+
return group2;
|
|
60002
60183
|
};
|
|
60003
60184
|
return {
|
|
60004
60185
|
"@_name": schemeName,
|
|
@@ -62187,31 +62368,35 @@ var PptxHandlerRuntime57 = class _PptxHandlerRuntime23 extends PptxHandlerRuntim
|
|
|
62187
62368
|
return normalized;
|
|
62188
62369
|
}
|
|
62189
62370
|
readImageCropFromBlipFill(blipFill) {
|
|
62371
|
+
const result = {};
|
|
62190
62372
|
const sourceRect = blipFill?.["a:srcRect"];
|
|
62191
62373
|
if (sourceRect) {
|
|
62192
|
-
|
|
62193
|
-
|
|
62194
|
-
|
|
62195
|
-
|
|
62196
|
-
return { cropLeft, cropTop, cropRight, cropBottom };
|
|
62374
|
+
result.cropLeft = this.parseCropFraction(sourceRect["@_l"]);
|
|
62375
|
+
result.cropTop = this.parseCropFraction(sourceRect["@_t"]);
|
|
62376
|
+
result.cropRight = this.parseCropFraction(sourceRect["@_r"]);
|
|
62377
|
+
result.cropBottom = this.parseCropFraction(sourceRect["@_b"]);
|
|
62197
62378
|
}
|
|
62198
62379
|
const stretchNode = blipFill?.["a:stretch"];
|
|
62199
62380
|
const fillRect = stretchNode?.["a:fillRect"];
|
|
62200
62381
|
if (fillRect) {
|
|
62201
|
-
|
|
62202
|
-
|
|
62203
|
-
|
|
62204
|
-
|
|
62205
|
-
if (l !== void 0 || t !== void 0 || r !== void 0 || b !== void 0) {
|
|
62206
|
-
return {
|
|
62207
|
-
cropLeft: l,
|
|
62208
|
-
cropTop: t,
|
|
62209
|
-
cropRight: r,
|
|
62210
|
-
cropBottom: b
|
|
62211
|
-
};
|
|
62212
|
-
}
|
|
62382
|
+
result.fillRectLeft = this.parseSignedRectFraction(fillRect["@_l"]);
|
|
62383
|
+
result.fillRectTop = this.parseSignedRectFraction(fillRect["@_t"]);
|
|
62384
|
+
result.fillRectRight = this.parseSignedRectFraction(fillRect["@_r"]);
|
|
62385
|
+
result.fillRectBottom = this.parseSignedRectFraction(fillRect["@_b"]);
|
|
62213
62386
|
}
|
|
62214
|
-
return
|
|
62387
|
+
return result;
|
|
62388
|
+
}
|
|
62389
|
+
/**
|
|
62390
|
+
* Parse a signed ST_Percentage rect offset (thousandths of a percent) to a
|
|
62391
|
+
* fraction. Unlike {@link parseCropFraction} the sign is preserved; the
|
|
62392
|
+
* magnitude is capped at 10x the frame to bound hostile input.
|
|
62393
|
+
*/
|
|
62394
|
+
parseSignedRectFraction(value) {
|
|
62395
|
+
const raw = Number.parseInt(String(value ?? ""), 10);
|
|
62396
|
+
if (!Number.isFinite(raw)) {
|
|
62397
|
+
return void 0;
|
|
62398
|
+
}
|
|
62399
|
+
return Math.max(-1e6, Math.min(1e6, raw)) / 1e5;
|
|
62215
62400
|
}
|
|
62216
62401
|
extractShapeStyle(spPr, styleNode) {
|
|
62217
62402
|
return this.shapeStyleExtractor.extractShapeStyle(spPr, styleNode);
|
|
@@ -63050,6 +63235,19 @@ var PptxHandlerRuntime61 = class _PptxHandlerRuntime25 extends PptxHandlerRuntim
|
|
|
63050
63235
|
}
|
|
63051
63236
|
};
|
|
63052
63237
|
var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntime61 {
|
|
63238
|
+
/**
|
|
63239
|
+
* A copy of an `a:lstStyle` level entry without its `a:defRPr`: run
|
|
63240
|
+
* defaults follow their own precedence chain, so only the paragraph-level
|
|
63241
|
+
* keys (algn, lnSpc, spacing, margins, tabs) may join the pPr merge.
|
|
63242
|
+
*/
|
|
63243
|
+
withoutDefaultRunProperties(node) {
|
|
63244
|
+
if (!node || typeof node !== "object") {
|
|
63245
|
+
return void 0;
|
|
63246
|
+
}
|
|
63247
|
+
const copy2 = { ...node };
|
|
63248
|
+
delete copy2["a:defRPr"];
|
|
63249
|
+
return copy2;
|
|
63250
|
+
}
|
|
63053
63251
|
/**
|
|
63054
63252
|
* Extract a paragraph's OWN `a:pPr` geometry (align, spacing, margins,
|
|
63055
63253
|
* indent, tabs, rtl) as a partial {@link TextStyle} so per-paragraph
|
|
@@ -63113,10 +63311,26 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63113
63311
|
*/
|
|
63114
63312
|
resolveShapeParagraphStyle(p, textStyle, ctx) {
|
|
63115
63313
|
const inheritedParagraph = this.ensureArray(ctx.inheritedTxBody?.["a:p"])[0];
|
|
63116
|
-
const
|
|
63314
|
+
const directPPr = this.mergeXmlObjects(
|
|
63117
63315
|
inheritedParagraph?.["a:pPr"],
|
|
63118
63316
|
p["a:pPr"]
|
|
63119
63317
|
);
|
|
63318
|
+
const parsedLevel = Number.parseInt(String(directPPr?.["@_lvl"] ?? "0"), 10);
|
|
63319
|
+
const level = Number.isFinite(parsedLevel) ? Math.min(Math.max(parsedLevel, 0), 8) : 0;
|
|
63320
|
+
const levelKey = `a:lvl${level + 1}pPr`;
|
|
63321
|
+
const ownLstStyle = ctx.txBody?.["a:lstStyle"];
|
|
63322
|
+
const inheritedLstStyle = ctx.inheritedTxBody?.["a:lstStyle"];
|
|
63323
|
+
const lstStyleParagraphDefaults = this.mergeXmlObjects(
|
|
63324
|
+
this.mergeXmlObjects(
|
|
63325
|
+
this.withoutDefaultRunProperties(inheritedLstStyle?.["a:defPPr"]),
|
|
63326
|
+
this.withoutDefaultRunProperties(inheritedLstStyle?.[levelKey])
|
|
63327
|
+
),
|
|
63328
|
+
this.mergeXmlObjects(
|
|
63329
|
+
this.withoutDefaultRunProperties(ownLstStyle?.["a:defPPr"]),
|
|
63330
|
+
this.withoutDefaultRunProperties(ownLstStyle?.[levelKey])
|
|
63331
|
+
)
|
|
63332
|
+
);
|
|
63333
|
+
const pPr = this.mergeXmlObjects(lstStyleParagraphDefaults, directPPr);
|
|
63120
63334
|
const paragraphRtl = this.parseOptionalBooleanAttr(pPr?.["@_rtl"]);
|
|
63121
63335
|
if (paragraphRtl !== void 0 && textStyle.rtl === void 0) {
|
|
63122
63336
|
textStyle.rtl = paragraphRtl;
|
|
@@ -63240,8 +63454,6 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63240
63454
|
ctx.slideRelationshipMap,
|
|
63241
63455
|
false
|
|
63242
63456
|
);
|
|
63243
|
-
const level = pPr?.["@_lvl"] === void 0 ? -1 : Number.parseInt(String(pPr["@_lvl"]), 10);
|
|
63244
|
-
const levelKey = level === -1 ? "a:defPPr" : `a:lvl${Number.isFinite(level) ? Math.min(Math.max(level + 1, 1), 9) : 1}pPr`;
|
|
63245
63457
|
const inheritedLevelStyle = this.extractTextRunStyle(
|
|
63246
63458
|
ctx.inheritedTxBody?.["a:lstStyle"]?.[levelKey]?.["a:defRPr"],
|
|
63247
63459
|
paraAlign,
|
|
@@ -63274,12 +63486,16 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63274
63486
|
mergedDefaultRunStyle.fontFamily = ctx.styleFontRefTypeface;
|
|
63275
63487
|
}
|
|
63276
63488
|
if (ctx.effectiveLevelStyles) {
|
|
63277
|
-
const
|
|
63278
|
-
const
|
|
63489
|
+
const phLevel = ctx.effectiveLevelStyles[level];
|
|
63490
|
+
const phBase = ctx.effectiveLevelStyles[-1];
|
|
63279
63491
|
if (phLevel) {
|
|
63280
63492
|
this.applyPlaceholderLevelDefaults(mergedDefaultRunStyle, phLevel);
|
|
63281
63493
|
this.applyPlaceholderLevelDefaults(textStyle, phLevel);
|
|
63282
63494
|
}
|
|
63495
|
+
if (phBase) {
|
|
63496
|
+
this.applyPlaceholderLevelDefaults(mergedDefaultRunStyle, phBase);
|
|
63497
|
+
this.applyPlaceholderLevelDefaults(textStyle, phBase);
|
|
63498
|
+
}
|
|
63283
63499
|
}
|
|
63284
63500
|
if (pPr?.["@_algn"] === void 0 && textStyle.align !== void 0) {
|
|
63285
63501
|
paraAlign = textStyle.align;
|
|
@@ -63289,15 +63505,13 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
|
|
|
63289
63505
|
let effectiveMarginLeft = parMarginLeft;
|
|
63290
63506
|
let effectiveIndent = parIndent;
|
|
63291
63507
|
if (ctx.effectiveLevelStyles) {
|
|
63292
|
-
const
|
|
63293
|
-
const
|
|
63294
|
-
if (
|
|
63295
|
-
|
|
63296
|
-
|
|
63297
|
-
|
|
63298
|
-
|
|
63299
|
-
effectiveIndent = phLevel.indent;
|
|
63300
|
-
}
|
|
63508
|
+
const phLevel = ctx.effectiveLevelStyles[level];
|
|
63509
|
+
const phBase = ctx.effectiveLevelStyles[-1];
|
|
63510
|
+
if (effectiveMarginLeft === void 0) {
|
|
63511
|
+
effectiveMarginLeft = phLevel?.marginLeft ?? phBase?.marginLeft;
|
|
63512
|
+
}
|
|
63513
|
+
if (effectiveIndent === void 0) {
|
|
63514
|
+
effectiveIndent = phLevel?.indent ?? phBase?.indent;
|
|
63301
63515
|
}
|
|
63302
63516
|
}
|
|
63303
63517
|
return {
|
|
@@ -64631,7 +64845,7 @@ function parseEmuInt2(value) {
|
|
|
64631
64845
|
return parsed;
|
|
64632
64846
|
}
|
|
64633
64847
|
var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntime66 {
|
|
64634
|
-
async parseGroupShape(
|
|
64848
|
+
async parseGroupShape(group2, baseId, slidePath, rawXmlStr, depth = 0) {
|
|
64635
64849
|
if (depth > MAX_GROUP_DEPTH) {
|
|
64636
64850
|
this.compatibilityService.reportWarning({
|
|
64637
64851
|
code: "group-depth-exceeded",
|
|
@@ -64643,7 +64857,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64643
64857
|
});
|
|
64644
64858
|
return [];
|
|
64645
64859
|
}
|
|
64646
|
-
const grpSpPr =
|
|
64860
|
+
const grpSpPr = group2["p:grpSpPr"];
|
|
64647
64861
|
const xfrm = grpSpPr?.["a:xfrm"];
|
|
64648
64862
|
const EMU_PX = _PptxHandlerRuntime30.EMU_PER_PX;
|
|
64649
64863
|
let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
|
|
@@ -64708,16 +64922,16 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64708
64922
|
}
|
|
64709
64923
|
return el;
|
|
64710
64924
|
};
|
|
64711
|
-
this.unwrapAlternateContent(
|
|
64925
|
+
this.unwrapAlternateContent(group2);
|
|
64712
64926
|
const childOrder3 = this.extractSpTreeChildOrder(
|
|
64713
64927
|
void 0,
|
|
64714
|
-
|
|
64928
|
+
group2,
|
|
64715
64929
|
"p:grpSp"
|
|
64716
64930
|
);
|
|
64717
64931
|
const elements2 = [];
|
|
64718
64932
|
for (const entry2 of childOrder3) {
|
|
64719
64933
|
if (entry2.tag === "p:grpSp") {
|
|
64720
|
-
const subArr = this.ensureArray(
|
|
64934
|
+
const subArr = this.ensureArray(group2["p:grpSp"]);
|
|
64721
64935
|
const subGroup = subArr[entry2.indexInType];
|
|
64722
64936
|
if (!subGroup) {
|
|
64723
64937
|
continue;
|
|
@@ -64735,12 +64949,12 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64735
64949
|
const element = await this.parseSpTreeChild(
|
|
64736
64950
|
entry2.tag,
|
|
64737
64951
|
entry2.indexInType,
|
|
64738
|
-
|
|
64952
|
+
group2,
|
|
64739
64953
|
slidePath,
|
|
64740
64954
|
`${baseId}-`
|
|
64741
64955
|
);
|
|
64742
64956
|
if (element) {
|
|
64743
|
-
const childNode2 = this.ensureArray(
|
|
64957
|
+
const childNode2 = this.ensureArray(group2[entry2.tag])[entry2.indexInType];
|
|
64744
64958
|
applyRawChildGeometry(element, childNode2);
|
|
64745
64959
|
transformElement(element);
|
|
64746
64960
|
elements2.push(element);
|
|
@@ -64753,8 +64967,8 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64753
64967
|
* Parse a p:grpSp element into a GroupPptxElement with children.
|
|
64754
64968
|
* Children have coordinates relative to the group's position.
|
|
64755
64969
|
*/
|
|
64756
|
-
async parseGroupShapeAsGroup(
|
|
64757
|
-
const grpSpPr =
|
|
64970
|
+
async parseGroupShapeAsGroup(group2, baseId, slidePath, rawXmlStr) {
|
|
64971
|
+
const grpSpPr = group2["p:grpSpPr"];
|
|
64758
64972
|
const xfrm = grpSpPr?.["a:xfrm"];
|
|
64759
64973
|
let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
|
|
64760
64974
|
let groupRotation;
|
|
@@ -64780,7 +64994,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64780
64994
|
}
|
|
64781
64995
|
const grpFillStyle = grpSpPr ? this.extractShapeStyle(grpSpPr) : void 0;
|
|
64782
64996
|
const hasGroupFill = grpFillStyle && grpFillStyle.fillMode && grpFillStyle.fillMode !== "none";
|
|
64783
|
-
const children10 = await this.parseGroupShape(
|
|
64997
|
+
const children10 = await this.parseGroupShape(group2, baseId, slidePath, rawXmlStr);
|
|
64784
64998
|
if (children10.length === 0) {
|
|
64785
64999
|
return null;
|
|
64786
65000
|
}
|
|
@@ -64806,7 +65020,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64806
65020
|
child202.x -= parentX;
|
|
64807
65021
|
child202.y -= parentY;
|
|
64808
65022
|
}
|
|
64809
|
-
const grpCNvPr =
|
|
65023
|
+
const grpCNvPr = group2?.["p:nvGrpSpPr"]?.["p:cNvPr"];
|
|
64810
65024
|
const grpSlideRels = this.slideRelsMap.get(slidePath);
|
|
64811
65025
|
const { actionClick: grpActionClick, actionHover: grpActionHover } = this.parseElementActions(
|
|
64812
65026
|
grpCNvPr,
|
|
@@ -64826,7 +65040,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
64826
65040
|
flipHorizontal: flipHorizontal || void 0,
|
|
64827
65041
|
flipVertical: flipVertical || void 0,
|
|
64828
65042
|
children: children10,
|
|
64829
|
-
rawXml:
|
|
65043
|
+
rawXml: group2,
|
|
64830
65044
|
actionClick: grpActionClick,
|
|
64831
65045
|
actionHover: grpActionHover,
|
|
64832
65046
|
groupFill: hasGroupFill ? grpFillStyle : void 0
|
|
@@ -66293,12 +66507,12 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
|
|
|
66293
66507
|
}
|
|
66294
66508
|
} else if (entry2.tag === "p:grpSp") {
|
|
66295
66509
|
const groups = this.ensureArray(spTree["p:grpSp"]);
|
|
66296
|
-
const
|
|
66297
|
-
if (!
|
|
66510
|
+
const group2 = groups[entry2.indexInType];
|
|
66511
|
+
if (!group2) {
|
|
66298
66512
|
continue;
|
|
66299
66513
|
}
|
|
66300
66514
|
const element = await this.parseGroupShapeAsGroup(
|
|
66301
|
-
|
|
66515
|
+
group2,
|
|
66302
66516
|
`master-group-${masterToken}-${entry2.indexInType}`,
|
|
66303
66517
|
masterPath
|
|
66304
66518
|
);
|
|
@@ -66515,12 +66729,12 @@ var PptxHandlerRuntime76 = class extends PptxHandlerRuntime75 {
|
|
|
66515
66729
|
}
|
|
66516
66730
|
} else if (entry2.tag === "p:grpSp") {
|
|
66517
66731
|
const groups = this.ensureArray(spTree["p:grpSp"]);
|
|
66518
|
-
const
|
|
66519
|
-
if (!
|
|
66732
|
+
const group2 = groups[entry2.indexInType];
|
|
66733
|
+
if (!group2) {
|
|
66520
66734
|
continue;
|
|
66521
66735
|
}
|
|
66522
66736
|
const element = await this.parseGroupShapeAsGroup(
|
|
66523
|
-
|
|
66737
|
+
group2,
|
|
66524
66738
|
`layout-group-${layoutToken}-${entry2.indexInType}`,
|
|
66525
66739
|
layoutPath
|
|
66526
66740
|
);
|
|
@@ -68397,16 +68611,16 @@ function extractDrawingShapeTextStyle(txBody, deps) {
|
|
|
68397
68611
|
}
|
|
68398
68612
|
return { fontSize, fontColor };
|
|
68399
68613
|
}
|
|
68400
|
-
function resolveSmartArtTextStyles(paragraphs,
|
|
68614
|
+
function resolveSmartArtTextStyles(paragraphs, resolve2) {
|
|
68401
68615
|
for (const paragraph of paragraphs ?? []) {
|
|
68402
68616
|
if (paragraph.endParaRPr) {
|
|
68403
|
-
paragraph.endParaStyle =
|
|
68617
|
+
paragraph.endParaStyle = resolve2(paragraph.endParaRPr);
|
|
68404
68618
|
}
|
|
68405
68619
|
for (const item of paragraph.items) {
|
|
68406
68620
|
if (item.kind === "run" && item.run.rPr) {
|
|
68407
|
-
item.run.style =
|
|
68621
|
+
item.run.style = resolve2(item.run.rPr);
|
|
68408
68622
|
} else if ((item.kind === "field" || item.kind === "break") && item.rPr) {
|
|
68409
|
-
item.style =
|
|
68623
|
+
item.style = resolve2(item.rPr);
|
|
68410
68624
|
}
|
|
68411
68625
|
}
|
|
68412
68626
|
}
|
|
@@ -69915,6 +70129,20 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
|
|
|
69915
70129
|
const hasBlanks = expanded.some((value) => value === null);
|
|
69916
70130
|
const values = hasBlanks ? expanded.map((value) => value ?? 0) : this.extractChartPointValues(valNode, true).map((value) => Number.parseFloat(value)).filter((value) => Number.isFinite(value));
|
|
69917
70131
|
const blanks = hasBlanks ? expanded.map((value) => value === null) : void 0;
|
|
70132
|
+
const seriesNumberFormat = String(
|
|
70133
|
+
this.xmlLookupService.getChildByLocalName(
|
|
70134
|
+
this.xmlLookupService.getChildByLocalName(seriesNode, "dLbls"),
|
|
70135
|
+
"numFmt"
|
|
70136
|
+
)?.["@_formatCode"] ?? ""
|
|
70137
|
+
).trim() || String(
|
|
70138
|
+
this.xmlLookupService.getScalarChildByLocalName(
|
|
70139
|
+
this.xmlLookupService.getChildByLocalName(
|
|
70140
|
+
this.xmlLookupService.getChildByLocalName(valNode, "numRef") ?? valNode,
|
|
70141
|
+
"numCache"
|
|
70142
|
+
),
|
|
70143
|
+
"formatCode"
|
|
70144
|
+
) ?? ""
|
|
70145
|
+
).trim();
|
|
69918
70146
|
const seriesShapeProperties = this.xmlLookupService.getChildByLocalName(seriesNode, "spPr");
|
|
69919
70147
|
const seriesColor23 = this.parseColor(
|
|
69920
70148
|
this.xmlLookupService.getChildByLocalName(seriesShapeProperties, "solidFill")
|
|
@@ -69946,6 +70174,7 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
|
|
|
69946
70174
|
name: seriesName.trim().length > 0 ? seriesName : `Series ${seriesIndex + 1}`,
|
|
69947
70175
|
values: fallbackValues,
|
|
69948
70176
|
...blanks ? { blanks } : {},
|
|
70177
|
+
...seriesNumberFormat ? { numberFormat: seriesNumberFormat } : {},
|
|
69949
70178
|
color: seriesColor23,
|
|
69950
70179
|
...trendlines.length > 0 ? { trendlines } : {},
|
|
69951
70180
|
...errBars.length > 0 ? { errBars } : {},
|
|
@@ -79972,9 +80201,9 @@ var SlideMetadataRenderer = class {
|
|
|
79972
80201
|
const clickGroups = this.groupByClickSequence(items);
|
|
79973
80202
|
const lines = ["### Animations"];
|
|
79974
80203
|
for (let gi = 0; gi < clickGroups.length; gi += 1) {
|
|
79975
|
-
const
|
|
80204
|
+
const group2 = clickGroups[gi];
|
|
79976
80205
|
lines.push(`- **Click ${gi + 1}:**`);
|
|
79977
|
-
for (const anim of
|
|
80206
|
+
for (const anim of group2) {
|
|
79978
80207
|
lines.push(` - ${this.summariseAnimation(anim)}`);
|
|
79979
80208
|
}
|
|
79980
80209
|
}
|
|
@@ -80870,7 +81099,7 @@ var TextSegmentRenderer = class {
|
|
|
80870
81099
|
return "";
|
|
80871
81100
|
}
|
|
80872
81101
|
const paragraphs = this.groupParagraphs(segments);
|
|
80873
|
-
const renderedParagraphs = paragraphs.map((
|
|
81102
|
+
const renderedParagraphs = paragraphs.map((group2) => this.renderParagraph(group2, options)).filter((paragraph) => paragraph.text.length > 0);
|
|
80874
81103
|
if (renderedParagraphs.length === 0) {
|
|
80875
81104
|
return "";
|
|
80876
81105
|
}
|
|
@@ -80902,7 +81131,7 @@ var TextSegmentRenderer = class {
|
|
|
80902
81131
|
plainText(segments, options = {}) {
|
|
80903
81132
|
const paragraphs = this.groupParagraphs(segments);
|
|
80904
81133
|
const rendered = paragraphs.map(
|
|
80905
|
-
(
|
|
81134
|
+
(group2) => group2.segments.map((segment) => {
|
|
80906
81135
|
const base = this.resolvePlainSegmentText(segment, options);
|
|
80907
81136
|
if (segment.rubyText) {
|
|
80908
81137
|
return `${base}(${segment.rubyText})`;
|
|
@@ -80932,8 +81161,8 @@ var TextSegmentRenderer = class {
|
|
|
80932
81161
|
}
|
|
80933
81162
|
return groups;
|
|
80934
81163
|
}
|
|
80935
|
-
renderParagraph(
|
|
80936
|
-
let rawText =
|
|
81164
|
+
renderParagraph(group2, options) {
|
|
81165
|
+
let rawText = group2.segments.map((segment) => this.renderSegment(segment, options)).join("");
|
|
80937
81166
|
if (options.htmlFormatting) {
|
|
80938
81167
|
rawText = rawText.replace(/<\/strong><strong>/g, "").replace(/<\/em><em>/g, "").replace(/<\/s><s>/g, "");
|
|
80939
81168
|
} else {
|
|
@@ -80947,10 +81176,10 @@ var TextSegmentRenderer = class {
|
|
|
80947
81176
|
return { text: "", isListItem: false };
|
|
80948
81177
|
}
|
|
80949
81178
|
if (!options.disableLists && !options.inlineMode) {
|
|
80950
|
-
const bullet =
|
|
81179
|
+
const bullet = group2.segments.find((segment) => Boolean(segment.bulletInfo))?.bulletInfo;
|
|
80951
81180
|
if (bullet && !bullet.none) {
|
|
80952
|
-
const level = resolveListLevel(bullet,
|
|
80953
|
-
const marker = resolveListMarker(bullet,
|
|
81181
|
+
const level = resolveListLevel(bullet, group2.index, options.paragraphIndents);
|
|
81182
|
+
const marker = resolveListMarker(bullet, group2.index);
|
|
80954
81183
|
const alreadyNumbered = bullet.autoNumType && /^\d+[.)]\s/.test(rawText);
|
|
80955
81184
|
const prefix = alreadyNumbered ? "" : `${marker} `;
|
|
80956
81185
|
if (options.htmlFormatting) {
|
|
@@ -80966,7 +81195,7 @@ var TextSegmentRenderer = class {
|
|
|
80966
81195
|
};
|
|
80967
81196
|
}
|
|
80968
81197
|
}
|
|
80969
|
-
const align =
|
|
81198
|
+
const align = group2.segments[0]?.style.align;
|
|
80970
81199
|
if (!options.disableAlignment && !options.inlineMode && align && align !== "left") {
|
|
80971
81200
|
return {
|
|
80972
81201
|
text: `<p align="${align}">${rawText}</p>`,
|
|
@@ -83815,8 +84044,8 @@ function buildStrokeOutline(element) {
|
|
|
83815
84044
|
function suppressesCssBorder(element) {
|
|
83816
84045
|
return buildStrokeOutline(element) !== void 0;
|
|
83817
84046
|
}
|
|
83818
|
-
function getGroupChildParentFill(
|
|
83819
|
-
return
|
|
84047
|
+
function getGroupChildParentFill(group2) {
|
|
84048
|
+
return group2.type === "group" ? group2.groupFill : void 0;
|
|
83820
84049
|
}
|
|
83821
84050
|
function resolveGroupChildFill(child22, parentGroupFill) {
|
|
83822
84051
|
if (!parentGroupFill || !hasShapeProperties(child22) || child22.shapeStyle?.fillMode !== "group") {
|
|
@@ -86288,11 +86517,11 @@ var LatexParser = class {
|
|
|
86288
86517
|
return tryParseScripts(this, base);
|
|
86289
86518
|
}
|
|
86290
86519
|
if (tok.type === "group_start") {
|
|
86291
|
-
const
|
|
86292
|
-
if (
|
|
86520
|
+
const group2 = this.parseGroup();
|
|
86521
|
+
if (group2.length === 0) {
|
|
86293
86522
|
return null;
|
|
86294
86523
|
}
|
|
86295
|
-
const base =
|
|
86524
|
+
const base = group2.length === 1 ? group2[0] : this.wrapE(group2);
|
|
86296
86525
|
return tryParseScripts(this, base);
|
|
86297
86526
|
}
|
|
86298
86527
|
if (tok.type === "command") {
|
|
@@ -86700,6 +86929,273 @@ function latexToMathMl(source) {
|
|
|
86700
86929
|
function compileEquationTemplateMathMl() {
|
|
86701
86930
|
return EQUATION_TEMPLATES.map((tmpl) => latexToMathMl(tmpl.latex));
|
|
86702
86931
|
}
|
|
86932
|
+
var NICE_STEPS = [1, 2, 2.5, 5, 10];
|
|
86933
|
+
var HEADROOM = 0.05;
|
|
86934
|
+
var ZERO_ANCHOR_RATIO = 5 / 6;
|
|
86935
|
+
function niceAxisStep(value) {
|
|
86936
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
86937
|
+
return 1;
|
|
86938
|
+
}
|
|
86939
|
+
const exponent = Math.floor(Math.log10(value));
|
|
86940
|
+
const power = 10 ** exponent;
|
|
86941
|
+
const mantissa = value / power;
|
|
86942
|
+
const step = NICE_STEPS.find((candidate) => mantissa <= candidate + 1e-12) ?? 10;
|
|
86943
|
+
return step * power;
|
|
86944
|
+
}
|
|
86945
|
+
function snap(value, unit, direction) {
|
|
86946
|
+
const scaled = value / unit;
|
|
86947
|
+
const rounded = direction === "up" ? Math.ceil(scaled - 1e-9) : Math.floor(scaled + 1e-9);
|
|
86948
|
+
return rounded * unit;
|
|
86949
|
+
}
|
|
86950
|
+
function niceValueAxisBounds(dataMin, dataMax, targetIntervals = 4) {
|
|
86951
|
+
if (!Number.isFinite(dataMin) || !Number.isFinite(dataMax)) {
|
|
86952
|
+
return { min: 0, max: 1, majorUnit: 0.5 };
|
|
86953
|
+
}
|
|
86954
|
+
const low = Math.min(dataMin, dataMax);
|
|
86955
|
+
const high = Math.max(dataMin, dataMax);
|
|
86956
|
+
const intervals = Math.max(1, Math.round(targetIntervals));
|
|
86957
|
+
if (low === high) {
|
|
86958
|
+
if (low === 0) {
|
|
86959
|
+
return { min: 0, max: 1, majorUnit: 1 / intervals };
|
|
86960
|
+
}
|
|
86961
|
+
const unit2 = niceAxisStep(Math.abs(low) / intervals);
|
|
86962
|
+
return low > 0 ? { min: 0, max: snap(low, unit2, "up") || unit2, majorUnit: unit2 } : { min: snap(low, unit2, "down"), max: 0, majorUnit: unit2 };
|
|
86963
|
+
}
|
|
86964
|
+
const dataSpan = high - low;
|
|
86965
|
+
const padding = dataSpan * HEADROOM;
|
|
86966
|
+
let paddedMin;
|
|
86967
|
+
let paddedMax;
|
|
86968
|
+
if (low >= 0) {
|
|
86969
|
+
paddedMin = low < high * ZERO_ANCHOR_RATIO ? 0 : low - padding;
|
|
86970
|
+
paddedMax = high + padding;
|
|
86971
|
+
} else if (high <= 0) {
|
|
86972
|
+
paddedMax = high > low * ZERO_ANCHOR_RATIO ? 0 : high + padding;
|
|
86973
|
+
paddedMin = low - padding;
|
|
86974
|
+
} else {
|
|
86975
|
+
paddedMin = low - padding;
|
|
86976
|
+
paddedMax = high + padding;
|
|
86977
|
+
}
|
|
86978
|
+
const unit = niceAxisStep((paddedMax - paddedMin) / intervals);
|
|
86979
|
+
const min = paddedMin === 0 ? 0 : snap(paddedMin, unit, "down");
|
|
86980
|
+
let max = paddedMax === 0 ? 0 : snap(paddedMax, unit, "up");
|
|
86981
|
+
if (max <= min) {
|
|
86982
|
+
max = min + unit;
|
|
86983
|
+
}
|
|
86984
|
+
return { min, max, majorUnit: unit };
|
|
86985
|
+
}
|
|
86986
|
+
var GENERAL = /* @__PURE__ */ new Set(["", "general", "@"]);
|
|
86987
|
+
function sections(code) {
|
|
86988
|
+
const out = [];
|
|
86989
|
+
let current = "";
|
|
86990
|
+
let inQuotes = false;
|
|
86991
|
+
for (let i = 0; i < code.length; i += 1) {
|
|
86992
|
+
const ch = code[i];
|
|
86993
|
+
if (ch === '"') {
|
|
86994
|
+
inQuotes = !inQuotes;
|
|
86995
|
+
current += ch;
|
|
86996
|
+
continue;
|
|
86997
|
+
}
|
|
86998
|
+
if (ch === "\\") {
|
|
86999
|
+
current += ch + (code[i + 1] ?? "");
|
|
87000
|
+
i += 1;
|
|
87001
|
+
continue;
|
|
87002
|
+
}
|
|
87003
|
+
if (ch === ";" && !inQuotes) {
|
|
87004
|
+
out.push(current);
|
|
87005
|
+
current = "";
|
|
87006
|
+
continue;
|
|
87007
|
+
}
|
|
87008
|
+
current += ch;
|
|
87009
|
+
}
|
|
87010
|
+
out.push(current);
|
|
87011
|
+
return out;
|
|
87012
|
+
}
|
|
87013
|
+
function sectionFor(value, parts) {
|
|
87014
|
+
if (parts.length === 1) {
|
|
87015
|
+
return { code: parts[0], forcePositive: false };
|
|
87016
|
+
}
|
|
87017
|
+
if (value < 0 && parts[1] !== void 0) {
|
|
87018
|
+
return { code: parts[1], forcePositive: true };
|
|
87019
|
+
}
|
|
87020
|
+
if (value === 0 && parts[2] !== void 0) {
|
|
87021
|
+
return { code: parts[2], forcePositive: false };
|
|
87022
|
+
}
|
|
87023
|
+
return { code: parts[0], forcePositive: false };
|
|
87024
|
+
}
|
|
87025
|
+
var PLACEHOLDER = /[0#?]/u;
|
|
87026
|
+
function parsePattern(code) {
|
|
87027
|
+
let scale = 1;
|
|
87028
|
+
let scientific = false;
|
|
87029
|
+
const chars = [];
|
|
87030
|
+
let inQuotes = false;
|
|
87031
|
+
for (let i = 0; i < code.length; i += 1) {
|
|
87032
|
+
const ch = code[i];
|
|
87033
|
+
if (ch === '"') {
|
|
87034
|
+
inQuotes = !inQuotes;
|
|
87035
|
+
continue;
|
|
87036
|
+
}
|
|
87037
|
+
if (inQuotes) {
|
|
87038
|
+
chars.push({ ch, literal: true });
|
|
87039
|
+
continue;
|
|
87040
|
+
}
|
|
87041
|
+
if (ch === "\\" || ch === "*" || ch === "_") {
|
|
87042
|
+
const next = code[i + 1];
|
|
87043
|
+
i += 1;
|
|
87044
|
+
if (ch === "\\" && next !== void 0) {
|
|
87045
|
+
chars.push({ ch: next, literal: true });
|
|
87046
|
+
}
|
|
87047
|
+
continue;
|
|
87048
|
+
}
|
|
87049
|
+
if (ch === "%") {
|
|
87050
|
+
scale *= 100;
|
|
87051
|
+
chars.push({ ch, literal: true });
|
|
87052
|
+
continue;
|
|
87053
|
+
}
|
|
87054
|
+
if (ch === "E" && (code[i + 1] === "+" || code[i + 1] === "-")) {
|
|
87055
|
+
scientific = true;
|
|
87056
|
+
chars.push({ ch: "E", literal: false });
|
|
87057
|
+
i += 1;
|
|
87058
|
+
continue;
|
|
87059
|
+
}
|
|
87060
|
+
if (ch === "[") {
|
|
87061
|
+
const close = code.indexOf("]", i);
|
|
87062
|
+
i = close === -1 ? code.length : close;
|
|
87063
|
+
continue;
|
|
87064
|
+
}
|
|
87065
|
+
chars.push({ ch, literal: false });
|
|
87066
|
+
}
|
|
87067
|
+
const firstDigit = chars.findIndex((c) => !c.literal && PLACEHOLDER.test(c.ch));
|
|
87068
|
+
if (firstDigit === -1) {
|
|
87069
|
+
return void 0;
|
|
87070
|
+
}
|
|
87071
|
+
let lastDigit = firstDigit;
|
|
87072
|
+
for (let i = chars.length - 1; i >= firstDigit; i -= 1) {
|
|
87073
|
+
const c = chars[i];
|
|
87074
|
+
if (!c.literal && (PLACEHOLDER.test(c.ch) || c.ch === "." || c.ch === "," || c.ch === "E")) {
|
|
87075
|
+
lastDigit = i;
|
|
87076
|
+
break;
|
|
87077
|
+
}
|
|
87078
|
+
}
|
|
87079
|
+
const numeric = chars.slice(firstDigit, lastDigit + 1);
|
|
87080
|
+
const prefix = chars.slice(0, firstDigit).map((c) => c.ch).join("");
|
|
87081
|
+
const suffix = chars.slice(lastDigit + 1).map((c) => c.ch).join("");
|
|
87082
|
+
let grouped = false;
|
|
87083
|
+
let intDigits = 0;
|
|
87084
|
+
let required = 0;
|
|
87085
|
+
let optional = 0;
|
|
87086
|
+
let afterPoint = false;
|
|
87087
|
+
let inExponent = false;
|
|
87088
|
+
for (let i = 0; i < numeric.length; i += 1) {
|
|
87089
|
+
const { ch, literal } = numeric[i];
|
|
87090
|
+
if (literal) {
|
|
87091
|
+
continue;
|
|
87092
|
+
}
|
|
87093
|
+
if (ch === "E") {
|
|
87094
|
+
inExponent = true;
|
|
87095
|
+
continue;
|
|
87096
|
+
}
|
|
87097
|
+
if (inExponent) {
|
|
87098
|
+
continue;
|
|
87099
|
+
}
|
|
87100
|
+
if (ch === ".") {
|
|
87101
|
+
afterPoint = true;
|
|
87102
|
+
continue;
|
|
87103
|
+
}
|
|
87104
|
+
if (ch === ",") {
|
|
87105
|
+
const next = numeric.slice(i + 1).find((c) => !c.literal);
|
|
87106
|
+
if (!next || next.ch === "." || !PLACEHOLDER.test(next.ch)) {
|
|
87107
|
+
scale /= 1e3;
|
|
87108
|
+
} else {
|
|
87109
|
+
grouped = true;
|
|
87110
|
+
}
|
|
87111
|
+
continue;
|
|
87112
|
+
}
|
|
87113
|
+
if (!PLACEHOLDER.test(ch)) {
|
|
87114
|
+
continue;
|
|
87115
|
+
}
|
|
87116
|
+
if (afterPoint) {
|
|
87117
|
+
if (ch === "0") {
|
|
87118
|
+
required += 1;
|
|
87119
|
+
} else {
|
|
87120
|
+
optional += 1;
|
|
87121
|
+
}
|
|
87122
|
+
} else if (ch === "0") {
|
|
87123
|
+
intDigits += 1;
|
|
87124
|
+
}
|
|
87125
|
+
}
|
|
87126
|
+
return {
|
|
87127
|
+
prefix,
|
|
87128
|
+
suffix,
|
|
87129
|
+
intDigits,
|
|
87130
|
+
decimals: { required, optional },
|
|
87131
|
+
grouped,
|
|
87132
|
+
scale,
|
|
87133
|
+
scientific
|
|
87134
|
+
};
|
|
87135
|
+
}
|
|
87136
|
+
function group(intPart) {
|
|
87137
|
+
return intPart.replace(/\B(?=(\d{3})+(?!\d))/gu, ",");
|
|
87138
|
+
}
|
|
87139
|
+
function applyPattern(value, pattern, forcePositive) {
|
|
87140
|
+
const scaled = value * pattern.scale;
|
|
87141
|
+
const magnitude = forcePositive ? Math.abs(scaled) : scaled;
|
|
87142
|
+
if (pattern.scientific) {
|
|
87143
|
+
const digits = pattern.decimals.required + pattern.decimals.optional;
|
|
87144
|
+
const exponential = magnitude.toExponential(digits);
|
|
87145
|
+
const [mantissa, exponent] = exponential.split("e");
|
|
87146
|
+
const sign = exponent.startsWith("-") ? "-" : "+";
|
|
87147
|
+
const power = Math.abs(Number(exponent)).toString().padStart(2, "0");
|
|
87148
|
+
return `${pattern.prefix}${mantissa}E${sign}${power}${pattern.suffix}`;
|
|
87149
|
+
}
|
|
87150
|
+
const maxDecimals = pattern.decimals.required + pattern.decimals.optional;
|
|
87151
|
+
let body = magnitude.toFixed(maxDecimals);
|
|
87152
|
+
if (pattern.decimals.optional > 0) {
|
|
87153
|
+
body = body.replace(/(\.\d*?)0+$/u, "$1").replace(/\.$/u, "");
|
|
87154
|
+
const [, frac = ""] = body.split(".");
|
|
87155
|
+
if (frac.length < pattern.decimals.required) {
|
|
87156
|
+
body = Number(body).toFixed(pattern.decimals.required);
|
|
87157
|
+
}
|
|
87158
|
+
}
|
|
87159
|
+
const [rawIntPart, fracPart] = body.split(".");
|
|
87160
|
+
let intPart = rawIntPart;
|
|
87161
|
+
const negative = intPart.startsWith("-");
|
|
87162
|
+
if (negative) {
|
|
87163
|
+
intPart = intPart.slice(1);
|
|
87164
|
+
}
|
|
87165
|
+
if (intPart.length < pattern.intDigits) {
|
|
87166
|
+
intPart = intPart.padStart(pattern.intDigits, "0");
|
|
87167
|
+
}
|
|
87168
|
+
if (pattern.intDigits === 0 && intPart === "0" && fracPart !== void 0) {
|
|
87169
|
+
intPart = "";
|
|
87170
|
+
}
|
|
87171
|
+
if (pattern.grouped) {
|
|
87172
|
+
intPart = group(intPart);
|
|
87173
|
+
}
|
|
87174
|
+
const number = fracPart === void 0 ? intPart : `${intPart}.${fracPart}`;
|
|
87175
|
+
return `${negative ? "-" : ""}${pattern.prefix}${number}${pattern.suffix}`;
|
|
87176
|
+
}
|
|
87177
|
+
function formatChartNumber(value, formatCode) {
|
|
87178
|
+
if (!Number.isFinite(value)) {
|
|
87179
|
+
return void 0;
|
|
87180
|
+
}
|
|
87181
|
+
const code = (formatCode ?? "").trim();
|
|
87182
|
+
if (GENERAL.has(code.toLowerCase())) {
|
|
87183
|
+
return void 0;
|
|
87184
|
+
}
|
|
87185
|
+
if (/(?:^|[^\\"])(?:yy|mm?m|dd?|hh|ss)/iu.test(code) && !/[0#?]/u.test(code)) {
|
|
87186
|
+
return void 0;
|
|
87187
|
+
}
|
|
87188
|
+
const { code: section, forcePositive } = sectionFor(value, sections(code));
|
|
87189
|
+
const pattern = parsePattern(section);
|
|
87190
|
+
if (!pattern) {
|
|
87191
|
+
return void 0;
|
|
87192
|
+
}
|
|
87193
|
+
try {
|
|
87194
|
+
return applyPattern(value, pattern, forcePositive);
|
|
87195
|
+
} catch {
|
|
87196
|
+
return void 0;
|
|
87197
|
+
}
|
|
87198
|
+
}
|
|
86703
87199
|
var ACCENT1 = "#4472C4";
|
|
86704
87200
|
var ACCENT2 = "#ED7D31";
|
|
86705
87201
|
var ACCENT3 = "#A5A5A5";
|
|
@@ -86830,12 +87326,11 @@ function computeValueRange(series) {
|
|
|
86830
87326
|
if (allValues.length === 0) {
|
|
86831
87327
|
return { min: 0, max: 1, span: 1 };
|
|
86832
87328
|
}
|
|
86833
|
-
const
|
|
86834
|
-
|
|
86835
|
-
|
|
86836
|
-
|
|
86837
|
-
|
|
86838
|
-
return { min, max, span };
|
|
87329
|
+
const { min, max, majorUnit } = niceValueAxisBounds(
|
|
87330
|
+
Math.min(...allValues),
|
|
87331
|
+
Math.max(...allValues)
|
|
87332
|
+
);
|
|
87333
|
+
return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
|
|
86839
87334
|
}
|
|
86840
87335
|
function valueToY(val2, range, topY, bottomY) {
|
|
86841
87336
|
const usable = bottomY - topY;
|
|
@@ -86851,7 +87346,11 @@ function valueToY(val2, range, topY, bottomY) {
|
|
|
86851
87346
|
}
|
|
86852
87347
|
return range.reverseOrder ? topY + ratio * usable : bottomY - ratio * usable;
|
|
86853
87348
|
}
|
|
86854
|
-
function formatAxisValue(val2) {
|
|
87349
|
+
function formatAxisValue(val2, formatCode) {
|
|
87350
|
+
const formatted = formatChartNumber(val2, formatCode);
|
|
87351
|
+
if (formatted !== void 0) {
|
|
87352
|
+
return formatted;
|
|
87353
|
+
}
|
|
86855
87354
|
if (Math.abs(val2) >= 1e6) {
|
|
86856
87355
|
return `${(val2 / 1e6).toFixed(1)}M`;
|
|
86857
87356
|
}
|
|
@@ -86907,6 +87406,19 @@ function computeLayout(elementWidth, elementHeight, style, hasAxes, legendPos, o
|
|
|
86907
87406
|
svgHeight
|
|
86908
87407
|
};
|
|
86909
87408
|
}
|
|
87409
|
+
var DEFAULT_CHART_AREA_FILL = "#0f172a11";
|
|
87410
|
+
function resolve(fill, fallback) {
|
|
87411
|
+
if (fill === "none") {
|
|
87412
|
+
return void 0;
|
|
87413
|
+
}
|
|
87414
|
+
return fill ?? fallback;
|
|
87415
|
+
}
|
|
87416
|
+
function chartAreaFill(chartData) {
|
|
87417
|
+
return resolve(chartData?.style?.chartAreaFill, DEFAULT_CHART_AREA_FILL);
|
|
87418
|
+
}
|
|
87419
|
+
function plotAreaFill(chartData) {
|
|
87420
|
+
return resolve(chartData?.style?.plotAreaFill, void 0);
|
|
87421
|
+
}
|
|
86910
87422
|
var LOG_EXPONENT_TOLERANCE = 1e-12;
|
|
86911
87423
|
function computeLogValueRange(series, logBase) {
|
|
86912
87424
|
const allValues = series.flatMap((item) => item.values).filter((value) => value > 0);
|
|
@@ -86935,6 +87447,7 @@ function computeValueRangeForAxis(series, axis) {
|
|
|
86935
87447
|
const validMax = typeof axis?.max === "number" && Number.isFinite(axis.max) && (!logBase || axis.max > 0) ? axis.max : void 0;
|
|
86936
87448
|
const min = validMin ?? automatic.min;
|
|
86937
87449
|
let max = validMax ?? automatic.max;
|
|
87450
|
+
const majorUnit = validMin === void 0 && validMax === void 0 ? automatic.majorUnit : void 0;
|
|
86938
87451
|
if (max <= min) {
|
|
86939
87452
|
max = logBase ? min * logBase : min + 1;
|
|
86940
87453
|
}
|
|
@@ -86943,6 +87456,7 @@ function computeValueRangeForAxis(series, axis) {
|
|
|
86943
87456
|
min,
|
|
86944
87457
|
max,
|
|
86945
87458
|
span: Math.max(span, Number.EPSILON),
|
|
87459
|
+
...majorUnit !== void 0 ? { majorUnit } : {},
|
|
86946
87460
|
...logBase ? { logScale: true, logBase } : {},
|
|
86947
87461
|
...axis?.orientation === "maxMin" ? { reverseOrder: true } : {}
|
|
86948
87462
|
};
|
|
@@ -86982,6 +87496,10 @@ function generateAxisTicks(range, axis, defaultIntervals) {
|
|
|
86982
87496
|
if (explicit.length > 0) {
|
|
86983
87497
|
return explicit;
|
|
86984
87498
|
}
|
|
87499
|
+
const automatic = generateIntervalTicks(range, range.majorUnit ?? 0);
|
|
87500
|
+
if (automatic.length > 0) {
|
|
87501
|
+
return automatic;
|
|
87502
|
+
}
|
|
86985
87503
|
return Array.from(
|
|
86986
87504
|
{ length: defaultIntervals + 1 },
|
|
86987
87505
|
(_, index) => range.min + range.span / defaultIntervals * index
|
|
@@ -87550,7 +88068,7 @@ function formatTick(val2, axis) {
|
|
|
87550
88068
|
if (axis?.displayUnits) {
|
|
87551
88069
|
return formatAxisValueWithUnits(val2, axis);
|
|
87552
88070
|
}
|
|
87553
|
-
return formatAxisValue2(val2);
|
|
88071
|
+
return formatAxisValue2(val2, axis?.numFmt?.formatCode);
|
|
87554
88072
|
}
|
|
87555
88073
|
function buildPrimaryAxis(range, layout, axis, axisX = layout.plotLeft) {
|
|
87556
88074
|
const gridlines = [];
|
|
@@ -87747,7 +88265,11 @@ function hasRicherAxisFeatures(chartData) {
|
|
|
87747
88265
|
return Boolean(
|
|
87748
88266
|
chartData.dataTable || chartData.axes?.some(
|
|
87749
88267
|
(axis) => axis.crosses !== void 0 || axis.crossesAt !== void 0 || axis.crossBetween !== void 0 || axis.axisType === "valAx" && Boolean(
|
|
87750
|
-
axis.logScale || axis.displayUnits ||
|
|
88268
|
+
axis.logScale || axis.displayUnits || // A `c:numFmt` is only honoured on the `buildPrimaryAxis`
|
|
88269
|
+
// path; the fast path has no axis to read it from. The two
|
|
88270
|
+
// agree tick-for-tick when no log scale or display unit is
|
|
88271
|
+
// in play, so routing a formatted axis here costs nothing.
|
|
88272
|
+
axis.numFmt?.formatCode || axis.axPos === "r" || axis.orientation === "maxMin" || axis.majorUnit !== void 0 || axis.minorUnit !== void 0 || axis.minorGridlines || axis.majorTickMark !== void 0 || axis.minorTickMark !== void 0 || axis.tickLblPos !== void 0
|
|
87751
88273
|
)
|
|
87752
88274
|
)
|
|
87753
88275
|
);
|
|
@@ -87857,7 +88379,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
87857
88379
|
kind: "text",
|
|
87858
88380
|
x: x + singleBarWidth / 2,
|
|
87859
88381
|
y: val2 >= 0 ? y - 4 : y + h + 10,
|
|
87860
|
-
text: formatAxisValue2(val2),
|
|
88382
|
+
text: formatAxisValue2(val2, series[si].numberFormat),
|
|
87861
88383
|
fontSize: 7,
|
|
87862
88384
|
fill: "#334155",
|
|
87863
88385
|
textAnchor: "middle"
|
|
@@ -87962,7 +88484,7 @@ function pushClusteredStackedLabels(series, sourceIndices2, catCount, layout, ra
|
|
|
87962
88484
|
kind: "text",
|
|
87963
88485
|
x,
|
|
87964
88486
|
y: labelY,
|
|
87965
|
-
text: formatAxisValue2(val2),
|
|
88487
|
+
text: formatAxisValue2(val2, series[si].numberFormat),
|
|
87966
88488
|
fontSize: 7,
|
|
87967
88489
|
fill: "#334155",
|
|
87968
88490
|
textAnchor: "middle"
|
|
@@ -88248,7 +88770,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
|
|
|
88248
88770
|
kind: "text",
|
|
88249
88771
|
x: pt.x,
|
|
88250
88772
|
y: pt.y - 7,
|
|
88251
|
-
text: formatAxisValue2(val2),
|
|
88773
|
+
text: formatAxisValue2(val2, series.numberFormat),
|
|
88252
88774
|
fontSize: 7,
|
|
88253
88775
|
fill: "#334155",
|
|
88254
88776
|
textAnchor: "middle"
|
|
@@ -88320,7 +88842,7 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
|
|
|
88320
88842
|
kind: "text",
|
|
88321
88843
|
x: pt.x,
|
|
88322
88844
|
y: pt.y - 6,
|
|
88323
|
-
text: formatAxisValue2(val2),
|
|
88845
|
+
text: formatAxisValue2(val2, series.numberFormat),
|
|
88324
88846
|
fontSize: 7,
|
|
88325
88847
|
fill: "#334155",
|
|
88326
88848
|
textAnchor: "middle"
|
|
@@ -88365,7 +88887,7 @@ function buildScatter(chartData, layout, range) {
|
|
|
88365
88887
|
kind: "text",
|
|
88366
88888
|
x: dot.cx,
|
|
88367
88889
|
y: dot.cy - 6,
|
|
88368
|
-
text: formatAxisValue2(val2),
|
|
88890
|
+
text: formatAxisValue2(val2, series.numberFormat),
|
|
88369
88891
|
fontSize: 7,
|
|
88370
88892
|
fill: "#334155",
|
|
88371
88893
|
textAnchor: "middle"
|
|
@@ -88412,7 +88934,7 @@ function buildBubbles(chartData, layout, range) {
|
|
|
88412
88934
|
kind: "text",
|
|
88413
88935
|
x: dot.cx,
|
|
88414
88936
|
y: dot.cy - 10,
|
|
88415
|
-
text: formatAxisValue2(val2),
|
|
88937
|
+
text: formatAxisValue2(val2, series.numberFormat),
|
|
88416
88938
|
fontSize: 7,
|
|
88417
88939
|
fill: "#334155",
|
|
88418
88940
|
textAnchor: "middle"
|
|
@@ -88566,18 +89088,18 @@ function buildMultiLevelCategoryLabels(categoryLabels, categoryLevels, sourceInd
|
|
|
88566
89088
|
const bandHeight = Math.max(axis?.fontSize ?? 8, 8) + 4;
|
|
88567
89089
|
return levels.flatMap((level, levelIndex) => {
|
|
88568
89090
|
const values = sourceIndices2.map((sourceIndex) => level[sourceIndex] ?? "");
|
|
88569
|
-
return groupedLabels(values).flatMap((
|
|
88570
|
-
if (!
|
|
89091
|
+
return groupedLabels(values).flatMap((group2) => {
|
|
89092
|
+
if (!group2.text || group2.start % skip !== 0) {
|
|
88571
89093
|
return [];
|
|
88572
89094
|
}
|
|
88573
|
-
const startX = categoryX2(
|
|
88574
|
-
const endX = categoryX2(
|
|
89095
|
+
const startX = categoryX2(group2.start, sourceIndices2.length, layout, spacing);
|
|
89096
|
+
const endX = categoryX2(group2.end, sourceIndices2.length, layout, spacing);
|
|
88575
89097
|
return [
|
|
88576
89098
|
{
|
|
88577
89099
|
kind: "text",
|
|
88578
89100
|
x: (startX + endX) / 2,
|
|
88579
89101
|
y: labelY + direction * (offset + levelIndex * bandHeight),
|
|
88580
|
-
text:
|
|
89102
|
+
text: group2.text,
|
|
88581
89103
|
textAnchor,
|
|
88582
89104
|
...chartAxisTextStyle(axis)
|
|
88583
89105
|
}
|
|
@@ -89822,7 +90344,7 @@ function buildComboViewModel(element, chartData, categoryLabels) {
|
|
|
89822
90344
|
kind: "text",
|
|
89823
90345
|
x: point.x,
|
|
89824
90346
|
y: point.y - 7,
|
|
89825
|
-
text: formatAxisValue2(point.value),
|
|
90347
|
+
text: formatAxisValue2(point.value, series.numberFormat),
|
|
89826
90348
|
fontSize: 7,
|
|
89827
90349
|
fill: "#334155",
|
|
89828
90350
|
textAnchor: "middle"
|
|
@@ -89877,7 +90399,7 @@ function appendBarLabels(series, chartData, layout, catCount, range, sourceIndic
|
|
|
89877
90399
|
kind: "text",
|
|
89878
90400
|
x: xPositions?.[displayIndex] ?? layout.plotLeft + groupWidth * displayIndex + offset + barWidth / 2,
|
|
89879
90401
|
y: value >= 0 ? Math.min(zeroY, valueY) - 4 : Math.max(zeroY, valueY) + 10,
|
|
89880
|
-
text: formatAxisValue2(value),
|
|
90402
|
+
text: formatAxisValue2(value, series.numberFormat),
|
|
89881
90403
|
fontSize: 7,
|
|
89882
90404
|
fill: "#334155",
|
|
89883
90405
|
textAnchor: "middle"
|
|
@@ -90914,7 +91436,7 @@ function isOutsidePosition(position2) {
|
|
|
90914
91436
|
return position2 === "outEnd" || position2 === "bestFit";
|
|
90915
91437
|
}
|
|
90916
91438
|
function buildPieDataLabels(params) {
|
|
90917
|
-
const { slices, values, cx, cy, outerR, position: position2, showLeaderLines } = params;
|
|
91439
|
+
const { slices, values, cx, cy, outerR, position: position2, showLeaderLines, numberFormat } = params;
|
|
90918
91440
|
const outside = isOutsidePosition(position2);
|
|
90919
91441
|
const labels = [];
|
|
90920
91442
|
const leaderLines = [];
|
|
@@ -90928,7 +91450,7 @@ function buildPieDataLabels(params) {
|
|
|
90928
91450
|
kind: "text",
|
|
90929
91451
|
x: slice.labelX,
|
|
90930
91452
|
y: slice.labelY,
|
|
90931
|
-
text: formatAxisValue2(val2),
|
|
91453
|
+
text: formatAxisValue2(val2, numberFormat),
|
|
90932
91454
|
fontSize: 8,
|
|
90933
91455
|
fill: "#ffffff",
|
|
90934
91456
|
textAnchor: "middle",
|
|
@@ -90948,7 +91470,7 @@ function buildPieDataLabels(params) {
|
|
|
90948
91470
|
kind: "text",
|
|
90949
91471
|
x: labelX + (cos >= 0 ? 2 : -2),
|
|
90950
91472
|
y: labelY,
|
|
90951
|
-
text: formatAxisValue2(val2),
|
|
91473
|
+
text: formatAxisValue2(val2, numberFormat),
|
|
90952
91474
|
fontSize: 8,
|
|
90953
91475
|
fill: "#334155",
|
|
90954
91476
|
textAnchor: anchor,
|
|
@@ -92217,10 +92739,8 @@ function computeValueRange2(series) {
|
|
|
92217
92739
|
if (dataMin === Number.POSITIVE_INFINITY) {
|
|
92218
92740
|
return { min: 0, max: 1, span: 1 };
|
|
92219
92741
|
}
|
|
92220
|
-
const min =
|
|
92221
|
-
|
|
92222
|
-
const span = Math.max(max - min, 1);
|
|
92223
|
-
return { min, max, span };
|
|
92742
|
+
const { min, max, majorUnit } = niceValueAxisBounds(dataMin, dataMax);
|
|
92743
|
+
return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
|
|
92224
92744
|
}
|
|
92225
92745
|
function computeStackedValueRange(series, catCount) {
|
|
92226
92746
|
let maxSum = 0;
|
|
@@ -92239,10 +92759,8 @@ function computeStackedValueRange(series, catCount) {
|
|
|
92239
92759
|
maxSum = Math.max(maxSum, pos2);
|
|
92240
92760
|
minSum = Math.min(minSum, neg);
|
|
92241
92761
|
}
|
|
92242
|
-
const min = Math.min(minSum, 0);
|
|
92243
|
-
|
|
92244
|
-
const span = Math.max(max - min, 1);
|
|
92245
|
-
return { min, max, span };
|
|
92762
|
+
const { min, max, majorUnit } = niceValueAxisBounds(Math.min(minSum, 0), Math.max(maxSum, 0));
|
|
92763
|
+
return { min, max, span: Math.max(max - min, Number.EPSILON), majorUnit };
|
|
92246
92764
|
}
|
|
92247
92765
|
function valueToY2(val2, range, topY, bottomY) {
|
|
92248
92766
|
const usable = bottomY - topY;
|
|
@@ -92258,7 +92776,11 @@ function valueToY2(val2, range, topY, bottomY) {
|
|
|
92258
92776
|
}
|
|
92259
92777
|
return range.reverseOrder ? topY + ratio * usable : bottomY - ratio * usable;
|
|
92260
92778
|
}
|
|
92261
|
-
function formatAxisValue2(val2) {
|
|
92779
|
+
function formatAxisValue2(val2, formatCode) {
|
|
92780
|
+
const formatted = formatChartNumber(val2, formatCode);
|
|
92781
|
+
if (formatted !== void 0) {
|
|
92782
|
+
return formatted;
|
|
92783
|
+
}
|
|
92262
92784
|
if (Math.abs(val2) >= 1e6) {
|
|
92263
92785
|
return `${(val2 / 1e6).toFixed(1)}M`;
|
|
92264
92786
|
}
|
|
@@ -92320,11 +92842,23 @@ var GRIDLINE_COLOR2 = "#e2e8f0";
|
|
|
92320
92842
|
var AXIS_LABEL_COLOR = "#64748b";
|
|
92321
92843
|
var ZERO_LINE_COLOR = "#94a3b8";
|
|
92322
92844
|
var TICK_COUNT2 = 5;
|
|
92845
|
+
function axisTickValues(range) {
|
|
92846
|
+
const unit = range.majorUnit;
|
|
92847
|
+
if (unit !== void 0 && Number.isFinite(unit) && unit > 0 && !range.logScale) {
|
|
92848
|
+
const steps = Math.round((range.max - range.min) / unit);
|
|
92849
|
+
if (steps >= 1 && steps <= 100) {
|
|
92850
|
+
return Array.from({ length: steps + 1 }, (_unused, index) => range.min + unit * index);
|
|
92851
|
+
}
|
|
92852
|
+
}
|
|
92853
|
+
return Array.from(
|
|
92854
|
+
{ length: TICK_COUNT2 + 1 },
|
|
92855
|
+
(_unused, index) => range.min + range.span / TICK_COUNT2 * index
|
|
92856
|
+
);
|
|
92857
|
+
}
|
|
92323
92858
|
function buildGridlinesAndLabels(range, layout) {
|
|
92324
92859
|
const gridlines = [];
|
|
92325
92860
|
const axisLabels = [];
|
|
92326
|
-
for (
|
|
92327
|
-
const val2 = range.min + range.span / TICK_COUNT2 * i;
|
|
92861
|
+
for (const val2 of axisTickValues(range)) {
|
|
92328
92862
|
const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
|
|
92329
92863
|
gridlines.push({
|
|
92330
92864
|
kind: "line",
|
|
@@ -92642,13 +93176,26 @@ function buildChartViewModel(element) {
|
|
|
92642
93176
|
const longestLen = chartData.series.reduce((m, s) => Math.max(m, s.values.length), 0);
|
|
92643
93177
|
const categoryLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: longestLen }, (_, i) => String(i + 1));
|
|
92644
93178
|
if (chartType === "ofPie") {
|
|
92645
|
-
return
|
|
93179
|
+
return withChartAreaFill(
|
|
93180
|
+
withUserShapeOverlay(buildOfPieViewModel(element, chartData, categoryLabels), chartData),
|
|
93181
|
+
chartData
|
|
93182
|
+
);
|
|
92646
93183
|
}
|
|
92647
93184
|
const flat = buildFlatViewModel(element, chartData, categoryLabels, kind);
|
|
92648
93185
|
if (is3DChartType(chartType)) {
|
|
92649
|
-
return
|
|
93186
|
+
return withChartAreaFill(
|
|
93187
|
+
withUserShapeOverlay(applyChart3DDepth(flat, chartType, chartData.view3D), chartData),
|
|
93188
|
+
chartData
|
|
93189
|
+
);
|
|
92650
93190
|
}
|
|
92651
|
-
return withUserShapeOverlay(flat, chartData);
|
|
93191
|
+
return withChartAreaFill(withUserShapeOverlay(flat, chartData), chartData);
|
|
93192
|
+
}
|
|
93193
|
+
function withChartAreaFill(vm, chartData) {
|
|
93194
|
+
return {
|
|
93195
|
+
...vm,
|
|
93196
|
+
areaFill: chartAreaFill(chartData),
|
|
93197
|
+
plotFill: plotAreaFill(chartData)
|
|
93198
|
+
};
|
|
92652
93199
|
}
|
|
92653
93200
|
function withUserShapeOverlay(vm, chartData) {
|
|
92654
93201
|
const overlay = buildChartUserShapeOverlay(chartData.userShapes, vm.svgWidth, vm.svgHeight);
|
|
@@ -92709,6 +93256,8 @@ function buildFallbackViewModel(width, height, label) {
|
|
|
92709
93256
|
return {
|
|
92710
93257
|
svgWidth,
|
|
92711
93258
|
svgHeight,
|
|
93259
|
+
// No chart data to read a fill from, so the historical wash stands.
|
|
93260
|
+
areaFill: DEFAULT_CHART_AREA_FILL,
|
|
92712
93261
|
title: void 0,
|
|
92713
93262
|
titleX: svgWidth / 2,
|
|
92714
93263
|
titleY: 14,
|
|
@@ -92780,7 +93329,8 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
|
|
|
92780
93329
|
cy,
|
|
92781
93330
|
outerR,
|
|
92782
93331
|
position: chartData.style.dataLabels?.position,
|
|
92783
|
-
showLeaderLines: chartData.style.dataLabels?.showLeaderLines
|
|
93332
|
+
showLeaderLines: chartData.style.dataLabels?.showLeaderLines,
|
|
93333
|
+
numberFormat: chartData.series[0]?.numberFormat
|
|
92784
93334
|
});
|
|
92785
93335
|
dataLabels.push(...labelResult.labels);
|
|
92786
93336
|
primitives.push(...labelResult.leaderLines);
|
|
@@ -92899,7 +93449,7 @@ function buildRadarViewModel(element, chartData, categoryLabels) {
|
|
|
92899
93449
|
kind: "text",
|
|
92900
93450
|
x: p.x,
|
|
92901
93451
|
y: p.y - 8,
|
|
92902
|
-
text: formatAxisValue2(val2),
|
|
93452
|
+
text: formatAxisValue2(val2, series.numberFormat),
|
|
92903
93453
|
fontSize: 7,
|
|
92904
93454
|
fill: "#334155",
|
|
92905
93455
|
textAnchor: "middle"
|
|
@@ -93949,8 +94499,8 @@ function finalizeClickGroup(steps, options) {
|
|
|
93949
94499
|
maxEnd = end;
|
|
93950
94500
|
}
|
|
93951
94501
|
}
|
|
93952
|
-
const
|
|
93953
|
-
return
|
|
94502
|
+
const group2 = { steps, totalDurationMs: maxEnd };
|
|
94503
|
+
return group2;
|
|
93954
94504
|
}
|
|
93955
94505
|
var CLICK_EVENTS = /* @__PURE__ */ new Set(["onClick", "onNext"]);
|
|
93956
94506
|
var HOVER_EVENTS = /* @__PURE__ */ new Set(["onMouseOver"]);
|
|
@@ -94524,11 +95074,11 @@ function buildTimeline(nativeAnimations) {
|
|
|
94524
95074
|
const isFirstAnimation = clickGroups.length === 0 && currentGroup.length === 0;
|
|
94525
95075
|
if (isOnClick || isFirstAnimation) {
|
|
94526
95076
|
if (currentGroup.length > 0) {
|
|
94527
|
-
const
|
|
95077
|
+
const group2 = finalizeClickGroup(currentGroup);
|
|
94528
95078
|
if (currentGroupAutoStart || !currentGroupIsClick && clickGroups.length > 0) {
|
|
94529
|
-
|
|
95079
|
+
group2.autoAdvance = true;
|
|
94530
95080
|
}
|
|
94531
|
-
clickGroups.push(
|
|
95081
|
+
clickGroups.push(group2);
|
|
94532
95082
|
}
|
|
94533
95083
|
currentGroup = [];
|
|
94534
95084
|
currentGroupIsClick = isOnClick || isFirstAnimation;
|
|
@@ -94572,15 +95122,15 @@ function buildTimeline(nativeAnimations) {
|
|
|
94572
95122
|
}
|
|
94573
95123
|
}
|
|
94574
95124
|
if (currentGroup.length > 0) {
|
|
94575
|
-
const
|
|
95125
|
+
const group2 = finalizeClickGroup(currentGroup);
|
|
94576
95126
|
if (currentGroupAutoStart || !currentGroupIsClick && clickGroups.length > 0) {
|
|
94577
|
-
|
|
95127
|
+
group2.autoAdvance = true;
|
|
94578
95128
|
}
|
|
94579
|
-
clickGroups.push(
|
|
95129
|
+
clickGroups.push(group2);
|
|
94580
95130
|
}
|
|
94581
|
-
for (const
|
|
94582
|
-
if (
|
|
94583
|
-
|
|
95131
|
+
for (const group2 of clickGroups) {
|
|
95132
|
+
if (group2.autoAdvance) {
|
|
95133
|
+
group2.autoAdvanceDelayMs = 0;
|
|
94584
95134
|
}
|
|
94585
95135
|
}
|
|
94586
95136
|
const interactiveSequences = buildSequenceGroups(
|
|
@@ -94808,9 +95358,9 @@ var TimelineEngine = class _TimelineEngine {
|
|
|
94808
95358
|
return null;
|
|
94809
95359
|
}
|
|
94810
95360
|
this.currentGroupIndex++;
|
|
94811
|
-
const
|
|
94812
|
-
this.applyGroupSteps(
|
|
94813
|
-
return
|
|
95361
|
+
const group2 = this.timeline.clickGroups[this.currentGroupIndex];
|
|
95362
|
+
this.applyGroupSteps(group2);
|
|
95363
|
+
return group2;
|
|
94814
95364
|
}
|
|
94815
95365
|
/**
|
|
94816
95366
|
* Peek at the next click-group without advancing.
|
|
@@ -94922,9 +95472,9 @@ var TimelineEngine = class _TimelineEngine {
|
|
|
94922
95472
|
return null;
|
|
94923
95473
|
}
|
|
94924
95474
|
this.interactiveGroupIndexes.set(triggerShapeId, nextIdx);
|
|
94925
|
-
const
|
|
94926
|
-
this.applyGroupSteps(
|
|
94927
|
-
return
|
|
95475
|
+
const group2 = groups[nextIdx];
|
|
95476
|
+
this.applyGroupSteps(group2);
|
|
95477
|
+
return group2;
|
|
94928
95478
|
}
|
|
94929
95479
|
/**
|
|
94930
95480
|
* Advance the hover sequence for a given trigger shape.
|
|
@@ -94941,9 +95491,9 @@ var TimelineEngine = class _TimelineEngine {
|
|
|
94941
95491
|
return null;
|
|
94942
95492
|
}
|
|
94943
95493
|
this.hoverGroupIndexes.set(triggerShapeId, nextIdx);
|
|
94944
|
-
const
|
|
94945
|
-
this.applyGroupSteps(
|
|
94946
|
-
return
|
|
95494
|
+
const group2 = groups[nextIdx];
|
|
95495
|
+
this.applyGroupSteps(group2);
|
|
95496
|
+
return group2;
|
|
94947
95497
|
}
|
|
94948
95498
|
/**
|
|
94949
95499
|
* Reset the hover sequence for a given trigger shape so it can replay
|
|
@@ -94965,8 +95515,8 @@ var TimelineEngine = class _TimelineEngine {
|
|
|
94965
95515
|
*/
|
|
94966
95516
|
completeAll() {
|
|
94967
95517
|
this.reset();
|
|
94968
|
-
for (const
|
|
94969
|
-
for (const step of
|
|
95518
|
+
for (const group2 of this.timeline.clickGroups) {
|
|
95519
|
+
for (const step of group2.steps) {
|
|
94970
95520
|
if (step.build || step.colorTargets) {
|
|
94971
95521
|
this.activeSteps.set(step.elementId, step);
|
|
94972
95522
|
}
|
|
@@ -94995,8 +95545,8 @@ var TimelineEngine = class _TimelineEngine {
|
|
|
94995
95545
|
/**
|
|
94996
95546
|
* Apply a group's steps to the internal tracking state.
|
|
94997
95547
|
*/
|
|
94998
|
-
applyGroupSteps(
|
|
94999
|
-
for (const step of
|
|
95548
|
+
applyGroupSteps(group2) {
|
|
95549
|
+
for (const step of group2.steps) {
|
|
95000
95550
|
this.activeAnimations.set(step.elementId, step.cssAnimation);
|
|
95001
95551
|
if (step.build || step.colorTargets) {
|
|
95002
95552
|
this.activeSteps.set(step.elementId, step);
|
|
@@ -95569,9 +96119,9 @@ var PresentationAnimationController = class _PresentationAnimationController {
|
|
|
95569
96119
|
* binding the group needs a requestAnimationFrame reveal loop; an empty result
|
|
95570
96120
|
* means ordinary discrete click-advance is enough.
|
|
95571
96121
|
*/
|
|
95572
|
-
static collectBuildStepIds(
|
|
96122
|
+
static collectBuildStepIds(group2) {
|
|
95573
96123
|
const ids = [];
|
|
95574
|
-
for (const step of
|
|
96124
|
+
for (const step of group2.steps) {
|
|
95575
96125
|
if (step.build) {
|
|
95576
96126
|
ids.push(step.elementId);
|
|
95577
96127
|
}
|
|
@@ -95638,8 +96188,8 @@ function findMediaElementByElementId(targetId, root) {
|
|
|
95638
96188
|
}
|
|
95639
96189
|
return void 0;
|
|
95640
96190
|
}
|
|
95641
|
-
function runMediaCommand(command,
|
|
95642
|
-
const el =
|
|
96191
|
+
function runMediaCommand(command, resolve2) {
|
|
96192
|
+
const el = resolve2(command.targetId);
|
|
95643
96193
|
if (!el) {
|
|
95644
96194
|
return false;
|
|
95645
96195
|
}
|
|
@@ -96442,10 +96992,10 @@ function collectSections(entry2, tableData, pos2) {
|
|
|
96442
96992
|
const isBottom = rowIndex === rowCount - 1;
|
|
96443
96993
|
const isLeft = cellIndex === 0;
|
|
96444
96994
|
const isRight = cellIndex === columnCount - 1;
|
|
96445
|
-
const
|
|
96995
|
+
const sections2 = [];
|
|
96446
96996
|
const push2 = (borders, regionTop, regionBottom, regionLeft, regionRight) => {
|
|
96447
96997
|
if (borders) {
|
|
96448
|
-
|
|
96998
|
+
sections2.push({ borders, regionTop, regionBottom, regionLeft, regionRight });
|
|
96449
96999
|
}
|
|
96450
97000
|
};
|
|
96451
97001
|
push2(entry2.wholeTblBorders, isTop, isBottom, isLeft, isRight);
|
|
@@ -96485,19 +97035,19 @@ function collectSections(entry2, tableData, pos2) {
|
|
|
96485
97035
|
if (tableData.lastCol && isRight) {
|
|
96486
97036
|
push2(entry2.lastColBorders, isTop, isBottom, true, true);
|
|
96487
97037
|
}
|
|
96488
|
-
return
|
|
97038
|
+
return sections2;
|
|
96489
97039
|
}
|
|
96490
|
-
function resolveStyleDiagonalBorders(entry2, tableData, pos2,
|
|
97040
|
+
function resolveStyleDiagonalBorders(entry2, tableData, pos2, resolve2) {
|
|
96491
97041
|
if (!entry2) {
|
|
96492
97042
|
return void 0;
|
|
96493
97043
|
}
|
|
96494
|
-
const
|
|
96495
|
-
if (
|
|
97044
|
+
const sections2 = collectSections(entry2, tableData, pos2);
|
|
97045
|
+
if (sections2.length === 0) {
|
|
96496
97046
|
return void 0;
|
|
96497
97047
|
}
|
|
96498
97048
|
let tl2br;
|
|
96499
97049
|
let bl2tr;
|
|
96500
|
-
for (const section of
|
|
97050
|
+
for (const section of sections2) {
|
|
96501
97051
|
if (section.borders.tl2br) {
|
|
96502
97052
|
tl2br = section.borders.tl2br;
|
|
96503
97053
|
}
|
|
@@ -96508,12 +97058,12 @@ function resolveStyleDiagonalBorders(entry2, tableData, pos2, resolve) {
|
|
|
96508
97058
|
const info = {};
|
|
96509
97059
|
let applied = false;
|
|
96510
97060
|
if (tl2br && !tl2br.noFill) {
|
|
96511
|
-
info.diagDownColor = tl2br.color ??
|
|
97061
|
+
info.diagDownColor = tl2br.color ?? resolve2(tl2br.fill) ?? "#000000";
|
|
96512
97062
|
info.diagDownWidth = tl2br.width ?? 1;
|
|
96513
97063
|
applied = true;
|
|
96514
97064
|
}
|
|
96515
97065
|
if (bl2tr && !bl2tr.noFill) {
|
|
96516
|
-
info.diagUpColor = bl2tr.color ??
|
|
97066
|
+
info.diagUpColor = bl2tr.color ?? resolve2(bl2tr.fill) ?? "#000000";
|
|
96517
97067
|
info.diagUpWidth = bl2tr.width ?? 1;
|
|
96518
97068
|
applied = true;
|
|
96519
97069
|
}
|
|
@@ -97844,25 +98394,39 @@ function getImageFitStyle(el) {
|
|
|
97844
98394
|
if (!isImageLikeElement(el)) {
|
|
97845
98395
|
return uncropped;
|
|
97846
98396
|
}
|
|
98397
|
+
const frLeft = el.fillRectLeft ?? 0;
|
|
98398
|
+
const frTop = el.fillRectTop ?? 0;
|
|
98399
|
+
const frRight = el.fillRectRight ?? 0;
|
|
98400
|
+
const frBottom = el.fillRectBottom ?? 0;
|
|
98401
|
+
const hasFillRect = Math.abs(frLeft) + Math.abs(frTop) + Math.abs(frRight) + Math.abs(frBottom) > 1e-4;
|
|
98402
|
+
const placementTransform = hasFillRect ? `translate(${round2(frLeft * 100)}%, ${round2(frTop * 100)}%) scale(${round6(
|
|
98403
|
+
Math.max(0.01, 1 - frLeft - frRight)
|
|
98404
|
+
)}, ${round6(Math.max(0.01, 1 - frTop - frBottom))})` : "";
|
|
97847
98405
|
const cropLeft = clampCropValue(el.cropLeft);
|
|
97848
98406
|
const cropTop = clampCropValue(el.cropTop);
|
|
97849
98407
|
const cropRight = clampCropValue(el.cropRight);
|
|
97850
98408
|
const cropBottom = clampCropValue(el.cropBottom);
|
|
97851
|
-
|
|
98409
|
+
const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
|
|
98410
|
+
if (!hasCrop && !hasFillRect) {
|
|
97852
98411
|
return uncropped;
|
|
97853
98412
|
}
|
|
97854
|
-
|
|
97855
|
-
|
|
97856
|
-
|
|
97857
|
-
|
|
97858
|
-
|
|
97859
|
-
|
|
97860
|
-
|
|
97861
|
-
|
|
97862
|
-
|
|
97863
|
-
|
|
97864
|
-
|
|
97865
|
-
|
|
98413
|
+
let cropTransform = "";
|
|
98414
|
+
if (hasCrop) {
|
|
98415
|
+
const horizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
|
|
98416
|
+
const verticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
|
|
98417
|
+
const left = clampCropValue(cropLeft * horizontalScale);
|
|
98418
|
+
const right = clampCropValue(cropRight * horizontalScale);
|
|
98419
|
+
const top = clampCropValue(cropTop * verticalScale);
|
|
98420
|
+
const bottom = clampCropValue(cropBottom * verticalScale);
|
|
98421
|
+
const remainingWidth = Math.max(0.01, 1 - left - right);
|
|
98422
|
+
const remainingHeight = Math.max(0.01, 1 - top - bottom);
|
|
98423
|
+
const tx = Math.round(-left / remainingWidth * 1e4) / 100;
|
|
98424
|
+
const ty = Math.round(-top / remainingHeight * 1e4) / 100;
|
|
98425
|
+
const sx = Math.round(1 / remainingWidth * 1e6) / 1e6;
|
|
98426
|
+
const sy = Math.round(1 / remainingHeight * 1e6) / 1e6;
|
|
98427
|
+
cropTransform = `translate(${tx}%, ${ty}%) scale(${sx}, ${sy})`;
|
|
98428
|
+
}
|
|
98429
|
+
const transform = [placementTransform, cropTransform].filter(Boolean).join(" ");
|
|
97866
98430
|
return {
|
|
97867
98431
|
position: "absolute",
|
|
97868
98432
|
width: "100%",
|
|
@@ -97871,9 +98435,15 @@ function getImageFitStyle(el) {
|
|
|
97871
98435
|
maxHeight: "none",
|
|
97872
98436
|
objectFit: "fill",
|
|
97873
98437
|
transformOrigin: "top left",
|
|
97874
|
-
transform
|
|
98438
|
+
transform
|
|
97875
98439
|
};
|
|
97876
98440
|
}
|
|
98441
|
+
function round2(value) {
|
|
98442
|
+
return Math.round(value * 100) / 100;
|
|
98443
|
+
}
|
|
98444
|
+
function round6(value) {
|
|
98445
|
+
return Math.round(value * 1e6) / 1e6;
|
|
98446
|
+
}
|
|
97877
98447
|
function groupElements(elements, ids, groupId) {
|
|
97878
98448
|
const idSet = new Set(ids);
|
|
97879
98449
|
const gathered = [];
|
|
@@ -97920,7 +98490,7 @@ function groupElements(elements, ids, groupId) {
|
|
|
97920
98490
|
x: el.x - groupX,
|
|
97921
98491
|
y: el.y - groupY
|
|
97922
98492
|
}));
|
|
97923
|
-
const
|
|
98493
|
+
const group2 = {
|
|
97924
98494
|
type: "group",
|
|
97925
98495
|
id: groupId,
|
|
97926
98496
|
name: "Group",
|
|
@@ -97939,7 +98509,7 @@ function groupElements(elements, ids, groupId) {
|
|
|
97939
98509
|
}
|
|
97940
98510
|
const result = [
|
|
97941
98511
|
...remaining.slice(0, adjustedIndex),
|
|
97942
|
-
|
|
98512
|
+
group2,
|
|
97943
98513
|
...remaining.slice(adjustedIndex)
|
|
97944
98514
|
];
|
|
97945
98515
|
return { elements: result, groupId };
|
|
@@ -98171,38 +98741,38 @@ function resolveSlideId(slide, index) {
|
|
|
98171
98741
|
const cSld = rawXml?.["p:sld"];
|
|
98172
98742
|
return String(cSld?.["@_id"] || slide?.slideNumber || index + 1);
|
|
98173
98743
|
}
|
|
98174
|
-
function groupSlidesBySection(
|
|
98744
|
+
function groupSlidesBySection(sections2, slides) {
|
|
98175
98745
|
if (slides.length === 0) {
|
|
98176
98746
|
return [];
|
|
98177
98747
|
}
|
|
98178
|
-
if (
|
|
98748
|
+
if (sections2.length === 0) {
|
|
98179
98749
|
return [
|
|
98180
98750
|
{ section: void 0, slides: [...slides], slideIndexes: slides.map((_slide, i) => i) }
|
|
98181
98751
|
];
|
|
98182
98752
|
}
|
|
98183
|
-
const sectionById = new Map(
|
|
98753
|
+
const sectionById = new Map(sections2.map((section) => [section.id, section]));
|
|
98184
98754
|
const grouped = /* @__PURE__ */ new Map();
|
|
98185
98755
|
const ungrouped = {
|
|
98186
98756
|
section: void 0,
|
|
98187
98757
|
slides: [],
|
|
98188
98758
|
slideIndexes: []
|
|
98189
98759
|
};
|
|
98190
|
-
for (const section of
|
|
98760
|
+
for (const section of sections2) {
|
|
98191
98761
|
grouped.set(section.id, { section, slides: [], slideIndexes: [] });
|
|
98192
98762
|
}
|
|
98193
98763
|
slides.forEach((slide, index) => {
|
|
98194
|
-
const
|
|
98195
|
-
const target =
|
|
98764
|
+
const group2 = slide.sectionId ? grouped.get(slide.sectionId) : void 0;
|
|
98765
|
+
const target = group2 && sectionById.has(slide.sectionId ?? "") ? group2 : ungrouped;
|
|
98196
98766
|
target.slides.push(slide);
|
|
98197
98767
|
target.slideIndexes.push(index);
|
|
98198
98768
|
});
|
|
98199
|
-
const result =
|
|
98769
|
+
const result = sections2.map((section) => grouped.get(section.id)).filter((group2) => group2.slides.length > 0);
|
|
98200
98770
|
if (ungrouped.slides.length > 0) {
|
|
98201
98771
|
result.push(ungrouped);
|
|
98202
98772
|
}
|
|
98203
98773
|
return result;
|
|
98204
98774
|
}
|
|
98205
|
-
function addSection(
|
|
98775
|
+
function addSection(sections2, slides, name, afterSlideIndex, idGenerator = generateSectionId) {
|
|
98206
98776
|
const newId = idGenerator();
|
|
98207
98777
|
const slideAtIndex = slides[afterSlideIndex];
|
|
98208
98778
|
const currentSectionId = slideAtIndex?.sectionId;
|
|
@@ -98217,9 +98787,9 @@ function addSection(sections, slides, name, afterSlideIndex, idGenerator = gener
|
|
|
98217
98787
|
const nextSlides = slides.map(
|
|
98218
98788
|
(s, i) => claimedSlideIndexes.includes(i) ? { ...s, sectionId: newId, sectionName: name } : s
|
|
98219
98789
|
);
|
|
98220
|
-
const insertIndex = currentSectionId !== void 0 ?
|
|
98790
|
+
const insertIndex = currentSectionId !== void 0 ? sections2.findIndex((sec) => sec.id === currentSectionId) + 1 : sections2.length;
|
|
98221
98791
|
const newSectionSlideIds = claimedSlideIndexes.map((i) => resolveSlideId(slides[i], i));
|
|
98222
|
-
const updated =
|
|
98792
|
+
const updated = sections2.map(
|
|
98223
98793
|
(sec) => sec.id === currentSectionId ? { ...sec, slideIds: sec.slideIds.filter((sid) => !newSectionSlideIds.includes(sid)) } : sec
|
|
98224
98794
|
);
|
|
98225
98795
|
const newSection = { id: newId, name, slideIds: newSectionSlideIds };
|
|
@@ -98227,20 +98797,20 @@ function addSection(sections, slides, name, afterSlideIndex, idGenerator = gener
|
|
|
98227
98797
|
nextSections.splice(insertIndex, 0, newSection);
|
|
98228
98798
|
return { sections: nextSections, slides: nextSlides };
|
|
98229
98799
|
}
|
|
98230
|
-
function renameSection(
|
|
98800
|
+
function renameSection(sections2, slides, sectionId, newName) {
|
|
98231
98801
|
return {
|
|
98232
|
-
sections:
|
|
98802
|
+
sections: sections2.map((sec) => sec.id === sectionId ? { ...sec, name: newName } : sec),
|
|
98233
98803
|
slides: slides.map((s) => s.sectionId === sectionId ? { ...s, sectionName: newName } : s)
|
|
98234
98804
|
};
|
|
98235
98805
|
}
|
|
98236
|
-
function deleteSection(
|
|
98237
|
-
const idx =
|
|
98806
|
+
function deleteSection(sections2, slides, sectionId) {
|
|
98807
|
+
const idx = sections2.findIndex((sec) => sec.id === sectionId);
|
|
98238
98808
|
if (idx === -1) {
|
|
98239
|
-
return { sections, slides };
|
|
98809
|
+
return { sections: sections2, slides };
|
|
98240
98810
|
}
|
|
98241
|
-
const deletedSection =
|
|
98242
|
-
const prevSection = idx > 0 ?
|
|
98243
|
-
const filtered =
|
|
98811
|
+
const deletedSection = sections2[idx];
|
|
98812
|
+
const prevSection = idx > 0 ? sections2[idx - 1] : void 0;
|
|
98813
|
+
const filtered = sections2.filter((sec) => sec.id !== sectionId);
|
|
98244
98814
|
const nextSections = prevSection !== void 0 ? filtered.map(
|
|
98245
98815
|
(sec) => sec.id === prevSection.id ? { ...sec, slideIds: [...sec.slideIds, ...deletedSection.slideIds] } : sec
|
|
98246
98816
|
) : filtered;
|
|
@@ -98255,34 +98825,34 @@ function deleteSection(sections, slides, sectionId) {
|
|
|
98255
98825
|
});
|
|
98256
98826
|
return { sections: nextSections, slides: nextSlides };
|
|
98257
98827
|
}
|
|
98258
|
-
function moveSectionUp(
|
|
98259
|
-
const idx =
|
|
98828
|
+
function moveSectionUp(sections2, sectionId) {
|
|
98829
|
+
const idx = sections2.findIndex((sec) => sec.id === sectionId);
|
|
98260
98830
|
if (idx <= 0) {
|
|
98261
|
-
return
|
|
98831
|
+
return sections2;
|
|
98262
98832
|
}
|
|
98263
|
-
const next = [...
|
|
98833
|
+
const next = [...sections2];
|
|
98264
98834
|
[next[idx - 1], next[idx]] = [next[idx], next[idx - 1]];
|
|
98265
98835
|
return next;
|
|
98266
98836
|
}
|
|
98267
|
-
function moveSectionDown(
|
|
98268
|
-
const idx =
|
|
98269
|
-
if (idx === -1 || idx >=
|
|
98270
|
-
return
|
|
98837
|
+
function moveSectionDown(sections2, sectionId) {
|
|
98838
|
+
const idx = sections2.findIndex((sec) => sec.id === sectionId);
|
|
98839
|
+
if (idx === -1 || idx >= sections2.length - 1) {
|
|
98840
|
+
return sections2;
|
|
98271
98841
|
}
|
|
98272
|
-
const next = [...
|
|
98842
|
+
const next = [...sections2];
|
|
98273
98843
|
[next[idx], next[idx + 1]] = [next[idx + 1], next[idx]];
|
|
98274
98844
|
return next;
|
|
98275
98845
|
}
|
|
98276
|
-
function moveSlidesToSection(
|
|
98277
|
-
const targetSection =
|
|
98846
|
+
function moveSlidesToSection(sections2, slides, slideIndexes, targetSectionId) {
|
|
98847
|
+
const targetSection = sections2.find((sec) => sec.id === targetSectionId);
|
|
98278
98848
|
if (!targetSection) {
|
|
98279
|
-
return { sections, slides };
|
|
98849
|
+
return { sections: sections2, slides };
|
|
98280
98850
|
}
|
|
98281
98851
|
const nextSlides = slides.map(
|
|
98282
98852
|
(s, i) => slideIndexes.includes(i) ? { ...s, sectionId: targetSectionId, sectionName: targetSection.name } : s
|
|
98283
98853
|
);
|
|
98284
98854
|
const movedSlideIds = slideIndexes.map((i) => resolveSlideId(slides[i], i));
|
|
98285
|
-
const nextSections =
|
|
98855
|
+
const nextSections = sections2.map((sec) => {
|
|
98286
98856
|
if (sec.id === targetSectionId) {
|
|
98287
98857
|
return {
|
|
98288
98858
|
...sec,
|
|
@@ -98659,7 +99229,10 @@ function resolveLineHeight(textStyle, hasItalicRuns2) {
|
|
|
98659
99229
|
if (typeof textStyle?.lineSpacingExactPt === "number" && textStyle.lineSpacingExactPt > 0) {
|
|
98660
99230
|
return `${textStyle.lineSpacingExactPt}pt`;
|
|
98661
99231
|
}
|
|
98662
|
-
return textStyle?.lineSpacing
|
|
99232
|
+
return proportionalLineHeight(textStyle?.lineSpacing);
|
|
99233
|
+
}
|
|
99234
|
+
function proportionalLineHeight(lineSpacing) {
|
|
99235
|
+
return typeof lineSpacing === "number" && lineSpacing > 0 ? lineSpacing * DEFAULT_LINE_HEIGHT : DEFAULT_LINE_HEIGHT;
|
|
98663
99236
|
}
|
|
98664
99237
|
function toCssWritingMode(textDirection) {
|
|
98665
99238
|
switch (textDirection) {
|
|
@@ -98710,7 +99283,7 @@ function computeAutoFitTextStyle(input) {
|
|
|
98710
99283
|
result.fontSize = Math.max(6, Math.round(baseFontSize * ts.autoFitFontScale));
|
|
98711
99284
|
} else if (ts.autoFitMode !== "normal") {
|
|
98712
99285
|
const textLength = text2.length;
|
|
98713
|
-
const lineHeight = ts.lineSpacingExactPt ? ts.lineSpacingExactPt / baseFontSize : ts.lineSpacing
|
|
99286
|
+
const lineHeight = ts.lineSpacingExactPt ? ts.lineSpacingExactPt / baseFontSize : proportionalLineHeight(ts.lineSpacing);
|
|
98714
99287
|
const approxCharsPerLine = Math.max(1, Math.floor(width / (baseFontSize * 0.6)));
|
|
98715
99288
|
const estimatedLines = Math.max(1, Math.ceil(textLength / approxCharsPerLine));
|
|
98716
99289
|
const requiredHeight = estimatedLines * baseFontSize * lineHeight;
|
|
@@ -98721,8 +99294,7 @@ function computeAutoFitTextStyle(input) {
|
|
|
98721
99294
|
}
|
|
98722
99295
|
}
|
|
98723
99296
|
if (ts.autoFitLineSpacingReduction !== void 0 && ts.autoFitLineSpacingReduction > 0) {
|
|
98724
|
-
|
|
98725
|
-
result.lineHeight = baseLineHeight * (1 - ts.autoFitLineSpacingReduction);
|
|
99297
|
+
result.lineHeight = proportionalLineHeight(ts.lineSpacing) * (1 - ts.autoFitLineSpacingReduction);
|
|
98726
99298
|
}
|
|
98727
99299
|
return result;
|
|
98728
99300
|
}
|
|
@@ -98857,7 +99429,7 @@ function buildTextBlockStyle(element, options = {}) {
|
|
|
98857
99429
|
style.unicodeBidi = "plaintext";
|
|
98858
99430
|
}
|
|
98859
99431
|
style.fontSize = ts?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
98860
|
-
style.fontFamily = ts?.fontFamily
|
|
99432
|
+
style.fontFamily = ts?.fontFamily ? getSubstituteFontFamily(ts.fontFamily, parsePanoseString(ts.latinFontPanose)) : DEFAULT_FONT_FAMILY;
|
|
98861
99433
|
style.fontWeight = ts?.bold ? 700 : 400;
|
|
98862
99434
|
style.fontStyle = ts?.italic ? "italic" : "normal";
|
|
98863
99435
|
style.textDecorationLine = decorations.length > 0 ? decorations.join(" ") : "none";
|
|
@@ -99542,6 +100114,8 @@ function buildTextRunFilterChain(style) {
|
|
|
99542
100114
|
}
|
|
99543
100115
|
return parts.length > 0 ? parts.join(" ") : void 0;
|
|
99544
100116
|
}
|
|
100117
|
+
var POWERPOINT_METRIC_TRACKING_EM = 3e-3;
|
|
100118
|
+
var POWERPOINT_METRIC_TRACKING = `${POWERPOINT_METRIC_TRACKING_EM}em`;
|
|
99545
100119
|
function resolveParagraphStrutFontSize(segments, bodyFontSize) {
|
|
99546
100120
|
let largest;
|
|
99547
100121
|
for (const segment of segments) {
|
|
@@ -99911,8 +100485,8 @@ function toAbsolute(child22, offsetX, offsetY) {
|
|
|
99911
100485
|
function sameBox(a, b) {
|
|
99912
100486
|
return Math.abs(a.x - b.x) <= 0.5 && Math.abs(a.y - b.y) <= 0.5 && Math.abs(a.width - b.width) <= 0.5 && Math.abs(a.height - b.height) <= 0.5;
|
|
99913
100487
|
}
|
|
99914
|
-
function correspondingGroup(
|
|
99915
|
-
const morphName = getElementMorphName(
|
|
100488
|
+
function correspondingGroup(group2, candidates) {
|
|
100489
|
+
const morphName = getElementMorphName(group2);
|
|
99916
100490
|
return candidates.find((candidate) => {
|
|
99917
100491
|
if (candidate.type !== "group") {
|
|
99918
100492
|
return false;
|
|
@@ -99920,10 +100494,10 @@ function correspondingGroup(group, candidates) {
|
|
|
99920
100494
|
if (morphName !== void 0 && getElementMorphName(candidate) === morphName) {
|
|
99921
100495
|
return true;
|
|
99922
100496
|
}
|
|
99923
|
-
if (
|
|
100497
|
+
if (group2.name && candidate.name === group2.name) {
|
|
99924
100498
|
return true;
|
|
99925
100499
|
}
|
|
99926
|
-
return sameBox(
|
|
100500
|
+
return sameBox(group2, candidate);
|
|
99927
100501
|
});
|
|
99928
100502
|
}
|
|
99929
100503
|
function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
|
|
@@ -106315,8 +106889,8 @@ async function loadOrbitControlsCtor() {
|
|
|
106315
106889
|
}
|
|
106316
106890
|
}
|
|
106317
106891
|
function loadGltf(loader, url) {
|
|
106318
|
-
return new Promise((
|
|
106319
|
-
loader.load(url,
|
|
106892
|
+
return new Promise((resolve2, reject) => {
|
|
106893
|
+
loader.load(url, resolve2, void 0, reject);
|
|
106320
106894
|
});
|
|
106321
106895
|
}
|
|
106322
106896
|
function centerAndFit(three, root) {
|
|
@@ -106783,9 +107357,9 @@ function isExportAbortError(err) {
|
|
|
106783
107357
|
}
|
|
106784
107358
|
var PPTX_OPEN_ACCEPT = ".pptx,.ppsx,.pptm,.potx";
|
|
106785
107359
|
function openFilePicker(options = {}) {
|
|
106786
|
-
return new Promise((
|
|
107360
|
+
return new Promise((resolve2) => {
|
|
106787
107361
|
if (typeof document === "undefined") {
|
|
106788
|
-
|
|
107362
|
+
resolve2(null);
|
|
106789
107363
|
return;
|
|
106790
107364
|
}
|
|
106791
107365
|
const input = document.createElement("input");
|
|
@@ -106801,7 +107375,7 @@ function openFilePicker(options = {}) {
|
|
|
106801
107375
|
}
|
|
106802
107376
|
settled = true;
|
|
106803
107377
|
input.remove();
|
|
106804
|
-
|
|
107378
|
+
resolve2(file);
|
|
106805
107379
|
};
|
|
106806
107380
|
input.addEventListener("change", () => finish(input.files?.[0] ?? null));
|
|
106807
107381
|
input.addEventListener("cancel", () => finish(null));
|
|
@@ -107368,7 +107942,7 @@ async function swapPresentationWindows(presenter, audience) {
|
|
|
107368
107942
|
}
|
|
107369
107943
|
}
|
|
107370
107944
|
function openDeckDb() {
|
|
107371
|
-
return new Promise((
|
|
107945
|
+
return new Promise((resolve2, reject) => {
|
|
107372
107946
|
const request = indexedDB.open(DB_NAME, DB_VERSION);
|
|
107373
107947
|
request.onupgradeneeded = () => {
|
|
107374
107948
|
const db = request.result;
|
|
@@ -107376,13 +107950,13 @@ function openDeckDb() {
|
|
|
107376
107950
|
db.createObjectStore(STORE_NAME);
|
|
107377
107951
|
}
|
|
107378
107952
|
};
|
|
107379
|
-
request.onsuccess = () =>
|
|
107953
|
+
request.onsuccess = () => resolve2(request.result);
|
|
107380
107954
|
request.onerror = () => reject(request.error);
|
|
107381
107955
|
});
|
|
107382
107956
|
}
|
|
107383
107957
|
async function storePresentationDeck(sessionId, content) {
|
|
107384
107958
|
const db = await openDeckDb();
|
|
107385
|
-
return new Promise((
|
|
107959
|
+
return new Promise((resolve2, reject) => {
|
|
107386
107960
|
const tx = db.transaction(STORE_NAME, "readwrite");
|
|
107387
107961
|
const bytes = content instanceof Uint8Array ? content : new Uint8Array(content);
|
|
107388
107962
|
tx.objectStore(STORE_NAME).put(
|
|
@@ -107391,7 +107965,7 @@ async function storePresentationDeck(sessionId, content) {
|
|
|
107391
107965
|
);
|
|
107392
107966
|
tx.oncomplete = () => {
|
|
107393
107967
|
db.close();
|
|
107394
|
-
|
|
107968
|
+
resolve2();
|
|
107395
107969
|
};
|
|
107396
107970
|
tx.onerror = () => {
|
|
107397
107971
|
db.close();
|
|
@@ -107402,17 +107976,17 @@ async function storePresentationDeck(sessionId, content) {
|
|
|
107402
107976
|
async function loadPresentationDeck(sessionId) {
|
|
107403
107977
|
try {
|
|
107404
107978
|
const db = await openDeckDb();
|
|
107405
|
-
return await new Promise((
|
|
107979
|
+
return await new Promise((resolve2, reject) => {
|
|
107406
107980
|
const request = db.transaction(STORE_NAME, "readonly").objectStore(STORE_NAME).get(sessionId);
|
|
107407
107981
|
request.onsuccess = () => {
|
|
107408
107982
|
db.close();
|
|
107409
107983
|
const record = request.result;
|
|
107410
107984
|
if (!record || Date.now() - record.createdAt > MAX_DECK_AGE_MS) {
|
|
107411
|
-
|
|
107985
|
+
resolve2(null);
|
|
107412
107986
|
return;
|
|
107413
107987
|
}
|
|
107414
107988
|
const raw = record.bytes;
|
|
107415
|
-
|
|
107989
|
+
resolve2(
|
|
107416
107990
|
raw instanceof Uint8Array ? raw : raw instanceof ArrayBuffer ? new Uint8Array(raw) : null
|
|
107417
107991
|
);
|
|
107418
107992
|
};
|
|
@@ -107428,16 +108002,16 @@ async function loadPresentationDeck(sessionId) {
|
|
|
107428
108002
|
async function clearPresentationDeck(sessionId) {
|
|
107429
108003
|
try {
|
|
107430
108004
|
const db = await openDeckDb();
|
|
107431
|
-
await new Promise((
|
|
108005
|
+
await new Promise((resolve2) => {
|
|
107432
108006
|
const tx = db.transaction(STORE_NAME, "readwrite");
|
|
107433
108007
|
tx.objectStore(STORE_NAME).delete(sessionId);
|
|
107434
108008
|
tx.oncomplete = () => {
|
|
107435
108009
|
db.close();
|
|
107436
|
-
|
|
108010
|
+
resolve2();
|
|
107437
108011
|
};
|
|
107438
108012
|
tx.onerror = () => {
|
|
107439
108013
|
db.close();
|
|
107440
|
-
|
|
108014
|
+
resolve2();
|
|
107441
108015
|
};
|
|
107442
108016
|
});
|
|
107443
108017
|
} catch {
|
|
@@ -107449,7 +108023,7 @@ var STORE_NAME2 = "content";
|
|
|
107449
108023
|
var CONTENT_KEY = "pptx-bytes";
|
|
107450
108024
|
var MAX_CONTENT_AGE_MS = 5 * 60 * 1e3;
|
|
107451
108025
|
function openDb() {
|
|
107452
|
-
return new Promise((
|
|
108026
|
+
return new Promise((resolve2, reject) => {
|
|
107453
108027
|
const request = indexedDB.open(DB_NAME2, DB_VERSION2);
|
|
107454
108028
|
request.onupgradeneeded = () => {
|
|
107455
108029
|
const db = request.result;
|
|
@@ -107457,7 +108031,7 @@ function openDb() {
|
|
|
107457
108031
|
db.createObjectStore(STORE_NAME2);
|
|
107458
108032
|
}
|
|
107459
108033
|
};
|
|
107460
|
-
request.onsuccess = () =>
|
|
108034
|
+
request.onsuccess = () => resolve2(request.result);
|
|
107461
108035
|
request.onerror = () => reject(request.error);
|
|
107462
108036
|
});
|
|
107463
108037
|
}
|
|
@@ -107466,7 +108040,7 @@ async function storeAudienceContent(content, sessionId) {
|
|
|
107466
108040
|
return storePresentationDeck(sessionId, content);
|
|
107467
108041
|
}
|
|
107468
108042
|
const db = await openDb();
|
|
107469
|
-
return new Promise((
|
|
108043
|
+
return new Promise((resolve2, reject) => {
|
|
107470
108044
|
const tx = db.transaction(STORE_NAME2, "readwrite");
|
|
107471
108045
|
const store = tx.objectStore(STORE_NAME2);
|
|
107472
108046
|
const bytes = content instanceof Uint8Array ? content : new Uint8Array(content);
|
|
@@ -107474,7 +108048,7 @@ async function storeAudienceContent(content, sessionId) {
|
|
|
107474
108048
|
store.put(record, CONTENT_KEY);
|
|
107475
108049
|
tx.oncomplete = () => {
|
|
107476
108050
|
db.close();
|
|
107477
|
-
|
|
108051
|
+
resolve2();
|
|
107478
108052
|
};
|
|
107479
108053
|
tx.onerror = () => {
|
|
107480
108054
|
db.close();
|
|
@@ -107488,7 +108062,7 @@ async function loadAudienceContent(sessionId) {
|
|
|
107488
108062
|
}
|
|
107489
108063
|
try {
|
|
107490
108064
|
const db = await openDb();
|
|
107491
|
-
return new Promise((
|
|
108065
|
+
return new Promise((resolve2, reject) => {
|
|
107492
108066
|
const tx = db.transaction(STORE_NAME2, "readonly");
|
|
107493
108067
|
const store = tx.objectStore(STORE_NAME2);
|
|
107494
108068
|
const request = store.get(CONTENT_KEY);
|
|
@@ -107499,20 +108073,20 @@ async function loadAudienceContent(sessionId) {
|
|
|
107499
108073
|
const record = result;
|
|
107500
108074
|
const age = Date.now() - record.createdAt;
|
|
107501
108075
|
if (age > MAX_CONTENT_AGE_MS) {
|
|
107502
|
-
|
|
108076
|
+
resolve2(null);
|
|
107503
108077
|
return;
|
|
107504
108078
|
}
|
|
107505
108079
|
const raw = record.bytes;
|
|
107506
108080
|
if (raw instanceof Uint8Array) {
|
|
107507
|
-
|
|
108081
|
+
resolve2(raw);
|
|
107508
108082
|
} else if (raw instanceof ArrayBuffer) {
|
|
107509
|
-
|
|
108083
|
+
resolve2(new Uint8Array(raw));
|
|
107510
108084
|
} else {
|
|
107511
|
-
|
|
108085
|
+
resolve2(null);
|
|
107512
108086
|
}
|
|
107513
108087
|
return;
|
|
107514
108088
|
}
|
|
107515
|
-
|
|
108089
|
+
resolve2(null);
|
|
107516
108090
|
};
|
|
107517
108091
|
request.onerror = () => {
|
|
107518
108092
|
db.close();
|
|
@@ -107529,17 +108103,17 @@ async function clearAudienceContent(sessionId) {
|
|
|
107529
108103
|
}
|
|
107530
108104
|
try {
|
|
107531
108105
|
const db = await openDb();
|
|
107532
|
-
return new Promise((
|
|
108106
|
+
return new Promise((resolve2) => {
|
|
107533
108107
|
const tx = db.transaction(STORE_NAME2, "readwrite");
|
|
107534
108108
|
const store = tx.objectStore(STORE_NAME2);
|
|
107535
108109
|
store.delete(CONTENT_KEY);
|
|
107536
108110
|
tx.oncomplete = () => {
|
|
107537
108111
|
db.close();
|
|
107538
|
-
|
|
108112
|
+
resolve2();
|
|
107539
108113
|
};
|
|
107540
108114
|
tx.onerror = () => {
|
|
107541
108115
|
db.close();
|
|
107542
|
-
|
|
108116
|
+
resolve2();
|
|
107543
108117
|
};
|
|
107544
108118
|
});
|
|
107545
108119
|
} catch {
|
|
@@ -108094,19 +108668,19 @@ function groupElementParagraphs(element) {
|
|
|
108094
108668
|
}
|
|
108095
108669
|
return groups;
|
|
108096
108670
|
}
|
|
108097
|
-
function paragraphGroupText(
|
|
108098
|
-
return
|
|
108671
|
+
function paragraphGroupText(group2) {
|
|
108672
|
+
return group2.content.map((segment) => segment.isLineBreak ? " " : segment.text).join("");
|
|
108099
108673
|
}
|
|
108100
|
-
function paragraphGroupLevel(
|
|
108101
|
-
const first =
|
|
108674
|
+
function paragraphGroupLevel(group2) {
|
|
108675
|
+
const first = group2.marker ?? group2.content[0];
|
|
108102
108676
|
const level = first?.paragraphLevel;
|
|
108103
108677
|
return typeof level === "number" && level > 0 ? Math.min(level, MAX_PARAGRAPH_LEVEL) : 0;
|
|
108104
108678
|
}
|
|
108105
108679
|
function readElementParagraphs(element) {
|
|
108106
108680
|
const groups = groupElementParagraphs(element);
|
|
108107
|
-
const paragraphs = groups.map((
|
|
108108
|
-
text: paragraphGroupText(
|
|
108109
|
-
level: paragraphGroupLevel(
|
|
108681
|
+
const paragraphs = groups.map((group2) => ({
|
|
108682
|
+
text: paragraphGroupText(group2),
|
|
108683
|
+
level: paragraphGroupLevel(group2)
|
|
108110
108684
|
}));
|
|
108111
108685
|
let last = paragraphs.length - 1;
|
|
108112
108686
|
while (last >= 0 && paragraphs[last].text.length === 0) {
|
|
@@ -108221,11 +108795,11 @@ function withLevel(segments, level) {
|
|
|
108221
108795
|
return next;
|
|
108222
108796
|
});
|
|
108223
108797
|
}
|
|
108224
|
-
function rebuildParagraph(
|
|
108225
|
-
if (
|
|
108226
|
-
return [...
|
|
108798
|
+
function rebuildParagraph(group2, donor, text2, elementStyle) {
|
|
108799
|
+
if (group2 && paragraphGroupText(group2) === text2) {
|
|
108800
|
+
return [...group2.marker ? [group2.marker] : [], ...group2.content];
|
|
108227
108801
|
}
|
|
108228
|
-
const source =
|
|
108802
|
+
const source = group2 ?? donor;
|
|
108229
108803
|
const marker = source?.marker ? [source.marker] : [];
|
|
108230
108804
|
const content = remapTextToSegments(text2, source?.content, elementStyle);
|
|
108231
108805
|
return [...marker, ...content];
|
|
@@ -109008,7 +109582,7 @@ function replacePixels(data, fromColor, toColor, threshold, toTransparent) {
|
|
|
109008
109582
|
}
|
|
109009
109583
|
var DEFAULT_COLOR_CHANGE_TOLERANCE = 12;
|
|
109010
109584
|
function applyColorChange(imageDataUrl, fromHex, toHex22, tolerancePct = DEFAULT_COLOR_CHANGE_TOLERANCE, toTransparent = false) {
|
|
109011
|
-
return new Promise((
|
|
109585
|
+
return new Promise((resolve2, reject) => {
|
|
109012
109586
|
const fromColor = parseHexToRgb(fromHex);
|
|
109013
109587
|
const toColor = parseHexToRgb(toHex22);
|
|
109014
109588
|
if (!fromColor || !toColor) {
|
|
@@ -109036,7 +109610,7 @@ function applyColorChange(imageDataUrl, fromHex, toHex22, tolerancePct = DEFAULT
|
|
|
109036
109610
|
const threshold = toleranceToThreshold(tolerancePct);
|
|
109037
109611
|
replacePixels(imageData.data, fromColor, toColor, threshold, toTransparent);
|
|
109038
109612
|
ctx.putImageData(imageData, 0, 0);
|
|
109039
|
-
|
|
109613
|
+
resolve2({
|
|
109040
109614
|
dataUrl: canvas.toDataURL("image/png"),
|
|
109041
109615
|
width: w,
|
|
109042
109616
|
height: h
|
|
@@ -109087,7 +109661,7 @@ function mapDuotonePixels(data, shadow, highlight) {
|
|
|
109087
109661
|
}
|
|
109088
109662
|
}
|
|
109089
109663
|
function applyDuotone(imageDataUrl, shadowHex, highlightHex) {
|
|
109090
|
-
return new Promise((
|
|
109664
|
+
return new Promise((resolve2, reject) => {
|
|
109091
109665
|
const shadow = parseHexToRgb(shadowHex);
|
|
109092
109666
|
const highlight = parseHexToRgb(highlightHex);
|
|
109093
109667
|
if (!shadow || !highlight) {
|
|
@@ -109114,7 +109688,7 @@ function applyDuotone(imageDataUrl, shadowHex, highlightHex) {
|
|
|
109114
109688
|
const imageData = ctx.getImageData(0, 0, w, h);
|
|
109115
109689
|
mapDuotonePixels(imageData.data, shadow, highlight);
|
|
109116
109690
|
ctx.putImageData(imageData, 0, 0);
|
|
109117
|
-
|
|
109691
|
+
resolve2({
|
|
109118
109692
|
dataUrl: canvas.toDataURL("image/png"),
|
|
109119
109693
|
width: w,
|
|
109120
109694
|
height: h
|
|
@@ -110112,6 +110686,93 @@ function mediaTransportVisible(surface) {
|
|
|
110112
110686
|
}
|
|
110113
110687
|
return surface.canvasTransport;
|
|
110114
110688
|
}
|
|
110689
|
+
var persistentAudioMap = /* @__PURE__ */ new Map();
|
|
110690
|
+
function registerPersistentAudio(elementId, dataUrl, mimetype, loop, volume, trimStartSec) {
|
|
110691
|
+
if (persistentAudioMap.has(elementId) || typeof document === "undefined") {
|
|
110692
|
+
return;
|
|
110693
|
+
}
|
|
110694
|
+
const audio = document.createElement("audio");
|
|
110695
|
+
audio.src = dataUrl;
|
|
110696
|
+
if (mimetype) {
|
|
110697
|
+
const source = document.createElement("source");
|
|
110698
|
+
source.src = dataUrl;
|
|
110699
|
+
source.type = mimetype;
|
|
110700
|
+
audio.appendChild(source);
|
|
110701
|
+
}
|
|
110702
|
+
audio.loop = loop;
|
|
110703
|
+
audio.volume = Math.max(0, Math.min(1, volume));
|
|
110704
|
+
if (trimStartSec > 0) {
|
|
110705
|
+
try {
|
|
110706
|
+
audio.currentTime = trimStartSec;
|
|
110707
|
+
} catch {
|
|
110708
|
+
}
|
|
110709
|
+
}
|
|
110710
|
+
audio.style.display = "none";
|
|
110711
|
+
audio.setAttribute("data-pptx-persistent-audio", elementId);
|
|
110712
|
+
document.body.appendChild(audio);
|
|
110713
|
+
persistentAudioMap.set(elementId, { elementId, audio, loop, pausedByVisibility: false });
|
|
110714
|
+
void audio.play().catch(() => {
|
|
110715
|
+
});
|
|
110716
|
+
}
|
|
110717
|
+
function stopAllPersistentAudio() {
|
|
110718
|
+
for (const entry2 of persistentAudioMap.values()) {
|
|
110719
|
+
entry2.audio.pause();
|
|
110720
|
+
entry2.audio.remove();
|
|
110721
|
+
}
|
|
110722
|
+
persistentAudioMap.clear();
|
|
110723
|
+
}
|
|
110724
|
+
function pauseAllPersistentAudio() {
|
|
110725
|
+
for (const entry2 of persistentAudioMap.values()) {
|
|
110726
|
+
if (!entry2.audio.paused) {
|
|
110727
|
+
entry2.pausedByVisibility = true;
|
|
110728
|
+
entry2.audio.pause();
|
|
110729
|
+
}
|
|
110730
|
+
}
|
|
110731
|
+
}
|
|
110732
|
+
function resumeAllPersistentAudio() {
|
|
110733
|
+
for (const entry2 of persistentAudioMap.values()) {
|
|
110734
|
+
if (entry2.pausedByVisibility) {
|
|
110735
|
+
entry2.pausedByVisibility = false;
|
|
110736
|
+
void entry2.audio.play().catch(() => {
|
|
110737
|
+
});
|
|
110738
|
+
}
|
|
110739
|
+
}
|
|
110740
|
+
}
|
|
110741
|
+
function attachPresentationVisibilityPause(options = {}) {
|
|
110742
|
+
if (typeof document === "undefined") {
|
|
110743
|
+
return () => {
|
|
110744
|
+
};
|
|
110745
|
+
}
|
|
110746
|
+
const root = options.root ?? document;
|
|
110747
|
+
let pausedMedia = [];
|
|
110748
|
+
const onVisibilityChange = () => {
|
|
110749
|
+
if (document.visibilityState === "hidden") {
|
|
110750
|
+
pausedMedia = [];
|
|
110751
|
+
for (const media of root.querySelectorAll("audio, video")) {
|
|
110752
|
+
if (!media.paused && !media.ended) {
|
|
110753
|
+
pausedMedia.push(media);
|
|
110754
|
+
media.pause();
|
|
110755
|
+
}
|
|
110756
|
+
}
|
|
110757
|
+
pauseAllPersistentAudio();
|
|
110758
|
+
options.onHidden?.();
|
|
110759
|
+
return;
|
|
110760
|
+
}
|
|
110761
|
+
for (const media of pausedMedia) {
|
|
110762
|
+
if (media.isConnected) {
|
|
110763
|
+
void media.play().catch(() => {
|
|
110764
|
+
});
|
|
110765
|
+
}
|
|
110766
|
+
}
|
|
110767
|
+
pausedMedia = [];
|
|
110768
|
+
resumeAllPersistentAudio();
|
|
110769
|
+
options.onVisible?.();
|
|
110770
|
+
};
|
|
110771
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
110772
|
+
return () => {
|
|
110773
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
110774
|
+
};
|
|
110775
|
+
}
|
|
110115
110776
|
function buildSummaryZoomView(element, lookup) {
|
|
110116
110777
|
if (element.zoomType !== "summary" || !element.summaryTargets?.length) {
|
|
110117
110778
|
return void 0;
|
|
@@ -111203,7 +111864,7 @@ var AUTOSAVE_DB_NAME = "pptx-viewer-autosave";
|
|
|
111203
111864
|
var AUTOSAVE_DB_VERSION = 1;
|
|
111204
111865
|
var AUTOSAVE_STORE_NAME = "recoveryVersions";
|
|
111205
111866
|
function openAutosaveDb() {
|
|
111206
|
-
return new Promise((
|
|
111867
|
+
return new Promise((resolve2, reject) => {
|
|
111207
111868
|
const req = indexedDB.open(AUTOSAVE_DB_NAME, AUTOSAVE_DB_VERSION);
|
|
111208
111869
|
req.onupgradeneeded = () => {
|
|
111209
111870
|
const db = req.result;
|
|
@@ -111211,13 +111872,13 @@ function openAutosaveDb() {
|
|
|
111211
111872
|
db.createObjectStore(AUTOSAVE_STORE_NAME, { keyPath: "key" });
|
|
111212
111873
|
}
|
|
111213
111874
|
};
|
|
111214
|
-
req.onsuccess = () =>
|
|
111875
|
+
req.onsuccess = () => resolve2(req.result);
|
|
111215
111876
|
req.onerror = () => reject(req.error);
|
|
111216
111877
|
});
|
|
111217
111878
|
}
|
|
111218
111879
|
async function deleteOldestAutosaveEntry() {
|
|
111219
111880
|
const db = await openAutosaveDb();
|
|
111220
|
-
return new Promise((
|
|
111881
|
+
return new Promise((resolve2) => {
|
|
111221
111882
|
try {
|
|
111222
111883
|
const tx = db.transaction(AUTOSAVE_STORE_NAME, "readwrite");
|
|
111223
111884
|
const store = tx.objectStore(AUTOSAVE_STORE_NAME);
|
|
@@ -111239,24 +111900,24 @@ async function deleteOldestAutosaveEntry() {
|
|
|
111239
111900
|
};
|
|
111240
111901
|
tx.oncomplete = () => {
|
|
111241
111902
|
db.close();
|
|
111242
|
-
|
|
111903
|
+
resolve2(oldestKey !== null);
|
|
111243
111904
|
};
|
|
111244
111905
|
tx.onerror = () => {
|
|
111245
111906
|
db.close();
|
|
111246
|
-
|
|
111907
|
+
resolve2(false);
|
|
111247
111908
|
};
|
|
111248
111909
|
} catch {
|
|
111249
111910
|
try {
|
|
111250
111911
|
db.close();
|
|
111251
111912
|
} catch {
|
|
111252
111913
|
}
|
|
111253
|
-
|
|
111914
|
+
resolve2(false);
|
|
111254
111915
|
}
|
|
111255
111916
|
});
|
|
111256
111917
|
}
|
|
111257
111918
|
function putAutosaveRecord(filePath, data) {
|
|
111258
111919
|
return openAutosaveDb().then(
|
|
111259
|
-
(db) => new Promise((
|
|
111920
|
+
(db) => new Promise((resolve2, reject) => {
|
|
111260
111921
|
const tx = db.transaction(AUTOSAVE_STORE_NAME, "readwrite");
|
|
111261
111922
|
const store = tx.objectStore(AUTOSAVE_STORE_NAME);
|
|
111262
111923
|
store.put({
|
|
@@ -111267,7 +111928,7 @@ function putAutosaveRecord(filePath, data) {
|
|
|
111267
111928
|
});
|
|
111268
111929
|
tx.oncomplete = () => {
|
|
111269
111930
|
db.close();
|
|
111270
|
-
|
|
111931
|
+
resolve2(true);
|
|
111271
111932
|
};
|
|
111272
111933
|
tx.onerror = () => {
|
|
111273
111934
|
db.close();
|
|
@@ -111278,23 +111939,23 @@ function putAutosaveRecord(filePath, data) {
|
|
|
111278
111939
|
}
|
|
111279
111940
|
async function getAutosaveSnapshot(filePath) {
|
|
111280
111941
|
const db = await openAutosaveDb();
|
|
111281
|
-
return new Promise((
|
|
111942
|
+
return new Promise((resolve2) => {
|
|
111282
111943
|
const tx = db.transaction(AUTOSAVE_STORE_NAME, "readonly");
|
|
111283
111944
|
const store = tx.objectStore(AUTOSAVE_STORE_NAME);
|
|
111284
111945
|
const req = store.get(filePath);
|
|
111285
111946
|
req.onsuccess = () => {
|
|
111286
111947
|
db.close();
|
|
111287
|
-
|
|
111948
|
+
resolve2(req.result);
|
|
111288
111949
|
};
|
|
111289
111950
|
req.onerror = () => {
|
|
111290
111951
|
db.close();
|
|
111291
|
-
|
|
111952
|
+
resolve2(void 0);
|
|
111292
111953
|
};
|
|
111293
111954
|
});
|
|
111294
111955
|
}
|
|
111295
111956
|
async function listAutosaveSnapshots() {
|
|
111296
111957
|
const db = await openAutosaveDb();
|
|
111297
|
-
return new Promise((
|
|
111958
|
+
return new Promise((resolve2) => {
|
|
111298
111959
|
const results = [];
|
|
111299
111960
|
try {
|
|
111300
111961
|
const tx = db.transaction(AUTOSAVE_STORE_NAME, "readonly");
|
|
@@ -111310,42 +111971,42 @@ async function listAutosaveSnapshots() {
|
|
|
111310
111971
|
};
|
|
111311
111972
|
tx.oncomplete = () => {
|
|
111312
111973
|
db.close();
|
|
111313
|
-
|
|
111974
|
+
resolve2(results);
|
|
111314
111975
|
};
|
|
111315
111976
|
tx.onerror = () => {
|
|
111316
111977
|
db.close();
|
|
111317
|
-
|
|
111978
|
+
resolve2([]);
|
|
111318
111979
|
};
|
|
111319
111980
|
} catch {
|
|
111320
111981
|
try {
|
|
111321
111982
|
db.close();
|
|
111322
111983
|
} catch {
|
|
111323
111984
|
}
|
|
111324
|
-
|
|
111985
|
+
resolve2([]);
|
|
111325
111986
|
}
|
|
111326
111987
|
});
|
|
111327
111988
|
}
|
|
111328
111989
|
async function deleteAutosaveSnapshot(filePath) {
|
|
111329
111990
|
const db = await openAutosaveDb();
|
|
111330
|
-
return new Promise((
|
|
111991
|
+
return new Promise((resolve2) => {
|
|
111331
111992
|
try {
|
|
111332
111993
|
const tx = db.transaction(AUTOSAVE_STORE_NAME, "readwrite");
|
|
111333
111994
|
const store = tx.objectStore(AUTOSAVE_STORE_NAME);
|
|
111334
111995
|
store.delete(filePath);
|
|
111335
111996
|
tx.oncomplete = () => {
|
|
111336
111997
|
db.close();
|
|
111337
|
-
|
|
111998
|
+
resolve2(true);
|
|
111338
111999
|
};
|
|
111339
112000
|
tx.onerror = () => {
|
|
111340
112001
|
db.close();
|
|
111341
|
-
|
|
112002
|
+
resolve2(false);
|
|
111342
112003
|
};
|
|
111343
112004
|
} catch {
|
|
111344
112005
|
try {
|
|
111345
112006
|
db.close();
|
|
111346
112007
|
} catch {
|
|
111347
112008
|
}
|
|
111348
|
-
|
|
112009
|
+
resolve2(false);
|
|
111349
112010
|
}
|
|
111350
112011
|
});
|
|
111351
112012
|
}
|
|
@@ -112178,17 +112839,17 @@ function shouldConfirmExternalHyperlink(options, href) {
|
|
|
112178
112839
|
}
|
|
112179
112840
|
return /^https?:/i.test(href);
|
|
112180
112841
|
}
|
|
112181
|
-
function toggle(
|
|
112182
|
-
return { kind: "toggle", group, key, labelKey, ...extra };
|
|
112842
|
+
function toggle(group2, key, labelKey, extra) {
|
|
112843
|
+
return { kind: "toggle", group: group2, key, labelKey, ...extra };
|
|
112183
112844
|
}
|
|
112184
|
-
function select(
|
|
112185
|
-
return { kind: "select", group, key, labelKey, choices: choiceList };
|
|
112845
|
+
function select(group2, key, labelKey, choiceList) {
|
|
112846
|
+
return { kind: "select", group: group2, key, labelKey, choices: choiceList };
|
|
112186
112847
|
}
|
|
112187
|
-
function numberControl(
|
|
112188
|
-
return { kind: "number", group, key, labelKey, min, max, unitKey };
|
|
112848
|
+
function numberControl(group2, key, labelKey, min, max, unitKey) {
|
|
112849
|
+
return { kind: "number", group: group2, key, labelKey, min, max, unitKey };
|
|
112189
112850
|
}
|
|
112190
|
-
function textControl(
|
|
112191
|
-
return { kind: "text", group, key, labelKey, maxLength: 64 };
|
|
112851
|
+
function textControl(group2, key, labelKey) {
|
|
112852
|
+
return { kind: "text", group: group2, key, labelKey, maxLength: 64 };
|
|
112192
112853
|
}
|
|
112193
112854
|
function choices(prefix, values) {
|
|
112194
112855
|
return values.map((value) => ({ value, labelKey: `${prefix}.${value}` }));
|
|
@@ -112670,17 +113331,17 @@ function createViewerOptionsStore(init) {
|
|
|
112670
113331
|
return {
|
|
112671
113332
|
getOptions: () => options,
|
|
112672
113333
|
setOptions: (next) => commit(cloneOptions(next)),
|
|
112673
|
-
setValue: (
|
|
112674
|
-
const defaults = DEFAULT_VIEWER_OPTIONS[
|
|
113334
|
+
setValue: (group2, key, value) => {
|
|
113335
|
+
const defaults = DEFAULT_VIEWER_OPTIONS[group2];
|
|
112675
113336
|
if (!(key in defaults) || typeof defaults[key] !== typeof value) {
|
|
112676
113337
|
return;
|
|
112677
113338
|
}
|
|
112678
113339
|
const next = cloneOptions(options);
|
|
112679
|
-
next[
|
|
113340
|
+
next[group2][key] = value;
|
|
112680
113341
|
commit(next);
|
|
112681
113342
|
},
|
|
112682
|
-
getValue: (
|
|
112683
|
-
const record = options[
|
|
113343
|
+
getValue: (group2, key) => {
|
|
113344
|
+
const record = options[group2];
|
|
112684
113345
|
const value = record[key];
|
|
112685
113346
|
return typeof value === "boolean" || typeof value === "number" || typeof value === "string" ? value : void 0;
|
|
112686
113347
|
},
|
|
@@ -112702,14 +113363,14 @@ function createViewerOptionsStore(init) {
|
|
|
112702
113363
|
next.quickAccess.commandIds = [...commandIds];
|
|
112703
113364
|
commit(next);
|
|
112704
113365
|
},
|
|
112705
|
-
reset: (
|
|
112706
|
-
if (!
|
|
113366
|
+
reset: (group2) => {
|
|
113367
|
+
if (!group2) {
|
|
112707
113368
|
commit(cloneOptions(DEFAULT_VIEWER_OPTIONS));
|
|
112708
113369
|
return;
|
|
112709
113370
|
}
|
|
112710
113371
|
const next = cloneOptions(options);
|
|
112711
113372
|
const defaults = cloneOptions(DEFAULT_VIEWER_OPTIONS);
|
|
112712
|
-
next[
|
|
113373
|
+
next[group2] = defaults[group2];
|
|
112713
113374
|
commit(next);
|
|
112714
113375
|
},
|
|
112715
113376
|
subscribe: (listener) => {
|
|
@@ -113659,7 +114320,7 @@ var VAR_DEPENDENT_PROPERTIES = [
|
|
|
113659
114320
|
function resolveCustomProperties(root) {
|
|
113660
114321
|
const elements = root.querySelectorAll("*");
|
|
113661
114322
|
const view = root.ownerDocument?.defaultView ?? window;
|
|
113662
|
-
const
|
|
114323
|
+
const resolve2 = (el) => {
|
|
113663
114324
|
const htmlEl = el;
|
|
113664
114325
|
if (!htmlEl.style) {
|
|
113665
114326
|
return;
|
|
@@ -113675,8 +114336,8 @@ function resolveCustomProperties(root) {
|
|
|
113675
114336
|
}
|
|
113676
114337
|
}
|
|
113677
114338
|
};
|
|
113678
|
-
|
|
113679
|
-
elements.forEach(
|
|
114339
|
+
resolve2(root);
|
|
114340
|
+
elements.forEach(resolve2);
|
|
113680
114341
|
}
|
|
113681
114342
|
function preprocessCssForCapture(root, options = {}) {
|
|
113682
114343
|
const {
|
|
@@ -113714,9 +114375,9 @@ async function blobUrlToDataUrl(blobUrl) {
|
|
|
113714
114375
|
try {
|
|
113715
114376
|
const response = await fetch(blobUrl);
|
|
113716
114377
|
const blob = await response.blob();
|
|
113717
|
-
return await new Promise((
|
|
114378
|
+
return await new Promise((resolve2, reject) => {
|
|
113718
114379
|
const reader = new FileReader();
|
|
113719
|
-
reader.onloadend = () =>
|
|
114380
|
+
reader.onloadend = () => resolve2(reader.result);
|
|
113720
114381
|
reader.onerror = reject;
|
|
113721
114382
|
reader.readAsDataURL(blob);
|
|
113722
114383
|
});
|
|
@@ -113835,7 +114496,7 @@ var COMPLEX_COLOR_PROPERTIES = [
|
|
|
113835
114496
|
];
|
|
113836
114497
|
function resolveUnsupportedColours(root) {
|
|
113837
114498
|
const elements = root.querySelectorAll("*");
|
|
113838
|
-
const
|
|
114499
|
+
const resolve2 = (el) => {
|
|
113839
114500
|
const htmlEl = el;
|
|
113840
114501
|
if (!htmlEl.style) {
|
|
113841
114502
|
return;
|
|
@@ -113865,8 +114526,8 @@ function resolveUnsupportedColours(root) {
|
|
|
113865
114526
|
}
|
|
113866
114527
|
}
|
|
113867
114528
|
};
|
|
113868
|
-
|
|
113869
|
-
elements.forEach(
|
|
114529
|
+
resolve2(root);
|
|
114530
|
+
elements.forEach(resolve2);
|
|
113870
114531
|
}
|
|
113871
114532
|
function resolveRootCustomProperties(doc) {
|
|
113872
114533
|
const targets = [doc.documentElement, doc.body];
|
|
@@ -114382,4 +115043,4 @@ function segmentFrameCount(durationMs, fps) {
|
|
|
114382
115043
|
* `<p:extLst>` (optional)
|
|
114383
115044
|
*/
|
|
114384
115045
|
|
|
114385
|
-
export { ACTION_BUTTON_PRESETS, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, COLOR_MAP_ALIAS_KEYS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_INSERT_CHART_TYPE, DEFAULT_MOTION_PATH_PRESET_ID, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, FILL_PATTERN_LABEL_KEYS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, HIDDEN_SLIDE_LABEL_KEY, HIDDEN_SLIDE_SLASH_GRADIENT, HIGHLIGHTER_COLORS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_HINT_CLASS, LINK_TOOLTIP_HOST_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_PANEL_CLASS, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, MOTION_PATH_FAMILIES, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, OUTLINE_LEVEL_ATTR, OUTLINE_ROW_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_VIEW_ATTR, PATTERN_OPTIONS, PEN_COLORS, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESENTER_CONSOLE_CLASSES, PRESENTER_CONSOLE_CONTROLS, PRESENTER_NAVIGATOR_LABEL_KEYS, PRESENT_TOOLBAR_CLASSES, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, READING_VIEW_ATTR, READING_VIEW_COUNTER_ATTR, READING_VIEW_STAGE_ATTR, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_LABELS, THEME_COLOR_SCHEME_KEYS, THEME_COLOR_SLOT_LABEL_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptsPresentationInput, actionAffordanceLabels, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTagToCollections, alignElements, animationEffectLabel, appendPresentationInkPoint, appendTableElementColumn, appendTableElementRow, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFormatToElement, applyMotionPathPreset, applyOutlineEdit, applyPreferenceToOptions, applyReadingViewCommand, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, availableQuickAccessCommands, backstageCardsFor, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMorphTransitionPlan, buildMotionPathPreview, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutline, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTableDataGrid, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBuildSpec, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canCommitActionType, canGoNext, canGoPrevious, canvasToJpegData, cell3DBevelCss, chartDataChangeType, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearMotionPath, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, compileEquationTemplateMathMl, compileLatexEquation, computeAllNotesPages, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPresentationKeyBuffer, createPresentationSessionId, createPresenterShowGuard, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demoteSmartArtNode, derivePresenceList, deriveSlideFieldContext, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, encodeGif, endAudienceDisplay, ensureActionAffordanceStyles, erasePresentationInkAt, evaluatePresetShape, extraQuickAccessCommands, extractPathPoints, filterCommands, filterRenderedElements, findChartPartTarget, findMediaElementByElementId, findSmartArtNodeText, firstShowSlideIndex, flattenTagCollections, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGradientTileFlipCss, getGradientTileRectCss, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageFitStyle, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeFilterId, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, handleReadingViewKey, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasShowSlideAfter, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, hiddenSlideCue, insertTableColumn, insertTableRow, isActionHidden, isBrowserOpenableMime, isCalloutShape, isCellInRect, isEditableMotionPath, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementRendered, isExportAbortError, isImageLikeElement, isInkElement, isKeyboardOpen, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isTemplateElement, isTemplateElementId2 as isTemplateElementId, isUrlSafe, lastShowSlideIndex, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, makeCloneId, makeSlideId, mapEditorKey, mapOutlineKey, mapPresentationKey, mayLeaveSlideShow, mediaPlaybackAttributes, mediaTransportVisible, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, motionPathEndPixel, motionPathFamilyLabelKey, motionPathFor, motionPathPresetIdForPath, motionPathPresetLabelKey, motionPathPresetsByFamily, motionPathToSvgD, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, nextPresentedSlide, nextShowSlideIndex, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openReadingView, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationInkPath, presenterElapsed, presenterNextDisabled, presenterPaneAdvancesOnClick, presenterPrevDisabled, presenterTimerProgress, pressuresToWidths, previousShowSlideIndex, printPropertiesFrameSlides, printPropertiesSlidesPerPage, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, readingViewFitScale, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, remapTextToSegments, removeChartCategory, removeChartSeries, removeLastTableElementColumn, removeLastTableElementRow, removeQuickAccessCommand, removeSmartArtNode, removeTableElementColumn, removeTableElementRow, renameSection, reorderSmartArtNode, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveActionType, resolveAudienceScreenPlacement, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveElementActionAffordance, resolveFontForScript, resolveFontRefIdx, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolveParagraphStrutFontSize, resolvePictureBullet, resolveProfileInitial, resolveRegionCode, resolveShowSlideIndexes, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, resolveViewerAddinRows, restoreSegmentSelection, revealedSmartArtNodeCount, rulerDragToGuidePosition, runMediaCommand, runPresentationAction, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveViewerProfile, scanAvailableFontFamilies, schemaLabel, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor2 as seriesColor, setCachedResult, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setMotionPath, setMotionPathEnd, setPendingSelectionRestore, setSmartArtNodeStyle, setTableElementCellText, shadeColor2, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, storeAudienceContent, substituteFieldText, suppressesCssBorder, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorSchemesEqual, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withFrameSlides, withSlidesPerPage, writeStoredViewerPrefs, zoomInScale, zoomOutScale };
|
|
115046
|
+
export { ACTION_BUTTON_PRESETS, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, COLOR_MAP_ALIAS_KEYS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_INSERT_CHART_TYPE, DEFAULT_MOTION_PATH_PRESET_ID, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, FILL_PATTERN_LABEL_KEYS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, HIDDEN_SLIDE_LABEL_KEY, HIDDEN_SLIDE_SLASH_GRADIENT, HIGHLIGHTER_COLORS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_HINT_CLASS, LINK_TOOLTIP_HOST_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_PANEL_CLASS, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, MOTION_PATH_FAMILIES, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, OUTLINE_LEVEL_ATTR, OUTLINE_ROW_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_VIEW_ATTR, PATTERN_OPTIONS, PEN_COLORS, POWERPOINT_METRIC_TRACKING, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESENTER_CONSOLE_CLASSES, PRESENTER_CONSOLE_CONTROLS, PRESENTER_NAVIGATOR_LABEL_KEYS, PRESENT_TOOLBAR_CLASSES, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, READING_VIEW_ATTR, READING_VIEW_COUNTER_ATTR, READING_VIEW_STAGE_ATTR, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_LABELS, THEME_COLOR_SCHEME_KEYS, THEME_COLOR_SLOT_LABEL_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptsPresentationInput, actionAffordanceLabels, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTagToCollections, alignElements, animationEffectLabel, appendPresentationInkPoint, appendTableElementColumn, appendTableElementRow, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFormatToElement, applyMotionPathPreset, applyOutlineEdit, applyPreferenceToOptions, applyReadingViewCommand, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, attachPresentationVisibilityPause, availableQuickAccessCommands, backstageCardsFor, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMorphTransitionPlan, buildMotionPathPreview, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutline, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTableDataGrid, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBuildSpec, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canCommitActionType, canGoNext, canGoPrevious, canvasToJpegData, cell3DBevelCss, chartAreaFill, chartDataChangeType, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearMotionPath, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, compileEquationTemplateMathMl, compileLatexEquation, computeAllNotesPages, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPresentationKeyBuffer, createPresentationSessionId, createPresenterShowGuard, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demoteSmartArtNode, derivePresenceList, deriveSlideFieldContext, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, encodeGif, endAudienceDisplay, ensureActionAffordanceStyles, erasePresentationInkAt, evaluatePresetShape, extraQuickAccessCommands, extractPathPoints, filterCommands, filterRenderedElements, findChartPartTarget, findMediaElementByElementId, findSmartArtNodeText, firstShowSlideIndex, flattenTagCollections, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGradientTileFlipCss, getGradientTileRectCss, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageFitStyle, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeFilterId, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, handleReadingViewKey, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasShowSlideAfter, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, hiddenSlideCue, insertTableColumn, insertTableRow, isActionHidden, isBrowserOpenableMime, isCalloutShape, isCellInRect, isEditableMotionPath, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementRendered, isExportAbortError, isImageLikeElement, isInkElement, isKeyboardOpen, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isTemplateElement, isTemplateElementId2 as isTemplateElementId, isUrlSafe, lastShowSlideIndex, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, makeCloneId, makeSlideId, mapEditorKey, mapOutlineKey, mapPresentationKey, mayLeaveSlideShow, mediaPlaybackAttributes, mediaTransportVisible, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, motionPathEndPixel, motionPathFamilyLabelKey, motionPathFor, motionPathPresetIdForPath, motionPathPresetLabelKey, motionPathPresetsByFamily, motionPathToSvgD, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, nextPresentedSlide, nextShowSlideIndex, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openReadingView, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parsePanoseString, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationInkPath, presenterElapsed, presenterNextDisabled, presenterPaneAdvancesOnClick, presenterPrevDisabled, presenterTimerProgress, pressuresToWidths, previousShowSlideIndex, printPropertiesFrameSlides, printPropertiesSlidesPerPage, promoteSmartArtNode, proportionalLineHeight, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, readingViewFitScale, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, registerPersistentAudio, remapTextToSegments, removeChartCategory, removeChartSeries, removeLastTableElementColumn, removeLastTableElementRow, removeQuickAccessCommand, removeSmartArtNode, removeTableElementColumn, removeTableElementRow, renameSection, reorderSmartArtNode, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveActionType, resolveAudienceScreenPlacement, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveElementActionAffordance, resolveFontForScript, resolveFontRefIdx, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolveParagraphStrutFontSize, resolvePictureBullet, resolveProfileInitial, resolveRegionCode, resolveShowSlideIndexes, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, resolveViewerAddinRows, restoreSegmentSelection, revealedSmartArtNodeCount, rulerDragToGuidePosition, runMediaCommand, runPresentationAction, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveViewerProfile, scanAvailableFontFamilies, schemaLabel, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor2 as seriesColor, setCachedResult, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setMotionPath, setMotionPathEnd, setPendingSelectionRestore, setSmartArtNodeStyle, setTableElementCellText, shadeColor2, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, stopAllPersistentAudio, storeAudienceContent, substituteFieldText, suppressesCssBorder, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorSchemesEqual, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withFrameSlides, withSlidesPerPage, writeStoredViewerPrefs, zoomInScale, zoomOutScale };
|