@ckeditor/ckeditor5-export-word 41.2.1 → 41.3.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/build/export-word.js +1 -1
  2. package/dist/content-index.css +4 -0
  3. package/dist/editor-index.css +4 -0
  4. package/dist/index.css +4 -0
  5. package/dist/translations/ar.d.ts +8 -0
  6. package/dist/translations/ar.js +23 -0
  7. package/dist/translations/bg.d.ts +8 -0
  8. package/dist/translations/bg.js +23 -0
  9. package/dist/translations/bn.d.ts +8 -0
  10. package/dist/translations/bn.js +23 -0
  11. package/dist/translations/ca.d.ts +8 -0
  12. package/dist/translations/ca.js +23 -0
  13. package/dist/translations/cs.d.ts +8 -0
  14. package/dist/translations/cs.js +23 -0
  15. package/dist/translations/da.d.ts +8 -0
  16. package/dist/translations/da.js +23 -0
  17. package/dist/translations/de.d.ts +8 -0
  18. package/dist/translations/de.js +23 -0
  19. package/dist/translations/el.d.ts +8 -0
  20. package/dist/translations/el.js +23 -0
  21. package/dist/translations/en-au.d.ts +8 -0
  22. package/dist/translations/en-au.js +23 -0
  23. package/dist/translations/en.d.ts +8 -0
  24. package/dist/translations/en.js +23 -0
  25. package/dist/translations/es.d.ts +8 -0
  26. package/dist/translations/es.js +23 -0
  27. package/dist/translations/et.d.ts +8 -0
  28. package/dist/translations/et.js +23 -0
  29. package/dist/translations/fi.d.ts +8 -0
  30. package/dist/translations/fi.js +23 -0
  31. package/dist/translations/fr.d.ts +8 -0
  32. package/dist/translations/fr.js +23 -0
  33. package/dist/translations/gl.d.ts +8 -0
  34. package/dist/translations/gl.js +23 -0
  35. package/dist/translations/he.d.ts +8 -0
  36. package/dist/translations/he.js +23 -0
  37. package/dist/translations/hi.d.ts +8 -0
  38. package/dist/translations/hi.js +23 -0
  39. package/dist/translations/hr.d.ts +8 -0
  40. package/dist/translations/hr.js +23 -0
  41. package/dist/translations/hu.d.ts +8 -0
  42. package/dist/translations/hu.js +23 -0
  43. package/dist/translations/id.d.ts +8 -0
  44. package/dist/translations/id.js +23 -0
  45. package/dist/translations/it.d.ts +8 -0
  46. package/dist/translations/it.js +23 -0
  47. package/dist/translations/ja.d.ts +8 -0
  48. package/dist/translations/ja.js +23 -0
  49. package/dist/translations/jv.d.ts +8 -0
  50. package/dist/translations/jv.js +23 -0
  51. package/dist/translations/ko.d.ts +8 -0
  52. package/dist/translations/ko.js +23 -0
  53. package/dist/translations/lt.d.ts +8 -0
  54. package/dist/translations/lt.js +23 -0
  55. package/dist/translations/lv.d.ts +8 -0
  56. package/dist/translations/lv.js +23 -0
  57. package/dist/translations/ms.d.ts +8 -0
  58. package/dist/translations/ms.js +23 -0
  59. package/dist/translations/nl.d.ts +8 -0
  60. package/dist/translations/nl.js +23 -0
  61. package/dist/translations/no.d.ts +8 -0
  62. package/dist/translations/no.js +23 -0
  63. package/dist/translations/pl.d.ts +8 -0
  64. package/dist/translations/pl.js +23 -0
  65. package/dist/translations/pt-br.d.ts +8 -0
  66. package/dist/translations/pt-br.js +23 -0
  67. package/dist/translations/pt.d.ts +8 -0
  68. package/dist/translations/pt.js +23 -0
  69. package/dist/translations/ro.d.ts +8 -0
  70. package/dist/translations/ro.js +23 -0
  71. package/dist/translations/ru.d.ts +8 -0
  72. package/dist/translations/ru.js +23 -0
  73. package/dist/translations/sk.d.ts +8 -0
  74. package/dist/translations/sk.js +23 -0
  75. package/dist/translations/sr-latn.d.ts +8 -0
  76. package/dist/translations/sr-latn.js +23 -0
  77. package/dist/translations/sr.d.ts +8 -0
  78. package/dist/translations/sr.js +23 -0
  79. package/dist/translations/sv.d.ts +8 -0
  80. package/dist/translations/sv.js +23 -0
  81. package/dist/translations/th.d.ts +8 -0
  82. package/dist/translations/th.js +23 -0
  83. package/dist/translations/tr.d.ts +8 -0
  84. package/dist/translations/tr.js +23 -0
  85. package/dist/translations/ug.d.ts +8 -0
  86. package/dist/translations/ug.js +23 -0
  87. package/dist/translations/uk.d.ts +8 -0
  88. package/dist/translations/uk.js +23 -0
  89. package/dist/translations/ur.d.ts +8 -0
  90. package/dist/translations/ur.js +23 -0
  91. package/dist/translations/vi.d.ts +8 -0
  92. package/dist/translations/vi.js +23 -0
  93. package/dist/translations/zh-cn.d.ts +8 -0
  94. package/dist/translations/zh-cn.js +23 -0
  95. package/dist/translations/zh.d.ts +8 -0
  96. package/dist/translations/zh.js +23 -0
  97. package/dist/types/augmentation.d.ts +25 -0
  98. package/dist/types/exportword.d.ts +235 -0
  99. package/dist/types/exportwordcommand.d.ts +40 -0
  100. package/dist/types/index.d.ts +14 -0
  101. package/dist/types/utils.d.ts +40 -0
  102. package/package.json +3 -2
  103. package/src/exportword.js +1 -1
  104. package/src/exportwordcommand.js +1 -1
  105. package/src/index.js +1 -1
  106. package/src/utils.js +1 -1
@@ -0,0 +1,235 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module export-word/exportword
11
+ * @publicApi
12
+ */
13
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
14
+ import { Notification } from 'ckeditor5/src/ui.js';
15
+ import type { InitializedToken, TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
16
+ /**
17
+ * The export to Word feature.
18
+ *
19
+ * It allows you to generate a Word file directly from the editor content.
20
+ *
21
+ * For a detailed overview, check the {@glink features/converters/export-word export to Word} feature documentation.
22
+ */
23
+ export default class ExportWord extends Plugin {
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "ExportWord";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get requires(): readonly ["CloudServices", typeof Notification];
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ init(): void;
36
+ }
37
+ /**
38
+ * The configuration of the export to Word feature. It is used by the Word export features from
39
+ * the `@ckeditor/ckeditor5-export-word` package.
40
+ *
41
+ * ```ts
42
+ * ClassicEditor
43
+ * .create( editorElement, {
44
+ * exportWord: ... // Export to Word feature options.
45
+ * } )
46
+ * .then( ... )
47
+ * .catch( ... );
48
+ * ```
49
+ *
50
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
51
+ */
52
+ export interface ExportWordConfig {
53
+ /**
54
+ * Paths to the `.css` files containing additional styling for the editor's content (**the order of provided items matters**).
55
+ *
56
+ * ```ts
57
+ * const exportWordConfig = {
58
+ * stylesheets: [ './path/to/custom-style.css' ]
59
+ * }
60
+ * ```
61
+ *
62
+ * **NOTE:** If `stylesheets` are not provided, the plugin will sent only
63
+ * {@glink installation/advanced/content-styles#the-full-list-of-content-styles the default editor content styles} to the converter.
64
+ *
65
+ * **Default editor's content styles**:
66
+ * {@glink installation/advanced/content-styles#the-full-list-of-content-styles The default editor content styles}
67
+ * are applied to the generated Word file thanks to the 'EDITOR_STYLES' token, which is provided to the `stylesheets` by default.
68
+ * If you don't want them to be applied, you have to omit the token:
69
+ *
70
+ * ```ts
71
+ * const exportWordConfig = {
72
+ * stylesheets: [ './path/to/custom-editor-styles.css' ]
73
+ * }
74
+ * ```
75
+ *
76
+ * **Custom styling:** For more advanced styling, your configuration should look like this:
77
+ *
78
+ * ```ts
79
+ * const exportWordConfig = {
80
+ * stylesheets: [
81
+ * 'EDITOR_STYLES',
82
+ * './path/to/custom-styles.css'
83
+ * ]
84
+ * }
85
+ * ```
86
+ *
87
+ * @default `[ 'EDITOR_STYLES' ]`
88
+ */
89
+ stylesheets?: Array<string>;
90
+ /**
91
+ * The name of the generated Word file.
92
+ *
93
+ * ```ts
94
+ * // Static file name.
95
+ * const exportWordConfig = {
96
+ * fileName: 'my-document.docx'
97
+ * }
98
+ *
99
+ *
100
+ * // Dynamic file name.
101
+ * const exportWordConfig = {
102
+ * fileName: () => {
103
+ * const articleTitle = document.querySelector( '#title' );
104
+ *
105
+ * return `${ articleTitle.value }.docx`;
106
+ * }
107
+ * }
108
+ * ```
109
+ *
110
+ * **NOTE:** The file name must contain the `.docx` extension.
111
+ * Otherwise your operating system or device may have trouble identifying the file type.
112
+ *
113
+ * @default 'document.docx'
114
+ */
115
+ fileName?: string | (() => string);
116
+ /**
117
+ * A URL to the Docx converter.
118
+ *
119
+ * ```ts
120
+ * const exportWordConfig = {
121
+ * converterUrl: 'https://myconverter.com/v1/'
122
+ * }
123
+ * ```
124
+ *
125
+ * **NOTE:** The plugin uses the default HTML to Word converter delivered by CKEditor Cloud Services.
126
+ * You can provide a URL to an on-premises converter instead.
127
+ *
128
+ * @default 'https://docx-converter.cke-cs.com/v1/convert'
129
+ */
130
+ converterUrl?: string;
131
+ /**
132
+ * The CKEditor Cloud Services HTML to DOCX Converter [configuration options](https://docx-converter.cke-cs.com/docs#section/Options).
133
+ *
134
+ * **NOTE:** Configuring the plugin is not mandatory.
135
+ *
136
+ * ```ts
137
+ * const exportWordConfig = {
138
+ * converterOptions: {
139
+ * ...
140
+ * }
141
+ * }
142
+ * ```
143
+ *
144
+ * @default `{
145
+ * format: 'A4',
146
+ * margin_top: '1in',
147
+ * margin_bottom: '1in',
148
+ * margin_right: '1in',
149
+ * margin_left: '1in',
150
+ * header: undefined,
151
+ * footer: undefined,
152
+ * comments: undefined,
153
+ * suggestions: undefined,
154
+ * orientation: 'portrait',
155
+ * auto_pagination: true,
156
+ * base_url: undefined,
157
+ * timezone: 'UTC'
158
+ * }`
159
+ */
160
+ converterOptions?: ExportWordConverterOptions;
161
+ /**
162
+ * A function to gather the HTML to be converted to Word.
163
+ *
164
+ * **NOTE:** This option may be useful when the editor does not have a `getData()` method,
165
+ * or if the HTML to be converted should be different than the edited one.
166
+ *
167
+ * ```ts
168
+ * const exportWordConfig = {
169
+ * dataCallback: ( editor ) => {
170
+ * return `
171
+ * <header id="header">${ editor.data.get( { rootName: 'header' } ) }</header>
172
+ * <div id="content">${ editor.data.get( { rootName: 'content' } ) }</div>
173
+ * `;
174
+ * }
175
+ * }
176
+ * ```
177
+ *
178
+ * @default `( editor ) => editor.getData( { pagination: true } )
179
+ *
180
+ * If using the {@glink features/pagination/pagination pagination} feature, the `pagination:true` option inserts additional markers into
181
+ * editor's data. Thanks to that, the Docx converter creates a Word document similar to what is displayed in the editor.
182
+ */
183
+ dataCallback?: (editor: Editor) => string;
184
+ /**
185
+ * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl` is required for
186
+ * the export to Word feature.
187
+ *
188
+ * **Note:** The token can be disabled with the `false` value provided.
189
+ *
190
+ * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
191
+ */
192
+ tokenUrl?: TokenUrl | false;
193
+ /**
194
+ * The authentication token.
195
+ *
196
+ * See: {@link module:cloud-services/cloudservices~CloudServices#token}
197
+ */
198
+ token?: InitializedToken;
199
+ }
200
+ export type ExportWordConverterOptions = {
201
+ format?: ExportWordConverterFormatOption;
202
+ margin_top?: string;
203
+ margin_bottom?: string;
204
+ margin_right?: string;
205
+ margin_left?: string;
206
+ header?: ExportWordConverterHeaderFooterOption;
207
+ footer?: ExportWordConverterHeaderFooterOption;
208
+ comments?: ExportWordConverterCommentsOption;
209
+ suggestions?: ExportWordConverterSuggestionsOption;
210
+ orientation?: ExportWordConverterOrientationOption;
211
+ auto_pagination?: boolean;
212
+ base_url?: string;
213
+ timezone?: string;
214
+ };
215
+ export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5';
216
+ export type ExportWordConverterOrientationOption = 'portrait' | 'landscape';
217
+ export type ExportWordConverterHeaderFooterOption = Array<{
218
+ html?: string;
219
+ css?: string;
220
+ type?: 'default' | 'even' | 'odd' | 'first';
221
+ }>;
222
+ export type ExportWordConverterCommentsOption = {
223
+ [id: string]: Array<{
224
+ author: string;
225
+ created: Date;
226
+ content?: string;
227
+ is_resolved: boolean;
228
+ }>;
229
+ };
230
+ export type ExportWordConverterSuggestionsOption = {
231
+ [id: string]: {
232
+ author: string;
233
+ created: Date | null;
234
+ };
235
+ };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module export-word/exportwordcommand
11
+ * @publicApi
12
+ */
13
+ import { Command, type Editor } from 'ckeditor5/src/core.js';
14
+ import { type ExportWordConfig } from './exportword.js';
15
+ /**
16
+ * The export to Word command.
17
+ *
18
+ * It takes the editor's HTML and CSS rules from the document and sends them to the HTML to Word converter.
19
+ * After processing, the converter will send back a Word file for download.
20
+ */
21
+ export default class ExportWordCommand extends Command {
22
+ /**
23
+ * A command state that indicates if the command is currently executing.
24
+ *
25
+ * @observable
26
+ */
27
+ isBusy: boolean;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ constructor(editor: Editor);
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ refresh(): void;
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ execute(options?: ExportWordConfig): Promise<void>;
40
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module export-word
11
+ */
12
+ export { default as ExportWord, type ExportWordConfig } from './exportword.js';
13
+ export type { default as ExportWordCommand } from './exportwordcommand.js';
14
+ import './augmentation.js';
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, 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
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ import type { Editor } from 'ckeditor5/src/core.js';
10
+ import type { Collection } from 'ckeditor5/src/utils.js';
11
+ import type { ExportWordConverterOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption } from './exportword.js';
12
+ import type { CommentThread } from '@ckeditor/ckeditor5-comments';
13
+ import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes';
14
+ import type { User } from '@ckeditor/ckeditor5-collaboration-core';
15
+ /**
16
+ * A helper function for getting concatenated CSS rules from external stylesheets.
17
+ *
18
+ * @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
19
+ */
20
+ export declare function getStyles(stylesheets?: Array<string>): Promise<string>;
21
+ /**
22
+ * A helper function for getting a proper options object containing
23
+ * comments, suggestions and the browser's timezone for the "Export to Word" converter.
24
+ *
25
+ * @param editor An editor instance.
26
+ */
27
+ export declare function getConverterOptions(editor: Editor): ExportWordConverterOptions;
28
+ /**
29
+ * A helper function for getting a comments object for the converter options.
30
+ *
31
+ * @param threads The comment threads array.
32
+ */
33
+ export declare function getComments(threads: Array<CommentThread>): ExportWordConverterCommentsOption;
34
+ /**
35
+ * A helper function for getting a suggestions object for the converter options.
36
+ *
37
+ * @param suggestions The suggestions array.
38
+ * @param users A list of all users in the editor.
39
+ */
40
+ export declare function getSuggestions(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOption;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-export-word",
3
- "version": "41.2.1",
3
+ "version": "41.3.0-alpha.2",
4
4
  "description": "Export to Word feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -30,13 +30,14 @@
30
30
  "type": "module",
31
31
  "main": "src/index.js",
32
32
  "dependencies": {
33
- "ckeditor5": "41.2.1"
33
+ "ckeditor5": "41.3.0-alpha.2"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (https://cksource.com/)",
37
37
  "homepage": "https://ckeditor.com/ckeditor-5",
38
38
  "bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
39
39
  "files": [
40
+ "dist",
40
41
  "lang",
41
42
  "src/**/*.js",
42
43
  "src/**/*.d.ts",
package/src/exportword.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2b243c}from'ckeditor5/src/core.js';import{ButtonView as _0x1d2c61,Notification as _0x54f25b,SpinnerView as _0x15fcac}from'ckeditor5/src/ui.js';import _0x1adc36 from'./exportwordcommand.js';import _0x51e9d6 from'../theme/icons/exportword.svg';export default class d extends _0x2b243c{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x54f25b];}['init'](){const _0x5bea06=this['editor'],t=_0x5bea06['t'],_0x153925=_0x5bea06['config']['get']('exportWord')||{};_0x5bea06['commands']['add']('exportWord',new _0x1adc36(_0x5bea06)),_0x5bea06['ui']['componentFactory']['add']('exportWord',_0x419abf=>{const _0x664fc5=_0x5bea06['commands']['get']('exportWord'),_0x9470f5=new _0x1d2c61(_0x419abf),_0x2167b2=new _0x15fcac();return _0x9470f5['set']({'label':t('Export\x20to\x20Word'),'icon':_0x51e9d6,'tooltip':!0x0}),_0x9470f5['children']['add'](_0x2167b2),_0x9470f5['bind']('isOn','isEnabled')['to'](_0x664fc5,'isBusy','isEnabled'),_0x2167b2['bind']('isVisible')['to'](_0x664fc5,'isBusy'),_0x9470f5['iconView']['bind']('isVisible')['to'](_0x664fc5,'isBusy',_0x2de8fa=>!_0x2de8fa),this['listenTo'](_0x9470f5,'execute',()=>{_0x5bea06['execute']('exportWord',_0x153925),_0x5bea06['editing']['view']['focus']();}),_0x9470f5;});const _0x1fa846=_0x5bea06['plugins']['get']('CloudServices');!0x1===_0x153925['tokenUrl']?this['_token']=null:_0x153925['tokenUrl']?_0x1fa846['registerTokenUrl'](_0x153925['tokenUrl'])['then'](_0x14f429=>{this['_token']=_0x14f429;}):this['_token']=_0x1fa846['token'];}}
23
+ import{Plugin as _0x37ce96}from'ckeditor5/src/core.js';import{ButtonView as _0x28a0c4,Notification as _0x7c8647,SpinnerView as _0x4f0fef}from'ckeditor5/src/ui.js';import _0x35e86f from'./exportwordcommand.js';import _0x9949f7 from'../theme/icons/exportword.svg';export default class d extends _0x37ce96{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x7c8647];}['init'](){const _0x2085a1=this['editor'],t=_0x2085a1['t'],_0x39e734=_0x2085a1['config']['get']('exportWord')||{};_0x2085a1['commands']['add']('exportWord',new _0x35e86f(_0x2085a1)),_0x2085a1['ui']['componentFactory']['add']('exportWord',_0x3f9736=>{const _0x58a10f=_0x2085a1['commands']['get']('exportWord'),_0x805eed=new _0x28a0c4(_0x3f9736),_0x1c9481=new _0x4f0fef();return _0x805eed['set']({'label':t('Export\x20to\x20Word'),'icon':_0x9949f7,'tooltip':!0x0}),_0x805eed['children']['add'](_0x1c9481),_0x805eed['bind']('isOn','isEnabled')['to'](_0x58a10f,'isBusy','isEnabled'),_0x1c9481['bind']('isVisible')['to'](_0x58a10f,'isBusy'),_0x805eed['iconView']['bind']('isVisible')['to'](_0x58a10f,'isBusy',_0x248d13=>!_0x248d13),this['listenTo'](_0x805eed,'execute',()=>{_0x2085a1['execute']('exportWord',_0x39e734),_0x2085a1['editing']['view']['focus']();}),_0x805eed;});const _0x3d4a50=_0x2085a1['plugins']['get']('CloudServices');!0x1===_0x39e734['tokenUrl']?this['_token']=null:_0x39e734['tokenUrl']?_0x3d4a50['registerTokenUrl'](_0x39e734['tokenUrl'])['then'](_0x420371=>{this['_token']=_0x420371;}):this['_token']=_0x3d4a50['token'];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1b469b}from'ckeditor5/src/core.js';import{getStyles as _0x2ae59f,getConverterOptions as _0x1090e3}from'./utils.js';export default class i extends _0x1b469b{constructor(_0x1d114e){super(_0x1d114e),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x21b6ef={}){const _0x537837=this['editor'],t=_0x537837['t'],_0x437948=_0x21b6ef['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x509211=_0x21b6ef['converterOptions']||{},_0x1dba79=_0x537837['plugins']['get']('ExportWord'),_0x31fb9b=_0x21b6ef['token']||_0x1dba79['_token'],_0x362ab0=!0x1!==_0x509211['auto_pagination'],_0x46f91f=_0x21b6ef['dataCallback']||(_0x58e0de=>_0x58e0de['data']['get']({'pagination':_0x362ab0}));return this['isBusy']=!0x0,this['refresh'](),_0x2ae59f(_0x21b6ef['stylesheets']||['EDITOR_STYLES'])['then'](async _0x1eb76a=>{const _0x160df7=await _0x46f91f(_0x537837),_0x42a267={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x537837['locale']['contentLanguageDirection']+'\x22>'+_0x160df7+'</div>','css':_0x1eb76a,'options':{..._0x509211,..._0x1090e3(_0x537837)}},_0x42b3a6={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x31fb9b?{'Authorization':_0x31fb9b['value']}:null},'body':JSON['stringify'](_0x42a267)};return window['fetch'](_0x437948,_0x42b3a6)['then'](_0x3f612f=>{if(0xc8!==_0x3f612f['status'])throw _0x3f612f;return _0x3f612f['blob']();})['then'](_0x2719b8=>{const _0xf73101='function'==typeof _0x21b6ef['fileName']?_0x21b6ef['fileName']():_0x21b6ef['fileName'];this['_downloadFile'](_0x2719b8,_0xf73101||'document.docx');});})['catch'](_0x338cdb=>{throw _0x537837['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x338cdb;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x4b4a81,_0x55109e){const _0x4e28c7=document['createElement']('a');_0x4e28c7['href']=window['URL']['createObjectURL'](_0x4b4a81),_0x4e28c7['download']=_0x55109e,_0x4e28c7['click'](),_0x4e28c7['remove']();}}
23
+ import{Command as _0x41de20}from'ckeditor5/src/core.js';import{getStyles as _0x1a6a00,getConverterOptions as _0x4ef4fd}from'./utils.js';export default class i extends _0x41de20{constructor(_0x2df3fd){super(_0x2df3fd),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x530f13={}){const _0x5c2a10=this['editor'],t=_0x5c2a10['t'],_0x13e752=_0x530f13['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x3c2e34=_0x530f13['converterOptions']||{},_0x3ddc4c=_0x5c2a10['plugins']['get']('ExportWord'),_0x41f439=_0x530f13['token']||_0x3ddc4c['_token'],_0x1934ef=!0x1!==_0x3c2e34['auto_pagination'],_0x199fc0=_0x530f13['dataCallback']||(_0x554deb=>_0x554deb['data']['get']({'pagination':_0x1934ef}));return this['isBusy']=!0x0,this['refresh'](),_0x1a6a00(_0x530f13['stylesheets']||['EDITOR_STYLES'])['then'](async _0x2dd152=>{const _0x393590=await _0x199fc0(_0x5c2a10),_0x476a39={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x5c2a10['locale']['contentLanguageDirection']+'\x22>'+_0x393590+'</div>','css':_0x2dd152,'options':{..._0x3c2e34,..._0x4ef4fd(_0x5c2a10)}},_0x6c702={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x41f439?{'Authorization':_0x41f439['value']}:null},'body':JSON['stringify'](_0x476a39)};return window['fetch'](_0x13e752,_0x6c702)['then'](_0x93848=>{if(0xc8!==_0x93848['status'])throw _0x93848;return _0x93848['blob']();})['then'](_0x4a466d=>{const _0x54058d='function'==typeof _0x530f13['fileName']?_0x530f13['fileName']():_0x530f13['fileName'];this['_downloadFile'](_0x4a466d,_0x54058d||'document.docx');});})['catch'](_0x3ab842=>{throw _0x5c2a10['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x3ab842;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0xee7470,_0x20ac82){const _0x89497d=document['createElement']('a');_0x89497d['href']=window['URL']['createObjectURL'](_0xee7470),_0x89497d['download']=_0x20ac82,_0x89497d['click'](),_0x89497d['remove']();}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x53d884,_0x912caf){var _0x352fc2=_0x5c3e,_0x1db28b=_0x53d884();while(!![]){try{var _0x5d65b0=-parseInt(_0x352fc2(0x69))/0x1+-parseInt(_0x352fc2(0x71))/0x2*(-parseInt(_0x352fc2(0x6d))/0x3)+parseInt(_0x352fc2(0x6f))/0x4*(-parseInt(_0x352fc2(0x6e))/0x5)+parseInt(_0x352fc2(0x6a))/0x6+-parseInt(_0x352fc2(0x72))/0x7+-parseInt(_0x352fc2(0x6c))/0x8+-parseInt(_0x352fc2(0x70))/0x9*(-parseInt(_0x352fc2(0x6b))/0xa);if(_0x5d65b0===_0x912caf)break;else _0x1db28b['push'](_0x1db28b['shift']());}catch(_0x22a18d){_0x1db28b['push'](_0x1db28b['shift']());}}}(_0x4846,0xbb902));function _0x5c3e(_0x5e3dba,_0x55d972){var _0x4846ff=_0x4846();return _0x5c3e=function(_0x5c3e4d,_0x4d0b8a){_0x5c3e4d=_0x5c3e4d-0x69;var _0x4b4fa4=_0x4846ff[_0x5c3e4d];return _0x4b4fa4;},_0x5c3e(_0x5e3dba,_0x55d972);}export{default as ExportWord}from'./exportword.js';function _0x4846(){var _0x2d4714=['27MjCJvK','289868VSpifc','1656067vcSMwR','54257XxiRUf','7153308MvUJFt','1450760sCWrej','1298568FWKVfL','18KLdVFF','51855oBzyJG','492HsXQIi'];_0x4846=function(){return _0x2d4714;};return _0x4846();}import'./augmentation.js';
23
+ function _0x4147(_0x50b25c,_0x290935){var _0x81ca35=_0x81ca();return _0x4147=function(_0x4147ef,_0x2af230){_0x4147ef=_0x4147ef-0x8b;var _0x5430c1=_0x81ca35[_0x4147ef];return _0x5430c1;},_0x4147(_0x50b25c,_0x290935);}(function(_0xe705c8,_0x460c2f){var _0x3adf9c=_0x4147,_0x2bb5d1=_0xe705c8();while(!![]){try{var _0x97aa2b=parseInt(_0x3adf9c(0x8f))/0x1+-parseInt(_0x3adf9c(0x92))/0x2*(-parseInt(_0x3adf9c(0x90))/0x3)+-parseInt(_0x3adf9c(0x8b))/0x4*(-parseInt(_0x3adf9c(0x93))/0x5)+parseInt(_0x3adf9c(0x8e))/0x6+-parseInt(_0x3adf9c(0x91))/0x7+parseInt(_0x3adf9c(0x8d))/0x8+-parseInt(_0x3adf9c(0x8c))/0x9;if(_0x97aa2b===_0x460c2f)break;else _0x2bb5d1['push'](_0x2bb5d1['shift']());}catch(_0x5408d1){_0x2bb5d1['push'](_0x2bb5d1['shift']());}}}(_0x81ca,0xd5f81));export{default as ExportWord}from'./exportword.js';import'./augmentation.js';function _0x81ca(){var _0x28d968=['4289148aoLtiL','669840AGzCCI','359430IdUFrN','345399iaRrOP','3768969CXSgSz','3100496BjbMlg','2pIIwRH','1975BCMgew','512gpoAWs'];_0x81ca=function(){return _0x28d968;};return _0x81ca();}
package/src/utils.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x57833b,_0x20d397){const _0x4f874c=_0x24d8,_0x5441ac=_0x57833b();while(!![]){try{const _0x1e9568=-parseInt(_0x4f874c(0x1cf))/0x1+-parseInt(_0x4f874c(0x1b0))/0x2*(-parseInt(_0x4f874c(0x1ce))/0x3)+parseInt(_0x4f874c(0x1d7))/0x4*(-parseInt(_0x4f874c(0x1a8))/0x5)+parseInt(_0x4f874c(0x1bf))/0x6+-parseInt(_0x4f874c(0x1c3))/0x7+-parseInt(_0x4f874c(0x1ba))/0x8*(-parseInt(_0x4f874c(0x1b5))/0x9)+-parseInt(_0x4f874c(0x1b9))/0xa;if(_0x1e9568===_0x20d397)break;else _0x5441ac['push'](_0x5441ac['shift']());}catch(_0x138769){_0x5441ac['push'](_0x5441ac['shift']());}}}(_0x1464,0x7315f));function _0x24d8(_0x2bdce0,_0x426435){const _0x146449=_0x1464();return _0x24d8=function(_0x24d857,_0x2c8ef1){_0x24d857=_0x24d857-0x1a7;let _0x50777f=_0x146449[_0x24d857];return _0x50777f;},_0x24d8(_0x2bdce0,_0x426435);}export function getStyles(_0x2fab03){const _0xed7196=_0x24d8;if(!_0x2fab03)return new Promise(_0xfe0c66=>_0xfe0c66(''));const _0x533d9a=[];for(const _0x3753e9 of _0x2fab03)_0xed7196(0x1d5)!==_0x3753e9?_0x533d9a[_0xed7196(0x1cd)](window[_0xed7196(0x1b1)](_0x3753e9)[_0xed7196(0x1b7)](_0x1976f2=>_0x1976f2[_0xed7196(0x1a7)]())):_0x533d9a[_0xed7196(0x1cd)](u());return Promise[_0xed7196(0x1d8)](_0x533d9a)[_0xed7196(0x1b7)](_0x502611=>_0x502611[_0xed7196(0x1d0)]('\x20')[_0xed7196(0x1c1)]());}function _0x1464(){const _0x4f0a88=['cssRules','CommentsRepository','authorId','map','TrackChanges','push','3JKQXxW','635903QzqTPs','join','name',':root','author','has','EDITOR_STYLES','hasAttribute','348TmRuwG','all','length','isResolved','indexOf','ownerNode','text','8345kfFUFL','DateTimeFormat','styleSheets','resolvedOptions','keys','timeZone','getSuggestions','Users','1113654ASsDQM','fetch','plugins','warn','cssText','108846zMUnBT','from','then','get','7033850OVPPlL','424YDGzuX','content','.ck-content','getCommentThreads','users','4968774NfdBTM','createdAt','trim','suggestions','490392IXIkQI','comments','data-cke','timezone','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.'];_0x1464=function(){return _0x4f0a88;};return _0x1464();}function u(){const _0xe51e4d=_0x24d8,_0x2189ac=[],_0x1595b1=[];for(const _0x53111e of Array[_0xe51e4d(0x1b6)](document[_0xe51e4d(0x1aa)])){if(_0x53111e[_0xe51e4d(0x1dc)][_0xe51e4d(0x1d6)](_0xe51e4d(0x1c5))){for(const _0x278313 of Array[_0xe51e4d(0x1b6)](_0x53111e[_0xe51e4d(0x1c8)]))-0x1!==_0x278313[_0xe51e4d(0x1b4)][_0xe51e4d(0x1db)](_0xe51e4d(0x1bc))?_0x2189ac[_0xe51e4d(0x1cd)](_0x278313[_0xe51e4d(0x1b4)]):-0x1!==_0x278313[_0xe51e4d(0x1b4)][_0xe51e4d(0x1db)](_0xe51e4d(0x1d2))&&_0x1595b1[_0xe51e4d(0x1cd)](_0x278313[_0xe51e4d(0x1b4)]);}}return _0x2189ac[_0xe51e4d(0x1d9)]||console[_0xe51e4d(0x1b3)](_0xe51e4d(0x1c7)),[..._0x1595b1,..._0x2189ac][_0xe51e4d(0x1d0)]('\x20')[_0xe51e4d(0x1c1)]();}export function getConverterOptions(_0xeb747d){const _0x29935b=_0x24d8,_0x20772e=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1d4)](_0x29935b(0x1af)),_0x2b7c32=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1d4)](_0x29935b(0x1c9)),_0x4e8bc6=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1d4)](_0x29935b(0x1cc)),_0x278580={};if(_0x20772e&&_0x2b7c32){const _0xe74f80=getComments(_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1b8)](_0x29935b(0x1c9))[_0x29935b(0x1bd)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x29935b(0x1ac)](_0xe74f80)[_0x29935b(0x1d9)]&&(_0x278580[_0x29935b(0x1c4)]=_0xe74f80);}if(_0x20772e&&_0x4e8bc6){const _0x316e12=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1b8)](_0x29935b(0x1cc)),_0x454be0=_0xeb747d[_0x29935b(0x1b2)][_0x29935b(0x1b8)](_0x29935b(0x1af)),_0x4d7adc=getSuggestions(_0x316e12[_0x29935b(0x1ae)]({'toJSON':!0x0}),_0x454be0[_0x29935b(0x1be)]);Object[_0x29935b(0x1ac)](_0x4d7adc)[_0x29935b(0x1d9)]&&(_0x278580[_0x29935b(0x1c2)]=_0x4d7adc);}return(_0x278580[_0x29935b(0x1c2)]||_0x278580[_0x29935b(0x1c4)])&&(_0x278580[_0x29935b(0x1c6)]=new Intl[(_0x29935b(0x1a9))]()[_0x29935b(0x1ab)]()[_0x29935b(0x1ad)]),_0x278580;}export function getComments(_0x52339a){const _0x1703e5=_0x24d8,_0x2d1853={};if(!_0x52339a[_0x1703e5(0x1d9)])return _0x2d1853;for(const _0x538d63 of _0x52339a)_0x538d63[_0x1703e5(0x1c4)][_0x1703e5(0x1cb)](_0x47de94=>{const _0x4013e6=_0x1703e5;void 0x0===_0x2d1853[_0x538d63['id']]&&(_0x2d1853[_0x538d63['id']]=[]),_0x2d1853[_0x538d63['id']][_0x4013e6(0x1cd)]({'author':_0x47de94[_0x4013e6(0x1d3)][_0x4013e6(0x1d1)],'content':_0x47de94[_0x4013e6(0x1bb)],'created':_0x47de94[_0x4013e6(0x1c0)],'is_resolved':_0x538d63[_0x4013e6(0x1da)]});});return _0x2d1853;}export function getSuggestions(_0xaf9259,_0x4e736e){const _0x482656=_0x24d8,_0xa05338={};if(!_0xaf9259[_0x482656(0x1d9)]||!_0x4e736e[_0x482656(0x1d9)])return _0xa05338;for(const _0x11a928 of _0xaf9259)_0xa05338[_0x11a928['id']]={'author':_0x4e736e[_0x482656(0x1b8)](_0x11a928[_0x482656(0x1ca)])[_0x482656(0x1d1)],'created':_0x11a928[_0x482656(0x1c0)]};return _0xa05338;}
23
+ (function(_0x56a2e5,_0x379a75){const _0x1f66e4=_0x1716,_0x8c7bed=_0x56a2e5();while(!![]){try{const _0x1986d8=-parseInt(_0x1f66e4(0x189))/0x1+-parseInt(_0x1f66e4(0x16e))/0x2+parseInt(_0x1f66e4(0x16a))/0x3+-parseInt(_0x1f66e4(0x15a))/0x4*(-parseInt(_0x1f66e4(0x173))/0x5)+-parseInt(_0x1f66e4(0x183))/0x6*(parseInt(_0x1f66e4(0x180))/0x7)+parseInt(_0x1f66e4(0x184))/0x8*(-parseInt(_0x1f66e4(0x17b))/0x9)+parseInt(_0x1f66e4(0x185))/0xa*(parseInt(_0x1f66e4(0x15b))/0xb);if(_0x1986d8===_0x379a75)break;else _0x8c7bed['push'](_0x8c7bed['shift']());}catch(_0x3c3a4c){_0x8c7bed['push'](_0x8c7bed['shift']());}}}(_0x5a8b,0x43e81));export function getStyles(_0x4becdd){const _0xa68651=_0x1716;if(!_0x4becdd)return new Promise(_0x34d978=>_0x34d978(''));const _0x5cd29c=[];for(const _0x5ddee9 of _0x4becdd)_0xa68651(0x15e)!==_0x5ddee9?_0x5cd29c[_0xa68651(0x18b)](window[_0xa68651(0x181)](_0x5ddee9)[_0xa68651(0x159)](_0x3cb304=>_0x3cb304[_0xa68651(0x15d)]())):_0x5cd29c[_0xa68651(0x18b)](u());return Promise[_0xa68651(0x179)](_0x5cd29c)[_0xa68651(0x159)](_0x5cd45a=>_0x5cd45a[_0xa68651(0x17c)]('\x20')[_0xa68651(0x170)]());}function u(){const _0x91c17d=_0x1716,_0x5ca82c=[],_0x4e9efc=[];for(const _0xb86717 of Array[_0x91c17d(0x176)](document[_0x91c17d(0x188)])){if(_0xb86717[_0x91c17d(0x15c)][_0x91c17d(0x178)](_0x91c17d(0x162))){for(const _0x1955e1 of Array[_0x91c17d(0x176)](_0xb86717[_0x91c17d(0x174)]))-0x1!==_0x1955e1[_0x91c17d(0x187)][_0x91c17d(0x17d)](_0x91c17d(0x160))?_0x5ca82c[_0x91c17d(0x18b)](_0x1955e1[_0x91c17d(0x187)]):-0x1!==_0x1955e1[_0x91c17d(0x187)][_0x91c17d(0x17d)](_0x91c17d(0x17a))&&_0x4e9efc[_0x91c17d(0x18b)](_0x1955e1[_0x91c17d(0x187)]);}}return _0x5ca82c[_0x91c17d(0x161)]||console[_0x91c17d(0x167)](_0x91c17d(0x16c)),[..._0x4e9efc,..._0x5ca82c][_0x91c17d(0x17c)]('\x20')[_0x91c17d(0x170)]();}function _0x5a8b(){const _0x5340e6=['styleSheets','76746AWjRTl','name','push','getCommentThreads','Users','TrackChanges','createdAt','then','12SQtxLS','128194VhWFqe','ownerNode','text','EDITOR_STYLES','keys','.ck-content','length','data-cke','DateTimeFormat','authorId','isResolved','CommentsRepository','warn','plugins','getSuggestions','18720dygpnB','resolvedOptions','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','comments','41090zjSnWF','get','trim','content','map','680045FBJvrQ','cssRules','has','from','timezone','hasAttribute','all',':root','18NAHPdb','join','indexOf','suggestions','author','7DSFzjq','fetch','users','1645146dlonNo','969816hwekoM','410cSNBBW','timeZone','cssText'];_0x5a8b=function(){return _0x5340e6;};return _0x5a8b();}export function getConverterOptions(_0x49c578){const _0xb4da5b=_0x1716,_0x45ad39=_0x49c578[_0xb4da5b(0x168)][_0xb4da5b(0x175)](_0xb4da5b(0x18d)),_0x184138=_0x49c578[_0xb4da5b(0x168)][_0xb4da5b(0x175)](_0xb4da5b(0x166)),_0x5626f4=_0x49c578[_0xb4da5b(0x168)][_0xb4da5b(0x175)](_0xb4da5b(0x157)),_0x41c677={};if(_0x45ad39&&_0x184138){const _0xee2cd3=getComments(_0x49c578[_0xb4da5b(0x168)][_0xb4da5b(0x16f)](_0xb4da5b(0x166))[_0xb4da5b(0x18c)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0xb4da5b(0x15f)](_0xee2cd3)[_0xb4da5b(0x161)]&&(_0x41c677[_0xb4da5b(0x16d)]=_0xee2cd3);}if(_0x45ad39&&_0x5626f4){const _0x42d3b0=_0x49c578[_0xb4da5b(0x168)][_0xb4da5b(0x16f)](_0xb4da5b(0x157)),_0x5e8ea8=_0x49c578[_0xb4da5b(0x168)][_0xb4da5b(0x16f)](_0xb4da5b(0x18d)),_0x4dcf19=getSuggestions(_0x42d3b0[_0xb4da5b(0x169)]({'toJSON':!0x0}),_0x5e8ea8[_0xb4da5b(0x182)]);Object[_0xb4da5b(0x15f)](_0x4dcf19)[_0xb4da5b(0x161)]&&(_0x41c677[_0xb4da5b(0x17e)]=_0x4dcf19);}return(_0x41c677[_0xb4da5b(0x17e)]||_0x41c677[_0xb4da5b(0x16d)])&&(_0x41c677[_0xb4da5b(0x177)]=new Intl[(_0xb4da5b(0x163))]()[_0xb4da5b(0x16b)]()[_0xb4da5b(0x186)]),_0x41c677;}export function getComments(_0x3343d7){const _0x2cef69=_0x1716,_0x2d8c9d={};if(!_0x3343d7[_0x2cef69(0x161)])return _0x2d8c9d;for(const _0x48e944 of _0x3343d7)_0x48e944[_0x2cef69(0x16d)][_0x2cef69(0x172)](_0x37fdc3=>{const _0xffe958=_0x2cef69;void 0x0===_0x2d8c9d[_0x48e944['id']]&&(_0x2d8c9d[_0x48e944['id']]=[]),_0x2d8c9d[_0x48e944['id']][_0xffe958(0x18b)]({'author':_0x37fdc3[_0xffe958(0x17f)][_0xffe958(0x18a)],'content':_0x37fdc3[_0xffe958(0x171)],'created':_0x37fdc3[_0xffe958(0x158)],'is_resolved':_0x48e944[_0xffe958(0x165)]});});return _0x2d8c9d;}function _0x1716(_0xef81bf,_0x32260a){const _0x5a8bb9=_0x5a8b();return _0x1716=function(_0x1716af,_0x5b03d6){_0x1716af=_0x1716af-0x157;let _0x497c87=_0x5a8bb9[_0x1716af];return _0x497c87;},_0x1716(_0xef81bf,_0x32260a);}export function getSuggestions(_0x1186a7,_0x22509a){const _0x11e0b7=_0x1716,_0x4818ae={};if(!_0x1186a7[_0x11e0b7(0x161)]||!_0x22509a[_0x11e0b7(0x161)])return _0x4818ae;for(const _0x4810c6 of _0x1186a7)_0x4818ae[_0x4810c6['id']]={'author':_0x22509a[_0x11e0b7(0x16f)](_0x4810c6[_0x11e0b7(0x164)])[_0x11e0b7(0x18a)],'created':_0x4810c6[_0x11e0b7(0x158)]};return _0x4818ae;}