@superdoc/mcp 1.4.0-next.8 → 1.4.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 (2) hide show
  1. package/dist/index.js +1473 -409
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -31330,7 +31330,7 @@ var init_host = __esm(() => {
31330
31330
  });
31331
31331
 
31332
31332
  // ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
31333
- var SDK_VERSION = "2.17.0-next.8";
31333
+ var SDK_VERSION = "2.17.0";
31334
31334
 
31335
31335
  // ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
31336
31336
  import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
@@ -96825,7 +96825,7 @@ Complete new body.`,
96825
96825
  find: {
96826
96826
  memberPath: "find",
96827
96827
  description: "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.",
96828
- expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }).",
96828
+ expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }). Text hits contain only the matched text; use getNode or getNodeById for the full containing node. Node selectors return full node projections.",
96829
96829
  requiresDocumentContext: true,
96830
96830
  metadata: readOperation({
96831
96831
  idempotency: "idempotent",
@@ -122668,7 +122668,7 @@ var init_paragraph_signal_index = __esm(() => {
122668
122668
  RETAINED_PARAGRAPH_SIGNALS = Symbol("retained-paragraph-signals");
122669
122669
  });
122670
122670
 
122671
- // ../../../v2/node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.0/ed5.js
122671
+ // ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.0/ed5.js
122672
122672
  var require_ed5 = __commonJS((exports) => {
122673
122673
  Object.defineProperty(exports, "__esModule", { value: true });
122674
122674
  exports.CHAR = `
@@ -122706,7 +122706,7 @@ var require_ed5 = __commonJS((exports) => {
122706
122706
  exports.isNameChar = isNameChar;
122707
122707
  });
122708
122708
 
122709
- // ../../../v2/node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.1/ed2.js
122709
+ // ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.1/ed2.js
122710
122710
  var require_ed2 = __commonJS((exports) => {
122711
122711
  Object.defineProperty(exports, "__esModule", { value: true });
122712
122712
  exports.CHAR = "\x01-퟿-�\uD800\uDC00-\uDBFF\uDFFF";
@@ -122753,7 +122753,7 @@ var require_ed2 = __commonJS((exports) => {
122753
122753
  exports.isNameChar = isNameChar;
122754
122754
  });
122755
122755
 
122756
- // ../../../v2/node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xmlns/1.0/ed3.js
122756
+ // ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xmlns/1.0/ed3.js
122757
122757
  var require_ed3 = __commonJS((exports) => {
122758
122758
  Object.defineProperty(exports, "__esModule", { value: true });
122759
122759
  exports.NC_NAME_START_CHAR = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";
@@ -122771,7 +122771,7 @@ var require_ed3 = __commonJS((exports) => {
122771
122771
  exports.isNCNameChar = isNCNameChar;
122772
122772
  });
122773
122773
 
122774
- // ../../../v2/node_modules/.pnpm/saxes@6.0.0/node_modules/saxes/saxes.js
122774
+ // ../../node_modules/.pnpm/saxes@6.0.0/node_modules/saxes/saxes.js
122775
122775
  var require_saxes = __commonJS((exports) => {
122776
122776
  Object.defineProperty(exports, "__esModule", { value: true });
122777
122777
  exports.SaxesParser = exports.EVENTS = undefined;
@@ -135279,7 +135279,28 @@ function control(xml, element) {
135279
135279
  const locks = children.filter((child) => is(child, "lock"));
135280
135280
  const deletable = locks.every((lock) => attr(lock, "val") === "unlocked" || attr(lock, "val") === "contentLocked");
135281
135281
  const supportedProperties = children.every((child) => child.tag.uri === W3 ? ["id", "tag", "alias", "text", "richText", "lock", "rPr", "placeholder", "showingPlcHdr", "temporary"].includes(child.tag.local) : child.tag.uri === "http://schemas.microsoft.com/office/word/2012/wordml" && child.tag.local === "appearance");
135282
- return { id, key: `sdt:${attr(key2, "val")}`, xml: fragment2(xml, element), deletable: deletable && supportedProperties };
135282
+ const contentXml = xml.slice(content[0].start, content[0].end);
135283
+ const contentOpenEnd = contentXml.indexOf(">") + 1;
135284
+ const contentCloseStart = contentXml.lastIndexOf("</");
135285
+ const contentRuns = contentCloseStart < contentOpenEnd ? "" : contentXml.slice(contentOpenEnd, contentCloseStart);
135286
+ const offset = content[0].start - element.start;
135287
+ const itemXml = fragment2(xml, element);
135288
+ const head = itemXml.slice(0, offset + contentOpenEnd);
135289
+ const tail = itemXml.slice(offset + Math.max(contentOpenEnd, contentCloseStart));
135290
+ const unlocked = locks.every((lock) => attr(lock, "val") === "unlocked");
135291
+ const editable = locks.every((lock) => attr(lock, "val") === "unlocked" || attr(lock, "val") === "sdtLocked");
135292
+ return {
135293
+ id,
135294
+ key: `sdt:${attr(key2, "val")}`,
135295
+ xml: itemXml,
135296
+ contentXml: contentRuns,
135297
+ head,
135298
+ tail,
135299
+ deletable: deletable && supportedProperties,
135300
+ insertable: unlocked && supportedProperties,
135301
+ editable: editable && supportedProperties,
135302
+ supportedProperties
135303
+ };
135283
135304
  }
135284
135305
  function inspectInlineControlRemoval(beforeXml, afterXml, namespaces = {}) {
135285
135306
  const before = elements(beforeXml, namespaces);
@@ -135366,6 +135387,137 @@ function bodyOperationsCoverInlineControlRemoval(base2, target, operations, matc
135366
135387
  }
135367
135388
  return removed.size === changes.length && changes.every((entry) => entry.baseId !== null && removed.has(entry.baseId));
135368
135389
  }
135390
+ function inspectInlineControlReplay(beforeXml, afterXml, namespaces = {}) {
135391
+ const before = elements(beforeXml, namespaces);
135392
+ const after = elements(afterXml, namespaces);
135393
+ if (!before || !after)
135394
+ return null;
135395
+ const xmlns = "http://www.w3.org/2000/xmlns/";
135396
+ const attributes = (root, allowed) => Object.values(root.tag.attributes).every((attribute) => attribute.uri === xmlns || allowed(attribute.uri, attribute.local));
135397
+ const runProperties = (root) => is(root, "rPr") && attributes(root, () => false) && root.children.every((child) => child.tag.uri === W3 && RUN_PROPERTIES.has(child.tag.local) && !child.children.length && attributes(child, (uri) => uri === W3));
135398
+ const simpleRun = (root) => safeRun(root) && attributes(root, (uri, local) => uri === W3 && ["rsidR", "rsidRPr", "rsidDel"].includes(local)) && root.children.filter((child) => is(child, "t")).length === 1 && root.children.every((child) => runProperties(child) || is(child, "t") && !child.tag.isSelfClosing && attributes(child, (uri, local) => uri === "http://www.w3.org/XML/1998/namespace" && local === "space"));
135399
+ const safeControlProperties = (root) => {
135400
+ if (!attributes(root, (uri, local) => uri === W3 && ["rsidR", "rsidRPr", "rsidDel"].includes(local)))
135401
+ return false;
135402
+ const properties = root.children.find((child) => is(child, "sdtPr"));
135403
+ const content = root.children.find((child) => is(child, "sdtContent"));
135404
+ if (!attributes(properties, () => false) || !attributes(content, () => false) || content.tag.isSelfClosing)
135405
+ return false;
135406
+ if (properties.children.filter((child) => is(child, "text") || is(child, "richText")).length > 1)
135407
+ return false;
135408
+ const seen = new Set;
135409
+ for (const child of properties.children) {
135410
+ if (seen.has(child.tag.name))
135411
+ return false;
135412
+ seen.add(child.tag.name);
135413
+ if (!attributes(child, (uri) => uri === W3 || uri === child.tag.uri))
135414
+ return false;
135415
+ if (is(child, "rPr")) {
135416
+ if (!runProperties(child))
135417
+ return false;
135418
+ } else if (is(child, "placeholder")) {
135419
+ if (child.children.some((item) => !is(item, "docPart") || item.children.length || !attributes(item, (uri) => uri === W3)))
135420
+ return false;
135421
+ } else if (child.children.length)
135422
+ return false;
135423
+ }
135424
+ return root.children.filter((child) => is(child, "sdtEndPr")).every((child) => attributes(child, () => false) && child.children.every(runProperties));
135425
+ };
135426
+ const inspect = (xml, roots) => {
135427
+ const result = [];
135428
+ for (const [index, root] of roots.entries()) {
135429
+ if (simpleRun(root))
135430
+ continue;
135431
+ const item = control(xml, root);
135432
+ if (!item || !item.supportedProperties || !safeControlProperties(root) || !root.children.find((child) => is(child, "sdtContent"))?.children.every(simpleRun) || result.some((other) => other.id === item.id || other.key === item.key))
135433
+ return null;
135434
+ result.push({ ...item, index });
135435
+ }
135436
+ return result;
135437
+ };
135438
+ const previous = inspect(beforeXml, before);
135439
+ const next = inspect(afterXml, after);
135440
+ if (!previous || !next || !previous.length && !next.length)
135441
+ return null;
135442
+ const normalized = (xml) => signature(`<scope ${Object.entries(namespaces).filter(([prefix]) => prefix && prefix !== "xml").map(([prefix, uri]) => `xmlns:${prefix}=${JSON.stringify(uri)}`).join(" ")}>${xml}</scope>`);
135443
+ const anchors = [];
135444
+ for (const old of previous) {
135445
+ const current = next.find((item) => item.id === old.id);
135446
+ if (!current || old.key !== current.key || normalized(old.head + old.tail) !== normalized(current.head + current.tail))
135447
+ return null;
135448
+ const changed = normalized(old.xml) !== normalized(current.xml);
135449
+ if (changed && !old.editable)
135450
+ return null;
135451
+ anchors.push({ beforeIndex: old.index, afterIndex: current.index, before: old, after: current, changed });
135452
+ }
135453
+ if (anchors.some((anchor, index) => index > 0 && anchor.afterIndex <= anchors[index - 1].afterIndex))
135454
+ return null;
135455
+ const inserted = next.filter((item) => !previous.some((old) => old.id === item.id));
135456
+ if (inserted.some((item) => !item.insertable))
135457
+ return null;
135458
+ return {
135459
+ anchors,
135460
+ inserted,
135461
+ updated: anchors.filter((anchor) => anchor.changed),
135462
+ beforeRoots: before.map((root) => fragment2(beforeXml, root)),
135463
+ afterRoots: after.map((root) => fragment2(afterXml, root))
135464
+ };
135465
+ }
135466
+ function bodyOperationsCoverInlineControlReplay(base2, target, operations, match) {
135467
+ const family = match.families.find((item) => item.family === "content-controls");
135468
+ const changes = family?.entityMatch?.entries.filter((entry) => entry.disposition !== "matched" || entry.changed || entry.moved);
135469
+ if (!changes?.length || family?.hasAmbiguity || changes.some((entry) => entry.disposition !== "inserted" && entry.disposition !== "matched" || entry.moved))
135470
+ return false;
135471
+ const counts = (snapshot2) => {
135472
+ const result = new Map;
135473
+ const visit = (root) => {
135474
+ if (is(root, "sdtPr"))
135475
+ for (const child of root.children.filter((item) => is(item, "id"))) {
135476
+ const id = numericIdentity(attr(child, "val"));
135477
+ if (id !== null)
135478
+ result.set(id, (result.get(id) ?? 0) + 1);
135479
+ }
135480
+ root.children.forEach(visit);
135481
+ };
135482
+ for (const entry of [...snapshot2.body, ...(snapshot2.stories ?? []).flatMap((story) => story.entries)]) {
135483
+ const roots = elements(entry.runXml ?? "", {}, true);
135484
+ if (!roots)
135485
+ return null;
135486
+ roots.forEach(visit);
135487
+ }
135488
+ return result;
135489
+ };
135490
+ const oldCounts = counts(base2), newCounts = counts(target);
135491
+ if (!oldCounts || !newCounts)
135492
+ return false;
135493
+ const covered = new Map;
135494
+ for (const operation of operations) {
135495
+ if (operation.kind !== "edit" && operation.kind !== "formatEdit")
135496
+ continue;
135497
+ const previous = base2.body.filter((entry) => entry.blockId === operation.blockId);
135498
+ const next = target.body.filter((entry) => entry.blockId === operation.blockId);
135499
+ if (previous.length !== 1 || next.length !== 1)
135500
+ continue;
135501
+ const before = previous[0], after = next[0];
135502
+ const proof = inspectInlineControlReplay(before.runXml ?? "", after.runXml ?? "");
135503
+ if (!proof)
135504
+ continue;
135505
+ if (!/^[0-9A-Fa-f]{8}$/.test(before.blockId) || (before.structuralScope ?? "body") !== "body" || (after.structuralScope ?? "body") !== "body" || before.trackedChangeAnnotationKeys?.length || before.structuralChangeAnnotationKeys?.length || after.trackedChangeAnnotationKeys?.length || after.structuralChangeAnnotationKeys?.length || operation.targetRunXml !== after.runXml)
135506
+ return false;
135507
+ for (const item of proof.inserted) {
135508
+ if (covered.has(item.key) || oldCounts.has(item.id) || newCounts.get(item.id) !== 1)
135509
+ return false;
135510
+ covered.set(item.key, "inserted");
135511
+ }
135512
+ for (const anchor of proof.updated) {
135513
+ const item = anchor.after;
135514
+ if (covered.has(item.key) || oldCounts.get(item.id) !== 1 || newCounts.get(item.id) !== 1)
135515
+ return false;
135516
+ covered.set(item.key, "matched");
135517
+ }
135518
+ }
135519
+ return covered.size === changes.length && changes.every((entry) => entry.targetId !== null && covered.get(entry.targetId) === entry.disposition);
135520
+ }
135369
135521
  var import_saxes3, W3 = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", attr = (element, name) => Object.values(element.tag.attributes).find((attribute) => attribute.uri === W3 && attribute.local === name)?.value, is = (element, name) => element.tag.uri === W3 && element.tag.local === name, fragment2 = (xml, element) => xml.slice(element.start, element.end), signature = (xml) => canonicalizeXmlForSignature(xml), RUN_PROPERTIES;
135370
135522
  var init_inline_control_removal = __esm(() => {
135371
135523
  init_run_signature();
@@ -136241,7 +136393,7 @@ function parseXmlStartTag(rawTag) {
136241
136393
  return null;
136242
136394
  }
136243
136395
  function validateRunContents(xml, options) {
136244
- if (options.baseRunXml !== undefined && inspectInlineControlRemoval(options.baseRunXml, xml)) {
136396
+ if (options.baseRunXml !== undefined && (inspectInlineControlRemoval(options.baseRunXml, xml) || inspectInlineControlReplay(options.baseRunXml, xml))) {
136245
136397
  return { ok: true };
136246
136398
  }
136247
136399
  const baseHasNoteMarker = options.baseRunXml !== undefined && /<(?:[A-Za-z_][\w.-]*:)?(?:footnoteRef|endnoteRef)\b/.test(options.baseRunXml);
@@ -140072,7 +140224,7 @@ function planCompare(base2, target) {
140072
140224
  const trackedRevisionSetChanged = semanticAnalysis.familyDeltas.find((delta) => delta.family === "tracked-changes")?.detectedChange === true;
140073
140225
  const revisionReplay = deriveCompareBodyOperationsWithRevisionReplay(base2, target, matchResult);
140074
140226
  const bodyOperations = revisionReplay.operations;
140075
- if (bodyOperationsCoverInlineControlRemoval(base2, target, bodyOperations, matchResult)) {
140227
+ if (bodyOperationsCoverInlineControlRemoval(base2, target, bodyOperations, matchResult) || bodyOperationsCoverInlineControlReplay(base2, target, bodyOperations, matchResult)) {
140076
140228
  semanticAnalysis = markFamilySupported(semanticAnalysis, "content-controls");
140077
140229
  }
140078
140230
  const computedStoryOperations = buildStoryOperations(base2, target, semanticAnalysis);
@@ -150284,6 +150436,15 @@ function rebuildMutationSnapshot(snapshot2, state, signalsRevision, touchedStory
150284
150436
  function rebuildMutationSnapshotCanonical(snapshot2, state, signalsRevision, touchedStoryIds, lanesToRebuild, touchedParagraphIndexes, noteAnchorRefsByStory, localizedParagraphSignalsAlreadyRefreshed, sectionMutationPatches, sectionCoordinateSplicesByStory) {
150285
150437
  const shouldRebuildNoteAnchorRefs = lanesToRebuild.has("noteAnchorRefs");
150286
150438
  const shouldRebuildParagraphIndex = lanesToRebuild.has("paragraphIndex");
150439
+ const fullPartNoteAnchorRefsByStory = new Map;
150440
+ const readFullPartNoteAnchorRefs = (storyId, partUri) => {
150441
+ const donor = projectNoteAnchorRefsFromSamePartDonor(state, storyId, partUri, fullPartNoteAnchorRefsByStory);
150442
+ if (donor != null)
150443
+ return donor;
150444
+ const refs = scanNoteAnchorRefs(state, storyId, partUri);
150445
+ fullPartNoteAnchorRefsByStory.set(storyId, refs);
150446
+ return refs;
150447
+ };
150287
150448
  const paragraphSignalsWereComplete = snapshot2.completeness.paragraphIndex === "complete";
150288
150449
  const mayPromoteMainParagraphSignals = lanesToRebuild.has("sections");
150289
150450
  const paragraphSignalsAreComplete = paragraphSignalsWereComplete || shouldRebuildParagraphIndex && mayPromoteMainParagraphSignals;
@@ -150327,7 +150488,7 @@ function rebuildMutationSnapshotCanonical(snapshot2, state, signalsRevision, tou
150327
150488
  manualPageBreaks: rebaseDisjointStorySourceSignals(story.manualPageBreaks, story, storyRevision, partRevision, coordinateSplice),
150328
150489
  headings: rebaseDisjointStorySourceSignals(story.headings, story, storyRevision, partRevision, coordinateSplice),
150329
150490
  drawings: rebaseDisjointStorySourceSignals(story.drawings, story, storyRevision, partRevision, coordinateSplice),
150330
- noteAnchorRefs: shouldRebuildNoteAnchorRefs ? noteAnchorRefsByStory?.get(story.storyId) ?? scanNoteAnchorRefs(state, story.storyId, ownerPartId) : story.noteAnchorRefs,
150491
+ noteAnchorRefs: shouldRebuildNoteAnchorRefs ? noteAnchorRefsByStory?.get(story.storyId) ?? readFullPartNoteAnchorRefs(story.storyId, ownerPartId) : story.noteAnchorRefs,
150331
150492
  paragraphIndex: paragraphSignals,
150332
150493
  completeness
150333
150494
  };
@@ -150340,7 +150501,7 @@ function rebuildMutationSnapshotCanonical(snapshot2, state, signalsRevision, tou
150340
150501
  for (const storyId of touchedStoryIds) {
150341
150502
  if (seenStoryIds.has(storyId))
150342
150503
  continue;
150343
- const added = buildTouchedStorySignals(state, storyId, signalsRevision, lanesToRebuild, touchedParagraphIndexes, noteAnchorRefsByStory);
150504
+ const added = buildTouchedStorySignals(state, storyId, signalsRevision, lanesToRebuild, touchedParagraphIndexes, noteAnchorRefsByStory, readFullPartNoteAnchorRefs);
150344
150505
  if (added) {
150345
150506
  stories.push(added);
150346
150507
  seenStoryIds.add(storyId);
@@ -150654,7 +150815,7 @@ function finalSectionSemanticsAreUnchanged(section, candidate) {
150654
150815
  headerFooterRefs: section.headerFooterRefs
150655
150816
  }) === fingerprint(candidate);
150656
150817
  }
150657
- function buildTouchedStorySignals(state, storyId, signalsRevision, lanesToRebuild, touchedParagraphIndexes, noteAnchorRefsByStory) {
150818
+ function buildTouchedStorySignals(state, storyId, signalsRevision, lanesToRebuild, touchedParagraphIndexes, noteAnchorRefsByStory, readFullPartNoteAnchorRefs = (storyId2, partUri) => scanNoteAnchorRefs(state, storyId2, partUri)) {
150658
150819
  const story = state.stories.get(storyId);
150659
150820
  if (!story)
150660
150821
  return null;
@@ -150676,7 +150837,7 @@ function buildTouchedStorySignals(state, storyId, signalsRevision, lanesToRebuil
150676
150837
  manualPageBreaks: [],
150677
150838
  headings: [],
150678
150839
  drawings: [],
150679
- noteAnchorRefs: shouldRebuildNoteAnchorRefs ? noteAnchorRefsByStory?.get(storyId) ?? projectNoteAnchorRefsFromSamePartDonor(state, storyId, partUri, noteAnchorRefsByStory) ?? scanNoteAnchorRefs(state, storyId, partUri) : [],
150840
+ noteAnchorRefs: shouldRebuildNoteAnchorRefs ? noteAnchorRefsByStory?.get(storyId) ?? projectNoteAnchorRefsFromSamePartDonor(state, storyId, partUri, noteAnchorRefsByStory) ?? readFullPartNoteAnchorRefs(storyId, partUri) : [],
150680
150841
  paragraphIndex,
150681
150842
  completeness: {
150682
150843
  sections: "not-applicable",
@@ -151973,7 +152134,7 @@ var init_history_text_replay = __esm(() => {
151973
152134
  MAX_HISTORY_OWNER_BYTES = 512 * 1024;
151974
152135
  });
151975
152136
 
151976
- // ../../../v2/node_modules/.pnpm/fflate@0.8.2/node_modules/fflate/esm/index.mjs
152137
+ // ../../node_modules/.pnpm/fflate@0.8.2/node_modules/fflate/esm/index.mjs
151977
152138
  import { createRequire as createRequire3 } from "module";
151978
152139
  function deflateSync(data, opts) {
151979
152140
  return dopt(data, opts || {}, 0, 0);
@@ -164393,6 +164554,9 @@ function planDirectInlineEdit(paragraphBytes, startOffset, endOffset, newText, c
164393
164554
  ...enclosingSdts.length > 0 ? { requiresCollaborationSessionSync: true } : {}
164394
164555
  };
164395
164556
  }
164557
+ const sdtProtection = validateSelectedSdtProtection(model.pieces, startOffset, endOffset);
164558
+ if (sdtProtection)
164559
+ return { ok: false, reason: sdtProtection };
164396
164560
  const tocPlan = planTocEntryEdit(paragraphBytes, xml, model, leaves, startOffset, endOffset, newText, inlineContext, authoredTocEntry);
164397
164561
  if (tocPlan)
164398
164562
  return tocPlan;
@@ -164445,7 +164609,13 @@ function planDirectInlineEdits(paragraphBytes, edits, inheritedNamespaceBindings
164445
164609
  return { ok: false, reason: "invalid-range" };
164446
164610
  }
164447
164611
  }
164448
- const batchLeaves = parseParagraphInlineMap(TD22.decode(paragraphBytes), inheritedNamespaceBindings).leaves();
164612
+ const batchModel = parseParagraphInlineMap(TD22.decode(paragraphBytes), inheritedNamespaceBindings);
164613
+ for (const edit of ordered) {
164614
+ const blocked = validateSelectedSdtProtection(batchModel.pieces, edit.startOffset, edit.endOffset);
164615
+ if (blocked)
164616
+ return { ok: false, reason: blocked };
164617
+ }
164618
+ const batchLeaves = batchModel.leaves();
164449
164619
  if (batchLeaves.some((piece) => piece.kind === "noteReference" && !piece.deleted && ordered.some((edit) => edit.startOffset < piece.visibleEnd && edit.endOffset > piece.visibleStart))) {
164450
164620
  return { ok: false, reason: "unsupported-context" };
164451
164621
  }
@@ -165022,6 +165192,27 @@ function hasNonWordMarkerAtCollapsedMoveBoundary(pieces, at, coordinateSpace = "
165022
165192
  function firstNonFieldRangeStartMarker(markers) {
165023
165193
  return markers.find((piece) => piece.role === "range-start" && !isFieldMarker(piece.markerKind)) ?? null;
165024
165194
  }
165195
+ function validateSelectedSdtProtection(pieces, start, end) {
165196
+ if (start === end)
165197
+ return null;
165198
+ for (const piece of pieces) {
165199
+ if (piece.kind !== "container" && piece.kind !== "tracked")
165200
+ continue;
165201
+ if (piece.kind === "container" && piece.containerKind === "sdt" && rangeCrossesContainer(piece, start, end)) {
165202
+ const policy = classifySdtMutationPolicyInternal(piece, true);
165203
+ if (!policy.ok)
165204
+ return policy.reason;
165205
+ const contentOnly = containerContainsRange(piece, start, end);
165206
+ const wholeWrapper = start <= piece.visibleStart && piece.visibleEnd <= end;
165207
+ if (contentOnly && !policy.contentEditable || !contentOnly && !policy.wrapperDeletable || !contentOnly && !wholeWrapper && !policy.contentEditable)
165208
+ return "text-range-in-sdt";
165209
+ }
165210
+ const blocked = validateSelectedSdtProtection(piece.children, start, end);
165211
+ if (blocked)
165212
+ return blocked;
165213
+ }
165214
+ return null;
165215
+ }
165025
165216
  function resolveEditScope(pieces, start, end, collapsedInlineAffinity, collapsedOutsideContentControl = false) {
165026
165217
  let current = pieces;
165027
165218
  let descended = false;
@@ -165076,11 +165267,11 @@ function planCrossBoundarySdts(pieces, start, end) {
165076
165267
  const policy = classifySdtMutationPolicy(piece);
165077
165268
  if (!policy.ok)
165078
165269
  return policy;
165270
+ if (!policy.wrapperDeletable)
165271
+ return { ok: false, reason: "text-range-in-sdt" };
165079
165272
  requiresCollaborationSessionSync = true;
165080
165273
  const wholeWrapper = start <= piece.visibleStart && piece.visibleEnd <= end;
165081
165274
  if (wholeWrapper) {
165082
- if (!policy.wrapperDeletable)
165083
- return { ok: false, reason: "text-range-in-sdt" };
165084
165275
  const blocked = findBlockingSdtChild(piece.children);
165085
165276
  if (blocked)
165086
165277
  return { ok: false, reason: blocked };
@@ -173715,6 +173906,56 @@ function buildIsolatedTrackedRunFormattingLogicalIdWithLookupContext(lookupConte
173715
173906
  return null;
173716
173907
  return entry.id;
173717
173908
  }
173909
+ function buildIsolatedTrackedParagraphSplitLogicalId(input) {
173910
+ return withStructuralLookupContext(undefined, (lookupContext) => {
173911
+ const xml = `<w:body>${input.xml}</w:body>`;
173912
+ const raw = buildTrackedChangeCatalogFromPartXml({
173913
+ xml,
173914
+ partUri: input.partUri,
173915
+ storyId: input.storyId,
173916
+ namespaceBindings: { w: NS_W }
173917
+ });
173918
+ const structural = [...raw.structuralByKey.values()].flat();
173919
+ const mark = structural[0];
173920
+ if (structural.length !== 1 || !mark || mark.structuralKind !== "paragraph-mark-insertion" || mark.wId !== input.wordId || mark.fullParagraphInsertion === true || raw.formattingByKey.size !== 0 || raw.unsupportedByStory.size !== 0)
173921
+ return null;
173922
+ const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, new Map([[input.partUri, xml]]));
173923
+ const id = logical.structuralKeyToLogicalId.get(mark.entityKey);
173924
+ const entry = id ? logical.byId.get(id) : undefined;
173925
+ return entry?.type === "structural" && entry.subtype === "paragraph-mark-insertion" && entry.storyId === input.storyId && entry.reviewGroup == null && entry.subsumption == null ? entry.id : null;
173926
+ });
173927
+ }
173928
+ function buildBoundedTrackedParagraphRangeReceiptProjection(input) {
173929
+ return withStructuralLookupContext(undefined, (lookupContext) => {
173930
+ const xml = `<w:body>${input.xml}</w:body>`;
173931
+ const namespaceBindings = xmlFragmentAdditionalNamespaces(xml, new Map(Object.entries(input.namespaceBindings ?? {})), { w: NS_W, w14: NS_W14 });
173932
+ const parsed = collectXmlElementRanges(xml, { additionalNamespaces: namespaceBindings });
173933
+ if (parsed.errors.length || parsed.ranges.some((range) => range.tag.namespaceUri !== NS_W || /^(?:move|sectPr|sdt)/.test(range.tag.localName)))
173934
+ return null;
173935
+ const paragraphs = parsed.ranges.filter((range) => range.tag.localName === "p");
173936
+ if (paragraphs.length !== 2 || paragraphs.some((range) => !readXmlAttribute(range.tag, NS_W14, "paraId")?.value))
173937
+ return null;
173938
+ const raw = buildTrackedChangeCatalogFromPartXml({ xml, partUri: input.partUri, storyId: input.storyId, namespaceBindings });
173939
+ const structural = [...raw.structuralByKey.values()].flat();
173940
+ const mark = structural[0];
173941
+ if (structural.length !== 1 || !mark || mark.structuralKind !== "paragraph-mark-insertion" || mark.fullParagraphInsertion === true || raw.formattingByKey.size || raw.unsupportedByStory.size)
173942
+ return null;
173943
+ const logical = buildLogicalCatalogWithLookupContext(lookupContext, raw, input.replacementMode, new Map([[input.partUri, xml]]));
173944
+ const id = input.wordId === mark.wId ? logical.structuralKeyToLogicalId.get(mark.entityKey) : input.rsids?.length ? logical.rsidToLogicalId.get(input.rsids[0]) : undefined;
173945
+ const entry = id ? logical.byId.get(id) : undefined;
173946
+ if (!entry || entry.type !== "insertion" || entry.subtype !== "text-insertion" || entry.reviewGroup?.kind !== "word-inserted-paragraph-range" || entry.reviewGroup.role !== "parent" || entry.subsumption || entry.overlap || entry.movePair || entry.structuralFragments.length !== 1 || input.rsids?.some((rsid) => logical.rsidToLogicalId.get(rsid) !== id))
173947
+ return null;
173948
+ const carriers = [...entry.fragments, ...entry.structuralFragments];
173949
+ if (carriers.some((carrier) => !/^\d+$/.test(carrier.wId ?? "") || !input.authoredWordIds.has(Number(carrier.wId)) || carrier.customAttributes?.length))
173950
+ return null;
173951
+ if (parsed.ranges.some((range) => /^comment/.test(range.tag.localName) && range.start < entry.documentOrderEnd && range.end > entry.documentOrderStart))
173952
+ return null;
173953
+ const ordinary = parsed.ranges.filter((range) => range.tag.localName === "t" && range.closeStart > range.openEnd && parsed.ranges.every((parent) => !(parent.start < range.start && parent.end > range.end && /^(?:ins|del|pPr)$/.test(parent.tag.localName))));
173954
+ if (!ordinary.some((range) => range.end <= entry.documentOrderStart) || !ordinary.some((range) => range.start >= entry.documentOrderEnd))
173955
+ return null;
173956
+ return { id: entry.id, childIds: entry.reviewGroup.ownedChildIds };
173957
+ });
173958
+ }
173718
173959
  function buildIsolatedTrackedParagraphInsertionProjection(input, lookupContext) {
173719
173960
  return withStructuralLookupContext(lookupContext, (lookupContext2) => buildIsolatedTrackedParagraphInsertionProjectionWithLookupContext(lookupContext2, input));
173720
173961
  }
@@ -178147,6 +178388,7 @@ function buildSDRenderCommitEnvelope(state, prepared, result, context = {}, opti
178147
178388
  if (trackedTextResolution != null && !trackedTextResolutionProved) {
178148
178389
  return broad("tracked-annotation-unproved");
178149
178390
  }
178391
+ const exhaustedInsertionProved = proveExhaustedTrackedInsertionForRender(prepared, context.originParagraphXml, postParagraphXml);
178150
178392
  const trackedDecisionInvalidatedChangeIds = trackedDecisionRefDelta?.kind === "invalidated" ? trackedDecisionRefDelta.changeIds : trackedTextResolutionProved ? trackedTextResolution.changeIds : null;
178151
178393
  const ownerByteDelta = postBytes.byteLength - (op.on.paragraphByteEnd - op.on.paragraphByteStart);
178152
178394
  const currentOwnerByteStart = ownerByteRange.byteStart;
@@ -178176,7 +178418,8 @@ function buildSDRenderCommitEnvelope(state, prepared, result, context = {}, opti
178176
178418
  const sliceDependencyReason = source.sourceKind === "textboxAtomReplacement" ? classifyTextboxAtomSliceDependency(prepared, postParagraphXml, context.originParagraphXml, trackedAnnotations) : trackedDecisionRefDelta ? classifyTrackedDecisionSliceDependency(postParagraphXml, context.originParagraphXml, trackedDecisionRefDelta.kind) : classifyUnprovedSliceDependency(postParagraphXml, trackedAnnotations, context.originParagraphXml, {
178177
178419
  allowTrackedWrapperDelta: source.sourceKind === "trackedChangeDecide",
178178
178420
  trackedCarrierRefinementProved,
178179
- trackedTextResolutionProved
178421
+ trackedTextResolutionProved,
178422
+ exhaustedInsertionProved
178180
178423
  });
178181
178424
  let derivedInvalidations = null;
178182
178425
  if (sliceDependencyReason) {
@@ -178196,7 +178439,8 @@ function buildSDRenderCommitEnvelope(state, prepared, result, context = {}, opti
178196
178439
  if (derivedInvalidations == null)
178197
178440
  return broad(sliceDependencyReason);
178198
178441
  }
178199
- const section = captureGoverningSectionDependency(state, op.on.storyId, bodyChild.bodyChildOrdinal);
178442
+ const directTextSourceEffect = source.sourceKind === "editText" && directEffectInput?.changeMode === "direct" ? classifyDirectVisibleTextLeafEffect(directEffectInput) : null;
178443
+ const section = captureGoverningSectionDependency(state, op.on.storyId, bodyChild.bodyChildOrdinal, directTextSourceEffect?.kind === "proved" ? "direct-visible-text" : undefined);
178200
178444
  if (!section) {
178201
178445
  const continuedTrackedInsertionChangeId = directEffectInput?.changeMode === "tracked" && trackedAnnotations?.length === 0 ? captureContinuedTrackedInsertionChangeId(prepared, directEffectInput, context.originParagraphXml, postParagraphXml, op.on.storyId) : null;
178202
178446
  const localizedBodyTextEffect = directEffectInput ? directEffectInput.changeMode === "direct" ? classifyDirectVisibleTextLeafEffect(directEffectInput) : directEffectInput.startOffset === directEffectInput.endOffset && directEffectInput.newText.length > 0 && (trackedAnnotations?.length === 1 && trackedAnnotations[0]?.kind === "insert" || continuedTrackedInsertionChangeId != null) ? classifyVisibleTextMutationEffect(directEffectInput) : null : null;
@@ -180309,6 +180553,77 @@ function captureContinuedTrackedInsertionChangeId(prepared, input, originParagra
180309
180553
  const expectedVisibleText = origin.visibleText.slice(0, localOffset) + input.newText + origin.visibleText.slice(localOffset);
180310
180554
  return post.visibleText === expectedVisibleText ? changeId : null;
180311
180555
  }
180556
+ function proveExhaustedTrackedInsertionForRender(prepared, originXml, postXml) {
180557
+ const proof = prepared.backendExtensions.storySurface?.trackedTextRefinement;
180558
+ const source = prepared.source;
180559
+ if (!proof?.removesInsertion || originXml == null || source.kind !== "editText" || source.changeMode !== "tracked" || source.newText !== "" || proof.insertedText !== "" || proof.blockId !== source.on.startBlockId || proof.sourceRange.coordinateSpace !== (source.on.coordinateSpace ?? "visible") || proof.sourceRange.startOffset !== source.on.startOffset || proof.sourceRange.endOffset !== source.on.endOffset || proof.liveTextRange.endOffset <= proof.liveTextRange.startOffset)
180560
+ return false;
180561
+ const parsed = collectXmlElementRanges(originXml, {
180562
+ fragment: true,
180563
+ additionalNamespaces: xmlFragmentAdditionalNamespaces(originXml, new Map, { w: NS_W })
180564
+ });
180565
+ if (parsed.errors.length)
180566
+ return false;
180567
+ const paragraph = parseParagraphInlineMap(originXml);
180568
+ const candidates = parsed.ranges.filter((range) => {
180569
+ if (range.tag.namespaceUri !== NS_W || range.tag.localName !== "ins")
180570
+ return false;
180571
+ const rsid = readXmlAttributeValueByLocalName(originXml.slice(range.start, range.openEnd), "rsidR");
180572
+ if (rsid?.toUpperCase() !== proof.insertionRsid.toUpperCase())
180573
+ return false;
180574
+ const pieces = paragraph.leaves().filter((piece) => piece.charStart >= range.openEnd && piece.charEnd <= range.closeStart && piece.visibleEnd > piece.visibleStart);
180575
+ return pieces.length > 0 && Math.min(...pieces.map((piece) => piece.visibleStart)) === proof.liveTextRange.startOffset && Math.max(...pieces.map((piece) => piece.visibleEnd)) === proof.liveTextRange.endOffset;
180576
+ });
180577
+ if (candidates.length !== 1)
180578
+ return false;
180579
+ const carrier = candidates[0];
180580
+ const properties = new Set([
180581
+ "rStyle",
180582
+ "rFonts",
180583
+ "b",
180584
+ "bCs",
180585
+ "i",
180586
+ "iCs",
180587
+ "caps",
180588
+ "smallCaps",
180589
+ "strike",
180590
+ "dstrike",
180591
+ "outline",
180592
+ "shadow",
180593
+ "emboss",
180594
+ "imprint",
180595
+ "noProof",
180596
+ "snapToGrid",
180597
+ "vanish",
180598
+ "webHidden",
180599
+ "color",
180600
+ "spacing",
180601
+ "w",
180602
+ "kern",
180603
+ "position",
180604
+ "sz",
180605
+ "szCs",
180606
+ "highlight",
180607
+ "u",
180608
+ "effect",
180609
+ "bdr",
180610
+ "shd",
180611
+ "fitText",
180612
+ "vertAlign",
180613
+ "rtl",
180614
+ "cs",
180615
+ "em",
180616
+ "lang",
180617
+ "eastAsianLayout",
180618
+ "specVanish",
180619
+ "oMath"
180620
+ ]);
180621
+ const descendants = parsed.ranges.filter((range) => range.start >= carrier.start && range.end <= carrier.end);
180622
+ const runProperties = descendants.filter((range) => range.tag.namespaceUri === NS_W && range.tag.localName === "rPr");
180623
+ if (descendants.some((range) => range !== carrier && (range.tag.namespaceUri !== NS_W || !(["r", "rPr", "t"].includes(range.tag.localName) || properties.has(range.tag.localName) && runProperties.some((parent) => range.start >= parent.openEnd && range.end <= parent.closeStart)))))
180624
+ return false;
180625
+ return originXml.slice(0, carrier.start) + originXml.slice(carrier.end) === postXml;
180626
+ }
180312
180627
  function trackedCarrierKeys(xml) {
180313
180628
  const keys = [];
180314
180629
  TRACKED_WRAPPER_TOKEN_RE.lastIndex = 0;
@@ -180566,7 +180881,7 @@ function classifyDeferrableSliceDependency(reason, xml, originXml, auxiliaryStor
180566
180881
  function classifyUnprovedSliceDependency(xml, trackedAnnotations, originXml, options = {}) {
180567
180882
  if (originXml == null)
180568
180883
  return "origin-slice-unavailable";
180569
- if (!options.trackedCarrierRefinementProved && !options.trackedTextResolutionProved && (TRACKED_WRAPPER_RE.test(xml) || TRACKED_WRAPPER_RE.test(originXml))) {
180884
+ if (!options.trackedCarrierRefinementProved && !options.trackedTextResolutionProved && !options.exhaustedInsertionProved && (TRACKED_WRAPPER_RE.test(xml) || TRACKED_WRAPPER_RE.test(originXml))) {
180570
180885
  if (!options.allowTrackedWrapperDelta || TRACKED_WRAPPER_RE.test(xml)) {
180571
180886
  if (trackedAnnotations == null)
180572
180887
  return "tracked-annotation-unproved";
@@ -180794,7 +181109,7 @@ function relationshipsPartUriFor(partUri) {
180794
181109
  const name = partUri.slice(slash + 1);
180795
181110
  return `${directory}/_rels/${name}.rels`;
180796
181111
  }
180797
- function captureGoverningSectionDependency(state, storyId, bodyChildOrdinal) {
181112
+ function captureGoverningSectionDependency(state, storyId, bodyChildOrdinal, sourceEdit) {
180798
181113
  const story = state.sourceSignals.snapshot?.stories.find((candidate2) => candidate2.storyId === storyId);
180799
181114
  if (story?.completeness.sections === "complete") {
180800
181115
  if (story.sections.length === 0) {
@@ -180812,7 +181127,7 @@ function captureGoverningSectionDependency(state, storyId, bodyChildOrdinal) {
180812
181127
  };
180813
181128
  }
180814
181129
  const section = findGoverningSection(story.sections, bodyChildOrdinal);
180815
- if (!section || story.sections.length === 1 && section.kind === "final-body-sectPr" && section.storyRevision !== story.storyRevision || !isNarrowSectionSupported(section, story))
181130
+ if (!section || story.sections.length === 1 && section.kind === "final-body-sectPr" && section.storyRevision !== story.storyRevision || !isNarrowSectionSupported(section, story, sourceEdit))
180816
181131
  return null;
180817
181132
  const startBodyChildOrdinal = section.appliesTo.startBodyChildOrdinal;
180818
181133
  const endBodyChildOrdinalExclusive = section.appliesTo.endBodyChildOrdinalExclusive;
@@ -180836,14 +181151,15 @@ function captureGoverningSectionDependency(state, storyId, bodyChildOrdinal) {
180836
181151
  function toggleEffectivelyOn(toggle) {
180837
181152
  return toggle.present && toggle.explicitValue !== false;
180838
181153
  }
180839
- function isNarrowSectionSupported(section, story) {
181154
+ function isNarrowSectionSupported(section, story, sourceEdit) {
180840
181155
  const pageSetup = section.pageSetup;
181156
+ const localTextSourceProved = sourceEdit === "direct-visible-text";
180841
181157
  const columnsAreEffectivelySingle = section.columns == null || (section.columns.count == null || section.columns.count === 1) && section.columns.columns.length <= 1 && section.columns.separator !== true;
180842
181158
  const columnsAreProvedNonBalanceable = section.columns != null && sectionColumnsProveBalancingInert(section.columns);
180843
181159
  const sectionType = pageSetup.type.value;
180844
181160
  const carrierMatches = section.kind === "final-body-sectPr" ? section.carrier.carrierKind === "final-body-sectPr" : section.carrier.carrierKind === "paragraph";
180845
181161
  const endnotePropertiesAreInactive = section.noteProperties.endnotePr == null || story.completeness.noteAnchorRefs === "complete" && story.noteAnchorRefs.every((reference) => reference.kind !== "endnote");
180846
- return carrierMatches && section.carrier.trackedChangeState === "none" && section.changeTracking.state === "unchanged" && section.mceAlternatives.length === 0 && (columnsAreEffectivelySingle || columnsAreProvedNonBalanceable) && section.noteProperties.footnotePr == null && endnotePropertiesAreInactive && section.lineNumbering == null && pageSetup.pageBorders == null && !toggleEffectivelyOn(pageSetup.bidi) && !toggleEffectivelyOn(pageSetup.rtlGutter) && !toggleEffectivelyOn(pageSetup.formProtection) && !pageSetup.textDirection.present && sectionType !== "evenPage" && sectionType !== "oddPage" && sectionType !== "nextColumn" && section.headerFooterRefs.every((ref3) => ref3.targetStatus === "resolved");
181162
+ return carrierMatches && section.carrier.trackedChangeState === "none" && section.changeTracking.state === "unchanged" && section.mceAlternatives.length === 0 && (localTextSourceProved || columnsAreEffectivelySingle || columnsAreProvedNonBalanceable) && (localTextSourceProved || section.noteProperties.footnotePr == null) && endnotePropertiesAreInactive && section.lineNumbering == null && pageSetup.pageBorders == null && (localTextSourceProved || !toggleEffectivelyOn(pageSetup.bidi)) && !toggleEffectivelyOn(pageSetup.rtlGutter) && !toggleEffectivelyOn(pageSetup.formProtection) && !pageSetup.textDirection.present && sectionType !== "evenPage" && sectionType !== "oddPage" && sectionType !== "nextColumn" && section.headerFooterRefs.every((ref3) => ref3.targetStatus === "resolved");
180847
181163
  }
180848
181164
  function sectionColumnsProveBalancingInert(columns) {
180849
181165
  const count = columns.count;
@@ -190351,9 +190667,11 @@ function buildCommentAnchorIndex(state, previousStoryScans, catalogOverride) {
190351
190667
  const bytes = state.packageBytes.get(story.partUri);
190352
190668
  if (!bytes)
190353
190669
  continue;
190354
- const previous = previousStoryScans.find((candidate2) => candidate2.bytes === bytes && sameStoryEnumeration(candidate2.story, story));
190355
- const storyHits = previous?.hits ?? scanStoryForAnchors(TD34.decode(bytes), story);
190356
- storyScans.push({ story: { ...story }, bytes, hits: storyHits });
190670
+ const previous = previousStoryScans.find((candidate2) => sameStoryEnumeration(candidate2.story, story));
190671
+ const xml = previous?.bytes === bytes ? previous.xml : TD34.decode(bytes);
190672
+ const scanned = previous?.bytes === bytes ? previous : scanStoryForAnchors(xml, story, previous);
190673
+ const storyHits = scanned.hits;
190674
+ storyScans.push({ story: { ...story }, bytes, xml, hits: storyHits, paragraphs: scanned.paragraphs });
190357
190675
  for (const hit of storyHits) {
190358
190676
  const list = hitsBySource.get(hit.sourceWId) ?? [];
190359
190677
  list.push(hit);
@@ -190415,7 +190733,7 @@ function enumerateStoryParts(state) {
190415
190733
  }
190416
190734
  return out;
190417
190735
  }
190418
- function scanStoryForAnchors(xml, story) {
190736
+ function scanStoryForAnchors(xml, story, previous) {
190419
190737
  const markers = [];
190420
190738
  const markerRe = /<[\w.-]+:(commentRangeStart|commentRangeEnd|commentReference)\s[^>]*?\bw:id="([^"]+)"[^>]*\/>/g;
190421
190739
  for (let m = markerRe.exec(xml);m; m = markerRe.exec(xml)) {
@@ -190429,8 +190747,8 @@ function scanStoryForAnchors(xml, story) {
190429
190747
  });
190430
190748
  }
190431
190749
  if (markers.length === 0)
190432
- return [];
190433
- const paragraphs = collectParagraphContexts(xml);
190750
+ return { hits: [], paragraphs: null };
190751
+ const paragraphs = rebaseTextOnlyParagraphContexts(xml, previous) ?? collectParagraphContexts(xml);
190434
190752
  const trackedWrapperCoverage = buildTrackedWrapperCoverage(xml);
190435
190753
  const byId = new Map;
190436
190754
  for (const mk of markers) {
@@ -190449,7 +190767,7 @@ function scanStoryForAnchors(xml, story) {
190449
190767
  const start = starts[i2];
190450
190768
  const end = ends[i2];
190451
190769
  const trackedChangeWrapper = findEnclosingTrackedWrapperKind(trackedWrapperCoverage, start.charStart, end.charEnd);
190452
- const rangeSegments = buildAnchorRangeSegments(xml, paragraphs, start, end);
190770
+ const rangeSegments = buildAnchorRangeSegments(xml, paragraphs ?? [], start, end);
190453
190771
  for (const segment of rangeSegments) {
190454
190772
  if (trackedChangeWrapper)
190455
190773
  segment.trackedChangeWrapper = trackedChangeWrapper;
@@ -190469,7 +190787,7 @@ function scanStoryForAnchors(xml, story) {
190469
190787
  hasRangeEnd: ends.length > 0
190470
190788
  });
190471
190789
  }
190472
- return out;
190790
+ return { hits: out, paragraphs };
190473
190791
  }
190474
190792
  function extractVisibleText2(xmlFragment) {
190475
190793
  let out = "";
@@ -190479,10 +190797,62 @@ function extractVisibleText2(xmlFragment) {
190479
190797
  }
190480
190798
  return out;
190481
190799
  }
190800
+ function rebaseTextOnlyParagraphContexts(xml, previous) {
190801
+ if (!previous?.paragraphs)
190802
+ return null;
190803
+ const prior = previous.xml;
190804
+ if (prior.includes("<!DOCTYPE"))
190805
+ return null;
190806
+ let start = 0;
190807
+ const commonLength = Math.min(prior.length, xml.length);
190808
+ const comparisonChunk = 4096;
190809
+ while (start + comparisonChunk <= commonLength && prior.slice(start, start + comparisonChunk) === xml.slice(start, start + comparisonChunk)) {
190810
+ start += comparisonChunk;
190811
+ }
190812
+ while (start < commonLength && prior.charCodeAt(start) === xml.charCodeAt(start))
190813
+ start += 1;
190814
+ if (start === prior.length && start === xml.length)
190815
+ return previous.paragraphs;
190816
+ let oldEnd = prior.length;
190817
+ let newEnd = xml.length;
190818
+ while (oldEnd - comparisonChunk >= start && newEnd - comparisonChunk >= start && prior.slice(oldEnd - comparisonChunk, oldEnd) === xml.slice(newEnd - comparisonChunk, newEnd)) {
190819
+ oldEnd -= comparisonChunk;
190820
+ newEnd -= comparisonChunk;
190821
+ }
190822
+ while (oldEnd > start && newEnd > start && prior.charCodeAt(oldEnd - 1) === xml.charCodeAt(newEnd - 1)) {
190823
+ oldEnd -= 1;
190824
+ newEnd -= 1;
190825
+ }
190826
+ if (/[<>]/.test(prior.slice(start, oldEnd)) || /[<>]/.test(xml.slice(start, newEnd)))
190827
+ return null;
190828
+ const nodeStart = prior.lastIndexOf("<", start - 1);
190829
+ if (nodeStart < 0)
190830
+ return null;
190831
+ for (const [open, close] of [["<!--", "-->"], ["<![CDATA[", "]]>"], ["<?", "?>"]]) {
190832
+ if (prior.lastIndexOf(open, nodeStart) > prior.lastIndexOf(close, nodeStart))
190833
+ return null;
190834
+ }
190835
+ const node2 = readXmlNodeAt(prior, nodeStart);
190836
+ if (!node2 || node2.kind !== "element" || node2.selfClosing || node2.openEnd > start || node2.closeStart < oldEnd) {
190837
+ return null;
190838
+ }
190839
+ const delta = xml.length - prior.length;
190840
+ const textEnd = prior.indexOf("<", node2.openEnd);
190841
+ if (textEnd < oldEnd || parseXmlForError(`<text>${xml.slice(node2.openEnd, textEnd + delta)}</text>`, { namespaceAware: false }) !== null)
190842
+ return null;
190843
+ const shift = (position) => position > start ? position + delta : position;
190844
+ return previous.paragraphs.map((paragraph) => ({
190845
+ paraId: paragraph.paraId,
190846
+ openStart: shift(paragraph.openStart),
190847
+ openEnd: shift(paragraph.openEnd),
190848
+ closeStart: shift(paragraph.closeStart),
190849
+ closeEnd: shift(paragraph.closeEnd)
190850
+ }));
190851
+ }
190482
190852
  function collectParagraphContexts(xml) {
190483
190853
  const scan = scanWmlParagraphSpans(xml);
190484
190854
  if (!scan.ok)
190485
- return [];
190855
+ return null;
190486
190856
  return scan.paragraphs.map((paragraph) => ({
190487
190857
  paraId: paragraph.paraId,
190488
190858
  openStart: paragraph.openStart,
@@ -190531,6 +190901,7 @@ var TD34, COMMENT_ANCHOR_INDEX_KEY = "__comment-anchor-index", ANCHOR_TAG;
190531
190901
  var init_comment_anchor_index = __esm(() => {
190532
190902
  init_lazy_indexes();
190533
190903
  init_wml_paragraph_spans();
190904
+ init_xml_sax();
190534
190905
  init_comments_catalog();
190535
190906
  init_tracked_wrapper_coverage();
190536
190907
  TD34 = new TextDecoder;
@@ -192447,7 +192818,8 @@ function compileParsedOverlapEdit(input, tokens, descendedEditableContainers) {
192447
192818
  }
192448
192819
  const paragraphContainsMoveWrapper = tokens.some((token) => token.kind === "unsupported" && token.foreignTrackedWrapper !== true && (token.trackedKind === "moveFrom" || token.trackedKind === "moveTo"));
192449
192820
  const trackedPlainCaret = (input.coordinateSpace ?? "visible") === "tracked" && tokenOwningCollapsedCaret(input, tokens)?.kind === "plain";
192450
- if ((paragraphContainsMoveWrapper || trackedPlainCaret) && input.rangeStart === input.rangeEnd && input.newText.length > 0) {
192821
+ const deletedBreakBoundary = input.collapsedInlineAffinity != null && tokens.some((token) => token.kind === "unsupported" && token.deletedManualBreak === true && token.visibleStart === input.rangeStart && token.visibleEnd === input.rangeStart);
192822
+ if ((paragraphContainsMoveWrapper || trackedPlainCaret || deletedBreakBoundary) && input.rangeStart === input.rangeEnd && input.newText.length > 0) {
192451
192823
  const defersExplicitUpstreamMoveBoundary = input.changeMode === "direct" && input.collapsedInlineAffinity === "upstream" && !tokens.some((token) => token.kind === "plain" && token.visibleEnd === input.rangeStart) && tokens.some((token) => token.kind === "unsupported" && token.foreignTrackedWrapper !== true && token.trackedKind === "moveFrom" && token.visibleStart === input.rangeStart && token.visibleEnd === input.rangeStart);
192452
192824
  if (defersExplicitUpstreamMoveBoundary) {
192453
192825
  return {
@@ -192456,7 +192828,8 @@ function compileParsedOverlapEdit(input, tokens, descendedEditableContainers) {
192456
192828
  detail: "overlap compiler: upstream move boundary is owned by the direct inline planner."
192457
192829
  };
192458
192830
  }
192459
- return compilePlainOnlyCollapsedInsertion(input, tokens, touched);
192831
+ const insertion = compilePlainOnlyCollapsedInsertion(input, tokens, touched);
192832
+ return deletedBreakBoundary && insertion.ok ? { ...insertion, requiresCollaborationSessionSync: true } : insertion;
192460
192833
  }
192461
192834
  return { ok: false, reason: "invalid-range", detail: "overlap compiler: no tracked wrappers touched." };
192462
192835
  }
@@ -192934,7 +193307,7 @@ function tryRangeReplacementAcrossTokens(input, allTokens, touched) {
192934
193307
  if (!firstSelected)
192935
193308
  return null;
192936
193309
  const touchedInsertions = touched.filter((entry) => entry.token.kind === "ins");
192937
- if (touchedInsertions.some(({ token }) => token.innerRuns && token.innerRuns.length > 1 || token.nestedDeletions && token.nestedDeletions.length > 0)) {
193310
+ if (touchedInsertions.some(({ token }) => token.innerRuns && token.innerRuns.length > 1 && (token !== firstSelected.token || token.commentedBoundary != null) || token.nestedDeletions && token.nestedDeletions.length > 0)) {
192938
193311
  return null;
192939
193312
  }
192940
193313
  const result = input.changeMode === "tracked" ? authorTrackedPureDelete(input, allTokens, touched) : authorDirectPureDelete(input, allTokens, touched);
@@ -193038,7 +193411,7 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
193038
193411
  continue;
193039
193412
  }
193040
193413
  const head2 = token.text.slice(0, localStart2);
193041
- const removed2 = token.text.slice(localStart2, localEnd2);
193414
+ const removed = token.text.slice(localStart2, localEnd2);
193042
193415
  const tail2 = token.text.slice(localEnd2);
193043
193416
  const headXml = head2.length > 0 ? renderPlainRun(head2, token.runOpen, token.runClose, token.rPr) : "";
193044
193417
  const delXml = buildDelWrapperXml({
@@ -193047,7 +193420,7 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
193047
193420
  author: currentAuthor,
193048
193421
  date: input.txTimestamp,
193049
193422
  rsidDel: input.rsid,
193050
- inner: { runOpen: token.runOpen, runClose: token.runClose, rPr: token.rPr, text: removed2 }
193423
+ inner: { runOpen: token.runOpen, runClose: token.runClose, rPr: token.rPr, text: removed }
193051
193424
  });
193052
193425
  const insertXml = !replacementInserted && input.newText.length > 0 ? buildInsWrapperXml({
193053
193426
  nsPrefix,
@@ -193080,7 +193453,6 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
193080
193453
  continue;
193081
193454
  }
193082
193455
  const head = token.inner.text.slice(0, localStart);
193083
- const removed = token.inner.text.slice(localStart, localEnd);
193084
193456
  const tail = token.inner.text.slice(localEnd);
193085
193457
  const classification = token._classification;
193086
193458
  removedAnything = true;
@@ -193109,8 +193481,13 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
193109
193481
  updatedRsids.push(rsid);
193110
193482
  continue;
193111
193483
  }
193112
- const nestedHead = renderPlainRun(head, token.inner.runOpen, token.inner.runClose, token.inner.rPr);
193113
- const nestedTail = renderPlainRun(tail, token.inner.runOpen, token.inner.runClose, token.inner.rPr);
193484
+ const runs = token.innerRuns ?? [token.inner];
193485
+ const headRuns = sliceWrappedRuns(runs, 0, localStart);
193486
+ const removedRuns = sliceWrappedRuns(runs, localStart, localEnd);
193487
+ const tailRuns = sliceWrappedRuns(runs, localEnd, token.inner.text.length);
193488
+ const nestedHead = buildInsInnerXmlFromRuns(headRuns);
193489
+ const nestedTail = buildInsInnerXmlFromRuns(tailRuns);
193490
+ const insertMeta = runMetaAtInsertionPoint(token, localStart, true);
193114
193491
  const childIns = !replacementInserted && input.newText.length > 0 && input.rangeStart >= token.visibleStart && input.rangeStart < token.visibleEnd && input.rangeEnd > token.visibleEnd ? buildInsWrapperXml({
193115
193492
  namespaceReferenceOpenTag: token.openTag,
193116
193493
  nsPrefix: token.nsPrefix,
@@ -193119,9 +193496,9 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
193119
193496
  date: input.txTimestamp,
193120
193497
  rsidR: input.insRsid,
193121
193498
  inner: {
193122
- runOpen: token.inner.runOpen,
193123
- runClose: token.inner.runClose,
193124
- rPr: token.inner.rPr,
193499
+ runOpen: insertMeta.runOpen,
193500
+ runClose: insertMeta.runClose,
193501
+ rPr: rPrAtInsertionPoint(token, localStart, true),
193125
193502
  text: input.newText
193126
193503
  }
193127
193504
  }) : "";
@@ -193132,10 +193509,8 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
193132
193509
  author: currentAuthor,
193133
193510
  date: input.txTimestamp,
193134
193511
  rsidDel: input.rsid,
193135
- inner: { runOpen: token.inner.runOpen, runClose: token.inner.runClose, rPr: token.inner.rPr, text: removed },
193136
- ...token.commentedBoundary ? {
193137
- innerXml: renderDelRun(removed, token.inner.runOpen, token.inner.runClose, token.inner.rPr) + token.commentedBoundary.endXml + token.commentedBoundary.referenceRunXml
193138
- } : {}
193512
+ inner: removedRuns[0],
193513
+ innerXml: buildDelInnerXmlFromRuns(removedRuns) + (token.commentedBoundary?.endXml ?? "") + (token.commentedBoundary?.referenceRunXml ?? "")
193139
193514
  });
193140
193515
  if (token.commentedBoundary) {
193141
193516
  if (!childIns || tail.length > 0)
@@ -193156,7 +193531,8 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
193156
193531
  author: token.author,
193157
193532
  date: token.date,
193158
193533
  rsidR: token.rsidR,
193159
- inner: { ...token.inner, text: head }
193534
+ inner: headRuns[0],
193535
+ innerXml: nestedHead
193160
193536
  }) : "";
193161
193537
  const tailIns = buildInsWrapperXml({
193162
193538
  openTag: token.openTag,
@@ -193523,6 +193899,20 @@ function foldInsideOwnInsertion(input, allTokens, parent) {
193523
193899
  const rebuilt = rebuildParagraph(allTokens, parent, newInsXml);
193524
193900
  return rebuilt.ok ? markTextInsertionRefined(markExistingRevisionUpdated(rebuilt, input, parent), input, parent, false) : rebuilt;
193525
193901
  }
193902
+ function sliceWrappedRuns(runs, start, end) {
193903
+ const result = [];
193904
+ let offset = 0;
193905
+ for (const run of runs) {
193906
+ const runEnd = offset + run.text.length;
193907
+ if (start < runEnd && end > offset) {
193908
+ result.push({ ...run, text: run.text.slice(Math.max(0, start - offset), Math.min(run.text.length, end - offset)) });
193909
+ }
193910
+ offset = runEnd;
193911
+ if (offset >= end)
193912
+ break;
193913
+ }
193914
+ return result;
193915
+ }
193526
193916
  function flattenWrappedRuns(runs) {
193527
193917
  const out = [];
193528
193918
  for (const run of runs) {
@@ -193743,8 +194133,10 @@ function splitInsertionAroundChildChange(input, allTokens, parent) {
193743
194133
  detail: "overlap compiler: edit range straddles an existing nested tracked deletion."
193744
194134
  };
193745
194135
  }
193746
- const headOwnedNested = parent.nestedDeletions?.filter((n) => n.localOffset <= localStart) ?? [];
193747
- const tailOwnedNested = parent.nestedDeletions?.filter((n) => n.localOffset > localStart) ?? [];
194136
+ const precedesBoundaryDeletion = input.changeMode === "tracked" && input.newText.length > 0 && input.rangeStart === input.rangeEnd && (input.coordinateSpace ?? "visible") === "visible" && input.collapsedInlineAffinity === "upstream";
194137
+ const belongsToHead = (n) => n.localOffset < localStart || n.localOffset === localStart && !precedesBoundaryDeletion;
194138
+ const headOwnedNested = nestedDeletions.filter(belongsToHead);
194139
+ const tailOwnedNested = nestedDeletions.filter((n) => !belongsToHead(n));
193748
194140
  const flat = flattenWrappedRuns(parent.innerRuns ?? [parent.inner]);
193749
194141
  const headRuns = coalesceWrappedRuns(flat.slice(0, localStart));
193750
194142
  const removedRuns = coalesceWrappedRuns(flat.slice(localStart, localEnd));
@@ -193874,7 +194266,7 @@ function splitInsertionAroundChildChange(input, allTokens, parent) {
193874
194266
  ok: true,
193875
194267
  xml,
193876
194268
  emittedRsids,
193877
- ...removedText.length > 0 || tailParentWId !== parent.wId || liftComment ? { requiresCollaborationSessionSync: true } : {}
194269
+ ...removedText.length > 0 || tailParentWId !== parent.wId || liftComment || precedesBoundaryDeletion && tailOwnedNested.some((n) => n.localOffset === localStart) ? { requiresCollaborationSessionSync: true } : {}
193878
194270
  };
193879
194271
  }
193880
194272
  function insertAtForeignDeletion(input, allTokens, parent, sameUser, side = "after") {
@@ -194649,6 +195041,17 @@ function trackedToken(piece, spanStart, spanEnd, allowComplexDeletions, allowStr
194649
195041
  })).sort((a, b) => a.localOffset - b.localOffset);
194650
195042
  }
194651
195043
  const commentedBoundary = piece.trackedKind === "ins" && !nestedDeletions ? readCommentedInsertionBoundary(piece) : null;
195044
+ const onlyChild = piece.children.length === 1 ? piece.children[0] : undefined;
195045
+ if (piece.trackedKind === "del" && onlyChild?.kind === "control" && (onlyChild.control === "br" || onlyChild.control === "cr")) {
195046
+ const attrs = onlyChild.rawXml.replace(/^<[^\s/>]+/, "").replace(/\/?>$/, "");
195047
+ const breakType = decodeNamespacedAttr(attrs, piece.namespaceBindings, "type");
195048
+ if (breakType == null || breakType === "textWrapping") {
195049
+ return {
195050
+ ...unsupported2("text-payload-unsupported-control-char", "overlap compiler: deleted manual break"),
195051
+ deletedManualBreak: true
195052
+ };
195053
+ }
195054
+ }
194652
195055
  if (allowComplexDeletions && piece.trackedKind === "del") {
194653
195056
  const unsupportedChild = piece.children.find((child) => child.kind !== "text" && !(child.kind === "marker" && isCommentMarker2(child.markerKind)) && !(allowStructuralDeletionPassThrough && isSupportedStructuralDeletionChild(child)));
194654
195057
  if (unsupportedChild) {
@@ -195061,10 +195464,15 @@ function projectTrackedChangesForExport(state, options) {
195061
195464
  const partXmlByUri = readWordXmlParts(state, options.baseOverrides);
195062
195465
  const rawCatalog = readTrackedChangeCatalogForExport(state, options.excludedPartUris, options.baseOverrides);
195063
195466
  const sessionProvenance = collectSessionTrackedChangeProvenance(state);
195064
- const warnings = buildTrackedChangesExportWarnings(rawCatalog, partXmlByUri, options.replacementMode, options.mode === "review-preserving" ? sessionProvenance : null);
195467
+ const logicalProvenance = options.mode === "review-preserving" ? sessionProvenance : null;
195468
+ const logicalCatalog = buildLogicalCatalog(rawCatalog, options.replacementMode, partXmlByUri, undefined, {
195469
+ sessionCreatedTrackedChangeRsids: logicalProvenance?.rsids,
195470
+ sessionCreatedTrackedChangeWIds: collectOwnedSessionTrackedChangeWIds(logicalProvenance)
195471
+ });
195472
+ const warnings = buildTrackedChangesExportWarnings(logicalCatalog, partXmlByUri, logicalProvenance);
195065
195473
  const overrides = new Map;
195066
195474
  if (options.mode === "review-preserving") {
195067
- const projected = projectReviewPreservingTrackedChanges(rawCatalog, partXmlByUri, options.replacementMode, sessionProvenance);
195475
+ const projected = projectReviewPreservingTrackedChanges(logicalCatalog, partXmlByUri, sessionProvenance);
195068
195476
  for (const [partUri, xml] of projected) {
195069
195477
  const original = partXmlByUri.get(partUri);
195070
195478
  if (original !== undefined && xml !== original) {
@@ -195101,11 +195509,7 @@ function isWordXmlPart(partUri) {
195101
195509
  const normalized = partUri.startsWith("/") ? partUri.slice(1) : partUri;
195102
195510
  return normalized.startsWith("word/") && normalized.endsWith(".xml") && !normalized.includes("/_rels/");
195103
195511
  }
195104
- function buildTrackedChangesExportWarnings(rawCatalog, partXmlByUri, replacementMode, sessionProvenance) {
195105
- const logicalCatalog = buildLogicalCatalog(rawCatalog, replacementMode, partXmlByUri, undefined, {
195106
- sessionCreatedTrackedChangeRsids: sessionProvenance?.rsids,
195107
- sessionCreatedTrackedChangeWIds: collectOwnedSessionTrackedChangeWIds(sessionProvenance)
195108
- });
195512
+ function buildTrackedChangesExportWarnings(logicalCatalog, partXmlByUri, sessionProvenance) {
195109
195513
  const warnings = [];
195110
195514
  const seenCodes = new Set;
195111
195515
  const orderedChanges = [...logicalCatalog.byId.values()].sort((left, right) => left.partUri.localeCompare(right.partUri) || left.documentOrderStart - right.documentOrderStart || left.id.localeCompare(right.id));
@@ -195159,11 +195563,7 @@ function isDeleteInsertMoveApproximation(change) {
195159
195563
  const structuralApproximation = change.structuralFragments.length === 2 && change.structuralFragments.some((fragment3) => fragment3.sourceWrapperKind === "del") && change.structuralFragments.some((fragment3) => fragment3.sourceWrapperKind === "ins");
195160
195564
  return textApproximation || structuralApproximation;
195161
195565
  }
195162
- function projectReviewPreservingTrackedChanges(rawCatalog, partXmlByUri, replacementMode, sessionProvenance) {
195163
- const logicalCatalog = buildLogicalCatalog(rawCatalog, replacementMode, partXmlByUri, undefined, {
195164
- sessionCreatedTrackedChangeRsids: sessionProvenance.rsids,
195165
- sessionCreatedTrackedChangeWIds: collectOwnedSessionTrackedChangeWIds(sessionProvenance)
195166
- });
195566
+ function projectReviewPreservingTrackedChanges(logicalCatalog, partXmlByUri, sessionProvenance) {
195167
195567
  const replacementsByPart = new Map;
195168
195568
  const allocateMoveStamp = createExportMoveStampAllocator(partXmlByUri);
195169
195569
  const orderedChanges = [...logicalCatalog.byId.values()].sort((left, right) => left.partUri.localeCompare(right.partUri) || left.documentOrderStart - right.documentOrderStart || left.id.localeCompare(right.id));
@@ -197131,10 +197531,13 @@ function commitDirect(input, view) {
197131
197531
  const patchMaps = {
197132
197532
  [op.on.partUri]: { partUri: op.on.partUri, ranges: [] }
197133
197533
  };
197534
+ let noteOwnerXml;
197134
197535
  const noteSidecar = appendRemovedNoteSidecarPatches({
197135
197536
  state,
197136
197537
  ownerPartUri: op.on.partUri,
197137
- ownerXml: TD40.decode(bytes),
197538
+ get ownerXml() {
197539
+ return noteOwnerXml ?? (noteOwnerXml = TD40.decode(bytes));
197540
+ },
197138
197541
  beforeWindowXml: TD40.decode(bytes.subarray(window2.byteStart, window2.byteEnd)),
197139
197542
  afterWindowXml: TD40.decode(localized.bytes),
197140
197543
  perPart,
@@ -198958,6 +199361,15 @@ function rewriteTrackedPartialSdtSelection(paragraphXml, startOffset, endOffset,
198958
199361
  const sdts = [...intersectingSdts].sort((left, right) => left.visibleStart - right.visibleStart);
198959
199362
  if (sdts.some((sdt, index) => index > 0 && sdt.visibleStart < sdts[index - 1].visibleEnd))
198960
199363
  return null;
199364
+ for (const sdt of sdts) {
199365
+ if (sdt.visibleStart <= startOffset && endOffset <= sdt.visibleEnd)
199366
+ continue;
199367
+ const policy = classifySdtMutationPolicy(sdt);
199368
+ if (!policy.ok)
199369
+ return policy;
199370
+ if (!policy.wrapperDeletable)
199371
+ return { ok: false, reason: "text-range-in-sdt" };
199372
+ }
198961
199373
  const segments = [];
198962
199374
  let cursor = startOffset;
198963
199375
  for (const sdt of sdts) {
@@ -199478,8 +199890,13 @@ function paragraphWindowFromResolvedRange(bytes, op, searchRange) {
199478
199890
  const scanEnd = searchRange?.[1] ?? bytes.length;
199479
199891
  if (scanEnd <= start)
199480
199892
  return null;
199481
- const paragraphXmlAndTail = TD40.decode(bytes.subarray(start, scanEnd));
199482
- const paragraph = readXmlNodeAt(paragraphXmlAndTail, 0);
199893
+ const boundedEnd = Math.min(hintedEnd, scanEnd);
199894
+ let paragraphXmlAndTail = TD40.decode(bytes.subarray(start, boundedEnd));
199895
+ let paragraph = readXmlNodeAt(paragraphXmlAndTail, 0);
199896
+ if (!paragraph && boundedEnd < scanEnd) {
199897
+ paragraphXmlAndTail = TD40.decode(bytes.subarray(start, scanEnd));
199898
+ paragraph = readXmlNodeAt(paragraphXmlAndTail, 0);
199899
+ }
199483
199900
  if (!paragraph || paragraph.kind !== "element" || xmlLocalName(paragraph.qname) !== "p")
199484
199901
  return null;
199485
199902
  const actualEnd = start + TE16.encode(paragraphXmlAndTail.slice(0, paragraph.end)).length;
@@ -213829,8 +214246,63 @@ function validateWholeFieldRangeSelection(input) {
213829
214246
  }
213830
214247
  return { ok: true };
213831
214248
  }
214249
+ function hasFieldCandidates(xml) {
214250
+ return xml.includes("fldSimple") || xml.includes("fldChar") || xml.includes("instrText");
214251
+ }
214252
+ function hasFieldByteCandidates(bytes) {
214253
+ return FIELD_CANDIDATE_SEARCHES.some(({ token, anchorOffset }) => {
214254
+ const anchor = token[anchorOffset];
214255
+ for (let at = bytes.indexOf(anchor);at >= 0; at = bytes.indexOf(anchor, at + 1)) {
214256
+ const start = at - anchorOffset;
214257
+ if (start < 0 || start + token.length > bytes.length)
214258
+ continue;
214259
+ let offset = 0;
214260
+ while (offset < token.length && bytes[start + offset] === token[offset])
214261
+ offset += 1;
214262
+ if (offset === token.length)
214263
+ return true;
214264
+ }
214265
+ return false;
214266
+ });
214267
+ }
214268
+ function emptyFieldCatalog(storyId, partUri, sourceCodeUnits) {
214269
+ let measuredUnits = typeof sourceCodeUnits === "number" ? sourceCodeUnits : undefined;
214270
+ const units = () => measuredUnits ?? (measuredUnits = typeof sourceCodeUnits === "number" ? sourceCodeUnits : sourceCodeUnits());
214271
+ return {
214272
+ storyId,
214273
+ partUri,
214274
+ fields: [],
214275
+ byFieldId: new Map,
214276
+ unmatchedComplexFieldMarkerByteOffsets: [],
214277
+ utf8OffsetIndex: {
214278
+ representation: "not-needed",
214279
+ get sourceCodeUnits() {
214280
+ return units();
214281
+ },
214282
+ checkpointStride: UTF8_OFFSET_CHECKPOINT_STRIDE,
214283
+ checkpointCount: 0,
214284
+ storageBytes: 0,
214285
+ get denseEquivalentStorageBytes() {
214286
+ return (units() + 1) * Uint32Array.BYTES_PER_ELEMENT;
214287
+ }
214288
+ },
214289
+ ownerResolution: { mode: "not-needed", packedLookupCount: 0, packedFallbackCount: 0, packedRejectionReason: null }
214290
+ };
214291
+ }
214292
+ async function screenFieldCandidatesCooperatively(xml, checkpoint) {
214293
+ const stride = 512 * 1024;
214294
+ for (let start = 0;start < xml.length; start += stride) {
214295
+ if (hasFieldCandidates(xml.slice(start, start + stride + 8)))
214296
+ return true;
214297
+ if (start + stride < xml.length && !await checkpoint())
214298
+ return null;
214299
+ }
214300
+ return false;
214301
+ }
213832
214302
  function buildFieldCatalog(input) {
213833
214303
  const xml = input.sharedXml ?? TD50.decode(input.bytes);
214304
+ if (!hasFieldCandidates(xml))
214305
+ return emptyFieldCatalog(input.storyId, input.partUri, xml.length);
213834
214306
  return buildFieldCatalogFromXml(input, xml, buildSparseFieldUtf8OffsetIndex(xml));
213835
214307
  }
213836
214308
  function buildFieldCatalogFromXml(input, xml, utf8Offsets) {
@@ -214209,7 +214681,6 @@ async function buildSparseUtf8OffsetIndexCooperatively(xml, checkpoint) {
214209
214681
  let byteOffset = 0;
214210
214682
  let checkpointIndex = 0;
214211
214683
  let nextCheckpoint = 0;
214212
- let sliceStart = performance.now();
214213
214684
  while (codeUnitIndex < xml.length) {
214214
214685
  const sliceEnd = Math.min(xml.length, codeUnitIndex + 512 * 1024);
214215
214686
  while (codeUnitIndex < sliceEnd) {
@@ -214232,11 +214703,8 @@ async function buildSparseUtf8OffsetIndexCooperatively(xml, checkpoint) {
214232
214703
  codeUnitIndex += 1;
214233
214704
  }
214234
214705
  }
214235
- if (performance.now() - sliceStart >= 8) {
214236
- if (!await checkpoint())
214237
- return null;
214238
- sliceStart = performance.now();
214239
- }
214706
+ if (codeUnitIndex < xml.length && !await checkpoint())
214707
+ return null;
214240
214708
  }
214241
214709
  if (codeUnitIndex === nextCheckpoint)
214242
214710
  checkpointOffsets[checkpointIndex] = byteOffset;
@@ -214322,18 +214790,28 @@ function getOrBuildFieldCatalogForStory(state, storyId) {
214322
214790
  if (existing && existing.partBytes === bytes) {
214323
214791
  return existing.catalog;
214324
214792
  }
214793
+ if (!hasFieldByteCandidates(bytes)) {
214794
+ const catalog2 = emptyFieldCatalog(storyId, partUri, () => TD50.decode(bytes).length);
214795
+ perStory.set(storyId, { catalog: catalog2, partBytes: bytes });
214796
+ return catalog2;
214797
+ }
214325
214798
  const shared = peekPartWmlScanFacts(state, partUri);
214326
214799
  const xml = shared?.bytes === bytes ? shared.xml : DECODED_PART_IN_FLIGHT.get(bytes)?.xml ?? TD50.decode(bytes);
214800
+ if (!hasFieldCandidates(xml)) {
214801
+ const catalog2 = emptyFieldCatalog(storyId, partUri, xml.length);
214802
+ perStory.set(storyId, { catalog: catalog2, partBytes: bytes });
214803
+ return catalog2;
214804
+ }
214327
214805
  const utf8Offsets = buildSparseFieldUtf8OffsetIndex(xml);
214328
214806
  const ownerDiagnostics = { rejectionReason: null };
214329
- const paragraphOwnerResolver = createPackedFieldParagraphOwnerResolver({
214807
+ const paragraphOwnerResolver = hasFieldCandidates(xml) ? createPackedFieldParagraphOwnerResolver({
214330
214808
  state,
214331
214809
  partUri,
214332
214810
  bytes,
214333
214811
  xml,
214334
214812
  utf8Offsets,
214335
214813
  diagnostics: ownerDiagnostics
214336
- });
214814
+ }) : null;
214337
214815
  const catalog = buildFieldCatalogFromXml({
214338
214816
  bytes,
214339
214817
  storyId,
@@ -214415,11 +214893,24 @@ async function buildFieldCatalogForStoryCooperatively(input) {
214415
214893
  try {
214416
214894
  if (!await checkpoint())
214417
214895
  return syncWinner;
214896
+ const fieldCandidates = await screenFieldCandidatesCooperatively(decoded.xml, checkpoint);
214897
+ if (fieldCandidates == null)
214898
+ return syncWinner;
214899
+ if (!fieldCandidates) {
214900
+ if (!inputsAreCurrent())
214901
+ return null;
214902
+ const winner2 = currentCatalog();
214903
+ if (winner2)
214904
+ return winner2;
214905
+ const catalog2 = emptyFieldCatalog(input.storyId, input.partUri, decoded.xml.length);
214906
+ input.perStory.set(input.storyId, { catalog: catalog2, partBytes: input.bytes });
214907
+ return catalog2;
214908
+ }
214418
214909
  const utf8Offsets = await buildSparseUtf8OffsetIndexCooperatively(decoded.xml, checkpoint);
214419
214910
  if (!utf8Offsets)
214420
214911
  return syncWinner;
214421
214912
  const ownerDiagnostics = { rejectionReason: null };
214422
- const paragraphOwnerResolver = await createPackedFieldParagraphOwnerResolverCooperatively({
214913
+ const paragraphOwnerResolver = fieldCandidates ? await createPackedFieldParagraphOwnerResolverCooperatively({
214423
214914
  state: input.state,
214424
214915
  partUri: input.partUri,
214425
214916
  bytes: input.bytes,
@@ -214427,13 +214918,13 @@ async function buildFieldCatalogForStoryCooperatively(input) {
214427
214918
  utf8Offsets,
214428
214919
  checkpoint,
214429
214920
  diagnostics: ownerDiagnostics
214430
- });
214921
+ }) : null;
214431
214922
  if (syncWinner)
214432
214923
  return syncWinner;
214433
214924
  if (!inputsAreCurrent())
214434
214925
  return null;
214435
214926
  let sharedParagraphScan;
214436
- if (!paragraphOwnerResolver) {
214927
+ if (fieldCandidates && !paragraphOwnerResolver) {
214437
214928
  const aborted2 = Symbol("field-catalog-cooperative-aborted");
214438
214929
  try {
214439
214930
  const shared = await getOrScanPartWmlSpansCooperatively(input.state, input.partUri, async () => {
@@ -214487,7 +214978,7 @@ function listFieldCatalogsForState(state) {
214487
214978
  }
214488
214979
  return out;
214489
214980
  }
214490
- var TD50, UTF8_OFFSET_CHECKPOINT_STRIDE = 256, STATE_CACHE2, STATE_IN_FLIGHT, DECODED_PART_IN_FLIGHT;
214981
+ var TD50, UTF8_OFFSET_CHECKPOINT_STRIDE = 256, FIELD_CANDIDATE_BYTES, FIELD_CANDIDATE_SEARCHES, STATE_CACHE2, STATE_IN_FLIGHT, DECODED_PART_IN_FLIGHT;
214491
214982
  var init_field_catalog = __esm(() => {
214492
214983
  init_sd_document_state();
214493
214984
  init_xml_text();
@@ -214496,6 +214987,11 @@ var init_field_catalog = __esm(() => {
214496
214987
  init_part_wml_scan_cache();
214497
214988
  init_field_paragraph_owner();
214498
214989
  TD50 = new TextDecoder;
214990
+ FIELD_CANDIDATE_BYTES = [["fldSimple", 3], ["fldChar", 3], ["instrText", 7]];
214991
+ FIELD_CANDIDATE_SEARCHES = FIELD_CANDIDATE_BYTES.map(([token, anchorOffset]) => ({
214992
+ token: new TextEncoder().encode(token),
214993
+ anchorOffset
214994
+ }));
214499
214995
  STATE_CACHE2 = new WeakMap;
214500
214996
  STATE_IN_FLIGHT = new WeakMap;
214501
214997
  DECODED_PART_IN_FLIGHT = new WeakMap;
@@ -216135,7 +216631,10 @@ function runParagraphRangeCollapseCommit(input) {
216135
216631
  if (startOffsetMap.charToByte(op.on.startOffset) !== op.on.startByte || endOffsetMap.charToByte(op.on.endOffset) !== op.on.endByte) {
216136
216632
  return rejected8(input.txId, "base-revision-drift");
216137
216633
  }
216138
- const structuralFailure = validateRangeCollapseStructure(bytes, index.entries, start, end, changeMode, op.startObjectBoundary, op.endObjectBoundary, { allowSectionBoundary: changeMode === "direct" && op.replacementText === undefined && !deleteFullBlocks });
216634
+ const structuralFailure = validateRangeCollapseStructure(bytes, index.entries, start, end, changeMode, op.startObjectBoundary, op.endObjectBoundary, {
216635
+ allowSectionBoundary: changeMode === "direct" && op.replacementText === undefined && !deleteFullBlocks,
216636
+ inlineRange: { startOffset: op.on.startOffset, endOffset: op.on.endOffset, deleteFullBlocks: op.deleteFinalParagraphMark === true }
216637
+ });
216139
216638
  if (structuralFailure)
216140
216639
  return rejected8(input.txId, structuralFailure);
216141
216640
  let replacementBlockId;
@@ -216192,7 +216691,7 @@ function runParagraphRangeCollapseCommit(input) {
216192
216691
  op = expanded.op;
216193
216692
  start = expanded.start;
216194
216693
  end = expanded.end;
216195
- const expandedStructure = validateRangeCollapseStructure(bytes, index.entries, start, end, changeMode, undefined, undefined, { allowSectionBoundary: true });
216694
+ const expandedStructure = validateRangeCollapseStructure(bytes, index.entries, start, end, changeMode, undefined, undefined, { allowSectionBoundary: true, inlineRange: { startOffset: op.on.startOffset, endOffset: op.on.endOffset } });
216196
216695
  if (expandedStructure)
216197
216696
  return rejected8(input.txId, expandedStructure);
216198
216697
  rangeIntegrity = validateParagraphRangeIntegrity({
@@ -217577,7 +218076,15 @@ function enclosingWholeParagraphRevisions(state, entry) {
217577
218076
  if (bodyChild?.localName === "p" && bodyChild.byteStart === entry.byteStart && bodyChild.byteEnd === entry.byteEnd) {
217578
218077
  return [];
217579
218078
  }
217580
- const fragments = accessTrackedChangeCatalog(state).value.structuralByPart.get(entry.partUri) ?? [];
218079
+ const bytes = state.packageBytes.get(entry.partUri);
218080
+ const catalog = bodyChild && bytes && bodyChild.byteStart <= entry.byteStart && bodyChild.byteEnd >= entry.byteEnd ? buildTrackedChangeCatalogFromPartXml({
218081
+ xml: TD53.decode(bytes.subarray(bodyChild.byteStart, bodyChild.byteEnd)),
218082
+ partUri: entry.partUri,
218083
+ storyId: entry.storyId,
218084
+ sourceByteBase: bodyChild.byteStart,
218085
+ namespaceBindings: namespaceBindingsAtPosition(bytes, bodyChild.byteStart)
218086
+ }) : accessTrackedChangeCatalog(state).value;
218087
+ const fragments = catalog.structuralByPart.get(entry.partUri) ?? [];
217581
218088
  return fragments.flatMap((fragment3) => {
217582
218089
  if (fragment3.storyId !== entry.storyId || fragment3.structuralKind !== "paragraph-insertion" && fragment3.structuralKind !== "paragraph-deletion" || fragment3.sourceByteStart == null || fragment3.sourceByteEnd == null || fragment3.sourceByteStart > entry.byteStart || fragment3.sourceByteEnd < entry.byteEnd) {
217583
218090
  return [];
@@ -217942,6 +218449,11 @@ function validateRangeCollapseStructure(bytes, entries, start, end, changeMode,
217942
218449
  if (!options.structuralMap && directBodyRangeIsStructurallyPlain(bytes, entries, start, end, changeMode)) {
217943
218450
  return null;
217944
218451
  }
218452
+ if (options.inlineRange) {
218453
+ const failure2 = validateRangeInlineSdtProtection(bytes, entries, start, end, options.inlineRange);
218454
+ if (failure2)
218455
+ return failure2;
218456
+ }
217945
218457
  if (!options.structuralMap)
217946
218458
  recordSDTxPerf("rangeCollapseStructuralFullScans", 1);
217947
218459
  const map3 = options.structuralMap ?? buildStructuralBoundaryMap(bytes);
@@ -218013,6 +218525,46 @@ function validateRangeCollapseStructure(bytes, entries, start, end, changeMode,
218013
218525
  }
218014
218526
  return null;
218015
218527
  }
218528
+ function validateRangeInlineSdtProtection(bytes, entries, start, end, range) {
218529
+ for (const entry of entries) {
218530
+ if (entry.ordinal < start.ordinal || entry.ordinal > end.ordinal)
218531
+ continue;
218532
+ const xml = decodeByteRange(bytes, entry.byteStart, entry.byteEnd);
218533
+ if (!/<\s*(?:[\w.-]+:)?sdt\b/.test(xml))
218534
+ continue;
218535
+ const namespaces = namespaceBindingsAtPosition(bytes, entry.byteStart, matchParagraphOpenTag(xml) ?? "");
218536
+ const selectedStart = entry.blockId === start.blockId ? range.startOffset : 0;
218537
+ const selectedEnd = entry.blockId === end.blockId ? range.endOffset : entry.textLength;
218538
+ const wholeParagraph = range.deleteFullBlocks === true || entry.ordinal > start.ordinal && entry.ordinal < end.ordinal;
218539
+ const visit = (pieces) => {
218540
+ for (const piece of pieces) {
218541
+ if (piece.kind !== "container" && piece.kind !== "tracked")
218542
+ continue;
218543
+ if (piece.kind === "container" && piece.containerKind === "sdt") {
218544
+ const touched = wholeParagraph || (piece.visibleStart === piece.visibleEnd ? (entry.blockId !== start.blockId || selectedStart < piece.visibleStart) && piece.visibleEnd <= selectedEnd : selectedStart < piece.visibleEnd && piece.visibleStart < selectedEnd);
218545
+ if (!touched)
218546
+ continue;
218547
+ const policy = classifySdtMutationPolicy(piece);
218548
+ if (!policy.ok)
218549
+ return policy.reason;
218550
+ if (!policy.wrapperDeletable)
218551
+ return "text-range-in-sdt";
218552
+ const wholeWrapper = wholeParagraph || selectedStart <= piece.visibleStart && piece.visibleEnd <= selectedEnd;
218553
+ if (!wholeWrapper && !policy.contentEditable)
218554
+ return "text-range-in-sdt";
218555
+ }
218556
+ const failure3 = visit(piece.children);
218557
+ if (failure3)
218558
+ return failure3;
218559
+ }
218560
+ return null;
218561
+ };
218562
+ const failure2 = visit(parseParagraphInlineMap(xml, namespaces).pieces);
218563
+ if (failure2)
218564
+ return failure2;
218565
+ }
218566
+ return null;
218567
+ }
218016
218568
  function directBodyRangeIsStructurallyPlain(bytes, entries, start, end, changeMode) {
218017
218569
  if (!Number.isSafeInteger(start.ordinal) || !Number.isSafeInteger(end.ordinal) || start.ordinal < 0 || end.ordinal <= start.ordinal || end.ordinal >= entries.length || entries[start.ordinal]?.blockId !== start.blockId || entries[start.ordinal]?.byteStart !== start.byteStart || entries[start.ordinal]?.byteEnd !== start.byteEnd || entries[end.ordinal]?.blockId !== end.blockId || entries[end.ordinal]?.byteStart !== end.byteStart || entries[end.ordinal]?.byteEnd !== end.byteEnd || !Number.isSafeInteger(start.byteStart) || !Number.isSafeInteger(end.byteEnd) || start.byteStart < 0 || end.byteEnd <= start.byteStart || end.byteEnd > bytes.byteLength)
218018
218570
  return false;
@@ -224330,7 +224882,7 @@ function runBodyStep(input, storyId, noteId, step2, changeMode, options, pushHis
224330
224882
  if ((step2.kind === "edit" || step2.kind === "formatEdit") && step2.targetRunXml !== undefined) {
224331
224883
  const before = liveCompareBodyRunXml(state, storyId, step2.blockId);
224332
224884
  const partBytes = state.packageBytes.get(storyPartUriFromStoryId2(storyId));
224333
- if (before !== undefined && partBytes && inspectInlineControlRemoval(before, step2.targetRunXml, textboxNamespaceBindingsFromPartBytes(partBytes))) {
224885
+ if (before !== undefined && partBytes && (inspectInlineControlRemoval(before, step2.targetRunXml, textboxNamespaceBindingsFromPartBytes(partBytes)) || inspectInlineControlReplay(before, step2.targetRunXml, textboxNamespaceBindingsFromPartBytes(partBytes)))) {
224334
224886
  return runInlineControlRemovalCommit(input, storyId, step2, changeMode, options, pushHistory);
224335
224887
  }
224336
224888
  }
@@ -225091,6 +225643,134 @@ function retainedNoteMarkerRuns(oldRuns, targetRuns, storyId) {
225091
225643
  targetRuns: targetMarker.remainingRunXml
225092
225644
  };
225093
225645
  }
225646
+ function equivalentSimpleRunContent(before, after) {
225647
+ const previous = parseSimpleRunTokens(before), next = parseSimpleRunTokens(after);
225648
+ if (!previous || !next)
225649
+ return false;
225650
+ const spans = (tokens) => tokens.flatMap((token) => Array.from(token.text, (char) => `${canonicalizeXmlForSignature(token.openTag)}:${char}`));
225651
+ const old = spans(previous), target = spans(next);
225652
+ return old.length === target.length && old.every((value, index) => value === target[index]);
225653
+ }
225654
+ function inlineComparePieces(proof) {
225655
+ const pieces = [];
225656
+ const gap = (before, roots, rootOffset) => {
225657
+ const tokens = parseSimpleRunTokens(before);
225658
+ if (!tokens)
225659
+ return false;
225660
+ const oldText = tokens.map((token) => token.text).join("");
225661
+ const targets = roots.map((xml, index) => {
225662
+ const control2 = proof.inserted.find((item) => item.index === index + rootOffset);
225663
+ const text = projectCompareReplayCurrentText(control2?.contentXml ?? xml);
225664
+ return text === null ? null : { xml, control: control2, text };
225665
+ });
225666
+ if (targets.some((item) => item === null))
225667
+ return false;
225668
+ const nextText = targets.map((item) => item.text).join("");
225669
+ const operations = getWordChanges(oldText, nextText);
225670
+ const mapOffset = (offset) => {
225671
+ let oldCursor3 = 0, nextCursor3 = 0;
225672
+ for (const op of operations) {
225673
+ const start = op.type === "insert" ? op.insertAt : op.oldFrom;
225674
+ const equalEnd = nextCursor3 + start - oldCursor3;
225675
+ if (offset < equalEnd)
225676
+ return oldCursor3 + offset - nextCursor3;
225677
+ const oldEnd = op.type === "insert" ? start : op.oldTo;
225678
+ const nextEnd = equalEnd + (op.type === "delete" ? 0 : op.newText.length);
225679
+ if (offset < nextEnd)
225680
+ return start;
225681
+ oldCursor3 = oldEnd;
225682
+ nextCursor3 = nextEnd;
225683
+ }
225684
+ return oldCursor3 + offset - nextCursor3;
225685
+ };
225686
+ let oldCursor2 = 0, nextCursor2 = 0;
225687
+ let ordinaryTarget = "";
225688
+ const appendOrdinary = (end) => {
225689
+ pieces.push({
225690
+ beforeXml: renderCompareRunRange(tokens, oldCursor2, end, "passthrough"),
225691
+ afterXml: ordinaryTarget,
225692
+ ordinary: true
225693
+ });
225694
+ ordinaryTarget = "";
225695
+ oldCursor2 = end;
225696
+ };
225697
+ for (const target of targets) {
225698
+ if (!target)
225699
+ return false;
225700
+ if (!target.control) {
225701
+ ordinaryTarget += target.xml;
225702
+ nextCursor2 += target.text.length;
225703
+ continue;
225704
+ }
225705
+ const start = mapOffset(nextCursor2), end = mapOffset(nextCursor2 + target.text.length);
225706
+ if (start < oldCursor2 || end < start || end > oldText.length)
225707
+ return false;
225708
+ appendOrdinary(start);
225709
+ const selected = renderCompareRunRange(tokens, start, end, "passthrough");
225710
+ if (equivalentSimpleRunContent(selected, target.control.contentXml)) {
225711
+ pieces.push({ beforeXml: target.control.contentXml, afterXml: target.xml });
225712
+ } else {
225713
+ pieces.push({ beforeXml: selected, afterXml: "", ordinary: true });
225714
+ pieces.push({ beforeXml: "", afterXml: target.xml });
225715
+ }
225716
+ oldCursor2 = end;
225717
+ nextCursor2 += target.text.length;
225718
+ }
225719
+ appendOrdinary(oldText.length);
225720
+ return true;
225721
+ };
225722
+ let oldCursor = 0, nextCursor = 0;
225723
+ for (const anchor of proof.anchors) {
225724
+ if (!gap(proof.beforeRoots.slice(oldCursor, anchor.beforeIndex).join(""), proof.afterRoots.slice(nextCursor, anchor.afterIndex), nextCursor))
225725
+ return null;
225726
+ if (anchor.changed) {
225727
+ pieces.push({ beforeXml: anchor.before.xml, afterXml: anchor.after.xml });
225728
+ } else
225729
+ pieces.push({ beforeXml: anchor.before.xml, afterXml: anchor.before.xml });
225730
+ oldCursor = anchor.beforeIndex + 1;
225731
+ nextCursor = anchor.afterIndex + 1;
225732
+ }
225733
+ if (!gap(proof.beforeRoots.slice(oldCursor).join(""), proof.afterRoots.slice(nextCursor), nextCursor))
225734
+ return null;
225735
+ return pieces;
225736
+ }
225737
+ function inspectInlineControlCompareBodyReplay(bytes, startByte, endByte, targetRunXml) {
225738
+ const xml = TD60.decode(bytes);
225739
+ const start = TD60.decode(bytes.subarray(0, startByte)).length;
225740
+ const end = start + TD60.decode(bytes.subarray(startByte, endByte)).length;
225741
+ const parsed = collectXmlElementRanges(xml);
225742
+ if (parsed.errors.length)
225743
+ return null;
225744
+ const body = parsed.ranges.find((range) => range.tag.namespaceUri === NS_W && range.tag.localName === "body");
225745
+ if (!body || !directXmlChildRanges(parsed.ranges, body).some((range) => range.start === start && range.end === end && range.tag.namespaceUri === NS_W && range.tag.localName === "p"))
225746
+ return null;
225747
+ const proof = inspectInlineControlReplay(extractCompareParagraphRunXml(xml.slice(start, end)), targetRunXml, textboxNamespaceBindingsFromPartBytes(bytes));
225748
+ if (!proof)
225749
+ return null;
225750
+ const counts = new Map;
225751
+ for (const range of parsed.ranges) {
225752
+ if (range.tag.namespaceUri !== NS_W || range.tag.localName !== "sdtPr")
225753
+ continue;
225754
+ for (const id of directXmlChildRanges(parsed.ranges, range).filter((child) => child.tag.namespaceUri === NS_W && child.tag.localName === "id")) {
225755
+ const raw = readXmlAttribute(id.tag, NS_W, "val")?.value;
225756
+ if (raw !== undefined && /^-?\d+$/.test(raw) && Number.isSafeInteger(Number(raw))) {
225757
+ const key2 = String(Number(raw));
225758
+ counts.set(key2, (counts.get(key2) ?? 0) + 1);
225759
+ }
225760
+ }
225761
+ }
225762
+ if (proof.anchors.some((anchor) => counts.get(anchor.before.id) !== 1) || proof.inserted.some((control2) => counts.has(control2.id)))
225763
+ return null;
225764
+ return proof;
225765
+ }
225766
+ function directlyOwnedBodyParagraph(bytes, startByte, endByte) {
225767
+ const xml = TD60.decode(bytes);
225768
+ const start = TD60.decode(bytes.subarray(0, startByte)).length;
225769
+ const end = start + TD60.decode(bytes.subarray(startByte, endByte)).length;
225770
+ const parsed = collectXmlElementRanges(xml);
225771
+ const body = parsed.ranges.find((range) => range.tag.namespaceUri === NS_W && range.tag.localName === "body");
225772
+ return !parsed.errors.length && !!body && directXmlChildRanges(parsed.ranges, body).some((range) => range.start === start && range.end === end && range.tag.namespaceUri === NS_W && range.tag.localName === "p");
225773
+ }
225094
225774
  function runInlineControlRemovalCommit(input, storyId, step2, changeMode, options, pushHistory) {
225095
225775
  const { state, txId } = input;
225096
225776
  const partUri = storyPartUriFromStoryId2(storyId);
@@ -225106,7 +225786,10 @@ function runInlineControlRemovalCommit(input, storyId, step2, changeMode, option
225106
225786
  const before = extractCompareParagraphRunXml(paragraph);
225107
225787
  const namespaces = textboxNamespaceBindingsFromPartBytes(bytes);
225108
225788
  const proof = inspectInlineControlRemoval(before, step2.targetRunXml, namespaces);
225109
- if (!proof || /<(?:[\w.-]+:)?\w+Change\b/.test(properties))
225789
+ const replay = inspectInlineControlCompareBodyReplay(bytes, entry.byteStart, entry.byteEnd, step2.targetRunXml);
225790
+ if (replay && !/^[0-9A-Fa-f]{8}$/.test(step2.blockId))
225791
+ return rejected14(txId, "unsupported-context");
225792
+ if (!proof && !replay || !directlyOwnedBodyParagraph(bytes, entry.byteStart, entry.byteEnd) || /<(?:[\w.-]+:)?\w+Change\b/.test(properties))
225110
225793
  return rejected14(txId, "unsupported-context");
225111
225794
  const targetProperties = step2.targetParagraphPropertiesXml === undefined ? properties : rewriteCanonicalWordprocessingPrefix(step2.targetParagraphPropertiesXml, wrapper.wordprocessingPrefix);
225112
225795
  if (!equivalentParagraphProperties(properties, targetProperties))
@@ -225119,7 +225802,9 @@ function runInlineControlRemovalCommit(input, storyId, step2, changeMode, option
225119
225802
  return rejected14(txId, "no-author-configured");
225120
225803
  const namespaceBindings = new Map(Object.entries(namespaces));
225121
225804
  namespaceBindings.set(wrapper.wordprocessingPrefix, W_NS4);
225122
- const pieces = [];
225805
+ const pieces = replay ? inlineComparePieces(replay) ?? [] : [];
225806
+ if (replay && !pieces.length)
225807
+ return rejected14(txId, "unsupported-context");
225123
225808
  const appendGap = (old, next) => {
225124
225809
  let head = 0;
225125
225810
  while (head < old.length && head < next.length && old[head] === next[head])
@@ -225136,7 +225821,7 @@ function runInlineControlRemovalCommit(input, storyId, step2, changeMode, option
225136
225821
  };
225137
225822
  let oldCursor = 0;
225138
225823
  let nextCursor = 0;
225139
- for (let index = 0;index < proof.afterRoots.length; index++) {
225824
+ for (let index = 0;proof && !replay && index < proof.afterRoots.length; index++) {
225140
225825
  const root = proof.afterRoots[index];
225141
225826
  if (!/<(?:[\w.-]+:)?sdt\b/.test(root))
225142
225827
  continue;
@@ -225148,12 +225833,33 @@ function runInlineControlRemovalCommit(input, storyId, step2, changeMode, option
225148
225833
  oldCursor = oldIndex + 1;
225149
225834
  nextCursor = index + 1;
225150
225835
  }
225151
- appendGap(proof.beforeRoots.slice(oldCursor), proof.afterRoots.slice(nextCursor));
225836
+ if (proof && !replay)
225837
+ appendGap(proof.beforeRoots.slice(oldCursor), proof.afterRoots.slice(nextCursor));
225152
225838
  const stamp = { revisionId: 0, author: serializedSessionAuthor(sourceAuthor), date: input.txTimestamp };
225153
225839
  const prepare = (revisionIds) => {
225154
225840
  let xml = "";
225155
225841
  const wordIds = [];
225156
225842
  for (const piece of pieces) {
225843
+ if (piece.beforeXml === piece.afterXml) {
225844
+ xml += piece.beforeXml;
225845
+ continue;
225846
+ }
225847
+ if (piece.ordinary && !/<(?:[\w.-]+:)?sdt\b/.test(piece.beforeXml + piece.afterXml)) {
225848
+ const result2 = renderWordLevelTrackedRunSegment(piece.beforeXml, piece.afterXml, () => {
225849
+ const delId = revisionIds?.[wordIds.length] ?? wordIds.length;
225850
+ wordIds.push(String(delId));
225851
+ const insId = revisionIds?.[wordIds.length] ?? wordIds.length;
225852
+ wordIds.push(String(insId));
225853
+ return {
225854
+ del: { rsid: delId.toString(16).padStart(8, "0"), wId: delId, author: stamp.author, date: stamp.date },
225855
+ ins: { rsid: delId.toString(16).padStart(8, "0"), wId: insId, author: stamp.author, date: stamp.date }
225856
+ };
225857
+ }, wrapper.wordprocessingPrefix);
225858
+ if (result2) {
225859
+ xml += result2.xml;
225860
+ continue;
225861
+ }
225862
+ }
225157
225863
  const result = prepareTrackedSdtXmlReplacement({
225158
225864
  beforeXml: piece.beforeXml,
225159
225865
  afterXml: piece.afterXml,
@@ -236511,7 +237217,7 @@ function resolveFragmentApplyTarget(state, op) {
236511
237217
  const index2 = paragraphIndexForPasteStory(state, target.storyId);
236512
237218
  if (!index2)
236513
237219
  return { ok: false, reason: "unsupported-context" };
236514
- const structuralFailure = validateRangeCollapseStructure(bytes, index2.entries, anchor.entry, anchor.entry, op.changeMode ?? "direct", undefined, undefined, { allowWholeParagraphReplacement: true });
237220
+ const structuralFailure = validateRangeCollapseStructure(bytes, index2.entries, anchor.entry, anchor.entry, op.changeMode ?? "direct", undefined, undefined, { allowWholeParagraphReplacement: true, inlineRange: { startOffset: 0, endOffset: anchor.entry.textLength, deleteFullBlocks: true } });
236515
237221
  if (structuralFailure)
236516
237222
  return { ok: false, reason: structuralFailure };
236517
237223
  const integrityFailure = validateFragmentRangeIntegrity({
@@ -236587,7 +237293,7 @@ function resolveFragmentApplyTarget(state, op) {
236587
237293
  const crossParagraph = startAnchor.ordinal !== endAnchor.ordinal;
236588
237294
  const replacesContent = crossParagraph || target.charOffset !== explicitEnd.charOffset;
236589
237295
  if (crossParagraph) {
236590
- const structuralFailure = validateRangeCollapseStructure(residentBytes, index.entries, startAnchor.entry, endAnchor.entry, op.changeMode ?? "direct", target.collapsedObjectBoundary, explicitEnd.objectBoundary, { allowTrackedSdtContent: true });
237296
+ const structuralFailure = validateRangeCollapseStructure(residentBytes, index.entries, startAnchor.entry, endAnchor.entry, op.changeMode ?? "direct", target.collapsedObjectBoundary, explicitEnd.objectBoundary, { allowTrackedSdtContent: true, inlineRange: { startOffset: target.charOffset, endOffset: explicitEnd.charOffset } });
236591
237297
  if (structuralFailure)
236592
237298
  return { ok: false, reason: structuralFailure };
236593
237299
  } else if (replacesContent && residentBytes) {
@@ -245201,6 +245907,116 @@ var init_review_projection_overlay = __esm(() => {
245201
245907
  });
245202
245908
 
245203
245909
  // ../../../v2/editor-core/dist/document/internal/top-level-table-topology.js
245910
+ function hasOpaqueMarkup(bytes) {
245911
+ const cached2 = OPAQUE_MARKUP_BY_BYTES.get(bytes);
245912
+ if (cached2 != null)
245913
+ return cached2;
245914
+ let opaque = false;
245915
+ for (let at = bytes.indexOf(60);at >= 0; at = bytes.indexOf(60, at + 1)) {
245916
+ if (bytes[at + 1] === 33) {
245917
+ opaque = true;
245918
+ break;
245919
+ }
245920
+ if (bytes[at + 1] !== 63)
245921
+ continue;
245922
+ const declarationStart = at === 0 || at === 3 && bytes[0] === 239 && bytes[1] === 187 && bytes[2] === 191;
245923
+ if (!declarationStart || bytes[at + 2] !== 120 || bytes[at + 3] !== 109 || bytes[at + 4] !== 108 || ![9, 10, 13, 32].includes(bytes[at + 5])) {
245924
+ opaque = true;
245925
+ break;
245926
+ }
245927
+ }
245928
+ OPAQUE_MARKUP_BY_BYTES.set(bytes, opaque);
245929
+ return opaque;
245930
+ }
245931
+ function rememberTopology(state, partUri, bytes, topology) {
245932
+ TOPOLOGY_BY_SOURCE_BYTES.set(bytes, topology);
245933
+ const SourceReference = globalThis.WeakRef;
245934
+ if (!SourceReference)
245935
+ return;
245936
+ let entries = LAST_TOPOLOGY_BY_STATE.get(state);
245937
+ if (!entries)
245938
+ LAST_TOPOLOGY_BY_STATE.set(state, entries = new Map);
245939
+ entries.set(partUri, { source: new SourceReference(bytes), topology });
245940
+ }
245941
+ function cachedTopology(state, partUri, bytes) {
245942
+ const current = TOPOLOGY_BY_SOURCE_BYTES.get(bytes);
245943
+ if (current) {
245944
+ rememberTopology(state, partUri, bytes, current);
245945
+ return current;
245946
+ }
245947
+ const previous = LAST_TOPOLOGY_BY_STATE.get(state)?.get(partUri);
245948
+ const before = previous?.source.deref();
245949
+ if (!previous || !before || hasOpaqueMarkup(before))
245950
+ return null;
245951
+ const topology = previous.topology;
245952
+ const stableIds = (ids) => ids.every((id) => /^(?:tbl|tr|tc):[0-9a-f]{8}$/i.test(id));
245953
+ if (!stableIds(topology.tableNodeIds) || topology.tableReadFacts && (!stableIds(topology.tableReadFacts.rowNodeIds) || !stableIds(topology.tableReadFacts.cellNodeIds)))
245954
+ return null;
245955
+ const oldView = new DataView(before.buffer, before.byteOffset, before.byteLength);
245956
+ const newView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
245957
+ const commonLength = Math.min(before.length, bytes.length);
245958
+ let start = 0;
245959
+ while (start + 4 <= commonLength && oldView.getUint32(start) === newView.getUint32(start))
245960
+ start += 4;
245961
+ while (start < before.length && start < bytes.length && before[start] === bytes[start])
245962
+ start += 1;
245963
+ let end = before.length;
245964
+ let nextEnd = bytes.length;
245965
+ while (end - start >= 4 && nextEnd - start >= 4 && oldView.getUint32(end - 4) === newView.getUint32(nextEnd - 4)) {
245966
+ end -= 4;
245967
+ nextEnd -= 4;
245968
+ }
245969
+ while (end > start && nextEnd > start && before[end - 1] === bytes[nextEnd - 1]) {
245970
+ end -= 1;
245971
+ nextEnd -= 1;
245972
+ }
245973
+ let preceding = start - 1;
245974
+ while (preceding >= 0 && before[preceding] !== 60)
245975
+ preceding -= 1;
245976
+ if (preceding < 0)
245977
+ return null;
245978
+ let quote = 0;
245979
+ let closed = false;
245980
+ for (let at = preceding + 1;at < start; at += 1) {
245981
+ const value = before[at];
245982
+ if (quote) {
245983
+ if (value === quote)
245984
+ quote = 0;
245985
+ } else if (value === 34 || value === 39)
245986
+ quote = value;
245987
+ else if (value === 62) {
245988
+ closed = true;
245989
+ break;
245990
+ }
245991
+ }
245992
+ if (!closed)
245993
+ return null;
245994
+ for (let index = start;index < end; index += 1)
245995
+ if (before[index] === 60 || before[index] === 62)
245996
+ return null;
245997
+ for (let index = start;index < nextEnd; index += 1)
245998
+ if (bytes[index] === 60 || bytes[index] === 62)
245999
+ return null;
246000
+ for (let index = 0;index < topology.tableByteStarts.length; index += 1) {
246001
+ if (start < topology.tableByteEnds[index] && end > topology.tableByteStarts[index])
246002
+ return null;
246003
+ if (start === end && start >= topology.tableByteStarts[index] && start <= topology.tableByteEnds[index])
246004
+ return null;
246005
+ }
246006
+ const delta = bytes.length - before.length;
246007
+ const shift = (values) => values.map((value) => value >= end ? value + delta : value);
246008
+ const rebased = {
246009
+ ...topology,
246010
+ tableByteStarts: shift(topology.tableByteStarts),
246011
+ tableByteEnds: shift(topology.tableByteEnds),
246012
+ cellByteStarts: shift(topology.cellByteStarts),
246013
+ cellBodyByteStarts: shift(topology.cellBodyByteStarts),
246014
+ cellBodyByteEnds: shift(topology.cellBodyByteEnds),
246015
+ telemetry: { ...topology.telemetry, sourceBytesScanned: bytes.length }
246016
+ };
246017
+ rememberTopology(state, partUri, bytes, rebased);
246018
+ return rebased;
246019
+ }
245204
246020
  function buildTopLevelTableTopology(bytes) {
245205
246021
  const scanner = scanTopLevelTableTopology(bytes);
245206
246022
  let step2 = scanner.next();
@@ -245221,15 +246037,15 @@ function getOrBuildTopLevelTableTopologyForStory(state, storyId) {
245221
246037
  const resolved = resolveInputs(state, storyId);
245222
246038
  if (!resolved)
245223
246039
  return null;
245224
- const { bytes } = resolved;
246040
+ const { partUri, bytes } = resolved;
245225
246041
  const nested = nestedStoryTopologyShape(state, storyId, bytes);
245226
246042
  if (nested === "table-free")
245227
246043
  return emptyStoryTopology();
245228
- const current = TOPOLOGY_BY_SOURCE_BYTES.get(bytes);
246044
+ const current = cachedTopology(state, partUri, bytes);
245229
246045
  if (current)
245230
246046
  return nested === "has-tables" ? withoutReadFacts(current) : current;
245231
246047
  const topology = buildTopLevelTableTopology(bytes);
245232
- TOPOLOGY_BY_SOURCE_BYTES.set(bytes, topology);
246048
+ rememberTopology(state, partUri, bytes, topology);
245233
246049
  return nested === "has-tables" ? withoutReadFacts(topology) : topology;
245234
246050
  }
245235
246051
  async function getOrBuildTopLevelTableTopologyForStoryCooperatively(state, storyId, yieldPoint) {
@@ -245240,13 +246056,13 @@ async function getOrBuildTopLevelTableTopologyForStoryCooperatively(state, story
245240
246056
  const nested = nestedStoryTopologyShape(state, storyId, bytes);
245241
246057
  if (nested === "table-free")
245242
246058
  return emptyStoryTopology();
245243
- const current = TOPOLOGY_BY_SOURCE_BYTES.get(bytes);
246059
+ const current = cachedTopology(state, partUri, bytes);
245244
246060
  if (current)
245245
246061
  return nested === "has-tables" ? withoutReadFacts(current) : current;
245246
246062
  const topology = await buildTopLevelTableTopologyCooperatively(bytes, yieldPoint);
245247
246063
  if (state.packageBytes.get(partUri) !== bytes)
245248
246064
  return null;
245249
- TOPOLOGY_BY_SOURCE_BYTES.set(bytes, topology);
246065
+ rememberTopology(state, partUri, bytes, topology);
245250
246066
  return nested === "has-tables" ? withoutReadFacts(topology) : topology;
245251
246067
  }
245252
246068
  function emptyStoryTopology() {
@@ -245960,12 +246776,14 @@ function sameName(bytes, start, end, otherStart, otherEnd) {
245960
246776
  }
245961
246777
  return true;
245962
246778
  }
245963
- var TD70, TOPOLOGY_BY_SOURCE_BYTES, YIELD_BYTE_INTERVAL, TABLE_MARKUP_RE, NESTED_SHAPE_BY_SOURCE_BYTES, WITHOUT_READ_FACTS, emptyTopology = null, LocalName, UNPROVED_TABLE_ELEMENT_NAMES;
246779
+ var TD70, TOPOLOGY_BY_SOURCE_BYTES, LAST_TOPOLOGY_BY_STATE, YIELD_BYTE_INTERVAL, OPAQUE_MARKUP_BY_BYTES, TABLE_MARKUP_RE, NESTED_SHAPE_BY_SOURCE_BYTES, WITHOUT_READ_FACTS, emptyTopology = null, LocalName, UNPROVED_TABLE_ELEMENT_NAMES;
245964
246780
  var init_top_level_table_topology = __esm(() => {
245965
246781
  init_sd_document_state();
245966
246782
  TD70 = new TextDecoder;
245967
246783
  TOPOLOGY_BY_SOURCE_BYTES = new WeakMap;
246784
+ LAST_TOPOLOGY_BY_STATE = new WeakMap;
245968
246785
  YIELD_BYTE_INTERVAL = 1 << 20;
246786
+ OPAQUE_MARKUP_BY_BYTES = new WeakMap;
245969
246787
  TABLE_MARKUP_RE = /<\/?(?:[\w.-]+:)?tbl[\s/>]/;
245970
246788
  NESTED_SHAPE_BY_SOURCE_BYTES = new WeakMap;
245971
246789
  WITHOUT_READ_FACTS = new WeakMap;
@@ -251975,6 +252793,19 @@ function allocateSDDocumentSessionInternalRevisionWIds(session, input) {
251975
252793
  const base2 = reserveRevisionWIdBlock(internal.state, count);
251976
252794
  return Array.from({ length: count }, (_unused, index) => base2 + index);
251977
252795
  }
252796
+ function getSDDocumentSessionInternalRevisionWIdReservations(session) {
252797
+ const internal = INTERNALS.get(session);
252798
+ if (!internal)
252799
+ throw new Error("internal: unknown SDDocumentSession instance");
252800
+ const reservations = internal.state.idReservations.revisionWIds;
252801
+ return {
252802
+ seeded: reservations.seeded,
252803
+ max: reservations.max,
252804
+ issued: new Set(reservations.issued),
252805
+ replayOwners: new Map(Array.from(reservations.replayOwners, ([id, owners]) => [id, new Set(owners)])),
252806
+ conflictedReserved: new Set(reservations.conflictedReserved)
252807
+ };
252808
+ }
251978
252809
  function applySDDocumentSessionInternalPatchGroup(session, input) {
251979
252810
  const internal = INTERNALS.get(session);
251980
252811
  if (!internal)
@@ -255970,6 +256801,7 @@ var init_sd_document_session_internal = __esm(() => {
255970
256801
  init_section_property_references();
255971
256802
  init_bibliography_style();
255972
256803
  init_bibliography_review_resources();
256804
+ init_compile_compare_apply();
255973
256805
  });
255974
256806
 
255975
256807
  // ../../../v2/document-api-v2-adapter/dist/address/story-identity.js
@@ -257225,7 +258057,7 @@ Complete new body.`,
257225
258057
  find: {
257226
258058
  memberPath: "find",
257227
258059
  description: "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.",
257228
- expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }).",
258060
+ expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }). Text hits contain only the matched text; use getNode or getNodeById for the full containing node. Node selectors return full node projections.",
257229
258061
  requiresDocumentContext: true,
257230
258062
  metadata: readOperation2({
257231
258063
  idempotency: "idempotent",
@@ -277002,7 +277834,7 @@ var init_word_bibliography = __esm(() => {
277002
277834
  ];
277003
277835
  });
277004
277836
 
277005
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/cascade.ts
277837
+ // ../../packages/layout-engine/style-engine/src/cascade.ts
277006
277838
  function combineProperties(propertiesArray, options = {}) {
277007
277839
  const { fullOverrideProps = [], specialHandling = {} } = options;
277008
277840
  if (!propertiesArray || propertiesArray.length === 0) {
@@ -277102,14 +277934,14 @@ var init_cascade = __esm(() => {
277102
277934
  ];
277103
277935
  });
277104
277936
 
277105
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/index.ts
277937
+ // ../../packages/layout-engine/style-engine/src/index.ts
277106
277938
  var sdtMetadataCache;
277107
277939
  var init_src4 = __esm(() => {
277108
277940
  init_cascade();
277109
277941
  sdtMetadataCache = new Map;
277110
277942
  });
277111
277943
 
277112
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/ooxml/table-style-selection.ts
277944
+ // ../../packages/layout-engine/style-engine/src/ooxml/table-style-selection.ts
277113
277945
  function isKnownTableStyleId(styleId, translatedLinkedStyles) {
277114
277946
  if (!styleId || !translatedLinkedStyles?.styles)
277115
277947
  return false;
@@ -277164,7 +277996,7 @@ var init_table_style_selection = __esm(() => {
277164
277996
  };
277165
277997
  });
277166
277998
 
277167
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/ooxml/index.ts
277999
+ // ../../packages/layout-engine/style-engine/src/ooxml/index.ts
277168
278000
  function resolveRunProperties(params, inlineRpr, resolvedPpr, tableInfo = null, isListNumber = false, numberingDefinedInline = false) {
277169
278001
  if (!params.translatedLinkedStyles?.styles) {
277170
278002
  return inlineRpr ?? {};
@@ -277747,7 +278579,7 @@ var init_default_floors = __esm(() => {
277747
278579
  };
277748
278580
  });
277749
278581
 
277750
- // ../../../v2/node_modules/.pnpm/sax@1.6.0/node_modules/sax/lib/sax.js
278582
+ // ../../node_modules/.pnpm/sax@1.6.0/node_modules/sax/lib/sax.js
277751
278583
  var require_sax = __commonJS((exports) => {
277752
278584
  (function(sax) {
277753
278585
  sax.parser = function(strict, opt) {
@@ -279281,7 +280113,7 @@ Char: ` + parser.c;
279281
280113
  })(typeof exports === "undefined" ? exports.sax = {} : exports);
279282
280114
  });
279283
280115
 
279284
- // ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/array-helper.js
280116
+ // ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/array-helper.js
279285
280117
  var require_array_helper = __commonJS((exports, module) => {
279286
280118
  module.exports = {
279287
280119
  isArray: function(value) {
@@ -279293,7 +280125,7 @@ var require_array_helper = __commonJS((exports, module) => {
279293
280125
  };
279294
280126
  });
279295
280127
 
279296
- // ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/options-helper.js
280128
+ // ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/options-helper.js
279297
280129
  var require_options_helper = __commonJS((exports, module) => {
279298
280130
  var isArray = require_array_helper().isArray;
279299
280131
  module.exports = {
@@ -279332,7 +280164,7 @@ var require_options_helper = __commonJS((exports, module) => {
279332
280164
  };
279333
280165
  });
279334
280166
 
279335
- // ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/xml2js.js
280167
+ // ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/xml2js.js
279336
280168
  var require_xml2js = __commonJS((exports, module) => {
279337
280169
  var sax = require_sax();
279338
280170
  var expat = { on: function() {}, parse: function() {} };
@@ -279670,7 +280502,7 @@ var require_xml2js = __commonJS((exports, module) => {
279670
280502
  };
279671
280503
  });
279672
280504
 
279673
- // ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/xml2json.js
280505
+ // ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/xml2json.js
279674
280506
  var require_xml2json = __commonJS((exports, module) => {
279675
280507
  var helper = require_options_helper();
279676
280508
  var xml2js = require_xml2js();
@@ -279695,7 +280527,7 @@ var require_xml2json = __commonJS((exports, module) => {
279695
280527
  };
279696
280528
  });
279697
280529
 
279698
- // ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/js2xml.js
280530
+ // ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/js2xml.js
279699
280531
  var require_js2xml = __commonJS((exports, module) => {
279700
280532
  var helper = require_options_helper();
279701
280533
  var isArray = require_array_helper().isArray;
@@ -280027,7 +280859,7 @@ var require_js2xml = __commonJS((exports, module) => {
280027
280859
  };
280028
280860
  });
280029
280861
 
280030
- // ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/json2xml.js
280862
+ // ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/json2xml.js
280031
280863
  var require_json2xml = __commonJS((exports, module) => {
280032
280864
  var js2xml = require_js2xml();
280033
280865
  module.exports = function(json2, options) {
@@ -280048,7 +280880,7 @@ var require_json2xml = __commonJS((exports, module) => {
280048
280880
  };
280049
280881
  });
280050
280882
 
280051
- // ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/index.js
280883
+ // ../../node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/index.js
280052
280884
  var require_lib = __commonJS((exports, module) => {
280053
280885
  var xml2js = require_xml2js();
280054
280886
  var xml2json = require_xml2json();
@@ -280062,7 +280894,7 @@ var require_lib = __commonJS((exports, module) => {
280062
280894
  };
280063
280895
  });
280064
280896
 
280065
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/ooxml/word-style-model/parse-xml.ts
280897
+ // ../../packages/layout-engine/style-engine/src/ooxml/word-style-model/parse-xml.ts
280066
280898
  function bytesToString(input) {
280067
280899
  if (typeof input === "string")
280068
280900
  return input;
@@ -280129,7 +280961,7 @@ var init_parse_xml = __esm(() => {
280129
280961
  ST_OFF = new Set(["0", "false", "off"]);
280130
280962
  });
280131
280963
 
280132
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/ooxml/word-style-model/parse-theme.ts
280964
+ // ../../packages/layout-engine/style-engine/src/ooxml/word-style-model/parse-theme.ts
280133
280965
  function parseColorPalette(theme) {
280134
280966
  if (!theme)
280135
280967
  return;
@@ -282696,7 +283528,7 @@ var init_word_style_model = __esm(() => {
282696
283528
  init_project_style_catalogue();
282697
283529
  });
282698
283530
 
282699
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/units.ts
283531
+ // ../../packages/layout-engine/style-engine/src/normalize/units.ts
282700
283532
  function twipsToPx(value) {
282701
283533
  return value * PX_PER_TWIP;
282702
283534
  }
@@ -282710,7 +283542,7 @@ var init_units = __esm(() => {
282710
283542
  PX_PER_EIGHTH_POINT = PX_PER_POINT / 8;
282711
283543
  });
282712
283544
 
282713
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/colors.ts
283545
+ // ../../packages/layout-engine/style-engine/src/normalize/colors.ts
282714
283546
  function normalizeHexColor(value) {
282715
283547
  if (value == null)
282716
283548
  return;
@@ -282787,12 +283619,12 @@ var init_colors = __esm(() => {
282787
283619
  };
282788
283620
  });
282789
283621
 
282790
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/paragraph-attrs.ts
283622
+ // ../../packages/layout-engine/style-engine/src/normalize/paragraph-attrs.ts
282791
283623
  var init_paragraph_attrs = __esm(() => {
282792
283624
  init_units();
282793
283625
  init_colors();
282794
283626
  });
282795
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/header-footer-resolution.ts
283627
+ // ../../packages/layout-engine/contracts/src/header-footer-resolution.ts
282796
283628
  function createResolutionCache() {
282797
283629
  const createVariantCache = () => ({ values: new Map, sectionIndices: [] });
282798
283630
  const createKindCache = () => ({
@@ -282970,12 +283802,12 @@ var HEADER_FOOTER_VARIANTS3;
282970
283802
  var init_header_footer_resolution = __esm(() => {
282971
283803
  HEADER_FOOTER_VARIANTS3 = ["default", "first", "even", "odd"];
282972
283804
  });
282973
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/justify-utils.ts
283805
+ // ../../packages/layout-engine/contracts/src/justify-utils.ts
282974
283806
  var SPACE_CHARS;
282975
283807
  var init_justify_utils = __esm(() => {
282976
283808
  SPACE_CHARS = new Set([" ", " "]);
282977
283809
  });
282978
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/vertical-text.ts
283810
+ // ../../packages/layout-engine/contracts/src/vertical-text.ts
282979
283811
  function normalizeBaselineShift(baselineShift) {
282980
283812
  if (!Number.isFinite(baselineShift)) {
282981
283813
  return;
@@ -282984,14 +283816,14 @@ function normalizeBaselineShift(baselineShift) {
282984
283816
  return Math.abs(normalizedShift) <= BASELINE_SHIFT_EPSILON ? undefined : normalizedShift;
282985
283817
  }
282986
283818
  var BASELINE_SHIFT_EPSILON = 0.000001;
282987
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/pm-range.ts
283819
+ // ../../packages/layout-engine/contracts/src/pm-range.ts
282988
283820
  var init_pm_range = () => {};
282989
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/graphic-placement.ts
283821
+ // ../../packages/layout-engine/contracts/src/graphic-placement.ts
282990
283822
  var init_graphic_placement = () => {};
282991
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/author-colors.ts
283823
+ // ../../packages/layout-engine/contracts/src/author-colors.ts
282992
283824
  var init_author_colors = () => {};
282993
283825
 
282994
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/semantic-colors.ts
283826
+ // ../../packages/layout-engine/contracts/src/semantic-colors.ts
282995
283827
  var TRACKED_CHANGE_CONFIGURABLE_SEMANTIC_COLOR_KEYS, CONFIGURABLE_SEMANTIC_COLOR_KEY_SET, TRACKED_CHANGE_AFFECTED_RANGE_KEYS;
282996
283828
  var init_semantic_colors = __esm(() => {
282997
283829
  init_author_colors();
@@ -283017,20 +283849,20 @@ var init_semantic_colors = __esm(() => {
283017
283849
  ]);
283018
283850
  });
283019
283851
 
283020
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/sdt-container.ts
283852
+ // ../../packages/layout-engine/contracts/src/sdt-container.ts
283021
283853
  var idlessSdtContainerKeys;
283022
283854
  var init_sdt_container = __esm(() => {
283023
283855
  idlessSdtContainerKeys = new WeakMap;
283024
283856
  });
283025
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/page-number-formatting.ts
283857
+ // ../../packages/layout-engine/contracts/src/page-number-formatting.ts
283026
283858
  var init_page_number_formatting = () => {};
283027
283859
 
283028
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/page-ref-anchor.ts
283860
+ // ../../packages/layout-engine/contracts/src/page-ref-anchor.ts
283029
283861
  var init_page_ref_anchor = __esm(() => {
283030
283862
  init_pm_range();
283031
283863
  });
283032
283864
 
283033
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/drawing-taxonomy.ts
283865
+ // ../../packages/layout-engine/contracts/src/drawing-taxonomy.ts
283034
283866
  var DRAWING_DIAGNOSTIC_CODES, DRAWING_DIAGNOSTIC_CODE_ALIASES, DRAWING_SUPPORT_TAXONOMY, DRAWING_FAMILIES;
283035
283867
  var init_drawing_taxonomy = __esm(() => {
283036
283868
  DRAWING_DIAGNOSTIC_CODES = {
@@ -283259,7 +284091,7 @@ var init_drawing_taxonomy = __esm(() => {
283259
284091
  };
283260
284092
  DRAWING_FAMILIES = Object.keys(DRAWING_SUPPORT_TAXONOMY);
283261
284093
  });
283262
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/incremental-dependency.ts
284094
+ // ../../packages/layout-engine/contracts/src/incremental-dependency.ts
283263
284095
  var PAGE_CHECKPOINT_DEPENDENCY_CLASSES, INCREMENTAL_DEPENDENCY_CERTIFICATE_CLASSES, DRAWING_KINDS, CERTIFICATE_CLASSES;
283264
284096
  var init_incremental_dependency = __esm(() => {
283265
284097
  PAGE_CHECKPOINT_DEPENDENCY_CLASSES = Object.freeze([
@@ -283289,10 +284121,10 @@ var init_incremental_dependency = __esm(() => {
283289
284121
  DRAWING_KINDS = new Set(["image", "vectorShape", "textboxShape", "shapeGroup", "chart"]);
283290
284122
  CERTIFICATE_CLASSES = new Set(INCREMENTAL_DEPENDENCY_CERTIFICATE_CLASSES);
283291
284123
  });
283292
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/engines/index.ts
284124
+ // ../../packages/layout-engine/contracts/src/engines/index.ts
283293
284125
  var init_engines = () => {};
283294
284126
 
283295
- // ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/index.ts
284127
+ // ../../packages/layout-engine/contracts/src/index.ts
283296
284128
  var SHAPE_TEXT_BASELINE_WARP_PRESETS, SHAPE_TEXT_SINGLE_BAND_ENVELOPE_WARP_PRESETS;
283297
284129
  var init_src5 = __esm(() => {
283298
284130
  init_header_footer_resolution();
@@ -283315,7 +284147,7 @@ var init_src5 = __esm(() => {
283315
284147
  SHAPE_TEXT_SINGLE_BAND_ENVELOPE_WARP_PRESETS = new Set(["textButton"]);
283316
284148
  });
283317
284149
 
283318
- // ../../../v2/node_modules/.pnpm/@superdoc+font-utils@file+..+public+shared+font-utils/node_modules/@superdoc/font-utils/index.js
284150
+ // ../../shared/font-utils/index.js
283319
284151
  function mapWordFamilyFallback(wordFamily) {
283320
284152
  if (!wordFamily)
283321
284153
  return DEFAULT_GENERIC_FALLBACK;
@@ -283409,7 +284241,7 @@ var init_font_utils = __esm(() => {
283409
284241
  ]);
283410
284242
  });
283411
284243
 
283412
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/run-attrs.ts
284244
+ // ../../packages/layout-engine/style-engine/src/normalize/run-attrs.ts
283413
284245
  function normalizeRunAttrsFromOoxml(props, context = {}) {
283414
284246
  const out = {};
283415
284247
  if (!props)
@@ -283676,7 +284508,7 @@ var init_run_attrs = __esm(() => {
283676
284508
  };
283677
284509
  });
283678
284510
 
283679
- // ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/index.ts
284511
+ // ../../packages/layout-engine/style-engine/src/normalize/index.ts
283680
284512
  var init_normalize = __esm(() => {
283681
284513
  init_paragraph_attrs();
283682
284514
  init_run_attrs();
@@ -294618,6 +295450,47 @@ var init_logical_view_cache = __esm(() => {
294618
295450
  });
294619
295451
 
294620
295452
  // ../../../v2/document-api-v2-adapter/dist/tracked-changes/receipt-entities.js
295453
+ function projectFreshTrackedParagraphSplitEntityId(context, txId, headBlockId, tailBlockId, refs) {
295454
+ const tracked = refs.filter((ref6) => ref6.kind === "trackedChange");
295455
+ if (tracked.length !== 1)
295456
+ return null;
295457
+ const ref5 = tracked[0];
295458
+ const history = getSDDocumentSessionInternalHistoryEntry(context.session, txId);
295459
+ if (history?.forwardPatchGroup.source.kind !== "paragraphSplit")
295460
+ return null;
295461
+ if (history.forwardPatchGroup.source.offset === 0)
295462
+ return null;
295463
+ const index = getSDDocumentSessionInternalStoryParagraphIndex(context.session, ref5.storyId);
295464
+ const head = index?.byParaId(headBlockId);
295465
+ const tail = index?.byParaId(tailBlockId);
295466
+ if (!head || !tail || index?.duplicateParaIds.has(headBlockId) || index?.duplicateParaIds.has(tailBlockId) || head.directBodyChildOrdinal == null || tail.directBodyChildOrdinal !== head.directBodyChildOrdinal + 1 || head.partUri !== tail.partUri || head.storyId !== tail.storyId || head.storyId !== ref5.storyId)
295467
+ return null;
295468
+ const part = history.forwardPatchGroup.perPart[head.partUri];
295469
+ const patch = part?.kind === "modify" && part.patches.length === 1 ? part.patches[0] : null;
295470
+ const bytes = getSDDocumentSessionInternalPartBytes(context.session, head.partUri);
295471
+ if (!bytes || patch?.kind !== "replaceBytes" || patch.startByte !== head.byteStart)
295472
+ return null;
295473
+ const committed = bytes.subarray(head.byteStart, tail.byteEnd);
295474
+ if (committed.length !== patch.bytes.length || !committed.every((byte, offset) => byte === patch.bytes[offset]))
295475
+ return null;
295476
+ const input = {
295477
+ xml: receiptDecoder.decode(committed),
295478
+ partUri: head.partUri,
295479
+ storyId: head.storyId,
295480
+ wordId: ref5.entityId,
295481
+ replacementMode: resolveReplacementMode(context.trackedChangesReplacementMode)
295482
+ };
295483
+ const standalone = buildIsolatedTrackedParagraphSplitLogicalId(input);
295484
+ if (standalone)
295485
+ return standalone;
295486
+ const reservations = getSDDocumentSessionInternalRevisionWIdReservations(context.session);
295487
+ const authoredWordIds = new Set([...reservations.issued].filter((id) => !reservations.conflictedReserved.has(id) && !reservations.replayOwners.has(id)));
295488
+ return buildBoundedTrackedParagraphRangeReceiptProjection({
295489
+ ...input,
295490
+ authoredWordIds,
295491
+ namespaceBindings: getSDDocumentSessionInternalMainStoryRootNamespaceBindings(context.session) ?? undefined
295492
+ })?.id ?? null;
295493
+ }
294621
295494
  function projectTrackedStructuralEntityIds(context, rawEntityIds) {
294622
295495
  if (rawEntityIds.length === 0)
294623
295496
  return [];
@@ -295239,7 +296112,7 @@ function buildTableCellRangeFromMatches(matches) {
295239
296112
  end: { rowIndex: maxRow, columnIndex: maxColumn }
295240
296113
  };
295241
296114
  }
295242
- function selectionIsStructurallyOutsideTables(blockIds, index, session) {
296115
+ function selectionIsStructurallyOutsideTables(blockIds, index, session, maxScanBytes = Number.POSITIVE_INFINITY) {
295243
296116
  if (blockIds.length === 0)
295244
296117
  return false;
295245
296118
  const entries = [];
@@ -295252,10 +296125,12 @@ function selectionIsStructurallyOutsideTables(blockIds, index, session) {
295252
296125
  const partUri = entries[0].partUri;
295253
296126
  if (entries.some((entry) => entry.partUri !== partUri))
295254
296127
  return false;
296128
+ const scanEnd = Math.max(...entries.map((entry) => entry.byteEnd));
296129
+ if (scanEnd > maxScanBytes)
296130
+ return false;
295255
296131
  const bytes = getSDDocumentSessionInternalPartBytes(session, partUri);
295256
296132
  if (!bytes)
295257
296133
  return false;
295258
- const scanEnd = Math.max(...entries.map((entry) => entry.byteEnd));
295259
296134
  const contexts = buildStructuralBoundaryMap(bytes.subarray(0, scanEnd)).contexts;
295260
296135
  return entries.every((entry) => {
295261
296136
  const structural = contexts[entry.ordinal];
@@ -295405,6 +296280,9 @@ class V2TablesAdapter {
295405
296280
  const index = story.storyKind === "main" ? getSDDocumentSessionInternalParagraphIndex(session) : getSDDocumentSessionInternalStoryParagraphIndex(session, story.storyId);
295406
296281
  if (!index)
295407
296282
  return EMPTY_TABLE_CONTEXT_AT_SELECTION;
296283
+ if (!input.selectionTextBounds && story.storyKind === "main" && selectionIsStructurallyOutsideTables(input.blockIds, index, session, 128 * 1024)) {
296284
+ return EMPTY_TABLE_CONTEXT_AT_SELECTION;
296285
+ }
295408
296286
  if (!input.selectionTextBounds && (story.storyKind === "main" || story.storyKind === "header" || story.storyKind === "footer")) {
295409
296287
  const proved = readTableContextFromTopology(readTopLevelTableTopologyForSession(session, story.storyId), index, input.blockIds);
295410
296288
  if (proved)
@@ -300485,14 +301363,14 @@ var init_formatting = __esm(() => {
300485
301363
  ];
300486
301364
  PROJECTION_FONT_TABLE_PART_INDEX = STYLE_SIDECAR_PART_URIS.length;
300487
301365
  });
300488
- // ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/unit-conversions.ts
301366
+ // ../../packages/word-layout/src/unit-conversions.ts
300489
301367
  var TWIPS_PER_INCH = 1440, PIXELS_PER_INCH = 96, TWIPS_PER_POINT2 = 20, POINTS_PER_TWIP, TWIPS_PER_PIXEL, PIXELS_PER_TWIP;
300490
301368
  var init_unit_conversions = __esm(() => {
300491
301369
  POINTS_PER_TWIP = 1 / TWIPS_PER_POINT2;
300492
301370
  TWIPS_PER_PIXEL = Math.round(TWIPS_PER_INCH / PIXELS_PER_INCH);
300493
301371
  PIXELS_PER_TWIP = 1 / TWIPS_PER_PIXEL;
300494
301372
  });
300495
- // ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/numbering-manager.ts
301373
+ // ../../packages/word-layout/src/numbering-manager.ts
300496
301374
  function persistentTrieHash(key2) {
300497
301375
  let hash2 = 2166136261;
300498
301376
  for (let index = 0;index < key2.length; index += 1) {
@@ -301120,7 +301998,7 @@ var init_numbering_manager = __esm(() => {
301120
301998
  });
301121
301999
  });
301122
302000
 
301123
- // ../../../v2/node_modules/.pnpm/@superdoc+common@file+..+public+shared+common/node_modules/@superdoc/common/list-numbering/index.ts
302001
+ // ../../shared/common/list-numbering/index.ts
301124
302002
  var handleDecimal = (path6, lvlText) => generateNumbering(path6, lvlText, numberToStringFormatter), handleRoman = (path6, lvlText) => generateNumbering(path6, lvlText, intToRoman), handleLowerRoman = (path6, lvlText) => {
301125
302003
  const result = handleRoman(path6, lvlText);
301126
302004
  return result ? result.toLowerCase() : null;
@@ -301422,7 +302300,7 @@ var init_list_numbering = __esm(() => {
301422
302300
  normalizeChars = new Set(["", "", "○", "o", "■", "□"]);
301423
302301
  });
301424
302302
 
301425
- // ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/list-marker.ts
302303
+ // ../../packages/word-layout/src/list-marker.ts
301426
302304
  function computeWordListMarker(input) {
301427
302305
  const { definition, manager, paragraphOrdinal } = input;
301428
302306
  if (definition.ancestorStartSettings) {
@@ -301499,7 +302377,7 @@ var init_list_marker = __esm(() => {
301499
302377
  init_list_numbering();
301500
302378
  });
301501
302379
 
301502
- // ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/review-aware-numbering.ts
302380
+ // ../../packages/word-layout/src/review-aware-numbering.ts
301503
302381
  function createReviewAwareWordNumberingSequence(options = {}) {
301504
302382
  const stateMode = options.stateMode ?? "snapshot";
301505
302383
  let live = createManager(stateMode);
@@ -301596,7 +302474,7 @@ var init_review_aware_numbering = __esm(() => {
301596
302474
  init_numbering_manager();
301597
302475
  });
301598
302476
 
301599
- // ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/index.ts
302477
+ // ../../packages/word-layout/src/index.ts
301600
302478
  var init_src7 = __esm(() => {
301601
302479
  init_unit_conversions();
301602
302480
  init_unit_conversions();
@@ -302289,6 +303167,21 @@ var init_numbering_stories = __esm(() => {
302289
303167
  function isParagraphNodeType(nodeType) {
302290
303168
  return PARAGRAPH_TYPES.has(nodeType);
302291
303169
  }
303170
+ function blockNumberingCache(context, storyId, index) {
303171
+ if (getSDDocumentSessionInternalSourceCompletePosture(context.session) !== "source-complete")
303172
+ return null;
303173
+ const revision = String(getSDDocumentSessionInternalPackageRevision(context.session));
303174
+ const reviewRevision = JSON.stringify(getSDDocumentSessionInternalReviewProjectionRevision(context.session));
303175
+ const styleModel = projectionStyleModel(context);
303176
+ const mutationSerial = context.currentMutationSerial();
303177
+ const key2 = context.session;
303178
+ const existing = BLOCK_NUMBERING_CACHE.get(key2);
303179
+ if (existing?.revision === revision && existing.reviewRevision === reviewRevision && existing.styleModel === styleModel && existing.mutationSerial === mutationSerial && existing.storyId === storyId && existing.paragraphIndex === index)
303180
+ return existing;
303181
+ const cached2 = { revision, reviewRevision, styleModel, mutationSerial, storyId, paragraphIndex: index, modes: new Map };
303182
+ BLOCK_NUMBERING_CACHE.set(key2, cached2);
303183
+ return cached2;
303184
+ }
302292
303185
  function blocksListQueryKey(input) {
302293
303186
  const nodeTypes = input?.nodeTypes && input.nodeTypes.length > 0 ? input.nodeTypes : null;
302294
303187
  const limit = input?.limit != null && input.limit > 0 ? input.limit : null;
@@ -302311,6 +303204,10 @@ function captureParagraphIndexMaterialization(index) {
302311
303204
  };
302312
303205
  }
302313
303206
  function buildReviewAwareBlockNumbering(context, storyId, index, storyByteRange, reviewMode) {
303207
+ const cache = storyByteRange ? null : blockNumberingCache(context, storyId, index);
303208
+ const cached2 = cache?.modes.get(reviewMode);
303209
+ if (cached2)
303210
+ return cached2;
302314
303211
  const stories = blockNumberingStories(context, storyId, index);
302315
303212
  const tableContexts = new Map;
302316
303213
  for (const story of stories) {
@@ -302335,12 +303232,19 @@ function buildReviewAwareBlockNumbering(context, storyId, index, storyByteRange,
302335
303232
  rawXml: readParagraphXml(context, partUriBytes, entry)
302336
303233
  }, tableContext.resolver?.resolve(entry), source.storyId);
302337
303234
  }
302338
- return projector.result();
303235
+ const result = projector.result();
303236
+ cache?.modes.set(reviewMode, result);
303237
+ return result;
302339
303238
  }
302340
303239
  async function buildReviewAwareBlockNumberingCooperatively(context, storyId, index, reviewMode, yieldPoint, inputsAreCurrent) {
303240
+ const cache = blockNumberingCache(context, storyId, index);
303241
+ const cached2 = cache?.modes.get(reviewMode);
303242
+ if (cached2 && inputsAreCurrent())
303243
+ return cached2;
302341
303244
  const stories = blockNumberingStories(context, storyId, index);
302342
303245
  const sources = stories.map((story) => paragraphIndexEntrySource(story.index));
302343
- const current = () => inputsAreCurrent() && sources.every((source) => source.isCurrent());
303246
+ const reviewRevision = JSON.stringify(getSDDocumentSessionInternalReviewProjectionRevision(context.session));
303247
+ const current = () => inputsAreCurrent() && JSON.stringify(getSDDocumentSessionInternalReviewProjectionRevision(context.session)) === reviewRevision && sources.every((source) => source.isCurrent());
302344
303248
  const gate = createCooperativeSliceGate(yieldPoint);
302345
303249
  const tableContexts = new Map;
302346
303250
  for (const story of stories) {
@@ -302365,7 +303269,13 @@ async function buildReviewAwareBlockNumberingCooperatively(context, storyId, ind
302365
303269
  if (!current())
302366
303270
  return null;
302367
303271
  }
302368
- return current() ? projector.result() : null;
303272
+ if (!current())
303273
+ return null;
303274
+ const result = projector.result();
303275
+ if (cache && blockNumberingCache(context, storyId, index) !== cache)
303276
+ return null;
303277
+ cache?.modes.set(reviewMode, result);
303278
+ return result;
302369
303279
  }
302370
303280
  function readBlockNumberingTableContext(context, storyId, index) {
302371
303281
  const model = projectionStyleModel(context);
@@ -302962,7 +303872,13 @@ class V2BlocksAdapter {
302962
303872
  if (!tailParaId) {
302963
303873
  return failure3("INTERNAL_ERROR", "paragraph split did not return a created paragraph id.");
302964
303874
  }
302965
- const trackedChangeRefs = readTrackedChangeRefs(this.context, receipt3.createdRefs ?? [], resolved.story);
303875
+ const localSplitId = projectFreshTrackedParagraphSplitEntityId(this.context, receipt3.txId, input.target.nodeId, tailParaId, receipt3.createdRefs ?? []);
303876
+ const trackedChangeRefs = localSplitId ? [{
303877
+ kind: "entity",
303878
+ entityType: "trackedChange",
303879
+ entityId: localSplitId,
303880
+ ...resolved.story ? { story: resolved.story } : {}
303881
+ }] : readTrackedChangeRefs(this.context, receipt3.createdRefs ?? [], resolved.story);
302966
303882
  return attachStructuralCommitDiagnostics({
302967
303883
  success: true,
302968
303884
  inserted: {
@@ -304135,7 +305051,7 @@ function readTailParaId(provisionalToFinal, createdRefs) {
304135
305051
  }
304136
305052
  return null;
304137
305053
  }
304138
- var TD87, PARAGRAPH_TYPES, TOP_LEVEL_LIST_ROWS_CACHE;
305054
+ var TD87, PARAGRAPH_TYPES, TOP_LEVEL_LIST_ROWS_CACHE, BLOCK_NUMBERING_CACHE;
304139
305055
  var init_adapter5 = __esm(() => {
304140
305056
  init_sd_document_session_internal();
304141
305057
  init_adapter3();
@@ -304159,6 +305075,7 @@ var init_adapter5 = __esm(() => {
304159
305075
  TD87 = new TextDecoder;
304160
305076
  PARAGRAPH_TYPES = new Set(["paragraph", "heading", "listItem"]);
304161
305077
  TOP_LEVEL_LIST_ROWS_CACHE = new WeakMap;
305078
+ BLOCK_NUMBERING_CACHE = new WeakMap;
304162
305079
  });
304163
305080
 
304164
305081
  // ../../../v2/document-api-v2-adapter/dist/paragraph-run-boundary.js
@@ -304180,7 +305097,7 @@ function readRunOpenTagAndProperties(xml, runStart) {
304180
305097
  return { runOpenTag, runProperties: propertiesMatch ? propertiesMatch[1] : "" };
304181
305098
  }
304182
305099
 
304183
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/unicode.js
305100
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/unicode.js
304184
305101
  function isSurrogate(cp) {
304185
305102
  return cp >= 55296 && cp <= 57343;
304186
305103
  }
@@ -304272,7 +305189,7 @@ var init_unicode = __esm(() => {
304272
305189
  };
304273
305190
  });
304274
305191
 
304275
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/error-codes.js
305192
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/error-codes.js
304276
305193
  var ERR;
304277
305194
  var init_error_codes = __esm(() => {
304278
305195
  (function(ERR2) {
@@ -304339,7 +305256,7 @@ var init_error_codes = __esm(() => {
304339
305256
  })(ERR || (ERR = {}));
304340
305257
  });
304341
305258
 
304342
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/preprocessor.js
305259
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/preprocessor.js
304343
305260
  class Preprocessor {
304344
305261
  constructor(handler) {
304345
305262
  this.handler = handler;
@@ -304512,7 +305429,7 @@ var init_preprocessor = __esm(() => {
304512
305429
  DEFAULT_BUFFER_WATERLINE = 1 << 16;
304513
305430
  });
304514
305431
 
304515
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/token.js
305432
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/token.js
304516
305433
  function getTokenAttr(token, attrName) {
304517
305434
  for (let i2 = token.attrs.length - 1;i2 >= 0; i2--) {
304518
305435
  if (token.attrs[i2].name === attrName) {
@@ -304536,7 +305453,7 @@ var init_token = __esm(() => {
304536
305453
  })(TokenType || (TokenType = {}));
304537
305454
  });
304538
305455
 
304539
- // ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode-codepoint.js
305456
+ // ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode-codepoint.js
304540
305457
  function replaceCodePoint(codePoint) {
304541
305458
  if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
304542
305459
  return 65533;
@@ -304577,7 +305494,7 @@ var init_decode_codepoint = __esm(() => {
304577
305494
  ]);
304578
305495
  });
304579
305496
 
304580
- // ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/decode-shared.js
305497
+ // ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/decode-shared.js
304581
305498
  function decodeBase64(input) {
304582
305499
  const binary = atob(input);
304583
305500
  const evenLength = binary.length & ~1;
@@ -304590,13 +305507,13 @@ function decodeBase64(input) {
304590
305507
  return out;
304591
305508
  }
304592
305509
 
304593
- // ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-html.js
305510
+ // ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-html.js
304594
305511
  var htmlDecodeTree;
304595
305512
  var init_decode_data_html = __esm(() => {
304596
305513
  htmlDecodeTree = /* @__PURE__ */ decodeBase64("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1Af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vKC8AoA0gagAAoAwg");
304597
305514
  });
304598
305515
 
304599
- // ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/bin-trie-flags.js
305516
+ // ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/bin-trie-flags.js
304600
305517
  var BinTrieFlags;
304601
305518
  var init_bin_trie_flags = __esm(() => {
304602
305519
  (function(BinTrieFlags2) {
@@ -304607,7 +305524,7 @@ var init_bin_trie_flags = __esm(() => {
304607
305524
  })(BinTrieFlags || (BinTrieFlags = {}));
304608
305525
  });
304609
305526
 
304610
- // ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode.js
305527
+ // ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode.js
304611
305528
  function isNumber(code) {
304612
305529
  return code >= CharCodes.ZERO && code <= CharCodes.NINE;
304613
305530
  }
@@ -304889,7 +305806,7 @@ var init_decode = __esm(() => {
304889
305806
  })(DecodingMode || (DecodingMode = {}));
304890
305807
  });
304891
305808
 
304892
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/html.js
305809
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/html.js
304893
305810
  function getTagID(tagName) {
304894
305811
  var _a3;
304895
305812
  return (_a3 = TAG_NAME_TO_ID.get(tagName)) !== null && _a3 !== undefined ? _a3 : TAG_ID.UNKNOWN;
@@ -305398,7 +306315,7 @@ var init_html = __esm(() => {
305398
306315
  ]);
305399
306316
  });
305400
306317
 
305401
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/index.js
306318
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/index.js
305402
306319
  function isAsciiDigit(cp) {
305403
306320
  return cp >= CODE_POINTS.DIGIT_0 && cp <= CODE_POINTS.DIGIT_9;
305404
306321
  }
@@ -307855,7 +308772,7 @@ var init_tokenizer = __esm(() => {
307855
308772
  };
307856
308773
  });
307857
308774
 
307858
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/open-element-stack.js
308775
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/open-element-stack.js
307859
308776
  class OpenElementStack {
307860
308777
  get currentTmplContentOrNode() {
307861
308778
  return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
@@ -308170,7 +309087,7 @@ var init_open_element_stack = __esm(() => {
308170
309087
  TABLE_CELLS = new Set([TAG_ID.TD, TAG_ID.TH]);
308171
309088
  });
308172
309089
 
308173
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/formatting-element-list.js
309090
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/formatting-element-list.js
308174
309091
  class FormattingElementList {
308175
309092
  constructor(treeAdapter) {
308176
309093
  this.treeAdapter = treeAdapter;
@@ -308266,7 +309183,7 @@ var init_formatting_element_list = __esm(() => {
308266
309183
  MARKER = { type: EntryType.Marker };
308267
309184
  });
308268
309185
 
308269
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tree-adapters/default.js
309186
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tree-adapters/default.js
308270
309187
  var defaultTreeAdapter;
308271
309188
  var init_default2 = __esm(() => {
308272
309189
  init_html();
@@ -308436,7 +309353,7 @@ var init_default2 = __esm(() => {
308436
309353
  };
308437
309354
  });
308438
309355
 
308439
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/doctype.js
309356
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/doctype.js
308440
309357
  function hasPrefix(publicId, prefixes) {
308441
309358
  return prefixes.some((prefix) => publicId.startsWith(prefix));
308442
309359
  }
@@ -308546,7 +309463,7 @@ var init_doctype = __esm(() => {
308546
309463
  ];
308547
309464
  });
308548
309465
 
308549
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/foreign-content.js
309466
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/foreign-content.js
308550
309467
  function causesExit(startTagToken) {
308551
309468
  const tn = startTagToken.tagID;
308552
309469
  const isFontWithAttrs = tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS2.COLOR || name === ATTRS2.SIZE || name === ATTRS2.FACE);
@@ -308768,7 +309685,7 @@ var init_foreign_content = __esm(() => {
308768
309685
  ]);
308769
309686
  });
308770
309687
 
308771
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/index.js
309688
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/index.js
308772
309689
  class Parser {
308773
309690
  constructor(options, document3, fragmentContext = null, scriptHandler = null) {
308774
309691
  this.fragmentContext = fragmentContext;
@@ -311725,7 +312642,7 @@ var init_parser = __esm(() => {
311725
312642
  TABLE_VOID_ELEMENTS = new Set([TAG_ID.CAPTION, TAG_ID.COL, TAG_ID.COLGROUP, TAG_ID.TBODY, TAG_ID.TD, TAG_ID.TFOOT, TAG_ID.TH, TAG_ID.THEAD, TAG_ID.TR]);
311726
312643
  });
311727
312644
 
311728
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/serializer/index.js
312645
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/serializer/index.js
311729
312646
  var VOID_ELEMENTS;
311730
312647
  var init_serializer = __esm(() => {
311731
312648
  init_html();
@@ -311752,7 +312669,7 @@ var init_serializer = __esm(() => {
311752
312669
  ]);
311753
312670
  });
311754
312671
 
311755
- // ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/index.js
312672
+ // ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/index.js
311756
312673
  function parseFragment(fragmentContext, html, options) {
311757
312674
  if (typeof fragmentContext === "string") {
311758
312675
  options = html;
@@ -314208,10 +315125,10 @@ var init_html2 = __esm(() => {
314208
315125
  init_converter();
314209
315126
  });
314210
315127
 
314211
- // ../../../v2/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.mjs
315128
+ // ../../node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.mjs
314212
315129
  var init_dist4 = () => {};
314213
315130
 
314214
- // ../../../v2/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/development.js
315131
+ // ../../node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/development.js
314215
315132
  function ok2(value2, message) {
314216
315133
  assert2(Boolean(value2), false, true, "ok", "Expected value to be truthy", message);
314217
315134
  }
@@ -314240,7 +315157,7 @@ var init_development = __esm(() => {
314240
315157
  };
314241
315158
  });
314242
315159
 
314243
- // ../../../v2/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
315160
+ // ../../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
314244
315161
  function toString(value2, options) {
314245
315162
  const settings = options || emptyOptions;
314246
315163
  const includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true;
@@ -314280,12 +315197,12 @@ var init_lib = __esm(() => {
314280
315197
  emptyOptions = {};
314281
315198
  });
314282
315199
 
314283
- // ../../../v2/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/index.js
315200
+ // ../../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/index.js
314284
315201
  var init_mdast_util_to_string = __esm(() => {
314285
315202
  init_lib();
314286
315203
  });
314287
315204
 
314288
- // ../../../v2/node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.js
315205
+ // ../../node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.js
314289
315206
  var characterEntities;
314290
315207
  var init_character_entities = __esm(() => {
314291
315208
  characterEntities = {
@@ -316418,7 +317335,7 @@ var init_character_entities = __esm(() => {
316418
317335
  };
316419
317336
  });
316420
317337
 
316421
- // ../../../v2/node_modules/.pnpm/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.js
317338
+ // ../../node_modules/.pnpm/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.js
316422
317339
  function decodeNamedCharacterReference(value2) {
316423
317340
  return own.call(characterEntities, value2) ? characterEntities[value2] : false;
316424
317341
  }
@@ -316428,7 +317345,7 @@ var init_decode_named_character_reference = __esm(() => {
316428
317345
  own = {}.hasOwnProperty;
316429
317346
  });
316430
317347
 
316431
- // ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/codes.js
317348
+ // ../../node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/codes.js
316432
317349
  var codes;
316433
317350
  var init_codes = __esm(() => {
316434
317351
  codes = {
@@ -316571,7 +317488,7 @@ var init_codes = __esm(() => {
316571
317488
  };
316572
317489
  });
316573
317490
 
316574
- // ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/constants.js
317491
+ // ../../node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/constants.js
316575
317492
  var constants2;
316576
317493
  var init_constants = __esm(() => {
316577
317494
  constants2 = {
@@ -316612,7 +317529,7 @@ var init_constants = __esm(() => {
316612
317529
  };
316613
317530
  });
316614
317531
 
316615
- // ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/types.js
317532
+ // ../../node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/types.js
316616
317533
  var types9;
316617
317534
  var init_types9 = __esm(() => {
316618
317535
  types9 = {
@@ -316722,7 +317639,7 @@ var init_types9 = __esm(() => {
316722
317639
  };
316723
317640
  });
316724
317641
 
316725
- // ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/values.js
317642
+ // ../../node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/values.js
316726
317643
  var values;
316727
317644
  var init_values = __esm(() => {
316728
317645
  values = {
@@ -316829,7 +317746,7 @@ var init_values = __esm(() => {
316829
317746
  };
316830
317747
  });
316831
317748
 
316832
- // ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/default.js
317749
+ // ../../node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/default.js
316833
317750
  var init_default3 = __esm(() => {
316834
317751
  init_codes();
316835
317752
  init_constants();
@@ -316837,7 +317754,7 @@ var init_default3 = __esm(() => {
316837
317754
  init_values();
316838
317755
  });
316839
317756
 
316840
- // ../../../v2/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/dev/index.js
317757
+ // ../../node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/dev/index.js
316841
317758
  function splice(list, start, remove, items) {
316842
317759
  const end = list.length;
316843
317760
  let chunkStart = 0;
@@ -316875,7 +317792,7 @@ var init_dev = __esm(() => {
316875
317792
  init_default3();
316876
317793
  });
316877
317794
 
316878
- // ../../../v2/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
317795
+ // ../../node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
316879
317796
  function combineExtensions(extensions) {
316880
317797
  const all2 = {};
316881
317798
  let index = -1;
@@ -316915,7 +317832,7 @@ var init_micromark_util_combine_extensions = __esm(() => {
316915
317832
  hasOwnProperty = {}.hasOwnProperty;
316916
317833
  });
316917
317834
 
316918
- // ../../../v2/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js
317835
+ // ../../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js
316919
317836
  function decodeNumericCharacterReference(value2, base3) {
316920
317837
  const code = Number.parseInt(value2, base3);
316921
317838
  if (code < codes.ht || code === codes.vt || code > codes.cr && code < codes.space || code > codes.tilde && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) {
@@ -316927,7 +317844,7 @@ var init_dev2 = __esm(() => {
316927
317844
  init_default3();
316928
317845
  });
316929
317846
 
316930
- // ../../../v2/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/dev/index.js
317847
+ // ../../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/dev/index.js
316931
317848
  function normalizeIdentifier(value2) {
316932
317849
  return value2.replace(/[\t\n\r ]+/g, values.space).replace(/^ | $/g, "").toLowerCase().toUpperCase();
316933
317850
  }
@@ -316935,7 +317852,7 @@ var init_dev3 = __esm(() => {
316935
317852
  init_default3();
316936
317853
  });
316937
317854
 
316938
- // ../../../v2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/dev/index.js
317855
+ // ../../node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/dev/index.js
316939
317856
  function asciiControl(code) {
316940
317857
  return code !== null && (code < codes.space || code === codes.del);
316941
317858
  }
@@ -316967,7 +317884,7 @@ var init_dev4 = __esm(() => {
316967
317884
  unicodeWhitespace = regexCheck(/\s/);
316968
317885
  });
316969
317886
 
316970
- // ../../../v2/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/dev/index.js
317887
+ // ../../node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/dev/index.js
316971
317888
  function factorySpace(effects2, ok3, type, max2) {
316972
317889
  const limit = max2 ? max2 - 1 : Number.POSITIVE_INFINITY;
316973
317890
  let size = 0;
@@ -316992,7 +317909,7 @@ var init_dev5 = __esm(() => {
316992
317909
  init_dev4();
316993
317910
  });
316994
317911
 
316995
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/content.js
317912
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/initialize/content.js
316996
317913
  function initializeContent(effects2) {
316997
317914
  const contentStart = effects2.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
316998
317915
  let previous;
@@ -317049,7 +317966,7 @@ var init_content = __esm(() => {
317049
317966
  content = { tokenize: initializeContent };
317050
317967
  });
317051
317968
 
317052
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/document.js
317969
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/initialize/document.js
317053
317970
  function initializeDocument(effects2) {
317054
317971
  const self = this;
317055
317972
  const stack = [];
@@ -317241,7 +318158,7 @@ var init_document2 = __esm(() => {
317241
318158
  containerConstruct = { tokenize: tokenizeContainer };
317242
318159
  });
317243
318160
 
317244
- // ../../../v2/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/dev/index.js
318161
+ // ../../node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/dev/index.js
317245
318162
  function classifyCharacter(code) {
317246
318163
  if (code === codes.eof || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {
317247
318164
  return constants2.characterGroupWhitespace;
@@ -317255,7 +318172,7 @@ var init_dev6 = __esm(() => {
317255
318172
  init_default3();
317256
318173
  });
317257
318174
 
317258
- // ../../../v2/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
318175
+ // ../../node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
317259
318176
  function resolveAll(constructs2, events, context) {
317260
318177
  const called = [];
317261
318178
  let index = -1;
@@ -317269,7 +318186,7 @@ function resolveAll(constructs2, events, context) {
317269
318186
  return events;
317270
318187
  }
317271
318188
 
317272
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/attention.js
318189
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/attention.js
317273
318190
  function resolveAllAttention(events, context) {
317274
318191
  let index = -1;
317275
318192
  let open;
@@ -317405,7 +318322,7 @@ var init_attention = __esm(() => {
317405
318322
  };
317406
318323
  });
317407
318324
 
317408
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/autolink.js
318325
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/autolink.js
317409
318326
  function tokenizeAutolink(effects2, ok3, nok) {
317410
318327
  let size = 0;
317411
318328
  return start;
@@ -317510,7 +318427,7 @@ var init_autolink = __esm(() => {
317510
318427
  autolink = { name: "autolink", tokenize: tokenizeAutolink };
317511
318428
  });
317512
318429
 
317513
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/blank-line.js
318430
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/blank-line.js
317514
318431
  function tokenizeBlankLine(effects2, ok3, nok) {
317515
318432
  return start;
317516
318433
  function start(code) {
@@ -317528,7 +318445,7 @@ var init_blank_line = __esm(() => {
317528
318445
  blankLine = { partial: true, tokenize: tokenizeBlankLine };
317529
318446
  });
317530
318447
 
317531
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/block-quote.js
318448
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/block-quote.js
317532
318449
  function tokenizeBlockQuoteStart(effects2, ok3, nok) {
317533
318450
  const self = this;
317534
318451
  return start;
@@ -317591,7 +318508,7 @@ var init_block_quote = __esm(() => {
317591
318508
  };
317592
318509
  });
317593
318510
 
317594
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/character-escape.js
318511
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/character-escape.js
317595
318512
  function tokenizeCharacterEscape(effects2, ok3, nok) {
317596
318513
  return start;
317597
318514
  function start(code) {
@@ -317624,7 +318541,7 @@ var init_character_escape = __esm(() => {
317624
318541
  };
317625
318542
  });
317626
318543
 
317627
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/character-reference.js
318544
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/character-reference.js
317628
318545
  function tokenizeCharacterReference(effects2, ok3, nok) {
317629
318546
  const self = this;
317630
318547
  let size = 0;
@@ -317697,7 +318614,7 @@ var init_character_reference = __esm(() => {
317697
318614
  };
317698
318615
  });
317699
318616
 
317700
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js
318617
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js
317701
318618
  function tokenizeCodeFenced(effects2, ok3, nok) {
317702
318619
  const self = this;
317703
318620
  const closeStart = { partial: true, tokenize: tokenizeCloseStart };
@@ -317886,7 +318803,7 @@ var init_code_fenced = __esm(() => {
317886
318803
  };
317887
318804
  });
317888
318805
 
317889
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-indented.js
318806
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-indented.js
317890
318807
  function tokenizeCodeIndented(effects2, ok3, nok) {
317891
318808
  const self = this;
317892
318809
  return start;
@@ -317955,7 +318872,7 @@ var init_code_indented = __esm(() => {
317955
318872
  furtherStart = { partial: true, tokenize: tokenizeFurtherStart };
317956
318873
  });
317957
318874
 
317958
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-text.js
318875
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-text.js
317959
318876
  function resolveCodeText(events) {
317960
318877
  let tailExitIndex = events.length - 4;
317961
318878
  let headEnterIndex = 3;
@@ -318078,7 +318995,7 @@ var init_code_text = __esm(() => {
318078
318995
  };
318079
318996
  });
318080
318997
 
318081
- // ../../../v2/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js
318998
+ // ../../node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js
318082
318999
  class SpliceBuffer {
318083
319000
  constructor(initial) {
318084
319001
  this.left = initial ? [...initial] : [];
@@ -318164,7 +319081,7 @@ var init_splice_buffer = __esm(() => {
318164
319081
  init_default3();
318165
319082
  });
318166
319083
 
318167
- // ../../../v2/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/dev/index.js
319084
+ // ../../node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/dev/index.js
318168
319085
  function subtokenize(eventsArray) {
318169
319086
  const jumps = {};
318170
319087
  let index = -1;
@@ -318323,7 +319240,7 @@ var init_dev7 = __esm(() => {
318323
319240
  init_splice_buffer();
318324
319241
  });
318325
319242
 
318326
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/content.js
319243
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/content.js
318327
319244
  function resolveContent(events) {
318328
319245
  subtokenize(events);
318329
319246
  return events;
@@ -318401,7 +319318,7 @@ var init_content2 = __esm(() => {
318401
319318
  continuationConstruct = { partial: true, tokenize: tokenizeContinuation };
318402
319319
  });
318403
319320
 
318404
- // ../../../v2/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/dev/index.js
319321
+ // ../../node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/dev/index.js
318405
319322
  function factoryDestination(effects2, ok3, nok, type, literalType2, literalMarkerType, rawType, stringType2, max2) {
318406
319323
  const limit = max2 || Number.POSITIVE_INFINITY;
318407
319324
  let balance = 0;
@@ -318493,7 +319410,7 @@ var init_dev8 = __esm(() => {
318493
319410
  init_default3();
318494
319411
  });
318495
319412
 
318496
- // ../../../v2/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/dev/index.js
319413
+ // ../../node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/dev/index.js
318497
319414
  function factoryLabel(effects2, ok3, nok, type, markerType, stringType2) {
318498
319415
  const self = this;
318499
319416
  let size = 0;
@@ -318554,7 +319471,7 @@ var init_dev9 = __esm(() => {
318554
319471
  init_default3();
318555
319472
  });
318556
319473
 
318557
- // ../../../v2/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/dev/index.js
319474
+ // ../../node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/dev/index.js
318558
319475
  function factoryTitle(effects2, ok3, nok, type, markerType, stringType2) {
318559
319476
  let marker;
318560
319477
  return start;
@@ -318619,7 +319536,7 @@ var init_dev10 = __esm(() => {
318619
319536
  init_default3();
318620
319537
  });
318621
319538
 
318622
- // ../../../v2/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/dev/index.js
319539
+ // ../../node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/dev/index.js
318623
319540
  function factoryWhitespace(effects2, ok3) {
318624
319541
  let seen;
318625
319542
  return start;
@@ -318643,7 +319560,7 @@ var init_dev11 = __esm(() => {
318643
319560
  init_default3();
318644
319561
  });
318645
319562
 
318646
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/definition.js
319563
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/definition.js
318647
319564
  function tokenizeDefinition(effects2, ok3, nok) {
318648
319565
  const self = this;
318649
319566
  let identifier;
@@ -318717,7 +319634,7 @@ var init_definition = __esm(() => {
318717
319634
  titleBefore = { partial: true, tokenize: tokenizeTitleBefore };
318718
319635
  });
318719
319636
 
318720
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js
319637
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js
318721
319638
  function tokenizeHardBreakEscape(effects2, ok3, nok) {
318722
319639
  return start;
318723
319640
  function start(code) {
@@ -318745,7 +319662,7 @@ var init_hard_break_escape = __esm(() => {
318745
319662
  };
318746
319663
  });
318747
319664
 
318748
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js
319665
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js
318749
319666
  function resolveHeadingAtx(events, context) {
318750
319667
  let contentEnd = events.length - 2;
318751
319668
  let contentStart = 3;
@@ -318850,7 +319767,7 @@ var init_heading_atx = __esm(() => {
318850
319767
  };
318851
319768
  });
318852
319769
 
318853
- // ../../../v2/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
319770
+ // ../../node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
318854
319771
  var htmlBlockNames, htmlRawNames;
318855
319772
  var init_micromark_util_html_tag_name = __esm(() => {
318856
319773
  htmlBlockNames = [
@@ -318920,7 +319837,7 @@ var init_micromark_util_html_tag_name = __esm(() => {
318920
319837
  htmlRawNames = ["pre", "script", "style", "textarea"];
318921
319838
  });
318922
319839
 
318923
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/html-flow.js
319840
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/html-flow.js
318924
319841
  function resolveToHtmlFlow(events) {
318925
319842
  let index = events.length;
318926
319843
  while (index--) {
@@ -319310,7 +320227,7 @@ var init_html_flow = __esm(() => {
319310
320227
  };
319311
320228
  });
319312
320229
 
319313
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/html-text.js
320230
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/html-text.js
319314
320231
  function tokenizeHtmlText(effects2, ok3, nok) {
319315
320232
  const self = this;
319316
320233
  let marker;
@@ -319624,7 +320541,7 @@ var init_html_text = __esm(() => {
319624
320541
  htmlText = { name: "htmlText", tokenize: tokenizeHtmlText };
319625
320542
  });
319626
320543
 
319627
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-end.js
320544
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-end.js
319628
320545
  function resolveAllLabelEnd(events) {
319629
320546
  let index = -1;
319630
320547
  const newEvents = [];
@@ -319856,7 +320773,7 @@ var init_label_end = __esm(() => {
319856
320773
  referenceCollapsedConstruct = { tokenize: tokenizeReferenceCollapsed };
319857
320774
  });
319858
320775
 
319859
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js
320776
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js
319860
320777
  function tokenizeLabelStartImage(effects2, ok3, nok) {
319861
320778
  const self = this;
319862
320779
  return start;
@@ -319894,7 +320811,7 @@ var init_label_start_image = __esm(() => {
319894
320811
  };
319895
320812
  });
319896
320813
 
319897
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js
320814
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js
319898
320815
  function tokenizeLabelStartLink(effects2, ok3, nok) {
319899
320816
  const self = this;
319900
320817
  return start;
@@ -319923,7 +320840,7 @@ var init_label_start_link = __esm(() => {
319923
320840
  };
319924
320841
  });
319925
320842
 
319926
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/line-ending.js
320843
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/line-ending.js
319927
320844
  function tokenizeLineEnding(effects2, ok3) {
319928
320845
  return start;
319929
320846
  function start(code) {
@@ -319943,7 +320860,7 @@ var init_line_ending = __esm(() => {
319943
320860
  lineEnding = { name: "lineEnding", tokenize: tokenizeLineEnding };
319944
320861
  });
319945
320862
 
319946
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js
320863
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js
319947
320864
  function tokenizeThematicBreak(effects2, ok3, nok) {
319948
320865
  let size = 0;
319949
320866
  let marker;
@@ -319990,7 +320907,7 @@ var init_thematic_break = __esm(() => {
319990
320907
  };
319991
320908
  });
319992
320909
 
319993
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/list.js
320910
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/list.js
319994
320911
  function tokenizeListStart(effects2, ok3, nok) {
319995
320912
  const self = this;
319996
320913
  const tail = self.events[self.events.length - 1];
@@ -320135,7 +321052,7 @@ var init_list = __esm(() => {
320135
321052
  indentConstruct = { partial: true, tokenize: tokenizeIndent };
320136
321053
  });
320137
321054
 
320138
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js
321055
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js
320139
321056
  function resolveToSetextUnderline(events, context) {
320140
321057
  let index = events.length;
320141
321058
  let content3;
@@ -320233,7 +321150,7 @@ var init_setext_underline = __esm(() => {
320233
321150
  };
320234
321151
  });
320235
321152
 
320236
- // ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/index.js
321153
+ // ../../node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/index.js
320237
321154
  var init_dev12 = __esm(() => {
320238
321155
  init_attention();
320239
321156
  init_autolink();
@@ -320259,7 +321176,7 @@ var init_dev12 = __esm(() => {
320259
321176
  init_thematic_break();
320260
321177
  });
320261
321178
 
320262
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/flow.js
321179
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/initialize/flow.js
320263
321180
  function initializeFlow(effects2) {
320264
321181
  const self = this;
320265
321182
  const initial = effects2.attempt(blankLine, atBlankEnding, effects2.attempt(this.parser.constructs.flowInitial, afterConstruct, factorySpace(effects2, effects2.attempt(this.parser.constructs.flow, afterConstruct, effects2.attempt(content2, afterConstruct)), types9.linePrefix)));
@@ -320299,7 +321216,7 @@ var init_flow = __esm(() => {
320299
321216
  flow = { tokenize: initializeFlow };
320300
321217
  });
320301
321218
 
320302
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/text.js
321219
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/initialize/text.js
320303
321220
  function initializeFactory(field) {
320304
321221
  return {
320305
321222
  resolveAll: createResolver(field === "text" ? resolveAllLineSuffixes : undefined),
@@ -320438,7 +321355,7 @@ var init_text = __esm(() => {
320438
321355
  text = initializeFactory("text");
320439
321356
  });
320440
321357
 
320441
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/constructs.js
321358
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/constructs.js
320442
321359
  var exports_constructs = {};
320443
321360
  __export(exports_constructs, {
320444
321361
  text: () => text2,
@@ -320513,7 +321430,7 @@ var init_constructs = __esm(() => {
320513
321430
  disable = { null: [] };
320514
321431
  });
320515
321432
 
320516
- // ../../../v2/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
321433
+ // ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
320517
321434
  var require_ms = __commonJS((exports, module) => {
320518
321435
  var s = 1000;
320519
321436
  var m = s * 60;
@@ -320623,7 +321540,7 @@ var require_ms = __commonJS((exports, module) => {
320623
321540
  }
320624
321541
  });
320625
321542
 
320626
- // ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/common.js
321543
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.js
320627
321544
  var require_common = __commonJS((exports, module) => {
320628
321545
  function setup(env) {
320629
321546
  createDebug.debug = createDebug;
@@ -320798,7 +321715,7 @@ var require_common = __commonJS((exports, module) => {
320798
321715
  module.exports = setup;
320799
321716
  });
320800
321717
 
320801
- // ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/browser.js
321718
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.js
320802
321719
  var require_browser = __commonJS((exports, module) => {
320803
321720
  exports.formatArgs = formatArgs;
320804
321721
  exports.save = save;
@@ -320958,36 +321875,30 @@ var require_browser = __commonJS((exports, module) => {
320958
321875
  };
320959
321876
  });
320960
321877
 
320961
- // ../../../v2/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
321878
+ // ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
320962
321879
  var require_has_flag = __commonJS((exports, module) => {
320963
- module.exports = (flag, argv = process.argv) => {
321880
+ module.exports = (flag, argv) => {
321881
+ argv = argv || process.argv;
320964
321882
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
320965
- const position = argv.indexOf(prefix + flag);
320966
- const terminatorPosition = argv.indexOf("--");
320967
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
321883
+ const pos = argv.indexOf(prefix + flag);
321884
+ const terminatorPos = argv.indexOf("--");
321885
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
320968
321886
  };
320969
321887
  });
320970
321888
 
320971
- // ../../../v2/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
321889
+ // ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
320972
321890
  var require_supports_color = __commonJS((exports, module) => {
320973
321891
  var os = __require("os");
320974
- var tty = __require("tty");
320975
321892
  var hasFlag = require_has_flag();
320976
- var { env } = process;
321893
+ var env = process.env;
320977
321894
  var forceColor;
320978
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
320979
- forceColor = 0;
321895
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
321896
+ forceColor = false;
320980
321897
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
320981
- forceColor = 1;
321898
+ forceColor = true;
320982
321899
  }
320983
321900
  if ("FORCE_COLOR" in env) {
320984
- if (env.FORCE_COLOR === "true") {
320985
- forceColor = 1;
320986
- } else if (env.FORCE_COLOR === "false") {
320987
- forceColor = 0;
320988
- } else {
320989
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
320990
- }
321901
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
320991
321902
  }
320992
321903
  function translateLevel(level) {
320993
321904
  if (level === 0) {
@@ -321000,8 +321911,8 @@ var require_supports_color = __commonJS((exports, module) => {
321000
321911
  has16m: level >= 3
321001
321912
  };
321002
321913
  }
321003
- function supportsColor(haveStream, streamIsTTY) {
321004
- if (forceColor === 0) {
321914
+ function supportsColor(stream) {
321915
+ if (forceColor === false) {
321005
321916
  return 0;
321006
321917
  }
321007
321918
  if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
@@ -321010,22 +321921,19 @@ var require_supports_color = __commonJS((exports, module) => {
321010
321921
  if (hasFlag("color=256")) {
321011
321922
  return 2;
321012
321923
  }
321013
- if (haveStream && !streamIsTTY && forceColor === undefined) {
321924
+ if (stream && !stream.isTTY && forceColor !== true) {
321014
321925
  return 0;
321015
321926
  }
321016
- const min = forceColor || 0;
321017
- if (env.TERM === "dumb") {
321018
- return min;
321019
- }
321927
+ const min = forceColor ? 1 : 0;
321020
321928
  if (process.platform === "win32") {
321021
321929
  const osRelease = os.release().split(".");
321022
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
321930
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
321023
321931
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
321024
321932
  }
321025
321933
  return 1;
321026
321934
  }
321027
321935
  if ("CI" in env) {
321028
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
321936
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
321029
321937
  return 1;
321030
321938
  }
321031
321939
  return min;
@@ -321054,20 +321962,23 @@ var require_supports_color = __commonJS((exports, module) => {
321054
321962
  if ("COLORTERM" in env) {
321055
321963
  return 1;
321056
321964
  }
321965
+ if (env.TERM === "dumb") {
321966
+ return min;
321967
+ }
321057
321968
  return min;
321058
321969
  }
321059
321970
  function getSupportLevel(stream) {
321060
- const level = supportsColor(stream, stream && stream.isTTY);
321971
+ const level = supportsColor(stream);
321061
321972
  return translateLevel(level);
321062
321973
  }
321063
321974
  module.exports = {
321064
321975
  supportsColor: getSupportLevel,
321065
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
321066
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
321976
+ stdout: getSupportLevel(process.stdout),
321977
+ stderr: getSupportLevel(process.stderr)
321067
321978
  };
321068
321979
  });
321069
321980
 
321070
- // ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/node.js
321981
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/node.js
321071
321982
  var require_node = __commonJS((exports, module) => {
321072
321983
  var tty = __require("tty");
321073
321984
  var util3 = __require("util");
@@ -321238,7 +322149,7 @@ var require_node = __commonJS((exports, module) => {
321238
322149
  };
321239
322150
  });
321240
322151
 
321241
- // ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/index.js
322152
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/index.js
321242
322153
  var require_src = __commonJS((exports, module) => {
321243
322154
  if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
321244
322155
  module.exports = require_browser();
@@ -321247,7 +322158,7 @@ var require_src = __commonJS((exports, module) => {
321247
322158
  }
321248
322159
  });
321249
322160
 
321250
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/create-tokenizer.js
322161
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/create-tokenizer.js
321251
322162
  function createTokenizer(parser, initialize, from) {
321252
322163
  let point = {
321253
322164
  _bufferIndex: -1,
@@ -321570,7 +322481,7 @@ var init_create_tokenizer = __esm(() => {
321570
322481
  debug = import_debug.default("micromark");
321571
322482
  });
321572
322483
 
321573
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/parse.js
322484
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/parse.js
321574
322485
  function parse6(options) {
321575
322486
  const settings = options || {};
321576
322487
  const constructs2 = combineExtensions([exports_constructs, ...settings.extensions || []]);
@@ -321602,7 +322513,7 @@ var init_parse4 = __esm(() => {
321602
322513
  init_create_tokenizer();
321603
322514
  });
321604
322515
 
321605
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/postprocess.js
322516
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/postprocess.js
321606
322517
  function postprocess(events) {
321607
322518
  while (!subtokenize(events)) {}
321608
322519
  return events;
@@ -321611,7 +322522,7 @@ var init_postprocess = __esm(() => {
321611
322522
  init_dev7();
321612
322523
  });
321613
322524
 
321614
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/preprocess.js
322525
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/lib/preprocess.js
321615
322526
  function preprocess2() {
321616
322527
  let column = 1;
321617
322528
  let buffer = "";
@@ -321697,14 +322608,14 @@ var init_preprocess = __esm(() => {
321697
322608
  search = /[\0\t\n\r]/g;
321698
322609
  });
321699
322610
 
321700
- // ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/index.js
322611
+ // ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/dev/index.js
321701
322612
  var init_dev13 = __esm(() => {
321702
322613
  init_parse4();
321703
322614
  init_postprocess();
321704
322615
  init_preprocess();
321705
322616
  });
321706
322617
 
321707
- // ../../../v2/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/dev/index.js
322618
+ // ../../node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/dev/index.js
321708
322619
  function decodeString(value2) {
321709
322620
  return value2.replace(characterEscapeOrReference, decode4);
321710
322621
  }
@@ -321728,7 +322639,7 @@ var init_dev14 = __esm(() => {
321728
322639
  characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
321729
322640
  });
321730
322641
 
321731
- // ../../../v2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js
322642
+ // ../../node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js
321732
322643
  function stringifyPosition(value2) {
321733
322644
  if (!value2 || typeof value2 !== "object") {
321734
322645
  return "";
@@ -321754,10 +322665,10 @@ function index(value2) {
321754
322665
  return value2 && typeof value2 === "number" ? value2 : 1;
321755
322666
  }
321756
322667
 
321757
- // ../../../v2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/index.js
322668
+ // ../../node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/index.js
321758
322669
  var init_unist_util_stringify_position = () => {};
321759
322670
 
321760
- // ../../../v2/node_modules/.pnpm/mdast-util-from-markdown@2.0.3_supports-color@7.2.0/node_modules/mdast-util-from-markdown/dev/lib/index.js
322671
+ // ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3/node_modules/mdast-util-from-markdown/dev/lib/index.js
321761
322672
  function fromMarkdown(value2, encoding, options) {
321762
322673
  if (encoding && typeof encoding === "object") {
321763
322674
  options = encoding;
@@ -322472,12 +323383,12 @@ var init_lib2 = __esm(() => {
322472
323383
  own2 = {}.hasOwnProperty;
322473
323384
  });
322474
323385
 
322475
- // ../../../v2/node_modules/.pnpm/mdast-util-from-markdown@2.0.3_supports-color@7.2.0/node_modules/mdast-util-from-markdown/dev/index.js
323386
+ // ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3/node_modules/mdast-util-from-markdown/dev/index.js
322476
323387
  var init_dev15 = __esm(() => {
322477
323388
  init_lib2();
322478
323389
  });
322479
323390
 
322480
- // ../../../v2/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
323391
+ // ../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
322481
323392
  function ccount(value2, character) {
322482
323393
  const source = String(value2);
322483
323394
  if (typeof character !== "string") {
@@ -322492,7 +323403,7 @@ function ccount(value2, character) {
322492
323403
  return count;
322493
323404
  }
322494
323405
 
322495
- // ../../../v2/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
323406
+ // ../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
322496
323407
  function escapeStringRegexp(string7) {
322497
323408
  if (typeof string7 !== "string") {
322498
323409
  throw new TypeError("Expected a string");
@@ -322500,7 +323411,7 @@ function escapeStringRegexp(string7) {
322500
323411
  return string7.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
322501
323412
  }
322502
323413
 
322503
- // ../../../v2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js
323414
+ // ../../node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js
322504
323415
  function anyFactory(tests) {
322505
323416
  const checks4 = [];
322506
323417
  let index2 = -1;
@@ -322564,15 +323475,15 @@ var convert = function(test) {
322564
323475
  throw new Error("Expected function, string, or object as test");
322565
323476
  };
322566
323477
 
322567
- // ../../../v2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/index.js
323478
+ // ../../node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/index.js
322568
323479
  var init_unist_util_is = () => {};
322569
323480
 
322570
- // ../../../v2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.js
323481
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.js
322571
323482
  function color(d) {
322572
323483
  return "\x1B[33m" + d + "\x1B[39m";
322573
323484
  }
322574
323485
 
322575
- // ../../../v2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
323486
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
322576
323487
  function visitParents(tree, test, visitor, reverse) {
322577
323488
  let check2;
322578
323489
  if (typeof test === "function" && typeof visitor !== "function") {
@@ -322638,12 +323549,12 @@ var init_lib3 = __esm(() => {
322638
323549
  empty2 = [];
322639
323550
  });
322640
323551
 
322641
- // ../../../v2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/index.js
323552
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/index.js
322642
323553
  var init_unist_util_visit_parents = __esm(() => {
322643
323554
  init_lib3();
322644
323555
  });
322645
323556
 
322646
- // ../../../v2/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js
323557
+ // ../../node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js
322647
323558
  function findAndReplace(tree, list2, options) {
322648
323559
  const settings = options || {};
322649
323560
  const ignored = convert(settings.ignore || []);
@@ -322748,12 +323659,12 @@ var init_lib4 = __esm(() => {
322748
323659
  init_unist_util_is();
322749
323660
  });
322750
323661
 
322751
- // ../../../v2/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/index.js
323662
+ // ../../node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/index.js
322752
323663
  var init_mdast_util_find_and_replace = __esm(() => {
322753
323664
  init_lib4();
322754
323665
  });
322755
323666
 
322756
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
323667
+ // ../../node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
322757
323668
  function gfmAutolinkLiteralFromMarkdown() {
322758
323669
  return {
322759
323670
  transforms: [transformGfmAutolinkLiterals],
@@ -322871,12 +323782,12 @@ var init_lib5 = __esm(() => {
322871
323782
  init_mdast_util_find_and_replace();
322872
323783
  });
322873
323784
 
322874
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/index.js
323785
+ // ../../node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/index.js
322875
323786
  var init_mdast_util_gfm_autolink_literal = __esm(() => {
322876
323787
  init_lib5();
322877
323788
  });
322878
323789
 
322879
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0_supports-color@7.2.0/node_modules/mdast-util-gfm-footnote/lib/index.js
323790
+ // ../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
322880
323791
  function enterFootnoteCallString() {
322881
323792
  this.buffer();
322882
323793
  }
@@ -322945,12 +323856,12 @@ var init_lib6 = __esm(() => {
322945
323856
  footnoteReference.peek = footnoteReferencePeek;
322946
323857
  });
322947
323858
 
322948
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0_supports-color@7.2.0/node_modules/mdast-util-gfm-footnote/index.js
323859
+ // ../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/index.js
322949
323860
  var init_mdast_util_gfm_footnote = __esm(() => {
322950
323861
  init_lib6();
322951
323862
  });
322952
323863
 
322953
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js
323864
+ // ../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js
322954
323865
  function gfmStrikethroughFromMarkdown() {
322955
323866
  return {
322956
323867
  canContainEols: ["delete"],
@@ -322984,12 +323895,12 @@ var init_lib7 = __esm(() => {
322984
323895
  handleDelete.peek = peekDelete;
322985
323896
  });
322986
323897
 
322987
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-strikethrough/index.js
323898
+ // ../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/index.js
322988
323899
  var init_mdast_util_gfm_strikethrough = __esm(() => {
322989
323900
  init_lib7();
322990
323901
  });
322991
323902
 
322992
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-table@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-table/lib/index.js
323903
+ // ../../node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
322993
323904
  function gfmTableFromMarkdown() {
322994
323905
  return {
322995
323906
  enter: {
@@ -323049,12 +323960,12 @@ var init_lib8 = __esm(() => {
323049
323960
  init_development();
323050
323961
  });
323051
323962
 
323052
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-table@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-table/index.js
323963
+ // ../../node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/index.js
323053
323964
  var init_mdast_util_gfm_table = __esm(() => {
323054
323965
  init_lib8();
323055
323966
  });
323056
323967
 
323057
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
323968
+ // ../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
323058
323969
  function gfmTaskListItemFromMarkdown() {
323059
323970
  return {
323060
323971
  exit: {
@@ -323104,12 +324015,12 @@ var init_lib9 = __esm(() => {
323104
324015
  init_development();
323105
324016
  });
323106
324017
 
323107
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-task-list-item/index.js
324018
+ // ../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/index.js
323108
324019
  var init_mdast_util_gfm_task_list_item = __esm(() => {
323109
324020
  init_lib9();
323110
324021
  });
323111
324022
 
323112
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm@3.1.0_supports-color@7.2.0/node_modules/mdast-util-gfm/lib/index.js
324023
+ // ../../node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
323113
324024
  function gfmFromMarkdown() {
323114
324025
  return [
323115
324026
  gfmAutolinkLiteralFromMarkdown(),
@@ -323127,12 +324038,12 @@ var init_lib10 = __esm(() => {
323127
324038
  init_mdast_util_gfm_task_list_item();
323128
324039
  });
323129
324040
 
323130
- // ../../../v2/node_modules/.pnpm/mdast-util-gfm@3.1.0_supports-color@7.2.0/node_modules/mdast-util-gfm/index.js
324041
+ // ../../node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/index.js
323131
324042
  var init_mdast_util_gfm = __esm(() => {
323132
324043
  init_lib10();
323133
324044
  });
323134
324045
 
323135
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/dev/lib/syntax.js
324046
+ // ../../node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/dev/lib/syntax.js
323136
324047
  function gfmAutolinkLiteral() {
323137
324048
  return { text: text3 };
323138
324049
  }
@@ -323463,12 +324374,12 @@ var init_syntax = __esm(() => {
323463
324374
  text3[codes.lowercaseW] = [emailAutolink, wwwAutolink];
323464
324375
  });
323465
324376
 
323466
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/dev/index.js
324377
+ // ../../node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/dev/index.js
323467
324378
  var init_dev16 = __esm(() => {
323468
324379
  init_syntax();
323469
324380
  });
323470
324381
 
323471
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/dev/lib/syntax.js
324382
+ // ../../node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/dev/lib/syntax.js
323472
324383
  function gfmFootnote() {
323473
324384
  return {
323474
324385
  document: {
@@ -323732,12 +324643,12 @@ var init_syntax2 = __esm(() => {
323732
324643
  indent = { tokenize: tokenizeIndent2, partial: true };
323733
324644
  });
323734
324645
 
323735
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/dev/index.js
324646
+ // ../../node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/dev/index.js
323736
324647
  var init_dev17 = __esm(() => {
323737
324648
  init_syntax2();
323738
324649
  });
323739
324650
 
323740
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/dev/lib/syntax.js
324651
+ // ../../node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/dev/lib/syntax.js
323741
324652
  function gfmStrikethrough(options) {
323742
324653
  const options_ = options || {};
323743
324654
  let single = options_.singleTilde;
@@ -323843,12 +324754,12 @@ var init_syntax3 = __esm(() => {
323843
324754
  init_default3();
323844
324755
  });
323845
324756
 
323846
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/dev/index.js
324757
+ // ../../node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/dev/index.js
323847
324758
  var init_dev18 = __esm(() => {
323848
324759
  init_syntax3();
323849
324760
  });
323850
324761
 
323851
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js
324762
+ // ../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js
323852
324763
  class EditMap {
323853
324764
  constructor() {
323854
324765
  this.map = [];
@@ -323898,7 +324809,7 @@ function addImplementation(editMap, at, remove, add) {
323898
324809
  editMap.map.push([at, remove, add]);
323899
324810
  }
323900
324811
 
323901
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/infer.js
324812
+ // ../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/infer.js
323902
324813
  function gfmTableAlign(events, index2) {
323903
324814
  ok2(events[index2][1].type === "table", "expected table");
323904
324815
  let inDelimiterRow = false;
@@ -323929,7 +324840,7 @@ var init_infer = __esm(() => {
323929
324840
  init_development();
323930
324841
  });
323931
324842
 
323932
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js
324843
+ // ../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js
323933
324844
  function gfmTable() {
323934
324845
  return {
323935
324846
  flow: {
@@ -324321,12 +325232,12 @@ var init_syntax4 = __esm(() => {
324321
325232
  init_infer();
324322
325233
  });
324323
325234
 
324324
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/index.js
325235
+ // ../../node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/index.js
324325
325236
  var init_dev19 = __esm(() => {
324326
325237
  init_syntax4();
324327
325238
  });
324328
325239
 
324329
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/dev/lib/syntax.js
325240
+ // ../../node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/dev/lib/syntax.js
324330
325241
  function gfmTaskListItem() {
324331
325242
  return {
324332
325243
  text: { [codes.leftSquareBracket]: tasklistCheck }
@@ -324396,12 +325307,12 @@ var init_syntax5 = __esm(() => {
324396
325307
  tasklistCheck = { name: "tasklistCheck", tokenize: tokenizeTasklistCheck };
324397
325308
  });
324398
325309
 
324399
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/dev/index.js
325310
+ // ../../node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/dev/index.js
324400
325311
  var init_dev20 = __esm(() => {
324401
325312
  init_syntax5();
324402
325313
  });
324403
325314
 
324404
- // ../../../v2/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js
325315
+ // ../../node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js
324405
325316
  function gfm(options) {
324406
325317
  return combineExtensions([
324407
325318
  gfmAutolinkLiteral(),
@@ -325591,6 +326502,47 @@ function hasLocalTrackedTextEntries(context, logicalIds) {
325591
326502
  const cache = currentCache(context);
325592
326503
  return logicalIds.every((id) => cache.byLogicalId.has(id));
325593
326504
  }
326505
+ function tryProjectLocalTrackedParagraphRangeReceiptIds(context, refs, blockId) {
326506
+ const tracked = refs.filter((ref5) => ref5.kind === "trackedChange");
326507
+ const rsids = [...new Set(tracked.map((ref5) => ref5.entityId))];
326508
+ if (!rsids.length || rsids.length > 2)
326509
+ return null;
326510
+ const index2 = getSDDocumentSessionInternalParagraphIndex(context.session);
326511
+ const paragraph3 = index2?.byParaId(blockId);
326512
+ if (!index2 || !paragraph3 || paragraph3.directBodyChildOrdinal == null || index2.duplicateParaIds.has(blockId) || tracked.some((ref5) => ref5.storyId !== paragraph3.storyId))
326513
+ return null;
326514
+ const bytes = getSDDocumentSessionInternalPartBytes(context.session, paragraph3.partUri);
326515
+ if (!bytes)
326516
+ return null;
326517
+ const reservations = getSDDocumentSessionInternalRevisionWIdReservations(context.session);
326518
+ const authoredWordIds = new Set([...reservations.issued].filter((id) => !reservations.conflictedReserved.has(id) && !reservations.replayOwners.has(id)));
326519
+ for (const delta of [-1, 1]) {
326520
+ const adjacent = index2.entries[paragraph3.ordinal + delta];
326521
+ if (!adjacent || adjacent.partUri !== paragraph3.partUri || adjacent.storyId !== paragraph3.storyId || adjacent.directBodyChildOrdinal !== paragraph3.directBodyChildOrdinal + delta || index2.duplicateParaIds.has(adjacent.blockId))
326522
+ continue;
326523
+ const head = delta < 0 ? adjacent : paragraph3;
326524
+ const tail = delta < 0 ? paragraph3 : adjacent;
326525
+ const projection = buildBoundedTrackedParagraphRangeReceiptProjection({
326526
+ xml: TD88.decode(bytes.subarray(head.byteStart, tail.byteEnd)),
326527
+ partUri: paragraph3.partUri,
326528
+ storyId: paragraph3.storyId,
326529
+ rsids,
326530
+ authoredWordIds,
326531
+ replacementMode: resolveReplacementMode(context.trackedChangesReplacementMode),
326532
+ namespaceBindings: getSDDocumentSessionInternalMainStoryRootNamespaceBindings(context.session) ?? undefined
326533
+ });
326534
+ if (!projection)
326535
+ continue;
326536
+ const cache = currentCache(context);
326537
+ (cache.receiptGroups ?? (cache.receiptGroups = new Map)).set(projection.id, projection.childIds);
326538
+ return new Map(rsids.map((rsid) => [rsid, projection.id]));
326539
+ }
326540
+ return null;
326541
+ }
326542
+ function readLocalTrackedParagraphRangeReceiptGroups(context, ids) {
326543
+ const groups = currentCache(context).receiptGroups;
326544
+ return ids.length && groups && ids.every((id) => groups.has(id)) ? new Map(ids.map((id) => [id, groups.get(id)])) : null;
326545
+ }
325594
326546
  var cacheBySession, TD88;
325595
326547
  var init_local_text_projection = __esm(() => {
325596
326548
  init_sd_document_session_internal();
@@ -329507,12 +330459,14 @@ class V2SelectionMutationAdapter {
329507
330459
  recordCommittedTxIdForHistory(this.context, receipt3.txId);
329508
330460
  const textRangeShifts = projectTextRangeShifts(receipt3.textRangeShifts ?? [], this.context.session, effectiveStory);
329509
330461
  const affectedStories = projectAffectedStories(receipt3.storiesChanged ?? [], this.context.session, receipt3.partsChanged, effectiveStory);
330462
+ const inserted = projectTrackedTextEntities(this.context, receipt3.createdRefs ?? [], resolved.startBlockId);
329510
330463
  return {
329511
330464
  success: true,
329512
330465
  affectedStories,
329513
330466
  textRangeShifts,
329514
330467
  txId: receipt3.txId,
329515
- resolution
330468
+ resolution,
330469
+ ...inserted ? { inserted } : {}
329516
330470
  };
329517
330471
  }
329518
330472
  executeFormat(request, options, offsetSpace) {
@@ -330419,6 +331373,10 @@ function projectTrackedTextEntities(context, refs, localBlockId, refinement, pri
330419
331373
  return [...new Set(logicalIds)].map((entityId) => ({ kind: "entity", entityType: "trackedChange", entityId }));
330420
331374
  }
330421
331375
  }
331376
+ const groupIds = localBlockId ? tryProjectLocalTrackedParagraphRangeReceiptIds(context, refs, localBlockId) : null;
331377
+ if (groupIds && revisionIds.every((id) => groupIds.has(id))) {
331378
+ return [...new Set(revisionIds.map((id) => groupIds.get(id)))].map((entityId) => ({ kind: "entity", entityType: "trackedChange", entityId }));
331379
+ }
330422
331380
  if (diagnostics)
330423
331381
  diagnostics.globalCatalogFallbacks += 1;
330424
331382
  const { logical } = buildCachedTrackedChangeLogicalView(context);
@@ -330447,6 +331405,14 @@ function projectTrackedTextReviewGroupRemappings(context, inserted) {
330447
331405
  return;
330448
331406
  if (hasLocalTrackedTextEntries(context, inserted.map((entity) => entity.entityId)))
330449
331407
  return;
331408
+ const localGroups = readLocalTrackedParagraphRangeReceiptGroups(context, inserted.map((entity) => entity.entityId));
331409
+ if (localGroups) {
331410
+ const remapped2 = [...localGroups].flatMap(([parentId, childIds]) => childIds.filter((childId) => childId !== parentId).map((childId) => ({
331411
+ from: { kind: "entity", entityType: "trackedChange", entityId: childId },
331412
+ to: { kind: "entity", entityType: "trackedChange", entityId: parentId }
331413
+ })));
331414
+ return remapped2.length ? remapped2 : undefined;
331415
+ }
330450
331416
  const { logical } = buildCachedTrackedChangeLogicalView(context);
330451
331417
  const remapped = [];
330452
331418
  const seen = new Set;
@@ -333116,6 +334082,7 @@ class V2ContentControlsAdapter {
333116
334082
  }
333117
334083
  }
333118
334084
  create(input, options) {
334085
+ requireAuthorableControlType(input.controlType);
333119
334086
  const freshness = this.context.getReadFreshnessFailure("create.contentControl");
333120
334087
  if (freshness)
333121
334088
  return { success: false, failure: freshness };
@@ -333729,6 +334696,7 @@ class V2ContentControlsAdapter {
333729
334696
  return this.mutatePr(input, options, (pr) => setLockMode(pr, input.lockMode));
333730
334697
  }
333731
334698
  setType(input, options) {
334699
+ requireAuthorableControlType(input.controlType);
333732
334700
  return this.mutatePr(input, options, (pr) => setControlType(pr, input.controlType));
333733
334701
  }
333734
334702
  getContent(input) {
@@ -334698,26 +335666,33 @@ function inferKind(sdtXml, contentXml) {
334698
335666
  return /<w:r\b/.test(before) ? "inline" : "block";
334699
335667
  }
334700
335668
  function inferControlType(prXml) {
334701
- if (/<w14:checkbox\b/.test(prXml))
335669
+ if (findDirectRawProperty(prXml, "w14:checkbox"))
334702
335670
  return "checkbox";
334703
- if (/<w:comboBox\b/.test(prXml))
335671
+ if (findDirectRawProperty(prXml, "w:comboBox"))
334704
335672
  return "comboBox";
334705
- if (/<w:dropDownList\b/.test(prXml))
335673
+ if (findDirectRawProperty(prXml, "w:dropDownList"))
334706
335674
  return "dropDownList";
334707
- if (/<w:date\b/.test(prXml))
335675
+ if (findDirectRawProperty(prXml, "w:date"))
334708
335676
  return "date";
334709
- if (/<w15:repeatingSectionItem\b/.test(prXml))
335677
+ if (findDirectRawProperty(prXml, "w15:repeatingSectionItem"))
334710
335678
  return "repeatingSectionItem";
334711
- if (/<w15:repeatingSection\b/.test(prXml))
335679
+ if (findDirectRawProperty(prXml, "w15:repeatingSection"))
334712
335680
  return "repeatingSection";
334713
- if (/<w:group\b/.test(prXml))
335681
+ if (findDirectRawProperty(prXml, "w:group"))
334714
335682
  return "group";
334715
- if (/<w:text\b/.test(prXml))
335683
+ if (findDirectRawProperty(prXml, "w:text"))
334716
335684
  return "text";
334717
- if (/<w:richText\b/.test(prXml))
335685
+ if (findDirectRawProperty(prXml, "w:richText"))
334718
335686
  return "richText";
335687
+ if (UNMODELED_TYPE_TAGS.some((name) => findDirectRawProperty(prXml, name)))
335688
+ return "unknown";
334719
335689
  return "richText";
334720
335690
  }
335691
+ function requireAuthorableControlType(type) {
335692
+ if (type === "unknown") {
335693
+ throw operationError("INVALID_INPUT", "unknown is a read classification, not an authorable content-control type.");
335694
+ }
335695
+ }
334721
335696
  function readProperties2(prXml, controlType) {
334722
335697
  const properties = {};
334723
335698
  const alias = matchElement2(prXml, "w:alias");
@@ -334753,7 +335728,8 @@ function readProperties2(prXml, controlType) {
334753
335728
  return properties;
334754
335729
  }
334755
335730
  function readDateProperties(prXml) {
334756
- const date6 = matchElement2(prXml, "w:date") ?? "";
335731
+ const current = findDirectRawProperty(prXml, "w:date");
335732
+ const date6 = current ? prXml.slice(current.start, current.end) : "";
334757
335733
  return {
334758
335734
  ...attrValue(date6, "fullDate") ? { dateFormat: undefined, fullDate: attrValue(date6, "fullDate") } : {},
334759
335735
  ...attrValue(matchElement2(date6, "w:dateFormat") ?? "", "val") ? { dateFormat: attrValue(matchElement2(date6, "w:dateFormat") ?? "", "val") } : {},
@@ -335945,15 +336921,21 @@ function setLockMode(prXml, lockMode) {
335945
336921
  }
335946
336922
  function setControlType(prXml, type) {
335947
336923
  let next = prXml;
335948
- for (const name of TYPE_TAGS)
335949
- next = removeElement(next, name);
336924
+ for (const name of TYPE_TAGS) {
336925
+ let current = findDirectRawProperty(next, name);
336926
+ while (current) {
336927
+ next = next.slice(0, current.start) + next.slice(current.end);
336928
+ current = findDirectRawProperty(next, name);
336929
+ }
336930
+ }
335950
336931
  if (type === "repeatingSectionItem")
335951
336932
  next = setAttr(next, "xmlns:w15", "http://schemas.microsoft.com/office/word/2012/wordml");
335952
336933
  return next.replace(/<\/w:sdtPr>$/, `${typeElement(type)}</w:sdtPr>`);
335953
336934
  }
335954
336935
  function updateDateElement(prXml, input) {
335955
336936
  const next = setControlType(prXml, "date");
335956
- let date6 = matchElement2(next, "w:date") ?? "<w:date/>";
336937
+ const current = findDirectRawProperty(next, "w:date");
336938
+ let date6 = next.slice(current.start, current.end);
335957
336939
  if (date6.endsWith("/>"))
335958
336940
  date6 = date6.replace(/\/>$/, "></w:date>");
335959
336941
  if ("fullDate" in input) {
@@ -335970,14 +336952,15 @@ function updateDateElement(prXml, input) {
335970
336952
  date6 = upsertChildElement(date6, childName, { "w:val": input[key2] ?? "" });
335971
336953
  }
335972
336954
  }
335973
- return next.replace(matchElement2(next, "w:date") ?? "<w:date/>", date6);
336955
+ return next.slice(0, current.start) + date6 + next.slice(current.end);
335974
336956
  }
335975
336957
  function updateExistingDateFullDate(prXml, fullDate) {
335976
- const existing = matchElement2(prXml, "w:date");
335977
- if (!existing)
336958
+ const current = findDirectRawProperty(prXml, "w:date");
336959
+ if (!current)
335978
336960
  return prXml;
336961
+ const existing = prXml.slice(current.start, current.end);
335979
336962
  const updated = fullDate === null ? existing.replace(/\s+w:fullDate="[^"]*"/, "") : setAttr(existing, "w:fullDate", fullDate);
335980
- return prXml.replace(existing, updated);
336963
+ return prXml.slice(0, current.start) + updated + prXml.slice(current.end);
335981
336964
  }
335982
336965
  function upsertCheckbox(prXml, input) {
335983
336966
  const props = readCheckboxProperties(prXml);
@@ -336516,7 +337499,7 @@ function replaceTextRangeInParagraph2(paragraphXml, start, end, replacement) {
336516
337499
  }
336517
337500
  return paragraphXml;
336518
337501
  }
336519
- var DEFAULT_CHECKED, DEFAULT_UNCHECKED, SECONDARY_STORY_MUTATION_MESSAGE = "Content control mutations outside the document body are not supported by this adapter.", TYPE_TAGS, COOPERATIVE_PARSE_SLICE_PARAGRAPHS = 128, COOPERATIVE_PARSE_SLICE_CONTROLS = 16, RAW_ATTRIBUTE_PATTERN, COPIED_PROPERTY_REVISIONS;
337502
+ var DEFAULT_CHECKED, DEFAULT_UNCHECKED, SECONDARY_STORY_MUTATION_MESSAGE = "Content control mutations outside the document body are not supported by this adapter.", UNMODELED_TYPE_TAGS, TYPE_TAGS, COOPERATIVE_PARSE_SLICE_PARAGRAPHS = 128, COOPERATIVE_PARSE_SLICE_CONTROLS = 16, RAW_ATTRIBUTE_PATTERN, COPIED_PROPERTY_REVISIONS;
336520
337503
  var init_adapter10 = __esm(() => {
336521
337504
  init_sd_document_session_internal();
336522
337505
  init_src6();
@@ -336541,6 +337524,14 @@ var init_adapter10 = __esm(() => {
336541
337524
  init_tracked_move();
336542
337525
  DEFAULT_CHECKED = { font: "MS Gothic", char: "2612" };
336543
337526
  DEFAULT_UNCHECKED = { font: "MS Gothic", char: "2610" };
337527
+ UNMODELED_TYPE_TAGS = [
337528
+ "w:picture",
337529
+ "w:equation",
337530
+ "w:citation",
337531
+ "w:bibliography",
337532
+ "w:docPartList",
337533
+ "w:docPartObj"
337534
+ ];
336544
337535
  TYPE_TAGS = [
336545
337536
  "w:text",
336546
337537
  "w:richText",
@@ -336550,7 +337541,8 @@ var init_adapter10 = __esm(() => {
336550
337541
  "w:group",
336551
337542
  "w14:checkbox",
336552
337543
  "w15:repeatingSection",
336553
- "w15:repeatingSectionItem"
337544
+ "w15:repeatingSectionItem",
337545
+ ...UNMODELED_TYPE_TAGS
336554
337546
  ];
336555
337547
  RAW_ATTRIBUTE_PATTERN = /(?:^|[ \t\r\n]+)([\w.-]+:[\w.-]+|[\w.-]+)[ \t\r\n]*=[ \t\r\n]*(["'])([\s\S]*?)\2/g;
336556
337548
  COPIED_PROPERTY_REVISIONS = new Set([
@@ -379219,7 +380211,7 @@ function readParagraphMatchNode(input) {
379219
380211
  };
379220
380212
  return {
379221
380213
  address: address3,
379222
- node: buildParagraphNode(paragraph4),
380214
+ node: buildParagraphNode(paragraph4, input.matchedText),
379223
380215
  byteRange: [paragraph4.byteStart, paragraph4.byteEnd]
379224
380216
  };
379225
380217
  }
@@ -379365,8 +380357,8 @@ function collectTableCellNodes(context, resolved, story) {
379365
380357
  }
379366
380358
  return items;
379367
380359
  }
379368
- function buildParagraphNode(paragraph4) {
379369
- const inlines = paragraph4.text.length > 0 ? [{ kind: "run", run: { text: paragraph4.text } }] : [];
380360
+ function buildParagraphNode(paragraph4, text4 = paragraph4.text) {
380361
+ const inlines = text4.length > 0 ? [{ kind: "run", run: { text: text4 } }] : [];
379370
380362
  if (paragraph4.headingLevel > 0) {
379371
380363
  return {
379372
380364
  id: paragraph4.blockId,
@@ -382367,11 +383359,11 @@ class V2FindAdapter {
382367
383359
  total: page.total,
382368
383360
  limit,
382369
383361
  offset,
382370
- items: page.hits.map(({ scope, hit, packageRevision, partRevision, storyRevision, coordinateSpace, paragraphText: paragraphText3 }) => buildSDNodeResult(this.context, scope, hit, packageRevision, partRevision, storyRevision, coordinateSpace, paragraphText3))
383362
+ items: page.hits.map(({ scope, hit, packageRevision, partRevision, storyRevision, coordinateSpace }) => buildSDNodeResult(this.context, scope, hit, packageRevision, partRevision, storyRevision, coordinateSpace))
382371
383363
  };
382372
383364
  }
382373
383365
  }
382374
- function buildSDNodeResult(context, scope, hit, rev2, partRev, storyRev, coordinateSpace, paragraphText3) {
383366
+ function buildSDNodeResult(context, scope, hit, rev2, partRev, storyRev, coordinateSpace) {
382375
383367
  const story = projectScopeToStoryLocator(scope);
382376
383368
  const descriptor = storySurfaceFromSearchScope(scope);
382377
383369
  const ref5 = encodeV2SearchRef({
@@ -382395,7 +383387,8 @@ function buildSDNodeResult(context, scope, hit, rev2, partRev, storyRev, coordin
382395
383387
  context,
382396
383388
  storyId: descriptor.storyId,
382397
383389
  blockId: hit.blockId,
382398
- story: story.storyType !== "body" ? story : undefined
383390
+ story: story.storyType !== "body" ? story : undefined,
383391
+ matchedText: hit.matchText
382399
383392
  });
382400
383393
  return {
382401
383394
  address: paragraphNode?.address ?? {
@@ -382404,21 +383397,14 @@ function buildSDNodeResult(context, scope, hit, rev2, partRev, storyRev, coordin
382404
383397
  nodeId: hit.blockId,
382405
383398
  ...story.storyType !== "body" ? { story } : {}
382406
383399
  },
382407
- node: coordinateSpace === "tracked" ? buildTextOnlyNode(paragraphText3 ?? hit.matchText, paragraphNode?.node) : paragraphNode?.node ?? buildTextOnlyNode(hit.matchText),
383400
+ node: paragraphNode?.node ?? buildTextOnlyNode(hit.matchText),
382408
383401
  context: {
382409
383402
  ancestors: [{ id: ref5, kind: "v2-search-ref" }]
382410
383403
  }
382411
383404
  };
382412
383405
  }
382413
- function buildTextOnlyNode(text4, source) {
382414
- const inlines = [{ kind: "run", run: { text: text4 } }];
382415
- if (source?.kind === "heading") {
382416
- return { ...source, heading: { ...source.heading, inlines } };
382417
- }
382418
- if (source?.kind === "paragraph") {
382419
- return { ...source, paragraph: { ...source.paragraph, inlines } };
382420
- }
382421
- return { kind: "paragraph", paragraph: { inlines } };
383406
+ function buildTextOnlyNode(text4) {
383407
+ return { kind: "paragraph", paragraph: { inlines: [{ kind: "run", run: { text: text4 } }] } };
382422
383408
  }
382423
383409
  function clampLimit2(limit) {
382424
383410
  if (limit == null)
@@ -388725,7 +389711,7 @@ function serializeSelectionRange(context, target, includeHtml, options) {
388725
389711
  const listLevel = numbering ? Number.parseInt(numbering.ilvl, 10) : undefined;
388726
389712
  const blockSdts = blockSdtPath.map((ordinal) => {
388727
389713
  const wrapper = blockSdtWrappers.get(ordinal);
388728
- if (!wrapper || !fullyCovered || !wrapper.supported || index2.entries.some((candidate2) => boundaryMap.byBlockId(candidate2.blockId)?.blockSdtPath.includes(ordinal) && ((boundaryMap.byBlockId(candidate2.blockId)?.tableCellPath.length ?? 0) > 1 || candidate2.ordinal < startEntry.ordinal || candidate2.ordinal > endEntry.ordinal || candidate2.ordinal === startEntry.ordinal && startPoint.offset !== 0 || candidate2.ordinal === endEntry.ordinal && endPoint.offset !== parseParagraphInlineMap(SERIALIZE_TD.decode(bytes.subarray(endEntry.byteStart, endEntry.byteEnd))).visibleLength)))
389714
+ if (!wrapper || !fullyCovered || !wrapper.supported || index2.entries.some((candidate2) => boundaryMap.byBlockId(candidate2.blockId)?.blockSdtPath.includes(ordinal) && ((boundaryMap.byBlockId(candidate2.blockId)?.tableCellPath.length ?? 0) > 1 || candidate2.ordinal < startEntry.ordinal || candidate2.ordinal > endEntry.ordinal || candidate2.ordinal === startEntry.ordinal && startPoint.offset !== 0 || candidate2.ordinal === endEntry.ordinal && endPoint.offset !== (options?.offsetSpace === "selection" ? paragraphPaintedLength(SERIALIZE_TD.decode(bytes.subarray(endEntry.byteStart, endEntry.byteEnd))) : parseParagraphInlineMap(SERIALIZE_TD.decode(bytes.subarray(endEntry.byteStart, endEntry.byteEnd))).visibleLength))))
388729
389715
  return null;
388730
389716
  return wrapper.properties;
388731
389717
  });
@@ -388769,10 +389755,22 @@ function serializeSelectionRange(context, target, includeHtml, options) {
388769
389755
  const anySoftBreak = blocks.some((block) => block.softBreaks);
388770
389756
  const items = [{ type: "text/plain", kind: "string", data: plainText }];
388771
389757
  if (includeHtml) {
389758
+ const assets = new Map([...rich.assetsByPartUri.values()].map(({ wire }) => [wire.id, wire]));
389759
+ let expandedImageBytes = 0;
389760
+ const admitPart = (part) => {
389761
+ if (part.kind === "image") {
389762
+ expandedImageBytes += (assets.get(part.image.assetId)?.data.length ?? 0) + 4096;
389763
+ return expandedImageBytes <= MAX_V22_PAYLOAD_BYTES2;
389764
+ }
389765
+ return part.kind !== "sdt" && part.kind !== "hyperlink" || part.parts.every(admitPart);
389766
+ };
389767
+ const admitted = grouped.every((entry) => entry.kind === "paragraph" ? entry.block.parts.every(admitPart) : entry.rows.every((row) => row.cells.every((cell) => cell.blocks.every((block) => block.parts.every(admitPart)))));
389768
+ if (!admitted)
389769
+ return { ok: false, code: "INVALID_PAYLOAD", message: "clipboard-html-image-payload-too-large" };
388772
389770
  items.push({
388773
389771
  type: "text/html",
388774
389772
  kind: "string",
388775
- data: buildHtmlFlavor(grouped)
389773
+ data: buildHtmlFlavor(grouped, assets)
388776
389774
  });
388777
389775
  }
388778
389776
  let plan;
@@ -389889,23 +390887,32 @@ function buildPlainFlavor(grouped) {
389889
390887
  }).join(`
389890
390888
  `);
389891
390889
  }
389892
- function blockInlineHtml(block) {
389893
- return block.parts.map(renderHtmlPart).join("");
390890
+ function paragraphPaintedLength(xml) {
390891
+ const map3 = parseParagraphInlineMap(xml);
390892
+ return map3.visibleLength + map3.leaves().filter(isVisibleZeroWidthObjectPiece).length;
390893
+ }
390894
+ function blockInlineHtml(block, assets) {
390895
+ return block.parts.map((part) => renderHtmlPart(part, assets)).join("");
389894
390896
  }
389895
- function renderHtmlPart(part) {
390897
+ function renderHtmlPart(part, assets) {
389896
390898
  if (part.kind === "break")
389897
390899
  return "<br/>";
389898
390900
  if (part.kind === "run")
389899
390901
  return renderHtmlRun(part.run);
389900
- if (part.kind === "image")
389901
- return "";
390902
+ if (part.kind === "image") {
390903
+ const asset = assets.get(part.image.assetId);
390904
+ if (!asset)
390905
+ return "";
390906
+ const { widthPx, heightPx, alt, title: title2 } = part.image;
390907
+ return `<img src="data:${asset.mimeType};base64,${asset.data}" width="${widthPx}" height="${heightPx}"` + (alt ? ` alt="${escapeHtmlAttribute3(alt)}"` : "") + (title2 ? ` title="${escapeHtmlAttribute3(title2)}"` : "") + "/>";
390908
+ }
389902
390909
  if (part.kind === "sdt")
389903
- return part.parts.map(renderHtmlPart).join("");
390910
+ return part.parts.map((child) => renderHtmlPart(child, assets)).join("");
389904
390911
  const href = part.target.kind === "external" ? part.target.url : `#${part.target.anchor}`;
389905
390912
  const title = part.tooltip ? ` title="${escapeHtmlAttribute3(part.tooltip)}"` : "";
389906
- return `<a href="${escapeHtmlAttribute3(href)}"${title}>${part.parts.map(renderHtmlPart).join("")}</a>`;
390913
+ return `<a href="${escapeHtmlAttribute3(href)}"${title}>${part.parts.map((child) => renderHtmlPart(child, assets)).join("")}</a>`;
389907
390914
  }
389908
- function buildHtmlFlavor(grouped) {
390915
+ function buildHtmlFlavor(grouped, assets) {
389909
390916
  const out = [];
389910
390917
  let openList2 = null;
389911
390918
  const closeList = () => {
@@ -389917,11 +390924,11 @@ function buildHtmlFlavor(grouped) {
389917
390924
  for (const entry of grouped) {
389918
390925
  if (entry.kind === "table") {
389919
390926
  closeList();
389920
- out.push(`<table${entry.cellSpacingPt !== undefined ? ` style="border-spacing: ${entry.cellSpacingPt}pt"` : ""}>${entry.rows.map((row) => `<tr>${row.cells.map((cell) => `<td${tableCellHtmlStyle(cell)}>${cell.blocks.map((block2) => block2.headingLevel ? `<h${block2.headingLevel}>${blockInlineHtml(block2)}</h${block2.headingLevel}>` : `<p>${blockInlineHtml(block2)}</p>`).join("")}</td>`).join("")}</tr>`).join("")}</table>`);
390927
+ out.push(`<table${entry.cellSpacingPt !== undefined ? ` style="border-spacing: ${entry.cellSpacingPt}pt"` : ""}>${entry.rows.map((row) => `<tr>${row.cells.map((cell) => `<td${tableCellHtmlStyle(cell)}>${cell.blocks.map((block2) => block2.headingLevel ? `<h${block2.headingLevel}>${blockInlineHtml(block2, assets)}</h${block2.headingLevel}>` : `<p>${blockInlineHtml(block2, assets)}</p>`).join("")}</td>`).join("")}</tr>`).join("")}</table>`);
389921
390928
  continue;
389922
390929
  }
389923
390930
  const block = entry.block;
389924
- const inline = blockInlineHtml(block);
390931
+ const inline = blockInlineHtml(block, assets);
389925
390932
  if (block.listKind) {
389926
390933
  const tag = block.listKind === "bullet" ? "ul" : "ol";
389927
390934
  if (openList2 !== tag) {
@@ -390133,7 +391140,7 @@ class V2ClipboardAdapter {
390133
391140
  });
390134
391141
  if (!serialized2.ok)
390135
391142
  throw new DocumentApiValidationError2(serialized2.code, serialized2.message);
390136
- return serialized2.result;
391143
+ return attachMutationPublicRevision(serialized2.result, this.context.currentPublicRevision());
390137
391144
  }
390138
391145
  if (target.kind === "documentEnd") {
390139
391146
  throw new DocumentApiValidationError2("INVALID_TARGET", "clipboard.serializeSelection does not support documentEnd targets.");
@@ -390163,7 +391170,7 @@ class V2ClipboardAdapter {
390163
391170
  });
390164
391171
  if (!serialized.ok)
390165
391172
  throw new DocumentApiValidationError2(serialized.code, serialized.message);
390166
- return serialized.result;
391173
+ return attachMutationPublicRevision(serialized.result, this.context.currentPublicRevision());
390167
391174
  }
390168
391175
  }
390169
391176
  function pointStoryLocator(target) {
@@ -390582,6 +391589,7 @@ var init_adapter37 = __esm(() => {
390582
391589
  init_note_story();
390583
391590
  init_selection_target();
390584
391591
  init_document_reader();
391592
+ init_mutation_public_revision();
390585
391593
  init_adapter();
390586
391594
  init_stories();
390587
391595
  init_text_range_shifts();
@@ -396367,7 +397375,7 @@ var init_capability_matrix = __esm(() => {
396367
397375
  });
396368
397376
  });
396369
397377
 
396370
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.js
397378
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.js
396371
397379
  var create = () => new Map, copy = (m) => {
396372
397380
  const r = create();
396373
397381
  m.forEach((v, k) => {
@@ -396389,10 +397397,10 @@ var create = () => new Map, copy = (m) => {
396389
397397
  return false;
396390
397398
  };
396391
397399
 
396392
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.js
397400
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.js
396393
397401
  var create2 = () => new Set;
396394
397402
 
396395
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js
397403
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js
396396
397404
  var last = (arr) => arr[arr.length - 1], appendTo = (dest, src) => {
396397
397405
  for (let i2 = 0;i2 < src.length; i2++) {
396398
397406
  dest.push(src[i2]);
@@ -396410,7 +397418,7 @@ var init_array2 = __esm(() => {
396410
397418
  isArray = Array.isArray;
396411
397419
  });
396412
397420
 
396413
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.js
397421
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.js
396414
397422
  class ObservableV2 {
396415
397423
  constructor() {
396416
397424
  this._observers = create();
@@ -396477,7 +397485,7 @@ var init_observable = __esm(() => {
396477
397485
  init_array2();
396478
397486
  });
396479
397487
 
396480
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js
397488
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js
396481
397489
  var floor, abs, min = (a, b) => a < b ? a : b, max2 = (a, b) => a > b ? a : b, pow, isNegativeZero = (n) => n !== 0 ? n < 0 : 1 / n < 0;
396482
397490
  var init_math = __esm(() => {
396483
397491
  floor = Math.floor;
@@ -396485,7 +397493,7 @@ var init_math = __esm(() => {
396485
397493
  pow = Math.pow;
396486
397494
  });
396487
397495
 
396488
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js
397496
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js
396489
397497
  var BIT1 = 1, BIT2 = 2, BIT3 = 4, BIT4 = 8, BIT6 = 32, BIT7 = 64, BIT8 = 128, BIT18, BIT19, BIT20, BIT21, BIT22, BIT23, BIT24, BIT25, BIT26, BIT27, BIT28, BIT29, BIT30, BIT31, BIT32, BITS5 = 31, BITS6 = 63, BITS7 = 127, BITS17, BITS18, BITS19, BITS20, BITS21, BITS22, BITS23, BITS24, BITS25, BITS26, BITS27, BITS28, BITS29, BITS30, BITS31 = 2147483647;
396490
397498
  var init_binary = __esm(() => {
396491
397499
  BIT18 = 1 << 17;
@@ -396519,7 +397527,7 @@ var init_binary = __esm(() => {
396519
397527
  BITS30 = BIT31 - 1;
396520
397528
  });
396521
397529
 
396522
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js
397530
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js
396523
397531
  var MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, LOWEST_INT32, isInteger2;
396524
397532
  var init_number2 = __esm(() => {
396525
397533
  init_math();
@@ -396529,7 +397537,7 @@ var init_number2 = __esm(() => {
396529
397537
  isInteger2 = Number.isInteger || ((num) => typeof num === "number" && isFinite(num) && floor(num) === num);
396530
397538
  });
396531
397539
 
396532
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js
397540
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js
396533
397541
  var fromCharCode, fromCodePoint, MAX_UTF16_CHARACTER, toLowerCase = (s) => s.toLowerCase(), trimLeftRegex, trimLeft = (s) => s.replace(trimLeftRegex, ""), fromCamelCaseRegex, fromCamelCase = (s, separator) => trimLeft(s.replace(fromCamelCaseRegex, (match) => `${separator}${toLowerCase(match)}`)), _encodeUtf8Polyfill = (str) => {
396534
397542
  const encodedString = unescape(encodeURIComponent(str));
396535
397543
  const len = encodedString.length;
@@ -396553,7 +397561,7 @@ var init_string2 = __esm(() => {
396553
397561
  }
396554
397562
  });
396555
397563
 
396556
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js
397564
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js
396557
397565
  class Encoder {
396558
397566
  constructor() {
396559
397567
  this.cpos = 0;
@@ -396819,14 +397827,14 @@ var init_encoding = __esm(() => {
396819
397827
  };
396820
397828
  });
396821
397829
 
396822
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.js
397830
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.js
396823
397831
  var create3 = (s) => new Error(s), methodUnimplemented = () => {
396824
397832
  throw create3("Method unimplemented");
396825
397833
  }, unexpectedCase = () => {
396826
397834
  throw create3("Unexpected case");
396827
397835
  };
396828
397836
 
396829
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.js
397837
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.js
396830
397838
  class Decoder {
396831
397839
  constructor(uint8Array) {
396832
397840
  this.arr = uint8Array;
@@ -397017,7 +398025,7 @@ var init_decoding = __esm(() => {
397017
398025
  };
397018
398026
  });
397019
398027
 
397020
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.js
398028
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.js
397021
398029
  import { webcrypto } from "node:crypto";
397022
398030
  var subtle, getRandomValues;
397023
398031
  var init_webcrypto_node = __esm(() => {
@@ -397025,29 +398033,29 @@ var init_webcrypto_node = __esm(() => {
397025
398033
  getRandomValues = webcrypto.getRandomValues.bind(webcrypto);
397026
398034
  });
397027
398035
 
397028
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.js
398036
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.js
397029
398037
  var uint322 = () => getRandomValues(new Uint32Array(1))[0], uuidv4Template, uuidv42 = () => uuidv4Template.replace(/[018]/g, (c) => (c ^ uint322() & 15 >> c / 4).toString(16));
397030
398038
  var init_random = __esm(() => {
397031
398039
  init_webcrypto_node();
397032
398040
  uuidv4Template = [1e7] + -1000 + -4000 + -8000 + -100000000000;
397033
398041
  });
397034
398042
 
397035
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.js
398043
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.js
397036
398044
  var getUnixTime;
397037
398045
  var init_time = __esm(() => {
397038
398046
  getUnixTime = Date.now;
397039
398047
  });
397040
398048
 
397041
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.js
398049
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.js
397042
398050
  var create4 = (f) => new Promise(f), all2;
397043
398051
  var init_promise2 = __esm(() => {
397044
398052
  all2 = Promise.all.bind(Promise);
397045
398053
  });
397046
398054
 
397047
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.js
398055
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.js
397048
398056
  var undefinedToNull = (v) => v === undefined ? null : v;
397049
398057
 
397050
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.js
398058
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.js
397051
398059
  class VarStoragePolyfill {
397052
398060
  constructor() {
397053
398061
  this.map = new Map;
@@ -397071,13 +398079,13 @@ var init_storage = __esm(() => {
397071
398079
  varStorage = _localStorage;
397072
398080
  });
397073
398081
 
397074
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.js
398082
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.js
397075
398083
  var EqualityTraitSymbol, equals = (a, b) => a === b || !!a?.[EqualityTraitSymbol]?.(b) || false;
397076
398084
  var init_equality = __esm(() => {
397077
398085
  EqualityTraitSymbol = Symbol("Equality");
397078
398086
  });
397079
398087
 
397080
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.js
398088
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.js
397081
398089
  var assign, keys, forEach = (obj, f) => {
397082
398090
  for (const key2 in obj) {
397083
398091
  f(obj[key2], key2);
@@ -397116,7 +398124,7 @@ var init_object2 = __esm(() => {
397116
398124
  freeze = Object.freeze;
397117
398125
  });
397118
398126
 
397119
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js
398127
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js
397120
398128
  var callAll = (fs, args, i2 = 0) => {
397121
398129
  try {
397122
398130
  for (;i2 < fs.length; i2++) {
@@ -397205,7 +398213,7 @@ var init_function = __esm(() => {
397205
398213
  init_equality();
397206
398214
  });
397207
398215
 
397208
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.js
398216
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.js
397209
398217
  var isNode, isBrowser, isMac, params, args, computeParams = () => {
397210
398218
  if (params === undefined) {
397211
398219
  if (isNode) {
@@ -397259,7 +398267,7 @@ var init_environment = __esm(() => {
397259
398267
  supportsColor = forceColor || !hasParam2("--no-colors") && !hasConf("no-color") && (!isNode || process.stdout.isTTY) && (!isNode || hasParam2("--color") || getVariable("COLORTERM") !== null || (getVariable("TERM") || "").includes("color"));
397260
398268
  });
397261
398269
 
397262
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.js
398270
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.js
397263
398271
  var createUint8ArrayFromLen = (len) => new Uint8Array(len), createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length2) => new Uint8Array(buffer, byteOffset, length2), createUint8ArrayFromArrayBuffer = (buffer) => new Uint8Array(buffer), toBase64Browser = (bytes) => {
397264
398272
  let s = "";
397265
398273
  for (let i2 = 0;i2 < bytes.byteLength; i2++) {
@@ -397288,13 +398296,13 @@ var init_buffer = __esm(() => {
397288
398296
  fromBase64 = isBrowser ? fromBase64Browser : fromBase64Node;
397289
398297
  });
397290
398298
 
397291
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.js
398299
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.js
397292
398300
  var create5;
397293
398301
  var init_symbol = __esm(() => {
397294
398302
  create5 = Symbol;
397295
398303
  });
397296
398304
 
397297
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.js
398305
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.js
397298
398306
  var BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR, computeNoColorLoggingArgs = (args2) => {
397299
398307
  if (args2.length === 1 && args2[0]?.constructor === Function) {
397300
398308
  args2 = args2[0]();
@@ -397338,7 +398346,7 @@ var init_logging_common = __esm(() => {
397338
398346
  lastLoggingTime = getUnixTime();
397339
398347
  });
397340
398348
 
397341
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.js
398349
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.js
397342
398350
  var _nodeStyleMap, computeNodeLoggingArgs = (args2) => {
397343
398351
  if (args2.length === 1 && args2[0]?.constructor === Function) {
397344
398352
  args2 = args2[0]();
@@ -397395,7 +398403,7 @@ var init_logging_node = __esm(() => {
397395
398403
  computeLoggingArgs = supportsColor ? computeNodeLoggingArgs : computeNoColorLoggingArgs;
397396
398404
  });
397397
398405
 
397398
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.js
398406
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.js
397399
398407
  var createIterator = (next) => ({
397400
398408
  [Symbol.iterator]() {
397401
398409
  return this;
@@ -397412,7 +398420,7 @@ var createIterator = (next) => ({
397412
398420
  return { done, value: done ? undefined : fmap(value2) };
397413
398421
  });
397414
398422
 
397415
- // ../../../v2/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/yjs.mjs
398423
+ // ../../node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/yjs.mjs
397416
398424
  class DeleteItem {
397417
398425
  constructor(clock, len) {
397418
398426
  this.clock = clock;
@@ -402155,7 +403163,7 @@ var init_yjs = __esm(() => {
402155
403163
  glo[importIdentifier] = true;
402156
403164
  });
402157
403165
 
402158
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.js
403166
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.js
402159
403167
  class LocalStoragePolyfill {
402160
403168
  constructor(room) {
402161
403169
  this.room = room;
@@ -402201,7 +403209,7 @@ var init_broadcastchannel = __esm(() => {
402201
403209
  BC = typeof BroadcastChannel === "undefined" ? LocalStoragePolyfill : BroadcastChannel;
402202
403210
  });
402203
403211
 
402204
- // ../../../v2/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/sync.js
403212
+ // ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/sync.js
402205
403213
  var messageYjsSyncStep1 = 0, messageYjsSyncStep2 = 1, messageYjsUpdate = 2, writeSyncStep1 = (encoder2, doc2) => {
402206
403214
  writeVarUint(encoder2, messageYjsSyncStep1);
402207
403215
  const sv = encodeStateVector(doc2);
@@ -402244,7 +403252,7 @@ var init_sync = __esm(() => {
402244
403252
  readUpdate = readSyncStep2;
402245
403253
  });
402246
403254
 
402247
- // ../../../v2/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/auth.js
403255
+ // ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/auth.js
402248
403256
  var messagePermissionDenied = 0, readAuthMessage = (decoder9, y, permissionDeniedHandler) => {
402249
403257
  switch (readVarUint(decoder9)) {
402250
403258
  case messagePermissionDenied:
@@ -402255,7 +403263,7 @@ var init_auth = __esm(() => {
402255
403263
  init_decoding();
402256
403264
  });
402257
403265
 
402258
- // ../../../v2/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.js
403266
+ // ../../node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.js
402259
403267
  var outdatedTimeout = 30000, Awareness, removeAwarenessStates = (awareness, clients, origin) => {
402260
403268
  const removed = [];
402261
403269
  for (let i2 = 0;i2 < clients.length; i2++) {
@@ -402438,13 +403446,13 @@ var init_awareness = __esm(() => {
402438
403446
  };
402439
403447
  });
402440
403448
 
402441
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.js
403449
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.js
402442
403450
  var encodeQueryParams = (params2) => map3(params2, (val, key2) => `${encodeURIComponent(key2)}=${encodeURIComponent(val)}`).join("&");
402443
403451
  var init_url = __esm(() => {
402444
403452
  init_object2();
402445
403453
  });
402446
403454
 
402447
- // ../../../v2/node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.31/node_modules/y-websocket/src/y-websocket.js
403455
+ // ../../node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.31/node_modules/y-websocket/src/y-websocket.js
402448
403456
  var messageSync = 0, messageQueryAwareness = 3, messageAwareness = 1, messageAuth = 2, messageHandlers, messageReconnectTimeout = 30000, permissionDeniedHandler = (provider, reason) => console.warn(`Permission denied to access ${provider.url}.
402449
403457
  ${reason}`), readMessage = (provider, buf, emitSynced) => {
402450
403458
  const decoder9 = createDecoder(buf);
@@ -403237,7 +404245,7 @@ var init_y_websocket_single_doc = __esm(() => {
403237
404245
  init_runtime4();
403238
404246
  });
403239
404247
 
403240
- // ../../../v2/node_modules/.pnpm/@hocuspocus+common@2.15.3/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js
404248
+ // ../../node_modules/.pnpm/@hocuspocus+common@2.15.3/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js
403241
404249
  var floor2, min2 = (a, b) => a < b ? a : b, max3 = (a, b) => a > b ? a : b, BIT82 = 128, BITS72 = 127, MAX_SAFE_INTEGER2, _encodeUtf8Polyfill2 = (str) => {
403242
404250
  const encodedString = unescape(encodeURIComponent(str));
403243
404251
  const len = encodedString.length;
@@ -403396,7 +404404,7 @@ var init_hocuspocus_common_esm = __esm(() => {
403396
404404
  })(WsReadyStates || (WsReadyStates = {}));
403397
404405
  });
403398
404406
 
403399
- // ../../../v2/node_modules/.pnpm/@lifeomic+attempt@3.1.0/node_modules/@lifeomic/attempt/dist/src/index.js
404407
+ // ../../node_modules/.pnpm/@lifeomic+attempt@3.1.0/node_modules/@lifeomic/attempt/dist/src/index.js
403400
404408
  var require_src2 = __commonJS((exports) => {
403401
404409
  Object.defineProperty(exports, "__esModule", { value: true });
403402
404410
  exports.retry = exports.defaultCalculateDelay = exports.sleep = undefined;
@@ -403541,7 +404549,7 @@ var require_src2 = __commonJS((exports) => {
403541
404549
  exports.retry = retry;
403542
404550
  });
403543
404551
 
403544
- // ../../../v2/node_modules/.pnpm/@hocuspocus+provider@2.15.3_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/provider/dist/hocuspocus-provider.esm.js
404552
+ // ../../node_modules/.pnpm/@hocuspocus+provider@2.15.3_y-protocols@1.0.7_yjs@13.6.31__yjs@13.6.31/node_modules/@hocuspocus/provider/dist/hocuspocus-provider.esm.js
403545
404553
  class VarStoragePolyfill2 {
403546
404554
  constructor() {
403547
404555
  this.map = new Map;
@@ -405291,7 +406299,7 @@ var init_hocuspocus_single_doc = __esm(() => {
405291
406299
  init_runtime4();
405292
406300
  });
405293
406301
 
405294
- // ../../../v2/node_modules/.pnpm/@liveblocks+core@3.15.5_@types+json-schema@7.0.15/node_modules/@liveblocks/core/dist/index.js
406302
+ // ../../node_modules/.pnpm/@liveblocks+core@3.15.5_@types+json-schema@7.0.15/node_modules/@liveblocks/core/dist/index.js
405295
406303
  function error48(msg) {
405296
406304
  if (false) {} else {
405297
406305
  throw new Error(msg);
@@ -414263,7 +415271,7 @@ var init_dist6 = __esm(() => {
414263
415271
  detectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);
414264
415272
  });
414265
415273
 
414266
- // ../../../v2/node_modules/.pnpm/@liveblocks+client@3.15.5_@types+json-schema@7.0.15/node_modules/@liveblocks/client/dist/index.js
415274
+ // ../../node_modules/.pnpm/@liveblocks+client@3.15.5_@types+json-schema@7.0.15/node_modules/@liveblocks/client/dist/index.js
414267
415275
  var PKG_NAME2 = "@liveblocks/client", PKG_VERSION2 = "3.15.5", PKG_FORMAT2 = "esm";
414268
415276
  var init_dist7 = __esm(() => {
414269
415277
  init_dist6();
@@ -414271,7 +415279,7 @@ var init_dist7 = __esm(() => {
414271
415279
  detectDupes(PKG_NAME2, PKG_VERSION2, PKG_FORMAT2);
414272
415280
  });
414273
415281
 
414274
- // ../../../v2/node_modules/.pnpm/js-base64@3.7.8/node_modules/js-base64/base64.mjs
415282
+ // ../../node_modules/.pnpm/js-base64@3.7.8/node_modules/js-base64/base64.mjs
414275
415283
  var version2 = "3.7.8", VERSION2, _hasBuffer, _TD, _TE, b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", b64chs, b64tab, b64re, _fromCC, _U8Afrom, _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_"), _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, ""), btoaPolyfill = (bin) => {
414276
415284
  let u32, c0, c1, c2, asc = "";
414277
415285
  const pad = bin.length % 3;
@@ -414415,7 +415423,7 @@ var init_base64 = __esm(() => {
414415
415423
  };
414416
415424
  });
414417
415425
 
414418
- // ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.js
415426
+ // ../../node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.js
414419
415427
  var rtop = (request) => create4((resolve, reject2) => {
414420
415428
  request.onerror = (event) => reject2(new Error(event.target.error));
414421
415429
  request.onsuccess = (event) => resolve(event.target.result);
@@ -414453,7 +415461,7 @@ var init_indexeddb = __esm(() => {
414453
415461
  init_promise2();
414454
415462
  });
414455
415463
 
414456
- // ../../../v2/node_modules/.pnpm/y-indexeddb@9.0.12_yjs@13.6.31/node_modules/y-indexeddb/src/y-indexeddb.js
415464
+ // ../../node_modules/.pnpm/y-indexeddb@9.0.12_yjs@13.6.31/node_modules/y-indexeddb/src/y-indexeddb.js
414457
415465
  var customStoreName = "custom", updatesStoreName = "updates", PREFERRED_TRIM_SIZE = 500, fetchUpdates = (idbPersistence, beforeApplyUpdatesCallback = () => {}, afterApplyUpdatesCallback = () => {}) => {
414458
415466
  const [updatesStore] = transact2(idbPersistence.db, [updatesStoreName]);
414459
415467
  return getAll(updatesStore, createIDBKeyRangeLowerBound(idbPersistence._dbref, false)).then((updates) => {
@@ -414565,7 +415573,7 @@ var init_y_indexeddb = __esm(() => {
414565
415573
  };
414566
415574
  });
414567
415575
 
414568
- // ../../../v2/node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
415576
+ // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
414569
415577
  function isBytes(a) {
414570
415578
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
414571
415579
  }
@@ -414625,7 +415633,7 @@ var init_utils = __esm(() => {
414625
415633
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
414626
415634
  });
414627
415635
 
414628
- // ../../../v2/node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
415636
+ // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
414629
415637
  function setBigUint64(view, byteOffset, value2, isLE) {
414630
415638
  if (typeof view.setBigUint64 === "function")
414631
415639
  return view.setBigUint64(byteOffset, value2, isLE);
@@ -414749,7 +415757,7 @@ var init__md = __esm(() => {
414749
415757
  ]);
414750
415758
  });
414751
415759
 
414752
- // ../../../v2/node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js
415760
+ // ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js
414753
415761
  var SHA256_K, SHA256_W, SHA256, sha256;
414754
415762
  var init_sha2 = __esm(() => {
414755
415763
  init__md();
@@ -414893,7 +415901,7 @@ var init_sha2 = __esm(() => {
414893
415901
  sha256 = /* @__PURE__ */ createHasher(() => new SHA256);
414894
415902
  });
414895
415903
 
414896
- // ../../../v2/node_modules/.pnpm/@liveblocks+yjs@3.15.5_@types+json-schema@7.0.15_yjs@13.6.31/node_modules/@liveblocks/yjs/dist/index.js
415904
+ // ../../node_modules/.pnpm/@liveblocks+yjs@3.15.5_@types+json-schema@7.0.15_yjs@13.6.31/node_modules/@liveblocks/yjs/dist/index.js
414897
415905
  var PKG_NAME3 = "@liveblocks/yjs", PKG_VERSION3 = "3.15.5", PKG_FORMAT3 = "esm", create9 = () => /* @__PURE__ */ new Map, setIfUndefined3 = (map5, key2, createT) => {
414898
415906
  let set3 = map5.get(key2);
414899
415907
  if (set3 === undefined) {
@@ -429227,7 +430235,6 @@ function materializeProjection(input) {
429227
430235
  previousByPartUri.set(story.partUri, story);
429228
430236
  }
429229
430237
  }
429230
- const blockOnlyByShard = new Map;
429231
430238
  const dirtyStoryShardIds = new Set;
429232
430239
  const explicitDirtyStoryShardIds = new Set;
429233
430240
  const dirtyStoryBlocks = new Map;
@@ -429269,16 +430276,8 @@ function materializeProjection(input) {
429269
430276
  const set3 = dirtyStoryBlocks.get(record4.shardId) ?? new Set;
429270
430277
  set3.add(record4.blockId);
429271
430278
  dirtyStoryBlocks.set(record4.shardId, set3);
429272
- if (record4.kind === PROJECTION_DIRTY_KIND.storyText) {
429273
- const blockSet = blockOnlyByShard.get(record4.shardId) ?? new Set;
429274
- blockSet.add(record4.blockId);
429275
- blockOnlyByShard.set(record4.shardId, blockSet);
429276
- } else {
429277
- blockOnlyByShard.delete(record4.shardId);
429278
- }
429279
430279
  } else {
429280
430280
  wholeStoryDirtyShardIds.add(record4.shardId);
429281
- blockOnlyByShard.delete(record4.shardId);
429282
430281
  }
429283
430282
  } else {
429284
430283
  for (const handle of input.shardRegistry.listStories()) {
@@ -429421,7 +430420,8 @@ function materializeProjection(input) {
429421
430420
  blockHints.add(blockId);
429422
430421
  }
429423
430422
  if (blockHints && blockHints.size > 0 && previous3) {
429424
- const currentSnapshot = structuralSnapshot ?? readStorySnapshot(readTarget);
430423
+ const textLocalSnapshot = !structuralSnapshot && tableReplacements.length === 0 ? readTextLocalStorySnapshot({ previous: previous3, target: readTarget, shardId: handle.shardId, dirty: input.dirty }) : null;
430424
+ const currentSnapshot = structuralSnapshot ?? textLocalSnapshot?.snapshot ?? readStorySnapshot(readTarget);
429425
430425
  let placements2;
429426
430426
  const currentBlockIds = currentSnapshot.blocks.map((block) => block.blockId);
429427
430427
  if (wholeStoryDirtyShardIds.has(handle.shardId)) {
@@ -429573,6 +430573,7 @@ function materializeProjection(input) {
429573
430573
  }) ?? blockPatchedStory;
429574
430574
  const projected = replaceProjectedTrailingXml(projectedWithTables, trailingXml, bootstrap);
429575
430575
  stories.push(projected);
430576
+ rememberTextLocalStorySnapshot(projected, readTarget, currentSnapshot, textLocalSnapshot);
429576
430577
  blockDigestIndex(projected.blockDigests);
429577
430578
  storiesRebuilt += 1;
429578
430579
  } else if (tableReplacements.length > 0) {
@@ -429593,6 +430594,7 @@ function materializeProjection(input) {
429593
430594
  storiesRebuilt += 1;
429594
430595
  } else {
429595
430596
  stories.push(previous3);
430597
+ rememberTextLocalStorySnapshot(previous3, readTarget, currentSnapshot, textLocalSnapshot);
429596
430598
  }
429597
430599
  continue;
429598
430600
  }
@@ -429729,6 +430731,55 @@ function materializeProjection(input) {
429729
430731
  };
429730
430732
  return { record: withDigest, storiesRebuilt, fullStoryRebuilds, fullPackageRebuild };
429731
430733
  }
430734
+ function readTextLocalStorySnapshot(input) {
430735
+ const cached2 = TEXT_LOCAL_STORY_SNAPSHOTS.get(input.previous);
430736
+ if (!cached2 || input.previous.tableStructuralOverlays?.length || input.dirty.length === 0)
430737
+ return null;
430738
+ if (input.dirty.some((reason) => reason.kind !== PROJECTION_DIRTY_KIND.storyText || reason.shardId !== input.shardId || !reason.blockId || reason.source === "bootstrap"))
430739
+ return null;
430740
+ const scope = resolveStoryShardScope(input.target);
430741
+ if (scope.blocks !== cached2.blocks || hasContentControlGroups(scope))
430742
+ return null;
430743
+ const entries2 = listOrderedBlocks(scope);
430744
+ if (entries2.length !== cached2.snapshot.blocks.length || entries2.length !== scope.blocks.length)
430745
+ return null;
430746
+ const changed = new Set(input.dirty.map((reason) => reason.blockId));
430747
+ for (const [index2, entry] of entries2.entries()) {
430748
+ if (entry.block !== cached2.carriers[index2] || entry.blockId !== cached2.snapshot.blocks[index2].blockId || entry.block.get(BLOCK_KEY.mergedIntoBlockId))
430749
+ return null;
430750
+ changed.delete(entry.blockId);
430751
+ }
430752
+ if (changed.size > 0)
430753
+ return null;
430754
+ const dirtyIds = new Set(input.dirty.map((reason) => reason.blockId));
430755
+ return {
430756
+ blocks: scope.blocks,
430757
+ carriers: cached2.carriers,
430758
+ snapshot: {
430759
+ meta: readMeta(scope),
430760
+ blocks: entries2.map((entry, index2) => dirtyIds.has(entry.blockId) ? snapshotBlock(entry.block) : cached2.snapshot.blocks[index2])
430761
+ }
430762
+ };
430763
+ }
430764
+ function rememberTextLocalStorySnapshot(story, target, snapshot3, validated) {
430765
+ if (story.tableStructuralOverlays?.length || snapshot3.blocks.some((block) => block.mergedIntoBlockId || block.mergedTailBlockIds.length > 0))
430766
+ return;
430767
+ if (validated && validated.snapshot === snapshot3 && story.blockDigests.length === snapshot3.blocks.length && story.blockDigests.every((entry, index2) => entry.blockId === snapshot3.blocks[index2].blockId)) {
430768
+ TEXT_LOCAL_STORY_SNAPSHOTS.set(story, validated);
430769
+ return;
430770
+ }
430771
+ const scope = resolveStoryShardScope(target);
430772
+ if (hasContentControlGroups(scope))
430773
+ return;
430774
+ const entries2 = listOrderedBlocks(scope);
430775
+ if (entries2.length !== snapshot3.blocks.length || entries2.length !== scope.blocks.length || entries2.length !== story.blockDigests.length || entries2.some((entry, index2) => entry.blockId !== snapshot3.blocks[index2].blockId || entry.blockId !== story.blockDigests[index2].blockId))
430776
+ return;
430777
+ TEXT_LOCAL_STORY_SNAPSHOTS.set(story, {
430778
+ blocks: scope.blocks,
430779
+ carriers: entries2.map((entry) => entry.block),
430780
+ snapshot: snapshot3
430781
+ });
430782
+ }
429732
430783
  function byPartUri(a, b) {
429733
430784
  if (a.partUri < b.partUri)
429734
430785
  return -1;
@@ -432980,7 +434031,7 @@ function canonicalStoryDigestInputs(stories) {
432980
434031
  tableStructuralOverlays: [...story.tableStructuralOverlays ?? []].sort((left, right) => left.tableNodeId < right.tableNodeId ? -1 : left.tableNodeId > right.tableNodeId ? 1 : 0)
432981
434032
  }));
432982
434033
  }
432983
- var WORD_ML_NS2 = 'xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"', WORD_ML_2010_NS = 'xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"', STORY_ROOT_NS, TEXT_DECODER7, STORY_BLOCK_INDEX_CACHE, SYNTHETIC_PARAGRAPH_BLOCK_ID_PREFIX4 = "__sd:paragraph:", UTF8_ENCODER3, SOURCE_XML_BYTE_ALIGNED_CACHE, XML_EMISSION_CONTEXTS, CONTENT_CONTROL_TOPOLOGIES, PROJECTED_NAMESPACE_CONTEXTS, PARAGRAPH_PROPERTY_ORDER, RUN_PROPERTY_CONTENT_LOCAL_NAMES;
434034
+ var WORD_ML_NS2 = 'xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"', WORD_ML_2010_NS = 'xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"', STORY_ROOT_NS, TEXT_DECODER7, STORY_BLOCK_INDEX_CACHE, SYNTHETIC_PARAGRAPH_BLOCK_ID_PREFIX4 = "__sd:paragraph:", UTF8_ENCODER3, SOURCE_XML_BYTE_ALIGNED_CACHE, XML_EMISSION_CONTEXTS, CONTENT_CONTROL_TOPOLOGIES, PROJECTED_NAMESPACE_CONTEXTS, TEXT_LOCAL_STORY_SNAPSHOTS, PARAGRAPH_PROPERTY_ORDER, RUN_PROPERTY_CONTENT_LOCAL_NAMES;
432984
434035
  var init_materialize = __esm(() => {
432985
434036
  init_package_part();
432986
434037
  init_anchors();
@@ -433008,6 +434059,7 @@ var init_materialize = __esm(() => {
433008
434059
  XML_EMISSION_CONTEXTS = new WeakMap;
433009
434060
  CONTENT_CONTROL_TOPOLOGIES = new WeakMap;
433010
434061
  PROJECTED_NAMESPACE_CONTEXTS = new WeakMap;
434062
+ TEXT_LOCAL_STORY_SNAPSHOTS = new WeakMap;
433011
434063
  PARAGRAPH_PROPERTY_ORDER = new Map([
433012
434064
  "pStyle",
433013
434065
  "keepNext",
@@ -437273,8 +438325,8 @@ function applyPreflightedTrackedTextDecisionsToStory(input) {
437273
438325
  tx.meta.set(ACTOR_ATTRIBUTION_META_KEY, input.actorType);
437274
438326
  scope.meta.set(STORY_META_KEY.lastEditActorType, input.actorType);
437275
438327
  const { decision, doc: doc2, removedCommentCarrierIds, resolved, work } = input.plan;
437276
- for (const { target, span, block } of work) {
437277
- removeTrackedTextCarriers(block, span, decision === "reject" && target.carrierKind === "field-insertion");
438328
+ for (const { span, block } of work) {
438329
+ removeTrackedTextCarriers(block, span, decision === "reject" && span.trackedKind === "ins");
437278
438330
  removeCommentCarriersByIds(block, removedCommentCarrierIds);
437279
438331
  }
437280
438332
  const sorted = [...work].sort((left, right) => {
@@ -437291,12 +438343,12 @@ function applyPreflightedTrackedTextDecisionsToStory(input) {
437291
438343
  if (span.trackedKind === "ins" && decision === "reject") {
437292
438344
  const length3 = span.endOffset - span.startOffset;
437293
438345
  if (length3 > 0) {
437294
- deleteText2({
437295
- doc: doc2,
437296
- blockId: span.blockId,
438346
+ deleteTextAtResolvedTarget({
438347
+ target: resolveStoryTextMutationTarget(doc2, span.blockId),
437297
438348
  offset: span.startOffset,
437298
438349
  length: length3,
437299
- origin: STORY_SURFACE_BACKEND_ORIGIN
438350
+ origin: STORY_SURFACE_BACKEND_ORIGIN,
438351
+ preserveZeroLengthAtStart: true
437300
438352
  });
437301
438353
  }
437302
438354
  }
@@ -437664,8 +438716,19 @@ function validateCompareApplySessionSync(prepared, extension2, options) {
437664
438716
  if (!extension2.storyLocal || prepared.resolvedTargets.stories.length !== 1 || String(prepared.resolvedTargets.stories[0]) !== storyId || ownership.length !== 1 || String(ownership[0]?.storyId) !== storyId || prepared.resolvedTargets.partUris.length !== 1 || String(prepared.resolvedTargets.partUris[0]) !== String(ownership[0]?.partUri)) {
437665
438717
  return { ok: false, message: "compareApply collaboration requires one owned story part" };
437666
438718
  }
437667
- if (source.bodySteps.length === 0 || source.bodySteps.some((step3) => step3.kind !== "edit") || source.storyGroups?.length || source.storyPackageOperations?.length || source.commentSteps?.length || source.packageRewrites?.length || source.relationshipBackedBodyRewrites?.length || source.headerFooterLifecycle || source.headerFooterSlotSteps?.length || source.tableTopologySteps?.length || source.tableBlockSteps?.length || source.tablePropertySteps?.length || source.sectionReplaySteps?.length || source.referenceReplaySteps?.length) {
437668
- return { ok: false, message: "compareApply collaboration supports paragraph text edits only" };
438719
+ if (source.bodySteps.length === 0 || source.bodySteps.some((step3) => {
438720
+ if (step3.kind === "edit")
438721
+ return false;
438722
+ if (step3.kind !== "formatEdit" || step3.targetRunXml === undefined)
438723
+ return true;
438724
+ if (extension2.historyReplay)
438725
+ return false;
438726
+ const bytes = getSDDocumentSessionInternalPartBytes(options.session, String(ownership[0].partUri));
438727
+ const entry = getSDDocumentSessionInternalStoryParagraphIndex(options.session, source.storyId)?.byParaId(step3.blockId);
438728
+ const proof = bytes && entry && inspectInlineControlCompareBodyReplay(bytes, entry.byteStart, entry.byteEnd, step3.targetRunXml);
438729
+ return !proof || proof.inserted.length === 0;
438730
+ }) || source.storyGroups?.length || source.storyPackageOperations?.length || source.commentSteps?.length || source.packageRewrites?.length || source.relationshipBackedBodyRewrites?.length || source.headerFooterLifecycle || source.headerFooterSlotSteps?.length || source.tableTopologySteps?.length || source.tableBlockSteps?.length || source.tablePropertySteps?.length || source.sectionReplaySteps?.length || source.referenceReplaySteps?.length) {
438731
+ return { ok: false, message: "compareApply collaboration supports paragraph text edits and proved inline control wrapping only" };
437669
438732
  }
437670
438733
  const targetBlockIds2 = [...new Set(source.bodySteps.map((step3) => step3.blockId))];
437671
438734
  if (targetBlockIds2.length !== extension2.targetBlockIds.length || targetBlockIds2.some((blockId) => !extension2.targetBlockIds.includes(blockId))) {
@@ -438977,6 +440040,7 @@ function atomOverlapsRange(atomOffset, atomLength, rangeStart, rangeEnd) {
438977
440040
  var STORY_SURFACE_TRACE, TRACKED_CHANGE_DECISIONS_LEDGER_KEY = "trackedChangeDecisions", CLEARED_RUN_ATTRIBUTES;
438978
440041
  var init_story_surface_execution_backend = __esm(() => {
438979
440042
  init_yjs();
440043
+ init_sd_document_session_internal();
438980
440044
  init_scope3();
438981
440045
  init_content_control_groups();
438982
440046
  init_story_surface_session_sync();