@harbour-enterprises/superdoc 0.23.0-next.10 → 0.23.0-next.12
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/chunks/{PdfViewer-CPZ7QD5u.es.js → PdfViewer-Def79WX8.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BsnSIYxD.cjs → PdfViewer-UfEzsjC9.cjs} +1 -1
- package/dist/chunks/{index-Cd9h9gMj.es.js → index-B7bpeaOD.es.js} +46 -9
- package/dist/chunks/{index-DOd9uvCv.cjs → index-fDlOzGBY.cjs} +46 -9
- package/dist/chunks/{super-editor.es-l3dTZlZX.es.js → super-editor.es-GQtMEyYE.es.js} +92 -32
- package/dist/chunks/{super-editor.es-DAS3_Nt9.cjs → super-editor.es-MZFhQtfd.cjs} +92 -32
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/stores/comments-store.d.ts +3 -3
- package/dist/stores/comments-store.d.ts.map +1 -1
- package/dist/style.css +27 -27
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-ClnqoStR.js → converter-Cz6CE2gy.js} +13 -0
- package/dist/super-editor/chunks/{docx-zipper-DC28ucAi.js → docx-zipper-Cd2gZDQ5.js} +1 -1
- package/dist/super-editor/chunks/{editor-B2aHhS9B.js → editor-CdXDzlMp.js} +81 -34
- package/dist/super-editor/chunks/{toolbar-Cgyf_4bW.js → toolbar-Xfq2Jgfs.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/src/core/helpers/htmlSanitizer.d.ts +1 -1
- package/dist/super-editor/src/extensions/comment/comments-plugin.d.ts +60 -0
- package/dist/super-editor/src/extensions/comment/helpers/index.d.ts +2 -0
- package/dist/super-editor/src/extensions/comment/helpers/normalize-comment-event-payload.d.ts +1 -0
- package/dist/super-editor/src/extensions/comment/helpers/update-position.d.ts +7 -0
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +136 -39
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as defineComponent, B as h, O as Transition, $ as process$1, I as watchEffect, d as computed, r as ref, j as onMounted, W as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, f as createCommentVNode, v as createVNode, x as unref } from "./vue-ZWZLQtoU.es.js";
|
|
2
|
-
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-
|
|
2
|
+
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-B7bpeaOD.es.js";
|
|
3
3
|
function self(vars) {
|
|
4
4
|
const {
|
|
5
5
|
opacityDisabled,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-DKMj1I9B.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
4
|
+
const superdoc = require("./index-fDlOzGBY.cjs");
|
|
5
5
|
function self(vars) {
|
|
6
6
|
const {
|
|
7
7
|
opacityDisabled,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-
|
|
1
|
+
import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-GQtMEyYE.es.js";
|
|
2
2
|
import { a0 as effectScope, r as ref, _ as markRaw, $ as process$1, a1 as toRaw, d as computed, a2 as isRef, a3 as isReactive, C as toRef, i as inject, p as getCurrentInstance, l as watch, x as unref, a4 as hasInjectionContext, M as reactive, s as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 as toRefs, g as global$1, J as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, q as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, H as withDirectives, B as h, U as Teleport, R as renderSlot, V as isVNode, I as watchEffect, O as Transition, a8 as TransitionGroup, E as mergeProps, P as vShow, G as cloneVNode, T as Text, c as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, a as createBaseVNode, A as normalizeStyle, f as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a9 as resolveDirective, e as renderList, b as createApp, X as resolveDynamicComponent, aa as defineAsyncComponent } from "./vue-ZWZLQtoU.es.js";
|
|
3
3
|
import { B as Buffer$2 } from "./jszip-DAXEPCUv.es.js";
|
|
4
4
|
import { B as BlankDOCX } from "./blank-docx-iwdyG9RH.es.js";
|
|
@@ -4312,7 +4312,11 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4312
4312
|
pendingComment.value = getPendingComment({ selection, documentId: selection.documentId, parentCommentId: null });
|
|
4313
4313
|
if (!superdoc2.config.isInternal) pendingComment.value.isInternal = false;
|
|
4314
4314
|
if (superdoc2.activeEditor?.commands) {
|
|
4315
|
-
superdoc2.activeEditor.commands.insertComment({
|
|
4315
|
+
superdoc2.activeEditor.commands.insertComment({
|
|
4316
|
+
...pendingComment.value.getValues(),
|
|
4317
|
+
commentId: "pending",
|
|
4318
|
+
skipEmit: true
|
|
4319
|
+
});
|
|
4316
4320
|
}
|
|
4317
4321
|
if (pendingComment.value.selection.source === "super-editor" && superdocStore.selectionPosition) {
|
|
4318
4322
|
superdocStore.selectionPosition.source = "super-editor";
|
|
@@ -4384,7 +4388,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4384
4388
|
superdocStore.selectionPosition = null;
|
|
4385
4389
|
superdoc2.activeEditor?.commands.removeComment({ commentId: "pending" });
|
|
4386
4390
|
};
|
|
4387
|
-
const addComment = ({ superdoc: superdoc2, comment }) => {
|
|
4391
|
+
const addComment = ({ superdoc: superdoc2, comment, skipEditorUpdate = false }) => {
|
|
4388
4392
|
let parentComment = commentsList.value.find((c2) => c2.commentId === activeComment.value);
|
|
4389
4393
|
if (!parentComment) parentComment = comment;
|
|
4390
4394
|
const newComment = useComment(comment.getValues());
|
|
@@ -4398,8 +4402,8 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4398
4402
|
if (!superdoc2.config.isInternal) newComment.isInternal = false;
|
|
4399
4403
|
commentsList.value.push(newComment);
|
|
4400
4404
|
removePendingComment(superdoc2);
|
|
4401
|
-
if (!comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
|
|
4402
|
-
superdoc2.activeEditor.commands.insertComment(newComment.getValues());
|
|
4405
|
+
if (!skipEditorUpdate && !comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
|
|
4406
|
+
superdoc2.activeEditor.commands.insertComment({ ...newComment.getValues(), skipEmit: true });
|
|
4403
4407
|
}
|
|
4404
4408
|
const event = { type: COMMENT_EVENTS.ADD, comment: newComment.getValues() };
|
|
4405
4409
|
syncCommentsToClients(superdoc2, event);
|
|
@@ -17400,7 +17404,7 @@ const _sfc_main = {
|
|
|
17400
17404
|
__name: "SuperDoc",
|
|
17401
17405
|
emits: ["selection-update"],
|
|
17402
17406
|
setup(__props, { emit: __emit }) {
|
|
17403
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
17407
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-Def79WX8.es.js"));
|
|
17404
17408
|
const superdocStore = useSuperdocStore();
|
|
17405
17409
|
const commentsStore = useCommentsStore();
|
|
17406
17410
|
const {
|
|
@@ -17429,7 +17433,14 @@ const _sfc_main = {
|
|
|
17429
17433
|
hasInitializedLocations,
|
|
17430
17434
|
isCommentHighlighted
|
|
17431
17435
|
} = storeToRefs(commentsStore);
|
|
17432
|
-
const {
|
|
17436
|
+
const {
|
|
17437
|
+
showAddComment,
|
|
17438
|
+
handleEditorLocationsUpdate,
|
|
17439
|
+
handleTrackedChangeUpdate,
|
|
17440
|
+
addComment,
|
|
17441
|
+
getComment,
|
|
17442
|
+
COMMENT_EVENTS
|
|
17443
|
+
} = commentsStore;
|
|
17433
17444
|
const { proxy } = getCurrentInstance();
|
|
17434
17445
|
commentsStore.proxy = proxy;
|
|
17435
17446
|
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
@@ -17621,7 +17632,33 @@ const _sfc_main = {
|
|
|
17621
17632
|
handleEditorLocationsUpdate(allCommentPositions, activeThreadId);
|
|
17622
17633
|
};
|
|
17623
17634
|
const onEditorCommentsUpdate = (params2 = {}) => {
|
|
17624
|
-
|
|
17635
|
+
let { activeCommentId, type, comment: commentPayload } = params2;
|
|
17636
|
+
if (COMMENT_EVENTS?.ADD && type === COMMENT_EVENTS.ADD && commentPayload) {
|
|
17637
|
+
if (!commentPayload.commentText && commentPayload.text) {
|
|
17638
|
+
commentPayload.commentText = commentPayload.text;
|
|
17639
|
+
}
|
|
17640
|
+
const currentUser = proxy.$superdoc?.user;
|
|
17641
|
+
if (currentUser) {
|
|
17642
|
+
if (!commentPayload.creatorName) commentPayload.creatorName = currentUser.name;
|
|
17643
|
+
if (!commentPayload.creatorEmail) commentPayload.creatorEmail = currentUser.email;
|
|
17644
|
+
}
|
|
17645
|
+
if (!commentPayload.createdTime) commentPayload.createdTime = Date.now();
|
|
17646
|
+
const primaryDocumentId = commentPayload.documentId || documents.value?.[0]?.id;
|
|
17647
|
+
if (!commentPayload.documentId && primaryDocumentId) {
|
|
17648
|
+
commentPayload.documentId = primaryDocumentId;
|
|
17649
|
+
}
|
|
17650
|
+
if (!commentPayload.fileId && primaryDocumentId) {
|
|
17651
|
+
commentPayload.fileId = primaryDocumentId;
|
|
17652
|
+
}
|
|
17653
|
+
const id = commentPayload.commentId || commentPayload.importedId;
|
|
17654
|
+
if (id && !getComment(id)) {
|
|
17655
|
+
const commentModel = useComment(commentPayload);
|
|
17656
|
+
addComment({ superdoc: proxy.$superdoc, comment: commentModel, skipEditorUpdate: true });
|
|
17657
|
+
}
|
|
17658
|
+
if (!activeCommentId && id) {
|
|
17659
|
+
activeCommentId = id;
|
|
17660
|
+
}
|
|
17661
|
+
}
|
|
17625
17662
|
if (type === "trackedChange") {
|
|
17626
17663
|
handleTrackedChangeUpdate({ superdoc: proxy.$superdoc, params: params2 });
|
|
17627
17664
|
}
|
|
@@ -17954,7 +17991,7 @@ const _sfc_main = {
|
|
|
17954
17991
|
};
|
|
17955
17992
|
}
|
|
17956
17993
|
};
|
|
17957
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
17994
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-96983cf9"]]);
|
|
17958
17995
|
const createSuperdocVueApp = () => {
|
|
17959
17996
|
const app = createApp(App);
|
|
17960
17997
|
const pinia = createPinia();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-MZFhQtfd.cjs");
|
|
3
3
|
const vue = require("./vue-DKMj1I9B.cjs");
|
|
4
4
|
const jszip = require("./jszip-B4LDL19y.cjs");
|
|
5
5
|
const blankDocx = require("./blank-docx-CPqX9RF5.cjs");
|
|
@@ -4329,7 +4329,11 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4329
4329
|
pendingComment.value = getPendingComment({ selection, documentId: selection.documentId, parentCommentId: null });
|
|
4330
4330
|
if (!superdoc2.config.isInternal) pendingComment.value.isInternal = false;
|
|
4331
4331
|
if (superdoc2.activeEditor?.commands) {
|
|
4332
|
-
superdoc2.activeEditor.commands.insertComment({
|
|
4332
|
+
superdoc2.activeEditor.commands.insertComment({
|
|
4333
|
+
...pendingComment.value.getValues(),
|
|
4334
|
+
commentId: "pending",
|
|
4335
|
+
skipEmit: true
|
|
4336
|
+
});
|
|
4333
4337
|
}
|
|
4334
4338
|
if (pendingComment.value.selection.source === "super-editor" && superdocStore.selectionPosition) {
|
|
4335
4339
|
superdocStore.selectionPosition.source = "super-editor";
|
|
@@ -4401,7 +4405,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4401
4405
|
superdocStore.selectionPosition = null;
|
|
4402
4406
|
superdoc2.activeEditor?.commands.removeComment({ commentId: "pending" });
|
|
4403
4407
|
};
|
|
4404
|
-
const addComment = ({ superdoc: superdoc2, comment }) => {
|
|
4408
|
+
const addComment = ({ superdoc: superdoc2, comment, skipEditorUpdate = false }) => {
|
|
4405
4409
|
let parentComment = commentsList.value.find((c2) => c2.commentId === activeComment.value);
|
|
4406
4410
|
if (!parentComment) parentComment = comment;
|
|
4407
4411
|
const newComment = useComment(comment.getValues());
|
|
@@ -4415,8 +4419,8 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4415
4419
|
if (!superdoc2.config.isInternal) newComment.isInternal = false;
|
|
4416
4420
|
commentsList.value.push(newComment);
|
|
4417
4421
|
removePendingComment(superdoc2);
|
|
4418
|
-
if (!comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
|
|
4419
|
-
superdoc2.activeEditor.commands.insertComment(newComment.getValues());
|
|
4422
|
+
if (!skipEditorUpdate && !comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
|
|
4423
|
+
superdoc2.activeEditor.commands.insertComment({ ...newComment.getValues(), skipEmit: true });
|
|
4420
4424
|
}
|
|
4421
4425
|
const event = { type: COMMENT_EVENTS.ADD, comment: newComment.getValues() };
|
|
4422
4426
|
syncCommentsToClients(superdoc2, event);
|
|
@@ -17417,7 +17421,7 @@ const _sfc_main = {
|
|
|
17417
17421
|
__name: "SuperDoc",
|
|
17418
17422
|
emits: ["selection-update"],
|
|
17419
17423
|
setup(__props, { emit: __emit }) {
|
|
17420
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17424
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-UfEzsjC9.cjs")));
|
|
17421
17425
|
const superdocStore = useSuperdocStore();
|
|
17422
17426
|
const commentsStore = useCommentsStore();
|
|
17423
17427
|
const {
|
|
@@ -17446,7 +17450,14 @@ const _sfc_main = {
|
|
|
17446
17450
|
hasInitializedLocations,
|
|
17447
17451
|
isCommentHighlighted
|
|
17448
17452
|
} = storeToRefs(commentsStore);
|
|
17449
|
-
const {
|
|
17453
|
+
const {
|
|
17454
|
+
showAddComment,
|
|
17455
|
+
handleEditorLocationsUpdate,
|
|
17456
|
+
handleTrackedChangeUpdate,
|
|
17457
|
+
addComment,
|
|
17458
|
+
getComment,
|
|
17459
|
+
COMMENT_EVENTS
|
|
17460
|
+
} = commentsStore;
|
|
17450
17461
|
const { proxy } = vue.getCurrentInstance();
|
|
17451
17462
|
commentsStore.proxy = proxy;
|
|
17452
17463
|
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
@@ -17638,7 +17649,33 @@ const _sfc_main = {
|
|
|
17638
17649
|
handleEditorLocationsUpdate(allCommentPositions, activeThreadId);
|
|
17639
17650
|
};
|
|
17640
17651
|
const onEditorCommentsUpdate = (params2 = {}) => {
|
|
17641
|
-
|
|
17652
|
+
let { activeCommentId, type, comment: commentPayload } = params2;
|
|
17653
|
+
if (COMMENT_EVENTS?.ADD && type === COMMENT_EVENTS.ADD && commentPayload) {
|
|
17654
|
+
if (!commentPayload.commentText && commentPayload.text) {
|
|
17655
|
+
commentPayload.commentText = commentPayload.text;
|
|
17656
|
+
}
|
|
17657
|
+
const currentUser = proxy.$superdoc?.user;
|
|
17658
|
+
if (currentUser) {
|
|
17659
|
+
if (!commentPayload.creatorName) commentPayload.creatorName = currentUser.name;
|
|
17660
|
+
if (!commentPayload.creatorEmail) commentPayload.creatorEmail = currentUser.email;
|
|
17661
|
+
}
|
|
17662
|
+
if (!commentPayload.createdTime) commentPayload.createdTime = Date.now();
|
|
17663
|
+
const primaryDocumentId = commentPayload.documentId || documents.value?.[0]?.id;
|
|
17664
|
+
if (!commentPayload.documentId && primaryDocumentId) {
|
|
17665
|
+
commentPayload.documentId = primaryDocumentId;
|
|
17666
|
+
}
|
|
17667
|
+
if (!commentPayload.fileId && primaryDocumentId) {
|
|
17668
|
+
commentPayload.fileId = primaryDocumentId;
|
|
17669
|
+
}
|
|
17670
|
+
const id = commentPayload.commentId || commentPayload.importedId;
|
|
17671
|
+
if (id && !getComment(id)) {
|
|
17672
|
+
const commentModel = useComment(commentPayload);
|
|
17673
|
+
addComment({ superdoc: proxy.$superdoc, comment: commentModel, skipEditorUpdate: true });
|
|
17674
|
+
}
|
|
17675
|
+
if (!activeCommentId && id) {
|
|
17676
|
+
activeCommentId = id;
|
|
17677
|
+
}
|
|
17678
|
+
}
|
|
17642
17679
|
if (type === "trackedChange") {
|
|
17643
17680
|
handleTrackedChangeUpdate({ superdoc: proxy.$superdoc, params: params2 });
|
|
17644
17681
|
}
|
|
@@ -17971,7 +18008,7 @@ const _sfc_main = {
|
|
|
17971
18008
|
};
|
|
17972
18009
|
}
|
|
17973
18010
|
};
|
|
17974
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
18011
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-96983cf9"]]);
|
|
17975
18012
|
const createSuperdocVueApp = () => {
|
|
17976
18013
|
const app = vue.createApp(App);
|
|
17977
18014
|
const pinia = createPinia();
|
|
@@ -21395,6 +21395,13 @@ function stripHtmlStyles(html) {
|
|
|
21395
21395
|
if (node.nodeType !== window.Node.ELEMENT_NODE) return;
|
|
21396
21396
|
[...node.attributes].forEach((attr) => {
|
|
21397
21397
|
const name = attr.name.toLowerCase();
|
|
21398
|
+
if (name === "style") {
|
|
21399
|
+
const cleanedStyle = cleanStyle(attr.value);
|
|
21400
|
+
if (!cleanedStyle) {
|
|
21401
|
+
node.removeAttribute(attr.name);
|
|
21402
|
+
} else node.setAttribute(attr.name, cleanedStyle);
|
|
21403
|
+
return;
|
|
21404
|
+
}
|
|
21398
21405
|
const shouldKeep = SUPPORTED_ATTRS.includes(name) || name.startsWith("data-");
|
|
21399
21406
|
if (!shouldKeep) {
|
|
21400
21407
|
node.removeAttribute(attr.name);
|
|
@@ -21405,6 +21412,12 @@ function stripHtmlStyles(html) {
|
|
|
21405
21412
|
cleanNode(doc2.body);
|
|
21406
21413
|
return doc2.body.innerHTML;
|
|
21407
21414
|
}
|
|
21415
|
+
function cleanStyle(style2) {
|
|
21416
|
+
if (!style2) return "";
|
|
21417
|
+
const declarations = style2.split(";").map((s) => s.trim()).filter(Boolean);
|
|
21418
|
+
const textAlign = declarations.find((d2) => d2.startsWith("text-align"));
|
|
21419
|
+
return textAlign ? `${textAlign};` : "";
|
|
21420
|
+
}
|
|
21408
21421
|
function createDocFromHTML(content, schema, options = {}) {
|
|
21409
21422
|
const { isImport = false } = options;
|
|
21410
21423
|
let parsedContent;
|
|
@@ -48727,26 +48740,100 @@ const onHeaderFooterDataUpdate = async ({ editor, transaction }, mainEditor, sec
|
|
|
48727
48740
|
const setEditorToolbar = ({ editor }, mainEditor) => {
|
|
48728
48741
|
editor.setToolbar(mainEditor.toolbar);
|
|
48729
48742
|
};
|
|
48743
|
+
const normalizeCommentEventPayload = ({ conversation, editorOptions, fallbackCommentId, fallbackInternal }) => {
|
|
48744
|
+
const { user, documentId } = editorOptions || {};
|
|
48745
|
+
const normalized = {
|
|
48746
|
+
...conversation,
|
|
48747
|
+
commentId: conversation?.commentId ?? fallbackCommentId,
|
|
48748
|
+
isInternal: conversation?.isInternal ?? fallbackInternal
|
|
48749
|
+
};
|
|
48750
|
+
if (!normalized.commentText && normalized.text) {
|
|
48751
|
+
normalized.commentText = normalized.text;
|
|
48752
|
+
delete normalized.text;
|
|
48753
|
+
}
|
|
48754
|
+
if ("skipEmit" in normalized) delete normalized.skipEmit;
|
|
48755
|
+
if (!normalized.creatorName && user?.name) {
|
|
48756
|
+
normalized.creatorName = user.name;
|
|
48757
|
+
}
|
|
48758
|
+
if (!normalized.creatorEmail && user?.email) {
|
|
48759
|
+
normalized.creatorEmail = user.email;
|
|
48760
|
+
}
|
|
48761
|
+
if (!normalized.createdTime) {
|
|
48762
|
+
normalized.createdTime = Date.now();
|
|
48763
|
+
}
|
|
48764
|
+
if (!normalized.fileId && documentId) {
|
|
48765
|
+
normalized.fileId = documentId;
|
|
48766
|
+
}
|
|
48767
|
+
if (!normalized.documentId && documentId) {
|
|
48768
|
+
normalized.documentId = documentId;
|
|
48769
|
+
}
|
|
48770
|
+
return normalized;
|
|
48771
|
+
};
|
|
48772
|
+
const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, node }) => {
|
|
48773
|
+
let bounds = {};
|
|
48774
|
+
if (currentBounds instanceof DOMRect) {
|
|
48775
|
+
bounds = {
|
|
48776
|
+
top: currentBounds.top,
|
|
48777
|
+
bottom: currentBounds.bottom,
|
|
48778
|
+
left: currentBounds.left,
|
|
48779
|
+
right: currentBounds.right
|
|
48780
|
+
};
|
|
48781
|
+
} else {
|
|
48782
|
+
bounds = { ...currentBounds };
|
|
48783
|
+
}
|
|
48784
|
+
if (!allCommentPositions[threadId]) {
|
|
48785
|
+
allCommentPositions[threadId] = {
|
|
48786
|
+
threadId,
|
|
48787
|
+
start: pos,
|
|
48788
|
+
end: pos + node.nodeSize,
|
|
48789
|
+
bounds
|
|
48790
|
+
};
|
|
48791
|
+
} else {
|
|
48792
|
+
const existing = allCommentPositions[threadId];
|
|
48793
|
+
existing.start = Math.min(existing.start, pos);
|
|
48794
|
+
existing.end = Math.max(existing.end, pos + node.nodeSize);
|
|
48795
|
+
existing.bounds.top = Math.min(existing.bounds.top, currentBounds.top);
|
|
48796
|
+
existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
|
|
48797
|
+
}
|
|
48798
|
+
};
|
|
48730
48799
|
const TRACK_CHANGE_MARKS = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
|
|
48731
48800
|
const CommentsPluginKey = new PluginKey("comments");
|
|
48732
48801
|
const CommentsPlugin = Extension.create({
|
|
48733
48802
|
name: "comments",
|
|
48734
48803
|
addCommands() {
|
|
48735
48804
|
return {
|
|
48736
|
-
insertComment: (conversation) => ({ tr, dispatch }) => {
|
|
48805
|
+
insertComment: (conversation = {}) => ({ tr, dispatch }) => {
|
|
48737
48806
|
const { selection } = tr;
|
|
48738
48807
|
const { $from, $to } = selection;
|
|
48739
|
-
const
|
|
48808
|
+
const skipEmit = conversation?.skipEmit;
|
|
48809
|
+
const resolvedCommentId = conversation?.commentId ?? v4();
|
|
48810
|
+
const resolvedInternal = conversation?.isInternal ?? false;
|
|
48740
48811
|
tr.setMeta(CommentsPluginKey, { event: "add" });
|
|
48741
48812
|
tr.addMark(
|
|
48742
48813
|
$from.pos,
|
|
48743
48814
|
$to.pos,
|
|
48744
48815
|
this.editor.schema.marks[CommentMarkName].create({
|
|
48745
|
-
commentId,
|
|
48746
|
-
internal:
|
|
48816
|
+
commentId: resolvedCommentId,
|
|
48817
|
+
internal: resolvedInternal
|
|
48747
48818
|
})
|
|
48748
48819
|
);
|
|
48749
|
-
dispatch(tr);
|
|
48820
|
+
if (dispatch) dispatch(tr);
|
|
48821
|
+
const shouldEmit = !skipEmit && resolvedCommentId !== "pending";
|
|
48822
|
+
if (shouldEmit) {
|
|
48823
|
+
const commentPayload = normalizeCommentEventPayload({
|
|
48824
|
+
conversation,
|
|
48825
|
+
editorOptions: this.editor.options,
|
|
48826
|
+
fallbackCommentId: resolvedCommentId,
|
|
48827
|
+
fallbackInternal: resolvedInternal
|
|
48828
|
+
});
|
|
48829
|
+
const activeCommentId = commentPayload.commentId || commentPayload.importedId || null;
|
|
48830
|
+
const event = {
|
|
48831
|
+
type: comments_module_events.ADD,
|
|
48832
|
+
comment: commentPayload,
|
|
48833
|
+
...activeCommentId && { activeCommentId }
|
|
48834
|
+
};
|
|
48835
|
+
this.editor.emit("commentsUpdate", event);
|
|
48836
|
+
}
|
|
48750
48837
|
return true;
|
|
48751
48838
|
},
|
|
48752
48839
|
removeComment: ({ commentId, importedId }) => ({ tr, dispatch, state: state2 }) => {
|
|
@@ -48982,33 +49069,6 @@ const CommentsPlugin = Extension.create({
|
|
|
48982
49069
|
return [commentsPlugin];
|
|
48983
49070
|
}
|
|
48984
49071
|
});
|
|
48985
|
-
const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, node }) => {
|
|
48986
|
-
let bounds = {};
|
|
48987
|
-
if (currentBounds instanceof DOMRect) {
|
|
48988
|
-
bounds = {
|
|
48989
|
-
top: currentBounds.top,
|
|
48990
|
-
bottom: currentBounds.bottom,
|
|
48991
|
-
left: currentBounds.left,
|
|
48992
|
-
right: currentBounds.right
|
|
48993
|
-
};
|
|
48994
|
-
} else {
|
|
48995
|
-
bounds = { ...currentBounds };
|
|
48996
|
-
}
|
|
48997
|
-
if (!allCommentPositions[threadId]) {
|
|
48998
|
-
allCommentPositions[threadId] = {
|
|
48999
|
-
threadId,
|
|
49000
|
-
start: pos,
|
|
49001
|
-
end: pos + node.nodeSize,
|
|
49002
|
-
bounds
|
|
49003
|
-
};
|
|
49004
|
-
} else {
|
|
49005
|
-
const existing = allCommentPositions[threadId];
|
|
49006
|
-
existing.start = Math.min(existing.start, pos);
|
|
49007
|
-
existing.end = Math.max(existing.end, pos + node.nodeSize);
|
|
49008
|
-
existing.bounds.top = Math.min(existing.bounds.top, currentBounds.top);
|
|
49009
|
-
existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
|
|
49010
|
-
}
|
|
49011
|
-
};
|
|
49012
49072
|
const getActiveCommentId = (doc2, selection) => {
|
|
49013
49073
|
if (!selection) return;
|
|
49014
49074
|
const { $from, $to } = selection;
|
|
@@ -21412,6 +21412,13 @@ function stripHtmlStyles(html) {
|
|
|
21412
21412
|
if (node.nodeType !== window.Node.ELEMENT_NODE) return;
|
|
21413
21413
|
[...node.attributes].forEach((attr) => {
|
|
21414
21414
|
const name = attr.name.toLowerCase();
|
|
21415
|
+
if (name === "style") {
|
|
21416
|
+
const cleanedStyle = cleanStyle(attr.value);
|
|
21417
|
+
if (!cleanedStyle) {
|
|
21418
|
+
node.removeAttribute(attr.name);
|
|
21419
|
+
} else node.setAttribute(attr.name, cleanedStyle);
|
|
21420
|
+
return;
|
|
21421
|
+
}
|
|
21415
21422
|
const shouldKeep = SUPPORTED_ATTRS.includes(name) || name.startsWith("data-");
|
|
21416
21423
|
if (!shouldKeep) {
|
|
21417
21424
|
node.removeAttribute(attr.name);
|
|
@@ -21422,6 +21429,12 @@ function stripHtmlStyles(html) {
|
|
|
21422
21429
|
cleanNode(doc2.body);
|
|
21423
21430
|
return doc2.body.innerHTML;
|
|
21424
21431
|
}
|
|
21432
|
+
function cleanStyle(style2) {
|
|
21433
|
+
if (!style2) return "";
|
|
21434
|
+
const declarations = style2.split(";").map((s) => s.trim()).filter(Boolean);
|
|
21435
|
+
const textAlign = declarations.find((d2) => d2.startsWith("text-align"));
|
|
21436
|
+
return textAlign ? `${textAlign};` : "";
|
|
21437
|
+
}
|
|
21425
21438
|
function createDocFromHTML(content, schema, options = {}) {
|
|
21426
21439
|
const { isImport = false } = options;
|
|
21427
21440
|
let parsedContent;
|
|
@@ -48744,26 +48757,100 @@ const onHeaderFooterDataUpdate = async ({ editor, transaction }, mainEditor, sec
|
|
|
48744
48757
|
const setEditorToolbar = ({ editor }, mainEditor) => {
|
|
48745
48758
|
editor.setToolbar(mainEditor.toolbar);
|
|
48746
48759
|
};
|
|
48760
|
+
const normalizeCommentEventPayload = ({ conversation, editorOptions, fallbackCommentId, fallbackInternal }) => {
|
|
48761
|
+
const { user, documentId } = editorOptions || {};
|
|
48762
|
+
const normalized = {
|
|
48763
|
+
...conversation,
|
|
48764
|
+
commentId: conversation?.commentId ?? fallbackCommentId,
|
|
48765
|
+
isInternal: conversation?.isInternal ?? fallbackInternal
|
|
48766
|
+
};
|
|
48767
|
+
if (!normalized.commentText && normalized.text) {
|
|
48768
|
+
normalized.commentText = normalized.text;
|
|
48769
|
+
delete normalized.text;
|
|
48770
|
+
}
|
|
48771
|
+
if ("skipEmit" in normalized) delete normalized.skipEmit;
|
|
48772
|
+
if (!normalized.creatorName && user?.name) {
|
|
48773
|
+
normalized.creatorName = user.name;
|
|
48774
|
+
}
|
|
48775
|
+
if (!normalized.creatorEmail && user?.email) {
|
|
48776
|
+
normalized.creatorEmail = user.email;
|
|
48777
|
+
}
|
|
48778
|
+
if (!normalized.createdTime) {
|
|
48779
|
+
normalized.createdTime = Date.now();
|
|
48780
|
+
}
|
|
48781
|
+
if (!normalized.fileId && documentId) {
|
|
48782
|
+
normalized.fileId = documentId;
|
|
48783
|
+
}
|
|
48784
|
+
if (!normalized.documentId && documentId) {
|
|
48785
|
+
normalized.documentId = documentId;
|
|
48786
|
+
}
|
|
48787
|
+
return normalized;
|
|
48788
|
+
};
|
|
48789
|
+
const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, node }) => {
|
|
48790
|
+
let bounds = {};
|
|
48791
|
+
if (currentBounds instanceof DOMRect) {
|
|
48792
|
+
bounds = {
|
|
48793
|
+
top: currentBounds.top,
|
|
48794
|
+
bottom: currentBounds.bottom,
|
|
48795
|
+
left: currentBounds.left,
|
|
48796
|
+
right: currentBounds.right
|
|
48797
|
+
};
|
|
48798
|
+
} else {
|
|
48799
|
+
bounds = { ...currentBounds };
|
|
48800
|
+
}
|
|
48801
|
+
if (!allCommentPositions[threadId]) {
|
|
48802
|
+
allCommentPositions[threadId] = {
|
|
48803
|
+
threadId,
|
|
48804
|
+
start: pos,
|
|
48805
|
+
end: pos + node.nodeSize,
|
|
48806
|
+
bounds
|
|
48807
|
+
};
|
|
48808
|
+
} else {
|
|
48809
|
+
const existing = allCommentPositions[threadId];
|
|
48810
|
+
existing.start = Math.min(existing.start, pos);
|
|
48811
|
+
existing.end = Math.max(existing.end, pos + node.nodeSize);
|
|
48812
|
+
existing.bounds.top = Math.min(existing.bounds.top, currentBounds.top);
|
|
48813
|
+
existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
|
|
48814
|
+
}
|
|
48815
|
+
};
|
|
48747
48816
|
const TRACK_CHANGE_MARKS = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
|
|
48748
48817
|
const CommentsPluginKey = new PluginKey("comments");
|
|
48749
48818
|
const CommentsPlugin = Extension.create({
|
|
48750
48819
|
name: "comments",
|
|
48751
48820
|
addCommands() {
|
|
48752
48821
|
return {
|
|
48753
|
-
insertComment: (conversation) => ({ tr, dispatch }) => {
|
|
48822
|
+
insertComment: (conversation = {}) => ({ tr, dispatch }) => {
|
|
48754
48823
|
const { selection } = tr;
|
|
48755
48824
|
const { $from, $to } = selection;
|
|
48756
|
-
const
|
|
48825
|
+
const skipEmit = conversation?.skipEmit;
|
|
48826
|
+
const resolvedCommentId = conversation?.commentId ?? v4();
|
|
48827
|
+
const resolvedInternal = conversation?.isInternal ?? false;
|
|
48757
48828
|
tr.setMeta(CommentsPluginKey, { event: "add" });
|
|
48758
48829
|
tr.addMark(
|
|
48759
48830
|
$from.pos,
|
|
48760
48831
|
$to.pos,
|
|
48761
48832
|
this.editor.schema.marks[CommentMarkName].create({
|
|
48762
|
-
commentId,
|
|
48763
|
-
internal:
|
|
48833
|
+
commentId: resolvedCommentId,
|
|
48834
|
+
internal: resolvedInternal
|
|
48764
48835
|
})
|
|
48765
48836
|
);
|
|
48766
|
-
dispatch(tr);
|
|
48837
|
+
if (dispatch) dispatch(tr);
|
|
48838
|
+
const shouldEmit = !skipEmit && resolvedCommentId !== "pending";
|
|
48839
|
+
if (shouldEmit) {
|
|
48840
|
+
const commentPayload = normalizeCommentEventPayload({
|
|
48841
|
+
conversation,
|
|
48842
|
+
editorOptions: this.editor.options,
|
|
48843
|
+
fallbackCommentId: resolvedCommentId,
|
|
48844
|
+
fallbackInternal: resolvedInternal
|
|
48845
|
+
});
|
|
48846
|
+
const activeCommentId = commentPayload.commentId || commentPayload.importedId || null;
|
|
48847
|
+
const event = {
|
|
48848
|
+
type: comments_module_events.ADD,
|
|
48849
|
+
comment: commentPayload,
|
|
48850
|
+
...activeCommentId && { activeCommentId }
|
|
48851
|
+
};
|
|
48852
|
+
this.editor.emit("commentsUpdate", event);
|
|
48853
|
+
}
|
|
48767
48854
|
return true;
|
|
48768
48855
|
},
|
|
48769
48856
|
removeComment: ({ commentId, importedId }) => ({ tr, dispatch, state: state2 }) => {
|
|
@@ -48999,33 +49086,6 @@ const CommentsPlugin = Extension.create({
|
|
|
48999
49086
|
return [commentsPlugin];
|
|
49000
49087
|
}
|
|
49001
49088
|
});
|
|
49002
|
-
const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, node }) => {
|
|
49003
|
-
let bounds = {};
|
|
49004
|
-
if (currentBounds instanceof DOMRect) {
|
|
49005
|
-
bounds = {
|
|
49006
|
-
top: currentBounds.top,
|
|
49007
|
-
bottom: currentBounds.bottom,
|
|
49008
|
-
left: currentBounds.left,
|
|
49009
|
-
right: currentBounds.right
|
|
49010
|
-
};
|
|
49011
|
-
} else {
|
|
49012
|
-
bounds = { ...currentBounds };
|
|
49013
|
-
}
|
|
49014
|
-
if (!allCommentPositions[threadId]) {
|
|
49015
|
-
allCommentPositions[threadId] = {
|
|
49016
|
-
threadId,
|
|
49017
|
-
start: pos,
|
|
49018
|
-
end: pos + node.nodeSize,
|
|
49019
|
-
bounds
|
|
49020
|
-
};
|
|
49021
|
-
} else {
|
|
49022
|
-
const existing = allCommentPositions[threadId];
|
|
49023
|
-
existing.start = Math.min(existing.start, pos);
|
|
49024
|
-
existing.end = Math.max(existing.end, pos + node.nodeSize);
|
|
49025
|
-
existing.bounds.top = Math.min(existing.bounds.top, currentBounds.top);
|
|
49026
|
-
existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
|
|
49027
|
-
}
|
|
49028
|
-
};
|
|
49029
49089
|
const getActiveCommentId = (doc2, selection) => {
|
|
49030
49090
|
if (!selection) return;
|
|
49031
49091
|
const { $from, $to } = selection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN,MAAM;;;;YACN,MAAM,GAAG,IAAI;;;;;;;;;cAKb,OAAO;;;;iBACP,MAAM;;;;eACN,MAAM;;;;sBACN,MAAM;;;;;;SAKN,MAAM;;;;UACN,MAAM;;;;WACN,IAAI,GAAG,IAAI,GAAG,IAAI;;;;WAClB,MAAM;;;;UACN,MAAM;;;;gBACN,OAAO;;;;WACP,OAAO,KAAK,EAAE,GAAG;;;;eACjB,OAAO,sBAAsB,EAAE,kBAAkB;;;;;;;;;;SAO5D;QAAuB,MAAM,GAAlB,MAAM;QACM,QAAQ,GAApB,MAAM;KACjB;;;;;;;;;;;;gBAGA;QAA6B,WAAW;QACR,YAAY;QACb,mBAAmB,GAAvC,OAAO;KACpB;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN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I;;;;8BACzC,CAAC,MAAM,EAAE,EAAE,KAAC,GAAA;;;;aACZ,MAAM;;;;uBACN,KAAQ;;;;iBACR,OAAO;;;;YACP,MAAM;;;;oBACN,KAAQ;;;;eACR,OAAO;;;;wBACP,CAAS,IAAI,EAAJ,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC;;;;eAC/B,IAAI;;;;aACJ,OAAO;;;;gCACP,OAAO;;;;;;;;yBAEP,OAAO;;;;WACP,MAAM;;;;eACN,MAAM;;;;cACN,OAAO"}
|
|
@@ -61,7 +61,7 @@ export const useCommentsStore: import("pinia").StoreDefinition<"comments", Pick<
|
|
|
61
61
|
parentCommentId: string;
|
|
62
62
|
}) => any;
|
|
63
63
|
showAddComment: (superdoc: any) => void;
|
|
64
|
-
addComment: ({ superdoc, comment }: {
|
|
64
|
+
addComment: ({ superdoc, comment, skipEditorUpdate }: {
|
|
65
65
|
superdoc: any;
|
|
66
66
|
}) => void;
|
|
67
67
|
cancelComment: (superdoc: any) => void;
|
|
@@ -143,7 +143,7 @@ export const useCommentsStore: import("pinia").StoreDefinition<"comments", Pick<
|
|
|
143
143
|
parentCommentId: string;
|
|
144
144
|
}) => any;
|
|
145
145
|
showAddComment: (superdoc: any) => void;
|
|
146
|
-
addComment: ({ superdoc, comment }: {
|
|
146
|
+
addComment: ({ superdoc, comment, skipEditorUpdate }: {
|
|
147
147
|
superdoc: any;
|
|
148
148
|
}) => void;
|
|
149
149
|
cancelComment: (superdoc: any) => void;
|
|
@@ -225,7 +225,7 @@ export const useCommentsStore: import("pinia").StoreDefinition<"comments", Pick<
|
|
|
225
225
|
parentCommentId: string;
|
|
226
226
|
}) => any;
|
|
227
227
|
showAddComment: (superdoc: any) => void;
|
|
228
|
-
addComment: ({ superdoc, comment }: {
|
|
228
|
+
addComment: ({ superdoc, comment, skipEditorUpdate }: {
|
|
229
229
|
superdoc: any;
|
|
230
230
|
}) => void;
|
|
231
231
|
cancelComment: (superdoc: any) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA4Ce,IAAI;qBAiBN,MAAM;0CAWN,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;
|
|
1
|
+
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA4Ce,IAAI;qBAiBN,MAAM;0CAWN,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;gFA4Ld;QAAuB,SAAS;QACT,UAAU;QACV,eAAe;KACtC;;0DAoDA;QAAuB,QAAQ;KAC/B,KAAU,IAAI;sCAyEJ,IAAI;;;;;6CAzFJ,IAAI;4EAsGd;QAAsB,QAAQ;QACP,UAAU;KACjC,KAAU,IAAI;;+DAuHJ,IAAI;sDA3ad;QAAuB,QAAQ;QACR,MAAM;KAC7B,KAAU,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAvDJ,IAAI;qBAiBN,MAAM;0CAWN,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;gFA4Ld;QAAuB,SAAS;QACT,UAAU;QACV,eAAe;KACtC;;0DAoDA;QAAuB,QAAQ;KAC/B,KAAU,IAAI;sCAyEJ,IAAI;;;;;6CAzFJ,IAAI;4EAsGd;QAAsB,QAAQ;QACP,UAAU;KACjC,KAAU,IAAI;;+DAuHJ,IAAI;sDA3ad;QAAuB,QAAQ;QACR,MAAM;KAC7B,KAAU,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAvDJ,IAAI;qBAiBN,MAAM;0CAWN,MAAM,GAAG,SAAS,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