@manuscripts/article-editor 3.3.1-LEAN-4052.0 → 3.3.2-LEAN-3958.1
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/cjs/components/comments/CommentBody.js +2 -1
- package/dist/cjs/components/comments/CommentBody.js.map +1 -1
- package/dist/cjs/components/track-changes/suggestion-list/SnippetContent.js +72 -0
- package/dist/cjs/components/track-changes/suggestion-list/SnippetContent.js.map +1 -0
- package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js +3 -3
- package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
- package/dist/cjs/components/track-changes/suggestion-list/SuggestionSnippet.js +26 -118
- package/dist/cjs/components/track-changes/suggestion-list/SuggestionSnippet.js.map +1 -1
- package/dist/cjs/lib/change-handlers.js +123 -0
- package/dist/cjs/lib/change-handlers.js.map +1 -0
- package/dist/cjs/lib/fonts.js +3 -0
- package/dist/cjs/lib/fonts.js.map +1 -1
- package/dist/cjs/lib/node-content-retriever.js +130 -0
- package/dist/cjs/lib/node-content-retriever.js.map +1 -0
- package/dist/cjs/lib/tracking.js +3 -0
- package/dist/cjs/lib/tracking.js.map +1 -1
- package/dist/cjs/lib/utils.js +17 -28
- package/dist/cjs/lib/utils.js.map +1 -1
- package/dist/es/components/comments/CommentBody.js +2 -1
- package/dist/es/components/comments/CommentBody.js.map +1 -1
- package/dist/es/components/track-changes/suggestion-list/SnippetContent.js +44 -0
- package/dist/es/components/track-changes/suggestion-list/SnippetContent.js.map +1 -0
- package/dist/es/components/track-changes/suggestion-list/Suggestion.js +3 -3
- package/dist/es/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
- package/dist/es/components/track-changes/suggestion-list/SuggestionSnippet.js +27 -119
- package/dist/es/components/track-changes/suggestion-list/SuggestionSnippet.js.map +1 -1
- package/dist/es/lib/change-handlers.js +117 -0
- package/dist/es/lib/change-handlers.js.map +1 -0
- package/dist/es/lib/fonts.js +3 -0
- package/dist/es/lib/fonts.js.map +1 -1
- package/dist/es/lib/node-content-retriever.js +123 -0
- package/dist/es/lib/node-content-retriever.js.map +1 -0
- package/dist/es/lib/tracking.js +3 -0
- package/dist/es/lib/tracking.js.map +1 -1
- package/dist/es/lib/utils.js +15 -25
- package/dist/es/lib/utils.js.map +1 -1
- package/dist/types/{lib/footnotes.d.ts → components/track-changes/suggestion-list/SnippetContent.d.ts} +8 -5
- package/dist/types/lib/change-handlers.d.ts +22 -0
- package/dist/types/lib/fonts.d.ts +3 -0
- package/dist/types/lib/node-content-retriever.d.ts +37 -0
- package/dist/types/lib/utils.d.ts +2 -8
- package/package.json +3 -3
- package/dist/cjs/lib/footnotes.js +0 -49
- package/dist/cjs/lib/footnotes.js.map +0 -1
- package/dist/es/lib/footnotes.js +0 -43
- package/dist/es/lib/footnotes.js.map +0 -1
@@ -30,6 +30,7 @@ exports.CommentBody = void 0;
|
|
30
30
|
const style_guide_1 = require("@manuscripts/style-guide");
|
31
31
|
const react_1 = __importStar(require("react"));
|
32
32
|
const styled_components_1 = __importDefault(require("styled-components"));
|
33
|
+
const utils_1 = require("../../lib/utils");
|
33
34
|
const CommentContent = styled_components_1.default.div `
|
34
35
|
cursor: pointer;
|
35
36
|
`;
|
@@ -94,7 +95,7 @@ const CommentBody = ({ comment, isEditing, onSave, onCancel, onSelect, }) => {
|
|
94
95
|
react_1.default.createElement(style_guide_1.SecondaryButton, { onClick: onCancel }, "Cancel"),
|
95
96
|
react_1.default.createElement(style_guide_1.PrimaryButton, { onClick: handleSave, disabled: disableSaveButton }, "Save")))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
96
97
|
react_1.default.createElement(CommentContent, { onClick: onSelect },
|
97
|
-
react_1.default.createElement(CommentViewer, { "data-cy": "comment-text" }, comment.node.attrs.contents))))));
|
98
|
+
react_1.default.createElement(CommentViewer, { "data-cy": "comment-text" }, (0, utils_1.decodeHTMLEntities)(comment.node.attrs.contents)))))));
|
98
99
|
};
|
99
100
|
exports.CommentBody = CommentBody;
|
100
101
|
//# sourceMappingURL=CommentBody.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CommentBody.js","sourceRoot":"","sources":["../../../../src/components/comments/CommentBody.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,0DAIiC;AACjC,+CAMc;AACd,0EAAsC;AAEtC,MAAM,cAAc,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAEhC,CAAA;AAED,MAAM,aAAa,GAAG,2BAAM,CAAC,QAAQ,CAAA;;iBAEpB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI;WAC7C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;YACzC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;CAoB/C,CAAA;AAED,MAAM,aAAa,GAAG,2BAAM,CAAC,GAAG,CAAA;;;iBAGf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI;;;WAG7C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;YACzC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CAC/C,CAAA;AAED,MAAM,aAAa,GAAG,IAAA,2BAAM,EAAC,yBAAW,CAAC,CAAA;;;;CAIxC,CAAA;AAUM,MAAM,WAAW,GAA+B,CAAC,EACtD,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,IAAA,cAAM,EAA6B,IAAI,CA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AAQ,aAA0B;YAC5D,8BAAC,2BAAa,IAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,WAE/C,CACF,CACf,CACJ,CAAC,CAAC,CAAC,CACF;QACE,8BAAC,cAAc,IAAC,OAAO,EAAE,QAAQ;YAC/B,8BAAC,aAAa,eAAS,cAAc,IAClC,IAAA,0BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAClC,CACD,CAChB,CACJ,CACA,CACJ,CAAA;AACH,CAAC,CAAA;AA3DY,QAAA,WAAW,eA2DvB"}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*!
|
3
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
4
|
+
*
|
5
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
6
|
+
*
|
7
|
+
* The Original Code is manuscripts-frontend.
|
8
|
+
*
|
9
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
10
|
+
*
|
11
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
12
|
+
*/
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
14
|
+
if (k2 === undefined) k2 = k;
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
18
|
+
}
|
19
|
+
Object.defineProperty(o, k2, desc);
|
20
|
+
}) : (function(o, m, k, k2) {
|
21
|
+
if (k2 === undefined) k2 = k;
|
22
|
+
o[k2] = m[k];
|
23
|
+
}));
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
26
|
+
}) : function(o, v) {
|
27
|
+
o["default"] = v;
|
28
|
+
});
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
30
|
+
if (mod && mod.__esModule) return mod;
|
31
|
+
var result = {};
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
33
|
+
__setModuleDefault(result, mod);
|
34
|
+
return result;
|
35
|
+
};
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
38
|
+
};
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
40
|
+
const body_editor_1 = require("@manuscripts/body-editor");
|
41
|
+
const dompurify_1 = __importDefault(require("dompurify"));
|
42
|
+
const react_1 = __importStar(require("react"));
|
43
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
44
|
+
const SnippetContent = ({ content, isEquation }) => {
|
45
|
+
const contentRef = (0, react_1.useRef)(null);
|
46
|
+
(0, react_1.useEffect)(() => {
|
47
|
+
if (contentRef.current && content) {
|
48
|
+
contentRef.current.innerHTML = dompurify_1.default.sanitize(': ' + content) || '';
|
49
|
+
if (isEquation) {
|
50
|
+
(0, body_editor_1.renderMath)(contentRef.current);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}, [content, isEquation]);
|
54
|
+
return react_1.default.createElement(StyledContent, { ref: contentRef, "data-mathjax": isEquation });
|
55
|
+
};
|
56
|
+
exports.default = SnippetContent;
|
57
|
+
const StyledContent = styled_components_1.default.span `
|
58
|
+
color: #353535;
|
59
|
+
font-family: Lato, sans-serif;
|
60
|
+
font-size: 12px;
|
61
|
+
font-weight: 400;
|
62
|
+
line-height: 16px;
|
63
|
+
|
64
|
+
&[data-mathjax='true'] {
|
65
|
+
text-overflow: unset;
|
66
|
+
}
|
67
|
+
|
68
|
+
.inspector-list-item::after {
|
69
|
+
content: '...';
|
70
|
+
}
|
71
|
+
`;
|
72
|
+
//# sourceMappingURL=SnippetContent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SnippetContent.js","sourceRoot":"","sources":["../../../../../src/components/track-changes/suggestion-list/SnippetContent.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAAqD;AACrD,0DAA8B;AAC9B,+CAAgD;AAChD,0EAAsC;AAOtC,MAAM,cAAc,GAA2B,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;IACzE,MAAM,UAAU,GAAG,IAAA,cAAM,EAAkB,IAAI,CAAC,CAAA;IAEhD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,IAAI,OAAO,EAAE;YACjC,UAAU,CAAC,OAAO,CAAC,SAAS,GAAG,mBAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;YACpE,IAAI,UAAU,EAAE;gBACd,IAAA,wBAAU,EAAC,UAAU,CAAC,OAAO,CAAC,CAAA;aAC/B;SACF;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAA;IAEzB,OAAO,8BAAC,aAAa,IAAC,GAAG,EAAE,UAAU,kBAAgB,UAAU,GAAI,CAAA;AACrE,CAAC,CAAA;AAED,kBAAe,cAAc,CAAA;AAE7B,MAAM,aAAa,GAAG,2BAAM,CAAC,IAAI,CAAA;;;;;;;;;;;;;;CAchC,CAAA"}
|
@@ -81,8 +81,7 @@ const Wrapper = styled_components_1.default.li `
|
|
81
81
|
justify-content: space-between;
|
82
82
|
align-items: center;
|
83
83
|
gap: ${(props) => props.theme.grid.unit * 4}px;
|
84
|
-
padding:
|
85
|
-
${(props) => props.theme.grid.unit * 2}px !important;
|
84
|
+
padding: 6px 8px;
|
86
85
|
min-height: 28px;
|
87
86
|
margin-bottom: 6px;
|
88
87
|
border: ${(props) => props.isFocused
|
@@ -93,7 +92,8 @@ const Wrapper = styled_components_1.default.li `
|
|
93
92
|
: `none`};
|
94
93
|
list-style-type: none;
|
95
94
|
font-size: ${(props) => props.theme.font.size.small};
|
96
|
-
|
95
|
+
border-radius: 4px;
|
96
|
+
max-height: 40px;
|
97
97
|
/* FocusHandle should cover entire card: */
|
98
98
|
position: relative;
|
99
99
|
color: ${(props) => props.theme.colors.text.primary};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Suggestion.js","sourceRoot":"","sources":["../../../../../src/components/track-changes/suggestion-list/Suggestion.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,+CAA0D;AAC1D,0EAAsC;AAEtC,+DAAsC;AACtC,4EAAmD;AACnD,2DAAuD;AAEvD,MAAM,cAAc,GAAG,CAAC,OAAoB,EAAE,EAAE;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAA;IAC5C,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,EAAE;QACtD,OAAO,CAAC,cAAc,EAAE,CAAA;KACzB;AACH,CAAC,CAAA;AAUM,MAAM,UAAU,GAAoB,CAAC,EAC1C,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,IAAA,cAAM,EAAgB,IAAI,CAAC,CAAA;IAC9C,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IAE5D,MAAM,WAAW,GAAG,CAAC,CAAmB,EAAE,EAAE;QAC1C,CAAC,CAAC,cAAc,EAAE,CAAA;QAClB,eAAe,CAAC,IAAI,CAAC,CAAA;QACrB,IAAI,QAAQ,EAAE;YACZ,QAAQ,EAAE,CAAA;SACX;IACH,CAAC,CAAA;IAED,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,UAAU,IAAI,UAAU,CAAC,OAAO,EAAE;YACpC,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;SACnC;IACH,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;IAEhB,OAAO,CACL,8BAAC,OAAO,eAAS,YAAY,EAAC,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU;QAClE,8BAAC,WAAW,IAAC,IAAI,EAAC,GAAG,EAAC,OAAO,EAAE,WAAW;YACxC,8BAAC,qCAAiB,IAAC,UAAU,EAAE,UAAU,GAAI,CACjC;QAEd,8BAAC,OAAO;YACN,8BAAC,2BAAiB,IAChB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,QAAQ,EACtB,YAAY,EAAE,QAAQ,GACtB,CACM;QAET,iBAAiB,IAAI,CACpB,8BAAC,oBAAU,IACT,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,EAAE,UAAU,CAAC,EAAE,EACvB,UAAU,EAAE,eAAe,GACf,CACf,CACO,CACX,CAAA;AACH,CAAC,CAAA;AAhDY,QAAA,UAAU,cAgDtB;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAEzB,CAAA;AAED,MAAM,OAAO,GAAG,2BAAM,CAAC,EAAE,CAEvB;;;;;SAKO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC
|
1
|
+
{"version":3,"file":"Suggestion.js","sourceRoot":"","sources":["../../../../../src/components/track-changes/suggestion-list/Suggestion.tsx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CACtB,KAAK,CAAC,SAAS;IACb,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,aAAa;IAC9D,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO;;IAEjD,CAAC,KAAK,EAAE,EAAE,CACV,KAAK,CAAC,SAAS;IACb,CAAC,CAAC,GAAG,OAAO;;QAEV;IACF,CAAC,CAAC,EAAE;;;kBAGQ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK;;MAElE,OAAO;;;;CAIZ,CAAA;AAED,MAAM,WAAW,GAAG,2BAAM,CAAC,CAAC,CAAA;;SAEnB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;;;;;;;CAO5C,CAAA"}
|
@@ -39,128 +39,40 @@ exports.SuggestionSnippet = void 0;
|
|
39
39
|
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
40
40
|
*/
|
41
41
|
const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
|
42
|
-
const transform_1 = require("@manuscripts/transform");
|
43
|
-
const html_react_parser_1 = __importDefault(require("html-react-parser"));
|
44
42
|
const react_1 = __importStar(require("react"));
|
45
43
|
const styled_components_1 = __importDefault(require("styled-components"));
|
46
|
-
const
|
47
|
-
const tracking_1 = require("../../../lib/tracking");
|
48
|
-
const utils_1 = require("../../../lib/utils");
|
44
|
+
const change_handlers_1 = require("../../../lib/change-handlers");
|
49
45
|
const store_1 = require("../../../store");
|
46
|
+
const SnippetContent_1 = __importDefault(require("./SnippetContent"));
|
50
47
|
const SuggestionSnippet = ({ suggestion, }) => {
|
51
48
|
const [{ doc, view }] = (0, store_1.useStore)((store) => ({
|
52
49
|
view: store.view,
|
53
50
|
doc: store.doc,
|
54
51
|
}));
|
55
52
|
const [snippet, setSnippet] = (0, react_1.useState)(null);
|
56
|
-
const [message, setMessage] = (0, react_1.useState)('');
|
57
53
|
const { dataTracked } = suggestion;
|
58
54
|
(0, react_1.useEffect)(() => {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
};
|
71
|
-
}
|
72
|
-
else {
|
73
|
-
return { snippet: null, message: suggestion.text };
|
74
|
-
}
|
75
|
-
}
|
76
|
-
if (track_changes_plugin_1.ChangeSet.isNodeChange(suggestion) && view) {
|
77
|
-
if (suggestion.node.type === transform_1.schema.nodes.inline_footnote) {
|
78
|
-
return {
|
79
|
-
snippet: {
|
80
|
-
operation: (0, tracking_1.changeOperationAlias)(dataTracked.operation),
|
81
|
-
nodeName: suggestion.node.type.spec.name,
|
82
|
-
content: (0, footnotes_1.getInlineFootnoteContent)(doc, suggestion.attrs),
|
83
|
-
},
|
84
|
-
message: '',
|
85
|
-
};
|
86
|
-
}
|
87
|
-
else if (suggestion.node.type === transform_1.schema.nodes.footnote) {
|
88
|
-
return {
|
89
|
-
snippet: {
|
90
|
-
operation: (0, tracking_1.changeOperationAlias)(dataTracked.operation),
|
91
|
-
nodeName: suggestion.node.type.name,
|
92
|
-
content: (0, footnotes_1.getFootnoteText)(view.state, suggestion.node),
|
93
|
-
},
|
94
|
-
message: '',
|
95
|
-
};
|
96
|
-
}
|
97
|
-
else if (suggestion.dataTracked.operation === track_changes_plugin_1.CHANGE_OPERATION.node_split) {
|
98
|
-
return {
|
99
|
-
snippet: null,
|
100
|
-
message: `Split ${suggestion.node.type.name}`,
|
101
|
-
};
|
102
|
-
}
|
103
|
-
else if (suggestion.dataTracked.operation === track_changes_plugin_1.CHANGE_OPERATION.wrap_with_node) {
|
104
|
-
return {
|
105
|
-
snippet: null,
|
106
|
-
message: `${suggestion.node.type.name
|
107
|
-
.charAt(0)
|
108
|
-
.toUpperCase()}${suggestion.node.type.name.slice(1)} insert`,
|
109
|
-
};
|
110
|
-
}
|
111
|
-
else {
|
112
|
-
return {
|
113
|
-
snippet: null,
|
114
|
-
message: `${suggestion.node.type.name
|
115
|
-
.charAt(0)
|
116
|
-
.toUpperCase()}${suggestion.node.type.name.slice(1)} ${dataTracked.operation}`,
|
117
|
-
};
|
118
|
-
}
|
119
|
-
}
|
120
|
-
if (track_changes_plugin_1.ChangeSet.isNodeAttrChange(suggestion) && view) {
|
121
|
-
if (suggestion.node.type === transform_1.schema.nodes.inline_footnote) {
|
122
|
-
return {
|
123
|
-
snippet: {
|
124
|
-
operation: (0, tracking_1.changeOperationAlias)(dataTracked.operation),
|
125
|
-
nodeName: suggestion.node.type.spec.name,
|
126
|
-
content: (0, footnotes_1.getInlineFootnoteContent)(doc, suggestion.newAttrs),
|
127
|
-
},
|
128
|
-
message: '',
|
129
|
-
};
|
130
|
-
}
|
131
|
-
else if (suggestion.node.type === transform_1.schema.nodes.footnote) {
|
132
|
-
return {
|
133
|
-
snippet: {
|
134
|
-
operation: (0, tracking_1.changeOperationAlias)(dataTracked.operation),
|
135
|
-
nodeName: suggestion.node.type.name,
|
136
|
-
content: (0, footnotes_1.getFootnoteText)(view.state, suggestion.node),
|
137
|
-
},
|
138
|
-
message: '',
|
139
|
-
};
|
140
|
-
}
|
141
|
-
else {
|
142
|
-
return {
|
143
|
-
snippet: null,
|
144
|
-
message: `${suggestion.node.type.name
|
145
|
-
.charAt(0)
|
146
|
-
.toUpperCase()}${suggestion.node.type.name.slice(1)} ${dataTracked.operation}`,
|
147
|
-
};
|
148
|
-
}
|
149
|
-
}
|
150
|
-
return { snippet: null, message: 'Unknown change!' };
|
151
|
-
};
|
152
|
-
const { snippet: newSnippet, message: newMessage } = getSnippetData();
|
55
|
+
let newSnippet = null;
|
56
|
+
if (track_changes_plugin_1.ChangeSet.isTextChange(suggestion)) {
|
57
|
+
newSnippet = (0, change_handlers_1.handleTextChange)(suggestion, view, dataTracked);
|
58
|
+
}
|
59
|
+
else if (track_changes_plugin_1.ChangeSet.isNodeChange(suggestion) ||
|
60
|
+
track_changes_plugin_1.ChangeSet.isNodeAttrChange(suggestion)) {
|
61
|
+
newSnippet = (0, change_handlers_1.handleNodeChange)(suggestion, view, doc, dataTracked);
|
62
|
+
}
|
63
|
+
else {
|
64
|
+
newSnippet = (0, change_handlers_1.handleUnknownChange)();
|
65
|
+
}
|
153
66
|
setSnippet(newSnippet);
|
154
|
-
|
155
|
-
}, [suggestion, doc
|
156
|
-
return (react_1.default.createElement(SnippetText,
|
157
|
-
react_1.default.createElement(
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
snippet
|
162
|
-
|
163
|
-
react_1.default.createElement(Content, null, (0, html_react_parser_1.default)(snippet.content)))) : dataTracked.operation === track_changes_plugin_1.CHANGE_OPERATION.delete ? (react_1.default.createElement("del", null, message)) : (message)));
|
67
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
68
|
+
}, [suggestion, doc]);
|
69
|
+
return (react_1.default.createElement(SnippetText, { "data-mathjax": snippet?.isEquation },
|
70
|
+
react_1.default.createElement(react_1.default.Fragment, null,
|
71
|
+
react_1.default.createElement(Operation, { color: dataTracked.operation },
|
72
|
+
snippet?.operation,
|
73
|
+
":"),
|
74
|
+
react_1.default.createElement(NodeName, null, snippet?.nodeName),
|
75
|
+
react_1.default.createElement(SnippetContent_1.default, { content: snippet?.content || '', isEquation: snippet?.isEquation }))));
|
164
76
|
};
|
165
77
|
exports.SuggestionSnippet = SuggestionSnippet;
|
166
78
|
const SnippetText = styled_components_1.default.div `
|
@@ -172,6 +84,9 @@ const SnippetText = styled_components_1.default.div `
|
|
172
84
|
color: ${(props) => props.theme.colors.text.primary};
|
173
85
|
display: block;
|
174
86
|
text-overflow: ellipsis;
|
87
|
+
&[data-mathjax='true'] {
|
88
|
+
text-overflow: unset;
|
89
|
+
}
|
175
90
|
`;
|
176
91
|
const Operation = styled_components_1.default.span `
|
177
92
|
font-family: Lato, sans-serif;
|
@@ -183,6 +98,7 @@ const Operation = styled_components_1.default.span `
|
|
183
98
|
color: ${(props) => {
|
184
99
|
switch (props.color) {
|
185
100
|
case 'insert':
|
101
|
+
case 'wrap_with_node':
|
186
102
|
return '#01872E';
|
187
103
|
case 'delete':
|
188
104
|
return '#F35143';
|
@@ -200,13 +116,5 @@ const NodeName = styled_components_1.default.span `
|
|
200
116
|
font-size: 12px;
|
201
117
|
font-weight: bold;
|
202
118
|
line-height: 16px;
|
203
|
-
margin-right: 3.2px;
|
204
|
-
`;
|
205
|
-
const Content = styled_components_1.default.span `
|
206
|
-
color: #353535;
|
207
|
-
font-family: Lato, sans-serif;
|
208
|
-
font-size: 12px;
|
209
|
-
font-weight: 400;
|
210
|
-
line-height: 16px;
|
211
119
|
`;
|
212
120
|
//# sourceMappingURL=SuggestionSnippet.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SuggestionSnippet.js","sourceRoot":"","sources":["../../../../../src/components/track-changes/suggestion-list/SuggestionSnippet.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,
|
1
|
+
{"version":3,"file":"SuggestionSnippet.js","sourceRoot":"","sources":["../../../../../src/components/track-changes/suggestion-list/SuggestionSnippet.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,4EAA4E;AAC5E,+CAAkD;AAClD,0EAAsC;AAEtC,kEAIqC;AACrC,0CAAyC;AACzC,sEAA6C;AAStC,MAAM,iBAAiB,GAA4C,CAAC,EACzE,UAAU,GACX,EAAE,EAAE;IACH,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC3C,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,GA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K,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;iBACpC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM;;;;WAInD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;;;;;;CAMpD,CAAA;AAED,MAAM,SAAS,GAAG,2BAAM,CAAC,IAAI,CAAmB;;;;;;;WAOrC,CAAC,KAAK,EAAE,EAAE;IACjB,QAAQ,KAAK,CAAC,KAAK,EAAE;QACnB,KAAK,QAAQ,CAAC;QACd,KAAK,gBAAgB;YACnB,OAAO,SAAS,CAAA;QAClB,KAAK,QAAQ;YACX,OAAO,SAAS,CAAA;QAClB,KAAK,WAAW;YACd,OAAO,SAAS,CAAA;QAClB;YACE,OAAO,SAAS,CAAA;KACnB;AACH,CAAC;CACF,CAAA;AAED,MAAM,QAAQ,GAAG,2BAAM,CAAC,IAAI,CAAA;;;;;;;CAO3B,CAAA"}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.handleUnknownChange = exports.handleNodeChange = exports.handleTextChange = void 0;
|
4
|
+
const transform_1 = require("@manuscripts/transform");
|
5
|
+
const node_content_retriever_1 = require("./node-content-retriever");
|
6
|
+
const tracking_1 = require("./tracking");
|
7
|
+
const utils_1 = require("./utils");
|
8
|
+
const handleTextChange = (suggestion, view, dataTracked) => {
|
9
|
+
const parentNodeType = (0, utils_1.getParentNode)(view.state, suggestion.from)?.type;
|
10
|
+
let nodeName;
|
11
|
+
if (parentNodeType) {
|
12
|
+
const parentNodeName = transform_1.nodeNames.get(parentNodeType) || parentNodeType?.name;
|
13
|
+
nodeName =
|
14
|
+
parentNodeType === transform_1.schema.nodes.paragraph
|
15
|
+
? 'text'
|
16
|
+
: parentNodeName + ' text';
|
17
|
+
}
|
18
|
+
return {
|
19
|
+
operation: (0, tracking_1.changeOperationAlias)(dataTracked.operation),
|
20
|
+
nodeName: nodeName || suggestion.nodeType.name,
|
21
|
+
content: suggestion.text,
|
22
|
+
};
|
23
|
+
};
|
24
|
+
exports.handleTextChange = handleTextChange;
|
25
|
+
const handleNodeChange = (suggestion, view, doc, dataTracked) => {
|
26
|
+
const nodeContentRetriever = new node_content_retriever_1.NodeTextContentRetriever(view.state);
|
27
|
+
const { node } = suggestion;
|
28
|
+
const operation = (0, tracking_1.changeOperationAlias)(dataTracked.operation);
|
29
|
+
const nodeName = transform_1.nodeNames.get(node.type) || node.type.name;
|
30
|
+
switch (node.type) {
|
31
|
+
case transform_1.schema.nodes.inline_footnote: {
|
32
|
+
return {
|
33
|
+
operation,
|
34
|
+
nodeName,
|
35
|
+
content: nodeContentRetriever.getInlineFootnoteContent(doc, node.attrs),
|
36
|
+
};
|
37
|
+
}
|
38
|
+
case transform_1.schema.nodes.footnote: {
|
39
|
+
return {
|
40
|
+
operation,
|
41
|
+
nodeName,
|
42
|
+
content: nodeContentRetriever.getFootnoteContent(node),
|
43
|
+
};
|
44
|
+
}
|
45
|
+
case transform_1.schema.nodes.contributor: {
|
46
|
+
const contributorTextContent = `${node.attrs.bibliographicName.given} ${node.attrs.bibliographicName.family}`;
|
47
|
+
return {
|
48
|
+
operation,
|
49
|
+
nodeName,
|
50
|
+
content: contributorTextContent,
|
51
|
+
};
|
52
|
+
}
|
53
|
+
case transform_1.schema.nodes.affiliation: {
|
54
|
+
const affiliationTextContent = node.attrs.institution;
|
55
|
+
return {
|
56
|
+
operation,
|
57
|
+
nodeName,
|
58
|
+
content: affiliationTextContent,
|
59
|
+
};
|
60
|
+
}
|
61
|
+
case transform_1.schema.nodes.citation: {
|
62
|
+
return {
|
63
|
+
operation,
|
64
|
+
nodeName,
|
65
|
+
content: nodeContentRetriever.getContentFromBibliography(node.attrs.id, node),
|
66
|
+
};
|
67
|
+
}
|
68
|
+
case transform_1.schema.nodes.bibliography_item: {
|
69
|
+
return {
|
70
|
+
operation,
|
71
|
+
nodeName,
|
72
|
+
content: nodeContentRetriever.getContentFromBibliography(node.attrs.id, node),
|
73
|
+
};
|
74
|
+
}
|
75
|
+
case transform_1.schema.nodes.figure_element:
|
76
|
+
case transform_1.schema.nodes.table_element:
|
77
|
+
return {
|
78
|
+
operation,
|
79
|
+
nodeName,
|
80
|
+
content: nodeContentRetriever.getFigureLabel(node),
|
81
|
+
};
|
82
|
+
case transform_1.schema.nodes.inline_equation:
|
83
|
+
case transform_1.schema.nodes.equation_element:
|
84
|
+
return {
|
85
|
+
operation,
|
86
|
+
nodeName,
|
87
|
+
content: nodeContentRetriever.getEquationContent(node),
|
88
|
+
isEquation: true,
|
89
|
+
};
|
90
|
+
case transform_1.schema.nodes.section: {
|
91
|
+
const nodeName = node.attrs.category === 'MPSectionCategory:subsection'
|
92
|
+
? 'Subsection'
|
93
|
+
: 'Section';
|
94
|
+
return {
|
95
|
+
operation,
|
96
|
+
nodeName,
|
97
|
+
content: nodeContentRetriever.getFirstChildContent(node),
|
98
|
+
};
|
99
|
+
}
|
100
|
+
case transform_1.schema.nodes.list:
|
101
|
+
return {
|
102
|
+
operation,
|
103
|
+
nodeName,
|
104
|
+
content: `<span class="inspector-list-item">${nodeContentRetriever.getFirstChildContent(node)}</span>`,
|
105
|
+
};
|
106
|
+
default:
|
107
|
+
return {
|
108
|
+
operation,
|
109
|
+
nodeName,
|
110
|
+
content: nodeContentRetriever.getNodeTextContent(node),
|
111
|
+
};
|
112
|
+
}
|
113
|
+
};
|
114
|
+
exports.handleNodeChange = handleNodeChange;
|
115
|
+
const handleUnknownChange = () => {
|
116
|
+
return {
|
117
|
+
operation: '',
|
118
|
+
nodeName: '',
|
119
|
+
content: 'Unknown change!',
|
120
|
+
};
|
121
|
+
};
|
122
|
+
exports.handleUnknownChange = handleUnknownChange;
|
123
|
+
//# sourceMappingURL=change-handlers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"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H,CAAC,CAAA;AANY,QAAA,mBAAmB,uBAM/B"}
|
package/dist/cjs/lib/fonts.js
CHANGED
@@ -14,4 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
require("@fontsource/lato");
|
15
15
|
require("@fontsource/pt-sans");
|
16
16
|
require("@fontsource/pt-serif");
|
17
|
+
require("@fontsource/lato/300.css");
|
18
|
+
require("@fontsource/lato/400.css");
|
19
|
+
require("@fontsource/lato/700.css");
|
17
20
|
//# sourceMappingURL=fonts.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/lib/fonts.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAEH,4BAAyB;AACzB,+BAA4B;AAC5B,gCAA6B"}
|
1
|
+
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/lib/fonts.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAEH,4BAAyB;AACzB,+BAA4B;AAC5B,gCAA6B;AAC7B,oCAAiC;AACjC,oCAAiC;AACjC,oCAAiC"}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.NodeTextContentRetriever = void 0;
|
7
|
+
/*!
|
8
|
+
* The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
9
|
+
*
|
10
|
+
* Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
11
|
+
*
|
12
|
+
* The Original Code is manuscripts-frontend.
|
13
|
+
*
|
14
|
+
* The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
|
15
|
+
*
|
16
|
+
* All portions of the code written by Atypon Systems LLC are Copyright (c) 2024 Atypon Systems LLC. All Rights Reserved.
|
17
|
+
*/
|
18
|
+
const body_editor_1 = require("@manuscripts/body-editor");
|
19
|
+
const transform_1 = require("@manuscripts/transform");
|
20
|
+
const dompurify_1 = __importDefault(require("dompurify"));
|
21
|
+
class NodeTextContentRetriever {
|
22
|
+
constructor(state) {
|
23
|
+
this.state = state;
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* Recursively retrieves text content from a ManuscriptNode.
|
27
|
+
*/
|
28
|
+
getNodeTextContent(node) {
|
29
|
+
let textContent = '';
|
30
|
+
if (!(0, transform_1.isElementNodeType)(node.type) && !(0, transform_1.isSectionNodeType)(node.type)) {
|
31
|
+
node.forEach((child) => {
|
32
|
+
if (child.isText) {
|
33
|
+
textContent += child.text;
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
textContent += this.getNodeTextContent(child);
|
37
|
+
}
|
38
|
+
});
|
39
|
+
}
|
40
|
+
return textContent;
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* Retrieves the text content of the first child node.
|
44
|
+
*/
|
45
|
+
getFirstChildContent(node) {
|
46
|
+
return node.firstChild ? node.firstChild.textContent : '';
|
47
|
+
}
|
48
|
+
/**
|
49
|
+
* Retrieves the text content from a bibliography node.
|
50
|
+
*/
|
51
|
+
getContentFromBibliography(id, node) {
|
52
|
+
const bibPlugin = body_editor_1.bibliographyPluginKey.get(this.state);
|
53
|
+
const bib = bibPlugin?.getState(this.state);
|
54
|
+
if (!bib) {
|
55
|
+
return '';
|
56
|
+
}
|
57
|
+
if (node.type === transform_1.schema.nodes.citation) {
|
58
|
+
const text = bib?.renderedCitations.get(id);
|
59
|
+
const citation = dompurify_1.default.sanitize(text && text !== '[NO_PRINTED_FORM]' ? text : ' ', {
|
60
|
+
ALLOWED_TAGS: ['i', 'b', 'span', 'sup', 'sub', '#text'],
|
61
|
+
});
|
62
|
+
return citation ? citation.replace(/<[^>]*>/g, '') : '';
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
const [meta, bibliography] = bib.provider.makeBibliography();
|
66
|
+
const selectedBib = meta.entry_ids.findIndex((entry) => entry[0] === id);
|
67
|
+
if (selectedBib === -1) {
|
68
|
+
return `<span> ${node.attrs.title || 'untitled'} </span> ${(0, body_editor_1.metadata)(node.attrs)}`;
|
69
|
+
}
|
70
|
+
const parser = new DOMParser();
|
71
|
+
const textContent = parser.parseFromString(bibliography[selectedBib], 'text/html').body.textContent;
|
72
|
+
return textContent || '';
|
73
|
+
}
|
74
|
+
}
|
75
|
+
/**
|
76
|
+
* Retrieves the content of an equation node.
|
77
|
+
*/
|
78
|
+
getEquationContent(node) {
|
79
|
+
if (node.firstChild && node.type === transform_1.schema.nodes.equation_element) {
|
80
|
+
return node.firstChild.attrs.contents;
|
81
|
+
}
|
82
|
+
else if (node) {
|
83
|
+
return node.attrs.contents;
|
84
|
+
}
|
85
|
+
return '';
|
86
|
+
}
|
87
|
+
/**
|
88
|
+
* Retrieves the label of a figure node.
|
89
|
+
*/
|
90
|
+
getFigureLabel(node) {
|
91
|
+
const objectsPlugin = body_editor_1.objectsPluginKey.get(this.state);
|
92
|
+
const pluginState = objectsPlugin?.getState(this.state);
|
93
|
+
const target = pluginState?.get(node.attrs.id);
|
94
|
+
return target?.label || '';
|
95
|
+
}
|
96
|
+
/**
|
97
|
+
* Finds a footnote node by its ID.
|
98
|
+
*/
|
99
|
+
findFootnoteById(doc, id) {
|
100
|
+
let footnoteNode = null;
|
101
|
+
doc.descendants((node) => {
|
102
|
+
if (node.type === transform_1.schema.nodes.footnote && node.attrs.id === id) {
|
103
|
+
footnoteNode = node;
|
104
|
+
return false;
|
105
|
+
}
|
106
|
+
return !footnoteNode;
|
107
|
+
});
|
108
|
+
return footnoteNode;
|
109
|
+
}
|
110
|
+
/**
|
111
|
+
* Retrieves the inline footnote content.
|
112
|
+
*/
|
113
|
+
getInlineFootnoteContent(doc, attrs) {
|
114
|
+
const footnote = attrs.rids && attrs.rids.length > 0
|
115
|
+
? this.findFootnoteById(doc, attrs.rids[0])
|
116
|
+
: null;
|
117
|
+
return `<sup class="footnote-decoration">${attrs.contents || ''}</sup>${footnote ? footnote.textContent : ''}`;
|
118
|
+
}
|
119
|
+
/**
|
120
|
+
* Retrieves the text content of a footnote node with decoration.
|
121
|
+
*/
|
122
|
+
getFootnoteContent(node) {
|
123
|
+
const footnotesPlugin = body_editor_1.footnotesPluginKey.get(this.state);
|
124
|
+
const pluginState = footnotesPlugin?.getState(this.state);
|
125
|
+
const decorationText = pluginState?.labels.get(node.attrs.id) || '';
|
126
|
+
return `<sup class="footnote-decoration">${decorationText}</sup>${node.textContent || this.getNodeTextContent(node)}`;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
exports.NodeTextContentRetriever = NodeTextContentRetriever;
|
130
|
+
//# sourceMappingURL=node-content-retriever.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"node-content-retriever.js","sourceRoot":"","sources":["../../../src/lib/node-content-retriever.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;GAUG;AACH,0DAMiC;AACjC,sDAM+B;AAC/B,0DAAiC;AACjC,MAAa,wBAAwB;IAGnC,YAAY,KAA4B;QACtC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED;;OAEG;IACI,kBAAkB,CAAC,IAAoB;QAC5C,IAAI,WAAW,GAAG,EAAE,CAAA;QACpB,IAAI,CAAC,IAAA,6BAAiB,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAClE,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;gBACrB,IAAI,KAAK,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