pptx-viewer-core 1.1.33 → 1.1.35

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/dist/index.mjs CHANGED
@@ -6204,16 +6204,16 @@ var PptxShapeStyleExtractor = class {
6204
6204
  extractShapeStyle(spPr, styleNode) {
6205
6205
  const style = {};
6206
6206
  const shapeProps = spPr || {};
6207
- const solidFill = shapeProps["a:solidFill"];
6207
+ const solidFill2 = shapeProps["a:solidFill"];
6208
6208
  const gradFill = shapeProps["a:gradFill"];
6209
6209
  const pattFill = shapeProps["a:pattFill"];
6210
6210
  const noFill = shapeProps["a:noFill"];
6211
6211
  const blipFill = shapeProps["a:blipFill"];
6212
- if (solidFill) {
6212
+ if (solidFill2) {
6213
6213
  style.fillMode = "solid";
6214
- style.fillColor = this.context.parseColor(solidFill);
6215
- style.fillOpacity = this.context.extractColorOpacity(solidFill);
6216
- const solidFillColorXml = extractColorChoiceXml(solidFill);
6214
+ style.fillColor = this.context.parseColor(solidFill2);
6215
+ style.fillOpacity = this.context.extractColorOpacity(solidFill2);
6216
+ const solidFillColorXml = extractColorChoiceXml(solidFill2);
6217
6217
  if (solidFillColorXml) {
6218
6218
  style.fillColorXml = solidFillColorXml;
6219
6219
  }
@@ -6979,15 +6979,15 @@ var PptxMediaDataParser = class {
6979
6979
 
6980
6980
  // src/core/utils/ole-utils.ts
6981
6981
  var PROG_ID_MAP = [
6982
- { pattern: /^Excel\./i, type: "excel", extension: "xlsx" },
6983
- { pattern: /^Word\./i, type: "word", extension: "docx" },
6984
- { pattern: /^PowerPoint\./i, type: "excel", extension: "pptx" },
6985
- { pattern: /^Visio\./i, type: "visio", extension: "vsdx" },
6986
- { pattern: /^Equation\./i, type: "mathtype", extension: "wmf" },
6987
- { pattern: /^MathType/i, type: "mathtype", extension: "wmf" },
6988
- { pattern: /^AcroExch\./i, type: "pdf", extension: "pdf" },
6989
- { pattern: /^Acrobat\./i, type: "pdf", extension: "pdf" },
6990
- { pattern: /^Package$/i, type: "package", extension: "bin" }
6982
+ { pattern: /^Excel\./iu, type: "excel", extension: "xlsx" },
6983
+ { pattern: /^Word\./iu, type: "word", extension: "docx" },
6984
+ { pattern: /^PowerPoint\./iu, type: "excel", extension: "pptx" },
6985
+ { pattern: /^Visio\./iu, type: "visio", extension: "vsdx" },
6986
+ { pattern: /^Equation\./iu, type: "mathtype", extension: "wmf" },
6987
+ { pattern: /^MathType/iu, type: "mathtype", extension: "wmf" },
6988
+ { pattern: /^AcroExch\./iu, type: "pdf", extension: "pdf" },
6989
+ { pattern: /^Acrobat\./iu, type: "pdf", extension: "pdf" },
6990
+ { pattern: /^Package$/iu, type: "package", extension: "bin" }
6991
6991
  ];
6992
6992
  var CLSID_MAP = /* @__PURE__ */ new Map([
6993
6993
  // Excel Workbook
@@ -7014,7 +7014,7 @@ function detectOleObjectType(progId, clsId) {
7014
7014
  }
7015
7015
  }
7016
7016
  if (clsId) {
7017
- const normalised = clsId.replace(/[{}]/g, "").toUpperCase().trim();
7017
+ const normalised = clsId.replace(/[{}]/gu, "").toUpperCase().trim();
7018
7018
  const match = CLSID_MAP.get(normalised);
7019
7019
  if (match) {
7020
7020
  return { oleObjectType: match.type, oleFileExtension: match.extension };
@@ -7036,6 +7036,38 @@ function inferOleExtensionFromTarget(oleTarget) {
7036
7036
  }
7037
7037
  return void 0;
7038
7038
  }
7039
+ var OLE_EXTENSION_MIME_MAP = /* @__PURE__ */ new Map([
7040
+ ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
7041
+ ["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
7042
+ ["xls", "application/vnd.ms-excel"],
7043
+ ["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
7044
+ ["docm", "application/vnd.ms-word.document.macroEnabled.12"],
7045
+ ["doc", "application/msword"],
7046
+ ["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
7047
+ ["ppt", "application/vnd.ms-powerpoint"],
7048
+ ["vsdx", "application/vnd.ms-visio.drawing"],
7049
+ ["vsd", "application/vnd.visio"],
7050
+ ["pdf", "application/pdf"],
7051
+ ["rtf", "application/rtf"],
7052
+ ["txt", "text/plain"],
7053
+ ["csv", "text/csv"],
7054
+ ["png", "image/png"],
7055
+ ["jpg", "image/jpeg"],
7056
+ ["jpeg", "image/jpeg"],
7057
+ ["gif", "image/gif"],
7058
+ ["wmf", "image/wmf"],
7059
+ ["emf", "image/emf"],
7060
+ ["zip", "application/zip"]
7061
+ ]);
7062
+ function mimeTypeForOleFile(fileNameOrExtension) {
7063
+ const fallback = "application/octet-stream";
7064
+ if (!fileNameOrExtension) {
7065
+ return fallback;
7066
+ }
7067
+ const lastDot = fileNameOrExtension.lastIndexOf(".");
7068
+ const ext = (lastDot === -1 ? fileNameOrExtension : fileNameOrExtension.slice(lastDot + 1)).toLowerCase().trim();
7069
+ return OLE_EXTENSION_MIME_MAP.get(ext) ?? fallback;
7070
+ }
7039
7071
  function getOleObjectTypeLabel(oleObjectType) {
7040
7072
  switch (oleObjectType) {
7041
7073
  case "excel":
@@ -8762,6 +8794,7 @@ var PptxSlideLoaderService = class {
8762
8794
  if (mediaTimingMap.size > 0) {
8763
8795
  await params.enrichMediaElementsWithTiming(slideElements, mediaTimingMap);
8764
8796
  }
8797
+ await params.enrichOleElementsWithEmbeddedData(slideElements, path);
8765
8798
  const elements = [...layoutElements, ...slideElements];
8766
8799
  const backgroundColor = params.extractBackgroundColor(slideXmlObj) || await params.getLayoutBackgroundColor(path);
8767
8800
  const backgroundGradient = params.extractBackgroundGradient(slideXmlObj) || await params.getLayoutBackgroundGradient(path);
@@ -8911,15 +8944,15 @@ var PptxSlideLoaderService = class {
8911
8944
 
8912
8945
  // src/core/services/PptxXmlLookupService.ts
8913
8946
  var PptxXmlLookupService = class {
8914
- getChildByLocalName(parent, localName) {
8947
+ getChildByLocalName(parent, localName2) {
8915
8948
  if (!parent) {
8916
8949
  return void 0;
8917
8950
  }
8918
- const direct = parent[localName];
8951
+ const direct = parent[localName2];
8919
8952
  if (direct && typeof direct === "object" && !Array.isArray(direct)) {
8920
8953
  return direct;
8921
8954
  }
8922
- const suffix = `:${localName}`;
8955
+ const suffix = `:${localName2}`;
8923
8956
  const matchingKey = Object.keys(parent).find((key) => key.endsWith(suffix));
8924
8957
  if (!matchingKey) {
8925
8958
  return void 0;
@@ -8930,32 +8963,32 @@ var PptxXmlLookupService = class {
8930
8963
  }
8931
8964
  return value;
8932
8965
  }
8933
- getChildrenArrayByLocalName(parent, localName) {
8966
+ getChildrenArrayByLocalName(parent, localName2) {
8934
8967
  if (!parent) {
8935
8968
  return [];
8936
8969
  }
8937
- const direct = parent[localName];
8970
+ const direct = parent[localName2];
8938
8971
  if (direct !== void 0) {
8939
8972
  return this.toXmlArray(direct);
8940
8973
  }
8941
- const suffix = `:${localName}`;
8974
+ const suffix = `:${localName2}`;
8942
8975
  const matchingKey = Object.keys(parent).find((key) => key.endsWith(suffix));
8943
8976
  if (!matchingKey) {
8944
8977
  return [];
8945
8978
  }
8946
8979
  return this.toXmlArray(parent[matchingKey]);
8947
8980
  }
8948
- getScalarChildByLocalName(parent, localName) {
8981
+ getScalarChildByLocalName(parent, localName2) {
8949
8982
  if (!parent) {
8950
8983
  return void 0;
8951
8984
  }
8952
- const direct = parent[localName];
8985
+ const direct = parent[localName2];
8953
8986
  if (typeof direct === "string" || typeof direct === "number") {
8954
8987
  return String(direct);
8955
8988
  }
8956
- const suffix = `:${localName}`;
8989
+ const suffix = `:${localName2}`;
8957
8990
  for (const [key, value] of Object.entries(parent)) {
8958
- if (key !== localName && !key.endsWith(suffix)) {
8991
+ if (key !== localName2 && !key.endsWith(suffix)) {
8959
8992
  continue;
8960
8993
  }
8961
8994
  if (typeof value === "string" || typeof value === "number") {
@@ -10400,11 +10433,11 @@ function parseP14FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
10400
10433
  if (key.startsWith("@_")) {
10401
10434
  continue;
10402
10435
  }
10403
- const localName = getXmlLocalName(key);
10404
- if (!P14_TRANSITION_TYPES.has(localName)) {
10436
+ const localName2 = getXmlLocalName(key);
10437
+ if (!P14_TRANSITION_TYPES.has(localName2)) {
10405
10438
  continue;
10406
10439
  }
10407
- const type = localName;
10440
+ const type = localName2;
10408
10441
  let direction;
10409
10442
  let orient;
10410
10443
  let pattern;
@@ -10454,8 +10487,8 @@ function buildP14ExtLst(transitionType, direction, orient, pattern, rawExtLst, x
10454
10487
  if (key.startsWith("@_")) {
10455
10488
  continue;
10456
10489
  }
10457
- const localName = getXmlLocalName(key);
10458
- if (P14_TRANSITION_TYPES.has(localName)) {
10490
+ const localName2 = getXmlLocalName(key);
10491
+ if (P14_TRANSITION_TYPES.has(localName2)) {
10459
10492
  return false;
10460
10493
  }
10461
10494
  }
@@ -10518,17 +10551,17 @@ var PptxSlideTransitionService = class {
10518
10551
  if (key.startsWith("@_")) {
10519
10552
  continue;
10520
10553
  }
10521
- const localName = this.getXmlLocalName(key);
10522
- if (localName === "sndAc") {
10554
+ const localName2 = this.getXmlLocalName(key);
10555
+ if (localName2 === "sndAc") {
10523
10556
  rawSoundAction = value;
10524
10557
  continue;
10525
10558
  }
10526
- if (localName === "extLst") {
10559
+ if (localName2 === "extLst") {
10527
10560
  rawExtLst = value;
10528
10561
  continue;
10529
10562
  }
10530
- if (TRANSITION_TYPES.has(localName)) {
10531
- transitionType = localName;
10563
+ if (TRANSITION_TYPES.has(localName2)) {
10564
+ transitionType = localName2;
10532
10565
  }
10533
10566
  if (value && typeof value === "object" && !Array.isArray(value)) {
10534
10567
  const detail = value;
@@ -12343,6 +12376,321 @@ function resolveLayoutDisplayName(input) {
12343
12376
  return fallbackFromPath(input.path);
12344
12377
  }
12345
12378
 
12379
+ // src/core/utils/ole2-parser-types.ts
12380
+ var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
12381
+ var ENDOFCHAIN = 4294967294;
12382
+ var FREESECT = 4294967295;
12383
+ var FATSECT = 4294967293;
12384
+ var MAXREGSECT = 4294967290;
12385
+ var ENTRY_TYPE_EMPTY = 0;
12386
+ var ENTRY_TYPE_STREAM = 2;
12387
+ var ENTRY_TYPE_ROOT = 5;
12388
+ var DIR_ENTRY_SIZE = 128;
12389
+ var Ole2ParseError = class extends Error {
12390
+ constructor(message) {
12391
+ super(message);
12392
+ this.name = "Ole2ParseError";
12393
+ }
12394
+ };
12395
+
12396
+ // src/core/utils/ole2-parser-read.ts
12397
+ function parseOle2(buffer) {
12398
+ const data = new Uint8Array(buffer);
12399
+ const view = new DataView(buffer);
12400
+ for (let i = 0; i < OLE_MAGIC.length; i++) {
12401
+ if (data[i] !== OLE_MAGIC[i]) {
12402
+ throw new Ole2ParseError("Not a valid OLE2 compound file");
12403
+ }
12404
+ }
12405
+ view.getUint16(24, true);
12406
+ const majorVersion = view.getUint16(26, true);
12407
+ const byteOrder = view.getUint16(28, true);
12408
+ if (byteOrder !== 65534) {
12409
+ throw new Ole2ParseError("Invalid byte order mark");
12410
+ }
12411
+ const sectorSizePower = view.getUint16(30, true);
12412
+ const miniSectorSizePower = view.getUint16(32, true);
12413
+ const sectorSize = 1 << sectorSizePower;
12414
+ const miniSectorSize = 1 << miniSectorSizePower;
12415
+ const totalFATSectors = view.getUint32(44, true);
12416
+ const firstDirectorySector = view.getUint32(48, true);
12417
+ const miniStreamCutoff = view.getUint32(56, true);
12418
+ const firstMiniFATSector = view.getUint32(60, true);
12419
+ const totalMiniFATSectors = view.getUint32(64, true);
12420
+ const firstDIFATSector = view.getUint32(68, true);
12421
+ const totalDIFATSectors = view.getUint32(72, true);
12422
+ function sectorOffset(sector) {
12423
+ return (sector + 1) * sectorSize;
12424
+ }
12425
+ function readSector(sector) {
12426
+ const offset = sectorOffset(sector);
12427
+ if (offset + sectorSize > data.length) {
12428
+ throw new Ole2ParseError(
12429
+ `Sector ${sector} at offset ${offset} exceeds file size ${data.length}`
12430
+ );
12431
+ }
12432
+ return data.subarray(offset, offset + sectorSize);
12433
+ }
12434
+ const fatSectors = [];
12435
+ for (let i = 0; i < 109 && fatSectors.length < totalFATSectors; i++) {
12436
+ const sector = view.getUint32(76 + i * 4, true);
12437
+ if (sector <= MAXREGSECT) {
12438
+ fatSectors.push(sector);
12439
+ }
12440
+ }
12441
+ let difatSector = firstDIFATSector;
12442
+ for (let d = 0; d < totalDIFATSectors && difatSector <= MAXREGSECT; d++) {
12443
+ const difatData = readSector(difatSector);
12444
+ const difatView = new DataView(difatData.buffer, difatData.byteOffset, difatData.byteLength);
12445
+ const entriesPerSector = (sectorSize - 4) / 4;
12446
+ for (let i = 0; i < entriesPerSector && fatSectors.length < totalFATSectors; i++) {
12447
+ const sector = difatView.getUint32(i * 4, true);
12448
+ if (sector <= MAXREGSECT) {
12449
+ fatSectors.push(sector);
12450
+ }
12451
+ }
12452
+ difatSector = difatView.getUint32(sectorSize - 4, true);
12453
+ }
12454
+ const fatEntries = [];
12455
+ for (const fatSector of fatSectors) {
12456
+ const fatData = readSector(fatSector);
12457
+ const fatView = new DataView(fatData.buffer, fatData.byteOffset, fatData.byteLength);
12458
+ for (let i = 0; i < sectorSize / 4; i++) {
12459
+ fatEntries.push(fatView.getUint32(i * 4, true));
12460
+ }
12461
+ }
12462
+ function readSectorChain(startSector) {
12463
+ const sectors = [];
12464
+ let current = startSector;
12465
+ const visited = /* @__PURE__ */ new Set();
12466
+ while (current <= MAXREGSECT) {
12467
+ if (visited.has(current)) {
12468
+ throw new Ole2ParseError(`Circular reference in FAT chain at sector ${current}`);
12469
+ }
12470
+ visited.add(current);
12471
+ sectors.push(readSector(current));
12472
+ current = fatEntries[current] ?? ENDOFCHAIN;
12473
+ }
12474
+ const totalLength = sectors.length * sectorSize;
12475
+ const result = new Uint8Array(totalLength);
12476
+ let offset = 0;
12477
+ for (const sector of sectors) {
12478
+ result.set(sector, offset);
12479
+ offset += sectorSize;
12480
+ }
12481
+ return result;
12482
+ }
12483
+ function readStream(startSector, size) {
12484
+ const raw = readSectorChain(startSector);
12485
+ return raw.subarray(0, Math.min(size, raw.length));
12486
+ }
12487
+ const miniFatEntries = [];
12488
+ if (firstMiniFATSector <= MAXREGSECT && totalMiniFATSectors > 0) {
12489
+ const miniFatRaw = readSectorChain(firstMiniFATSector);
12490
+ const miniFatView = new DataView(
12491
+ miniFatRaw.buffer,
12492
+ miniFatRaw.byteOffset,
12493
+ miniFatRaw.byteLength
12494
+ );
12495
+ for (let i = 0; i < miniFatRaw.length / 4; i++) {
12496
+ miniFatEntries.push(miniFatView.getUint32(i * 4, true));
12497
+ }
12498
+ }
12499
+ const dirRaw = readSectorChain(firstDirectorySector);
12500
+ const numEntries = Math.floor(dirRaw.length / DIR_ENTRY_SIZE);
12501
+ const entries = [];
12502
+ for (let i = 0; i < numEntries; i++) {
12503
+ const entryOffset = i * DIR_ENTRY_SIZE;
12504
+ const entryView = new DataView(dirRaw.buffer, dirRaw.byteOffset + entryOffset, DIR_ENTRY_SIZE);
12505
+ const nameLen = entryView.getUint16(64, true);
12506
+ const objectType = entryView.getUint8(66);
12507
+ if (objectType === ENTRY_TYPE_EMPTY) {
12508
+ continue;
12509
+ }
12510
+ const nameBytes = Math.max(0, nameLen - 2);
12511
+ let name = "";
12512
+ for (let j = 0; j < nameBytes; j += 2) {
12513
+ name += String.fromCharCode(entryView.getUint16(j, true));
12514
+ }
12515
+ const leftSiblingId = entryView.getUint32(68, true);
12516
+ const rightSiblingId = entryView.getUint32(72, true);
12517
+ const childId = entryView.getUint32(76, true);
12518
+ const startSector = entryView.getUint32(116, true);
12519
+ const sizeLow = entryView.getUint32(120, true);
12520
+ let size = sizeLow;
12521
+ if (majorVersion === 4) {
12522
+ entryView.getUint32(124, true);
12523
+ size = sizeLow;
12524
+ }
12525
+ entries.push({
12526
+ name,
12527
+ type: objectType,
12528
+ startSector,
12529
+ size,
12530
+ childId: childId === 4294967295 ? -1 : childId,
12531
+ leftSiblingId: leftSiblingId === 4294967295 ? -1 : leftSiblingId,
12532
+ rightSiblingId: rightSiblingId === 4294967295 ? -1 : rightSiblingId
12533
+ });
12534
+ }
12535
+ const rootEntry = entries.find((e) => e.type === ENTRY_TYPE_ROOT);
12536
+ let miniStreamData;
12537
+ if (rootEntry && rootEntry.startSector <= MAXREGSECT) {
12538
+ miniStreamData = readSectorChain(rootEntry.startSector);
12539
+ }
12540
+ function readMiniStream(startSector, size) {
12541
+ if (!miniStreamData) {
12542
+ throw new Ole2ParseError("Mini stream container not found");
12543
+ }
12544
+ const sectors = [];
12545
+ let current = startSector;
12546
+ const visited = /* @__PURE__ */ new Set();
12547
+ while (current <= MAXREGSECT) {
12548
+ if (visited.has(current)) {
12549
+ throw new Ole2ParseError(`Circular reference in mini FAT chain at sector ${current}`);
12550
+ }
12551
+ visited.add(current);
12552
+ const offset2 = current * miniSectorSize;
12553
+ sectors.push(miniStreamData.subarray(offset2, offset2 + miniSectorSize));
12554
+ current = miniFatEntries[current] ?? ENDOFCHAIN;
12555
+ }
12556
+ const totalLength = sectors.length * miniSectorSize;
12557
+ const result = new Uint8Array(totalLength);
12558
+ let offset = 0;
12559
+ for (const sector of sectors) {
12560
+ result.set(sector, offset);
12561
+ offset += miniSectorSize;
12562
+ }
12563
+ return result.subarray(0, Math.min(size, result.length));
12564
+ }
12565
+ function getStream(name) {
12566
+ const entry = entries.find(
12567
+ (e) => (e.type === ENTRY_TYPE_STREAM || e.type === ENTRY_TYPE_ROOT) && e.name === name
12568
+ );
12569
+ if (!entry) {
12570
+ return void 0;
12571
+ }
12572
+ if (entry.size < miniStreamCutoff && entry.type !== ENTRY_TYPE_ROOT) {
12573
+ return readMiniStream(entry.startSector, entry.size);
12574
+ }
12575
+ return readStream(entry.startSector, entry.size);
12576
+ }
12577
+ return { entries, getStream };
12578
+ }
12579
+
12580
+ // src/core/utils/ole-embedded-extract.ts
12581
+ function oleBytesToDataUrl(bytes, mimeType) {
12582
+ let binary = "";
12583
+ const chunkSize = 32768;
12584
+ for (let i = 0; i < bytes.length; i += chunkSize) {
12585
+ const chunk = bytes.subarray(i, i + chunkSize);
12586
+ binary += String.fromCharCode.apply(null, Array.from(chunk));
12587
+ }
12588
+ return `data:${mimeType};base64,${btoa(binary)}`;
12589
+ }
12590
+ var OLE10_NATIVE_STREAM_NAMES = [`${String.fromCharCode(1)}Ole10Native`, "Ole10Native"];
12591
+ var CONTENTS_STREAM = "CONTENTS";
12592
+ function isOle2CompoundFile(bytes) {
12593
+ if (bytes.length < OLE_MAGIC.length) {
12594
+ return false;
12595
+ }
12596
+ for (let i = 0; i < OLE_MAGIC.length; i++) {
12597
+ if (bytes[i] !== OLE_MAGIC[i]) {
12598
+ return false;
12599
+ }
12600
+ }
12601
+ return true;
12602
+ }
12603
+ function baseNameFromPath(raw) {
12604
+ const trimmed = raw.trim();
12605
+ if (trimmed.length === 0) {
12606
+ return void 0;
12607
+ }
12608
+ const lastSlash = Math.max(trimmed.lastIndexOf("\\"), trimmed.lastIndexOf("/"));
12609
+ const base = lastSlash === -1 ? trimmed : trimmed.slice(lastSlash + 1);
12610
+ return base.length > 0 ? base : void 0;
12611
+ }
12612
+ function readAsciiZ(bytes, offset) {
12613
+ let end = offset;
12614
+ while (end < bytes.length && bytes[end] !== 0) {
12615
+ end++;
12616
+ }
12617
+ let value = "";
12618
+ for (let i = offset; i < end; i++) {
12619
+ value += String.fromCharCode(bytes[i]);
12620
+ }
12621
+ return { value, next: end < bytes.length ? end + 1 : end };
12622
+ }
12623
+ function decodeOle10Native(stream) {
12624
+ if (stream.length < 6) {
12625
+ return void 0;
12626
+ }
12627
+ const view = new DataView(stream.buffer, stream.byteOffset, stream.byteLength);
12628
+ const declaredSize = view.getUint32(0, true);
12629
+ const bodyEnd = Math.min(stream.length, 4 + declaredSize);
12630
+ if (bodyEnd <= 4) {
12631
+ return void 0;
12632
+ }
12633
+ let cursor = 6;
12634
+ const label = readAsciiZ(stream, cursor);
12635
+ cursor = label.next;
12636
+ const sourcePath = readAsciiZ(stream, cursor);
12637
+ cursor = sourcePath.next;
12638
+ if (cursor + 8 > stream.length) {
12639
+ return void 0;
12640
+ }
12641
+ cursor += 4;
12642
+ const tempLen = view.getUint32(cursor, true);
12643
+ cursor += 4;
12644
+ if (tempLen > stream.length) {
12645
+ return void 0;
12646
+ }
12647
+ cursor += tempLen;
12648
+ if (cursor + 4 > stream.length) {
12649
+ return void 0;
12650
+ }
12651
+ const nativeSize = view.getUint32(cursor, true);
12652
+ cursor += 4;
12653
+ const dataEnd = Math.min(stream.length, cursor + nativeSize);
12654
+ if (dataEnd <= cursor) {
12655
+ return void 0;
12656
+ }
12657
+ const data = stream.subarray(cursor, dataEnd);
12658
+ const fileName = baseNameFromPath(sourcePath.value) ?? baseNameFromPath(label.value) ?? void 0;
12659
+ return { fileName, data };
12660
+ }
12661
+ function unwrapOleEmbedding(bytes) {
12662
+ if (bytes.length === 0) {
12663
+ return { data: bytes };
12664
+ }
12665
+ if (!isOle2CompoundFile(bytes)) {
12666
+ return { data: bytes };
12667
+ }
12668
+ try {
12669
+ const buffer = bytes.buffer.slice(
12670
+ bytes.byteOffset,
12671
+ bytes.byteOffset + bytes.byteLength
12672
+ );
12673
+ const ole = parseOle2(buffer);
12674
+ for (const name of OLE10_NATIVE_STREAM_NAMES) {
12675
+ const ole10 = ole.getStream(name);
12676
+ if (!ole10) {
12677
+ continue;
12678
+ }
12679
+ const decoded = decodeOle10Native(ole10);
12680
+ if (decoded && decoded.data.length > 0) {
12681
+ return decoded;
12682
+ }
12683
+ return { data: ole10 };
12684
+ }
12685
+ const contents = ole.getStream(CONTENTS_STREAM);
12686
+ if (contents && contents.length > 0) {
12687
+ return { data: contents };
12688
+ }
12689
+ } catch {
12690
+ }
12691
+ return { data: bytes };
12692
+ }
12693
+
12346
12694
  // src/core/utils/signature-constants.ts
12347
12695
  var DIGITAL_SIGNATURE_ORIGIN_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin";
12348
12696
  var DIGITAL_SIGNATURE_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature";
@@ -12390,27 +12738,27 @@ function detectDigitalSignatures(zipEntryPaths) {
12390
12738
  function getSignaturePathsToStrip(zipEntryPaths) {
12391
12739
  return zipEntryPaths.filter((p) => p.startsWith(SIGNATURE_PREFIX));
12392
12740
  }
12393
- function findByLocalName(parent, localName) {
12741
+ function findByLocalName(parent, localName2) {
12394
12742
  if (!parent) {
12395
12743
  return void 0;
12396
12744
  }
12397
- if (parent[localName] !== void 0 && typeof parent[localName] === "object") {
12398
- return parent[localName];
12745
+ if (parent[localName2] !== void 0 && typeof parent[localName2] === "object") {
12746
+ return parent[localName2];
12399
12747
  }
12400
12748
  for (const key of Object.keys(parent)) {
12401
12749
  const parts = key.split(":");
12402
- if (parts[parts.length - 1] === localName && typeof parent[key] === "object") {
12750
+ if (parts[parts.length - 1] === localName2 && typeof parent[key] === "object") {
12403
12751
  return parent[key];
12404
12752
  }
12405
12753
  }
12406
12754
  return void 0;
12407
12755
  }
12408
- function findScalarByLocalName(parent, localName) {
12756
+ function findScalarByLocalName(parent, localName2) {
12409
12757
  if (!parent) {
12410
12758
  return void 0;
12411
12759
  }
12412
- if (parent[localName] !== void 0) {
12413
- const v = parent[localName];
12760
+ if (parent[localName2] !== void 0) {
12761
+ const v = parent[localName2];
12414
12762
  if (typeof v === "string") {
12415
12763
  return v;
12416
12764
  }
@@ -12423,7 +12771,7 @@ function findScalarByLocalName(parent, localName) {
12423
12771
  }
12424
12772
  for (const key of Object.keys(parent)) {
12425
12773
  const parts = key.split(":");
12426
- if (parts[parts.length - 1] === localName) {
12774
+ if (parts[parts.length - 1] === localName2) {
12427
12775
  const v = parent[key];
12428
12776
  if (typeof v === "string") {
12429
12777
  return v;
@@ -12438,13 +12786,13 @@ function findScalarByLocalName(parent, localName) {
12438
12786
  }
12439
12787
  return void 0;
12440
12788
  }
12441
- function findAllByLocalName(parent, localName) {
12789
+ function findAllByLocalName(parent, localName2) {
12442
12790
  if (!parent) {
12443
12791
  return [];
12444
12792
  }
12445
12793
  for (const key of Object.keys(parent)) {
12446
12794
  const parts = key.split(":");
12447
- if (parts[parts.length - 1] === localName) {
12795
+ if (parts[parts.length - 1] === localName2) {
12448
12796
  const v = parent[key];
12449
12797
  if (Array.isArray(v)) {
12450
12798
  return v;
@@ -12921,8 +13269,8 @@ function parseLineStyle(container, elementName, xmlLookup, colorParser) {
12921
13269
  if (spPr) {
12922
13270
  const lnNode = xmlLookup.getChildByLocalName(spPr, "ln");
12923
13271
  if (lnNode) {
12924
- const solidFill = xmlLookup.getChildByLocalName(lnNode, "solidFill");
12925
- const lineColor = colorParser.parseColor(solidFill);
13272
+ const solidFill2 = xmlLookup.getChildByLocalName(lnNode, "solidFill");
13273
+ const lineColor = colorParser.parseColor(solidFill2);
12926
13274
  if (lineColor) {
12927
13275
  result.color = lineColor;
12928
13276
  }
@@ -12964,8 +13312,8 @@ function parseShapeProps(spPrNode, xmlLookup, colorParser) {
12964
13312
  }
12965
13313
  const result = {};
12966
13314
  let hasProps = false;
12967
- const solidFill = xmlLookup.getChildByLocalName(spPrNode, "solidFill");
12968
- const fillColor = colorParser.parseColor(solidFill);
13315
+ const solidFill2 = xmlLookup.getChildByLocalName(spPrNode, "solidFill");
13316
+ const fillColor = colorParser.parseColor(solidFill2);
12969
13317
  if (fillColor) {
12970
13318
  result.fillColor = fillColor;
12971
13319
  hasProps = true;
@@ -13145,8 +13493,8 @@ var AXIS_TYPE_MAP = {
13145
13493
  dateAx: "dateAx",
13146
13494
  serAx: "serAx"
13147
13495
  };
13148
- function upsertChartAxisChild(parent, localName, value, getLocalName) {
13149
- const existingKey = Object.keys(parent).find((k) => getLocalName(k) === localName);
13496
+ function upsertChartAxisChild(parent, localName2, value, getLocalName) {
13497
+ const existingKey = Object.keys(parent).find((k) => getLocalName(k) === localName2);
13150
13498
  if (value === void 0) {
13151
13499
  if (existingKey) {
13152
13500
  delete parent[existingKey];
@@ -13156,18 +13504,18 @@ function upsertChartAxisChild(parent, localName, value, getLocalName) {
13156
13504
  if (existingKey) {
13157
13505
  parent[existingKey]["@_val"] = value;
13158
13506
  } else {
13159
- parent[`c:${localName}`] = { "@_val": value };
13507
+ parent[`c:${localName2}`] = { "@_val": value };
13160
13508
  }
13161
13509
  }
13162
13510
  function parseChartAxes(plotArea, xmlLookup, colorParser, getLocalName) {
13163
13511
  const result = [];
13164
13512
  for (const key of Object.keys(plotArea)) {
13165
- const localName = getLocalName(key);
13166
- const axisType = AXIS_TYPE_MAP[localName];
13513
+ const localName2 = getLocalName(key);
13514
+ const axisType = AXIS_TYPE_MAP[localName2];
13167
13515
  if (!axisType) {
13168
13516
  continue;
13169
13517
  }
13170
- const axisNodes = xmlLookup.getChildrenArrayByLocalName(plotArea, localName);
13518
+ const axisNodes = xmlLookup.getChildrenArrayByLocalName(plotArea, localName2);
13171
13519
  for (const axisNode of axisNodes) {
13172
13520
  const axis = parseSingleAxis(axisNode, axisType, xmlLookup, colorParser);
13173
13521
  if (axis) {
@@ -13364,8 +13712,8 @@ function parseTxPr(txPrNode, xmlLookup, colorParser, target) {
13364
13712
  if (latin?.["@_typeface"]) {
13365
13713
  target.fontFamily = String(latin["@_typeface"]);
13366
13714
  }
13367
- const solidFill = xmlLookup.getChildByLocalName(defRPr, "solidFill");
13368
- const fontColor = colorParser.parseColor(solidFill);
13715
+ const solidFill2 = xmlLookup.getChildByLocalName(defRPr, "solidFill");
13716
+ const fontColor = colorParser.parseColor(solidFill2);
13369
13717
  if (fontColor) {
13370
13718
  target.fontColor = fontColor;
13371
13719
  }
@@ -13440,8 +13788,8 @@ var CONTAINER_LOCAL_NAME_TO_TYPE = {
13440
13788
  surfaceChart: "surface",
13441
13789
  surface3DChart: "surface"
13442
13790
  };
13443
- function chartContainerLocalNameToType(localName) {
13444
- return CONTAINER_LOCAL_NAME_TO_TYPE[localName];
13791
+ function chartContainerLocalNameToType(localName2) {
13792
+ return CONTAINER_LOCAL_NAME_TO_TYPE[localName2];
13445
13793
  }
13446
13794
 
13447
13795
  // src/core/utils/chart-cx-parser.ts
@@ -13450,11 +13798,11 @@ function extractCxSeriesColor(ser, xmlLookup) {
13450
13798
  if (!spPr) {
13451
13799
  return void 0;
13452
13800
  }
13453
- const solidFill = xmlLookup.getChildByLocalName(spPr, "solidFill");
13454
- if (!solidFill) {
13801
+ const solidFill2 = xmlLookup.getChildByLocalName(spPr, "solidFill");
13802
+ if (!solidFill2) {
13455
13803
  return void 0;
13456
13804
  }
13457
- const srgb = xmlLookup.getChildByLocalName(solidFill, "srgbClr");
13805
+ const srgb = xmlLookup.getChildByLocalName(solidFill2, "srgbClr");
13458
13806
  if (srgb) {
13459
13807
  const val = String(srgb["@_val"] || "").trim();
13460
13808
  if (val.length === 6) {
@@ -13662,18 +14010,18 @@ function parseWorksheetCells(xml) {
13662
14010
  }
13663
14011
  return cells;
13664
14012
  }
13665
- function findByLocalName2(obj, localName) {
14013
+ function findByLocalName2(obj, localName2) {
13666
14014
  for (const key of Object.keys(obj)) {
13667
14015
  const parts = key.split(":");
13668
14016
  const local = parts[parts.length - 1];
13669
- if (local === localName) {
14017
+ if (local === localName2) {
13670
14018
  return obj[key];
13671
14019
  }
13672
14020
  }
13673
14021
  return void 0;
13674
14022
  }
13675
- function getChildArray(parent, localName) {
13676
- const child = findByLocalName2(parent, localName);
14023
+ function getChildArray(parent, localName2) {
14024
+ const child = findByLocalName2(parent, localName2);
13677
14025
  if (!child) {
13678
14026
  return [];
13679
14027
  }
@@ -13685,8 +14033,8 @@ function getChildArray(parent, localName) {
13685
14033
  }
13686
14034
  return [];
13687
14035
  }
13688
- function getTextValue(parent, localName) {
13689
- const child = findByLocalName2(parent, localName);
14036
+ function getTextValue(parent, localName2) {
14037
+ const child = findByLocalName2(parent, localName2);
13690
14038
  if (child === void 0 || child === null) {
13691
14039
  return void 0;
13692
14040
  }
@@ -16152,8 +16500,8 @@ function createSimpleLookup() {
16152
16500
  return void 0;
16153
16501
  }
16154
16502
  for (const [key, value] of Object.entries(obj)) {
16155
- const localName = key.includes(":") ? key.split(":").pop() : key;
16156
- if (localName === name && value && typeof value === "object" && !Array.isArray(value)) {
16503
+ const localName2 = key.includes(":") ? key.split(":").pop() : key;
16504
+ if (localName2 === name && value && typeof value === "object" && !Array.isArray(value)) {
16157
16505
  return value;
16158
16506
  }
16159
16507
  }
@@ -16164,8 +16512,8 @@ function createSimpleLookup() {
16164
16512
  return [];
16165
16513
  }
16166
16514
  for (const [key, value] of Object.entries(obj)) {
16167
- const localName = key.includes(":") ? key.split(":").pop() : key;
16168
- if (localName === name) {
16515
+ const localName2 = key.includes(":") ? key.split(":").pop() : key;
16516
+ if (localName2 === name) {
16169
16517
  if (Array.isArray(value)) {
16170
16518
  return value.filter(
16171
16519
  (v) => v !== null && typeof v === "object"
@@ -17292,6 +17640,62 @@ function layoutRelationship(nodes, bounds, themeColorMap) {
17292
17640
  return elements;
17293
17641
  }
17294
17642
 
17643
+ // src/core/utils/smartart-node-style-apply.ts
17644
+ function styledContentNodes(nodes) {
17645
+ return getContentNodes(nodes);
17646
+ }
17647
+ function applyNodeStylesToElements(elements, nodes) {
17648
+ const contentNodes = styledContentNodes(nodes);
17649
+ if (contentNodes.length === 0) {
17650
+ return elements;
17651
+ }
17652
+ let shapeIndex = 0;
17653
+ return elements.map((element) => {
17654
+ if (element.type !== "shape") {
17655
+ return element;
17656
+ }
17657
+ const node = contentNodes[shapeIndex++];
17658
+ const style = node?.style;
17659
+ if (!style || Object.keys(style).length === 0) {
17660
+ return element;
17661
+ }
17662
+ const shapeStyle = { ...element.shapeStyle };
17663
+ if (style.fillColor !== void 0) {
17664
+ shapeStyle.fillColor = style.fillColor;
17665
+ shapeStyle.fillMode = "solid";
17666
+ }
17667
+ if (style.lineColor !== void 0) {
17668
+ shapeStyle.strokeColor = style.lineColor;
17669
+ }
17670
+ const baseTextStyle = element.textStyle ?? {};
17671
+ const textStyle = { ...baseTextStyle };
17672
+ if (style.fontColor !== void 0) {
17673
+ textStyle.color = style.fontColor;
17674
+ }
17675
+ if (style.bold !== void 0) {
17676
+ textStyle.bold = style.bold;
17677
+ }
17678
+ if (style.italic !== void 0) {
17679
+ textStyle.italic = style.italic;
17680
+ }
17681
+ const segments = element.textSegments?.map((seg) => ({
17682
+ ...seg,
17683
+ style: {
17684
+ ...seg.style,
17685
+ ...style.fontColor !== void 0 ? { color: style.fontColor } : {},
17686
+ ...style.bold !== void 0 ? { bold: style.bold } : {},
17687
+ ...style.italic !== void 0 ? { italic: style.italic } : {}
17688
+ }
17689
+ }));
17690
+ return {
17691
+ ...element,
17692
+ shapeStyle,
17693
+ textStyle,
17694
+ ...segments ? { textSegments: segments } : {}
17695
+ };
17696
+ });
17697
+ }
17698
+
17295
17699
  // src/core/utils/smartart-decompose.ts
17296
17700
  function quickStyleStrokeScale(quickStyle) {
17297
17701
  if (!quickStyle?.effectIntensity) {
@@ -17388,9 +17792,13 @@ function decomposeSmartArt(smartArtData, containerBounds, themeColorMap, layoutD
17388
17792
  if (namedLayout) {
17389
17793
  const namedResult = dispatchNamedLayout(namedLayout, nodes, containerBounds, effectiveThemeMap);
17390
17794
  if (namedResult) {
17391
- return namedResult;
17795
+ return applyNodeStylesToElements(namedResult, nodes);
17392
17796
  }
17393
17797
  }
17798
+ const algorithmic = dispatchLayoutByType(layoutType, nodes, containerBounds, effectiveThemeMap);
17799
+ return algorithmic ? applyNodeStylesToElements(algorithmic, nodes) : algorithmic;
17800
+ }
17801
+ function dispatchLayoutByType(layoutType, nodes, containerBounds, effectiveThemeMap) {
17394
17802
  switch (layoutType) {
17395
17803
  case "list":
17396
17804
  return layoutList(nodes, containerBounds, effectiveThemeMap);
@@ -17737,6 +18145,46 @@ function reorderSmartArtNodeToIndex(data, nodeId, newIndex) {
17737
18145
  };
17738
18146
  }
17739
18147
 
18148
+ // src/core/utils/smartart-editing-node-style.ts
18149
+ function mergeNodeStyle(current, patch) {
18150
+ const merged = { ...current };
18151
+ for (const key of Object.keys(patch)) {
18152
+ const value = patch[key];
18153
+ if (value === void 0) {
18154
+ delete merged[key];
18155
+ } else {
18156
+ merged[key] = value;
18157
+ }
18158
+ }
18159
+ return merged;
18160
+ }
18161
+ function setSmartArtNodeStyle(data, nodeId, style) {
18162
+ let matched = false;
18163
+ const nodes = data.nodes.map((node) => {
18164
+ if (node.id !== nodeId) {
18165
+ return node;
18166
+ }
18167
+ matched = true;
18168
+ const nextStyle = mergeNodeStyle(node.style, style);
18169
+ const hasStyle = Object.keys(nextStyle).length > 0;
18170
+ const updated = { ...node };
18171
+ if (hasStyle) {
18172
+ updated.style = nextStyle;
18173
+ } else {
18174
+ delete updated.style;
18175
+ }
18176
+ return updated;
18177
+ });
18178
+ if (!matched) {
18179
+ return data;
18180
+ }
18181
+ return {
18182
+ ...data,
18183
+ nodes,
18184
+ drawingShapes: void 0
18185
+ };
18186
+ }
18187
+
17740
18188
  // src/core/utils/smartart-editing-reflow-layouts-geometric.ts
17741
18189
  function reflowCycle(nodes, bounds) {
17742
18190
  const size = Math.min(bounds.width, bounds.height);
@@ -18309,14 +18757,14 @@ function resolveLayoutCategory(layoutType) {
18309
18757
  }
18310
18758
 
18311
18759
  // src/core/utils/encryption-detection.ts
18312
- var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
18760
+ var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
18313
18761
  var ZIP_MAGIC = new Uint8Array([80, 75]);
18314
18762
  function detectFileFormat(data) {
18315
18763
  if (data.byteLength < 8) {
18316
18764
  return { format: "unknown", encrypted: false };
18317
18765
  }
18318
18766
  const header = new Uint8Array(data, 0, 8);
18319
- if (OLE_MAGIC.every((byte, i) => header[i] === byte)) {
18767
+ if (OLE_MAGIC2.every((byte, i) => header[i] === byte)) {
18320
18768
  return { format: "ole", encrypted: true };
18321
18769
  }
18322
18770
  if (header[0] === ZIP_MAGIC[0] && header[1] === ZIP_MAGIC[1]) {
@@ -18332,207 +18780,6 @@ var EncryptedFileError = class extends Error {
18332
18780
  }
18333
18781
  };
18334
18782
 
18335
- // src/core/utils/ole2-parser-types.ts
18336
- var OLE_MAGIC2 = new Uint8Array([208, 207, 17, 224, 161, 27, 26, 225]);
18337
- var ENDOFCHAIN = 4294967294;
18338
- var FREESECT = 4294967295;
18339
- var FATSECT = 4294967293;
18340
- var MAXREGSECT = 4294967290;
18341
- var ENTRY_TYPE_EMPTY = 0;
18342
- var ENTRY_TYPE_STREAM = 2;
18343
- var ENTRY_TYPE_ROOT = 5;
18344
- var DIR_ENTRY_SIZE = 128;
18345
- var Ole2ParseError = class extends Error {
18346
- constructor(message) {
18347
- super(message);
18348
- this.name = "Ole2ParseError";
18349
- }
18350
- };
18351
-
18352
- // src/core/utils/ole2-parser-read.ts
18353
- function parseOle2(buffer) {
18354
- const data = new Uint8Array(buffer);
18355
- const view = new DataView(buffer);
18356
- for (let i = 0; i < OLE_MAGIC2.length; i++) {
18357
- if (data[i] !== OLE_MAGIC2[i]) {
18358
- throw new Ole2ParseError("Not a valid OLE2 compound file");
18359
- }
18360
- }
18361
- view.getUint16(24, true);
18362
- const majorVersion = view.getUint16(26, true);
18363
- const byteOrder = view.getUint16(28, true);
18364
- if (byteOrder !== 65534) {
18365
- throw new Ole2ParseError("Invalid byte order mark");
18366
- }
18367
- const sectorSizePower = view.getUint16(30, true);
18368
- const miniSectorSizePower = view.getUint16(32, true);
18369
- const sectorSize = 1 << sectorSizePower;
18370
- const miniSectorSize = 1 << miniSectorSizePower;
18371
- const totalFATSectors = view.getUint32(44, true);
18372
- const firstDirectorySector = view.getUint32(48, true);
18373
- const miniStreamCutoff = view.getUint32(56, true);
18374
- const firstMiniFATSector = view.getUint32(60, true);
18375
- const totalMiniFATSectors = view.getUint32(64, true);
18376
- const firstDIFATSector = view.getUint32(68, true);
18377
- const totalDIFATSectors = view.getUint32(72, true);
18378
- function sectorOffset(sector) {
18379
- return (sector + 1) * sectorSize;
18380
- }
18381
- function readSector(sector) {
18382
- const offset = sectorOffset(sector);
18383
- if (offset + sectorSize > data.length) {
18384
- throw new Ole2ParseError(
18385
- `Sector ${sector} at offset ${offset} exceeds file size ${data.length}`
18386
- );
18387
- }
18388
- return data.subarray(offset, offset + sectorSize);
18389
- }
18390
- const fatSectors = [];
18391
- for (let i = 0; i < 109 && fatSectors.length < totalFATSectors; i++) {
18392
- const sector = view.getUint32(76 + i * 4, true);
18393
- if (sector <= MAXREGSECT) {
18394
- fatSectors.push(sector);
18395
- }
18396
- }
18397
- let difatSector = firstDIFATSector;
18398
- for (let d = 0; d < totalDIFATSectors && difatSector <= MAXREGSECT; d++) {
18399
- const difatData = readSector(difatSector);
18400
- const difatView = new DataView(difatData.buffer, difatData.byteOffset, difatData.byteLength);
18401
- const entriesPerSector = (sectorSize - 4) / 4;
18402
- for (let i = 0; i < entriesPerSector && fatSectors.length < totalFATSectors; i++) {
18403
- const sector = difatView.getUint32(i * 4, true);
18404
- if (sector <= MAXREGSECT) {
18405
- fatSectors.push(sector);
18406
- }
18407
- }
18408
- difatSector = difatView.getUint32(sectorSize - 4, true);
18409
- }
18410
- const fatEntries = [];
18411
- for (const fatSector of fatSectors) {
18412
- const fatData = readSector(fatSector);
18413
- const fatView = new DataView(fatData.buffer, fatData.byteOffset, fatData.byteLength);
18414
- for (let i = 0; i < sectorSize / 4; i++) {
18415
- fatEntries.push(fatView.getUint32(i * 4, true));
18416
- }
18417
- }
18418
- function readSectorChain(startSector) {
18419
- const sectors = [];
18420
- let current = startSector;
18421
- const visited = /* @__PURE__ */ new Set();
18422
- while (current <= MAXREGSECT) {
18423
- if (visited.has(current)) {
18424
- throw new Ole2ParseError(`Circular reference in FAT chain at sector ${current}`);
18425
- }
18426
- visited.add(current);
18427
- sectors.push(readSector(current));
18428
- current = fatEntries[current] ?? ENDOFCHAIN;
18429
- }
18430
- const totalLength = sectors.length * sectorSize;
18431
- const result = new Uint8Array(totalLength);
18432
- let offset = 0;
18433
- for (const sector of sectors) {
18434
- result.set(sector, offset);
18435
- offset += sectorSize;
18436
- }
18437
- return result;
18438
- }
18439
- function readStream(startSector, size) {
18440
- const raw = readSectorChain(startSector);
18441
- return raw.subarray(0, Math.min(size, raw.length));
18442
- }
18443
- const miniFatEntries = [];
18444
- if (firstMiniFATSector <= MAXREGSECT && totalMiniFATSectors > 0) {
18445
- const miniFatRaw = readSectorChain(firstMiniFATSector);
18446
- const miniFatView = new DataView(
18447
- miniFatRaw.buffer,
18448
- miniFatRaw.byteOffset,
18449
- miniFatRaw.byteLength
18450
- );
18451
- for (let i = 0; i < miniFatRaw.length / 4; i++) {
18452
- miniFatEntries.push(miniFatView.getUint32(i * 4, true));
18453
- }
18454
- }
18455
- const dirRaw = readSectorChain(firstDirectorySector);
18456
- const numEntries = Math.floor(dirRaw.length / DIR_ENTRY_SIZE);
18457
- const entries = [];
18458
- for (let i = 0; i < numEntries; i++) {
18459
- const entryOffset = i * DIR_ENTRY_SIZE;
18460
- const entryView = new DataView(dirRaw.buffer, dirRaw.byteOffset + entryOffset, DIR_ENTRY_SIZE);
18461
- const nameLen = entryView.getUint16(64, true);
18462
- const objectType = entryView.getUint8(66);
18463
- if (objectType === ENTRY_TYPE_EMPTY) {
18464
- continue;
18465
- }
18466
- const nameBytes = Math.max(0, nameLen - 2);
18467
- let name = "";
18468
- for (let j = 0; j < nameBytes; j += 2) {
18469
- name += String.fromCharCode(entryView.getUint16(j, true));
18470
- }
18471
- const leftSiblingId = entryView.getUint32(68, true);
18472
- const rightSiblingId = entryView.getUint32(72, true);
18473
- const childId = entryView.getUint32(76, true);
18474
- const startSector = entryView.getUint32(116, true);
18475
- const sizeLow = entryView.getUint32(120, true);
18476
- let size = sizeLow;
18477
- if (majorVersion === 4) {
18478
- entryView.getUint32(124, true);
18479
- size = sizeLow;
18480
- }
18481
- entries.push({
18482
- name,
18483
- type: objectType,
18484
- startSector,
18485
- size,
18486
- childId: childId === 4294967295 ? -1 : childId,
18487
- leftSiblingId: leftSiblingId === 4294967295 ? -1 : leftSiblingId,
18488
- rightSiblingId: rightSiblingId === 4294967295 ? -1 : rightSiblingId
18489
- });
18490
- }
18491
- const rootEntry = entries.find((e) => e.type === ENTRY_TYPE_ROOT);
18492
- let miniStreamData;
18493
- if (rootEntry && rootEntry.startSector <= MAXREGSECT) {
18494
- miniStreamData = readSectorChain(rootEntry.startSector);
18495
- }
18496
- function readMiniStream(startSector, size) {
18497
- if (!miniStreamData) {
18498
- throw new Ole2ParseError("Mini stream container not found");
18499
- }
18500
- const sectors = [];
18501
- let current = startSector;
18502
- const visited = /* @__PURE__ */ new Set();
18503
- while (current <= MAXREGSECT) {
18504
- if (visited.has(current)) {
18505
- throw new Ole2ParseError(`Circular reference in mini FAT chain at sector ${current}`);
18506
- }
18507
- visited.add(current);
18508
- const offset2 = current * miniSectorSize;
18509
- sectors.push(miniStreamData.subarray(offset2, offset2 + miniSectorSize));
18510
- current = miniFatEntries[current] ?? ENDOFCHAIN;
18511
- }
18512
- const totalLength = sectors.length * miniSectorSize;
18513
- const result = new Uint8Array(totalLength);
18514
- let offset = 0;
18515
- for (const sector of sectors) {
18516
- result.set(sector, offset);
18517
- offset += miniSectorSize;
18518
- }
18519
- return result.subarray(0, Math.min(size, result.length));
18520
- }
18521
- function getStream(name) {
18522
- const entry = entries.find(
18523
- (e) => (e.type === ENTRY_TYPE_STREAM || e.type === ENTRY_TYPE_ROOT) && e.name === name
18524
- );
18525
- if (!entry) {
18526
- return void 0;
18527
- }
18528
- if (entry.size < miniStreamCutoff && entry.type !== ENTRY_TYPE_ROOT) {
18529
- return readMiniStream(entry.startSector, entry.size);
18530
- }
18531
- return readStream(entry.startSector, entry.size);
18532
- }
18533
- return { entries, getStream };
18534
- }
18535
-
18536
18783
  // src/core/utils/ole2-parser-write.ts
18537
18784
  function compareDirEntryNames(a, b) {
18538
18785
  if (a.length !== b.length) {
@@ -18579,7 +18826,7 @@ function writeInt32Sectors(outBytes, int32Data, firstSector, numSectors, sectorS
18579
18826
  }
18580
18827
  }
18581
18828
  function writeHeader(outView, outBytes, params) {
18582
- outBytes.set(OLE_MAGIC2, 0);
18829
+ outBytes.set(OLE_MAGIC, 0);
18583
18830
  outView.setUint16(24, 62, true);
18584
18831
  outView.setUint16(26, 3, true);
18585
18832
  outView.setUint16(28, 65534, true);
@@ -19750,18 +19997,18 @@ function extractTagAttribute(xml, tagName, attributeName) {
19750
19997
  const match = xml.match(pattern);
19751
19998
  return match?.groups?.["attributeValue"]?.trim();
19752
19999
  }
19753
- function extractFirstTagText(xml, localName) {
20000
+ function extractFirstTagText(xml, localName2) {
19754
20001
  const pattern = new RegExp(
19755
- `<([\\w.-]+:)?${localName}\\b[^>]*>([\\s\\S]*?)<\\/([\\w.-]+:)?${localName}>`,
20002
+ `<([\\w.-]+:)?${localName2}\\b[^>]*>([\\s\\S]*?)<\\/([\\w.-]+:)?${localName2}>`,
19756
20003
  "i"
19757
20004
  );
19758
20005
  const match = xml.match(pattern);
19759
20006
  return match?.[2]?.replace(/\s+/g, "").trim() || void 0;
19760
20007
  }
19761
- function extractAllTagText(xml, localName) {
20008
+ function extractAllTagText(xml, localName2) {
19762
20009
  const result = [];
19763
20010
  const regex = new RegExp(
19764
- `<([\\w.-]+:)?${localName}\\b[^>]*>([\\s\\S]*?)<\\/([\\w.-]+:)?${localName}>`,
20011
+ `<([\\w.-]+:)?${localName2}\\b[^>]*>([\\s\\S]*?)<\\/([\\w.-]+:)?${localName2}>`,
19765
20012
  "gi"
19766
20013
  );
19767
20014
  let match = regex.exec(xml);
@@ -26394,8 +26641,8 @@ var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
26394
26641
  return void 0;
26395
26642
  }
26396
26643
  const fillNode = tblBg["a:fill"];
26397
- const solidFill = fillNode?.["a:solidFill"] ?? tblBg["a:solidFill"];
26398
- const schemeClr = solidFill?.["a:schemeClr"];
26644
+ const solidFill2 = fillNode?.["a:solidFill"] ?? tblBg["a:solidFill"];
26645
+ const schemeClr = solidFill2?.["a:schemeClr"];
26399
26646
  const schemeColor = schemeClr ? String(schemeClr["@_val"] || "").trim() || void 0 : void 0;
26400
26647
  const fill = schemeColor ? { schemeColor } : void 0;
26401
26648
  const hasEffectLst = Boolean(tblBg["a:effectLst"]);
@@ -26423,11 +26670,11 @@ var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
26423
26670
  if (!fill) {
26424
26671
  return void 0;
26425
26672
  }
26426
- const solidFill = fill["a:solidFill"];
26427
- if (!solidFill) {
26673
+ const solidFill2 = fill["a:solidFill"];
26674
+ if (!solidFill2) {
26428
26675
  return void 0;
26429
26676
  }
26430
- const schemeClr = solidFill["a:schemeClr"];
26677
+ const schemeClr = solidFill2["a:schemeClr"];
26431
26678
  if (!schemeClr) {
26432
26679
  return void 0;
26433
26680
  }
@@ -30706,10 +30953,10 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
30706
30953
  if (csTypeface) {
30707
30954
  style.complexScriptFont = csTypeface;
30708
30955
  }
30709
- const solidFill = xmlChild(runProperties, "a:solidFill");
30710
- if (solidFill) {
30711
- style.color = this.parseColor(solidFill);
30712
- const colorXml = extractColorChoiceXml(solidFill);
30956
+ const solidFill2 = xmlChild(runProperties, "a:solidFill");
30957
+ if (solidFill2) {
30958
+ style.color = this.parseColor(solidFill2);
30959
+ const colorXml = extractColorChoiceXml(solidFill2);
30713
30960
  if (colorXml) {
30714
30961
  style.colorXml = colorXml;
30715
30962
  }
@@ -31674,13 +31921,13 @@ function serializeTablePropertyFlags(tbl, tableData) {
31674
31921
  }
31675
31922
  tbl["a:tblPr"] = tblPr;
31676
31923
  }
31677
- function replaceFirstTextValueInTree(node, localName, newValue, getXmlLocalName) {
31924
+ function replaceFirstTextValueInTree(node, localName2, newValue, getXmlLocalName) {
31678
31925
  if (node === null || node === void 0) {
31679
31926
  return false;
31680
31927
  }
31681
31928
  if (Array.isArray(node)) {
31682
31929
  for (const entry of node) {
31683
- if (replaceFirstTextValueInTree(entry, localName, newValue, getXmlLocalName)) {
31930
+ if (replaceFirstTextValueInTree(entry, localName2, newValue, getXmlLocalName)) {
31684
31931
  return true;
31685
31932
  }
31686
31933
  }
@@ -31691,13 +31938,13 @@ function replaceFirstTextValueInTree(node, localName, newValue, getXmlLocalName)
31691
31938
  }
31692
31939
  const objectNode = node;
31693
31940
  for (const [key, value] of Object.entries(objectNode)) {
31694
- if (getXmlLocalName(key) === localName) {
31941
+ if (getXmlLocalName(key) === localName2) {
31695
31942
  if (typeof value === "string" || typeof value === "number") {
31696
31943
  objectNode[key] = newValue;
31697
31944
  return true;
31698
31945
  }
31699
31946
  }
31700
- if (replaceFirstTextValueInTree(value, localName, newValue, getXmlLocalName)) {
31947
+ if (replaceFirstTextValueInTree(value, localName2, newValue, getXmlLocalName)) {
31701
31948
  return true;
31702
31949
  }
31703
31950
  }
@@ -32785,10 +33032,10 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
32785
33032
  * Upsert a `c:<localName>` child with `@_val` on an axis or scaling node.
32786
33033
  * When `value` is undefined, removes any existing child of that local name.
32787
33034
  */
32788
- upsertChartAxisChild(parent, localName, value) {
33035
+ upsertChartAxisChild(parent, localName2, value) {
32789
33036
  upsertChartAxisChild(
32790
33037
  parent,
32791
- localName,
33038
+ localName2,
32792
33039
  value,
32793
33040
  (key) => this.compatibilityService.getXmlLocalName(key)
32794
33041
  );
@@ -32822,10 +33069,10 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
32822
33069
  cacheNode[ptKey] = buildChartPoints(values);
32823
33070
  }
32824
33071
  /** Replace the first text value found deep in the node tree. */
32825
- replaceFirstTextValue(node, localName, newValue) {
33072
+ replaceFirstTextValue(node, localName2, newValue) {
32826
33073
  return replaceFirstTextValueInTree(
32827
33074
  node,
32828
- localName,
33075
+ localName2,
32829
33076
  newValue,
32830
33077
  (key) => this.compatibilityService.getXmlLocalName(key)
32831
33078
  );
@@ -32837,10 +33084,10 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
32837
33084
  * Upsert a `c:<localName>` child carrying only an `@_val` attribute on
32838
33085
  * `parent`. When `value` is `undefined` the existing child is removed.
32839
33086
  */
32840
- upsertValChild(parent, localName, value) {
32841
- const existing = this.xmlLookupService.getChildByLocalName(parent, localName);
33087
+ upsertValChild(parent, localName2, value) {
33088
+ const existing = this.xmlLookupService.getChildByLocalName(parent, localName2);
32842
33089
  const existingKey = Object.keys(parent).find(
32843
- (k) => this.compatibilityService.getXmlLocalName(k) === localName
33090
+ (k) => this.compatibilityService.getXmlLocalName(k) === localName2
32844
33091
  );
32845
33092
  if (value === void 0) {
32846
33093
  if (existingKey) {
@@ -32851,7 +33098,7 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
32851
33098
  if (existing && existingKey) {
32852
33099
  parent[existingKey] = { ...existing, "@_val": value };
32853
33100
  } else {
32854
- parent[`c:${localName}`] = { "@_val": value };
33101
+ parent[`c:${localName2}`] = { "@_val": value };
32855
33102
  }
32856
33103
  }
32857
33104
  /**
@@ -33171,27 +33418,27 @@ function applySmartArtChrome(dataModel, chrome, getLocalName) {
33171
33418
  if (!chrome || !chrome.backgroundColor && !chrome.outlineColor && (chrome.outlineWidth === null || chrome.outlineWidth === void 0)) {
33172
33419
  return;
33173
33420
  }
33174
- const findKey12 = (obj, name) => Object.keys(obj).find((k) => getLocalName(k) === name);
33421
+ const findKey13 = (obj, name) => Object.keys(obj).find((k) => getLocalName(k) === name);
33175
33422
  if (chrome.backgroundColor) {
33176
33423
  const hex8 = chrome.backgroundColor.replace("#", "");
33177
- const bgKey = findKey12(dataModel, "bg") ?? "dgm:bg";
33424
+ const bgKey = findKey13(dataModel, "bg") ?? "dgm:bg";
33178
33425
  const bg = asObject2(dataModel[bgKey]);
33179
- const fillKey = findKey12(bg, "solidFill") ?? "a:solidFill";
33426
+ const fillKey = findKey13(bg, "solidFill") ?? "a:solidFill";
33180
33427
  bg[fillKey] = { "a:srgbClr": { "@_val": hex8 } };
33181
33428
  dataModel[bgKey] = bg;
33182
33429
  }
33183
33430
  const hasOutlineWidth = chrome.outlineWidth !== null && chrome.outlineWidth !== void 0;
33184
33431
  if (chrome.outlineColor || hasOutlineWidth) {
33185
- const wholeKey = findKey12(dataModel, "whole") ?? "dgm:whole";
33432
+ const wholeKey = findKey13(dataModel, "whole") ?? "dgm:whole";
33186
33433
  const whole = asObject2(dataModel[wholeKey]);
33187
- const lnKey = findKey12(whole, "ln") ?? "a:ln";
33434
+ const lnKey = findKey13(whole, "ln") ?? "a:ln";
33188
33435
  const ln = asObject2(whole[lnKey]);
33189
33436
  if (hasOutlineWidth) {
33190
33437
  ln["@_w"] = String(Math.round(chrome.outlineWidth * 12700));
33191
33438
  }
33192
33439
  if (chrome.outlineColor) {
33193
33440
  const hex8 = chrome.outlineColor.replace("#", "");
33194
- const fillKey = findKey12(ln, "solidFill") ?? "a:solidFill";
33441
+ const fillKey = findKey13(ln, "solidFill") ?? "a:solidFill";
33195
33442
  ln[fillKey] = { "a:srgbClr": { "@_val": hex8 } };
33196
33443
  }
33197
33444
  whole[lnKey] = ln;
@@ -33199,6 +33446,102 @@ function applySmartArtChrome(dataModel, chrome, getLocalName) {
33199
33446
  }
33200
33447
  }
33201
33448
 
33449
+ // src/core/core/runtime/smartart-style-xml.ts
33450
+ function localName(key) {
33451
+ const idx = key.indexOf(":");
33452
+ return idx >= 0 ? key.slice(idx + 1) : key;
33453
+ }
33454
+ function findKey12(obj, local) {
33455
+ return Object.keys(obj).find((k) => localName(k) === local);
33456
+ }
33457
+ function ensureChild(obj, local, prefixedFallback) {
33458
+ const key = findKey12(obj, local) ?? prefixedFallback;
33459
+ const existing = obj[key];
33460
+ if (existing && typeof existing === "object" && !Array.isArray(existing)) {
33461
+ return existing;
33462
+ }
33463
+ const created = {};
33464
+ obj[key] = created;
33465
+ return created;
33466
+ }
33467
+ function hexValue(color) {
33468
+ return color.replace(/^#/u, "").toUpperCase();
33469
+ }
33470
+ function solidFill(color) {
33471
+ return { "a:srgbClr": { "@_val": hexValue(color) } };
33472
+ }
33473
+ function setSolidFill(parent, color) {
33474
+ const key = findKey12(parent, "solidFill") ?? "a:solidFill";
33475
+ parent[key] = solidFill(color);
33476
+ }
33477
+ function applyShapeStyle(pt2, style) {
33478
+ if (style.fillColor === void 0 && style.lineColor === void 0) {
33479
+ return;
33480
+ }
33481
+ const spPr = ensureChild(pt2, "spPr", "dgm:spPr");
33482
+ if (style.fillColor !== void 0) {
33483
+ setSolidFill(spPr, style.fillColor);
33484
+ }
33485
+ if (style.lineColor !== void 0) {
33486
+ const ln = ensureChild(spPr, "ln", "a:ln");
33487
+ setSolidFill(ln, style.lineColor);
33488
+ }
33489
+ }
33490
+ function ensureFirstRunRPr(pt2) {
33491
+ const tKey = findKey12(pt2, "t");
33492
+ if (!tKey) {
33493
+ return void 0;
33494
+ }
33495
+ const body = pt2[tKey];
33496
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
33497
+ return void 0;
33498
+ }
33499
+ const pKey = findKey12(body, "p");
33500
+ if (!pKey) {
33501
+ return void 0;
33502
+ }
33503
+ const paragraph = body[pKey];
33504
+ const firstP = Array.isArray(paragraph) ? paragraph[0] : paragraph;
33505
+ if (!firstP || typeof firstP !== "object") {
33506
+ return void 0;
33507
+ }
33508
+ const rKey = findKey12(firstP, "r");
33509
+ if (!rKey) {
33510
+ return void 0;
33511
+ }
33512
+ const run = firstP[rKey];
33513
+ const firstR = Array.isArray(run) ? run[0] : run;
33514
+ if (!firstR || typeof firstR !== "object") {
33515
+ return void 0;
33516
+ }
33517
+ return ensureChild(firstR, "rPr", "a:rPr");
33518
+ }
33519
+ function applyRunStyle(pt2, style) {
33520
+ if (style.bold === void 0 && style.italic === void 0 && style.fontColor === void 0) {
33521
+ return;
33522
+ }
33523
+ const rPr = ensureFirstRunRPr(pt2);
33524
+ if (!rPr) {
33525
+ return;
33526
+ }
33527
+ if (style.bold !== void 0) {
33528
+ rPr["@_b"] = style.bold ? "1" : "0";
33529
+ }
33530
+ if (style.italic !== void 0) {
33531
+ rPr["@_i"] = style.italic ? "1" : "0";
33532
+ }
33533
+ if (style.fontColor !== void 0) {
33534
+ setSolidFill(rPr, style.fontColor);
33535
+ }
33536
+ }
33537
+ function applySmartArtNodeStyleToPoint(pt2, style) {
33538
+ if (!style || Object.keys(style).length === 0) {
33539
+ return;
33540
+ }
33541
+ applyShapeStyle(pt2, style);
33542
+ applyRunStyle(pt2, style);
33543
+ }
33544
+
33202
33545
  // src/core/core/runtime/smartart-xml-builders.ts
33203
33546
  var NON_CONTENT_POINT_TYPES = /* @__PURE__ */ new Set([
33204
33547
  "doc",
@@ -33338,6 +33681,7 @@ function mergeSmartArtPointXml(existingPts, nodes) {
33338
33681
  continue;
33339
33682
  }
33340
33683
  applyTextToExistingPoint(pt2, desired);
33684
+ applySmartArtNodeStyleToPoint(pt2, desired.style);
33341
33685
  seenContentIds.add(modelId);
33342
33686
  merged.push(pt2);
33343
33687
  }
@@ -33351,6 +33695,7 @@ function mergeSmartArtPointXml(existingPts, nodes) {
33351
33695
  ptNode["@_type"] = node.nodeType;
33352
33696
  }
33353
33697
  ptNode["dgm:t"] = shouldRebuildFromRuns(node) ? buildPointFromRuns(node.runs) : buildPointText(node.text);
33698
+ applySmartArtNodeStyleToPoint(ptNode, node.style);
33354
33699
  merged.push(ptNode);
33355
33700
  }
33356
33701
  return merged;
@@ -34324,8 +34669,8 @@ var PptxHandlerRuntime27 = class extends PptxHandlerRuntime26 {
34324
34669
  }
34325
34670
  const obj = node;
34326
34671
  for (const [key, value] of Object.entries(obj)) {
34327
- const localName = this.compatibilityService.getXmlLocalName(key);
34328
- if (localName === "extLst" && value && typeof value === "object") {
34672
+ const localName2 = this.compatibilityService.getXmlLocalName(key);
34673
+ if (localName2 === "extLst" && value && typeof value === "object") {
34329
34674
  const extLst = value;
34330
34675
  for (const extKey of Object.keys(extLst)) {
34331
34676
  const extLocalName = this.compatibilityService.getXmlLocalName(extKey);
@@ -36541,9 +36886,9 @@ function applyTableStyleEntryToNode(styleNode, entry) {
36541
36886
  }
36542
36887
  function applyFillToSection(styleNode, sectionKey, fill) {
36543
36888
  const section = ensureSection(styleNode, sectionKey);
36544
- const tcStyle = ensureChild(section, "a:tcStyle");
36545
- const fillNode = ensureChild(tcStyle, "a:fill");
36546
- const solidFill = ensureChild(fillNode, "a:solidFill");
36889
+ const tcStyle = ensureChild2(section, "a:tcStyle");
36890
+ const fillNode = ensureChild2(tcStyle, "a:fill");
36891
+ const solidFill2 = ensureChild2(fillNode, "a:solidFill");
36547
36892
  const schemeClr = { "@_val": fill.schemeColor };
36548
36893
  if (fill.tint !== void 0) {
36549
36894
  schemeClr["a:tint"] = { "@_val": String(fill.tint) };
@@ -36551,14 +36896,14 @@ function applyFillToSection(styleNode, sectionKey, fill) {
36551
36896
  if (fill.shade !== void 0) {
36552
36897
  schemeClr["a:shade"] = { "@_val": String(fill.shade) };
36553
36898
  }
36554
- for (const key of Object.keys(solidFill)) {
36555
- delete solidFill[key];
36899
+ for (const key of Object.keys(solidFill2)) {
36900
+ delete solidFill2[key];
36556
36901
  }
36557
- solidFill["a:schemeClr"] = schemeClr;
36902
+ solidFill2["a:schemeClr"] = schemeClr;
36558
36903
  }
36559
36904
  function applyTextToSection(styleNode, sectionKey, text) {
36560
36905
  const section = ensureSection(styleNode, sectionKey);
36561
- const tcTxStyle = ensureChild(section, "a:tcTxStyle");
36906
+ const tcTxStyle = ensureChild2(section, "a:tcTxStyle");
36562
36907
  if (text.bold !== void 0) {
36563
36908
  if (text.bold) {
36564
36909
  tcTxStyle["@_b"] = "on";
@@ -36598,7 +36943,7 @@ function ensureSection(styleNode, sectionKey) {
36598
36943
  styleNode[sectionKey] = created;
36599
36944
  return created;
36600
36945
  }
36601
- function ensureChild(parent, key) {
36946
+ function ensureChild2(parent, key) {
36602
36947
  const existing = parent[key];
36603
36948
  if (Array.isArray(existing) && existing.length > 0) {
36604
36949
  return existing[0];
@@ -40356,9 +40701,9 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
40356
40701
  }
40357
40702
  const bgPr = xmlChild(bg, "p:bgPr");
40358
40703
  if (bgPr) {
40359
- const solidFill = xmlChild(bgPr, "a:solidFill");
40360
- if (solidFill) {
40361
- return this.parseColor(solidFill);
40704
+ const solidFill2 = xmlChild(bgPr, "a:solidFill");
40705
+ if (solidFill2) {
40706
+ return this.parseColor(solidFill2);
40362
40707
  }
40363
40708
  const pattFill = xmlChild(bgPr, "a:pattFill");
40364
40709
  if (pattFill) {
@@ -40401,9 +40746,9 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
40401
40746
  if (idx === 0) {
40402
40747
  return void 0;
40403
40748
  }
40404
- const solidFill = xmlChild(bgRef, "a:solidFill");
40405
- if (solidFill) {
40406
- return this.parseColor(solidFill);
40749
+ const solidFill2 = xmlChild(bgRef, "a:solidFill");
40750
+ if (solidFill2) {
40751
+ return this.parseColor(solidFill2);
40407
40752
  }
40408
40753
  const overrideColor = this.parseColor(bgRef);
40409
40754
  if (this.themeFormatScheme) {
@@ -43222,7 +43567,7 @@ var PptxHandlerRuntime68 = class extends PptxHandlerRuntime67 {
43222
43567
  partPath
43223
43568
  };
43224
43569
  }
43225
- collectLocalTextValues(node, localName, output) {
43570
+ collectLocalTextValues(node, localName2, output) {
43226
43571
  const MAX_NODES = 1e6;
43227
43572
  const stack = [node];
43228
43573
  let visited = 0;
@@ -43245,7 +43590,7 @@ var PptxHandlerRuntime68 = class extends PptxHandlerRuntime67 {
43245
43590
  }
43246
43591
  const objectNode = current;
43247
43592
  for (const [key, value] of Object.entries(objectNode)) {
43248
- if (this.compatibilityService.getXmlLocalName(key) === localName) {
43593
+ if (this.compatibilityService.getXmlLocalName(key) === localName2) {
43249
43594
  if (typeof value === "string" || typeof value === "number") {
43250
43595
  const textValue = String(value).trim();
43251
43596
  if (textValue.length > 0) {
@@ -43299,6 +43644,71 @@ var PptxHandlerRuntime68 = class extends PptxHandlerRuntime67 {
43299
43644
  }
43300
43645
  return runs.length > 0 ? runs : void 0;
43301
43646
  }
43647
+ /**
43648
+ * Extract a content point's per-node visual override.
43649
+ *
43650
+ * Reads the point's presentation `spPr` solid fill and line colour, and the
43651
+ * first run's `rPr` bold / italic / solid fill, into a
43652
+ * {@link PptxSmartArtNodeStyle}. Every field is optional and only set when
43653
+ * present, so an unstyled point yields `undefined` (never throws on missing
43654
+ * structure). This lets the editing UI display the node's current colours.
43655
+ */
43656
+ extractSmartArtNodeStyle(point) {
43657
+ const style = {};
43658
+ const spPr = this.xmlLookupService.getChildByLocalName(point, "spPr");
43659
+ if (spPr) {
43660
+ const fill = this.parseColor(this.xmlLookupService.getChildByLocalName(spPr, "solidFill"));
43661
+ if (fill) {
43662
+ style.fillColor = fill;
43663
+ }
43664
+ const ln = this.xmlLookupService.getChildByLocalName(spPr, "ln");
43665
+ if (ln) {
43666
+ const lineColor = this.parseColor(
43667
+ this.xmlLookupService.getChildByLocalName(ln, "solidFill")
43668
+ );
43669
+ if (lineColor) {
43670
+ style.lineColor = lineColor;
43671
+ }
43672
+ }
43673
+ }
43674
+ const rPr = this.firstRunProperties(point);
43675
+ if (rPr) {
43676
+ if (this.xmlBoolean(rPr["@_b"])) {
43677
+ style.bold = true;
43678
+ }
43679
+ if (this.xmlBoolean(rPr["@_i"])) {
43680
+ style.italic = true;
43681
+ }
43682
+ const fontColor = this.parseColor(
43683
+ this.xmlLookupService.getChildByLocalName(rPr, "solidFill")
43684
+ );
43685
+ if (fontColor) {
43686
+ style.fontColor = fontColor;
43687
+ }
43688
+ }
43689
+ return Object.keys(style).length > 0 ? style : void 0;
43690
+ }
43691
+ /** Read the first run's `rPr` of a content point's first paragraph. */
43692
+ firstRunProperties(point) {
43693
+ const tBody = this.xmlLookupService.getChildByLocalName(point, "t");
43694
+ if (!tBody) {
43695
+ return void 0;
43696
+ }
43697
+ const paragraph = this.xmlLookupService.getChildrenArrayByLocalName(tBody, "p")[0];
43698
+ if (!paragraph) {
43699
+ return void 0;
43700
+ }
43701
+ const run = this.xmlLookupService.getChildrenArrayByLocalName(paragraph, "r")[0];
43702
+ if (!run) {
43703
+ return void 0;
43704
+ }
43705
+ return this.xmlLookupService.getChildByLocalName(run, "rPr");
43706
+ }
43707
+ /** Interpret an OOXML boolean attribute ("1"/"true"/"on" => true). */
43708
+ xmlBoolean(value) {
43709
+ const v = String(value ?? "").trim().toLowerCase();
43710
+ return v === "1" || v === "true" || v === "on";
43711
+ }
43302
43712
  /**
43303
43713
  * Parse background and outline chrome from `dgm:bg` and `dgm:whole`.
43304
43714
  */
@@ -43313,8 +43723,8 @@ var PptxHandlerRuntime68 = class extends PptxHandlerRuntime67 {
43313
43723
  }
43314
43724
  const chrome = {};
43315
43725
  if (bg) {
43316
- const solidFill = this.xmlLookupService.getChildByLocalName(bg, "solidFill");
43317
- const bgColor = this.parseColor(solidFill);
43726
+ const solidFill2 = this.xmlLookupService.getChildByLocalName(bg, "solidFill");
43727
+ const bgColor = this.parseColor(solidFill2);
43318
43728
  if (bgColor) {
43319
43729
  chrome.backgroundColor = bgColor;
43320
43730
  }
@@ -43322,8 +43732,8 @@ var PptxHandlerRuntime68 = class extends PptxHandlerRuntime67 {
43322
43732
  if (whole) {
43323
43733
  const lnNode = this.xmlLookupService.getChildByLocalName(whole, "ln");
43324
43734
  if (lnNode) {
43325
- const solidFill = this.xmlLookupService.getChildByLocalName(lnNode, "solidFill");
43326
- const outlineColor = this.parseColor(solidFill);
43735
+ const solidFill2 = this.xmlLookupService.getChildByLocalName(lnNode, "solidFill");
43736
+ const outlineColor = this.parseColor(solidFill2);
43327
43737
  if (outlineColor) {
43328
43738
  chrome.outlineColor = outlineColor;
43329
43739
  }
@@ -43498,8 +43908,8 @@ var PptxHandlerRuntime69 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
43498
43908
  const skewY = xfrm?.["@_skewY"] ? parseInt(String(xfrm["@_skewY"]), 10) / 6e4 : void 0;
43499
43909
  const prstGeom = this.xmlLookupService.getChildByLocalName(spPr, "prstGeom");
43500
43910
  const shapeType = prstGeom ? String(prstGeom["@_prst"] || "rect") : "rect";
43501
- const solidFill = this.xmlLookupService.getChildByLocalName(spPr, "solidFill");
43502
- const fillColor = this.parseColor(solidFill);
43911
+ const solidFill2 = this.xmlLookupService.getChildByLocalName(spPr, "solidFill");
43912
+ const fillColor = this.parseColor(solidFill2);
43503
43913
  const lnNode = this.xmlLookupService.getChildByLocalName(spPr, "ln");
43504
43914
  const lnFill = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "solidFill") : void 0;
43505
43915
  const strokeColor = this.parseColor(lnFill);
@@ -43603,12 +44013,14 @@ var PptxHandlerRuntime70 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
43603
44013
  return null;
43604
44014
  }
43605
44015
  const runs = this.extractSmartArtNodeRuns(point);
44016
+ const style = this.extractSmartArtNodeStyle(point);
43606
44017
  return {
43607
44018
  id: pointId,
43608
44019
  text: resolvedText.trim(),
43609
44020
  parentId: parentByNodeId.get(pointId),
43610
44021
  nodeType,
43611
- runs
44022
+ runs,
44023
+ style
43612
44024
  };
43613
44025
  }).filter((entry) => Boolean(entry)).slice(0, MAX_SMARTART_NODES);
43614
44026
  if (nodes.length === 0) {
@@ -43773,10 +44185,10 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
43773
44185
  };
43774
44186
  const matchedKeys = [];
43775
44187
  for (const key of Object.keys(plotArea)) {
43776
- const localName = this.compatibilityService.getXmlLocalName(key);
43777
- const mapped = chartElementMap[localName];
44188
+ const localName2 = this.compatibilityService.getXmlLocalName(key);
44189
+ const mapped = chartElementMap[localName2];
43778
44190
  if (mapped) {
43779
- matchedKeys.push(localName);
44191
+ matchedKeys.push(localName2);
43780
44192
  }
43781
44193
  }
43782
44194
  if (matchedKeys.length >= 2) {
@@ -43786,8 +44198,8 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
43786
44198
  return chartElementMap[matchedKeys[0]];
43787
44199
  }
43788
44200
  for (const key of Object.keys(plotArea)) {
43789
- const localName = this.compatibilityService.getXmlLocalName(key);
43790
- if (localName === "plotAreaRegion" || localName === "plotSurface") {
44201
+ const localName2 = this.compatibilityService.getXmlLocalName(key);
44202
+ if (localName2 === "plotAreaRegion" || localName2 === "plotSurface") {
43791
44203
  const seriesArr = this.xmlLookupService.getChildrenArrayByLocalName(
43792
44204
  plotArea[key],
43793
44205
  "series"
@@ -44314,8 +44726,8 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
44314
44726
  if (key.startsWith("@_")) {
44315
44727
  continue;
44316
44728
  }
44317
- const localName = this.compatibilityService.getXmlLocalName(key);
44318
- if (localName === "schemeClr") {
44729
+ const localName2 = this.compatibilityService.getXmlLocalName(key);
44730
+ if (localName2 === "schemeClr") {
44319
44731
  const items = Array.isArray(value) ? value : [value];
44320
44732
  for (const item of items) {
44321
44733
  const resolved = this.resolveChartSchemeColor(item);
@@ -44323,7 +44735,7 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
44323
44735
  output.push(resolved);
44324
44736
  }
44325
44737
  }
44326
- } else if (localName === "srgbClr") {
44738
+ } else if (localName2 === "srgbClr") {
44327
44739
  const items = Array.isArray(value) ? value : [value];
44328
44740
  for (const item of items) {
44329
44741
  const hex8 = String(
@@ -45126,6 +45538,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
45126
45538
  };
45127
45539
 
45128
45540
  // src/core/core/runtime/PptxHandlerRuntimeLoadSession.ts
45541
+ var MAX_OLE_EMBEDDING_BYTES = 25 * 1024 * 1024;
45129
45542
  var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime77 {
45130
45543
  isZipContainer(data) {
45131
45544
  const bytes = new Uint8Array(data);
@@ -45345,6 +45758,59 @@ var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime7
45345
45758
  orderedSections
45346
45759
  };
45347
45760
  }
45761
+ /**
45762
+ * Recover and attach the real embedded binary for each OLE element on a
45763
+ * slide so callers can download / open the inner file.
45764
+ *
45765
+ * For each embedded (non-linked) OLE object: resolve its relationship
45766
+ * target to a zip path (same resolution as images), read the bytes, unwrap
45767
+ * a generic "Package" wrapper (recovering the original file name) when
45768
+ * present, derive a MIME type, and expose the payload as a data-URL on the
45769
+ * element. Linked objects, missing targets, oversized payloads, and parse
45770
+ * failures are skipped silently so existing behaviour is preserved.
45771
+ */
45772
+ async enrichOleElementsWithEmbeddedData(elements, slidePath, depth = 0) {
45773
+ const MAX_OLE_DEPTH = 32;
45774
+ if (depth > MAX_OLE_DEPTH) {
45775
+ return;
45776
+ }
45777
+ for (const el of elements) {
45778
+ if (el.type === "group" && el.children) {
45779
+ await this.enrichOleElementsWithEmbeddedData(el.children, slidePath, depth + 1);
45780
+ continue;
45781
+ }
45782
+ if (el.type !== "ole" || el.isLinked || !el.oleTarget) {
45783
+ continue;
45784
+ }
45785
+ try {
45786
+ const embeddingPath = this.resolveImagePath(slidePath, el.oleTarget);
45787
+ if (!embeddingPath) {
45788
+ continue;
45789
+ }
45790
+ const file = this.zip.file(embeddingPath);
45791
+ if (!file) {
45792
+ continue;
45793
+ }
45794
+ const buffer = await file.async("arraybuffer");
45795
+ if (buffer.byteLength === 0 || buffer.byteLength > MAX_OLE_EMBEDDING_BYTES) {
45796
+ continue;
45797
+ }
45798
+ const unwrapped = unwrapOleEmbedding(new Uint8Array(buffer));
45799
+ if (unwrapped.data.length === 0) {
45800
+ continue;
45801
+ }
45802
+ const fileName = unwrapped.fileName ?? el.fileName ?? (el.oleName && el.oleFileExtension ? `${el.oleName}.${el.oleFileExtension}` : void 0);
45803
+ const mimeType = mimeTypeForOleFile(fileName ?? `x.${el.oleFileExtension ?? "bin"}`);
45804
+ el.oleEmbeddedData = oleBytesToDataUrl(unwrapped.data, mimeType);
45805
+ el.oleEmbeddedByteSize = unwrapped.data.length;
45806
+ el.oleEmbeddedMimeType = mimeType;
45807
+ if (fileName) {
45808
+ el.oleEmbeddedFileName = fileName;
45809
+ }
45810
+ } catch {
45811
+ }
45812
+ }
45813
+ }
45348
45814
  async loadSlidesForPresentation(sectionBySlideId) {
45349
45815
  if (!this.presentationData) {
45350
45816
  return [];
@@ -45372,6 +45838,7 @@ var PptxHandlerRuntime78 = class _PptxHandlerRuntime extends PptxHandlerRuntime7
45372
45838
  parseSlide: (slideXml2, slidePath) => this.parseSlide(slideXml2, slidePath),
45373
45839
  extractMediaTimingMap: (slideXml2, slidePath) => this.extractMediaTimingMap(slideXml2, slidePath),
45374
45840
  enrichMediaElementsWithTiming: (elements, timingMap) => this.enrichMediaElementsWithTiming(elements, timingMap),
45841
+ enrichOleElementsWithEmbeddedData: (elements, slidePath) => this.enrichOleElementsWithEmbeddedData(elements, slidePath),
45375
45842
  extractBackgroundColor: (slideXml2) => this.extractBackgroundColor(slideXml2),
45376
45843
  getLayoutBackgroundColor: (slidePath) => this.getLayoutBackgroundColor(slidePath),
45377
45844
  extractBackgroundGradient: (slideXml2) => this.extractBackgroundGradient(slideXml2),
@@ -63469,4 +63936,4 @@ var SvgExporter = class _SvgExporter {
63469
63936
  * `<p:extLst>` (optional)
63470
63937
  */
63471
63938
 
63472
- export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL2 as EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime81 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTableCellTextAndStyle, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, ooxmlArcToSvg, ooxmlToPresetName, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseChart3DSurfaces, parseChartAxes, parseCondition, parseConditionList, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSvgPath, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeSvgPath, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, shouldRenderFallbackLabel, shouldReturnToZoomSlide, subtractPolygons, subtractShapes, subtractSvgPaths, svgPathToPolygons, switchSmartArtLayout, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, verifyModifyPassword, verifyPassword, verifySignatureDigests, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };
63939
+ export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL2 as EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime81 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTableCellTextAndStyle, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decodeOle10Native, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isOle2CompoundFile, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, oleBytesToDataUrl, ooxmlArcToSvg, ooxmlToPresetName, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseChart3DSurfaces, parseChartAxes, parseCondition, parseConditionList, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSvgPath, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeSvgPath, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, setSmartArtNodeStyle, shouldRenderFallbackLabel, shouldReturnToZoomSlide, subtractPolygons, subtractShapes, subtractSvgPaths, svgPathToPolygons, switchSmartArtLayout, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, verifyModifyPassword, verifyPassword, verifySignatureDigests, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };