@openpresentation/opf 0.34.1 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +6 -6
  2. package/dist/browser.js +19 -19
  3. package/dist/{catalog-refs-CoIrOdAw.d.ts → catalog-refs-BgotJhR5.d.ts} +117 -98
  4. package/dist/{catalog-schemas-FjLRPtjB.d.ts → catalog-schemas-BX-VEc5Q.d.ts} +1 -1
  5. package/dist/{chunk-MUILZGRY.js → chunk-2GCTKQDD.js} +4 -4
  6. package/dist/{chunk-LCT5ZV3Q.js → chunk-3KPTVK77.js} +92 -284
  7. package/dist/{chunk-SR6T4LKI.js → chunk-3ZTKRX7F.js} +4 -6
  8. package/dist/{chunk-MAFJ5O2D.js → chunk-4UMZDDJG.js} +11 -29
  9. package/dist/{chunk-NLJFNCZ4.js → chunk-6JHV2K67.js} +6 -6
  10. package/dist/{chunk-FK5XG742.js → chunk-6VGLE7C5.js} +114 -2
  11. package/dist/{chunk-AAWHOCXS.js → chunk-7KUUIL7W.js} +8 -8
  12. package/dist/{chunk-FCSYIBVR.js → chunk-ARPMSD7V.js} +1 -1
  13. package/dist/{chunk-244OPLAV.js → chunk-GGN3NQDK.js} +1 -1
  14. package/dist/{chunk-L3MCLD3X.js → chunk-GKUAVSXU.js} +3 -10
  15. package/dist/{chunk-6PMXVP5G.js → chunk-HORPH6O7.js} +202 -21
  16. package/dist/{chunk-XLSWZSQS.js → chunk-JQNT37IO.js} +4 -13
  17. package/dist/{chunk-AEHDXNZX.js → chunk-KNMMEE67.js} +1433 -916
  18. package/dist/{chunk-CJVKOJ6B.js → chunk-LDLLZQPP.js} +1094 -472
  19. package/dist/{chunk-HHVQ2SDT.js → chunk-MS2LPR7F.js} +1 -5
  20. package/dist/{chunk-AGYPRTEC.js → chunk-MVPQEMCP.js} +97 -15
  21. package/dist/{chunk-2B6GLT2O.js → chunk-NPRNWPP4.js} +1 -1
  22. package/dist/{chunk-X72WPTST.js → chunk-P2ACZJUL.js} +6 -6
  23. package/dist/chunk-SEC4IOOS.js +1 -0
  24. package/dist/{chunk-CQXBGZQP.js → chunk-VMPOCXTE.js} +5 -17
  25. package/dist/{chunk-ABA2D6X5.js → chunk-ZZWX4W2G.js} +2 -2
  26. package/dist/{composition-CvtvgBDE.d.ts → composition-BmJfljJl.d.ts} +345 -242
  27. package/dist/composition.d.ts +2 -2
  28. package/dist/composition.js +1 -1
  29. package/dist/{conversion-CyNRlWGw.d.ts → conversion-BbXhlurO.d.ts} +10 -8
  30. package/dist/conversion-VWCH3NKR.js +25 -0
  31. package/dist/convert.d.ts +11 -11
  32. package/dist/convert.js +61 -86
  33. package/dist/data.d.ts +1 -1
  34. package/dist/data.js +2 -2
  35. package/dist/{deck-report-BVlQZ42f.d.ts → deck-report-BYkbL7uT.d.ts} +3 -3
  36. package/dist/deck.d.ts +6 -6
  37. package/dist/deck.js +11 -11
  38. package/dist/diagram-engine-eager.js +1 -1
  39. package/dist/diagram-engine-lazy.js +1 -1
  40. package/dist/{diagram-plantuml-XRZ6VAOL.js → diagram-plantuml-GWXGKY7R.js} +1 -1
  41. package/dist/diff.d.ts +2 -2
  42. package/dist/diff.js +4 -4
  43. package/dist/docs.js +40 -40
  44. package/dist/example-files/technical/assets/alice.png +0 -0
  45. package/dist/example-files/technical/assets/context-photo.png +0 -0
  46. package/dist/example-files/technical/assets/cover-image.png +0 -0
  47. package/dist/example-files/technical/assets/cover.png +0 -0
  48. package/dist/example-files/technical/assets/diagram.svg +1 -0
  49. package/dist/example-files/technical/assets/icon.svg +1 -0
  50. package/dist/example-files/technical/assets/logo-dark.svg +1 -0
  51. package/dist/example-files/technical/assets/logo-light.svg +1 -0
  52. package/dist/example-files/technical/assets/logo.svg +1 -0
  53. package/dist/example-files/technical/assets/primary-logo.svg +1 -0
  54. package/dist/example-files/technical/assets/product-shot.png +0 -0
  55. package/dist/example-files/technical/assets/watermark.png +0 -0
  56. package/dist/example-files/technical/assets/wordmark.svg +1 -0
  57. package/dist/examples.js +6383 -8169
  58. package/dist/{finding-l9dlQ2NF.d.ts → finding-mcHslZLA.d.ts} +6 -2
  59. package/dist/font-policy.d.ts +16 -2
  60. package/dist/font-policy.js +1 -1
  61. package/dist/format.js +2 -2
  62. package/dist/ids.d.ts +2 -2
  63. package/dist/ids.js +4 -4
  64. package/dist/index.d.ts +125 -27
  65. package/dist/index.js +24 -23
  66. package/dist/markdown.d.ts +1 -1
  67. package/dist/markdown.js +8 -8
  68. package/dist/node-engine.d.ts +22 -8
  69. package/dist/node-engine.js +38 -22
  70. package/dist/{pagination-CZQQYk7L.d.ts → pagination-C0FPjO29.d.ts} +4 -4
  71. package/dist/pagination.d.ts +3 -3
  72. package/dist/pagination.js +4 -4
  73. package/dist/patch.d.ts +4 -4
  74. package/dist/patch.js +3 -3
  75. package/dist/precompiled.js +2 -2
  76. package/dist/{presentation-s9262acV.d.ts → presentation-Dx-kZC8Y.d.ts} +33 -81
  77. package/dist/repo-readme.js +1 -1
  78. package/dist/schema-engine-ajv.js +1 -1
  79. package/dist/schema-engine-precompiled.js +2 -2
  80. package/dist/schema.d.ts +5 -7
  81. package/dist/schema.js +3 -3
  82. package/dist/schemas.js +1 -1
  83. package/dist/source.d.ts +5 -0
  84. package/dist/source.js +10 -10
  85. package/dist/spec/reference/engine-defaults.json +1 -1
  86. package/dist/spec/reference/engine-vocabularies.json +43 -43
  87. package/dist/spec/reference/font-policy.json +114 -2
  88. package/dist/spec/reference/font-policy.schema.json +45 -1
  89. package/dist/spec/schemas/color-scheme.schema.json +2 -2
  90. package/dist/spec/schemas/finding.schema.json +2 -1
  91. package/dist/spec/schemas/icon-set.schema.json +5 -0
  92. package/dist/spec/schemas/layout.schema.json +27 -85
  93. package/dist/spec/schemas/opf.schema.json +35 -176
  94. package/dist/spec/schemas/theme.schema.json +10 -10
  95. package/dist/symbol-font-encodings.d.ts +2 -2
  96. package/dist/symbol-font-encodings.js +12695 -12736
  97. package/dist/types.d.ts +74 -86
  98. package/dist/{validation-types-CYbsUuZ9.d.ts → validation-types-DKIe1RQW.d.ts} +5 -5
  99. package/dist/validator.d.ts +5 -7
  100. package/dist/validator.js +3 -3
  101. package/dist/yaml.d.ts +1 -1
  102. package/dist/yaml.js +7 -7
  103. package/package.json +7 -7
  104. package/dist/chunk-UJZN2ZH6.js +0 -1
  105. package/dist/conversion-CSQ5EHD2.js +0 -25
@@ -7,14 +7,16 @@ function arrangementTree(entries) {
7
7
  if (!entries.length) return { ok: false, reason: "A tree needs one root entry." };
8
8
  const nodes = [], ancestors = [];
9
9
  for (const [index, entry] of entries.entries()) {
10
- const explicit = entry !== null && typeof entry === "object" && !Array.isArray(entry) ? entry.level : void 0;
11
- const level = explicit === void 0 ? 0 : explicit;
10
+ const object2 = entry !== null && typeof entry === "object" && !Array.isArray(entry) ? entry : void 0;
11
+ const explicit = object2?.level, level = explicit === void 0 ? 0 : explicit, assistant = object2?.assistant === true;
12
12
  if (typeof level !== "number" || !Number.isInteger(level) || level < 0) return { ok: false, index, reason: "A tree entry needs a nonnegative integer level." };
13
13
  if (index === 0 && level !== 0) return { ok: false, index, reason: "The first tree entry is its level-zero root." };
14
14
  if (index > 0 && level === 0) return { ok: false, index, reason: "This tree has more than one root; forests need a reported fallback." };
15
15
  if (level > ancestors.length) return { ok: false, index, reason: "The entry skips a parent level; depth may grow by only one level at a time." };
16
+ if (index === 0 && assistant) return { ok: false, index, reason: "The root cannot be an assistant." };
16
17
  const parent = level === 0 ? void 0 : ancestors[level - 1];
17
- const node = { index, level, ...parent === void 0 ? {} : { parent }, children: [] };
18
+ if (parent !== void 0 && nodes[parent]?.assistant) return { ok: false, index, reason: "An assistant has no reports." };
19
+ const node = { index, level, ...parent === void 0 ? {} : { parent }, children: [], ...assistant ? { assistant: true } : {} };
18
20
  nodes.push(node);
19
21
  if (parent !== void 0) {
20
22
  const ancestor = nodes[parent];
@@ -33,6 +35,11 @@ function nativeTreeGeometry(kind2, frame, entries) {
33
35
  if (![frame.x, frame.y, frame.width, frame.height].every(Number.isFinite) || frame.width <= 0 || frame.height <= 0) return { ok: false, reason: "A native tree frame needs finite coordinates and positive dimensions." };
34
36
  const tree = arrangementTree(entries);
35
37
  if (!tree.ok) return tree;
38
+ const assistant = (index) => tree.nodes[index]?.assistant === true;
39
+ if (kind2 === "hierarchy") {
40
+ const at3 = tree.nodes.findIndex((node) => node.assistant);
41
+ if (at3 >= 0) return { ok: false, index: at3, reason: "A hierarchy has no assistants." };
42
+ }
36
43
  const org = kind2 === "org-chart", span = org ? 2 : 10 / 9, gap = org ? 0.42 : 1 / 9, stride = org ? 1.42 : 1111 / 1200, height = org ? 1 : 127 / 200, frontX = org ? 0 : 1 / 9, frontY = org ? 0 : 19 / 180;
37
44
  const models = [];
38
45
  for (let index = tree.nodes.length - 1; index >= 0; index--) {
@@ -42,12 +49,18 @@ function nativeTreeGeometry(kind2, frame, entries) {
42
49
  models[index] = { root: 0, nodes: [{ index, x: 0, row: 0 }] };
43
50
  continue;
44
51
  }
45
- if (org && index !== 0 && semantic.children.every((child) => tree.nodes[child]?.children.length === 0)) {
46
- models[index] = { root: 0, nodes: [{ index, x: 0, row: 0 }, ...semantic.children.map((child, row) => ({ index: child, x: 0.5, row: row + 1 }))] };
52
+ const assistants = semantic.children.filter(assistant), reports = semantic.children.filter((child) => !assistant(child)), below = assistants.length;
53
+ const aside = (x2) => assistants.map((child, row) => ({ index: child, x: x2 + span / 2 + gap, row: row + 1 }));
54
+ if (org && index !== 0 && reports.length && reports.every((child) => tree.nodes[child]?.children.length === 0)) {
55
+ models[index] = { root: 0, nodes: [{ index, x: 0, row: 0 }, ...aside(0), ...reports.map((child, row) => ({ index: child, x: 0.5, row: row + 1 + below }))] };
56
+ continue;
57
+ }
58
+ if (!reports.length) {
59
+ models[index] = { root: 0, nodes: [{ index, x: 0, row: 0 }, ...aside(0)] };
47
60
  continue;
48
61
  }
49
62
  const positions = [], contour = /* @__PURE__ */ new Map(), roots = [];
50
- for (const child of semantic.children) {
63
+ for (const child of reports) {
51
64
  const own3 = models[child];
52
65
  if (!own3) return { ok: false, index: child, reason: "A child has no native tree geometry." };
53
66
  let shift = 0;
@@ -58,14 +71,14 @@ function nativeTreeGeometry(kind2, frame, entries) {
58
71
  roots.push(own3.root + shift);
59
72
  for (const node of own3.nodes) {
60
73
  const x2 = node.x + shift;
61
- positions.push({ ...node, x: x2, row: node.row + 1 });
74
+ positions.push({ ...node, x: x2, row: node.row + 1 + below });
62
75
  contour.set(node.row, Math.max(contour.get(node.row) ?? -Infinity, x2 + span));
63
76
  }
64
77
  }
65
78
  const first = roots[0], last = roots.at(-1);
66
79
  if (first === void 0 || last === void 0) return { ok: false, index, reason: "A parent has no placed child." };
67
80
  const x = (first + last) / 2;
68
- positions.unshift({ index, x, row: 0 });
81
+ positions.unshift({ index, x, row: 0 }, ...aside(x));
69
82
  const min = Math.min(...positions.map((node) => node.x));
70
83
  models[index] = { root: x - min, nodes: positions.map((node) => ({ ...node, x: node.x - min })) };
71
84
  }
@@ -91,12 +104,22 @@ function nativeTreeGeometry(kind2, frame, entries) {
91
104
  const parent = nodes[child.parent], semantic = tree.nodes[child.parent];
92
105
  if (!parent || !semantic) return { ok: false, index: child.index, reason: "A connector lost its semantic parent." };
93
106
  const p = parent.background ?? parent.box, c = child.background ?? child.box;
94
- const hanging = org && parent.index !== 0 && semantic.children.every((index) => tree.nodes[index]?.children.length === 0);
107
+ const reports = semantic.children.filter((index) => !assistant(index));
108
+ if (assistant(child.index)) {
109
+ const from2 = [p.x + p.width / 2, p.y + p.height], to2 = [c.x, c.y + c.height / 2], points2 = [from2, [from2[0], to2[1]], to2];
110
+ connectors.push({ parent: parent.index, child: child.index, box: { x: from2[0], y: from2[1], width: to2[0] - from2[0], height: to2[1] - from2[1] }, points: points2 });
111
+ continue;
112
+ }
113
+ const hanging = org && parent.index !== 0 && reports.length > 0 && reports.every((index) => tree.nodes[index]?.children.length === 0);
95
114
  const from = hanging ? [p.x + 0.2 * low, p.y + p.height] : [p.x + p.width / 2, p.y + p.height];
96
115
  const to = hanging ? [c.x, c.y + c.height / 2] : [c.x + c.width / 2, c.y];
97
116
  const width2 = Math.abs(to[0] - from[0]), straight = width2 < 1e-6;
98
117
  const box = { x: straight ? from[0] - 4.8 : Math.min(from[0], to[0]), y: from[1], width: straight ? 9.6 : width2, height: to[1] - from[1] };
99
- const middle = (parent.box.y + parent.box.height + to[1]) / 2;
118
+ const above = Math.max(parent.box.y + parent.box.height, ...semantic.children.filter(assistant).map((index) => {
119
+ const node = nodes[index];
120
+ return node.box.y + node.box.height;
121
+ }));
122
+ const middle = (above + to[1]) / 2;
100
123
  const points = hanging ? [from, [from[0], to[1]], to] : [from, [from[0], middle], [to[0], middle], to];
101
124
  connectors.push({ parent: parent.index, child: child.index, box, points });
102
125
  }
@@ -220,12 +243,20 @@ function fitVennShapes(frame, native, labels, gap) {
220
243
  }
221
244
 
222
245
  // src/arrangements.ts
223
- var LINEAR_ARRANGEMENTS = ["chevrons", "flow", "vertical-flow"];
224
- var ARRANGEMENTS = ["pyramid", "matrix", "cycle", "org-chart", "hierarchy", "venn", ...LINEAR_ARRANGEMENTS];
246
+ var LINEAR_ARRANGEMENTS = ["chevrons", "process", "vertical-process"];
247
+ var ARRANGEMENTS = ["pyramid", "inverted-pyramid", "matrix", "cycle", "org-chart", "hierarchy", "venn", ...LINEAR_ARRANGEMENTS];
225
248
  function isArrangement(value) {
226
249
  return typeof value === "string" && ARRANGEMENTS.some((kind2) => kind2 === value);
227
250
  }
228
- var ARRANGEMENT_MAX = Object.freeze({ pyramid: 8, matrix: 4, cycle: 8, chevrons: 8, flow: 8, "vertical-flow": 8, "org-chart": 8, hierarchy: 8, venn: 7 });
251
+ var SEQUENCE_ARRANGEMENTS = ["steps", "numbered"];
252
+ function isSequenceArrangement(value) {
253
+ return value === "steps" || value === "numbered";
254
+ }
255
+ var REGION_ARRANGEMENTS = ["steps", "numbered", "pyramid", "inverted-pyramid", "matrix", "cycle", "chevrons", "process", "vertical-process", "org-chart", "hierarchy", "venn"];
256
+ function isRegionArrangement(value) {
257
+ return isSequenceArrangement(value) || isArrangement(value);
258
+ }
259
+ var ARRANGEMENT_MAX = Object.freeze({ pyramid: 8, "inverted-pyramid": 8, matrix: 4, cycle: 8, chevrons: 8, process: 8, "vertical-process": 8, "org-chart": 8, hierarchy: 8, venn: 7 });
229
260
  var MATRIX_ENTRIES = 4;
230
261
  var ARRANGEMENT_CARDS_MAX = 8;
231
262
  var CARD_TEXT_MARGIN = 0.6;
@@ -234,24 +265,25 @@ var SMART_ART_LAYOUTS = Object.freeze({
234
265
  matrix: "urn:microsoft.com/office/officeart/2005/8/layout/matrix3",
235
266
  cycle: "urn:microsoft.com/office/officeart/2005/8/layout/cycle2",
236
267
  chevrons: "urn:microsoft.com/office/officeart/2005/8/layout/chevron1",
237
- flow: "urn:microsoft.com/office/officeart/2005/8/layout/process1",
238
- "vertical-flow": "urn:microsoft.com/office/officeart/2005/8/layout/process2",
268
+ process: "urn:microsoft.com/office/officeart/2005/8/layout/process1",
269
+ "vertical-process": "urn:microsoft.com/office/officeart/2005/8/layout/process2",
239
270
  "org-chart": "urn:microsoft.com/office/officeart/2005/8/layout/orgChart1",
240
271
  hierarchy: "urn:microsoft.com/office/officeart/2005/8/layout/hierarchy1",
241
272
  venn: "urn:microsoft.com/office/officeart/2005/8/layout/venn1"
242
273
  });
243
274
  var SMART_ART_NAMES = Object.freeze({
244
275
  pyramid: { layout: "Basic Pyramid", nodes: "levels" },
276
+ "inverted-pyramid": { layout: "Basic Pyramid", nodes: "levels" },
245
277
  matrix: { layout: "Basic Matrix", nodes: "quadrants" },
246
278
  cycle: { layout: "Basic Cycle", nodes: "steps" },
247
279
  "org-chart": { layout: "Organization Chart", nodes: "nodes" },
248
280
  hierarchy: { layout: "Hierarchy", nodes: "nodes" },
249
281
  venn: { layout: "Basic Venn", nodes: "sets" },
250
282
  chevrons: { layout: "Basic Chevron Process", nodes: "chevrons" },
251
- flow: { layout: "Basic Process", nodes: "boxes" },
252
- "vertical-flow": { layout: "Vertical Process", nodes: "boxes" }
283
+ process: { layout: "Basic Process", nodes: "boxes" },
284
+ "vertical-process": { layout: "Vertical Process", nodes: "boxes" }
253
285
  });
254
- var ARRANGEMENT_TEXT_MARGIN = Object.freeze({ pyramid: 0.1, matrix: 0.3, cycle: 0.1, chevrons: 0.105, flow: 0.3, "vertical-flow": 0.3, "org-chart": 0.05, hierarchy: 0.3, venn: 0.1 });
286
+ var ARRANGEMENT_TEXT_MARGIN = Object.freeze({ pyramid: 0.1, "inverted-pyramid": 0.1, matrix: 0.3, cycle: 0.1, chevrons: 0.105, process: 0.3, "vertical-process": 0.3, "org-chart": 0.05, hierarchy: 0.3, venn: 0.1 });
255
287
  var PYRAMID_TEXT_WIDTH = 0.65;
256
288
  var MATRIX_QUADRANT = 0.39;
257
289
  var MATRIX_INSET = 0.095;
@@ -528,15 +560,15 @@ var CYCLE_DOMAIN_ASPECT = Object.freeze({ min: 1.15, max: 1.8 });
528
560
  var CYCLE_DOMAIN_TOTAL_LINES = 16;
529
561
  var SMART_ART_DOMAIN = Object.freeze({
530
562
  /** Entries: a pyramid of 1 to 5 levels (6 to 8 never fitted the list's role size in the compared frames), a matrix of 1 to 4 quadrants. */
531
- count: Object.freeze({ pyramid: 5, matrix: 4, cycle: CYCLE_DOMAIN_COUNT, chevrons: 6, flow: 6, "vertical-flow": 4 }),
563
+ count: Object.freeze({ pyramid: 5, matrix: 4, cycle: CYCLE_DOMAIN_COUNT, chevrons: 6, process: 6, "vertical-process": 4 }),
532
564
  /** The frame's width over its height, per arrangement: the range the 16:9, 4:3 and 1:1 slides gave, with a small margin. */
533
565
  aspect: Object.freeze({
534
566
  pyramid: Object.freeze({ min: 1.1, max: 2.3 }),
535
567
  matrix: Object.freeze({ min: 0.8, max: 1.2 }),
536
568
  cycle: CYCLE_DOMAIN_ASPECT,
537
569
  chevrons: Object.freeze({ min: 1.1, max: 2.3 }),
538
- flow: Object.freeze({ min: 1.1, max: 2.3 }),
539
- "vertical-flow": Object.freeze({ min: 0.55, max: 1.2 })
570
+ process: Object.freeze({ min: 1.1, max: 2.3 }),
571
+ "vertical-process": Object.freeze({ min: 0.55, max: 1.2 })
540
572
  }),
541
573
  /** The most lines one entry may wrap to in its node, and in all its entries (a line drawn by PowerPoint's wrap can sit up to 1 px from core's). */
542
574
  lines: 2,
@@ -556,13 +588,13 @@ var SMART_ART_DOMAIN = Object.freeze({
556
588
  * SH-17: the most of a node's text rectangle (less its margins) an entry's lines may fill from top to bottom: a box PowerPoint finds
557
589
  * nearly full is grown or searched to another scale (the sweep found it at 0.969 of the height and above).
558
590
  */
559
- fill: Object.freeze({ chevrons: 0.95, flow: 0.95, "vertical-flow": 0.95 }),
591
+ fill: Object.freeze({ chevrons: 0.95, process: 0.95, "vertical-process": 0.95 }),
560
592
  /**
561
593
  * SH-17: the most of the frame the entries' text may cover (each line's width times the size, over the frame's area): PowerPoint sets
562
594
  * a SmartArt's lines up to a pixel from where it sets OPF's native text, which a frame dense with large text shows above SH-07's gate
563
595
  * (every instance above 0.082 that failed it did so for this).
564
596
  */
565
- ink: Object.freeze({ chevrons: 0.08, flow: 0.08, "vertical-flow": 0.08 })
597
+ ink: Object.freeze({ chevrons: 0.08, process: 0.08, "vertical-process": 0.08 })
566
598
  });
567
599
  function smartArtScript(texts) {
568
600
  const text2 = texts.join("");
@@ -572,7 +604,7 @@ function smartArtScript(texts) {
572
604
  }
573
605
  function smartArtUnavailable(candidate) {
574
606
  const { kind: kind2, count, frame, nodes } = candidate, domain = SMART_ART_DOMAIN;
575
- if (kind2 === "pyramid" && candidate.pyramidDirection === "down") return "the inverted pyramid has no qualified live SmartArt domain";
607
+ if (kind2 === "inverted-pyramid") return "the inverted pyramid has no qualified live SmartArt domain";
576
608
  const compared = domain.count[kind2];
577
609
  if (compared === void 0) return `${SMART_ART_NAMES[kind2].layout} text and edits are awaiting native qualification`;
578
610
  if (count < 1 || count > compared) return `a ${kind2} of ${count} entries is outside the compared 1 to ${compared}`;
@@ -601,8 +633,8 @@ function smartArtUnavailable(candidate) {
601
633
  var isLinearArrangement = (kind2) => LINEAR_ARRANGEMENTS.includes(kind2);
602
634
  var SMART_ART_SCALES = Object.freeze({
603
635
  chevrons: Object.freeze([1024, 538, 365.5, 276.5, 222.5, 186, 160, 140.25, 124.875, 112.5].map((value) => value / 1024)),
604
- flow: Object.freeze([1024, 426.5, 269, 196.75, 155, 128, 108.875, 94.75, 83.875, 75.25].map((value) => value / 1024)),
605
- "vertical-flow": Object.freeze([1024, 409.5, 256, 186, 146.25, 120.375, 102.375, 89, 78.75, 70.5].map((value) => value / 1024))
636
+ process: Object.freeze([1024, 426.5, 269, 196.75, 155, 128, 108.875, 94.75, 83.875, 75.25].map((value) => value / 1024)),
637
+ "vertical-process": Object.freeze([1024, 409.5, 256, 186, 146.25, 120.375, 102.375, 89, 78.75, 70.5].map((value) => value / 1024))
606
638
  });
607
639
  var SQUEEZED = 1023 / 1024;
608
640
  var CHEVRON_HEIGHT = 0.4;
@@ -616,8 +648,8 @@ var FLOW_ROUND_ADJUST = 1e4;
616
648
  var ARROW_ADJUST = Object.freeze([6e4, 5e4]);
617
649
  var LINEAR_TEXT_MARGINS = Object.freeze({
618
650
  chevrons: Object.freeze([0.315, 0.105, 0.105, 0.105]),
619
- flow: Object.freeze([0.3, 0.3, 0.3, 0.3]),
620
- "vertical-flow": Object.freeze([0.3, 0.3, 0.3, 0.3])
651
+ process: Object.freeze([0.3, 0.3, 0.3, 0.3]),
652
+ "vertical-process": Object.freeze([0.3, 0.3, 0.3, 0.3])
621
653
  });
622
654
  var round2 = (value) => Math.round(value * 1e3) / 1e3;
623
655
  var roundBox2 = (box) => ({ x: round2(box.x), y: round2(box.y), width: round2(box.width), height: round2(box.height) });
@@ -627,7 +659,7 @@ function scaleOf(kind2, count, squeezed) {
627
659
  if (count === 1 && squeezed) return SQUEEZED;
628
660
  const table = SMART_ART_SCALES[kind2];
629
661
  if (count <= table.length) return table[count - 1];
630
- return kind2 === "chevrons" ? 1 / (CHEVRON_STEP * count + 1 - CHEVRON_STEP) : kind2 === "flow" ? 1 / (FLOW_STEP * count + 1 - FLOW_STEP) : 1 / (VERTICAL_FLOW_STEP * count + 1 - VERTICAL_FLOW_STEP);
662
+ return kind2 === "chevrons" ? 1 / (CHEVRON_STEP * count + 1 - CHEVRON_STEP) : kind2 === "process" ? 1 / (FLOW_STEP * count + 1 - FLOW_STEP) : 1 / (VERTICAL_FLOW_STEP * count + 1 - VERTICAL_FLOW_STEP);
631
663
  }
632
664
  function chevronNode(index, box, depth, flip) {
633
665
  const { x, y, width: w, height: h } = box, d = Math.min(depth, w / 2, Math.min(w, h)), ss = Math.min(w, h);
@@ -670,7 +702,7 @@ function chevronNodes(frame, count, rtl = false) {
670
702
  return { nodes, arrows: [] };
671
703
  }
672
704
  function flowNodes(frame, count, rtl = false) {
673
- const n = Math.max(1, Math.floor(count)), w = scaleOf("flow", n, FLOW_HEIGHT * frame.width > frame.height) * frame.width;
705
+ const n = Math.max(1, Math.floor(count)), w = scaleOf("process", n, FLOW_HEIGHT * frame.width > frame.height) * frame.width;
674
706
  const h = Math.min(FLOW_HEIGHT * w, frame.height), x0 = frame.x + (frame.width - w * (FLOW_STEP * n + 1 - FLOW_STEP)) / 2, y = frame.y + (frame.height - h) / 2;
675
707
  const place2 = (box) => rtl ? mirrorBox(box, frame) : box;
676
708
  const nodes = Array.from({ length: n }, (_, index) => boxNode(index, place2({ x: x0 + FLOW_STEP * w * index, y, width: w, height: h }), FLOW_ROUND_ADJUST));
@@ -678,14 +710,14 @@ function flowNodes(frame, count, rtl = false) {
678
710
  return { nodes, arrows };
679
711
  }
680
712
  function verticalFlowNodes(frame, count) {
681
- const n = Math.max(1, Math.floor(count)), h = scaleOf("vertical-flow", n, VERTICAL_FLOW_WIDTH * frame.height > frame.width) * frame.height;
713
+ const n = Math.max(1, Math.floor(count)), h = scaleOf("vertical-process", n, VERTICAL_FLOW_WIDTH * frame.height > frame.width) * frame.height;
682
714
  const w = Math.min(VERTICAL_FLOW_WIDTH * h, frame.width), y0 = frame.y + (frame.height - h * (VERTICAL_FLOW_STEP * n + 1 - VERTICAL_FLOW_STEP)) / 2, x = frame.x + (frame.width - w) / 2;
683
715
  const nodes = Array.from({ length: n }, (_, index) => boxNode(index, { x, y: y0 + VERTICAL_FLOW_STEP * h * index, width: w, height: h }, FLOW_ROUND_ADJUST));
684
716
  const arrows = Array.from({ length: n - 1 }, (_, index) => arrow(index, { x: frame.x + frame.width / 2 - 0.1875 * h, y: y0 + VERTICAL_FLOW_STEP * h * index + 1.025 * h, width: 0.375 * h, height: 0.45 * h }, 90));
685
717
  return { nodes, arrows };
686
718
  }
687
719
  function linearNodes(kind2, frame, count, rtl = false) {
688
- return kind2 === "chevrons" ? chevronNodes(frame, count, rtl) : kind2 === "flow" ? flowNodes(frame, count, rtl) : verticalFlowNodes(frame, count);
720
+ return kind2 === "chevrons" ? chevronNodes(frame, count, rtl) : kind2 === "process" ? flowNodes(frame, count, rtl) : verticalFlowNodes(frame, count);
689
721
  }
690
722
  var COMPACT_ROOM = 2;
691
723
  var COMPACT_COLUMN_ROOM = 1.25;
@@ -700,8 +732,8 @@ var OPF_COLUMN_ARROW_LENGTH = 0.375;
700
732
  var OPF_COLUMN_ARROW_THICKNESS = 0.45;
701
733
  var OPF_COLUMN_ROOM = 0.5;
702
734
  var OPF_CHEVRON_DEPTH = 0.2;
703
- var OPF_LEAST = Object.freeze({ chevrons: 0.4, flow: 0.6, "vertical-flow": 1 / 1.8 });
704
- var OPF_MOST = Object.freeze({ chevrons: 0.8, flow: 1.25, "vertical-flow": 1 });
735
+ var OPF_LEAST = Object.freeze({ chevrons: 0.4, process: 0.6, "vertical-process": 1 / 1.8 });
736
+ var OPF_MOST = Object.freeze({ chevrons: 0.8, process: 1.25, "vertical-process": 1 });
705
737
  var BOX_TEXT_INSET = ROUND_RECT_TEXT_INSET2 * FLOW_ROUND_ADJUST / 1e5;
706
738
  function split(count, lines) {
707
739
  return Array.from({ length: lines }, (_, line2) => Math.floor(count / lines) + (line2 < count % lines ? 1 : 0));
@@ -710,12 +742,12 @@ function linearDesign(kind2, area2, count, gap, rtl = false, lines = 1, need, co
710
742
  const n = Math.max(1, Math.floor(count)), wrap = Math.max(1, Math.min(Math.floor(lines), n)), counts = split(n, wrap), most = counts[0];
711
743
  const nodes = [], arrows = [];
712
744
  const place2 = (box) => rtl ? mirrorBox(box, area2) : box, turn = (rotation) => rtl ? rotation === 0 ? 180 : rotation === 180 ? 0 : rotation : rotation;
713
- if (kind2 === "vertical-flow") {
745
+ if (kind2 === "vertical-process") {
714
746
  const between = 2 * gap, width = (area2.width - (wrap - 1) * between) / wrap;
715
747
  if (width <= 0) return void 0;
716
748
  const fixed2 = compact ? COMPACT_COLUMN_ROOM * gap : 0;
717
- const tallest2 = Math.min(compact ? (area2.height - (most - 1) * fixed2) / most : area2.height / (most + OPF_COLUMN_ROOM * (most - 1)), OPF_MOST["vertical-flow"] * width);
718
- const least2 = compact ? 0 : Math.min(tallest2, OPF_LEAST["vertical-flow"] * width);
749
+ const tallest2 = Math.min(compact ? (area2.height - (most - 1) * fixed2) / most : area2.height / (most + OPF_COLUMN_ROOM * (most - 1)), OPF_MOST["vertical-process"] * width);
750
+ const least2 = compact ? 0 : Math.min(tallest2, OPF_LEAST["vertical-process"] * width);
719
751
  if (tallest2 <= 0) return void 0;
720
752
  const h2 = need === void 0 ? tallest2 : Math.min(tallest2, Math.max(least2, need / (1 - 2 * BOX_TEXT_INSET))), room2 = compact ? fixed2 : OPF_COLUMN_ROOM * h2;
721
753
  const span = most * h2 + (most - 1) * room2, y02 = area2.y + (area2.height - span) / 2;
@@ -1059,7 +1091,7 @@ function opfLayoutGeometry(recipe, count) {
1059
1091
  case "card-grid":
1060
1092
  return grid(count, recipe.columns ?? Math.ceil(Math.sqrt(count)));
1061
1093
  default: {
1062
- const kind2 = recipe.design === "chevron-rows" ? "chevrons" : recipe.design === "flow-rows" ? "flow" : "vertical-flow";
1094
+ const kind2 = recipe.design === "chevron-rows" ? "chevrons" : recipe.design === "flow-rows" ? "process" : "vertical-process";
1063
1095
  return linearDesign(kind2, area2, count, gap, rtl, Math.min(recipe.lines ?? 1, count), recipe.need, recipe.compact === true) ?? linearDesign(kind2, area2, count, gap, rtl, 1, recipe.need, recipe.compact === true);
1064
1096
  }
1065
1097
  }
@@ -1072,8 +1104,8 @@ var OPF_LAYOUT_KIND = Object.freeze({
1072
1104
  "matrix-quadrants": "matrix",
1073
1105
  "card-grid": "matrix",
1074
1106
  "chevron-rows": "chevrons",
1075
- "flow-rows": "flow",
1076
- "vertical-flow-columns": "vertical-flow"
1107
+ "flow-rows": "process",
1108
+ "vertical-flow-columns": "vertical-process"
1077
1109
  });
1078
1110
  var SMART_ART_OPF_DOMAIN = Object.freeze({
1079
1111
  /**
@@ -1609,9 +1641,9 @@ function formatNumber(value, language, options = {}) {
1609
1641
  const rounded = Number(value.toPrecision(12));
1610
1642
  return localizeNumberText(String(Object.is(rounded, -0) ? 0 : rounded), language, options);
1611
1643
  }
1612
- function localizeNumberText(plain2, language, options = {}) {
1613
- if (/e/i.test(plain2)) return localizeDigits(plain2, language).replace(".", localeOf(language).decimal);
1614
- const negative = plain2.startsWith("-"), [integer = "0", fraction] = (negative ? plain2.slice(1) : plain2).split(".");
1644
+ function localizeNumberText(plain3, language, options = {}) {
1645
+ if (/e/i.test(plain3)) return localizeDigits(plain3, language).replace(".", localeOf(language).decimal);
1646
+ const negative = plain3.startsWith("-"), [integer = "0", fraction] = (negative ? plain3.slice(1) : plain3).split(".");
1615
1647
  return localizeNumberParts({ negative, integer, ...fraction ? { fraction } : {}, group: options.group === true }, language);
1616
1648
  }
1617
1649
  function formatPercentNumber(percent, language) {
@@ -1904,14 +1936,9 @@ function chartNumberLanguage(chart, language) {
1904
1936
  // src/chart-reference-types.ts
1905
1937
  var CHART_REFERENCE_TYPES = /* @__PURE__ */ new Set(["column", "bar", "line", "line-with-markers", "area", "combo"]);
1906
1938
 
1907
- // src/content-walk.ts
1908
- function isRecord(value) {
1909
- return typeof value === "object" && value !== null && !Array.isArray(value);
1910
- }
1911
- function pathFor(parentPath, key) {
1912
- return parentPath === "/" ? `/${key}` : `${parentPath}/${key.replaceAll("~", "~0").replaceAll("/", "~1")}`;
1913
- }
1914
- var promotedRegionKeys = [
1939
+ // src/grid-cells.ts
1940
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1941
+ var gridCells = [
1915
1942
  "start",
1916
1943
  "center",
1917
1944
  "end",
@@ -1961,6 +1988,68 @@ var promotedRegionKeys = [
1961
1988
  "top+middle+bottom:center+end",
1962
1989
  "top+middle+bottom:start+center+end"
1963
1990
  ];
1991
+ var GRID_CELLS = new Set(gridCells);
1992
+ var GRID_ROWS = ["top", "middle", "bottom"];
1993
+ var GRID_COLUMNS = ["start", "center", "end"];
1994
+ function isGridCell(value) {
1995
+ return typeof value === "string" && GRID_CELLS.has(value);
1996
+ }
1997
+ function gridCellSpan(cell) {
1998
+ if (!GRID_CELLS.has(cell)) return void 0;
1999
+ const indices = (part, words2) => part.split("+").map((word) => words2.indexOf(word));
2000
+ const [first = "", second] = cell.split(":");
2001
+ if (second !== void 0) return { rows: indices(first, GRID_ROWS), columns: indices(second, GRID_COLUMNS) };
2002
+ return GRID_COLUMNS.includes(first.split("+")[0] ?? "") ? { rows: [0, 1, 2], columns: indices(first, GRID_COLUMNS) } : { rows: indices(first, GRID_ROWS), columns: [0, 1, 2] };
2003
+ }
2004
+ function cellBlocks(slide) {
2005
+ if (slide.layout !== void 0 || !Array.isArray(slide.blocks)) return void 0;
2006
+ const found = [];
2007
+ for (const [index, block] of slide.blocks.entries()) {
2008
+ if (!isRecord(block)) continue;
2009
+ if (!isGridCell(block.region)) return void 0;
2010
+ found.push({ cell: block.region, index, block });
2011
+ }
2012
+ return found.length ? found : void 0;
2013
+ }
2014
+ function cellsInReadingOrder(entries) {
2015
+ const cells = [...new Set(entries.map((entry) => entry.cell))];
2016
+ const at3 = (cell) => gridCellSpan(cell) ?? { rows: [3], columns: [3] };
2017
+ return cells.sort((a, b) => Math.min(...at3(a).rows) - Math.min(...at3(b).rows) || Math.min(...at3(a).columns) - Math.min(...at3(b).columns));
2018
+ }
2019
+ var logicalCell = (name) => name.split(":").map((part) => part.split("+").map((word) => word === "left" ? "start" : word === "right" ? "end" : word).join("+")).join(":");
2020
+ function nearestGridCell(typed) {
2021
+ if (isGridCell(typed)) return { cell: typed };
2022
+ const logical = logicalCell(typed);
2023
+ if (isGridCell(logical)) return { cell: logical, help: `Write "${logical}": layout words follow the deck's direction, so the sides are "start" and "end", not "left" and "right".` };
2024
+ const halves = logical.split(":");
2025
+ if (halves.length > 2 || halves.some((half) => half === "")) return void 0;
2026
+ const words2 = halves.map((half) => half.split("+"));
2027
+ if (!words2.every((list) => list.every((word) => GRID_ROWS.includes(word) || GRID_COLUMNS.includes(word)))) return void 0;
2028
+ const isRows = (list) => list.every((word) => GRID_ROWS.includes(word)), isColumns = (list) => list.every((word) => GRID_COLUMNS.includes(word));
2029
+ if (words2.some((list) => !isRows(list) && !isColumns(list))) return { help: 'A cell does not mix rows (top, middle, bottom) and columns (start, center, end) in one half: write rows, a colon, then columns, such as "top:start" or "middle+bottom:center+end".' };
2030
+ if (words2.length === 2 && isColumns(words2[0]) && isRows(words2[1])) {
2031
+ const swapped = `${halves[1]}:${halves[0]}`;
2032
+ return isGridCell(swapped) ? { cell: swapped, help: `Rows come before the colon and columns after it: write "${swapped}".` } : { help: 'Rows come before the colon and columns after it, such as "top:start" or "middle+bottom:center+end".' };
2033
+ }
2034
+ if (words2.length === 2 && (!isRows(words2[0]) || !isColumns(words2[1]))) return { help: 'A cell with a colon names rows before it and columns after it, such as "top:start" or "middle+bottom:center+end".' };
2035
+ const order = (list, vocabulary2) => [...new Set(list)].map((word) => vocabulary2.indexOf(word)).sort((x, y) => x - y);
2036
+ const hasRows = words2.length === 2 || isRows(words2[0]), hasColumns = words2.length === 2 || isColumns(words2[0]);
2037
+ const rows3 = hasRows ? order(words2[0], GRID_ROWS) : [], columns2 = hasColumns ? order(words2[words2.length - 1], GRID_COLUMNS) : [];
2038
+ const adjacent = (indexes) => indexes.every((index, at3) => at3 === 0 || index === indexes[at3 - 1] + 1);
2039
+ if (hasRows && !adjacent(rows3) || hasColumns && !adjacent(columns2))
2040
+ return { help: 'A span covers adjacent rows or columns: "top+bottom" and "start+end" skip the middle one. Write "top+middle+bottom" or "start+center+end", or use one cell for each part.' };
2041
+ const canonical = (indexes, vocabulary2) => indexes.map((index) => vocabulary2[index]).join("+");
2042
+ const cell = words2.length === 2 ? `${canonical(rows3, GRID_ROWS)}:${canonical(columns2, GRID_COLUMNS)}` : hasRows ? canonical(rows3, GRID_ROWS) : canonical(columns2, GRID_COLUMNS);
2043
+ return isGridCell(cell) ? { cell, help: `Write "${cell}": the names of a span go in reading order (top, middle, bottom; start, center, end), rows before the colon and columns after it.` } : void 0;
2044
+ }
2045
+
2046
+ // src/content-walk.ts
2047
+ function isRecord2(value) {
2048
+ return typeof value === "object" && value !== null && !Array.isArray(value);
2049
+ }
2050
+ function pathFor(parentPath, key) {
2051
+ return parentPath === "/" ? `/${key}` : `${parentPath}/${key.replaceAll("~", "~0").replaceAll("/", "~1")}`;
2052
+ }
1964
2053
  function visitContentPayloads(slide, slidePath, visit) {
1965
2054
  const walk2 = (payload, path, depth, ancestors) => {
1966
2055
  visit(payload, path);
@@ -1968,19 +2057,15 @@ function visitContentPayloads(slide, slidePath, visit) {
1968
2057
  const nested = [...ancestors, payload];
1969
2058
  const blocksPath = pathFor(path, "blocks");
1970
2059
  payload.blocks.forEach((block, index) => {
1971
- if (isRecord(block)) walk2(block, `${blocksPath}/${index}`, depth + 1, nested);
2060
+ if (isRecord2(block)) walk2(block, `${blocksPath}/${index}`, depth + 1, nested);
1972
2061
  });
1973
2062
  };
1974
2063
  if (Array.isArray(slide.blocks)) {
1975
2064
  const blocksPath = pathFor(slidePath, "blocks");
1976
2065
  slide.blocks.forEach((block, index) => {
1977
- if (isRecord(block)) walk2(block, `${blocksPath}/${index}`, 0, []);
2066
+ if (isRecord2(block)) walk2(block, `${blocksPath}/${index}`, 0, []);
1978
2067
  });
1979
2068
  }
1980
- for (const key of promotedRegionKeys) {
1981
- const region = slide[key];
1982
- if (isRecord(region)) walk2(region, pathFor(slidePath, key), 0, []);
1983
- }
1984
2069
  }
1985
2070
 
1986
2071
  // src/furniture-fields.ts
@@ -2075,13 +2160,13 @@ function formatFurnitureDate(iso, pattern) {
2075
2160
 
2076
2161
  // src/deck-metadata.ts
2077
2162
  function recordsOf(value) {
2078
- return (Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value]).filter(isRecord);
2163
+ return (Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value]).filter(isRecord2);
2079
2164
  }
2080
2165
  function speakersOf(presentation) {
2081
- return isRecord(presentation) ? recordsOf(presentation.speaker) : [];
2166
+ return isRecord2(presentation) ? recordsOf(presentation.speaker) : [];
2082
2167
  }
2083
2168
  function organizationsOf(presentation) {
2084
- return isRecord(presentation) ? recordsOf(presentation.organization) : [];
2169
+ return isRecord2(presentation) ? recordsOf(presentation.organization) : [];
2085
2170
  }
2086
2171
  function primarySpeaker(presentation) {
2087
2172
  return speakersOf(presentation)[0];
@@ -2118,18 +2203,18 @@ function logoReferenceName(reference, shape = reference.shape) {
2118
2203
  return `organization${reference.organization !== void 0 ? `.${reference.organization}` : ""}.logo${shape && shape !== "full" ? `.${shape}` : ""}`;
2119
2204
  }
2120
2205
  function organizationIndex(presentation, id) {
2121
- if (!isRecord(presentation)) return -1;
2206
+ if (!isRecord2(presentation)) return -1;
2122
2207
  const raw = presentation.organization;
2123
2208
  const list = Array.isArray(raw) ? raw : [raw];
2124
- if (id !== void 0) return list.findIndex((entry) => isRecord(entry) && entry.id === id);
2125
- const primary = list.findIndex((entry) => isRecord(entry) && entry.role === "primary");
2126
- return primary >= 0 ? primary : list.findIndex((entry) => isRecord(entry));
2209
+ if (id !== void 0) return list.findIndex((entry) => isRecord2(entry) && entry.id === id);
2210
+ const primary = list.findIndex((entry) => isRecord2(entry) && entry.role === "primary");
2211
+ return primary >= 0 ? primary : list.findIndex((entry) => isRecord2(entry));
2127
2212
  }
2128
2213
  var usable = (value) => {
2129
- const source = typeof value === "string" ? value : isRecord(value) ? value.src : void 0;
2214
+ const source = typeof value === "string" ? value : isRecord2(value) ? value.src : void 0;
2130
2215
  return typeof source === "string" && source.trim().length > 0;
2131
2216
  };
2132
- var isAsset = (value) => typeof value === "string" || isRecord(value) && "src" in value;
2217
+ var isAsset = (value) => typeof value === "string" || isRecord2(value) && "src" in value;
2133
2218
  function shapeChain(shape) {
2134
2219
  const chain = [shape, "full", "wordmark", "stacked", "icon"];
2135
2220
  return chain.filter((entry, index) => chain.indexOf(entry) === index);
@@ -2137,7 +2222,7 @@ function shapeChain(shape) {
2137
2222
  function pickOrganizationLogo(logo, shape, onDark, root) {
2138
2223
  if (logo === void 0 || logo === null) return null;
2139
2224
  if (isAsset(logo)) return usable(logo) ? { source: logo, path: `${root}.logo`, variant: "default" } : null;
2140
- if (!isRecord(logo)) return null;
2225
+ if (!isRecord2(logo)) return null;
2141
2226
  const tones = onDark ? ["onDark", "onLight"] : ["onLight", "onDark"];
2142
2227
  for (const candidate of shapeChain(shape)) {
2143
2228
  const entry = logo[candidate];
@@ -2146,7 +2231,7 @@ function pickOrganizationLogo(logo, shape, onDark, root) {
2146
2231
  if (usable(entry)) return { source: entry, path: `${root}.logo.${candidate}`, variant: "default" };
2147
2232
  continue;
2148
2233
  }
2149
- if (!isRecord(entry)) continue;
2234
+ if (!isRecord2(entry)) continue;
2150
2235
  for (const tone of tones) if (usable(entry[tone])) return { source: entry[tone], path: `${root}.logo.${candidate}.${tone}`, variant: tone };
2151
2236
  }
2152
2237
  return null;
@@ -2181,8 +2266,8 @@ function resolveLogo(presentation, slide, options = {}) {
2181
2266
  }
2182
2267
  const slideIndex = Number.isSafeInteger(options.slideIndex) && options.slideIndex >= 0 ? options.slideIndex : 0;
2183
2268
  const levels = [
2184
- [isRecord(slide) && isRecord(slide.design) ? slide.design.logo : void 0, `slides.${slideIndex}.design.logo`],
2185
- [isRecord(presentation) && isRecord(presentation.design) ? presentation.design.logo : void 0, "design.logo"]
2269
+ [isRecord2(slide) && isRecord2(slide.design) ? slide.design.logo : void 0, `slides.${slideIndex}.design.logo`],
2270
+ [isRecord2(presentation) && isRecord2(presentation.design) ? presentation.design.logo : void 0, "design.logo"]
2186
2271
  ];
2187
2272
  for (const [value, path] of levels) {
2188
2273
  if (value === false) return null;
@@ -2211,7 +2296,7 @@ function slideTokenFollows(text2) {
2211
2296
  return slideTokenAhead.test(text2);
2212
2297
  }
2213
2298
  function checkValues(values) {
2214
- if (!isRecord(values)) throw new TypeError("Slide variable values must be an object with slideNumber and slideCount.");
2299
+ if (!isRecord2(values)) throw new TypeError("Slide variable values must be an object with slideNumber and slideCount.");
2215
2300
  if (!Number.isSafeInteger(values.slideNumber) || values.slideNumber < 1) throw new RangeError("slideNumber must be a positive safe integer.");
2216
2301
  if (values.slideCount !== void 0 && (!Number.isSafeInteger(values.slideCount) || values.slideCount < 1)) throw new RangeError("slideCount must be a positive safe integer.");
2217
2302
  }
@@ -2275,13 +2360,13 @@ function substitute(value, values, root, logos = {}) {
2275
2360
  }
2276
2361
  return changed2 ? out2 : value;
2277
2362
  }
2278
- if (!isRecord(value)) return value;
2363
+ if (!isRecord2(value)) return value;
2279
2364
  let changed = false;
2280
2365
  const out = {};
2281
2366
  for (const [key, entry] of Object.entries(value)) {
2282
2367
  let next = entry;
2283
2368
  if (skippedKeys.has(key)) next = entry;
2284
- else if (root && key === "design" && isRecord(entry)) {
2369
+ else if (root && key === "design" && isRecord2(entry)) {
2285
2370
  const design = {};
2286
2371
  let designChanged = false;
2287
2372
  for (const [designKey, designEntry] of Object.entries(entry)) {
@@ -2297,7 +2382,7 @@ function substitute(value, values, root, logos = {}) {
2297
2382
  return changed ? out : value;
2298
2383
  }
2299
2384
  function resolveSlideVariables(slide, values) {
2300
- if (!isRecord(slide)) return slide;
2385
+ if (!isRecord2(slide)) return slide;
2301
2386
  const full = { slideNumber: values?.slideNumber, ...values?.slideCount !== void 0 ? { slideCount: values.slideCount } : {}, section: slide.section };
2302
2387
  checkValues(full);
2303
2388
  const logos = values.presentation !== void 0 ? { presentation: values.presentation, darkBackground: values.darkBackground === true } : {};
@@ -2310,7 +2395,7 @@ function usesSlideBuiltin(value, name) {
2310
2395
  const visit = (entry) => {
2311
2396
  if (typeof entry === "string") return entry.includes("{{") && pattern.test(entry);
2312
2397
  if (Array.isArray(entry)) return entry.some(visit);
2313
- if (!isRecord(entry)) return false;
2398
+ if (!isRecord2(entry)) return false;
2314
2399
  for (const [key, child] of Object.entries(entry)) if (!skippedKeys.has(key) && visit(child)) return true;
2315
2400
  return false;
2316
2401
  };
@@ -2351,7 +2436,7 @@ var SAMPLES = {
2351
2436
  var hasOwn = (value, key) => Object.hasOwn(value, key);
2352
2437
  var clone2 = (value) => value === void 0 ? value : JSON.parse(JSON.stringify(value));
2353
2438
  function isTemplate(presentation) {
2354
- return isRecord(presentation) && presentation.template === true;
2439
+ return isRecord2(presentation) && presentation.template === true;
2355
2440
  }
2356
2441
  function isKind(value) {
2357
2442
  return typeof value === "string" && VARIABLE_KINDS.includes(value);
@@ -2365,7 +2450,7 @@ function coerceVariableValue(kind2, raw) {
2365
2450
  if (typeof raw === "string") return { ok: true, value: raw };
2366
2451
  if (typeof raw === "number" && Number.isFinite(raw)) return { ok: true, value: String(raw) };
2367
2452
  if (typeof raw === "boolean") return { ok: true, value: String(raw) };
2368
- if (Array.isArray(raw) && raw.every((run) => typeof run === "string" || isRecord(run) && typeof run.text === "string")) return { ok: true, value: clone2(raw) };
2453
+ if (Array.isArray(raw) && raw.every((run) => typeof run === "string" || isRecord2(run) && typeof run.text === "string")) return { ok: true, value: clone2(raw) };
2369
2454
  return fail("expected text: a string or an array of text runs");
2370
2455
  }
2371
2456
  case "number": {
@@ -2385,7 +2470,7 @@ function coerceVariableValue(kind2, raw) {
2385
2470
  }
2386
2471
  case "image": {
2387
2472
  if (typeof raw === "string" && raw.trim()) return { ok: true, value: raw.trim() };
2388
- if (isRecord(raw) && typeof raw.src === "string" && raw.src.trim()) return { ok: true, value: clone2(raw) };
2473
+ if (isRecord2(raw) && typeof raw.src === "string" && raw.src.trim()) return { ok: true, value: clone2(raw) };
2389
2474
  return fail("expected an image source: a string or an object with src");
2390
2475
  }
2391
2476
  case "url":
@@ -2408,7 +2493,7 @@ function isProvided(kind2, raw) {
2408
2493
  return true;
2409
2494
  }
2410
2495
  function variableDeclarations(presentation) {
2411
- if (!isRecord(presentation) || !isRecord(presentation.variables)) return [];
2496
+ if (!isRecord2(presentation) || !isRecord2(presentation.variables)) return [];
2412
2497
  const out = [];
2413
2498
  for (const [id, entry] of Object.entries(presentation.variables)) {
2414
2499
  if (!idPattern.test(id)) continue;
@@ -2417,7 +2502,7 @@ function variableDeclarations(presentation) {
2417
2502
  if (hexPattern.test(entry)) out.push({ id, kind: "color", path, required: true, value: entry });
2418
2503
  continue;
2419
2504
  }
2420
- if (!isRecord(entry) || !isKind(entry.type)) continue;
2505
+ if (!isRecord2(entry) || !isKind(entry.type)) continue;
2421
2506
  const kind2 = entry.type;
2422
2507
  const declaration = { id, kind: kind2, path, required: entry.required !== false };
2423
2508
  const value = entry.value !== void 0 ? coerceVariableValue(kind2, entry.value) : void 0;
@@ -2434,7 +2519,7 @@ function variableDeclarations(presentation) {
2434
2519
  function usesBuiltins(value, root = true) {
2435
2520
  if (typeof value === "string") return value.length >= 6 && builtinUsePattern.test(value);
2436
2521
  if (Array.isArray(value)) return value.some((entry) => usesBuiltins(entry, false));
2437
- if (!isRecord(value)) return false;
2522
+ if (!isRecord2(value)) return false;
2438
2523
  for (const [key, entry] of Object.entries(value)) {
2439
2524
  if (skippedKeys2.has(key) || root && skippedRootKeys.has(key)) continue;
2440
2525
  if (usesBuiltins(entry, false)) return true;
@@ -2453,9 +2538,31 @@ function formatVariableNumber(value, pattern, language) {
2453
2538
  return { text: language === void 0 ? `${parts.negative ? "-" : ""}${parts.prefix}${parts.body}${parts.suffix}` : localizePatternNumber(parts, language) };
2454
2539
  }
2455
2540
  function patternNumberParts(value, pattern) {
2541
+ const sections = pattern.split(";");
2542
+ if (sections.length > 3) return { error: `Number format '${pattern}' has ${sections.length} sections; a format has at most three (positive;negative;zero).` };
2543
+ if (sections.length === 1) return sectionNumberParts(value, pattern, pattern);
2544
+ for (const section of sections) {
2545
+ const checked2 = sectionNumberParts(0, section, pattern);
2546
+ if ("error" in checked2) return checked2;
2547
+ }
2548
+ if (value < 0) return sectionNumberParts(Math.abs(value), sections[1], pattern);
2549
+ if (value === 0 && sections.length === 3) return sectionNumberParts(0, sections[2], pattern);
2550
+ return sectionNumberParts(value, sections[0], pattern);
2551
+ }
2552
+ function hasNumberFormatSections(pattern) {
2553
+ return typeof pattern === "string" && pattern.includes(";");
2554
+ }
2555
+ function numberFormatSectionFor(pattern, value) {
2556
+ const sections = pattern.split(";");
2557
+ if (sections.length === 1) return pattern;
2558
+ if (value < 0) return sections[1] ?? pattern;
2559
+ if (value === 0 && sections.length === 3) return sections[2] ?? pattern;
2560
+ return sections[0] ?? pattern;
2561
+ }
2562
+ function sectionNumberParts(value, pattern, whole) {
2456
2563
  const match = /^([^#0,.]*)((?:[#0,]*)(?:\.[#0]+)?)([\s\S]*)$/.exec(pattern);
2457
2564
  const numeric = match?.[2] ?? "";
2458
- if (!match || !/[#0]/.test(numeric)) return { error: `Number format '${pattern}' needs a numeric part of '#' and '0' characters.` };
2565
+ if (!match || !/[#0]/.test(numeric)) return { error: `Number format '${whole}' needs a numeric part of '#' and '0' characters.` };
2459
2566
  const prefix = match[1] ?? "";
2460
2567
  const suffix = match[3] ?? "";
2461
2568
  const [integerPattern = "", decimalPattern2 = ""] = numeric.split(".");
@@ -2463,9 +2570,9 @@ function patternNumberParts(value, pattern) {
2463
2570
  const minInteger = [...integerPattern].filter((char) => char === "0").length;
2464
2571
  const minDecimals = [...decimalPattern2].filter((char) => char === "0").length;
2465
2572
  const maxDecimals = decimalPattern2.length;
2466
- if (maxDecimals > 100) return { error: `Number format '${pattern}' supports at most 100 decimal places.` };
2573
+ if (maxDecimals > 100) return { error: `Number format '${whole}' supports at most 100 decimal places.` };
2467
2574
  const scaled = prefix.includes("%") || suffix.includes("%") ? value * 100 : value;
2468
- if (!Number.isFinite(scaled)) return { error: `Number format '${pattern}' scales the value beyond the finite number range.` };
2575
+ if (!Number.isFinite(scaled)) return { error: `Number format '${whole}' scales the value beyond the finite number range.` };
2469
2576
  const absolute = Math.abs(scaled);
2470
2577
  let fixed;
2471
2578
  const shifted = Number(`${absolute}e${maxDecimals}`);
@@ -2497,7 +2604,7 @@ function sampleValue(declaration) {
2497
2604
  }
2498
2605
  function plainText(value) {
2499
2606
  if (typeof value === "string") return value;
2500
- if (Array.isArray(value)) return value.map((run) => typeof run === "string" ? run : isRecord(run) && typeof run.text === "string" ? run.text : "").join("");
2607
+ if (Array.isArray(value)) return value.map((run) => typeof run === "string" ? run : isRecord2(run) && typeof run.text === "string" ? run.text : "").join("");
2501
2608
  return "";
2502
2609
  }
2503
2610
  var ADDRESS_KEYS = /* @__PURE__ */ new Set(["href", "url", "link", "src", "id", "alt", "altText"]);
@@ -2538,7 +2645,7 @@ function inlineText(effective, format, path, context) {
2538
2645
  return formatted.text;
2539
2646
  }
2540
2647
  case "image":
2541
- return isRecord(value) ? String(value.src) : String(value);
2648
+ return isRecord2(value) ? String(value.src) : String(value);
2542
2649
  case "list":
2543
2650
  return value.join(format ?? ", ");
2544
2651
  }
@@ -2554,7 +2661,7 @@ function builtinFields(root) {
2554
2661
  }
2555
2662
  function present(value) {
2556
2663
  if (typeof value === "string") return value.trim() === "" ? void 0 : value;
2557
- if (isRecord(value)) return typeof value.src === "string" && value.src.trim() ? value : void 0;
2664
+ if (isRecord2(value)) return typeof value.src === "string" && value.src.trim() ? value : void 0;
2558
2665
  return void 0;
2559
2666
  }
2560
2667
  function builtinSource(name, doc) {
@@ -2749,7 +2856,7 @@ function subtreeVariables(value, path, context, found = /* @__PURE__ */ new Map(
2749
2856
  return found;
2750
2857
  }
2751
2858
  if (Array.isArray(value)) for (const [index, entry] of value.entries()) subtreeVariables(entry, `${path}/${index}`, context, found);
2752
- else if (isRecord(value)) {
2859
+ else if (isRecord2(value)) {
2753
2860
  for (const [key, entry] of Object.entries(value)) if (!skippedKeys2.has(key)) subtreeVariables(entry, pathFor(path, key), context, found);
2754
2861
  }
2755
2862
  return found;
@@ -2764,7 +2871,7 @@ function anchoredIds(value, path, context) {
2764
2871
  const shapes = context.doc.slides?.[Number(path.split("/")[2])]?.shapes;
2765
2872
  const own3 = /* @__PURE__ */ new Set();
2766
2873
  const collect = (node, depth) => {
2767
- if (isRecord(node) && depth < 64) {
2874
+ if (isRecord2(node) && depth < 64) {
2768
2875
  own3.add(node.id);
2769
2876
  if (Array.isArray(node.blocks)) for (const child of node.blocks) collect(child, depth + 1);
2770
2877
  }
@@ -2813,7 +2920,7 @@ function walk(value, path, parentIsArray, context) {
2813
2920
  });
2814
2921
  return changed ? out : value;
2815
2922
  }
2816
- if (isRecord(value)) {
2923
+ if (isRecord2(value)) {
2817
2924
  if (omittedGroup(value, path, context) && !context.shape) return OMIT2;
2818
2925
  let changed = false;
2819
2926
  const entries = [];
@@ -2898,7 +3005,7 @@ function plan(presentation, values, options) {
2898
3005
  }
2899
3006
  function rebuildVariables(presentation, built, keepAll) {
2900
3007
  const source = presentation.variables;
2901
- if (!isRecord(source)) return void 0;
3008
+ if (!isRecord2(source)) return void 0;
2902
3009
  const out = [];
2903
3010
  for (const [id, entry] of Object.entries(source)) {
2904
3011
  const effective = built.context.effective.get(id);
@@ -2916,7 +3023,7 @@ function rebuildVariables(presentation, built, keepAll) {
2916
3023
  out.push([id, entry]);
2917
3024
  continue;
2918
3025
  }
2919
- const base = isRecord(entry) ? entry : {};
3026
+ const base = isRecord2(entry) ? entry : {};
2920
3027
  const { example: _example, required: _required, label: _label, ...rest } = base;
2921
3028
  out.push([id, { ...rest, type: "color", value: color }]);
2922
3029
  }
@@ -2927,9 +3034,9 @@ function slideSectionDiagnostics(presentation, uses) {
2927
3034
  if (!paths.length || !Array.isArray(presentation.slides)) return [];
2928
3035
  const out = [];
2929
3036
  presentation.slides.forEach((slide, index) => {
2930
- if (!isRecord(slide) || typeof slide.section === "string" && slide.section !== "") return;
3037
+ if (!isRecord2(slide) || typeof slide.section === "string" && slide.section !== "") return;
2931
3038
  const own3 = `/slides/${index}/`;
2932
- const design = isRecord(slide.design) ? slide.design : {};
3039
+ const design = isRecord2(slide.design) ? slide.design : {};
2933
3040
  const inherited = ["header", "footer"].filter((kind2) => design[kind2] === void 0).map((kind2) => `/design/${kind2}/`);
2934
3041
  const where = paths.find((path) => path.startsWith(own3) || inherited.some((prefix) => path.startsWith(prefix)));
2935
3042
  if (where === void 0) return;
@@ -2961,8 +3068,8 @@ function finish(presentation, built, options) {
2961
3068
  return { presentation: result, diagnostics, unfilled: built.unfilled, examplesUsed: built.examplesUsed, complete };
2962
3069
  }
2963
3070
  function resolveVariables(presentation, values = {}, options = {}) {
2964
- if (!isRecord(presentation)) throw new TypeError("resolveVariables expects a presentation object.");
2965
- if (!isRecord(values)) throw new TypeError("resolveVariables values must be an object keyed by variable id.");
3071
+ if (!isRecord2(presentation)) throw new TypeError("resolveVariables expects a presentation object.");
3072
+ if (!isRecord2(values)) throw new TypeError("resolveVariables values must be an object keyed by variable id.");
2966
3073
  const built = plan(presentation, values, options);
2967
3074
  if (!built.context.content && built.providedColors.size === 0 && built.context.diagnostics.length === 0) {
2968
3075
  return { presentation, diagnostics: [], unfilled: built.unfilled, examplesUsed: [], complete: built.unfilled.length === 0 };
@@ -2985,8 +3092,8 @@ function instantiateForValidation(presentation, values = {}, template) {
2985
3092
  return finish(presentation, plan(presentation, values, options), options);
2986
3093
  }
2987
3094
  function listVariables(presentation, values = {}) {
2988
- if (!isRecord(presentation)) return [];
2989
- const built = plan(presentation, isRecord(values) ? values : {}, { examples: false, partial: true });
3095
+ if (!isRecord2(presentation)) return [];
3096
+ const built = plan(presentation, isRecord2(values) ? values : {}, { examples: false, partial: true });
2990
3097
  built.context.shape = true;
2991
3098
  built.context.content = true;
2992
3099
  walk(presentation, "", false, built.context);
@@ -3003,7 +3110,7 @@ function listVariables(presentation, values = {}) {
3003
3110
  var SLIDE_SCOPED_LABELS = { "slide.number": "Slide number", "slide.section": "Section", "deck.slideCount": "Slide count" };
3004
3111
  var FIELD_LABELS = { name: "name", legalName: "legal name", tagline: "tagline", domain: "domain", email: "email", phone: "phone", logo: "logo", title: "title", bio: "bio", photo: "photo", description: "description", author: "author" };
3005
3112
  function listBuiltinVariables(presentation) {
3006
- if (!isRecord(presentation)) return [];
3113
+ if (!isRecord2(presentation)) return [];
3007
3114
  const names2 = [];
3008
3115
  for (const field of Object.keys(DECK_FIELDS)) names2.push({ name: `deck.${field}`, label: `Deck ${FIELD_LABELS[field]}` });
3009
3116
  for (const field of Object.keys(SPEAKER_FIELDS)) names2.push({ name: `speaker.${field}`, label: `Speaker ${FIELD_LABELS[field]}` });
@@ -3027,7 +3134,7 @@ function listBuiltinVariables(presentation) {
3027
3134
  }
3028
3135
  const slides = Array.isArray(presentation.slides) ? presentation.slides : [];
3029
3136
  for (const name of SLIDE_SCOPED_BUILTINS) {
3030
- const available = name !== "slide.section" || slides.some((slide) => isRecord(slide) && typeof slide.section === "string" && slide.section !== "");
3137
+ const available = name !== "slide.section" || slides.some((slide) => isRecord2(slide) && typeof slide.section === "string" && slide.section !== "");
3031
3138
  out.push({ name, kind: "text", label: SLIDE_SCOPED_LABELS[name], scope: "slide", available, uses: built.context.uses.filter((use) => use.id === name) });
3032
3139
  }
3033
3140
  const logoReferences = [{ reference: {}, label: "Organization" }];
@@ -3121,8 +3228,14 @@ function excelInteger(integer) {
3121
3228
  }
3122
3229
  function toExcelNumberFormat(format) {
3123
3230
  if (format === void 0 || format === "") return "General";
3231
+ const sections = format.split(";");
3232
+ if (sections.length > 3) return "General";
3233
+ const codes = sections.map(excelSection);
3234
+ return codes.includes(void 0) ? "General" : codes.join(";");
3235
+ }
3236
+ function excelSection(format) {
3124
3237
  const parts = formatParts(format);
3125
- if (!parts) return "General";
3238
+ if (!parts) return void 0;
3126
3239
  const percent = { used: false };
3127
3240
  const minDecimals = [...parts.decimals].filter((char) => char === "0").length;
3128
3241
  const decimals = parts.decimals ? `.${"0".repeat(minDecimals)}${"#".repeat(parts.decimals.length - minDecimals)}` : "";
@@ -3161,6 +3274,34 @@ function fromExcelNumberFormat(code) {
3161
3274
  if (typeof code !== "string") return void 0;
3162
3275
  const trimmed = code.trim();
3163
3276
  if (trimmed === "" || /^general$/i.test(trimmed)) return void 0;
3277
+ const sections = excelSections(code);
3278
+ if (!sections || sections.length > 3) return void 0;
3279
+ const formats = sections.map(fromExcelSection);
3280
+ return formats.includes(void 0) ? void 0 : formats.join(";");
3281
+ }
3282
+ function excelSections(code) {
3283
+ const sections = [];
3284
+ let start = 0;
3285
+ for (let i = 0; i < code.length; i++) {
3286
+ const char = code[i];
3287
+ if (char === '"') {
3288
+ const end = code.indexOf('"', i + 1);
3289
+ if (end < 0) return void 0;
3290
+ i = end;
3291
+ } else if (char === "\\") i++;
3292
+ else if (char === "[") {
3293
+ const end = code.indexOf("]", i + 1);
3294
+ if (end < 0) return void 0;
3295
+ i = end;
3296
+ } else if (char === ";") {
3297
+ sections.push(code.slice(start, i));
3298
+ start = i + 1;
3299
+ }
3300
+ }
3301
+ sections.push(code.slice(start));
3302
+ return sections;
3303
+ }
3304
+ function fromExcelSection(code) {
3164
3305
  const tokens = excelTokens(code);
3165
3306
  if (!tokens) return void 0;
3166
3307
  const first = tokens.findIndex((token) => token.kind === "placeholder");
@@ -3183,7 +3324,7 @@ function fromExcelNumberFormat(code) {
3183
3324
  const suffix = literalText(tokens.slice(last + 1));
3184
3325
  const format = `${prefix}${numeric}${suffix}`;
3185
3326
  const parts = formatParts(format);
3186
- if (!parts || parts.prefix !== prefix || parts.suffix !== suffix) return void 0;
3327
+ if (!parts || parts.prefix !== prefix || parts.suffix !== suffix || format.includes(";")) return void 0;
3187
3328
  return format;
3188
3329
  }
3189
3330
  function columnName(column) {
@@ -3684,7 +3825,7 @@ var engineDefaultsSource = {
3684
3825
  "line-with-markers"
3685
3826
  ]
3686
3827
  };
3687
- var engineVocabulariesSource = { "chartTypes": ["100pct-stacked-area", "100pct-stacked-bar", "100pct-stacked-column", "area", "bar", "box-and-whisker", "column", "combo", "doughnut", "filled-radar", "funnel", "histogram", "line", "line-with-markers", "pareto", "pie", "radar", "radar-with-markers", "scatter", "stacked-area", "stacked-bar", "stacked-column", "stacked-line", "stacked-line-with-markers", "treemap", "waterfall", "world"], "socialPlatforms": { "linkedin": { "baseUrl": "https://linkedin.com", "profileUrlPattern": "https://linkedin.com/in/{handle}", "companyUrlPattern": "https://linkedin.com/company/{handle}", "handlePrefix": "" }, "x": { "baseUrl": "https://x.com", "profileUrlPattern": "https://x.com/{handle}", "handlePrefix": "@" }, "github": { "baseUrl": "https://github.com", "profileUrlPattern": "https://github.com/{handle}", "companyUrlPattern": "https://github.com/{handle}", "handlePrefix": "" }, "youtube": { "baseUrl": "https://youtube.com", "profileUrlPattern": "https://youtube.com/@{handle}", "handlePrefix": "@" }, "instagram": { "baseUrl": "https://instagram.com", "profileUrlPattern": "https://instagram.com/{handle}", "handlePrefix": "@" }, "facebook": { "baseUrl": "https://facebook.com", "profileUrlPattern": "https://facebook.com/{handle}", "companyUrlPattern": "https://facebook.com/{handle}", "handlePrefix": "" }, "tiktok": { "baseUrl": "https://tiktok.com", "profileUrlPattern": "https://tiktok.com/@{handle}", "handlePrefix": "@" }, "threads": { "baseUrl": "https://threads.net", "profileUrlPattern": "https://threads.net/@{handle}", "handlePrefix": "@" }, "mastodon": { "baseUrl": "https://mastodon.social", "profileUrlPattern": "https://mastodon.social/@{handle}", "handlePrefix": "@" }, "bluesky": { "baseUrl": "https://bsky.app", "profileUrlPattern": "https://bsky.app/profile/{handle}", "handlePrefix": "" } }, "languages": [{ "tag": "af", "script": "Latn", "direction": "ltr", "ooxmlLang": "af-ZA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sq", "script": "Latn", "direction": "ltr", "ooxmlLang": "sq-AL", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "am", "script": "Ethi", "direction": "ltr", "ooxmlLang": "am-ET", "fonts": { "powerpoint": { "major": "Nyala", "minor": "Nyala" }, "google": { "major": "Noto Sans Ethiopic", "minor": "Noto Sans Ethiopic" } } }, { "tag": "ar", "script": "Arab", "direction": "rtl", "ooxmlLang": "ar-SA", "fonts": { "powerpoint": { "major": "Arabic Typesetting", "minor": "Arabic Typesetting" }, "google": { "major": "Noto Naskh Arabic", "minor": "Noto Naskh Arabic" } }, "timelineStatusWords": { "done": "\u0645\u0643\u062A\u0645\u0644", "current": "\u062D\u0627\u0644\u064A", "planned": "\u0645\u062E\u0637\u0637" } }, { "tag": "hy", "script": "Armn", "direction": "ltr", "ooxmlLang": "hy-AM", "fonts": { "powerpoint": { "major": "Sylfaen", "minor": "Sylfaen" }, "google": { "major": "Noto Sans Armenian", "minor": "Noto Sans Armenian" } } }, { "tag": "ay", "script": "Latn", "direction": "ltr", "ooxmlLang": "ay-BO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "az", "script": "Latn", "direction": "ltr", "ooxmlLang": "az-Latn-AZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "bn", "script": "Beng", "direction": "ltr", "ooxmlLang": "bn-BD", "fonts": { "powerpoint": { "major": "Shonar Bangla", "minor": "Shonar Bangla" }, "google": { "major": "Noto Sans Bengali", "minor": "Noto Sans Bengali" } } }, { "tag": "ber-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "tzm-Latn-DZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "bs-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "bs-Latn-BA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "bg", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "bg-BG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "ca", "script": "Latn", "direction": "ltr", "ooxmlLang": "ca-ES", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ceb", "script": "Latn", "direction": "ltr", "ooxmlLang": "ceb-PH", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "zh-Hans", "script": "Hans", "direction": "ltr", "ooxmlLang": "zh-CN", "fonts": { "powerpoint": { "major": "Microsoft YaHei", "minor": "Microsoft YaHei" }, "google": { "major": "Noto Sans SC", "minor": "Noto Sans SC" } }, "timelineStatusWords": { "done": "\u5DF2\u5B8C\u6210", "current": "\u5F53\u524D", "planned": "\u8BA1\u5212" } }, { "tag": "zh-Hant", "script": "Hant", "direction": "ltr", "ooxmlLang": "zh-TW", "fonts": { "powerpoint": { "major": "Microsoft JhengHei", "minor": "Microsoft JhengHei" }, "google": { "major": "Noto Sans TC", "minor": "Noto Sans TC" } }, "timelineStatusWords": { "done": "\u5DF2\u5B8C\u6210", "current": "\u76EE\u524D", "planned": "\u8A08\u756B" } }, { "tag": "ctg", "script": "Beng", "direction": "ltr", "ooxmlLang": "bn-BD", "fonts": { "powerpoint": { "major": "Vrinda", "minor": "Vrinda" }, "google": { "major": "Noto Sans Bengali", "minor": "Noto Sans Bengali" } } }, { "tag": "hr", "script": "Latn", "direction": "ltr", "ooxmlLang": "hr-HR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "cs", "script": "Latn", "direction": "ltr", "ooxmlLang": "cs-CZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Dokon\u010Deno", "current": "Aktu\xE1ln\xED", "planned": "Pl\xE1nov\xE1no" } }, { "tag": "da", "script": "Latn", "direction": "ltr", "ooxmlLang": "da-DK", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Udf\xF8rt", "current": "Aktuelt", "planned": "Planlagt" } }, { "tag": "nl", "script": "Latn", "direction": "ltr", "ooxmlLang": "nl-NL", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Afgerond", "current": "Huidig", "planned": "Gepland" } }, { "tag": "en", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-US", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Done", "current": "Current", "planned": "Planned" } }, { "tag": "en-AU", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-AU", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-CA", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-CA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-GB", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-GB", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-IN", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-IN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-US", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-US", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "et", "script": "Latn", "direction": "ltr", "ooxmlLang": "et-EE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "fil", "script": "Latn", "direction": "ltr", "ooxmlLang": "fil-PH", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "fi", "script": "Latn", "direction": "ltr", "ooxmlLang": "fi-FI", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Valmis", "current": "Nykyinen", "planned": "Suunniteltu" } }, { "tag": "fr", "script": "Latn", "direction": "ltr", "ooxmlLang": "fr-FR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Termin\xE9", "current": "En cours", "planned": "Pr\xE9vu" } }, { "tag": "ff", "script": "Latn", "direction": "ltr", "ooxmlLang": "ff-Latn-SN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "gl", "script": "Latn", "direction": "ltr", "ooxmlLang": "gl-ES", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ka", "script": "Geor", "direction": "ltr", "ooxmlLang": "ka-GE", "fonts": { "powerpoint": { "major": "Sylfaen", "minor": "Sylfaen" }, "google": { "major": "Noto Sans Georgian", "minor": "Noto Sans Georgian" } } }, { "tag": "de", "script": "Latn", "direction": "ltr", "ooxmlLang": "de-DE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Abgeschlossen", "current": "Aktuell", "planned": "Geplant" } }, { "tag": "el", "script": "Grek", "direction": "ltr", "ooxmlLang": "el-GR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } }, "timelineStatusWords": { "done": "\u039F\u03BB\u03BF\u03BA\u03BB\u03B7\u03C1\u03CE\u03B8\u03B7\u03BA\u03B5", "current": "\u03A4\u03C1\u03AD\u03C7\u03BF\u03BD", "planned": "\u03A0\u03C1\u03BF\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03B9\u03C3\u03BC\u03AD\u03BD\u03BF" } }, { "tag": "gu", "script": "Gujr", "direction": "ltr", "ooxmlLang": "gu-IN", "fonts": { "powerpoint": { "major": "Shruti", "minor": "Shruti" }, "google": { "major": "Noto Sans Gujarati", "minor": "Noto Sans Gujarati" } } }, { "tag": "ha", "script": "Latn", "direction": "ltr", "ooxmlLang": "ha-Latn-NG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "he", "script": "Hebr", "direction": "rtl", "ooxmlLang": "he-IL", "fonts": { "powerpoint": { "major": "David", "minor": "David" }, "google": { "major": "Noto Sans Hebrew", "minor": "Noto Sans Hebrew" } }, "timelineStatusWords": { "done": "\u05D4\u05D5\u05E9\u05DC\u05DD", "current": "\u05E0\u05D5\u05DB\u05D7\u05D9", "planned": "\u05DE\u05EA\u05D5\u05DB\u05E0\u05DF" } }, { "tag": "hi", "script": "Deva", "direction": "ltr", "ooxmlLang": "hi-IN", "fonts": { "powerpoint": { "major": "Mangal", "minor": "Mangal" }, "google": { "major": "Noto Sans Devanagari", "minor": "Noto Sans Devanagari" } }, "timelineStatusWords": { "done": "\u092A\u0942\u0930\u094D\u0923", "current": "\u0935\u0930\u094D\u0924\u092E\u093E\u0928", "planned": "\u0928\u093F\u092F\u094B\u091C\u093F\u0924" } }, { "tag": "hu", "script": "Latn", "direction": "ltr", "ooxmlLang": "hu-HU", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ig", "script": "Latn", "direction": "ltr", "ooxmlLang": "ig-NG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "id", "script": "Latn", "direction": "ltr", "ooxmlLang": "id-ID", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Selesai", "current": "Saat ini", "planned": "Direncanakan" } }, { "tag": "it", "script": "Latn", "direction": "ltr", "ooxmlLang": "it-IT", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Completato", "current": "Attuale", "planned": "Pianificato" } }, { "tag": "ja", "script": "Jpan", "direction": "ltr", "ooxmlLang": "ja-JP", "fonts": { "powerpoint": { "major": "Meiryo", "minor": "Meiryo" }, "google": { "major": "Noto Sans JP", "minor": "Noto Sans JP" } }, "timelineStatusWords": { "done": "\u5B8C\u4E86", "current": "\u73FE\u5728", "planned": "\u4E88\u5B9A" } }, { "tag": "kn", "script": "Knda", "direction": "ltr", "ooxmlLang": "kn-IN", "fonts": { "powerpoint": { "major": "Tunga", "minor": "Tunga" }, "google": { "major": "Noto Sans Kannada", "minor": "Noto Sans Kannada" } } }, { "tag": "kk", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "kk-KZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "km", "script": "Khmr", "direction": "ltr", "ooxmlLang": "km-KH", "fonts": { "powerpoint": { "major": "DaunPenh", "minor": "DaunPenh" }, "google": { "major": "Noto Sans Khmer", "minor": "Noto Sans Khmer" } } }, { "tag": "rw", "script": "Latn", "direction": "ltr", "ooxmlLang": "rw-RW", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ko", "script": "Kore", "direction": "ltr", "ooxmlLang": "ko-KR", "fonts": { "powerpoint": { "major": "Malgun Gothic", "minor": "Malgun Gothic" }, "google": { "major": "Noto Sans KR", "minor": "Noto Sans KR" } }, "timelineStatusWords": { "done": "\uC644\uB8CC", "current": "\uD604\uC7AC", "planned": "\uC608\uC815" } }, { "tag": "kmr", "script": "Latn", "direction": "ltr", "ooxmlLang": "kmr-TR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "lv", "script": "Latn", "direction": "ltr", "ooxmlLang": "lv-LV", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "lt", "script": "Latn", "direction": "ltr", "ooxmlLang": "lt-LT", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "mk", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "mk-MK", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "mg", "script": "Latn", "direction": "ltr", "ooxmlLang": "mg-MG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "zsm", "script": "Latn", "direction": "ltr", "ooxmlLang": "ms-MY", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ml", "script": "Mlym", "direction": "ltr", "ooxmlLang": "ml-IN", "fonts": { "powerpoint": { "major": "Kartika", "minor": "Kartika" }, "google": { "major": "Noto Sans Malayalam", "minor": "Noto Sans Malayalam" } } }, { "tag": "mi", "script": "Latn", "direction": "ltr", "ooxmlLang": "mi-NZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "mr", "script": "Deva", "direction": "ltr", "ooxmlLang": "mr-IN", "fonts": { "powerpoint": { "major": "Mangal", "minor": "Mangal" }, "google": { "major": "Noto Sans Devanagari", "minor": "Noto Sans Devanagari" } } }, { "tag": "mn", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "mn-MN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans Mongolian", "minor": "Noto Sans Mongolian" } } }, { "tag": "ne", "script": "Deva", "direction": "ltr", "ooxmlLang": "ne-NP", "fonts": { "powerpoint": { "major": "Mangal", "minor": "Mangal" }, "google": { "major": "Noto Sans Devanagari", "minor": "Noto Sans Devanagari" } } }, { "tag": "no", "script": "Latn", "direction": "ltr", "ooxmlLang": "nb-NO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Fullf\xF8rt", "current": "N\xE5v\xE6rende", "planned": "Planlagt" } }, { "tag": "or", "script": "Orya", "direction": "ltr", "ooxmlLang": "or-IN", "fonts": { "powerpoint": { "major": "Kalinga", "minor": "Kalinga" }, "google": { "major": "Noto Sans Oriya", "minor": "Noto Sans Oriya" } } }, { "tag": "om", "script": "Latn", "direction": "ltr", "ooxmlLang": "om-ET", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ps", "script": "Arab", "direction": "rtl", "ooxmlLang": "ps-AF", "fonts": { "powerpoint": { "major": "Arial Black", "minor": "Arial" }, "google": { "major": "Noto Naskh Arabic", "minor": "Noto Naskh Arabic" } } }, { "tag": "fa", "script": "Arab", "direction": "rtl", "ooxmlLang": "fa-IR", "fonts": { "powerpoint": { "major": "Arabic Typesetting", "minor": "Arabic Typesetting" }, "google": { "major": "Noto Naskh Arabic", "minor": "Noto Naskh Arabic" } } }, { "tag": "pl", "script": "Latn", "direction": "ltr", "ooxmlLang": "pl-PL", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Uko\u0144czono", "current": "Obecnie", "planned": "Zaplanowano" } }, { "tag": "pt", "script": "Latn", "direction": "ltr", "ooxmlLang": "pt-BR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Conclu\xEDdo", "current": "Atual", "planned": "Planejado" } }, { "tag": "pa-Guru", "script": "Guru", "direction": "ltr", "ooxmlLang": "pa-IN", "fonts": { "powerpoint": { "major": "Raavi", "minor": "Raavi" }, "google": { "major": "Noto Sans Gurmukhi", "minor": "Noto Sans Gurmukhi" } } }, { "tag": "pa-Arab", "script": "Arab", "direction": "rtl", "ooxmlLang": "pa-Arab-PK", "fonts": { "powerpoint": { "major": "Arial Black", "minor": "Arial" }, "google": { "major": "Noto Nastaliq Urdu", "minor": "Noto Nastaliq Urdu" } } }, { "tag": "ro", "script": "Latn", "direction": "ltr", "ooxmlLang": "ro-RO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ru", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "ru-RU", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } }, "timelineStatusWords": { "done": "\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E", "current": "\u0421\u0435\u0439\u0447\u0430\u0441", "planned": "\u0417\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043E" } }, { "tag": "sr-Cyrl", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "sr-Cyrl-RS", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "sr-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "sr-Latn-RS", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sn", "script": "Latn", "direction": "ltr", "ooxmlLang": "sn-Latn-ZW", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sk", "script": "Latn", "direction": "ltr", "ooxmlLang": "sk-SK", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sl", "script": "Latn", "direction": "ltr", "ooxmlLang": "sl-SI", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "so", "script": "Latn", "direction": "ltr", "ooxmlLang": "so-SO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "es", "script": "Latn", "direction": "ltr", "ooxmlLang": "es-ES", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Completado", "current": "Actual", "planned": "Previsto" } }, { "tag": "sw", "script": "Latn", "direction": "ltr", "ooxmlLang": "sw-KE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sv", "script": "Latn", "direction": "ltr", "ooxmlLang": "sv-SE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Klart", "current": "Aktuellt", "planned": "Planerat" } }, { "tag": "tl", "script": "Latn", "direction": "ltr", "ooxmlLang": "fil-PH", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "tg", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "tg-Cyrl-TJ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "ta", "script": "Taml", "direction": "ltr", "ooxmlLang": "ta-IN", "fonts": { "powerpoint": { "major": "Latha", "minor": "Latha" }, "google": { "major": "Noto Sans Tamil", "minor": "Noto Sans Tamil" } } }, { "tag": "te", "script": "Telu", "direction": "ltr", "ooxmlLang": "te-IN", "fonts": { "powerpoint": { "major": "Gautami", "minor": "Gautami" }, "google": { "major": "Noto Sans Telugu", "minor": "Noto Sans Telugu" } } }, { "tag": "th", "script": "Thai", "direction": "ltr", "ooxmlLang": "th-TH", "fonts": { "powerpoint": { "major": "Angsana New", "minor": "Angsana New" }, "google": { "major": "Noto Sans Thai", "minor": "Noto Sans Thai" } }, "timelineStatusWords": { "done": "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27", "current": "\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19", "planned": "\u0E27\u0E32\u0E07\u0E41\u0E1C\u0E19\u0E44\u0E27\u0E49" } }, { "tag": "tr", "script": "Latn", "direction": "ltr", "ooxmlLang": "tr-TR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Tamamland\u0131", "current": "G\xFCncel", "planned": "Planland\u0131" } }, { "tag": "uk", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "uk-UA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } }, "timelineStatusWords": { "done": "\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E", "current": "\u0417\u0430\u0440\u0430\u0437", "planned": "\u0417\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u043E" } }, { "tag": "ur", "script": "Arab", "direction": "rtl", "ooxmlLang": "ur-PK", "fonts": { "powerpoint": { "major": "Arabic Typesetting", "minor": "Arabic Typesetting" }, "google": { "major": "Noto Nastaliq Urdu", "minor": "Noto Nastaliq Urdu" } } }, { "tag": "uz-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "uz-Latn-UZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "vi-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "vi-VN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Ho\xE0n t\u1EA5t", "current": "Hi\u1EC7n t\u1EA1i", "planned": "D\u1EF1 ki\u1EBFn" } }, { "tag": "xh", "script": "Latn", "direction": "ltr", "ooxmlLang": "xh-ZA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "yo", "script": "Latn", "direction": "ltr", "ooxmlLang": "yo-NG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "zu", "script": "Latn", "direction": "ltr", "ooxmlLang": "zu-ZA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }] };
3828
+ var engineVocabulariesSource = { "chartTypes": ["100pct-stacked-area", "100pct-stacked-bar", "100pct-stacked-column", "area", "bar", "box-and-whisker", "column", "combo", "doughnut", "filled-radar", "funnel", "histogram", "line", "line-with-markers", "pareto", "pie", "radar", "radar-with-markers", "scatter", "stacked-area", "stacked-bar", "stacked-column", "stacked-line", "stacked-line-with-markers", "treemap", "waterfall", "world"], "socialPlatforms": { "linkedin": { "baseUrl": "https://linkedin.com", "profileUrlPattern": "https://linkedin.com/in/{handle}", "companyUrlPattern": "https://linkedin.com/company/{handle}", "handlePrefix": "" }, "x": { "baseUrl": "https://x.com", "profileUrlPattern": "https://x.com/{handle}", "handlePrefix": "@" }, "github": { "baseUrl": "https://github.com", "profileUrlPattern": "https://github.com/{handle}", "companyUrlPattern": "https://github.com/{handle}", "handlePrefix": "" }, "youtube": { "baseUrl": "https://youtube.com", "profileUrlPattern": "https://youtube.com/@{handle}", "handlePrefix": "@" }, "instagram": { "baseUrl": "https://instagram.com", "profileUrlPattern": "https://instagram.com/{handle}", "handlePrefix": "@" }, "facebook": { "baseUrl": "https://facebook.com", "profileUrlPattern": "https://facebook.com/{handle}", "companyUrlPattern": "https://facebook.com/{handle}", "handlePrefix": "" }, "tiktok": { "baseUrl": "https://tiktok.com", "profileUrlPattern": "https://tiktok.com/@{handle}", "handlePrefix": "@" }, "threads": { "baseUrl": "https://threads.net", "profileUrlPattern": "https://threads.net/@{handle}", "handlePrefix": "@" }, "mastodon": { "baseUrl": "https://mastodon.social", "profileUrlPattern": "https://mastodon.social/@{handle}", "handlePrefix": "@" }, "bluesky": { "baseUrl": "https://bsky.app", "profileUrlPattern": "https://bsky.app/profile/{handle}", "handlePrefix": "" } }, "languages": [{ "tag": "af", "script": "Latn", "direction": "ltr", "ooxmlLang": "af-ZA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sq", "script": "Latn", "direction": "ltr", "ooxmlLang": "sq-AL", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "am", "script": "Ethi", "direction": "ltr", "ooxmlLang": "am-ET", "fonts": { "powerpoint": { "major": "Ebrima", "minor": "Ebrima" }, "google": { "major": "Noto Sans Ethiopic", "minor": "Noto Sans Ethiopic" } } }, { "tag": "ar", "script": "Arab", "direction": "rtl", "ooxmlLang": "ar-SA", "fonts": { "powerpoint": { "major": "Times New Roman", "minor": "Arial" }, "google": { "major": "Noto Naskh Arabic", "minor": "Noto Naskh Arabic" } }, "timelineStatusWords": { "done": "\u0645\u0643\u062A\u0645\u0644", "current": "\u062D\u0627\u0644\u064A", "planned": "\u0645\u062E\u0637\u0637" } }, { "tag": "hy", "script": "Armn", "direction": "ltr", "ooxmlLang": "hy-AM", "fonts": { "powerpoint": { "major": "Sylfaen", "minor": "Sylfaen" }, "google": { "major": "Noto Sans Armenian", "minor": "Noto Sans Armenian" } } }, { "tag": "ay", "script": "Latn", "direction": "ltr", "ooxmlLang": "ay-BO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "az", "script": "Latn", "direction": "ltr", "ooxmlLang": "az-Latn-AZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "bn", "script": "Beng", "direction": "ltr", "ooxmlLang": "bn-BD", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Bengali", "minor": "Noto Sans Bengali" } } }, { "tag": "ber-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "tzm-Latn-DZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "bs-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "bs-Latn-BA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "bg", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "bg-BG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "ca", "script": "Latn", "direction": "ltr", "ooxmlLang": "ca-ES", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ceb", "script": "Latn", "direction": "ltr", "ooxmlLang": "ceb-PH", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "zh-Hans", "script": "Hans", "direction": "ltr", "ooxmlLang": "zh-CN", "fonts": { "powerpoint": { "major": "Microsoft YaHei", "minor": "Microsoft YaHei" }, "google": { "major": "Noto Sans SC", "minor": "Noto Sans SC" } }, "timelineStatusWords": { "done": "\u5DF2\u5B8C\u6210", "current": "\u5F53\u524D", "planned": "\u8BA1\u5212" } }, { "tag": "zh-Hant", "script": "Hant", "direction": "ltr", "ooxmlLang": "zh-TW", "fonts": { "powerpoint": { "major": "Microsoft JhengHei", "minor": "Microsoft JhengHei" }, "google": { "major": "Noto Sans TC", "minor": "Noto Sans TC" } }, "timelineStatusWords": { "done": "\u5DF2\u5B8C\u6210", "current": "\u76EE\u524D", "planned": "\u8A08\u756B" } }, { "tag": "ctg", "script": "Beng", "direction": "ltr", "ooxmlLang": "bn-BD", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Bengali", "minor": "Noto Sans Bengali" } } }, { "tag": "hr", "script": "Latn", "direction": "ltr", "ooxmlLang": "hr-HR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "cs", "script": "Latn", "direction": "ltr", "ooxmlLang": "cs-CZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Dokon\u010Deno", "current": "Aktu\xE1ln\xED", "planned": "Pl\xE1nov\xE1no" } }, { "tag": "da", "script": "Latn", "direction": "ltr", "ooxmlLang": "da-DK", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Udf\xF8rt", "current": "Aktuelt", "planned": "Planlagt" } }, { "tag": "nl", "script": "Latn", "direction": "ltr", "ooxmlLang": "nl-NL", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Afgerond", "current": "Huidig", "planned": "Gepland" } }, { "tag": "en", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-US", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Done", "current": "Current", "planned": "Planned" } }, { "tag": "en-AU", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-AU", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-CA", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-CA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-GB", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-GB", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-IN", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-IN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "en-US", "script": "Latn", "direction": "ltr", "ooxmlLang": "en-US", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "et", "script": "Latn", "direction": "ltr", "ooxmlLang": "et-EE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "fil", "script": "Latn", "direction": "ltr", "ooxmlLang": "fil-PH", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "fi", "script": "Latn", "direction": "ltr", "ooxmlLang": "fi-FI", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Valmis", "current": "Nykyinen", "planned": "Suunniteltu" } }, { "tag": "fr", "script": "Latn", "direction": "ltr", "ooxmlLang": "fr-FR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Termin\xE9", "current": "En cours", "planned": "Pr\xE9vu" } }, { "tag": "ff", "script": "Latn", "direction": "ltr", "ooxmlLang": "ff-Latn-SN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "gl", "script": "Latn", "direction": "ltr", "ooxmlLang": "gl-ES", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ka", "script": "Geor", "direction": "ltr", "ooxmlLang": "ka-GE", "fonts": { "powerpoint": { "major": "Sylfaen", "minor": "Sylfaen" }, "google": { "major": "Noto Sans Georgian", "minor": "Noto Sans Georgian" } } }, { "tag": "de", "script": "Latn", "direction": "ltr", "ooxmlLang": "de-DE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Abgeschlossen", "current": "Aktuell", "planned": "Geplant" } }, { "tag": "el", "script": "Grek", "direction": "ltr", "ooxmlLang": "el-GR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } }, "timelineStatusWords": { "done": "\u039F\u03BB\u03BF\u03BA\u03BB\u03B7\u03C1\u03CE\u03B8\u03B7\u03BA\u03B5", "current": "\u03A4\u03C1\u03AD\u03C7\u03BF\u03BD", "planned": "\u03A0\u03C1\u03BF\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03B9\u03C3\u03BC\u03AD\u03BD\u03BF" } }, { "tag": "gu", "script": "Gujr", "direction": "ltr", "ooxmlLang": "gu-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Gujarati", "minor": "Noto Sans Gujarati" } } }, { "tag": "ha", "script": "Latn", "direction": "ltr", "ooxmlLang": "ha-Latn-NG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "he", "script": "Hebr", "direction": "rtl", "ooxmlLang": "he-IL", "fonts": { "powerpoint": { "major": "Segoe UI", "minor": "Segoe UI" }, "google": { "major": "Noto Sans Hebrew", "minor": "Noto Sans Hebrew" } }, "timelineStatusWords": { "done": "\u05D4\u05D5\u05E9\u05DC\u05DD", "current": "\u05E0\u05D5\u05DB\u05D7\u05D9", "planned": "\u05DE\u05EA\u05D5\u05DB\u05E0\u05DF" } }, { "tag": "hi", "script": "Deva", "direction": "ltr", "ooxmlLang": "hi-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Devanagari", "minor": "Noto Sans Devanagari" } }, "timelineStatusWords": { "done": "\u092A\u0942\u0930\u094D\u0923", "current": "\u0935\u0930\u094D\u0924\u092E\u093E\u0928", "planned": "\u0928\u093F\u092F\u094B\u091C\u093F\u0924" } }, { "tag": "hu", "script": "Latn", "direction": "ltr", "ooxmlLang": "hu-HU", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ig", "script": "Latn", "direction": "ltr", "ooxmlLang": "ig-NG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "id", "script": "Latn", "direction": "ltr", "ooxmlLang": "id-ID", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Selesai", "current": "Saat ini", "planned": "Direncanakan" } }, { "tag": "it", "script": "Latn", "direction": "ltr", "ooxmlLang": "it-IT", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Completato", "current": "Attuale", "planned": "Pianificato" } }, { "tag": "ja", "script": "Jpan", "direction": "ltr", "ooxmlLang": "ja-JP", "fonts": { "powerpoint": { "major": "Yu Gothic", "minor": "Yu Gothic" }, "google": { "major": "Noto Sans JP", "minor": "Noto Sans JP" } }, "timelineStatusWords": { "done": "\u5B8C\u4E86", "current": "\u73FE\u5728", "planned": "\u4E88\u5B9A" } }, { "tag": "kn", "script": "Knda", "direction": "ltr", "ooxmlLang": "kn-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Kannada", "minor": "Noto Sans Kannada" } } }, { "tag": "kk", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "kk-KZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "km", "script": "Khmr", "direction": "ltr", "ooxmlLang": "km-KH", "fonts": { "powerpoint": { "major": "Leelawadee UI", "minor": "Leelawadee UI" }, "google": { "major": "Noto Sans Khmer", "minor": "Noto Sans Khmer" } } }, { "tag": "rw", "script": "Latn", "direction": "ltr", "ooxmlLang": "rw-RW", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ko", "script": "Kore", "direction": "ltr", "ooxmlLang": "ko-KR", "fonts": { "powerpoint": { "major": "Malgun Gothic", "minor": "Malgun Gothic" }, "google": { "major": "Noto Sans KR", "minor": "Noto Sans KR" } }, "timelineStatusWords": { "done": "\uC644\uB8CC", "current": "\uD604\uC7AC", "planned": "\uC608\uC815" } }, { "tag": "kmr", "script": "Latn", "direction": "ltr", "ooxmlLang": "kmr-TR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "lv", "script": "Latn", "direction": "ltr", "ooxmlLang": "lv-LV", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "lt", "script": "Latn", "direction": "ltr", "ooxmlLang": "lt-LT", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "mk", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "mk-MK", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "mg", "script": "Latn", "direction": "ltr", "ooxmlLang": "mg-MG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "zsm", "script": "Latn", "direction": "ltr", "ooxmlLang": "ms-MY", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ml", "script": "Mlym", "direction": "ltr", "ooxmlLang": "ml-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Malayalam", "minor": "Noto Sans Malayalam" } } }, { "tag": "mi", "script": "Latn", "direction": "ltr", "ooxmlLang": "mi-NZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "mr", "script": "Deva", "direction": "ltr", "ooxmlLang": "mr-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Devanagari", "minor": "Noto Sans Devanagari" } } }, { "tag": "mn", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "mn-MN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans Mongolian", "minor": "Noto Sans Mongolian" } } }, { "tag": "ne", "script": "Deva", "direction": "ltr", "ooxmlLang": "ne-NP", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Devanagari", "minor": "Noto Sans Devanagari" } } }, { "tag": "no", "script": "Latn", "direction": "ltr", "ooxmlLang": "nb-NO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Fullf\xF8rt", "current": "N\xE5v\xE6rende", "planned": "Planlagt" } }, { "tag": "or", "script": "Orya", "direction": "ltr", "ooxmlLang": "or-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Oriya", "minor": "Noto Sans Oriya" } } }, { "tag": "om", "script": "Latn", "direction": "ltr", "ooxmlLang": "om-ET", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ps", "script": "Arab", "direction": "rtl", "ooxmlLang": "ps-AF", "fonts": { "powerpoint": { "major": "Times New Roman", "minor": "Arial" }, "google": { "major": "Noto Naskh Arabic", "minor": "Noto Naskh Arabic" } } }, { "tag": "fa", "script": "Arab", "direction": "rtl", "ooxmlLang": "fa-IR", "fonts": { "powerpoint": { "major": "Times New Roman", "minor": "Arial" }, "google": { "major": "Noto Naskh Arabic", "minor": "Noto Naskh Arabic" } } }, { "tag": "pl", "script": "Latn", "direction": "ltr", "ooxmlLang": "pl-PL", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Uko\u0144czono", "current": "Obecnie", "planned": "Zaplanowano" } }, { "tag": "pt", "script": "Latn", "direction": "ltr", "ooxmlLang": "pt-BR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Conclu\xEDdo", "current": "Atual", "planned": "Planejado" } }, { "tag": "pa-Guru", "script": "Guru", "direction": "ltr", "ooxmlLang": "pa-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Gurmukhi", "minor": "Noto Sans Gurmukhi" } } }, { "tag": "pa-Arab", "script": "Arab", "direction": "rtl", "ooxmlLang": "pa-Arab-PK", "fonts": { "powerpoint": { "major": "Times New Roman", "minor": "Arial" }, "google": { "major": "Noto Nastaliq Urdu", "minor": "Noto Nastaliq Urdu" } } }, { "tag": "ro", "script": "Latn", "direction": "ltr", "ooxmlLang": "ro-RO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "ru", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "ru-RU", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } }, "timelineStatusWords": { "done": "\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E", "current": "\u0421\u0435\u0439\u0447\u0430\u0441", "planned": "\u0417\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043E" } }, { "tag": "sr-Cyrl", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "sr-Cyrl-RS", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "sr-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "sr-Latn-RS", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sn", "script": "Latn", "direction": "ltr", "ooxmlLang": "sn-Latn-ZW", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sk", "script": "Latn", "direction": "ltr", "ooxmlLang": "sk-SK", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sl", "script": "Latn", "direction": "ltr", "ooxmlLang": "sl-SI", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "so", "script": "Latn", "direction": "ltr", "ooxmlLang": "so-SO", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "es", "script": "Latn", "direction": "ltr", "ooxmlLang": "es-ES", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Completado", "current": "Actual", "planned": "Previsto" } }, { "tag": "sw", "script": "Latn", "direction": "ltr", "ooxmlLang": "sw-KE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "sv", "script": "Latn", "direction": "ltr", "ooxmlLang": "sv-SE", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Klart", "current": "Aktuellt", "planned": "Planerat" } }, { "tag": "tl", "script": "Latn", "direction": "ltr", "ooxmlLang": "fil-PH", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "tg", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "tg-Cyrl-TJ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } } }, { "tag": "ta", "script": "Taml", "direction": "ltr", "ooxmlLang": "ta-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Tamil", "minor": "Noto Sans Tamil" } } }, { "tag": "te", "script": "Telu", "direction": "ltr", "ooxmlLang": "te-IN", "fonts": { "powerpoint": { "major": "Nirmala UI", "minor": "Nirmala UI" }, "google": { "major": "Noto Sans Telugu", "minor": "Noto Sans Telugu" } } }, { "tag": "th", "script": "Thai", "direction": "ltr", "ooxmlLang": "th-TH", "fonts": { "powerpoint": { "major": "Leelawadee UI", "minor": "Leelawadee UI" }, "google": { "major": "Noto Sans Thai", "minor": "Noto Sans Thai" } }, "timelineStatusWords": { "done": "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27", "current": "\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19", "planned": "\u0E27\u0E32\u0E07\u0E41\u0E1C\u0E19\u0E44\u0E27\u0E49" } }, { "tag": "tr", "script": "Latn", "direction": "ltr", "ooxmlLang": "tr-TR", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Tamamland\u0131", "current": "G\xFCncel", "planned": "Planland\u0131" } }, { "tag": "uk", "script": "Cyrl", "direction": "ltr", "ooxmlLang": "uk-UA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Noto Sans", "minor": "Noto Sans" } }, "timelineStatusWords": { "done": "\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E", "current": "\u0417\u0430\u0440\u0430\u0437", "planned": "\u0417\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u043E" } }, { "tag": "ur", "script": "Arab", "direction": "rtl", "ooxmlLang": "ur-PK", "fonts": { "powerpoint": { "major": "Times New Roman", "minor": "Arial" }, "google": { "major": "Noto Nastaliq Urdu", "minor": "Noto Nastaliq Urdu" } } }, { "tag": "uz-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "uz-Latn-UZ", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "vi-Latn", "script": "Latn", "direction": "ltr", "ooxmlLang": "vi-VN", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } }, "timelineStatusWords": { "done": "Ho\xE0n t\u1EA5t", "current": "Hi\u1EC7n t\u1EA1i", "planned": "D\u1EF1 ki\u1EBFn" } }, { "tag": "xh", "script": "Latn", "direction": "ltr", "ooxmlLang": "xh-ZA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "yo", "script": "Latn", "direction": "ltr", "ooxmlLang": "yo-NG", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }, { "tag": "zu", "script": "Latn", "direction": "ltr", "ooxmlLang": "zu-ZA", "fonts": { "powerpoint": { "major": "Aptos Display", "minor": "Aptos" }, "google": { "major": "Roboto", "minor": "Roboto" } } }] };
3688
3829
 
3689
3830
  // src/engine-vocabularies.ts
3690
3831
  var ENGINE_DEFAULT_THEME = engineDefaultsSource.theme;
@@ -4545,10 +4686,10 @@ function tableHighlightColor(surface, accent, text2) {
4545
4686
  const fill = (normalizeHexColor(surface) ?? "#FFFFFF").slice(0, 7);
4546
4687
  const ink = (normalizeHexColor(text2) ?? textColorForFill(fill, "#000000")).slice(0, 7);
4547
4688
  const from = opaqueChannels(fill), to = opaqueChannels((normalizeHexColor(accent) ?? "#000000").slice(0, 7)) ?? [0, 0, 0];
4548
- const plain2 = colorContrast(ink, fill) ?? 0;
4689
+ const plain3 = colorContrast(ink, fill) ?? 0;
4549
4690
  for (let percent = Math.round(TABLE_HIGHLIGHT_MIX * 100); percent >= 1; percent--) {
4550
4691
  const tint = mixChannels(from, to, percent / 100), contrast3 = colorContrast(ink, tint) ?? 0;
4551
- if (contrast3 >= 4.5 || contrast3 >= plain2) return tint;
4692
+ if (contrast3 >= 4.5 || contrast3 >= plain3) return tint;
4552
4693
  }
4553
4694
  return fill.toUpperCase();
4554
4695
  }
@@ -5091,6 +5232,10 @@ function chartRingLabels(chart, data) {
5091
5232
  return rings.length >= 2 ? rings : void 0;
5092
5233
  }
5093
5234
  function chartLayerDataLabels(resolved2, layer, kind2) {
5235
+ const fit = layer?.doughnut?.labels;
5236
+ if (fit && resolved2.dataLabels !== void 0) {
5237
+ return fit.content === null ? { ...resolved2, dataLabels: void 0, dataLabelsOff: true } : { ...resolved2, dataLabels: { ...resolved2.dataLabels, content: fit.content } };
5238
+ }
5094
5239
  if (resolved2.dataLabels !== void 0 || !layer?.small?.labels) return resolved2;
5095
5240
  return { ...resolved2, active: true, dataLabels: { content: ["value"], position: kind2 === "line" ? "above" : "outside-end", separator: ", " } };
5096
5241
  }
@@ -5530,10 +5675,11 @@ function waterfallRoles(values) {
5530
5675
  return roles;
5531
5676
  }
5532
5677
  function waterfallLabelText(value, format, role, group, language = group?.language) {
5533
- if (role === "total" || value === 0) return valueLabel(value, format, group, language);
5678
+ if (role === "total" || value === 0 || hasNumberFormatSections(format)) return valueLabel(value, format, group, language);
5534
5679
  return `${value > 0 ? "+" : "\u2212"}${valueLabel(Math.abs(value), format, group, language)}`;
5535
5680
  }
5536
5681
  function waterfallSignedFormat(format) {
5682
+ if (hasNumberFormatSections(format)) return format;
5537
5683
  const first = (format && format.trim() ? format : "General").split(";")[0];
5538
5684
  return `"+"${first};"\u2212"${first};${first}`;
5539
5685
  }
@@ -5612,11 +5758,53 @@ function chartValueList(chart, data, geometry, options = {}) {
5612
5758
  function chartDoughnut(chart, data, geometry, layer) {
5613
5759
  if (!record7(chart) || !data.ok || data.columns.length < 2 || !data.rows.length) return void 0;
5614
5760
  if (typeOf(chart) !== "doughnut") return void 0;
5615
- const of = (pie2) => ({ pie: pie2, hole: { cx: pie2.x + pie2.width / 2, cy: pie2.y + pie2.height / 2, r: pie2.width / 4 } });
5761
+ const of = (pie2) => {
5762
+ const doughnut = { pie: pie2, hole: { cx: pie2.x + pie2.width / 2, cy: pie2.y + pie2.height / 2, r: pie2.width / 4 } };
5763
+ const labels = doughnutLabelFit(chart, data, geometry, pie2);
5764
+ return labels ? { ...doughnut, labels } : doughnut;
5765
+ };
5616
5766
  if (layer?.valueList) return of(layer.valueList.pie);
5617
5767
  const pie = chartCircleSquare(chart, data, geometry, layer);
5618
5768
  return pie && of(pie);
5619
5769
  }
5770
+ function doughnutLabelFit(chart, data, geometry, pie) {
5771
+ if (!data.ok || data.columns.length !== 2 || !usable2(geometry.box, geometry.scale)) return void 0;
5772
+ const options = resolveChartOptions(chart, chartOptionTarget("doughnut"));
5773
+ const authored = options.dataLabels?.content;
5774
+ if (!options.dataLabels || !authored?.length) return void 0;
5775
+ const values = data.rows.map((row) => chartNumber(row[1]));
5776
+ const total = values.reduce((sum, value) => sum + (value !== null && value > 0 ? value : 0), 0);
5777
+ if (total <= 0) return void 0;
5778
+ const { fontPx, textHeight } = metrics(geometry.box, geometry.scale, geometry.minFontSize);
5779
+ const format = typeof data.formats[1] === "string" && !numberFormatError(data.formats[1]) ? data.formats[1] : void 0;
5780
+ const group = columnGroups(data, 1) ? { language: geometry.language } : void 0;
5781
+ const radius = pie.width / 2, inner = radius / 2, middle = (radius + inner) / 2, cx = pie.x + radius, cy = pie.y + pie.height / 2;
5782
+ const fits = (content) => {
5783
+ let start = -Math.PI / 2;
5784
+ return values.every((value, index) => {
5785
+ if (value === null || value <= 0) return true;
5786
+ const delta = value / total * Math.PI * 2, mid = start + delta / 2;
5787
+ start += delta;
5788
+ const text2 = chartLabelText({ category: label3(data.rows[index]?.[0]), value: valueLabel(value, format, group, geometry.language), percent: formatChartLabelPercent(value / total, geometry.language) }, content, options.dataLabels?.separator);
5789
+ if (!text2) return true;
5790
+ const halfWidth = (geometry.measure(text2, fontPx, 400) + fontPx * 0.5) / 2, halfHeight = textHeight / 2;
5791
+ const x = cx + middle * Math.cos(mid), y = cy + middle * Math.sin(mid);
5792
+ return [[-1, -1], [1, -1], [-1, 1], [1, 1]].every(([sx, sy]) => {
5793
+ const dx = x + sx * halfWidth - cx, dy = y + sy * halfHeight - cy, distance4 = Math.hypot(dx, dy);
5794
+ if (distance4 < inner - 1 || distance4 > radius + 1) return false;
5795
+ if (delta >= Math.PI * 2 - 1e-9) return true;
5796
+ let away = Math.atan2(dy, dx) - mid;
5797
+ while (away > Math.PI) away -= Math.PI * 2;
5798
+ while (away < -Math.PI) away += Math.PI * 2;
5799
+ return Math.abs(away) <= delta / 2 + 1e-9;
5800
+ });
5801
+ });
5802
+ };
5803
+ if (fits(authored)) return void 0;
5804
+ const without = authored.filter((part) => part !== "category");
5805
+ if (without.length && without.length < authored.length && fits(without)) return { content: without, from: [...authored] };
5806
+ return { content: null, from: [...authored] };
5807
+ }
5620
5808
  function chartCircleSquare(chart, data, geometry, layer) {
5621
5809
  if (!record7(chart) || !data.ok || data.columns.length < 2 || !data.rows.length) return void 0;
5622
5810
  const { box, scale: scale2 } = geometry;
@@ -5735,9 +5923,9 @@ function areaEnd(shape, j, row, text2, m, geometry) {
5735
5923
  };
5736
5924
  const near2 = bounds(0), far = bounds(room);
5737
5925
  if (Math.abs(near2.bottom - near2.top) < m.textHeight || Math.abs(far.bottom - far.top) < m.textHeight) return void 0;
5738
- const middle = bounds(room / 2), centre = (middle.top + middle.bottom) / 2;
5926
+ const middle = bounds(room / 2), center2 = (middle.top + middle.bottom) / 2;
5739
5927
  const boxWidth = width + m.fontPx * 0.3;
5740
- return { series: j, row, text: text2, align: toLeft ? "left" : "right", box: { x: toLeft ? edgeX + m.fontPx * 0.1 : edgeX - m.fontPx * 0.1 - boxWidth, y: centre - m.lineHeight / 2, width: boxWidth, height: m.lineHeight } };
5928
+ return { series: j, row, text: text2, align: toLeft ? "left" : "right", box: { x: toLeft ? edgeX + m.fontPx * 0.1 : edgeX - m.fontPx * 0.1 - boxWidth, y: center2 - m.lineHeight / 2, width: boxWidth, height: m.lineHeight } };
5741
5929
  }
5742
5930
  function stackMarks(chart, data, axis2, plot, geometry, edge = false) {
5743
5931
  const shape = segments(chart, data, axis2, plot, edge);
@@ -5768,9 +5956,9 @@ function placeStackNames(chart, data, axis2, box, plotInset, geometry, relaxed =
5768
5956
  if (!shape) return void 0;
5769
5957
  const { fontPx, textHeight, lineHeight } = metrics(box, geometry.scale, geometry.minFontSize);
5770
5958
  const rtl = geometry.direction === "rtl", last = data.rows.length - 1;
5771
- const centre = shape.pointX(last, rtl), reach = shape.kind === "bar" ? shape.band / 3 : 0;
5959
+ const center2 = shape.pointX(last, rtl), reach = shape.kind === "bar" ? shape.band / 3 : 0;
5772
5960
  const lead = shape.spaced ? fontPx * 0.6 : fontPx * 0.25;
5773
- const start = rtl ? centre - reach - lead : centre + reach + lead;
5961
+ const start = rtl ? center2 - reach - lead : center2 + reach + lead;
5774
5962
  const swatch = fontPx * 0.6;
5775
5963
  const placed = shape.series.map((_, j) => {
5776
5964
  const point = shape.stacks[j][last], name = label3(data.columns[j + 1]), bold = focus?.includes(j) === true && !stableNameWidths(chart);
@@ -5779,18 +5967,18 @@ function placeStackNames(chart, data, axis2, box, plotInset, geometry, relaxed =
5779
5967
  return { j, name, bold, y, width };
5780
5968
  });
5781
5969
  const order = [...placed].sort((a, b) => a.y - b.y || b.j - a.j);
5782
- const centres = order.map((entry) => entry.y);
5970
+ const centers = order.map((entry) => entry.y);
5783
5971
  const top = plot.y + textHeight / 2, bottom = plot.y + plot.height - textHeight / 2;
5784
5972
  if ((order.length - 1) * textHeight > bottom - top + 1e-6) return void 0;
5785
- for (let index = 0; index < centres.length; index++) centres[index] = Math.max(centres[index], index ? centres[index - 1] + textHeight : top);
5786
- for (let index = centres.length - 1; index >= 0; index--) centres[index] = Math.min(centres[index], index === centres.length - 1 ? bottom : centres[index + 1] - textHeight);
5787
- for (let index = 0; index < centres.length; index++) centres[index] = Math.max(centres[index], index ? centres[index - 1] + textHeight : top);
5788
- if (!relaxed && order.some((entry, index) => Math.abs(centres[index] - entry.y) > textHeight + 1e-6)) return void 0;
5973
+ for (let index = 0; index < centers.length; index++) centers[index] = Math.max(centers[index], index ? centers[index - 1] + textHeight : top);
5974
+ for (let index = centers.length - 1; index >= 0; index--) centers[index] = Math.min(centers[index], index === centers.length - 1 ? bottom : centers[index + 1] - textHeight);
5975
+ for (let index = 0; index < centers.length; index++) centers[index] = Math.max(centers[index], index ? centers[index - 1] + textHeight : top);
5976
+ if (!relaxed && order.some((entry, index) => Math.abs(centers[index] - entry.y) > textHeight + 1e-6)) return void 0;
5789
5977
  const entries = order.map((entry, index) => ({
5790
5978
  series: entry.j,
5791
5979
  name: entry.name,
5792
5980
  ...entry.bold ? { bold: true } : {},
5793
- box: { x: rtl ? start - entry.width : start, y: centres[index] - lineHeight / 2, width: entry.width, height: lineHeight }
5981
+ box: { x: rtl ? start - entry.width : start, y: centers[index] - lineHeight / 2, width: entry.width, height: lineHeight }
5794
5982
  }));
5795
5983
  if (!relaxed && entries.some((entry) => entry.box.x < box.x - 0.5 || entry.box.x + entry.box.width > box.x + box.width + 0.5)) return void 0;
5796
5984
  return entries.sort((a, b) => a.series - b.series);
@@ -6046,9 +6234,9 @@ function categoryLabelReserve(labels, plot, cap, leftLimit, m) {
6046
6234
  }
6047
6235
  return { n, reserve: m.lineHeight + (rows3 - 1) * lineH };
6048
6236
  };
6049
- let plain2;
6050
- for (let n = 1; n <= count && !plain2; n++) plain2 = horizontal(n);
6051
- plain2 ??= { n: count, reserve: m.lineHeight };
6237
+ let plain3;
6238
+ for (let n = 1; n <= count && !plain3; n++) plain3 = horizontal(n);
6239
+ plain3 ??= { n: count, reserve: m.lineHeight };
6052
6240
  const rotated = (angle) => {
6053
6241
  const sin = angle === 90 ? 1 : Math.SQRT1_2, cos = angle === 90 ? 0 : Math.SQRT1_2;
6054
6242
  const n = Math.max(1, Math.ceil(lineH / sin / band - 1e-9));
@@ -6061,7 +6249,7 @@ function categoryLabelReserve(labels, plot, cap, leftLimit, m) {
6061
6249
  const reserve = Math.max(m.lineHeight, m.fontPx * 0.25 + extent2);
6062
6250
  return reserve > cap + 1e-6 ? void 0 : { n, reserve };
6063
6251
  };
6064
- const options = [plain2, rotated(45), rotated(90)].filter((option) => option !== void 0);
6252
+ const options = [plain3, rotated(45), rotated(90)].filter((option) => option !== void 0);
6065
6253
  return (options.find((option) => option.n === 1) ?? options.reduce((best, option) => option.n < best.n ? option : best)).reserve;
6066
6254
  }
6067
6255
  function chartPlotInset(chart, resolved2, composed, geometry) {
@@ -6295,13 +6483,13 @@ function placeEndLabels(chart, data, axis2, box, plotInset, geometry, relaxed =
6295
6483
  return { j, name: entry.name, text: text2, bold, y: at3(stacks[j][last].to), width: (bold && geometry.bold ? geometry.bold(text2, fontPx) : geometry.measure(text2, fontPx)) + fontPx * 0.5 };
6296
6484
  });
6297
6485
  const order = [...placed].sort((a, b) => a.y - b.y || a.j - b.j);
6298
- const centres = order.map((entry) => entry.y);
6486
+ const centers = order.map((entry) => entry.y);
6299
6487
  const top = plot.y, bottom = plot.y + plot.height - textHeight / 2;
6300
6488
  if ((order.length - 1) * textHeight > bottom - top + 1e-6) return void 0;
6301
- for (let index = 0; index < centres.length; index++) centres[index] = Math.max(centres[index], index ? centres[index - 1] + textHeight : top);
6302
- for (let index = centres.length - 1; index >= 0; index--) centres[index] = Math.min(centres[index], index === centres.length - 1 ? bottom : centres[index + 1] - textHeight);
6303
- for (let index = 0; index < centres.length; index++) centres[index] = Math.max(centres[index], index ? centres[index - 1] + textHeight : top);
6304
- if (!relaxed && order.some((entry, index) => Math.abs(centres[index] - entry.y) > textHeight + 1e-6)) return void 0;
6489
+ for (let index = 0; index < centers.length; index++) centers[index] = Math.max(centers[index], index ? centers[index - 1] + textHeight : top);
6490
+ for (let index = centers.length - 1; index >= 0; index--) centers[index] = Math.min(centers[index], index === centers.length - 1 ? bottom : centers[index + 1] - textHeight);
6491
+ for (let index = 0; index < centers.length; index++) centers[index] = Math.max(centers[index], index ? centers[index - 1] + textHeight : top);
6492
+ if (!relaxed && order.some((entry, index) => Math.abs(centers[index] - entry.y) > textHeight + 1e-6)) return void 0;
6305
6493
  const entries = order.map((entry, index) => ({
6306
6494
  series: entry.j,
6307
6495
  name: entry.name,
@@ -6309,7 +6497,7 @@ function placeEndLabels(chart, data, axis2, box, plotInset, geometry, relaxed =
6309
6497
  ...entry.bold ? { bold: true } : {},
6310
6498
  row: last,
6311
6499
  point: { x, y: entry.y },
6312
- box: { x: rtl ? x - gap - entry.width : x + gap, y: centres[index] - lineHeight / 2, width: entry.width, height: lineHeight }
6500
+ box: { x: rtl ? x - gap - entry.width : x + gap, y: centers[index] - lineHeight / 2, width: entry.width, height: lineHeight }
6313
6501
  }));
6314
6502
  return entries.sort((a, b) => a.series - b.series);
6315
6503
  }
@@ -6561,7 +6749,7 @@ function chartTitleFocus(chart, data, options = {}) {
6561
6749
  const numbers = titleNumbers(options.text);
6562
6750
  const values = data.rows.map((row) => chartNumber(row[1]));
6563
6751
  const byValue = values.map((value) => value !== null && numbers.some((number2) => {
6564
- if (number2.percent && !format.includes("%")) return false;
6752
+ if (number2.percent && !numberFormatSectionFor(format, value).includes("%")) return false;
6565
6753
  const target = number2.percent ? number2.value / 100 : number2.value, decimals = number2.percent ? number2.decimals + 2 : number2.decimals;
6566
6754
  return Math.abs(Number(value.toFixed(decimals)) - target) < 10 ** -(decimals + 6);
6567
6755
  }) ? 0 : -1);
@@ -6924,9 +7112,9 @@ function waterfallLabelReserve(names2, widthOf, plot, font, scale2, maximum) {
6924
7112
  }
6925
7113
  return { n, reserve: line2 + (rows3 - 1) * textHeight };
6926
7114
  };
6927
- let plain2;
6928
- for (let n = 1; n <= labels.length && !plain2; n++) plain2 = horizontal(n);
6929
- plain2 ??= { n: labels.length, reserve: line2 };
7115
+ let plain3;
7116
+ for (let n = 1; n <= labels.length && !plain3; n++) plain3 = horizontal(n);
7117
+ plain3 ??= { n: labels.length, reserve: line2 };
6930
7118
  const rotated = (angle) => {
6931
7119
  const sin = angle === 90 ? 1 : Math.SQRT1_2, cos = angle === 90 ? 0 : Math.SQRT1_2, n = Math.max(1, Math.ceil(textHeight / sin / band - 1e-9));
6932
7120
  let extent2 = 0;
@@ -6938,7 +7126,7 @@ function waterfallLabelReserve(names2, widthOf, plot, font, scale2, maximum) {
6938
7126
  const reserve = Math.max(line2, font * 0.25 + extent2);
6939
7127
  return reserve > maximum + 1e-6 ? void 0 : { n, reserve };
6940
7128
  };
6941
- const options = [plain2, rotated(45), rotated(90)].filter((value) => value !== void 0);
7129
+ const options = [plain3, rotated(45), rotated(90)].filter((value) => value !== void 0);
6942
7130
  return options.find((option) => option.n === 1) ?? options.reduce((best, option) => option.n < best.n ? option : best);
6943
7131
  }
6944
7132
  function waterfallAxis(chart, data, geometry, layer) {
@@ -6977,10 +7165,10 @@ function waterfallAxis(chart, data, geometry, layer) {
6977
7165
  }
6978
7166
 
6979
7167
  // src/image-aspect.ts
6980
- var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
7168
+ var isRecord3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
6981
7169
  function sourceOf(value) {
6982
7170
  if (typeof value === "string") return value;
6983
- return isRecord2(value) && typeof value.src === "string" ? value.src : void 0;
7171
+ return isRecord3(value) && typeof value.src === "string" ? value.src : void 0;
6984
7172
  }
6985
7173
  var PREFIX_BYTES = 64 * 1024;
6986
7174
  var JPEG_PREFIX_BYTES = 1024 * 1024;
@@ -7100,7 +7288,7 @@ function readDimensions(source) {
7100
7288
  }
7101
7289
  function intrinsicImageSize(value, assets) {
7102
7290
  let source = sourceOf(value);
7103
- for (let hop = 0; source?.startsWith("asset:") && hop < 8; hop++) source = sourceOf(isRecord2(assets) ? assets[source.slice(6)] : void 0);
7291
+ for (let hop = 0; source?.startsWith("asset:") && hop < 8; hop++) source = sourceOf(isRecord3(assets) ? assets[source.slice(6)] : void 0);
7104
7292
  if (!source?.startsWith("data:")) return void 0;
7105
7293
  if (!cache3.has(source)) {
7106
7294
  if (cache3.size >= CACHE_ENTRIES) cache3.delete(cache3.keys().next().value);
@@ -7115,16 +7303,20 @@ function intrinsicImageAspect(value, assets) {
7115
7303
  }
7116
7304
 
7117
7305
  // src/design-hints.ts
7118
- var DESIGN_HINT_KEYS = ["titleAlignment", "contentAlignment", "contentBox", "contentDirection", "chartPrimary", "imageFit", "listBullet", "listStyle", "mirror"];
7119
- var THEME_DESIGN_KEYS = ["titleAlignment", "contentAlignment", "contentBox", "contentDirection", "imageFit", "listBullet", "listStyle"];
7306
+ var DESIGN_HINT_KEYS = ["titleAlignment", "titlePosition", "contentAlignment", "contentBox", "imageFit", "listBullet", "listStyle", "mirror"];
7307
+ var THEME_DESIGN_KEYS = ["titleAlignment", "titlePosition", "contentAlignment", "contentBox", "imageFit", "listBullet", "listStyle"];
7308
+ var REMOVED_DESIGN_KEYS = Object.freeze({
7309
+ contentDirection: `OPF 0.35 removed design.contentDirection. Delete it: the engine now composes the slide. For a specific arrangement, set the slide's composition (mode "row" or "column", and weights); in a layout record, a region's flow "row" or "column" says it.`,
7310
+ chartPrimary: `OPF 0.35 removed design.chartPrimary. Delete it: the engine now composes the slide. For a specific arrangement, set the slide's composition (mode and weights), such as a chart on one side: mode "row", weights [3, 2], the chart first in blocks.`
7311
+ });
7312
+ var TITLE_POSITIONS = ["top", "start"];
7120
7313
  var itemAlignment = (value) => value === "start" ? "left" : value === "end" ? "right" : value === "center" ? "center" : void 0;
7121
7314
  var ALIGNMENTS = ["start", "center", "end"];
7122
7315
  var VALUES = {
7123
7316
  titleAlignment: ALIGNMENTS,
7317
+ titlePosition: TITLE_POSITIONS,
7124
7318
  contentAlignment: ALIGNMENTS,
7125
7319
  contentBox: "boolean",
7126
- contentDirection: ["horizontal", "vertical"],
7127
- chartPrimary: ["none", "top", "bottom", "start", "end"],
7128
7320
  imageFit: ["cover", "contain", "stretch", "auto"],
7129
7321
  listBullet: ["character", "image", "none"],
7130
7322
  listStyle: ["stack", "rows"],
@@ -7160,11 +7352,34 @@ function visualReadingOrder(items, direction = "ltr") {
7160
7352
  }
7161
7353
  function readingRows(items) {
7162
7354
  const index = new Map(items.map((item, i) => [item, i]));
7355
+ const center2 = (item) => item.box.y + item.box.height / 2;
7356
+ const tall = items.filter((item) => {
7357
+ const inside2 = items.filter((other) => other !== item && center2(other) >= item.box.y && center2(other) <= item.box.y + item.box.height);
7358
+ return inside2.some((a) => inside2.some((b) => a.box.y + a.box.height <= b.box.y));
7359
+ });
7360
+ const rest = items.filter((item) => !tall.includes(item));
7361
+ const rows3 = rowsOf(rest.length ? rest : items, index);
7362
+ if (rest.length) {
7363
+ for (const item of tall) {
7364
+ const spanned = rows3.filter((row) => row.some((other) => center2(other) >= item.box.y && center2(other) <= item.box.y + item.box.height));
7365
+ if (!spanned.length) {
7366
+ const at3 = rows3.findIndex((row) => Math.min(...row.map((other) => other.box.y)) > item.box.y);
7367
+ rows3.splice(at3 < 0 ? rows3.length : at3, 0, [item]);
7368
+ continue;
7369
+ }
7370
+ const atEnd = spanned.every((row) => row.every((other) => other.box.x + other.box.width <= item.box.x + 1));
7371
+ (atEnd ? spanned[spanned.length - 1] : spanned[0]).push(item);
7372
+ }
7373
+ for (const row of rows3) row.sort((a, b) => index.get(a) - index.get(b));
7374
+ }
7375
+ return rows3;
7376
+ }
7377
+ function rowsOf(items, index) {
7163
7378
  const sorted = [...items].sort((a, b) => a.box.y - b.box.y || a.box.x - b.box.x || index.get(a) - index.get(b));
7164
7379
  const rows3 = [];
7165
7380
  for (const item of sorted) {
7166
- const centre = item.box.y + item.box.height / 2;
7167
- const row = rows3.find((candidate) => centre >= candidate.top && centre <= candidate.bottom);
7381
+ const center2 = item.box.y + item.box.height / 2;
7382
+ const row = rows3.find((candidate) => center2 >= candidate.top && center2 <= candidate.bottom);
7168
7383
  if (row) {
7169
7384
  row.items.push(item);
7170
7385
  row.top = Math.min(row.top, item.box.y);
@@ -7177,8 +7392,8 @@ function readingRows(items) {
7177
7392
 
7178
7393
  // src/layout-template.ts
7179
7394
  var REGION_KINDS = ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape", "group"];
7180
- var REGION_ROLES = ["primary", "secondary", "media", "supporting"];
7181
- var REGION_FLOWS = ["none", "grid", "column", "auto"];
7395
+ var REGION_ROLES = ["primary", "media", "supporting"];
7396
+ var REGION_FLOWS = ["auto", "grid", "row", "column"];
7182
7397
  var REGION_ANCHORS = ["top", "middle", "bottom"];
7183
7398
  var HEADING_AREAS = ["title", "subtitle"];
7184
7399
  var RESERVED_REGION_NAMES = ["title", "subtitle", "tag", "auto", "start", "center", "end", "top", "middle", "bottom"];
@@ -7186,7 +7401,6 @@ var MAX_TEMPLATE_TRACKS = 12;
7186
7401
  var MAX_REGION_ENTRIES = 12;
7187
7402
  var MAX_REGION_DEPTH = 3;
7188
7403
  var MAX_REGION_BLOCKS = 12;
7189
- var AUTO_LAYOUT = "auto";
7190
7404
  var OPFLayoutTemplateError = class extends RangeError {
7191
7405
  constructor(issues) {
7192
7406
  super(`The layout template is invalid: ${issues.map((issue) => `${issue.path || "/"}: ${issue.message}`).join("; ")}`);
@@ -7203,6 +7417,8 @@ var headingNames = new Set(HEADING_AREAS);
7203
7417
  var positive = (value) => typeof value === "number" && Number.isFinite(value) && value > 0;
7204
7418
  var validSize = (value) => value === "auto" || positive(value) && value <= 100;
7205
7419
  var EPSILON = 1e-9;
7420
+ var singleBlockRegion = (region) => region.max === 1;
7421
+ var regionListColumns = (region) => region.arrangement === void 0 || region.arrangement === "numbered";
7206
7422
  function isLayoutTemplate(layout) {
7207
7423
  return Object.hasOwn(record12(layout), "regions");
7208
7424
  }
@@ -7210,7 +7426,7 @@ function layoutRegion(name, value, inherited) {
7210
7426
  const entry = record12(value);
7211
7427
  const accepts2 = Array.isArray(entry.accepts) ? [...new Set(entry.accepts.filter((kind2) => REGION_KINDS.includes(kind2)))] : [...REGION_KINDS];
7212
7428
  const flow = REGION_FLOWS.includes(entry.flow) ? entry.flow : "auto";
7213
- const max = Number.isInteger(entry.max) && entry.max >= 1 && entry.max <= MAX_REGION_BLOCKS ? entry.max : flow === "none" ? 1 : 6;
7429
+ const max = Number.isInteger(entry.max) && entry.max >= 1 && entry.max <= MAX_REGION_BLOCKS ? entry.max : 6;
7214
7430
  return {
7215
7431
  name,
7216
7432
  accepts: accepts2,
@@ -7218,15 +7434,14 @@ function layoutRegion(name, value, inherited) {
7218
7434
  flow,
7219
7435
  max,
7220
7436
  bleed: entry.bleed === true,
7221
- listColumns: entry.listColumns === "auto" ? "auto" : 1,
7222
7437
  ...entry.metrics === "tile" ? { metrics: "tile" } : {},
7223
- ...entry.sequence === "steps" || entry.sequence === "numbered" ? { sequence: entry.sequence } : {},
7224
- ...isArrangement(entry.arrangement) ? { arrangement: entry.arrangement } : {},
7225
- ...entry.arrangement === "pyramid" && entry.pyramidDirection === "down" ? { pyramidDirection: "down" } : {},
7438
+ ...isRegionArrangement(entry.arrangement) ? { arrangement: entry.arrangement } : {},
7226
7439
  anchor: REGION_ANCHORS.includes(entry.anchor) ? entry.anchor : inherited ?? "top",
7227
7440
  empty: entry.empty === "keep" ? "keep" : "collapse"
7228
7441
  };
7229
7442
  }
7443
+ var regionSequence = (region) => isSequenceArrangement(region.arrangement) ? region.arrangement : void 0;
7444
+ var regionDiagram = (region) => isArrangement(region.arrangement) ? region.arrangement : void 0;
7230
7445
  var anchorOf = (value) => REGION_ANCHORS.includes(value) ? value : void 0;
7231
7446
  var isSplitEntry = (entry) => entry.name === void 0 && (entry.regions !== void 0 || entry.direction !== void 0);
7232
7447
  function layoutEntries(layout) {
@@ -7322,7 +7537,6 @@ function parse2(layout) {
7322
7537
  } else {
7323
7538
  if (reserved.has(name)) add("layout-region", `${at3}/name`, `'${name}' is reserved and cannot name a body region (reserved: ${RESERVED_REGION_NAMES.join(", ")})`);
7324
7539
  else if (!NAME.test(name)) add("layout-region", `${at3}/name`, `'${name}' is not a region name (lowercase letters, digits and hyphens, starting with a letter)`);
7325
- if (entry.flow === "none" && entry.max !== void 0 && entry.max !== 1) add("layout-region", `${at3}/max`, `a region with flow "none" holds one block; max must be 1, not ${JSON.stringify(entry.max)}`);
7326
7540
  anchorCheck(`${at3}/anchor`, entry.anchor);
7327
7541
  const found = layoutRegion(name, entry, inherited);
7328
7542
  if (!found.accepts.length) add("layout-region", `${at3}/accepts`, `region '${name}' accepts no content kind`);
@@ -7369,7 +7583,7 @@ function parse2(layout) {
7369
7583
  order(children);
7370
7584
  const stackAnchor = anchorOf(value.anchor);
7371
7585
  const stack = direction === "column" && children.length > 0 && children.every((node) => node.size === "auto") && stackAnchor !== void 0 && stackAnchor !== "top" ? stackAnchor : void 0;
7372
- const overflowRegion = typeof value.overflowRegion === "string" ? value.overflowRegion : regions.find((entry) => entry.role === "primary" && entry.flow !== "none")?.name;
7586
+ const overflowRegion = typeof value.overflowRegion === "string" ? value.overflowRegion : regions.find((entry) => entry.role === "primary" && !singleBlockRegion(entry))?.name;
7373
7587
  return {
7374
7588
  issues,
7375
7589
  template: {
@@ -7457,6 +7671,46 @@ function compile(root) {
7457
7671
  function layoutTemplateIssues(layout) {
7458
7672
  return isLayoutTemplate(layout) ? parse2(layout).issues : [];
7459
7673
  }
7674
+ var TITLE_BESIDE_SHARE = [2, 3];
7675
+ function titleBesideTemplate(plan2) {
7676
+ const heading = (name) => headingNames.has(name);
7677
+ const headingRow = plan2.grid.map((row) => row.every(heading));
7678
+ if (plan2.grid.some((row, index) => !headingRow[index] && row.some(heading))) return void 0;
7679
+ const body = plan2.grid.filter((_, index) => !headingRow[index]);
7680
+ if (!body.length) return void 0;
7681
+ const total = plan2.columns.reduce((sum, size) => sum + size, 0);
7682
+ const [title, rest] = TITLE_BESIDE_SHARE;
7683
+ const columns2 = wholeWeights([total * title / rest, ...plan2.columns]);
7684
+ const grid = body.map((row) => ["title", ...row]);
7685
+ const bounds = /* @__PURE__ */ new Map();
7686
+ for (const [r, row] of grid.entries()) for (const [c, name] of row.entries()) {
7687
+ const found = bounds.get(name);
7688
+ if (!found) bounds.set(name, { top: r, left: c, bottom: r, right: c });
7689
+ else {
7690
+ found.top = Math.min(found.top, r);
7691
+ found.left = Math.min(found.left, c);
7692
+ found.bottom = Math.max(found.bottom, r);
7693
+ found.right = Math.max(found.right, c);
7694
+ }
7695
+ }
7696
+ const areaOf = (name) => {
7697
+ const box = bounds.get(name);
7698
+ return { name, row: box.top, column: box.left, rowSpan: box.bottom - box.top + 1, columnSpan: box.right - box.left + 1, heading: heading(name) };
7699
+ };
7700
+ const order = plan2.title ? plan2.areas.map((area2) => area2.name).filter((name) => name !== "subtitle") : ["title", ...plan2.areas.map((area2) => area2.name)];
7701
+ const { headingAnchors, ...rest2 } = plan2;
7702
+ const anchors = headingAnchors?.title !== void 0 ? { title: headingAnchors.title } : void 0;
7703
+ return {
7704
+ ...rest2,
7705
+ rows: plan2.rows.filter((_, index) => !headingRow[index]),
7706
+ columns: columns2,
7707
+ grid,
7708
+ areas: order.map(areaOf),
7709
+ title: true,
7710
+ subtitle: false,
7711
+ ...anchors ? { headingAnchors: anchors } : {}
7712
+ };
7713
+ }
7460
7714
  function layoutTemplate(layout) {
7461
7715
  const parsed = parse2(layout);
7462
7716
  if (!parsed.template) throw new OPFLayoutTemplateError(parsed.issues);
@@ -7947,7 +8201,6 @@ function stackedText(value) {
7947
8201
  var FIELDS = ["text", "items", "bullets", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape", "path"];
7948
8202
  var FIELD_KINDS = { text: "text", bullets: "text", items: "list", image: "image", video: "video", chart: "chart", table: "table", code: "code", metric: "metric", quote: "quote", shape: "shape", path: "shape", timeline: "timeline", diagram: "diagram" };
7949
8203
  var IMAGE_EDGES = ["start", "end", "top", "bottom"];
7950
- var PROMOTED_REGION_KEY = /^(top|middle|bottom)(\+(top|middle|bottom))*(:(start|center|end)(\+(start|center|end))*)?$|^(start|center|end)(\+(start|center|end))*$/;
7951
8204
  var record14 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
7952
8205
  var empty = (value) => value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0;
7953
8206
  function blockKind(block) {
@@ -7978,7 +8231,7 @@ function regionAccepts(region, block) {
7978
8231
  function placedImageBlocks(slide) {
7979
8232
  const value = record14(slide);
7980
8233
  const placed = /* @__PURE__ */ new Set();
7981
- if (!Array.isArray(value.blocks) || Object.keys(value).some((key) => PROMOTED_REGION_KEY.test(key))) return placed;
8234
+ if (!Array.isArray(value.blocks) || cellBlocks(value)) return placed;
7982
8235
  const used = /* @__PURE__ */ new Set();
7983
8236
  value.blocks.forEach((block, index) => {
7984
8237
  const host = record14(block);
@@ -8012,14 +8265,13 @@ function rootNodes(slide, slideIndex = 0) {
8012
8265
  }
8013
8266
  function regionRoleRank(role, kind2) {
8014
8267
  const media = kind2 === "image" || kind2 === "video";
8015
- return media ? { media: 0, primary: 1, secondary: 2, supporting: 3 }[role] : { primary: 0, secondary: 1, supporting: 2, media: 3 }[role];
8268
+ return media ? { media: 0, primary: 1, supporting: 2 }[role] : { primary: 0, supporting: 1, media: 2 }[role];
8016
8269
  }
8017
8270
  function bindRegions(slide, layout, options = {}) {
8018
8271
  const template = layoutTemplate(layout);
8019
8272
  const value = record14(slide), index = options.slideIndex ?? 0;
8020
8273
  const regions = template.regions.map((region) => ({ name: region.name, blocks: [], overflow: [] }));
8021
8274
  const result = { regions, below: [], diagnostics: [] };
8022
- if (Object.keys(value).some((key) => PROMOTED_REGION_KEY.test(key))) return result;
8023
8275
  const byName = new Map(template.regions.map((region, order2) => [region.name, { region, binding: regions[order2], order: order2 }]));
8024
8276
  const room = (name) => {
8025
8277
  const entry = byName.get(name);
@@ -8034,7 +8286,7 @@ function bindRegions(slide, layout, options = {}) {
8034
8286
  continue;
8035
8287
  }
8036
8288
  const target = byName.get(pin2), pinPath = `${node.path}.region`;
8037
- if (!target) result.diagnostics.push({ code: "region-unknown", path: pinPath, region: pin2, message: `The layout has no region '${pin2}'; the block is placed by its kind instead.` });
8289
+ if (!target) result.diagnostics.push({ code: "region-unknown", path: pinPath, region: pin2, message: `The layout has no region '${pin2}'; the block is placed by its kind instead.${isGridCell(pin2) ? ` '${pin2}' is a cell of a slide without a layout.` : ""}` });
8038
8290
  else if (!regionAccepts(target.region, node.value)) result.diagnostics.push({ code: "region-kind", path: pinPath, region: pin2, message: `Region '${pin2}' does not accept ${node.kind} content (it accepts ${target.region.accepts.join(", ")}); the block is placed by its kind instead.` });
8039
8291
  else if (!room(pin2)) result.diagnostics.push({ code: "region-full", path: pinPath, region: pin2, message: `Region '${pin2}' already holds its ${target.region.max} block${target.region.max === 1 ? "" : "s"}; the block is placed by its kind instead.` });
8040
8292
  else {
@@ -8315,7 +8567,7 @@ function collapseAreas(grid, empty2, heading, absorbs = () => true) {
8315
8567
  if (joined.has(name)) continue;
8316
8568
  const own3 = rect(name);
8317
8569
  if (!own3) continue;
8318
- const neighbour = (side) => {
8570
+ const neighbor = (side) => {
8319
8571
  const cells = [];
8320
8572
  if (side === "start" || side === "end") {
8321
8573
  const column = side === "start" ? own3.column - 1 : own3.column + own3.columnSpan;
@@ -8337,7 +8589,7 @@ function collapseAreas(grid, empty2, heading, absorbs = () => true) {
8337
8589
  let target;
8338
8590
  for (const body of [true, false]) {
8339
8591
  for (const side of sides) {
8340
- const candidate = neighbour(side);
8592
+ const candidate = neighbor(side);
8341
8593
  if (candidate !== void 0 && heading(candidate) !== body) {
8342
8594
  target = candidate;
8343
8595
  break;
@@ -8526,7 +8778,7 @@ function groupBinding(binding, template, nodes, options = {}) {
8526
8778
  }
8527
8779
  const moved = /* @__PURE__ */ new Set();
8528
8780
  for (const region of template.regions) {
8529
- if (region.flow === "none") continue;
8781
+ if (singleBlockRegion(region)) continue;
8530
8782
  const list = units.get(region.name);
8531
8783
  const foreign = list.filter((unit2) => !unplaced.has(unit2[0].path) && !regionAccepts(region, payloadOf.get(unit2[0].path)));
8532
8784
  const own3 = list.length - foreign.length;
@@ -8549,19 +8801,19 @@ function groupBinding(binding, template, nodes, options = {}) {
8549
8801
  below = below.filter((unit2) => {
8550
8802
  const block = unit2[0];
8551
8803
  if (!unplaced.has(block.path)) return true;
8552
- const target = homeOf(block).find((region) => units.get(region.name).length < (region.flow === "none" ? JOINED_FIXED_MAX : MAX_REGION_BLOCKS));
8804
+ const target = homeOf(block).find((region) => units.get(region.name).length < (singleBlockRegion(region) ? JOINED_FIXED_MAX : MAX_REGION_BLOCKS));
8553
8805
  if (!target) return true;
8554
8806
  units.get(target.name).push(unit2);
8555
- if (target.flow === "none" || units.get(target.name).length <= target.max) unplaced.delete(block.path);
8807
+ if (singleBlockRegion(target) || units.get(target.name).length <= target.max) unplaced.delete(block.path);
8556
8808
  joined.add(target.name);
8557
8809
  return false;
8558
8810
  });
8559
8811
  const rects = areaRects(template.grid);
8560
8812
  for (const name of joined) {
8561
8813
  const region = regionByName.get(name).region;
8562
- if (region.flow !== "none") continue;
8814
+ if (!singleBlockRegion(region)) continue;
8563
8815
  const rect = rects.get(name);
8564
- const siblings = template.regions.filter((other) => other.flow === "none" && other.role === region.role && rects.get(other.name)?.row === rect.row && rects.get(other.name)?.rowSpan === rect.rowSpan);
8816
+ const siblings = template.regions.filter((other) => singleBlockRegion(other) && other.role === region.role && rects.get(other.name)?.row === rect.row && rects.get(other.name)?.rowSpan === rect.rowSpan);
8565
8817
  const lead = siblings[0];
8566
8818
  if (siblings.length > 1) {
8567
8819
  const members = siblings.flatMap((other) => units.get(other.name));
@@ -8787,13 +9039,31 @@ function resolveReference(document, kind2, reference, options = {}) {
8787
9039
  var KIND_NOUNS = {
8788
9040
  layouts: "Layout",
8789
9041
  themes: "Theme",
8790
- colorSchemes: "Colour scheme",
9042
+ colorSchemes: "Color scheme",
8791
9043
  fontSchemes: "Font scheme",
8792
9044
  narratives: "Narrative",
8793
9045
  audiences: "Audience",
8794
9046
  purposes: "Purpose",
8795
9047
  tones: "Tone"
8796
9048
  };
9049
+ var removedLayoutAuto = (kind2, reference) => kind2 === "layouts" && reference === "auto";
9050
+ var RENAMED_LAYOUTS = Object.freeze({ flow: "process", "vertical-flow": "vertical-process", "agenda-split": "agenda" });
9051
+ var RENAMED_TITLE_POSITIONS = Object.freeze({ "agenda-split": "start" });
9052
+ function renamedLayoutTitlePosition(kind2, reference) {
9053
+ const parsed = kind2 === "layouts" ? parseReference(reference) : void 0;
9054
+ if (!parsed || parsed.group !== void 0 && parsed.group !== "default" || !Object.hasOwn(RENAMED_TITLE_POSITIONS, parsed.id)) return void 0;
9055
+ return RENAMED_TITLE_POSITIONS[parsed.id];
9056
+ }
9057
+ var RENAMED_LAYOUTS_CHANGE_DRAWING = /* @__PURE__ */ new Set(["flow", "agenda-split"]);
9058
+ function renamedLayoutChangesDrawing(kind2, reference) {
9059
+ const parsed = kind2 === "layouts" ? parseReference(reference) : void 0;
9060
+ return parsed !== void 0 && (parsed.group === void 0 || parsed.group === "default") && RENAMED_LAYOUTS_CHANGE_DRAWING.has(parsed.id);
9061
+ }
9062
+ function renamedLayout(kind2, reference) {
9063
+ const parsed = kind2 === "layouts" ? parseReference(reference) : void 0;
9064
+ if (!parsed || parsed.group !== void 0 && parsed.group !== "default" || !Object.hasOwn(RENAMED_LAYOUTS, parsed.id)) return void 0;
9065
+ return `${parsed.group !== void 0 ? "default:" : ""}${RENAMED_LAYOUTS[parsed.id]}`;
9066
+ }
8797
9067
  function unresolvedReference(document, kind2, reference, path, options = {}) {
8798
9068
  const parsed = parseReference(reference);
8799
9069
  const group = parsed?.group ?? "default";
@@ -8801,6 +9071,8 @@ function unresolvedReference(document, kind2, reference, path, options = {}) {
8801
9071
  const noun = KIND_NOUNS[kind2];
8802
9072
  const where = parsed?.group !== void 0 && !catalogGroupDeclared(document, parsed.group) ? `the document declares no catalogs.${parsed.group} group` : group === "custom" ? "it is not in catalogs.custom" : group === "default" && groupsOf(document).default === false ? "it is not in catalogs.custom and catalogs.default is false" : source === void 0 ? `it is not embedded in catalogs.${group === "default" ? "custom or catalogs.default" : group} and no catalog is registered for it` : `it is not embedded in catalogs.${group === "default" ? "custom or catalogs.default" : group} and the catalog registered for ${source} ${registeredCatalog(source, options) ? "has no such record" : "is not registered"}`;
8803
9073
  const fallback = kind2 === "layouts" ? "automatic" : "engine-default";
9074
+ const renamed = renamedLayout(kind2, reference), position = renamedLayoutTitlePosition(kind2, reference);
9075
+ const removed = removedLayoutAuto(kind2, reference) ? `OPF 0.35 removed layout 'auto' (omit layout for automatic composition)` : renamed !== void 0 ? `OPF 0.35 removed layout '${reference}' (use '${renamed}'${position ? ` with design.titlePosition '${position}'` : ""})` : where;
8804
9076
  return {
8805
9077
  code: "unresolved-reference",
8806
9078
  kind: kind2,
@@ -8809,7 +9081,7 @@ function unresolvedReference(document, kind2, reference, path, options = {}) {
8809
9081
  group,
8810
9082
  ...source !== void 0 ? { source } : {},
8811
9083
  fallback,
8812
- message: `${noun} '${reference}' resolves nowhere: ${where}; ${fallback === "automatic" ? "the slide composes automatically" : "the engine default is used"}.`
9084
+ message: `${noun} '${reference}' resolves nowhere: ${removed}; ${fallback === "automatic" ? "the slide composes automatically" : "the engine default is used"}.`
8813
9085
  };
8814
9086
  }
8815
9087
  var pushReference = (sites, kind2, value, path, group) => {
@@ -8853,7 +9125,7 @@ function catalogReferenceSites(document, options = {}) {
8853
9125
  if (options.slides !== false && Array.isArray(deck.slides))
8854
9126
  deck.slides.forEach((slide, index) => {
8855
9127
  if (!isRec(slide)) return;
8856
- if (slide.layout !== "auto") pushReference(sites, "layouts", slide.layout, ["slides", index, "layout"]);
9128
+ pushReference(sites, "layouts", slide.layout, ["slides", index, "layout"]);
8857
9129
  languageSites(sites, slide.language, ["slides", index, "language"]);
8858
9130
  designSites(sites, slide.design, ["slides", index, "design"]);
8859
9131
  });
@@ -8898,6 +9170,29 @@ function catalogRecords(document, kind2, options = {}) {
8898
9170
  function embeddedCopy(record20) {
8899
9171
  return Object.fromEntries(Object.entries(rec(record20)).filter(([key]) => key !== "$schema" && key !== "id" && !key.startsWith("x-")).map(([key, value]) => [key, structuredClone(value)]));
8900
9172
  }
9173
+ function relatedName(reference, candidate) {
9174
+ const bare = (value) => value.slice(value.lastIndexOf(":") + 1).toLowerCase();
9175
+ const a = bare(reference), b = bare(candidate);
9176
+ if (a === b) return true;
9177
+ const words2 = (value) => value.split(/[^\p{L}\p{N}]+/u).filter((word) => word.length >= 3);
9178
+ const other = new Set(words2(b));
9179
+ if (words2(a).some((word) => other.has(word))) return true;
9180
+ let prefix = 0;
9181
+ while (prefix < a.length && prefix < b.length && a[prefix] === b[prefix]) prefix++;
9182
+ if (prefix >= Math.min(3, a.length, b.length)) return true;
9183
+ if (a.length === b.length && [...a].sort().join("") === [...b].sort().join("")) return true;
9184
+ const pairs = (value) => Array.from({ length: Math.max(0, value.length - 1) }, (_, index) => value.slice(index, index + 2));
9185
+ const left = pairs(a), right = pairs(b), pool = [...right];
9186
+ let shared = 0;
9187
+ for (const pair of left) {
9188
+ const at3 = pool.indexOf(pair);
9189
+ if (at3 >= 0) {
9190
+ shared++;
9191
+ pool.splice(at3, 1);
9192
+ }
9193
+ }
9194
+ return left.length + right.length > 0 && 2 * shared / (left.length + right.length) >= 0.5;
9195
+ }
8901
9196
 
8902
9197
  // src/design-records.ts
8903
9198
  var isRec2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -8947,6 +9242,53 @@ function resolveFontScheme(document, reference, path, options = {}) {
8947
9242
  return { scheme, diagnostics };
8948
9243
  }
8949
9244
 
9245
+ // src/language-inference.ts
9246
+ var RTL_SCRIPTS = [
9247
+ ["ar", /(?=\p{L})\p{Script=Arabic}/gu],
9248
+ ["he", /(?=\p{L})\p{Script=Hebrew}/gu]
9249
+ ];
9250
+ var LETTERS = /\p{L}/gu;
9251
+ function plain2(value) {
9252
+ if (typeof value === "string") return value;
9253
+ if (Array.isArray(value)) return value.map((run) => typeof run === "string" ? run : isRecord2(run) && typeof run.text === "string" ? run.text : "").join("");
9254
+ if (isRecord2(value) && value.text !== void 0) return plain2(value.text);
9255
+ return "";
9256
+ }
9257
+ function slideText(slide) {
9258
+ const parts = [plain2(slide.title), plain2(slide.subtitle), plain2(slide.tag)];
9259
+ const payload = (node) => {
9260
+ parts.push(plain2(node.text));
9261
+ for (const field of ["items", "bullets"]) {
9262
+ const list = node[field];
9263
+ if (!Array.isArray(list)) continue;
9264
+ for (const entry of list) {
9265
+ parts.push(plain2(entry));
9266
+ if (isRecord2(entry)) parts.push(plain2(entry.description));
9267
+ }
9268
+ }
9269
+ const table = isRecord2(node.table) ? node.table : void 0;
9270
+ for (const cell of Array.isArray(table?.columns) ? table.columns : []) parts.push(isRecord2(cell) && typeof cell.name === "string" ? cell.name : plain2(isRecord2(cell) && "value" in cell ? cell.value : cell));
9271
+ for (const row of Array.isArray(table?.rows) ? table.rows : []) for (const cell of Array.isArray(row) ? row : []) parts.push(plain2(isRecord2(cell) && "value" in cell ? cell.value : cell));
9272
+ };
9273
+ payload(slide);
9274
+ visitContentPayloads(slide, "", (node) => payload(node));
9275
+ return parts.join("\n");
9276
+ }
9277
+ function languageOfText(document, slideIndex) {
9278
+ const slides = Array.isArray(document.slides) ? document.slides : [];
9279
+ const chosen = slideIndex === void 0 ? slides : [slides[slideIndex]];
9280
+ let text2 = "";
9281
+ for (const slide of chosen) if (isRecord2(slide)) text2 += `${slideText(slide)}
9282
+ `;
9283
+ if (!text2.trim()) return void 0;
9284
+ const letters = text2.match(LETTERS)?.length ?? 0;
9285
+ if (!letters) return void 0;
9286
+ for (const [language, pattern] of RTL_SCRIPTS) {
9287
+ if ((text2.match(pattern)?.length ?? 0) * 2 > letters) return language;
9288
+ }
9289
+ return void 0;
9290
+ }
9291
+
8950
9292
  // src/script-fonts.ts
8951
9293
  function normalizeLanguageFamily(value) {
8952
9294
  if (value === "latin") return "latin";
@@ -9086,14 +9428,14 @@ function resolveLanguage(reference) {
9086
9428
  if (!known2 && !inferScript(value)) return void 0;
9087
9429
  return { tag: value, ...known2 ? { known: known2 } : {}, overrides: {} };
9088
9430
  }
9089
- if (!isRecord(reference)) return void 0;
9431
+ if (!isRecord2(reference)) return void 0;
9090
9432
  const tag = text(reference.bcp47);
9091
9433
  if (!tag || !splitTag(tag)) return void 0;
9092
9434
  const known = matchLanguageTag(tag);
9093
9435
  return { tag, ...known ? { known } : {}, overrides: reference };
9094
9436
  }
9095
9437
  function pairFamilies(value) {
9096
- if (!isRecord(value)) return void 0;
9438
+ if (!isRecord2(value)) return void 0;
9097
9439
  const major = text(value.major);
9098
9440
  const minor = text(value.minor);
9099
9441
  const heading = major ?? minor;
@@ -9114,7 +9456,7 @@ function schemeServesLanguage(scheme, tag, script) {
9114
9456
  });
9115
9457
  }
9116
9458
  function resolveScriptFonts(input, options = {}) {
9117
- const document = isRecord(input) ? input : {};
9459
+ const document = isRecord2(input) ? input : {};
9118
9460
  if (options.slideIndex !== void 0) {
9119
9461
  const slides2 = Array.isArray(document.slides) ? document.slides : [];
9120
9462
  if (!Number.isInteger(options.slideIndex) || options.slideIndex < 0 || options.slideIndex >= slides2.length) {
@@ -9127,12 +9469,13 @@ function resolveScriptFonts(input, options = {}) {
9127
9469
  const fromOption = options.language !== void 0 ? resolveLanguage(options.language) : void 0;
9128
9470
  const slides = Array.isArray(document.slides) ? document.slides : [];
9129
9471
  const slide = options.slideIndex === void 0 ? void 0 : slides[options.slideIndex];
9130
- const authoredLanguage = isRecord(slide) && slide.language !== void 0 ? slide.language : document.language;
9472
+ const authoredLanguage = isRecord2(slide) && slide.language !== void 0 ? slide.language : document.language;
9131
9473
  const fromDocument = fromOption ? void 0 : resolveLanguage(authoredLanguage);
9474
+ const fromText = fromOption || authoredLanguage !== void 0 ? void 0 : resolveLanguage(languageOfText(document, options.slideIndex));
9132
9475
  const requestedDefault = text(options.defaultLanguage);
9133
9476
  const fallbackTag = requestedDefault && splitTag(requestedDefault) ? requestedDefault : "en-US";
9134
- const language = fromOption ?? fromDocument ?? resolveLanguage(fallbackTag) ?? { tag: fallbackTag, overrides: {} };
9135
- const languageSource = fromOption ? "option" : fromDocument ? "document" : "default";
9477
+ const language = fromOption ?? fromDocument ?? fromText ?? resolveLanguage(fallbackTag) ?? { tag: fallbackTag, overrides: {} };
9478
+ const languageSource = fromOption ? "option" : fromDocument ? "document" : fromText ? "text" : "default";
9136
9479
  const overrides = language.overrides;
9137
9480
  const known = language.known;
9138
9481
  const bcp47 = canonicalTag(language.tag);
@@ -9181,7 +9524,7 @@ function resolveScriptFonts(input, options = {}) {
9181
9524
  };
9182
9525
  }
9183
9526
  function resolveSlideDirection(presentation, slideIndex) {
9184
- if (!isRecord(presentation)) return "ltr";
9527
+ if (!isRecord2(presentation)) return "ltr";
9185
9528
  try {
9186
9529
  return resolveScriptFonts(presentation, Number.isInteger(slideIndex) ? { slideIndex } : {}).direction;
9187
9530
  } catch {
@@ -9413,7 +9756,7 @@ var UNITS = /* @__PURE__ */ new Set([
9413
9756
  "Mill.",
9414
9757
  "Mld",
9415
9758
  "Mld.",
9416
- // Arabic and Hebrew: million, billion, kilometre, kilogram.
9759
+ // Arabic and Hebrew: million, billion, kilometer, kilogram.
9417
9760
  "\u0645\u0644\u064A\u0648\u0646",
9418
9761
  "\u0645\u0644\u064A\u0627\u0631",
9419
9762
  "\u0643\u0645",
@@ -9479,7 +9822,7 @@ var codePointAt = (text2, index) => {
9479
9822
  const point = text2.codePointAt(index);
9480
9823
  return point === void 0 ? void 0 : String.fromCodePoint(point);
9481
9824
  };
9482
- var LETTERS = /^[\p{L}\p{M}\u00b2\u00b3/.]+/u;
9825
+ var LETTERS2 = /^[\p{L}\p{M}\u00b2\u00b3/.]+/u;
9483
9826
  function lineMayStartAt(text2, index) {
9484
9827
  const before = codePointBefore(text2, index), at3 = codePointAt(text2, index);
9485
9828
  if (before === void 0 || at3 === void 0) return true;
@@ -9491,7 +9834,7 @@ function lineMayStartAt(text2, index) {
9491
9834
  if (isDigit(before) && (SYMBOL_UNITS.includes(at3) || CJK_UNITS.includes(at3))) return false;
9492
9835
  if (RATIO_SLASHES.has(at3) && isDigit(before) || RATIO_SLASHES.has(before) && isDigit(at3) && isDigit(beforeThat)) return false;
9493
9836
  if (isDigit(before) && /^\p{L}$/u.test(at3)) {
9494
- const unit2 = LETTERS.exec(text2.slice(index, index + 16))?.[0].replace(TRAILING, "");
9837
+ const unit2 = LETTERS2.exec(text2.slice(index, index + 16))?.[0].replace(TRAILING, "");
9495
9838
  if (unit2 && UNITS.has(unit2)) return false;
9496
9839
  }
9497
9840
  return true;
@@ -10329,7 +10672,6 @@ function chooseConnectorSites(route, fromSites, toSites, options = {}) {
10329
10672
  return best && { from: best.from, to: best.to, geometry: best.geometry };
10330
10673
  }
10331
10674
  var OVERLAY_LAYERS = ["front", "back"];
10332
- var REGION_KEY = /^(?:(?:top|middle|bottom)(?:\+(?:middle|bottom))*(?::(?:start|center|end)(?:\+(?:center|end))*)?|(?:start|center|end)(?:\+(?:center|end))*)$/;
10333
10675
  function slideBlockIds(slide, slidePath) {
10334
10676
  const ids = /* @__PURE__ */ new Map();
10335
10677
  const walk2 = (payload, path, depth) => {
@@ -10343,7 +10685,7 @@ function slideBlockIds(slide, slidePath) {
10343
10685
  if (Array.isArray(value.blocks)) value.blocks.forEach((block, index) => {
10344
10686
  if (block !== null && typeof block === "object") walk2(record17(block), `${slidePath}.blocks.${index}`, 0);
10345
10687
  });
10346
- for (const key of Object.keys(value)) if (REGION_KEY.test(key) && value[key] !== null && typeof value[key] === "object" && !Array.isArray(value[key])) walk2(record17(value[key]), `${slidePath}.${key}`, 0);
10688
+ for (const key of Object.keys(value)) if (isGridCell(key) && value[key] !== null && typeof value[key] === "object" && !Array.isArray(value[key])) walk2(record17(value[key]), `${slidePath}.${key}`, 0);
10347
10689
  return ids;
10348
10690
  }
10349
10691
  function blockTarget(composition, blockPath) {
@@ -11434,9 +11776,9 @@ function codeLineRuns(tokens, start, end, source) {
11434
11776
  var distance2 = (a, b) => Math.hypot(...channels(a).map((value, index) => value - channels(b)[index]));
11435
11777
  var FALLBACK = { keyword: "#C4B5FD", string: "#86EFAC", number: "#FCD34D", function: "#93C5FD", type: "#67E8F9", property: "#F9A8D4", comment: "#94A3B8" };
11436
11778
  function codeSyntaxPalette(theme = {}, options = {}) {
11437
- const background = normalize(options.background) ?? CODE_PANEL_BACKGROUND, plain2 = normalize(options.foreground) ?? CODE_PANEL_FOREGROUND;
11779
+ const background = normalize(options.background) ?? CODE_PANEL_BACKGROUND, plain3 = normalize(options.foreground) ?? CODE_PANEL_FOREGROUND;
11438
11780
  const minimum = options.minimumContrast ?? CODE_SYNTAX_MIN_CONTRAST;
11439
- const palette = { plain: legible(plain2, background, minimum) };
11781
+ const palette = { plain: legible(plain3, background, minimum) };
11440
11782
  const taken = [palette.plain];
11441
11783
  const slots = [["keyword", theme.primary], ["string", theme.accent], ["number", theme.secondary], ["comment", theme.mutedText], ["function", void 0], ["type", void 0], ["property", void 0]];
11442
11784
  for (const [kind2, themed] of slots) {
@@ -11769,28 +12111,27 @@ var CAPTION_MAX_RATIO = 0.35;
11769
12111
  var FOOTNOTE_MAX_RATIO = 0.35;
11770
12112
  var CAPTIONABLE_FIELDS = Object.freeze(["image", "chart", "table", "video", "diagram"]);
11771
12113
  var record18 = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
11772
- var isRecord3 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
12114
+ var isRecord4 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
11773
12115
  var round6 = (value) => Math.round(value * 1e6) / 1e6 || value;
11774
- var regionKey = /^(top|middle|bottom|start|center|end)([+:]|$)/;
11775
12116
  var TEXT_FIELDS = ["text", "items", "bullets"];
11776
12117
  var HEADING_FIELDS = ["tag", "title", "subtitle"];
11777
12118
  function annotationText(value) {
11778
12119
  if (typeof value === "string") return value;
11779
12120
  if (Array.isArray(value)) return value.map((run) => typeof run === "string" ? run : record18(run).text ?? "").join("");
11780
- if (isRecord3(value) && value.text !== void 0) return annotationText(value.text);
12121
+ if (isRecord4(value) && value.text !== void 0) return annotationText(value.text);
11781
12122
  return value === void 0 || value === null ? "" : String(value);
11782
12123
  }
11783
12124
  function captionSettings(value) {
11784
12125
  if (value === void 0 || value === null) return void 0;
11785
12126
  if (typeof value === "string" || Array.isArray(value)) return { text: value, position: "below", align: "start" };
11786
- if (!isRecord3(value) || value.text === void 0) return void 0;
12127
+ if (!isRecord4(value) || value.text === void 0) return void 0;
11787
12128
  return { text: value.text, position: value.position === "above" ? "above" : "below", align: value.align === "center" || value.align === "end" ? value.align : "start" };
11788
12129
  }
11789
12130
  function walkCitationRuns(slide, basePath, visit) {
11790
12131
  const runs = (value2, path) => {
11791
12132
  if (!Array.isArray(value2)) return;
11792
12133
  value2.forEach((run, index) => {
11793
- if (!isRecord3(run) || typeof run.text !== "string") return;
12134
+ if (!isRecord4(run) || typeof run.text !== "string") return;
11794
12135
  const cite = run.cite === void 0 ? [] : Array.isArray(run.cite) ? run.cite.filter((id) => typeof id === "string") : typeof run.cite === "string" ? [run.cite] : [];
11795
12136
  const footnote = typeof run.footnote === "string" || Array.isArray(run.footnote) ? run.footnote : void 0;
11796
12137
  if (!cite.length && footnote === void 0) return;
@@ -11801,7 +12142,7 @@ function walkCitationRuns(slide, basePath, visit) {
11801
12142
  if (!Array.isArray(items)) return;
11802
12143
  items.forEach((item, index) => {
11803
12144
  if (Array.isArray(item)) runs(item, `${path}.${index}`);
11804
- else if (isRecord3(item)) {
12145
+ else if (isRecord4(item)) {
11805
12146
  runs(item.text, `${path}.${index}.text`);
11806
12147
  runs(item.description, `${path}.${index}.description`);
11807
12148
  }
@@ -11821,13 +12162,18 @@ function walkCitationRuns(slide, basePath, visit) {
11821
12162
  if (field === "text") runs(payload.text, `${path}.text`);
11822
12163
  else list(payload[field], `${path}.${field}`);
11823
12164
  }
11824
- if (isRecord3(payload.quote)) runs(payload.quote.text, `${path}.quote.text`);
12165
+ if (isRecord4(payload.quote)) runs(payload.quote.text, `${path}.quote.text`);
11825
12166
  };
11826
12167
  const value = record18(slide);
11827
12168
  for (const field of HEADING_FIELDS) runs(value[field], `${basePath}.${field}`);
11828
- const regions = Object.keys(value).filter((key) => regionKey.test(key)).sort();
11829
- if (regions.length) {
11830
- for (const key of regions) host(value[key], `${basePath}.${key}`, 0);
12169
+ const cells = cellsInReadingOrder(Object.keys(value).filter(isGridCell).map((cell) => ({ cell })));
12170
+ if (cells.length) {
12171
+ for (const key of cells) host(value[key], `${basePath}.${key}`, 0);
12172
+ return;
12173
+ }
12174
+ const placed = cellBlocks(value);
12175
+ if (placed) {
12176
+ for (const cell of cellsInReadingOrder(placed)) for (const entry of placed) if (entry.cell === cell) host(entry.block, `${basePath}.blocks.${entry.index}`, 0);
11831
12177
  return;
11832
12178
  }
11833
12179
  if (Array.isArray(value.blocks)) {
@@ -11841,7 +12187,7 @@ function walkCitationRuns(slide, basePath, visit) {
11841
12187
  var citationMarkerText = (numbers) => numbers.join(",");
11842
12188
  function referenceList(presentation) {
11843
12189
  const list = record18(presentation).references;
11844
- return Array.isArray(list) ? list.filter((item) => isRecord3(item) && typeof item.id === "string") : [];
12190
+ return Array.isArray(list) ? list.filter((item) => isRecord4(item) && typeof item.id === "string") : [];
11845
12191
  }
11846
12192
  function numberSlide(slide, slideIndex, references, numbering) {
11847
12193
  const markers = /* @__PURE__ */ new Map(), marked = [], used = /* @__PURE__ */ new Map();
@@ -11914,10 +12260,10 @@ function runInHeading(text2) {
11914
12260
  return [{ text: label6[1], bold: true }, label6[2]];
11915
12261
  }
11916
12262
  function layoutCaption(value, box, path, options) {
11917
- const plain2 = captionSettings(value);
11918
- if (!plain2) return void 0;
11919
- const settings = options.nameDetail ? { ...plain2, text: splitCaptionName(plain2.text) } : plain2;
11920
- const alignment = plain2.align === "center" ? "center" : plain2.align === "end" ? "right" : "left";
12263
+ const plain3 = captionSettings(value);
12264
+ if (!plain3) return void 0;
12265
+ const settings = options.nameDetail ? { ...plain3, text: splitCaptionName(plain3.text) } : plain3;
12266
+ const alignment = plain3.align === "center" ? "center" : plain3.align === "end" ? "right" : "left";
11921
12267
  const fontSize = Math.max(options.minFontSize, CAPTION_FONT_RATIO * 25 * options.scale), gap = fontSize * 0.4;
11922
12268
  const maxHeight = Math.max(fontSize * 1.22, box.height * CAPTION_MAX_RATIO);
11923
12269
  const diagnostics = [];
@@ -13450,7 +13796,10 @@ function documentIcons(input) {
13450
13796
  payload(block, `${path}.blocks.${index}`, depth + 1);
13451
13797
  });
13452
13798
  };
13453
- const slide = (value, path) => payload(value, path, 0);
13799
+ const slide = (value, path) => {
13800
+ payload(value, path, 0);
13801
+ if (isRec3(value)) for (const key of gridCells) payload(value[key], `${path}.${key}`, 1);
13802
+ };
13454
13803
  if (isRec3(input) && Array.isArray(input.slides)) input.slides.forEach((value, index) => {
13455
13804
  slide(value, `slides.${index}`);
13456
13805
  });
@@ -13491,11 +13840,16 @@ function distance3(a, b) {
13491
13840
  }
13492
13841
  return row[b.length];
13493
13842
  }
13494
- function nearIconNames(name, names2, limit = 5) {
13495
- const scored = [];
13843
+ function nearIconNames(name, names2, limit = 5, tags) {
13844
+ const words2 = (text2) => text2.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
13845
+ const wanted = words2(name), scored = [];
13496
13846
  for (const candidate of names2) {
13497
- const contains = candidate.includes(name) || name.includes(candidate) ? 0 : 1, edits = distance3(name, candidate);
13498
- if (contains === 0 || edits <= Math.max(2, Math.floor(name.length / 3))) scored.push([candidate, contains * 100 + edits + Math.abs(candidate.length - name.length) / 100]);
13847
+ const own3 = words2(candidate), keywords = new Set((tags?.[candidate] ?? []).flatMap(words2)), edits = distance3(name, candidate);
13848
+ const named = wanted.filter((word) => own3.includes(word)).length, meant = wanted.filter((word) => own3.includes(word) || keywords.has(word)).length;
13849
+ const contained = name.length >= 3 && candidate.includes(name);
13850
+ const tier = contained || wanted.length > 1 && meant === wanted.length && named > 0 ? 0 : named > 0 || meant > 0 ? 1 : edits <= Math.max(2, Math.floor(name.length / 3)) ? 2 : 3;
13851
+ if (tier === 3) continue;
13852
+ scored.push([candidate, tier * 100 + (wanted.length - meant) * 10 + own3.length - named + edits / 10 + Math.abs(candidate.length - name.length) / 1e3]);
13499
13853
  }
13500
13854
  return scored.sort((a, b) => a[1] - b[1] || a[0].localeCompare(b[0])).slice(0, limit).map(([candidate]) => candidate);
13501
13855
  }
@@ -13518,7 +13872,12 @@ function resolveIcon(document, value, options = {}) {
13518
13872
  if (icon === void 0) {
13519
13873
  const names2 = setNames(set2);
13520
13874
  if (Array.isArray(set2.names) && names2.includes(reference.name)) return failed !== void 0 ? { ok: false, code: "icon-unknown", message: failed } : { ok: false, code: "icon-unloaded", message: `The icon ${written} is registered but not loaded yet (ensureIcons).` };
13521
- const suggestions = nearIconNames(reference.name, names2);
13875
+ const current = Object.hasOwn(set2.renamed ?? {}, reference.name) ? set2.renamed[reference.name] : void 0;
13876
+ if (current !== void 0 && names2.includes(current)) {
13877
+ const now = `${reference.set}:${current}`;
13878
+ return { ok: false, code: "icon-unknown", message: `${written} was renamed ${now}; the old name does not draw.`, suggestions: [now], renamed: now };
13879
+ }
13880
+ const suggestions = nearIconNames(reference.name, names2, 5, set2.tags);
13522
13881
  return { ok: false, code: "icon-unknown", message: `The icon set ${reference.set} has no icon ${reference.name}.`, ...suggestions.length ? { suggestions: suggestions.map((name2) => `${reference.set}:${name2}`) } : {} };
13523
13882
  }
13524
13883
  const parts = setIconParts(set2, icon);
@@ -13662,7 +14021,7 @@ function embedIcons(document, options = {}) {
13662
14021
  const sets = groupFor(entry.source);
13663
14022
  const missing2 = [...names2].filter((name) => !(own3 && Object.hasOwn(own3.icons, name)) && Object.hasOwn(source.icons, name)).sort();
13664
14023
  if (!missing2.length) continue;
13665
- const base = isRec3(sets[id]) ? sets[id] : (({ icons: _icons, tags: _tags, licenseText: _text, names: _names, ...rest }) => Object.fromEntries(Object.entries(rest).filter(([key]) => key !== "$schema" && key !== "id" && !key.startsWith("x-"))))(source);
14024
+ const base = isRec3(sets[id]) ? sets[id] : (({ icons: _icons, tags: _tags, licenseText: _text, names: _names, renamed: _renamed, ...rest }) => Object.fromEntries(Object.entries(rest).filter(([key]) => key !== "$schema" && key !== "id" && !key.startsWith("x-"))))(source);
13666
14025
  sets[id] = { ...base, icons: { ...isRec3(base.icons) ? base.icons : {}, ...Object.fromEntries(missing2.map((name) => [name, source.icons[name]])) } };
13667
14026
  added.push(...missing2.map((name) => `${id}:${name}`));
13668
14027
  }
@@ -13686,7 +14045,7 @@ function iconColors(roles, dark) {
13686
14045
  var LAYOUT_BODY_KINDS = ["text", "list", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram", "shape"];
13687
14046
  function layoutStructure(layout) {
13688
14047
  if (!isLayoutTemplate(layout)) return "";
13689
- return layoutEntries(layout).map((entry) => entry.region ? `${entry.name} (${entry.region.flow}: ${entry.region.accepts.join(", ")})` : entry.name).join(", ");
14048
+ return layoutEntries(layout).map((entry) => entry.region ? `${entry.name} (${entry.region.flow}${entry.region.max === 1 ? ", max 1" : ""}: ${entry.region.accepts.join(", ")})` : entry.name).join(", ");
13690
14049
  }
13691
14050
  function layoutContent(layout) {
13692
14051
  const areas = isLayoutTemplate(layout) ? layoutEntries(layout) : [];
@@ -14147,13 +14506,13 @@ function linesSplitWord(source, lines) {
14147
14506
  return joined !== source.replace(/\s+/gu, " ").trim();
14148
14507
  }
14149
14508
  function listSplitWords(result) {
14150
- const plain2 = (value) => typeof value === "string" ? value : Array.isArray(value) ? value.map((run) => typeof run === "string" ? run : String(record19(run).text ?? "")).join("") : "";
14509
+ const plain3 = (value) => typeof value === "string" ? value : Array.isArray(value) ? value.map((run) => typeof run === "string" ? run : String(record19(run).text ?? "")).join("") : "";
14151
14510
  let count = 0;
14152
14511
  for (const item of result.items) {
14153
14512
  if (!item.text || !("listEntries" in item.text)) continue;
14154
14513
  for (const entry of item.text.listEntries) {
14155
- if (linesSplitWord(plain2(entry.value), entry.text.lines)) count++;
14156
- if (entry.description && linesSplitWord(plain2(entry.descriptionValue), entry.description.lines)) count++;
14514
+ if (linesSplitWord(plain3(entry.value), entry.text.lines)) count++;
14515
+ if (entry.description && linesSplitWord(plain3(entry.descriptionValue), entry.description.lines)) count++;
14157
14516
  }
14158
14517
  }
14159
14518
  return count;
@@ -14964,7 +15323,7 @@ function layoutMetric(value, box, options = {}) {
14964
15323
  const valueSize = options.tile ? Math.min(152, Math.max(76, box.height * METRIC_TILE_VALUE_SHARE / scale2)) : 76;
14965
15324
  const least = snapFontSizeUp(Math.max(minimum, options.minimumSizes?.[role] ?? 0));
14966
15325
  const eyebrow = options.eyebrow === true && role === "label" && !options.tile, caps = eyebrow && eyebrowCaps(text2);
14967
- const display = role === "value" && options.message && messageCharacters(text2) <= FIGURE_CEILING.characters ? FIGURE_CEILING.size : LONE_DISPLAY_SIZES[role];
15326
+ const display = options.proportional ? Infinity : role === "value" && options.message && messageCharacters(text2) <= FIGURE_CEILING.characters ? FIGURE_CEILING.size : LONE_DISPLAY_SIZES[role];
14968
15327
  const nominal = Math.max(Math.min(grownRoleSize(role === "value" ? valueSize : role === "description" ? 20 : role === "trend" ? 18 : eyebrow ? EYEBROW_TAG_SIZE : 23, eyebrow ? void 0 : options.growth, display) * scale2, options.roleSizes?.[role] ?? Infinity), least);
14969
15328
  const tracked = caps || role === "label" && capitalsLabel(text2);
14970
15329
  const requestedStyle = { fontFamily: (role === "value" ? options.fontFamilies?.heading : eyebrow ? options.fontFamilies?.accent ?? options.fontFamilies?.body : options.fontFamilies?.body) ?? "sans-serif", fontWeight: role === "value" ? 800 : eyebrow ? 700 : role === "description" ? 400 : 500, italic: false, path, ...caps ? { caps: true } : {}, ...tracked ? { tracking: EYEBROW_TRACKING } : {} };
@@ -16003,9 +16362,9 @@ var LIST_DISPLAY_RULE = 0.14;
16003
16362
  var LIST_DISPLAY_GAP = 0.3;
16004
16363
  var STEP_BADGE = 1.75;
16005
16364
  var STEP_BADGE_GAP = 0.4;
16006
- var STEP_FLOW_MIN = 3;
16007
- var STEP_FLOW_MAX = 6;
16008
- var STEP_FLOW_CHARACTERS = 24;
16365
+ var STEP_PROCESS_MIN = 2;
16366
+ var STEP_PROCESS_MAX = 8;
16367
+ var STEP_PROCESS_CHARACTERS = 24;
16009
16368
  var LIST_MARKERS = ["\u2022", "\u2013"];
16010
16369
  function contentNominalSize(field) {
16011
16370
  return field === "items" || field === "bullets" ? LIST_NOMINAL_SIZE : field === "table" ? TABLE_NOMINAL_SIZE : PROSE_NOMINAL_SIZE;
@@ -16019,8 +16378,8 @@ function fitList(input, box, requestedSize = contentNominalSize("items"), minFon
16019
16378
  const runs = (value2) => typeof value2 === "string" ? [value2] : value2;
16020
16379
  if (!Array.isArray(runs(text2)) || description !== void 0 && !Array.isArray(runs(description))) throw new TypeError("List text and descriptions must be strings or text runs.");
16021
16380
  const base = options.style.path ? `${options.style.path}.${index}` : void 0;
16022
- const plain2 = (value2) => typeof value2 === "string" ? value2 : value2.map((run) => typeof run === "string" ? run : run.text).join("");
16023
- const direction = options.direction === "rtl" ? paragraphDirection(plain2(text2), "rtl") : void 0;
16381
+ const plain3 = (value2) => typeof value2 === "string" ? value2 : value2.map((run) => typeof run === "string" ? run : run.text).join("");
16382
+ const direction = options.direction === "rtl" ? paragraphDirection(plain3(text2), "rtl") : void 0;
16024
16383
  return { index, level, direction, value: text2, descriptionValue: description, textPath: base ? base + (object2 ? ".text" : "") : void 0, descriptionPath: base ? base + ".description" : void 0, runs: runs(text2), descriptionRuns: description === void 0 ? void 0 : runs(description) };
16025
16384
  });
16026
16385
  const numbers = options.numbering === void 0 ? void 0 : listNumbers(input, options.numbering);
@@ -16487,6 +16846,8 @@ function composeLayoutAreas(layout, options = {}) {
16487
16846
  const result = composeSlide(slide, { ...compose, layout: kept, [LAYOUT_MASTER]: true });
16488
16847
  const areas = template.areas.map((area2) => {
16489
16848
  if (area2.heading) {
16849
+ const joined = area2.name === "subtitle" && !result.headingAreas?.some((entry) => entry.name === "subtitle") ? result.headingAreas?.find((entry) => entry.name === "title")?.parts?.subtitle : void 0;
16850
+ if (joined) return { name: area2.name, heading: true, box: { ...joined } };
16490
16851
  const found = result.headingAreas?.find((entry) => entry.name === area2.name);
16491
16852
  return { name: area2.name, heading: true, box: found ? { ...found.box } : { x: 0, y: 0, width: 0, height: 0 }, ...found?.parts ? { parts: found.parts } : {} };
16492
16853
  }
@@ -16511,7 +16872,7 @@ var EMPHASIS_TAKEAWAY_MAX_CHARACTERS = 120;
16511
16872
  var EMPHASIS_NOTE_LINES = 3;
16512
16873
  var NOTE_PEER_RATIO = [0.6, 1.6];
16513
16874
  var NOTE_PEER_WORDS = 6;
16514
- var VERDICT_REGIONS = /* @__PURE__ */ new Set(["verdict"]);
16875
+ var verdictRegion = (template) => template.regions.some((region) => region.name === "first") && template.regions.some((region) => region.name === "aside") ? "aside" : void 0;
16515
16876
  var FIGURE_ROW_MIN = 2;
16516
16877
  var FIGURE_ROW_MAX = 4;
16517
16878
  var FIGURE_WORDS = 4;
@@ -16596,7 +16957,7 @@ function bodyReadability(result, options) {
16596
16957
  }
16597
16958
  var RULES = /* @__PURE__ */ Symbol("opf.rules");
16598
16959
  var FIRED = /* @__PURE__ */ Symbol("opf.fired");
16599
- var GUARDED_RULES = ["half-steps", "nested-gaps", "empty-columns", "centered-column", "region-measure", "mixed-cards", "short-row", "metric-start", "metric-figure", "quote-beside", "quote-card", "emphasis-band", "featured-card", "pull-quote", "timeline-status", "metric-tiles", "long-text-rows", "reading-measure", "lead-stack", "paragraph-columns", "bar-chart-share", "metric-display", "eyebrow", "list-rows", "pair-rows", "step-badges", "numerals", "delta-pill", "check-tiles", "tier-cards", "pillar-words", "icons", "icon-chips", "icon-cards", "text-tiles", "title-rule", "statement-message", "display-message", "table-note", "compact-grid", "portraits", "heading-tracks", "note-band", "figure-row", "run-in", "layout-first", "closing-lead", "placed-tiles"];
16960
+ var GUARDED_RULES = ["half-steps", "nested-gaps", "empty-columns", "centered-column", "region-measure", "mixed-cards", "short-row", "metric-start", "metric-figure", "quote-beside", "quote-card", "emphasis-band", "featured-card", "pull-quote", "timeline-status", "metric-tiles", "long-text-rows", "reading-measure", "lead-stack", "paragraph-columns", "bar-chart-share", "list-words", "metric-display", "eyebrow", "list-rows", "pair-rows", "step-badges", "numerals", "delta-pill", "check-tiles", "tier-cards", "pillar-words", "icons", "icon-chips", "icon-cards", "text-tiles", "title-rule", "statement-message", "display-message", "table-note", "compact-grid", "portraits", "heading-tracks", "note-band", "figure-row", "run-in", "layout-first", "closing-lead", "placed-tiles"];
16600
16961
  var NO_RULES = /* @__PURE__ */ new Set();
16601
16962
  var DRAWING_RULES = ["featured-card", "delta-pill", "check-tiles", "icons", "icon-chips"];
16602
16963
  var NO_DRAWING = /* @__PURE__ */ Symbol("opf.noDrawing");
@@ -16624,6 +16985,7 @@ var PLACED_TILE_ITEMS = /* @__PURE__ */ new WeakSet();
16624
16985
  var ICON_AGENDAS = /* @__PURE__ */ new WeakMap();
16625
16986
  var AGENDA_STARTS = /* @__PURE__ */ Symbol("opf.agendaStarts");
16626
16987
  var NO_STEPS = /* @__PURE__ */ Symbol("opf.noSteps");
16988
+ var NO_STEP_PROCESS = /* @__PURE__ */ Symbol("opf.noStepProcess");
16627
16989
  var NO_NOTE_BAND = /* @__PURE__ */ Symbol("opf.noNoteBand");
16628
16990
  var NOTE_BANDS = /* @__PURE__ */ new WeakSet();
16629
16991
  function picturesShrink(next, base) {
@@ -16643,18 +17005,40 @@ function shrinks(next, base, options) {
16643
17005
  }
16644
17006
  return false;
16645
17007
  }
16646
- function bodyFill(result) {
17008
+ function bodyFill(result, options = {}) {
16647
17009
  if (LEAD_STACKS.has(result) || CARD_GRIDS.has(result)) return void 0;
16648
17010
  const body = result.items.filter((item) => !headings.has(item.field) && !item.eyebrow && !(item.emphasis && result.emphasis !== void 0 && result.emphasis.shape !== "card") && !item.quoteLayout?.rule);
16649
- if (body.length < 2 || !body.every((item) => (item.field === "text" || item.field === "items" || item.field === "bullets") && item.text && (!item.listColumns || FIGURE_ROW_ITEMS.has(item)) && !item.caption && (!result.regions || item.region !== void 0))) return void 0;
17011
+ const inBody = (item) => !item.caption && (!result.regions || item.region !== void 0);
17012
+ const prose = body.every((item) => (item.field === "text" || item.field === "items" || item.field === "bullets") && item.text && (!item.listColumns || FIGURE_ROW_ITEMS.has(item)) && inBody(item));
17013
+ const metrics3 = result.items.every((item) => headings.has(item.field) || item.eyebrow || item.field === "metric") && body.every((item) => item.field === "metric" && item.metricLayout && !item.frameBox && !item.metricTile && !item.emphasis && inBody(item));
17014
+ const tableItem = body.find((item) => item.field === "table"), noteItem = body.find((item) => item.field === "text");
17015
+ const tableNote2 = !!result.regions && body.length === 2 && !!tableItem && !!noteItem?.text && !noteItem.frameBox && body.every((item) => !item.emphasis && inBody(item)) && noteItem.box.y >= tableItem.box.y + 1 && noteItem.box.x < tableItem.box.x + tableItem.box.width - 1 && noteItem.box.x + noteItem.box.width > tableItem.box.x + 1;
17016
+ if (body.length < 2 || !(prose || metrics3 || tableNote2)) return void 0;
16650
17017
  const height = (fit) => "height" in fit && typeof fit.height === "number" ? fit.height : Math.max(fit.lines.length * fit.lineHeight, fit.placement?.height ?? 0);
16651
- const top = Math.min(...body.map((item) => item.box.y)), bottom = Math.max(...body.map((item) => item.box.y + height(item.text)));
17018
+ const scale2 = Math.min(result.width, result.height) / 720, metricRows = metrics3 ? new Set(body.map((item) => Math.round(item.box.y))).size : 0;
17019
+ const extentOf = (item) => {
17020
+ if (item.metricLayout) {
17021
+ const parts = item.metricLayout.parts.filter((part) => part.visible && part.fit).map((part) => part.box), chips = metricRows > 1 ? (result.icons ?? []).filter((icon) => icon.owner === item.path).map((icon) => icon.chip.cy - icon.chip.radius) : [];
17022
+ return [Math.min(...parts.map((box) => box.y), ...chips), Math.max(...parts.map((box) => box.y + box.height))];
17023
+ }
17024
+ if (item.field === "table") {
17025
+ let table;
17026
+ try {
17027
+ table = layoutTable(item.value, item.box, { scale: scale2, minFontSize: item.composition.minFontSize, fontFamily: options.fontFamilies?.body, ...options.fontFamilies?.code ? { codeFontFamily: options.fontFamilies.code } : {}, textMeasurement: options.textMeasurement, presentation: options.presentation, ...numberLanguage(options), ...item.tableGrowth ? { growth: item.tableGrowth } : {} });
17028
+ } catch {
17029
+ table = void 0;
17030
+ }
17031
+ return [item.box.y, item.box.y + Math.min(item.box.height, table?.height ?? item.box.height)];
17032
+ }
17033
+ return [item.box.y, item.box.y + height(item.text)];
17034
+ };
17035
+ const top = Math.min(...body.map((item) => extentOf(item)[0])), bottom = Math.max(...body.map((item) => extentOf(item)[1]));
16652
17036
  const above = result.items.filter((item) => headings.has(item.field) && item.box.y + item.box.height <= top + 1e-6);
16653
17037
  const bodyTop = Math.max(result.contentBox.y, ...above.map((item) => item.box.y + item.box.height)), bodyBottom = result.contentBox.y + result.contentBox.height;
16654
17038
  if (bodyBottom - bodyTop <= 0) return void 0;
16655
17039
  const grows = body.filter((item) => !PLACED_TILE_ITEMS.has(item));
16656
17040
  if (!grows.length) return void 0;
16657
- const extents = grows.map((item) => [item.box.y, item.box.y + height(item.text)]).sort((a, b) => a[0] - b[0]);
17041
+ const extents = grows.map(extentOf).sort((a, b) => a[0] - b[0]);
16658
17042
  let covered = 0, reach = -Infinity;
16659
17043
  for (const [from, to] of extents) {
16660
17044
  if (to > reach) {
@@ -16671,7 +17055,7 @@ function bodyIcons(input) {
16671
17055
  }
16672
17056
  function growBody(input, options, result) {
16673
17057
  if (options.fill === false || options[LAYOUT_MASTER] === true || overflowCount(result) > 0) return void 0;
16674
- const start = bodyFill(result);
17058
+ const start = bodyFill(result, options);
16675
17059
  if (!start) return void 0;
16676
17060
  if (start.fill >= LONE_FILL) {
16677
17061
  if (!result.steps?.some((entry) => entry.form === "row") || bodyReadability(result, options).sizes.some((entry) => entry.atFloor)) return void 0;
@@ -16681,7 +17065,7 @@ function growBody(input, options, result) {
16681
17065
  }
16682
17066
  if (bodyReadability(result, options).sizes.some((entry) => entry.atFloor)) return void 0;
16683
17067
  if (stackedTemplate(options, result)) return void 0;
16684
- const smallest = (composed) => Math.min(...composed.items.filter((item) => !headings.has(item.field) && !item.eyebrow && !(item.emphasis && composed.emphasis !== void 0 && composed.emphasis.shape !== "card") && !item.quoteLayout?.rule && !PLACED_TILE_ITEMS.has(item)).map((item) => item.text.fontSize));
17068
+ const smallest = (composed) => Math.min(...composed.items.filter((item) => !headings.has(item.field) && !item.eyebrow && !(item.emphasis && composed.emphasis !== void 0 && composed.emphasis.shape !== "card") && !item.quoteLayout?.rule && !PLACED_TILE_ITEMS.has(item)).map((item) => item.text?.fontSize ?? bodyReadability(composed, options).byPath.get(item.path) ?? Infinity));
16685
17069
  const before = trackQuality(result, options), floor = snapFontSizeUp((result.composition.minFontSize ?? 16) * Math.min(result.width, result.height) / 720);
16686
17070
  const avatar = portraitQuotes(result) ? { [AVATAR_QUOTES]: true } : {};
16687
17071
  const attempt = (extra) => composeVariant(input, { ...options, ...avatar, ...extra }, before, floor);
@@ -16690,12 +17074,12 @@ function growBody(input, options, result) {
16690
17074
  const climb = (from, extra, limit, accept) => {
16691
17075
  let best = from, steps = 0;
16692
17076
  for (let next = 1; next <= limit; next++) {
16693
- const grown = attempt({ [GROW]: next, ...extra }), fill2 = grown && bodyFill(grown);
17077
+ const grown = attempt({ [GROW]: next, ...extra }), fill2 = grown && bodyFill(grown, options);
16694
17078
  if (!grown || !fill2 || overflowCount(grown) > 0 || fill2.fill > LONE_TARGET || smallest(grown) <= smallest(best) + FONT_GRID_EPSILON || shrinks(grown, best, options) || !accept(grown) || bodyReadability(grown, options).splitWords + listSplitWords(grown) > bodyReadability(best, options).splitWords + listSplitWords(best)) break;
16695
17079
  best = grown;
16696
17080
  steps = next;
16697
17081
  }
16698
- const centered = pulled ? void 0 : attempt({ [GROW]: steps, [CENTER]: true, ...extra }), fill = centered && bodyFill(centered);
17082
+ const centered = pulled ? void 0 : attempt({ [GROW]: steps, [CENTER]: true, ...extra }), fill = centered && bodyFill(centered, options);
16699
17083
  if (centered && fill && overflowCount(centered) === 0 && !shrinks(centered, best, options)) {
16700
17084
  stepsOf.set(centered, { [GROW]: steps, [CENTER]: true, ...extra });
16701
17085
  return centered;
@@ -16705,7 +17089,7 @@ function growBody(input, options, result) {
16705
17089
  };
16706
17090
  const done = (grown) => !grown || grown === result ? void 0 : portraitQuotes(result) && stepsOf.has(grown) ? withPortraits(input, options, grown, stepsOf.get(grown), before, floor) : grown;
16707
17091
  if (!COMPACT_GRIDS.has(result)) {
16708
- const grown = climb(result, {}, 3, () => true), reached = bodyFill(grown);
17092
+ const grown = climb(result, {}, 3, () => true), reached = bodyFill(grown, options);
16709
17093
  const blocks = record19(input).blocks, drawn = bodyIcons(input) || result.steps !== void 0 && !PLACED_TILES.has(result) || Array.isArray(blocks) && (blocks.some((block) => Array.isArray(record19(block).blocks)) || blocks.length >= TEXT_TILE_MIN && blocks.length <= TEXT_TILE_MAX && permitsTextTiles(result.composition));
16710
17094
  if (result.regions || !reached || reached.fill >= LONE_FILL || drawn || options[NO_STEPS] === true) return done(grown);
16711
17095
  const shapeOf = (composed) => {
@@ -16716,18 +17100,18 @@ function growBody(input, options, result) {
16716
17100
  return done(smallest(further) > smallest(grown) + FONT_GRID_EPSILON ? further : grown);
16717
17101
  }
16718
17102
  const lines = (item) => item.text ? "richLines" in item.text ? item.text.richLines.length : item.text.lines.length : 0;
16719
- const spread = attempt({ [NO_COMPACT_GRID]: true }), plain2 = spread ? climb(spread, { [NO_COMPACT_GRID]: true }, 3, () => true) : void 0, reference = plain2 ?? result;
17103
+ const spread = attempt({ [NO_COMPACT_GRID]: true }), plain3 = spread ? climb(spread, { [NO_COMPACT_GRID]: true }, 3, () => true) : void 0, reference = plain3 ?? result;
16720
17104
  if (spread && !stepsOf.has(spread)) stepsOf.set(spread, { [NO_COMPACT_GRID]: true });
16721
17105
  const keepsLines = (grown) => grown.items.every((item) => {
16722
17106
  const was = reference.items.find((entry) => entry.path === item.path);
16723
17107
  return !was || lines(item) <= lines(was);
16724
17108
  });
16725
- const floorSize = plain2 ? smallest(plain2) : smallest(result);
17109
+ const floorSize = plain3 ? smallest(plain3) : smallest(result);
16726
17110
  for (const accept of [keepsLines, () => true]) {
16727
17111
  const grown = climb(result, { [GRID_GROW]: true }, COMPACT_GRID_STEPS, accept);
16728
17112
  if (smallest(grown) >= floorSize - FONT_GRID_EPSILON) return done(grown);
16729
17113
  }
16730
- return plain2 && plain2 !== result ? done(plain2) : void 0;
17114
+ return plain3 && plain3 !== result ? done(plain3) : void 0;
16731
17115
  }
16732
17116
  var OVERLAY_ONTO = /* @__PURE__ */ Symbol("opf.overlayOnto");
16733
17117
  var PROSE_REFLOW = /* @__PURE__ */ Symbol("opf.proseReflow");
@@ -16749,7 +17133,7 @@ function readableProse(input, options, result) {
16749
17133
  const after = next.items.find((entry) => entry.path === item.path);
16750
17134
  return !item.text || !!after?.text && after.text.fontSize >= item.text.fontSize - FONT_GRID_EPSILON && JSON.stringify(item.textStyle) === JSON.stringify(after.textStyle);
16751
17135
  });
16752
- const oldFill = bodyFill(result), newFill = bodyFill(next);
17136
+ const oldFill = bodyFill(result, options), newFill = bodyFill(next, options);
16753
17137
  if (kept && (!oldFill || !!newFill && newFill.fill >= oldFill.fill - 1e-6)) return next;
16754
17138
  }
16755
17139
  return result;
@@ -16821,7 +17205,74 @@ function growMixedCode(input, options, result) {
16821
17205
  }
16822
17206
  return result;
16823
17207
  }
17208
+ var PATH_KEY = /(?:^|[a-z])(?:path|Path|paths|Paths)$|^ref$|^at$/;
17209
+ var AUTHORED_KEYS = /* @__PURE__ */ new Set(["value", "payload", "host"]);
17210
+ function cellComposition(input, options) {
17211
+ if (options.layout !== null && typeof options.layout === "object") return void 0;
17212
+ const source = record19(input), placed = cellBlocks(source);
17213
+ if (!placed) return void 0;
17214
+ const { blocks: _blocks, ...slide } = source;
17215
+ const base = `slides.${options.slideIndex ?? 0}`, single = /* @__PURE__ */ new Map(), many = /* @__PURE__ */ new Map();
17216
+ const authored = ({ block }) => {
17217
+ const { region: _region, ...rest } = block;
17218
+ return rest;
17219
+ };
17220
+ for (const cell of cellsInReadingOrder(placed)) {
17221
+ const entries = placed.filter((entry) => entry.cell === cell);
17222
+ if (entries.length === 1) {
17223
+ slide[cell] = authored(entries[0]);
17224
+ single.set(cell, entries[0].index);
17225
+ } else {
17226
+ slide[cell] = { blocks: entries.map(authored) };
17227
+ many.set(cell, entries.map((entry) => entry.index));
17228
+ }
17229
+ }
17230
+ const escape = (text2) => text2.replace(/[.+]/g, (match) => `\\${match}`);
17231
+ const pattern = new RegExp(`^${escape(base)}\\.(${[...single.keys(), ...many.keys()].map(escape).join("|")})(?=\\.|$)(\\.blocks\\.(\\d+)(?=\\.|$))?`);
17232
+ const path = (value) => value.replace(pattern, (whole, cell, nested, index) => {
17233
+ const own3 = single.get(cell);
17234
+ if (own3 !== void 0) return `${base}.blocks.${own3}${nested ?? ""}`;
17235
+ const block = index !== void 0 ? many.get(cell)?.[Number(index)] : void 0;
17236
+ return block !== void 0 ? `${base}.blocks.${block}` : whole;
17237
+ });
17238
+ return { slide, path };
17239
+ }
17240
+ function rewritePaths(value, path, authored, seen = /* @__PURE__ */ new WeakSet()) {
17241
+ if (value === null || typeof value !== "object" || seen.has(value) || authored.has(value)) return;
17242
+ seen.add(value);
17243
+ if (Array.isArray(value)) {
17244
+ for (const entry of value) rewritePaths(entry, path, authored, seen);
17245
+ return;
17246
+ }
17247
+ const target = value;
17248
+ for (const key of Object.keys(target)) {
17249
+ if (AUTHORED_KEYS.has(key)) continue;
17250
+ const entry = target[key];
17251
+ if (typeof entry === "string") {
17252
+ if (PATH_KEY.test(key)) {
17253
+ const next = path(entry);
17254
+ if (next !== entry) target[key] = next;
17255
+ }
17256
+ } else if (Array.isArray(entry) && PATH_KEY.test(key) && entry.some((item) => typeof item === "string")) target[key] = entry.map((item) => typeof item === "string" ? path(item) : item);
17257
+ else rewritePaths(entry, path, authored, seen);
17258
+ }
17259
+ }
17260
+ function authoredObjects(value, into = /* @__PURE__ */ new WeakSet(), depth = 0) {
17261
+ if (value === null || typeof value !== "object" || into.has(value) || depth > 64) return into;
17262
+ into.add(value);
17263
+ for (const entry of Array.isArray(value) ? value : Object.values(value)) authoredObjects(entry, into, depth + 1);
17264
+ return into;
17265
+ }
16824
17266
  function composeSlide(input, options = {}) {
17267
+ const own3 = record19(input);
17268
+ if (Object.keys(own3).some(isGridCell)) input = Object.fromEntries(Object.entries(own3).filter(([key]) => !isGridCell(key)));
17269
+ const cells = cellComposition(input, options);
17270
+ if (!cells) return composeGrid(input, options);
17271
+ const result = composeGrid(cells.slide, options);
17272
+ rewritePaths(result, cells.path, authoredObjects(input));
17273
+ return result;
17274
+ }
17275
+ function composeGrid(input, options) {
16825
17276
  if (options.textMeasurement) options = { ...options, textMeasurement: memoizedMeasurement(options.textMeasurement) };
16826
17277
  const probe = options[TIGHT_DISPLAY] !== void 0 || options.fill === false ? void 0 : { differs: false };
16827
17278
  if (probe) tightProbes.push(probe);
@@ -16864,29 +17315,29 @@ function composeSlideBody(input, options) {
16864
17315
  if (options[RULES] !== void 0) return composeArranged(input, options);
16865
17316
  const result = settled(input, options);
16866
17317
  if (!result.steps) return withPictureScrim(input, options, result);
16867
- const plainOptions = { ...options, [NO_STEPS]: true }, plain2 = settled(input, plainOptions);
16868
- const floor = snapFontSizeUp((plain2.composition.minFontSize ?? 16) * Math.min(plain2.width, plain2.height) / 720);
17318
+ const plainOptions = { ...options, [NO_STEPS]: true }, plain3 = settled(input, plainOptions);
17319
+ const floor = snapFontSizeUp((plain3.composition.minFontSize ?? 16) * Math.min(plain3.width, plain3.height) / 720);
16869
17320
  const own3 = record19(record19(input).composition);
16870
17321
  if (own3.maxFontSize !== void 0) {
16871
17322
  const { maxFontSize: _cap, ...rest } = own3, free = { ...record19(input), composition: rest };
16872
17323
  const freeResult = settled(free, options), freePlain = settled(free, plainOptions);
16873
- return withPictureScrim(input, options, freeResult.steps && stepsRead(freePlain, freeResult, options, floor) && !tilesShrink(freeResult, freePlain, options) ? result : plain2);
17324
+ return withPictureScrim(input, options, freeResult.steps && stepsRead(freePlain, freeResult, options, floor) && !tilesShrink(freeResult, freePlain, options) ? result : plain3);
16874
17325
  }
16875
- return withPictureScrim(input, options, stepsRead(plain2, result, options, floor) && !tilesShrink(result, plain2, options) ? result : plain2);
17326
+ return withPictureScrim(input, options, stepsRead(plain3, result, options, floor) && !tilesShrink(result, plain3, options) ? result : plain3);
16876
17327
  }
16877
- function tilesShrink(tiled, plain2, options) {
16878
- return PLACED_TILES.has(tiled) && shrinks(tiled, plain2, options);
17328
+ function tilesShrink(tiled, plain3, options) {
17329
+ return PLACED_TILES.has(tiled) && shrinks(tiled, plain3, options);
16879
17330
  }
16880
17331
  function settled(input, options) {
16881
17332
  const result = settle(input, options, guardedCompose(input, options));
16882
17333
  if (!NOTE_BANDS.has(result) || options[NO_NOTE_BAND] === true) return result;
16883
- const plainOptions = { ...options, [NO_NOTE_BAND]: true }, plain2 = settle(input, plainOptions, guardedCompose(input, plainOptions));
17334
+ const plainOptions = { ...options, [NO_NOTE_BAND]: true }, plain3 = settle(input, plainOptions, guardedCompose(input, plainOptions));
16884
17335
  const notePath = `${result.emphasis.path}.text`, sizeOf = (composed) => composed.items.find((item) => item.path === notePath)?.text?.fontSize ?? 0;
16885
- const plainNote = sizeOf(plain2), holds = (composed) => NOTE_BANDS.has(composed) && sizeOf(composed) >= plainNote - FONT_GRID_EPSILON && !shrinks(composed, plain2, options);
17336
+ const plainNote = sizeOf(plain3), holds = (composed) => NOTE_BANDS.has(composed) && sizeOf(composed) >= plainNote - FONT_GRID_EPSILON && !shrinks(composed, plain3, options);
16886
17337
  if (holds(result)) return result;
16887
- if (sizeOf(result) >= plainNote - FONT_GRID_EPSILON) return plain2;
17338
+ if (sizeOf(result) >= plainNote - FONT_GRID_EPSILON) return plain3;
16888
17339
  const sized = { ...options, [EMPHASIS_SIZE]: plainNote }, larger = settle(input, sized, guardedCompose(input, sized));
16889
- return holds(larger) ? larger : plain2;
17340
+ return holds(larger) ? larger : plain3;
16890
17341
  }
16891
17342
  function textInkBox(item, measurement) {
16892
17343
  const fit = item.text;
@@ -16991,13 +17442,13 @@ function withCards(input, options, result) {
16991
17442
  function guardedDrawing(input, options) {
16992
17443
  const result = guardedRules(input, options);
16993
17444
  if (options[NO_DRAWING] === true || !(result.emphasis?.source === "featured" || result.items.some((item) => item.metricLayout?.deltaPill) || result.steps?.some((step) => step.form === "tiles") || result.icons?.length)) return result;
16994
- const plain2 = guardedRules(input, { ...options, [NO_DRAWING]: true }), used = KEPT_RULES.get(plain2);
16995
- const scale2 = Math.min(plain2.width, plain2.height) / 720, floor = snapFontSizeUp((plain2.composition.minFontSize ?? 16) * scale2), before = trackQuality(plain2, options);
16996
- const atFloor = (composed) => bodyReadability(composed, options).sizes.some((entry) => entry.atFloor), plainFloor = atFloor(plain2);
17445
+ const plain3 = guardedRules(input, { ...options, [NO_DRAWING]: true }), used = KEPT_RULES.get(plain3);
17446
+ const scale2 = Math.min(plain3.width, plain3.height) / 720, floor = snapFontSizeUp((plain3.composition.minFontSize ?? 16) * scale2), before = trackQuality(plain3, options);
17447
+ const atFloor = (composed) => bodyReadability(composed, options).sizes.some((entry) => entry.atFloor), plainFloor = atFloor(plain3);
16997
17448
  const keeps = (composed) => readsAsWell(before, trackQuality(composed, options), floor) && atFloor(composed) === plainFloor;
16998
17449
  if (keeps(result)) return result;
16999
- let best = plain2, rules = new Set([...used?.rules ?? NO_RULES].filter((rule) => !DRAWING_RULES.includes(rule)));
17000
- KEPT_RULES.set(plain2, { rules, seeds: used?.seeds ?? {} });
17450
+ let best = plain3, rules = new Set([...used?.rules ?? NO_RULES].filter((rule) => !DRAWING_RULES.includes(rule)));
17451
+ KEPT_RULES.set(plain3, { rules, seeds: used?.seeds ?? {} });
17001
17452
  for (const rule of DRAWING_RULES) {
17002
17453
  const next = /* @__PURE__ */ new Set([...rules, rule]);
17003
17454
  let trial;
@@ -17057,12 +17508,23 @@ function guardedRules(input, options) {
17057
17508
  if (bandSize !== void 0) seeds[EMPHASIS_SIZE] = Math.max(bandSize, Number(options[EMPHASIS_SIZE] ?? 0));
17058
17509
  if (Object.getOwnPropertySymbols(seeds).length) result = attempt(ruled(CORE_RULES, seeds));
17059
17510
  let keptRules = CORE_RULES;
17511
+ const drewIcons = (result?.icons?.length ?? 0) > 0;
17060
17512
  if (!readsWell(result)) {
17061
- let kept = NO_RULES;
17513
+ let kept = NO_RULES, candidates = fired;
17062
17514
  result = base;
17063
17515
  keptRules = NO_RULES;
17516
+ if (drewIcons) {
17517
+ const plainFired = /* @__PURE__ */ new Set(), withoutIcons = new Set([...CORE_RULES].filter((rule) => rule !== "icons" && rule !== "icon-chips"));
17518
+ const plain3 = attempt(ruled(withoutIcons, { ...seeds, [FIRED]: plainFired }));
17519
+ if (readsWell(plain3)) {
17520
+ kept = withoutIcons;
17521
+ result = plain3;
17522
+ keptRules = withoutIcons;
17523
+ }
17524
+ candidates = /* @__PURE__ */ new Set([...fired, ...plainFired, "icons", "icon-chips"]);
17525
+ }
17064
17526
  for (const rule of GUARDED_RULES) {
17065
- if (!fired.has(rule)) continue;
17527
+ if (!candidates.has(rule) || kept.has(rule)) continue;
17066
17528
  const rules = /* @__PURE__ */ new Set([...kept, rule]), trial = attempt(ruled(rules, seeds));
17067
17529
  if (readsWell(trial)) {
17068
17530
  kept = rules;
@@ -17117,19 +17579,19 @@ function evenLines(fit, words2) {
17117
17579
  return Math.min(...widths) >= EVEN_LINE_SHARE * Math.max(...widths) && words2.slice(0, -1).every((line2) => !DANGLING_WORD.test(line2));
17118
17580
  }
17119
17581
  function guardedCompose(input, options) {
17120
- const plain2 = guardedCore(input, options), used = KEPT_RULES.get(plain2);
17121
- if (!used || !plain2.items.some((item) => item.metricLayout)) return plain2;
17582
+ const plain3 = guardedCore(input, options), used = KEPT_RULES.get(plain3);
17583
+ if (!used || !plain3.items.some((item) => item.metricLayout)) return plain3;
17122
17584
  const fired = /* @__PURE__ */ new Set();
17123
17585
  let figured;
17124
17586
  try {
17125
17587
  figured = composeArranged(input, { ...options, [RULES]: /* @__PURE__ */ new Set([...used.rules, "metric-figure"]), [FIRED]: fired, ...used.seeds });
17126
17588
  } catch (error) {
17127
- if (error instanceof OPFCompositionError) return plain2;
17589
+ if (error instanceof OPFCompositionError) return plain3;
17128
17590
  throw error;
17129
17591
  }
17130
- const scale2 = Math.min(plain2.width, plain2.height) / 720, floor = snapFontSizeUp((plain2.composition.minFontSize ?? 16) * scale2);
17131
- if (!fired.has("metric-figure") || !readsAsWellFigure(trackQuality(plain2, options), trackQuality(figured, options), floor)) return plain2;
17132
- const pulled = PULL_SIZES.get(plain2);
17592
+ const scale2 = Math.min(plain3.width, plain3.height) / 720, floor = snapFontSizeUp((plain3.composition.minFontSize ?? 16) * scale2);
17593
+ if (!fired.has("metric-figure") || !readsAsWellFigure(trackQuality(plain3, options), trackQuality(figured, options), floor)) return plain3;
17594
+ const pulled = PULL_SIZES.get(plain3);
17133
17595
  if (pulled) PULL_SIZES.set(figured, pulled);
17134
17596
  KEPT_RULES.set(figured, { rules: /* @__PURE__ */ new Set([...used.rules, "metric-figure"]), seeds: used.seeds });
17135
17597
  return figured;
@@ -17148,6 +17610,7 @@ function messageWords(value) {
17148
17610
  function bodyPayloads(slide) {
17149
17611
  const empty2 = (value) => value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0;
17150
17612
  const payloads = [];
17613
+ if (cellBlocks(slide)) return payloads;
17151
17614
  for (const host of [slide, ...Array.isArray(slide.blocks) ? slide.blocks.map(record19) : []]) {
17152
17615
  if (host !== slide && !empty2(host.blocks)) return void 0;
17153
17616
  for (const field of fields) if (!empty2(host[field])) payloads.push({ field, host });
@@ -17234,8 +17697,8 @@ function settle(input, options, result) {
17234
17697
  if (filled) return filled;
17235
17698
  const grown = growBody(input, options, result);
17236
17699
  if (grown) return grown;
17237
- if (REGION_MEASURED.has(result) && bodyFill(result)) {
17238
- const plain2 = { ...options, [NO_REGION_MEASURE]: true }, wide = growBody(input, plain2, guardedCompose(input, plain2));
17700
+ if (REGION_MEASURED.has(result) && bodyFill(result, options)) {
17701
+ const plain3 = { ...options, [NO_REGION_MEASURE]: true }, wide = growBody(input, plain3, guardedCompose(input, plain3));
17239
17702
  if (wide) return wide;
17240
17703
  }
17241
17704
  const kpis = kpiColumn(input, options, result);
@@ -17314,10 +17777,10 @@ function composeVariant(input, options, before, floor) {
17314
17777
  throw error;
17315
17778
  }
17316
17779
  };
17317
- let plain2 = null;
17780
+ let plain3 = null;
17318
17781
  const unruled = () => {
17319
- if (plain2 === null) plain2 = compose(NO_RULES);
17320
- return plain2;
17782
+ if (plain3 === null) plain3 = compose(NO_RULES);
17783
+ return plain3;
17321
17784
  };
17322
17785
  const portraitsRead = (next) => {
17323
17786
  if (!fired.has("portraits")) return true;
@@ -17612,8 +18075,8 @@ function drawnQuality(result, options) {
17612
18075
  }
17613
18076
  return quality;
17614
18077
  }
17615
- function stepsRead(plain2, steps, options, floor) {
17616
- return readsAsWell(trackQuality(plain2, options), trackQuality(steps, options), floor) || readsAsWell(drawnQuality(plain2, options), drawnQuality(steps, options), floor);
18078
+ function stepsRead(plain3, steps, options, floor) {
18079
+ return readsAsWell(trackQuality(plain3, options), trackQuality(steps, options), floor) || readsAsWell(drawnQuality(plain3, options), drawnQuality(steps, options), floor);
17617
18080
  }
17618
18081
  function readsAsWell(before, after, floor) {
17619
18082
  if (after.overflows > before.overflows || after.splitWords > before.splitWords || after.splitValues.size > before.splitValues.size || after.narrow > before.narrow || after.measure < before.measure - 0.01 || after.shortPlots > before.shortPlots) return false;
@@ -17700,7 +18163,7 @@ function automaticTracks(input, options, base) {
17700
18163
  }
17701
18164
  return { ...best.result, items, track: { kind: "picture", edge: physical(edge2), size: best.size, path: blockPath } };
17702
18165
  }
17703
- if (pictures.length || leaf("video").length || charts.length !== 1 || base.design.chartPrimary !== void 0 || landscape && base.design.contentDirection === "vertical" || !landscape && base.design.contentDirection === "horizontal") return base;
18166
+ if (pictures.length || leaf("video").length || charts.length !== 1) return base;
17704
18167
  const chartOf = (result) => result.items.find((item) => item.field === "chart");
17705
18168
  const chart = chartOf(base);
17706
18169
  if (!chart || !shortPlot(chart, bodyHeight(base), scale2)) return base;
@@ -17713,7 +18176,6 @@ function automaticTracks(input, options, base) {
17713
18176
  }
17714
18177
  return base;
17715
18178
  }
17716
- var CHART_PRIMARY_SIDES = /* @__PURE__ */ new Set(["top", "bottom", "start", "end", "left", "right"]);
17717
18179
  function composeLayout(input, options = {}) {
17718
18180
  const slide = record19(input), layout = record19(options.layout);
17719
18181
  const recomposing = options[RECOMPOSE] === true;
@@ -17731,10 +18193,12 @@ function composeLayout(input, options = {}) {
17731
18193
  const recordTemplate = !recomposing && isLayoutTemplate(layout) ? layoutTemplate(layout) : void 0;
17732
18194
  const statement = recordTemplate && ruleOn("statement-message") ? statementMessage(slide, recordTemplate, options.fill !== false) : void 0;
17733
18195
  if (statement) fire("statement-message");
17734
- const template = recordTemplate && statement === "body" ? statementTemplate(recordTemplate) : recordTemplate;
18196
+ const statementPlan = recordTemplate && statement === "body" ? statementTemplate(recordTemplate) : recordTemplate;
18197
+ const hints = resolveDesignHints({ slide, layout, theme: { design: options.themeDesign }, presentation: options.presentation, slideIndex: options.slideIndex, deck: { titleAlignment: options.titleAlignment, contentAlignment: options.contentAlignment, contentBox: options.contentBox } });
18198
+ const titleStart = hints.titlePosition === "start" && width >= height && !recomposing;
18199
+ const template = statementPlan && titleStart ? titleBesideTemplate(statementPlan) ?? statementPlan : statementPlan;
17735
18200
  const messageField = options.fill !== false ? oneMessageField(slide) : void 0;
17736
18201
  const messageNode = (node) => messageField !== void 0 && node.field === messageField && !node.children && node.caption === void 0;
17737
- const hints = resolveDesignHints({ slide, layout, theme: { design: options.themeDesign }, presentation: options.presentation, slideIndex: options.slideIndex, deck: { titleAlignment: options.titleAlignment, contentAlignment: options.contentAlignment, contentBox: options.contentBox } });
17738
18202
  const hasCards = hints.contentBox ?? false;
17739
18203
  const composition = { ...record19(layout.composition), ...record19(slide.composition) };
17740
18204
  assertComposition(composition);
@@ -17812,8 +18276,8 @@ function composeLayout(input, options = {}) {
17812
18276
  const surfaceRun = (run) => {
17813
18277
  const color = run && typeof run === "object" ? run.color : void 0;
17814
18278
  const own3 = colorTransform(color), base = own3 ? own3.color : color;
17815
- const plain2 = base === "primary" ? normalize(slideRoles.primary) : normalize(base);
17816
- const drawn = color !== void 0 && color !== "" && options.resolveRunColor ? normalize(options.resolveRunColor(color)) : own3 && plain2 ? normalize(applyColorTransform(plain2, own3)) : plain2;
18279
+ const plain3 = base === "primary" ? normalize(slideRoles.primary) : normalize(base);
18280
+ const drawn = color !== void 0 && color !== "" && options.resolveRunColor ? normalize(options.resolveRunColor(color)) : own3 && plain3 ? normalize(applyColorTransform(plain3, own3)) : plain3;
17817
18281
  if (!onMessageSurface || !surfaceBackground || !drawn || (colorContrast(drawn, surfaceBackground) ?? 0) >= SCRIM_TARGET_CONTRAST) return run;
17818
18282
  return { ...run, color: legible(drawn, surfaceBackground, SCRIM_TARGET_CONTRAST) };
17819
18283
  };
@@ -17990,9 +18454,10 @@ function composeLayout(input, options = {}) {
17990
18454
  const headingCaps = /* @__PURE__ */ new Map();
17991
18455
  const loneLabels = /* @__PURE__ */ new Set();
17992
18456
  const numeralLists = /* @__PURE__ */ new Map(), pairRowLabels = /* @__PURE__ */ new Map(), pairGrid = /* @__PURE__ */ new Set(), spreadLists = /* @__PURE__ */ new Set();
18457
+ const chiplessLists = /* @__PURE__ */ new Set();
17993
18458
  const listOptionsFor = (field, path2, numbering, value) => {
17994
18459
  const listed = { ...listOptionsOf(field, path2, numbering, value), ...numberLanguage(options) };
17995
- const own3 = field === "items" && !badgeLists.has(path2) && !stepHeadings.has(path2) && !numeralLists.has(path2) && iconList(value, numbering) ? { ...listed, icons: true, iconScale: chipScale } : listed;
18460
+ const own3 = field === "items" && !badgeLists.has(path2) && !stepHeadings.has(path2) && !numeralLists.has(path2) && !chiplessLists.has(path2) && iconList(value, numbering) ? { ...listed, icons: true, iconScale: chipScale } : listed;
17996
18461
  return own3.rows && spreadLists.has(path2) ? { ...own3, spread: true } : own3;
17997
18462
  };
17998
18463
  const listOptionsOf = (field, path2, numbering, value) => stepHeadings.has(path2) ? { ...richOptions(styleFor(field, path2)), heading: true, bullet: "none", ...headingCaps.has(path2) ? { headingMax: headingCaps.get(path2) } : {} } : numeralLists.has(path2) ? { ...richOptions(styleFor(field, path2)), numbering: badgeNumbering(path2, numbering), rows: true, numerals: numeralLists.get(path2), ...pairsOf(value, path2) } : badgeLists.has(path2) ? { ...richOptions(styleFor(field, path2)), numbering: badgeNumbering(path2, numbering), badges: true } : pairRowLabels.has(path2) ? { ...richOptions(styleFor(field, path2)), rows: true, pairs: "question", rowLabels: pairRowLabels.get(path2), bullet: "none" } : { ...richOptions(styleFor(field, path2)), heading: true, ...headingCaps.has(path2) ? { headingMax: headingCaps.get(path2) } : {}, ...pillarWords.has(path2) ? { display: true, ...wordCaps.has(path2) ? { displayMax: wordCaps.get(path2) } : {}, ...loneLabels.has(path2) ? { displayRule: "short" } : {} } : {}, ...value !== void 0 ? listRows(value, path2) : {}, ...numbering !== void 0 ? { numbering } : bulletImage ? { bulletImage } : noListBullet ? { bullet: "none" } : {} };
@@ -18204,13 +18669,16 @@ function composeLayout(input, options = {}) {
18204
18669
  }
18205
18670
  let y = logo ? logo.box.y + logo.box.height + gap : headingTop;
18206
18671
  const headingArea = headingSpan ?? area2;
18207
- const headingItems = useTemplate ? [] : headingGroup(
18208
- ["tag", "title", "subtitle"].filter((field) => slide[field] && !(Array.isArray(slide[field]) && !annotationText(slide[field]))),
18209
- headingArea.left + padding,
18210
- y,
18211
- headingArea.right - headingArea.left - padding * 2,
18212
- hasBodyPayload ? "split" : void 0
18213
- );
18672
+ const headingFields = ["tag", "title", "subtitle"].filter((field) => slide[field] && !(Array.isArray(slide[field]) && !annotationText(slide[field])));
18673
+ let besideTitle;
18674
+ if (!useTemplate && !regions.length && titleStart && hasBodyPayload && headingFields.length && options[LAYOUT_MASTER] !== true) {
18675
+ const contentWidth = area2.right - area2.left - padding * 2, share2 = TITLE_BESIDE_SHARE[0] / (TITLE_BESIDE_SHARE[0] + TITLE_BESIDE_SHARE[1]);
18676
+ const titleWidth = Math.max(scale2, (contentWidth - gap) * share2), right = rtl !== (hints.mirror === true);
18677
+ besideTitle = { x: right ? area2.right - padding - titleWidth : area2.left + padding, y, width: titleWidth, height: Math.max(scale2, bodyBottom - y) };
18678
+ if (right) area2.right -= titleWidth + gap;
18679
+ else area2.left += titleWidth + gap;
18680
+ }
18681
+ const headingItems = useTemplate ? [] : besideTitle ? headingGroup(headingFields, besideTitle.x, y, besideTitle.width) : headingGroup(headingFields, headingArea.left + padding, y, headingArea.right - headingArea.left - padding * 2, hasBodyPayload ? "split" : void 0);
18214
18682
  for (const item of headingItems) {
18215
18683
  if (furniture && item.box.y + item.box.height > bodyBottom + 0.01) diagnostics.push({ code: "text-overflow", path: item.path, message: "Repeated furniture leaves too little room for this heading. Change the header/footer or slide design." });
18216
18684
  items.push(item);
@@ -18226,6 +18694,14 @@ function composeLayout(input, options = {}) {
18226
18694
  if (item.text) item.text = translateTextFit(item.text, shift);
18227
18695
  }
18228
18696
  y = last.box.y + last.box.height + gap;
18697
+ } else if (besideTitle) {
18698
+ const last = headingItems[headingItems.length - 1];
18699
+ const shift = Math.max(0, (besideTitle.y + besideTitle.height - (last.box.y + last.box.height)) / 2);
18700
+ if (shift) for (const item of headingItems) {
18701
+ item.box.y += shift;
18702
+ if (item.text) item.text = translateTextFit(item.text, shift);
18703
+ }
18704
+ y = besideTitle.y;
18229
18705
  } else y += gap * 0.5;
18230
18706
  }
18231
18707
  for (const entry of underHeadings) entry.region = { ...entry.region, y: round9(y), height: Math.max(scale2, entry.region.y + entry.region.height - round9(y)) };
@@ -18264,7 +18740,7 @@ function composeLayout(input, options = {}) {
18264
18740
  const plainBlock = (host) => host.text !== void 0 && host.caption === void 0 && host.emphasis === void 0 && !Array.isArray(host.blocks) && fields.every((field) => field === "text" || host[field] === void 0);
18265
18741
  const listBlock = (host) => (host.items !== void 0 || host.bullets !== void 0) && host.caption === void 0 && host.emphasis === void 0 && !Array.isArray(host.blocks) && fields.every((field) => field === "items" || field === "bullets" || host[field] === void 0);
18266
18742
  const groupBlock = (host) => Array.isArray(host.blocks) && host.emphasis === void 0;
18267
- const sequence = template?.regions.some((region) => region.sequence !== void 0) === true;
18743
+ const sequence = template?.regions.some((region) => regionSequence(region) !== void 0) === true;
18268
18744
  const label6 = (host) => plainBlock(host) && isLabelText(host.text);
18269
18745
  const mark = (labelBase, owner, value) => {
18270
18746
  const labelPath = `${labelBase}.text`;
@@ -18332,15 +18808,15 @@ function composeLayout(input, options = {}) {
18332
18808
  }
18333
18809
  const figures = flowed.slice(0, -1).map((entry) => metricOnly(entry.block));
18334
18810
  if (figures.every((count) => count > 0) && figures.reduce((sum, count) => sum + count, 0) >= 2) return true;
18335
- if (!template || !template.regions.some((region) => VERDICT_REGIONS.has(region.name))) return false;
18336
- const bound = bindRegions(slide, layout, { slideIndex: options.slideIndex ?? 0 }).regions.find((region) => VERDICT_REGIONS.has(region.name) && region.blocks.length);
18811
+ const verdict = template ? verdictRegion(template) : void 0;
18812
+ if (verdict === void 0) return false;
18813
+ const bound = bindRegions(slide, layout, { slideIndex: options.slideIndex ?? 0 }).regions.find((region) => region.name === verdict && region.blocks.length);
18337
18814
  return bound?.blocks.length === 1 && bound.blocks[0].block === last.index;
18338
18815
  };
18339
18816
  const autoEmphasis = (() => {
18340
18817
  if (!(ruleOn("emphasis-band") || ruleOn("note-band")) || options[LAYOUT_MASTER] === true || regions.length || !Array.isArray(slide.blocks) || authoredEmphasis(slide.blocks)) return void 0;
18341
18818
  const own3 = record19(slide.composition);
18342
18819
  if (own3.mode !== void 0 && own3.mode !== "auto" || own3.weights !== void 0 || own3.columns !== void 0) return void 0;
18343
- if (!useTemplate && CHART_PRIMARY_SIDES.has(hints.chartPrimary) && slide.blocks.some((block) => record19(block).chart !== void 0)) return void 0;
18344
18820
  const flowed = slide.blocks.flatMap((block, index) => placedBlocks.has(index) || emptyHost(record19(block)) || eyebrowBlocks.has(index) ? [] : [{ block, index }]);
18345
18821
  const last = flowed[flowed.length - 1];
18346
18822
  if (flowed.length < 2 || !last || eyebrowOf.has(path + ".blocks." + last.index)) return void 0;
@@ -18659,9 +19135,18 @@ function composeLayout(input, options = {}) {
18659
19135
  const focusSources = () => focusTexts ??= slideFocusSources(slide);
18660
19136
  const growthOf = /* @__PURE__ */ new WeakMap(), proseGrowth = /* @__PURE__ */ new WeakMap();
18661
19137
  let loneGrowth = false;
19138
+ const bodyGrown = /* @__PURE__ */ new WeakSet();
18662
19139
  const grownOptions = (node) => {
18663
19140
  const growth = growthOf.get(node);
18664
- return growth !== void 0 && growth > 1 ? { growth } : {};
19141
+ return growth !== void 0 && growth > 1 ? { growth, ...bodyGrown.has(node) ? { proportional: true } : {} } : {};
19142
+ };
19143
+ const growsAsBody = (units) => units.every((unit2) => !unit2.children && unit2.caption === void 0 && unit2.emphasis === void 0 && !unit2.eyebrow) && (units.length >= 2 && units.every((unit2) => unit2.field === "metric") || units.length === 2 && units.filter((unit2) => unit2.field === "table").length === 1 && units.filter((unit2) => unit2.field === "text").length === 1);
19144
+ const growBodyUnits = (units) => {
19145
+ if (!bodySteps || !growsAsBody(units) || options[TABLE_NOTE] !== void 0) return;
19146
+ for (const unit2 of units) if ((unit2.field === "metric" || unit2.field === "table") && !growthOf.has(unit2)) {
19147
+ growthOf.set(unit2, TYPE_SCALE_RATIO ** Math.min(3, bodySteps));
19148
+ bodyGrown.add(unit2);
19149
+ }
18665
19150
  };
18666
19151
  const measureQuote = (node, box, settings, floorFallback = false, bodySize) => {
18667
19152
  const lay = (share2) => layoutQuote(node.value, acceptedBox(box), {
@@ -18746,7 +19231,8 @@ function composeLayout(input, options = {}) {
18746
19231
  if (laid.deltaPill) fire("delta-pill");
18747
19232
  return laid;
18748
19233
  };
18749
- const stepUnits = /* @__PURE__ */ new WeakSet(), stepPaths = /* @__PURE__ */ new Set(), stepFlows = /* @__PURE__ */ new Set();
19234
+ const stepUnits = /* @__PURE__ */ new WeakSet(), stepPaths = /* @__PURE__ */ new Set(), stepProcesses = /* @__PURE__ */ new Map(), stepProcessCells = /* @__PURE__ */ new Map();
19235
+ const isStepProcess = (path2) => [...stepProcesses.values()].includes(path2);
18750
19236
  const stepBand = (size) => STEP_BADGE * size * (1 + STEP_BADGE_GAP);
18751
19237
  const metricTiles = /* @__PURE__ */ new WeakSet(), tileFloors = options[TILE_FLOORS];
18752
19238
  const timelineHints = /* @__PURE__ */ new WeakMap();
@@ -18927,7 +19413,7 @@ function composeLayout(input, options = {}) {
18927
19413
  };
18928
19414
  const WEIGHTED_DEMAND_RATIO = 2.5, WEIGHTED_SHARES = [0.55, 0.6, 0.65, 0.7];
18929
19415
  const BAR_CHART_MIN_SHARE = 0.4, HORIZONTAL_BAR_CHARTS = /* @__PURE__ */ new Set(["bar", "stacked-bar", "100pct-stacked-bar"]);
18930
- const TABLE_MAX_SHARE = 0.65, TABLE_NEIGHBOUR_REDUCTION = 4;
19416
+ const TABLE_MAX_SHARE = 0.65, TABLE_NEIGHBOR_REDUCTION = 4;
18931
19417
  const tableCardInset = () => hasCards ? 2 * CARD_INSET * scale2 : 0;
18932
19418
  const tableRowWeights = (nodes, count, cols, area3, rowGap, settings) => {
18933
19419
  if (!autoComposition() || settings.weights?.length || count < 2 || cols !== count || nodes.length !== count) return void 0;
@@ -18941,10 +19427,59 @@ function composeLayout(input, options = {}) {
18941
19427
  if (want <= equal[index].width + scale2) return void 0;
18942
19428
  const others = nodes.flatMap((_, other) => other === index ? [] : [other]);
18943
19429
  const weightsAt = (width2) => nodes.map((_, other) => other === index ? width2 : (total - width2) / others.length);
18944
- const neighbours = (width2) => others.reduce((sum, other) => sum + scoreNode(nodes[other], gridGeometry(count, area3, cols, rowGap, weightsAt(width2), false).boxes[other], settings), 0);
18945
- const baseline = neighbours(equal[index].width), from = Math.max(least, equal[index].width), step = (want - from) / 4;
18946
- for (let width2 = want; width2 > from + scale2; width2 -= step) if (neighbours(width2) <= baseline + TABLE_NEIGHBOUR_REDUCTION) return weightsAt(width2);
18947
- return least > equal[index].width + scale2 && neighbours(least) < baseline + 1e3 ? weightsAt(least) : void 0;
19430
+ const neighbors = (width2) => others.reduce((sum, other) => sum + scoreNode(nodes[other], gridGeometry(count, area3, cols, rowGap, weightsAt(width2), false).boxes[other], settings), 0);
19431
+ const baseline = neighbors(equal[index].width), from = Math.max(least, equal[index].width), step = (want - from) / 4;
19432
+ for (let width2 = want; width2 > from + scale2; width2 -= step) if (neighbors(width2) <= baseline + TABLE_NEIGHBOR_REDUCTION) return weightsAt(width2);
19433
+ return least > equal[index].width + scale2 && neighbors(least) < baseline + 1e3 ? weightsAt(least) : void 0;
19434
+ };
19435
+ const LIST_WORD_STEPS = 96;
19436
+ const listWordFit = (node, width2, height2, settings) => {
19437
+ const box = payloadBox({ x: 0, y: 0, width: width2, height: height2 }), prose = proseMeasure(node, box.width), values = node.value;
19438
+ const { icons: _icons, iconScale: _iconScale, ...bare } = listOptionsFor(node.field, node.path, node.payload.numbering, node.value);
19439
+ const chipped = node.field === "items" && node.payload.numbering === void 0 && !badgeLists.has(node.path) && values.some((entry) => (record19(entry).level ?? 0) === 0 && resolvedIcon(record19(entry).icon) !== void 0);
19440
+ const listOptions = chipped ? { ...bare, icons: true, iconScale: ICON_CHIP } : bare, area3 = { ...box, width: prose.width };
19441
+ const fit = fitList(values, area3, prose.size, snapFontSizeUp((settings.minFontSize ?? 16) * scale2), listOptions), atStart = fitList(values, area3, prose.size, prose.size, listOptions);
19442
+ return { size: fit.fontSize, cuts: fit.listEntries.some(blockCutsWord) || atStart.listEntries.some(blockCutsWord), overflow: fit.overflow };
19443
+ };
19444
+ const rowTextCost = (node, box, settings) => {
19445
+ const penalties = { cellProportions: 0, fontReduction: 0, textOverflow: 0, tableOverflow: 0, smallCells: 0, narrowMeasure: 0 };
19446
+ scoreNode(node, box, settings, penalties);
19447
+ return penalties.fontReduction + penalties.textOverflow + penalties.tableOverflow;
19448
+ };
19449
+ const wordRowWeights = (nodes, area3, rowGap, settings, weights) => {
19450
+ const count = nodes.length;
19451
+ if (count < 2 || !ruleOn("list-words")) return void 0;
19452
+ const listLeaf = (node) => !node.children && node.caption === void 0 && (node.field === "items" || node.field === "bullets") && Array.isArray(node.value) && node.value.length > 0;
19453
+ const cells = gridGeometry(count, area3, count, rowGap, weights, false).boxes;
19454
+ const cutting = nodes.flatMap((node, index) => {
19455
+ if (!listLeaf(node)) return [];
19456
+ const fit = listWordFit(node, cells[index].width, cells[index].height, settings);
19457
+ return fit.cuts ? [{ index, fit }] : [];
19458
+ });
19459
+ if (!cutting.length) return void 0;
19460
+ const total = cells.reduce((sum, cell) => sum + cell.width, 0), step = total / LIST_WORD_STEPS, widths = cells.map((cell) => cell.width);
19461
+ for (const { index, fit } of cutting) {
19462
+ let found;
19463
+ for (let width2 = widths[index] + step; width2 <= total + 1e-6 && found === void 0; width2 += step) {
19464
+ const at3 = listWordFit(nodes[index], width2, cells[index].height, settings);
19465
+ if (!at3.cuts && at3.size >= fit.size - FONT_GRID_EPSILON) found = width2;
19466
+ }
19467
+ if (found === void 0) return void 0;
19468
+ widths[index] = found;
19469
+ }
19470
+ const wide = new Set(cutting.map((entry) => entry.index)), others = nodes.flatMap((_, index) => wide.has(index) ? [] : [index]);
19471
+ const given = others.reduce((sum, index) => sum + cells[index].width, 0), left = total - cutting.reduce((sum, { index }) => sum + widths[index], 0);
19472
+ if (others.length && left > scale2) {
19473
+ for (const index of others) widths[index] = cells[index].width * left / given;
19474
+ const rebalanced = gridGeometry(count, area3, count, rowGap, widths, false).boxes;
19475
+ if (others.every((index) => rowTextCost(nodes[index], rebalanced[index], settings) <= rowTextCost(nodes[index], cells[index], settings) + FONT_GRID_EPSILON)) return widths;
19476
+ }
19477
+ const stacked = stackedBoxes(nodes, area3, rowGap, settings);
19478
+ const holds = cutting.every(({ index, fit }) => {
19479
+ const at3 = listWordFit(nodes[index], stacked[index].width, stacked[index].height, settings);
19480
+ return !at3.cuts && !at3.overflow && at3.size >= fit.size - FONT_GRID_EPSILON;
19481
+ });
19482
+ return holds && others.every((index) => rowTextCost(nodes[index], stacked[index], settings) <= rowTextCost(nodes[index], cells[index], settings) + FONT_GRID_EPSILON) ? "stack" : void 0;
18948
19483
  };
18949
19484
  const proseRowWeights = (nodes, equalWidths, cards, settings) => {
18950
19485
  const prose = (node) => !node.children && node.caption === void 0 && (node.field === "text" || node.field === "items" || node.field === "bullets");
@@ -19060,7 +19595,7 @@ function composeLayout(input, options = {}) {
19060
19595
  if (!sized[index]) contentSized.delete(node);
19061
19596
  });
19062
19597
  } else boxes = gridGeometry(count, area3, cols, between, (cols === count ? autoRowWeights(nodes, count, cols, area3, between, settings) : void 0) ?? [], false).boxes;
19063
- const plain2 = splitFill(nodes, boxes, area3, settings), fill = cols === count && plain2 < SPLIT_FILL ? splitFill(nodes, boxes, area3, settings, true) : plain2;
19598
+ const plain3 = splitFill(nodes, boxes, area3, settings), fill = cols === count && plain3 < SPLIT_FILL ? splitFill(nodes, boxes, area3, settings, true) : plain3;
19064
19599
  const penalties = { cellProportions: 0, fontReduction: 0, textOverflow: 0, tableOverflow: 0, smallCells: 0, narrowMeasure: 0 };
19065
19600
  nodes.forEach((node, index) => {
19066
19601
  scoreNode(node, boxes[index], settings, penalties);
@@ -19180,14 +19715,28 @@ function composeLayout(input, options = {}) {
19180
19715
  spannedContainer = false;
19181
19716
  if (paragraphs) cols = paragraphs.shape.columns;
19182
19717
  else if (lead) cols = 2;
19718
+ let wordWeights;
19719
+ if (!paragraphs && !lead && !hasRegions && !team && settings.weights?.length && cols === count && count === nodes.length && count > 1) {
19720
+ const whole = wordRowWeights(nodes, area3, actualGap, settings, settings.weights);
19721
+ if (whole === "stack") {
19722
+ fire("list-words");
19723
+ const { weights: _weights, columns: _columns, ...stacked } = settings;
19724
+ arrange(nodes, area3, { ...stacked, mode: "column" }, reserved2, actualGap, containerPath, recorded);
19725
+ return;
19726
+ }
19727
+ if (whole) {
19728
+ fire("list-words");
19729
+ wordWeights = whole;
19730
+ }
19731
+ }
19183
19732
  if (recorded && !decided) decisions?.push({
19184
19733
  path: containerPath,
19185
19734
  mode: hasRegions ? "regions" : mode,
19186
- reason: hasRegions ? "promoted-regions" : settings === rootSettings && chartPrimary ? "chart-primary" : paragraphs ? "paragraph-columns" : lead ? "lead-stack" : splitChoice ? "split-fill" : mode === "auto" ? "lowest-score" : "configured-mode",
19735
+ reason: hasRegions ? "promoted-regions" : settings === rootSettings && chartSplit ? "chart-primary" : paragraphs ? "paragraph-columns" : lead ? "lead-stack" : splitChoice ? "split-fill" : mode === "auto" ? "lowest-score" : "configured-mode",
19187
19736
  ...hasRegions ? {} : { selectedColumns: cols },
19188
19737
  candidates: candidates ?? []
19189
19738
  });
19190
- const grid = gridGeometry(count, area3, cols, actualGap, (mode === "auto" && !hasRegions ? autoRowWeights(nodes, count, cols, area3, actualGap, settings) : mode === "row" && !hasRegions ? tableRowWeights(nodes, count, cols, area3, actualGap, settings) : void 0) ?? settings.weights ?? [], mode === "column");
19739
+ const grid = gridGeometry(count, area3, cols, actualGap, wordWeights ?? (mode === "auto" && !hasRegions ? autoRowWeights(nodes, count, cols, area3, actualGap, settings) : mode === "row" && !hasRegions ? tableRowWeights(nodes, count, cols, area3, actualGap, settings) : void 0) ?? settings.weights ?? [], mode === "column");
19191
19740
  if (!paragraphs && !lead && mode === "auto" && !hasRegions && count === nodes.length && cols > 1 && count % cols !== 0 && !settings.weights?.length && ruleOn("short-row") && !nodes.every((node) => !node.children && (node.field === "image" || node.field === "video")) && !team) {
19192
19741
  const first = count - count % cols, short = count - first, cell = (area3.width - grid.gap * (short - 1)) / short;
19193
19742
  for (let k = 0; k < short; k++) grid.boxes[first + k] = { ...grid.boxes[first + k], x: area3.x + k * (cell + grid.gap), width: cell };
@@ -19240,7 +19789,7 @@ function composeLayout(input, options = {}) {
19240
19789
  if (stack.length > 1) peerSets.push(stack);
19241
19790
  };
19242
19791
  let regionTag, templateCell = false;
19243
- const directionName = (direction2) => ({ LR: "left to right", RL: "right to left", TB: "top to bottom", TD: "top to bottom", BT: "bottom to top" })[direction2] ?? direction2;
19792
+ const directionName = (direction) => ({ LR: "left to right", RL: "right to left", TB: "top to bottom", TD: "top to bottom", BT: "bottom to top" })[direction] ?? direction;
19244
19793
  const composeDiagram = (node, box, settings, anchor) => {
19245
19794
  const floor = snapFontSizeUp((settings.minFontSize ?? 16) * scale2), nominal = Math.max(floor, DIAGRAM_NOMINAL_SIZE * scale2);
19246
19795
  const measure = diagramMeasure(options.textMeasurement, options.fontFamilies?.body ?? "sans-serif", options.fontFamilies?.code ?? FALLBACK_CODE_FAMILY);
@@ -19661,11 +20210,12 @@ function composeLayout(input, options = {}) {
19661
20210
  const values = node.value;
19662
20211
  if (!Array.isArray(values) || values.length < 2) return void 0;
19663
20212
  const own3 = node.payload.columns;
19664
- const mode = own3 === "auto" || own3 === 1 || own3 === 2 || own3 === 3 ? own3 : regionMode;
20213
+ const mode = own3 === "auto" || own3 === 1 || own3 === 2 || own3 === 3 ? own3 : regionMode === "guarded" ? "auto" : regionMode;
19665
20214
  const layoutFirst = mode === void 0 && own3 === void 0 && values.length > LIST_WHOLE_ENTRIES && ruleOn("layout-first") && !badgeLists.has(node.path) && values.every((entry) => entry === null || typeof entry !== "object" || Array.isArray(entry) || record19(entry).description === void 0 && record19(entry).icon === void 0) && !ownRunSizes(values) && (function lists(nodes) {
19666
20215
  return nodes.reduce((sum, child) => sum + (child.children ? lists(child.children) : child.field === "items" || child.field === "bullets" ? 1 : 0), 0);
19667
20216
  })(pending) === 1;
19668
20217
  if (mode === void 0 && !layoutFirst || mode === 1) return void 0;
20218
+ const regionDefault = own3 === void 0 && regionMode === "guarded", regionColumns = own3 === void 0 && (regionMode === "guarded" || regionMode === "auto");
19669
20219
  if (mode === "auto" && values.length <= LIST_WHOLE_ENTRIES) return void 0;
19670
20220
  const start = contentNominalSize(node.field) * scale2, floor = snapFontSizeUp((settings.minFontSize ?? 16) * scale2);
19671
20221
  const numbering = badgeLists.has(node.path) ? badgeNumbering(node.path, node.payload.numbering) : node.payload.numbering;
@@ -19733,11 +20283,17 @@ function composeLayout(input, options = {}) {
19733
20283
  fire("layout-first");
19734
20284
  return capped(best.columns);
19735
20285
  }
20286
+ const asLarge = (columns2) => {
20287
+ if (!regionColumns) return columns2;
20288
+ const one = fitList(values, box, start, floor, listOptions), size = Math.min(...columns2.map((column) => column.text.fontSize));
20289
+ if (!one.overflow && columns2.some((column) => column.text.overflow) && (regionDefault || one.fontSize >= size - FONT_GRID_EPSILON)) return void 0;
20290
+ return !regionDefault || size >= Math.min(one.fontSize, cap) - FONT_GRID_EPSILON ? columns2 : void 0;
20291
+ };
19736
20292
  if (mode === "auto") {
19737
20293
  if (!fitList(values, box, start, start, listOptions).overflow) return void 0;
19738
20294
  for (const count2 of counts) {
19739
20295
  const columns2 = split2(count2, start, start);
19740
- if (columns2.every((column) => !column.text.overflow)) return capped(columns2);
20296
+ if (columns2.every((column) => !column.text.overflow)) return asLarge(capped(columns2));
19741
20297
  }
19742
20298
  }
19743
20299
  const shared = (count2) => {
@@ -19751,8 +20307,8 @@ function composeLayout(input, options = {}) {
19751
20307
  best ??= results.at(-1);
19752
20308
  const whole = fitList(values, box, start, floor, listOptions);
19753
20309
  const measured = whole.fontSize * PROSE_MEASURE_CHARS * AVERAGE_CHARACTER_EM >= box.width - 0.5;
19754
- if (best === void 0 || !whole.overflow && whole.fontSize > best[0].text.fontSize * (measured ? 1 : 1.1) + FONT_GRID_EPSILON) return void 0;
19755
- return capped(best);
20310
+ if (best === void 0 || !whole.overflow && whole.fontSize > best[0].text.fontSize * (measured || regionDefault ? 1 : 1.1) + FONT_GRID_EPSILON) return void 0;
20311
+ return asLarge(capped(best));
19756
20312
  }
19757
20313
  const count = counts.at(-1);
19758
20314
  if (count === void 0) return void 0;
@@ -19910,6 +20466,11 @@ function composeLayout(input, options = {}) {
19910
20466
  if (step > size + 1e-9) return step;
19911
20467
  }
19912
20468
  };
20469
+ const textBesideChart = (node) => {
20470
+ const plain3 = (entry) => entry.emphasis === void 0 && !entry.eyebrow && !entry.cardCell;
20471
+ const leaf = node.children?.length === 1 && !node.synthetic && plain3(node) && record19(node.payload).icon === void 0 ? node.children[0] : node;
20472
+ return !leaf.children && leaf.field === "text" && leaf.caption === void 0 && plain3(leaf) ? leaf : void 0;
20473
+ };
19913
20474
  const fillLone = (node, cell, settings, cards) => {
19914
20475
  if (!node.fills || node.field !== "quote" || quotePortrait(node, payloadBox(cell, cards)) === void 0) return fillLoneBlock(node, cell, settings, cards);
19915
20476
  let lone;
@@ -19928,14 +20489,17 @@ function composeLayout(input, options = {}) {
19928
20489
  const inner = payloadBox(cell, cards), prose = node.field === "text" || node.field === "items" || node.field === "bullets";
19929
20490
  if (inner.width <= 0 || inner.height <= 0) return void 0;
19930
20491
  const slack = 2 * rasterPadding + scale2, need = () => (node.field === "table" ? measureTable(node, inner.width, settings)?.height ?? Infinity : naturalHeight(node, inner.width, false, void 0, settings)) + slack;
20492
+ const chipped = node.field === "items" && iconList(node.value, node.payload.numbering);
19931
20493
  const plainNeed = () => {
19932
20494
  const badged = badgeLists.delete(node.path), numerals = numeralLists.get(node.path);
19933
20495
  numeralLists.delete(node.path);
20496
+ if (chipped) chiplessLists.add(node.path);
19934
20497
  try {
19935
20498
  return need();
19936
20499
  } finally {
19937
20500
  if (badged) badgeLists.add(node.path);
19938
20501
  if (numerals) numeralLists.set(node.path, numerals);
20502
+ chiplessLists.delete(node.path);
19939
20503
  }
19940
20504
  };
19941
20505
  let best = plainNeed();
@@ -19949,7 +20513,31 @@ function composeLayout(input, options = {}) {
19949
20513
  spreadLists.add(node.path);
19950
20514
  return cell;
19951
20515
  };
19952
- if (best >= (panel ? LONE_TARGET : LONE_FILL) * inner.height) return fillsPanel() ? wholePanel() : ruled ? spreadCell() : void 0;
20516
+ const growPanel = () => {
20517
+ const wraps = (layout2) => (layout2.parts.find((part) => part.role === "body")?.fit?.sourceLines ?? []).filter((line2) => line2.boundary === "soft").length;
20518
+ const startWraps = wraps(measureCode(node, inner, settings));
20519
+ let chosen;
20520
+ for (let power = 1; power <= 5; power++) {
20521
+ const growth = TYPE_SCALE_RATIO ** power;
20522
+ growthOf.set(node, growth);
20523
+ const layout2 = measureCode(node, inner, settings), height3 = need();
20524
+ const fits = !layout2.overflow && layout2.parts.every((part) => part.fit !== void 0 && part.fit.fontSize >= part.requestedFontSize - 1e-9) && largestPart(layout2) <= capOf(settings) + FONT_GRID_EPSILON && wraps(layout2) <= startWraps && height3 <= inner.height;
20525
+ if (!fits) break;
20526
+ chosen = growth;
20527
+ }
20528
+ if (chosen === void 0) growthOf.delete(node);
20529
+ else {
20530
+ growthOf.set(node, chosen);
20531
+ loneGrowth = true;
20532
+ }
20533
+ };
20534
+ if (best >= (panel ? LONE_TARGET : LONE_FILL) * inner.height) {
20535
+ if (fillsPanel()) {
20536
+ growPanel();
20537
+ return wholePanel();
20538
+ }
20539
+ return ruled ? spreadCell() : void 0;
20540
+ }
19953
20541
  const floor = snapFontSizeUp((settings.minFontSize ?? 16) * scale2);
19954
20542
  if (prose) {
19955
20543
  const start = proseMeasure(node, inner.width).size, display = (node.field === "text" ? LONE_DISPLAY_SIZES.text : LONE_DISPLAY_SIZES.list) * scale2;
@@ -19974,7 +20562,7 @@ function composeLayout(input, options = {}) {
19974
20562
  const words2 = node.field === "text" && !cited ? messageWords(node.value) : Infinity;
19975
20563
  if (words2 <= SHORT_MESSAGE_WORDS && ruleOn("display-message")) {
19976
20564
  const today = (words2 <= SHORT_TEXT_WORDS ? HEADING_DISPLAY_SIZES.title : MESSAGE_DISPLAY_SIZE) * scale2;
19977
- const reached = chosen ?? start, cap = Math.max(today, messageNode(node) ? (messageCeiling("statement", node.value) ?? 0) * scale2 : 0), plain2 = { growth: proseGrowth.get(node), best };
20565
+ const reached = chosen ?? start, cap = Math.max(today, messageNode(node) ? (messageCeiling("statement", node.value) ?? 0) * scale2 : 0), plain3 = { growth: proseGrowth.get(node), best };
19978
20566
  displayTexts.add(node.path);
19979
20567
  messageTexts.add(node.path);
19980
20568
  let shown, lastLines;
@@ -19999,16 +20587,16 @@ function composeLayout(input, options = {}) {
19999
20587
  if (shown === void 0) {
20000
20588
  displayTexts.delete(node.path);
20001
20589
  messageTexts.delete(node.path);
20002
- if (plain2.growth === void 0) proseGrowth.delete(node);
20003
- else proseGrowth.set(node, plain2.growth);
20004
- best = plain2.best;
20590
+ if (plain3.growth === void 0) proseGrowth.delete(node);
20591
+ else proseGrowth.set(node, plain3.growth);
20592
+ best = plain3.best;
20005
20593
  } else {
20006
20594
  proseGrowth.set(node, shown);
20007
20595
  loneGrowth = true;
20008
20596
  fire("display-message");
20009
20597
  }
20010
20598
  }
20011
- if (badgeLists.has(node.path)) best = need();
20599
+ if (badgeLists.has(node.path) || chipped) best = need();
20012
20600
  } else {
20013
20601
  let chosen;
20014
20602
  const target = node.field === "metric" ? LONE_METRIC_TARGET : LONE_TARGET;
@@ -20069,7 +20657,7 @@ function composeLayout(input, options = {}) {
20069
20657
  return { size, band: eyebrowBand(node.eyebrow, width2, size) };
20070
20658
  };
20071
20659
  const groupRoot = (nodes) => {
20072
- if (useTemplate || regions.length || !Array.isArray(slide.blocks) || chartPrimary || modeFor(rootSettings) !== "auto" || rootSettings.columns !== void 0 || rootSettings.weights?.length) return void 0;
20660
+ if (useTemplate || regions.length || !Array.isArray(slide.blocks) || chartSplit || modeFor(rootSettings) !== "auto" || rootSettings.columns !== void 0 || rootSettings.weights?.length) return void 0;
20073
20661
  const blockOf = (node) => node.children ? node.path : node.path.slice(0, node.path.lastIndexOf("."));
20074
20662
  if (new Set(nodes.map(blockOf)).size !== nodes.length || slide.blocks.some((block) => record19(block).region !== void 0)) return void 0;
20075
20663
  const grouping = nodes.map((node) => node.children ? { kind: "group", group: true } : node.eyebrow ? { kind: EYEBROW_TEXT_KIND } : { kind: kind(node.field), ...node.field === "text" ? { length: textLength(node.value) } : {} });
@@ -20248,7 +20836,7 @@ function composeLayout(input, options = {}) {
20248
20836
  const longTextUnit = (unit2) => !unit2.children && unit2.caption === void 0 && unit2.field === "text" && textLength(unit2.value) >= LONG_TEXT_CHARS;
20249
20837
  const longTextRows = (grouped, plan2) => {
20250
20838
  const own3 = record19(slide.composition);
20251
- if (!hasCards || direction !== void 0 || grouped.belowUnits.length || ["mode", "columns", "weights"].some((key2) => own3[key2] !== void 0)) return { binding: grouped };
20839
+ if (!hasCards || plan2.regions.some((region) => region.flow === "row") || grouped.belowUnits.length || ["mode", "columns", "weights"].some((key2) => own3[key2] !== void 0)) return { binding: grouped };
20252
20840
  const longBlock = (unit2) => {
20253
20841
  const host = unit2.length === 1 && unit2[0].block !== void 0 ? record19(slide.blocks?.[unit2[0].block]) : void 0;
20254
20842
  return !!host && host.caption === void 0 && typeof host.text !== "undefined" && fields.every((field) => field === "text" || host[field] === void 0) && textLength(host.text) >= LONG_TEXT_CHARS;
@@ -20306,6 +20894,16 @@ function composeLayout(input, options = {}) {
20306
20894
  };
20307
20895
  const templateRegions = [], headingAreas = [];
20308
20896
  const requestedTemplateGap = gap;
20897
+ const stepProcess = (units) => {
20898
+ const unit2 = units.length === 1 ? units[0] : void 0;
20899
+ if (!unit2 || unit2.children || unit2.caption !== void 0 || unit2.field !== "items" && unit2.field !== "bullets" || unit2.payload.numbering !== void 0) return void 0;
20900
+ const values = Array.isArray(unit2.value) ? unit2.value : [];
20901
+ if (values.length < STEP_PROCESS_MIN || values.length > STEP_PROCESS_MAX) return void 0;
20902
+ return values.every((value) => {
20903
+ const object2 = record19(value), text2 = flatten(typeof value === "object" && value !== null && !Array.isArray(value) ? object2.text : value).trim();
20904
+ return (object2.level ?? 0) === 0 && object2.description === void 0 && object2.icon === void 0 && text2.length > 0 && text2.length <= STEP_PROCESS_CHARACTERS && text2.split(/\s+/u).length <= 2;
20905
+ }) ? unit2 : void 0;
20906
+ };
20309
20907
  const markSteps = (sequence, units) => {
20310
20908
  const leaf = (unit2) => !unit2.children && unit2.caption === void 0, isList = (unit2) => unit2.field === "items" || unit2.field === "bullets";
20311
20909
  const entries = (unit2) => Array.isArray(unit2.value) ? unit2.value : [];
@@ -20336,12 +20934,7 @@ function composeLayout(input, options = {}) {
20336
20934
  return;
20337
20935
  }
20338
20936
  if (units.length === 1 && badgeList(units[0])) {
20339
- const unit2 = units[0], values = entries(unit2);
20340
- const short = values.length >= STEP_FLOW_MIN && values.length <= STEP_FLOW_MAX && values.every((value) => {
20341
- const object2 = record19(value), text2 = flatten(typeof value === "object" && !Array.isArray(value) ? object2.text : value).trim();
20342
- return object2.description === void 0 && text2.length > 0 && text2.length <= STEP_FLOW_CHARACTERS && text2.split(/\s+/u).length <= 2;
20343
- });
20344
- (short ? stepFlows : badgeLists).add(unit2.path);
20937
+ badgeLists.add(units[0].path);
20345
20938
  fire("step-badges");
20346
20939
  return;
20347
20940
  }
@@ -20377,6 +20970,11 @@ function composeLayout(input, options = {}) {
20377
20970
  const bound = autoSurface || pullItem || eyebrowBlocks.size ? { ...slide, blocks: slide.blocks.map((block, index) => unbound(index) ? {} : block) } : slide;
20378
20971
  const { binding, region: longTextRegion } = (!ruleOn("long-text-rows") ? (grouped) => ({ binding: grouped, region: void 0 }) : longTextRows)(groupBinding(bindRegions(bound, layout, { slideIndex: options.slideIndex ?? 0 }), plan2, rootNodes(bound, options.slideIndex ?? 0), { join: options[UNJOINED] !== true, labeled: new Set(eyebrowOf.keys()) }), plan2);
20379
20972
  for (const entry of binding.diagnostics) diagnostics.push({ code: entry.code, path: entry.path, message: entry.message, ...entry.region !== void 0 ? { region: entry.region } : {} });
20973
+ const regionNames2 = new Set(plan2.regions.map((region) => region.name));
20974
+ slide.blocks?.forEach((block, index) => {
20975
+ const pin2 = record19(block).region;
20976
+ if (unbound(index) && typeof pin2 === "string" && !regionNames2.has(pin2)) diagnostics.push({ code: "region-unknown", path: `${path}.blocks.${index}.region`, region: pin2, message: `The layout has no region '${pin2}'; the block is placed by its kind instead.` });
20977
+ });
20380
20978
  const blockUnit = (bound2) => {
20381
20979
  const host = bound2.block !== void 0 ? record19(slide.blocks[bound2.block]) : { ...Object.fromEntries((bound2.fields ?? []).map((field) => [field, slide[field]])), ...Object.fromEntries(["type", "caption", "numbering"].filter((key) => slide[key] !== void 0).map((key) => [key, slide[key]])) };
20382
20980
  const parts = collect(host, bound2.block !== void 0 ? `${path}.blocks.${bound2.block}` : path);
@@ -20390,7 +20988,7 @@ function composeLayout(input, options = {}) {
20390
20988
  const cellWidth = (frame.width - requestedTemplateGap * (shape.columns - 1)) / shape.columns - (hasCards && !soleRegion.bleed ? 2 * Math.min(CARD_INSET * scale2, frame.width / 4) : 0);
20391
20989
  return units.some((unit2) => isLong(unit2, cellWidth));
20392
20990
  };
20393
- const closingUnits = soleRegion && soleRegion.flow === "auto" && soleRegion.role === "supporting" && !binding.arrangements.has(soleRegion.name) && direction === void 0 ? contents.get(soleRegion.name) ?? [] : [];
20991
+ const closingUnits = soleRegion && soleRegion.flow === "auto" && !singleBlockRegion(soleRegion) && soleRegion.role === "supporting" && !binding.arrangements.has(soleRegion.name) ? contents.get(soleRegion.name) ?? [] : [];
20394
20992
  if (closingUnits.length >= LEAD_STACK_MIN && closingUnits.length <= JOINED_FIXED_MAX && ruleOn("closing-lead") && closingUnits.every((unit2) => proseLeaf(unit2) && unit2.field === "text" && unit2.emphasis === void 0 && !unit2.eyebrow) && !similarParagraphs(closingUnits) && !leadStackPlan(closingUnits) && closingStacks(closingUnits) && new Set(gridFlowShape(closingUnits.length - 1, frame.width >= frame.height).perRow).size === 1) {
20395
20993
  binding.arrangements.set(soleRegion.name, "lead");
20396
20994
  fire("closing-lead");
@@ -20402,7 +21000,7 @@ function composeLayout(input, options = {}) {
20402
21000
  lead.auto = true;
20403
21001
  lead.lone = true;
20404
21002
  }
20405
- if (region.flow === "auto") for (const unit2 of units) {
21003
+ if (region.flow === "auto" && !singleBlockRegion(region)) for (const unit2 of units) {
20406
21004
  unit2.auto = true;
20407
21005
  unit2.lone = units.length === 1 || unit2 === lead;
20408
21006
  }
@@ -20415,30 +21013,40 @@ function composeLayout(input, options = {}) {
20415
21013
  fire("metric-tiles");
20416
21014
  }
20417
21015
  }
20418
- if (region.sequence && ruleOn("step-badges")) markSteps(region.sequence, units);
20419
- else if (!region.sequence) markPairs(units);
21016
+ const sequence = regionSequence(region), short = sequence === "steps" && options[NO_STEP_PROCESS] !== true ? stepProcess(units) : void 0;
21017
+ if (short) stepProcesses.set(region.name, short.path);
21018
+ else if (sequence && ruleOn("step-badges")) markSteps(sequence, units);
21019
+ else if (!sequence) markPairs(units);
20420
21020
  }
20421
21021
  const body = plan2.regions.flatMap((region) => (contents.get(region.name) ?? []).filter((unit2) => !headings.has(unit2.field)).map((unit2) => ({ unit: unit2, region })));
20422
21022
  if (body.length === 1 && !binding.belowUnits.length) {
20423
21023
  const { unit: unit2, region } = body[0], values = Array.isArray(unit2.value) ? unit2.value : [];
20424
- const list = !unit2.children && unit2.caption === void 0 && (unit2.field === "items" || unit2.field === "bullets") && !badgeLists.has(unit2.path) && !stepFlows.has(unit2.path);
20425
- if (list && !region.sequence && !region.arrangement && ruleOn("numerals") && unit2.payload.numbering !== void 0 && values.length >= 2 && values.length <= NUMERAL_TAKEAWAYS && values.every((entry) => (record19(entry).level ?? 0) === 0)) {
21024
+ const list = !unit2.children && unit2.caption === void 0 && (unit2.field === "items" || unit2.field === "bullets") && !badgeLists.has(unit2.path);
21025
+ if (list && !region.arrangement && ruleOn("numerals") && unit2.payload.numbering !== void 0 && values.length >= 2 && values.length <= NUMERAL_TAKEAWAYS && values.every((entry) => (record19(entry).level ?? 0) === 0)) {
20426
21026
  badgeLists.add(unit2.path);
20427
21027
  numeralLists.set(unit2.path, "display");
20428
21028
  fire("numerals");
20429
21029
  }
20430
- if (list && !region.arrangement && values.length >= 2 && values.every((entry) => pairEntry(entry) === "term") && 2 * values.filter((entry) => flatten(record19(entry).text).trim().split(/\s+/u).length === 1).length > values.length) termLists.add(unit2.path);
21030
+ if (list && !regionDiagram(region) && values.length >= 2 && values.every((entry) => pairEntry(entry) === "term") && 2 * values.filter((entry) => flatten(record19(entry).text).trim().split(/\s+/u).length === 1).length > values.length) termLists.add(unit2.path);
20431
21031
  }
20432
21032
  const BELOW = "(below)";
20433
21033
  const belowUnits = binding.belowUnits.map(unitOf);
20434
- const belowRegion = { name: BELOW, accepts: [], role: "supporting", flow: "auto", max: belowUnits.length, bleed: false, listColumns: 1, anchor: "top", empty: "collapse" };
21034
+ const belowRegion = { name: BELOW, accepts: [], role: "supporting", flow: "auto", max: belowUnits.length, bleed: false, anchor: "top", empty: "collapse" };
21035
+ const listColumnsOf = (region) => region.name === BELOW || !regionListColumns(region) ? 1 : region.accepts[0] === "list" ? "auto" : "guarded";
20435
21036
  const unitsOf = (name) => name === BELOW ? belowUnits : contents.get(name) ?? [];
20436
21037
  const bodyUnits = [...contents.values()].flat().concat(belowUnits);
20437
21038
  const loneUnit = options.fill !== false && plan2.stack === void 0 && bodyUnits.length === 1 && !bodyUnits[0].children ? bodyUnits[0] : void 0;
20438
21039
  if (loneUnit) loneUnit.fills = true;
21040
+ else if (options.fill !== false && plan2.stack === void 0 && bodyUnits.length === 2 && !belowUnits.length) {
21041
+ const chart = bodyUnits.findIndex((unit2) => !unit2.children && unit2.field === "chart"), other = chart >= 0 ? bodyUnits[1 - chart] : void 0;
21042
+ const region = other && plan2.regions.find((entry) => (contents.get(entry.name) ?? []).includes(other));
21043
+ const text2 = region && singleBlockRegion(region) && !region.arrangement ? textBesideChart(other) : void 0;
21044
+ if (text2) text2.fills = true;
21045
+ }
20439
21046
  if (plan2.stack !== void 0 && bodySteps) {
20440
21047
  for (const unit2 of bodyUnits) if (!unit2.children && unit2.field === "quote") growthOf.set(unit2, TYPE_SCALE_RATIO ** bodySteps);
20441
21048
  }
21049
+ if (plan2.stack === void 0) growBodyUnits(bodyUnits);
20442
21050
  const timelineBands = (units) => units.length > 1 && units.every((unit2) => !unit2.children && unit2.field === "timeline" && unit2.caption === void 0);
20443
21051
  for (const units of [...contents.values(), belowUnits]) {
20444
21052
  if (timelineBands(units)) for (const unit2 of units) timelineHints.set(unit2, { horizontal: true, ...units.length >= 4 ? { compact: true, inlineHeader: true } : {} });
@@ -20509,6 +21117,15 @@ function composeLayout(input, options = {}) {
20509
21117
  cells.push(Array.from({ length: columnCount }, () => BELOW));
20510
21118
  rowSizes.push("auto");
20511
21119
  }
21120
+ if (options[CENTER] === true && bodySteps > 0 && plan2.stack === void 0 && growsAsBody(bodyUnits) && bodyUnits.every((unit2) => unit2.field === "metric")) {
21121
+ cells.forEach((row, index) => {
21122
+ const names2 = row.filter((name) => name !== ".");
21123
+ if (rowSizes[index] !== "auto" && names2.length && names2.every((name) => {
21124
+ const units = unitsOf(name);
21125
+ return units.length > 0 && units.every((unit2) => unit2.field === "metric");
21126
+ })) rowSizes[index] = "auto";
21127
+ });
21128
+ }
20512
21129
  const gap2 = Math.max(0, Math.min(requestedTemplateGap, frame.width / (columnCount * 2), frame.height / (rowSizes.length * 2)));
20513
21130
  const regionOf = new Map(plan2.regions.map((region) => [region.name, region]));
20514
21131
  const empty2 = /* @__PURE__ */ new Set();
@@ -20546,17 +21163,17 @@ function composeLayout(input, options = {}) {
20546
21163
  const spanWidth = (rect) => columnX[rect.column + rect.columnSpan - 1] + widths[rect.column + rect.columnSpan - 1] - columnX[rect.column];
20547
21164
  const titleRect = rects.get("title");
20548
21165
  const titleMode = hasBodyPayload && plan2.stack === void 0 && titleRect && rowSizes.slice(titleRect.row, titleRect.row + titleRect.rowSpan).every((size) => size === "auto") ? plan2.subtitle ? "step" : "split" : void 0;
20549
- const headingsAlone = () => plan2.regions.every((region) => region.role !== "primary" && region.role !== "secondary" || !unitsOf(region.name).length) && !belowUnits.length;
20550
- const masterRule = options[LAYOUT_MASTER] === true ? !plan2.regions.some((region) => region.role === "primary" || region.role === "secondary") : void 0;
21166
+ const headingsAlone = () => plan2.regions.every((region) => region.role !== "primary" || !unitsOf(region.name).length) && !belowUnits.length;
21167
+ const masterRule = options[LAYOUT_MASTER] === true ? !plan2.regions.some((region) => region.role === "primary") : void 0;
20551
21168
  const headingItemsAt = (fields2, x, y2, areaWidth) => headingGroup(fields2, x, y2, areaWidth, fields2.includes("title") ? titleMode : void 0, plan2.titleRule === true && (masterRule ?? (headingsAlone() || statement === "title")) && ruleOn("title-rule"));
20552
21169
  const groupHeight = (list) => list.length ? list.at(-1).box.y + list.at(-1).box.height - (groupRules.get(list)?.y ?? list[0].box.y) : 0;
20553
21170
  const arrangementOf = (region, units, cell) => {
20554
21171
  if (region.name === longTextRegion) return "column";
20555
21172
  if (units.length > 1 && units.every((unit2) => tierGroups.has(unit2.path))) return "row";
20556
21173
  if (units.length && units.every((unit2) => personParts.has(unit2.path))) return (portraitMode === "top" || teamAvatar) && units.length <= PORTRAIT_TOP_MAX ? "row" : "grid";
20557
- if (direction !== void 0 && region.flow !== "none") return direction === "horizontal" ? "row" : "column";
20558
- const flow = region.flow === "none" && units.length > 1 ? "auto" : region.flow;
20559
- if (flow === "none" || flow === "column") return "column";
21174
+ if (region.flow === "row") return "row";
21175
+ const flow = singleBlockRegion(region) && units.length <= 1 ? "column" : region.flow;
21176
+ if (flow === "column") return "column";
20560
21177
  if (flow === "grid") return "grid";
20561
21178
  const shape = gridFlowShape(units.length, cell.width >= cell.height);
20562
21179
  const cards = hasCards && !region.bleed;
@@ -20565,7 +21182,7 @@ function composeLayout(input, options = {}) {
20565
21182
  };
20566
21183
  const LIST_GRID_COLUMN_EMS = 7.5;
20567
21184
  const listGridOf = (region, units, areaWidth, landscape = true) => {
20568
- if (units.length < 2 || direction !== void 0) return void 0;
21185
+ if (units.length < 2 || region.flow === "row") return void 0;
20569
21186
  if (!units.every((unit2) => !unit2.children && unit2.caption === void 0 && (unit2.field === "items" || unit2.field === "bullets"))) return void 0;
20570
21187
  if (units.every((unit2) => pairRowLabels.has(unit2.path))) return listGridShape(units.length, 1);
20571
21188
  let columns2 = landscape ? 4 : units.length <= 3 ? 1 : 2;
@@ -20605,7 +21222,7 @@ function composeLayout(input, options = {}) {
20605
21222
  };
20606
21223
  const joinedLayout = (region, units, cell, cards) => {
20607
21224
  const hint = binding.arrangements.get(region.name), landscape = cell.width >= cell.height;
20608
- if (!hint || units.length < 2 || direction !== void 0) return void 0;
21225
+ if (!hint || units.length < 2 || region.flow === "row") return void 0;
20609
21226
  if (hint === "row") {
20610
21227
  const across = movedAcross(units, cell.width, cards), shape = flowShape(across ? "row" : "column", units.length, true);
20611
21228
  return { shape, boxes: across ? gridBoxes(units.length, cell, units.length, gap2, movedWidths(units, cell.width, cards), false) : stackedBoxes(units, cell, gap2, composition, cards, region.anchor) };
@@ -20649,11 +21266,11 @@ function composeLayout(input, options = {}) {
20649
21266
  const units = unitsOf(name), region = name === BELOW ? belowRegion : regionOf.get(name);
20650
21267
  if (!units.length) {
20651
21268
  if (region.empty !== "keep" || atFloor) return 0;
20652
- const lines = 2 * (region.flow === "auto" ? LEAD_NOMINAL_SIZE * scale2 : startSize) * 1.22;
21269
+ const lines = 2 * (region.flow === "auto" && !singleBlockRegion(region) ? LEAD_NOMINAL_SIZE * scale2 : startSize) * 1.22;
20653
21270
  return lines + (hasCards && !region.bleed ? 2 * Math.min(CARD_INSET * scale2, areaWidth / 4, lines / 8) : 0);
20654
21271
  }
20655
21272
  if (timelineBands(units)) return stackHeight(bandRows(units, areaWidth, 1, hasCards && !region.bleed, atFloor));
20656
- const fixed = direction !== void 0 || name === longTextRegion || listGridOf(region, units, areaWidth) !== void 0 || binding.arrangements.get(name) === "mosaic" || binding.arrangements.get(name) === "row";
21273
+ const fixed = region.flow === "row" || name === longTextRegion || listGridOf(region, units, areaWidth) !== void 0 || binding.arrangements.get(name) === "mosaic" || binding.arrangements.get(name) === "row";
20657
21274
  const paragraphs = fixed ? void 0 : paragraphColumns(units, { x: 0, y: 0, width: areaWidth, height: frame.height }, hasCards && !region.bleed, composition);
20658
21275
  if (paragraphs) return paragraphNeed(units, paragraphs, areaWidth, hasCards && !region.bleed, composition, atFloor);
20659
21276
  const leading = fixed || region.flow === "grid" ? void 0 : leadStack(units);
@@ -20881,7 +21498,8 @@ function composeLayout(input, options = {}) {
20881
21498
  placeHeadings("title", titleFields);
20882
21499
  if (plan2.subtitle) placeHeadings("subtitle", subtitleFields);
20883
21500
  const slideComposition = record19(slide.composition);
20884
- const overridden = ["mode", "columns", "weights"].some((key) => slideComposition[key] !== void 0) ? plan2.regions.find((region) => region.role === "primary" && region.flow !== "none")?.name : void 0;
21501
+ const overridden = ["mode", "columns", "weights"].some((key) => slideComposition[key] !== void 0) ? plan2.regions.find((region) => region.role === "primary" && !singleBlockRegion(region))?.name : void 0;
21502
+ if (overridden !== void 0) regionDirections.set(overridden, slideComposition.mode ?? "auto");
20885
21503
  const settings = { ...composition };
20886
21504
  const HUG_FILL = 0.45, UNEQUAL_PAYLOADS = 1.5, fillSpace = requestedTemplateGap * CARD_FILL_SPACE, underFilled = bodySteps > 0 || options[CENTER] === true;
20887
21505
  const hugHeight = (units, cells2, estimate) => Math.min(estimate, Math.max(...units.map((unit2, index) => {
@@ -20933,13 +21551,13 @@ function composeLayout(input, options = {}) {
20933
21551
  const filled = units.length === 1 && !region.bleed ? fillLone(units[0], cell, settings, cards) : void 0;
20934
21552
  if (filled) {
20935
21553
  const first = items.length;
20936
- placeNode(units[0], filled, settings, cards, region.listColumns, void 0, region.anchor);
21554
+ placeNode(units[0], filled, settings, cards, listColumnsOf(region), void 0, region.anchor);
20937
21555
  leafItems.push(...range(first, items.length));
20938
21556
  return arrangementOf(region, units, cell);
20939
21557
  }
20940
21558
  const bands2 = timelineBands(units), bandColumnCount = bands2 ? bandColumns(units, cell, cards) : 1;
20941
21559
  const listGrid = bands2 ? void 0 : listGridOf(region, units, cell.width, cell.width >= cell.height);
20942
- const own3 = bands2 || listGrid || direction !== void 0 || region.name === longTextRegion || binding.arrangements.get(region.name) === "mosaic" || binding.arrangements.get(region.name) === "row" ? void 0 : region;
21560
+ const own3 = bands2 || listGrid || region.flow === "row" || region.name === longTextRegion || binding.arrangements.get(region.name) === "mosaic" || binding.arrangements.get(region.name) === "row" ? void 0 : region;
20943
21561
  const paragraphs = own3 ? paragraphColumns(units, cell, cards, settings) : void 0;
20944
21562
  const lead = own3 && !paragraphs && region.flow !== "grid" ? leadStack(units) : void 0;
20945
21563
  const joined = bands2 || listGrid || paragraphs || lead ? void 0 : joinedLayout(region, units, cell, cards);
@@ -20991,7 +21609,7 @@ function composeLayout(input, options = {}) {
20991
21609
  const stack = [];
20992
21610
  units.forEach((unit2, index) => {
20993
21611
  const first = items.length;
20994
- placeNode(unit2, boxes[index], settings, cards, listGrid ? 1 : region.listColumns, region.anchor === "top" || stacked || planned[index] ? void 0 : referenceHeights[index], region.anchor, !cards || bands2 ? void 0 : planned[index] ? frames[index] : !stacked ? cellBoxes[index] : units.length === 1 ? cell : void 0);
21612
+ placeNode(unit2, boxes[index], settings, cards, listGrid ? 1 : listColumnsOf(region), region.anchor === "top" || stacked || planned[index] ? void 0 : referenceHeights[index], region.anchor, !cards || bands2 ? void 0 : planned[index] ? frames[index] : !stacked ? cellBoxes[index] : units.length === 1 ? cell : void 0);
20995
21613
  if (!unit2.children) {
20996
21614
  leafItems.push(...range(first, items.length));
20997
21615
  stack.push(...range(first, items.length));
@@ -21037,7 +21655,8 @@ function composeLayout(input, options = {}) {
21037
21655
  for (const region of plan2.regions) {
21038
21656
  const units = unitsOf(region.name), bound2 = binding.regions.find((entry) => entry.name === region.name);
21039
21657
  const rect = rects.get(region.name);
21040
- let cell = rect && !region.bleed ? region.arrangement ? physical(logical(rect)) : regionCell(rect) : physical(logical(rect ?? ownRects.get(region.name)));
21658
+ let cell = rect && !region.bleed ? regionDiagram(region) ? physical(logical(rect)) : regionCell(rect) : physical(logical(rect ?? ownRects.get(region.name)));
21659
+ if (rect && !region.bleed && stepProcesses.has(region.name)) stepProcessCells.set(region.name, roundBox5(physical(logical(rect))));
21041
21660
  const areaBox = region.bleed && rect ? roundBox5(cell) : void 0;
21042
21661
  if (region.bleed && rect && cell.width > 0) cell = bleed(cell);
21043
21662
  else if (rect && loneUnit && units[0] === loneUnit && plan2.regions.every((other) => other === region || empty2.has(other.name))) cell = { ...cell, height: Math.max(cell.height, frame.y + frame.height - cell.y) };
@@ -21089,14 +21708,16 @@ function composeLayout(input, options = {}) {
21089
21708
  if (regions.length || body.length < 3 || !body.every(({ item, index }) => item.metricLayout && !item.metricLayout.overflow && !item.frameBox && !item.emphasis && metricMoves.has(index))) return;
21090
21709
  const rows3 = [...new Set(body.map(({ item }) => round9(item.box.y)))].sort((a, b) => a - b);
21091
21710
  if (rows3.length < 2 || new Set(body.map(({ item }) => round9(item.box.height))).size !== 1) return;
21092
- const extent2 = (layout2) => {
21711
+ const chipBands = new Map(pendingIcons2.filter((pending2) => pending2.metric).map((pending2) => [pending2.members[0], pending2.diameter * (1 + ICON_CHIP_GAP)]));
21712
+ const extent2 = (item, layout2) => {
21093
21713
  const boxes = [layout2.bounds, ...layout2.parts.filter((part) => part.visible).map((part) => part.box), ...layout2.trendBox ? [layout2.trendBox] : [], ...layout2.deltaPill ? [layout2.deltaPill.box] : []];
21094
- return [Math.min(...boxes.map((box) => box.y)), Math.max(...boxes.map((box) => box.y + box.height))];
21714
+ const top = Math.min(...boxes.map((box) => box.y)), band = chipBands.get(item) ?? 0, drawn = layout2.parts.filter((part) => part.visible && part.fit).map((part) => part.box.y);
21715
+ return [band ? Math.min(top, (drawn.length ? Math.min(...drawn) : item.box.y) - band) : top, Math.max(...boxes.map((box) => box.y + box.height))];
21095
21716
  };
21096
21717
  const rowOf = (item) => rows3.indexOf(round9(item.box.y));
21097
- const spans = rows3.map((_, row) => body.filter(({ item }) => rowOf(item) === row).map(({ item }) => extent2(item.metricLayout)));
21718
+ const spans = rows3.map((_, row) => body.filter(({ item }) => rowOf(item) === row).map(({ item }) => extent2(item, item.metricLayout)));
21098
21719
  const tops = spans.map((span) => Math.min(...span.map(([top]) => top))), heights = spans.map((span, row) => Math.max(...span.map(([, bottom]) => bottom)) - tops[row]);
21099
- const areaTop = rows3[0], areaBottom = Math.max(...body.map(({ item }) => item.box.y + item.box.height));
21720
+ const areaTop = Math.min(rows3[0], tops[0]), areaBottom = Math.max(...body.map(({ item }) => item.box.y + item.box.height));
21100
21721
  const free = areaBottom - areaTop - heights.reduce((sum, height2) => sum + height2, 0);
21101
21722
  if (free <= 0) return;
21102
21723
  const space = free / (rows3.length + 1), targets = [];
@@ -21120,6 +21741,28 @@ function composeLayout(input, options = {}) {
21120
21741
  item.text = layout2.parts.find((part) => part.role === "value")?.fit ?? item.text;
21121
21742
  }
21122
21743
  };
21744
+ const closeTableNote = () => {
21745
+ const body = items.filter((item) => !headings.has(item.field) && !item.eyebrow);
21746
+ if (!useTemplate || body.length !== 2 || regions.length || composition.weights?.length) return;
21747
+ const table = body.find((item) => item.field === "table"), note = body.find((item) => item.field === "text");
21748
+ if (!table || !note?.text || "listEntries" in note.text || table.frameBox || note.frameBox || table.emphasis || note.emphasis || table.caption || note.caption) return;
21749
+ if (note.box.y < table.box.y + table.box.height - 1 || note.box.x > table.box.x + table.box.width - 1 || note.box.x + note.box.width < table.box.x + 1) return;
21750
+ let laid;
21751
+ try {
21752
+ laid = layoutTable(table.value, table.box, { scale: scale2, minFontSize: table.composition.minFontSize, fontFamily: options.fontFamilies?.body, ...options.fontFamilies?.code ? { codeFontFamily: options.fontFamilies.code } : {}, textMeasurement: options.textMeasurement, presentation: options.presentation, ...numberLanguage(options), ...table.tableGrowth ? { growth: table.tableGrowth } : {} });
21753
+ } catch {
21754
+ laid = void 0;
21755
+ }
21756
+ if (!laid || laid.overflow) return;
21757
+ const fit = note.text, noteHeight = "richLines" in fit ? fit.height : fit.placement?.height ?? fit.lines.length * fit.lineHeight;
21758
+ const headingFoot = Math.max(contentBox.y, ...items.filter((item) => headings.has(item.field) && item.box.y + item.box.height <= table.box.y + 0.5).map((item) => item.box.y + item.box.height + gap));
21759
+ const top = Math.min(table.box.y, headingFoot), bottom = note.box.y + noteHeight, pair = laid.height + gap + noteHeight;
21760
+ if (note.box.y - (table.box.y + laid.height) <= gap * 1.5 || bottom - top <= pair) return;
21761
+ const tableY = round9(top + (bottom - top - pair) / 2), dy = round9(tableY + laid.height + gap - note.box.y);
21762
+ table.box = { ...table.box, y: tableY, height: laid.height };
21763
+ note.box = { ...note.box, y: note.box.y + dy };
21764
+ note.text = translateTextFit(note.text, dy);
21765
+ };
21123
21766
  const shareTierPrices = () => {
21124
21767
  const priceOf = (index) => items[index].metricLayout?.parts.find((part) => part.role === "value");
21125
21768
  const alike = tierPrices.filter((index) => (priceOf(index)?.fit?.fontSize ?? 0) >= METRIC_ROLE_VALUE_SIZE * scale2 - FONT_GRID_EPSILON);
@@ -21398,19 +22041,12 @@ function composeLayout(input, options = {}) {
21398
22041
  }
21399
22042
  };
21400
22043
  const ownMode = record19(slide.composition).mode;
21401
- const direction = recomposing && hints.sources.contentDirection === "layout" ? void 0 : hints.contentDirection;
21402
- const directionMode = direction === "vertical" ? "column" : direction === "horizontal" ? "row" : "auto";
22044
+ const regionDirections = /* @__PURE__ */ new Map();
21403
22045
  const chartTrack = options[CHART_TRACK];
21404
- const chartHint = chartTrack?.edge ?? (hints.chartPrimary === "start" ? "left" : hints.chartPrimary === "end" ? "right" : hints.chartPrimary);
21405
- const chartSide = chartHint === "left" || chartHint === "right" || chartHint === "top" || chartHint === "bottom" ? chartHint : void 0;
21406
22046
  const chartIndex = pending.findIndex((node) => !node.children && node.field === "chart");
21407
- const chartPrimary = chartSide !== void 0 && !useTemplate && (chartTrack !== void 0 || !ownMode) && !regions.length && chartIndex >= 0 && pending.some((node) => node.children || node.field !== "chart") ? chartSide : void 0;
21408
- const firstChart = chartPrimary === "left" || chartPrimary === "top";
21409
- if (chartSide && !chartTrack && !chartPrimary && chartIndex >= 0 && (hints.sources.chartPrimary === "slide" || hints.sources.chartPrimary === "deck") && pending.some((node) => node.children || node.field !== "chart")) {
21410
- const why = useTemplate ? "the slide's layout template places the chart in its regions (a template says this with a chart-beside region)" : regions.length ? "the slide's promoted regions place its blocks" : "the slide's own composition.mode arranges its body";
21411
- diagnostics.push({ code: "arrangement-adapted", path: hints.paths.chartPrimary, message: `design.chartPrimary "${hints.chartPrimary}" is not applied on this slide: ${why}.` });
21412
- }
21413
- const rootSettings = chartPrimary ? { ...composition, mode: chartPrimary === "left" || chartPrimary === "right" ? "row" : "column", weights: chartTrack ? firstChart ? [chartTrack.share, 1 - chartTrack.share] : [1 - chartTrack.share, chartTrack.share] : firstChart ? [3, 2] : [2, 3], columns: void 0 } : { ...composition, mode: composition.mode ?? directionMode };
22047
+ const chartSplit = chartTrack !== void 0 && !useTemplate && !regions.length && chartIndex >= 0 && pending.some((node) => node.children || node.field !== "chart") ? chartTrack.edge : void 0;
22048
+ const firstChart = chartSplit === "left" || chartSplit === "top";
22049
+ const rootSettings = chartSplit ? { ...composition, mode: chartSplit === "left" || chartSplit === "right" ? "row" : "column", weights: firstChart ? [chartTrack.share, 1 - chartTrack.share] : [1 - chartTrack.share, chartTrack.share], columns: void 0 } : { ...composition, mode: composition.mode ?? "auto" };
21414
22050
  const underChart = options[TIMELINE_UNDER_CHART] === true && !useTemplate && !regions.length && pending.length === 2 && pending.every((node) => !node.children) ? { chart: pending.find((node) => node.field === "chart"), timeline: pending.find((node) => node.field === "timeline") } : void 0;
21415
22051
  const noteSplit = options[TABLE_NOTE];
21416
22052
  const tableNoteNodes = noteSplit && ruleOn("table-note") && !useTemplate && !regions.length && pending.length === 2 && pending.every((node) => !node.children && node.caption === void 0 && node.emphasis === void 0 && !node.eyebrow && !node.region) && pending.filter((node) => node.field === "table").length === 1 && pending.filter((node) => node.field === "text").length === 1 ? { table: pending.find((node) => node.field === "table"), note: pending.find((node) => node.field === "text") } : void 0;
@@ -21438,45 +22074,18 @@ function composeLayout(input, options = {}) {
21438
22074
  timelineHints.set(underChart.timeline, { horizontal: true });
21439
22075
  const band = measureTimeline(underChart.timeline, { x: 0, y: 0, width: contentBox.width, height: 1e6 }, composition, "role", void 0, true).bounds.height + scale2;
21440
22076
  arrange([underChart.chart, underChart.timeline], contentBox, { ...composition, mode: "column", weights: [Math.max(scale2, contentBox.height - gap - band), band], columns: void 0 }, 0);
21441
- } else if (chartPrimary) {
22077
+ } else if (chartSplit) {
21442
22078
  const primary = pending[chartIndex], rest = pending.filter((_, index) => index !== chartIndex);
21443
- const support = { field: "blocks", type: "group", value: rest.map((node) => node.payload), path, payload: {}, children: rest, composition: chartTrack?.mode ? { mode: chartTrack.mode } : chartTrack && ownMode ? { mode: ownMode } : {}, synthetic: true };
21444
- const first = items.length;
22079
+ const support = { field: "blocks", type: "group", value: rest.map((node) => node.payload), path, payload: {}, children: rest, composition: chartTrack.mode ? { mode: chartTrack.mode } : ownMode ? { mode: ownMode } : {}, synthetic: true };
21445
22080
  arrange(firstChart ? [primary, support] : [support, primary], contentBox, rootSettings, 0);
21446
- const beside = items.slice(first).filter((item) => item.field !== "chart");
21447
- const lone = !chartTrack && beside.length === 1 && beside[0].field === "text" && typeof beside[0].value === "string" && beside[0].text && !beside[0].frameBox && !beside[0].emphasis && !("richLines" in beside[0].text) ? beside[0] : void 0;
21448
- if (lone) {
21449
- const heightOf = (fit) => fit.placement?.height ?? fit.lines.length * fit.lineHeight, text2 = contentText("text", lone.value) ?? "";
21450
- const message = messageWords(lone.value) <= SHORT_MESSAGE_WORDS;
21451
- let best = lone.text;
21452
- const grow = (cap, lines) => {
21453
- for (let size = best.fontSize; ; ) {
21454
- const step = scaleAbove(size, composition.minFontSize ?? 16);
21455
- if (step > Math.min(cap * scale2, capOf(rootSettings) + FONT_GRID_EPSILON) + 1e-9) break;
21456
- const fit = fitPlacedText("text", lone.value, text2, lone.box, step, step, lone.path, lone.alignment);
21457
- if (fit.overflow || fit.fontSize < step - 1e-9 || heightOf(fit) > LONE_TARGET * lone.box.height || fit.lines.length > lines || ruleOn("reading-measure") && underMeasure("text", lone.value, lone.box.width, step)) break;
21458
- best = fit;
21459
- size = step;
21460
- }
21461
- };
21462
- if (heightOf(best) < LONE_FILL * lone.box.height) {
21463
- grow(LONE_DISPLAY_SIZES.text, Infinity);
21464
- if (message) grow(MESSAGE_DISPLAY_SIZE, MESSAGE_DISPLAY_LINES);
21465
- }
21466
- lone.text = best;
21467
- }
21468
- if (!chartTrack && beside.length && beside.every((item) => item.field === "text" && item.text && !item.frameBox && !item.emphasis && !("listEntries" in item.text) && !("richLines" in item.text))) {
21469
- const inkBottom = (item) => item.box.y + ("richLines" in item.text ? item.text.height : item.text.placement?.height ?? item.text.lines.length * item.text.lineHeight);
21470
- const top = Math.min(...beside.map((item) => item.box.y)), bottom = Math.max(...beside.map((item) => item.box.y + item.box.height)), ink = Math.max(...beside.map(inkBottom)) - top;
21471
- const dy = round9((bottom - top - ink) / 2);
21472
- if (dy > 0.5) for (const item of beside) {
21473
- item.box = { ...item.box, y: item.box.y + dy, height: Math.max(scale2, item.box.height - dy) };
21474
- item.text = translateTextFit(item.text, dy);
21475
- }
21476
- }
21477
22081
  } else {
21478
22082
  const grouped = groupRoot(pending), roots = grouped?.nodes ?? pending;
22083
+ if (!regions.length) growBodyUnits(pending);
21479
22084
  if (roots.length === 1 && !roots[0].children) roots[0].fills = true;
22085
+ else if (!regions.length && roots.length === 2 && (rootSettings.mode === "row" || rootSettings.mode === "column") && rootSettings.weights?.length === 2) {
22086
+ const chart = roots.findIndex((node) => !node.children && node.field === "chart"), text2 = chart >= 0 ? textBesideChart(roots[1 - chart]) : void 0;
22087
+ if (text2) text2.fills = true;
22088
+ }
21480
22089
  if (grouped?.settings) arrange(grouped.nodes, contentBox, grouped.settings, 0, gap);
21481
22090
  else arrange(grouped?.nodes ?? pending, contentBox, rootSettings, 0);
21482
22091
  }
@@ -21491,6 +22100,7 @@ function composeLayout(input, options = {}) {
21491
22100
  alignHeadingTracks();
21492
22101
  alignGroupTracks();
21493
22102
  spaceMetricRows();
22103
+ closeTableNote();
21494
22104
  if (autoSurface && autoEmphasis?.follows !== void 0 && options[PILL_AT_FOOT] !== true) {
21495
22105
  const prefix = `${path}.blocks.${autoEmphasis.follows}.`, owner = items.filter((item2) => item2.path.startsWith(prefix) && item2.text);
21496
22106
  const textBottom = Math.max(...owner.map((item2) => Math.max(item2.box.y + ("richLines" in item2.text ? item2.text.height : item2.text.placement?.height ?? item2.text.lines.length * item2.text.lineHeight), item2.frameBox ? item2.frameBox.y + item2.frameBox.height : -Infinity)));
@@ -21625,17 +22235,9 @@ function composeLayout(input, options = {}) {
21625
22235
  const numberOf = (number2) => ({ value: number2.value, style: number2.style, suffix: number2.suffix });
21626
22236
  const connector = (badges) => badges.length > 1 ? { connector: { x1: badges[0].cx, y1: badges[0].cy, x2: badges.at(-1).cx, y2: badges.at(-1).cy } } : {};
21627
22237
  for (const region of template.regions) {
21628
- const members = items.filter((item) => item.region === region.name && !headings.has(item.field)), drawn = [];
21629
- if (!region.sequence && !members.some((item) => numeralLists.has(item.path))) continue;
22238
+ const members = items.filter((item) => item.region === region.name && !headings.has(item.field));
22239
+ if (!regionSequence(region) && !members.some((item) => numeralLists.has(item.path))) continue;
21630
22240
  for (const item of members) {
21631
- if (stepFlows.has(item.path)) {
21632
- const flow = stepFlow(item, region.name, lineWidth);
21633
- if (flow) {
21634
- result.push(flow);
21635
- drawn.push(item.box);
21636
- }
21637
- continue;
21638
- }
21639
22241
  const fits = item.listColumns?.length ? item.listColumns.map((column) => column.text) : item.text && "listEntries" in item.text ? [item.text] : [];
21640
22242
  for (const fit of fits) {
21641
22243
  const badges = fit.listEntries.flatMap((entry) => entry.badge ? [badgeOf(entry.textPath ?? item.path, entry.badge.cx, entry.badge.cy, entry.badge.diameter, entry.badge.label, entry.badge.fontSize, entry.marker.number && item.payload.numbering !== void 0 ? { path: item.path, index: entry.index, number: numberOf(entry.marker.number) } : void 0, entry.badge.numeral)] : []);
@@ -21664,7 +22266,7 @@ function composeLayout(input, options = {}) {
21664
22266
  }
21665
22267
  }
21666
22268
  const composed2 = templateRegions.find((entry) => entry.name === region.name);
21667
- const extents = [...result.filter((entry) => entry.region === region.name).flatMap((entry) => entry.badges.map((badge) => badge.numeral ?? { x: badge.cx - badge.radius, y: badge.cy - badge.radius, width: 2 * badge.radius, height: 2 * badge.radius })), ...drawn];
22269
+ const extents = result.filter((entry) => entry.region === region.name).flatMap((entry) => entry.badges.map((badge) => badge.numeral ?? { x: badge.cx - badge.radius, y: badge.cy - badge.radius, width: 2 * badge.radius, height: 2 * badge.radius }));
21668
22270
  if (composed2 && extents.length) {
21669
22271
  const box = composed2.box, x = Math.min(box.x, ...extents.map((extent2) => extent2.x)), y2 = Math.min(box.y, ...extents.map((extent2) => extent2.y));
21670
22272
  composed2.box = roundBox5({ x, y: y2, width: Math.max(box.x + box.width, ...extents.map((extent2) => extent2.x + extent2.width)) - x, height: Math.max(box.y + box.height, ...extents.map((extent2) => extent2.y + extent2.height)) - y2 });
@@ -21672,48 +22274,12 @@ function composeLayout(input, options = {}) {
21672
22274
  }
21673
22275
  return result;
21674
22276
  };
21675
- const stepFlow = (item, region, lineWidth) => {
21676
- const values = item.value, fit = item.text, size = fit.fontSize, area3 = templateRegions.find((entry) => entry.name === region)?.box ?? item.box;
21677
- const listOptions = { ...richOptions(styleFor(item.field, item.path)), bullet: "none" };
21678
- const single = (index, box) => {
21679
- const own0 = `${item.path}.0`, ownPath = `${item.path}.${index}`, marker = listOptions.citationMarker;
21680
- const entryOptions = marker ? { ...listOptions, citationMarker: (run) => marker(run === own0 || run.startsWith(`${own0}.`) ? ownPath + run.slice(own0.length) : run) } : listOptions;
21681
- const own3 = fitList([values[index]], box, size, size, entryOptions), object2 = typeof values[index] === "object" && !Array.isArray(values[index]);
21682
- return { ...own3, listEntries: own3.listEntries.map((entry) => ({ ...entry, index, textPath: `${item.path}.${index}${object2 ? ".text" : ""}`, descriptionPath: `${item.path}.${index}.description` })) };
21683
- };
21684
- const measured = values.map((_, index) => single(index, { x: 0, y: 0, width: 1e5, height: 1e5 }).listEntries[0]);
21685
- if (!fit.listEntries.length || measured.some((entry) => entry.text.richLines.length !== 1)) return void 0;
21686
- const widths = measured.map((entry) => entry.text.richLines[0].width), lineHeight = Math.max(...measured.map((entry) => entry.text.height));
21687
- const padX = 0.9 * size, padY = 0.6 * size, slot = 2.4 * size, count = values.length, room = area3.width - slot * (count - 1);
21688
- const equal = count * (Math.max(...widths) + 2 * padX) <= room;
21689
- if (!equal && widths.reduce((sum, width2) => sum + width2 + 2 * padX, 0) > room) return void 0;
21690
- const chipWidths = widths.map((width2) => equal ? room / count : width2 + 2 * padX), chipHeight = lineHeight + 2 * padY;
21691
- const middle = fit.listEntries[0].textBox.y + fit.height / 2, y2 = middle - chipHeight / 2;
21692
- const total = chipWidths.reduce((sum, width2) => sum + width2, 0) + slot * (count - 1);
21693
- let start = area3.x + (area3.width - total) / 2;
21694
- const chips = [], columns2 = [];
21695
- for (let index = 0; index < count; index++) {
21696
- const width2 = chipWidths[index], x = rtl ? area3.x + area3.width - (start - area3.x) - width2 : start;
21697
- start += width2 + slot;
21698
- const box = { x: x + (width2 - widths[index]) / 2 - 1, y: y2 + padY, width: widths[index] + 2, height: lineHeight };
21699
- const text2 = single(index, box);
21700
- if (text2.overflow || text2.listEntries[0].text.richLines.length !== 1) return void 0;
21701
- chips.push({ path: text2.listEntries[0].textPath, box: { x, y: y2, width: width2, height: chipHeight }, radius: CARD_RADIUS * scale2 });
21702
- columns2.push({ box, start: index, end: index + 1, text: text2 });
21703
- }
21704
- const arrows = chips.slice(1).map((chip, index) => {
21705
- const previous = chips[index], left = rtl ? chip.box.x + chip.box.width : previous.box.x + previous.box.width, right = rtl ? previous.box.x : chip.box.x, tall = 0.6 * size;
21706
- return { box: { x: left + 0.5 * size, y: y2 + (chipHeight - tall) / 2, width: Math.max(scale2, right - left - size), height: tall }, direction: rtl ? "left" : "right" };
21707
- });
21708
- item.listColumns = columns2;
21709
- item.text = mergeListColumns(columns2);
21710
- item.box = { x: Math.min(...chips.map((chip) => chip.box.x)), y: y2, width: total, height: chipHeight };
21711
- return { form: "flow", region, path: item.path, badges: [], chips, arrows, lineWidth };
21712
- };
21713
22277
  const fallbackListAreas = /* @__PURE__ */ new Map();
21714
- const arrangedList = (item, kind2, area3, pyramidDirection = "up") => {
22278
+ const arrangedList = (item, arrangement, area3, candidate = false) => {
22279
+ const kind2 = arrangement === "inverted-pyramid" ? "pyramid" : arrangement, pyramidDirection = arrangement === "inverted-pyramid" ? "down" : "up";
21715
22280
  const values = item.value, fit = item.text, base = fit.fontSize, count = values.length;
21716
22281
  const tree = kind2 === "org-chart" || kind2 === "hierarchy", measured = tree || kind2 === "venn";
22282
+ const overlapAt = kind2 === "venn" && record19(values[count - 1]).overlap === true ? count - 1 : -1, sets = overlapAt < 0 ? count : count - 1;
21717
22283
  const listOptions = { ...richOptions(styleFor(item.field, item.path)), bullet: "none" };
21718
22284
  const single = (index, box, size2) => {
21719
22285
  const own0 = `${item.path}.0`, ownPath = `${item.path}.${index}`, marker = listOptions.citationMarker;
@@ -21742,7 +22308,7 @@ function composeLayout(input, options = {}) {
21742
22308
  const box = { x: inner.x, y: inner.y + (inner.height - entry.text.height) / 2, width: inner.width, height: entry.text.height };
21743
22309
  const text2 = single(index, box, size2), placed3 = text2.listEntries[0];
21744
22310
  if (!placed3 || text2.overflow || cutsWord(placed3)) return void 0;
21745
- if (kind2 === "venn" && count >= 5 && design2.design !== "smartart" && placed3.text.richLines.some((line2) => line2.fragments.map((fragment) => fragment.text).join("").trim().length > 70)) return void 0;
22311
+ if (kind2 === "venn" && sets >= 5 && design2.design !== "smartart" && placed3.text.richLines.some((line2) => line2.fragments.map((fragment) => fragment.text).join("").trim().length > 70)) return void 0;
21746
22312
  if (design2.align === "center") placed3.text.richLines = placed3.text.richLines.map((line2) => {
21747
22313
  const last = line2.fragments.at(-1), trail = last && last.kind === void 0 ? /\s+$/u.exec(last.text)?.[0] : void 0;
21748
22314
  if (!trail || trail.length === last.text.length) return line2;
@@ -21767,13 +22333,13 @@ function composeLayout(input, options = {}) {
21767
22333
  const widest = Math.max(0, ...columns2.flatMap((column) => column.text.listEntries[0].text.richLines.map((line2) => line2.width)));
21768
22334
  return { columns: columns2, margin, margins: [left, top2, right, bottom], lines, stable, fill, ink, widest };
21769
22335
  };
21770
- const role = LIST_NOMINAL_SIZE * scale2, floor = measured ? base : Math.min(base, role), step = 4 / 3 * scale2, top = Math.min(capOf(item.composition), Math.max(base, snapFontSizeDown(role * ARRANGEMENT_GROWTH)));
22336
+ const role = LIST_NOMINAL_SIZE * scale2, floor = measured || candidate ? base : Math.min(base, role), step = 4 / 3 * scale2, top = Math.min(capOf(item.composition), Math.max(base, snapFontSizeDown(role * ARRANGEMENT_GROWTH)));
21771
22337
  const sized = (design2) => {
21772
22338
  let fallback;
21773
22339
  const minimum = design2.minimumSize ?? floor;
21774
22340
  if (minimum > top + FONT_GRID_EPSILON) return void 0;
21775
- for (let candidate = top; ; candidate = snapFontSizeDown(candidate - step)) {
21776
- const at3 = Math.max(candidate, minimum), nodes = design2.fitNodes ? design2.fitNodes(at3) : design2.nodes;
22341
+ for (let candidate2 = top; ; candidate2 = snapFontSizeDown(candidate2 - step)) {
22342
+ const at3 = Math.max(candidate2, minimum), nodes = design2.fitNodes ? design2.fitNodes(at3) : design2.nodes;
21777
22343
  const current = nodes ? { ...design2, nodes } : void 0, attempt = current ? place2(current, at3) : void 0;
21778
22344
  if (attempt && (design2.design !== "smartart" || attempt.stable.every(Boolean))) return { design: current, placed: attempt, size: at3 };
21779
22345
  if (attempt && !fallback) fallback = { design: current, placed: attempt, size: at3 };
@@ -21798,9 +22364,39 @@ function composeLayout(input, options = {}) {
21798
22364
  });
21799
22365
  designs.push({ design: "smartart", frame: area3, nodes, connectors: geometry.connectors, margin: ARRANGEMENT_TEXT_MARGIN[kind2], align: "center", paint: "primary", text: kind2 === "hierarchy" ? "slide" : "node", lineWidth: primaryLine });
21800
22366
  } else if (kind2 === "venn") {
21801
- const nativeNodes = vennNodes(area3, count);
21802
- const measuredDesign = { design: "smartart", frame: area3, nodes: nativeNodes, margin: ARRANGEMENT_TEXT_MARGIN.venn, align: "center", paint: "primary", text: "slide", lineWidth: primaryLine };
21803
- if (count <= 4) designs.push(measuredDesign);
22367
+ const nativeNodes = vennNodes(area3, sets);
22368
+ const withOverlap = (circles, size2) => {
22369
+ if (!circles || overlapAt < 0) return circles;
22370
+ const margin = ARRANGEMENT_TEXT_MARGIN.venn * size2, clear = 0.25 * size2, pad = 0.2 * size2;
22371
+ const ink = [];
22372
+ for (const [index, node] of circles.entries()) {
22373
+ const inner = { x: node.textBox.x + margin, y: node.textBox.y + margin, width: node.textBox.width - 2 * margin, height: node.textBox.height - 2 * margin };
22374
+ if (inner.width <= 0 || inner.height <= 0) return void 0;
22375
+ const entry = single(index, { ...inner, height: 1e5 }, size2).listEntries[0];
22376
+ if (!entry) return void 0;
22377
+ const widest = Math.max(0, ...entry.text.richLines.map((line2) => line2.width));
22378
+ ink.push({ x: inner.x + (inner.width - widest) / 2, y: inner.y + (inner.height - entry.text.height) / 2, width: widest, height: entry.text.height });
22379
+ }
22380
+ const cx = circles.reduce((sum, node) => sum + node.box.x + node.box.width / 2, 0) / circles.length, cy = circles.reduce((sum, node) => sum + node.box.y + node.box.height / 2, 0) / circles.length;
22381
+ const inside2 = (x, y2) => circles.every((node) => ((x - node.box.x - node.box.width / 2) / (node.box.width / 2)) ** 2 + ((y2 - node.box.y - node.box.height / 2) / (node.box.height / 2)) ** 2 <= 1);
22382
+ const labels = [1, 0.5, 0.36, 0.26, 0.18, 0.12].flatMap((share2) => {
22383
+ const probe = single(overlapAt, { x: 0, y: 0, width: area3.width * share2, height: 1e5 }, size2), entry = probe.listEntries[0];
22384
+ if (!entry || probe.overflow || cutsWord(entry)) return [];
22385
+ const width2 = Math.max(1, ...entry.text.richLines.map((line2) => line2.width)) + size2 * 0.02, height2 = entry.text.height, tall = height2 + 2 * margin + 2 * pad;
22386
+ return [{ width: width2, height: height2, tall, wide: width2 + 2 * margin + tall }];
22387
+ });
22388
+ const reach = Math.max(...circles.map((node) => node.box.height));
22389
+ for (let step2 = 0; step2 <= reach / (0.25 * size2); step2++) for (const dy of step2 ? [-step2 * 0.25 * size2, step2 * 0.25 * size2] : [0]) for (const label6 of labels) {
22390
+ const box = { x: cx - label6.wide / 2, y: cy + dy - label6.tall / 2, width: label6.wide, height: label6.tall };
22391
+ if (box.x < area3.x - 1e-6 || box.y < area3.y - 1e-6 || box.x + box.width > area3.x + area3.width + 1e-6 || box.y + box.height > area3.y + area3.height + 1e-6) continue;
22392
+ if (![0, -0.5, 0.5].some((share2) => [box.y, cy + dy, box.y + box.height].some((y2) => inside2(cx + share2 * label6.width, y2)))) continue;
22393
+ if (ink.some((other) => box.x < other.x + other.width + clear && other.x < box.x + box.width + clear && box.y < other.y + other.height + clear && other.y < box.y + box.height + clear)) continue;
22394
+ return [...circles, { index: overlapAt, box, textBox: { x: box.x + label6.tall / 2, y: box.y + pad, width: label6.width + 2 * margin, height: label6.height + 2 * margin }, preset: "roundRect", adjust: 5e4, radius: label6.tall / 2, overlap: true }];
22395
+ }
22396
+ return void 0;
22397
+ };
22398
+ const measuredDesign = { design: "smartart", frame: area3, nodes: nativeNodes, margin: ARRANGEMENT_TEXT_MARGIN.venn, align: "center", paint: "primary", text: "slide", lineWidth: primaryLine, ...overlapAt < 0 ? {} : { fitNodes: (size2) => withOverlap(nativeNodes, size2) } };
22399
+ if (sets <= 4) designs.push(measuredDesign);
21804
22400
  else {
21805
22401
  const previous = sized(measuredDesign), previousList = { ...item };
21806
22402
  if (!previous) fillRegionWithList(previousList, area3, top);
@@ -21811,7 +22407,7 @@ function composeLayout(input, options = {}) {
21811
22407
  for (const share2 of [0.18, 0.24, 0.32, 0.4, 0.5]) {
21812
22408
  const labels = [];
21813
22409
  let complete = true;
21814
- for (let index = 0; index < count; index++) {
22410
+ for (let index = 0; index < sets; index++) {
21815
22411
  const probe = single(index, { x: 0, y: 0, width: area3.width * share2, height: 1e5 }, size2), entry = probe.listEntries[0];
21816
22412
  if (!entry || probe.overflow || cutsWord(entry) || entry.text.richLines.some((line2) => line2.fragments.map((fragment) => fragment.text).join("").trim().length > 70)) {
21817
22413
  complete = false;
@@ -21826,10 +22422,10 @@ function composeLayout(input, options = {}) {
21826
22422
  const fit2 = fitVennShapes(area3, nativeNodes, labels, Math.max(4 * scale2, size2 * 0.12));
21827
22423
  if (fit2 && fit2.circleHeight >= area3.height * 0.65 && (!best || fit2.circleHeight > best.circleHeight)) best = fit2;
21828
22424
  }
21829
- return best?.nodes;
22425
+ return withOverlap(best?.nodes, size2);
21830
22426
  };
21831
22427
  designs.push({ ...measuredDesign, design: "opf", minimumSize, fitNodes, instead: "the measured Basic Venn circle group leaves too much unused slide body", adaptation: "Venn sets use enlarged editable shapes with measured outside labels; this adapted geometry is not a qualified live SmartArt layout." });
21832
- const columns2 = [.../* @__PURE__ */ new Set([...cardGridColumns(count), 2, 1])].filter((column) => column <= count);
22428
+ const columns2 = overlapAt < 0 ? [.../* @__PURE__ */ new Set([...cardGridColumns(count), 2, 1])].filter((column) => column <= count) : [];
21833
22429
  for (const column of columns2) designs.push({ design: "cards", frame: area3, nodes: cardNodes(area3, count, column, gap, radius), margin: CARD_TEXT_MARGIN, align: "center", paint: "card", text: "slide", lineWidth: scale2, minimumSize, adaptation: "The Venn overlap cannot keep every outside label readable at the original type size, so all sets are shown as editable cards." });
21834
22430
  }
21835
22431
  } else if (kind2 === "cycle") {
@@ -21857,7 +22453,7 @@ function composeLayout(input, options = {}) {
21857
22453
  largest: true,
21858
22454
  refit: (need) => linearDesign(kind2, area3, count, gap, rtl, lines, need, compact),
21859
22455
  ...compact ? { last: true } : {},
21860
- layout: { design: kind2 === "chevrons" ? "chevron-rows" : kind2 === "flow" ? "flow-rows" : "vertical-flow-columns", area: area3, gap, rtl, lines, ...compact ? { compact: true } : {} }
22456
+ layout: { design: kind2 === "chevrons" ? "chevron-rows" : kind2 === "process" ? "flow-rows" : "vertical-flow-columns", area: area3, gap, rtl, lines, ...compact ? { compact: true } : {} }
21861
22457
  });
21862
22458
  }
21863
22459
  } else if (count === MATRIX_ENTRIES) {
@@ -21878,8 +22474,7 @@ function composeLayout(input, options = {}) {
21878
22474
  continue;
21879
22475
  }
21880
22476
  const unavailable = design2.design !== "smartart" ? void 0 : smartArtUnavailable({
21881
- kind: kind2,
21882
- pyramidDirection,
22477
+ kind: arrangement,
21883
22478
  count,
21884
22479
  frame: design2.frame,
21885
22480
  rtl: rtl || script.rtl,
@@ -21902,6 +22497,7 @@ function composeLayout(input, options = {}) {
21902
22497
  chosen = outside;
21903
22498
  skipped = void 0;
21904
22499
  }
22500
+ if (!chosen && candidate) return void 0;
21905
22501
  if (!chosen) {
21906
22502
  diagnostics.push({ code: "arrangement-adapted", path: item.path, message: `The entries of the ${kind2 === "chevrons" ? "row of chevrons" : kind2.replace("-", " ")} do not fit its ${SMART_ART_NAMES[kind2].nodes} at the list's size, so they are drawn as a list.` });
21907
22503
  fillRegionWithList(item, area3, top);
@@ -21926,8 +22522,7 @@ function composeLayout(input, options = {}) {
21926
22522
  item.box = { ...design.frame };
21927
22523
  const textPaths = placed2.columns.map((column) => column.text.listEntries[0].textPath);
21928
22524
  return {
21929
- kind: kind2,
21930
- ...kind2 === "pyramid" && pyramidDirection === "down" ? { pyramidDirection } : {},
22525
+ kind: arrangement,
21931
22526
  design: design.design,
21932
22527
  region: item.region ?? "",
21933
22528
  path: item.path,
@@ -21957,7 +22552,8 @@ function composeLayout(input, options = {}) {
21957
22552
  return word.test(before) && word.test(after) && !everywhere.test(before) && !everywhere.test(after);
21958
22553
  });
21959
22554
  }
21960
- const arrangedBlocks = (members, kind2, area3, pyramidDirection = "up") => {
22555
+ const arrangedBlocks = (members, arrangement, area3) => {
22556
+ const kind2 = arrangement === "inverted-pyramid" ? "pyramid" : arrangement, pyramidDirection = arrangement === "inverted-pyramid" ? "down" : "up";
21961
22557
  const count = members.length, role = LIST_NOMINAL_SIZE * scale2, step = 4 / 3 * scale2, primaryLine = ARRANGEMENT_LINE_POINTS / 0.75 * scale2, radius = CARD_RADIUS * scale2;
21962
22558
  const bases = members.map((member) => member.text.fontSize), floor = Math.min(role, ...bases), top = Math.min(...members.map((member) => capOf(member.composition)), Math.max(...bases, snapFontSizeDown(role * ARRANGEMENT_GROWTH)));
21963
22559
  const designs = [];
@@ -22034,8 +22630,7 @@ function composeLayout(input, options = {}) {
22034
22630
  member.alignment = rtl ? "right" : "left";
22035
22631
  }
22036
22632
  return {
22037
- kind: kind2,
22038
- ...kind2 === "pyramid" && pyramidDirection === "down" ? { pyramidDirection } : {},
22633
+ kind: arrangement,
22039
22634
  design: design.design,
22040
22635
  region: members[0].region ?? "",
22041
22636
  path: members[0].path,
@@ -22071,29 +22666,47 @@ function composeLayout(input, options = {}) {
22071
22666
  item.text = placed2;
22072
22667
  item.box = box;
22073
22668
  };
22669
+ let stepProcessMissed = false;
22074
22670
  const arrangedLists = () => {
22075
22671
  const result = [];
22076
22672
  for (const region of template.regions) {
22077
- if (!region.arrangement) continue;
22673
+ const short = regionDiagram(region) ? void 0 : stepProcesses.get(region.name);
22674
+ if (short) {
22675
+ const item2 = items.find((entry) => entry.path === short && entry.region === region.name), area4 = stepProcessCells.get(region.name);
22676
+ if (!item2 || !area4 || item2.listColumns || item2.caption || item2.frameBox || !item2.text || !("listEntries" in item2.text) || item2.text.overflow) continue;
22677
+ const arranged2 = arrangedList(item2, "process", area4, true);
22678
+ if (!arranged2) {
22679
+ stepProcessMissed = true;
22680
+ continue;
22681
+ }
22682
+ result.push(arranged2);
22683
+ const composed2 = templateRegions.find((entry) => entry.name === region.name);
22684
+ if (composed2) composed2.box = roundBox5(area4);
22685
+ continue;
22686
+ }
22687
+ const arrangement = regionDiagram(region);
22688
+ if (!arrangement) continue;
22689
+ const kind2 = arrangement === "inverted-pyramid" ? "pyramid" : arrangement;
22078
22690
  const members = items.filter((item2) => item2.region === region.name && !headings.has(item2.field)), item = members.length === 1 ? members[0] : void 0;
22079
22691
  const lists = members.filter((member) => (member.field === "items" || member.field === "bullets") && !member.listColumns && !member.caption && member.text && "listEntries" in member.text && !member.text.overflow);
22080
- if (members.length > 1 && !["org-chart", "hierarchy", "venn"].includes(region.arrangement) && lists.length === members.length && members.length <= (region.arrangement === "matrix" ? ARRANGEMENT_CARDS_MAX : ARRANGEMENT_MAX[region.arrangement])) {
22081
- const arranged2 = arrangedBlocks(members, region.arrangement, templateRegions.find((entry) => entry.name === region.name)?.box ?? members[0].box, region.pyramidDirection);
22692
+ if (members.length > 1 && !["org-chart", "hierarchy", "venn"].includes(kind2) && lists.length === members.length && members.length <= (kind2 === "matrix" ? ARRANGEMENT_CARDS_MAX : ARRANGEMENT_MAX[kind2])) {
22693
+ const arranged2 = arrangedBlocks(members, arrangement, templateRegions.find((entry) => entry.name === region.name)?.box ?? members[0].box);
22082
22694
  if (arranged2) result.push(arranged2);
22083
22695
  continue;
22084
22696
  }
22085
22697
  if (!item || item.field !== "items" && item.field !== "bullets" || item.listColumns || item.caption || item.frameBox || !item.text || !("listEntries" in item.text)) continue;
22086
22698
  const values = Array.isArray(item.value) ? item.value : [];
22087
22699
  if (!values.length) continue;
22088
- const tree = region.arrangement === "org-chart" || region.arrangement === "hierarchy";
22700
+ const tree = kind2 === "org-chart" || kind2 === "hierarchy";
22089
22701
  const topology = tree ? arrangementTree(values) : void 0;
22090
- const reason = topology && !topology.ok ? topology.reason : item.payload.numbering !== void 0 ? "a numbered list" : !tree && values.some((value) => (record19(value).level ?? 0) !== 0) ? "nested entries" : values.some((value) => record19(value).description !== void 0) ? "descriptions" : values.some((value) => record19(value).icon !== void 0) ? "icons" : region.arrangement !== "matrix" && values.length > ARRANGEMENT_MAX[region.arrangement] ? `more than ${ARRANGEMENT_MAX[region.arrangement]} ${SMART_ART_NAMES[region.arrangement].nodes}` : values.length > ARRANGEMENT_CARDS_MAX ? `more than ${ARRANGEMENT_CARDS_MAX} entries` : void 0;
22702
+ const overlaps = values.filter((value) => record19(value).overlap === true).length, sets = values.length - overlaps;
22703
+ const reason = topology && !topology.ok ? topology.reason : item.payload.numbering !== void 0 ? "a numbered list" : !tree && values.some((value) => (record19(value).level ?? 0) !== 0) ? "nested entries" : region.arrangement !== "org-chart" && values.some((value) => record19(value).assistant === true) ? "an assistant (org chart only)" : region.arrangement !== "venn" && overlaps ? "an overlap label (Venn only)" : overlaps > 1 ? "more than one overlap label" : overlaps && record19(values.at(-1)).overlap !== true ? "an overlap label that is not last" : overlaps && sets < 2 ? "an overlap label with fewer than two sets" : values.some((value) => record19(value).description !== void 0) ? "descriptions" : values.some((value) => record19(value).icon !== void 0) ? "icons" : kind2 !== "matrix" && sets > ARRANGEMENT_MAX[kind2] ? `more than ${ARRANGEMENT_MAX[kind2]} ${SMART_ART_NAMES[kind2].nodes}` : values.length > ARRANGEMENT_CARDS_MAX ? `more than ${ARRANGEMENT_CARDS_MAX} entries` : void 0;
22091
22704
  if (reason) {
22092
- diagnostics.push({ code: "arrangement-adapted", path: item.path, message: `${region.arrangement === "chevrons" ? "A row of chevrons" : `A ${region.arrangement.replace("-", " ")}`} draws a list of one level of short entries; this list has ${reason}, so it is drawn as a list.` });
22705
+ diagnostics.push({ code: "arrangement-adapted", path: item.path, message: `${kind2 === "chevrons" ? "A row of chevrons" : `A ${kind2.replace("-", " ")}`} draws a list of one level of short entries; this list has ${reason}, so it is drawn as a list.` });
22093
22706
  continue;
22094
22707
  }
22095
22708
  const area3 = templateRegions.find((entry) => entry.name === region.name)?.box ?? item.box;
22096
- const arranged = arrangedList(item, region.arrangement, area3, region.pyramidDirection);
22709
+ const arranged = arrangedList(item, arrangement, area3);
22097
22710
  if (arranged) result.push(arranged);
22098
22711
  }
22099
22712
  return result;
@@ -22145,12 +22758,13 @@ function composeLayout(input, options = {}) {
22145
22758
  if (useTemplate) pairRules();
22146
22759
  const steps = useTemplate ? stepSequences() : [];
22147
22760
  const arrangements = useTemplate ? arrangedLists() : [];
22761
+ if (stepProcessMissed) return composeLayout(input, { ...options, [NO_STEP_PROCESS]: true });
22148
22762
  const checkTiles = () => {
22149
22763
  const own3 = record19(slide.design);
22150
22764
  if (!ruleOn("check-tiles") || options.darkBackground !== true || own3.variant === void 0 && own3.background === void 0 || listBullet !== void 0 || options[LAYOUT_MASTER] === true || surface) return void 0;
22151
22765
  const body = items.filter((item2) => !headings.has(item2.field));
22152
22766
  const item = body.length === 1 ? body[0] : void 0;
22153
- if (!item || item.field !== "bullets" && item.field !== "items" || item.payload.numbering !== void 0 || item.listColumns || item.caption || item.frameBox || stepFlows.has(item.path) || badgeLists.has(item.path) || !item.text || !("listEntries" in item.text) || item.field === "items" && iconList(item.value, void 0)) return void 0;
22767
+ if (!item || item.field !== "bullets" && item.field !== "items" || item.payload.numbering !== void 0 || item.listColumns || item.caption || item.frameBox || isStepProcess(item.path) || badgeLists.has(item.path) || !item.text || !("listEntries" in item.text) || item.field === "items" && iconList(item.value, void 0)) return void 0;
22154
22768
  const values = Array.isArray(item.value) ? item.value : [];
22155
22769
  const texts = values.map((value) => {
22156
22770
  const object2 = record19(value);
@@ -22210,7 +22824,7 @@ function composeLayout(input, options = {}) {
22210
22824
  const figureRows = () => {
22211
22825
  const body = items.filter((item) => !headings.has(item.field) && !item.eyebrow && !(item.emphasis && surface && surface.shape !== "card"));
22212
22826
  for (const item of items) {
22213
- if (!figureRowOf(item.field, item.value, item.payload, item.caption) || item.listColumns || stepFlows.has(item.path) || badgeLists.has(item.path) || stepPaths.has(item.path) || pillarWords.has(item.path) || numeralLists.has(item.path) || termLists.has(item.path) || pairRowLabels.has(item.path) || pairGrid.has(item.path) || !item.text || !("listEntries" in item.text)) continue;
22827
+ if (!figureRowOf(item.field, item.value, item.payload, item.caption) || item.listColumns || isStepProcess(item.path) || badgeLists.has(item.path) || stepPaths.has(item.path) || pillarWords.has(item.path) || numeralLists.has(item.path) || termLists.has(item.path) || pairRowLabels.has(item.path) || pairGrid.has(item.path) || !item.text || !("listEntries" in item.text)) continue;
22214
22828
  const values = item.value, size = item.text.fontSize, count = values.length, box = item.box;
22215
22829
  const width2 = (box.width - gap * (count - 1)) / count;
22216
22830
  if (width2 < 4 * size) continue;
@@ -22278,6 +22892,7 @@ function composeLayout(input, options = {}) {
22278
22892
  return joined !== source.replace(/\s+/gu, " ").trim();
22279
22893
  };
22280
22894
  const cardLists = /* @__PURE__ */ new Set();
22895
+ const cardsArrangement = (item) => useTemplate ? item.region === void 0 ? void 0 : regionDirections.get(item.region) : regions.length ? void 0 : modeFor(rootSettings);
22281
22896
  const sharedLabelTracks = (laid, columns2, again) => {
22282
22897
  if (!ruleOn("heading-tracks")) return laid;
22283
22898
  let moved = false;
@@ -22296,7 +22911,8 @@ function composeLayout(input, options = {}) {
22296
22911
  if (!ruleOn("icon-cards") || options[LAYOUT_MASTER] === true || surface) return void 0;
22297
22912
  const body = items.filter((item2) => !headings.has(item2.field) && !item2.eyebrow);
22298
22913
  const item = body.length === 1 ? body[0] : void 0;
22299
- if (!item || item.field !== "items" || item.listColumns || item.caption || item.frameBox || item.emphasis || stepFlows.has(item.path) || !item.text || !("listEntries" in item.text)) return void 0;
22914
+ if (!item || item.field !== "items" || item.listColumns || item.caption || item.frameBox || item.emphasis || !item.text || !("listEntries" in item.text)) return void 0;
22915
+ if (cardsArrangement(item) === "column") return void 0;
22300
22916
  const values = Array.isArray(item.value) ? item.value : [];
22301
22917
  if (values.length < ICON_CARD_MIN || values.length > ICON_CARD_MAX) return void 0;
22302
22918
  const entries = values.map((value) => {
@@ -22344,7 +22960,7 @@ function composeLayout(input, options = {}) {
22344
22960
  const place2 = (start2) => {
22345
22961
  const placed2 = at3(start2 + lift), cy = top ? start2 + chip / 2 : start2 + lift + center2, cx = rtl ? inner.x + inner.width - chip / 2 : inner.x + chip / 2;
22346
22962
  const marker = { text: "", x: rtl ? x + width2 : x, y: placed2.textBox.y + (placed2.text.richLines[0]?.baseline ?? size), fontSize: size, style: resolveTextStyle(labelStyle, options.textMeasurement), indent: 0, none: true, ...rtl ? { anchor: "end" } : {} };
22347
- const direction2 = rtl ? paragraphDirection(label6, "rtl") : void 0;
22963
+ const direction = rtl ? paragraphDirection(label6, "rtl") : void 0;
22348
22964
  const entry = {
22349
22965
  index,
22350
22966
  level: 0,
@@ -22357,7 +22973,7 @@ function composeLayout(input, options = {}) {
22357
22973
  ...placed2.description && placed2.descriptionBox ? { description: placed2.description, descriptionBox: placed2.descriptionBox } : {},
22358
22974
  marker,
22359
22975
  icon: { cx, cy, diameter: chip },
22360
- ...direction2 ? { direction: direction2 } : {}
22976
+ ...direction ? { direction } : {}
22361
22977
  };
22362
22978
  const directions = [...placed2.text.directions ?? [], ...placed2.description?.directions ?? []];
22363
22979
  const text2 = { listEntries: [entry], lines: [...placed2.text.lines, ...placed2.description?.lines ?? []], fontSize: size, lineHeight: size * 1.22, height: placed2.bottom - placed2.textBox.y, overflow: false, ...rtl ? { directions } : {} };
@@ -22677,11 +23293,27 @@ function composeLayout(input, options = {}) {
22677
23293
  const left = Math.min(...outer.map((box) => box.x)), right = Math.max(...outer.map((box) => box.x + box.width)), top = Math.min(...outer.map((box) => box.y));
22678
23294
  addIcon(pending2.path, pending2.owner, pending2.icon, rtl ? right - r : left + r, top - lift - r, pending2.diameter, placed2.some((item) => item.emphasis === true));
22679
23295
  }
23296
+ const roomFor = (at3) => {
23297
+ const owner = items.filter((item) => at3.startsWith(`${item.path}.`)).sort((a, b) => b.path.length - a.path.length)[0];
23298
+ const steps2 = (owner?.path ?? at3).slice(path.length + 1).split(".");
23299
+ let node = slide, weighted = false;
23300
+ for (let index = 0; index < steps2.length; index++) {
23301
+ if (steps2[index] !== "blocks") {
23302
+ node = record19(node[steps2[index]]);
23303
+ continue;
23304
+ }
23305
+ if (Array.isArray(record19(node.composition).weights) && record19(node.composition).weights.length) weighted = true;
23306
+ node = record19(Array.isArray(node.blocks) ? node.blocks[Number(steps2[++index])] : void 0);
23307
+ }
23308
+ if (weighted) return "its block, at the share `composition.weights` gives it,";
23309
+ if (owner?.region !== void 0) return `its block, in the region \`${owner.region}\`,`;
23310
+ return regionParts(steps2[0] ?? "") ? `its block, in the cell \`${steps2[0]}\` of the slide's grid,` : "the slide";
23311
+ };
22680
23312
  const iconDiagnostics = [], drawnIcons = new Set(icons.map((icon) => icon.path));
22681
23313
  for (const found of documentIcons(slide)) {
22682
23314
  const at3 = path + found.path.slice("slide".length), value = found.value;
22683
23315
  if (drawnIcons.has(at3) || !resolveIcon(options.presentation ?? {}, value).ok) continue;
22684
- iconDiagnostics.push({ code: "icon-dropped", path: at3, message: ruleOn("icons") ? "The icon is not drawn: icons draw on the first-level entries of an unnumbered list, on metrics and on groups, and this one marks none of them here." : "The icon is not drawn: the slide has no room for its chip without setting text smaller. The text keeps its size." });
23316
+ iconDiagnostics.push({ code: "icon-dropped", path: at3, message: ruleOn("icons") ? "The icon is not drawn: icons draw on the first-level entries of an unnumbered list, on metrics and on groups, and this one marks none of them here." : `The icon is not drawn: ${roomFor(at3)} has no room for its chip without setting text smaller. The text keeps its size.` });
22685
23317
  }
22686
23318
  const numberingDiagnostics = [];
22687
23319
  for (const item of items) {
@@ -22707,31 +23339,21 @@ function composeLayout(input, options = {}) {
22707
23339
  }
22708
23340
  for (const group of groups2) for (const box of [group.box, group.contentBox]) for (const key of ["x", "y", "width", "height"]) box[key] = round9(box[key]);
22709
23341
  const readingTemplate = recordTemplate ?? (recomposing && isLayoutTemplate(layout) ? layoutTemplate(layout) : void 0);
22710
- const readingRegion = (region) => ["org-chart", "hierarchy", "venn"].includes(region.arrangement ?? "") || region.arrangement === "pyramid" && region.pyramidDirection === "down";
23342
+ const readingRegion = (region) => ["org-chart", "hierarchy", "venn", "inverted-pyramid"].includes(region.arrangement ?? "");
22711
23343
  const cappedListFallback = (item) => fallbackListAreas.has(item.path) && ruleOn("layout-first") && item.payload.columns === void 0 && Array.isArray(item.value) && item.value.length > LIST_WHOLE_ENTRIES && !ownRunSizes(item.value) && capOf(item.composition) < contentNominalSize(item.field) * scale2 - FONT_GRID_EPSILON;
22712
23344
  if (readingTemplate && (readingTemplate.regions.some(readingRegion) || items.some(cappedListFallback))) {
22713
- const regionColumns = /* @__PURE__ */ new Map();
22714
- const collectColumns = (entries) => {
22715
- if (!Array.isArray(entries)) return;
22716
- for (const value of entries) {
22717
- const entry = record19(value);
22718
- if (typeof entry.name === "string" && (entry.listColumns === "auto" || entry.listColumns === 1)) regionColumns.set(entry.name, entry.listColumns);
22719
- else if (entry.name === void 0) collectColumns(entry.regions);
22720
- }
22721
- };
22722
- collectColumns(layout.regions);
22723
23345
  const readable = (fit) => fit.listEntries.every((entry) => [entry.text, entry.description].every((text2) => !text2 || !blockCutsWord({ ...entry, text: text2 }) && text2.richLines.every((line2) => line2.fragments.map((fragment) => fragment.text).join("").trim().length <= PROSE_MEASURE_CHARS)));
22724
23346
  for (const item of items) {
22725
- if (!["items", "bullets"].includes(item.field) || !item.text || !("listEntries" in item.text) || item.text.overflow || item.caption || stepPaths.has(item.path) || stepFlows.has(item.path)) continue;
23347
+ if (!["items", "bullets"].includes(item.field) || !item.text || !("listEntries" in item.text) || item.text.overflow || item.caption || stepPaths.has(item.path)) continue;
22726
23348
  const listRegions = readingTemplate.regions.filter((region2) => region2.accepts.includes("list"));
22727
23349
  const region = readingTemplate.regions.find((region2) => region2.name === (item.region ?? item.payload.region)) ?? (listRegions.length === 1 ? listRegions[0] : void 0);
22728
23350
  const requiredMeasure = region ? readingRegion(region) : !readingTemplate.regions.some((region2) => region2.accepts.includes("list") && !readingRegion(region2));
22729
- if (!requiredMeasure && !(cappedListFallback(item) && (!region || regionColumns.get(region.name) !== 1))) continue;
23351
+ if (!requiredMeasure && !cappedListFallback(item)) continue;
22730
23352
  if (arrangements.some((arrangement) => arrangement.path === item.path || arrangement.nodes.some((node) => node.path === item.path || node.path?.startsWith(item.path + ".")))) continue;
22731
23353
  const current = item.text;
22732
23354
  if (readable(current)) continue;
22733
23355
  const values = item.value, area3 = fallbackListAreas.get(item.path) ?? item.box, ownColumns = item.payload.columns;
22734
- const mode = ownColumns === "auto" || ownColumns === 1 || ownColumns === 2 || ownColumns === 3 ? ownColumns : region ? regionColumns.get(region.name) : void 0;
23356
+ const mode = ownColumns === "auto" || ownColumns === 1 || ownColumns === 2 || ownColumns === 3 ? ownColumns : void 0;
22735
23357
  const counts = typeof mode === "number" ? [mode] : [1, 2, 3].filter((count) => count <= values.length);
22736
23358
  const listOptions = { ...listOptionsFor(item.field, item.path, item.payload.numbering, values), ...values.length > 1 ? { heading: false } : {} }, numbering = listOptions.numbering;
22737
23359
  const cap = options.fill === false || ownRunSizes(values) ? current.fontSize : Math.max(current.fontSize, Math.min(ARRANGEMENT_GROWTH * contentNominalSize(item.field) * scale2, capOf(item.composition)));
@@ -22894,7 +23516,7 @@ function composeLayout(input, options = {}) {
22894
23516
  if (placedTiled) PLACED_TILES.add(composed);
22895
23517
  if (iconAgendas.size) ICON_AGENDAS.set(composed, iconAgendas);
22896
23518
  if (headingMessage) HEADING_MESSAGES.add(composed);
22897
- if (template !== recordTemplate) STATEMENT_BODIES.add(composed);
23519
+ if (statementPlan !== recordTemplate) STATEMENT_BODIES.add(composed);
22898
23520
  if (statement === "title") STATEMENT_TITLES.add(composed);
22899
23521
  if (headingOffScale) HEADINGS_OFF_SCALE.add(composed);
22900
23522
  return composed;
@@ -22920,4 +23542,4 @@ function resolveCanvasDimensions(input) {
22920
23542
  return { width, height };
22921
23543
  }
22922
23544
 
22923
- export { ARRANGEMENTS, ARRANGEMENT_CARDS_MAX, ARRANGEMENT_GROWTH, ARRANGEMENT_LINE_POINTS, ARRANGEMENT_MAX, ARRANGEMENT_TEXT_MARGIN, ARROW_ADJUST, ASCII_QUOTE_MARKS, AUTO_FIT_MIN_KEPT, AUTO_LAYOUT, BODY_LINE_PITCH, BUILT_IN_MASKS, CALM_PICTURE_SPREAD, CAPTIONABLE_FIELDS, CAPTION_FONT_RATIO, CAPTION_MAX_RATIO, CARD_BORDER_MIX, CARD_FILL_SPACE, CARD_INSET, CARD_RADIUS, CARD_SURFACE_MIN_CONTRAST, CARD_SURFACE_MIX, CARD_TEXT_MARGIN, CARD_TEXT_MIN_CONTRAST, CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CELL_CARD_INSET, CHART_AXIS_MAX_OVERSHOOT, CHART_BAR_GAP_WIDTH, CHART_CONTEXT_FOCUS_DIFFERENCE, CHART_CONTEXT_LABELED_MIN_CONTRAST, CHART_CONTEXT_MIN_CONTRAST, CHART_DARK_SERIES_MIN_CONTRAST, CHART_EMPHASIS_MIN_CONTRAST, CHART_EMPHASIS_MIN_LIGHTNESS_STEP, CHART_HEADER_LEGEND_ROWS, CHART_HEADER_MAX_LEGEND, CHART_HIGHLIGHT_MUTED_MIN_CONTRAST, CHART_HIGHLIGHT_MUTED_MIX, CHART_LABELED_ZERO_SHARE, CHART_LEAD_LIGHTNESS_STEP, CHART_LONE_MAX_HEIGHT_RATIO, CHART_MAX_HEIGHT_RATIO, CHART_MAX_INTERVALS, CHART_MAX_PLOT_ASPECT, CHART_MIN_PLOT_PX, CHART_MIN_PLOT_SHARE, CHART_MIN_TICK_SPACING_PX, CHART_RADAR_MAX_HEIGHT_RATIO, CHART_REFERENCE_TYPES, CHART_SERIES_MIN_DIFFERENCE, CHART_SERIES_MIN_LIGHTNESS_STEP, CHART_SERIES_SOFT_MIX, CHART_SERIES_TIER_SIZE, CHART_SERIES_TINT_MIX, CHART_SLICE_LABEL_MIN_RADIUS, CHART_SLICE_MAX_SHIFT, CHART_SLICE_SEPARATOR_PX, CHART_TEXT_FLOOR_PX, CHART_TEXT_PX, CHART_TYPES, CHART_VALUE_LIST_MAX_ROWS, CHART_VALUE_LIST_SMALL_SLICE, CHECK_TILE_MAX, CHECK_TILE_MAX_CHARACTERS, CHECK_TILE_MAX_LINES, CHECK_TILE_MIN, CHEVRON_ADJUST, CITATION_MARKER_RAISE, CITATION_MARKER_SCALE, CODE_HIGHLIGHT_LANGUAGES, CODE_HIGHLIGHT_MAX_LENGTH, CODE_NOMINAL_SIZE, CODE_PANEL_BACKGROUND, CODE_PANEL_DARK_SHADE, CODE_PANEL_FOREGROUND, CODE_SYNTAX_MIN_CONTRAST, CONNECTOR_ROUTES, CONNECTOR_STANDOFF, CONNECTOR_STROKE_COLOR, CONNECTOR_STROKE_WIDTH, CYCLE_ARROW, CYCLE_ARROW_ADJUST, CYCLE_ARROW_LIGHTEN, CYCLE_DIAMETER, CYCLE_RADIUS, CYCLE_RING_MARGIN, CYCLE_RING_NODE, CYCLE_TWO, DARK_BACKGROUND_LUMINANCE, DEFAULT_CHART_LABEL_SEPARATOR, DEFAULT_FURNITURE_DATE_FORMAT, DEFAULT_SHAPE_STYLE, DEFAULT_VARIABLE_DATE_FORMAT, DESIGN_HINT_KEYS, DIAGRAM_BORDER_MIN_CONTRAST, DIAGRAM_LINE_MIN_CONTRAST, DIAGRAM_NOMINAL_SIZE, DIAGRAM_SECONDARY_FLOOR, DIAGRAM_SHAPE_FAMILIES, DIAGRAM_SURFACE_ALT_MIX, DIAGRAM_SURFACE_MIX, DIAGRAM_SYNTAXES, DISPLAY_LINE_PITCH, DISPLAY_SIZE_FACTOR, DISPLAY_TRACKING, DOT_LAYOUT_ENGINES, DOT_SHAPES, EMPHASIS_BAND_MAX_CHARACTERS, EMPHASIS_BAND_MAX_SHARE, EMPHASIS_NOTE_LINES, EMPHASIS_PILL_MAX_CHARACTERS, EMPHASIS_PILL_SIZE, EMPHASIS_SURFACE_MIN_CONTRAST, EMPHASIS_TAKEAWAY_MAX_CHARACTERS, EMPHASIS_TEXT_MIN_CONTRAST, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, EYEBROW_GAP, EYEBROW_LABEL_CHARS, EYEBROW_LABEL_WORDS, EYEBROW_MAX_SIZE, EYEBROW_MIN_SIZE, EYEBROW_SHARE, EYEBROW_TAG_SIZE, EYEBROW_TEXT_KIND, EYEBROW_TRACKING, FEATURED_LABEL_MAX_CHARACTERS, FEATURED_LABEL_MAX_WORDS, FEATURED_MARK_MAX_CHARACTERS, FEATURED_MAX_CELLS, FIGURE_CEILING, FIGURE_ROW_MAX, FIGURE_ROW_MIN, FIGURE_WORDS, FLOW_ROUND_ADJUST, FONT_SIZE_GRID_PER_PX, FOOTNOTE_MAX_RATIO, FURNITURE_GAP, FURNITURE_IMAGE_SHARE, FURNITURE_ZONE_GUTTER, GROUPED_LABEL_CODE, HALF_STEPPED, HEADING_AREAS, HEADING_DISPLAY_SIZES, HISTOGRAM_LABEL_SLOT, HISTOGRAM_MIN_BINS, ICON_CARD_DESCRIPTION, ICON_CARD_DESCRIPTION_CHARACTERS, ICON_CARD_FILL, ICON_CARD_LABEL_CHARACTERS, ICON_CARD_LABEL_WORDS, ICON_CARD_MAX, ICON_CARD_MIN, ICON_CHIP, ICON_CHIP_COMPACT, ICON_CHIP_GAP, ICON_CHIP_TINT, ICON_GLYPH, ICON_MIN_CONTRAST, ICON_VIEWBOX, JOINED_FIXED_MAX, LANGUAGES, LAYOUT_BODY_KINDS, LEAD_NOMINAL_SIZE, LINEAR_ARRANGEMENTS, LINEAR_TEXT_MARGINS, LIST_ACCENT_RULE_WIDTH, LIST_DISPLAY_GAP, LIST_DISPLAY_RULE, LIST_DISPLAY_SCALE, LIST_HEADING_SCALE, LIST_MARKERS, LIST_NOMINAL_SIZE, LIST_NUMERAL_GAP, LIST_NUMERAL_SCALE, LIST_QUESTION_LINES, LIST_ROWS_GAP, LIST_ROWS_LABEL_SHARE, LIST_ROWS_SPREAD, LIST_RULE_WIDTH, LIST_WHOLE_ENTRIES, LOGO_SHAPES, LONE_DISPLAY_SIZES, LONE_FILL, LONE_METRIC_TARGET, LONE_TARGET, MATRIX_BACKGROUND_LIGHTEN, MATRIX_ENTRIES, MATRIX_GAP, MATRIX_INSET, MATRIX_QUADRANT, MAX_COMPOSITION_DEPTH, MAX_NUMBERING_LEVELS, MAX_NUMBERING_VALUE, MAX_REGION_BLOCKS, MAX_REGION_DEPTH, MAX_REGION_ENTRIES, MAX_ROMAN_VALUE, MAX_TEMPLATE_TRACKS, MESSAGE_CEILINGS, MESSAGE_DISPLAY_LINES, MESSAGE_DISPLAY_SIZE, METRIC_BAND_MIN_COLUMN, METRIC_BAND_RATIO, METRIC_BAND_VALUE_SHARE, METRIC_DISPLAY_HEIGHT, METRIC_DISPLAY_SIZES, METRIC_DISPLAY_WIDTH, METRIC_ICON_TEXT, METRIC_PILL_PAD_X, METRIC_PILL_PAD_Y, METRIC_PILL_RISE, METRIC_ROLE_VALUE_SIZE, METRIC_TILE_VALUE_SHARE, METRIC_TREND_ARROW_GAP, METRIC_TREND_ARROW_SIZE, METRIC_TREND_MIN_CONTRAST, METRIC_TREND_SHAPES, METRIC_UNIT_GAP, METRIC_UNIT_SHARE, METRIC_VALUE_MIN_CONTRAST, MIN_MEASURE_CHARS, MM_PER_PX, MOVED_ROW_MAX, NEUTRAL_SHARES, NOTE_PEER_RATIO, NOTE_PEER_WORDS, NUMBERING_STYLES, NUMBERING_SUFFIXES, NUMBERING_SYSTEMS, NUMBER_GROUPING_MIN, NUMBER_LOCALES, NUMBER_LOCALE_SOURCE, NUMBER_SEPARATOR_OVERRIDES, NUMERAL_SHAPES, NUMERAL_TAKEAWAYS, OPFCatalogsOptionError, OPFCompositionError, OPFLayoutTemplateError, OPFUnresolvedReferenceError, OPFVariableError, OPF_ARROW_LENGTH, OPF_ARROW_ROOM, OPF_ARROW_THICKNESS, OPF_CHEVRON_DEPTH, OPF_COLUMN_ARROW_LENGTH, OPF_COLUMN_ARROW_THICKNESS, OPF_COLUMN_ROOM, OPF_LAYOUT_DESIGNS, OPF_LAYOUT_KIND, OPF_LAYOUT_MAX, OPF_LINES_MAX, OVERLAY_ANCHOR_SHARE, OVERLAY_BODY_SHARE, OVERLAY_EDGES, OVERLAY_LAYERS, PAIR_ARROW_HEIGHT, PAIR_ARROW_MARGIN, PAIR_ARROW_WIDTH, PAIR_FIGURE_KINDS, PAIR_GRID_ANSWER, PAIR_GRID_MIN, PAIR_GRID_QUESTION, PAIR_LENGTH_RATIO, PANEL_SCRIM_LIMIT, PATTERN_PRESETS, PATTERN_PRESET_ALIASES, PATTERN_TILE_SIZE, PICTURE_BULLET_SCALE, PICTURE_PANEL_SHARES, PICTURE_STROKE_WIDTH, PICTURE_TEXT_COLUMNS, PICTURE_TEXT_PLACEMENTS, PILLAR_MAX, PILLAR_WORD_MAX, PLACED_TILE_LINES, PLACED_TILE_SHARE, PLANTUML_DIAGRAMS, PORTRAIT_FOCUS_Y, PORTRAIT_GAP, PORTRAIT_MIN, PORTRAIT_MODES, PORTRAIT_SIDE_CHARS, PORTRAIT_SIDE_FILL, PORTRAIT_SIDE_MAX, PORTRAIT_SIDE_SHARE, PORTRAIT_SIDE_SHARES, PORTRAIT_TALLEST, PORTRAIT_TEXT_SIZE, PORTRAIT_TOP_MAX, PORTRAIT_WIDEST, PROMOTED_REGION_KEY, PROSE_NOMINAL_SIZE, PYRAMID_MAX_ASPECT, PYRAMID_STEPS_ASPECT, PYRAMID_STEPS_SHARE, PYRAMID_TEXT_WIDTH, PositionRangeError, QUOTE_MARK, QUOTE_MARKS, QUOTE_NOMINAL_SIZE, QUOTE_PORTRAIT_GAP, QUOTE_PORTRAIT_MIN_WIDTH, QUOTE_PORTRAIT_SHARE, QUOTE_PORTRAIT_STEP, QUOTE_PULL_LINES, QUOTE_PULL_MAX_CHARACTERS, QUOTE_PULL_PREFIX, QUOTE_PULL_ROLE_SEPARATOR, QUOTE_PULL_RULE, QUOTE_SOURCE_SEPARATOR, RADAR_BOTTOM_LEGEND_GAIN, REGION_ANCHORS, REGION_FLOWS, REGION_KINDS, REGION_ROLES, RESERVED_REGION_NAMES, ROUND_RECT_ADJUST, ROW_LABEL_CHARS, ROW_LABEL_WORDS, RUN_IN_HEADING_CHARS, SALIENT_LIMIT, SCRIM_FADE, SCRIM_MARGIN, SCRIM_TARGET_CONTRAST, SHAPE_BLOCK_KEYS, SHAPE_EFFECT_KEYS, SHAPE_PADDING, SHAPE_PRESETS, SHAPE_STROKE_WIDTH, SHAPE_STYLES, SHORT_MESSAGE_WORDS, SHORT_TEXT_WORDS, SLIDE_SCOPED_BUILTINS, SMALL_CHART_MAX_POINTS, SMALL_CHART_MAX_SERIES, SMART_ART_DOMAIN, SMART_ART_LAYOUTS, SMART_ART_NAMES, SMART_ART_OPF_DOMAIN, SMART_ART_SCALES, SOCIAL_PLATFORMS, STEP_BADGE, STEP_BADGE_GAP, STEP_FLOW_CHARACTERS, STEP_FLOW_MAX, STEP_FLOW_MIN, STUB_LINE_SHARE, SURFACE_ALT_MIN_CONTRAST, SURFACE_ALT_MIX, TABLE_HIGHLIGHT_MIX, TABLE_NOMINAL_SIZE, TABLE_NUMERIC_SHARE, TEAM_AVATAR, TERM_WORDS, TEXT_ONLY_LABELS, TEXT_TILE_CHARACTERS, TEXT_TILE_LINES, TEXT_TILE_MARKER, TEXT_TILE_MAX, TEXT_TILE_MIN, THEME_DESIGN_KEYS, TIER_MAX, TIER_VALUE_SIZES, TIMELINE_OUTLINE_MIN_CONTRAST, TIMELINE_STATUSES, TIMELINE_STATUS_WORDS, TIMELINE_TEXT_MIN_CONTRAST, TITLE_RULE_SIZE, VARIABLE_KINDS, alignBarRows, allocateRows, annotationText, applyColorTransform, applyHslTransforms, applyLuminance, arrangementPaint, arrangementTree, asciiDigits, autoImageFit, bindNoBreak, bindRegions, blockKind, capitalsLabel, captionSettings, cardGridColumns, cardNodes, catalogGroupDeclared, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartAxisFraction, chartAxisScale, chartBarGeometry, chartBarSeriesOffset, chartCategoriesInTime, chartColorForFill, chartComboAxes, chartContextColor, chartContextColors, chartDoughnut, chartDrawDiagnostics, chartDrawPlan, chartEmphasisColors, chartEndLabels, chartFocusContextColors, chartHeader, chartHeaderCaption, chartHighlightColors, chartHighlightMarks, chartHistogram, chartIntervalsFor, chartLabelText, chartLayer, chartLayerDataLabels, chartNumber, chartNumberFixesByCell, chartNumberLanguage, chartNumericAxes, chartOptionSupport, chartOptionTarget, chartPaletteForFill, chartPlotBox, chartPlotInset, chartRadarLayout, chartReferenceSources, chartReferences, chartRingLabels, chartSchemeSeries, chartSeriesLabelColor, chartSeriesPalette, chartSeriesStrokes, chartSliceLabels, chartSlicePlan, chartSlideFocus, chartSoftColors, chartStack, chartTextSize, chartTitleFocus, chartValueAxis, chartValueAxisHidden, chartValueList, chartWaterfall, chartWaterfallColors, checkCatalogsOption, checkDiagram, checkMarkPoints, chevronNodes, chooseConnectorSites, choosePictureText, citationMarkerText, clrMapAttributes, codeHighlightBands, codeHighlightColors, codeHighlightLines, codeHighlightSlice, codeLineNumbers, codeLineRuns, codeSyntaxPalette, codeSyntaxPaletteForRoles, codeSyntaxPaletteForScheme, coerceVariableValue, collectCitations, colorContrast, colorMapFor, colorTransform, composeLayoutAreas, composeShape, composeSlide, compositeLayoutDefinition, connectorAdjustPreset, connectorRoute, coverKept, cycleAspect, cycleFrame, cycleLoop, cycleNodes, cycleRing, datasetDiagnostics, deckBackgroundIsChosen, deckBackgroundIsFixed, defaultImageFocus, defaultSlideBackground, diagramPalette, diagramPayload, diagramsPending, displayDepth, displayFrom, displayTracks, documentIcons, dotToMermaid, dottedPath, embedIcons, embeddedCopy, emphasisSurface, endLabelText, ensureDiagrams, ensureIcons, ensureShapes, evaluateLayoutDefinition, eyebrowCaps, eyebrowLabel, eyebrowSize, featuredCells, figureList, figureText, fitImage, fitList, fitRichText, fitText, flowNodes, focusHits, formatChartLabelNumber, formatChartLabelPercent, formatDataNumber, formatFurnitureDate, formatListNumber, formatNumber, formatPercentNumber, formatVariableNumber, frameToSlide, fromExcelNumberFormat, grayOfLuminance, gridFlowShape, groupBinding, groupNumber, groupingNode, groupsAxisTicks, groupsDataRange, groupsThousands, hasBuiltinDependency, hasContentVariables, hasOverlayShapes, histogramBins, histogramEdgeDecimals, histogramEdgeFormat, histogramEdgeText, horizontalBarPlot, iconColors, iconFromSvg, iconIssue, iconPathCommands, iconPathData, iconsPending, imageBackground, imageShape, inlineChartData, inlineDatasets, inlineTableData, instantiateForValidation, intrinsicImageAspect, intrinsicImageSize, isColorVariant, isDarkColor, isDatasetRef, isFixedBackground, isLabelText, isLayoutTemplate, isLinearArrangement, isOverlayConnector, isPlaceLabel, isPresetShape, isRecord, isShapeBlock, isSupportedNumberingSystem, isTemplate, isTimeFieldTitle, isWrappedInQuoteMarks, isXYChartType, isolateNumbers, itemAlignment, itemizeScripts, languageInEffect, layoutArrangement, layoutCaption, layoutCode, layoutColorVariant, layoutContent, layoutDiagram, layoutEntries, layoutFootnotes, layoutFurniture, layoutMetric, layoutQuote, layoutRegion, layoutStructure, layoutTable, layoutTemplate, layoutTemplateIssues, layoutTimeline, layoutVariantApplies, layoutVariantKind, layoutWatermark, lineMayStartAt, linePitch, linearDesign, linearMargins, linearNodes, listBuiltinVariables, listColumnBreaks, listGridShape, listNumberLabel, listNumbers, listVariables, localizeDigits, localizeNumberParts, localizeNumberText, localizePatternNumber, lonePayload, luminanceGrid, majorityKind, markLabelColor, markQuote, matrixNodes, matrixQuadrants, matrixSquare, maxIntervalsFor, measureMonospaceText, measureText, measureTextOutline, messageCeiling, messageCharacters, messageWords, metricPillFill, metricTrendColor, metricTrendMark, metricTrendPoints, metricValueColor, monthOf, nativeTreeGeometry, nearIconNames, niceScale, nodeWidthAt, normalizeColorVariant, normalizeHexColor, normalizeLanguageFamily, numberFormatError, numberLocale, numberRanges, numberingAtLevel, numberingFindings, numberingStyleDraws, numberingSystemExtension, numberingSystemOf, numeralScripts, numeralShapePrefix, numericText, oneMessageField, opfLayoutGeometry, opfSmartArtUnavailable, overlayIssues, overlaysDrawBody, paintDiagram, paintDiagramGroup, pairEntry, paragraphDirection, paragraphDirectionAt, paretoPlan, parseIconReference, parseReference, pathFor, patternBitmap, patternRuns, physicalAlignment, pictureOverlay, pictureScrims, placeEndLabels, placeIconCommands, placeReferences, placeStackNames, placeTextLines, placedImageBlocks, plainLanguageTag, plantumlToMermaid, pointerPath, presetAspect, presetMask, presetTextRect, promotedRegionKeys, provenanceOf, pyramidFrame, pyramidNodes, pyramidSteps, questionText, quoteLanguage, quoteMarksFor, readableSchemeColor, readingRows, recordReferenceSites, rectSites, referencesSlide, refreshChartMarks, refreshEndLabels, regionAccepts, regionRoleRank, registeredCatalog, repeatedPairs, representablePositionBox, resolveCanvasDimensions, resolveChartColors, resolveChartData, resolveChartOptions, resolveCodeLanguage, resolveColorRef, resolveColorRoles, resolveDesignHints, resolveDesignRecords, resolveFontFamilies, resolveFontScheme, resolveIcon, resolveLogo, resolveNumbering, resolvePatternPreset, resolveReference, resolveScriptFonts, resolveSlideDirection, resolveSlideVariables, resolveSocialProfile, resolveTableData, resolveTextStyle, resolveVariables, restackForRows, rightArrowPoints, rootNodes, rowLabel, runInHeading, sampledGrays, sampledWeight, scorePictureText, scottBinCount, scrimGeometry, scrimOpacity, scriptFontRole, scriptOfCharacter, shapeIssues, shapeSites, shapeStyleLook, shapeTextColor, shapesPending, shareHeights, shareSiblingChartAxes, shareSiblingPlots, sliceNumberedItems, slideBlockIds, slideCitations, slideFocusSources, slideTokenSpans, smallChart, smartArtScript, smartArtUnavailable, snapFontSizeDown, snapFontSizeUp, softenChartPalette, stackCategoryValues, stackedText, statementMessage, stubLine, styledText, suggestChartNumberFix, supportedNumberingSystems, surfaceAltColor, tableCellDisplayValue, tableGrid, tableHighlightColor, tableHighlightRows, tableKeyText, tableRowBoundaries, tableSlideFocus, textColorForFill, textInkBox, textLength, textWidthMeasurer, timelineMarkerShapes, timelineStatusWordsFor, timelineTextColor, toExcelNumberFormat, tokenizeCode, trackingWidth, translatePathData, turnedShapeBox, unbindNoBreak, unresolvedReference, unusedDatasets, unwrapQuoteMarks, usesSlideBuiltin, variableDeclarations, vennNodes, verticalFlowNodes, visitContentPayloads, visualReadingOrder, walkCitationRuns, waterfallLabelText, waterfallRoles, waterfallSignedFormat, waterfallSteps, wrapText };
23545
+ export { ARRANGEMENTS, ARRANGEMENT_CARDS_MAX, ARRANGEMENT_GROWTH, ARRANGEMENT_LINE_POINTS, ARRANGEMENT_MAX, ARRANGEMENT_TEXT_MARGIN, ARROW_ADJUST, ASCII_QUOTE_MARKS, AUTO_FIT_MIN_KEPT, BODY_LINE_PITCH, BUILT_IN_MASKS, CALM_PICTURE_SPREAD, CAPTIONABLE_FIELDS, CAPTION_FONT_RATIO, CAPTION_MAX_RATIO, CARD_BORDER_MIX, CARD_FILL_SPACE, CARD_INSET, CARD_RADIUS, CARD_SURFACE_MIN_CONTRAST, CARD_SURFACE_MIX, CARD_TEXT_MARGIN, CARD_TEXT_MIN_CONTRAST, CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CELL_CARD_INSET, CHART_AXIS_MAX_OVERSHOOT, CHART_BAR_GAP_WIDTH, CHART_CONTEXT_FOCUS_DIFFERENCE, CHART_CONTEXT_LABELED_MIN_CONTRAST, CHART_CONTEXT_MIN_CONTRAST, CHART_DARK_SERIES_MIN_CONTRAST, CHART_EMPHASIS_MIN_CONTRAST, CHART_EMPHASIS_MIN_LIGHTNESS_STEP, CHART_HEADER_LEGEND_ROWS, CHART_HEADER_MAX_LEGEND, CHART_HIGHLIGHT_MUTED_MIN_CONTRAST, CHART_HIGHLIGHT_MUTED_MIX, CHART_LABELED_ZERO_SHARE, CHART_LEAD_LIGHTNESS_STEP, CHART_LONE_MAX_HEIGHT_RATIO, CHART_MAX_HEIGHT_RATIO, CHART_MAX_INTERVALS, CHART_MAX_PLOT_ASPECT, CHART_MIN_PLOT_PX, CHART_MIN_PLOT_SHARE, CHART_MIN_TICK_SPACING_PX, CHART_RADAR_MAX_HEIGHT_RATIO, CHART_REFERENCE_TYPES, CHART_SERIES_MIN_DIFFERENCE, CHART_SERIES_MIN_LIGHTNESS_STEP, CHART_SERIES_SOFT_MIX, CHART_SERIES_TIER_SIZE, CHART_SERIES_TINT_MIX, CHART_SLICE_LABEL_MIN_RADIUS, CHART_SLICE_MAX_SHIFT, CHART_SLICE_SEPARATOR_PX, CHART_TEXT_FLOOR_PX, CHART_TEXT_PX, CHART_TYPES, CHART_VALUE_LIST_MAX_ROWS, CHART_VALUE_LIST_SMALL_SLICE, CHECK_TILE_MAX, CHECK_TILE_MAX_CHARACTERS, CHECK_TILE_MAX_LINES, CHECK_TILE_MIN, CHEVRON_ADJUST, CITATION_MARKER_RAISE, CITATION_MARKER_SCALE, CODE_HIGHLIGHT_LANGUAGES, CODE_HIGHLIGHT_MAX_LENGTH, CODE_NOMINAL_SIZE, CODE_PANEL_BACKGROUND, CODE_PANEL_DARK_SHADE, CODE_PANEL_FOREGROUND, CODE_SYNTAX_MIN_CONTRAST, CONNECTOR_ROUTES, CONNECTOR_STANDOFF, CONNECTOR_STROKE_COLOR, CONNECTOR_STROKE_WIDTH, CYCLE_ARROW, CYCLE_ARROW_ADJUST, CYCLE_ARROW_LIGHTEN, CYCLE_DIAMETER, CYCLE_RADIUS, CYCLE_RING_MARGIN, CYCLE_RING_NODE, CYCLE_TWO, DARK_BACKGROUND_LUMINANCE, DEFAULT_CHART_LABEL_SEPARATOR, DEFAULT_FURNITURE_DATE_FORMAT, DEFAULT_SHAPE_STYLE, DEFAULT_VARIABLE_DATE_FORMAT, DESIGN_HINT_KEYS, DIAGRAM_BORDER_MIN_CONTRAST, DIAGRAM_LINE_MIN_CONTRAST, DIAGRAM_NOMINAL_SIZE, DIAGRAM_SECONDARY_FLOOR, DIAGRAM_SHAPE_FAMILIES, DIAGRAM_SURFACE_ALT_MIX, DIAGRAM_SURFACE_MIX, DIAGRAM_SYNTAXES, DISPLAY_LINE_PITCH, DISPLAY_SIZE_FACTOR, DISPLAY_TRACKING, DOT_LAYOUT_ENGINES, DOT_SHAPES, EMPHASIS_BAND_MAX_CHARACTERS, EMPHASIS_BAND_MAX_SHARE, EMPHASIS_NOTE_LINES, EMPHASIS_PILL_MAX_CHARACTERS, EMPHASIS_PILL_SIZE, EMPHASIS_SURFACE_MIN_CONTRAST, EMPHASIS_TAKEAWAY_MAX_CHARACTERS, EMPHASIS_TEXT_MIN_CONTRAST, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, EYEBROW_GAP, EYEBROW_LABEL_CHARS, EYEBROW_LABEL_WORDS, EYEBROW_MAX_SIZE, EYEBROW_MIN_SIZE, EYEBROW_SHARE, EYEBROW_TAG_SIZE, EYEBROW_TEXT_KIND, EYEBROW_TRACKING, FEATURED_LABEL_MAX_CHARACTERS, FEATURED_LABEL_MAX_WORDS, FEATURED_MARK_MAX_CHARACTERS, FEATURED_MAX_CELLS, FIGURE_CEILING, FIGURE_ROW_MAX, FIGURE_ROW_MIN, FIGURE_WORDS, FLOW_ROUND_ADJUST, FONT_SIZE_GRID_PER_PX, FOOTNOTE_MAX_RATIO, FURNITURE_GAP, FURNITURE_IMAGE_SHARE, FURNITURE_ZONE_GUTTER, GROUPED_LABEL_CODE, HALF_STEPPED, HEADING_AREAS, HEADING_DISPLAY_SIZES, HISTOGRAM_LABEL_SLOT, HISTOGRAM_MIN_BINS, ICON_CARD_DESCRIPTION, ICON_CARD_DESCRIPTION_CHARACTERS, ICON_CARD_FILL, ICON_CARD_LABEL_CHARACTERS, ICON_CARD_LABEL_WORDS, ICON_CARD_MAX, ICON_CARD_MIN, ICON_CHIP, ICON_CHIP_COMPACT, ICON_CHIP_GAP, ICON_CHIP_TINT, ICON_GLYPH, ICON_MIN_CONTRAST, ICON_VIEWBOX, JOINED_FIXED_MAX, LANGUAGES, LAYOUT_BODY_KINDS, LEAD_NOMINAL_SIZE, LINEAR_ARRANGEMENTS, LINEAR_TEXT_MARGINS, LIST_ACCENT_RULE_WIDTH, LIST_DISPLAY_GAP, LIST_DISPLAY_RULE, LIST_DISPLAY_SCALE, LIST_HEADING_SCALE, LIST_MARKERS, LIST_NOMINAL_SIZE, LIST_NUMERAL_GAP, LIST_NUMERAL_SCALE, LIST_QUESTION_LINES, LIST_ROWS_GAP, LIST_ROWS_LABEL_SHARE, LIST_ROWS_SPREAD, LIST_RULE_WIDTH, LIST_WHOLE_ENTRIES, LOGO_SHAPES, LONE_DISPLAY_SIZES, LONE_FILL, LONE_METRIC_TARGET, LONE_TARGET, MATRIX_BACKGROUND_LIGHTEN, MATRIX_ENTRIES, MATRIX_GAP, MATRIX_INSET, MATRIX_QUADRANT, MAX_COMPOSITION_DEPTH, MAX_NUMBERING_LEVELS, MAX_NUMBERING_VALUE, MAX_REGION_BLOCKS, MAX_REGION_DEPTH, MAX_REGION_ENTRIES, MAX_ROMAN_VALUE, MAX_TEMPLATE_TRACKS, MESSAGE_CEILINGS, MESSAGE_DISPLAY_LINES, MESSAGE_DISPLAY_SIZE, METRIC_BAND_MIN_COLUMN, METRIC_BAND_RATIO, METRIC_BAND_VALUE_SHARE, METRIC_DISPLAY_HEIGHT, METRIC_DISPLAY_SIZES, METRIC_DISPLAY_WIDTH, METRIC_ICON_TEXT, METRIC_PILL_PAD_X, METRIC_PILL_PAD_Y, METRIC_PILL_RISE, METRIC_ROLE_VALUE_SIZE, METRIC_TILE_VALUE_SHARE, METRIC_TREND_ARROW_GAP, METRIC_TREND_ARROW_SIZE, METRIC_TREND_MIN_CONTRAST, METRIC_TREND_SHAPES, METRIC_UNIT_GAP, METRIC_UNIT_SHARE, METRIC_VALUE_MIN_CONTRAST, MIN_MEASURE_CHARS, MM_PER_PX, MOVED_ROW_MAX, NEUTRAL_SHARES, NOTE_PEER_RATIO, NOTE_PEER_WORDS, NUMBERING_STYLES, NUMBERING_SUFFIXES, NUMBERING_SYSTEMS, NUMBER_GROUPING_MIN, NUMBER_LOCALES, NUMBER_LOCALE_SOURCE, NUMBER_SEPARATOR_OVERRIDES, NUMERAL_SHAPES, NUMERAL_TAKEAWAYS, OPFCatalogsOptionError, OPFCompositionError, OPFLayoutTemplateError, OPFUnresolvedReferenceError, OPFVariableError, OPF_ARROW_LENGTH, OPF_ARROW_ROOM, OPF_ARROW_THICKNESS, OPF_CHEVRON_DEPTH, OPF_COLUMN_ARROW_LENGTH, OPF_COLUMN_ARROW_THICKNESS, OPF_COLUMN_ROOM, OPF_LAYOUT_DESIGNS, OPF_LAYOUT_KIND, OPF_LAYOUT_MAX, OPF_LINES_MAX, OVERLAY_ANCHOR_SHARE, OVERLAY_BODY_SHARE, OVERLAY_EDGES, OVERLAY_LAYERS, PAIR_ARROW_HEIGHT, PAIR_ARROW_MARGIN, PAIR_ARROW_WIDTH, PAIR_FIGURE_KINDS, PAIR_GRID_ANSWER, PAIR_GRID_MIN, PAIR_GRID_QUESTION, PAIR_LENGTH_RATIO, PANEL_SCRIM_LIMIT, PATTERN_PRESETS, PATTERN_PRESET_ALIASES, PATTERN_TILE_SIZE, PICTURE_BULLET_SCALE, PICTURE_PANEL_SHARES, PICTURE_STROKE_WIDTH, PICTURE_TEXT_COLUMNS, PICTURE_TEXT_PLACEMENTS, PILLAR_MAX, PILLAR_WORD_MAX, PLACED_TILE_LINES, PLACED_TILE_SHARE, PLANTUML_DIAGRAMS, PORTRAIT_FOCUS_Y, PORTRAIT_GAP, PORTRAIT_MIN, PORTRAIT_MODES, PORTRAIT_SIDE_CHARS, PORTRAIT_SIDE_FILL, PORTRAIT_SIDE_MAX, PORTRAIT_SIDE_SHARE, PORTRAIT_SIDE_SHARES, PORTRAIT_TALLEST, PORTRAIT_TEXT_SIZE, PORTRAIT_TOP_MAX, PORTRAIT_WIDEST, PROSE_NOMINAL_SIZE, PYRAMID_MAX_ASPECT, PYRAMID_STEPS_ASPECT, PYRAMID_STEPS_SHARE, PYRAMID_TEXT_WIDTH, PositionRangeError, QUOTE_MARK, QUOTE_MARKS, QUOTE_NOMINAL_SIZE, QUOTE_PORTRAIT_GAP, QUOTE_PORTRAIT_MIN_WIDTH, QUOTE_PORTRAIT_SHARE, QUOTE_PORTRAIT_STEP, QUOTE_PULL_LINES, QUOTE_PULL_MAX_CHARACTERS, QUOTE_PULL_PREFIX, QUOTE_PULL_ROLE_SEPARATOR, QUOTE_PULL_RULE, QUOTE_SOURCE_SEPARATOR, RADAR_BOTTOM_LEGEND_GAIN, REGION_ANCHORS, REGION_ARRANGEMENTS, REGION_FLOWS, REGION_KINDS, REGION_ROLES, REMOVED_DESIGN_KEYS, RESERVED_REGION_NAMES, ROUND_RECT_ADJUST, ROW_LABEL_CHARS, ROW_LABEL_WORDS, RUN_IN_HEADING_CHARS, SALIENT_LIMIT, SCRIM_FADE, SCRIM_MARGIN, SCRIM_TARGET_CONTRAST, SEQUENCE_ARRANGEMENTS, SHAPE_BLOCK_KEYS, SHAPE_EFFECT_KEYS, SHAPE_PADDING, SHAPE_PRESETS, SHAPE_STROKE_WIDTH, SHAPE_STYLES, SHORT_MESSAGE_WORDS, SHORT_TEXT_WORDS, SLIDE_SCOPED_BUILTINS, SMALL_CHART_MAX_POINTS, SMALL_CHART_MAX_SERIES, SMART_ART_DOMAIN, SMART_ART_LAYOUTS, SMART_ART_NAMES, SMART_ART_OPF_DOMAIN, SMART_ART_SCALES, SOCIAL_PLATFORMS, STEP_BADGE, STEP_BADGE_GAP, STEP_PROCESS_CHARACTERS, STEP_PROCESS_MAX, STEP_PROCESS_MIN, STUB_LINE_SHARE, SURFACE_ALT_MIN_CONTRAST, SURFACE_ALT_MIX, TABLE_HIGHLIGHT_MIX, TABLE_NOMINAL_SIZE, TABLE_NUMERIC_SHARE, TEAM_AVATAR, TERM_WORDS, TEXT_ONLY_LABELS, TEXT_TILE_CHARACTERS, TEXT_TILE_LINES, TEXT_TILE_MARKER, TEXT_TILE_MAX, TEXT_TILE_MIN, THEME_DESIGN_KEYS, TIER_MAX, TIER_VALUE_SIZES, TIMELINE_OUTLINE_MIN_CONTRAST, TIMELINE_STATUSES, TIMELINE_STATUS_WORDS, TIMELINE_TEXT_MIN_CONTRAST, TITLE_BESIDE_SHARE, TITLE_POSITIONS, TITLE_RULE_SIZE, VARIABLE_KINDS, alignBarRows, allocateRows, annotationText, applyColorTransform, applyHslTransforms, applyLuminance, arrangementPaint, arrangementTree, asciiDigits, autoImageFit, bindNoBreak, bindRegions, blockKind, capitalsLabel, captionSettings, cardGridColumns, cardNodes, catalogGroupDeclared, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, cellBlocks, cellsInReadingOrder, chartAxisFraction, chartAxisScale, chartBarGeometry, chartBarSeriesOffset, chartCategoriesInTime, chartColorForFill, chartComboAxes, chartContextColor, chartContextColors, chartDoughnut, chartDrawDiagnostics, chartDrawPlan, chartEmphasisColors, chartEndLabels, chartFocusContextColors, chartHeader, chartHeaderCaption, chartHighlightColors, chartHighlightMarks, chartHistogram, chartIntervalsFor, chartLabelText, chartLayer, chartLayerDataLabels, chartNumber, chartNumberFixesByCell, chartNumberLanguage, chartNumericAxes, chartOptionSupport, chartOptionTarget, chartPaletteForFill, chartPlotBox, chartPlotInset, chartRadarLayout, chartReferenceSources, chartReferences, chartRingLabels, chartSchemeSeries, chartSeriesLabelColor, chartSeriesPalette, chartSeriesStrokes, chartSliceLabels, chartSlicePlan, chartSlideFocus, chartSoftColors, chartStack, chartTextSize, chartTitleFocus, chartValueAxis, chartValueAxisHidden, chartValueList, chartWaterfall, chartWaterfallColors, checkCatalogsOption, checkDiagram, checkMarkPoints, chevronNodes, chooseConnectorSites, choosePictureText, citationMarkerText, clrMapAttributes, codeHighlightBands, codeHighlightColors, codeHighlightLines, codeHighlightSlice, codeLineNumbers, codeLineRuns, codeSyntaxPalette, codeSyntaxPaletteForRoles, codeSyntaxPaletteForScheme, coerceVariableValue, collectCitations, colorContrast, colorMapFor, colorTransform, composeLayoutAreas, composeShape, composeSlide, compositeLayoutDefinition, connectorAdjustPreset, connectorRoute, coverKept, cycleAspect, cycleFrame, cycleLoop, cycleNodes, cycleRing, datasetDiagnostics, deckBackgroundIsChosen, deckBackgroundIsFixed, defaultImageFocus, defaultSlideBackground, diagramPalette, diagramPayload, diagramsPending, displayDepth, displayFrom, displayTracks, documentIcons, dotToMermaid, dottedPath, embedIcons, embeddedCopy, emphasisSurface, endLabelText, ensureDiagrams, ensureIcons, ensureShapes, evaluateLayoutDefinition, eyebrowCaps, eyebrowLabel, eyebrowSize, featuredCells, figureList, figureText, fitImage, fitList, fitRichText, fitText, flowNodes, focusHits, formatChartLabelNumber, formatChartLabelPercent, formatDataNumber, formatFurnitureDate, formatListNumber, formatNumber, formatPercentNumber, formatVariableNumber, frameToSlide, fromExcelNumberFormat, grayOfLuminance, gridCellSpan, gridCells, gridFlowShape, groupBinding, groupNumber, groupingNode, groupsAxisTicks, groupsDataRange, groupsThousands, hasBuiltinDependency, hasContentVariables, hasOverlayShapes, histogramBins, histogramEdgeDecimals, histogramEdgeFormat, histogramEdgeText, horizontalBarPlot, iconColors, iconFromSvg, iconIssue, iconPathCommands, iconPathData, iconsPending, imageBackground, imageShape, inlineChartData, inlineDatasets, inlineTableData, instantiateForValidation, intrinsicImageAspect, intrinsicImageSize, isArrangement, isColorVariant, isDarkColor, isDatasetRef, isFixedBackground, isGridCell, isLabelText, isLayoutTemplate, isLinearArrangement, isOverlayConnector, isPlaceLabel, isPresetShape, isRecord2 as isRecord, isRegionArrangement, isSequenceArrangement, isShapeBlock, isSupportedNumberingSystem, isTemplate, isTimeFieldTitle, isWrappedInQuoteMarks, isXYChartType, isolateNumbers, itemAlignment, itemizeScripts, languageInEffect, languageOfText, layoutArrangement, layoutCaption, layoutCode, layoutColorVariant, layoutContent, layoutDiagram, layoutEntries, layoutFootnotes, layoutFurniture, layoutMetric, layoutQuote, layoutRegion, layoutStructure, layoutTable, layoutTemplate, layoutTemplateIssues, layoutTimeline, layoutVariantApplies, layoutVariantKind, layoutWatermark, lineMayStartAt, linePitch, linearDesign, linearMargins, linearNodes, listBuiltinVariables, listColumnBreaks, listGridShape, listNumberLabel, listNumbers, listVariables, localizeDigits, localizeNumberParts, localizeNumberText, localizePatternNumber, lonePayload, luminanceGrid, majorityKind, markLabelColor, markQuote, matrixNodes, matrixQuadrants, matrixSquare, maxIntervalsFor, measureMonospaceText, measureText, measureTextOutline, messageCeiling, messageCharacters, messageWords, metricPillFill, metricTrendColor, metricTrendMark, metricTrendPoints, metricValueColor, monthOf, nativeTreeGeometry, nearIconNames, nearestGridCell, niceScale, nodeWidthAt, normalizeColorVariant, normalizeHexColor, normalizeLanguageFamily, numberFormatError, numberLocale, numberRanges, numberingAtLevel, numberingFindings, numberingStyleDraws, numberingSystemExtension, numberingSystemOf, numeralScripts, numeralShapePrefix, numericText, oneMessageField, opfLayoutGeometry, opfSmartArtUnavailable, overlayIssues, overlaysDrawBody, paintDiagram, paintDiagramGroup, pairEntry, paragraphDirection, paragraphDirectionAt, paretoPlan, parseIconReference, parseReference, pathFor, patternBitmap, patternRuns, physicalAlignment, pictureOverlay, pictureScrims, placeEndLabels, placeIconCommands, placeReferences, placeStackNames, placeTextLines, placedImageBlocks, plainLanguageTag, plantumlToMermaid, pointerPath, presetAspect, presetMask, presetTextRect, provenanceOf, pyramidFrame, pyramidNodes, pyramidSteps, questionText, quoteLanguage, quoteMarksFor, readableSchemeColor, readingRows, recordReferenceSites, rectSites, referencesSlide, refreshChartMarks, refreshEndLabels, regionAccepts, regionDiagram, regionListColumns, regionRoleRank, regionSequence, registeredCatalog, relatedName, removedLayoutAuto, renamedLayout, renamedLayoutChangesDrawing, renamedLayoutTitlePosition, repeatedPairs, representablePositionBox, resolveCanvasDimensions, resolveChartColors, resolveChartData, resolveChartOptions, resolveCodeLanguage, resolveColorRef, resolveColorRoles, resolveDesignHints, resolveDesignRecords, resolveFontFamilies, resolveFontScheme, resolveIcon, resolveLogo, resolveNumbering, resolvePatternPreset, resolveReference, resolveScriptFonts, resolveSlideDirection, resolveSlideVariables, resolveSocialProfile, resolveTableData, resolveTextStyle, resolveVariables, restackForRows, rightArrowPoints, rootNodes, rowLabel, runInHeading, sampledGrays, sampledWeight, scorePictureText, scottBinCount, scrimGeometry, scrimOpacity, scriptFontRole, scriptOfCharacter, shapeIssues, shapeSites, shapeStyleLook, shapeTextColor, shapesPending, shareHeights, shareSiblingChartAxes, shareSiblingPlots, sliceNumberedItems, slideBlockIds, slideCitations, slideFocusSources, slideTokenSpans, smallChart, smartArtScript, smartArtUnavailable, snapFontSizeDown, snapFontSizeUp, softenChartPalette, stackCategoryValues, stackedText, statementMessage, stubLine, styledText, suggestChartNumberFix, supportedNumberingSystems, surfaceAltColor, tableCellDisplayValue, tableGrid, tableHighlightColor, tableHighlightRows, tableKeyText, tableRowBoundaries, tableSlideFocus, textColorForFill, textInkBox, textLength, textWidthMeasurer, timelineMarkerShapes, timelineStatusWordsFor, timelineTextColor, titleBesideTemplate, toExcelNumberFormat, tokenizeCode, trackingWidth, translatePathData, turnedShapeBox, unbindNoBreak, unresolvedReference, unusedDatasets, unwrapQuoteMarks, usesSlideBuiltin, variableDeclarations, vennNodes, verticalFlowNodes, visitContentPayloads, visualReadingOrder, walkCitationRuns, waterfallLabelText, waterfallRoles, waterfallSignedFormat, waterfallSteps, wrapText };