@superdoc-dev/cli 0.11.0-next.15 → 0.11.0-next.16
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 +1079 -173
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -6869,6 +6869,85 @@ More content with **bold** and *italic*.`
|
|
|
6869
6869
|
}),
|
|
6870
6870
|
referenceDocPath: "custom-xml/parts/remove.mdx",
|
|
6871
6871
|
referenceGroup: "customXml"
|
|
6872
|
+
},
|
|
6873
|
+
"metadata.attach": {
|
|
6874
|
+
memberPath: "metadata.attach",
|
|
6875
|
+
description: "Anchor a JSON metadata payload to a span of text. " + "Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. " + "v1 supports text-range anchors only.",
|
|
6876
|
+
expectedResult: "Returns an AnchoredMetadataAttachResult with the assigned id and the backing Storage Part name on success.",
|
|
6877
|
+
requiresDocumentContext: true,
|
|
6878
|
+
metadata: mutationOperation({
|
|
6879
|
+
idempotency: "non-idempotent",
|
|
6880
|
+
supportsDryRun: true,
|
|
6881
|
+
supportsTrackedMode: false,
|
|
6882
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND", "INVALID_TARGET", "INVALID_INPUT"],
|
|
6883
|
+
throws: [...T_REF_INSERT, "REVISION_MISMATCH"]
|
|
6884
|
+
}),
|
|
6885
|
+
referenceDocPath: "metadata/attach.mdx",
|
|
6886
|
+
referenceGroup: "metadata"
|
|
6887
|
+
},
|
|
6888
|
+
"metadata.list": {
|
|
6889
|
+
memberPath: "metadata.list",
|
|
6890
|
+
description: "List anchored-metadata entries in the document, optionally filtered by consumer namespace and/or a `within` selection (returns only entries whose anchor overlaps `within`).",
|
|
6891
|
+
expectedResult: "Returns an AnchoredMetadataListResult with summary entries (no payload); fetch payload via get.",
|
|
6892
|
+
requiresDocumentContext: true,
|
|
6893
|
+
metadata: readOperation({
|
|
6894
|
+
idempotency: "idempotent",
|
|
6895
|
+
throws: T_REF_READ_LIST
|
|
6896
|
+
}),
|
|
6897
|
+
referenceDocPath: "metadata/list.mdx",
|
|
6898
|
+
referenceGroup: "metadata"
|
|
6899
|
+
},
|
|
6900
|
+
"metadata.get": {
|
|
6901
|
+
memberPath: "metadata.get",
|
|
6902
|
+
description: "Get a single anchored-metadata entry by id, including its JSON payload.",
|
|
6903
|
+
expectedResult: "Returns an AnchoredMetadataInfo with id, namespace, partName, and payload; or null if not found.",
|
|
6904
|
+
requiresDocumentContext: true,
|
|
6905
|
+
metadata: readOperation({
|
|
6906
|
+
throws: T_NOT_FOUND_CAPABLE
|
|
6907
|
+
}),
|
|
6908
|
+
referenceDocPath: "metadata/get.mdx",
|
|
6909
|
+
referenceGroup: "metadata"
|
|
6910
|
+
},
|
|
6911
|
+
"metadata.update": {
|
|
6912
|
+
memberPath: "metadata.update",
|
|
6913
|
+
description: "Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched.",
|
|
6914
|
+
expectedResult: "Returns an AnchoredMetadataMutationResult with the entry id on success or a failure.",
|
|
6915
|
+
requiresDocumentContext: true,
|
|
6916
|
+
metadata: mutationOperation({
|
|
6917
|
+
idempotency: "idempotent",
|
|
6918
|
+
supportsDryRun: true,
|
|
6919
|
+
supportsTrackedMode: false,
|
|
6920
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND", "INVALID_INPUT"],
|
|
6921
|
+
throws: [...T_REF_MUTATION, "REVISION_MISMATCH"]
|
|
6922
|
+
}),
|
|
6923
|
+
referenceDocPath: "metadata/update.mdx",
|
|
6924
|
+
referenceGroup: "metadata"
|
|
6925
|
+
},
|
|
6926
|
+
"metadata.remove": {
|
|
6927
|
+
memberPath: "metadata.remove",
|
|
6928
|
+
description: "Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed.",
|
|
6929
|
+
expectedResult: "Returns an AnchoredMetadataMutationResult with the removed entry id on success or a failure.",
|
|
6930
|
+
requiresDocumentContext: true,
|
|
6931
|
+
metadata: mutationOperation({
|
|
6932
|
+
idempotency: "non-idempotent",
|
|
6933
|
+
supportsDryRun: true,
|
|
6934
|
+
supportsTrackedMode: false,
|
|
6935
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND"],
|
|
6936
|
+
throws: [...T_REF_MUTATION_REMOVE, "REVISION_MISMATCH"]
|
|
6937
|
+
}),
|
|
6938
|
+
referenceDocPath: "metadata/remove.mdx",
|
|
6939
|
+
referenceGroup: "metadata"
|
|
6940
|
+
},
|
|
6941
|
+
"metadata.resolve": {
|
|
6942
|
+
memberPath: "metadata.resolve",
|
|
6943
|
+
description: "Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content.",
|
|
6944
|
+
expectedResult: "Returns an AnchoredMetadataResolveInfo with id and target SelectionTarget; or null if the anchor is no longer present.",
|
|
6945
|
+
requiresDocumentContext: true,
|
|
6946
|
+
metadata: readOperation({
|
|
6947
|
+
throws: T_NOT_FOUND_CAPABLE
|
|
6948
|
+
}),
|
|
6949
|
+
referenceDocPath: "metadata/resolve.mdx",
|
|
6950
|
+
referenceGroup: "metadata"
|
|
6872
6951
|
}
|
|
6873
6952
|
};
|
|
6874
6953
|
OPERATION_IDS = Object.freeze(Object.keys(OPERATION_DEFINITIONS));
|
|
@@ -8630,7 +8709,7 @@ function buildInternalContractSchemas() {
|
|
|
8630
8709
|
operations
|
|
8631
8710
|
};
|
|
8632
8711
|
}
|
|
8633
|
-
var nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, paragraphTargetSchema, sectionAddressSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, targetLocatorSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, storyLocatorSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema, nodeSelectorSchema, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern, tableBorderSpecSchema, nullableTableBorderSpecSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, insertInputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQueryProperties, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, customXmlPartTargetSchema, customXmlPartMutation, customXmlPartCreateMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, diffApplyResultSchema, operationSchemas;
|
|
8712
|
+
var nodeTypeValues, blockNodeTypeValues, deletableBlockNodeTypeValues, inlineNodeTypeValues, knownTargetKindValues, SHARED_DEFS, rangeSchema, positionSchema, inlineAnchorSchema, targetKindSchema, textAddressSchema, textTargetSchema, blockNodeAddressSchema, deletableBlockNodeAddressSchema, tableAddressSchema, tableRowAddressSchema, tableCellAddressSchema, tableOrCellAddressSchema, paragraphAddressSchema, headingAddressSchema, listItemAddressSchema, paragraphTargetSchema, sectionAddressSchema, inlineNodeAddressSchema, nodeAddressSchema, commentAddressSchema, trackedChangeAddressSchema, entityAddressSchema, selectionTargetSchema, targetLocatorSchema, deleteBehaviorSchema, resolvedHandleSchema, pageInfoSchema, receiptSuccessSchema, textMutationRangeSchema, textMutationResolutionSchema, textMutationSuccessSchema, matchRunSchema, matchBlockSchema, storyLocatorSchema, trackChangeRefSchema, createParagraphSuccessSchema, createHeadingSuccessSchema, headingLevelSchema, listsInsertSuccessSchema, listsMutateItemSuccessSchema, listsExitSuccessSchema, nodeSummarySchema, nodeInfoSchema, matchContextSchema, unknownNodeDiagnosticSchema, textSelectorSchema, nodeSelectorSchema, selectorShorthandSchema, sdTextSelectorSchema, sdNodeSelectorSchema, sdSelectorSchema, sdReadOptionsSchema, sdFindInputSchema, sdNodeResultSchema, sdFindResultSchema, sdMutationResolutionSchema, sdMutationSuccessSchema, documentInfoCountsSchema, documentInfoOutlineItemSchema, documentInfoCapabilitiesSchema, documentStyleInfoSchema, documentStylesSchema, documentDefaultsSchema, documentInfoSchema, listKindSchema, listInsertPositionSchema, listItemInfoSchema, listItemDomainItemSchema, listsListResultSchema, sectionBreakTypeSchema, sectionOrientationSchema, sectionVerticalAlignSchema, sectionDirectionSchema, sectionHeaderFooterKindSchema, sectionHeaderFooterVariantSchema, sectionLineNumberRestartSchema, sectionPageNumberFormatSchema, sectionRangeDomainSchema, sectionPageMarginsSchema, sectionHeaderFooterMarginsSchema, sectionPageSetupSchema, sectionColumnsSchema, sectionLineNumberingSchema, sectionPageNumberingSchema, sectionHeaderFooterRefsSchema, sectionBorderSpecSchema, sectionPageBordersSchema, sectionInfoSchema, sectionResolvedHandleSchema, sectionDomainItemSchema, sectionsListResultSchema, sectionMutationSuccessSchema, documentMutationSuccessSchema, paragraphMutationTargetSchema, paragraphMutationSuccessSchema, createSectionBreakSuccessSchema, commentInfoSchema, commentDomainItemSchema, commentsListResultSchema, trackChangeWordRevisionIdsSchema, trackChangeInfoSchema, trackChangeDomainItemSchema, trackChangesListResultSchema, capabilityReasonCodeSchema, capabilityReasonsSchema, capabilityFlagSchema, operationRuntimeCapabilitySchema, operationCapabilitiesSchema, inlinePropertyCapabilitySchema, inlinePropertyCapabilitiesByKeySchema, formatCapabilitiesSchema, planEngineCapabilitiesSchema, capabilitiesOutputSchema, strictEmptyObjectSchema, tableBorderColorPattern, tableBorderSpecSchema, nullableTableBorderSpecSchema, sdFragmentSchema, placementSchema, nestingPolicySchema, insertInputSchema, tableLocatorSchema, cellLocatorSchema, cellOrTableScopedCellLocatorSchema, tableOrCellLocatorSchema, mergeRangeLocatorSchema, tableCreateLocationSchema, tableMutationSuccessSchema, createTableSuccessSchema, tableMutationFailureCodes, tableMutationFailureSchema, tableMutationResultSchema, createTableResultSchema, historyActionSuccessSchema, historyActionFailureSchema, formatInlineAliasOperationSchemas, tocMutationFailureCodes, tocMutationFailureSchema, tocMutationSuccessSchema, tocEntryMutationFailureCodes, tocEntryMutationFailureSchema, tocEntryMutationSuccessSchema, hyperlinkTargetSchema, hyperlinkReadPropertiesSchema, hyperlinkDestinationSchema, hyperlinkSpecSchema, hyperlinkPatchSchema, hyperlinkDomainSchema, hyperlinkMutationSuccessSchema, hyperlinkMutationFailureCodes, hyperlinkMutationFailureSchema, hyperlinkInfoSchema, contentControlTargetSchema, contentControlMutationSuccessSchema, contentControlMutationFailureSchema, ccListResultSchema, ccInfoSchema, refListQueryProperties, refListQuerySchema, discoveryOutputSchema, receiptFailureSchema, refFailureSchema, bookmarkAddressSchema, bookmarkMutation, customXmlPartTargetSchema, customXmlPartMutation, customXmlPartCreateMutation, anchoredMetadataAttachMutation, anchoredMetadataMutation, footnoteAddressSchema, footnoteConfigScopeSchema, footnoteNumberingSchema, footnoteMutation, footnoteConfig, crossRefAddressSchema, crossRefTargetSchema, crossRefDisplaySchema, crossRefMutation, indexAddressSchema, indexEntryAddressSchema, indexConfigSchema, indexEntryDataSchema, indexEntryPatchSchema, indexMutation, indexEntryMutation, captionAddressSchema, captionMutation, captionConfig, fieldAddressSchema, fieldMutation, citationAddressSchema, citationSourceAddressSchema, bibliographyAddressSchema, citationMutation, citationSourceMutation, bibliographyMutation, citationPersonSchema, citationSourceFieldsSchema, tocCreateLocationSchema, authoritiesAddressSchema, authorityEntryAddressSchema, authoritiesConfigSchema, authorityEntryDataSchema, authorityEntryPatchSchema, authoritiesMutation, authorityEntryMutation, diffCoverageSchema, diffSummarySchema, diffSnapshotSchema, diffPayloadSchema, diffApplyResultSchema, operationSchemas;
|
|
8634
8713
|
var init_schemas = __esm(() => {
|
|
8635
8714
|
init_command_catalog();
|
|
8636
8715
|
init_types2();
|
|
@@ -9747,6 +9826,12 @@ var init_schemas = __esm(() => {
|
|
|
9747
9826
|
partName: { type: "string" },
|
|
9748
9827
|
propsPartName: { type: "string" }
|
|
9749
9828
|
}, ["id", "partName", "propsPartName"]);
|
|
9829
|
+
anchoredMetadataAttachMutation = refMutationSchemas({
|
|
9830
|
+
id: { type: "string", minLength: 1 },
|
|
9831
|
+
namespace: { type: "string", minLength: 1 },
|
|
9832
|
+
partName: { type: "string", minLength: 1 }
|
|
9833
|
+
}, ["id", "namespace", "partName"]);
|
|
9834
|
+
anchoredMetadataMutation = refMutationSchemas({ id: { type: "string", minLength: 1 } }, ["id"]);
|
|
9750
9835
|
footnoteAddressSchema = objectSchema({ kind: { const: "entity" }, entityType: { const: "footnote" }, noteId: { type: "string" } }, ["kind", "entityType", "noteId"]);
|
|
9751
9836
|
footnoteConfigScopeSchema = {
|
|
9752
9837
|
oneOf: [
|
|
@@ -13652,6 +13737,39 @@ var init_schemas = __esm(() => {
|
|
|
13652
13737
|
"customXml.parts.remove": {
|
|
13653
13738
|
input: objectSchema({ target: customXmlPartTargetSchema }, ["target"]),
|
|
13654
13739
|
...customXmlPartMutation
|
|
13740
|
+
},
|
|
13741
|
+
"metadata.attach": {
|
|
13742
|
+
input: objectSchema({
|
|
13743
|
+
target: selectionTargetSchema,
|
|
13744
|
+
namespace: { type: "string", minLength: 1 },
|
|
13745
|
+
payload: {},
|
|
13746
|
+
id: { type: "string", minLength: 1 }
|
|
13747
|
+
}, ["target", "namespace", "payload"]),
|
|
13748
|
+
...anchoredMetadataAttachMutation
|
|
13749
|
+
},
|
|
13750
|
+
"metadata.list": {
|
|
13751
|
+
input: objectSchema({
|
|
13752
|
+
...refListQueryProperties,
|
|
13753
|
+
namespace: { type: "string" },
|
|
13754
|
+
within: selectionTargetSchema
|
|
13755
|
+
}),
|
|
13756
|
+
output: discoveryOutputSchema
|
|
13757
|
+
},
|
|
13758
|
+
"metadata.get": {
|
|
13759
|
+
input: objectSchema({ id: { type: "string", minLength: 1 } }, ["id"]),
|
|
13760
|
+
output: { oneOf: [{ type: "object" }, { type: "null" }] }
|
|
13761
|
+
},
|
|
13762
|
+
"metadata.update": {
|
|
13763
|
+
input: objectSchema({ id: { type: "string", minLength: 1 }, payload: {} }, ["id", "payload"]),
|
|
13764
|
+
...anchoredMetadataMutation
|
|
13765
|
+
},
|
|
13766
|
+
"metadata.remove": {
|
|
13767
|
+
input: objectSchema({ id: { type: "string", minLength: 1 } }, ["id"]),
|
|
13768
|
+
...anchoredMetadataMutation
|
|
13769
|
+
},
|
|
13770
|
+
"metadata.resolve": {
|
|
13771
|
+
input: objectSchema({ id: { type: "string", minLength: 1 } }, ["id"]),
|
|
13772
|
+
output: { oneOf: [{ type: "object" }, { type: "null" }] }
|
|
13655
13773
|
}
|
|
13656
13774
|
};
|
|
13657
13775
|
});
|
|
@@ -13846,6 +13964,11 @@ var init_reference_doc_map = __esm(() => {
|
|
|
13846
13964
|
title: "Custom XML",
|
|
13847
13965
|
description: "Custom XML Data Storage Part operations (ECMA-376 §15.2.5, §15.2.6). Raw read and write of custom XML parts in the OOXML package.",
|
|
13848
13966
|
pagePath: "custom-xml/index.mdx"
|
|
13967
|
+
},
|
|
13968
|
+
metadata: {
|
|
13969
|
+
title: "Anchored Metadata",
|
|
13970
|
+
description: "Attach a JSON payload to a span of text and read it back across DOCX round-trips. Backed by hidden inline content controls and namespaced Custom XML Data Storage Parts; consumers see one operation set.",
|
|
13971
|
+
pagePath: "metadata/index.mdx"
|
|
13849
13972
|
}
|
|
13850
13973
|
};
|
|
13851
13974
|
REFERENCE_OPERATION_GROUPS = Object.keys(GROUP_METADATA).map((key) => ({
|
|
@@ -16620,7 +16743,13 @@ function buildDispatchTable(api) {
|
|
|
16620
16743
|
"customXml.parts.get": (input) => api.customXml.parts.get(input),
|
|
16621
16744
|
"customXml.parts.create": (input, options) => api.customXml.parts.create(input, options),
|
|
16622
16745
|
"customXml.parts.patch": (input, options) => api.customXml.parts.patch(input, options),
|
|
16623
|
-
"customXml.parts.remove": (input, options) => api.customXml.parts.remove(input, options)
|
|
16746
|
+
"customXml.parts.remove": (input, options) => api.customXml.parts.remove(input, options),
|
|
16747
|
+
"metadata.attach": (input, options) => api.metadata.attach(input, options),
|
|
16748
|
+
"metadata.list": (input) => api.metadata.list(input),
|
|
16749
|
+
"metadata.get": (input) => api.metadata.get(input),
|
|
16750
|
+
"metadata.update": (input, options) => api.metadata.update(input, options),
|
|
16751
|
+
"metadata.remove": (input, options) => api.metadata.remove(input, options),
|
|
16752
|
+
"metadata.resolve": (input) => api.metadata.resolve(input)
|
|
16624
16753
|
};
|
|
16625
16754
|
}
|
|
16626
16755
|
var init_invoke = __esm(() => {
|
|
@@ -18502,6 +18631,94 @@ var init_customXml = __esm(() => {
|
|
|
18502
18631
|
init_errors2();
|
|
18503
18632
|
});
|
|
18504
18633
|
|
|
18634
|
+
// ../../packages/document-api/src/metadata/anchored-metadata.ts
|
|
18635
|
+
function validateId(id, operationName) {
|
|
18636
|
+
if (typeof id !== "string" || id.length === 0) {
|
|
18637
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} requires a non-empty 'id' string.`, {
|
|
18638
|
+
idType: typeof id
|
|
18639
|
+
});
|
|
18640
|
+
}
|
|
18641
|
+
}
|
|
18642
|
+
function validateNamespace(namespace, operationName) {
|
|
18643
|
+
if (typeof namespace !== "string" || namespace.length === 0) {
|
|
18644
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} requires a non-empty 'namespace' string.`, {
|
|
18645
|
+
namespaceType: typeof namespace
|
|
18646
|
+
});
|
|
18647
|
+
}
|
|
18648
|
+
}
|
|
18649
|
+
function validatePayload(payload, operationName) {
|
|
18650
|
+
let serialized;
|
|
18651
|
+
try {
|
|
18652
|
+
serialized = JSON.stringify(payload);
|
|
18653
|
+
} catch (err) {
|
|
18654
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'payload' must be JSON-serializable (no cycles, no BigInt).`, { error: err instanceof Error ? err.message : String(err) });
|
|
18655
|
+
}
|
|
18656
|
+
if (serialized === undefined) {
|
|
18657
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'payload' must be a JSON-serializable value (was undefined / function / symbol).`);
|
|
18658
|
+
}
|
|
18659
|
+
}
|
|
18660
|
+
function validateAnchorTarget(target, operationName) {
|
|
18661
|
+
if (!isSelectionTarget(target)) {
|
|
18662
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} requires a 'target' SelectionTarget describing the anchor range.`, { target });
|
|
18663
|
+
}
|
|
18664
|
+
if (target.start.kind !== "text" || target.end.kind !== "text") {
|
|
18665
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} requires a text-range target. v1 does not support nodeEdge anchors.`, { startKind: target.start.kind, endKind: target.end.kind });
|
|
18666
|
+
}
|
|
18667
|
+
if (target.start.blockId !== target.end.blockId) {
|
|
18668
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} target must stay within a single paragraph. ` + `v1 anchors are hidden inline SDTs and cannot span block boundaries.`, { startBlockId: target.start.blockId, endBlockId: target.end.blockId });
|
|
18669
|
+
}
|
|
18670
|
+
}
|
|
18671
|
+
function validateWithin(within, operationName) {
|
|
18672
|
+
if (!isSelectionTarget(within)) {
|
|
18673
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'within' must be a SelectionTarget when provided.`, { within });
|
|
18674
|
+
}
|
|
18675
|
+
if (within.start.kind !== "text" || within.end.kind !== "text") {
|
|
18676
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'within' must be a text-range target (no nodeEdge endpoints).`, { startKind: within.start.kind, endKind: within.end.kind });
|
|
18677
|
+
}
|
|
18678
|
+
if (within.start.blockId !== within.end.blockId) {
|
|
18679
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${operationName} 'within' must stay within a single paragraph in v1.`, { startBlockId: within.start.blockId, endBlockId: within.end.blockId });
|
|
18680
|
+
}
|
|
18681
|
+
}
|
|
18682
|
+
function executeAnchoredMetadataAttach(adapter, input, options) {
|
|
18683
|
+
validateAnchorTarget(input.target, "metadata.attach");
|
|
18684
|
+
validateNamespace(input.namespace, "metadata.attach");
|
|
18685
|
+
validatePayload(input.payload, "metadata.attach");
|
|
18686
|
+
if (input.id !== undefined) {
|
|
18687
|
+
validateId(input.id, "metadata.attach");
|
|
18688
|
+
}
|
|
18689
|
+
return adapter.attach(input, normalizeMutationOptions(options));
|
|
18690
|
+
}
|
|
18691
|
+
function executeAnchoredMetadataList(adapter, query2) {
|
|
18692
|
+
if (query2?.namespace !== undefined && typeof query2.namespace !== "string") {
|
|
18693
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `metadata.list 'namespace' must be a string when provided.`);
|
|
18694
|
+
}
|
|
18695
|
+
if (query2?.within !== undefined) {
|
|
18696
|
+
validateWithin(query2.within, "metadata.list");
|
|
18697
|
+
}
|
|
18698
|
+
return adapter.list(query2);
|
|
18699
|
+
}
|
|
18700
|
+
function executeAnchoredMetadataGet(adapter, input) {
|
|
18701
|
+
validateId(input.id, "metadata.get");
|
|
18702
|
+
return adapter.get(input);
|
|
18703
|
+
}
|
|
18704
|
+
function executeAnchoredMetadataUpdate(adapter, input, options) {
|
|
18705
|
+
validateId(input.id, "metadata.update");
|
|
18706
|
+
validatePayload(input.payload, "metadata.update");
|
|
18707
|
+
return adapter.update(input, normalizeMutationOptions(options));
|
|
18708
|
+
}
|
|
18709
|
+
function executeAnchoredMetadataRemove(adapter, input, options) {
|
|
18710
|
+
validateId(input.id, "metadata.remove");
|
|
18711
|
+
return adapter.remove(input, normalizeMutationOptions(options));
|
|
18712
|
+
}
|
|
18713
|
+
function executeAnchoredMetadataResolve(adapter, input) {
|
|
18714
|
+
validateId(input.id, "metadata.resolve");
|
|
18715
|
+
return adapter.resolve(input);
|
|
18716
|
+
}
|
|
18717
|
+
var init_anchored_metadata = __esm(() => {
|
|
18718
|
+
init_errors2();
|
|
18719
|
+
init_selection_target_validator();
|
|
18720
|
+
});
|
|
18721
|
+
|
|
18505
18722
|
// ../../packages/document-api/src/protection/protection.ts
|
|
18506
18723
|
function validateSetEditingRestrictionInput(input) {
|
|
18507
18724
|
if (!input || typeof input !== "object") {
|
|
@@ -20236,6 +20453,26 @@ function createDocumentApi(adapters) {
|
|
|
20236
20453
|
}
|
|
20237
20454
|
}
|
|
20238
20455
|
},
|
|
20456
|
+
metadata: {
|
|
20457
|
+
attach(input, options) {
|
|
20458
|
+
return executeAnchoredMetadataAttach(requireAdapter(adapters.metadata, "metadata"), input, options);
|
|
20459
|
+
},
|
|
20460
|
+
list(input) {
|
|
20461
|
+
return executeAnchoredMetadataList(requireAdapter(adapters.metadata, "metadata"), input);
|
|
20462
|
+
},
|
|
20463
|
+
get(input) {
|
|
20464
|
+
return executeAnchoredMetadataGet(requireAdapter(adapters.metadata, "metadata"), input);
|
|
20465
|
+
},
|
|
20466
|
+
update(input, options) {
|
|
20467
|
+
return executeAnchoredMetadataUpdate(requireAdapter(adapters.metadata, "metadata"), input, options);
|
|
20468
|
+
},
|
|
20469
|
+
remove(input, options) {
|
|
20470
|
+
return executeAnchoredMetadataRemove(requireAdapter(adapters.metadata, "metadata"), input, options);
|
|
20471
|
+
},
|
|
20472
|
+
resolve(input) {
|
|
20473
|
+
return executeAnchoredMetadataResolve(requireAdapter(adapters.metadata, "metadata"), input);
|
|
20474
|
+
}
|
|
20475
|
+
},
|
|
20239
20476
|
invoke(request) {
|
|
20240
20477
|
if (!Object.prototype.hasOwnProperty.call(dispatch, request.operationId)) {
|
|
20241
20478
|
throw new Error(`Unknown operationId: "${request.operationId}"`);
|
|
@@ -20283,6 +20520,7 @@ var init_src = __esm(() => {
|
|
|
20283
20520
|
init_content_controls();
|
|
20284
20521
|
init_bookmarks();
|
|
20285
20522
|
init_customXml();
|
|
20523
|
+
init_anchored_metadata();
|
|
20286
20524
|
init_protection();
|
|
20287
20525
|
init_permission_ranges();
|
|
20288
20526
|
init_footnotes();
|
|
@@ -66320,7 +66558,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
66320
66558
|
emptyOptions2 = {};
|
|
66321
66559
|
});
|
|
66322
66560
|
|
|
66323
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
66561
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CzwJ7ds9.es.js
|
|
66324
66562
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
66325
66563
|
const fieldValue = extension$1.config[field];
|
|
66326
66564
|
if (typeof fieldValue === "function")
|
|
@@ -71139,7 +71377,13 @@ function buildDispatchTable2(api) {
|
|
|
71139
71377
|
"customXml.parts.get": (input) => api.customXml.parts.get(input),
|
|
71140
71378
|
"customXml.parts.create": (input, options) => api.customXml.parts.create(input, options),
|
|
71141
71379
|
"customXml.parts.patch": (input, options) => api.customXml.parts.patch(input, options),
|
|
71142
|
-
"customXml.parts.remove": (input, options) => api.customXml.parts.remove(input, options)
|
|
71380
|
+
"customXml.parts.remove": (input, options) => api.customXml.parts.remove(input, options),
|
|
71381
|
+
"metadata.attach": (input, options) => api.metadata.attach(input, options),
|
|
71382
|
+
"metadata.list": (input) => api.metadata.list(input),
|
|
71383
|
+
"metadata.get": (input) => api.metadata.get(input),
|
|
71384
|
+
"metadata.update": (input, options) => api.metadata.update(input, options),
|
|
71385
|
+
"metadata.remove": (input, options) => api.metadata.remove(input, options),
|
|
71386
|
+
"metadata.resolve": (input) => api.metadata.resolve(input)
|
|
71143
71387
|
};
|
|
71144
71388
|
}
|
|
71145
71389
|
function executeHistoryGet2(adapter) {
|
|
@@ -72747,6 +72991,84 @@ function executeCustomXmlPartsRemove2(adapter, input, options) {
|
|
|
72747
72991
|
validateTarget2(input.target, "customXml.parts.remove");
|
|
72748
72992
|
return adapter.remove(input, normalizeMutationOptions2(options));
|
|
72749
72993
|
}
|
|
72994
|
+
function validateId2(id2, operationName) {
|
|
72995
|
+
if (typeof id2 !== "string" || id2.length === 0)
|
|
72996
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} requires a non-empty 'id' string.`, { idType: typeof id2 });
|
|
72997
|
+
}
|
|
72998
|
+
function validateNamespace2(namespace, operationName) {
|
|
72999
|
+
if (typeof namespace !== "string" || namespace.length === 0)
|
|
73000
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} requires a non-empty 'namespace' string.`, { namespaceType: typeof namespace });
|
|
73001
|
+
}
|
|
73002
|
+
function validatePayload2(payload, operationName) {
|
|
73003
|
+
let serialized;
|
|
73004
|
+
try {
|
|
73005
|
+
serialized = JSON.stringify(payload);
|
|
73006
|
+
} catch (err$1) {
|
|
73007
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} 'payload' must be JSON-serializable (no cycles, no BigInt).`, { error: err$1 instanceof Error ? err$1.message : String(err$1) });
|
|
73008
|
+
}
|
|
73009
|
+
if (serialized === undefined)
|
|
73010
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} 'payload' must be a JSON-serializable value (was undefined / function / symbol).`);
|
|
73011
|
+
}
|
|
73012
|
+
function validateAnchorTarget2(target, operationName) {
|
|
73013
|
+
if (!isSelectionTarget2(target))
|
|
73014
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a 'target' SelectionTarget describing the anchor range.`, { target });
|
|
73015
|
+
if (target.start.kind !== "text" || target.end.kind !== "text")
|
|
73016
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a text-range target. v1 does not support nodeEdge anchors.`, {
|
|
73017
|
+
startKind: target.start.kind,
|
|
73018
|
+
endKind: target.end.kind
|
|
73019
|
+
});
|
|
73020
|
+
if (target.start.blockId !== target.end.blockId)
|
|
73021
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} target must stay within a single paragraph. v1 anchors are hidden inline SDTs and cannot span block boundaries.`, {
|
|
73022
|
+
startBlockId: target.start.blockId,
|
|
73023
|
+
endBlockId: target.end.blockId
|
|
73024
|
+
});
|
|
73025
|
+
}
|
|
73026
|
+
function validateWithin2(within, operationName) {
|
|
73027
|
+
if (!isSelectionTarget2(within))
|
|
73028
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} 'within' must be a SelectionTarget when provided.`, { within });
|
|
73029
|
+
if (within.start.kind !== "text" || within.end.kind !== "text")
|
|
73030
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} 'within' must be a text-range target (no nodeEdge endpoints).`, {
|
|
73031
|
+
startKind: within.start.kind,
|
|
73032
|
+
endKind: within.end.kind
|
|
73033
|
+
});
|
|
73034
|
+
if (within.start.blockId !== within.end.blockId)
|
|
73035
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} 'within' must stay within a single paragraph in v1.`, {
|
|
73036
|
+
startBlockId: within.start.blockId,
|
|
73037
|
+
endBlockId: within.end.blockId
|
|
73038
|
+
});
|
|
73039
|
+
}
|
|
73040
|
+
function executeAnchoredMetadataAttach2(adapter, input, options) {
|
|
73041
|
+
validateAnchorTarget2(input.target, "metadata.attach");
|
|
73042
|
+
validateNamespace2(input.namespace, "metadata.attach");
|
|
73043
|
+
validatePayload2(input.payload, "metadata.attach");
|
|
73044
|
+
if (input.id !== undefined)
|
|
73045
|
+
validateId2(input.id, "metadata.attach");
|
|
73046
|
+
return adapter.attach(input, normalizeMutationOptions2(options));
|
|
73047
|
+
}
|
|
73048
|
+
function executeAnchoredMetadataList2(adapter, query2) {
|
|
73049
|
+
if (query2?.namespace !== undefined && typeof query2.namespace !== "string")
|
|
73050
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `metadata.list 'namespace' must be a string when provided.`);
|
|
73051
|
+
if (query2?.within !== undefined)
|
|
73052
|
+
validateWithin2(query2.within, "metadata.list");
|
|
73053
|
+
return adapter.list(query2);
|
|
73054
|
+
}
|
|
73055
|
+
function executeAnchoredMetadataGet2(adapter, input) {
|
|
73056
|
+
validateId2(input.id, "metadata.get");
|
|
73057
|
+
return adapter.get(input);
|
|
73058
|
+
}
|
|
73059
|
+
function executeAnchoredMetadataUpdate2(adapter, input, options) {
|
|
73060
|
+
validateId2(input.id, "metadata.update");
|
|
73061
|
+
validatePayload2(input.payload, "metadata.update");
|
|
73062
|
+
return adapter.update(input, normalizeMutationOptions2(options));
|
|
73063
|
+
}
|
|
73064
|
+
function executeAnchoredMetadataRemove2(adapter, input, options) {
|
|
73065
|
+
validateId2(input.id, "metadata.remove");
|
|
73066
|
+
return adapter.remove(input, normalizeMutationOptions2(options));
|
|
73067
|
+
}
|
|
73068
|
+
function executeAnchoredMetadataResolve2(adapter, input) {
|
|
73069
|
+
validateId2(input.id, "metadata.resolve");
|
|
73070
|
+
return adapter.resolve(input);
|
|
73071
|
+
}
|
|
72750
73072
|
function validateSetEditingRestrictionInput2(input) {
|
|
72751
73073
|
if (!input || typeof input !== "object")
|
|
72752
73074
|
throw new DocumentApiValidationError2("INVALID_INPUT", "protection.setEditingRestriction requires an object with a mode property.");
|
|
@@ -74372,6 +74694,26 @@ function createDocumentApi2(adapters) {
|
|
|
74372
74694
|
return executeCustomXmlPartsRemove2(requireAdapter2(adapters.customXml, "customXml").parts, input, options);
|
|
74373
74695
|
}
|
|
74374
74696
|
} },
|
|
74697
|
+
metadata: {
|
|
74698
|
+
attach(input, options) {
|
|
74699
|
+
return executeAnchoredMetadataAttach2(requireAdapter2(adapters.metadata, "metadata"), input, options);
|
|
74700
|
+
},
|
|
74701
|
+
list(input) {
|
|
74702
|
+
return executeAnchoredMetadataList2(requireAdapter2(adapters.metadata, "metadata"), input);
|
|
74703
|
+
},
|
|
74704
|
+
get(input) {
|
|
74705
|
+
return executeAnchoredMetadataGet2(requireAdapter2(adapters.metadata, "metadata"), input);
|
|
74706
|
+
},
|
|
74707
|
+
update(input, options) {
|
|
74708
|
+
return executeAnchoredMetadataUpdate2(requireAdapter2(adapters.metadata, "metadata"), input, options);
|
|
74709
|
+
},
|
|
74710
|
+
remove(input, options) {
|
|
74711
|
+
return executeAnchoredMetadataRemove2(requireAdapter2(adapters.metadata, "metadata"), input, options);
|
|
74712
|
+
},
|
|
74713
|
+
resolve(input) {
|
|
74714
|
+
return executeAnchoredMetadataResolve2(requireAdapter2(adapters.metadata, "metadata"), input);
|
|
74715
|
+
}
|
|
74716
|
+
},
|
|
74375
74717
|
invoke(request) {
|
|
74376
74718
|
if (!Object.prototype.hasOwnProperty.call(dispatch, request.operationId))
|
|
74377
74719
|
throw new Error(`Unknown operationId: "${request.operationId}"`);
|
|
@@ -105323,7 +105665,7 @@ var isRegExp = (value) => {
|
|
|
105323
105665
|
tracked: false,
|
|
105324
105666
|
carrier: runAttributeCarrier2(runPropertyKey ?? key),
|
|
105325
105667
|
schema
|
|
105326
|
-
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_STORY2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, T_PROTECTION_READ2, T_PROTECTION_MUTATION2, T_PERM_RANGE_READ2, T_PERM_RANGE_MUTATION2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, TABLE_COLOR_PATTERN_SOURCE2 = "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$", TABLE_COLOR_PATTERN2, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_DIRECTION_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStylesSchema2, documentDefaultsSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, trackChangeWordRevisionIdsSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, tableBorderColorPattern2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refListQueryProperties2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, customXmlPartTargetSchema2, customXmlPartMutation2, customXmlPartCreateMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, SELECTION_CURRENT_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LIST_KINDS2, LIST_INSERT_POSITIONS2, JOIN_DIRECTIONS2, MUTATION_SCOPES2, LEVEL_ALIGNMENTS2, TRAILING_CHARACTERS2, LIST_PRESET_IDS2, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS2, VALID_INSERT_POSITIONS2, VALID_JOIN_DIRECTIONS2, VALID_MUTATION_SCOPES2, VALID_LEVEL_ALIGNMENTS2, VALID_TRAILING_CHARACTERS2, VALID_LIST_PRESETS2, VALID_CONTINUITY_VALUES2, VALID_SEQUENCE_MODES2, VALID_LIST_CREATE_MODES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, VALID_HEADING_LEVELS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES3, SNAPSHOT_VERSIONS2, PAYLOAD_VERSIONS2, VALID_STYLE_OPTION_FLAGS2, VALID_APPLY_TO_VALUES2, VALID_BORDER_EDGE_KEYS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, VALID_TOC_UPDATE_MODES2, EDIT_ENTRY_PATCH_ALLOWED_KEYS2, PATCH_FIELDS2, CONTENT_CONTROL_TYPES2, LOCK_MODES2, CONTENT_CONTROL_APPEARANCES2, VALID_NODE_KINDS2, VALID_LOCK_MODES$1, VALID_CC_TYPES2, VALID_CC_APPEARANCES2, VALID_CONTENT_FORMATS2, VALID_RAW_PATCH_OPS2, VALID_SET_MODES2, VALID_CREATE_LOCATION_KINDS2, DEFAULT_PROTECTION_STATE, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$218) => ({
|
|
105668
|
+
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, PROPERTY_VALIDATOR_MAP2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_STORY2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, T_PROTECTION_READ2, T_PROTECTION_MUTATION2, T_PERM_RANGE_READ2, T_PERM_RANGE_MUTATION2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, TABLE_COLOR_PATTERN_SOURCE2 = "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$", TABLE_COLOR_PATTERN2, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_DIRECTIONS2, ALIGNMENT_POLICIES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, SET_DIRECTION_KEYS2, CLEAR_DIRECTION_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY2, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, tableAddressSchema2, tableRowAddressSchema2, tableCellAddressSchema2, tableOrCellAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, selectionTargetSchema2, deleteBehaviorSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationRangeSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, storyLocatorSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, documentStylesSchema2, documentDefaultsSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, trackChangeWordRevisionIdsSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, tableBorderColorPattern2, nullableTableBorderSpecSchema2, sdFragmentSchema2, placementSchema2, nestingPolicySchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refListQueryProperties2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, customXmlPartTargetSchema2, customXmlPartMutation2, customXmlPartCreateMutation2, anchoredMetadataAttachMutation2, anchoredMetadataMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, diffCoverageSchema2, diffSummarySchema2, diffSnapshotSchema2, diffPayloadSchema2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES, VALID_EDGE_VALUES2, VALID_EDGE_NODE_TYPES2, VALID_DOCUMENT_EDGES2, VALID_REF_BOUNDARIES2, VALID_ANCHOR_KINDS2, RESOLVE_RANGE_ALLOWED_KEYS2, SELECTION_CURRENT_ALLOWED_KEYS2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, VALID_BEHAVIORS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, TEXT_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LIST_KINDS2, LIST_INSERT_POSITIONS2, JOIN_DIRECTIONS2, MUTATION_SCOPES2, LEVEL_ALIGNMENTS2, TRAILING_CHARACTERS2, LIST_PRESET_IDS2, VALID_BLOCK_NODE_TYPES$1, VALID_LIST_KINDS2, VALID_INSERT_POSITIONS2, VALID_JOIN_DIRECTIONS2, VALID_MUTATION_SCOPES2, VALID_LEVEL_ALIGNMENTS2, VALID_TRAILING_CHARACTERS2, VALID_LIST_PRESETS2, VALID_CONTINUITY_VALUES2, VALID_SEQUENCE_MODES2, VALID_LIST_CREATE_MODES2, TEXT_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, VALID_HEADING_LEVELS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, VALID_BLOCK_NODE_TYPES3, SNAPSHOT_VERSIONS2, PAYLOAD_VERSIONS2, VALID_STYLE_OPTION_FLAGS2, VALID_APPLY_TO_VALUES2, VALID_BORDER_EDGE_KEYS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, VALID_TOC_UPDATE_MODES2, EDIT_ENTRY_PATCH_ALLOWED_KEYS2, PATCH_FIELDS2, CONTENT_CONTROL_TYPES2, LOCK_MODES2, CONTENT_CONTROL_APPEARANCES2, VALID_NODE_KINDS2, VALID_LOCK_MODES$1, VALID_CC_TYPES2, VALID_CC_APPEARANCES2, VALID_CONTENT_FORMATS2, VALID_RAW_PATCH_OPS2, VALID_SET_MODES2, VALID_CREATE_LOCATION_KINDS2, DEFAULT_PROTECTION_STATE, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$218) => ({
|
|
105327
105669
|
handlerName,
|
|
105328
105670
|
handler: (params3) => {
|
|
105329
105671
|
const { nodes } = params3;
|
|
@@ -120158,7 +120500,7 @@ var isRegExp = (value) => {
|
|
|
120158
120500
|
if (id2)
|
|
120159
120501
|
return trackedChanges.filter(({ mark }) => mark.attrs.id === id2);
|
|
120160
120502
|
return trackedChanges;
|
|
120161
|
-
}, DERIVED_ID_LENGTH = 24, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES2, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.33.1", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
|
|
120503
|
+
}, DERIVED_ID_LENGTH = 24, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES2, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.33.1", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
|
|
120162
120504
|
if (!runProps?.elements?.length || !state)
|
|
120163
120505
|
return;
|
|
120164
120506
|
const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
|
|
@@ -120192,7 +120534,7 @@ var isRegExp = (value) => {
|
|
|
120192
120534
|
state.kern = kernNode.attributes["w:val"];
|
|
120193
120535
|
}
|
|
120194
120536
|
}, SuperConverter;
|
|
120195
|
-
var
|
|
120537
|
+
var init_SuperConverter_CzwJ7ds9_es = __esm(() => {
|
|
120196
120538
|
init_rolldown_runtime_Bg48TavK_es();
|
|
120197
120539
|
init_jszip_C49i9kUs_es();
|
|
120198
120540
|
init_xml_js_CqGKpaft_es();
|
|
@@ -128764,6 +129106,85 @@ var init_SuperConverter_BLUJyRB9_es = __esm(() => {
|
|
|
128764
129106
|
}),
|
|
128765
129107
|
referenceDocPath: "custom-xml/parts/remove.mdx",
|
|
128766
129108
|
referenceGroup: "customXml"
|
|
129109
|
+
},
|
|
129110
|
+
"metadata.attach": {
|
|
129111
|
+
memberPath: "metadata.attach",
|
|
129112
|
+
description: "Anchor a JSON metadata payload to a span of text. Wraps the target range in a hidden inline content control whose w:tag carries a stable id, and stores the payload in a namespaced Custom XML Data Storage Part. v1 supports text-range anchors only.",
|
|
129113
|
+
expectedResult: "Returns an AnchoredMetadataAttachResult with the assigned id and the backing Storage Part name on success.",
|
|
129114
|
+
requiresDocumentContext: true,
|
|
129115
|
+
metadata: mutationOperation2({
|
|
129116
|
+
idempotency: "non-idempotent",
|
|
129117
|
+
supportsDryRun: true,
|
|
129118
|
+
supportsTrackedMode: false,
|
|
129119
|
+
possibleFailureCodes: [
|
|
129120
|
+
"TARGET_NOT_FOUND",
|
|
129121
|
+
"INVALID_TARGET",
|
|
129122
|
+
"INVALID_INPUT"
|
|
129123
|
+
],
|
|
129124
|
+
throws: [...T_REF_INSERT2, "REVISION_MISMATCH"]
|
|
129125
|
+
}),
|
|
129126
|
+
referenceDocPath: "metadata/attach.mdx",
|
|
129127
|
+
referenceGroup: "metadata"
|
|
129128
|
+
},
|
|
129129
|
+
"metadata.list": {
|
|
129130
|
+
memberPath: "metadata.list",
|
|
129131
|
+
description: "List anchored-metadata entries in the document, optionally filtered by consumer namespace and/or a `within` selection (returns only entries whose anchor overlaps `within`).",
|
|
129132
|
+
expectedResult: "Returns an AnchoredMetadataListResult with summary entries (no payload); fetch payload via get.",
|
|
129133
|
+
requiresDocumentContext: true,
|
|
129134
|
+
metadata: readOperation2({
|
|
129135
|
+
idempotency: "idempotent",
|
|
129136
|
+
throws: T_REF_READ_LIST2
|
|
129137
|
+
}),
|
|
129138
|
+
referenceDocPath: "metadata/list.mdx",
|
|
129139
|
+
referenceGroup: "metadata"
|
|
129140
|
+
},
|
|
129141
|
+
"metadata.get": {
|
|
129142
|
+
memberPath: "metadata.get",
|
|
129143
|
+
description: "Get a single anchored-metadata entry by id, including its JSON payload.",
|
|
129144
|
+
expectedResult: "Returns an AnchoredMetadataInfo with id, namespace, partName, and payload; or null if not found.",
|
|
129145
|
+
requiresDocumentContext: true,
|
|
129146
|
+
metadata: readOperation2({ throws: T_NOT_FOUND_CAPABLE2 }),
|
|
129147
|
+
referenceDocPath: "metadata/get.mdx",
|
|
129148
|
+
referenceGroup: "metadata"
|
|
129149
|
+
},
|
|
129150
|
+
"metadata.update": {
|
|
129151
|
+
memberPath: "metadata.update",
|
|
129152
|
+
description: "Replace the JSON payload of an existing anchored-metadata entry. Replace semantics; no merge. The anchor is left untouched.",
|
|
129153
|
+
expectedResult: "Returns an AnchoredMetadataMutationResult with the entry id on success or a failure.",
|
|
129154
|
+
requiresDocumentContext: true,
|
|
129155
|
+
metadata: mutationOperation2({
|
|
129156
|
+
idempotency: "idempotent",
|
|
129157
|
+
supportsDryRun: true,
|
|
129158
|
+
supportsTrackedMode: false,
|
|
129159
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND", "INVALID_INPUT"],
|
|
129160
|
+
throws: [...T_REF_MUTATION2, "REVISION_MISMATCH"]
|
|
129161
|
+
}),
|
|
129162
|
+
referenceDocPath: "metadata/update.mdx",
|
|
129163
|
+
referenceGroup: "metadata"
|
|
129164
|
+
},
|
|
129165
|
+
"metadata.remove": {
|
|
129166
|
+
memberPath: "metadata.remove",
|
|
129167
|
+
description: "Remove an anchored-metadata entry. Strips the anchor content-control wrapper (its content stays in the document) and deletes the payload entry from the Storage Part. In v1 these writes are sequenced, not transactional: the adapter resolves the target up-front so missing-target failures land before any state change, but a crash strictly between the two writes can leave a dangling payload. When the backing part has no remaining entries, the part itself is removed.",
|
|
129168
|
+
expectedResult: "Returns an AnchoredMetadataMutationResult with the removed entry id on success or a failure.",
|
|
129169
|
+
requiresDocumentContext: true,
|
|
129170
|
+
metadata: mutationOperation2({
|
|
129171
|
+
idempotency: "non-idempotent",
|
|
129172
|
+
supportsDryRun: true,
|
|
129173
|
+
supportsTrackedMode: false,
|
|
129174
|
+
possibleFailureCodes: ["TARGET_NOT_FOUND"],
|
|
129175
|
+
throws: [...T_REF_MUTATION_REMOVE2, "REVISION_MISMATCH"]
|
|
129176
|
+
}),
|
|
129177
|
+
referenceDocPath: "metadata/remove.mdx",
|
|
129178
|
+
referenceGroup: "metadata"
|
|
129179
|
+
},
|
|
129180
|
+
"metadata.resolve": {
|
|
129181
|
+
memberPath: "metadata.resolve",
|
|
129182
|
+
description: "Find where an anchored-metadata entry is anchored in the document. Returns the SelectionTarget covering the anchor content.",
|
|
129183
|
+
expectedResult: "Returns an AnchoredMetadataResolveInfo with id and target SelectionTarget; or null if the anchor is no longer present.",
|
|
129184
|
+
requiresDocumentContext: true,
|
|
129185
|
+
metadata: readOperation2({ throws: T_NOT_FOUND_CAPABLE2 }),
|
|
129186
|
+
referenceDocPath: "metadata/resolve.mdx",
|
|
129187
|
+
referenceGroup: "metadata"
|
|
128767
129188
|
}
|
|
128768
129189
|
};
|
|
128769
129190
|
OPERATION_IDS2 = Object.freeze(Object.keys(OPERATION_DEFINITIONS2));
|
|
@@ -131042,6 +131463,28 @@ var init_SuperConverter_BLUJyRB9_es = __esm(() => {
|
|
|
131042
131463
|
"partName",
|
|
131043
131464
|
"propsPartName"
|
|
131044
131465
|
]);
|
|
131466
|
+
anchoredMetadataAttachMutation2 = refMutationSchemas2({
|
|
131467
|
+
id: {
|
|
131468
|
+
type: "string",
|
|
131469
|
+
minLength: 1
|
|
131470
|
+
},
|
|
131471
|
+
namespace: {
|
|
131472
|
+
type: "string",
|
|
131473
|
+
minLength: 1
|
|
131474
|
+
},
|
|
131475
|
+
partName: {
|
|
131476
|
+
type: "string",
|
|
131477
|
+
minLength: 1
|
|
131478
|
+
}
|
|
131479
|
+
}, [
|
|
131480
|
+
"id",
|
|
131481
|
+
"namespace",
|
|
131482
|
+
"partName"
|
|
131483
|
+
]);
|
|
131484
|
+
anchoredMetadataMutation2 = refMutationSchemas2({ id: {
|
|
131485
|
+
type: "string",
|
|
131486
|
+
minLength: 1
|
|
131487
|
+
} }, ["id"]);
|
|
131045
131488
|
footnoteAddressSchema2 = objectSchema2({
|
|
131046
131489
|
kind: { const: "entity" },
|
|
131047
131490
|
entityType: { const: "footnote" },
|
|
@@ -134962,7 +135405,41 @@ var init_SuperConverter_BLUJyRB9_es = __esm(() => {
|
|
|
134962
135405
|
minLength: 1
|
|
134963
135406
|
}
|
|
134964
135407
|
}
|
|
134965
|
-
}, ["content"]), { ...customXmlPartCreateMutation2 }, { ...customXmlPartMutation2 }, objectSchema2({ target: customXmlPartTargetSchema2 }, ["target"]), { ...customXmlPartMutation2 }
|
|
135408
|
+
}, ["content"]), { ...customXmlPartCreateMutation2 }, { ...customXmlPartMutation2 }, objectSchema2({ target: customXmlPartTargetSchema2 }, ["target"]), { ...customXmlPartMutation2 }, objectSchema2({
|
|
135409
|
+
target: selectionTargetSchema2,
|
|
135410
|
+
namespace: {
|
|
135411
|
+
type: "string",
|
|
135412
|
+
minLength: 1
|
|
135413
|
+
},
|
|
135414
|
+
payload: {},
|
|
135415
|
+
id: {
|
|
135416
|
+
type: "string",
|
|
135417
|
+
minLength: 1
|
|
135418
|
+
}
|
|
135419
|
+
}, [
|
|
135420
|
+
"target",
|
|
135421
|
+
"namespace",
|
|
135422
|
+
"payload"
|
|
135423
|
+
]), { ...anchoredMetadataAttachMutation2 }, objectSchema2({
|
|
135424
|
+
...refListQueryProperties2,
|
|
135425
|
+
namespace: { type: "string" },
|
|
135426
|
+
within: selectionTargetSchema2
|
|
135427
|
+
}), objectSchema2({ id: {
|
|
135428
|
+
type: "string",
|
|
135429
|
+
minLength: 1
|
|
135430
|
+
} }, ["id"]), objectSchema2({
|
|
135431
|
+
id: {
|
|
135432
|
+
type: "string",
|
|
135433
|
+
minLength: 1
|
|
135434
|
+
},
|
|
135435
|
+
payload: {}
|
|
135436
|
+
}, ["id", "payload"]), { ...anchoredMetadataMutation2 }, objectSchema2({ id: {
|
|
135437
|
+
type: "string",
|
|
135438
|
+
minLength: 1
|
|
135439
|
+
} }, ["id"]), { ...anchoredMetadataMutation2 }, objectSchema2({ id: {
|
|
135440
|
+
type: "string",
|
|
135441
|
+
minLength: 1
|
|
135442
|
+
} }, ["id"]);
|
|
134966
135443
|
projectFromDefinitions2((_id, entry) => entry.memberPath);
|
|
134967
135444
|
[...new Set(OPERATION_IDS2.map((id2) => OPERATION_DEFINITIONS2[id2].memberPath))];
|
|
134968
135445
|
projectFromDefinitions2((_id, entry) => entry.referenceDocPath);
|
|
@@ -135141,6 +135618,11 @@ var init_SuperConverter_BLUJyRB9_es = __esm(() => {
|
|
|
135141
135618
|
title: "Custom XML",
|
|
135142
135619
|
description: "Custom XML Data Storage Part operations (ECMA-376 §15.2.5, §15.2.6). Raw read and write of custom XML parts in the OOXML package.",
|
|
135143
135620
|
pagePath: "custom-xml/index.mdx"
|
|
135621
|
+
},
|
|
135622
|
+
metadata: {
|
|
135623
|
+
title: "Anchored Metadata",
|
|
135624
|
+
description: "Attach a JSON payload to a span of text and read it back across DOCX round-trips. Backed by hidden inline content controls and namespaced Custom XML Data Storage Parts; consumers see one operation set.",
|
|
135625
|
+
pagePath: "metadata/index.mdx"
|
|
135144
135626
|
}
|
|
135145
135627
|
};
|
|
135146
135628
|
Object.keys(GROUP_METADATA2).map((key) => ({
|
|
@@ -158229,7 +158711,7 @@ var init_SuperConverter_BLUJyRB9_es = __esm(() => {
|
|
|
158229
158711
|
};
|
|
158230
158712
|
});
|
|
158231
158713
|
|
|
158232
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
158714
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-BQTnHkb4.es.js
|
|
158233
158715
|
function parseSizeUnit(val = "0") {
|
|
158234
158716
|
const length3 = val.toString() || "0";
|
|
158235
158717
|
const value = Number.parseFloat(length3);
|
|
@@ -168239,8 +168721,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
168239
168721
|
}
|
|
168240
168722
|
};
|
|
168241
168723
|
};
|
|
168242
|
-
var
|
|
168243
|
-
|
|
168724
|
+
var init_create_headless_toolbar_BQTnHkb4_es = __esm(() => {
|
|
168725
|
+
init_SuperConverter_CzwJ7ds9_es();
|
|
168244
168726
|
init_uuid_qzgm05fK_es();
|
|
168245
168727
|
init_constants_DrU4EASo_es();
|
|
168246
168728
|
init_dist_B8HfvhaK_es();
|
|
@@ -217445,7 +217927,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
217445
217927
|
init_remark_gfm_BhnWr3yf_es();
|
|
217446
217928
|
});
|
|
217447
217929
|
|
|
217448
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
217930
|
+
// ../../packages/superdoc/dist/chunks/src-D_jA08Jh.es.js
|
|
217449
217931
|
function deleteProps(obj, propOrProps) {
|
|
217450
217932
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
217451
217933
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -219790,11 +220272,11 @@ function syncSplitParagraphRunProperties(attrs, runProperties) {
|
|
|
219790
220272
|
paragraphProperties: nextParagraphProperties
|
|
219791
220273
|
};
|
|
219792
220274
|
}
|
|
219793
|
-
function getConverter$
|
|
220275
|
+
function getConverter$92(editor) {
|
|
219794
220276
|
return editor.converter;
|
|
219795
220277
|
}
|
|
219796
220278
|
function readTranslatedLinkedStyles(editor) {
|
|
219797
|
-
return getConverter$
|
|
220279
|
+
return getConverter$92(editor)?.translatedLinkedStyles ?? null;
|
|
219798
220280
|
}
|
|
219799
220281
|
function isHeadingStyleId$1(styleId) {
|
|
219800
220282
|
return typeof styleId === "string" && /^heading\s*[1-6]$/i.test(styleId.trim());
|
|
@@ -234529,7 +235011,7 @@ function makeTrackedChangeAnchorKey(ref$1) {
|
|
|
234529
235011
|
function makeCommentAnchorKey(commentId) {
|
|
234530
235012
|
return `${COMMENT_ANCHOR_KEY_PREFIX}${commentId}`;
|
|
234531
235013
|
}
|
|
234532
|
-
function getConverter$
|
|
235014
|
+
function getConverter$82(editor) {
|
|
234533
235015
|
return editor.converter;
|
|
234534
235016
|
}
|
|
234535
235017
|
function toRevisionCapableNoteId(note) {
|
|
@@ -234546,7 +235028,7 @@ function enumerateRevisionCapableStories(editor) {
|
|
|
234546
235028
|
kind: "story",
|
|
234547
235029
|
storyType: "body"
|
|
234548
235030
|
}];
|
|
234549
|
-
const converter = getConverter$
|
|
235031
|
+
const converter = getConverter$82(editor);
|
|
234550
235032
|
if (!converter)
|
|
234551
235033
|
return stories;
|
|
234552
235034
|
if (converter.headers)
|
|
@@ -238636,15 +239118,15 @@ function previewPlan(editor, input2) {
|
|
|
238636
239118
|
}
|
|
238637
239119
|
stepPreviews.push(preview);
|
|
238638
239120
|
}
|
|
238639
|
-
for (const failure$
|
|
239121
|
+
for (const failure$2 of assertFailures)
|
|
238640
239122
|
failures.push({
|
|
238641
239123
|
code: "PRECONDITION_FAILED",
|
|
238642
|
-
stepId: failure$
|
|
239124
|
+
stepId: failure$2.stepId,
|
|
238643
239125
|
phase: "assert",
|
|
238644
|
-
message: `assert "${failure$
|
|
239126
|
+
message: `assert "${failure$2.stepId}" expected ${failure$2.expectedCount} matches but found ${failure$2.actualCount}`,
|
|
238645
239127
|
details: {
|
|
238646
|
-
expectedCount: failure$
|
|
238647
|
-
actualCount: failure$
|
|
239128
|
+
expectedCount: failure$2.expectedCount,
|
|
239129
|
+
actualCount: failure$2.actualCount
|
|
238648
239130
|
}
|
|
238649
239131
|
});
|
|
238650
239132
|
} catch (error3) {
|
|
@@ -243036,10 +243518,10 @@ function registerBuiltInExecutors() {
|
|
|
243036
243518
|
};
|
|
243037
243519
|
} });
|
|
243038
243520
|
}
|
|
243039
|
-
function getConverter$
|
|
243521
|
+
function getConverter$72(editor) {
|
|
243040
243522
|
return editor.converter;
|
|
243041
243523
|
}
|
|
243042
|
-
function getConverter$
|
|
243524
|
+
function getConverter$62(editor) {
|
|
243043
243525
|
return editor.converter;
|
|
243044
243526
|
}
|
|
243045
243527
|
function createEmptyHeaderFooterJson() {
|
|
@@ -243052,7 +243534,7 @@ function createEmptyHeaderFooterJson() {
|
|
|
243052
243534
|
};
|
|
243053
243535
|
}
|
|
243054
243536
|
function syncHeaderFooterCaches(editor, part) {
|
|
243055
|
-
const converter = getConverter$
|
|
243537
|
+
const converter = getConverter$62(editor);
|
|
243056
243538
|
if (!converter)
|
|
243057
243539
|
return;
|
|
243058
243540
|
const relsRoot = getRelationshipsRoot(part);
|
|
@@ -243114,7 +243596,7 @@ function createTableWrapper(editor, input2, options) {
|
|
|
243114
243596
|
});
|
|
243115
243597
|
return adapterResult;
|
|
243116
243598
|
}
|
|
243117
|
-
function getConverter$
|
|
243599
|
+
function getConverter$52(editor) {
|
|
243118
243600
|
return editor.converter;
|
|
243119
243601
|
}
|
|
243120
243602
|
function toSectionFailure2(code7, message) {
|
|
@@ -243182,7 +243664,7 @@ function buildSectionMarginsForAttrs2(sectPr) {
|
|
|
243182
243664
|
};
|
|
243183
243665
|
}
|
|
243184
243666
|
function syncConverterBodySection2(editor, sectPr) {
|
|
243185
|
-
const converter = getConverter$
|
|
243667
|
+
const converter = getConverter$52(editor);
|
|
243186
243668
|
if (!converter)
|
|
243187
243669
|
return;
|
|
243188
243670
|
converter.bodySectPr = cloneXmlElement(sectPr);
|
|
@@ -243302,7 +243784,7 @@ function createSectionBreakNode(editor, breakParagraphId, input2) {
|
|
|
243302
243784
|
return paragraphNode;
|
|
243303
243785
|
}
|
|
243304
243786
|
function updateGlobalTitlePageFlag(editor) {
|
|
243305
|
-
const converter = getConverter$
|
|
243787
|
+
const converter = getConverter$52(editor);
|
|
243306
243788
|
if (!converter)
|
|
243307
243789
|
return;
|
|
243308
243790
|
const anyTitlePage = resolveSectionProjections(editor).some((entry) => entry.domain.titlePage === true);
|
|
@@ -243386,7 +243868,7 @@ function sectionsSetTitlePageAdapter(editor, input2, options) {
|
|
|
243386
243868
|
}
|
|
243387
243869
|
function sectionsSetOddEvenHeadersFootersAdapter(editor, input2, options) {
|
|
243388
243870
|
rejectTrackedMode("sections.setOddEvenHeadersFooters", options);
|
|
243389
|
-
const converter = getConverter$
|
|
243871
|
+
const converter = getConverter$52(editor);
|
|
243390
243872
|
if (!converter)
|
|
243391
243873
|
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", "sections.setOddEvenHeadersFooters requires an active document converter.");
|
|
243392
243874
|
return mutatePart({
|
|
@@ -243422,13 +243904,13 @@ function sectionsSetSectionDirectionAdapter(editor, input2, options) {
|
|
|
243422
243904
|
}
|
|
243423
243905
|
function sectionsSetHeaderFooterRefAdapter(editor, input2, options) {
|
|
243424
243906
|
return sectionMutationBySectPr$1(editor, input2, options, "sections.setHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
243425
|
-
const converter = getConverter$
|
|
243907
|
+
const converter = getConverter$52(editor) ?? null;
|
|
243426
243908
|
return setHeaderFooterRefMutation(sectPr, input2.kind, input2.variant, input2.refId, converter, "sections.setHeaderFooterRef", dryRun);
|
|
243427
243909
|
});
|
|
243428
243910
|
}
|
|
243429
243911
|
function sectionsClearHeaderFooterRefAdapter(editor, input2, options) {
|
|
243430
243912
|
return sectionMutationBySectPr$1(editor, input2, options, "sections.clearHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
243431
|
-
const converter = getConverter$
|
|
243913
|
+
const converter = getConverter$52(editor) ?? null;
|
|
243432
243914
|
clearHeaderFooterRefMutation(sectPr, input2.kind, input2.variant, converter, dryRun);
|
|
243433
243915
|
});
|
|
243434
243916
|
}
|
|
@@ -245364,13 +245846,13 @@ function getLinkMarkType(editor) {
|
|
|
245364
245846
|
throw new Error("Link mark type is not defined in the editor schema.");
|
|
245365
245847
|
return markType;
|
|
245366
245848
|
}
|
|
245367
|
-
function dispatchTransaction$
|
|
245849
|
+
function dispatchTransaction$2(editor, tr) {
|
|
245368
245850
|
editor.dispatch(tr);
|
|
245369
245851
|
}
|
|
245370
245852
|
function dispatchIfChanged(editor, tr) {
|
|
245371
245853
|
if (!tr.docChanged)
|
|
245372
245854
|
return false;
|
|
245373
|
-
dispatchTransaction$
|
|
245855
|
+
dispatchTransaction$2(editor, tr);
|
|
245374
245856
|
return true;
|
|
245375
245857
|
}
|
|
245376
245858
|
function createRelationshipId(editor, href) {
|
|
@@ -245414,7 +245896,7 @@ function wrapWithLink(editor, from$1, to, spec) {
|
|
|
245414
245896
|
const tr = editor.state.tr;
|
|
245415
245897
|
tr.addMark(from$1, to, linkMarkType.create(attrs));
|
|
245416
245898
|
applyDirectMutationMeta(tr);
|
|
245417
|
-
dispatchTransaction$
|
|
245899
|
+
dispatchTransaction$2(editor, tr);
|
|
245418
245900
|
return true;
|
|
245419
245901
|
}
|
|
245420
245902
|
function insertLinkedText(editor, pos, text5, spec) {
|
|
@@ -245425,7 +245907,7 @@ function insertLinkedText(editor, pos, text5, spec) {
|
|
|
245425
245907
|
tr.insertText(text5, pos);
|
|
245426
245908
|
tr.addMark(pos, pos + text5.length, mark2);
|
|
245427
245909
|
applyDirectMutationMeta(tr);
|
|
245428
|
-
dispatchTransaction$
|
|
245910
|
+
dispatchTransaction$2(editor, tr);
|
|
245429
245911
|
return true;
|
|
245430
245912
|
}
|
|
245431
245913
|
function patchLinkMark(editor, from$1, to, existingMark, patch3) {
|
|
@@ -245471,7 +245953,7 @@ function deleteLinkedText(editor, from$1, to) {
|
|
|
245471
245953
|
const tr = editor.state.tr;
|
|
245472
245954
|
tr.delete(from$1, to);
|
|
245473
245955
|
applyDirectMutationMeta(tr);
|
|
245474
|
-
dispatchTransaction$
|
|
245956
|
+
dispatchTransaction$2(editor, tr);
|
|
245475
245957
|
return true;
|
|
245476
245958
|
}
|
|
245477
245959
|
function normalizeReadProperties(attrs) {
|
|
@@ -245800,8 +246282,8 @@ function hyperlinksPatchWrapper(editor, input2, options) {
|
|
|
245800
246282
|
const mergedHref = input2.patch.href === undefined ? oldAttrs.href : input2.patch.href;
|
|
245801
246283
|
const mergedAnchor = input2.patch.anchor === undefined ? oldAttrs.anchor : input2.patch.anchor;
|
|
245802
246284
|
const hasHref = typeof mergedHref === "string" && mergedHref.length > 0;
|
|
245803
|
-
const hasAnchor = typeof mergedAnchor === "string" && mergedAnchor.length > 0;
|
|
245804
|
-
if (!hasHref && !hasAnchor)
|
|
246285
|
+
const hasAnchor$1 = typeof mergedAnchor === "string" && mergedAnchor.length > 0;
|
|
246286
|
+
if (!hasHref && !hasAnchor$1)
|
|
245805
246287
|
throw new DocumentApiAdapterError("INVALID_INPUT", "hyperlinks.patch: resulting destination must have at least one of href or anchor.");
|
|
245806
246288
|
if (typeof input2.patch.href === "string")
|
|
245807
246289
|
sanitizeHrefOrThrow(input2.patch.href);
|
|
@@ -245899,7 +246381,7 @@ function executeSdtMutation(editor, target, options, handler2) {
|
|
|
245899
246381
|
return buildMutationFailure("NO_OP", "The mutation had no effect.");
|
|
245900
246382
|
return buildMutationSuccess(target, updatedRef);
|
|
245901
246383
|
}
|
|
245902
|
-
function
|
|
246384
|
+
function dispatchTransaction$1(editor, tr) {
|
|
245903
246385
|
if (editor.view?.dispatch) {
|
|
245904
246386
|
editor.view.dispatch(tr);
|
|
245905
246387
|
return;
|
|
@@ -245974,7 +246456,7 @@ function replaceSdtTextContent(editor, target, text5) {
|
|
|
245974
246456
|
tr.replaceWith(innerFrom, innerTo, textNode);
|
|
245975
246457
|
} else
|
|
245976
246458
|
tr.delete(innerFrom, innerTo);
|
|
245977
|
-
|
|
246459
|
+
dispatchTransaction$1(editor, tr);
|
|
245978
246460
|
return true;
|
|
245979
246461
|
}
|
|
245980
246462
|
const paragraph2 = buildEmptyBlockContent(editor, resolved.node);
|
|
@@ -245983,7 +246465,7 @@ function replaceSdtTextContent(editor, target, text5) {
|
|
|
245983
246465
|
const paragraphText = text5.length > 0 ? buildTextWithTabs(editor.schema, text5, undefined) : null;
|
|
245984
246466
|
const updatedParagraph = paragraph2.type.create(paragraph2.attrs ?? null, paragraphText, paragraph2.marks);
|
|
245985
246467
|
tr.replaceWith(innerFrom, innerTo, updatedParagraph);
|
|
245986
|
-
|
|
246468
|
+
dispatchTransaction$1(editor, tr);
|
|
245987
246469
|
return true;
|
|
245988
246470
|
}
|
|
245989
246471
|
function listWrapper(editor, query2) {
|
|
@@ -246072,7 +246554,7 @@ function wrapWrapper(editor, input2, options) {
|
|
|
246072
246554
|
}, resolved.node);
|
|
246073
246555
|
const { tr } = editor.state;
|
|
246074
246556
|
tr.replaceWith(resolved.pos, resolved.pos + resolved.node.nodeSize, wrapperNode);
|
|
246075
|
-
|
|
246557
|
+
dispatchTransaction$1(editor, tr);
|
|
246076
246558
|
return wrapperTarget;
|
|
246077
246559
|
});
|
|
246078
246560
|
}
|
|
@@ -246083,7 +246565,7 @@ function unwrapWrapper(editor, input2, options) {
|
|
|
246083
246565
|
const resolved = resolveSdtByTarget(editor.state.doc, input2.target);
|
|
246084
246566
|
const { tr } = editor.state;
|
|
246085
246567
|
tr.replaceWith(resolved.pos, resolved.pos + resolved.node.nodeSize, resolved.node.content);
|
|
246086
|
-
|
|
246568
|
+
dispatchTransaction$1(editor, tr);
|
|
246087
246569
|
return true;
|
|
246088
246570
|
});
|
|
246089
246571
|
}
|
|
@@ -246112,7 +246594,7 @@ function copyWrapper(editor, input2, options) {
|
|
|
246112
246594
|
const { tr } = editor.state;
|
|
246113
246595
|
const insertPos = dest.pos + dest.node.nodeSize;
|
|
246114
246596
|
tr.insert(insertPos, cloned);
|
|
246115
|
-
|
|
246597
|
+
dispatchTransaction$1(editor, tr);
|
|
246116
246598
|
return {
|
|
246117
246599
|
kind: source.kind,
|
|
246118
246600
|
nodeType: "sdt",
|
|
@@ -246130,7 +246612,7 @@ function moveWrapper(editor, input2, options) {
|
|
|
246130
246612
|
const destAfterDelete = resolveSdtByTarget(tr.doc, input2.destination);
|
|
246131
246613
|
const insertPos = destAfterDelete.pos + destAfterDelete.node.nodeSize;
|
|
246132
246614
|
tr.insert(insertPos, source.node);
|
|
246133
|
-
|
|
246615
|
+
dispatchTransaction$1(editor, tr);
|
|
246134
246616
|
return true;
|
|
246135
246617
|
});
|
|
246136
246618
|
}
|
|
@@ -246461,7 +246943,7 @@ function insertTextAroundSdt(editor, target, content3, resolvePos) {
|
|
|
246461
246943
|
const tabType = editor.schema.nodes?.tab;
|
|
246462
246944
|
const parentAllowsTab = tabType && content3.includes("\t") ? parentAllowsNodeAt(tr, pos, tabType) : false;
|
|
246463
246945
|
tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, { parentAllowsTab }));
|
|
246464
|
-
|
|
246946
|
+
dispatchTransaction$1(editor, tr);
|
|
246465
246947
|
return true;
|
|
246466
246948
|
}
|
|
246467
246949
|
function insertBeforeWrapper(editor, input2, options) {
|
|
@@ -246876,7 +247358,7 @@ function repeatingSectionInsertItemBeforeWrapper(editor, input2, options) {
|
|
|
246876
247358
|
}, paragraph2);
|
|
246877
247359
|
const { tr } = editor.state;
|
|
246878
247360
|
tr.insert(insertPos, newItem);
|
|
246879
|
-
|
|
247361
|
+
dispatchTransaction$1(editor, tr);
|
|
246880
247362
|
return true;
|
|
246881
247363
|
});
|
|
246882
247364
|
}
|
|
@@ -246899,7 +247381,7 @@ function repeatingSectionInsertItemAfterWrapper(editor, input2, options) {
|
|
|
246899
247381
|
}, paragraph2);
|
|
246900
247382
|
const { tr } = editor.state;
|
|
246901
247383
|
tr.insert(insertPos, newItem);
|
|
246902
|
-
|
|
247384
|
+
dispatchTransaction$1(editor, tr);
|
|
246903
247385
|
return true;
|
|
246904
247386
|
});
|
|
246905
247387
|
}
|
|
@@ -246919,7 +247401,7 @@ function repeatingSectionCloneItemWrapper(editor, input2, options) {
|
|
|
246919
247401
|
const insertPos = sourceItem.pos + sourceItem.node.nodeSize;
|
|
246920
247402
|
const { tr } = editor.state;
|
|
246921
247403
|
tr.insert(insertPos, cloned);
|
|
246922
|
-
|
|
247404
|
+
dispatchTransaction$1(editor, tr);
|
|
246923
247405
|
return true;
|
|
246924
247406
|
});
|
|
246925
247407
|
}
|
|
@@ -246934,7 +247416,7 @@ function repeatingSectionDeleteItemWrapper(editor, input2, options) {
|
|
|
246934
247416
|
const item = items[input2.index];
|
|
246935
247417
|
const { tr } = editor.state;
|
|
246936
247418
|
tr.delete(item.pos, item.pos + item.node.nodeSize);
|
|
246937
|
-
|
|
247419
|
+
dispatchTransaction$1(editor, tr);
|
|
246938
247420
|
return true;
|
|
246939
247421
|
});
|
|
246940
247422
|
}
|
|
@@ -246962,7 +247444,7 @@ function groupWrapWrapper(editor, input2, options) {
|
|
|
246962
247444
|
}, resolved.node);
|
|
246963
247445
|
const { tr } = editor.state;
|
|
246964
247446
|
tr.replaceWith(resolved.pos, resolved.pos + resolved.node.nodeSize, groupNode);
|
|
246965
|
-
|
|
247447
|
+
dispatchTransaction$1(editor, tr);
|
|
246966
247448
|
return {
|
|
246967
247449
|
kind: "block",
|
|
246968
247450
|
nodeType: "sdt",
|
|
@@ -246978,7 +247460,7 @@ function groupUngroupWrapper(editor, input2, options) {
|
|
|
246978
247460
|
const resolved = resolveSdtByTarget(editor.state.doc, input2.target);
|
|
246979
247461
|
const { tr } = editor.state;
|
|
246980
247462
|
tr.replaceWith(resolved.pos, resolved.pos + resolved.node.nodeSize, resolved.node.content);
|
|
246981
|
-
|
|
247463
|
+
dispatchTransaction$1(editor, tr);
|
|
246982
247464
|
return true;
|
|
246983
247465
|
});
|
|
246984
247466
|
}
|
|
@@ -247035,14 +247517,14 @@ function createWrapper(editor, input2, options) {
|
|
|
247035
247517
|
const insertPos = ref$1.pos + ref$1.node.nodeSize;
|
|
247036
247518
|
const { tr } = editor.state;
|
|
247037
247519
|
tr.insert(insertPos, newNode);
|
|
247038
|
-
|
|
247520
|
+
dispatchTransaction$1(editor, tr);
|
|
247039
247521
|
return true;
|
|
247040
247522
|
}
|
|
247041
247523
|
if (input2.at) {
|
|
247042
247524
|
const { absFrom, absTo } = resolveSelectionTarget(editor, input2.at);
|
|
247043
247525
|
const { tr } = editor.state;
|
|
247044
247526
|
tr.setSelection(TextSelection.create(tr.doc, absFrom, absTo));
|
|
247045
|
-
|
|
247527
|
+
dispatchTransaction$1(editor, tr);
|
|
247046
247528
|
}
|
|
247047
247529
|
const cmd = editor.commands?.[commandName];
|
|
247048
247530
|
if (typeof cmd !== "function")
|
|
@@ -247152,11 +247634,11 @@ function createContentControlsAdapter(editor) {
|
|
|
247152
247634
|
create: (input2, options) => createWrapper(editor, input2, options)
|
|
247153
247635
|
};
|
|
247154
247636
|
}
|
|
247155
|
-
function getConverter$
|
|
247637
|
+
function getConverter$42(editor) {
|
|
247156
247638
|
return editor.converter;
|
|
247157
247639
|
}
|
|
247158
247640
|
function requireConverter$1(editor, operationName) {
|
|
247159
|
-
const converter = getConverter$
|
|
247641
|
+
const converter = getConverter$42(editor);
|
|
247160
247642
|
if (!converter)
|
|
247161
247643
|
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", `${operationName} requires an active document converter.`);
|
|
247162
247644
|
return converter;
|
|
@@ -247262,7 +247744,7 @@ function headerFootersResolveAdapter(editor, input2) {
|
|
|
247262
247744
|
function headerFootersRefsSetAdapter(editor, input2, options) {
|
|
247263
247745
|
const { section, headerFooterKind, variant } = input2.target;
|
|
247264
247746
|
const result = sectionMutationBySectPr(editor, { target: section }, options, "headerFooters.refs.set", (sectPr, _projection, _sections, dryRun) => {
|
|
247265
|
-
const converter = getConverter$
|
|
247747
|
+
const converter = getConverter$42(editor) ?? null;
|
|
247266
247748
|
return setHeaderFooterRefMutation(sectPr, headerFooterKind, variant, input2.refId, converter, "headerFooters.refs.set", dryRun);
|
|
247267
247749
|
});
|
|
247268
247750
|
invalidateSlotRuntimesAfterRefChange(editor, result, options);
|
|
@@ -247271,7 +247753,7 @@ function headerFootersRefsSetAdapter(editor, input2, options) {
|
|
|
247271
247753
|
function headerFootersRefsClearAdapter(editor, input2, options) {
|
|
247272
247754
|
const { section, headerFooterKind, variant } = input2.target;
|
|
247273
247755
|
const result = sectionMutationBySectPr(editor, { target: section }, options, "headerFooters.refs.clear", (sectPr, _projection, _sections, dryRun) => {
|
|
247274
|
-
clearHeaderFooterRefMutation(sectPr, headerFooterKind, variant, getConverter$
|
|
247756
|
+
clearHeaderFooterRefMutation(sectPr, headerFooterKind, variant, getConverter$42(editor) ?? null, dryRun);
|
|
247275
247757
|
});
|
|
247276
247758
|
invalidateSlotRuntimesAfterRefChange(editor, result, options);
|
|
247277
247759
|
return result;
|
|
@@ -248134,15 +248616,15 @@ function getLocalName2(name) {
|
|
|
248134
248616
|
const i4 = name.indexOf(":");
|
|
248135
248617
|
return i4 >= 0 ? name.slice(i4 + 1) : name;
|
|
248136
248618
|
}
|
|
248137
|
-
function findFirstElement(parent, localName) {
|
|
248619
|
+
function findFirstElement(parent, localName$1) {
|
|
248138
248620
|
if (!parent?.elements?.length)
|
|
248139
248621
|
return null;
|
|
248140
|
-
return parent.elements.find((el) => el?.type === "element" && getLocalName2(el.name) === localName) ?? null;
|
|
248622
|
+
return parent.elements.find((el) => el?.type === "element" && getLocalName2(el.name) === localName$1) ?? null;
|
|
248141
248623
|
}
|
|
248142
|
-
function findAllElements(parent, localName) {
|
|
248624
|
+
function findAllElements(parent, localName$1) {
|
|
248143
248625
|
if (!parent?.elements?.length)
|
|
248144
248626
|
return [];
|
|
248145
|
-
return parent.elements.filter((el) => el?.type === "element" && getLocalName2(el.name) === localName);
|
|
248627
|
+
return parent.elements.filter((el) => el?.type === "element" && getLocalName2(el.name) === localName$1);
|
|
248146
248628
|
}
|
|
248147
248629
|
function partNameFromIndex(index2) {
|
|
248148
248630
|
return `customXml/item${index2}.xml`;
|
|
@@ -248512,13 +248994,13 @@ function invalidateConverterCachesForPath(converter, partName) {
|
|
|
248512
248994
|
version: null
|
|
248513
248995
|
};
|
|
248514
248996
|
}
|
|
248515
|
-
function getConverter$
|
|
248997
|
+
function getConverter$32(editor) {
|
|
248516
248998
|
return editor.converter ?? null;
|
|
248517
248999
|
}
|
|
248518
|
-
function
|
|
248519
|
-
return getConverter$
|
|
249000
|
+
function getConvertedXml$1(editor) {
|
|
249001
|
+
return getConverter$32(editor)?.convertedXml ?? {};
|
|
248520
249002
|
}
|
|
248521
|
-
function toSummary(record) {
|
|
249003
|
+
function toSummary$1(record) {
|
|
248522
249004
|
const summary = {
|
|
248523
249005
|
partName: record.partName,
|
|
248524
249006
|
schemaRefs: record.schemaRefs
|
|
@@ -248533,13 +249015,13 @@ function toSummary(record) {
|
|
|
248533
249015
|
}
|
|
248534
249016
|
function customXmlPartsListWrapper(editor, query2) {
|
|
248535
249017
|
const revision = getRevision(editor);
|
|
248536
|
-
let filtered = listCustomXmlParts(
|
|
249018
|
+
let filtered = listCustomXmlParts(getConvertedXml$1(editor));
|
|
248537
249019
|
if (query2?.rootNamespace !== undefined)
|
|
248538
249020
|
filtered = filtered.filter((p$12) => p$12.rootNamespace === query2.rootNamespace);
|
|
248539
249021
|
if (query2?.schemaRef !== undefined)
|
|
248540
249022
|
filtered = filtered.filter((p$12) => p$12.schemaRefs.includes(query2.schemaRef));
|
|
248541
249023
|
const { total, items: paged } = paginate(filtered.map((record) => {
|
|
248542
|
-
const summary = toSummary(record);
|
|
249024
|
+
const summary = toSummary$1(record);
|
|
248543
249025
|
const stableId = summary.id ?? summary.partName;
|
|
248544
249026
|
return buildDiscoveryItem(stableId, buildResolvedHandle(`customXml:${stableId}`, "ephemeral", "ext:customXmlPart"), summary);
|
|
248545
249027
|
}), query2?.offset, query2?.limit);
|
|
@@ -248555,7 +249037,7 @@ function customXmlPartsListWrapper(editor, query2) {
|
|
|
248555
249037
|
});
|
|
248556
249038
|
}
|
|
248557
249039
|
function customXmlPartsGetWrapper(editor, input2) {
|
|
248558
|
-
const record = readCustomXmlPart(
|
|
249040
|
+
const record = readCustomXmlPart(getConvertedXml$1(editor), input2.target);
|
|
248559
249041
|
if (!record)
|
|
248560
249042
|
return null;
|
|
248561
249043
|
const info = {
|
|
@@ -248570,7 +249052,7 @@ function customXmlPartsGetWrapper(editor, input2) {
|
|
|
248570
249052
|
info.propsPartName = record.propsPartName;
|
|
248571
249053
|
return info;
|
|
248572
249054
|
}
|
|
248573
|
-
function failure(code7, message) {
|
|
249055
|
+
function failure$1(code7, message) {
|
|
248574
249056
|
return {
|
|
248575
249057
|
success: false,
|
|
248576
249058
|
failure: {
|
|
@@ -248628,10 +249110,10 @@ function customXmlPartsCreateWrapper(editor, input2, options) {
|
|
|
248628
249110
|
}
|
|
248629
249111
|
};
|
|
248630
249112
|
}
|
|
248631
|
-
const probe = safeValidate(() => createCustomXmlPart(
|
|
249113
|
+
const probe = safeValidate(() => createCustomXmlPart(getConvertedXml$1(editor), {
|
|
248632
249114
|
content: input2.content,
|
|
248633
249115
|
schemaRefs: input2.schemaRefs
|
|
248634
|
-
}, getConverter$
|
|
249116
|
+
}, getConverter$32(editor)));
|
|
248635
249117
|
if (isWriteFailure(probe))
|
|
248636
249118
|
return {
|
|
248637
249119
|
changed: false,
|
|
@@ -248649,7 +249131,7 @@ function customXmlPartsCreateWrapper(editor, input2, options) {
|
|
|
248649
249131
|
expectedRevision: options?.expectedRevision
|
|
248650
249132
|
});
|
|
248651
249133
|
if (isWriteFailure(outcome))
|
|
248652
|
-
return failure(outcome.code, outcome.message);
|
|
249134
|
+
return failure$1(outcome.code, outcome.message);
|
|
248653
249135
|
return {
|
|
248654
249136
|
success: true,
|
|
248655
249137
|
id: outcome.payload.id,
|
|
@@ -248661,7 +249143,7 @@ function customXmlPartsPatchWrapper(editor, input2, options) {
|
|
|
248661
249143
|
rejectTrackedMode("customXml.parts.patch", options);
|
|
248662
249144
|
const outcome = executeOutOfBandMutation(editor, (dryRun) => {
|
|
248663
249145
|
if (dryRun) {
|
|
248664
|
-
if (!resolveTargetPartName(
|
|
249146
|
+
if (!resolveTargetPartName(getConvertedXml$1(editor), input2.target))
|
|
248665
249147
|
return {
|
|
248666
249148
|
changed: false,
|
|
248667
249149
|
payload: targetNotFound()
|
|
@@ -248685,15 +249167,15 @@ function customXmlPartsPatchWrapper(editor, input2, options) {
|
|
|
248685
249167
|
}
|
|
248686
249168
|
};
|
|
248687
249169
|
}
|
|
248688
|
-
if (!resolveTargetPartName(
|
|
249170
|
+
if (!resolveTargetPartName(getConvertedXml$1(editor), input2.target))
|
|
248689
249171
|
return {
|
|
248690
249172
|
changed: false,
|
|
248691
249173
|
payload: targetNotFound()
|
|
248692
249174
|
};
|
|
248693
|
-
const probe = safeValidate(() => patchCustomXmlPart(
|
|
249175
|
+
const probe = safeValidate(() => patchCustomXmlPart(getConvertedXml$1(editor), input2.target, {
|
|
248694
249176
|
content: input2.content,
|
|
248695
249177
|
schemaRefs: input2.schemaRefs
|
|
248696
|
-
}, getConverter$
|
|
249178
|
+
}, getConverter$32(editor)));
|
|
248697
249179
|
if (isWriteFailure(probe))
|
|
248698
249180
|
return {
|
|
248699
249181
|
changed: false,
|
|
@@ -248716,7 +249198,7 @@ function customXmlPartsPatchWrapper(editor, input2, options) {
|
|
|
248716
249198
|
expectedRevision: options?.expectedRevision
|
|
248717
249199
|
});
|
|
248718
249200
|
if (isWriteFailure(outcome))
|
|
248719
|
-
return failure(outcome.code, outcome.message);
|
|
249201
|
+
return failure$1(outcome.code, outcome.message);
|
|
248720
249202
|
const result = {
|
|
248721
249203
|
success: true,
|
|
248722
249204
|
target: input2.target
|
|
@@ -248729,7 +249211,7 @@ function customXmlPartsRemoveWrapper(editor, input2, options) {
|
|
|
248729
249211
|
rejectTrackedMode("customXml.parts.remove", options);
|
|
248730
249212
|
const outcome = executeOutOfBandMutation(editor, (dryRun) => {
|
|
248731
249213
|
if (dryRun)
|
|
248732
|
-
return resolveTargetPartName(
|
|
249214
|
+
return resolveTargetPartName(getConvertedXml$1(editor), input2.target) ? {
|
|
248733
249215
|
changed: false,
|
|
248734
249216
|
payload: {
|
|
248735
249217
|
ok: true,
|
|
@@ -248739,7 +249221,7 @@ function customXmlPartsRemoveWrapper(editor, input2, options) {
|
|
|
248739
249221
|
changed: false,
|
|
248740
249222
|
payload: targetNotFound()
|
|
248741
249223
|
};
|
|
248742
|
-
if (!removeCustomXmlPart(
|
|
249224
|
+
if (!removeCustomXmlPart(getConvertedXml$1(editor), input2.target, getConverter$32(editor)))
|
|
248743
249225
|
return {
|
|
248744
249226
|
changed: false,
|
|
248745
249227
|
payload: targetNotFound()
|
|
@@ -248756,7 +249238,7 @@ function customXmlPartsRemoveWrapper(editor, input2, options) {
|
|
|
248756
249238
|
expectedRevision: options?.expectedRevision
|
|
248757
249239
|
});
|
|
248758
249240
|
if (isWriteFailure(outcome))
|
|
248759
|
-
return failure(outcome.code, outcome.message);
|
|
249241
|
+
return failure$1(outcome.code, outcome.message);
|
|
248760
249242
|
return {
|
|
248761
249243
|
success: true,
|
|
248762
249244
|
target: input2.target
|
|
@@ -248771,6 +249253,429 @@ function createCustomXmlPartsAdapter(editor) {
|
|
|
248771
249253
|
remove: (input2, options) => customXmlPartsRemoveWrapper(editor, input2, options)
|
|
248772
249254
|
};
|
|
248773
249255
|
}
|
|
249256
|
+
function failure(code7, message) {
|
|
249257
|
+
return {
|
|
249258
|
+
success: false,
|
|
249259
|
+
failure: {
|
|
249260
|
+
code: code7,
|
|
249261
|
+
message
|
|
249262
|
+
}
|
|
249263
|
+
};
|
|
249264
|
+
}
|
|
249265
|
+
function getConverter$22(editor) {
|
|
249266
|
+
return editor.converter ?? null;
|
|
249267
|
+
}
|
|
249268
|
+
function getConvertedXml2(editor) {
|
|
249269
|
+
return getConverter$22(editor)?.convertedXml ?? {};
|
|
249270
|
+
}
|
|
249271
|
+
function markConverterDirty(editor) {
|
|
249272
|
+
const converter = getConverter$22(editor);
|
|
249273
|
+
if (!converter)
|
|
249274
|
+
return;
|
|
249275
|
+
converter.documentModified = true;
|
|
249276
|
+
if (!converter.documentGuid && typeof converter.promoteToGuid === "function")
|
|
249277
|
+
converter.promoteToGuid();
|
|
249278
|
+
}
|
|
249279
|
+
function getRootElement2(doc$12) {
|
|
249280
|
+
return doc$12?.elements?.find((el) => el?.type === "element") ?? null;
|
|
249281
|
+
}
|
|
249282
|
+
function localName(name) {
|
|
249283
|
+
if (!name)
|
|
249284
|
+
return "";
|
|
249285
|
+
const idx = name.indexOf(":");
|
|
249286
|
+
return idx >= 0 ? name.slice(idx + 1) : name;
|
|
249287
|
+
}
|
|
249288
|
+
function getTextContent(node3) {
|
|
249289
|
+
if (!node3)
|
|
249290
|
+
return "";
|
|
249291
|
+
if (node3.type === "text")
|
|
249292
|
+
return node3.text ?? "";
|
|
249293
|
+
if (node3.type === "cdata")
|
|
249294
|
+
return node3.cdata ?? "";
|
|
249295
|
+
return (node3.elements ?? []).map((child) => getTextContent(child)).join("");
|
|
249296
|
+
}
|
|
249297
|
+
function escapeXmlText(value) {
|
|
249298
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
249299
|
+
}
|
|
249300
|
+
function escapeXmlAttribute(value) {
|
|
249301
|
+
return escapeXmlText(value).replace(/"/g, """).replace(/'/g, "'");
|
|
249302
|
+
}
|
|
249303
|
+
function buildEnvelopeXml(namespace, entries2) {
|
|
249304
|
+
const children = entries2.map((entry) => {
|
|
249305
|
+
const json = JSON.stringify(entry.payload);
|
|
249306
|
+
return `<ref id="${escapeXmlAttribute(entry.id)}" encoding="json">${escapeXmlText(json)}</ref>`;
|
|
249307
|
+
}).join("");
|
|
249308
|
+
return `<refs xmlns="${escapeXmlAttribute(namespace)}">${children}</refs>`;
|
|
249309
|
+
}
|
|
249310
|
+
function parseMetadataPart(convertedXml, partName) {
|
|
249311
|
+
const root3 = getRootElement2(convertedXml[partName]);
|
|
249312
|
+
if (!root3 || localName(root3.name) !== "refs")
|
|
249313
|
+
return null;
|
|
249314
|
+
const namespace = parseStoragePartRootNamespace(convertedXml[partName]);
|
|
249315
|
+
if (typeof namespace !== "string" || namespace.length === 0)
|
|
249316
|
+
return null;
|
|
249317
|
+
const entries2 = [];
|
|
249318
|
+
for (const child of root3.elements ?? []) {
|
|
249319
|
+
if (child?.type !== "element" || localName(child.name) !== "ref")
|
|
249320
|
+
continue;
|
|
249321
|
+
if (child.attributes?.encoding !== "json")
|
|
249322
|
+
continue;
|
|
249323
|
+
const id2 = child.attributes?.id;
|
|
249324
|
+
if (typeof id2 !== "string" || id2.length === 0)
|
|
249325
|
+
continue;
|
|
249326
|
+
try {
|
|
249327
|
+
entries2.push({
|
|
249328
|
+
id: id2,
|
|
249329
|
+
namespace,
|
|
249330
|
+
partName,
|
|
249331
|
+
payload: JSON.parse(getTextContent(child))
|
|
249332
|
+
});
|
|
249333
|
+
} catch {
|
|
249334
|
+
continue;
|
|
249335
|
+
}
|
|
249336
|
+
}
|
|
249337
|
+
return {
|
|
249338
|
+
namespace,
|
|
249339
|
+
partName,
|
|
249340
|
+
entries: entries2
|
|
249341
|
+
};
|
|
249342
|
+
}
|
|
249343
|
+
function listMetadataParts(convertedXml) {
|
|
249344
|
+
return listCustomXmlParts(convertedXml).map((part) => parseMetadataPart(convertedXml, part.partName)).filter((part) => part !== null);
|
|
249345
|
+
}
|
|
249346
|
+
function findPartByNamespace(convertedXml, namespace) {
|
|
249347
|
+
return listMetadataParts(convertedXml).find((part) => part.namespace === namespace) ?? null;
|
|
249348
|
+
}
|
|
249349
|
+
function findEntry(convertedXml, id2) {
|
|
249350
|
+
for (const part of listMetadataParts(convertedXml)) {
|
|
249351
|
+
const entry = part.entries.find((candidate) => candidate.id === id2);
|
|
249352
|
+
if (entry)
|
|
249353
|
+
return entry;
|
|
249354
|
+
}
|
|
249355
|
+
return null;
|
|
249356
|
+
}
|
|
249357
|
+
function hasPayloadEntry(convertedXml, id2) {
|
|
249358
|
+
return findEntry(convertedXml, id2) !== null;
|
|
249359
|
+
}
|
|
249360
|
+
function predictPartName(convertedXml, converter) {
|
|
249361
|
+
return `customXml/item${nextCustomXmlItemIndex(convertedXml, converter)}.xml`;
|
|
249362
|
+
}
|
|
249363
|
+
function buildAnchorAttrs(id2) {
|
|
249364
|
+
return {
|
|
249365
|
+
id: generateRandomSigned32BitIntStrId(),
|
|
249366
|
+
tag: id2,
|
|
249367
|
+
alias: "Anchored metadata",
|
|
249368
|
+
appearance: "hidden",
|
|
249369
|
+
controlType: "richText",
|
|
249370
|
+
type: "richText",
|
|
249371
|
+
sdtPr: {
|
|
249372
|
+
name: "w:sdtPr",
|
|
249373
|
+
type: "element",
|
|
249374
|
+
elements: [{
|
|
249375
|
+
name: "w:richText",
|
|
249376
|
+
type: "element"
|
|
249377
|
+
}, {
|
|
249378
|
+
name: "w15:appearance",
|
|
249379
|
+
type: "element",
|
|
249380
|
+
attributes: { "w15:val": "hidden" }
|
|
249381
|
+
}]
|
|
249382
|
+
}
|
|
249383
|
+
};
|
|
249384
|
+
}
|
|
249385
|
+
function dispatchTransaction2(editor, tr) {
|
|
249386
|
+
if (editor.view?.dispatch) {
|
|
249387
|
+
editor.view.dispatch(tr);
|
|
249388
|
+
return;
|
|
249389
|
+
}
|
|
249390
|
+
if (typeof editor.dispatch === "function") {
|
|
249391
|
+
editor.dispatch(tr);
|
|
249392
|
+
return;
|
|
249393
|
+
}
|
|
249394
|
+
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", "metadata.* requires an editor dispatch function.");
|
|
249395
|
+
}
|
|
249396
|
+
function findAnchorsById(editor, id2) {
|
|
249397
|
+
return findAllSdtNodes(editor.state.doc).filter((sdt) => sdt.kind === "inline" && sdt.node.attrs?.tag === id2);
|
|
249398
|
+
}
|
|
249399
|
+
function hasAnchor(editor, id2) {
|
|
249400
|
+
return findAllSdtNodes(editor.state.doc).some((sdt) => sdt.node.attrs?.tag === id2);
|
|
249401
|
+
}
|
|
249402
|
+
function wrapRangeInAnchor(editor, target, id2) {
|
|
249403
|
+
const { absFrom, absTo } = resolveSelectionTarget(editor, target);
|
|
249404
|
+
if (absFrom >= absTo)
|
|
249405
|
+
throw new DocumentApiAdapterError("INVALID_TARGET", "metadata.attach requires a non-empty text range.");
|
|
249406
|
+
const nodeType = editor.schema.nodes[SDT_INLINE_NAME];
|
|
249407
|
+
if (!nodeType)
|
|
249408
|
+
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", "Inline content-control node is not available.");
|
|
249409
|
+
const { tr } = editor.state;
|
|
249410
|
+
const attrs = buildAnchorAttrs(id2);
|
|
249411
|
+
const runType = editor.schema.nodes.run;
|
|
249412
|
+
const $from = tr.doc.resolve(absFrom);
|
|
249413
|
+
const $to = tr.doc.resolve(absTo);
|
|
249414
|
+
if (runType && $from.parent.type === runType && $from.parent === $to.parent) {
|
|
249415
|
+
const runDepth = $from.depth;
|
|
249416
|
+
const runStart = $from.before(runDepth);
|
|
249417
|
+
const runEnd = $from.after(runDepth);
|
|
249418
|
+
const parentRun = $from.parent;
|
|
249419
|
+
const selectedContent = parentRun.content.cut($from.parentOffset, $to.parentOffset);
|
|
249420
|
+
const leftContent = parentRun.content.cut(0, $from.parentOffset);
|
|
249421
|
+
const rightContent = parentRun.content.cut($to.parentOffset);
|
|
249422
|
+
const sdtNode = nodeType.create(attrs, selectedContent);
|
|
249423
|
+
const replacement = [];
|
|
249424
|
+
if (leftContent.size > 0)
|
|
249425
|
+
replacement.push(runType.create(parentRun.attrs, leftContent, parentRun.marks));
|
|
249426
|
+
replacement.push(sdtNode);
|
|
249427
|
+
if (rightContent.size > 0)
|
|
249428
|
+
replacement.push(runType.create(parentRun.attrs, rightContent, parentRun.marks));
|
|
249429
|
+
tr.replaceWith(runStart, runEnd, replacement);
|
|
249430
|
+
} else {
|
|
249431
|
+
const selected = tr.doc.slice(absFrom, absTo);
|
|
249432
|
+
const sdtNode = nodeType.create(attrs, selected.content);
|
|
249433
|
+
tr.replaceWith(absFrom, absTo, sdtNode);
|
|
249434
|
+
}
|
|
249435
|
+
dispatchTransaction2(editor, tr);
|
|
249436
|
+
clearIndexCache(editor);
|
|
249437
|
+
return true;
|
|
249438
|
+
}
|
|
249439
|
+
function unwrapAnchor(editor, id2) {
|
|
249440
|
+
const anchor = findAnchorsById(editor, id2)[0];
|
|
249441
|
+
if (!anchor)
|
|
249442
|
+
return false;
|
|
249443
|
+
const { tr } = editor.state;
|
|
249444
|
+
tr.replaceWith(anchor.pos, anchor.pos + anchor.node.nodeSize, anchor.node.content);
|
|
249445
|
+
dispatchTransaction2(editor, tr);
|
|
249446
|
+
clearIndexCache(editor);
|
|
249447
|
+
return true;
|
|
249448
|
+
}
|
|
249449
|
+
function pointFromPmPosition(editor, pos) {
|
|
249450
|
+
const index2 = getBlockIndex(editor);
|
|
249451
|
+
for (const candidate of index2.candidates) {
|
|
249452
|
+
if (!isTextBlockCandidate(candidate))
|
|
249453
|
+
continue;
|
|
249454
|
+
const contentStart = candidate.pos + 1;
|
|
249455
|
+
const contentEnd = candidate.end - 1;
|
|
249456
|
+
if (pos >= contentStart && pos <= contentEnd)
|
|
249457
|
+
return {
|
|
249458
|
+
kind: "text",
|
|
249459
|
+
blockId: candidate.nodeId,
|
|
249460
|
+
offset: pmPositionToTextOffset(candidate.node, candidate.pos, pos)
|
|
249461
|
+
};
|
|
249462
|
+
}
|
|
249463
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Could not resolve metadata anchor to a text range.");
|
|
249464
|
+
}
|
|
249465
|
+
function resolveAnchorTarget(editor, id2) {
|
|
249466
|
+
const anchor = findAnchorsById(editor, id2)[0];
|
|
249467
|
+
if (!anchor)
|
|
249468
|
+
return null;
|
|
249469
|
+
return {
|
|
249470
|
+
kind: "selection",
|
|
249471
|
+
start: pointFromPmPosition(editor, anchor.pos + 1),
|
|
249472
|
+
end: pointFromPmPosition(editor, anchor.pos + anchor.node.nodeSize - 1)
|
|
249473
|
+
};
|
|
249474
|
+
}
|
|
249475
|
+
function rangesOverlap$1(aFrom, aTo, bFrom, bTo) {
|
|
249476
|
+
if (aFrom === aTo || bFrom === bTo)
|
|
249477
|
+
return aFrom <= bTo && bFrom <= aTo;
|
|
249478
|
+
return aFrom < bTo && bFrom < aTo;
|
|
249479
|
+
}
|
|
249480
|
+
function anchorOverlaps(editor, id2, within$1) {
|
|
249481
|
+
const anchor = findAnchorsById(editor, id2)[0];
|
|
249482
|
+
if (!anchor)
|
|
249483
|
+
return false;
|
|
249484
|
+
const query2 = resolveSelectionTarget(editor, within$1);
|
|
249485
|
+
return rangesOverlap$1(anchor.pos + 1, anchor.pos + anchor.node.nodeSize - 1, query2.absFrom, query2.absTo);
|
|
249486
|
+
}
|
|
249487
|
+
function writeEntry(editor, namespace, id2, payload, dryRun) {
|
|
249488
|
+
const convertedXml = getConvertedXml2(editor);
|
|
249489
|
+
const converter = getConverter$22(editor);
|
|
249490
|
+
const existing = findPartByNamespace(convertedXml, namespace);
|
|
249491
|
+
const entries2 = existing?.entries.filter((entry) => entry.id !== id2) ?? [];
|
|
249492
|
+
const next2 = {
|
|
249493
|
+
id: id2,
|
|
249494
|
+
namespace,
|
|
249495
|
+
partName: existing?.partName ?? predictPartName(convertedXml, converter),
|
|
249496
|
+
payload
|
|
249497
|
+
};
|
|
249498
|
+
const xml2 = buildEnvelopeXml(namespace, [...entries2, next2]);
|
|
249499
|
+
if (dryRun)
|
|
249500
|
+
return { partName: next2.partName };
|
|
249501
|
+
if (existing) {
|
|
249502
|
+
patchCustomXmlPart(convertedXml, { partName: existing.partName }, {
|
|
249503
|
+
content: xml2,
|
|
249504
|
+
schemaRefs: undefined
|
|
249505
|
+
}, converter ?? undefined);
|
|
249506
|
+
markConverterDirty(editor);
|
|
249507
|
+
return { partName: existing.partName };
|
|
249508
|
+
}
|
|
249509
|
+
const created = createCustomXmlPart(convertedXml, {
|
|
249510
|
+
content: xml2,
|
|
249511
|
+
schemaRefs: undefined
|
|
249512
|
+
}, converter ?? undefined);
|
|
249513
|
+
markConverterDirty(editor);
|
|
249514
|
+
return { partName: created.partName };
|
|
249515
|
+
}
|
|
249516
|
+
function removeEntry(editor, id2, dryRun) {
|
|
249517
|
+
const convertedXml = getConvertedXml2(editor);
|
|
249518
|
+
const converter = getConverter$22(editor);
|
|
249519
|
+
const part = listMetadataParts(convertedXml).find((candidate) => candidate.entries.some((entry) => entry.id === id2));
|
|
249520
|
+
if (!part)
|
|
249521
|
+
return false;
|
|
249522
|
+
if (dryRun)
|
|
249523
|
+
return true;
|
|
249524
|
+
const remaining = part.entries.filter((entry) => entry.id !== id2);
|
|
249525
|
+
if (remaining.length === 0)
|
|
249526
|
+
removeCustomXmlPart(convertedXml, { partName: part.partName }, converter ?? undefined);
|
|
249527
|
+
else
|
|
249528
|
+
patchCustomXmlPart(convertedXml, { partName: part.partName }, {
|
|
249529
|
+
content: buildEnvelopeXml(part.namespace, remaining),
|
|
249530
|
+
schemaRefs: undefined
|
|
249531
|
+
}, converter ?? undefined);
|
|
249532
|
+
markConverterDirty(editor);
|
|
249533
|
+
return true;
|
|
249534
|
+
}
|
|
249535
|
+
function toSummary(entry) {
|
|
249536
|
+
return {
|
|
249537
|
+
id: entry.id,
|
|
249538
|
+
namespace: entry.namespace,
|
|
249539
|
+
partName: entry.partName
|
|
249540
|
+
};
|
|
249541
|
+
}
|
|
249542
|
+
function listEntries(editor, query2) {
|
|
249543
|
+
let entries2 = listMetadataParts(getConvertedXml2(editor)).flatMap((part) => part.entries);
|
|
249544
|
+
if (query2?.namespace !== undefined)
|
|
249545
|
+
entries2 = entries2.filter((entry) => entry.namespace === query2.namespace);
|
|
249546
|
+
if (query2?.within !== undefined)
|
|
249547
|
+
entries2 = entries2.filter((entry) => anchorOverlaps(editor, entry.id, query2.within));
|
|
249548
|
+
return entries2;
|
|
249549
|
+
}
|
|
249550
|
+
function metadataListWrapper(editor, query2) {
|
|
249551
|
+
const { total, items } = paginate(listEntries(editor, query2).map((entry) => {
|
|
249552
|
+
const summary = toSummary(entry);
|
|
249553
|
+
return buildDiscoveryItem(summary.id, buildResolvedHandle(`metadata:${summary.id}`, "ephemeral", "ext:anchoredMetadata"), summary);
|
|
249554
|
+
}), query2?.offset, query2?.limit);
|
|
249555
|
+
return buildDiscoveryResult({
|
|
249556
|
+
evaluatedRevision: getRevision(editor),
|
|
249557
|
+
total,
|
|
249558
|
+
items,
|
|
249559
|
+
page: {
|
|
249560
|
+
limit: query2?.limit ?? total,
|
|
249561
|
+
offset: query2?.offset ?? 0,
|
|
249562
|
+
returned: items.length
|
|
249563
|
+
}
|
|
249564
|
+
});
|
|
249565
|
+
}
|
|
249566
|
+
function metadataGetWrapper(editor, input2) {
|
|
249567
|
+
return findEntry(getConvertedXml2(editor), input2.id);
|
|
249568
|
+
}
|
|
249569
|
+
function metadataResolveWrapper(editor, input2) {
|
|
249570
|
+
const target = resolveAnchorTarget(editor, input2.id);
|
|
249571
|
+
return target ? {
|
|
249572
|
+
id: input2.id,
|
|
249573
|
+
target
|
|
249574
|
+
} : null;
|
|
249575
|
+
}
|
|
249576
|
+
function metadataAttachWrapper(editor, input2, options) {
|
|
249577
|
+
rejectTrackedMode("metadata.attach", options);
|
|
249578
|
+
const id2 = input2.id ?? v4_default();
|
|
249579
|
+
const convertedXml = getConvertedXml2(editor);
|
|
249580
|
+
try {
|
|
249581
|
+
resolveSelectionTarget(editor, input2.target);
|
|
249582
|
+
} catch (error3) {
|
|
249583
|
+
return failure("INVALID_TARGET", error3 instanceof Error ? error3.message : String(error3));
|
|
249584
|
+
}
|
|
249585
|
+
if (hasPayloadEntry(convertedXml, id2) || hasAnchor(editor, id2))
|
|
249586
|
+
return failure("INVALID_INPUT", `Anchored metadata id "${id2}" already exists.`);
|
|
249587
|
+
const preview = writeEntry(editor, input2.namespace, id2, input2.payload, true);
|
|
249588
|
+
if (options?.dryRun) {
|
|
249589
|
+
checkRevision(editor, options.expectedRevision);
|
|
249590
|
+
return {
|
|
249591
|
+
success: true,
|
|
249592
|
+
id: id2,
|
|
249593
|
+
namespace: input2.namespace,
|
|
249594
|
+
partName: preview.partName
|
|
249595
|
+
};
|
|
249596
|
+
}
|
|
249597
|
+
if (executeDomainCommand(editor, () => {
|
|
249598
|
+
wrapRangeInAnchor(editor, input2.target, id2);
|
|
249599
|
+
writeEntry(editor, input2.namespace, id2, input2.payload, false);
|
|
249600
|
+
return true;
|
|
249601
|
+
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
249602
|
+
return failure("INVALID_TARGET", "metadata.attach did not change the document.");
|
|
249603
|
+
const entry = findEntry(getConvertedXml2(editor), id2);
|
|
249604
|
+
return {
|
|
249605
|
+
success: true,
|
|
249606
|
+
id: id2,
|
|
249607
|
+
namespace: input2.namespace,
|
|
249608
|
+
partName: entry?.partName ?? preview.partName
|
|
249609
|
+
};
|
|
249610
|
+
}
|
|
249611
|
+
function metadataUpdateWrapper(editor, input2, options) {
|
|
249612
|
+
rejectTrackedMode("metadata.update", options);
|
|
249613
|
+
const existing = findEntry(getConvertedXml2(editor), input2.id);
|
|
249614
|
+
if (!existing)
|
|
249615
|
+
return failure("TARGET_NOT_FOUND", `Anchored metadata entry "${input2.id}" not found.`);
|
|
249616
|
+
return executeOutOfBandMutation(editor, (dryRun) => {
|
|
249617
|
+
if (!dryRun)
|
|
249618
|
+
writeEntry(editor, existing.namespace, input2.id, input2.payload, false);
|
|
249619
|
+
return {
|
|
249620
|
+
changed: true,
|
|
249621
|
+
payload: {
|
|
249622
|
+
success: true,
|
|
249623
|
+
id: input2.id
|
|
249624
|
+
}
|
|
249625
|
+
};
|
|
249626
|
+
}, {
|
|
249627
|
+
dryRun: options?.dryRun ?? false,
|
|
249628
|
+
expectedRevision: options?.expectedRevision
|
|
249629
|
+
});
|
|
249630
|
+
}
|
|
249631
|
+
function metadataRemoveWrapper(editor, input2, options) {
|
|
249632
|
+
rejectTrackedMode("metadata.remove", options);
|
|
249633
|
+
const payloadExists = hasPayloadEntry(getConvertedXml2(editor), input2.id);
|
|
249634
|
+
const anchorExists = hasAnchor(editor, input2.id);
|
|
249635
|
+
if (!payloadExists && !anchorExists)
|
|
249636
|
+
return failure("TARGET_NOT_FOUND", `Anchored metadata entry "${input2.id}" not found.`);
|
|
249637
|
+
if (options?.dryRun) {
|
|
249638
|
+
checkRevision(editor, options.expectedRevision);
|
|
249639
|
+
return {
|
|
249640
|
+
success: true,
|
|
249641
|
+
id: input2.id
|
|
249642
|
+
};
|
|
249643
|
+
}
|
|
249644
|
+
if (!anchorExists)
|
|
249645
|
+
return executeOutOfBandMutation(editor, (dryRun) => {
|
|
249646
|
+
return {
|
|
249647
|
+
changed: removeEntry(editor, input2.id, dryRun),
|
|
249648
|
+
payload: {
|
|
249649
|
+
success: true,
|
|
249650
|
+
id: input2.id
|
|
249651
|
+
}
|
|
249652
|
+
};
|
|
249653
|
+
}, {
|
|
249654
|
+
dryRun: false,
|
|
249655
|
+
expectedRevision: options?.expectedRevision
|
|
249656
|
+
});
|
|
249657
|
+
if (executeDomainCommand(editor, () => {
|
|
249658
|
+
unwrapAnchor(editor, input2.id);
|
|
249659
|
+
removeEntry(editor, input2.id, false);
|
|
249660
|
+
markConverterDirty(editor);
|
|
249661
|
+
return true;
|
|
249662
|
+
}, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
|
|
249663
|
+
return failure("TARGET_NOT_FOUND", `Anchored metadata entry "${input2.id}" not found.`);
|
|
249664
|
+
return {
|
|
249665
|
+
success: true,
|
|
249666
|
+
id: input2.id
|
|
249667
|
+
};
|
|
249668
|
+
}
|
|
249669
|
+
function createAnchoredMetadataAdapter(editor) {
|
|
249670
|
+
return {
|
|
249671
|
+
attach: (input2, options) => metadataAttachWrapper(editor, input2, options),
|
|
249672
|
+
list: (query2) => metadataListWrapper(editor, query2),
|
|
249673
|
+
get: (input2) => metadataGetWrapper(editor, input2),
|
|
249674
|
+
update: (input2, options) => metadataUpdateWrapper(editor, input2, options),
|
|
249675
|
+
remove: (input2, options) => metadataRemoveWrapper(editor, input2, options),
|
|
249676
|
+
resolve: (input2) => metadataResolveWrapper(editor, input2)
|
|
249677
|
+
};
|
|
249678
|
+
}
|
|
248774
249679
|
function getConverter$12(editor) {
|
|
248775
249680
|
return editor.converter ?? undefined;
|
|
248776
249681
|
}
|
|
@@ -252385,6 +253290,7 @@ function assembleDocumentApiAdapters(editor) {
|
|
|
252385
253290
|
remove: (input2, options) => bookmarksRemoveWrapper(editor, input2, options)
|
|
252386
253291
|
},
|
|
252387
253292
|
customXml: { parts: createCustomXmlPartsAdapter(editor) },
|
|
253293
|
+
metadata: createAnchoredMetadataAdapter(editor),
|
|
252388
253294
|
footnotes: {
|
|
252389
253295
|
list: (query2) => footnotesListWrapper(editor, query2),
|
|
252390
253296
|
get: (input2) => footnotesGetWrapper(editor, input2),
|
|
@@ -277579,15 +278485,15 @@ var Node$13 = class Node$14 {
|
|
|
277579
278485
|
return false;
|
|
277580
278486
|
if ($from.parent.type.name !== "run")
|
|
277581
278487
|
return false;
|
|
277582
|
-
let dispatchTransaction$
|
|
278488
|
+
let dispatchTransaction$3 = null;
|
|
277583
278489
|
if (view?.dispatch)
|
|
277584
|
-
dispatchTransaction$
|
|
278490
|
+
dispatchTransaction$3 = view.dispatch.bind(view);
|
|
277585
278491
|
else if (editor?.dispatch)
|
|
277586
|
-
dispatchTransaction$
|
|
277587
|
-
if (!dispatchTransaction$
|
|
278492
|
+
dispatchTransaction$3 = editor.dispatch.bind(editor);
|
|
278493
|
+
if (!dispatchTransaction$3)
|
|
277588
278494
|
return false;
|
|
277589
278495
|
const handled = splitBlockPatch(state, (transaction) => {
|
|
277590
|
-
dispatchTransaction$
|
|
278496
|
+
dispatchTransaction$3(transaction);
|
|
277591
278497
|
}, editor);
|
|
277592
278498
|
if (handled)
|
|
277593
278499
|
tr.setMeta("preventDispatch", true);
|
|
@@ -288358,11 +289264,11 @@ var Node$13 = class Node$14 {
|
|
|
288358
289264
|
this.eventListenerCleanups = [];
|
|
288359
289265
|
this.resizeTimeoutId = null;
|
|
288360
289266
|
}
|
|
288361
|
-
attach({ element: element3, state, editorProps = {}, dispatchTransaction: dispatchTransaction$
|
|
289267
|
+
attach({ element: element3, state, editorProps = {}, dispatchTransaction: dispatchTransaction$3, handleClick: handleClick$1 }) {
|
|
288362
289268
|
this.view?.destroy();
|
|
288363
289269
|
this.view = new EditorView(element3, {
|
|
288364
289270
|
...editorProps && typeof editorProps === "object" ? editorProps : {},
|
|
288365
|
-
dispatchTransaction: dispatchTransaction$
|
|
289271
|
+
dispatchTransaction: dispatchTransaction$3,
|
|
288366
289272
|
state,
|
|
288367
289273
|
handleClick: handleClick$1
|
|
288368
289274
|
});
|
|
@@ -305260,13 +306166,13 @@ menclose::after {
|
|
|
305260
306166
|
return;
|
|
305261
306167
|
console.log(...args$1);
|
|
305262
306168
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
305263
|
-
var
|
|
306169
|
+
var init_src_D_jA08Jh_es = __esm(() => {
|
|
305264
306170
|
init_rolldown_runtime_Bg48TavK_es();
|
|
305265
|
-
|
|
306171
|
+
init_SuperConverter_CzwJ7ds9_es();
|
|
305266
306172
|
init_jszip_C49i9kUs_es();
|
|
305267
306173
|
init_xml_js_CqGKpaft_es();
|
|
305268
306174
|
init_uuid_qzgm05fK_es();
|
|
305269
|
-
|
|
306175
|
+
init_create_headless_toolbar_BQTnHkb4_es();
|
|
305270
306176
|
init_constants_DrU4EASo_es();
|
|
305271
306177
|
init_dist_B8HfvhaK_es();
|
|
305272
306178
|
init_unified_Dsuw2be5_es();
|
|
@@ -328753,7 +329659,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328753
329659
|
stylesPartDescriptor = {
|
|
328754
329660
|
id: STYLES_PART_ID,
|
|
328755
329661
|
ensurePart(editor) {
|
|
328756
|
-
const converter = getConverter$
|
|
329662
|
+
const converter = getConverter$72(editor);
|
|
328757
329663
|
if (converter?.convertedXml[STYLES_PART_ID])
|
|
328758
329664
|
return converter.convertedXml[STYLES_PART_ID];
|
|
328759
329665
|
return {
|
|
@@ -328768,7 +329674,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328768
329674
|
},
|
|
328769
329675
|
afterCommit(ctx$1) {
|
|
328770
329676
|
if (ctx$1.source.startsWith("collab:remote:")) {
|
|
328771
|
-
const converter = getConverter$
|
|
329677
|
+
const converter = getConverter$72(ctx$1.editor);
|
|
328772
329678
|
if (converter)
|
|
328773
329679
|
try {
|
|
328774
329680
|
converter.translatedLinkedStyles = translateStyleDefinitions(converter.convertedXml);
|
|
@@ -329413,14 +330319,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329413
330319
|
if (!allowed.includes(this.#editorLifecycleState))
|
|
329414
330320
|
throw new InvalidStateError(`Invalid operation: editor is in '${this.#editorLifecycleState}' state, expected one of: ${allowed.join(", ")}`);
|
|
329415
330321
|
}
|
|
329416
|
-
async#withState(during, success, failure$
|
|
330322
|
+
async#withState(during, success, failure$2, operation) {
|
|
329417
330323
|
this.#editorLifecycleState = during;
|
|
329418
330324
|
try {
|
|
329419
330325
|
const result = await operation();
|
|
329420
330326
|
this.#editorLifecycleState = success;
|
|
329421
330327
|
return result;
|
|
329422
330328
|
} catch (error3) {
|
|
329423
|
-
this.#editorLifecycleState = failure$
|
|
330329
|
+
this.#editorLifecycleState = failure$2;
|
|
329424
330330
|
throw error3;
|
|
329425
330331
|
}
|
|
329426
330332
|
}
|
|
@@ -342959,11 +343865,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
342959
343865
|
];
|
|
342960
343866
|
});
|
|
342961
343867
|
|
|
342962
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
343868
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-BNIXtF7U.es.js
|
|
342963
343869
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
342964
|
-
var
|
|
342965
|
-
|
|
342966
|
-
|
|
343870
|
+
var init_create_super_doc_ui_BNIXtF7U_es = __esm(() => {
|
|
343871
|
+
init_SuperConverter_CzwJ7ds9_es();
|
|
343872
|
+
init_create_headless_toolbar_BQTnHkb4_es();
|
|
342967
343873
|
MOD_ALIASES = new Set([
|
|
342968
343874
|
"Mod",
|
|
342969
343875
|
"Meta",
|
|
@@ -343005,16 +343911,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
343005
343911
|
|
|
343006
343912
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
343007
343913
|
var init_super_editor_es = __esm(() => {
|
|
343008
|
-
|
|
343009
|
-
|
|
343914
|
+
init_src_D_jA08Jh_es();
|
|
343915
|
+
init_SuperConverter_CzwJ7ds9_es();
|
|
343010
343916
|
init_jszip_C49i9kUs_es();
|
|
343011
343917
|
init_xml_js_CqGKpaft_es();
|
|
343012
|
-
|
|
343918
|
+
init_create_headless_toolbar_BQTnHkb4_es();
|
|
343013
343919
|
init_constants_DrU4EASo_es();
|
|
343014
343920
|
init_dist_B8HfvhaK_es();
|
|
343015
343921
|
init_unified_Dsuw2be5_es();
|
|
343016
343922
|
init_DocxZipper_DoY5OEjc_es();
|
|
343017
|
-
|
|
343923
|
+
init_create_super_doc_ui_BNIXtF7U_es();
|
|
343018
343924
|
init_ui_C5PAS9hY_es();
|
|
343019
343925
|
init_eventemitter3_BnGqBE_Q_es();
|
|
343020
343926
|
init_errors_CNaD6vcg_es();
|
|
@@ -343022,7 +343928,7 @@ var init_super_editor_es = __esm(() => {
|
|
|
343022
343928
|
});
|
|
343023
343929
|
|
|
343024
343930
|
// ../../node_modules/.pnpm/happy-dom@20.4.0/node_modules/happy-dom/lib/PropertySymbol.js
|
|
343025
|
-
var abort, activeElement, asyncTaskManager, bodyBuffer, buffer3, cachedResponse, callbacks, checked, childNodes, children, classList, connectedToNode, disconnectedFromNode, connectedToDocument, disconnectedFromDocument, contentLength, contentType, cssText, currentScript, currentTarget, data, defaultView, destroy, dirtyness, end, entries2, evaluateCSS, evaluateScript, exceptionObserver, formNode, internalId, height, immediatePropagationStopped, indeterminate, isFirstWrite, isFirstWriteAfterOpen, isInPassiveEventListener, isValue, listenerOptions, listeners, itemsByName, nextActiveElement, observeMutations, mutationListeners, ownerDocument, ownerElement, propagationStopped, readyStateManager, referrer, registry2, relList, resetSelection, rootNode, selectNode, selectedness, selection, setupVMContext, shadowRoot, start2, style2, target, textAreaNode, unobserveMutations, reportMutation, updateSelectedness, url2, value, width, window2, windowResizeListener, mutationObservers, openerFrame, openerWindow, popup, isConnected, parentNode2, nodeType, tagName, prefix2, scrollHeight, scrollWidth, scrollTop, scrollLeft, attributes, attributesProxy, namespaceURI, accessKey, accessKeyLabel, offsetHeight, offsetWidth, offsetLeft, offsetTop, clientHeight, clientWidth, clientLeft, clientTop, name, specified, adoptedStyleSheets, implementation, readyState, publicId, systemId, validationMessage, validity, returnValue, elements, length4, complete, naturalHeight, naturalWidth, loading, x, y2, defaultChecked2, files, sheet, volume, paused, currentTime, playbackRate, defaultPlaybackRate, muted, defaultMuted, preservesPitch, buffered, duration, error3, ended, networkState, textTracks, seeking, seekable, played, options, content3, mode, host, setURL,
|
|
343931
|
+
var abort, activeElement, asyncTaskManager, bodyBuffer, buffer3, cachedResponse, callbacks, checked, childNodes, children, classList, connectedToNode, disconnectedFromNode, connectedToDocument, disconnectedFromDocument, contentLength, contentType, cssText, currentScript, currentTarget, data, defaultView, destroy, dirtyness, end, entries2, evaluateCSS, evaluateScript, exceptionObserver, formNode, internalId, height, immediatePropagationStopped, indeterminate, isFirstWrite, isFirstWriteAfterOpen, isInPassiveEventListener, isValue, listenerOptions, listeners, itemsByName, nextActiveElement, observeMutations, mutationListeners, ownerDocument, ownerElement, propagationStopped, readyStateManager, referrer, registry2, relList, resetSelection, rootNode, selectNode, selectedness, selection, setupVMContext, shadowRoot, start2, style2, target, textAreaNode, unobserveMutations, reportMutation, updateSelectedness, url2, value, width, window2, windowResizeListener, mutationObservers, openerFrame, openerWindow, popup, isConnected, parentNode2, nodeType, tagName, prefix2, scrollHeight, scrollWidth, scrollTop, scrollLeft, attributes, attributesProxy, namespaceURI, accessKey, accessKeyLabel, offsetHeight, offsetWidth, offsetLeft, offsetTop, clientHeight, clientWidth, clientLeft, clientTop, name, specified, adoptedStyleSheets, implementation, readyState, publicId, systemId, validationMessage, validity, returnValue, elements, length4, complete, naturalHeight, naturalWidth, loading, x, y2, defaultChecked2, files, sheet, volume, paused, currentTime, playbackRate, defaultPlaybackRate, muted, defaultMuted, preservesPitch, buffered, duration, error3, ended, networkState, textTracks, seeking, seekable, played, options, content3, mode, host, setURL, localName2, classRegistry, nodeStream, location3, history2, navigator2, screen2, sessionStorage, localStorage2, sandbox, cloneNode2, appendChild, removeChild, insertBefore, replaceChild, tracks, constraints, capabilities2, settings, clone, removeNamedItem, items, selectedOptions, styleNode, updateSheet, clearCache, onSetAttribute, onRemoveAttribute, nodeArray, elementArray, cache2, affectsCache, forms, affectsComputedStyleCache, query2, computedStyle, getFormControlItems, getFormControlNamedItem, dataset, getNamespaceItemKey, getNamedItemKey, itemsByNamespaceURI, proxy, setNamedItem, getTokenList, attributeName, selectedIndex, self2, parent, top, areas, defaultValue, elementIdMap, clonable, delegatesFocus, serializable, slotAssignment, assignedNodes, assignedToSlot, cells, rows, headers, tBodies, track2, controlsList, mediaKeys, remote, sinkId, srcObject, cues, activeCues, kind, label, language, id2, illegalConstructor, state, canvas2, popoverTargetElement, composed, bubbles, cancelable, defaultPrevented, eventPhase, timeStamp, type, detail, globalObject, destroyed, aborted, browserFrames, windowInternalId, getItemList, requiredExtensions, systemLanguage, transform, baseVal, animVal, pathLength, unitType, viewBox, markerUnits, markerWidth, markerHeight, values, orientType, orientAngle, refX, refY, readOnly, preserveAspectRatio, animatedPoints, points, rx, ry, cx, cy, r2, clipPathUnits, maskUnits, maskContentUnits, filterUnits, primitiveUnits, href, x1, y1, x2, y22, gradientUnits, gradientTransform, spreadMethod, patternUnits, patternContentUnits, patternTransform, fx, fy, offset2, disabled, textLength, lengthAdjust, getAttribute, setAttribute, z2, w, toArray, fromString, fromArray, angle, m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44, setMatrixValue, translateSelf, rotateSelf, rotateAxisAngleSelf, scaleSelf, scale3dSelf, scaleNonUniformSelf, skewXSelf, skewYSelf, multiplySelf, matrix, domMatrix, getDOMMatrix, setDOMMatrix, attributeValue, startOffset, method, spacing, in1, in2, result, bias, divisor, edgeMode, kernelMatrix, kernelUnitLengthX, kernelUnitLengthY, orderX, orderY, preserveAlpha, targetX, targetY, diffuseConstant, surfaceScale, scale, xChannelSelector, yChannelSelector, azimuth, elevation, dx, dy, stdDeviationX, stdDeviationY, tableValues, slope, intercept, amplitude, exponent, crossOrigin, operator, radiusX, radiusY, specularConstant, specularExponent, pointsAtX, pointsAtY, pointsAtZ, limitingConeAngle, baseFrequencyX, baseFrequencyY, numOctaves, seed, stitchTiles, rotateFromVectorSelf, flipXSelf, flipYSelf, invertSelf, getLength, currentScale, rotate, bindMethods, xmlProcessingInstruction, root3, filterNode, customElementReactionStack, dispatching, modules, preloads, body, redirect, referrerPolicy, signal, bodyUsed, credentials, blocking, moduleImportMap, dispatchError, supports, reason, propertyEventListeners, cssRules, parentRule, parentStyleSheet, conditionText, keyText, media2, styleMap, selectorText, cssParser, cssRule, rulePrefix, virtualServerFile, frames, disableEvaluation, validateJavaScriptExecutionEnvironment, currentNode, openWebSockets, webSocket, moduleCache;
|
|
343026
343932
|
var init_PropertySymbol = __esm(() => {
|
|
343027
343933
|
abort = Symbol("abort");
|
|
343028
343934
|
activeElement = Symbol("activeElement");
|
|
@@ -343163,7 +344069,7 @@ var init_PropertySymbol = __esm(() => {
|
|
|
343163
344069
|
mode = Symbol("mode");
|
|
343164
344070
|
host = Symbol("host");
|
|
343165
344071
|
setURL = Symbol("setURL");
|
|
343166
|
-
|
|
344072
|
+
localName2 = Symbol("localName");
|
|
343167
344073
|
classRegistry = Symbol("classRegistry");
|
|
343168
344074
|
nodeStream = Symbol("nodeStream");
|
|
343169
344075
|
location3 = Symbol("location");
|
|
@@ -354675,7 +355581,7 @@ var init_CustomElementRegistry = __esm(() => {
|
|
|
354675
355581
|
elementClass.prototype[window2] = this.#window;
|
|
354676
355582
|
elementClass.prototype[ownerDocument] = this.#window.document;
|
|
354677
355583
|
elementClass.prototype[tagName] = tagName2;
|
|
354678
|
-
elementClass.prototype[
|
|
355584
|
+
elementClass.prototype[localName2] = name2;
|
|
354679
355585
|
elementClass.prototype[namespaceURI] = NamespaceURI_default.html;
|
|
354680
355586
|
const observedAttributes = new Set;
|
|
354681
355587
|
const elementObservervedAttributes = elementClass.observedAttributes;
|
|
@@ -354735,7 +355641,7 @@ var init_CustomElementRegistry = __esm(() => {
|
|
|
354735
355641
|
definition3.elementClass.prototype[window2] = null;
|
|
354736
355642
|
definition3.elementClass.prototype[ownerDocument] = null;
|
|
354737
355643
|
definition3.elementClass.prototype[tagName] = null;
|
|
354738
|
-
definition3.elementClass.prototype[
|
|
355644
|
+
definition3.elementClass.prototype[localName2] = null;
|
|
354739
355645
|
definition3.elementClass.prototype[namespaceURI] = null;
|
|
354740
355646
|
}
|
|
354741
355647
|
this[registry2] = new Map;
|
|
@@ -358394,7 +359300,7 @@ class NodeUtility {
|
|
|
358394
359300
|
case NodeTypeEnum_default.elementNode:
|
|
358395
359301
|
const elementA = nodeA;
|
|
358396
359302
|
const elementB = nodeB;
|
|
358397
|
-
if (elementA[namespaceURI] !== elementB[namespaceURI] || elementA[prefix2] !== elementB[prefix2] || elementA[
|
|
359303
|
+
if (elementA[namespaceURI] !== elementB[namespaceURI] || elementA[prefix2] !== elementB[prefix2] || elementA[localName2] !== elementB[localName2] || elementA[attributes][items].size !== elementB[attributes][items].size) {
|
|
358398
359304
|
return false;
|
|
358399
359305
|
}
|
|
358400
359306
|
break;
|
|
@@ -359221,7 +360127,7 @@ var init_Attr = __esm(() => {
|
|
|
359221
360127
|
[nodeType] = NodeTypeEnum_default.attributeNode;
|
|
359222
360128
|
[namespaceURI] = null;
|
|
359223
360129
|
[name] = null;
|
|
359224
|
-
[
|
|
360130
|
+
[localName2] = null;
|
|
359225
360131
|
[prefix2] = null;
|
|
359226
360132
|
[value] = null;
|
|
359227
360133
|
[specified] = true;
|
|
@@ -359242,7 +360148,7 @@ var init_Attr = __esm(() => {
|
|
|
359242
360148
|
return this[name] || "";
|
|
359243
360149
|
}
|
|
359244
360150
|
get localName() {
|
|
359245
|
-
return this[
|
|
360151
|
+
return this[localName2] || "";
|
|
359246
360152
|
}
|
|
359247
360153
|
get prefix() {
|
|
359248
360154
|
return this[prefix2];
|
|
@@ -359257,7 +360163,7 @@ var init_Attr = __esm(() => {
|
|
|
359257
360163
|
const clone2 = super[cloneNode2](deep);
|
|
359258
360164
|
clone2[namespaceURI] = this[namespaceURI];
|
|
359259
360165
|
clone2[name] = this[name];
|
|
359260
|
-
clone2[
|
|
360166
|
+
clone2[localName2] = this[localName2];
|
|
359261
360167
|
clone2[prefix2] = this[prefix2];
|
|
359262
360168
|
clone2[value] = this[value];
|
|
359263
360169
|
clone2[specified] = this[specified];
|
|
@@ -361872,7 +362778,7 @@ We should not end up here and it is therefore a bug in Happy DOM. Please report
|
|
|
361872
362778
|
const attribute = NodeFactory.createNode(this.rootDocument, this.window.Attr);
|
|
361873
362779
|
attribute[namespaceURI] = namespaceURI2;
|
|
361874
362780
|
attribute[name] = name2;
|
|
361875
|
-
attribute[
|
|
362781
|
+
attribute[localName2] = namespaceURI2 && nameParts[1] ? nameParts[1] : name2;
|
|
361876
362782
|
attribute[prefix2] = namespaceURI2 && nameParts[1] ? nameParts[0] : null;
|
|
361877
362783
|
attribute[value] = value2;
|
|
361878
362784
|
attributes2[setNamedItem](attribute);
|
|
@@ -361903,7 +362809,7 @@ We should not end up here and it is therefore a bug in Happy DOM. Please report
|
|
|
361903
362809
|
if (parentConfig?.contentModel === HTMLElementConfigContentModelEnum_default.permittedDescendants && parentConfig.moveForbiddenDescendant && !parentConfig.moveForbiddenDescendant.exclude.includes(lowerTagName)) {
|
|
361904
362810
|
let before2 = this.currentNode;
|
|
361905
362811
|
while (before2) {
|
|
361906
|
-
if (!before2.parentNode || !HTMLElementConfig_default[before2.parentNode[
|
|
362812
|
+
if (!before2.parentNode || !HTMLElementConfig_default[before2.parentNode[localName2]]?.permittedDescendants || HTMLElementConfig_default[before2.parentNode[localName2]]?.permittedDescendants?.includes(lowerTagName)) {
|
|
361907
362813
|
break;
|
|
361908
362814
|
} else {
|
|
361909
362815
|
before2 = before2.parentNode;
|
|
@@ -363187,7 +364093,7 @@ var init_Document = __esm(() => {
|
|
|
363187
364093
|
throw new window3.DOMException("Failed to execute 'createElementNS' on 'Document': The qualified name provided is empty.");
|
|
363188
364094
|
}
|
|
363189
364095
|
const parts = qualifiedName.split(":");
|
|
363190
|
-
const
|
|
364096
|
+
const localName3 = parts[1] ?? parts[0];
|
|
363191
364097
|
const prefix3 = parts[1] ? parts[0] : null;
|
|
363192
364098
|
switch (namespaceURI2) {
|
|
363193
364099
|
case NamespaceURI_default.svg:
|
|
@@ -363195,7 +364101,7 @@ var init_Document = __esm(() => {
|
|
|
363195
364101
|
const svgElementClass = config2 && config2.localName === qualifiedName ? window3[config2.className] : window3.SVGElement;
|
|
363196
364102
|
const svgElement = NodeFactory.createNode(this, svgElementClass);
|
|
363197
364103
|
svgElement[tagName] = qualifiedName;
|
|
363198
|
-
svgElement[
|
|
364104
|
+
svgElement[localName2] = localName3;
|
|
363199
364105
|
svgElement[prefix2] = prefix3;
|
|
363200
364106
|
svgElement[namespaceURI] = namespaceURI2;
|
|
363201
364107
|
svgElement[isValue] = options2 && options2.is ? String(options2.is) : null;
|
|
@@ -363205,7 +364111,7 @@ var init_Document = __esm(() => {
|
|
|
363205
364111
|
if (customElementDefinition) {
|
|
363206
364112
|
const element4 = new customElementDefinition.elementClass;
|
|
363207
364113
|
element4[tagName] = StringUtility.asciiUpperCase(qualifiedName);
|
|
363208
|
-
element4[
|
|
364114
|
+
element4[localName2] = localName3;
|
|
363209
364115
|
element4[prefix2] = prefix3;
|
|
363210
364116
|
element4[namespaceURI] = namespaceURI2;
|
|
363211
364117
|
element4[isValue] = options2 && options2.is ? String(options2.is) : null;
|
|
@@ -363215,7 +364121,7 @@ var init_Document = __esm(() => {
|
|
|
363215
364121
|
if (elementClass) {
|
|
363216
364122
|
const element4 = NodeFactory.createNode(this, elementClass);
|
|
363217
364123
|
element4[tagName] = StringUtility.asciiUpperCase(qualifiedName);
|
|
363218
|
-
element4[
|
|
364124
|
+
element4[localName2] = localName3;
|
|
363219
364125
|
element4[prefix2] = prefix3;
|
|
363220
364126
|
element4[namespaceURI] = namespaceURI2;
|
|
363221
364127
|
element4[isValue] = options2 && options2.is ? String(options2.is) : null;
|
|
@@ -363224,7 +364130,7 @@ var init_Document = __esm(() => {
|
|
|
363224
364130
|
const unknownElementClass = qualifiedName.includes("-") ? window3.HTMLElement : window3.HTMLUnknownElement;
|
|
363225
364131
|
const unknownElement = NodeFactory.createNode(this, unknownElementClass);
|
|
363226
364132
|
unknownElement[tagName] = StringUtility.asciiUpperCase(qualifiedName);
|
|
363227
|
-
unknownElement[
|
|
364133
|
+
unknownElement[localName2] = localName3;
|
|
363228
364134
|
unknownElement[prefix2] = prefix3;
|
|
363229
364135
|
unknownElement[namespaceURI] = namespaceURI2;
|
|
363230
364136
|
unknownElement[isValue] = options2 && options2.is ? String(options2.is) : null;
|
|
@@ -363232,7 +364138,7 @@ var init_Document = __esm(() => {
|
|
|
363232
364138
|
default:
|
|
363233
364139
|
const element3 = NodeFactory.createNode(this, Element2);
|
|
363234
364140
|
element3[tagName] = qualifiedName;
|
|
363235
|
-
element3[
|
|
364141
|
+
element3[localName2] = localName3;
|
|
363236
364142
|
element3[prefix2] = prefix3;
|
|
363237
364143
|
element3[namespaceURI] = namespaceURI2;
|
|
363238
364144
|
element3[isValue] = options2 && options2.is ? String(options2.is) : null;
|
|
@@ -363271,7 +364177,7 @@ var init_Document = __esm(() => {
|
|
|
363271
364177
|
const name2 = StringUtility.asciiLowerCase(qualifiedName);
|
|
363272
364178
|
const parts = name2.split(":");
|
|
363273
364179
|
attribute[name] = name2;
|
|
363274
|
-
attribute[
|
|
364180
|
+
attribute[localName2] = parts[1] ?? name2;
|
|
363275
364181
|
attribute[prefix2] = parts[1] ? parts[0] : null;
|
|
363276
364182
|
return attribute;
|
|
363277
364183
|
}
|
|
@@ -363280,7 +364186,7 @@ var init_Document = __esm(() => {
|
|
|
363280
364186
|
const parts = qualifiedName.split(":");
|
|
363281
364187
|
attribute[namespaceURI] = namespaceURI2;
|
|
363282
364188
|
attribute[name] = qualifiedName;
|
|
363283
|
-
attribute[
|
|
364189
|
+
attribute[localName2] = parts[1] ?? qualifiedName;
|
|
363284
364190
|
attribute[prefix2] = parts[1] ? parts[0] : null;
|
|
363285
364191
|
if (!namespaceURI2 && attribute[prefix2]) {
|
|
363286
364192
|
throw new this[window2].DOMException(`Failed to execute 'createAttributeNS' on 'Document': The namespace URI provided ('${namespaceURI2 || ""}') is not valid for the qualified name provided ('${qualifiedName}').`, DOMExceptionNameEnum_default.namespaceError);
|
|
@@ -363587,8 +364493,8 @@ var init_NamedNodeMap = __esm(() => {
|
|
|
363587
364493
|
}
|
|
363588
364494
|
return this[itemsByName].get(name2)?.[0] || null;
|
|
363589
364495
|
}
|
|
363590
|
-
getNamedItemNS(namespace,
|
|
363591
|
-
const item = this[itemsByNamespaceURI].get(`${namespace || ""}:${
|
|
364496
|
+
getNamedItemNS(namespace, localName3) {
|
|
364497
|
+
const item = this[itemsByNamespaceURI].get(`${namespace || ""}:${localName3}`);
|
|
363592
364498
|
if (item && (!item[prefix2] || item[namespaceURI])) {
|
|
363593
364499
|
return item;
|
|
363594
364500
|
}
|
|
@@ -363608,10 +364514,10 @@ var init_NamedNodeMap = __esm(() => {
|
|
|
363608
364514
|
this[removeNamedItem](item);
|
|
363609
364515
|
return item;
|
|
363610
364516
|
}
|
|
363611
|
-
removeNamedItemNS(namespace,
|
|
363612
|
-
const item = this.getNamedItemNS(namespace,
|
|
364517
|
+
removeNamedItemNS(namespace, localName3) {
|
|
364518
|
+
const item = this.getNamedItemNS(namespace, localName3);
|
|
363613
364519
|
if (!item) {
|
|
363614
|
-
throw new this[ownerElement][window2].DOMException(`Failed to execute 'removeNamedItemNS' on 'NamedNodeMap': No item with name '${
|
|
364520
|
+
throw new this[ownerElement][window2].DOMException(`Failed to execute 'removeNamedItemNS' on 'NamedNodeMap': No item with name '${localName3}' in namespace '${namespace}' was found.`, DOMExceptionNameEnum_default.notFoundError);
|
|
363615
364521
|
}
|
|
363616
364522
|
this[removeNamedItem](item);
|
|
363617
364523
|
return item;
|
|
@@ -363621,12 +364527,12 @@ var init_NamedNodeMap = __esm(() => {
|
|
|
363621
364527
|
throw new this[ownerElement][window2].DOMException("The attribute is in use.", DOMExceptionNameEnum_default.inUseAttributeError);
|
|
363622
364528
|
}
|
|
363623
364529
|
item[ownerElement] = this[ownerElement];
|
|
363624
|
-
const replacedItem = this.getNamedItemNS(item[namespaceURI], item[
|
|
364530
|
+
const replacedItem = this.getNamedItemNS(item[namespaceURI], item[localName2]) || null;
|
|
363625
364531
|
const itemsByName2 = this[itemsByName].get(item[name]);
|
|
363626
364532
|
if (replacedItem === item) {
|
|
363627
364533
|
return item;
|
|
363628
364534
|
}
|
|
363629
|
-
this[itemsByNamespaceURI].set(`${item[namespaceURI] || ""}:${item[
|
|
364535
|
+
this[itemsByNamespaceURI].set(`${item[namespaceURI] || ""}:${item[localName2]}`, item);
|
|
363630
364536
|
this[items].set(`${item[namespaceURI] || ""}:${item[name]}`, item);
|
|
363631
364537
|
if (!itemsByName2?.length) {
|
|
363632
364538
|
this[itemsByName].set(item[name], [item]);
|
|
@@ -363644,7 +364550,7 @@ var init_NamedNodeMap = __esm(() => {
|
|
|
363644
364550
|
}
|
|
363645
364551
|
[removeNamedItem](item, ignoreListeners = false) {
|
|
363646
364552
|
item[ownerElement] = null;
|
|
363647
|
-
this[itemsByNamespaceURI].delete(`${item[namespaceURI] || ""}:${item[
|
|
364553
|
+
this[itemsByNamespaceURI].delete(`${item[namespaceURI] || ""}:${item[localName2]}`);
|
|
363648
364554
|
this[items].delete(`${item[namespaceURI] || ""}:${item[name]}`);
|
|
363649
364555
|
const itemsByName2 = this[itemsByName].get(item[name]);
|
|
363650
364556
|
if (itemsByName2?.length) {
|
|
@@ -363799,9 +364705,9 @@ class HTMLSerializer {
|
|
|
363799
364705
|
case NodeTypeEnum_default.elementNode:
|
|
363800
364706
|
const element3 = root4;
|
|
363801
364707
|
const prefix3 = element3[prefix2];
|
|
363802
|
-
const
|
|
363803
|
-
const config2 = HTMLElementConfig_default[element3[
|
|
363804
|
-
const tagName2 = prefix3 ? `${prefix3}:${
|
|
364708
|
+
const localName3 = element3[localName2];
|
|
364709
|
+
const config2 = HTMLElementConfig_default[element3[localName2]];
|
|
364710
|
+
const tagName2 = prefix3 ? `${prefix3}:${localName3}` : localName3;
|
|
363805
364711
|
if (config2?.contentModel === HTMLElementConfigContentModelEnum_default.noDescendants) {
|
|
363806
364712
|
return `<${tagName2}${this.getAttributes(element3)}>`;
|
|
363807
364713
|
}
|
|
@@ -363832,7 +364738,7 @@ class HTMLSerializer {
|
|
|
363832
364738
|
case NodeTypeEnum_default.textNode:
|
|
363833
364739
|
const parentElement = root4.parentElement;
|
|
363834
364740
|
if (parentElement) {
|
|
363835
|
-
const parentConfig = HTMLElementConfig_default[parentElement[
|
|
364741
|
+
const parentConfig = HTMLElementConfig_default[parentElement[localName2]];
|
|
363836
364742
|
if (parentConfig?.contentModel === HTMLElementConfigContentModelEnum_default.rawText) {
|
|
363837
364743
|
return root4.textContent;
|
|
363838
364744
|
}
|
|
@@ -363972,7 +364878,7 @@ var init_Element = __esm(() => {
|
|
|
363972
364878
|
init_ElementEventAttributeUtility();
|
|
363973
364879
|
Element2 = class Element2 extends Node2 {
|
|
363974
364880
|
static [tagName] = null;
|
|
363975
|
-
static [
|
|
364881
|
+
static [localName2] = null;
|
|
363976
364882
|
static [namespaceURI] = null;
|
|
363977
364883
|
[classList] = null;
|
|
363978
364884
|
[isValue] = null;
|
|
@@ -363993,8 +364899,8 @@ var init_Element = __esm(() => {
|
|
|
363993
364899
|
if (!this[tagName]) {
|
|
363994
364900
|
this[tagName] = null;
|
|
363995
364901
|
}
|
|
363996
|
-
if (!this[
|
|
363997
|
-
this[
|
|
364902
|
+
if (!this[localName2]) {
|
|
364903
|
+
this[localName2] = null;
|
|
363998
364904
|
}
|
|
363999
364905
|
if (!this[namespaceURI]) {
|
|
364000
364906
|
this[namespaceURI] = null;
|
|
@@ -364105,7 +365011,7 @@ var init_Element = __esm(() => {
|
|
|
364105
365011
|
return this[tagName];
|
|
364106
365012
|
}
|
|
364107
365013
|
get localName() {
|
|
364108
|
-
return this[
|
|
365014
|
+
return this[localName2];
|
|
364109
365015
|
}
|
|
364110
365016
|
get role() {
|
|
364111
365017
|
return this.getAttribute("role") || "";
|
|
@@ -364194,7 +365100,7 @@ var init_Element = __esm(() => {
|
|
|
364194
365100
|
[cloneNode2](deep = false) {
|
|
364195
365101
|
const clone2 = super[cloneNode2](deep);
|
|
364196
365102
|
clone2[tagName] = this[tagName];
|
|
364197
|
-
clone2[
|
|
365103
|
+
clone2[localName2] = this[localName2];
|
|
364198
365104
|
clone2[namespaceURI] = this[namespaceURI];
|
|
364199
365105
|
if (this[shadowRoot]?.[clonable]) {
|
|
364200
365106
|
clone2[shadowRoot] = this[shadowRoot].cloneNode(deep);
|
|
@@ -364280,7 +365186,7 @@ var init_Element = __esm(() => {
|
|
|
364280
365186
|
const attribute = NodeFactory.createNode(this[ownerDocument], this[window2].Attr);
|
|
364281
365187
|
attribute[namespaceURI] = attributeNamespaceURI;
|
|
364282
365188
|
attribute[name] = name2;
|
|
364283
|
-
attribute[
|
|
365189
|
+
attribute[localName2] = attributeNamespaceURI && nameParts[1] ? nameParts[1] : name2;
|
|
364284
365190
|
attribute[prefix2] = attributeNamespaceURI && nameParts[1] ? nameParts[0] : null;
|
|
364285
365191
|
attribute[value] = String(value2);
|
|
364286
365192
|
this[attributes][setNamedItem](attribute);
|
|
@@ -364324,8 +365230,8 @@ var init_Element = __esm(() => {
|
|
|
364324
365230
|
this.setAttribute(name2, "");
|
|
364325
365231
|
return true;
|
|
364326
365232
|
}
|
|
364327
|
-
getAttributeNS(namespace,
|
|
364328
|
-
const attribute = this.getAttributeNodeNS(namespace,
|
|
365233
|
+
getAttributeNS(namespace, localName3) {
|
|
365234
|
+
const attribute = this.getAttributeNodeNS(namespace, localName3);
|
|
364329
365235
|
if (attribute) {
|
|
364330
365236
|
return attribute[value];
|
|
364331
365237
|
}
|
|
@@ -364334,8 +365240,8 @@ var init_Element = __esm(() => {
|
|
|
364334
365240
|
hasAttribute(name2) {
|
|
364335
365241
|
return !!this.getAttributeNode(name2);
|
|
364336
365242
|
}
|
|
364337
|
-
hasAttributeNS(namespace,
|
|
364338
|
-
return this[attributes].getNamedItemNS(namespace,
|
|
365243
|
+
hasAttributeNS(namespace, localName3) {
|
|
365244
|
+
return this[attributes].getNamedItemNS(namespace, localName3) !== null;
|
|
364339
365245
|
}
|
|
364340
365246
|
hasAttributes() {
|
|
364341
365247
|
return this[attributes][items].size > 0;
|
|
@@ -364346,8 +365252,8 @@ var init_Element = __esm(() => {
|
|
|
364346
365252
|
this[attributes][removeNamedItem](item);
|
|
364347
365253
|
}
|
|
364348
365254
|
}
|
|
364349
|
-
removeAttributeNS(namespace,
|
|
364350
|
-
const item = this[attributes].getNamedItemNS(namespace,
|
|
365255
|
+
removeAttributeNS(namespace, localName3) {
|
|
365256
|
+
const item = this[attributes].getNamedItemNS(namespace, localName3);
|
|
364351
365257
|
if (item) {
|
|
364352
365258
|
this[attributes][removeNamedItem](item);
|
|
364353
365259
|
}
|
|
@@ -364425,8 +365331,8 @@ var init_Element = __esm(() => {
|
|
|
364425
365331
|
getAttributeNode(name2) {
|
|
364426
365332
|
return this[attributes].getNamedItem(name2);
|
|
364427
365333
|
}
|
|
364428
|
-
getAttributeNodeNS(namespace,
|
|
364429
|
-
return this[attributes].getNamedItemNS(namespace,
|
|
365334
|
+
getAttributeNodeNS(namespace, localName3) {
|
|
365335
|
+
return this[attributes].getNamedItemNS(namespace, localName3);
|
|
364430
365336
|
}
|
|
364431
365337
|
removeAttributeNode(attribute) {
|
|
364432
365338
|
if (attribute[ownerElement] !== this) {
|
|
@@ -365396,16 +366302,16 @@ var init_HTMLElement = __esm(() => {
|
|
|
365396
366302
|
}
|
|
365397
366303
|
[connectedToDocument]() {
|
|
365398
366304
|
const window3 = this[window2];
|
|
365399
|
-
const
|
|
366305
|
+
const localName3 = this[localName2];
|
|
365400
366306
|
const allCallbacks = window3.customElements[callbacks];
|
|
365401
|
-
if (this.constructor === window3.HTMLElement &&
|
|
366307
|
+
if (this.constructor === window3.HTMLElement && localName3.includes("-") && allCallbacks) {
|
|
365402
366308
|
if (!this.#customElementDefineCallback) {
|
|
365403
366309
|
const callback = this.#onCustomElementConnected.bind(this);
|
|
365404
|
-
const callbacks2 = allCallbacks.get(
|
|
366310
|
+
const callbacks2 = allCallbacks.get(localName3);
|
|
365405
366311
|
if (callbacks2) {
|
|
365406
366312
|
callbacks2.unshift(callback);
|
|
365407
366313
|
} else {
|
|
365408
|
-
allCallbacks.set(
|
|
366314
|
+
allCallbacks.set(localName3, [callback]);
|
|
365409
366315
|
}
|
|
365410
366316
|
this.#customElementDefineCallback = callback;
|
|
365411
366317
|
}
|
|
@@ -365414,17 +366320,17 @@ var init_HTMLElement = __esm(() => {
|
|
|
365414
366320
|
}
|
|
365415
366321
|
[disconnectedFromDocument]() {
|
|
365416
366322
|
const window3 = this[window2];
|
|
365417
|
-
const
|
|
366323
|
+
const localName3 = this[localName2];
|
|
365418
366324
|
const allCallbacks = window3.customElements[callbacks];
|
|
365419
|
-
if (this.constructor === window3.HTMLElement &&
|
|
365420
|
-
const callbacks2 = allCallbacks.get(
|
|
366325
|
+
if (this.constructor === window3.HTMLElement && localName3.includes("-") && allCallbacks) {
|
|
366326
|
+
const callbacks2 = allCallbacks.get(localName3);
|
|
365421
366327
|
if (callbacks2 && this.#customElementDefineCallback) {
|
|
365422
366328
|
const index2 = callbacks2.indexOf(this.#customElementDefineCallback);
|
|
365423
366329
|
if (index2 !== -1) {
|
|
365424
366330
|
callbacks2.splice(index2, 1);
|
|
365425
366331
|
}
|
|
365426
366332
|
if (!callbacks2.length) {
|
|
365427
|
-
allCallbacks.delete(
|
|
366333
|
+
allCallbacks.delete(localName3);
|
|
365428
366334
|
}
|
|
365429
366335
|
this.#customElementDefineCallback = null;
|
|
365430
366336
|
}
|
|
@@ -365449,8 +366355,8 @@ var init_HTMLElement = __esm(() => {
|
|
|
365449
366355
|
return;
|
|
365450
366356
|
}
|
|
365451
366357
|
const window3 = this[window2];
|
|
365452
|
-
const
|
|
365453
|
-
const newElement = this[ownerDocument].createElement(
|
|
366358
|
+
const localName3 = this[localName2];
|
|
366359
|
+
const newElement = this[ownerDocument].createElement(localName3);
|
|
365454
366360
|
const newCache = newElement[cache2];
|
|
365455
366361
|
newElement[nodeArray] = this[nodeArray];
|
|
365456
366362
|
newElement[elementArray] = this[elementArray];
|
|
@@ -365497,14 +366403,14 @@ var init_HTMLElement = __esm(() => {
|
|
|
365497
366403
|
parentChildNodes[parentChildNodes.indexOf(this)] = newElement;
|
|
365498
366404
|
parentChildElements[parentChildElements.indexOf(this)] = newElement;
|
|
365499
366405
|
const allCallbacks = window3.customElements[callbacks];
|
|
365500
|
-
const callbacks2 = allCallbacks.get(
|
|
366406
|
+
const callbacks2 = allCallbacks.get(localName3);
|
|
365501
366407
|
if (callbacks2 && this.#customElementDefineCallback) {
|
|
365502
366408
|
const index2 = callbacks2.indexOf(this.#customElementDefineCallback);
|
|
365503
366409
|
if (index2 !== -1) {
|
|
365504
366410
|
callbacks2.splice(index2, 1);
|
|
365505
366411
|
}
|
|
365506
366412
|
if (!callbacks2.length) {
|
|
365507
|
-
allCallbacks.delete(
|
|
366413
|
+
allCallbacks.delete(localName3);
|
|
365508
366414
|
}
|
|
365509
366415
|
this.#customElementDefineCallback = null;
|
|
365510
366416
|
}
|
|
@@ -368698,12 +369604,12 @@ var init_HTMLDetailsElement = __esm(() => {
|
|
|
368698
369604
|
if (!event[defaultPrevented] && event.type === "click" && event.eventPhase === EventPhaseEnum_default.bubbling && event instanceof MouseEvent2) {
|
|
368699
369605
|
const target2 = event[target];
|
|
368700
369606
|
if (target2) {
|
|
368701
|
-
if (target2[
|
|
369607
|
+
if (target2[localName2] === "summary" && target2[parentNode2] === this) {
|
|
368702
369608
|
this.open = !this.open;
|
|
368703
369609
|
} else {
|
|
368704
369610
|
let summaryElement = target2;
|
|
368705
369611
|
for (const element3 of this[elementArray]) {
|
|
368706
|
-
if (element3[
|
|
369612
|
+
if (element3[localName2] === "summary") {
|
|
368707
369613
|
summaryElement = element3;
|
|
368708
369614
|
break;
|
|
368709
369615
|
}
|
|
@@ -375689,7 +376595,7 @@ var init_SVGElement = __esm(() => {
|
|
|
375689
376595
|
get ownerSVGElement() {
|
|
375690
376596
|
let parent2 = this[parentNode2];
|
|
375691
376597
|
while (parent2) {
|
|
375692
|
-
if (parent2[
|
|
376598
|
+
if (parent2[localName2] === "svg") {
|
|
375693
376599
|
return parent2;
|
|
375694
376600
|
}
|
|
375695
376601
|
parent2 = parent2[parentNode2];
|
|
@@ -375850,18 +376756,18 @@ class XMLSerializer2 {
|
|
|
375850
376756
|
switch (root4[nodeType]) {
|
|
375851
376757
|
case NodeTypeEnum_default.elementNode:
|
|
375852
376758
|
const element3 = root4;
|
|
375853
|
-
const
|
|
376759
|
+
const localName3 = element3[localName2];
|
|
375854
376760
|
let innerHTML2 = "";
|
|
375855
376761
|
const namespacePrefixes = this.#getNamespacePrefixes(element3, inheritedNamespacePrefixes);
|
|
375856
376762
|
const elementPrefix = element3[namespaceURI] === NamespaceURI_default.html ? element3[prefix2] : this.#getElementPrefix(element3, namespacePrefixes);
|
|
375857
|
-
const tagName2 = `${elementPrefix ? elementPrefix + ":" : ""}${
|
|
376763
|
+
const tagName2 = `${elementPrefix ? elementPrefix + ":" : ""}${localName3}`;
|
|
375858
376764
|
const defaultNamespace = elementPrefix ? inheritedDefaultNamespace : element3[namespaceURI] || inheritedDefaultNamespace;
|
|
375859
376765
|
const attributes2 = this.#getAttributes(element3, elementPrefix, inheritedDefaultNamespace, inheritedNamespacePrefixes);
|
|
375860
|
-
const childNodes2 = defaultNamespace === NamespaceURI_default.html &&
|
|
376766
|
+
const childNodes2 = defaultNamespace === NamespaceURI_default.html && localName3 === "template" ? root4.content[nodeArray] : root4[nodeArray];
|
|
375861
376767
|
for (const node3 of childNodes2) {
|
|
375862
376768
|
innerHTML2 += this.#serializeToString(node3, defaultNamespace, namespacePrefixes);
|
|
375863
376769
|
}
|
|
375864
|
-
if (!innerHTML2 && defaultNamespace === NamespaceURI_default.html && HTMLElementConfig_default[
|
|
376770
|
+
if (!innerHTML2 && defaultNamespace === NamespaceURI_default.html && HTMLElementConfig_default[localName3.toLowerCase()]?.contentModel === HTMLElementConfigContentModelEnum_default.noDescendants) {
|
|
375865
376771
|
return `<${tagName2}${attributes2} />`;
|
|
375866
376772
|
}
|
|
375867
376773
|
if (!innerHTML2 && defaultNamespace !== NamespaceURI_default.html) {
|
|
@@ -375885,7 +376791,7 @@ class XMLSerializer2 {
|
|
|
375885
376791
|
case NodeTypeEnum_default.textNode:
|
|
375886
376792
|
const parentElement = root4.parentElement;
|
|
375887
376793
|
if (parentElement) {
|
|
375888
|
-
const parentConfig = HTMLElementConfig_default[parentElement[
|
|
376794
|
+
const parentConfig = HTMLElementConfig_default[parentElement[localName2]];
|
|
375889
376795
|
if (parentConfig?.contentModel === HTMLElementConfigContentModelEnum_default.rawText) {
|
|
375890
376796
|
return root4.textContent;
|
|
375891
376797
|
}
|
|
@@ -375904,7 +376810,7 @@ class XMLSerializer2 {
|
|
|
375904
376810
|
const namespacePrefixes = new Map(inheritedNamespacePrefixes);
|
|
375905
376811
|
for (const attribute of element3[attributes][items].values()) {
|
|
375906
376812
|
if (attribute[namespaceURI] === NamespaceURI_default.xmlns && attribute[prefix2]) {
|
|
375907
|
-
namespacePrefixes.set(attribute[value], attribute[
|
|
376813
|
+
namespacePrefixes.set(attribute[value], attribute[localName2]);
|
|
375908
376814
|
}
|
|
375909
376815
|
}
|
|
375910
376816
|
return namespacePrefixes;
|
|
@@ -375938,7 +376844,7 @@ class XMLSerializer2 {
|
|
|
375938
376844
|
const handledNamespaces = new Set;
|
|
375939
376845
|
for (const attribute of element3[attributes][items].values()) {
|
|
375940
376846
|
if (attribute[namespaceURI] === NamespaceURI_default.xmlns) {
|
|
375941
|
-
if (elementPrefix && attribute[
|
|
376847
|
+
if (elementPrefix && attribute[localName2] === elementPrefix && element3[namespaceURI]) {
|
|
375942
376848
|
namespaceString += ` xmlns:${elementPrefix}="${XMLEncodeUtility.encodeXMLAttributeValue(element3[namespaceURI])}"`;
|
|
375943
376849
|
handledNamespaces.add(element3[namespaceURI]);
|
|
375944
376850
|
} else if (!elementPrefix && attribute[name] === "xmlns" && element3[namespaceURI]) {
|
|
@@ -376309,7 +377215,7 @@ var init_Image = __esm(() => {
|
|
|
376309
377215
|
init_NamespaceURI();
|
|
376310
377216
|
Image2 = class Image2 extends HTMLImageElement {
|
|
376311
377217
|
[tagName] = "IMG";
|
|
376312
|
-
[
|
|
377218
|
+
[localName2] = "img";
|
|
376313
377219
|
[namespaceURI] = NamespaceURI_default.html;
|
|
376314
377220
|
constructor(width2 = null, height2 = null) {
|
|
376315
377221
|
super();
|
|
@@ -376331,7 +377237,7 @@ var init_Audio = __esm(() => {
|
|
|
376331
377237
|
init_PropertySymbol();
|
|
376332
377238
|
Audio = class Audio extends HTMLAudioElement {
|
|
376333
377239
|
[tagName] = "AUDIO";
|
|
376334
|
-
[
|
|
377240
|
+
[localName2] = "audio";
|
|
376335
377241
|
[namespaceURI] = NamespaceURI_default.html;
|
|
376336
377242
|
constructor(url3 = null) {
|
|
376337
377243
|
super();
|
|
@@ -377634,13 +378540,13 @@ class XMLParser {
|
|
|
377634
378540
|
const attribute = NodeFactory.createNode(this.rootNode, this.window.Attr);
|
|
377635
378541
|
attribute[namespaceURI] = namespaceURI2;
|
|
377636
378542
|
attribute[name] = name2;
|
|
377637
|
-
attribute[
|
|
378543
|
+
attribute[localName2] = namespaceURI2 && nameParts[1] ? nameParts[1] : name2;
|
|
377638
378544
|
attribute[prefix2] = namespaceURI2 && nameParts[1] ? nameParts[0] : null;
|
|
377639
378545
|
attribute[value] = value2;
|
|
377640
378546
|
attributes2[setNamedItem](attribute);
|
|
377641
378547
|
if (attribute[prefix2] === "xmlns") {
|
|
377642
|
-
namespacePrefix.set(attribute[
|
|
377643
|
-
if (this.nextElement[prefix2] === attribute[
|
|
378548
|
+
namespacePrefix.set(attribute[localName2], value2);
|
|
378549
|
+
if (this.nextElement[prefix2] === attribute[localName2]) {
|
|
377644
378550
|
this.nextElement[namespaceURI] = value2;
|
|
377645
378551
|
}
|
|
377646
378552
|
} else if (name2 === "xmlns" && !this.nextElement[prefix2]) {
|