ooxml-core 1.11.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/automation/index.cjs +210 -20
  2. package/dist/automation/index.mjs +210 -20
  3. package/dist/docx/embedded.cjs +1 -1
  4. package/dist/docx/embedded.mjs +1 -1
  5. package/dist/docx/index.cjs +1 -1
  6. package/dist/docx/index.mjs +1 -1
  7. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  8. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  9. package/dist/docx/layout/index.cjs +145 -9
  10. package/dist/docx/layout/index.d.ts +1 -0
  11. package/dist/docx/layout/index.d.ts.map +1 -1
  12. package/dist/docx/layout/index.mjs +145 -10
  13. package/dist/docx/layout/input.d.ts +5 -0
  14. package/dist/docx/layout/input.d.ts.map +1 -1
  15. package/dist/docx/layout/layout-session.d.ts +10 -0
  16. package/dist/docx/layout/layout-session.d.ts.map +1 -0
  17. package/dist/docx/layout/nested-fragment-edges.d.ts.map +1 -1
  18. package/dist/docx/layout/paragraph-cache.d.ts +8 -0
  19. package/dist/docx/layout/paragraph-cache.d.ts.map +1 -0
  20. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  21. package/dist/docx/layout/paragraph-tokens.d.ts +1 -1
  22. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  23. package/dist/docx/layout/table-paragraph-keeps.d.ts +14 -0
  24. package/dist/docx/layout/table-paragraph-keeps.d.ts.map +1 -0
  25. package/dist/docx/load/index.cjs +1 -1
  26. package/dist/docx/load/index.mjs +1 -1
  27. package/dist/docx/ui/index.cjs +98 -9
  28. package/dist/docx/ui/index.mjs +98 -10
  29. package/dist/docx/ui/review-commands.d.ts.map +1 -1
  30. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  31. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  32. package/dist/docx/ui/word-count.d.ts +3 -0
  33. package/dist/docx/ui/word-count.d.ts.map +1 -1
  34. package/dist/geometry/element-transform.d.ts +90 -0
  35. package/dist/geometry/element-transform.d.ts.map +1 -0
  36. package/dist/geometry/index.cjs +90 -0
  37. package/dist/geometry/index.d.ts +1 -0
  38. package/dist/geometry/index.d.ts.map +1 -1
  39. package/dist/geometry/index.mjs +83 -1
  40. package/dist/index.cjs +90 -0
  41. package/dist/index.mjs +90 -0
  42. package/dist/visio/index.cjs +314 -39
  43. package/dist/visio/index.d.ts +1 -0
  44. package/dist/visio/index.d.ts.map +1 -1
  45. package/dist/visio/index.mjs +313 -40
  46. package/dist/visio/model.d.ts +12 -0
  47. package/dist/visio/model.d.ts.map +1 -1
  48. package/dist/visio/paper-sizes.d.ts +5 -0
  49. package/dist/visio/paper-sizes.d.ts.map +1 -1
  50. package/dist/visio/parser.d.ts.map +1 -1
  51. package/dist/visio/print-count.d.ts +20 -0
  52. package/dist/visio/print-count.d.ts.map +1 -0
  53. package/dist/visio/print-settings.d.ts +14 -0
  54. package/dist/visio/print-settings.d.ts.map +1 -0
  55. package/dist/visio/ui/index.cjs +194 -4
  56. package/dist/visio/ui/index.mjs +194 -4
  57. package/dist/xlsx/ui/ribbon/parts.d.ts +1 -0
  58. package/dist/xlsx/ui/ribbon/parts.d.ts.map +1 -1
  59. package/package.json +1 -1
@@ -10721,7 +10721,7 @@ function parseRowProperties(row3) {
10721
10721
  const result2 = {};
10722
10722
  const height = first2(trPr, "trHeight");
10723
10723
  const heightTwips = dxa(getW(height, "val"));
10724
- if (heightTwips) {
10724
+ if (heightTwips !== void 0) {
10725
10725
  result2.heightTwips = heightTwips;
10726
10726
  result2.heightRule = getW(height, "hRule") === "exact" ? "exact" : "atLeast";
10727
10727
  }
@@ -48844,6 +48844,177 @@ function readVisioPageSetup(cells3) {
48844
48844
  return Object.keys(result2).length ? result2 : void 0;
48845
48845
  }
48846
48846
 
48847
+ // visio/print-settings.ts
48848
+ var NAMES = [
48849
+ "PaperKind",
48850
+ "PrintPageOrientation",
48851
+ "PageLeftMargin",
48852
+ "PageRightMargin",
48853
+ "PageTopMargin",
48854
+ "PageBottomMargin",
48855
+ "ScaleX",
48856
+ "ScaleY",
48857
+ "OnPage",
48858
+ "PagesX",
48859
+ "PagesY",
48860
+ "CenterX",
48861
+ "CenterY"
48862
+ ];
48863
+ var BOOLEAN = /* @__PURE__ */ new Set(["OnPage", "CenterX", "CenterY"]);
48864
+ var LENGTH = /* @__PURE__ */ new Set(["PageLeftMargin", "PageRightMargin", "PageTopMargin", "PageBottomMargin"]);
48865
+ var CANONICAL = new Map(
48866
+ [...NAMES, "PageWidth", "PageHeight", "PageScale", "DrawingScale"].map((name3) => [
48867
+ name3.toLowerCase(),
48868
+ name3
48869
+ ])
48870
+ );
48871
+ function indexCells(sheet) {
48872
+ const cells3 = /* @__PURE__ */ new Map();
48873
+ let duplicate = false;
48874
+ for (const node2 of children3(sheet, "Cell")) {
48875
+ const name3 = attribute3(node2, "N") ?? "", canonical2 = CANONICAL.get(name3.toLowerCase());
48876
+ if (!canonical2) continue;
48877
+ if (canonical2 !== name3) duplicate = true;
48878
+ const values2 = cells3.get(canonical2) ?? [];
48879
+ if (values2.length < 2) values2.push(node2);
48880
+ cells3.set(canonical2, values2);
48881
+ if (values2.length > 1) duplicate = true;
48882
+ }
48883
+ return { cells: cells3, duplicate };
48884
+ }
48885
+ function createVisioPrintSettingsReader(documentSheets, rootStyles) {
48886
+ const indexes2 = { document: indexCells(documentSheets[0]), root: indexCells(rootStyles[0]) };
48887
+ return (pageSheets) => readVisioPrintCountSettings(pageSheets, documentSheets, rootStyles, indexes2);
48888
+ }
48889
+ function readVisioPrintCountSettings(pageSheets, documentSheets, rootStyles, indexes2) {
48890
+ let refusal;
48891
+ const refuse3 = (reason) => {
48892
+ refusal ??= reason;
48893
+ };
48894
+ if (pageSheets.length !== 1) refuse3("ambiguous-page-sheet");
48895
+ if (documentSheets.length > 1) refuse3("ambiguous-document-sheet");
48896
+ if (!documentSheets.length) refuse3("missing-setting");
48897
+ if (rootStyles.length > 1) refuse3("duplicate-setting");
48898
+ const root = rootStyles[0];
48899
+ if (!root || attribute3(root, "ID") !== "0" || attribute3(root, "NameU") !== "No Style")
48900
+ refuse3("unsupported-print-style");
48901
+ for (const sheet of [...pageSheets, ...documentSheets])
48902
+ for (const name3 of ["LineStyle", "FillStyle", "TextStyle"])
48903
+ if (attribute3(sheet, name3) !== "0") refuse3("unsupported-print-style");
48904
+ for (const name3 of ["LineStyle", "FillStyle", "TextStyle"])
48905
+ if (attribute3(root, name3) !== void 0) refuse3("unsupported-print-style");
48906
+ const localIndex = indexCells(pageSheets[0]), rootIndex = indexes2?.root ?? indexCells(root);
48907
+ const documentIndex = indexes2?.document ?? indexCells(documentSheets[0]);
48908
+ if (localIndex.duplicate || rootIndex.duplicate || documentIndex.duplicate)
48909
+ refuse3("duplicate-setting");
48910
+ const local = localIndex.cells, inherited = rootIndex.cells;
48911
+ const read = (node2, name3, origin) => {
48912
+ const invalid3 = () => {
48913
+ refuse3(origin === "local" ? "invalid-local-setting" : "invalid-document-setting");
48914
+ return void 0;
48915
+ };
48916
+ if (node2.hasAttribute("E")) return invalid3();
48917
+ let raw2 = (attribute3(node2, "V") ?? "").trim();
48918
+ if (!raw2 || raw2.length > 128) return invalid3();
48919
+ if (BOOLEAN.has(name3)) {
48920
+ if (!["0", "1", "false", "true"].includes(raw2)) return invalid3();
48921
+ raw2 = raw2 === "true" ? "1" : raw2 === "false" ? "0" : raw2;
48922
+ }
48923
+ try {
48924
+ const value2 = visioFormulaCachedValue(raw2, attribute3(node2, "U"));
48925
+ const length = LENGTH.has(name3) || /^(PageWidth|PageHeight|PageScale|DrawingScale)$/.test(name3);
48926
+ if (!["scalar", ...length ? ["length"] : []].includes(value2.unit) || Math.abs(value2.value) > 1e9)
48927
+ return invalid3();
48928
+ const formula = attribute3(node2, "F");
48929
+ if (formula !== void 0) {
48930
+ const source2 = formula.trim();
48931
+ if (/^(true|false)$/i.test(source2)) {
48932
+ if ((source2.toLowerCase() === "true" ? 1 : 0) !== value2.value) return invalid3();
48933
+ } else {
48934
+ if (!source2 || source2 === "Inh") return invalid3();
48935
+ const limits = { maxLength: 512, maxNodes: 64, maxDepth: 16, maxSteps: 128 };
48936
+ const analysis = analyzeVisioFormula(source2, limits);
48937
+ if (analysis.dynamic || analysis.guarded || analysis.references.length || analysis.unsupportedFunctions.length) {
48938
+ refuse3("dynamic-setting");
48939
+ return void 0;
48940
+ }
48941
+ const evaluated = evaluateVisioFormula(
48942
+ source2,
48943
+ () => {
48944
+ throw new Error("Unexpected reference");
48945
+ },
48946
+ limits
48947
+ );
48948
+ if (evaluated.value !== value2.value || !["scalar", ...length ? ["length"] : []].includes(evaluated.unit))
48949
+ return invalid3();
48950
+ }
48951
+ }
48952
+ return value2.value;
48953
+ } catch {
48954
+ return invalid3();
48955
+ }
48956
+ };
48957
+ const values2 = /* @__PURE__ */ new Map();
48958
+ for (const name3 of NAMES) {
48959
+ const nodes = local.get(name3) ?? inherited.get(name3);
48960
+ if (!nodes?.length) continue;
48961
+ if (nodes.length !== 1) continue;
48962
+ const value2 = read(nodes[0], name3, local.has(name3) ? "local" : "document");
48963
+ if (value2 !== void 0) values2.set(name3, value2);
48964
+ }
48965
+ for (const name3 of ["PageWidth", "PageHeight", "PageScale", "DrawingScale"]) {
48966
+ const nodes = local.get(name3);
48967
+ if (!nodes || nodes.length !== 1 || !(read(nodes[0], name3, "local") > 0))
48968
+ refuse3("unusable-drawing-scale");
48969
+ }
48970
+ const setup = {};
48971
+ const paper = values2.get("PaperKind");
48972
+ if (paper !== void 0 && Number.isSafeInteger(paper) && paper >= 0 && paper <= 65535)
48973
+ setup.paperKind = paper;
48974
+ else if (paper !== void 0)
48975
+ refuse3(local.has("PaperKind") ? "invalid-local-setting" : "invalid-document-setting");
48976
+ const orientation = values2.get("PrintPageOrientation");
48977
+ if (orientation === 0 || orientation === 1 || orientation === 2)
48978
+ setup.printPageOrientation = orientation;
48979
+ else if (orientation !== void 0)
48980
+ refuse3(
48981
+ local.has("PrintPageOrientation") ? "invalid-local-setting" : "invalid-document-setting"
48982
+ );
48983
+ const margins = ["Left", "Right", "Top", "Bottom"].map((side2) => values2.get(`Page${side2}Margin`));
48984
+ if (margins.every((n) => n !== void 0 && n >= 0 && n <= 1e3))
48985
+ setup.margins = {
48986
+ left: margins[0],
48987
+ right: margins[1],
48988
+ top: margins[2],
48989
+ bottom: margins[3]
48990
+ };
48991
+ else if (margins.some((n) => n !== void 0 && (n < 0 || n > 1e3)))
48992
+ refuse3("unusable-print-area");
48993
+ for (const [name3, key2] of [
48994
+ ["ScaleX", "printZoom"],
48995
+ ["ScaleY", "printZoomY"],
48996
+ ["PagesX", "printPagesAcross"],
48997
+ ["PagesY", "printPagesDown"]
48998
+ ]) {
48999
+ const value2 = values2.get(name3);
49000
+ if (value2 !== void 0) {
49001
+ if ((name3 === "PagesX" || name3 === "PagesY") && (!Number.isSafeInteger(value2) || value2 < 1))
49002
+ refuse3(local.has(name3) ? "invalid-local-setting" : "invalid-document-setting");
49003
+ else setup[key2] = value2;
49004
+ }
49005
+ }
49006
+ for (const [name3, key2] of [
49007
+ ["OnPage", "printFitToPages"],
49008
+ ["CenterX", "printCenterX"],
49009
+ ["CenterY", "printCenterY"]
49010
+ ]) {
49011
+ const value2 = values2.get(name3);
49012
+ if (value2 !== void 0) setup[key2] = value2 === 1;
49013
+ }
49014
+ if (refusal) setup.printCountRefusal = refusal;
49015
+ return setup;
49016
+ }
49017
+
48847
49018
  // visio/page-layout.ts
48848
49019
  var VISIO_GRID_DENSITIES = Object.freeze([0, 2, 4, 8]);
48849
49020
  var VISIO_RULER_DENSITIES = Object.freeze([8, 16, 32]);
@@ -48867,7 +49038,7 @@ var VISIO_PAGE_LAYOUT_DEFAULTS = Object.freeze({
48867
49038
  rulerOriginX: 0,
48868
49039
  rulerOriginY: 0
48869
49040
  });
48870
- var NAMES = {
49041
+ var NAMES2 = {
48871
49042
  lineJumpCode: "LineJumpCode",
48872
49043
  lineJumpStyle: "LineJumpStyle",
48873
49044
  lineJumpDirectionX: "PageLineJumpDirX",
@@ -48890,8 +49061,8 @@ var NAMES = {
48890
49061
  var NUMBER5 = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i;
48891
49062
  function readVisioPageLayout(cells3) {
48892
49063
  const result2 = {};
48893
- for (const key2 of Object.keys(NAMES)) {
48894
- const cell = cells3.get(NAMES[key2]);
49064
+ for (const key2 of Object.keys(NAMES2)) {
49065
+ const cell = cells3.get(NAMES2[key2]);
48895
49066
  const raw2 = cell?.value?.trim();
48896
49067
  if (!cell || cell.error !== void 0 || cell.formula === "Inh" || !raw2 || raw2.length > 64)
48897
49068
  continue;
@@ -49178,6 +49349,11 @@ async function parseVsdx(input, options = {}) {
49178
49349
  });
49179
49350
  const rootStyle = styles.get("0");
49180
49351
  if (rootStyle?.attributes.get("NameU") === "No Style") resources.rootSheet = rootStyle.sheet;
49352
+ const printStyleGroups = children3(documentRoot, "StyleSheets");
49353
+ const readPrintSettings = createVisioPrintSettingsReader(
49354
+ children3(documentRoot, "DocumentSheet"),
49355
+ printStyleGroups.length === 1 ? children3(printStyleGroups[0], "StyleSheet").filter((node2) => attribute3(node2, "ID") === "0") : []
49356
+ );
49181
49357
  const masters = /* @__PURE__ */ new Map();
49182
49358
  const masterRecords = [];
49183
49359
  const mastersPart = await related(pkg, documentPart, "masters", false);
@@ -49341,7 +49517,17 @@ async function parseVsdx(input, options = {}) {
49341
49517
  const value2 = number(sheet.cells, name3, Number.NaN, localReport);
49342
49518
  if (Number.isSafeInteger(value2) && value2 >= 0 && value2 <= 255) pageModes[key2] = value2;
49343
49519
  }
49344
- const pageSetup = readVisioPageSetup(sheet.cells);
49520
+ const { paperKind, printPageOrientation, margins, printZoom, ...countMetadata } = readPrintSettings(children3(page, "PageSheet"));
49521
+ const pageSetup = {
49522
+ ...readVisioPageSetup(sheet.cells),
49523
+ ...countMetadata,
49524
+ printCountSettings: {
49525
+ ...paperKind === void 0 ? {} : { paperKind },
49526
+ ...printPageOrientation === void 0 ? {} : { printPageOrientation },
49527
+ ...margins === void 0 ? {} : { margins },
49528
+ ...printZoom === void 0 ? {} : { printZoom }
49529
+ }
49530
+ };
49345
49531
  const layout3 = readVisioPageLayout(sheet.cells);
49346
49532
  for (const connection of connectors)
49347
49533
  if (!seen.has(connection.fromShapeId) || !seen.has(connection.toShapeId))
@@ -50631,7 +50817,7 @@ function cellUnit(name3, relative) {
50631
50817
  return "length";
50632
50818
  return !relative && /\.[XY]\d+$/i.test(name3) ? "length" : "scalar";
50633
50819
  }
50634
- function indexCells(roots, options) {
50820
+ function indexCells2(roots, options) {
50635
50821
  const cells3 = /* @__PURE__ */ new Map();
50636
50822
  const maxCells = bound(options.maxCells, 1e5);
50637
50823
  const add3 = (item) => {
@@ -50841,7 +51027,7 @@ function createVisioCellEvaluator(cells3, options = {}, verifyCaches = false) {
50841
51027
 
50842
51028
  // visio/edit-recalculate.ts
50843
51029
  function recalculateVisioCells(roots, changed, options = {}) {
50844
- const cells3 = indexCells(roots, options);
51030
+ const cells3 = indexCells2(roots, options);
50845
51031
  const reverse2 = /* @__PURE__ */ new Map();
50846
51032
  for (const [id3, item] of cells3)
50847
51033
  for (const dependency of item.dependencies) {
@@ -50879,7 +51065,7 @@ function recalculateVisioCells(roots, changed, options = {}) {
50879
51065
  return [...pages];
50880
51066
  }
50881
51067
  function assertVisioShapesUnreferenced(roots, removed, options = {}) {
50882
- const cells3 = indexCells(roots, options);
51068
+ const cells3 = indexCells2(roots, options);
50883
51069
  for (const cell of cells3.values()) {
50884
51070
  options.check?.();
50885
51071
  if (removed.get(cell.pageId)?.has(cell.shapeId)) continue;
@@ -50901,7 +51087,7 @@ function assertVisioShapeUnreferenced(roots, pageId2, shapeId2, options = {}) {
50901
51087
  assertVisioShapesUnreferenced(roots, /* @__PURE__ */ new Map([[pageId2, /* @__PURE__ */ new Set([shapeId2])]]), options);
50902
51088
  }
50903
51089
  function createVisioDependencyQuery(roots, options = {}) {
50904
- const cells3 = indexCells(roots, options);
51090
+ const cells3 = indexCells2(roots, options);
50905
51091
  return (source2, targets) => {
50906
51092
  const wanted = new Set(targets.map(key));
50907
51093
  const seen = /* @__PURE__ */ new Set();
@@ -51569,7 +51755,7 @@ function serializeEditedXml(root, limits, check3) {
51569
51755
 
51570
51756
  // visio/edit-formatting-scope.ts
51571
51757
  async function assertFormattingDependencies(pkg, pagePaths, roots, pageId2, shape2, changed, check3, instanceView2) {
51572
- indexCells(roots, { check: check3 });
51758
+ indexCells2(roots, { check: check3 });
51573
51759
  const shapeId2 = attribute3(shape2, "ID");
51574
51760
  const changedNames = new Set([...changed.keys()].map((name3) => name3.toLowerCase()));
51575
51761
  const jumpOnly = [...changedNames].every(
@@ -58459,15 +58645,19 @@ var VISIO_PAPER_SIZES = Object.freeze([
58459
58645
  function visioPaperSize(paperKind) {
58460
58646
  return VISIO_PAPER_SIZES.find((item) => item.paperKind === paperKind);
58461
58647
  }
58648
+ function visioOrientedPaperSize(paper, landscape) {
58649
+ const short = Math.min(paper.width, paper.height), long = Math.max(paper.width, paper.height);
58650
+ return { width: landscape ? long : short, height: landscape ? short : long };
58651
+ }
58462
58652
  function visioPrintTile(page, paper = page.pageSetup?.paperKind === void 0 ? void 0 : visioPaperSize(page.pageSetup.paperKind)) {
58463
58653
  if (!paper) return void 0;
58464
58654
  const setup = page.pageSetup;
58465
58655
  const landscape = setup?.printPageOrientation === 2 || setup?.printPageOrientation !== 1 && page.width > page.height;
58466
- const short = Math.min(paper.width, paper.height), long = Math.max(paper.width, paper.height);
58656
+ const oriented = visioOrientedPaperSize(paper, landscape);
58467
58657
  const margins = setup?.margins ?? { left: 0, right: 0, top: 0, bottom: 0 };
58468
58658
  const zoom = setup?.printZoom ?? 1;
58469
- const width = ((landscape ? long : short) - margins.left - margins.right) / zoom;
58470
- const height = ((landscape ? short : long) - margins.top - margins.bottom) / zoom;
58659
+ const width = (oriented.width - margins.left - margins.right) / zoom;
58660
+ const height = (oriented.height - margins.top - margins.bottom) / zoom;
58471
58661
  return width > 0.01 && height > 0.01 ? { width, height } : void 0;
58472
58662
  }
58473
58663
 
@@ -59997,7 +60187,7 @@ function resizeVisioShapeAtAnchor(roots, document, edit, check3, glueShapes = /*
59997
60187
  for (const connection of children3(container, "Connect"))
59998
60188
  if (!glueShapes.has(shape2) && ["FromSheet", "ToSheet"].some((name3) => attribute3(connection, name3) === edit.shapeId))
59999
60189
  fail2("UNSUPPORTED_GEOMETRY_EDIT", "Glued shapes require routing outside this subset.");
60000
- const graph = indexCells(roots, { check: check3, glueShapes });
60190
+ const graph = indexCells2(roots, { check: check3, glueShapes });
60001
60191
  const id3 = (cell) => key({ pageId: edit.pageId, shapeId: edit.shapeId, cell });
60002
60192
  const source2 = createVisioCellEvaluator(graph, { check: check3, glueShapes }, true);
60003
60193
  const read = (name3, fallback) => graph.has(id3(name3)) ? source2(id3(name3)).value : numeric4(local.get(name3), fallback);
@@ -60166,7 +60356,7 @@ function editableTransformCell(roots, edit, node2, check3, options = {}) {
60166
60356
  const formula = executableCellFormula(attribute3(node2, "F"));
60167
60357
  if (!formula || !analyzeVisioFormula(formula).references.length) return editableCell(node2);
60168
60358
  const evaluate = createVisioCellEvaluator(
60169
- indexCells(roots, { ...options, check: check3 }),
60359
+ indexCells2(roots, { ...options, check: check3 }),
60170
60360
  { ...options, check: check3 },
60171
60361
  true
60172
60362
  );
@@ -60296,7 +60486,7 @@ function prepareMasterMovePins(roots, commands, bindings, check3) {
60296
60486
  }
60297
60487
  }
60298
60488
  if (result2.size) {
60299
- const indexed = indexCells(roots, { check: check3 });
60489
+ const indexed = indexCells2(roots, { check: check3 });
60300
60490
  const pins = new Set(
60301
60491
  [...indexed.values()].filter((cell) => cell.node && result2.has(cell.node)).map(key)
60302
60492
  );
@@ -61247,7 +61437,7 @@ async function recalculatePageFormulas(pkg, pagesPart, pages, paths, dirty, chec
61247
61437
  if (!needed) return;
61248
61438
  const options = { check: check3, pageContext: after };
61249
61439
  const changed = [];
61250
- for (const cell of indexCells(roots, options).values()) {
61440
+ for (const cell of indexCells2(roots, options).values()) {
61251
61441
  if (!cell.node) continue;
61252
61442
  const functions = pageFunctions(attribute3(cell.node, "F") ?? "");
61253
61443
  const old = before.get(cell.pageId), current = after.get(cell.pageId);
@@ -62684,7 +62874,7 @@ async function duplicateVisioShapes(pkg, pagePaths, roots, document, edit, check
62684
62874
  structural ||= !source2 || await shapeIsStructural(source2, template);
62685
62875
  }
62686
62876
  await assertDuplicateScope(pkg, pagePaths, root, newIds, check3, structural);
62687
- const indexed = indexCells(detached ? /* @__PURE__ */ new Map([[sourcePageId, sourceRoot]]) : roots, { check: check3 });
62877
+ const indexed = indexCells2(detached ? /* @__PURE__ */ new Map([[sourcePageId, sourceRoot]]) : roots, { check: check3 });
62688
62878
  const evaluate = createVisioCellEvaluator(indexed, { check: check3 }, true);
62689
62879
  const containers = children3(root, "Shapes");
62690
62880
  if (containers.length > 1) fail2("INVALID_SHAPE_ID", "Duplicate Shapes containers.");
@@ -63219,7 +63409,7 @@ function assertOutlineUnreferenced(roots, pageId2, shape2, check3) {
63219
63409
  for (const node2 of section3.getElementsByTagNameNS(section3.namespaceURI, "Cell"))
63220
63410
  owned.add(node2);
63221
63411
  const prefix3 = JSON.stringify([pageId2, shapeId2]).slice(0, -1) + ",";
63222
- for (const cell of indexCells(roots, { check: check3 }).values()) {
63412
+ for (const cell of indexCells2(roots, { check: check3 }).values()) {
63223
63413
  check3();
63224
63414
  if (cell.node && owned.has(cell.node)) continue;
63225
63415
  for (const dependency of cell.dependencies) {
@@ -64423,7 +64613,7 @@ async function captureVisioClipboard(input, pageId2, shapeIds2, options = {}) {
64423
64613
  }
64424
64614
  await assertShapeOrderPackageScope(pkg, check3, structural);
64425
64615
  const evaluate = createVisioCellEvaluator(
64426
- indexCells(/* @__PURE__ */ new Map([[pageId2, root]]), { check: check3 }),
64616
+ indexCells2(/* @__PURE__ */ new Map([[pageId2, root]]), { check: check3 }),
64427
64617
  { check: check3 },
64428
64618
  true
64429
64619
  );