@ckeditor/ckeditor5-track-changes 40.0.0 → 40.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/LICENSE.md +3 -3
  2. package/build/track-changes.js +2 -2
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/az.js +1 -1
  5. package/build/translations/bg.js +1 -1
  6. package/build/translations/bn.js +1 -1
  7. package/build/translations/ca.js +1 -1
  8. package/build/translations/cs.js +1 -1
  9. package/build/translations/da.js +1 -1
  10. package/build/translations/de.js +1 -1
  11. package/build/translations/el.js +1 -1
  12. package/build/translations/en-au.js +1 -1
  13. package/build/translations/es.js +1 -1
  14. package/build/translations/et.js +1 -1
  15. package/build/translations/fi.js +1 -1
  16. package/build/translations/fr.js +1 -1
  17. package/build/translations/gl.js +1 -1
  18. package/build/translations/he.js +1 -1
  19. package/build/translations/hi.js +1 -1
  20. package/build/translations/hr.js +1 -1
  21. package/build/translations/hu.js +1 -1
  22. package/build/translations/id.js +1 -1
  23. package/build/translations/it.js +1 -1
  24. package/build/translations/ja.js +1 -1
  25. package/build/translations/ko.js +1 -1
  26. package/build/translations/lt.js +1 -1
  27. package/build/translations/lv.js +1 -1
  28. package/build/translations/ms.js +1 -1
  29. package/build/translations/nl.js +1 -1
  30. package/build/translations/no.js +1 -1
  31. package/build/translations/pl.js +1 -1
  32. package/build/translations/pt-br.js +1 -1
  33. package/build/translations/pt.js +1 -1
  34. package/build/translations/ro.js +1 -1
  35. package/build/translations/ru.js +1 -1
  36. package/build/translations/sk.js +1 -1
  37. package/build/translations/sq.js +1 -1
  38. package/build/translations/sr-latn.js +1 -1
  39. package/build/translations/sr.js +1 -1
  40. package/build/translations/sv.js +1 -1
  41. package/build/translations/th.js +1 -1
  42. package/build/translations/tk.js +1 -1
  43. package/build/translations/tr.js +1 -1
  44. package/build/translations/tt.js +1 -1
  45. package/build/translations/uk.js +1 -1
  46. package/build/translations/ur.js +1 -1
  47. package/build/translations/vi.js +1 -1
  48. package/build/translations/zh-cn.js +1 -1
  49. package/build/translations/zh.js +1 -1
  50. package/lang/contexts.json +20 -1
  51. package/lang/translations/ar.po +76 -0
  52. package/lang/translations/az.po +76 -0
  53. package/lang/translations/bg.po +76 -0
  54. package/lang/translations/bn.po +76 -0
  55. package/lang/translations/ca.po +76 -0
  56. package/lang/translations/cs.po +76 -0
  57. package/lang/translations/da.po +76 -0
  58. package/lang/translations/de.po +76 -0
  59. package/lang/translations/el.po +76 -0
  60. package/lang/translations/en-au.po +76 -0
  61. package/lang/translations/en.po +76 -0
  62. package/lang/translations/es.po +76 -0
  63. package/lang/translations/et.po +76 -0
  64. package/lang/translations/fi.po +76 -0
  65. package/lang/translations/fr.po +76 -0
  66. package/lang/translations/gl.po +76 -0
  67. package/lang/translations/he.po +76 -0
  68. package/lang/translations/hi.po +76 -0
  69. package/lang/translations/hr.po +76 -0
  70. package/lang/translations/hu.po +76 -0
  71. package/lang/translations/id.po +76 -0
  72. package/lang/translations/it.po +76 -0
  73. package/lang/translations/ja.po +76 -0
  74. package/lang/translations/ko.po +76 -0
  75. package/lang/translations/lt.po +76 -0
  76. package/lang/translations/lv.po +76 -0
  77. package/lang/translations/ms.po +76 -0
  78. package/lang/translations/nl.po +76 -0
  79. package/lang/translations/no.po +76 -0
  80. package/lang/translations/pl.po +76 -0
  81. package/lang/translations/pt-br.po +94 -18
  82. package/lang/translations/pt.po +76 -0
  83. package/lang/translations/ro.po +76 -0
  84. package/lang/translations/ru.po +76 -0
  85. package/lang/translations/sk.po +76 -0
  86. package/lang/translations/sq.po +76 -0
  87. package/lang/translations/sr-latn.po +76 -0
  88. package/lang/translations/sr.po +76 -0
  89. package/lang/translations/sv.po +76 -0
  90. package/lang/translations/th.po +76 -0
  91. package/lang/translations/tk.po +76 -0
  92. package/lang/translations/tr.po +76 -0
  93. package/lang/translations/tt.po +76 -0
  94. package/lang/translations/uk.po +76 -0
  95. package/lang/translations/ur.po +76 -0
  96. package/lang/translations/vi.po +76 -0
  97. package/lang/translations/zh-cn.po +76 -0
  98. package/lang/translations/zh.po +76 -0
  99. package/package.json +3 -3
  100. package/src/augmentation.d.ts +40 -40
  101. package/src/commands/acceptsuggestioncommand.d.ts +24 -24
  102. package/src/commands/acceptsuggestioncommand.js +1 -1
  103. package/src/commands/discardsuggestioncommand.d.ts +24 -24
  104. package/src/commands/discardsuggestioncommand.js +1 -1
  105. package/src/commands/executeonallsuggestionscommand.d.ts +24 -24
  106. package/src/commands/executeonallsuggestionscommand.js +1 -1
  107. package/src/commands/executeonselectedsuggestionscommand.d.ts +24 -24
  108. package/src/commands/executeonselectedsuggestionscommand.js +1 -1
  109. package/src/commands/trackchangescommand.d.ts +26 -26
  110. package/src/commands/trackchangescommand.js +1 -1
  111. package/src/index.d.ts +16 -16
  112. package/src/integrations/aiassistant.d.ts +17 -17
  113. package/src/integrations/aiassistant.js +1 -1
  114. package/src/integrations/alignment.d.ts +17 -17
  115. package/src/integrations/alignment.js +1 -1
  116. package/src/integrations/basicstyles.d.ts +17 -17
  117. package/src/integrations/basicstyles.js +1 -1
  118. package/src/integrations/blockquote.d.ts +17 -17
  119. package/src/integrations/blockquote.js +1 -1
  120. package/src/integrations/ckbox.d.ts +17 -17
  121. package/src/integrations/ckbox.js +1 -1
  122. package/src/integrations/codeblock.d.ts +17 -17
  123. package/src/integrations/codeblock.js +1 -1
  124. package/src/integrations/comments.d.ts +14 -14
  125. package/src/integrations/comments.js +1 -1
  126. package/src/integrations/deletecommand.d.ts +17 -17
  127. package/src/integrations/deletecommand.js +1 -1
  128. package/src/integrations/documentlist.d.ts +17 -17
  129. package/src/integrations/documentlist.js +1 -1
  130. package/src/integrations/documentlistproperties.d.ts +29 -29
  131. package/src/integrations/documentlistproperties.js +1 -1
  132. package/src/integrations/entercommand.d.ts +16 -16
  133. package/src/integrations/entercommand.js +1 -1
  134. package/src/integrations/findandreplace.d.ts +21 -21
  135. package/src/integrations/findandreplace.js +1 -1
  136. package/src/integrations/font.d.ts +17 -17
  137. package/src/integrations/font.js +1 -1
  138. package/src/integrations/formatpainter.d.ts +17 -17
  139. package/src/integrations/formatpainter.js +1 -1
  140. package/src/integrations/heading.d.ts +17 -17
  141. package/src/integrations/heading.js +1 -1
  142. package/src/integrations/highlight.d.ts +17 -17
  143. package/src/integrations/highlight.js +1 -1
  144. package/src/integrations/horizontalline.d.ts +17 -17
  145. package/src/integrations/horizontalline.js +1 -1
  146. package/src/integrations/htmlembed.d.ts +17 -17
  147. package/src/integrations/htmlembed.js +1 -1
  148. package/src/integrations/image.d.ts +17 -17
  149. package/src/integrations/image.js +1 -1
  150. package/src/integrations/imagereplace.d.ts +17 -23
  151. package/src/integrations/imagereplace.js +1 -1
  152. package/src/integrations/imagestyle.d.ts +17 -0
  153. package/src/integrations/imagestyle.js +23 -0
  154. package/src/integrations/importword.d.ts +18 -18
  155. package/src/integrations/importword.js +1 -1
  156. package/src/integrations/indent.d.ts +17 -17
  157. package/src/integrations/indent.js +1 -1
  158. package/src/integrations/inputcommand.d.ts +16 -16
  159. package/src/integrations/inputcommand.js +1 -1
  160. package/src/integrations/link.d.ts +17 -17
  161. package/src/integrations/link.js +1 -1
  162. package/src/integrations/list.d.ts +17 -17
  163. package/src/integrations/list.js +1 -1
  164. package/src/integrations/listproperties.d.ts +29 -29
  165. package/src/integrations/listproperties.js +1 -1
  166. package/src/integrations/mediaembed.d.ts +17 -17
  167. package/src/integrations/mediaembed.js +1 -1
  168. package/src/integrations/mention.d.ts +17 -17
  169. package/src/integrations/mention.js +1 -1
  170. package/src/integrations/pagebreak.d.ts +17 -17
  171. package/src/integrations/pagebreak.js +1 -1
  172. package/src/integrations/paragraph.d.ts +17 -17
  173. package/src/integrations/paragraph.js +1 -1
  174. package/src/integrations/removeformat.d.ts +17 -17
  175. package/src/integrations/removeformat.js +1 -1
  176. package/src/integrations/restrictededitingmode.d.ts +17 -17
  177. package/src/integrations/restrictededitingmode.js +1 -1
  178. package/src/integrations/shiftentercommand.d.ts +16 -16
  179. package/src/integrations/shiftentercommand.js +1 -1
  180. package/src/integrations/standardeditingmode.d.ts +17 -17
  181. package/src/integrations/standardeditingmode.js +1 -1
  182. package/src/integrations/style.d.ts +17 -18
  183. package/src/integrations/style.js +1 -1
  184. package/src/integrations/table.d.ts +42 -42
  185. package/src/integrations/table.js +1 -1
  186. package/src/integrations/tablecaption.d.ts +22 -22
  187. package/src/integrations/tablecaption.js +1 -1
  188. package/src/integrations/tableclipboard.d.ts +19 -19
  189. package/src/integrations/tableclipboard.js +1 -1
  190. package/src/integrations/tablecolumnresize.d.ts +26 -26
  191. package/src/integrations/tablecolumnresize.js +1 -1
  192. package/src/integrations/tableheadings.d.ts +22 -22
  193. package/src/integrations/tableheadings.js +1 -1
  194. package/src/integrations/tablemergesplit.d.ts +22 -22
  195. package/src/integrations/tablemergesplit.js +1 -1
  196. package/src/integrations/tableofcontents.d.ts +17 -17
  197. package/src/integrations/tableofcontents.js +1 -1
  198. package/src/integrations/tableproperties.d.ts +27 -27
  199. package/src/integrations/tableproperties.js +1 -1
  200. package/src/integrations/template.d.ts +17 -17
  201. package/src/integrations/template.js +1 -1
  202. package/src/integrations/title.d.ts +17 -17
  203. package/src/integrations/title.js +1 -1
  204. package/src/integrations/undo.d.ts +17 -17
  205. package/src/integrations/undo.js +1 -1
  206. package/src/integrations/utils.d.ts +21 -21
  207. package/src/integrations/utils.js +1 -1
  208. package/src/suggestion.d.ts +291 -276
  209. package/src/suggestion.js +1 -1
  210. package/src/suggestiondescriptionfactory.d.ts +183 -163
  211. package/src/suggestiondescriptionfactory.js +1 -1
  212. package/src/trackchanges.d.ts +180 -244
  213. package/src/trackchanges.js +1 -1
  214. package/src/trackchangesconfig.d.ts +78 -75
  215. package/src/trackchangesdata.d.ts +41 -41
  216. package/src/trackchangesdata.js +1 -1
  217. package/src/trackchangesediting.d.ts +524 -468
  218. package/src/trackchangesediting.js +1 -1
  219. package/src/trackchangesui.d.ts +38 -38
  220. package/src/trackchangesui.js +1 -1
  221. package/src/ui/suggestioncontroller.d.ts +37 -37
  222. package/src/ui/suggestioncontroller.js +1 -1
  223. package/src/ui/view/basesuggestionthreadview.d.ts +170 -170
  224. package/src/ui/view/basesuggestionthreadview.js +1 -1
  225. package/src/ui/view/suggestionthreadview.d.ts +182 -182
  226. package/src/ui/view/suggestionthreadview.js +1 -1
  227. package/src/utils/common-translations.d.ts +9 -9
  228. package/src/utils/common-translations.js +1 -1
  229. package/src/utils/utils.d.ts +30 -30
  230. package/src/utils/utils.js +1 -1
@@ -1,163 +1,183 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
6
- import type { Schema, Element } from 'ckeditor5/src/engine';
7
- import type Suggestion from './suggestion';
8
- /**
9
- * Creates descriptions for suggestion chains.
10
- *
11
- * One or more suggestions that are next to each other create "suggestion chain". In such chain one suggestion may
12
- * impact other suggestion when it comes to the description of the whole chain. For example, insertion next to deletion
13
- * results in "Replaced" description.
14
- */
15
- export default class SuggestionDescriptionFactory {
16
- constructor(schema: Schema, locale: Locale);
17
- /**
18
- * Returns descriptions for given suggestion chain.
19
- *
20
- * The structure of the descriptions array is as follows (explained on an example):
21
- *
22
- * ```ts
23
- * [
24
- * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
25
- * { type: 'insertion', content: '*Insert:* image },
26
- * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
27
- * ]
28
- * ```
29
- *
30
- * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
31
- * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
32
- *
33
- * ```html
34
- * <p><strong>Insert:</strong> 2 paragraphs</p>
35
- * <p><strong>Insert:</strong> image</p>
36
- * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
37
- * ```
38
- */
39
- getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
40
- /**
41
- * Registers a callback function that returns a custom description for a suggestion.
42
- *
43
- * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
44
- *
45
- * The callback takes the suggestion instance as a parameter and should return
46
- * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
47
- * if the suggestion was not handled by the callback.
48
- *
49
- * Example of a description callback for the bold style:
50
- *
51
- * ```ts
52
- * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
53
- * const { data } = suggestion;
54
- *
55
- * // Omit suggestions that are not bold style suggestions.
56
- * if ( !data || data.commandName !== 'bold' ) {
57
- * return;
58
- * }
59
- *
60
- * const isSet = !!data.commandParams[ 0 ].forceValue;
61
- * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
62
- *
63
- * return {
64
- * type: 'format',
65
- * content
66
- * };
67
- * } );
68
- * ```
69
- */
70
- registerDescriptionCallback(callback: DescriptionCallback): void;
71
- /**
72
- * For given `elementName` registers how this element will be labeled in a description (for example when it is added
73
- * or removed).
74
- *
75
- * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
76
- * and should return boolean value.
77
- *
78
- * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
79
- *
80
- * A simple use case without using internationalization:
81
- *
82
- * ```ts
83
- * suggestionDescriptionFactory.registerElementLabel(
84
- * 'paragraph',
85
- * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
86
- * );
87
- * ```
88
- *
89
- * If you want your feature to be localized to other languages, use localization service:
90
- *
91
- * ```ts
92
- * const t = editor.locale.t; // Remember that you have to use function named `t`.
93
- *
94
- * suggestionDescriptionFactory.registerElementLabel(
95
- * 'paragraph',
96
- * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
97
- * );
98
- * ```
99
- */
100
- registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
101
- /**
102
- * Returns label registered for given element or the element name if there is no label registered for it.
103
- */
104
- getItemLabel(element: Element, quantity?: number): string;
105
- }
106
- /**
107
- * A description for the suggestion.
108
- *
109
- * ```ts
110
- * {
111
- * type: 'format',
112
- * label: '*Set format:* bold'
113
- * }
114
- * ```
115
- *
116
- * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
117
- * by displaying a color box next to the suggestion.
118
- *
119
- * ```ts
120
- * {
121
- * type: 'format',
122
- * label: '*Set font color:*',
123
- * color: {
124
- * value: 'hsl( 60, 60%, 60% )',
125
- * title: 'yellow'
126
- * }
127
- * }
128
- * ```
129
- */
130
- export interface Description {
131
- type: 'insertion' | 'deletion' | 'replace' | 'format';
132
- /**
133
- * Description label. You may use `*` to bold part of the label.
134
- */
135
- content: string;
136
- /**
137
- * The optional `color` property used for color-related suggestions.
138
- * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
139
- */
140
- color?: {
141
- value: string;
142
- title: string;
143
- };
144
- }
145
- export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
146
- export type LabelCallback = (quantity: number) => string;
147
- export interface LabelCallbackObject {
148
- matchingCallback: (element: Element) => boolean;
149
- label: LabelCallback;
150
- priority: PriorityString;
151
- }
152
- /**
153
- * An intermediate state which is easier to operate on when consecutive suggestion
154
- * ranges are traversed.
155
- */
156
- interface DescriptionItem {
157
- type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer';
158
- add?: string;
159
- remove?: string;
160
- element?: Element;
161
- quantity?: number;
162
- }
163
- export {};
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { type Locale, type PriorityString } from 'ckeditor5/src/utils';
6
+ import type { Schema, Element } from 'ckeditor5/src/engine';
7
+ import type Suggestion from './suggestion';
8
+ /**
9
+ * Creates descriptions for suggestions and suggestions chains.
10
+ *
11
+ * The class manages everything related to generating descriptions for suggestions. Here, you register labels for elements,
12
+ * attributes, or custom callback for non-regular cases.
13
+ *
14
+ * One or more suggestions that are grouped together (based ond various conditions) create "suggestion chain".
15
+ * In such chain one suggestion may impact other suggestion when it comes to the description of the whole chain.
16
+ * For example, insertion next to deletion results in "Replaced" description.
17
+ */
18
+ export default class SuggestionDescriptionFactory {
19
+ constructor(schema: Schema, locale: Locale);
20
+ /**
21
+ * Returns descriptions for given suggestion chain.
22
+ *
23
+ * The structure of the descriptions array is as follows (explained on an example):
24
+ *
25
+ * ```ts
26
+ * [
27
+ * { type: 'insertion', content: '*Insert:* 2 paragraphs' },
28
+ * { type: 'insertion', content: '*Insert:* image },
29
+ * { type: 'replace', content: '*Replace:* "Foo" *with* "Bar"' }
30
+ * ]
31
+ * ```
32
+ *
33
+ * In above example there are three description instances (or lines). Two new (empty) paragraphs were added,
34
+ * an image was added and then "Foo" text was removed and "Bar" text was added. For example, above structure could be rendered as:
35
+ *
36
+ * ```html
37
+ * <p><strong>Insert:</strong> 2 paragraphs</p>
38
+ * <p><strong>Insert:</strong> image</p>
39
+ * <p><strong>Replace:</strong> "Foo" <strong>with</strong> "Bar"</p>
40
+ * ```
41
+ */
42
+ getDescriptions(suggestions: Array<Suggestion>): Array<Description>;
43
+ /**
44
+ * Registers a callback function that returns a custom description for a suggestion.
45
+ *
46
+ * Registered callback is fired for a suggestion whenever there is a need to generate a description for that suggestion.
47
+ *
48
+ * The callback takes the suggestion instance as a parameter and should return
49
+ * {@link module:track-changes/suggestiondescriptionfactory~Description description object} or a falsy value
50
+ * if the suggestion was not handled by the callback.
51
+ *
52
+ * Example of a description callback for the bold style:
53
+ *
54
+ * ```ts
55
+ * suggestionDescriptionFactory.registerDescriptionCallback( suggestion => {
56
+ * const { data } = suggestion;
57
+ *
58
+ * // Omit suggestions that are not bold style suggestions.
59
+ * if ( !data || data.commandName !== 'bold' ) {
60
+ * return;
61
+ * }
62
+ *
63
+ * const isSet = !!data.commandParams[ 0 ].forceValue;
64
+ * const content = isSet ? '*Set format:* bold' : '*Remove format:* bold';
65
+ *
66
+ * return {
67
+ * type: 'format',
68
+ * content
69
+ * };
70
+ * } );
71
+ * ```
72
+ */
73
+ registerDescriptionCallback(callback: DescriptionCallback): void;
74
+ /**
75
+ * For given `elementName` registers how this element will be labeled in a description (for example when it is added
76
+ * or removed).
77
+ *
78
+ * Instead of a string name you may provide a matching function that takes item {@link module:engine/model/item~Item} as an input
79
+ * and should return boolean value.
80
+ *
81
+ * Provided label callback takes one parameter, `quantity`, and is expected to return the label for the element as a string.
82
+ *
83
+ * A simple use case without using internationalization:
84
+ *
85
+ * ```ts
86
+ * suggestionDescriptionFactory.registerElementLabel(
87
+ * 'paragraph',
88
+ * quantity => quantity == 1 ? 'paragraph' : quantity + ' paragraphs'
89
+ * );
90
+ * ```
91
+ *
92
+ * If you want your feature to be localized to other languages, use localization service:
93
+ *
94
+ * ```ts
95
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
96
+ *
97
+ * suggestionDescriptionFactory.registerElementLabel(
98
+ * 'paragraph',
99
+ * quantity => t( { string: 'paragraph', plural: '%0 paragraphs', id: 'ELEMENT_PARAGRAPH' }, quantity )
100
+ * );
101
+ * ```
102
+ */
103
+ registerElementLabel(elementNameOrCallback: string | Function, labelCallback: LabelCallback, priority?: PriorityString): void;
104
+ /**
105
+ * For given `attributeName` registers how this attribute will be labeled in a description (for example when it is added
106
+ * or removed).
107
+ *
108
+ * Example usage with internationalization:
109
+ *
110
+ * ```ts
111
+ * const t = editor.locale.t; // Remember that you have to use function named `t`.
112
+ *
113
+ * suggestionDescriptionFactory.registerAttributeLabel(
114
+ * 'bold',
115
+ * t( 'bold' )
116
+ * );
117
+ * ```
118
+ */
119
+ registerAttributeLabel(attributeName: string, attributeLabel: string): void;
120
+ /**
121
+ * Returns label registered for given element or the element name if there is no label registered for it.
122
+ */
123
+ getItemLabel(element: Element, quantity?: number): string;
124
+ }
125
+ /**
126
+ * A description for the suggestion.
127
+ *
128
+ * ```ts
129
+ * {
130
+ * type: 'format',
131
+ * label: '*Set format:* bold'
132
+ * }
133
+ * ```
134
+ *
135
+ * A description for the color-related suggestions like font color may specify the `color` property that will provide a better UX
136
+ * by displaying a color box next to the suggestion.
137
+ *
138
+ * ```ts
139
+ * {
140
+ * type: 'format',
141
+ * label: '*Set font color:*',
142
+ * color: {
143
+ * value: 'hsl( 60, 60%, 60% )',
144
+ * title: 'yellow'
145
+ * }
146
+ * }
147
+ * ```
148
+ */
149
+ export interface Description {
150
+ type: 'insertion' | 'deletion' | 'replace' | 'format';
151
+ /**
152
+ * Description label. You may use `*` to bold part of the label.
153
+ */
154
+ content: string;
155
+ /**
156
+ * The optional `color` property used for color-related suggestions.
157
+ * The object should provide the `value` (for displaying the color) and `title` (for describing the color) fields.
158
+ */
159
+ color?: {
160
+ value: string;
161
+ title: string;
162
+ };
163
+ }
164
+ export type DescriptionCallback = (suggestion: Suggestion) => Description | DescriptionItem | undefined;
165
+ export type LabelCallback = (quantity: number) => string;
166
+ export interface LabelCallbackObject {
167
+ matchingCallback: (element: Element) => boolean;
168
+ label: LabelCallback;
169
+ priority: PriorityString;
170
+ }
171
+ /**
172
+ * An intermediate state which is easier to operate on when consecutive suggestion
173
+ * ranges are traversed.
174
+ */
175
+ interface DescriptionItem {
176
+ type: 'text' | 'addEmptyContainer' | 'addObject' | 'removeEmptyContainer' | 'removeObject' | 'addContainer' | 'removeContainer' | 'addFormat' | 'removeFormat';
177
+ add?: string;
178
+ remove?: string;
179
+ element?: Element;
180
+ quantity?: number;
181
+ key?: string;
182
+ }
183
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x52cf=['skip','isEmpty','push','REPLACE_TEXT','deletion','insertion','get','getWalker','$textProxy','_customCallbacks','getDescriptions','*Split:*\x20%0','_resolveDescriptionItems','replace','getItemLabel','*Merge:*\x20%0','data','getFirstRange','_itemLabels','isEqual','element','*Insert:*\x20%0','nextSibling','pop','function','match','_locale','length','EmptyContainer','*Remove:*\x20%0','isInContent','matchingCallback','registerElementLabel','_addDescriptionItems','$1\x20$2','ELEMENT_SPACE','label','Object','remove','_schema','indexOf','name','Container','addEmptyContainer','quantity','addObject','add','addContainer','item','removeContainer','isObject','_itemLabelsCallbacks','elementEnd','type','text'];(function(_0xbd38bd,_0x52cf7b){const _0x451aa5=function(_0xa212c7){while(--_0xa212c7){_0xbd38bd['push'](_0xbd38bd['shift']());}};_0x451aa5(++_0x52cf7b);}(_0x52cf,0x95));const _0x451a=function(_0xbd38bd,_0x52cf7b){_0xbd38bd=_0xbd38bd-0x0;let _0x451aa5=_0x52cf[_0xbd38bd];return _0x451aa5;};import{getTranslation as _0x5cc6c9}from'./utils/common-translations';import{priorities as _0x4d1b72,insertToPriorityArray as _0x420501}from'ckeditor5/src/utils';export default class m{constructor(_0x487cea,_0x1534c7){this[_0x451a('0x19')]=[],this[_0x451a('0x22')]=new Map(),this[_0x451a('0xc')]=[],this[_0x451a('0x0')]=_0x487cea,this[_0x451a('0x2a')]=_0x1534c7;}[_0x451a('0x1a')](_0x582db9){const _0x39f847=[];for(let _0x46decc=0x0;_0x46decc<_0x582db9[_0x451a('0x2b')];_0x46decc++){const _0x2837ce=_0x582db9[_0x46decc];if(!_0x2837ce[_0x451a('0x2e')])continue;let _0x2e3021=!0x1;for(const _0xd83e8d of this['_customCallbacks']){const _0x3dccad=_0xd83e8d(_0x2837ce);if(_0x3dccad){_0x451a('0xe')in _0x3dccad&&_0x39f847[_0x451a('0x12')](_0x3dccad),_0x2e3021=!0x0;break;}}if(!_0x2e3021){this[_0x451a('0x31')](_0x39f847,_0x2837ce);const _0x3bfcf7=_0x582db9[_0x46decc+0x1];if(_0x3bfcf7&&!_0x2837ce['getFirstRange']()['end'][_0x451a('0x23')](_0x3bfcf7[_0x451a('0x21')]()['start'])){const _0x1b6bd1=_0x39f847[_0x39f847[_0x451a('0x2b')]-0x1],_0x1dbbe5=_0x451a('0x15')==_0x2837ce[_0x451a('0xe')]?'add':'remove';_0x1b6bd1&&'text'==_0x1b6bd1[_0x451a('0xe')]&&(_0x1b6bd1[_0x1dbbe5]+='\x0a');}}}return this['_resolveDescriptionItems'](_0x39f847);}['registerDescriptionCallback'](_0x554655){this['_customCallbacks']['push'](_0x554655);}[_0x451a('0x30')](_0x571229,_0x4b1067,_0x4cd2a3=_0x4d1b72['normal']){_0x451a('0x28')==typeof _0x571229?_0x420501(this['_itemLabelsCallbacks'],{'matchingCallback':_0x571229,'label':_0x4b1067,'priority':_0x4cd2a3}):this[_0x451a('0x22')]['set'](_0x571229,_0x4b1067);}[_0x451a('0x1e')](_0x49065e,_0x33641b=0x1){let _0x1545ea;for(const _0xdc1da5 of this[_0x451a('0xc')])if(_0xdc1da5[_0x451a('0x2f')](_0x49065e)){_0x1545ea=_0xdc1da5[_0x451a('0x34')];break;}return _0x1545ea||(_0x1545ea=this[_0x451a('0x22')][_0x451a('0x16')](_0x49065e[_0x451a('0x2')])),_0x1545ea?_0x1545ea(_0x33641b):0x1!==_0x33641b?_0x33641b+'\x20'+_0x49065e[_0x451a('0x2')]+'s':''+_0x49065e[_0x451a('0x2')];}[_0x451a('0x31')](_0x3f41ad,_0x52f81f){const _0x4e0ee8=_0x52f81f['getFirstRange']()[_0x451a('0x17')](),_0x189ece='insertion'==_0x52f81f[_0x451a('0xe')]?'add':'remove';for(const _0x1c86d3 of _0x4e0ee8){const _0x1f496d=_0x1c86d3[_0x451a('0x9')],_0x2d6a59=_0x3f41ad[_0x3f41ad[_0x451a('0x2b')]-0x1];if(_0x1f496d['is'](_0x451a('0x18')))_0x2d6a59&&_0x2d6a59[_0x451a('0xe')][_0x451a('0x1')](_0x451a('0x3'))>-0x1&&_0x3f41ad[_0x451a('0x27')](),_0x2d6a59&&_0x451a('0xf')==_0x2d6a59[_0x451a('0xe')]?_0x2d6a59[_0x189ece]+=_0x1f496d[_0x451a('0x20')]:_0x3f41ad[_0x451a('0x12')]({'type':_0x451a('0xf'),'add':_0x451a('0x7')==_0x189ece?_0x1f496d[_0x451a('0x20')]:'','remove':'remove'==_0x189ece?_0x1f496d[_0x451a('0x20')]:''});else{if(this[_0x451a('0x0')][_0x451a('0xb')](_0x1f496d)){const _0x11357b=_0x1f496d;if(_0x2d6a59&&_0x2d6a59[_0x451a('0xe')][_0x451a('0x1')]('Container')>-0x1&&_0x3f41ad[_0x451a('0x27')](),_0x451a('0xd')==_0x1c86d3['type'])continue;_0x2d6a59&&_0x2d6a59[_0x451a('0xe')]==_0x189ece+_0x451a('0x35')&&_0x2d6a59[_0x451a('0x24')][_0x451a('0x2')]==_0x11357b['name']?_0x2d6a59[_0x451a('0x5')]++:_0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x35'),'element':_0x11357b,'quantity':0x1}),_0x4e0ee8[_0x451a('0x10')](_0x2962a4=>!(_0x451a('0xd')==_0x2962a4[_0x451a('0xe')]&&_0x2962a4[_0x451a('0x9')]==_0x1f496d));}else{if(this[_0x451a('0x0')]['checkChild'](_0x1f496d,'$text')||_0x1f496d['is']('element','softBreak')){const _0x556edc=_0x1f496d;if(_0x451a('0x7')==_0x189ece&&'elementStart'==_0x1c86d3[_0x451a('0xe')]||'remove'==_0x189ece&&_0x451a('0xd')==_0x1c86d3[_0x451a('0xe')])continue;if(_0x2d6a59&&-0x1==_0x2d6a59['type'][_0x451a('0x1')](_0x451a('0x3'))){_0x451a('0xf')==_0x2d6a59[_0x451a('0xe')]&&(_0x2d6a59[_0x189ece]+='\x0a');continue;}let _0x10c473;if(_0x10c473=_0x451a('0x7')==_0x189ece?_0x556edc[_0x451a('0x26')]&&!this['_schema']['isObject'](_0x556edc[_0x451a('0x26')])?_0x556edc['nextSibling']:null:_0x556edc['previousSibling']&&!this['_schema'][_0x451a('0xb')](_0x556edc['previousSibling'])?_0x556edc['previousSibling']:null,_0x556edc[_0x451a('0x11')]||_0x10c473&&_0x10c473[_0x451a('0x11')]){const _0x5d6900=_0x10c473&&_0x10c473[_0x451a('0x11')]?_0x10c473:_0x556edc;_0x2d6a59&&_0x2d6a59['type']==_0x189ece+_0x451a('0x2c')&&_0x2d6a59[_0x451a('0x24')][_0x451a('0x2')]==_0x5d6900['name']?_0x2d6a59['quantity']++:_0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x2c'),'element':_0x5d6900,'quantity':0x1});}else _0x3f41ad[_0x451a('0x12')]({'type':_0x189ece+_0x451a('0x3'),'element':_0x556edc});}}}}}[_0x451a('0x1c')](_0x49a9d7){const _0x1401e0=this[_0x451a('0x2a')],_0xeeea81=[];for(const _0x31cfbf of _0x49a9d7){switch(_0x31cfbf[_0x451a('0xe')]){case _0x451a('0xf'):if(_0x31cfbf[_0x451a('0x7')]=_0x31cfbf['add']['replace'](/(\S)\u000A+(\S)/g,_0x451a('0x32'))[_0x451a('0x1d')](/\u000A/g,''),_0x31cfbf[_0x451a('0x36')]=_0x31cfbf[_0x451a('0x36')][_0x451a('0x1d')](/(\S)\u000A+(\S)/g,_0x451a('0x32'))[_0x451a('0x1d')](/\u000A/g,''),''!=_0x31cfbf['add']&&''!=_0x31cfbf[_0x451a('0x36')]){_0xeeea81['push']({'type':'replace','content':_0x5cc6c9(_0x1401e0,_0x451a('0x13'),['\x22'+_0x31cfbf[_0x451a('0x36')]+'\x22','\x22'+_0x31cfbf[_0x451a('0x7')]+'\x22'])});continue;}if(null!=_0x31cfbf[_0x451a('0x7')]['match'](/^ +$/)){_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x25'),_0x5cc6c9(_0x1401e0,_0x451a('0x33'),_0x31cfbf[_0x451a('0x7')][_0x451a('0x2b')]))});continue;}if(null!=_0x31cfbf[_0x451a('0x36')][_0x451a('0x29')](/^ +$/)){_0xeeea81[_0x451a('0x12')]({'type':'deletion','content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),_0x5cc6c9(_0x1401e0,'ELEMENT_SPACE',_0x31cfbf[_0x451a('0x36')][_0x451a('0x2b')]))});continue;}if(''!=_0x31cfbf['add']){_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,'*Insert:*\x20%0','\x22'+_0x31cfbf[_0x451a('0x7')]+'\x22')});continue;}_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),'\x22'+_0x31cfbf[_0x451a('0x36')]+'\x22')});continue;case _0x451a('0x4'):case _0x451a('0x6'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,'*Insert:*\x20%0',this['getItemLabel'](_0x31cfbf[_0x451a('0x24')],_0x31cfbf[_0x451a('0x5')]))});continue;case'removeEmptyContainer':case'removeObject':_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x2d'),this[_0x451a('0x1e')](_0x31cfbf['element'],_0x31cfbf['quantity']))});continue;case _0x451a('0x8'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x15'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x1b'),this[_0x451a('0x1e')](_0x31cfbf[_0x451a('0x24')],_0x31cfbf[_0x451a('0x5')]))});continue;case _0x451a('0xa'):_0xeeea81[_0x451a('0x12')]({'type':_0x451a('0x14'),'content':_0x5cc6c9(_0x1401e0,_0x451a('0x1f'),this['getItemLabel'](_0x31cfbf['element'],_0x31cfbf[_0x451a('0x5')]))});continue;}_0xeeea81[_0x451a('0x12')](_0x31cfbf);}return _0xeeea81;}}
23
+ const _0x2bad=['length','_customCallbacks','end','*Change\x20to:*\x20%0','skip','add','key','_itemLabels','data','start','_handleInsertRemoveSuggestionDescription','Object','addFormat','_itemLabelsCallbacks','format','function','quantity','elementEnd','Container','removeFormat','_handleCustomCallbackDescription','EmptyContainer','_handleAttributeSuggestionDescription','_locale','getDescriptions','*Merge:*\x20%0','push','*Split:*\x20%0','_attributeLabels','getWalker','text','name','removeObject','item','previousSibling','map','isEqual','insertion','normal','isEmpty','getItemLabel','element','*Insert:*\x20%0','pop','isInContent','set','replace','match','nodeAfter','attribute','subType','isObject','indexOf','registerDescriptionCallback','join','_handleRenameSuggestionDescription','get','remove','removeEmptyContainer','*Set\x20format:*\x20%0','_addDescriptionItems','_schema','has','$1\x20$2','deletion','$textProxy','*Remove:*\x20%0','type','$text','ELEMENT_SPACE','getFirstRange'];(function(_0x49d925,_0x2bad40){const _0x4e2a79=function(_0x1ac116){while(--_0x1ac116){_0x49d925['push'](_0x49d925['shift']());}};_0x4e2a79(++_0x2bad40);}(_0x2bad,0x19a));const _0x4e2a=function(_0x49d925,_0x2bad40){_0x49d925=_0x49d925-0x0;let _0x4e2a79=_0x2bad[_0x49d925];return _0x4e2a79;};import{getTranslation as _0x3f1024}from'./utils/common-translations';import{priorities as _0x474877,insertToPriorityArray as _0x449b84}from'ckeditor5/src/utils';import{renameAttributeKey as _0x4b3d76}from'./trackchangesediting';export default class f{constructor(_0x4243d0,_0x201635){this[_0x4e2a('0x11')]=[],this[_0x4e2a('0x17')]=new Map(),this[_0x4e2a('0x1d')]=[],this[_0x4e2a('0x2c')]=new Map(),this[_0x4e2a('0x6')]=_0x4243d0,this[_0x4e2a('0x27')]=_0x201635;}[_0x4e2a('0x28')](_0x1c392f){const _0x294b6b=[],_0x5e1c88=new Set(),_0x5d90cf=new Set();for(let _0x5a00bf=0x0;_0x5a00bf<_0x1c392f['length'];_0x5a00bf++){const _0x2c556c=_0x1c392f[_0x5a00bf];if(!_0x2c556c[_0x4e2a('0x3c')])continue;const _0x111d1f=this[_0x4e2a('0x24')](_0x2c556c);if(_0x111d1f){if(null!=_0x2c556c[_0x4e2a('0x42')]){if(_0x5e1c88['has'](_0x2c556c[_0x4e2a('0x42')]))continue;_0x5e1c88[_0x4e2a('0x15')](_0x2c556c[_0x4e2a('0x42')]);}_0x294b6b['push'](_0x111d1f);}else{if(_0x4e2a('0x41')!=_0x2c556c['type'])_0x4e2a('0x35')!=_0x2c556c[_0x4e2a('0xc')]&&'deletion'!=_0x2c556c[_0x4e2a('0xc')]||this[_0x4e2a('0x1a')](_0x294b6b,_0x2c556c,_0x1c392f[_0x5a00bf+0x1]);else{const _0x2e4211=_0x2c556c[_0x4e2a('0x18')][_0x4e2a('0x16')];if(_0x5d90cf[_0x4e2a('0x7')](_0x2e4211))continue;_0x5d90cf[_0x4e2a('0x15')](_0x2c556c[_0x4e2a('0x18')][_0x4e2a('0x16')]),_0x2e4211==_0x4b3d76?this['_handleRenameSuggestionDescription'](_0x294b6b,_0x2c556c):this[_0x4e2a('0x26')](_0x294b6b,_0x2c556c);}}}return this['_resolveDescriptionItems'](_0x294b6b);}[_0x4e2a('0x45')](_0x1db3a9){this['_customCallbacks']['push'](_0x1db3a9);}['registerElementLabel'](_0x1ef336,_0x4e920b,_0x5d5458=_0x474877[_0x4e2a('0x36')]){_0x4e2a('0x1f')==typeof _0x1ef336?_0x449b84(this['_itemLabelsCallbacks'],{'matchingCallback':_0x1ef336,'label':_0x4e920b,'priority':_0x5d5458}):this[_0x4e2a('0x17')][_0x4e2a('0x3d')](_0x1ef336,_0x4e920b);}['registerAttributeLabel'](_0x492255,_0x5ddaf1){this['_attributeLabels'][_0x4e2a('0x3d')](_0x492255,_0x5ddaf1);}[_0x4e2a('0x38')](_0x4a2b07,_0x46ce56=0x1){let _0x115204;for(const _0x4060db of this[_0x4e2a('0x1d')])if(_0x4060db['matchingCallback'](_0x4a2b07)){_0x115204=_0x4060db['label'];break;}return _0x115204||(_0x115204=this['_itemLabels'][_0x4e2a('0x1')](_0x4a2b07[_0x4e2a('0x2f')])),_0x115204?_0x115204(_0x46ce56):0x1!==_0x46ce56?_0x46ce56+'\x20'+_0x4a2b07[_0x4e2a('0x2f')]+'s':''+_0x4a2b07[_0x4e2a('0x2f')];}[_0x4e2a('0x5')](_0x1e88bb,_0x5b553a){const _0x4b13c0=_0x5b553a[_0x4e2a('0xf')]()[_0x4e2a('0x2d')](),_0x17733d=_0x4e2a('0x35')==_0x5b553a['type']?_0x4e2a('0x15'):_0x4e2a('0x2');for(const _0x772dc6 of _0x4b13c0){const _0x5f4b7f=_0x772dc6[_0x4e2a('0x31')],_0x29c19d=_0x1e88bb[_0x1e88bb[_0x4e2a('0x10')]-0x1];if(_0x5f4b7f['is'](_0x4e2a('0xa')))_0x29c19d&&_0x29c19d[_0x4e2a('0xc')][_0x4e2a('0x44')](_0x4e2a('0x22'))>-0x1&&_0x1e88bb['pop'](),_0x29c19d&&_0x4e2a('0x2e')==_0x29c19d[_0x4e2a('0xc')]?_0x29c19d[_0x17733d]+=_0x5f4b7f['data']:_0x1e88bb[_0x4e2a('0x2a')]({'type':'text','add':_0x4e2a('0x15')==_0x17733d?_0x5f4b7f[_0x4e2a('0x18')]:'','remove':_0x4e2a('0x2')==_0x17733d?_0x5f4b7f[_0x4e2a('0x18')]:''});else{if(this[_0x4e2a('0x6')][_0x4e2a('0x43')](_0x5f4b7f)){const _0x50ab65=_0x5f4b7f;if(_0x29c19d&&_0x29c19d[_0x4e2a('0xc')][_0x4e2a('0x44')](_0x4e2a('0x22'))>-0x1&&_0x1e88bb[_0x4e2a('0x3b')](),_0x4e2a('0x21')==_0x772dc6[_0x4e2a('0xc')])continue;_0x29c19d&&_0x29c19d[_0x4e2a('0xc')]==_0x17733d+_0x4e2a('0x1b')&&_0x29c19d[_0x4e2a('0x39')][_0x4e2a('0x2f')]==_0x50ab65['name']?_0x29c19d[_0x4e2a('0x20')]++:_0x1e88bb['push']({'type':_0x17733d+_0x4e2a('0x1b'),'element':_0x50ab65,'quantity':0x1}),_0x4b13c0[_0x4e2a('0x14')](_0x425582=>!(_0x4e2a('0x21')==_0x425582['type']&&_0x425582[_0x4e2a('0x31')]==_0x5f4b7f));}else{if(this[_0x4e2a('0x6')]['checkChild'](_0x5f4b7f,_0x4e2a('0xd'))||_0x5f4b7f['is'](_0x4e2a('0x39'),'softBreak')){const _0x137d11=_0x5f4b7f;if(_0x4e2a('0x15')==_0x17733d&&'elementStart'==_0x772dc6['type']||'remove'==_0x17733d&&'elementEnd'==_0x772dc6[_0x4e2a('0xc')])continue;if(_0x29c19d&&-0x1==_0x29c19d[_0x4e2a('0xc')][_0x4e2a('0x44')]('Container')){_0x4e2a('0x2e')==_0x29c19d[_0x4e2a('0xc')]&&(_0x29c19d[_0x17733d]+='\x0a');continue;}let _0x2ff14e;if(_0x2ff14e=_0x4e2a('0x15')==_0x17733d?_0x137d11['nextSibling']&&!this[_0x4e2a('0x6')][_0x4e2a('0x43')](_0x137d11['nextSibling'])?_0x137d11['nextSibling']:null:_0x137d11['previousSibling']&&!this[_0x4e2a('0x6')][_0x4e2a('0x43')](_0x137d11['previousSibling'])?_0x137d11[_0x4e2a('0x32')]:null,_0x137d11['isEmpty']||_0x2ff14e&&_0x2ff14e[_0x4e2a('0x37')]){const _0x10cb75=_0x2ff14e&&_0x2ff14e['isEmpty']?_0x2ff14e:_0x137d11;_0x29c19d&&_0x29c19d[_0x4e2a('0xc')]==_0x17733d+_0x4e2a('0x25')&&_0x29c19d['element']['name']==_0x10cb75[_0x4e2a('0x2f')]?_0x29c19d[_0x4e2a('0x20')]++:_0x1e88bb[_0x4e2a('0x2a')]({'type':_0x17733d+_0x4e2a('0x25'),'element':_0x10cb75,'quantity':0x1});}else _0x1e88bb[_0x4e2a('0x2a')]({'type':_0x17733d+_0x4e2a('0x22'),'element':_0x137d11});}}}}}['_resolveDescriptionItems'](_0xc5edde){const _0x3e4024=this[_0x4e2a('0x27')],_0x418d32=[],_0x3b5c37=[],_0x370f5b=[];for(const _0x26791a of _0xc5edde)switch(_0x26791a[_0x4e2a('0xc')]){case _0x4e2a('0x2e'):if(_0x26791a['add']=_0x26791a[_0x4e2a('0x15')][_0x4e2a('0x3e')](/(\S)\u000A+(\S)/g,_0x4e2a('0x8'))[_0x4e2a('0x3e')](/\u000A/g,''),_0x26791a[_0x4e2a('0x2')]=_0x26791a[_0x4e2a('0x2')][_0x4e2a('0x3e')](/(\S)\u000A+(\S)/g,_0x4e2a('0x8'))['replace'](/\u000A/g,''),''!=_0x26791a[_0x4e2a('0x15')]&&''!=_0x26791a[_0x4e2a('0x2')]){_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x3e'),'content':_0x3f1024(_0x3e4024,'REPLACE_TEXT',['\x22'+_0x26791a[_0x4e2a('0x2')]+'\x22','\x22'+_0x26791a['add']+'\x22'])});continue;}if(null!=_0x26791a[_0x4e2a('0x15')][_0x4e2a('0x3f')](/^ +$/)){_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x35'),'content':_0x3f1024(_0x3e4024,_0x4e2a('0x3a'),_0x3f1024(_0x3e4024,_0x4e2a('0xe'),_0x26791a['add'][_0x4e2a('0x10')]))});continue;}if(null!=_0x26791a[_0x4e2a('0x2')][_0x4e2a('0x3f')](/^ +$/)){_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x9'),'content':_0x3f1024(_0x3e4024,_0x4e2a('0xb'),_0x3f1024(_0x3e4024,_0x4e2a('0xe'),_0x26791a[_0x4e2a('0x2')][_0x4e2a('0x10')]))});continue;}if(''!=_0x26791a['add']){_0x418d32[_0x4e2a('0x2a')]({'type':'insertion','content':_0x3f1024(_0x3e4024,'*Insert:*\x20%0','\x22'+_0x26791a['add']+'\x22')});continue;}_0x418d32[_0x4e2a('0x2a')]({'type':'deletion','content':_0x3f1024(_0x3e4024,_0x4e2a('0xb'),'\x22'+_0x26791a[_0x4e2a('0x2')]+'\x22')});continue;case'addEmptyContainer':case'addObject':_0x418d32[_0x4e2a('0x2a')]({'type':'insertion','content':_0x3f1024(_0x3e4024,_0x4e2a('0x3a'),this[_0x4e2a('0x38')](_0x26791a[_0x4e2a('0x39')],_0x26791a[_0x4e2a('0x20')]))});continue;case _0x4e2a('0x3'):case _0x4e2a('0x30'):_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x9'),'content':_0x3f1024(_0x3e4024,_0x4e2a('0xb'),this[_0x4e2a('0x38')](_0x26791a['element'],_0x26791a[_0x4e2a('0x20')]))});continue;case'addContainer':_0x418d32[_0x4e2a('0x2a')]({'type':'insertion','content':_0x3f1024(_0x3e4024,_0x4e2a('0x2b'),this[_0x4e2a('0x38')](_0x26791a[_0x4e2a('0x39')],_0x26791a[_0x4e2a('0x20')]))});continue;case'removeContainer':_0x418d32[_0x4e2a('0x2a')]({'type':'deletion','content':_0x3f1024(_0x3e4024,_0x4e2a('0x29'),this[_0x4e2a('0x38')](_0x26791a['element'],_0x26791a[_0x4e2a('0x20')]))});continue;case'addFormat':_0x3b5c37['push'](_0x26791a[_0x4e2a('0x16')]);continue;case _0x4e2a('0x23'):_0x370f5b[_0x4e2a('0x2a')](_0x26791a['key']);continue;default:_0x418d32[_0x4e2a('0x2a')](_0x26791a);}if(_0x3b5c37[_0x4e2a('0x10')]){const _0x404951=_0x3b5c37[_0x4e2a('0x33')](_0x549952=>this[_0x4e2a('0x2c')][_0x4e2a('0x7')](_0x549952)?this[_0x4e2a('0x2c')][_0x4e2a('0x1')](_0x549952):_0x549952)[_0x4e2a('0x46')](',\x20');_0x418d32[_0x4e2a('0x2a')]({'type':_0x4e2a('0x1e'),'content':_0x3f1024(this[_0x4e2a('0x27')],_0x4e2a('0x4'),_0x404951)});}if(_0x370f5b[_0x4e2a('0x10')]){const _0x5494a0=_0x370f5b[_0x4e2a('0x33')](_0x4a57de=>this[_0x4e2a('0x2c')][_0x4e2a('0x7')](_0x4a57de)?this[_0x4e2a('0x2c')][_0x4e2a('0x1')](_0x4a57de):_0x4a57de)['join'](',\x20');_0x418d32[_0x4e2a('0x2a')]({'type':'format','content':_0x3f1024(this[_0x4e2a('0x27')],'*Remove\x20format:*\x20%0',_0x5494a0)});}return _0x418d32;}[_0x4e2a('0x24')](_0x258c4d){for(const _0x4265f8 of this[_0x4e2a('0x11')]){const _0x342d28=_0x4265f8(_0x258c4d);if(_0x342d28&&_0x4e2a('0xc')in _0x342d28)return _0x342d28;}}['_handleAttributeSuggestionDescription'](_0x20623e,_0x12af96){const _0x5b920f=_0x12af96[_0x4e2a('0x18')],_0xd435eb=void 0x0===_0x5b920f['newValue']?_0x4e2a('0x23'):_0x4e2a('0x1c');_0x20623e[_0x4e2a('0x2a')]({'type':_0xd435eb,'key':_0x5b920f[_0x4e2a('0x16')]});}[_0x4e2a('0x0')](_0x497cfc,_0x5a416b){_0x497cfc[_0x4e2a('0x2a')]({'type':_0x4e2a('0x1e'),'content':_0x3f1024(this[_0x4e2a('0x27')],_0x4e2a('0x13'),this[_0x4e2a('0x38')](_0x5a416b[_0x4e2a('0xf')]()[_0x4e2a('0x19')][_0x4e2a('0x40')],0x1))});}[_0x4e2a('0x1a')](_0x75c24f,_0x296d28,_0x300b6b){if(this['_addDescriptionItems'](_0x75c24f,_0x296d28),_0x300b6b&&_0x300b6b[_0x4e2a('0xf')]()&&!_0x296d28[_0x4e2a('0xf')]()[_0x4e2a('0x12')][_0x4e2a('0x34')](_0x300b6b[_0x4e2a('0xf')]()['start'])){const _0x1463ce=_0x75c24f[_0x75c24f[_0x4e2a('0x10')]-0x1],_0x53acc0=_0x4e2a('0x35')==_0x296d28[_0x4e2a('0xc')]?_0x4e2a('0x15'):'remove';_0x1463ce&&'text'==_0x1463ce[_0x4e2a('0xc')]&&(_0x1463ce[_0x53acc0]+='\x0a');}}}