@superdoc/mcp 1.6.0 → 1.6.1-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1260 -592
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -31600,7 +31600,7 @@ var init_host = __esm(() => {
|
|
|
31600
31600
|
});
|
|
31601
31601
|
|
|
31602
31602
|
// ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
|
|
31603
|
-
var SDK_VERSION = "2.19.
|
|
31603
|
+
var SDK_VERSION = "2.19.1-next.2";
|
|
31604
31604
|
|
|
31605
31605
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
31606
31606
|
import { accessSync, chmodSync, constants, existsSync, statSync } from "node:fs";
|
|
@@ -123156,7 +123156,7 @@ var init_paragraph_signal_index = __esm(() => {
|
|
|
123156
123156
|
RETAINED_PARAGRAPH_SIGNALS = Symbol("retained-paragraph-signals");
|
|
123157
123157
|
});
|
|
123158
123158
|
|
|
123159
|
-
//
|
|
123159
|
+
// ../../../v2/node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.0/ed5.js
|
|
123160
123160
|
var require_ed5 = __commonJS((exports) => {
|
|
123161
123161
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
123162
123162
|
exports.CHAR = `
|
|
@@ -123194,7 +123194,7 @@ var require_ed5 = __commonJS((exports) => {
|
|
|
123194
123194
|
exports.isNameChar = isNameChar;
|
|
123195
123195
|
});
|
|
123196
123196
|
|
|
123197
|
-
//
|
|
123197
|
+
// ../../../v2/node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.1/ed2.js
|
|
123198
123198
|
var require_ed2 = __commonJS((exports) => {
|
|
123199
123199
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
123200
123200
|
exports.CHAR = "\x01--�\uD800\uDC00-\uDBFF\uDFFF";
|
|
@@ -123241,7 +123241,7 @@ var require_ed2 = __commonJS((exports) => {
|
|
|
123241
123241
|
exports.isNameChar = isNameChar;
|
|
123242
123242
|
});
|
|
123243
123243
|
|
|
123244
|
-
//
|
|
123244
|
+
// ../../../v2/node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xmlns/1.0/ed3.js
|
|
123245
123245
|
var require_ed3 = __commonJS((exports) => {
|
|
123246
123246
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
123247
123247
|
exports.NC_NAME_START_CHAR = "A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�\uD800\uDC00-\uDB7F\uDFFF";
|
|
@@ -123259,7 +123259,7 @@ var require_ed3 = __commonJS((exports) => {
|
|
|
123259
123259
|
exports.isNCNameChar = isNCNameChar;
|
|
123260
123260
|
});
|
|
123261
123261
|
|
|
123262
|
-
//
|
|
123262
|
+
// ../../../v2/node_modules/.pnpm/saxes@6.0.0/node_modules/saxes/saxes.js
|
|
123263
123263
|
var require_saxes = __commonJS((exports) => {
|
|
123264
123264
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
123265
123265
|
exports.SaxesParser = exports.EVENTS = undefined;
|
|
@@ -127288,7 +127288,8 @@ function buildStructuralBoundaryMap(bytes) {
|
|
|
127288
127288
|
sdtOrdinal: sdtCounter,
|
|
127289
127289
|
wrapperLocked: lockPolicy.wrapperLocked,
|
|
127290
127290
|
contentLocked: lockPolicy.contentLocked,
|
|
127291
|
-
contentEditable: !lockPolicy.contentLocked && isSdtContentEditable(sdtXml)
|
|
127291
|
+
contentEditable: !lockPolicy.contentLocked && isSdtContentEditable(sdtXml),
|
|
127292
|
+
textAtomic: isTextAtomicBlockSdt(sdtXml)
|
|
127292
127293
|
});
|
|
127293
127294
|
sdtCounter += 1;
|
|
127294
127295
|
} else if (tag.local === "customXml") {
|
|
@@ -127311,6 +127312,7 @@ function recordParagraph2(input) {
|
|
|
127311
127312
|
const blockCustomXmlPath = [];
|
|
127312
127313
|
let hasLockedBlockSdt = false;
|
|
127313
127314
|
let hasNonEditableBlockSdtContent = false;
|
|
127315
|
+
let hasTextAtomicBlockSdt = false;
|
|
127314
127316
|
let hasContentLockedBlockSdt = false;
|
|
127315
127317
|
let lastTable = -1;
|
|
127316
127318
|
let lastRow = -1;
|
|
@@ -127330,6 +127332,7 @@ function recordParagraph2(input) {
|
|
|
127330
127332
|
blockSdtPath.push(frame.sdtOrdinal);
|
|
127331
127333
|
hasLockedBlockSdt || (hasLockedBlockSdt = frame.wrapperLocked);
|
|
127332
127334
|
hasNonEditableBlockSdtContent || (hasNonEditableBlockSdtContent = !frame.contentEditable);
|
|
127335
|
+
hasTextAtomicBlockSdt || (hasTextAtomicBlockSdt = frame.textAtomic);
|
|
127333
127336
|
hasContentLockedBlockSdt || (hasContentLockedBlockSdt = frame.contentLocked);
|
|
127334
127337
|
} else if (frame.kind === "customXml") {
|
|
127335
127338
|
blockCustomXmlPath.push(frame.customXmlOrdinal);
|
|
@@ -127342,6 +127345,7 @@ function recordParagraph2(input) {
|
|
|
127342
127345
|
blockSdtPath,
|
|
127343
127346
|
hasLockedBlockSdt,
|
|
127344
127347
|
hasNonEditableBlockSdtContent,
|
|
127348
|
+
hasTextAtomicBlockSdt,
|
|
127345
127349
|
hasContentLockedBlockSdt,
|
|
127346
127350
|
blockCustomXmlPath,
|
|
127347
127351
|
sectionIndex: input.sectionIndex,
|
|
@@ -127351,6 +127355,13 @@ function recordParagraph2(input) {
|
|
|
127351
127355
|
carriesSectionBreak: carriesSectionBreak(input.paragraphXml)
|
|
127352
127356
|
};
|
|
127353
127357
|
}
|
|
127358
|
+
function isTextAtomicBlockSdt(sdtXml) {
|
|
127359
|
+
const contentMatch = /<(?:[\w.-]+:)?sdtContent\b/iu.exec(sdtXml);
|
|
127360
|
+
if (!contentMatch)
|
|
127361
|
+
return false;
|
|
127362
|
+
const properties = sdtXml.slice(0, contentMatch.index);
|
|
127363
|
+
return /<(?:[\w.-]+:)?(?:checkbox|dropDownList)\b/iu.test(properties);
|
|
127364
|
+
}
|
|
127354
127365
|
function blockSdtLockPolicy(sdtXml) {
|
|
127355
127366
|
const properties = /<(?:[\w.-]+:)?sdtPr\b[^>]*>([\s\S]*?)<\/(?:[\w.-]+:)?sdtPr\s*>/.exec(sdtXml)?.[1];
|
|
127356
127367
|
if (!properties)
|
|
@@ -153098,7 +153109,7 @@ var init_history_text_replay = __esm(() => {
|
|
|
153098
153109
|
MAX_HISTORY_OWNER_BYTES = 512 * 1024;
|
|
153099
153110
|
});
|
|
153100
153111
|
|
|
153101
|
-
//
|
|
153112
|
+
// ../../../v2/node_modules/.pnpm/fflate@0.8.2/node_modules/fflate/esm/index.mjs
|
|
153102
153113
|
import { createRequire as createRequire3 } from "module";
|
|
153103
153114
|
function deflateSync(data, opts) {
|
|
153104
153115
|
return dopt(data, opts || {}, 0, 0);
|
|
@@ -165856,7 +165867,7 @@ function planDirectInlineEdit(paragraphBytes, startOffset, endOffset, newText, c
|
|
|
165856
165867
|
if (tocPlan)
|
|
165857
165868
|
return tocPlan;
|
|
165858
165869
|
if (startOffset === endOffset) {
|
|
165859
|
-
const beside = planCollapsedInsertBesideContainer(paragraphBytes, xml, model.pieces, startOffset, newText);
|
|
165870
|
+
const beside = planCollapsedInsertBesideContainer(paragraphBytes, xml, model.pieces, startOffset, newText, collapsedInlineAffinity);
|
|
165860
165871
|
if (beside)
|
|
165861
165872
|
return beside;
|
|
165862
165873
|
}
|
|
@@ -166330,19 +166341,22 @@ function planCollapsedInsert(paragraphBytes, xml, pieces, leaves, at, newText, t
|
|
|
166330
166341
|
runPropertiesXml: carrier?.runProperties ?? paragraphMarkRPr
|
|
166331
166342
|
};
|
|
166332
166343
|
}
|
|
166333
|
-
function planCollapsedInsertBesideContainer(paragraphBytes, xml, pieces, at, newText) {
|
|
166344
|
+
function planCollapsedInsertBesideContainer(paragraphBytes, xml, pieces, at, newText, collapsedInlineAffinity) {
|
|
166334
166345
|
if (newText.length === 0)
|
|
166335
166346
|
return null;
|
|
166336
166347
|
for (const piece of pieces) {
|
|
166337
166348
|
if (piece.kind !== "container")
|
|
166338
166349
|
continue;
|
|
166339
|
-
if (piece.containerKind !== "hyperlink" && piece.containerKind !== "fldSimple")
|
|
166350
|
+
if (piece.containerKind !== "hyperlink" && piece.containerKind !== "fldSimple" && piece.containerKind !== "sdt")
|
|
166340
166351
|
continue;
|
|
166341
166352
|
if (piece.visibleEnd <= piece.visibleStart)
|
|
166342
166353
|
continue;
|
|
166343
166354
|
const atLeading = piece.visibleStart === at && !hasVisibleSiblingEndingAt(pieces, at);
|
|
166344
166355
|
const atTrailing = piece.visibleEnd === at && !hasVisibleSiblingStartingAt(pieces, at);
|
|
166345
|
-
|
|
166356
|
+
const isSdt = piece.containerKind === "sdt";
|
|
166357
|
+
const leading = isSdt ? piece.visibleStart === at && collapsedInlineAffinity === "upstream" : atLeading;
|
|
166358
|
+
const trailing = isSdt ? piece.visibleEnd === at && collapsedInlineAffinity === "downstream" : atTrailing;
|
|
166359
|
+
if (!leading && !trailing)
|
|
166346
166360
|
continue;
|
|
166347
166361
|
const blocked = findBlockingPiece(pieces, at, at);
|
|
166348
166362
|
if (blocked)
|
|
@@ -166354,7 +166368,7 @@ function planCollapsedInsertBesideContainer(paragraphBytes, xml, pieces, at, new
|
|
|
166354
166368
|
const freshRunQnames = paragraphRunQnames(xml);
|
|
166355
166369
|
if (!freshRunQnames)
|
|
166356
166370
|
return { ok: false, reason: "invalid-range" };
|
|
166357
|
-
const insertByte =
|
|
166371
|
+
const insertByte = leading ? Math.min(piece.byteStart, ...leadingRangeStarts.map((marker) => marker.runByteStart ?? marker.byteStart)) : Math.max(piece.byteEnd, ...trailingRangeEnds.map((marker) => marker.runByteEnd ?? marker.byteEnd));
|
|
166358
166372
|
const op = {
|
|
166359
166373
|
start: insertByte,
|
|
166360
166374
|
end: insertByte,
|
|
@@ -166363,7 +166377,8 @@ function planCollapsedInsertBesideContainer(paragraphBytes, xml, pieces, at, new
|
|
|
166363
166377
|
return {
|
|
166364
166378
|
ok: true,
|
|
166365
166379
|
bytes: spliceBytes(paragraphBytes, [op]),
|
|
166366
|
-
runPropertiesXml: paragraphMarkRPr
|
|
166380
|
+
runPropertiesXml: paragraphMarkRPr,
|
|
166381
|
+
...isSdt ? { requiresCollaborationSessionSync: true } : {}
|
|
166367
166382
|
};
|
|
166368
166383
|
}
|
|
166369
166384
|
return null;
|
|
@@ -171992,6 +172007,7 @@ function isTerminalDeletionOfPendingFullParagraphInsertion(fragment3, entries) {
|
|
|
171992
172007
|
}
|
|
171993
172008
|
function collectTextCandidates(lookupContext, partXml, entries, storyId) {
|
|
171994
172009
|
const out = [];
|
|
172010
|
+
const bookmarkGroups = collectBookmarkRevisionGroups(entries.filter((entry) => entry.type === "insertion").flatMap((entry) => entry.fragments), partXml);
|
|
171995
172011
|
for (const entry of entries) {
|
|
171996
172012
|
if (entry.type !== "insertion" || entry.subtype !== "text-insertion")
|
|
171997
172013
|
continue;
|
|
@@ -172003,6 +172019,8 @@ function collectTextCandidates(lookupContext, partXml, entries, storyId) {
|
|
|
172003
172019
|
continue;
|
|
172004
172020
|
if (entry.fragments.length === 0)
|
|
172005
172021
|
continue;
|
|
172022
|
+
if (entry.fragments.every((fragment3) => bookmarkGroups.has(fragment3)))
|
|
172023
|
+
continue;
|
|
172006
172024
|
if (!entry.fragments.every((fragment3) => fragment3.kind === "ins"))
|
|
172007
172025
|
continue;
|
|
172008
172026
|
let paragraphStart = null;
|
|
@@ -173852,6 +173870,7 @@ var init_review_groups = __esm(() => {
|
|
|
173852
173870
|
init_structural_groups();
|
|
173853
173871
|
init_numbering_catalog();
|
|
173854
173872
|
init_field_paragraph_deletion_groups();
|
|
173873
|
+
init_bookmark_revision_groups();
|
|
173855
173874
|
init_field_paragraph_range_deletion_groups();
|
|
173856
173875
|
init_image_paragraph_deletion_groups();
|
|
173857
173876
|
});
|
|
@@ -194696,7 +194715,7 @@ var init_created_text_span_proof = __esm(() => {
|
|
|
194696
194715
|
});
|
|
194697
194716
|
|
|
194698
194717
|
// ../../../v2/editor-core/dist/document/transactions/content-locked-block-sdt.js
|
|
194699
|
-
function
|
|
194718
|
+
function isParagraphInsideNonEditableBlockSdt(state, address2) {
|
|
194700
194719
|
const index = address2.storyId === state.mainStoryId ? getMainParagraphIndexFromState(state) : getStoryParagraphIndexFromState(state, address2.storyId);
|
|
194701
194720
|
const entry = index?.byParaId(address2.blockId);
|
|
194702
194721
|
if (!entry || entry.directBodyChildOrdinal != null || entry.containingBodyChildOrdinal == null) {
|
|
@@ -194711,7 +194730,7 @@ function isParagraphInsideContentLockedBlockSdt(state, address2) {
|
|
|
194711
194730
|
return false;
|
|
194712
194731
|
const map3 = buildStructuralBoundaryMap(scanBytes);
|
|
194713
194732
|
const context = map3.byBlockId(entry.blockId) ?? map3.contexts[entry.ordinal - (chunk?.scanParagraphStartOrdinal ?? 0)] ?? null;
|
|
194714
|
-
return context?.hasContentLockedBlockSdt === true;
|
|
194733
|
+
return context?.hasContentLockedBlockSdt === true || context?.hasTextAtomicBlockSdt === true;
|
|
194715
194734
|
}
|
|
194716
194735
|
function provesNoSdtCarrier(bytes) {
|
|
194717
194736
|
if (bytes.length === 0 || bytes.includes(0))
|
|
@@ -198895,7 +198914,7 @@ function runEditTextCommit(input) {
|
|
|
198895
198914
|
return rejected2(txId, "unsupported-context");
|
|
198896
198915
|
return rejected2(txId, classifyCrossBlockEditText(bytes, op));
|
|
198897
198916
|
}
|
|
198898
|
-
if (
|
|
198917
|
+
if (isParagraphInsideNonEditableBlockSdt(state, {
|
|
198899
198918
|
storyId: op.on.storyId,
|
|
198900
198919
|
partUri: op.on.partUri,
|
|
198901
198920
|
blockId: op.on.startBlockId
|
|
@@ -198959,7 +198978,10 @@ function runDirectEditTextBatchCommit(input, edits) {
|
|
|
198959
198978
|
for (const [blockId, blockEdits] of byBlock) {
|
|
198960
198979
|
let blockUsedOverlapCompiler = false;
|
|
198961
198980
|
const paragraph = index.byParaId(blockId);
|
|
198962
|
-
if (
|
|
198981
|
+
if (isParagraphInsideNonEditableBlockSdt(state, { storyId, partUri, blockId })) {
|
|
198982
|
+
return rejected2(txId, "text-range-in-sdt");
|
|
198983
|
+
}
|
|
198984
|
+
if (!paragraph || index.duplicateParaIds.has(blockId) || paragraph.partUri !== partUri || paragraph.partRevision !== first.on.partRevision || paragraph.storyRevision !== first.on.storyRevision) {
|
|
198963
198985
|
return rejected2(txId, "patch-precondition-failed");
|
|
198964
198986
|
}
|
|
198965
198987
|
for (const edit of blockEdits) {
|
|
@@ -199378,7 +199400,10 @@ function runTrackedEditTextBatchCommit(input, edits) {
|
|
|
199378
199400
|
let requiresCollaborationSessionSync = false;
|
|
199379
199401
|
for (const [blockId, blockEdits] of byBlock) {
|
|
199380
199402
|
const paragraph = index.byParaId(blockId);
|
|
199381
|
-
if (
|
|
199403
|
+
if (isParagraphInsideNonEditableBlockSdt(state, { storyId, partUri, blockId })) {
|
|
199404
|
+
return rejected2(txId, "text-range-in-sdt");
|
|
199405
|
+
}
|
|
199406
|
+
if (!paragraph || index.duplicateParaIds.has(blockId) || paragraph.partUri !== partUri || paragraph.partRevision !== first.on.partRevision || paragraph.storyRevision !== first.on.storyRevision) {
|
|
199382
199407
|
return rejected2(txId, "patch-precondition-failed");
|
|
199383
199408
|
}
|
|
199384
199409
|
for (const edit of blockEdits) {
|
|
@@ -199774,7 +199799,7 @@ function runInsertInlineControlCommit(input) {
|
|
|
199774
199799
|
if (op.on.startByte < 0 || op.on.endByte > bytes.length || op.on.startByte > op.on.endByte) {
|
|
199775
199800
|
return rejected2(txId, "invalid-range");
|
|
199776
199801
|
}
|
|
199777
|
-
if (
|
|
199802
|
+
if (isParagraphInsideNonEditableBlockSdt(state, {
|
|
199778
199803
|
storyId: op.on.storyId,
|
|
199779
199804
|
partUri: op.on.partUri,
|
|
199780
199805
|
blockId: op.on.startBlockId
|
|
@@ -217912,6 +217937,45 @@ function collectFieldChar(fieldChars, { tag, start, end }) {
|
|
|
217912
217937
|
locked: lock === "true" || lock === "1" || lock === "on"
|
|
217913
217938
|
});
|
|
217914
217939
|
}
|
|
217940
|
+
function createFieldTokenCollector(fieldChars, instructionTokens) {
|
|
217941
|
+
const instructionContexts = [];
|
|
217942
|
+
return {
|
|
217943
|
+
onOpenTag({ tag, start, end, namespaceBindings }) {
|
|
217944
|
+
const parent = instructionContexts.at(-1);
|
|
217945
|
+
const inWordRun = parent?.inWordRun ?? false;
|
|
217946
|
+
const isWord = tag.namespaceUri === NS_W || tag.namespaceUri === NS_WSTRICT;
|
|
217947
|
+
const isMce = tag.namespaceUri === NS_MC;
|
|
217948
|
+
const isRunProxy = isMce && (tag.localName === "AlternateContent" || tag.localName === "Choice" || tag.localName === "Fallback");
|
|
217949
|
+
const context = {
|
|
217950
|
+
inWordRun: isWord && tag.localName === "r" || isRunProxy && inWordRun,
|
|
217951
|
+
deleted: (parent?.deleted ?? false) || isWord && (tag.localName === "del" || tag.localName === "moveFrom"),
|
|
217952
|
+
effective: parent?.effective ?? true,
|
|
217953
|
+
choiceSelected: isMce && tag.localName === "AlternateContent" ? false : undefined
|
|
217954
|
+
};
|
|
217955
|
+
if (isMce && parent?.choiceSelected != null) {
|
|
217956
|
+
if (tag.localName === "Choice") {
|
|
217957
|
+
const requires = readXmlAttribute(tag, "", "Requires")?.value.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
217958
|
+
const selected = !parent.choiceSelected && requires.length > 0 && requires.every((prefix) => UNDERSTOOD_FIELD_INSTRUCTION_NAMESPACES.has(namespaceBindings[prefix] ?? ""));
|
|
217959
|
+
context.effective && (context.effective = selected);
|
|
217960
|
+
if (selected)
|
|
217961
|
+
parent.choiceSelected = true;
|
|
217962
|
+
} else if (tag.localName === "Fallback") {
|
|
217963
|
+
context.effective && (context.effective = !parent.choiceSelected);
|
|
217964
|
+
}
|
|
217965
|
+
}
|
|
217966
|
+
instructionContexts.push(context);
|
|
217967
|
+
if (!isWord)
|
|
217968
|
+
return;
|
|
217969
|
+
if (tag.localName === "tab" && inWordRun && !context.deleted && context.effective) {
|
|
217970
|
+
instructionTokens.push({ start, text: "\t", inlineTab: true });
|
|
217971
|
+
}
|
|
217972
|
+
collectFieldChar(fieldChars, { tag, start, end, namespaceBindings });
|
|
217973
|
+
},
|
|
217974
|
+
onCloseTag() {
|
|
217975
|
+
instructionContexts.pop();
|
|
217976
|
+
}
|
|
217977
|
+
};
|
|
217978
|
+
}
|
|
217915
217979
|
function buildFieldCatalogFromXml(input, xml, utf8Offsets) {
|
|
217916
217980
|
let paragraphScan = input.sharedParagraphScan ?? null;
|
|
217917
217981
|
const ownerResolution = {
|
|
@@ -217976,12 +218040,29 @@ function buildFieldCatalogFromXml(input, xml, utf8Offsets) {
|
|
|
217976
218040
|
}
|
|
217977
218041
|
const discovered = [];
|
|
217978
218042
|
const fieldChars = input.preparedFieldChars ?? discovered;
|
|
218043
|
+
const instructionTokens = [...input.preparedInstructionTokens ?? []];
|
|
217979
218044
|
if (input.preparedFieldChars === undefined && /<(?:[\w.-]+:)?fldChar\b/.test(xml)) {
|
|
217980
|
-
walkXmlElements(xml,
|
|
218045
|
+
walkXmlElements(xml, createFieldTokenCollector(discovered, instructionTokens));
|
|
218046
|
+
}
|
|
218047
|
+
if (fieldChars.length > 0) {
|
|
218048
|
+
const instrTextRe = /<[\w.-]+:instrText\b[^>]*>([\s\S]*?)<\/[\w.-]+:instrText>/g;
|
|
218049
|
+
for (let match = instrTextRe.exec(xml);match; match = instrTextRe.exec(xml)) {
|
|
218050
|
+
instructionTokens.push({ start: match.index, text: decodeXmlText(match[1]) });
|
|
218051
|
+
}
|
|
218052
|
+
instructionTokens.sort((left, right) => left.start - right.start);
|
|
217981
218053
|
}
|
|
217982
|
-
|
|
218054
|
+
let instructionIndex = 0;
|
|
217983
218055
|
const stack = [];
|
|
217984
218056
|
for (const marker of fieldChars) {
|
|
218057
|
+
while (instructionIndex < instructionTokens.length && instructionTokens[instructionIndex].start < marker.start) {
|
|
218058
|
+
const token = instructionTokens[instructionIndex++];
|
|
218059
|
+
if (token.inlineTab && stack.at(-1)?.separateAt != null)
|
|
218060
|
+
continue;
|
|
218061
|
+
for (const frame of stack) {
|
|
218062
|
+
if (frame.separateAt == null)
|
|
218063
|
+
frame.instructionFragments.push(token.text);
|
|
218064
|
+
}
|
|
218065
|
+
}
|
|
217985
218066
|
const charType = marker.type;
|
|
217986
218067
|
const matchStart = marker.start;
|
|
217987
218068
|
const matchEnd = marker.end;
|
|
@@ -218016,16 +218097,7 @@ function buildFieldCatalogFromXml(input, xml, utf8Offsets) {
|
|
|
218016
218097
|
const fieldEnd = endEnclosingRunEnd;
|
|
218017
218098
|
const resultStart = frame.resultStartOffset ?? fieldEnd;
|
|
218018
218099
|
const resultEnd = Math.max(resultStart, enclosingRunStart(xml, matchStart));
|
|
218019
|
-
const
|
|
218020
|
-
const instrSpanEnd = frame.separateAt ?? matchStart;
|
|
218021
|
-
const instrSlice = xml.slice(instrSpanStart, instrSpanEnd);
|
|
218022
|
-
const instrTextParts = [];
|
|
218023
|
-
let instrM;
|
|
218024
|
-
const instrLocal = new RegExp(instrTextRe.source, "g");
|
|
218025
|
-
while ((instrM = instrLocal.exec(instrSlice)) != null) {
|
|
218026
|
-
instrTextParts.push(decodeXmlText(instrM[2] ?? ""));
|
|
218027
|
-
}
|
|
218028
|
-
const instructionText = instrTextParts.join("").trim();
|
|
218100
|
+
const instructionText = frame.instructionFragments.join("").trim();
|
|
218029
218101
|
const resultText = frame.separateAt != null ? extractText(xml.slice(resultStart, resultEnd)) : "";
|
|
218030
218102
|
const paraId = enclosingParaId(frame.beginOffset);
|
|
218031
218103
|
const byteStart = byteOffsetAt3(utf8Offsets, fieldStart);
|
|
@@ -218539,12 +218611,13 @@ async function buildFieldCatalogForStoryCooperatively(input) {
|
|
|
218539
218611
|
}
|
|
218540
218612
|
}
|
|
218541
218613
|
const preparedFieldChars = [];
|
|
218614
|
+
const preparedInstructionTokens = [];
|
|
218542
218615
|
if (/<(?:[\w.-]+:)?fldChar\b/.test(decoded.xml)) {
|
|
218543
218616
|
let aborted2 = false;
|
|
218544
218617
|
let yieldFailed = false;
|
|
218545
218618
|
let yieldError;
|
|
218546
218619
|
await walkXmlElementsCooperatively(decoded.xml, {
|
|
218547
|
-
|
|
218620
|
+
...createFieldTokenCollector(preparedFieldChars, preparedInstructionTokens),
|
|
218548
218621
|
yieldPoint: async () => {
|
|
218549
218622
|
let current;
|
|
218550
218623
|
try {
|
|
@@ -218576,6 +218649,7 @@ async function buildFieldCatalogForStoryCooperatively(input) {
|
|
|
218576
218649
|
storyId: input.storyId,
|
|
218577
218650
|
partUri: input.partUri,
|
|
218578
218651
|
preparedFieldChars,
|
|
218652
|
+
preparedInstructionTokens,
|
|
218579
218653
|
...paragraphOwnerResolver ? { paragraphOwnerResolver } : { sharedParagraphScan }
|
|
218580
218654
|
}, decoded.xml, utf8Offsets);
|
|
218581
218655
|
catalog.ownerResolution.packedRejectionReason = ownerDiagnostics.rejectionReason;
|
|
@@ -218606,7 +218680,7 @@ function listFieldCatalogsForState(state) {
|
|
|
218606
218680
|
}
|
|
218607
218681
|
return out;
|
|
218608
218682
|
}
|
|
218609
|
-
var TD53, UTF8_OFFSET_CHECKPOINT_STRIDE = 256, FIELD_CANDIDATE_BYTES, FIELD_CANDIDATE_SEARCHES, STATE_CACHE2, STATE_IN_FLIGHT, DECODED_PART_IN_FLIGHT;
|
|
218683
|
+
var TD53, UTF8_OFFSET_CHECKPOINT_STRIDE = 256, UNDERSTOOD_FIELD_INSTRUCTION_NAMESPACES, FIELD_CANDIDATE_BYTES, FIELD_CANDIDATE_SEARCHES, STATE_CACHE2, STATE_IN_FLIGHT, DECODED_PART_IN_FLIGHT;
|
|
218610
218684
|
var init_field_catalog = __esm(() => {
|
|
218611
218685
|
init_sd_document_state();
|
|
218612
218686
|
init_xml_text();
|
|
@@ -218615,6 +218689,7 @@ var init_field_catalog = __esm(() => {
|
|
|
218615
218689
|
init_part_wml_scan_cache();
|
|
218616
218690
|
init_field_paragraph_owner();
|
|
218617
218691
|
TD53 = new TextDecoder;
|
|
218692
|
+
UNDERSTOOD_FIELD_INSTRUCTION_NAMESPACES = new Set([NS_W, NS_WSTRICT, NS_W14]);
|
|
218618
218693
|
FIELD_CANDIDATE_BYTES = [["fldSimple", 3], ["fldChar", 3], ["instrText", 7]];
|
|
218619
218694
|
FIELD_CANDIDATE_SEARCHES = FIELD_CANDIDATE_BYTES.map(([token, anchorOffset]) => ({
|
|
218620
218695
|
token: new TextEncoder().encode(token),
|
|
@@ -224191,11 +224266,11 @@ function runTrackedTextMoveCommit(input) {
|
|
|
224191
224266
|
if (source.value.entry.storyId !== input.state.mainStoryId) {
|
|
224192
224267
|
return rejected10(input.txId, "tracked-text-move-cross-story");
|
|
224193
224268
|
}
|
|
224194
|
-
if (
|
|
224269
|
+
if (isParagraphInsideNonEditableBlockSdt(input.state, {
|
|
224195
224270
|
storyId: source.value.entry.storyId,
|
|
224196
224271
|
partUri: source.value.entry.partUri,
|
|
224197
224272
|
blockId: source.value.entry.blockId
|
|
224198
|
-
}) ||
|
|
224273
|
+
}) || isParagraphInsideNonEditableBlockSdt(input.state, {
|
|
224199
224274
|
storyId: destination.entry.storyId,
|
|
224200
224275
|
partUri: destination.entry.partUri,
|
|
224201
224276
|
blockId: destination.entry.blockId
|
|
@@ -281202,7 +281277,7 @@ var init_word_bibliography = __esm(() => {
|
|
|
281202
281277
|
];
|
|
281203
281278
|
});
|
|
281204
281279
|
|
|
281205
|
-
//
|
|
281280
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/cascade.ts
|
|
281206
281281
|
function combineProperties(propertiesArray, options = {}) {
|
|
281207
281282
|
const { fullOverrideProps = [], specialHandling = {} } = options;
|
|
281208
281283
|
if (!propertiesArray || propertiesArray.length === 0) {
|
|
@@ -281302,14 +281377,14 @@ var init_cascade = __esm(() => {
|
|
|
281302
281377
|
];
|
|
281303
281378
|
});
|
|
281304
281379
|
|
|
281305
|
-
//
|
|
281380
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/index.ts
|
|
281306
281381
|
var sdtMetadataCache;
|
|
281307
281382
|
var init_src4 = __esm(() => {
|
|
281308
281383
|
init_cascade();
|
|
281309
281384
|
sdtMetadataCache = new Map;
|
|
281310
281385
|
});
|
|
281311
281386
|
|
|
281312
|
-
//
|
|
281387
|
+
// ../../../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
|
|
281313
281388
|
function isKnownTableStyleId(styleId, translatedLinkedStyles) {
|
|
281314
281389
|
if (!styleId || !translatedLinkedStyles?.styles)
|
|
281315
281390
|
return false;
|
|
@@ -281364,7 +281439,7 @@ var init_table_style_selection = __esm(() => {
|
|
|
281364
281439
|
};
|
|
281365
281440
|
});
|
|
281366
281441
|
|
|
281367
|
-
//
|
|
281442
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/ooxml/index.ts
|
|
281368
281443
|
function resolveRunProperties(params, inlineRpr, resolvedPpr, tableInfo = null, isListNumber = false, numberingDefinedInline = false) {
|
|
281369
281444
|
if (!params.translatedLinkedStyles?.styles) {
|
|
281370
281445
|
return inlineRpr ?? {};
|
|
@@ -281947,7 +282022,7 @@ var init_default_floors = __esm(() => {
|
|
|
281947
282022
|
};
|
|
281948
282023
|
});
|
|
281949
282024
|
|
|
281950
|
-
//
|
|
282025
|
+
// ../../../v2/node_modules/.pnpm/sax@1.6.0/node_modules/sax/lib/sax.js
|
|
281951
282026
|
var require_sax = __commonJS((exports) => {
|
|
281952
282027
|
(function(sax) {
|
|
281953
282028
|
sax.parser = function(strict, opt) {
|
|
@@ -283481,7 +283556,7 @@ Char: ` + parser.c;
|
|
|
283481
283556
|
})(typeof exports === "undefined" ? exports.sax = {} : exports);
|
|
283482
283557
|
});
|
|
283483
283558
|
|
|
283484
|
-
//
|
|
283559
|
+
// ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/array-helper.js
|
|
283485
283560
|
var require_array_helper = __commonJS((exports, module) => {
|
|
283486
283561
|
module.exports = {
|
|
283487
283562
|
isArray: function(value) {
|
|
@@ -283493,7 +283568,7 @@ var require_array_helper = __commonJS((exports, module) => {
|
|
|
283493
283568
|
};
|
|
283494
283569
|
});
|
|
283495
283570
|
|
|
283496
|
-
//
|
|
283571
|
+
// ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/options-helper.js
|
|
283497
283572
|
var require_options_helper = __commonJS((exports, module) => {
|
|
283498
283573
|
var isArray = require_array_helper().isArray;
|
|
283499
283574
|
module.exports = {
|
|
@@ -283532,7 +283607,7 @@ var require_options_helper = __commonJS((exports, module) => {
|
|
|
283532
283607
|
};
|
|
283533
283608
|
});
|
|
283534
283609
|
|
|
283535
|
-
//
|
|
283610
|
+
// ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/xml2js.js
|
|
283536
283611
|
var require_xml2js = __commonJS((exports, module) => {
|
|
283537
283612
|
var sax = require_sax();
|
|
283538
283613
|
var expat = { on: function() {}, parse: function() {} };
|
|
@@ -283870,7 +283945,7 @@ var require_xml2js = __commonJS((exports, module) => {
|
|
|
283870
283945
|
};
|
|
283871
283946
|
});
|
|
283872
283947
|
|
|
283873
|
-
//
|
|
283948
|
+
// ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/xml2json.js
|
|
283874
283949
|
var require_xml2json = __commonJS((exports, module) => {
|
|
283875
283950
|
var helper = require_options_helper();
|
|
283876
283951
|
var xml2js = require_xml2js();
|
|
@@ -283895,7 +283970,7 @@ var require_xml2json = __commonJS((exports, module) => {
|
|
|
283895
283970
|
};
|
|
283896
283971
|
});
|
|
283897
283972
|
|
|
283898
|
-
//
|
|
283973
|
+
// ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/js2xml.js
|
|
283899
283974
|
var require_js2xml = __commonJS((exports, module) => {
|
|
283900
283975
|
var helper = require_options_helper();
|
|
283901
283976
|
var isArray = require_array_helper().isArray;
|
|
@@ -284227,7 +284302,7 @@ var require_js2xml = __commonJS((exports, module) => {
|
|
|
284227
284302
|
};
|
|
284228
284303
|
});
|
|
284229
284304
|
|
|
284230
|
-
//
|
|
284305
|
+
// ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/json2xml.js
|
|
284231
284306
|
var require_json2xml = __commonJS((exports, module) => {
|
|
284232
284307
|
var js2xml = require_js2xml();
|
|
284233
284308
|
module.exports = function(json2, options) {
|
|
@@ -284248,7 +284323,7 @@ var require_json2xml = __commonJS((exports, module) => {
|
|
|
284248
284323
|
};
|
|
284249
284324
|
});
|
|
284250
284325
|
|
|
284251
|
-
//
|
|
284326
|
+
// ../../../v2/node_modules/.pnpm/xml-js@1.6.11/node_modules/xml-js/lib/index.js
|
|
284252
284327
|
var require_lib = __commonJS((exports, module) => {
|
|
284253
284328
|
var xml2js = require_xml2js();
|
|
284254
284329
|
var xml2json = require_xml2json();
|
|
@@ -284262,7 +284337,7 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
284262
284337
|
};
|
|
284263
284338
|
});
|
|
284264
284339
|
|
|
284265
|
-
//
|
|
284340
|
+
// ../../../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
|
|
284266
284341
|
function bytesToString(input) {
|
|
284267
284342
|
if (typeof input === "string")
|
|
284268
284343
|
return input;
|
|
@@ -284329,7 +284404,7 @@ var init_parse_xml = __esm(() => {
|
|
|
284329
284404
|
ST_OFF = new Set(["0", "false", "off"]);
|
|
284330
284405
|
});
|
|
284331
284406
|
|
|
284332
|
-
//
|
|
284407
|
+
// ../../../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
|
|
284333
284408
|
function parseColorPalette(theme) {
|
|
284334
284409
|
if (!theme)
|
|
284335
284410
|
return;
|
|
@@ -286922,7 +286997,7 @@ var init_word_style_model = __esm(() => {
|
|
|
286922
286997
|
init_project_style_catalogue();
|
|
286923
286998
|
});
|
|
286924
286999
|
|
|
286925
|
-
//
|
|
287000
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/units.ts
|
|
286926
287001
|
function twipsToPx(value) {
|
|
286927
287002
|
return value * PX_PER_TWIP;
|
|
286928
287003
|
}
|
|
@@ -286936,7 +287011,7 @@ var init_units = __esm(() => {
|
|
|
286936
287011
|
PX_PER_EIGHTH_POINT = PX_PER_POINT / 8;
|
|
286937
287012
|
});
|
|
286938
287013
|
|
|
286939
|
-
//
|
|
287014
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/colors.ts
|
|
286940
287015
|
function normalizeHexColor(value) {
|
|
286941
287016
|
if (value == null)
|
|
286942
287017
|
return;
|
|
@@ -287013,12 +287088,12 @@ var init_colors = __esm(() => {
|
|
|
287013
287088
|
};
|
|
287014
287089
|
});
|
|
287015
287090
|
|
|
287016
|
-
//
|
|
287091
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/paragraph-attrs.ts
|
|
287017
287092
|
var init_paragraph_attrs = __esm(() => {
|
|
287018
287093
|
init_units();
|
|
287019
287094
|
init_colors();
|
|
287020
287095
|
});
|
|
287021
|
-
//
|
|
287096
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/header-footer-resolution.ts
|
|
287022
287097
|
function createResolutionCache() {
|
|
287023
287098
|
const createVariantCache = () => ({ values: new Map, sectionIndices: [] });
|
|
287024
287099
|
const createKindCache = () => ({
|
|
@@ -287196,12 +287271,12 @@ var HEADER_FOOTER_VARIANTS3;
|
|
|
287196
287271
|
var init_header_footer_resolution = __esm(() => {
|
|
287197
287272
|
HEADER_FOOTER_VARIANTS3 = ["default", "first", "even", "odd"];
|
|
287198
287273
|
});
|
|
287199
|
-
//
|
|
287274
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/justify-utils.ts
|
|
287200
287275
|
var SPACE_CHARS;
|
|
287201
287276
|
var init_justify_utils = __esm(() => {
|
|
287202
287277
|
SPACE_CHARS = new Set([" ", " "]);
|
|
287203
287278
|
});
|
|
287204
|
-
//
|
|
287279
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/vertical-text.ts
|
|
287205
287280
|
function normalizeBaselineShift(baselineShift) {
|
|
287206
287281
|
if (!Number.isFinite(baselineShift)) {
|
|
287207
287282
|
return;
|
|
@@ -287210,14 +287285,14 @@ function normalizeBaselineShift(baselineShift) {
|
|
|
287210
287285
|
return Math.abs(normalizedShift) <= BASELINE_SHIFT_EPSILON ? undefined : normalizedShift;
|
|
287211
287286
|
}
|
|
287212
287287
|
var BASELINE_SHIFT_EPSILON = 0.000001;
|
|
287213
|
-
//
|
|
287288
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/pm-range.ts
|
|
287214
287289
|
var init_pm_range = () => {};
|
|
287215
|
-
//
|
|
287290
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/graphic-placement.ts
|
|
287216
287291
|
var init_graphic_placement = () => {};
|
|
287217
|
-
//
|
|
287292
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/author-colors.ts
|
|
287218
287293
|
var init_author_colors = () => {};
|
|
287219
287294
|
|
|
287220
|
-
//
|
|
287295
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/semantic-colors.ts
|
|
287221
287296
|
var TRACKED_CHANGE_CONFIGURABLE_SEMANTIC_COLOR_KEYS, CONFIGURABLE_SEMANTIC_COLOR_KEY_SET, TRACKED_CHANGE_AFFECTED_RANGE_KEYS;
|
|
287222
287297
|
var init_semantic_colors = __esm(() => {
|
|
287223
287298
|
init_author_colors();
|
|
@@ -287243,20 +287318,20 @@ var init_semantic_colors = __esm(() => {
|
|
|
287243
287318
|
]);
|
|
287244
287319
|
});
|
|
287245
287320
|
|
|
287246
|
-
//
|
|
287321
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/sdt-container.ts
|
|
287247
287322
|
var idlessSdtContainerKeys;
|
|
287248
287323
|
var init_sdt_container = __esm(() => {
|
|
287249
287324
|
idlessSdtContainerKeys = new WeakMap;
|
|
287250
287325
|
});
|
|
287251
|
-
//
|
|
287326
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/page-number-formatting.ts
|
|
287252
287327
|
var init_page_number_formatting = () => {};
|
|
287253
287328
|
|
|
287254
|
-
//
|
|
287329
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/page-ref-anchor.ts
|
|
287255
287330
|
var init_page_ref_anchor = __esm(() => {
|
|
287256
287331
|
init_pm_range();
|
|
287257
287332
|
});
|
|
287258
287333
|
|
|
287259
|
-
//
|
|
287334
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/drawing-taxonomy.ts
|
|
287260
287335
|
var DRAWING_DIAGNOSTIC_CODES, DRAWING_DIAGNOSTIC_CODE_ALIASES, DRAWING_SUPPORT_TAXONOMY, DRAWING_FAMILIES;
|
|
287261
287336
|
var init_drawing_taxonomy = __esm(() => {
|
|
287262
287337
|
DRAWING_DIAGNOSTIC_CODES = {
|
|
@@ -287485,7 +287560,7 @@ var init_drawing_taxonomy = __esm(() => {
|
|
|
287485
287560
|
};
|
|
287486
287561
|
DRAWING_FAMILIES = Object.keys(DRAWING_SUPPORT_TAXONOMY);
|
|
287487
287562
|
});
|
|
287488
|
-
//
|
|
287563
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/incremental-dependency.ts
|
|
287489
287564
|
var PAGE_CHECKPOINT_DEPENDENCY_CLASSES, INCREMENTAL_DEPENDENCY_CERTIFICATE_CLASSES, DRAWING_KINDS, CERTIFICATE_CLASSES;
|
|
287490
287565
|
var init_incremental_dependency = __esm(() => {
|
|
287491
287566
|
PAGE_CHECKPOINT_DEPENDENCY_CLASSES = Object.freeze([
|
|
@@ -287515,10 +287590,10 @@ var init_incremental_dependency = __esm(() => {
|
|
|
287515
287590
|
DRAWING_KINDS = new Set(["image", "vectorShape", "textboxShape", "shapeGroup", "chart"]);
|
|
287516
287591
|
CERTIFICATE_CLASSES = new Set(INCREMENTAL_DEPENDENCY_CERTIFICATE_CLASSES);
|
|
287517
287592
|
});
|
|
287518
|
-
//
|
|
287593
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/engines/index.ts
|
|
287519
287594
|
var init_engines = () => {};
|
|
287520
287595
|
|
|
287521
|
-
//
|
|
287596
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+contracts@file+..+public+packages+layout-engine+contracts/node_modules/@superdoc/contracts/src/index.ts
|
|
287522
287597
|
var SHAPE_TEXT_BASELINE_WARP_PRESETS, SHAPE_TEXT_SINGLE_BAND_ENVELOPE_WARP_PRESETS;
|
|
287523
287598
|
var init_src5 = __esm(() => {
|
|
287524
287599
|
init_header_footer_resolution();
|
|
@@ -287541,7 +287616,7 @@ var init_src5 = __esm(() => {
|
|
|
287541
287616
|
SHAPE_TEXT_SINGLE_BAND_ENVELOPE_WARP_PRESETS = new Set(["textButton"]);
|
|
287542
287617
|
});
|
|
287543
287618
|
|
|
287544
|
-
//
|
|
287619
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+font-utils@file+..+public+shared+font-utils/node_modules/@superdoc/font-utils/index.js
|
|
287545
287620
|
function mapWordFamilyFallback(wordFamily) {
|
|
287546
287621
|
if (!wordFamily)
|
|
287547
287622
|
return DEFAULT_GENERIC_FALLBACK;
|
|
@@ -287690,7 +287765,7 @@ var init_font_utils = __esm(() => {
|
|
|
287690
287765
|
]);
|
|
287691
287766
|
});
|
|
287692
287767
|
|
|
287693
|
-
//
|
|
287768
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/run-attrs.ts
|
|
287694
287769
|
function normalizeRunAttrsFromOoxml(props, context = {}) {
|
|
287695
287770
|
const out = {};
|
|
287696
287771
|
if (!props)
|
|
@@ -287959,7 +288034,7 @@ var init_run_attrs = __esm(() => {
|
|
|
287959
288034
|
};
|
|
287960
288035
|
});
|
|
287961
288036
|
|
|
287962
|
-
//
|
|
288037
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+style-engine@file+..+public+packages+layout-engine+style-engine/node_modules/@superdoc/style-engine/src/normalize/index.ts
|
|
287963
288038
|
var init_normalize = __esm(() => {
|
|
287964
288039
|
init_paragraph_attrs();
|
|
287965
288040
|
init_run_attrs();
|
|
@@ -290292,6 +290367,107 @@ var init_section_xml = __esm(() => {
|
|
|
290292
290367
|
SECTPR_CHILD_RANK = new Map(SECTPR_CHILD_ORDER.map((name, index) => [name, index]));
|
|
290293
290368
|
});
|
|
290294
290369
|
|
|
290370
|
+
// ../../../v2/document-api-v2-adapter/dist/formatting/paragraph-property-order.js
|
|
290371
|
+
function setParagraphPropertyChild(children2, localName2, xml) {
|
|
290372
|
+
const parsed = parseSingleElement(xml);
|
|
290373
|
+
const existingIndex = children2.findIndex((child) => child.localName === localName2);
|
|
290374
|
+
if (existingIndex >= 0) {
|
|
290375
|
+
const next = [...children2];
|
|
290376
|
+
next[existingIndex] = parsed;
|
|
290377
|
+
return next;
|
|
290378
|
+
}
|
|
290379
|
+
const targetRank = PARAGRAPH_PROPERTY_CHILD_RANK.get(localName2);
|
|
290380
|
+
if (targetRank == null)
|
|
290381
|
+
throw new Error(`Unknown paragraph property child: ${localName2}`);
|
|
290382
|
+
let insertionIndex = 0;
|
|
290383
|
+
for (const [index, child] of children2.entries()) {
|
|
290384
|
+
const childRank = paragraphPropertyRankRange(child);
|
|
290385
|
+
if (!childRank)
|
|
290386
|
+
continue;
|
|
290387
|
+
if (childRank.minimum > targetRank) {
|
|
290388
|
+
return [...children2.slice(0, index), parsed, ...children2.slice(index)];
|
|
290389
|
+
}
|
|
290390
|
+
if (childRank.maximum >= targetRank) {
|
|
290391
|
+
throw new ParagraphPropertyMutationUnavailableError(`Cannot safely insert w:${localName2} within mc:AlternateContent paragraph properties`);
|
|
290392
|
+
}
|
|
290393
|
+
insertionIndex = index + 1;
|
|
290394
|
+
}
|
|
290395
|
+
return [...children2.slice(0, insertionIndex), parsed, ...children2.slice(insertionIndex)];
|
|
290396
|
+
}
|
|
290397
|
+
function paragraphPropertyRankRange(child) {
|
|
290398
|
+
const directRank = PARAGRAPH_PROPERTY_CHILD_RANK.get(child.localName);
|
|
290399
|
+
if (directRank != null)
|
|
290400
|
+
return { minimum: directRank, maximum: directRank };
|
|
290401
|
+
if (child.localName !== "AlternateContent")
|
|
290402
|
+
return null;
|
|
290403
|
+
const alternateContent = parseContainerXml(child.xml, "AlternateContent");
|
|
290404
|
+
if (!alternateContent)
|
|
290405
|
+
return null;
|
|
290406
|
+
const ranks = parseTopLevelChildren(alternateContent.inner).flatMap((branch) => {
|
|
290407
|
+
if (branch.localName !== "Choice" && branch.localName !== "Fallback")
|
|
290408
|
+
return [];
|
|
290409
|
+
const branchContainer = parseContainerXml(branch.xml, branch.localName);
|
|
290410
|
+
if (!branchContainer)
|
|
290411
|
+
return [];
|
|
290412
|
+
return parseTopLevelChildren(branchContainer.inner).flatMap((candidate2) => {
|
|
290413
|
+
const range = paragraphPropertyRankRange(candidate2);
|
|
290414
|
+
return range ? [range.minimum, range.maximum] : [];
|
|
290415
|
+
});
|
|
290416
|
+
});
|
|
290417
|
+
if (ranks.length === 0)
|
|
290418
|
+
return null;
|
|
290419
|
+
return { minimum: Math.min(...ranks), maximum: Math.max(...ranks) };
|
|
290420
|
+
}
|
|
290421
|
+
var PARAGRAPH_PROPERTY_CHILD_ORDER, PARAGRAPH_PROPERTY_CHILD_RANK, ParagraphPropertyMutationUnavailableError;
|
|
290422
|
+
var init_paragraph_property_order = __esm(() => {
|
|
290423
|
+
init_common();
|
|
290424
|
+
PARAGRAPH_PROPERTY_CHILD_ORDER = [
|
|
290425
|
+
"pStyle",
|
|
290426
|
+
"keepNext",
|
|
290427
|
+
"keepLines",
|
|
290428
|
+
"pageBreakBefore",
|
|
290429
|
+
"framePr",
|
|
290430
|
+
"widowControl",
|
|
290431
|
+
"numPr",
|
|
290432
|
+
"suppressLineNumbers",
|
|
290433
|
+
"pBdr",
|
|
290434
|
+
"shd",
|
|
290435
|
+
"tabs",
|
|
290436
|
+
"suppressAutoHyphens",
|
|
290437
|
+
"kinsoku",
|
|
290438
|
+
"wordWrap",
|
|
290439
|
+
"overflowPunct",
|
|
290440
|
+
"topLinePunct",
|
|
290441
|
+
"autoSpaceDE",
|
|
290442
|
+
"autoSpaceDN",
|
|
290443
|
+
"bidi",
|
|
290444
|
+
"adjustRightInd",
|
|
290445
|
+
"snapToGrid",
|
|
290446
|
+
"spacing",
|
|
290447
|
+
"ind",
|
|
290448
|
+
"contextualSpacing",
|
|
290449
|
+
"mirrorIndents",
|
|
290450
|
+
"suppressOverlap",
|
|
290451
|
+
"jc",
|
|
290452
|
+
"textDirection",
|
|
290453
|
+
"textAlignment",
|
|
290454
|
+
"textboxTightWrap",
|
|
290455
|
+
"outlineLvl",
|
|
290456
|
+
"divId",
|
|
290457
|
+
"cnfStyle",
|
|
290458
|
+
"rPr",
|
|
290459
|
+
"sectPr",
|
|
290460
|
+
"pPrChange"
|
|
290461
|
+
];
|
|
290462
|
+
PARAGRAPH_PROPERTY_CHILD_RANK = new Map(PARAGRAPH_PROPERTY_CHILD_ORDER.map((name, index) => [name, index]));
|
|
290463
|
+
ParagraphPropertyMutationUnavailableError = class ParagraphPropertyMutationUnavailableError extends Error {
|
|
290464
|
+
constructor(message) {
|
|
290465
|
+
super(message);
|
|
290466
|
+
this.name = "ParagraphPropertyMutationUnavailableError";
|
|
290467
|
+
}
|
|
290468
|
+
};
|
|
290469
|
+
});
|
|
290470
|
+
|
|
290295
290471
|
// ../../../v2/document-api-v2-adapter/dist/references/date-time-field.js
|
|
290296
290472
|
function readDateTimePictureSwitch(instruction) {
|
|
290297
290473
|
return /\\@\s+"([^"]*)"/u.exec(instruction)?.[1] ?? null;
|
|
@@ -292099,17 +292275,18 @@ function buildTocFieldBodyXml(context, instruction, options) {
|
|
|
292099
292275
|
return buildComplexFieldXml(instruction, buildTocFieldResultXml(context, instruction, options));
|
|
292100
292276
|
}
|
|
292101
292277
|
function buildTocFieldResultXml(context, instruction, options) {
|
|
292102
|
-
|
|
292103
|
-
|
|
292104
|
-
|
|
292105
|
-
const
|
|
292278
|
+
return buildTocFieldResult(context, instruction, options).xml;
|
|
292279
|
+
}
|
|
292280
|
+
function buildTocFieldResult(context, instruction, options) {
|
|
292281
|
+
const emptyText = shouldUseV1EmptyTocSourceSet(instruction) ? "No table of contents entries found." : "";
|
|
292282
|
+
const entries = emptyText ? [] : buildTocEntries(context, instruction, options?.currentField, options?.preservedTocPages, options?.tocBookmarkNames);
|
|
292106
292283
|
if (options?.currentField) {
|
|
292107
|
-
return buildTocResultXmlPreservingParagraphs(context, instruction, entries, options.currentField);
|
|
292284
|
+
return buildTocResultXmlPreservingParagraphs(context, instruction, entries, options.currentField, emptyText);
|
|
292108
292285
|
}
|
|
292109
|
-
return buildTocResultRunsXml(instruction, entries);
|
|
292286
|
+
return { xml: emptyText ? buildTextRunXml(emptyText) : buildTocResultRunsXml(instruction, entries) };
|
|
292110
292287
|
}
|
|
292111
292288
|
function buildTocFieldXml(context, instruction, options) {
|
|
292112
|
-
const contentXml = options?.currentField && options.preserveParagraphs ? buildTocFieldBodyXml(context, instruction, options) : buildNewTocFieldContentXml(context, instruction, options?.seedParagraph, options?.currentField, options?.preservedTocPages, options?.reservedParaIds, options?.tocBookmarkNames);
|
|
292289
|
+
const contentXml = options?.currentField && options.preserveParagraphs ? buildTocFieldBodyXml(context, instruction, options) : buildNewTocFieldContentXml(context, instruction, options?.seedParagraph, options?.currentField, options?.preservedTocPages, options?.reservedParaIds, options?.tocBookmarkNames, options?.insertionByteStart);
|
|
292113
292290
|
if (options?.bare)
|
|
292114
292291
|
return contentXml;
|
|
292115
292292
|
return "<w:sdt>" + "<w:sdtPr>" + "<w:docPartObj>" + '<w:docPartGallery w:val="Table of Contents"/>' + "<w:docPartUnique/>" + "</w:docPartObj>" + "</w:sdtPr>" + "<w:sdtContent>" + contentXml + "</w:sdtContent>" + "</w:sdt>";
|
|
@@ -292496,28 +292673,8 @@ function prepareTocSdtReplacement(context, entry, instruction, tocBookmarkNames)
|
|
|
292496
292673
|
afterXml: buildNewTocFieldContentXml(context, instruction, paragraph2, entry, preservedTocPages, reservedParaIds, tocBookmarkNames)
|
|
292497
292674
|
};
|
|
292498
292675
|
}
|
|
292499
|
-
function replaceTocSdtXml(context, entry, instruction, txIdPrefix) {
|
|
292500
|
-
const prepared = prepareTocSdtReplacement(context, entry, instruction);
|
|
292501
|
-
if (!prepared.ok)
|
|
292502
|
-
return prepared;
|
|
292503
|
-
const nextBytes = spliceBytes3(prepared.bytes, prepared.byteStart, prepared.byteEnd, encodeXml(prepared.afterXml));
|
|
292504
|
-
return commitKernelStorySurfacePatch({
|
|
292505
|
-
context,
|
|
292506
|
-
txIdPrefix,
|
|
292507
|
-
perPart: { [entry.partUri]: replaceWholePartEntry(prepared.bytes, nextBytes) },
|
|
292508
|
-
storyIds: [entry.storyId],
|
|
292509
|
-
signalLanesToRebuild: ["paragraphIndex", "headings", "noteAnchorRefs"]
|
|
292510
|
-
});
|
|
292511
|
-
}
|
|
292512
292676
|
function replaceTocXml(context, entry, instruction, txIdPrefix) {
|
|
292513
|
-
const
|
|
292514
|
-
if (sdtReplacement.ok || sdtReplacement.message !== "Unable to locate the containing TOC content control.") {
|
|
292515
|
-
return sdtReplacement;
|
|
292516
|
-
}
|
|
292517
|
-
return replaceBareTocFieldXml(context, entry, instruction, txIdPrefix);
|
|
292518
|
-
}
|
|
292519
|
-
function replaceBareTocFieldXml(context, entry, instruction, txIdPrefix) {
|
|
292520
|
-
const prepared = prepareBareTocFieldReplacement(context, entry, instruction);
|
|
292677
|
+
const prepared = prepareTocReplacement(context, entry, instruction);
|
|
292521
292678
|
if (!prepared.ok)
|
|
292522
292679
|
return prepared;
|
|
292523
292680
|
const nextBytes = spliceBytes3(prepared.bytes, prepared.byteStart, prepared.byteEnd, encodeXml(prepared.afterXml));
|
|
@@ -292529,6 +292686,10 @@ function replaceBareTocFieldXml(context, entry, instruction, txIdPrefix) {
|
|
|
292529
292686
|
signalLanesToRebuild: ["paragraphIndex", "headings", "noteAnchorRefs"]
|
|
292530
292687
|
});
|
|
292531
292688
|
}
|
|
292689
|
+
function prepareTocReplacement(context, entry, instruction, tocBookmarkNames) {
|
|
292690
|
+
const sdt = prepareTocSdtReplacement(context, entry, instruction, tocBookmarkNames);
|
|
292691
|
+
return !sdt.ok && sdt.message === "Unable to locate the containing TOC content control." ? prepareBareTocFieldReplacement(context, entry, instruction, tocBookmarkNames) : sdt;
|
|
292692
|
+
}
|
|
292532
292693
|
function prepareBareTocReplacement(context, entry, instruction, tocBookmarkNames) {
|
|
292533
292694
|
const prepared = prepareBareTocFieldReplacement(context, entry, instruction, tocBookmarkNames);
|
|
292534
292695
|
if (!prepared.ok)
|
|
@@ -292568,18 +292729,112 @@ function prepareBareTocFieldReplacement(context, entry, instruction, tocBookmark
|
|
|
292568
292729
|
}
|
|
292569
292730
|
const xml = TD83.decode(bytes);
|
|
292570
292731
|
const preservedTocPages = readPreservedTocPagesFromPartXml(xml);
|
|
292571
|
-
const
|
|
292732
|
+
const result = buildTocFieldResult(context, instruction, { currentField: entry, preservedTocPages, tocBookmarkNames });
|
|
292733
|
+
const nextFieldXml = buildComplexFieldXml(instruction, result.xml);
|
|
292734
|
+
const fieldStartChar = TD83.decode(bytes.subarray(0, entry.descriptor.byteStart)).length;
|
|
292735
|
+
const fieldEndChar = TD83.decode(bytes.subarray(0, entry.descriptor.byteEnd)).length;
|
|
292736
|
+
const paragraphStart = findEnclosingParagraphStart(xml, fieldStartChar, 0);
|
|
292737
|
+
const paragraphOpenEnd = paragraphStart >= 0 ? findXmlTagEnd4(xml, paragraphStart + 1) : -1;
|
|
292738
|
+
const paragraphCloseStart = xml.indexOf("</w:p>", fieldStartChar);
|
|
292739
|
+
const paragraphPropertiesStart = paragraphOpenEnd >= 0 ? skipXmlWhitespace(xml, paragraphOpenEnd) : -1;
|
|
292740
|
+
const paragraphProperties = paragraphOpenEnd >= 0 ? matchLeadingElement(xml.slice(paragraphPropertiesStart, fieldStartChar), "pPr") : "";
|
|
292741
|
+
const ownsFirstParagraph = entry.descriptor.complete && paragraphOpenEnd >= 0 && paragraphCloseStart >= fieldStartChar && readTocParagraphLevel(paragraphProperties) != null && xml.slice(paragraphPropertiesStart + paragraphProperties.length, fieldStartChar).trim() === "" && (fieldEndChar >= paragraphCloseStart || xml.slice(fieldEndChar, paragraphCloseStart).trim() === "");
|
|
292742
|
+
const replaceParagraphProperties = ownsFirstParagraph && result.firstParagraphProperties != null;
|
|
292743
|
+
const byteStart = replaceParagraphProperties ? encodeXml(xml.slice(0, paragraphOpenEnd)).length : entry.descriptor.byteStart;
|
|
292744
|
+
const nextParagraphProperties = replaceParagraphProperties ? preserveTocOwnerProperties(result.firstParagraphProperties, paragraphProperties) : "";
|
|
292745
|
+
const afterXml = nextParagraphProperties + nextFieldXml;
|
|
292746
|
+
const nextXml = TD83.decode(spliceBytes3(bytes, byteStart, entry.descriptor.byteEnd, encodeXml(afterXml)));
|
|
292747
|
+
if (collectXmlElementRanges(nextXml).errors.length > 0) {
|
|
292748
|
+
return {
|
|
292749
|
+
ok: false,
|
|
292750
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
292751
|
+
message: "The bare TOC replacement crosses unsupported XML boundaries."
|
|
292752
|
+
};
|
|
292753
|
+
}
|
|
292572
292754
|
return {
|
|
292573
292755
|
ok: true,
|
|
292574
292756
|
bytes,
|
|
292575
|
-
byteStart
|
|
292757
|
+
byteStart,
|
|
292576
292758
|
byteEnd: entry.descriptor.byteEnd,
|
|
292577
|
-
beforeXml: TD83.decode(bytes.subarray(
|
|
292578
|
-
afterXml
|
|
292759
|
+
beforeXml: TD83.decode(bytes.subarray(byteStart, entry.descriptor.byteEnd)),
|
|
292760
|
+
afterXml
|
|
292579
292761
|
};
|
|
292580
292762
|
}
|
|
292763
|
+
function findDirectChild(xml, localName2) {
|
|
292764
|
+
return scanDirectElementChildren(xml).find((child) => xmlLocalName(child.qname) === localName2);
|
|
292765
|
+
}
|
|
292766
|
+
function removeTocOwnerPropertiesFromTemplate(xml) {
|
|
292767
|
+
const properties = matchLeadingElement(xml, "pPr") || findDirectChild(xml, "pPr")?.xml;
|
|
292768
|
+
if (!properties)
|
|
292769
|
+
return xml;
|
|
292770
|
+
for (const child of scanDirectElementChildren(properties)) {
|
|
292771
|
+
if (["rPr", "sectPr", "pPrChange"].includes(xmlLocalName(child.qname))) {
|
|
292772
|
+
xml = xml.replace(child.xml, "");
|
|
292773
|
+
}
|
|
292774
|
+
}
|
|
292775
|
+
return xml;
|
|
292776
|
+
}
|
|
292777
|
+
function preserveTocOwnerProperties(template, ownerProperties) {
|
|
292778
|
+
const properties = removeTocOwnerPropertiesFromTemplate(template);
|
|
292779
|
+
const retained = ["rPr", "sectPr", "pPrChange"].map((name) => {
|
|
292780
|
+
const child = findDirectChild(ownerProperties, name);
|
|
292781
|
+
return child ? inheritRunNamespaceDeclarations(child.xml, ownerProperties, ownerProperties.indexOf(child.xml), ownerProperties.slice(0, findXmlTagEnd4(ownerProperties, 1))) : "";
|
|
292782
|
+
}).join("");
|
|
292783
|
+
const insertAt = properties.lastIndexOf("</");
|
|
292784
|
+
return properties.slice(0, insertAt) + retained + properties.slice(insertAt);
|
|
292785
|
+
}
|
|
292786
|
+
function removeTocSectionBoundaryFromTemplate(xml) {
|
|
292787
|
+
const properties = matchLeadingElement(xml, "pPr") || findDirectChild(xml, "pPr")?.xml;
|
|
292788
|
+
if (!properties)
|
|
292789
|
+
return xml;
|
|
292790
|
+
const section = findDirectChild(properties, "sectPr");
|
|
292791
|
+
return section ? xml.replace(section.xml, "") : xml;
|
|
292792
|
+
}
|
|
292793
|
+
function readTocContinuationSectionPlacement(paragraphs, entryCount) {
|
|
292794
|
+
const byEntryIndex = new Map;
|
|
292795
|
+
const carriers = [];
|
|
292796
|
+
for (const [index, paragraph2] of paragraphs.entries()) {
|
|
292797
|
+
if (index === 0)
|
|
292798
|
+
continue;
|
|
292799
|
+
const properties = findDirectChild(paragraph2, "pPr");
|
|
292800
|
+
if (!properties || !findDirectChild(properties.xml, "sectPr"))
|
|
292801
|
+
continue;
|
|
292802
|
+
if (index === paragraphs.length - 1) {
|
|
292803
|
+
const lastEntryIndex = entryCount - 1;
|
|
292804
|
+
if (readTocParagraphTemplateText(paragraph2) && lastEntryIndex > 0 && !byEntryIndex.has(lastEntryIndex) && carriers.length === 0) {
|
|
292805
|
+
byEntryIndex.set(lastEntryIndex, paragraph2);
|
|
292806
|
+
} else {
|
|
292807
|
+
carriers.push(paragraph2);
|
|
292808
|
+
}
|
|
292809
|
+
} else if (index < entryCount) {
|
|
292810
|
+
byEntryIndex.set(index, paragraph2);
|
|
292811
|
+
} else {
|
|
292812
|
+
carriers.push(paragraph2);
|
|
292813
|
+
}
|
|
292814
|
+
}
|
|
292815
|
+
return { byEntryIndex, carriers };
|
|
292816
|
+
}
|
|
292817
|
+
function buildTocSectionOwnerParagraphOpen(template, owner) {
|
|
292818
|
+
const openEnd = findXmlTagEnd4(template, 1);
|
|
292819
|
+
const properties = inheritRunNamespaceDeclarations(template.slice(openEnd) || "<w:pPr></w:pPr>", template, openEnd, template.slice(0, openEnd));
|
|
292820
|
+
const ownerProperties = findDirectChild(owner, "pPr").xml;
|
|
292821
|
+
const retainedProperties = inheritRunNamespaceDeclarations(ownerProperties, owner, owner.indexOf(ownerProperties), readParagraphOpenTag(owner));
|
|
292822
|
+
return readParagraphOpenTag(owner) + preserveTocOwnerProperties(properties, retainedProperties);
|
|
292823
|
+
}
|
|
292824
|
+
function preserveTocContinuationSectionOpen(template, index, sectionOwners, usedParaIds) {
|
|
292825
|
+
const owner = sectionOwners.get(index);
|
|
292826
|
+
const open2 = removeTocSectionBoundaryFromTemplate(template);
|
|
292827
|
+
if (!owner)
|
|
292828
|
+
return open2 === template ? open2 : removeTocOwnerPropertiesFromTemplate(template);
|
|
292829
|
+
for (const id of collectParaIdsInXml(readParagraphOpenTag(owner)))
|
|
292830
|
+
usedParaIds.delete(id);
|
|
292831
|
+
return buildTocSectionOwnerParagraphOpen(open2, owner);
|
|
292832
|
+
}
|
|
292833
|
+
function buildTocSectionCarrierXml(owner) {
|
|
292834
|
+
return buildTocSectionOwnerParagraphOpen("<w:p><w:pPr></w:pPr>", owner) + "</w:p>";
|
|
292835
|
+
}
|
|
292581
292836
|
function shouldUseV1EmptyTocSourceSet(instruction) {
|
|
292582
|
-
return parseQuotedSwitch(instruction, "t") != null && parseNumericSwitchRange(instruction, "o") == null && !/\\u\b/i.test(instruction) &&
|
|
292837
|
+
return parseQuotedSwitch(instruction, "t") != null && parseNumericSwitchRange(instruction, "o") == null && !/\\u\b/i.test(instruction) && !parseTocTcSourceSelection(instruction).enabled;
|
|
292583
292838
|
}
|
|
292584
292839
|
function findLastSdtStart(xmlPrefix2) {
|
|
292585
292840
|
let start = -1;
|
|
@@ -292873,6 +293128,104 @@ function resolveBookmarkSpanInParagraph(context, entry) {
|
|
|
292873
293128
|
text: map3.visibleText().slice(startOffset, endOffset)
|
|
292874
293129
|
};
|
|
292875
293130
|
}
|
|
293131
|
+
function buildParagraphBookmarkMarkers(paragraph2, insertion, id) {
|
|
293132
|
+
const namespace = insertion.fieldSource || paragraph2.namespaceBindings?.w !== WORDPROCESSINGML_NAMESPACE5 ? ` xmlns:w="${WORDPROCESSINGML_NAMESPACE5}"` : "";
|
|
293133
|
+
return {
|
|
293134
|
+
startXml: `<w:bookmarkStart${namespace} w:id="${xmlEscapeAttr(String(id))}" w:name="${xmlEscapeAttr(insertion.name)}"${insertion.tableColumn ? ` w:colFirst="${insertion.tableColumn.colFirst}" w:colLast="${insertion.tableColumn.colLast}"` : ""}/>`,
|
|
293135
|
+
endXml: `<w:bookmarkEnd${namespace} w:id="${xmlEscapeAttr(String(id))}"/>`
|
|
293136
|
+
};
|
|
293137
|
+
}
|
|
293138
|
+
function readBookmarkInsertionNamespaceBindings(paragraph2, insertion) {
|
|
293139
|
+
if (!insertion.fieldSource)
|
|
293140
|
+
return new Map(Object.entries(paragraph2.namespaceBindings ?? {}));
|
|
293141
|
+
const relativeByte = insertion.fieldSource.byteStart - paragraph2.byteStart;
|
|
293142
|
+
const charStart = TD83.decode(encodeXml(paragraph2.rawXml).subarray(0, relativeByte)).length;
|
|
293143
|
+
const parsed = collectXmlElementRanges(paragraph2.rawXml, {
|
|
293144
|
+
fragment: true,
|
|
293145
|
+
additionalNamespaces: paragraph2.namespaceBindings
|
|
293146
|
+
});
|
|
293147
|
+
const parent = parsed.ranges.filter((range) => !range.tag.isSelfClosing && range.openEnd <= charStart && range.closeStart > charStart).sort((left, right) => right.start - left.start)[0];
|
|
293148
|
+
return parsed.errors.length || !parent ? null : new Map(Object.entries(parent.namespaceBindings));
|
|
293149
|
+
}
|
|
293150
|
+
function canPlaceBookmarkAtFieldSource(paragraph2, fieldSource) {
|
|
293151
|
+
return prepareBookmarkParagraphGroups([paragraph2], [{
|
|
293152
|
+
blockId: paragraph2.blockId,
|
|
293153
|
+
name: "_TocPlacement",
|
|
293154
|
+
fieldSource,
|
|
293155
|
+
startXml: `<w:bookmarkStart xmlns:w="${WORDPROCESSINGML_NAMESPACE5}" w:id="0" w:name="_TocPlacement"/>`,
|
|
293156
|
+
endXml: `<w:bookmarkEnd xmlns:w="${WORDPROCESSINGML_NAMESPACE5}" w:id="0"/>`
|
|
293157
|
+
}]) != null;
|
|
293158
|
+
}
|
|
293159
|
+
function prepareBookmarkParagraphGroups(paragraphs, insertions) {
|
|
293160
|
+
const paragraphsById = new Map;
|
|
293161
|
+
for (const paragraph2 of paragraphs) {
|
|
293162
|
+
paragraphsById.set(paragraph2.blockId, paragraphsById.has(paragraph2.blockId) ? null : paragraph2);
|
|
293163
|
+
}
|
|
293164
|
+
const groups = new Map;
|
|
293165
|
+
for (const insertion of insertions) {
|
|
293166
|
+
if (!paragraphsById.get(insertion.blockId))
|
|
293167
|
+
return null;
|
|
293168
|
+
const group = groups.get(insertion.blockId) ?? [];
|
|
293169
|
+
group.push(insertion);
|
|
293170
|
+
groups.set(insertion.blockId, group);
|
|
293171
|
+
}
|
|
293172
|
+
const result = [];
|
|
293173
|
+
for (const [blockId, group] of groups) {
|
|
293174
|
+
const paragraph2 = paragraphsById.get(blockId);
|
|
293175
|
+
const generic = group.filter((insertion) => !insertion.fieldSource);
|
|
293176
|
+
if (generic.length > 1)
|
|
293177
|
+
return null;
|
|
293178
|
+
const parsed = collectXmlElementRanges(paragraph2.rawXml, {
|
|
293179
|
+
fragment: true,
|
|
293180
|
+
additionalNamespaces: paragraph2.namespaceBindings
|
|
293181
|
+
});
|
|
293182
|
+
const root = parsed.ranges.find((range) => range.start === 0 && range.end === paragraph2.rawXml.length);
|
|
293183
|
+
if (parsed.errors.length || !root || root.tag.localName !== "p" || root.tag.namespaceUri !== WORDPROCESSINGML_NAMESPACE5)
|
|
293184
|
+
return null;
|
|
293185
|
+
const fields = group.filter((insertion) => insertion.fieldSource).sort((left, right) => right.fieldSource.byteStart - left.fieldSource.byteStart);
|
|
293186
|
+
const original = encodeXml(paragraph2.rawXml);
|
|
293187
|
+
let next = original;
|
|
293188
|
+
let previousStart = paragraph2.byteEnd;
|
|
293189
|
+
const keys = new Set;
|
|
293190
|
+
for (const insertion of fields) {
|
|
293191
|
+
const source = insertion.fieldSource;
|
|
293192
|
+
if (keys.has(source.key) || !Number.isInteger(source.byteStart) || !Number.isInteger(source.byteEnd) || source.byteStart < paragraph2.byteStart || source.byteEnd > previousStart || source.byteEnd <= source.byteStart)
|
|
293193
|
+
return null;
|
|
293194
|
+
keys.add(source.key);
|
|
293195
|
+
const start = source.byteStart - paragraph2.byteStart;
|
|
293196
|
+
const end = source.byteEnd - paragraph2.byteStart;
|
|
293197
|
+
const startChar = TD83.decode(original.subarray(0, start)).length;
|
|
293198
|
+
const endChar = TD83.decode(original.subarray(0, end)).length;
|
|
293199
|
+
if (encodeXml(paragraph2.rawXml.slice(0, startChar)).length !== start || encodeXml(paragraph2.rawXml.slice(0, endChar)).length !== end)
|
|
293200
|
+
return null;
|
|
293201
|
+
const first = parsed.ranges.find((range) => range.start === startChar && range.tag.namespaceUri === WORDPROCESSINGML_NAMESPACE5 && (range.tag.localName === "r" || range.tag.localName === "fldSimple"));
|
|
293202
|
+
const last = parsed.ranges.find((range) => range.end === endChar && range.tag.namespaceUri === WORDPROCESSINGML_NAMESPACE5 && range.tag.localName === first?.tag.localName);
|
|
293203
|
+
const parent = (range) => parsed.ranges.filter((candidate2) => candidate2.start < range.start && candidate2.end > range.end).sort((a, b) => b.start - a.start)[0];
|
|
293204
|
+
if (!first || !last || first.start < root.openEnd || last.end > root.closeStart || parent(first)?.start !== parent(last)?.start || first.tag.localName === "fldSimple" && first !== last)
|
|
293205
|
+
return null;
|
|
293206
|
+
if (first.tag.localName === "r") {
|
|
293207
|
+
const hasMarker = (run, kind) => parsed.ranges.some((range) => range.start >= run.start && range.end <= run.end && range.tag.namespaceUri === WORDPROCESSINGML_NAMESPACE5 && range.tag.localName === "fldChar" && range.tag.attributes.some((attribute) => attribute.namespaceUri === WORDPROCESSINGML_NAMESPACE5 && attribute.localName === "fldCharType" && attribute.value === kind));
|
|
293208
|
+
if (!hasMarker(first, "begin") || !hasMarker(last, "end"))
|
|
293209
|
+
return null;
|
|
293210
|
+
}
|
|
293211
|
+
next = spliceBytes3(next, end, end, encodeXml(insertion.endXml));
|
|
293212
|
+
next = spliceBytes3(next, start, start, encodeXml(insertion.startXml));
|
|
293213
|
+
previousStart = source.byteStart;
|
|
293214
|
+
}
|
|
293215
|
+
let xml = TD83.decode(next);
|
|
293216
|
+
if (generic[0]) {
|
|
293217
|
+
const withStart = injectParagraphPrefix(xml, generic[0].startXml);
|
|
293218
|
+
const withEnd = withStart && injectParagraphSuffix(withStart, generic[0].endXml);
|
|
293219
|
+
if (!withEnd)
|
|
293220
|
+
return null;
|
|
293221
|
+
xml = withEnd;
|
|
293222
|
+
}
|
|
293223
|
+
if (collectXmlElementRanges(xml, { fragment: true, additionalNamespaces: paragraph2.namespaceBindings }).errors.length)
|
|
293224
|
+
return null;
|
|
293225
|
+
result.push({ paragraph: paragraph2, xml });
|
|
293226
|
+
}
|
|
293227
|
+
return result;
|
|
293228
|
+
}
|
|
292876
293229
|
function insertBookmarksIntoParagraphs(context, insertions, txIdPrefix) {
|
|
292877
293230
|
if (insertions.length === 0) {
|
|
292878
293231
|
return {
|
|
@@ -292881,59 +293234,46 @@ function insertBookmarksIntoParagraphs(context, insertions, txIdPrefix) {
|
|
|
292881
293234
|
message: "At least one bookmark insertion is required."
|
|
292882
293235
|
};
|
|
292883
293236
|
}
|
|
292884
|
-
const
|
|
292885
|
-
|
|
292886
|
-
|
|
293237
|
+
const paragraphs = readBodyParagraphs(context);
|
|
293238
|
+
const paragraphGroups = new Map;
|
|
293239
|
+
for (const paragraph2 of paragraphs) {
|
|
293240
|
+
const group = paragraphGroups.get(paragraph2.blockId) ?? [];
|
|
293241
|
+
group.push(paragraph2);
|
|
293242
|
+
paragraphGroups.set(paragraph2.blockId, group);
|
|
292887
293243
|
}
|
|
292888
293244
|
const existingNames = new Set(readBookmarkEntries(context).map((entry) => entry.name));
|
|
292889
|
-
const requestedBlockIds = new Set;
|
|
292890
293245
|
const requestedNames = new Set;
|
|
292891
|
-
const replacementsByPart = new Map;
|
|
292892
|
-
const storyIds = new Set;
|
|
292893
293246
|
const bookmarkIds = [];
|
|
292894
293247
|
let nextBookmarkId = nextBookmarkNumericId(context);
|
|
293248
|
+
const markers = [];
|
|
292895
293249
|
for (const insertion of insertions) {
|
|
292896
|
-
if (requestedBlockIds.has(insertion.blockId)) {
|
|
292897
|
-
return {
|
|
292898
|
-
ok: false,
|
|
292899
|
-
code: "INVALID_TARGET",
|
|
292900
|
-
message: `Paragraph "${insertion.blockId}" was requested more than once.`
|
|
292901
|
-
};
|
|
292902
|
-
}
|
|
292903
293250
|
if (existingNames.has(insertion.name) || requestedNames.has(insertion.name)) {
|
|
292904
|
-
return {
|
|
292905
|
-
ok: false,
|
|
292906
|
-
code: "INVALID_TARGET",
|
|
292907
|
-
message: `Bookmark name "${insertion.name}" already exists.`
|
|
292908
|
-
};
|
|
293251
|
+
return { ok: false, code: "INVALID_TARGET", message: `Bookmark name "${insertion.name}" already exists.` };
|
|
292909
293252
|
}
|
|
292910
|
-
const
|
|
292911
|
-
if (
|
|
293253
|
+
const targets = paragraphGroups.get(insertion.blockId);
|
|
293254
|
+
if (targets?.length !== 1)
|
|
292912
293255
|
return {
|
|
292913
293256
|
ok: false,
|
|
292914
293257
|
code: "TARGET_NOT_FOUND",
|
|
292915
293258
|
message: `Paragraph "${insertion.blockId}" was not found or is ambiguous.`
|
|
292916
293259
|
};
|
|
292917
|
-
}
|
|
292918
293260
|
const bookmarkId = String(nextBookmarkId++);
|
|
292919
|
-
|
|
292920
|
-
|
|
292921
|
-
|
|
292922
|
-
|
|
292923
|
-
|
|
292924
|
-
|
|
292925
|
-
|
|
292926
|
-
|
|
292927
|
-
|
|
292928
|
-
|
|
292929
|
-
|
|
293261
|
+
markers.push({ ...insertion, ...buildParagraphBookmarkMarkers(targets[0], insertion, bookmarkId) });
|
|
293262
|
+
bookmarkIds.push(bookmarkId);
|
|
293263
|
+
requestedNames.add(insertion.name);
|
|
293264
|
+
}
|
|
293265
|
+
const prepared = prepareBookmarkParagraphGroups(paragraphs, markers);
|
|
293266
|
+
if (!prepared)
|
|
293267
|
+
return { ok: false, code: "INVALID_TARGET", message: "Bookmark targets have unavailable or unsupported paragraph or field boundaries." };
|
|
293268
|
+
const replacementsByPart = new Map;
|
|
293269
|
+
const storyIds = new Set;
|
|
293270
|
+
const requestedBlockIds = new Set;
|
|
293271
|
+
for (const { paragraph: paragraph2, xml } of prepared) {
|
|
292930
293272
|
const replacements = replacementsByPart.get(paragraph2.partUri) ?? [];
|
|
292931
|
-
replacements.push({ paragraph: paragraph2, bytes: encodeXml(
|
|
293273
|
+
replacements.push({ paragraph: paragraph2, bytes: encodeXml(xml) });
|
|
292932
293274
|
replacementsByPart.set(paragraph2.partUri, replacements);
|
|
292933
293275
|
storyIds.add(paragraph2.storyId);
|
|
292934
|
-
|
|
292935
|
-
requestedBlockIds.add(insertion.blockId);
|
|
292936
|
-
requestedNames.add(insertion.name);
|
|
293276
|
+
requestedBlockIds.add(paragraph2.blockId);
|
|
292937
293277
|
}
|
|
292938
293278
|
const perPart = {};
|
|
292939
293279
|
for (const [partUri, replacements] of replacementsByPart) {
|
|
@@ -293390,6 +293730,34 @@ function parseQuotedSwitch(instruction, flag) {
|
|
|
293390
293730
|
const re = new RegExp(`\\\\${escapeRegExp15(flag)}\\s+"([^"]*)"`);
|
|
293391
293731
|
return re.exec(instruction)?.[1];
|
|
293392
293732
|
}
|
|
293733
|
+
function parseTocFieldIdentifier(instruction) {
|
|
293734
|
+
return parseTocTcSourceSelection(instruction).identifier;
|
|
293735
|
+
}
|
|
293736
|
+
function parseTocTcSourceSelection(instruction) {
|
|
293737
|
+
const tokens = instruction.match(/"[^"]*"|[^\s"]+/g) ?? [];
|
|
293738
|
+
const fieldIndex = tokens.findIndex((token) => token.toLowerCase() === "\\f");
|
|
293739
|
+
const levelIndex = tokens.findIndex((token) => token.toLowerCase() === "\\l");
|
|
293740
|
+
const argument = (index) => {
|
|
293741
|
+
const value2 = index < 0 ? undefined : tokens[index + 1];
|
|
293742
|
+
if (value2 == null || value2.startsWith("\\"))
|
|
293743
|
+
return;
|
|
293744
|
+
return value2.startsWith('"') ? value2.slice(1, -1) : value2;
|
|
293745
|
+
};
|
|
293746
|
+
const identifier = argument(fieldIndex);
|
|
293747
|
+
const levelArgument = argument(levelIndex);
|
|
293748
|
+
const range = /^(\d+)-(\d+)$/.exec(levelArgument ?? "");
|
|
293749
|
+
return {
|
|
293750
|
+
enabled: fieldIndex >= 0 || levelIndex >= 0,
|
|
293751
|
+
hasFieldSwitch: fieldIndex >= 0,
|
|
293752
|
+
hasLevelSwitch: levelIndex >= 0,
|
|
293753
|
+
...identifier != null ? { identifier } : {},
|
|
293754
|
+
...levelArgument != null ? { levelArgument } : {},
|
|
293755
|
+
...range ? { levels: { from: Number(range[1]), to: Number(range[2]) } } : {}
|
|
293756
|
+
};
|
|
293757
|
+
}
|
|
293758
|
+
function matchesTocTcSourceSelection(selection, entry) {
|
|
293759
|
+
return selection.enabled && entry.text.length > 0 && (selection.identifier == null || (entry.tableIdentifier ?? "C") === selection.identifier) && (selection.levels == null || entry.level >= selection.levels.from && entry.level <= selection.levels.to);
|
|
293760
|
+
}
|
|
293393
293761
|
function parseNumericSwitchRange(instruction, flag) {
|
|
293394
293762
|
const re = new RegExp(`\\\\${escapeRegExp15(flag)}\\s+"?(\\d+)-(\\d+)"?`);
|
|
293395
293763
|
const match = re.exec(instruction);
|
|
@@ -293771,16 +294139,26 @@ function buildTocResultRunsXml(instruction, entries) {
|
|
|
293771
294139
|
return chunks.join("");
|
|
293772
294140
|
}).join("");
|
|
293773
294141
|
}
|
|
293774
|
-
function buildTocResultXmlPreservingParagraphs(context, instruction,
|
|
293775
|
-
if (entries.length === 0)
|
|
293776
|
-
return buildTextRunXml("");
|
|
294142
|
+
function buildTocResultXmlPreservingParagraphs(context, instruction, sourceEntries, currentField, emptyText = "") {
|
|
293777
294143
|
const sourceParagraphs = readCurrentTocParagraphXmls(context, currentField, true);
|
|
293778
|
-
const
|
|
294144
|
+
const sectionPlacement = readTocContinuationSectionPlacement(sourceParagraphs, sourceEntries.length);
|
|
294145
|
+
const sectionOwners = sectionPlacement.byEntryIndex;
|
|
294146
|
+
if (sourceEntries.length === 0) {
|
|
294147
|
+
const carriers = sectionPlacement.carriers.map(buildTocSectionCarrierXml);
|
|
294148
|
+
return { xml: buildTextRunXml(emptyText) + (carriers.length ? `</w:p>${carriers.join("").slice(0, -6)}` : "") };
|
|
294149
|
+
}
|
|
294150
|
+
const paragraphTemplates = buildTocParagraphTemplatesFromParagraphXml([
|
|
294151
|
+
removeTocOwnerPropertiesFromTemplate(sourceParagraphs[0] ?? ""),
|
|
294152
|
+
...sourceParagraphs.slice(1)
|
|
294153
|
+
].join(""));
|
|
293779
294154
|
const entryRunPropertiesTemplates = readTocEntryRunPropertiesTemplates(context, currentField);
|
|
293780
|
-
const entryRunProperties = resolveTocEntryRunProperties(
|
|
294155
|
+
const entryRunProperties = resolveTocEntryRunProperties(sourceEntries, entryRunPropertiesTemplates);
|
|
294156
|
+
const entryParagraphOpens = resolveTocEntryParagraphOpens(sourceEntries, entryRunProperties, entryRunPropertiesTemplates, sourceParagraphs[0]);
|
|
294157
|
+
const entries = sourceEntries.map((entry, index) => applyCachedTcEntrySeparator(entry, entryRunProperties[index]));
|
|
294158
|
+
const withPageTab = createTocPageTabFallback(context, instruction, currentField.descriptor.byteStart);
|
|
293781
294159
|
const documentParaIds = collectDocumentParaIds(context);
|
|
293782
294160
|
const reusableParaIds = collectParaIdsInXml(sourceParagraphs.slice(1).join(""));
|
|
293783
|
-
for (const id of collectParaIdsInXml(sourceParagraphs[0] ?? ""))
|
|
294161
|
+
for (const id of collectParaIdsInXml((sourceParagraphs[0] ?? "") + [...sectionOwners.values(), ...sectionPlacement.carriers].join("")))
|
|
293784
294162
|
reusableParaIds.delete(id);
|
|
293785
294163
|
const usedParaIds = new Set(documentParaIds);
|
|
293786
294164
|
const nextParaId = createUniqueParaIdAllocator(documentParaIds);
|
|
@@ -293797,31 +294175,47 @@ function buildTocResultXmlPreservingParagraphs(context, instruction, entries, cu
|
|
|
293797
294175
|
}
|
|
293798
294176
|
let xml = buildTocEntryRunsXml(instruction, entries[0], entryRunProperties[0]);
|
|
293799
294177
|
for (const [index, entry] of entries.slice(1).entries()) {
|
|
293800
|
-
const retained = remainingTemplates.get(`${normalizeTocLevel(entry.level)}:${normalizeTocEntryText(entry.text)}`)?.pop();
|
|
294178
|
+
const retained = entryParagraphOpens[index + 1] ?? remainingTemplates.get(`${normalizeTocLevel(entry.level)}:${normalizeTocEntryText(entry.cachedParagraphText ?? entry.text)}`)?.pop();
|
|
293801
294179
|
if (retained) {
|
|
293802
294180
|
for (const id of collectParaIdsInXml(retained)) {
|
|
293803
294181
|
if (reusableParaIds.delete(id))
|
|
293804
294182
|
usedParaIds.delete(id);
|
|
293805
294183
|
}
|
|
293806
294184
|
}
|
|
293807
|
-
xml += `</w:p>${dedupeParagraphOpenParaId(retained ?? buildTocContinuationParagraphOpen(entry, paragraphTemplates), usedParaIds, nextParaId)}` + buildTocEntryRunsXml(instruction, entry, entryRunProperties[index + 1]);
|
|
294185
|
+
xml += `</w:p>${dedupeParagraphOpenParaId(preserveTocContinuationSectionOpen(withPageTab(retained ?? buildTocContinuationParagraphOpen(entry, paragraphTemplates), entry), index + 1, sectionOwners, usedParaIds), usedParaIds, nextParaId)}` + buildTocEntryRunsXml(instruction, entry, entryRunProperties[index + 1]);
|
|
293808
294186
|
}
|
|
293809
|
-
|
|
294187
|
+
for (const owner of sectionPlacement.carriers) {
|
|
294188
|
+
xml += `</w:p>${buildTocSectionCarrierXml(owner).slice(0, -6)}`;
|
|
294189
|
+
}
|
|
294190
|
+
const firstParagraphOpen = removeTocSectionBoundaryFromTemplate(withPageTab(entryParagraphOpens[0] ?? buildTocContinuationParagraphOpen(entries[0], paragraphTemplates), entries[0]));
|
|
294191
|
+
const firstParagraphOpenEnd = findXmlTagEnd4(firstParagraphOpen, 1);
|
|
294192
|
+
return {
|
|
294193
|
+
xml,
|
|
294194
|
+
firstParagraphProperties: inheritRunNamespaceDeclarations(firstParagraphOpen.slice(firstParagraphOpenEnd), firstParagraphOpen, firstParagraphOpenEnd, firstParagraphOpen.slice(0, firstParagraphOpenEnd))
|
|
294195
|
+
};
|
|
293810
294196
|
}
|
|
293811
|
-
function buildNewTocFieldContentXml(context, instruction, seedParagraph, currentField, preservedTocPages, reservedParaIds, tocBookmarkNames) {
|
|
294197
|
+
function buildNewTocFieldContentXml(context, instruction, seedParagraph, currentField, preservedTocPages, reservedParaIds, tocBookmarkNames, insertionByteStart) {
|
|
293812
294198
|
const useEmptyPlaceholder = shouldUseV1EmptyTocSourceSet(instruction);
|
|
293813
294199
|
const paragraphs = readBodyParagraphs(context, { includeListState: false });
|
|
293814
|
-
const
|
|
293815
|
-
const paragraphTemplates = readDocumentTocParagraphTemplates(paragraphs);
|
|
294200
|
+
const sourceEntries = useEmptyPlaceholder ? [] : buildTocEntries(context, instruction, currentField, preservedTocPages, tocBookmarkNames, paragraphs);
|
|
294201
|
+
const paragraphTemplates = readDocumentTocParagraphTemplates(paragraphs, currentField?.blockId);
|
|
293816
294202
|
const entryRunPropertiesTemplates = readTocEntryRunPropertiesTemplates(context, currentField);
|
|
293817
|
-
const entryRunProperties = resolveTocEntryRunProperties(
|
|
294203
|
+
const entryRunProperties = resolveTocEntryRunProperties(sourceEntries, entryRunPropertiesTemplates);
|
|
294204
|
+
const entryParagraphOpens = resolveTocEntryParagraphOpens(sourceEntries, entryRunProperties, entryRunPropertiesTemplates, seedParagraph?.rawXml);
|
|
294205
|
+
const entries = sourceEntries.map((entry, index) => applyCachedTcEntrySeparator(entry, entryRunProperties[index]));
|
|
294206
|
+
const withPageTab = createTocPageTabFallback(context, instruction, currentField?.descriptor.byteStart ?? insertionByteStart ?? seedParagraph?.byteStart ?? 0);
|
|
294207
|
+
const sectionPlacement = readTocContinuationSectionPlacement(currentField ? readCurrentTocParagraphXmls(context, currentField, true) : [], entries.length);
|
|
294208
|
+
const sectionOwners = sectionPlacement.byEntryIndex;
|
|
294209
|
+
const carriers = sectionPlacement.carriers.map(buildTocSectionCarrierXml);
|
|
293818
294210
|
if (entries.length === 0) {
|
|
293819
|
-
return buildGeneratedTocParagraphOpen(1, seedParagraph, paragraphTemplates) + '<w:r><w:fldChar w:fldCharType="begin" /></w:r>' + buildInstructionRunXml(instruction) + '<w:r><w:fldChar w:fldCharType="separate" /></w:r>' + buildTextRunXml(useEmptyPlaceholder ? "No table of contents entries found." : "") + '<w:r><w:fldChar w:fldCharType="end" /></w:r>' + "</w:p>";
|
|
294211
|
+
return buildGeneratedTocParagraphOpen(1, seedParagraph, paragraphTemplates, undefined, currentField != null) + '<w:r><w:fldChar w:fldCharType="begin" /></w:r>' + buildInstructionRunXml(instruction) + '<w:r><w:fldChar w:fldCharType="separate" /></w:r>' + buildTextRunXml(useEmptyPlaceholder ? "No table of contents entries found." : "") + (carriers.length ? `</w:p>${carriers.join("").slice(0, -6)}` : "") + '<w:r><w:fldChar w:fldCharType="end" /></w:r>' + "</w:p>";
|
|
293820
294212
|
}
|
|
293821
294213
|
const documentParaIds = collectDocumentParaIds(context);
|
|
293822
294214
|
const usedParaIds = new Set(reservedParaIds ?? []);
|
|
294215
|
+
for (const id of collectParaIdsInXml([...sectionOwners.values(), ...sectionPlacement.carriers].join("")))
|
|
294216
|
+
usedParaIds.add(id);
|
|
293823
294217
|
const nextParaId = createUniqueParaIdAllocator(documentParaIds);
|
|
293824
|
-
return entries.map((entry, index) => `${dedupeParagraphOpenParaId(index === 0 ? buildGeneratedTocParagraphOpen(entry.level, seedParagraph, paragraphTemplates, entry.text) : buildTocContinuationParagraphOpen(entry, paragraphTemplates), usedParaIds, nextParaId)}` + (index === 0 ? '<w:r><w:fldChar w:fldCharType="begin" /></w:r>' + buildInstructionRunXml(instruction) + '<w:r><w:fldChar w:fldCharType="separate" /></w:r>' : "") + buildTocEntryRunsXml(instruction, entry, entryRunProperties[index]) + (index === entries.length - 1 ? '<w:r><w:fldChar w:fldCharType="end" /></w:r>' : "") + "</w:p>").join("");
|
|
294218
|
+
return entries.map((entry, index) => `${dedupeParagraphOpenParaId(withPageTab(index === 0 ? buildGeneratedTocParagraphOpen(entry.level, seedParagraph, paragraphTemplates, entry.cachedParagraphText ?? entry.text, currentField != null, entryParagraphOpens[index]) : currentField ? preserveTocContinuationSectionOpen(entryParagraphOpens[index] ?? buildTocContinuationParagraphOpen(entry, paragraphTemplates), index, sectionOwners, usedParaIds) : entryParagraphOpens[index] ?? buildTocContinuationParagraphOpen(entry, paragraphTemplates), entry), usedParaIds, nextParaId)}` + (index === 0 ? '<w:r><w:fldChar w:fldCharType="begin" /></w:r>' + buildInstructionRunXml(instruction) + '<w:r><w:fldChar w:fldCharType="separate" /></w:r>' : "") + buildTocEntryRunsXml(instruction, entry, entryRunProperties[index]) + (index === entries.length - 1 ? (carriers.length ? `</w:p>${carriers.join("").slice(0, -6)}` : "") + '<w:r><w:fldChar w:fldCharType="end" /></w:r>' : "") + "</w:p>").join("");
|
|
293825
294219
|
}
|
|
293826
294220
|
function collectDocumentParaIds(context) {
|
|
293827
294221
|
const existing = new Set;
|
|
@@ -293889,7 +294283,8 @@ function buildTocEntryRunsXml(instruction, entry, entryRunProperties) {
|
|
|
293889
294283
|
function buildTocEntries(context, instruction, currentField, preservedTocPages, tocBookmarkNames, paragraphs = readBodyParagraphs(context, { includeListState: false })) {
|
|
293890
294284
|
const pages = estimateDocumentPages(context);
|
|
293891
294285
|
const numberingMarkers = buildBodyParagraphNumberReferenceMap(context, paragraphs);
|
|
293892
|
-
const
|
|
294286
|
+
const bodyBookmarks = readBookmarkEntries(context);
|
|
294287
|
+
const tocBookmarks = buildBodyTocBookmarkMap(bodyBookmarks);
|
|
293893
294288
|
if (tocBookmarkNames)
|
|
293894
294289
|
for (const [key2, name] of tocBookmarkNames)
|
|
293895
294290
|
tocBookmarks.set(key2, name);
|
|
@@ -293911,6 +294306,7 @@ function buildTocEntries(context, instruction, currentField, preservedTocPages,
|
|
|
293911
294306
|
const bookmarkKey = bookmarkName ? normalizeTocBookmarkKey(bookmarkName) : undefined;
|
|
293912
294307
|
const preservedPage = (bookmarkKey ? preservedPagesByBookmark.get(bookmarkKey) : undefined) ?? readPreservedTocPageByText(preservedPages, text);
|
|
293913
294308
|
return {
|
|
294309
|
+
sourceByteStart: paragraph2.byteStart,
|
|
293914
294310
|
text,
|
|
293915
294311
|
page: preservedPage ?? String(pages.displayPageByBlockId.get(paragraph2.blockId) ?? 1),
|
|
293916
294312
|
level: derivedLevel,
|
|
@@ -293922,17 +294318,30 @@ function buildTocEntries(context, instruction, currentField, preservedTocPages,
|
|
|
293922
294318
|
...bookmarkName ? { bookmarkName } : {}
|
|
293923
294319
|
};
|
|
293924
294320
|
}).filter((entry) => entry != null).filter((entry) => entry.text.length > 0);
|
|
293925
|
-
const
|
|
293926
|
-
const
|
|
293927
|
-
const
|
|
293928
|
-
|
|
294321
|
+
const tcSelection = parseTocTcSourceSelection(instruction);
|
|
294322
|
+
const bodyParagraphs = new Map(paragraphs.map((paragraph2) => [`${paragraph2.storyId}:${paragraph2.blockId}`, paragraph2]));
|
|
294323
|
+
const tcFields = listCanonicalFieldEntries(context).filter((entry) => instructionKeyword(entry.descriptor.instructionText) === "TC").filter((entry) => bodyParagraphs.has(`${entry.storyId}:${entry.blockId}`));
|
|
294324
|
+
const tcBookmarkNames = resolveTocTcBookmarkNames(bodyBookmarks, paragraphs, tcFields);
|
|
294325
|
+
const tcEntries = tcFields.map((entry) => ({ entry, parsed: parseTocEntryInstruction(entry.descriptor.instructionText) })).filter(({ parsed }) => matchesTocTcSourceSelection(tcSelection, parsed)).map(({ entry, parsed }) => {
|
|
294326
|
+
const text = parsed.text;
|
|
294327
|
+
const separatorIndex = text.indexOf("\t");
|
|
294328
|
+
const marker = separatorIndex > 0 ? text.slice(0, separatorIndex) : undefined;
|
|
294329
|
+
const title = separatorIndex > 0 ? text.slice(separatorIndex + 1) : undefined;
|
|
294330
|
+
const fieldKey = tocTcFieldSourceKey(entry);
|
|
294331
|
+
const bookmarkName = tocBookmarkNames?.get(fieldKey) ?? tcBookmarkNames.get(fieldKey);
|
|
294332
|
+
const bookmarkKey = bookmarkName ? normalizeTocBookmarkKey(bookmarkName) : undefined;
|
|
294333
|
+
const preservedPage = (bookmarkKey ? preservedPagesByBookmark.get(bookmarkKey) : undefined) ?? readPreservedTocPageByText(preservedPages, text);
|
|
293929
294334
|
return {
|
|
293930
|
-
|
|
294335
|
+
sourceByteStart: entry.descriptor.byteStart,
|
|
294336
|
+
text,
|
|
293931
294337
|
page: preservedPage ?? String(pages.displayPageByBlockId.get(entry.blockId) ?? 1),
|
|
293932
|
-
level: parsed.level
|
|
294338
|
+
level: parsed.level,
|
|
294339
|
+
isTcEntry: true,
|
|
294340
|
+
...marker && title ? { marker, title, markerSeparator: "tab" } : {},
|
|
294341
|
+
...bookmarkName ? { bookmarkName } : {}
|
|
293933
294342
|
};
|
|
293934
|
-
})
|
|
293935
|
-
return [...headings, ...tcEntries];
|
|
294343
|
+
});
|
|
294344
|
+
return [...headings, ...tcEntries].sort((left, right) => left.sourceByteStart - right.sourceByteStart).map(({ sourceByteStart: _sourceByteStart, ...entry }) => entry);
|
|
293936
294345
|
}
|
|
293937
294346
|
function parseTocCustomStyles(instruction) {
|
|
293938
294347
|
const raw = parseQuotedSwitch(instruction, "t");
|
|
@@ -293952,18 +294361,19 @@ function parseTocCustomStyles(instruction) {
|
|
|
293952
294361
|
function normalizeStyleId(value2) {
|
|
293953
294362
|
return value2.replace(/\s+/g, "").trim().toLowerCase();
|
|
293954
294363
|
}
|
|
293955
|
-
function readDocumentTocParagraphTemplates(paragraphs) {
|
|
294364
|
+
function readDocumentTocParagraphTemplates(paragraphs, ownerBlockId) {
|
|
293956
294365
|
const templates = emptyTocParagraphTemplates();
|
|
293957
294366
|
for (const paragraph2 of paragraphs) {
|
|
293958
294367
|
const level = readTocParagraphLevel(paragraph2.rawXml);
|
|
293959
294368
|
if (level == null)
|
|
293960
294369
|
continue;
|
|
293961
|
-
const open2 = buildTocParagraphTemplateOpen(paragraph2.rawXml);
|
|
294370
|
+
const open2 = buildTocParagraphTemplateOpen(paragraph2.blockId === ownerBlockId ? removeTocOwnerPropertiesFromTemplate(paragraph2.rawXml) : paragraph2.rawXml);
|
|
293962
294371
|
if (!templates.byLevel.has(level))
|
|
293963
294372
|
templates.byLevel.set(level, open2);
|
|
293964
294373
|
const entryText = readTocParagraphTemplateText(paragraph2.rawXml);
|
|
293965
|
-
|
|
293966
|
-
|
|
294374
|
+
const key2 = `${level}:${entryText}`;
|
|
294375
|
+
if (entryText && !templates.byLevelAndText.has(key2))
|
|
294376
|
+
templates.byLevelAndText.set(key2, open2);
|
|
293967
294377
|
}
|
|
293968
294378
|
return templates;
|
|
293969
294379
|
}
|
|
@@ -293971,7 +294381,8 @@ function readTocEntryRunPropertiesTemplates(context, currentField) {
|
|
|
293971
294381
|
const templates = {
|
|
293972
294382
|
byBookmark: new Map,
|
|
293973
294383
|
byText: new Map,
|
|
293974
|
-
byLevel: new Map
|
|
294384
|
+
byLevel: new Map,
|
|
294385
|
+
paragraphByRunTemplate: new Map
|
|
293975
294386
|
};
|
|
293976
294387
|
if (!currentField)
|
|
293977
294388
|
return templates;
|
|
@@ -293986,12 +294397,18 @@ function readTocEntryRunPropertiesTemplates(context, currentField) {
|
|
|
293986
294397
|
const { runProperties } = visibleEntry;
|
|
293987
294398
|
if (runProperties.length === 0)
|
|
293988
294399
|
continue;
|
|
294400
|
+
templates.paragraphByRunTemplate.set(runProperties, {
|
|
294401
|
+
level,
|
|
294402
|
+
open: buildTocParagraphTemplateOpen(paragraphXml)
|
|
294403
|
+
});
|
|
293989
294404
|
const hyperlinkXml = findFirstElement(paragraphXml, "hyperlink")?.xml ?? "";
|
|
293990
294405
|
const hyperlinkBookmark = readXmlAttributeByLocalName(hyperlinkXml, "anchor");
|
|
293991
294406
|
const bookmark = hyperlinkBookmark ? decodeXmlEntities2(hyperlinkBookmark) : readTocPageReferenceBookmarkName(paragraphXml);
|
|
293992
294407
|
const bookmarkKey = bookmark ? normalizeTocBookmarkKey(bookmark) : "";
|
|
293993
|
-
if (bookmarkKey
|
|
293994
|
-
templates.byBookmark.
|
|
294408
|
+
if (bookmarkKey) {
|
|
294409
|
+
const byBookmark = templates.byBookmark.get(bookmarkKey) ?? [];
|
|
294410
|
+
byBookmark.push(runProperties);
|
|
294411
|
+
templates.byBookmark.set(bookmarkKey, byBookmark);
|
|
293995
294412
|
}
|
|
293996
294413
|
const entryText = readTocParagraphTemplateText(visibleEntry);
|
|
293997
294414
|
if (entryText) {
|
|
@@ -294255,24 +294672,54 @@ function hasEnabledWebHidden(xml) {
|
|
|
294255
294672
|
}
|
|
294256
294673
|
function resolveTocEntryRunProperties(entries, templates) {
|
|
294257
294674
|
const usedTemplates = new Set;
|
|
294675
|
+
const bookmarkEntryCounts = new Map;
|
|
294676
|
+
for (const entry of entries) {
|
|
294677
|
+
if (!entry.bookmarkName)
|
|
294678
|
+
continue;
|
|
294679
|
+
const key2 = normalizeTocBookmarkKey(entry.bookmarkName);
|
|
294680
|
+
bookmarkEntryCounts.set(key2, (bookmarkEntryCounts.get(key2) ?? 0) + 1);
|
|
294681
|
+
}
|
|
294258
294682
|
const byTextQueues = new Map([...templates.byText].map(([text, matches]) => [text, [...matches]]));
|
|
294259
|
-
const takeByText = (text) => {
|
|
294683
|
+
const takeByText = (text, accept) => {
|
|
294260
294684
|
const queue = byTextQueues.get(text);
|
|
294261
|
-
|
|
294262
|
-
|
|
294263
|
-
if (candidate2 && !usedTemplates.has(candidate2))
|
|
294264
|
-
return candidate2;
|
|
294265
|
-
}
|
|
294266
|
-
return;
|
|
294685
|
+
const index = queue?.findIndex((candidate2) => !usedTemplates.has(candidate2) && (!accept || accept(candidate2))) ?? -1;
|
|
294686
|
+
return index >= 0 ? queue?.splice(index, 1)[0] : undefined;
|
|
294267
294687
|
};
|
|
294268
294688
|
const resolved = entries.map((entry) => {
|
|
294269
294689
|
const bookmarkKey = entry.bookmarkName ? normalizeTocBookmarkKey(entry.bookmarkName) : "";
|
|
294270
|
-
const
|
|
294271
|
-
const
|
|
294272
|
-
|
|
294273
|
-
|
|
294274
|
-
|
|
294275
|
-
|
|
294690
|
+
const bookmarkTemplates = bookmarkKey ? templates.byBookmark.get(bookmarkKey) : undefined;
|
|
294691
|
+
const byBookmark = bookmarkEntryCounts.get(bookmarkKey) === 1 && bookmarkTemplates?.length === 1 ? bookmarkTemplates[0] : undefined;
|
|
294692
|
+
if (byBookmark)
|
|
294693
|
+
usedTemplates.add(byBookmark);
|
|
294694
|
+
return byBookmark;
|
|
294695
|
+
});
|
|
294696
|
+
entries.forEach((entry, index) => {
|
|
294697
|
+
if (resolved[index] || !entry.isTcEntry)
|
|
294698
|
+
return;
|
|
294699
|
+
const levelTemplates = templates.byLevel.get(normalizeTocLevel(entry.level));
|
|
294700
|
+
const byText = takeByText(normalizeTocEntryText(entry.text), (template) => levelTemplates?.includes(template) === true && !template.some((run) => run.separator === "tab"));
|
|
294701
|
+
if (!byText)
|
|
294702
|
+
return;
|
|
294703
|
+
resolved[index] = byText;
|
|
294704
|
+
usedTemplates.add(byText);
|
|
294705
|
+
});
|
|
294706
|
+
entries.forEach((entry, index) => {
|
|
294707
|
+
if (resolved[index] || !entry.isTcEntry)
|
|
294708
|
+
return;
|
|
294709
|
+
const cachedSeparatorTemplate = templates.byLevel.get(normalizeTocLevel(entry.level))?.find((template) => !usedTemplates.has(template) && applyCachedTcEntrySeparator(entry, template) !== entry);
|
|
294710
|
+
if (!cachedSeparatorTemplate)
|
|
294711
|
+
return;
|
|
294712
|
+
resolved[index] = cachedSeparatorTemplate;
|
|
294713
|
+
usedTemplates.add(cachedSeparatorTemplate);
|
|
294714
|
+
});
|
|
294715
|
+
entries.forEach((entry, index) => {
|
|
294716
|
+
if (resolved[index])
|
|
294717
|
+
return;
|
|
294718
|
+
const byText = takeByText(normalizeTocEntryText(entry.text));
|
|
294719
|
+
if (!byText)
|
|
294720
|
+
return;
|
|
294721
|
+
resolved[index] = byText;
|
|
294722
|
+
usedTemplates.add(byText);
|
|
294276
294723
|
});
|
|
294277
294724
|
for (const level of new Set(entries.map((entry) => normalizeTocLevel(entry.level)))) {
|
|
294278
294725
|
const entryIndexes = entries.map((entry, index) => normalizeTocLevel(entry.level) === level ? index : -1).filter((index) => index >= 0);
|
|
@@ -294308,6 +294755,49 @@ function resolveTocEntryRunProperties(entries, templates) {
|
|
|
294308
294755
|
}
|
|
294309
294756
|
return resolved;
|
|
294310
294757
|
}
|
|
294758
|
+
function resolveTocEntryParagraphOpens(entries, runTemplates, templates, ownerParagraphXml) {
|
|
294759
|
+
const ownerOpen = ownerParagraphXml ? buildTocParagraphTemplateOpen(ownerParagraphXml) : undefined;
|
|
294760
|
+
return entries.map((entry, index) => {
|
|
294761
|
+
const runs = runTemplates[index];
|
|
294762
|
+
const paired = runs && templates.paragraphByRunTemplate.get(runs);
|
|
294763
|
+
if (!paired || paired.level !== normalizeTocLevel(entry.level))
|
|
294764
|
+
return;
|
|
294765
|
+
return paired.open === ownerOpen ? removeTocOwnerPropertiesFromTemplate(paired.open) : paired.open;
|
|
294766
|
+
});
|
|
294767
|
+
}
|
|
294768
|
+
function applyCachedTcEntrySeparator(entry, template) {
|
|
294769
|
+
if (!entry.isTcEntry || !template || entry.text.includes("\t"))
|
|
294770
|
+
return entry;
|
|
294771
|
+
const separatorIndex = template.findIndex((run) => run.separator === "tab");
|
|
294772
|
+
if (separatorIndex <= 0 || template.slice(separatorIndex + 1).some((run) => run.separator === "tab"))
|
|
294773
|
+
return entry;
|
|
294774
|
+
const cachedLabel = template.map((run) => run.separator === "tab" ? "\t" : run.text).join("");
|
|
294775
|
+
const compactLabel = normalizeCompactTocEntryText(cachedLabel).replace(/\.$/, "");
|
|
294776
|
+
if (compactLabel !== normalizeCompactTocEntryText(entry.text).replace(/\.$/, ""))
|
|
294777
|
+
return entry;
|
|
294778
|
+
const marker = normalizeTocEntryText(template.slice(0, separatorIndex).map((run) => run.text).join(""));
|
|
294779
|
+
const compactMarker = normalizeCompactTocEntryText(marker);
|
|
294780
|
+
if (!compactMarker || !normalizeCompactTocEntryText(entry.text).startsWith(compactMarker))
|
|
294781
|
+
return entry;
|
|
294782
|
+
let markerEnd = 0;
|
|
294783
|
+
let remainingMarkerLength = compactMarker.length;
|
|
294784
|
+
while (markerEnd < entry.text.length && remainingMarkerLength > 0) {
|
|
294785
|
+
if (!/\s/.test(entry.text[markerEnd]))
|
|
294786
|
+
remainingMarkerLength -= 1;
|
|
294787
|
+
markerEnd += 1;
|
|
294788
|
+
}
|
|
294789
|
+
const title = entry.text.slice(markerEnd).trim();
|
|
294790
|
+
if (!title)
|
|
294791
|
+
return entry;
|
|
294792
|
+
return {
|
|
294793
|
+
...entry,
|
|
294794
|
+
text: joinMarkerAndText(marker, title),
|
|
294795
|
+
marker,
|
|
294796
|
+
title,
|
|
294797
|
+
markerSeparator: "tab",
|
|
294798
|
+
cachedParagraphText: cachedLabel
|
|
294799
|
+
};
|
|
294800
|
+
}
|
|
294311
294801
|
function readUnanimousTocTextTemplate(matchingTemplates) {
|
|
294312
294802
|
const template = matchingTemplates?.[0];
|
|
294313
294803
|
if (!template)
|
|
@@ -294340,16 +294830,61 @@ function readUniformTocLevelRunProperties(siblingTemplates) {
|
|
|
294340
294830
|
return uniformRunProperties;
|
|
294341
294831
|
}
|
|
294342
294832
|
function buildTocContinuationParagraphOpen(entry, templates) {
|
|
294343
|
-
return resolveTocParagraphOpen(entry.level, templates, entry.text);
|
|
294833
|
+
return resolveTocParagraphOpen(entry.level, templates, entry.cachedParagraphText ?? entry.text);
|
|
294834
|
+
}
|
|
294835
|
+
function createTocPageTabFallback(context, instruction, fieldByteStart) {
|
|
294836
|
+
if (/\\n\b/.test(instruction) || parseQuotedSwitch(instruction, "p") != null)
|
|
294837
|
+
return (paragraphOpen) => paragraphOpen;
|
|
294838
|
+
let model;
|
|
294839
|
+
let position;
|
|
294840
|
+
return (paragraphOpen, entry) => {
|
|
294841
|
+
if (entry.markerSeparator === "tab" || entry.text.includes("\t"))
|
|
294842
|
+
return paragraphOpen;
|
|
294843
|
+
const properties = findDirectChild(paragraphOpen + "</w:p>", "pPr");
|
|
294844
|
+
if (!properties || findDirectChild(properties.xml, "tabs") || findDirectChild(properties.xml, "AlternateContent"))
|
|
294845
|
+
return paragraphOpen;
|
|
294846
|
+
model ?? (model = compileWordStyleModel({
|
|
294847
|
+
stylesXml: readStyleDefinitionsPartBytes(context),
|
|
294848
|
+
settingsXml: readPartBytes2(context, "/word/settings.xml"),
|
|
294849
|
+
numberingXml: readPartBytes2(context, "/word/numbering.xml")
|
|
294850
|
+
}));
|
|
294851
|
+
const style = findDirectChild(properties.xml, "pStyle");
|
|
294852
|
+
const styleId = style ? readXmlAttributeByLocalName(style.xml, "val") : undefined;
|
|
294853
|
+
if (model.resolveParagraph({ inlineProps: { styleId } }).tabStops?.length)
|
|
294854
|
+
return paragraphOpen;
|
|
294855
|
+
const container = parseContainerXml(properties.xml.replace(/\/>$/, `></${properties.qname}>`), "pPr");
|
|
294856
|
+
if (!container)
|
|
294857
|
+
return paragraphOpen;
|
|
294858
|
+
if (position == null) {
|
|
294859
|
+
const sections = readLiveSectionSignals(context);
|
|
294860
|
+
const section = sections.find((candidate2) => fieldByteStart < candidate2.sectPr.rawXmlByteEnd) ?? sections.at(-1);
|
|
294861
|
+
const setup = section?.pageSetup;
|
|
294862
|
+
const width = (setup?.pageSize.widthTwips ?? 12240) - (setup?.margins.leftTwips ?? 1440) - (setup?.margins.rightTwips ?? 1440) - (setup?.margins.gutterTwips ?? 0);
|
|
294863
|
+
const count = Math.max(1, section?.columns?.count ?? 1);
|
|
294864
|
+
const columnWidth = section?.columns?.columns[0]?.widthTwips ?? (width - (count - 1) * (section?.columns?.spaceTwips ?? 720)) / count;
|
|
294865
|
+
position = Math.max(0, Math.floor(columnWidth) - 10);
|
|
294866
|
+
}
|
|
294867
|
+
const prefix = container.prefix;
|
|
294868
|
+
const tabs2 = `<${prefix}:tabs><${prefix}:tab ${prefix}:val="right" ${prefix}:leader="dot" ${prefix}:pos="${position}"/></${prefix}:tabs>`;
|
|
294869
|
+
const children2 = setParagraphPropertyChild(parseTopLevelChildrenPreservingTrivia(container.inner), "tabs", tabs2);
|
|
294870
|
+
return paragraphOpen.replace(properties.xml, () => container.open + serializeTopLevelChildren(children2) + container.close);
|
|
294871
|
+
};
|
|
294344
294872
|
}
|
|
294345
|
-
function buildGeneratedTocParagraphOpen(level, seedParagraph, templates, entryText) {
|
|
294346
|
-
const template = resolveTocParagraphTemplate(level, templates, entryText);
|
|
294347
|
-
if (template)
|
|
294873
|
+
function buildGeneratedTocParagraphOpen(level, seedParagraph, templates, entryText, retainOwner = false, pairedTemplate) {
|
|
294874
|
+
const template = pairedTemplate ?? resolveTocParagraphTemplate(level, templates, entryText);
|
|
294875
|
+
if (template && !(retainOwner && seedParagraph))
|
|
294348
294876
|
return template;
|
|
294349
294877
|
const normalizedLevel = normalizeTocLevel(level);
|
|
294350
294878
|
if (!seedParagraph)
|
|
294351
294879
|
return `<w:p><w:pPr><w:pStyle w:val="TOC${normalizedLevel}"/></w:pPr>`;
|
|
294352
|
-
|
|
294880
|
+
const ownerOpenTag = readParagraphOpenTag(seedParagraph.rawXml);
|
|
294881
|
+
if (!retainOwner)
|
|
294882
|
+
return `${ownerOpenTag}<w:pPr><w:pStyle w:val="TOC${normalizedLevel}"/></w:pPr>`;
|
|
294883
|
+
const templateOpenEnd = template ? findXmlTagEnd4(template, 1) : -1;
|
|
294884
|
+
const properties = template ? inheritRunNamespaceDeclarations(template.slice(templateOpenEnd), template, templateOpenEnd, template.slice(0, templateOpenEnd)) : `<w:pPr><w:pStyle w:val="TOC${normalizedLevel}"/></w:pPr>`;
|
|
294885
|
+
const ownerPropertiesStart = skipXmlWhitespace(seedParagraph.rawXml, ownerOpenTag.length);
|
|
294886
|
+
const ownerProperties = matchLeadingElement(seedParagraph.rawXml.slice(ownerPropertiesStart), "pPr");
|
|
294887
|
+
return ownerOpenTag + preserveTocOwnerProperties(properties, ownerProperties);
|
|
294353
294888
|
}
|
|
294354
294889
|
function readParagraphOpenTag(paragraphXml) {
|
|
294355
294890
|
const match = /^<w:p\b([^>]*?)(?:\/>|>)/s.exec(paragraphXml);
|
|
@@ -294360,6 +294895,9 @@ function normalizeTocLevel(level) {
|
|
|
294360
294895
|
}
|
|
294361
294896
|
function buildTocEntryTextRuns(entry, runProperties, includeHyperlinks) {
|
|
294362
294897
|
const buildLabelRun = (text, template) => {
|
|
294898
|
+
if (entry.isTcEntry && text.includes("\t")) {
|
|
294899
|
+
return text.split("\t").map((part, index) => (index > 0 ? "<w:r><w:tab/></w:r>" : "") + (part ? buildLabelRun(part, template) : "")).join("");
|
|
294900
|
+
}
|
|
294363
294901
|
const sanitized = template ? sanitizeTocLabelRunProperties(template.runProperties, includeHyperlinks) : "";
|
|
294364
294902
|
if (!sanitized)
|
|
294365
294903
|
return buildTextRunXml(text);
|
|
@@ -294388,7 +294926,7 @@ function buildTocEntryTextRuns(entry, runProperties, includeHyperlinks) {
|
|
|
294388
294926
|
}
|
|
294389
294927
|
const cachedFirstRunText = runProperties?.[0]?.text;
|
|
294390
294928
|
const matchesCompleteMarkerBoundary = cachedFirstRunText === entry.marker || entry.markerSeparator === "space" && cachedFirstRunText?.startsWith(`${entry.marker} `);
|
|
294391
|
-
if (markerSeparatorIndex < 0 && matchesCompleteMarkerBoundary) {
|
|
294929
|
+
if (markerSeparatorIndex < 0 && entry.markerSeparator !== "tab" && matchesCompleteMarkerBoundary) {
|
|
294392
294930
|
return buildLabelRuns(entry.text, runProperties);
|
|
294393
294931
|
}
|
|
294394
294932
|
if (markerSeparatorIndex < 0 && entry.markerSeparator === "space" && runProperties?.[0]) {
|
|
@@ -294408,8 +294946,28 @@ function buildTocEntryTextRuns(entry, runProperties, includeHyperlinks) {
|
|
|
294408
294946
|
}
|
|
294409
294947
|
}
|
|
294410
294948
|
}
|
|
294411
|
-
|
|
294412
|
-
|
|
294949
|
+
let markerTemplates = markerSeparatorIndex >= 0 ? runProperties?.slice(0, markerSeparatorIndex) : runProperties?.slice(0, 1);
|
|
294950
|
+
let titleTemplates = markerSeparatorIndex >= 0 ? runProperties?.slice(markerSeparatorIndex + 1) : runProperties && runProperties.length > 1 ? runProperties.slice(1) : runProperties;
|
|
294951
|
+
if (markerSeparatorIndex < 0 && entry.markerSeparator === "tab" && runProperties) {
|
|
294952
|
+
const cachedLabel = runProperties.map((template) => template.text).join("");
|
|
294953
|
+
const markerEnd = entry.marker.length;
|
|
294954
|
+
const titleStart = markerEnd + /^\s*/.exec(cachedLabel.slice(markerEnd))[0].length;
|
|
294955
|
+
if (cachedLabel.startsWith(entry.marker) && cachedLabel.slice(titleStart) === entry.title) {
|
|
294956
|
+
markerTemplates = [];
|
|
294957
|
+
titleTemplates = [];
|
|
294958
|
+
let offset = 0;
|
|
294959
|
+
for (const template of runProperties) {
|
|
294960
|
+
const end = offset + template.text.length;
|
|
294961
|
+
if (offset < markerEnd) {
|
|
294962
|
+
markerTemplates.push({ ...template, text: template.text.slice(0, markerEnd - offset) });
|
|
294963
|
+
}
|
|
294964
|
+
if (end > titleStart) {
|
|
294965
|
+
titleTemplates.push({ ...template, text: template.text.slice(Math.max(0, titleStart - offset)) });
|
|
294966
|
+
}
|
|
294967
|
+
offset = end;
|
|
294968
|
+
}
|
|
294969
|
+
}
|
|
294970
|
+
}
|
|
294413
294971
|
const markerRuns = buildLabelRuns(entry.marker, markerTemplates);
|
|
294414
294972
|
if (entry.markerSeparator === "tab") {
|
|
294415
294973
|
return [...markerRuns, "<w:r><w:tab/></w:r>", ...buildLabelRuns(entry.title, titleTemplates)];
|
|
@@ -294426,9 +294984,42 @@ function sanitizeTocLabelRunProperties(runPropertiesXml, includeHyperlinks) {
|
|
|
294426
294984
|
return runPropertiesXml;
|
|
294427
294985
|
return runPropertiesXml.replace(/<(?:[\w.-]+:)?rStyle\b(?=[^>]*\b(?:[\w.-]+:)?val=(["'])Hyperlink\1)[^>]*(?:\/>|>\s*<\/(?:[\w.-]+:)?rStyle\s*>)/gi, "");
|
|
294428
294986
|
}
|
|
294429
|
-
function
|
|
294987
|
+
function tocTcFieldSourceKey(field) {
|
|
294988
|
+
return `tc:${field.storyId}:${field.stableFieldId}`;
|
|
294989
|
+
}
|
|
294990
|
+
function resolveTocTcBookmarkNames(bookmarks, paragraphs, fields) {
|
|
294991
|
+
if (fields.length === 0)
|
|
294992
|
+
return new Map;
|
|
294993
|
+
const sourceKeys = new Set(fields.map((field) => `${field.storyId}:${field.blockId}`));
|
|
294994
|
+
const sourceParagraphs = paragraphs.filter((paragraph2) => sourceKeys.has(`${paragraph2.storyId}:${paragraph2.blockId}`));
|
|
294995
|
+
const paragraphBookmarks = buildBodyTocBookmarkMap(bookmarks);
|
|
294996
|
+
const paragraphsByKey = new Map(sourceParagraphs.map((paragraph2) => [`${paragraph2.storyId}:${paragraph2.blockId}`, paragraph2]));
|
|
294997
|
+
const ranges = buildBodyTocBookmarkRangeMap(bookmarks, sourceParagraphs);
|
|
294998
|
+
const siblings = new Map;
|
|
294999
|
+
for (const field of fields) {
|
|
295000
|
+
const key2 = `${field.storyId}:${field.blockId}`;
|
|
295001
|
+
const group = siblings.get(key2) ?? [];
|
|
295002
|
+
group.push(field);
|
|
295003
|
+
siblings.set(key2, group);
|
|
295004
|
+
}
|
|
295005
|
+
const names = new Map;
|
|
295006
|
+
for (const field of fields) {
|
|
295007
|
+
const paragraphKey = `${field.storyId}:${field.blockId}`;
|
|
295008
|
+
const bookmarkRanges = ranges.get(paragraphKey);
|
|
295009
|
+
const paragraphBookmark = paragraphBookmarks.get(paragraphKey);
|
|
295010
|
+
const fallbackRange = bookmarkRanges?.find((bookmark) => bookmark.name === paragraphBookmark);
|
|
295011
|
+
const belongsToSibling = fallbackRange && siblings.get(paragraphKey)?.some((sibling) => sibling.stableFieldId !== field.stableFieldId && (fallbackRange.start >= sibling.descriptor.byteStart && fallbackRange.end <= sibling.descriptor.byteEnd || fallbackRange.start <= sibling.descriptor.byteStart && fallbackRange.end >= sibling.descriptor.byteEnd));
|
|
295012
|
+
const paragraph2 = paragraphsByKey.get(paragraphKey);
|
|
295013
|
+
const coversCrossParagraphStart = paragraph2 && fallbackRange && field.descriptor.byteEnd > paragraph2.byteEnd && fallbackRange.start <= field.descriptor.byteStart && fallbackRange.end > field.descriptor.byteStart;
|
|
295014
|
+
const name = bookmarkRanges?.find((bookmark) => bookmark.start >= field.descriptor.byteStart && bookmark.end <= field.descriptor.byteEnd)?.name ?? bookmarkRanges?.find((bookmark) => bookmark.start <= field.descriptor.byteStart && bookmark.end >= field.descriptor.byteEnd)?.name ?? (belongsToSibling && !coversCrossParagraphStart ? undefined : paragraphBookmark);
|
|
295015
|
+
if (name)
|
|
295016
|
+
names.set(tocTcFieldSourceKey(field), name);
|
|
295017
|
+
}
|
|
295018
|
+
return names;
|
|
295019
|
+
}
|
|
295020
|
+
function buildBodyTocBookmarkMap(entries) {
|
|
294430
295021
|
const bookmarks = new Map;
|
|
294431
|
-
for (const entry of
|
|
295022
|
+
for (const entry of entries) {
|
|
294432
295023
|
if (!entry.name.startsWith("_Toc"))
|
|
294433
295024
|
continue;
|
|
294434
295025
|
const key2 = `${entry.storyId}:${entry.blockId}`;
|
|
@@ -294437,6 +295028,43 @@ function buildBodyTocBookmarkMap(context) {
|
|
|
294437
295028
|
}
|
|
294438
295029
|
return bookmarks;
|
|
294439
295030
|
}
|
|
295031
|
+
function buildBodyTocBookmarkRangeMap(bookmarks, paragraphs) {
|
|
295032
|
+
if (paragraphs.length === 0)
|
|
295033
|
+
return new Map;
|
|
295034
|
+
const paragraphsByKey = new Map(paragraphs.map((paragraph2) => [`${paragraph2.storyId}:${paragraph2.blockId}`, paragraph2]));
|
|
295035
|
+
const scans = new Map;
|
|
295036
|
+
const ranges = new Map;
|
|
295037
|
+
for (const bookmark of bookmarks) {
|
|
295038
|
+
if (!bookmark.name.startsWith("_Toc"))
|
|
295039
|
+
continue;
|
|
295040
|
+
const key2 = `${bookmark.storyId}:${bookmark.blockId}`;
|
|
295041
|
+
const paragraph2 = paragraphsByKey.get(key2);
|
|
295042
|
+
if (!paragraph2)
|
|
295043
|
+
continue;
|
|
295044
|
+
if (!scans.has(key2))
|
|
295045
|
+
scans.set(key2, readBookmarkMarkerSpans(paragraph2.rawXml, paragraph2.namespaceBindings));
|
|
295046
|
+
const scan = scans.get(key2);
|
|
295047
|
+
if (!scan || scan.invalidBookmarkIds.has(bookmark.bookmarkId))
|
|
295048
|
+
continue;
|
|
295049
|
+
const endMarker = scan.markers.find((marker) => marker.kind === "end" && marker.bookmarkId === bookmark.bookmarkId);
|
|
295050
|
+
if (!endMarker)
|
|
295051
|
+
continue;
|
|
295052
|
+
const range = {
|
|
295053
|
+
name: bookmark.name,
|
|
295054
|
+
start: bookmark.markerByteStart,
|
|
295055
|
+
end: paragraph2.byteStart + encodeXml(paragraph2.rawXml.slice(0, endMarker.start)).length
|
|
295056
|
+
};
|
|
295057
|
+
if (range.end < range.start)
|
|
295058
|
+
continue;
|
|
295059
|
+
const paragraphRanges = ranges.get(key2) ?? [];
|
|
295060
|
+
paragraphRanges.push(range);
|
|
295061
|
+
ranges.set(key2, paragraphRanges);
|
|
295062
|
+
}
|
|
295063
|
+
for (const paragraphRanges of ranges.values()) {
|
|
295064
|
+
paragraphRanges.sort((left, right) => left.end - left.start - (right.end - right.start));
|
|
295065
|
+
}
|
|
295066
|
+
return ranges;
|
|
295067
|
+
}
|
|
294440
295068
|
function buildTocPageReferenceRunsXml(bookmarkName, page, separator) {
|
|
294441
295069
|
return buildTocPageSeparatorRunsXml(separator) + buildWebHiddenFieldCharRunXml("begin") + buildWebHiddenInstructionRunXml(` PAGEREF ${bookmarkName} \\h `) + buildWebHiddenEmptyRunXml() + buildWebHiddenFieldCharRunXml("separate") + buildWebHiddenTextRunXml(page) + buildWebHiddenFieldCharRunXml("end");
|
|
294442
295070
|
}
|
|
@@ -294466,7 +295094,7 @@ function buildWebHiddenEmptyRunXml() {
|
|
|
294466
295094
|
function emptyTocParagraphTemplates() {
|
|
294467
295095
|
return {
|
|
294468
295096
|
byLevel: new Map,
|
|
294469
|
-
|
|
295097
|
+
byLevelAndText: new Map
|
|
294470
295098
|
};
|
|
294471
295099
|
}
|
|
294472
295100
|
function buildTocParagraphTemplatesFromParagraphXml(xml) {
|
|
@@ -294480,18 +295108,20 @@ function buildTocParagraphTemplatesFromParagraphXml(xml) {
|
|
|
294480
295108
|
if (!templates.byLevel.has(level))
|
|
294481
295109
|
templates.byLevel.set(level, open2);
|
|
294482
295110
|
const entryText = readTocParagraphTemplateText(paragraphXml);
|
|
294483
|
-
|
|
294484
|
-
|
|
295111
|
+
const key2 = `${level}:${entryText}`;
|
|
295112
|
+
if (entryText && !templates.byLevelAndText.has(key2))
|
|
295113
|
+
templates.byLevelAndText.set(key2, open2);
|
|
294485
295114
|
}
|
|
294486
295115
|
return templates;
|
|
294487
295116
|
}
|
|
294488
295117
|
function buildTocParagraphTemplateOpen(paragraphXml) {
|
|
294489
295118
|
const openTag = /^<w:p\b[^>]*>/s.exec(paragraphXml)?.[0] ?? "";
|
|
294490
|
-
const pPrXml = openTag ? matchLeadingElement(paragraphXml.slice(openTag.length), "pPr") : "";
|
|
295119
|
+
const pPrXml = openTag ? matchLeadingElement(paragraphXml.slice(skipXmlWhitespace(paragraphXml, openTag.length)), "pPr") : "";
|
|
294491
295120
|
return `${readParagraphOpenTag(paragraphXml)}${pPrXml}`;
|
|
294492
295121
|
}
|
|
294493
295122
|
function readTocParagraphLevel(paragraphXml) {
|
|
294494
|
-
const
|
|
295123
|
+
const propertiesXml = matchLeadingElement(paragraphXml, "pPr") || findDirectChild(paragraphXml, "pPr")?.xml;
|
|
295124
|
+
const paragraphStyle = propertiesXml ? findDirectChild(propertiesXml, "pStyle") : undefined;
|
|
294495
295125
|
const style = paragraphStyle ? /^TOC(\d+)$/.exec(readXmlAttributeByLocalName(paragraphStyle.xml, "val") ?? "")?.[1] : undefined;
|
|
294496
295126
|
if (!style)
|
|
294497
295127
|
return null;
|
|
@@ -294514,13 +295144,14 @@ function resolveTocParagraphOpen(level, templates, entryText) {
|
|
|
294514
295144
|
return `<w:p><w:pPr><w:pStyle w:val="TOC${normalizedLevel}"/></w:pPr>`;
|
|
294515
295145
|
}
|
|
294516
295146
|
function resolveTocParagraphTemplate(level, templates, entryText) {
|
|
295147
|
+
const normalizedLevel = normalizeTocLevel(level);
|
|
294517
295148
|
const normalizedText = entryText ? normalizeTocEntryText(entryText) : "";
|
|
294518
295149
|
if (normalizedText.length > 0) {
|
|
294519
|
-
const
|
|
294520
|
-
if (
|
|
294521
|
-
return
|
|
295150
|
+
const byLevelAndText = templates.byLevelAndText.get(`${normalizedLevel}:${normalizedText}`);
|
|
295151
|
+
if (byLevelAndText)
|
|
295152
|
+
return byLevelAndText;
|
|
294522
295153
|
}
|
|
294523
|
-
return templates.byLevel.get(
|
|
295154
|
+
return templates.byLevel.get(normalizedLevel);
|
|
294524
295155
|
}
|
|
294525
295156
|
function readPreservedTocPagesByText(context, currentField, paragraphs = readBodyParagraphs(context, { includeListState: false })) {
|
|
294526
295157
|
const preserved = new Map;
|
|
@@ -295210,7 +295841,7 @@ function joinMarkerAndText(marker, text) {
|
|
|
295210
295841
|
return text.length > 0 ? `${marker} ${text}` : marker;
|
|
295211
295842
|
}
|
|
295212
295843
|
function parseTocEntryInstruction(instruction) {
|
|
295213
|
-
const tableIdentifier =
|
|
295844
|
+
const tableIdentifier = parseTocFieldIdentifier(instruction) ?? parseQuotedSwitch(instruction, "t");
|
|
295214
295845
|
return {
|
|
295215
295846
|
text: parseFirstQuotedValue(instruction) ?? "",
|
|
295216
295847
|
level: Number(parseNumericSwitchValue(instruction, "l") ?? "1"),
|
|
@@ -295319,6 +295950,10 @@ var init_runtime2 = __esm(() => {
|
|
|
295319
295950
|
init_registry3();
|
|
295320
295951
|
init_stories();
|
|
295321
295952
|
init_section_xml();
|
|
295953
|
+
init_src6();
|
|
295954
|
+
init_part();
|
|
295955
|
+
init_common();
|
|
295956
|
+
init_paragraph_property_order();
|
|
295322
295957
|
init_scalar_evaluation();
|
|
295323
295958
|
init_bookmark_insertion();
|
|
295324
295959
|
init_xml();
|
|
@@ -304892,14 +305527,14 @@ var init_formatting = __esm(() => {
|
|
|
304892
305527
|
];
|
|
304893
305528
|
PROJECTION_FONT_TABLE_PART_INDEX = STYLE_SIDECAR_PART_URIS.length;
|
|
304894
305529
|
});
|
|
304895
|
-
//
|
|
305530
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/unit-conversions.ts
|
|
304896
305531
|
var TWIPS_PER_INCH = 1440, PIXELS_PER_INCH = 96, TWIPS_PER_POINT2 = 20, POINTS_PER_TWIP, TWIPS_PER_PIXEL, PIXELS_PER_TWIP;
|
|
304897
305532
|
var init_unit_conversions = __esm(() => {
|
|
304898
305533
|
POINTS_PER_TWIP = 1 / TWIPS_PER_POINT2;
|
|
304899
305534
|
TWIPS_PER_PIXEL = Math.round(TWIPS_PER_INCH / PIXELS_PER_INCH);
|
|
304900
305535
|
PIXELS_PER_TWIP = 1 / TWIPS_PER_PIXEL;
|
|
304901
305536
|
});
|
|
304902
|
-
//
|
|
305537
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/numbering-manager.ts
|
|
304903
305538
|
function persistentTrieHash(key2) {
|
|
304904
305539
|
let hash2 = 2166136261;
|
|
304905
305540
|
for (let index = 0;index < key2.length; index += 1) {
|
|
@@ -305527,7 +306162,7 @@ var init_numbering_manager = __esm(() => {
|
|
|
305527
306162
|
});
|
|
305528
306163
|
});
|
|
305529
306164
|
|
|
305530
|
-
//
|
|
306165
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+common@file+..+public+shared+common/node_modules/@superdoc/common/list-numbering/index.ts
|
|
305531
306166
|
var handleDecimal = (path6, lvlText) => generateNumbering(path6, lvlText, numberToStringFormatter), handleRoman = (path6, lvlText) => generateNumbering(path6, lvlText, intToRoman), handleLowerRoman = (path6, lvlText) => {
|
|
305532
306167
|
const result = handleRoman(path6, lvlText);
|
|
305533
306168
|
return result ? result.toLowerCase() : null;
|
|
@@ -305829,7 +306464,7 @@ var init_list_numbering = __esm(() => {
|
|
|
305829
306464
|
normalizeChars = new Set(["", "", "○", "o", "■", "□"]);
|
|
305830
306465
|
});
|
|
305831
306466
|
|
|
305832
|
-
//
|
|
306467
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/list-marker.ts
|
|
305833
306468
|
function computeWordListMarker(input) {
|
|
305834
306469
|
const { definition, manager, paragraphOrdinal } = input;
|
|
305835
306470
|
if (definition.ancestorStartSettings) {
|
|
@@ -305906,7 +306541,7 @@ var init_list_marker = __esm(() => {
|
|
|
305906
306541
|
init_list_numbering();
|
|
305907
306542
|
});
|
|
305908
306543
|
|
|
305909
|
-
//
|
|
306544
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/review-aware-numbering.ts
|
|
305910
306545
|
function createReviewAwareWordNumberingSequence(options = {}) {
|
|
305911
306546
|
const stateMode = options.stateMode ?? "snapshot";
|
|
305912
306547
|
let live = createManager(stateMode);
|
|
@@ -306003,7 +306638,7 @@ var init_review_aware_numbering = __esm(() => {
|
|
|
306003
306638
|
init_numbering_manager();
|
|
306004
306639
|
});
|
|
306005
306640
|
|
|
306006
|
-
//
|
|
306641
|
+
// ../../../v2/node_modules/.pnpm/@superdoc+word-layout@file+..+public+packages+word-layout/node_modules/@superdoc/word-layout/src/index.ts
|
|
306007
306642
|
var init_src7 = __esm(() => {
|
|
306008
306643
|
init_unit_conversions();
|
|
306009
306644
|
init_unit_conversions();
|
|
@@ -308626,7 +309261,7 @@ function readRunOpenTagAndProperties(xml, runStart) {
|
|
|
308626
309261
|
return { runOpenTag, runProperties: propertiesMatch ? propertiesMatch[1] : "" };
|
|
308627
309262
|
}
|
|
308628
309263
|
|
|
308629
|
-
//
|
|
309264
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/unicode.js
|
|
308630
309265
|
function isSurrogate(cp) {
|
|
308631
309266
|
return cp >= 55296 && cp <= 57343;
|
|
308632
309267
|
}
|
|
@@ -308718,7 +309353,7 @@ var init_unicode = __esm(() => {
|
|
|
308718
309353
|
};
|
|
308719
309354
|
});
|
|
308720
309355
|
|
|
308721
|
-
//
|
|
309356
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/error-codes.js
|
|
308722
309357
|
var ERR;
|
|
308723
309358
|
var init_error_codes = __esm(() => {
|
|
308724
309359
|
(function(ERR2) {
|
|
@@ -308785,7 +309420,7 @@ var init_error_codes = __esm(() => {
|
|
|
308785
309420
|
})(ERR || (ERR = {}));
|
|
308786
309421
|
});
|
|
308787
309422
|
|
|
308788
|
-
//
|
|
309423
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/preprocessor.js
|
|
308789
309424
|
class Preprocessor {
|
|
308790
309425
|
constructor(handler) {
|
|
308791
309426
|
this.handler = handler;
|
|
@@ -308958,7 +309593,7 @@ var init_preprocessor = __esm(() => {
|
|
|
308958
309593
|
DEFAULT_BUFFER_WATERLINE = 1 << 16;
|
|
308959
309594
|
});
|
|
308960
309595
|
|
|
308961
|
-
//
|
|
309596
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/token.js
|
|
308962
309597
|
function getTokenAttr(token, attrName) {
|
|
308963
309598
|
for (let i2 = token.attrs.length - 1;i2 >= 0; i2--) {
|
|
308964
309599
|
if (token.attrs[i2].name === attrName) {
|
|
@@ -308982,7 +309617,7 @@ var init_token = __esm(() => {
|
|
|
308982
309617
|
})(TokenType || (TokenType = {}));
|
|
308983
309618
|
});
|
|
308984
309619
|
|
|
308985
|
-
//
|
|
309620
|
+
// ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode-codepoint.js
|
|
308986
309621
|
function replaceCodePoint(codePoint) {
|
|
308987
309622
|
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
|
|
308988
309623
|
return 65533;
|
|
@@ -309023,7 +309658,7 @@ var init_decode_codepoint = __esm(() => {
|
|
|
309023
309658
|
]);
|
|
309024
309659
|
});
|
|
309025
309660
|
|
|
309026
|
-
//
|
|
309661
|
+
// ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/decode-shared.js
|
|
309027
309662
|
function decodeBase64(input) {
|
|
309028
309663
|
const binary = atob(input);
|
|
309029
309664
|
const evenLength = binary.length & ~1;
|
|
@@ -309036,13 +309671,13 @@ function decodeBase64(input) {
|
|
|
309036
309671
|
return out;
|
|
309037
309672
|
}
|
|
309038
309673
|
|
|
309039
|
-
//
|
|
309674
|
+
// ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-html.js
|
|
309040
309675
|
var htmlDecodeTree;
|
|
309041
309676
|
var init_decode_data_html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y9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");
|
|
309043
309678
|
});
|
|
309044
309679
|
|
|
309045
|
-
//
|
|
309680
|
+
// ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/bin-trie-flags.js
|
|
309046
309681
|
var BinTrieFlags;
|
|
309047
309682
|
var init_bin_trie_flags = __esm(() => {
|
|
309048
309683
|
(function(BinTrieFlags2) {
|
|
@@ -309053,7 +309688,7 @@ var init_bin_trie_flags = __esm(() => {
|
|
|
309053
309688
|
})(BinTrieFlags || (BinTrieFlags = {}));
|
|
309054
309689
|
});
|
|
309055
309690
|
|
|
309056
|
-
//
|
|
309691
|
+
// ../../../v2/node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode.js
|
|
309057
309692
|
function isNumber(code) {
|
|
309058
309693
|
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
|
|
309059
309694
|
}
|
|
@@ -309335,7 +309970,7 @@ var init_decode = __esm(() => {
|
|
|
309335
309970
|
})(DecodingMode || (DecodingMode = {}));
|
|
309336
309971
|
});
|
|
309337
309972
|
|
|
309338
|
-
//
|
|
309973
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/html.js
|
|
309339
309974
|
function getTagID(tagName) {
|
|
309340
309975
|
var _a3;
|
|
309341
309976
|
return (_a3 = TAG_NAME_TO_ID.get(tagName)) !== null && _a3 !== undefined ? _a3 : TAG_ID.UNKNOWN;
|
|
@@ -309844,7 +310479,7 @@ var init_html = __esm(() => {
|
|
|
309844
310479
|
]);
|
|
309845
310480
|
});
|
|
309846
310481
|
|
|
309847
|
-
//
|
|
310482
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/index.js
|
|
309848
310483
|
function isAsciiDigit(cp) {
|
|
309849
310484
|
return cp >= CODE_POINTS.DIGIT_0 && cp <= CODE_POINTS.DIGIT_9;
|
|
309850
310485
|
}
|
|
@@ -312301,7 +312936,7 @@ var init_tokenizer = __esm(() => {
|
|
|
312301
312936
|
};
|
|
312302
312937
|
});
|
|
312303
312938
|
|
|
312304
|
-
//
|
|
312939
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/open-element-stack.js
|
|
312305
312940
|
class OpenElementStack {
|
|
312306
312941
|
get currentTmplContentOrNode() {
|
|
312307
312942
|
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
|
|
@@ -312616,7 +313251,7 @@ var init_open_element_stack = __esm(() => {
|
|
|
312616
313251
|
TABLE_CELLS = new Set([TAG_ID.TD, TAG_ID.TH]);
|
|
312617
313252
|
});
|
|
312618
313253
|
|
|
312619
|
-
//
|
|
313254
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/formatting-element-list.js
|
|
312620
313255
|
class FormattingElementList {
|
|
312621
313256
|
constructor(treeAdapter) {
|
|
312622
313257
|
this.treeAdapter = treeAdapter;
|
|
@@ -312712,7 +313347,7 @@ var init_formatting_element_list = __esm(() => {
|
|
|
312712
313347
|
MARKER = { type: EntryType.Marker };
|
|
312713
313348
|
});
|
|
312714
313349
|
|
|
312715
|
-
//
|
|
313350
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tree-adapters/default.js
|
|
312716
313351
|
var defaultTreeAdapter;
|
|
312717
313352
|
var init_default2 = __esm(() => {
|
|
312718
313353
|
init_html();
|
|
@@ -312882,7 +313517,7 @@ var init_default2 = __esm(() => {
|
|
|
312882
313517
|
};
|
|
312883
313518
|
});
|
|
312884
313519
|
|
|
312885
|
-
//
|
|
313520
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/doctype.js
|
|
312886
313521
|
function hasPrefix(publicId, prefixes) {
|
|
312887
313522
|
return prefixes.some((prefix) => publicId.startsWith(prefix));
|
|
312888
313523
|
}
|
|
@@ -312992,7 +313627,7 @@ var init_doctype = __esm(() => {
|
|
|
312992
313627
|
];
|
|
312993
313628
|
});
|
|
312994
313629
|
|
|
312995
|
-
//
|
|
313630
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/foreign-content.js
|
|
312996
313631
|
function causesExit(startTagToken) {
|
|
312997
313632
|
const tn = startTagToken.tagID;
|
|
312998
313633
|
const isFontWithAttrs = tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS2.COLOR || name === ATTRS2.SIZE || name === ATTRS2.FACE);
|
|
@@ -313214,7 +313849,7 @@ var init_foreign_content = __esm(() => {
|
|
|
313214
313849
|
]);
|
|
313215
313850
|
});
|
|
313216
313851
|
|
|
313217
|
-
//
|
|
313852
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/index.js
|
|
313218
313853
|
class Parser {
|
|
313219
313854
|
constructor(options, document3, fragmentContext = null, scriptHandler = null) {
|
|
313220
313855
|
this.fragmentContext = fragmentContext;
|
|
@@ -316171,7 +316806,7 @@ var init_parser = __esm(() => {
|
|
|
316171
316806
|
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]);
|
|
316172
316807
|
});
|
|
316173
316808
|
|
|
316174
|
-
//
|
|
316809
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/serializer/index.js
|
|
316175
316810
|
var VOID_ELEMENTS;
|
|
316176
316811
|
var init_serializer = __esm(() => {
|
|
316177
316812
|
init_html();
|
|
@@ -316198,7 +316833,7 @@ var init_serializer = __esm(() => {
|
|
|
316198
316833
|
]);
|
|
316199
316834
|
});
|
|
316200
316835
|
|
|
316201
|
-
//
|
|
316836
|
+
// ../../../v2/node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/index.js
|
|
316202
316837
|
function parseFragment(fragmentContext, html, options) {
|
|
316203
316838
|
if (typeof fragmentContext === "string") {
|
|
316204
316839
|
options = html;
|
|
@@ -318625,10 +319260,10 @@ var init_html2 = __esm(() => {
|
|
|
318625
319260
|
init_converter();
|
|
318626
319261
|
});
|
|
318627
319262
|
|
|
318628
|
-
//
|
|
319263
|
+
// ../../../v2/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.mjs
|
|
318629
319264
|
var init_dist4 = () => {};
|
|
318630
319265
|
|
|
318631
|
-
//
|
|
319266
|
+
// ../../../v2/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/development.js
|
|
318632
319267
|
function ok2(value2, message) {
|
|
318633
319268
|
assert2(Boolean(value2), false, true, "ok", "Expected value to be truthy", message);
|
|
318634
319269
|
}
|
|
@@ -318657,7 +319292,7 @@ var init_development = __esm(() => {
|
|
|
318657
319292
|
};
|
|
318658
319293
|
});
|
|
318659
319294
|
|
|
318660
|
-
//
|
|
319295
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
|
|
318661
319296
|
function toString(value2, options) {
|
|
318662
319297
|
const settings = options || emptyOptions;
|
|
318663
319298
|
const includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true;
|
|
@@ -318697,12 +319332,12 @@ var init_lib = __esm(() => {
|
|
|
318697
319332
|
emptyOptions = {};
|
|
318698
319333
|
});
|
|
318699
319334
|
|
|
318700
|
-
//
|
|
319335
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/index.js
|
|
318701
319336
|
var init_mdast_util_to_string = __esm(() => {
|
|
318702
319337
|
init_lib();
|
|
318703
319338
|
});
|
|
318704
319339
|
|
|
318705
|
-
//
|
|
319340
|
+
// ../../../v2/node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.js
|
|
318706
319341
|
var characterEntities;
|
|
318707
319342
|
var init_character_entities = __esm(() => {
|
|
318708
319343
|
characterEntities = {
|
|
@@ -320835,7 +321470,7 @@ var init_character_entities = __esm(() => {
|
|
|
320835
321470
|
};
|
|
320836
321471
|
});
|
|
320837
321472
|
|
|
320838
|
-
//
|
|
321473
|
+
// ../../../v2/node_modules/.pnpm/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.js
|
|
320839
321474
|
function decodeNamedCharacterReference(value2) {
|
|
320840
321475
|
return own.call(characterEntities, value2) ? characterEntities[value2] : false;
|
|
320841
321476
|
}
|
|
@@ -320845,7 +321480,7 @@ var init_decode_named_character_reference = __esm(() => {
|
|
|
320845
321480
|
own = {}.hasOwnProperty;
|
|
320846
321481
|
});
|
|
320847
321482
|
|
|
320848
|
-
//
|
|
321483
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/codes.js
|
|
320849
321484
|
var codes;
|
|
320850
321485
|
var init_codes = __esm(() => {
|
|
320851
321486
|
codes = {
|
|
@@ -320988,7 +321623,7 @@ var init_codes = __esm(() => {
|
|
|
320988
321623
|
};
|
|
320989
321624
|
});
|
|
320990
321625
|
|
|
320991
|
-
//
|
|
321626
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/constants.js
|
|
320992
321627
|
var constants2;
|
|
320993
321628
|
var init_constants = __esm(() => {
|
|
320994
321629
|
constants2 = {
|
|
@@ -321029,7 +321664,7 @@ var init_constants = __esm(() => {
|
|
|
321029
321664
|
};
|
|
321030
321665
|
});
|
|
321031
321666
|
|
|
321032
|
-
//
|
|
321667
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/types.js
|
|
321033
321668
|
var types9;
|
|
321034
321669
|
var init_types9 = __esm(() => {
|
|
321035
321670
|
types9 = {
|
|
@@ -321139,7 +321774,7 @@ var init_types9 = __esm(() => {
|
|
|
321139
321774
|
};
|
|
321140
321775
|
});
|
|
321141
321776
|
|
|
321142
|
-
//
|
|
321777
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/values.js
|
|
321143
321778
|
var values;
|
|
321144
321779
|
var init_values = __esm(() => {
|
|
321145
321780
|
values = {
|
|
@@ -321246,7 +321881,7 @@ var init_values = __esm(() => {
|
|
|
321246
321881
|
};
|
|
321247
321882
|
});
|
|
321248
321883
|
|
|
321249
|
-
//
|
|
321884
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-symbol@2.0.1/node_modules/micromark-util-symbol/lib/default.js
|
|
321250
321885
|
var init_default3 = __esm(() => {
|
|
321251
321886
|
init_codes();
|
|
321252
321887
|
init_constants();
|
|
@@ -321254,7 +321889,7 @@ var init_default3 = __esm(() => {
|
|
|
321254
321889
|
init_values();
|
|
321255
321890
|
});
|
|
321256
321891
|
|
|
321257
|
-
//
|
|
321892
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/dev/index.js
|
|
321258
321893
|
function splice(list, start, remove, items) {
|
|
321259
321894
|
const end = list.length;
|
|
321260
321895
|
let chunkStart = 0;
|
|
@@ -321292,7 +321927,7 @@ var init_dev = __esm(() => {
|
|
|
321292
321927
|
init_default3();
|
|
321293
321928
|
});
|
|
321294
321929
|
|
|
321295
|
-
//
|
|
321930
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
|
|
321296
321931
|
function combineExtensions(extensions) {
|
|
321297
321932
|
const all2 = {};
|
|
321298
321933
|
let index = -1;
|
|
@@ -321332,7 +321967,7 @@ var init_micromark_util_combine_extensions = __esm(() => {
|
|
|
321332
321967
|
hasOwnProperty = {}.hasOwnProperty;
|
|
321333
321968
|
});
|
|
321334
321969
|
|
|
321335
|
-
//
|
|
321970
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js
|
|
321336
321971
|
function decodeNumericCharacterReference(value2, base3) {
|
|
321337
321972
|
const code = Number.parseInt(value2, base3);
|
|
321338
321973
|
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) {
|
|
@@ -321344,7 +321979,7 @@ var init_dev2 = __esm(() => {
|
|
|
321344
321979
|
init_default3();
|
|
321345
321980
|
});
|
|
321346
321981
|
|
|
321347
|
-
//
|
|
321982
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/dev/index.js
|
|
321348
321983
|
function normalizeIdentifier(value2) {
|
|
321349
321984
|
return value2.replace(/[\t\n\r ]+/g, values.space).replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
321350
321985
|
}
|
|
@@ -321352,7 +321987,7 @@ var init_dev3 = __esm(() => {
|
|
|
321352
321987
|
init_default3();
|
|
321353
321988
|
});
|
|
321354
321989
|
|
|
321355
|
-
//
|
|
321990
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/dev/index.js
|
|
321356
321991
|
function asciiControl(code) {
|
|
321357
321992
|
return code !== null && (code < codes.space || code === codes.del);
|
|
321358
321993
|
}
|
|
@@ -321384,7 +322019,7 @@ var init_dev4 = __esm(() => {
|
|
|
321384
322019
|
unicodeWhitespace = regexCheck(/\s/);
|
|
321385
322020
|
});
|
|
321386
322021
|
|
|
321387
|
-
//
|
|
322022
|
+
// ../../../v2/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/dev/index.js
|
|
321388
322023
|
function factorySpace(effects2, ok3, type, max2) {
|
|
321389
322024
|
const limit = max2 ? max2 - 1 : Number.POSITIVE_INFINITY;
|
|
321390
322025
|
let size = 0;
|
|
@@ -321409,7 +322044,7 @@ var init_dev5 = __esm(() => {
|
|
|
321409
322044
|
init_dev4();
|
|
321410
322045
|
});
|
|
321411
322046
|
|
|
321412
|
-
//
|
|
322047
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/content.js
|
|
321413
322048
|
function initializeContent(effects2) {
|
|
321414
322049
|
const contentStart = effects2.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
|
|
321415
322050
|
let previous;
|
|
@@ -321466,7 +322101,7 @@ var init_content = __esm(() => {
|
|
|
321466
322101
|
content = { tokenize: initializeContent };
|
|
321467
322102
|
});
|
|
321468
322103
|
|
|
321469
|
-
//
|
|
322104
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/document.js
|
|
321470
322105
|
function initializeDocument(effects2) {
|
|
321471
322106
|
const self = this;
|
|
321472
322107
|
const stack = [];
|
|
@@ -321658,7 +322293,7 @@ var init_document2 = __esm(() => {
|
|
|
321658
322293
|
containerConstruct = { tokenize: tokenizeContainer };
|
|
321659
322294
|
});
|
|
321660
322295
|
|
|
321661
|
-
//
|
|
322296
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/dev/index.js
|
|
321662
322297
|
function classifyCharacter(code) {
|
|
321663
322298
|
if (code === codes.eof || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {
|
|
321664
322299
|
return constants2.characterGroupWhitespace;
|
|
@@ -321672,7 +322307,7 @@ var init_dev6 = __esm(() => {
|
|
|
321672
322307
|
init_default3();
|
|
321673
322308
|
});
|
|
321674
322309
|
|
|
321675
|
-
//
|
|
322310
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
|
|
321676
322311
|
function resolveAll(constructs2, events, context) {
|
|
321677
322312
|
const called = [];
|
|
321678
322313
|
let index = -1;
|
|
@@ -321686,7 +322321,7 @@ function resolveAll(constructs2, events, context) {
|
|
|
321686
322321
|
return events;
|
|
321687
322322
|
}
|
|
321688
322323
|
|
|
321689
|
-
//
|
|
322324
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/attention.js
|
|
321690
322325
|
function resolveAllAttention(events, context) {
|
|
321691
322326
|
let index = -1;
|
|
321692
322327
|
let open2;
|
|
@@ -321822,7 +322457,7 @@ var init_attention = __esm(() => {
|
|
|
321822
322457
|
};
|
|
321823
322458
|
});
|
|
321824
322459
|
|
|
321825
|
-
//
|
|
322460
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/autolink.js
|
|
321826
322461
|
function tokenizeAutolink(effects2, ok3, nok) {
|
|
321827
322462
|
let size = 0;
|
|
321828
322463
|
return start;
|
|
@@ -321927,7 +322562,7 @@ var init_autolink = __esm(() => {
|
|
|
321927
322562
|
autolink = { name: "autolink", tokenize: tokenizeAutolink };
|
|
321928
322563
|
});
|
|
321929
322564
|
|
|
321930
|
-
//
|
|
322565
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/blank-line.js
|
|
321931
322566
|
function tokenizeBlankLine(effects2, ok3, nok) {
|
|
321932
322567
|
return start;
|
|
321933
322568
|
function start(code) {
|
|
@@ -321945,7 +322580,7 @@ var init_blank_line = __esm(() => {
|
|
|
321945
322580
|
blankLine = { partial: true, tokenize: tokenizeBlankLine };
|
|
321946
322581
|
});
|
|
321947
322582
|
|
|
321948
|
-
//
|
|
322583
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/block-quote.js
|
|
321949
322584
|
function tokenizeBlockQuoteStart(effects2, ok3, nok) {
|
|
321950
322585
|
const self = this;
|
|
321951
322586
|
return start;
|
|
@@ -322008,7 +322643,7 @@ var init_block_quote = __esm(() => {
|
|
|
322008
322643
|
};
|
|
322009
322644
|
});
|
|
322010
322645
|
|
|
322011
|
-
//
|
|
322646
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/character-escape.js
|
|
322012
322647
|
function tokenizeCharacterEscape(effects2, ok3, nok) {
|
|
322013
322648
|
return start;
|
|
322014
322649
|
function start(code) {
|
|
@@ -322041,7 +322676,7 @@ var init_character_escape = __esm(() => {
|
|
|
322041
322676
|
};
|
|
322042
322677
|
});
|
|
322043
322678
|
|
|
322044
|
-
//
|
|
322679
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/character-reference.js
|
|
322045
322680
|
function tokenizeCharacterReference(effects2, ok3, nok) {
|
|
322046
322681
|
const self = this;
|
|
322047
322682
|
let size = 0;
|
|
@@ -322114,7 +322749,7 @@ var init_character_reference = __esm(() => {
|
|
|
322114
322749
|
};
|
|
322115
322750
|
});
|
|
322116
322751
|
|
|
322117
|
-
//
|
|
322752
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js
|
|
322118
322753
|
function tokenizeCodeFenced(effects2, ok3, nok) {
|
|
322119
322754
|
const self = this;
|
|
322120
322755
|
const closeStart = { partial: true, tokenize: tokenizeCloseStart };
|
|
@@ -322303,7 +322938,7 @@ var init_code_fenced = __esm(() => {
|
|
|
322303
322938
|
};
|
|
322304
322939
|
});
|
|
322305
322940
|
|
|
322306
|
-
//
|
|
322941
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-indented.js
|
|
322307
322942
|
function tokenizeCodeIndented(effects2, ok3, nok) {
|
|
322308
322943
|
const self = this;
|
|
322309
322944
|
return start;
|
|
@@ -322372,7 +323007,7 @@ var init_code_indented = __esm(() => {
|
|
|
322372
323007
|
furtherStart = { partial: true, tokenize: tokenizeFurtherStart };
|
|
322373
323008
|
});
|
|
322374
323009
|
|
|
322375
|
-
//
|
|
323010
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/code-text.js
|
|
322376
323011
|
function resolveCodeText(events) {
|
|
322377
323012
|
let tailExitIndex = events.length - 4;
|
|
322378
323013
|
let headEnterIndex = 3;
|
|
@@ -322495,7 +323130,7 @@ var init_code_text = __esm(() => {
|
|
|
322495
323130
|
};
|
|
322496
323131
|
});
|
|
322497
323132
|
|
|
322498
|
-
//
|
|
323133
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js
|
|
322499
323134
|
class SpliceBuffer {
|
|
322500
323135
|
constructor(initial) {
|
|
322501
323136
|
this.left = initial ? [...initial] : [];
|
|
@@ -322581,7 +323216,7 @@ var init_splice_buffer = __esm(() => {
|
|
|
322581
323216
|
init_default3();
|
|
322582
323217
|
});
|
|
322583
323218
|
|
|
322584
|
-
//
|
|
323219
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/dev/index.js
|
|
322585
323220
|
function subtokenize(eventsArray) {
|
|
322586
323221
|
const jumps = {};
|
|
322587
323222
|
let index = -1;
|
|
@@ -322740,7 +323375,7 @@ var init_dev7 = __esm(() => {
|
|
|
322740
323375
|
init_splice_buffer();
|
|
322741
323376
|
});
|
|
322742
323377
|
|
|
322743
|
-
//
|
|
323378
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/content.js
|
|
322744
323379
|
function resolveContent(events) {
|
|
322745
323380
|
subtokenize(events);
|
|
322746
323381
|
return events;
|
|
@@ -322818,7 +323453,7 @@ var init_content2 = __esm(() => {
|
|
|
322818
323453
|
continuationConstruct = { partial: true, tokenize: tokenizeContinuation };
|
|
322819
323454
|
});
|
|
322820
323455
|
|
|
322821
|
-
//
|
|
323456
|
+
// ../../../v2/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/dev/index.js
|
|
322822
323457
|
function factoryDestination(effects2, ok3, nok, type, literalType2, literalMarkerType, rawType, stringType2, max2) {
|
|
322823
323458
|
const limit = max2 || Number.POSITIVE_INFINITY;
|
|
322824
323459
|
let balance = 0;
|
|
@@ -322910,7 +323545,7 @@ var init_dev8 = __esm(() => {
|
|
|
322910
323545
|
init_default3();
|
|
322911
323546
|
});
|
|
322912
323547
|
|
|
322913
|
-
//
|
|
323548
|
+
// ../../../v2/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/dev/index.js
|
|
322914
323549
|
function factoryLabel(effects2, ok3, nok, type, markerType, stringType2) {
|
|
322915
323550
|
const self = this;
|
|
322916
323551
|
let size = 0;
|
|
@@ -322971,7 +323606,7 @@ var init_dev9 = __esm(() => {
|
|
|
322971
323606
|
init_default3();
|
|
322972
323607
|
});
|
|
322973
323608
|
|
|
322974
|
-
//
|
|
323609
|
+
// ../../../v2/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/dev/index.js
|
|
322975
323610
|
function factoryTitle(effects2, ok3, nok, type, markerType, stringType2) {
|
|
322976
323611
|
let marker;
|
|
322977
323612
|
return start;
|
|
@@ -323036,7 +323671,7 @@ var init_dev10 = __esm(() => {
|
|
|
323036
323671
|
init_default3();
|
|
323037
323672
|
});
|
|
323038
323673
|
|
|
323039
|
-
//
|
|
323674
|
+
// ../../../v2/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/dev/index.js
|
|
323040
323675
|
function factoryWhitespace(effects2, ok3) {
|
|
323041
323676
|
let seen;
|
|
323042
323677
|
return start;
|
|
@@ -323060,7 +323695,7 @@ var init_dev11 = __esm(() => {
|
|
|
323060
323695
|
init_default3();
|
|
323061
323696
|
});
|
|
323062
323697
|
|
|
323063
|
-
//
|
|
323698
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/definition.js
|
|
323064
323699
|
function tokenizeDefinition(effects2, ok3, nok) {
|
|
323065
323700
|
const self = this;
|
|
323066
323701
|
let identifier;
|
|
@@ -323134,7 +323769,7 @@ var init_definition = __esm(() => {
|
|
|
323134
323769
|
titleBefore = { partial: true, tokenize: tokenizeTitleBefore };
|
|
323135
323770
|
});
|
|
323136
323771
|
|
|
323137
|
-
//
|
|
323772
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js
|
|
323138
323773
|
function tokenizeHardBreakEscape(effects2, ok3, nok) {
|
|
323139
323774
|
return start;
|
|
323140
323775
|
function start(code) {
|
|
@@ -323162,7 +323797,7 @@ var init_hard_break_escape = __esm(() => {
|
|
|
323162
323797
|
};
|
|
323163
323798
|
});
|
|
323164
323799
|
|
|
323165
|
-
//
|
|
323800
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js
|
|
323166
323801
|
function resolveHeadingAtx(events, context) {
|
|
323167
323802
|
let contentEnd = events.length - 2;
|
|
323168
323803
|
let contentStart = 3;
|
|
@@ -323267,7 +323902,7 @@ var init_heading_atx = __esm(() => {
|
|
|
323267
323902
|
};
|
|
323268
323903
|
});
|
|
323269
323904
|
|
|
323270
|
-
//
|
|
323905
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
|
|
323271
323906
|
var htmlBlockNames, htmlRawNames;
|
|
323272
323907
|
var init_micromark_util_html_tag_name = __esm(() => {
|
|
323273
323908
|
htmlBlockNames = [
|
|
@@ -323337,7 +323972,7 @@ var init_micromark_util_html_tag_name = __esm(() => {
|
|
|
323337
323972
|
htmlRawNames = ["pre", "script", "style", "textarea"];
|
|
323338
323973
|
});
|
|
323339
323974
|
|
|
323340
|
-
//
|
|
323975
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/html-flow.js
|
|
323341
323976
|
function resolveToHtmlFlow(events) {
|
|
323342
323977
|
let index = events.length;
|
|
323343
323978
|
while (index--) {
|
|
@@ -323727,7 +324362,7 @@ var init_html_flow = __esm(() => {
|
|
|
323727
324362
|
};
|
|
323728
324363
|
});
|
|
323729
324364
|
|
|
323730
|
-
//
|
|
324365
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/html-text.js
|
|
323731
324366
|
function tokenizeHtmlText(effects2, ok3, nok) {
|
|
323732
324367
|
const self = this;
|
|
323733
324368
|
let marker;
|
|
@@ -324041,7 +324676,7 @@ var init_html_text = __esm(() => {
|
|
|
324041
324676
|
htmlText = { name: "htmlText", tokenize: tokenizeHtmlText };
|
|
324042
324677
|
});
|
|
324043
324678
|
|
|
324044
|
-
//
|
|
324679
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-end.js
|
|
324045
324680
|
function resolveAllLabelEnd(events) {
|
|
324046
324681
|
let index = -1;
|
|
324047
324682
|
const newEvents = [];
|
|
@@ -324273,7 +324908,7 @@ var init_label_end = __esm(() => {
|
|
|
324273
324908
|
referenceCollapsedConstruct = { tokenize: tokenizeReferenceCollapsed };
|
|
324274
324909
|
});
|
|
324275
324910
|
|
|
324276
|
-
//
|
|
324911
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js
|
|
324277
324912
|
function tokenizeLabelStartImage(effects2, ok3, nok) {
|
|
324278
324913
|
const self = this;
|
|
324279
324914
|
return start;
|
|
@@ -324311,7 +324946,7 @@ var init_label_start_image = __esm(() => {
|
|
|
324311
324946
|
};
|
|
324312
324947
|
});
|
|
324313
324948
|
|
|
324314
|
-
//
|
|
324949
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js
|
|
324315
324950
|
function tokenizeLabelStartLink(effects2, ok3, nok) {
|
|
324316
324951
|
const self = this;
|
|
324317
324952
|
return start;
|
|
@@ -324340,7 +324975,7 @@ var init_label_start_link = __esm(() => {
|
|
|
324340
324975
|
};
|
|
324341
324976
|
});
|
|
324342
324977
|
|
|
324343
|
-
//
|
|
324978
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/line-ending.js
|
|
324344
324979
|
function tokenizeLineEnding(effects2, ok3) {
|
|
324345
324980
|
return start;
|
|
324346
324981
|
function start(code) {
|
|
@@ -324360,7 +324995,7 @@ var init_line_ending = __esm(() => {
|
|
|
324360
324995
|
lineEnding = { name: "lineEnding", tokenize: tokenizeLineEnding };
|
|
324361
324996
|
});
|
|
324362
324997
|
|
|
324363
|
-
//
|
|
324998
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js
|
|
324364
324999
|
function tokenizeThematicBreak(effects2, ok3, nok) {
|
|
324365
325000
|
let size = 0;
|
|
324366
325001
|
let marker;
|
|
@@ -324407,7 +325042,7 @@ var init_thematic_break = __esm(() => {
|
|
|
324407
325042
|
};
|
|
324408
325043
|
});
|
|
324409
325044
|
|
|
324410
|
-
//
|
|
325045
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/list.js
|
|
324411
325046
|
function tokenizeListStart(effects2, ok3, nok) {
|
|
324412
325047
|
const self = this;
|
|
324413
325048
|
const tail = self.events[self.events.length - 1];
|
|
@@ -324552,7 +325187,7 @@ var init_list = __esm(() => {
|
|
|
324552
325187
|
indentConstruct = { partial: true, tokenize: tokenizeIndent };
|
|
324553
325188
|
});
|
|
324554
325189
|
|
|
324555
|
-
//
|
|
325190
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js
|
|
324556
325191
|
function resolveToSetextUnderline(events, context) {
|
|
324557
325192
|
let index = events.length;
|
|
324558
325193
|
let content3;
|
|
@@ -324650,7 +325285,7 @@ var init_setext_underline = __esm(() => {
|
|
|
324650
325285
|
};
|
|
324651
325286
|
});
|
|
324652
325287
|
|
|
324653
|
-
//
|
|
325288
|
+
// ../../../v2/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/dev/index.js
|
|
324654
325289
|
var init_dev12 = __esm(() => {
|
|
324655
325290
|
init_attention();
|
|
324656
325291
|
init_autolink();
|
|
@@ -324676,7 +325311,7 @@ var init_dev12 = __esm(() => {
|
|
|
324676
325311
|
init_thematic_break();
|
|
324677
325312
|
});
|
|
324678
325313
|
|
|
324679
|
-
//
|
|
325314
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/flow.js
|
|
324680
325315
|
function initializeFlow(effects2) {
|
|
324681
325316
|
const self = this;
|
|
324682
325317
|
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)));
|
|
@@ -324716,7 +325351,7 @@ var init_flow = __esm(() => {
|
|
|
324716
325351
|
flow = { tokenize: initializeFlow };
|
|
324717
325352
|
});
|
|
324718
325353
|
|
|
324719
|
-
//
|
|
325354
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/initialize/text.js
|
|
324720
325355
|
function initializeFactory(field) {
|
|
324721
325356
|
return {
|
|
324722
325357
|
resolveAll: createResolver(field === "text" ? resolveAllLineSuffixes : undefined),
|
|
@@ -324855,7 +325490,7 @@ var init_text = __esm(() => {
|
|
|
324855
325490
|
text = initializeFactory("text");
|
|
324856
325491
|
});
|
|
324857
325492
|
|
|
324858
|
-
//
|
|
325493
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/constructs.js
|
|
324859
325494
|
var exports_constructs = {};
|
|
324860
325495
|
__export(exports_constructs, {
|
|
324861
325496
|
text: () => text2,
|
|
@@ -324930,7 +325565,7 @@ var init_constructs = __esm(() => {
|
|
|
324930
325565
|
disable = { null: [] };
|
|
324931
325566
|
});
|
|
324932
325567
|
|
|
324933
|
-
//
|
|
325568
|
+
// ../../../v2/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
324934
325569
|
var require_ms = __commonJS((exports, module) => {
|
|
324935
325570
|
var s = 1000;
|
|
324936
325571
|
var m = s * 60;
|
|
@@ -325040,7 +325675,7 @@ var require_ms = __commonJS((exports, module) => {
|
|
|
325040
325675
|
}
|
|
325041
325676
|
});
|
|
325042
325677
|
|
|
325043
|
-
//
|
|
325678
|
+
// ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/common.js
|
|
325044
325679
|
var require_common = __commonJS((exports, module) => {
|
|
325045
325680
|
function setup(env) {
|
|
325046
325681
|
createDebug.debug = createDebug;
|
|
@@ -325215,7 +325850,7 @@ var require_common = __commonJS((exports, module) => {
|
|
|
325215
325850
|
module.exports = setup;
|
|
325216
325851
|
});
|
|
325217
325852
|
|
|
325218
|
-
//
|
|
325853
|
+
// ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/browser.js
|
|
325219
325854
|
var require_browser = __commonJS((exports, module) => {
|
|
325220
325855
|
exports.formatArgs = formatArgs;
|
|
325221
325856
|
exports.save = save;
|
|
@@ -325375,30 +326010,36 @@ var require_browser = __commonJS((exports, module) => {
|
|
|
325375
326010
|
};
|
|
325376
326011
|
});
|
|
325377
326012
|
|
|
325378
|
-
//
|
|
326013
|
+
// ../../../v2/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
325379
326014
|
var require_has_flag = __commonJS((exports, module) => {
|
|
325380
|
-
module.exports = (flag, argv) => {
|
|
325381
|
-
argv = argv || process.argv;
|
|
326015
|
+
module.exports = (flag, argv = process.argv) => {
|
|
325382
326016
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
325383
|
-
const
|
|
325384
|
-
const
|
|
325385
|
-
return
|
|
326017
|
+
const position = argv.indexOf(prefix + flag);
|
|
326018
|
+
const terminatorPosition = argv.indexOf("--");
|
|
326019
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
325386
326020
|
};
|
|
325387
326021
|
});
|
|
325388
326022
|
|
|
325389
|
-
//
|
|
326023
|
+
// ../../../v2/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
325390
326024
|
var require_supports_color = __commonJS((exports, module) => {
|
|
325391
326025
|
var os = __require("os");
|
|
326026
|
+
var tty = __require("tty");
|
|
325392
326027
|
var hasFlag = require_has_flag();
|
|
325393
|
-
var env = process
|
|
326028
|
+
var { env } = process;
|
|
325394
326029
|
var forceColor;
|
|
325395
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
325396
|
-
forceColor =
|
|
326030
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
326031
|
+
forceColor = 0;
|
|
325397
326032
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
325398
|
-
forceColor =
|
|
326033
|
+
forceColor = 1;
|
|
325399
326034
|
}
|
|
325400
326035
|
if ("FORCE_COLOR" in env) {
|
|
325401
|
-
|
|
326036
|
+
if (env.FORCE_COLOR === "true") {
|
|
326037
|
+
forceColor = 1;
|
|
326038
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
326039
|
+
forceColor = 0;
|
|
326040
|
+
} else {
|
|
326041
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
326042
|
+
}
|
|
325402
326043
|
}
|
|
325403
326044
|
function translateLevel(level) {
|
|
325404
326045
|
if (level === 0) {
|
|
@@ -325411,8 +326052,8 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
325411
326052
|
has16m: level >= 3
|
|
325412
326053
|
};
|
|
325413
326054
|
}
|
|
325414
|
-
function supportsColor(
|
|
325415
|
-
if (forceColor ===
|
|
326055
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
326056
|
+
if (forceColor === 0) {
|
|
325416
326057
|
return 0;
|
|
325417
326058
|
}
|
|
325418
326059
|
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
@@ -325421,19 +326062,22 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
325421
326062
|
if (hasFlag("color=256")) {
|
|
325422
326063
|
return 2;
|
|
325423
326064
|
}
|
|
325424
|
-
if (
|
|
326065
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
325425
326066
|
return 0;
|
|
325426
326067
|
}
|
|
325427
|
-
const min = forceColor
|
|
326068
|
+
const min = forceColor || 0;
|
|
326069
|
+
if (env.TERM === "dumb") {
|
|
326070
|
+
return min;
|
|
326071
|
+
}
|
|
325428
326072
|
if (process.platform === "win32") {
|
|
325429
326073
|
const osRelease = os.release().split(".");
|
|
325430
|
-
if (Number(
|
|
326074
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
325431
326075
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
325432
326076
|
}
|
|
325433
326077
|
return 1;
|
|
325434
326078
|
}
|
|
325435
326079
|
if ("CI" in env) {
|
|
325436
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
326080
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
325437
326081
|
return 1;
|
|
325438
326082
|
}
|
|
325439
326083
|
return min;
|
|
@@ -325462,23 +326106,20 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
325462
326106
|
if ("COLORTERM" in env) {
|
|
325463
326107
|
return 1;
|
|
325464
326108
|
}
|
|
325465
|
-
if (env.TERM === "dumb") {
|
|
325466
|
-
return min;
|
|
325467
|
-
}
|
|
325468
326109
|
return min;
|
|
325469
326110
|
}
|
|
325470
326111
|
function getSupportLevel(stream) {
|
|
325471
|
-
const level = supportsColor(stream);
|
|
326112
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
325472
326113
|
return translateLevel(level);
|
|
325473
326114
|
}
|
|
325474
326115
|
module.exports = {
|
|
325475
326116
|
supportsColor: getSupportLevel,
|
|
325476
|
-
stdout:
|
|
325477
|
-
stderr:
|
|
326117
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
326118
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
325478
326119
|
};
|
|
325479
326120
|
});
|
|
325480
326121
|
|
|
325481
|
-
//
|
|
326122
|
+
// ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/node.js
|
|
325482
326123
|
var require_node = __commonJS((exports, module) => {
|
|
325483
326124
|
var tty = __require("tty");
|
|
325484
326125
|
var util3 = __require("util");
|
|
@@ -325649,7 +326290,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
325649
326290
|
};
|
|
325650
326291
|
});
|
|
325651
326292
|
|
|
325652
|
-
//
|
|
326293
|
+
// ../../../v2/node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/index.js
|
|
325653
326294
|
var require_src = __commonJS((exports, module) => {
|
|
325654
326295
|
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
|
|
325655
326296
|
module.exports = require_browser();
|
|
@@ -325658,7 +326299,7 @@ var require_src = __commonJS((exports, module) => {
|
|
|
325658
326299
|
}
|
|
325659
326300
|
});
|
|
325660
326301
|
|
|
325661
|
-
//
|
|
326302
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/create-tokenizer.js
|
|
325662
326303
|
function createTokenizer(parser, initialize, from) {
|
|
325663
326304
|
let point = {
|
|
325664
326305
|
_bufferIndex: -1,
|
|
@@ -325981,7 +326622,7 @@ var init_create_tokenizer = __esm(() => {
|
|
|
325981
326622
|
debug = import_debug.default("micromark");
|
|
325982
326623
|
});
|
|
325983
326624
|
|
|
325984
|
-
//
|
|
326625
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/parse.js
|
|
325985
326626
|
function parse6(options) {
|
|
325986
326627
|
const settings = options || {};
|
|
325987
326628
|
const constructs2 = combineExtensions([exports_constructs, ...settings.extensions || []]);
|
|
@@ -326013,7 +326654,7 @@ var init_parse4 = __esm(() => {
|
|
|
326013
326654
|
init_create_tokenizer();
|
|
326014
326655
|
});
|
|
326015
326656
|
|
|
326016
|
-
//
|
|
326657
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/postprocess.js
|
|
326017
326658
|
function postprocess(events) {
|
|
326018
326659
|
while (!subtokenize(events)) {}
|
|
326019
326660
|
return events;
|
|
@@ -326022,7 +326663,7 @@ var init_postprocess = __esm(() => {
|
|
|
326022
326663
|
init_dev7();
|
|
326023
326664
|
});
|
|
326024
326665
|
|
|
326025
|
-
//
|
|
326666
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/lib/preprocess.js
|
|
326026
326667
|
function preprocess2() {
|
|
326027
326668
|
let column = 1;
|
|
326028
326669
|
let buffer = "";
|
|
@@ -326108,14 +326749,14 @@ var init_preprocess = __esm(() => {
|
|
|
326108
326749
|
search = /[\0\t\n\r]/g;
|
|
326109
326750
|
});
|
|
326110
326751
|
|
|
326111
|
-
//
|
|
326752
|
+
// ../../../v2/node_modules/.pnpm/micromark@4.0.2_supports-color@7.2.0/node_modules/micromark/dev/index.js
|
|
326112
326753
|
var init_dev13 = __esm(() => {
|
|
326113
326754
|
init_parse4();
|
|
326114
326755
|
init_postprocess();
|
|
326115
326756
|
init_preprocess();
|
|
326116
326757
|
});
|
|
326117
326758
|
|
|
326118
|
-
//
|
|
326759
|
+
// ../../../v2/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/dev/index.js
|
|
326119
326760
|
function decodeString(value2) {
|
|
326120
326761
|
return value2.replace(characterEscapeOrReference, decode4);
|
|
326121
326762
|
}
|
|
@@ -326139,7 +326780,7 @@ var init_dev14 = __esm(() => {
|
|
|
326139
326780
|
characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
326140
326781
|
});
|
|
326141
326782
|
|
|
326142
|
-
//
|
|
326783
|
+
// ../../../v2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js
|
|
326143
326784
|
function stringifyPosition(value2) {
|
|
326144
326785
|
if (!value2 || typeof value2 !== "object") {
|
|
326145
326786
|
return "";
|
|
@@ -326165,10 +326806,10 @@ function index(value2) {
|
|
|
326165
326806
|
return value2 && typeof value2 === "number" ? value2 : 1;
|
|
326166
326807
|
}
|
|
326167
326808
|
|
|
326168
|
-
//
|
|
326809
|
+
// ../../../v2/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/index.js
|
|
326169
326810
|
var init_unist_util_stringify_position = () => {};
|
|
326170
326811
|
|
|
326171
|
-
//
|
|
326812
|
+
// ../../../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
|
|
326172
326813
|
function fromMarkdown(value2, encoding, options) {
|
|
326173
326814
|
if (encoding && typeof encoding === "object") {
|
|
326174
326815
|
options = encoding;
|
|
@@ -326883,12 +327524,12 @@ var init_lib2 = __esm(() => {
|
|
|
326883
327524
|
own2 = {}.hasOwnProperty;
|
|
326884
327525
|
});
|
|
326885
327526
|
|
|
326886
|
-
//
|
|
327527
|
+
// ../../../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
|
|
326887
327528
|
var init_dev15 = __esm(() => {
|
|
326888
327529
|
init_lib2();
|
|
326889
327530
|
});
|
|
326890
327531
|
|
|
326891
|
-
//
|
|
327532
|
+
// ../../../v2/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
|
|
326892
327533
|
function ccount(value2, character) {
|
|
326893
327534
|
const source = String(value2);
|
|
326894
327535
|
if (typeof character !== "string") {
|
|
@@ -326903,7 +327544,7 @@ function ccount(value2, character) {
|
|
|
326903
327544
|
return count;
|
|
326904
327545
|
}
|
|
326905
327546
|
|
|
326906
|
-
//
|
|
327547
|
+
// ../../../v2/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
|
|
326907
327548
|
function escapeStringRegexp(string7) {
|
|
326908
327549
|
if (typeof string7 !== "string") {
|
|
326909
327550
|
throw new TypeError("Expected a string");
|
|
@@ -326911,7 +327552,7 @@ function escapeStringRegexp(string7) {
|
|
|
326911
327552
|
return string7.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
326912
327553
|
}
|
|
326913
327554
|
|
|
326914
|
-
//
|
|
327555
|
+
// ../../../v2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js
|
|
326915
327556
|
function anyFactory(tests) {
|
|
326916
327557
|
const checks4 = [];
|
|
326917
327558
|
let index2 = -1;
|
|
@@ -326975,15 +327616,15 @@ var convert = function(test) {
|
|
|
326975
327616
|
throw new Error("Expected function, string, or object as test");
|
|
326976
327617
|
};
|
|
326977
327618
|
|
|
326978
|
-
//
|
|
327619
|
+
// ../../../v2/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/index.js
|
|
326979
327620
|
var init_unist_util_is = () => {};
|
|
326980
327621
|
|
|
326981
|
-
//
|
|
327622
|
+
// ../../../v2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.js
|
|
326982
327623
|
function color(d) {
|
|
326983
327624
|
return "\x1B[33m" + d + "\x1B[39m";
|
|
326984
327625
|
}
|
|
326985
327626
|
|
|
326986
|
-
//
|
|
327627
|
+
// ../../../v2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
|
|
326987
327628
|
function visitParents(tree, test, visitor, reverse) {
|
|
326988
327629
|
let check2;
|
|
326989
327630
|
if (typeof test === "function" && typeof visitor !== "function") {
|
|
@@ -327049,12 +327690,12 @@ var init_lib3 = __esm(() => {
|
|
|
327049
327690
|
empty2 = [];
|
|
327050
327691
|
});
|
|
327051
327692
|
|
|
327052
|
-
//
|
|
327693
|
+
// ../../../v2/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/index.js
|
|
327053
327694
|
var init_unist_util_visit_parents = __esm(() => {
|
|
327054
327695
|
init_lib3();
|
|
327055
327696
|
});
|
|
327056
327697
|
|
|
327057
|
-
//
|
|
327698
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js
|
|
327058
327699
|
function findAndReplace(tree, list2, options) {
|
|
327059
327700
|
const settings = options || {};
|
|
327060
327701
|
const ignored = convert(settings.ignore || []);
|
|
@@ -327159,12 +327800,12 @@ var init_lib4 = __esm(() => {
|
|
|
327159
327800
|
init_unist_util_is();
|
|
327160
327801
|
});
|
|
327161
327802
|
|
|
327162
|
-
//
|
|
327803
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/index.js
|
|
327163
327804
|
var init_mdast_util_find_and_replace = __esm(() => {
|
|
327164
327805
|
init_lib4();
|
|
327165
327806
|
});
|
|
327166
327807
|
|
|
327167
|
-
//
|
|
327808
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
|
|
327168
327809
|
function gfmAutolinkLiteralFromMarkdown() {
|
|
327169
327810
|
return {
|
|
327170
327811
|
transforms: [transformGfmAutolinkLiterals],
|
|
@@ -327282,12 +327923,12 @@ var init_lib5 = __esm(() => {
|
|
|
327282
327923
|
init_mdast_util_find_and_replace();
|
|
327283
327924
|
});
|
|
327284
327925
|
|
|
327285
|
-
//
|
|
327926
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/index.js
|
|
327286
327927
|
var init_mdast_util_gfm_autolink_literal = __esm(() => {
|
|
327287
327928
|
init_lib5();
|
|
327288
327929
|
});
|
|
327289
327930
|
|
|
327290
|
-
//
|
|
327931
|
+
// ../../../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
|
|
327291
327932
|
function enterFootnoteCallString() {
|
|
327292
327933
|
this.buffer();
|
|
327293
327934
|
}
|
|
@@ -327356,12 +327997,12 @@ var init_lib6 = __esm(() => {
|
|
|
327356
327997
|
footnoteReference.peek = footnoteReferencePeek;
|
|
327357
327998
|
});
|
|
327358
327999
|
|
|
327359
|
-
//
|
|
328000
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0_supports-color@7.2.0/node_modules/mdast-util-gfm-footnote/index.js
|
|
327360
328001
|
var init_mdast_util_gfm_footnote = __esm(() => {
|
|
327361
328002
|
init_lib6();
|
|
327362
328003
|
});
|
|
327363
328004
|
|
|
327364
|
-
//
|
|
328005
|
+
// ../../../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
|
|
327365
328006
|
function gfmStrikethroughFromMarkdown() {
|
|
327366
328007
|
return {
|
|
327367
328008
|
canContainEols: ["delete"],
|
|
@@ -327395,12 +328036,12 @@ var init_lib7 = __esm(() => {
|
|
|
327395
328036
|
handleDelete.peek = peekDelete;
|
|
327396
328037
|
});
|
|
327397
328038
|
|
|
327398
|
-
//
|
|
328039
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-strikethrough/index.js
|
|
327399
328040
|
var init_mdast_util_gfm_strikethrough = __esm(() => {
|
|
327400
328041
|
init_lib7();
|
|
327401
328042
|
});
|
|
327402
328043
|
|
|
327403
|
-
//
|
|
328044
|
+
// ../../../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
|
|
327404
328045
|
function gfmTableFromMarkdown() {
|
|
327405
328046
|
return {
|
|
327406
328047
|
enter: {
|
|
@@ -327460,12 +328101,12 @@ var init_lib8 = __esm(() => {
|
|
|
327460
328101
|
init_development();
|
|
327461
328102
|
});
|
|
327462
328103
|
|
|
327463
|
-
//
|
|
328104
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-gfm-table@2.0.0_supports-color@7.2.0/node_modules/mdast-util-gfm-table/index.js
|
|
327464
328105
|
var init_mdast_util_gfm_table = __esm(() => {
|
|
327465
328106
|
init_lib8();
|
|
327466
328107
|
});
|
|
327467
328108
|
|
|
327468
|
-
//
|
|
328109
|
+
// ../../../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
|
|
327469
328110
|
function gfmTaskListItemFromMarkdown() {
|
|
327470
328111
|
return {
|
|
327471
328112
|
exit: {
|
|
@@ -327515,12 +328156,12 @@ var init_lib9 = __esm(() => {
|
|
|
327515
328156
|
init_development();
|
|
327516
328157
|
});
|
|
327517
328158
|
|
|
327518
|
-
//
|
|
328159
|
+
// ../../../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
|
|
327519
328160
|
var init_mdast_util_gfm_task_list_item = __esm(() => {
|
|
327520
328161
|
init_lib9();
|
|
327521
328162
|
});
|
|
327522
328163
|
|
|
327523
|
-
//
|
|
328164
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-gfm@3.1.0_supports-color@7.2.0/node_modules/mdast-util-gfm/lib/index.js
|
|
327524
328165
|
function gfmFromMarkdown() {
|
|
327525
328166
|
return [
|
|
327526
328167
|
gfmAutolinkLiteralFromMarkdown(),
|
|
@@ -327538,12 +328179,12 @@ var init_lib10 = __esm(() => {
|
|
|
327538
328179
|
init_mdast_util_gfm_task_list_item();
|
|
327539
328180
|
});
|
|
327540
328181
|
|
|
327541
|
-
//
|
|
328182
|
+
// ../../../v2/node_modules/.pnpm/mdast-util-gfm@3.1.0_supports-color@7.2.0/node_modules/mdast-util-gfm/index.js
|
|
327542
328183
|
var init_mdast_util_gfm = __esm(() => {
|
|
327543
328184
|
init_lib10();
|
|
327544
328185
|
});
|
|
327545
328186
|
|
|
327546
|
-
//
|
|
328187
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/dev/lib/syntax.js
|
|
327547
328188
|
function gfmAutolinkLiteral() {
|
|
327548
328189
|
return { text: text3 };
|
|
327549
328190
|
}
|
|
@@ -327874,12 +328515,12 @@ var init_syntax = __esm(() => {
|
|
|
327874
328515
|
text3[codes.lowercaseW] = [emailAutolink, wwwAutolink];
|
|
327875
328516
|
});
|
|
327876
328517
|
|
|
327877
|
-
//
|
|
328518
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/dev/index.js
|
|
327878
328519
|
var init_dev16 = __esm(() => {
|
|
327879
328520
|
init_syntax();
|
|
327880
328521
|
});
|
|
327881
328522
|
|
|
327882
|
-
//
|
|
328523
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/dev/lib/syntax.js
|
|
327883
328524
|
function gfmFootnote() {
|
|
327884
328525
|
return {
|
|
327885
328526
|
document: {
|
|
@@ -328143,12 +328784,12 @@ var init_syntax2 = __esm(() => {
|
|
|
328143
328784
|
indent = { tokenize: tokenizeIndent2, partial: true };
|
|
328144
328785
|
});
|
|
328145
328786
|
|
|
328146
|
-
//
|
|
328787
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/dev/index.js
|
|
328147
328788
|
var init_dev17 = __esm(() => {
|
|
328148
328789
|
init_syntax2();
|
|
328149
328790
|
});
|
|
328150
328791
|
|
|
328151
|
-
//
|
|
328792
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/dev/lib/syntax.js
|
|
328152
328793
|
function gfmStrikethrough(options) {
|
|
328153
328794
|
const options_ = options || {};
|
|
328154
328795
|
let single = options_.singleTilde;
|
|
@@ -328254,12 +328895,12 @@ var init_syntax3 = __esm(() => {
|
|
|
328254
328895
|
init_default3();
|
|
328255
328896
|
});
|
|
328256
328897
|
|
|
328257
|
-
//
|
|
328898
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/dev/index.js
|
|
328258
328899
|
var init_dev18 = __esm(() => {
|
|
328259
328900
|
init_syntax3();
|
|
328260
328901
|
});
|
|
328261
328902
|
|
|
328262
|
-
//
|
|
328903
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js
|
|
328263
328904
|
class EditMap {
|
|
328264
328905
|
constructor() {
|
|
328265
328906
|
this.map = [];
|
|
@@ -328309,7 +328950,7 @@ function addImplementation(editMap, at, remove, add) {
|
|
|
328309
328950
|
editMap.map.push([at, remove, add]);
|
|
328310
328951
|
}
|
|
328311
328952
|
|
|
328312
|
-
//
|
|
328953
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/infer.js
|
|
328313
328954
|
function gfmTableAlign(events, index2) {
|
|
328314
328955
|
ok2(events[index2][1].type === "table", "expected table");
|
|
328315
328956
|
let inDelimiterRow = false;
|
|
@@ -328340,7 +328981,7 @@ var init_infer = __esm(() => {
|
|
|
328340
328981
|
init_development();
|
|
328341
328982
|
});
|
|
328342
328983
|
|
|
328343
|
-
//
|
|
328984
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js
|
|
328344
328985
|
function gfmTable() {
|
|
328345
328986
|
return {
|
|
328346
328987
|
flow: {
|
|
@@ -328732,12 +329373,12 @@ var init_syntax4 = __esm(() => {
|
|
|
328732
329373
|
init_infer();
|
|
328733
329374
|
});
|
|
328734
329375
|
|
|
328735
|
-
//
|
|
329376
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/dev/index.js
|
|
328736
329377
|
var init_dev19 = __esm(() => {
|
|
328737
329378
|
init_syntax4();
|
|
328738
329379
|
});
|
|
328739
329380
|
|
|
328740
|
-
//
|
|
329381
|
+
// ../../../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
|
|
328741
329382
|
function gfmTaskListItem() {
|
|
328742
329383
|
return {
|
|
328743
329384
|
text: { [codes.leftSquareBracket]: tasklistCheck }
|
|
@@ -328807,12 +329448,12 @@ var init_syntax5 = __esm(() => {
|
|
|
328807
329448
|
tasklistCheck = { name: "tasklistCheck", tokenize: tokenizeTasklistCheck };
|
|
328808
329449
|
});
|
|
328809
329450
|
|
|
328810
|
-
//
|
|
329451
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/dev/index.js
|
|
328811
329452
|
var init_dev20 = __esm(() => {
|
|
328812
329453
|
init_syntax5();
|
|
328813
329454
|
});
|
|
328814
329455
|
|
|
328815
|
-
//
|
|
329456
|
+
// ../../../v2/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js
|
|
328816
329457
|
function gfm(options) {
|
|
328817
329458
|
return combineExtensions([
|
|
328818
329459
|
gfmAutolinkLiteral(),
|
|
@@ -340494,10 +341135,18 @@ class V2ContentControlsAdapter {
|
|
|
340494
341135
|
if (controlPlacement(part.xml, control2) !== control2.info.kind) {
|
|
340495
341136
|
throw operationError("CAPABILITY_UNAVAILABLE", "Row and cell controls are not supported adjacent insertion targets.");
|
|
340496
341137
|
}
|
|
340497
|
-
|
|
341138
|
+
const allocator = createParaIdAllocator(this.context);
|
|
341139
|
+
let createdBlockId = null;
|
|
341140
|
+
const captureParaId = () => {
|
|
341141
|
+
const id = allocator();
|
|
341142
|
+
if (createdBlockId == null)
|
|
341143
|
+
createdBlockId = id;
|
|
341144
|
+
return id;
|
|
341145
|
+
};
|
|
341146
|
+
let fragment4 = buildAdjacentContent(input.content ?? "", control2.info.kind, captureParaId);
|
|
340498
341147
|
let commitOptions = {
|
|
340499
341148
|
partUri: part.partUri,
|
|
340500
|
-
storySurface: { family: "storyBlocks", contentControlRewrite: true, targetBlockIds: [] },
|
|
341149
|
+
storySurface: { family: "storyBlocks", contentControlRewrite: true, changeMode: "direct", targetBlockIds: [] },
|
|
340501
341150
|
preserveRenderCommit: true
|
|
340502
341151
|
};
|
|
340503
341152
|
if (options?.changeMode === "tracked") {
|
|
@@ -340523,7 +341172,7 @@ class V2ContentControlsAdapter {
|
|
|
340523
341172
|
return this.validateDryRun(input, options, control2.target);
|
|
340524
341173
|
const index2 = placement3 === "before" ? control2.start : control2.end;
|
|
340525
341174
|
const nextXml = `${part.xml.slice(0, index2)}${fragment4}${part.xml.slice(index2)}`;
|
|
340526
|
-
return this.commitDocument(nextXml, `content-control-insert-${placement3}`, input, options, control2.target, commitOptions);
|
|
341175
|
+
return this.commitDocument(nextXml, `content-control-insert-${placement3}`, input, options, control2.target, { ...commitOptions, ...createdBlockId != null ? { createdBlockId } : {} });
|
|
340527
341176
|
}
|
|
340528
341177
|
mutatePr(input, options, transform2) {
|
|
340529
341178
|
return this.mutateControl(input.target, input, options, (control2) => {
|
|
@@ -340914,6 +341563,7 @@ class V2ContentControlsAdapter {
|
|
|
340914
341563
|
if (!documentProtectionAllowsXmlRewrite(this.context, partUri, before, nextXml)) {
|
|
340915
341564
|
return { success: false, failure: { code: "PERMISSION_DENIED", message: DOCUMENT_PROTECTION_MESSAGE } };
|
|
340916
341565
|
}
|
|
341566
|
+
let remappedCreatedBlockId = commitOptions.createdBlockId;
|
|
340917
341567
|
if (commitOptions.storySurface?.contentControlRewrite && this.context.isCollaborativeSession()) {
|
|
340918
341568
|
const existingIds = new Set(this.load().parts.flatMap((part) => Array.from(part.xml.matchAll(/\bw14:paraId="([^"]+)"/g), (match) => match[1])));
|
|
340919
341569
|
const newIds = [...new Set(Array.from(nextXml.matchAll(/\bw14:paraId="([^"]+)"/g), (match) => match[1]))].filter((id) => !existingIds.has(id));
|
|
@@ -340923,6 +341573,9 @@ class V2ContentControlsAdapter {
|
|
|
340923
341573
|
return { success: false, failure: { code: "PRECONDITION_FAILED", message: "Could not reserve content-control paragraph identities." } };
|
|
340924
341574
|
const remap = new Map(newIds.map((id, index2) => [id, allocated[index2]]));
|
|
340925
341575
|
nextXml = nextXml.replace(/\bw14:paraId="([^"]+)"/g, (attribute, id) => remap.has(id) ? `w14:paraId="${remap.get(id)}"` : attribute);
|
|
341576
|
+
if (remappedCreatedBlockId != null) {
|
|
341577
|
+
remappedCreatedBlockId = remap.get(remappedCreatedBlockId) ?? remappedCreatedBlockId;
|
|
341578
|
+
}
|
|
340926
341579
|
}
|
|
340927
341580
|
}
|
|
340928
341581
|
const committed = commitWholePartUpdates(this.context, prefix, { [partUri]: encodeXml(nextXml) }, {
|
|
@@ -340947,7 +341600,8 @@ class V2ContentControlsAdapter {
|
|
|
340947
341600
|
contentControl: target,
|
|
340948
341601
|
...commitOptions.updatedRef ? { updatedRef: commitOptions.updatedRef } : {},
|
|
340949
341602
|
affectedStories: [...commitOptions.affectedStories ?? [target.story ?? { kind: "story", storyType: "body" }]],
|
|
340950
|
-
...trackedChangeRefs && trackedChangeRefs.length > 0 ? { trackedChangeRefs } : {}
|
|
341603
|
+
...trackedChangeRefs && trackedChangeRefs.length > 0 ? { trackedChangeRefs } : {},
|
|
341604
|
+
...remappedCreatedBlockId != null ? { createdBlockId: remappedCreatedBlockId } : {}
|
|
340951
341605
|
};
|
|
340952
341606
|
if (commitOptions.preserveRenderCommit) {
|
|
340953
341607
|
const renderCommit = getSDRenderCommitEnvelope(committed);
|
|
@@ -343093,10 +343747,12 @@ function regenerateTrackedToc(context, entry, instruction, dryRun) {
|
|
|
343093
343747
|
}));
|
|
343094
343748
|
if (missing2.some((bookmark) => !bookmark.paragraph))
|
|
343095
343749
|
return unavailable4("A TOC heading target is unavailable.");
|
|
343096
|
-
const names = new Map
|
|
343097
|
-
|
|
343098
|
-
bookmark.name
|
|
343099
|
-
|
|
343750
|
+
const names = new Map;
|
|
343751
|
+
for (const bookmark of missing2) {
|
|
343752
|
+
names.set(bookmark.fieldSource?.key ?? `${bookmark.paragraph.storyId}:${bookmark.blockId}`, bookmark.name);
|
|
343753
|
+
for (const key2 of bookmark.fieldSourceKeys ?? [])
|
|
343754
|
+
names.set(key2, bookmark.name);
|
|
343755
|
+
}
|
|
343100
343756
|
const sdt = prepareTocSdtReplacement(context, entry, instruction, names);
|
|
343101
343757
|
const rendered = !sdt.ok && sdt.message === "Unable to locate the containing TOC content control." ? prepareBareTocReplacement(context, entry, instruction, names) : sdt;
|
|
343102
343758
|
if (!rendered.ok)
|
|
@@ -343135,16 +343791,18 @@ function regenerateTrackedToc(context, entry, instruction, dryRun) {
|
|
|
343135
343791
|
];
|
|
343136
343792
|
let count = content3.wordIds.length;
|
|
343137
343793
|
let bookmarkId = nextBookmarkNumericId(context);
|
|
343794
|
+
const bookmarkMarkers = [];
|
|
343138
343795
|
for (const bookmark of missing2) {
|
|
343139
343796
|
const paragraph4 = bookmark.paragraph;
|
|
343140
|
-
const
|
|
343141
|
-
|
|
343142
|
-
|
|
343143
|
-
|
|
343797
|
+
const markerBindings = readBookmarkInsertionNamespaceBindings(paragraph4, bookmark);
|
|
343798
|
+
if (!markerBindings)
|
|
343799
|
+
return null;
|
|
343800
|
+
const fragments = buildParagraphBookmarkMarkers(paragraph4, bookmark, bookmarkId++);
|
|
343801
|
+
const markers = [fragments.startXml, fragments.endXml].map((xml) => {
|
|
343144
343802
|
const marker = prepareTrackedInlineXmlReplacement({
|
|
343145
343803
|
beforeXml: "",
|
|
343146
|
-
afterXml:
|
|
343147
|
-
namespaceBindings:
|
|
343804
|
+
afterXml: xml,
|
|
343805
|
+
namespaceBindings: markerBindings,
|
|
343148
343806
|
stamp: {
|
|
343149
343807
|
...stamp,
|
|
343150
343808
|
revisionId: revisionIds?.[count] ?? count,
|
|
@@ -343157,10 +343815,12 @@ function regenerateTrackedToc(context, entry, instruction, dryRun) {
|
|
|
343157
343815
|
});
|
|
343158
343816
|
if (!markers[0] || !markers[1])
|
|
343159
343817
|
return null;
|
|
343160
|
-
|
|
343161
|
-
|
|
343162
|
-
|
|
343163
|
-
|
|
343818
|
+
bookmarkMarkers.push({ ...bookmark, startXml: markers[0].xml, endXml: markers[1].xml });
|
|
343819
|
+
}
|
|
343820
|
+
const grouped = prepareBookmarkParagraphGroups(paragraphs, bookmarkMarkers);
|
|
343821
|
+
if (!grouped)
|
|
343822
|
+
return null;
|
|
343823
|
+
for (const { paragraph: paragraph4, xml } of grouped) {
|
|
343164
343824
|
edits.push({
|
|
343165
343825
|
partUri: paragraph4.partUri,
|
|
343166
343826
|
storyId: paragraph4.storyId,
|
|
@@ -343196,6 +343856,8 @@ function regenerateTrackedToc(context, entry, instruction, dryRun) {
|
|
|
343196
343856
|
return unavailable4("This TOC rebuild requires unsupported existing field, paragraph, or heading boundaries.");
|
|
343197
343857
|
if (dryRun)
|
|
343198
343858
|
return { ok: true };
|
|
343859
|
+
if (context.isCollaborativeSession())
|
|
343860
|
+
return { ok: false, code: "INVALID_CONTEXT", message: "toc-regenerate-tracked: unsupported-context" };
|
|
343199
343861
|
const ids = reserveTrackedReferenceRevisionIds(context, preview.count, false);
|
|
343200
343862
|
if (!ids)
|
|
343201
343863
|
return unavailable4("The TOC rebuild could not reserve its complete revision identity batch.");
|
|
@@ -344455,9 +345117,11 @@ class V2TocAdapter {
|
|
|
344455
345117
|
}
|
|
344456
345118
|
if (options?.dryRun)
|
|
344457
345119
|
return success3(input.target.nodeId);
|
|
345120
|
+
if (this.context.isCollaborativeSession())
|
|
345121
|
+
return failure6("INVALID_CONTEXT", "toc-configure: unsupported-context");
|
|
344458
345122
|
let refreshed = entry;
|
|
344459
345123
|
if (!usesV1EmptyTocSourceSet(nextInstruction)) {
|
|
344460
|
-
const seeded = seedMissingTocBookmarks(this.context, nextInstruction);
|
|
345124
|
+
const seeded = seedMissingTocBookmarks(this.context, nextInstruction, entry.field);
|
|
344461
345125
|
if (!seeded.ok)
|
|
344462
345126
|
return failure6(seeded.code, seeded.message);
|
|
344463
345127
|
const seededEntry = findTocBlock(this.context, input.target.nodeId);
|
|
@@ -344489,9 +345153,11 @@ class V2TocAdapter {
|
|
|
344489
345153
|
}
|
|
344490
345154
|
if (options?.dryRun)
|
|
344491
345155
|
return success3(input.target.nodeId);
|
|
345156
|
+
if (this.context.isCollaborativeSession())
|
|
345157
|
+
return failure6("INVALID_CONTEXT", "toc-update: unsupported-context");
|
|
344492
345158
|
let refreshed = entry;
|
|
344493
345159
|
if (!usesV1EmptyTocSourceSet(entry.field.descriptor.instructionText)) {
|
|
344494
|
-
const seeded = seedMissingTocBookmarks(this.context, entry.field.descriptor.instructionText);
|
|
345160
|
+
const seeded = seedMissingTocBookmarks(this.context, entry.field.descriptor.instructionText, entry.field);
|
|
344495
345161
|
if (!seeded.ok)
|
|
344496
345162
|
return failure6(seeded.code, seeded.message);
|
|
344497
345163
|
const seededEntry = findTocBlock(this.context, input.target.nodeId);
|
|
@@ -344673,6 +345339,9 @@ function listTocBlocks(context) {
|
|
|
344673
345339
|
function findTocBlock(context, nodeId) {
|
|
344674
345340
|
return listTocBlocks(context).find((entry) => entry.field.blockId === nodeId) ?? null;
|
|
344675
345341
|
}
|
|
345342
|
+
function guardTocBookmarkInsertion(context, instruction, operation) {
|
|
345343
|
+
return guardTocContentMutation(context, null, instruction, operation);
|
|
345344
|
+
}
|
|
344676
345345
|
function guardTocContentMutation(context, field, instruction, operation) {
|
|
344677
345346
|
const unavailable4 = () => ({ code: "CAPABILITY_UNAVAILABLE", message: `${operation}: the TOC source is unavailable.` });
|
|
344678
345347
|
const decoder7 = new TextDecoder;
|
|
@@ -344692,15 +345361,28 @@ function guardTocContentMutation(context, field, instruction, operation) {
|
|
|
344692
345361
|
});
|
|
344693
345362
|
return true;
|
|
344694
345363
|
};
|
|
344695
|
-
if (!add(field.partUri, field.descriptor.byteStart, field.descriptor.byteEnd))
|
|
345364
|
+
if (field && !add(field.partUri, field.descriptor.byteStart, field.descriptor.byteEnd))
|
|
344696
345365
|
return unavailable4();
|
|
344697
345366
|
const missing2 = planMissingTocBookmarks(context, instruction);
|
|
344698
345367
|
if (missing2.length) {
|
|
344699
345368
|
const paragraphs = new Map(readBodyParagraphs(context, { includeListState: false }).map((paragraph4) => [paragraph4.blockId, paragraph4]));
|
|
345369
|
+
const aliasedFields = missing2.some((bookmark) => bookmark.fieldSourceKeys?.length) ? new Map(listCanonicalFieldEntries(context).map((source) => [tocTcFieldSourceKey(source), source])) : null;
|
|
344700
345370
|
for (const bookmark of missing2) {
|
|
344701
345371
|
const paragraph4 = paragraphs.get(bookmark.blockId);
|
|
344702
|
-
if (!paragraph4
|
|
345372
|
+
if (!paragraph4)
|
|
345373
|
+
return unavailable4();
|
|
345374
|
+
const start = bookmark.fieldSource?.byteStart ?? paragraph4.byteStart;
|
|
345375
|
+
const end = bookmark.fieldSource?.byteEnd ?? paragraph4.byteStart;
|
|
345376
|
+
if (!add(paragraph4.partUri, start, start + 1) || bookmark.fieldSource && !add(paragraph4.partUri, end - 1, end))
|
|
344703
345377
|
return unavailable4();
|
|
345378
|
+
for (const key2 of bookmark.fieldSourceKeys ?? []) {
|
|
345379
|
+
const source = aliasedFields?.get(key2);
|
|
345380
|
+
if (!source?.descriptor.complete)
|
|
345381
|
+
continue;
|
|
345382
|
+
const fieldSource = { key: key2, byteStart: source.descriptor.byteStart, byteEnd: source.descriptor.byteEnd };
|
|
345383
|
+
if (canPlaceBookmarkAtFieldSource(paragraph4, fieldSource) && (!add(source.partUri, fieldSource.byteStart, fieldSource.byteStart + 1) || !add(source.partUri, fieldSource.byteEnd - 1, fieldSource.byteEnd)))
|
|
345384
|
+
return unavailable4();
|
|
345385
|
+
}
|
|
344704
345386
|
}
|
|
344705
345387
|
}
|
|
344706
345388
|
for (const part of parts.values()) {
|
|
@@ -344708,6 +345390,20 @@ function guardTocContentMutation(context, field, instruction, operation) {
|
|
|
344708
345390
|
if (locked)
|
|
344709
345391
|
return locked;
|
|
344710
345392
|
}
|
|
345393
|
+
if (missing2.length) {
|
|
345394
|
+
const paragraphs = readBodyParagraphs(context, { includeListState: false });
|
|
345395
|
+
const byId = new Map(paragraphs.map((paragraph4) => [paragraph4.blockId, paragraph4]));
|
|
345396
|
+
let id = nextBookmarkNumericId(context);
|
|
345397
|
+
const markers = missing2.map((bookmark) => ({
|
|
345398
|
+
...bookmark,
|
|
345399
|
+
...buildParagraphBookmarkMarkers(byId.get(bookmark.blockId), bookmark, id++)
|
|
345400
|
+
}));
|
|
345401
|
+
if (!prepareBookmarkParagraphGroups(paragraphs, markers))
|
|
345402
|
+
return {
|
|
345403
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
345404
|
+
message: `${operation}: TOC bookmark targets have unsupported paragraph or field boundaries.`
|
|
345405
|
+
};
|
|
345406
|
+
}
|
|
344711
345407
|
return null;
|
|
344712
345408
|
}
|
|
344713
345409
|
function paragraphOverlapsSpan(entry, span) {
|
|
@@ -344791,10 +345487,11 @@ function projectTocInlineDomain(entry) {
|
|
|
344791
345487
|
};
|
|
344792
345488
|
}
|
|
344793
345489
|
function projectTocSourceConfig(instruction) {
|
|
345490
|
+
const tcSelection = parseTocTcSourceSelection(instruction);
|
|
344794
345491
|
return {
|
|
344795
345492
|
...parseNumericSwitchRange(instruction, "o") ? { outlineLevels: parseNumericSwitchRange(instruction, "o") } : {},
|
|
344796
|
-
...
|
|
344797
|
-
...
|
|
345493
|
+
...tcSelection.identifier ? { tcFieldIdentifier: tcSelection.identifier } : {},
|
|
345494
|
+
...tcSelection.levels ? { tcFieldLevels: tcSelection.levels } : {},
|
|
344798
345495
|
...instruction.includes("\\u") ? { useAppliedOutlineLevel: true } : {}
|
|
344799
345496
|
};
|
|
344800
345497
|
}
|
|
@@ -344822,23 +345519,22 @@ function countGeneratedTocEntries(context, instruction, sourceConfig) {
|
|
|
344822
345519
|
const outline = sourceConfig.outlineLevels ?? { from: 1, to: 3 };
|
|
344823
345520
|
const customStyles = parseTocCustomStyles2(parseQuotedSwitch(instruction, "t") ?? "");
|
|
344824
345521
|
const includeOutlineEntries = customStyles.length === 0 || sourceConfig.outlineLevels != null;
|
|
344825
|
-
const
|
|
345522
|
+
const paragraphs = readBodyParagraphs(context, { includeListState: false });
|
|
345523
|
+
const bodyParagraphs = new Set(paragraphs.map((paragraph4) => `${paragraph4.storyId}:${paragraph4.blockId}`));
|
|
345524
|
+
const headings = paragraphs.filter((paragraph4) => {
|
|
344826
345525
|
const matchesCustomStyle = paragraph4.styleId != null && customStyles.some((entry) => normalizeStyleId2(entry.styleName) === normalizeStyleId2(paragraph4.styleId ?? ""));
|
|
344827
345526
|
const matchesOutline = includeOutlineEntries && paragraph4.headingLevel >= outline.from && paragraph4.headingLevel <= outline.to;
|
|
344828
345527
|
return matchesCustomStyle || matchesOutline;
|
|
344829
345528
|
}).length;
|
|
344830
|
-
const
|
|
345529
|
+
const tcSelection = parseTocTcSourceSelection(instruction);
|
|
345530
|
+
const tcEntries = listTocInlineEntries(context).filter((entry) => bodyParagraphs.has(`${entry.field.storyId}:${entry.field.blockId}`)).filter((entry) => {
|
|
344831
345531
|
const parsed = parseTocEntryInstruction(entry.field.descriptor.instructionText);
|
|
344832
|
-
|
|
344833
|
-
return false;
|
|
344834
|
-
if (sourceConfig.tcFieldLevels && (parsed.level < sourceConfig.tcFieldLevels.from || parsed.level > sourceConfig.tcFieldLevels.to))
|
|
344835
|
-
return false;
|
|
344836
|
-
return true;
|
|
345532
|
+
return matchesTocTcSourceSelection(tcSelection, parsed);
|
|
344837
345533
|
}).length;
|
|
344838
345534
|
return headings + tcEntries;
|
|
344839
345535
|
}
|
|
344840
345536
|
function usesV1EmptyTocSourceSet(instruction) {
|
|
344841
|
-
return parseQuotedSwitch(instruction, "t") != null && parseNumericSwitchRange(instruction, "o") == null && !/\\u\b/i.test(instruction) &&
|
|
345537
|
+
return parseQuotedSwitch(instruction, "t") != null && parseNumericSwitchRange(instruction, "o") == null && !/\\u\b/i.test(instruction) && !parseTocTcSourceSelection(instruction).enabled;
|
|
344842
345538
|
}
|
|
344843
345539
|
function countMaterializedTocResultParagraphs(context, field) {
|
|
344844
345540
|
if (field.descriptor.resultText.length === 0)
|
|
@@ -344861,6 +345557,7 @@ function isTocResultParagraph(rawXml) {
|
|
|
344861
345557
|
return /<[\w.-]+:pStyle\b[^>]*\b(?:[\w.-]+:)?val="TOC[1-9]"/.test(rawXml);
|
|
344862
345558
|
}
|
|
344863
345559
|
function applyTocPatch(instruction, patch) {
|
|
345560
|
+
const tcSelection = parseTocTcSourceSelection(instruction);
|
|
344864
345561
|
const nextParts = ["TOC"];
|
|
344865
345562
|
const outlineLevels = patch.outlineLevels ?? parseNumericSwitchRange(instruction, "o");
|
|
344866
345563
|
if (outlineLevels)
|
|
@@ -344877,12 +345574,17 @@ function applyTocPatch(instruction, patch) {
|
|
|
344877
345574
|
nextParts.push(`\\p "${separator}"`);
|
|
344878
345575
|
if ((patch.useAppliedOutlineLevel ?? instruction.includes("\\u")) === true)
|
|
344879
345576
|
nextParts.push("\\u");
|
|
344880
|
-
const tcIdentifier = patch.tcFieldIdentifier ??
|
|
345577
|
+
const tcIdentifier = patch.tcFieldIdentifier ?? tcSelection.identifier;
|
|
344881
345578
|
if (tcIdentifier != null)
|
|
344882
345579
|
nextParts.push(`\\f "${tcIdentifier}"`);
|
|
344883
|
-
|
|
345580
|
+
else if (tcSelection.hasFieldSwitch)
|
|
345581
|
+
nextParts.push("\\f");
|
|
345582
|
+
const tcLevels = patch.tcFieldLevels ?? tcSelection.levels;
|
|
344884
345583
|
if (tcLevels)
|
|
344885
345584
|
nextParts.push(`\\l "${tcLevels.from}-${tcLevels.to}"`);
|
|
345585
|
+
else if (tcSelection.hasLevelSwitch) {
|
|
345586
|
+
nextParts.push(tcSelection.levelArgument == null ? "\\l" : `\\l "${tcSelection.levelArgument}"`);
|
|
345587
|
+
}
|
|
344886
345588
|
return [...nextParts, ...readPreservedTocSwitchFragments(instruction)].join(" ");
|
|
344887
345589
|
}
|
|
344888
345590
|
function serializeTocEntryInstruction(text4, level, tableIdentifier, omitPageNumber) {
|
|
@@ -344980,9 +345682,19 @@ function parseTocCustomStyles2(value2) {
|
|
|
344980
345682
|
function normalizeStyleId2(value2) {
|
|
344981
345683
|
return value2.replace(/\s+/g, "").trim().toLowerCase();
|
|
344982
345684
|
}
|
|
344983
|
-
function seedMissingTocBookmarks(context, instruction) {
|
|
345685
|
+
function seedMissingTocBookmarks(context, instruction, field) {
|
|
344984
345686
|
const insertions = planMissingTocBookmarks(context, instruction);
|
|
344985
345687
|
if (insertions.length > 0) {
|
|
345688
|
+
const paragraphs = new Map(readBodyParagraphs(context, { includeListState: false }).map((paragraph4) => [paragraph4.blockId, paragraph4]));
|
|
345689
|
+
const names = new Map;
|
|
345690
|
+
for (const bookmark of insertions) {
|
|
345691
|
+
names.set(bookmark.fieldSource?.key ?? `${paragraphs.get(bookmark.blockId).storyId}:${bookmark.blockId}`, bookmark.name);
|
|
345692
|
+
for (const key2 of bookmark.fieldSourceKeys ?? [])
|
|
345693
|
+
names.set(key2, bookmark.name);
|
|
345694
|
+
}
|
|
345695
|
+
const prepared = prepareTocReplacement(context, field, instruction, names);
|
|
345696
|
+
if (!prepared.ok)
|
|
345697
|
+
return prepared;
|
|
344986
345698
|
const committed = insertBookmarksIntoParagraphs(context, insertions, "toc-bookmark-seed");
|
|
344987
345699
|
if (!committed.ok)
|
|
344988
345700
|
return committed;
|
|
@@ -344992,44 +345704,91 @@ function seedMissingTocBookmarks(context, instruction) {
|
|
|
344992
345704
|
function planMissingTocBookmarks(context, instruction) {
|
|
344993
345705
|
if (usesV1EmptyTocSourceSet(instruction))
|
|
344994
345706
|
return [];
|
|
344995
|
-
const
|
|
344996
|
-
const existingNames = new Set;
|
|
344997
|
-
|
|
344998
|
-
|
|
344999
|
-
|
|
345000
|
-
|
|
345001
|
-
|
|
345002
|
-
|
|
345003
|
-
|
|
345004
|
-
}
|
|
345707
|
+
const bookmarks = readBookmarkEntries(context);
|
|
345708
|
+
const existingNames = new Set(bookmarks.map((bookmark) => bookmark.name));
|
|
345709
|
+
const existingParagraphs = new Set(bookmarks.filter((bookmark) => bookmark.name.startsWith("_Toc")).map((bookmark) => `${bookmark.storyId}:${bookmark.blockId}`));
|
|
345710
|
+
const paragraphs = readBodyParagraphs(context, { includeListState: false });
|
|
345711
|
+
const bodyKeys = new Set(paragraphs.map((paragraph4) => `${paragraph4.storyId}:${paragraph4.blockId}`));
|
|
345712
|
+
const canonicalFields = listCanonicalFieldEntries(context);
|
|
345713
|
+
const tcFields = canonicalFields.filter((field) => instructionKeyword(field.descriptor.instructionText) === "TC" && bodyKeys.has(`${field.storyId}:${field.blockId}`));
|
|
345714
|
+
const incompleteFields = canonicalFields.filter((field) => !field.descriptor.complete);
|
|
345715
|
+
const tcBookmarkNames = resolveTocTcBookmarkNames(bookmarks, paragraphs, tcFields);
|
|
345005
345716
|
let nextOrdinal = nextTocBookmarkOrdinal(existingNames);
|
|
345006
345717
|
const insertions = [];
|
|
345007
|
-
|
|
345008
|
-
|
|
345009
|
-
|
|
345010
|
-
|
|
345011
|
-
|
|
345012
|
-
|
|
345013
|
-
nextOrdinal += 1;
|
|
345014
|
-
name = buildTocBookmarkName(nextOrdinal);
|
|
345015
|
-
}
|
|
345016
|
-
insertions.push({ blockId: paragraph4.blockId, name });
|
|
345017
|
-
existing.set(key2, name);
|
|
345718
|
+
const genericByParagraph = new Map;
|
|
345719
|
+
const paragraphsByKey = new Map(paragraphs.map((paragraph4) => [`${paragraph4.storyId}:${paragraph4.blockId}`, paragraph4]));
|
|
345720
|
+
const allocateName = () => {
|
|
345721
|
+
let name = buildTocBookmarkName(nextOrdinal++);
|
|
345722
|
+
while (existingNames.has(name))
|
|
345723
|
+
name = buildTocBookmarkName(nextOrdinal++);
|
|
345018
345724
|
existingNames.add(name);
|
|
345019
|
-
|
|
345020
|
-
}
|
|
345021
|
-
return insertions;
|
|
345022
|
-
}
|
|
345023
|
-
function listIncludedTocParagraphs(context, instruction) {
|
|
345725
|
+
return name;
|
|
345726
|
+
};
|
|
345024
345727
|
const customStyles = parseTocCustomStyles2(parseQuotedSwitch(instruction, "t") ?? "");
|
|
345025
345728
|
const explicitOutlineRange = parseNumericSwitchRange(instruction, "o");
|
|
345026
345729
|
const outlineRange = explicitOutlineRange ?? { from: 1, to: 3 };
|
|
345027
345730
|
const includeOutlineEntries = customStyles.length === 0 || explicitOutlineRange != null;
|
|
345028
|
-
|
|
345731
|
+
for (const paragraph4 of paragraphs) {
|
|
345029
345732
|
const matchesCustomStyle = paragraph4.styleId != null && customStyles.some((entry) => normalizeStyleId2(entry.styleName) === normalizeStyleId2(paragraph4.styleId ?? ""));
|
|
345030
345733
|
const matchesOutline = includeOutlineEntries && paragraph4.headingLevel >= outlineRange.from && paragraph4.headingLevel <= outlineRange.to;
|
|
345031
|
-
|
|
345032
|
-
|
|
345734
|
+
if ((matchesCustomStyle || matchesOutline) && !existingParagraphs.has(`${paragraph4.storyId}:${paragraph4.blockId}`)) {
|
|
345735
|
+
const insertion = { blockId: paragraph4.blockId, name: allocateName() };
|
|
345736
|
+
insertions.push(insertion);
|
|
345737
|
+
genericByParagraph.set(`${paragraph4.storyId}:${paragraph4.blockId}`, insertion);
|
|
345738
|
+
}
|
|
345739
|
+
}
|
|
345740
|
+
const selection = parseTocTcSourceSelection(instruction);
|
|
345741
|
+
const missingFields = tcFields.filter((field) => matchesTocTcSourceSelection(selection, parseTocEntryInstruction(field.descriptor.instructionText)) && !tcBookmarkNames.has(tocTcFieldSourceKey(field))).map((field) => {
|
|
345742
|
+
const key2 = tocTcFieldSourceKey(field);
|
|
345743
|
+
const fieldSource = { key: key2, byteStart: field.descriptor.byteStart, byteEnd: field.descriptor.byteEnd };
|
|
345744
|
+
const paragraphKey = `${field.storyId}:${field.blockId}`;
|
|
345745
|
+
const paragraph4 = paragraphsByKey.get(paragraphKey);
|
|
345746
|
+
const bytes = readPartBytes2(context, field.partUri);
|
|
345747
|
+
const validCanonicalField = Boolean(field.descriptor.complete && Number.isInteger(fieldSource.byteStart) && Number.isInteger(fieldSource.byteEnd) && fieldSource.byteStart >= paragraph4.byteStart && fieldSource.byteEnd > fieldSource.byteStart && bytes && fieldSource.byteEnd <= bytes.length);
|
|
345748
|
+
return { field, key: key2, fieldSource, paragraphKey, paragraph: paragraph4, validCanonicalField };
|
|
345749
|
+
});
|
|
345750
|
+
const fieldsByParagraph = new Map;
|
|
345751
|
+
for (const source of missingFields) {
|
|
345752
|
+
const group = fieldsByParagraph.get(source.paragraphKey) ?? [];
|
|
345753
|
+
group.push(source);
|
|
345754
|
+
fieldsByParagraph.set(source.paragraphKey, group);
|
|
345755
|
+
}
|
|
345756
|
+
const collidingKeys = new Set;
|
|
345757
|
+
for (const group of fieldsByParagraph.values()) {
|
|
345758
|
+
group.sort((left, right) => left.fieldSource.byteStart - right.fieldSource.byteStart);
|
|
345759
|
+
let component = [];
|
|
345760
|
+
let componentEnd = -1;
|
|
345761
|
+
const finishComponent = () => {
|
|
345762
|
+
if (component.length > 1 && component.every((source) => source.validCanonicalField) && !incompleteFields.some((field) => field.storyId === component[0].field.storyId && field.blockId === component[0].field.blockId && field.descriptor.byteStart >= component[0].fieldSource.byteStart && field.descriptor.byteStart < componentEnd)) {
|
|
345763
|
+
for (const source of component)
|
|
345764
|
+
collidingKeys.add(source.key);
|
|
345765
|
+
}
|
|
345766
|
+
};
|
|
345767
|
+
for (const source of group) {
|
|
345768
|
+
if (source.fieldSource.byteStart >= componentEnd) {
|
|
345769
|
+
finishComponent();
|
|
345770
|
+
component = [];
|
|
345771
|
+
componentEnd = -1;
|
|
345772
|
+
}
|
|
345773
|
+
component.push(source);
|
|
345774
|
+
componentEnd = Math.max(componentEnd, source.fieldSource.byteEnd);
|
|
345775
|
+
}
|
|
345776
|
+
finishComponent();
|
|
345777
|
+
}
|
|
345778
|
+
for (const { field, key: key2, fieldSource, paragraphKey, paragraph: paragraph4, validCanonicalField } of missingFields) {
|
|
345779
|
+
if (validCanonicalField && (collidingKeys.has(key2) || !canPlaceBookmarkAtFieldSource(paragraph4, fieldSource))) {
|
|
345780
|
+
let generic = genericByParagraph.get(paragraphKey);
|
|
345781
|
+
if (!generic) {
|
|
345782
|
+
generic = { blockId: field.blockId, name: allocateName() };
|
|
345783
|
+
genericByParagraph.set(paragraphKey, generic);
|
|
345784
|
+
insertions.push(generic);
|
|
345785
|
+
}
|
|
345786
|
+
(generic.fieldSourceKeys ?? (generic.fieldSourceKeys = [])).push(key2);
|
|
345787
|
+
} else {
|
|
345788
|
+
insertions.push({ blockId: field.blockId, name: allocateName(), fieldSource });
|
|
345789
|
+
}
|
|
345790
|
+
}
|
|
345791
|
+
return insertions;
|
|
345033
345792
|
}
|
|
345034
345793
|
function nextTocBookmarkOrdinal(existingNames) {
|
|
345035
345794
|
let largest = 0;
|
|
@@ -345128,14 +345887,17 @@ function insertTrackedToc(context, input) {
|
|
|
345128
345887
|
}));
|
|
345129
345888
|
if (missing2.some((bookmark) => !bookmark.paragraph))
|
|
345130
345889
|
return unavailable4("A TOC heading target is unavailable.");
|
|
345131
|
-
const names = new Map
|
|
345132
|
-
|
|
345133
|
-
bookmark.name
|
|
345134
|
-
|
|
345890
|
+
const names = new Map;
|
|
345891
|
+
for (const bookmark of missing2) {
|
|
345892
|
+
names.set(bookmark.fieldSource?.key ?? `${bookmark.paragraph.storyId}:${bookmark.blockId}`, bookmark.name);
|
|
345893
|
+
for (const key2 of bookmark.fieldSourceKeys ?? [])
|
|
345894
|
+
names.set(key2, bookmark.name);
|
|
345895
|
+
}
|
|
345135
345896
|
let tocXml = buildTocFieldXml(context, input.instruction, {
|
|
345136
345897
|
bare: true,
|
|
345137
345898
|
tocBookmarkNames: names,
|
|
345138
|
-
reservedParaIds: occupied
|
|
345899
|
+
reservedParaIds: occupied,
|
|
345900
|
+
insertionByteStart: insertByte
|
|
345139
345901
|
});
|
|
345140
345902
|
tocXml = tocXml.replace(/<w:p\b[^>]*>/g, (open2) => /\sxmlns:w14\s*=/.test(open2) ? open2 : open2.replace("<w:p", '<w:p xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"'));
|
|
345141
345903
|
const tocRanges = collectXmlElementRanges(tocXml, {
|
|
@@ -345147,17 +345909,8 @@ function insertTrackedToc(context, input) {
|
|
|
345147
345909
|
const tocParagraphs = tocRanges.ranges.filter((range) => range.tag.namespaceUri === bindings.get("w") && range.tag.localName === "p");
|
|
345148
345910
|
if (!tocParagraphs.length)
|
|
345149
345911
|
return unavailable4("The generated TOC has no paragraphs.");
|
|
345150
|
-
const coordinated = context.isCollaborativeSession() && !input.dryRun ? context.allocateCollaborativeStoryParaIds({
|
|
345151
|
-
count: tocParagraphs.length,
|
|
345152
|
-
inUse: [...occupied]
|
|
345153
|
-
}) : null;
|
|
345154
|
-
if (context.isCollaborativeSession() && !input.dryRun && (coordinated?.length !== tocParagraphs.length || new Set(coordinated.map((id) => id.toUpperCase())).size !== coordinated.length || coordinated.some((id) => !/^[0-9a-f]{8}$/i.test(id) || occupied.has(id.toUpperCase())))) {
|
|
345155
|
-
return unavailable4("TOC insertion could not reserve its complete paragraph identity batch.");
|
|
345156
|
-
}
|
|
345157
345912
|
let nextParagraphId = 184549376;
|
|
345158
|
-
const paragraphIds = tocParagraphs.map((
|
|
345159
|
-
if (coordinated)
|
|
345160
|
-
return coordinated[index2];
|
|
345913
|
+
const paragraphIds = tocParagraphs.map(() => {
|
|
345161
345914
|
let id;
|
|
345162
345915
|
do {
|
|
345163
345916
|
id = (++nextParagraphId).toString(16).toUpperCase().padStart(8, "0");
|
|
@@ -345182,6 +345935,12 @@ function insertTrackedToc(context, input) {
|
|
|
345182
345935
|
const preview = prepareTrackedTocInsertion({ xml: tocXml, namespaceBindings: bindings, stamp });
|
|
345183
345936
|
if (!preview)
|
|
345184
345937
|
return unavailable4("The generated TOC content cannot be represented by supported run revisions.");
|
|
345938
|
+
if (context.isCollaborativeSession() && !input.dryRun)
|
|
345939
|
+
return {
|
|
345940
|
+
ok: false,
|
|
345941
|
+
code: "INVALID_CONTEXT",
|
|
345942
|
+
message: "create-table-of-contents-tracked: unsupported-context"
|
|
345943
|
+
};
|
|
345185
345944
|
const ids = reserveTrackedReferenceRevisionIds(context, preview.wordIds.length + missing2.length * 2, input.dryRun);
|
|
345186
345945
|
if (!ids)
|
|
345187
345946
|
return unavailable4("TOC insertion could not reserve its complete revision identity batch.");
|
|
@@ -345198,24 +345957,29 @@ function insertTrackedToc(context, input) {
|
|
|
345198
345957
|
const storyIds = new Set([input.storyId]);
|
|
345199
345958
|
let idIndex = preview.wordIds.length;
|
|
345200
345959
|
let bookmarkId = nextBookmarkNumericId(context);
|
|
345960
|
+
const bookmarkMarkers = [];
|
|
345201
345961
|
for (const bookmark of missing2) {
|
|
345202
345962
|
const paragraph4 = bookmark.paragraph;
|
|
345203
|
-
const
|
|
345204
|
-
|
|
345963
|
+
const markerBindings = readBookmarkInsertionNamespaceBindings(paragraph4, bookmark);
|
|
345964
|
+
if (!markerBindings)
|
|
345965
|
+
return unavailable4("TOC bookmark namespace context is unavailable.");
|
|
345966
|
+
const { startXml, endXml } = buildParagraphBookmarkMarkers(paragraph4, bookmark, bookmarkId++);
|
|
345205
345967
|
const markers = [startXml, endXml].map((xml) => prepareTrackedInlineXmlReplacement({
|
|
345206
345968
|
beforeXml: "",
|
|
345207
345969
|
afterXml: xml,
|
|
345208
|
-
namespaceBindings:
|
|
345970
|
+
namespaceBindings: markerBindings,
|
|
345209
345971
|
stamp: { ...stamp, revisionId: ids[idIndex], revisionIds: [ids[idIndex++]] }
|
|
345210
345972
|
}));
|
|
345211
345973
|
if (!markers[0] || !markers[1])
|
|
345212
345974
|
return unavailable4("TOC bookmark markers cannot be revision marked.");
|
|
345213
|
-
|
|
345214
|
-
|
|
345215
|
-
|
|
345216
|
-
|
|
345975
|
+
bookmarkMarkers.push({ ...bookmark, startXml: markers[0].xml, endXml: markers[1].xml });
|
|
345976
|
+
}
|
|
345977
|
+
const grouped = prepareBookmarkParagraphGroups(paragraphs, bookmarkMarkers);
|
|
345978
|
+
if (!grouped)
|
|
345979
|
+
return unavailable4("TOC bookmark markers could not be placed.");
|
|
345980
|
+
for (const { paragraph: paragraph4, xml } of grouped) {
|
|
345217
345981
|
const perPart2 = edits.get(paragraph4.partUri) ?? [];
|
|
345218
|
-
perPart2.push({ start: paragraph4.byteStart, end: paragraph4.byteEnd, bytes: encodeXml(
|
|
345982
|
+
perPart2.push({ start: paragraph4.byteStart, end: paragraph4.byteEnd, bytes: encodeXml(xml) });
|
|
345219
345983
|
edits.set(paragraph4.partUri, perPart2);
|
|
345220
345984
|
storyIds.add(paragraph4.storyId);
|
|
345221
345985
|
}
|
|
@@ -346183,10 +346947,14 @@ class V2CreateAdapter {
|
|
|
346183
346947
|
return { success: true, section, ...trackedChangeRefs.length ? { trackedChangeRefs } : {} };
|
|
346184
346948
|
}
|
|
346185
346949
|
tableOfContents(input, options) {
|
|
346950
|
+
const guard = beginCanonicalMutation(this.context, options, "create.tableOfContents");
|
|
346951
|
+
if (guard)
|
|
346952
|
+
return createFailure(guard.code, guard.message);
|
|
346953
|
+
const instruction = buildEffectiveTocInstruction(input.instruction, input.config);
|
|
346954
|
+
const locked = guardTocBookmarkInsertion(this.context, instruction, "create.tableOfContents");
|
|
346955
|
+
if (locked)
|
|
346956
|
+
return createFailure(locked.code, locked.message);
|
|
346186
346957
|
if (options?.changeMode === "tracked") {
|
|
346187
|
-
const guard = beginCanonicalMutation(this.context, options, "create.tableOfContents");
|
|
346188
|
-
if (guard)
|
|
346189
|
-
return createFailure(guard.code, guard.message);
|
|
346190
346958
|
const paragraphInput = { at: input.at, text: "" };
|
|
346191
346959
|
const story = resolveStoryTarget(this.context, effectiveStoryLocator(paragraphInput));
|
|
346192
346960
|
if ("failure" in story)
|
|
@@ -346206,7 +346974,7 @@ class V2CreateAdapter {
|
|
|
346206
346974
|
...site,
|
|
346207
346975
|
storyId: anchor.storyId,
|
|
346208
346976
|
documentBoundary: input.at?.kind === "documentStart" || input.at?.kind === "documentEnd" ? input.at.kind : undefined,
|
|
346209
|
-
instruction
|
|
346977
|
+
instruction,
|
|
346210
346978
|
dryRun: options.dryRun
|
|
346211
346979
|
});
|
|
346212
346980
|
if (!inserted.ok)
|
|
@@ -346219,6 +346987,8 @@ class V2CreateAdapter {
|
|
|
346219
346987
|
toc: { kind: "block", nodeType: "tableOfContents", nodeId: "(dry-run)" }
|
|
346220
346988
|
};
|
|
346221
346989
|
}
|
|
346990
|
+
if (this.context.isCollaborativeSession())
|
|
346991
|
+
return createFailure("INVALID_CONTEXT", "create-table-of-contents: unsupported-context");
|
|
346222
346992
|
const created = this.paragraph({ at: input.at, text: "" }, options);
|
|
346223
346993
|
if (!created.success) {
|
|
346224
346994
|
return {
|
|
@@ -346227,7 +346997,6 @@ class V2CreateAdapter {
|
|
|
346227
346997
|
};
|
|
346228
346998
|
}
|
|
346229
346999
|
const nodeId = created.paragraph.nodeId;
|
|
346230
|
-
const instruction = buildEffectiveTocInstruction(input.instruction, input.config);
|
|
346231
347000
|
const committed = prependTocFieldToGeneratedParagraph(this.context, nodeId, instruction, "create-table-of-contents", undefined, input.at?.kind === "documentStart" || input.at?.kind === "documentEnd" ? input.at.kind : undefined);
|
|
346232
347001
|
if (!committed.ok)
|
|
346233
347002
|
return createFailure(committed.code, committed.message);
|
|
@@ -346958,107 +347727,6 @@ var init_adapter14 = __esm(() => {
|
|
|
346958
347727
|
VALUED_TOC_SWITCHES = new Set(["\\o", "\\n", "\\p", "\\f", "\\l"]);
|
|
346959
347728
|
});
|
|
346960
347729
|
|
|
346961
|
-
// ../../../v2/document-api-v2-adapter/dist/formatting/paragraph-property-order.js
|
|
346962
|
-
function setParagraphPropertyChild(children2, localName2, xml) {
|
|
346963
|
-
const parsed = parseSingleElement(xml);
|
|
346964
|
-
const existingIndex = children2.findIndex((child) => child.localName === localName2);
|
|
346965
|
-
if (existingIndex >= 0) {
|
|
346966
|
-
const next = [...children2];
|
|
346967
|
-
next[existingIndex] = parsed;
|
|
346968
|
-
return next;
|
|
346969
|
-
}
|
|
346970
|
-
const targetRank = PARAGRAPH_PROPERTY_CHILD_RANK.get(localName2);
|
|
346971
|
-
if (targetRank == null)
|
|
346972
|
-
throw new Error(`Unknown paragraph property child: ${localName2}`);
|
|
346973
|
-
let insertionIndex = 0;
|
|
346974
|
-
for (const [index2, child] of children2.entries()) {
|
|
346975
|
-
const childRank = paragraphPropertyRankRange(child);
|
|
346976
|
-
if (!childRank)
|
|
346977
|
-
continue;
|
|
346978
|
-
if (childRank.minimum > targetRank) {
|
|
346979
|
-
return [...children2.slice(0, index2), parsed, ...children2.slice(index2)];
|
|
346980
|
-
}
|
|
346981
|
-
if (childRank.maximum >= targetRank) {
|
|
346982
|
-
throw new ParagraphPropertyMutationUnavailableError(`Cannot safely insert w:${localName2} within mc:AlternateContent paragraph properties`);
|
|
346983
|
-
}
|
|
346984
|
-
insertionIndex = index2 + 1;
|
|
346985
|
-
}
|
|
346986
|
-
return [...children2.slice(0, insertionIndex), parsed, ...children2.slice(insertionIndex)];
|
|
346987
|
-
}
|
|
346988
|
-
function paragraphPropertyRankRange(child) {
|
|
346989
|
-
const directRank = PARAGRAPH_PROPERTY_CHILD_RANK.get(child.localName);
|
|
346990
|
-
if (directRank != null)
|
|
346991
|
-
return { minimum: directRank, maximum: directRank };
|
|
346992
|
-
if (child.localName !== "AlternateContent")
|
|
346993
|
-
return null;
|
|
346994
|
-
const alternateContent = parseContainerXml(child.xml, "AlternateContent");
|
|
346995
|
-
if (!alternateContent)
|
|
346996
|
-
return null;
|
|
346997
|
-
const ranks = parseTopLevelChildren(alternateContent.inner).flatMap((branch) => {
|
|
346998
|
-
if (branch.localName !== "Choice" && branch.localName !== "Fallback")
|
|
346999
|
-
return [];
|
|
347000
|
-
const branchContainer = parseContainerXml(branch.xml, branch.localName);
|
|
347001
|
-
if (!branchContainer)
|
|
347002
|
-
return [];
|
|
347003
|
-
return parseTopLevelChildren(branchContainer.inner).flatMap((candidate2) => {
|
|
347004
|
-
const range = paragraphPropertyRankRange(candidate2);
|
|
347005
|
-
return range ? [range.minimum, range.maximum] : [];
|
|
347006
|
-
});
|
|
347007
|
-
});
|
|
347008
|
-
if (ranks.length === 0)
|
|
347009
|
-
return null;
|
|
347010
|
-
return { minimum: Math.min(...ranks), maximum: Math.max(...ranks) };
|
|
347011
|
-
}
|
|
347012
|
-
var PARAGRAPH_PROPERTY_CHILD_ORDER, PARAGRAPH_PROPERTY_CHILD_RANK, ParagraphPropertyMutationUnavailableError;
|
|
347013
|
-
var init_paragraph_property_order = __esm(() => {
|
|
347014
|
-
init_common();
|
|
347015
|
-
PARAGRAPH_PROPERTY_CHILD_ORDER = [
|
|
347016
|
-
"pStyle",
|
|
347017
|
-
"keepNext",
|
|
347018
|
-
"keepLines",
|
|
347019
|
-
"pageBreakBefore",
|
|
347020
|
-
"framePr",
|
|
347021
|
-
"widowControl",
|
|
347022
|
-
"numPr",
|
|
347023
|
-
"suppressLineNumbers",
|
|
347024
|
-
"pBdr",
|
|
347025
|
-
"shd",
|
|
347026
|
-
"tabs",
|
|
347027
|
-
"suppressAutoHyphens",
|
|
347028
|
-
"kinsoku",
|
|
347029
|
-
"wordWrap",
|
|
347030
|
-
"overflowPunct",
|
|
347031
|
-
"topLinePunct",
|
|
347032
|
-
"autoSpaceDE",
|
|
347033
|
-
"autoSpaceDN",
|
|
347034
|
-
"bidi",
|
|
347035
|
-
"adjustRightInd",
|
|
347036
|
-
"snapToGrid",
|
|
347037
|
-
"spacing",
|
|
347038
|
-
"ind",
|
|
347039
|
-
"contextualSpacing",
|
|
347040
|
-
"mirrorIndents",
|
|
347041
|
-
"suppressOverlap",
|
|
347042
|
-
"jc",
|
|
347043
|
-
"textDirection",
|
|
347044
|
-
"textAlignment",
|
|
347045
|
-
"textboxTightWrap",
|
|
347046
|
-
"outlineLvl",
|
|
347047
|
-
"divId",
|
|
347048
|
-
"cnfStyle",
|
|
347049
|
-
"rPr",
|
|
347050
|
-
"sectPr",
|
|
347051
|
-
"pPrChange"
|
|
347052
|
-
];
|
|
347053
|
-
PARAGRAPH_PROPERTY_CHILD_RANK = new Map(PARAGRAPH_PROPERTY_CHILD_ORDER.map((name, index2) => [name, index2]));
|
|
347054
|
-
ParagraphPropertyMutationUnavailableError = class ParagraphPropertyMutationUnavailableError extends Error {
|
|
347055
|
-
constructor(message) {
|
|
347056
|
-
super(message);
|
|
347057
|
-
this.name = "ParagraphPropertyMutationUnavailableError";
|
|
347058
|
-
}
|
|
347059
|
-
};
|
|
347060
|
-
});
|
|
347061
|
-
|
|
347062
347730
|
// ../../../v2/document-api-v2-adapter/dist/formatting/paragraph.js
|
|
347063
347731
|
function classifyParagraphNodeType(input) {
|
|
347064
347732
|
if (input.headingLevel > 0)
|
|
@@ -402390,7 +403058,7 @@ var init_capability_matrix = __esm(() => {
|
|
|
402390
403058
|
});
|
|
402391
403059
|
});
|
|
402392
403060
|
|
|
402393
|
-
//
|
|
403061
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/map.js
|
|
402394
403062
|
var create = () => new Map, copy = (m) => {
|
|
402395
403063
|
const r = create();
|
|
402396
403064
|
m.forEach((v, k) => {
|
|
@@ -402412,10 +403080,10 @@ var create = () => new Map, copy = (m) => {
|
|
|
402412
403080
|
return false;
|
|
402413
403081
|
};
|
|
402414
403082
|
|
|
402415
|
-
//
|
|
403083
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/set.js
|
|
402416
403084
|
var create2 = () => new Set;
|
|
402417
403085
|
|
|
402418
|
-
//
|
|
403086
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/array.js
|
|
402419
403087
|
var last = (arr) => arr[arr.length - 1], appendTo = (dest, src) => {
|
|
402420
403088
|
for (let i2 = 0;i2 < src.length; i2++) {
|
|
402421
403089
|
dest.push(src[i2]);
|
|
@@ -402433,7 +403101,7 @@ var init_array2 = __esm(() => {
|
|
|
402433
403101
|
isArray = Array.isArray;
|
|
402434
403102
|
});
|
|
402435
403103
|
|
|
402436
|
-
//
|
|
403104
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/observable.js
|
|
402437
403105
|
class ObservableV2 {
|
|
402438
403106
|
constructor() {
|
|
402439
403107
|
this._observers = create();
|
|
@@ -402500,7 +403168,7 @@ var init_observable = __esm(() => {
|
|
|
402500
403168
|
init_array2();
|
|
402501
403169
|
});
|
|
402502
403170
|
|
|
402503
|
-
//
|
|
403171
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/math.js
|
|
402504
403172
|
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;
|
|
402505
403173
|
var init_math = __esm(() => {
|
|
402506
403174
|
floor = Math.floor;
|
|
@@ -402508,7 +403176,7 @@ var init_math = __esm(() => {
|
|
|
402508
403176
|
pow = Math.pow;
|
|
402509
403177
|
});
|
|
402510
403178
|
|
|
402511
|
-
//
|
|
403179
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/binary.js
|
|
402512
403180
|
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;
|
|
402513
403181
|
var init_binary = __esm(() => {
|
|
402514
403182
|
BIT18 = 1 << 17;
|
|
@@ -402542,7 +403210,7 @@ var init_binary = __esm(() => {
|
|
|
402542
403210
|
BITS30 = BIT31 - 1;
|
|
402543
403211
|
});
|
|
402544
403212
|
|
|
402545
|
-
//
|
|
403213
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/number.js
|
|
402546
403214
|
var MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, LOWEST_INT32, isInteger2;
|
|
402547
403215
|
var init_number2 = __esm(() => {
|
|
402548
403216
|
init_math();
|
|
@@ -402552,7 +403220,7 @@ var init_number2 = __esm(() => {
|
|
|
402552
403220
|
isInteger2 = Number.isInteger || ((num) => typeof num === "number" && isFinite(num) && floor(num) === num);
|
|
402553
403221
|
});
|
|
402554
403222
|
|
|
402555
|
-
//
|
|
403223
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/string.js
|
|
402556
403224
|
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) => {
|
|
402557
403225
|
const encodedString = unescape(encodeURIComponent(str));
|
|
402558
403226
|
const len = encodedString.length;
|
|
@@ -402576,7 +403244,7 @@ var init_string2 = __esm(() => {
|
|
|
402576
403244
|
}
|
|
402577
403245
|
});
|
|
402578
403246
|
|
|
402579
|
-
//
|
|
403247
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/encoding.js
|
|
402580
403248
|
class Encoder {
|
|
402581
403249
|
constructor() {
|
|
402582
403250
|
this.cpos = 0;
|
|
@@ -402842,14 +403510,14 @@ var init_encoding = __esm(() => {
|
|
|
402842
403510
|
};
|
|
402843
403511
|
});
|
|
402844
403512
|
|
|
402845
|
-
//
|
|
403513
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/error.js
|
|
402846
403514
|
var create3 = (s) => new Error(s), methodUnimplemented = () => {
|
|
402847
403515
|
throw create3("Method unimplemented");
|
|
402848
403516
|
}, unexpectedCase = () => {
|
|
402849
403517
|
throw create3("Unexpected case");
|
|
402850
403518
|
};
|
|
402851
403519
|
|
|
402852
|
-
//
|
|
403520
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/decoding.js
|
|
402853
403521
|
class Decoder {
|
|
402854
403522
|
constructor(uint8Array) {
|
|
402855
403523
|
this.arr = uint8Array;
|
|
@@ -403040,7 +403708,7 @@ var init_decoding = __esm(() => {
|
|
|
403040
403708
|
};
|
|
403041
403709
|
});
|
|
403042
403710
|
|
|
403043
|
-
//
|
|
403711
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/webcrypto.node.js
|
|
403044
403712
|
import { webcrypto } from "node:crypto";
|
|
403045
403713
|
var subtle, getRandomValues;
|
|
403046
403714
|
var init_webcrypto_node = __esm(() => {
|
|
@@ -403048,29 +403716,29 @@ var init_webcrypto_node = __esm(() => {
|
|
|
403048
403716
|
getRandomValues = webcrypto.getRandomValues.bind(webcrypto);
|
|
403049
403717
|
});
|
|
403050
403718
|
|
|
403051
|
-
//
|
|
403719
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/random.js
|
|
403052
403720
|
var uint322 = () => getRandomValues(new Uint32Array(1))[0], uuidv4Template, uuidv42 = () => uuidv4Template.replace(/[018]/g, (c) => (c ^ uint322() & 15 >> c / 4).toString(16));
|
|
403053
403721
|
var init_random = __esm(() => {
|
|
403054
403722
|
init_webcrypto_node();
|
|
403055
403723
|
uuidv4Template = [1e7] + -1000 + -4000 + -8000 + -100000000000;
|
|
403056
403724
|
});
|
|
403057
403725
|
|
|
403058
|
-
//
|
|
403726
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/time.js
|
|
403059
403727
|
var getUnixTime;
|
|
403060
403728
|
var init_time = __esm(() => {
|
|
403061
403729
|
getUnixTime = Date.now;
|
|
403062
403730
|
});
|
|
403063
403731
|
|
|
403064
|
-
//
|
|
403732
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/promise.js
|
|
403065
403733
|
var create4 = (f) => new Promise(f), all2;
|
|
403066
403734
|
var init_promise2 = __esm(() => {
|
|
403067
403735
|
all2 = Promise.all.bind(Promise);
|
|
403068
403736
|
});
|
|
403069
403737
|
|
|
403070
|
-
//
|
|
403738
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/conditions.js
|
|
403071
403739
|
var undefinedToNull = (v) => v === undefined ? null : v;
|
|
403072
403740
|
|
|
403073
|
-
//
|
|
403741
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/storage.js
|
|
403074
403742
|
class VarStoragePolyfill {
|
|
403075
403743
|
constructor() {
|
|
403076
403744
|
this.map = new Map;
|
|
@@ -403094,13 +403762,13 @@ var init_storage = __esm(() => {
|
|
|
403094
403762
|
varStorage = _localStorage;
|
|
403095
403763
|
});
|
|
403096
403764
|
|
|
403097
|
-
//
|
|
403765
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/trait/equality.js
|
|
403098
403766
|
var EqualityTraitSymbol, equals = (a, b) => a === b || !!a?.[EqualityTraitSymbol]?.(b) || false;
|
|
403099
403767
|
var init_equality = __esm(() => {
|
|
403100
403768
|
EqualityTraitSymbol = Symbol("Equality");
|
|
403101
403769
|
});
|
|
403102
403770
|
|
|
403103
|
-
//
|
|
403771
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/object.js
|
|
403104
403772
|
var assign, keys, forEach = (obj, f) => {
|
|
403105
403773
|
for (const key2 in obj) {
|
|
403106
403774
|
f(obj[key2], key2);
|
|
@@ -403139,7 +403807,7 @@ var init_object2 = __esm(() => {
|
|
|
403139
403807
|
freeze = Object.freeze;
|
|
403140
403808
|
});
|
|
403141
403809
|
|
|
403142
|
-
//
|
|
403810
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/function.js
|
|
403143
403811
|
var callAll = (fs, args, i2 = 0) => {
|
|
403144
403812
|
try {
|
|
403145
403813
|
for (;i2 < fs.length; i2++) {
|
|
@@ -403228,7 +403896,7 @@ var init_function = __esm(() => {
|
|
|
403228
403896
|
init_equality();
|
|
403229
403897
|
});
|
|
403230
403898
|
|
|
403231
|
-
//
|
|
403899
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/environment.js
|
|
403232
403900
|
var isNode, isBrowser, isMac, params, args, computeParams = () => {
|
|
403233
403901
|
if (params === undefined) {
|
|
403234
403902
|
if (isNode) {
|
|
@@ -403282,7 +403950,7 @@ var init_environment = __esm(() => {
|
|
|
403282
403950
|
supportsColor = forceColor || !hasParam2("--no-colors") && !hasConf("no-color") && (!isNode || process.stdout.isTTY) && (!isNode || hasParam2("--color") || getVariable("COLORTERM") !== null || (getVariable("TERM") || "").includes("color"));
|
|
403283
403951
|
});
|
|
403284
403952
|
|
|
403285
|
-
//
|
|
403953
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/buffer.js
|
|
403286
403954
|
var createUint8ArrayFromLen = (len) => new Uint8Array(len), createUint8ArrayViewFromArrayBuffer = (buffer, byteOffset, length2) => new Uint8Array(buffer, byteOffset, length2), createUint8ArrayFromArrayBuffer = (buffer) => new Uint8Array(buffer), toBase64Browser = (bytes) => {
|
|
403287
403955
|
let s = "";
|
|
403288
403956
|
for (let i2 = 0;i2 < bytes.byteLength; i2++) {
|
|
@@ -403311,13 +403979,13 @@ var init_buffer = __esm(() => {
|
|
|
403311
403979
|
fromBase64 = isBrowser ? fromBase64Browser : fromBase64Node;
|
|
403312
403980
|
});
|
|
403313
403981
|
|
|
403314
|
-
//
|
|
403982
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/symbol.js
|
|
403315
403983
|
var create5;
|
|
403316
403984
|
var init_symbol = __esm(() => {
|
|
403317
403985
|
create5 = Symbol;
|
|
403318
403986
|
});
|
|
403319
403987
|
|
|
403320
|
-
//
|
|
403988
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.common.js
|
|
403321
403989
|
var BOLD, UNBOLD, BLUE, GREY, GREEN, RED, PURPLE, ORANGE, UNCOLOR, computeNoColorLoggingArgs = (args2) => {
|
|
403322
403990
|
if (args2.length === 1 && args2[0]?.constructor === Function) {
|
|
403323
403991
|
args2 = args2[0]();
|
|
@@ -403361,7 +404029,7 @@ var init_logging_common = __esm(() => {
|
|
|
403361
404029
|
lastLoggingTime = getUnixTime();
|
|
403362
404030
|
});
|
|
403363
404031
|
|
|
403364
|
-
//
|
|
404032
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/logging.node.js
|
|
403365
404033
|
var _nodeStyleMap, computeNodeLoggingArgs = (args2) => {
|
|
403366
404034
|
if (args2.length === 1 && args2[0]?.constructor === Function) {
|
|
403367
404035
|
args2 = args2[0]();
|
|
@@ -403418,7 +404086,7 @@ var init_logging_node = __esm(() => {
|
|
|
403418
404086
|
computeLoggingArgs = supportsColor ? computeNodeLoggingArgs : computeNoColorLoggingArgs;
|
|
403419
404087
|
});
|
|
403420
404088
|
|
|
403421
|
-
//
|
|
404089
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/iterator.js
|
|
403422
404090
|
var createIterator = (next) => ({
|
|
403423
404091
|
[Symbol.iterator]() {
|
|
403424
404092
|
return this;
|
|
@@ -403435,7 +404103,7 @@ var createIterator = (next) => ({
|
|
|
403435
404103
|
return { done, value: done ? undefined : fmap(value2) };
|
|
403436
404104
|
});
|
|
403437
404105
|
|
|
403438
|
-
//
|
|
404106
|
+
// ../../../v2/node_modules/.pnpm/yjs@13.6.31/node_modules/yjs/dist/yjs.mjs
|
|
403439
404107
|
class DeleteItem {
|
|
403440
404108
|
constructor(clock, len) {
|
|
403441
404109
|
this.clock = clock;
|
|
@@ -408178,7 +408846,7 @@ var init_yjs = __esm(() => {
|
|
|
408178
408846
|
glo[importIdentifier] = true;
|
|
408179
408847
|
});
|
|
408180
408848
|
|
|
408181
|
-
//
|
|
408849
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/broadcastchannel.js
|
|
408182
408850
|
class LocalStoragePolyfill {
|
|
408183
408851
|
constructor(room) {
|
|
408184
408852
|
this.room = room;
|
|
@@ -408224,7 +408892,7 @@ var init_broadcastchannel = __esm(() => {
|
|
|
408224
408892
|
BC = typeof BroadcastChannel === "undefined" ? LocalStoragePolyfill : BroadcastChannel;
|
|
408225
408893
|
});
|
|
408226
408894
|
|
|
408227
|
-
//
|
|
408895
|
+
// ../../../v2/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/sync.js
|
|
408228
408896
|
var messageYjsSyncStep1 = 0, messageYjsSyncStep2 = 1, messageYjsUpdate = 2, writeSyncStep1 = (encoder3, doc2) => {
|
|
408229
408897
|
writeVarUint(encoder3, messageYjsSyncStep1);
|
|
408230
408898
|
const sv = encodeStateVector(doc2);
|
|
@@ -408267,7 +408935,7 @@ var init_sync = __esm(() => {
|
|
|
408267
408935
|
readUpdate = readSyncStep2;
|
|
408268
408936
|
});
|
|
408269
408937
|
|
|
408270
|
-
//
|
|
408938
|
+
// ../../../v2/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/auth.js
|
|
408271
408939
|
var messagePermissionDenied = 0, readAuthMessage = (decoder9, y, permissionDeniedHandler) => {
|
|
408272
408940
|
switch (readVarUint(decoder9)) {
|
|
408273
408941
|
case messagePermissionDenied:
|
|
@@ -408278,7 +408946,7 @@ var init_auth = __esm(() => {
|
|
|
408278
408946
|
init_decoding();
|
|
408279
408947
|
});
|
|
408280
408948
|
|
|
408281
|
-
//
|
|
408949
|
+
// ../../../v2/node_modules/.pnpm/y-protocols@1.0.7_yjs@13.6.31/node_modules/y-protocols/awareness.js
|
|
408282
408950
|
var outdatedTimeout = 30000, Awareness, removeAwarenessStates = (awareness, clients, origin) => {
|
|
408283
408951
|
const removed = [];
|
|
408284
408952
|
for (let i2 = 0;i2 < clients.length; i2++) {
|
|
@@ -408461,13 +409129,13 @@ var init_awareness = __esm(() => {
|
|
|
408461
409129
|
};
|
|
408462
409130
|
});
|
|
408463
409131
|
|
|
408464
|
-
//
|
|
409132
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/url.js
|
|
408465
409133
|
var encodeQueryParams = (params2) => map3(params2, (val, key2) => `${encodeURIComponent(key2)}=${encodeURIComponent(val)}`).join("&");
|
|
408466
409134
|
var init_url = __esm(() => {
|
|
408467
409135
|
init_object2();
|
|
408468
409136
|
});
|
|
408469
409137
|
|
|
408470
|
-
//
|
|
409138
|
+
// ../../../v2/node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.31/node_modules/y-websocket/src/y-websocket.js
|
|
408471
409139
|
var messageSync = 0, messageQueryAwareness = 3, messageAwareness = 1, messageAuth = 2, messageHandlers, messageReconnectTimeout = 30000, permissionDeniedHandler = (provider, reason) => console.warn(`Permission denied to access ${provider.url}.
|
|
408472
409140
|
${reason}`), readMessage = (provider, buf, emitSynced) => {
|
|
408473
409141
|
const decoder9 = createDecoder(buf);
|
|
@@ -409260,7 +409928,7 @@ var init_y_websocket_single_doc = __esm(() => {
|
|
|
409260
409928
|
init_runtime4();
|
|
409261
409929
|
});
|
|
409262
409930
|
|
|
409263
|
-
//
|
|
409931
|
+
// ../../../v2/node_modules/.pnpm/@hocuspocus+common@2.15.3/node_modules/@hocuspocus/common/dist/hocuspocus-common.esm.js
|
|
409264
409932
|
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) => {
|
|
409265
409933
|
const encodedString = unescape(encodeURIComponent(str));
|
|
409266
409934
|
const len = encodedString.length;
|
|
@@ -409419,7 +410087,7 @@ var init_hocuspocus_common_esm = __esm(() => {
|
|
|
409419
410087
|
})(WsReadyStates || (WsReadyStates = {}));
|
|
409420
410088
|
});
|
|
409421
410089
|
|
|
409422
|
-
//
|
|
410090
|
+
// ../../../v2/node_modules/.pnpm/@lifeomic+attempt@3.1.0/node_modules/@lifeomic/attempt/dist/src/index.js
|
|
409423
410091
|
var require_src2 = __commonJS((exports) => {
|
|
409424
410092
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
409425
410093
|
exports.retry = exports.defaultCalculateDelay = exports.sleep = undefined;
|
|
@@ -409564,7 +410232,7 @@ var require_src2 = __commonJS((exports) => {
|
|
|
409564
410232
|
exports.retry = retry;
|
|
409565
410233
|
});
|
|
409566
410234
|
|
|
409567
|
-
//
|
|
410235
|
+
// ../../../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
|
|
409568
410236
|
class VarStoragePolyfill2 {
|
|
409569
410237
|
constructor() {
|
|
409570
410238
|
this.map = new Map;
|
|
@@ -411347,7 +412015,7 @@ var init_hocuspocus_single_doc = __esm(() => {
|
|
|
411347
412015
|
};
|
|
411348
412016
|
});
|
|
411349
412017
|
|
|
411350
|
-
//
|
|
412018
|
+
// ../../../v2/node_modules/.pnpm/@liveblocks+core@3.15.5_@types+json-schema@7.0.15/node_modules/@liveblocks/core/dist/index.js
|
|
411351
412019
|
function error48(msg) {
|
|
411352
412020
|
if (false) {} else {
|
|
411353
412021
|
throw new Error(msg);
|
|
@@ -420319,7 +420987,7 @@ var init_dist6 = __esm(() => {
|
|
|
420319
420987
|
detectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);
|
|
420320
420988
|
});
|
|
420321
420989
|
|
|
420322
|
-
//
|
|
420990
|
+
// ../../../v2/node_modules/.pnpm/@liveblocks+client@3.15.5_@types+json-schema@7.0.15/node_modules/@liveblocks/client/dist/index.js
|
|
420323
420991
|
var PKG_NAME2 = "@liveblocks/client", PKG_VERSION2 = "3.15.5", PKG_FORMAT2 = "esm";
|
|
420324
420992
|
var init_dist7 = __esm(() => {
|
|
420325
420993
|
init_dist6();
|
|
@@ -420327,7 +420995,7 @@ var init_dist7 = __esm(() => {
|
|
|
420327
420995
|
detectDupes(PKG_NAME2, PKG_VERSION2, PKG_FORMAT2);
|
|
420328
420996
|
});
|
|
420329
420997
|
|
|
420330
|
-
//
|
|
420998
|
+
// ../../../v2/node_modules/.pnpm/js-base64@3.7.8/node_modules/js-base64/base64.mjs
|
|
420331
420999
|
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) => {
|
|
420332
421000
|
let u32, c0, c1, c2, asc = "";
|
|
420333
421001
|
const pad = bin.length % 3;
|
|
@@ -420471,7 +421139,7 @@ var init_base64 = __esm(() => {
|
|
|
420471
421139
|
};
|
|
420472
421140
|
});
|
|
420473
421141
|
|
|
420474
|
-
//
|
|
421142
|
+
// ../../../v2/node_modules/.pnpm/lib0@0.2.117/node_modules/lib0/indexeddb.js
|
|
420475
421143
|
var rtop = (request) => create4((resolve2, reject2) => {
|
|
420476
421144
|
request.onerror = (event) => reject2(new Error(event.target.error));
|
|
420477
421145
|
request.onsuccess = (event) => resolve2(event.target.result);
|
|
@@ -420509,7 +421177,7 @@ var init_indexeddb = __esm(() => {
|
|
|
420509
421177
|
init_promise2();
|
|
420510
421178
|
});
|
|
420511
421179
|
|
|
420512
|
-
//
|
|
421180
|
+
// ../../../v2/node_modules/.pnpm/y-indexeddb@9.0.12_yjs@13.6.31/node_modules/y-indexeddb/src/y-indexeddb.js
|
|
420513
421181
|
var customStoreName = "custom", updatesStoreName = "updates", PREFERRED_TRIM_SIZE = 500, fetchUpdates = (idbPersistence, beforeApplyUpdatesCallback = () => {}, afterApplyUpdatesCallback = () => {}) => {
|
|
420514
421182
|
const [updatesStore] = transact2(idbPersistence.db, [updatesStoreName]);
|
|
420515
421183
|
return getAll(updatesStore, createIDBKeyRangeLowerBound(idbPersistence._dbref, false)).then((updates) => {
|
|
@@ -420621,7 +421289,7 @@ var init_y_indexeddb = __esm(() => {
|
|
|
420621
421289
|
};
|
|
420622
421290
|
});
|
|
420623
421291
|
|
|
420624
|
-
//
|
|
421292
|
+
// ../../../v2/node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
|
|
420625
421293
|
function isBytes(a) {
|
|
420626
421294
|
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
420627
421295
|
}
|
|
@@ -420681,7 +421349,7 @@ var init_utils = __esm(() => {
|
|
|
420681
421349
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
420682
421350
|
});
|
|
420683
421351
|
|
|
420684
|
-
//
|
|
421352
|
+
// ../../../v2/node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
|
|
420685
421353
|
function setBigUint64(view, byteOffset, value2, isLE) {
|
|
420686
421354
|
if (typeof view.setBigUint64 === "function")
|
|
420687
421355
|
return view.setBigUint64(byteOffset, value2, isLE);
|
|
@@ -420805,7 +421473,7 @@ var init__md = __esm(() => {
|
|
|
420805
421473
|
]);
|
|
420806
421474
|
});
|
|
420807
421475
|
|
|
420808
|
-
//
|
|
421476
|
+
// ../../../v2/node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js
|
|
420809
421477
|
var SHA256_K, SHA256_W, SHA256, sha256;
|
|
420810
421478
|
var init_sha2 = __esm(() => {
|
|
420811
421479
|
init__md();
|
|
@@ -420949,7 +421617,7 @@ var init_sha2 = __esm(() => {
|
|
|
420949
421617
|
sha256 = /* @__PURE__ */ createHasher(() => new SHA256);
|
|
420950
421618
|
});
|
|
420951
421619
|
|
|
420952
|
-
//
|
|
421620
|
+
// ../../../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
|
|
420953
421621
|
var PKG_NAME3 = "@liveblocks/yjs", PKG_VERSION3 = "3.15.5", PKG_FORMAT3 = "esm", create9 = () => /* @__PURE__ */ new Map, setIfUndefined3 = (map5, key2, createT) => {
|
|
420954
421622
|
let set3 = map5.get(key2);
|
|
420955
421623
|
if (set3 === undefined) {
|