@ckeditor/ckeditor5-export-word 41.2.0 → 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.0",
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.0"
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 _0x26d46f}from'ckeditor5/src/core.js';import{ButtonView as _0x48b7a5,Notification as _0x2a7895,SpinnerView as _0x19704b}from'ckeditor5/src/ui.js';import _0x39c966 from'./exportwordcommand.js';import _0x4d3d2a from'../theme/icons/exportword.svg';export default class d extends _0x26d46f{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x2a7895];}['init'](){const _0x3c7507=this['editor'],t=_0x3c7507['t'],_0x3b1ca8=_0x3c7507['config']['get']('exportWord')||{};_0x3c7507['commands']['add']('exportWord',new _0x39c966(_0x3c7507)),_0x3c7507['ui']['componentFactory']['add']('exportWord',_0x58ee85=>{const _0x5f22a1=_0x3c7507['commands']['get']('exportWord'),_0x2cfb02=new _0x48b7a5(_0x58ee85),_0x536efa=new _0x19704b();return _0x2cfb02['set']({'label':t('Export\x20to\x20Word'),'icon':_0x4d3d2a,'tooltip':!0x0}),_0x2cfb02['children']['add'](_0x536efa),_0x2cfb02['bind']('isOn','isEnabled')['to'](_0x5f22a1,'isBusy','isEnabled'),_0x536efa['bind']('isVisible')['to'](_0x5f22a1,'isBusy'),_0x2cfb02['iconView']['bind']('isVisible')['to'](_0x5f22a1,'isBusy',_0x208c4c=>!_0x208c4c),this['listenTo'](_0x2cfb02,'execute',()=>{_0x3c7507['execute']('exportWord',_0x3b1ca8),_0x3c7507['editing']['view']['focus']();}),_0x2cfb02;});const _0x18ea0e=_0x3c7507['plugins']['get']('CloudServices');!0x1===_0x3b1ca8['tokenUrl']?this['_token']=null:_0x3b1ca8['tokenUrl']?_0x18ea0e['registerTokenUrl'](_0x3b1ca8['tokenUrl'])['then'](_0x66d0=>{this['_token']=_0x66d0;}):this['_token']=_0x18ea0e['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 _0x574bbb}from'ckeditor5/src/core.js';import{getStyles as _0x2d5b7f,getConverterOptions as _0x34cd77}from'./utils.js';export default class i extends _0x574bbb{constructor(_0x223aa5){super(_0x223aa5),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x46af4b={}){const _0x4707e1=this['editor'],t=_0x4707e1['t'],_0x1a3fab=_0x46af4b['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0xc8c6f6=_0x46af4b['converterOptions']||{},_0x546674=_0x4707e1['plugins']['get']('ExportWord'),_0x35a5c2=_0x46af4b['token']||_0x546674['_token'],_0xebb55c=!0x1!==_0xc8c6f6['auto_pagination'],_0x5a9063=_0x46af4b['dataCallback']||(_0x31ae37=>_0x31ae37['data']['get']({'pagination':_0xebb55c}));return this['isBusy']=!0x0,this['refresh'](),_0x2d5b7f(_0x46af4b['stylesheets']||['EDITOR_STYLES'])['then'](async _0x1d415f=>{const _0x3e9ee3=await _0x5a9063(_0x4707e1),_0x58211a={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x4707e1['locale']['contentLanguageDirection']+'\x22>'+_0x3e9ee3+'</div>','css':_0x1d415f,'options':{..._0xc8c6f6,..._0x34cd77(_0x4707e1)}},_0x2a7e37={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x35a5c2?{'Authorization':_0x35a5c2['value']}:null},'body':JSON['stringify'](_0x58211a)};return window['fetch'](_0x1a3fab,_0x2a7e37)['then'](_0x5211a3=>{if(0xc8!==_0x5211a3['status'])throw _0x5211a3;return _0x5211a3['blob']();})['then'](_0x1e7eef=>{const _0x5047b3='function'==typeof _0x46af4b['fileName']?_0x46af4b['fileName']():_0x46af4b['fileName'];this['_downloadFile'](_0x1e7eef,_0x5047b3||'document.docx');});})['catch'](_0x1c6219=>{throw _0x4707e1['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x1c6219;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x804289,_0x37276c){const _0x404444=document['createElement']('a');_0x404444['href']=window['URL']['createObjectURL'](_0x804289),_0x404444['download']=_0x37276c,_0x404444['click'](),_0x404444['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(_0x294dbf,_0x1e5487){var _0x31d3ec=_0x5e9f,_0x54f7a3=_0x294dbf();while(!![]){try{var _0x3dd86c=parseInt(_0x31d3ec(0x9a))/0x1*(-parseInt(_0x31d3ec(0x92))/0x2)+-parseInt(_0x31d3ec(0x98))/0x3+parseInt(_0x31d3ec(0x96))/0x4*(parseInt(_0x31d3ec(0x93))/0x5)+parseInt(_0x31d3ec(0x95))/0x6+parseInt(_0x31d3ec(0x9b))/0x7+-parseInt(_0x31d3ec(0x99))/0x8*(-parseInt(_0x31d3ec(0x94))/0x9)+-parseInt(_0x31d3ec(0x97))/0xa;if(_0x3dd86c===_0x1e5487)break;else _0x54f7a3['push'](_0x54f7a3['shift']());}catch(_0x8aa9f){_0x54f7a3['push'](_0x54f7a3['shift']());}}}(_0x1123,0x5c363));export{default as ExportWord}from'./exportword.js';function _0x5e9f(_0x569aee,_0x54a119){var _0x11237=_0x1123();return _0x5e9f=function(_0x5e9f67,_0x5266b3){_0x5e9f67=_0x5e9f67-0x92;var _0x4ae654=_0x11237[_0x5e9f67];return _0x4ae654;},_0x5e9f(_0x569aee,_0x54a119);}function _0x1123(){var _0x32110d=['5ojLxBE','2182446UywqjI','126774jkqVjR','10PeDhsy','3973824NDQziA','4083846Pargwu','703144gHgwYi','9611590OPhXbF','389202oxDWbg','8FTGpgr'];_0x1123=function(){return _0x32110d;};return _0x1123();}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(_0x178e82,_0x22c18f){const _0x4ec1b6=_0x40e3,_0xe42f3f=_0x178e82();while(!![]){try{const _0x2cc793=-parseInt(_0x4ec1b6(0x1af))/0x1+-parseInt(_0x4ec1b6(0x191))/0x2*(parseInt(_0x4ec1b6(0x18f))/0x3)+-parseInt(_0x4ec1b6(0x1ab))/0x4+-parseInt(_0x4ec1b6(0x19e))/0x5*(-parseInt(_0x4ec1b6(0x1a7))/0x6)+-parseInt(_0x4ec1b6(0x1a9))/0x7+parseInt(_0x4ec1b6(0x19c))/0x8+parseInt(_0x4ec1b6(0x1a1))/0x9;if(_0x2cc793===_0x22c18f)break;else _0xe42f3f['push'](_0xe42f3f['shift']());}catch(_0x53b6b8){_0xe42f3f['push'](_0xe42f3f['shift']());}}}(_0x225b,0xb4752));export function getStyles(_0x955e40){const _0x55498e=_0x40e3;if(!_0x955e40)return new Promise(_0x1056b3=>_0x1056b3(''));const _0x290353=[];for(const _0x26d8d9 of _0x955e40)_0x55498e(0x195)!==_0x26d8d9?_0x290353[_0x55498e(0x1b7)](window[_0x55498e(0x1a5)](_0x26d8d9)[_0x55498e(0x198)](_0x56c2b8=>_0x56c2b8[_0x55498e(0x1b9)]())):_0x290353[_0x55498e(0x1b7)](u());return Promise[_0x55498e(0x199)](_0x290353)[_0x55498e(0x198)](_0x128558=>_0x128558[_0x55498e(0x1b4)]('\x20')[_0x55498e(0x1ad)]());}function u(){const _0x432e90=_0x40e3,_0x33d6e1=[],_0x10fdbf=[];for(const _0x466dcb of Array[_0x432e90(0x1b0)](document[_0x432e90(0x190)])){if(_0x466dcb[_0x432e90(0x19f)][_0x432e90(0x1ae)](_0x432e90(0x1b6))){for(const _0x10967f of Array[_0x432e90(0x1b0)](_0x466dcb[_0x432e90(0x18d)]))-0x1!==_0x10967f[_0x432e90(0x1ba)][_0x432e90(0x19d)](_0x432e90(0x1b8))?_0x33d6e1[_0x432e90(0x1b7)](_0x10967f[_0x432e90(0x1ba)]):-0x1!==_0x10967f[_0x432e90(0x1ba)][_0x432e90(0x19d)](_0x432e90(0x19a))&&_0x10fdbf[_0x432e90(0x1b7)](_0x10967f[_0x432e90(0x1ba)]);}}return _0x33d6e1[_0x432e90(0x192)]||console[_0x432e90(0x18a)](_0x432e90(0x194)),[..._0x10fdbf,..._0x33d6e1][_0x432e90(0x1b4)]('\x20')[_0x432e90(0x1ad)]();}function _0x40e3(_0x39550c,_0x5dd8f9){const _0x225bd7=_0x225b();return _0x40e3=function(_0x40e36f,_0x197888){_0x40e36f=_0x40e36f-0x189;let _0x5552c5=_0x225bd7[_0x40e36f];return _0x5552c5;},_0x40e3(_0x39550c,_0x5dd8f9);}export function getConverterOptions(_0x3987fd){const _0x5b1082=_0x40e3,_0x7c847f=_0x3987fd[_0x5b1082(0x1bd)][_0x5b1082(0x1a6)](_0x5b1082(0x193)),_0x3c090b=_0x3987fd[_0x5b1082(0x1bd)][_0x5b1082(0x1a6)](_0x5b1082(0x1b3)),_0x2fe83f=_0x3987fd[_0x5b1082(0x1bd)][_0x5b1082(0x1a6)](_0x5b1082(0x1b5)),_0xda91db={};if(_0x7c847f&&_0x3c090b){const _0x2f627f=getComments(_0x3987fd[_0x5b1082(0x1bd)][_0x5b1082(0x1b1)](_0x5b1082(0x1b3))[_0x5b1082(0x197)]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x5b1082(0x1bb)](_0x2f627f)[_0x5b1082(0x192)]&&(_0xda91db[_0x5b1082(0x18c)]=_0x2f627f);}if(_0x7c847f&&_0x2fe83f){const _0x4084dc=_0x3987fd[_0x5b1082(0x1bd)][_0x5b1082(0x1b1)](_0x5b1082(0x1b5)),_0x11f731=_0x3987fd[_0x5b1082(0x1bd)][_0x5b1082(0x1b1)](_0x5b1082(0x193)),_0x4122fb=getSuggestions(_0x4084dc[_0x5b1082(0x1a4)]({'toJSON':!0x0}),_0x11f731[_0x5b1082(0x1aa)]);Object[_0x5b1082(0x1bb)](_0x4122fb)[_0x5b1082(0x192)]&&(_0xda91db[_0x5b1082(0x1a8)]=_0x4122fb);}return(_0xda91db[_0x5b1082(0x1a8)]||_0xda91db[_0x5b1082(0x18c)])&&(_0xda91db[_0x5b1082(0x196)]=new Intl[(_0x5b1082(0x19b))]()[_0x5b1082(0x1a0)]()[_0x5b1082(0x18b)]),_0xda91db;}export function getComments(_0x3a76b0){const _0x7e31d5=_0x40e3,_0x1d1224={};if(!_0x3a76b0[_0x7e31d5(0x192)])return _0x1d1224;for(const _0x1965ec of _0x3a76b0)_0x1965ec[_0x7e31d5(0x18c)][_0x7e31d5(0x189)](_0x9bd3c2=>{const _0x3b2511=_0x7e31d5;void 0x0===_0x1d1224[_0x1965ec['id']]&&(_0x1d1224[_0x1965ec['id']]=[]),_0x1d1224[_0x1965ec['id']][_0x3b2511(0x1b7)]({'author':_0x9bd3c2[_0x3b2511(0x18e)][_0x3b2511(0x1ac)],'content':_0x9bd3c2[_0x3b2511(0x1a2)],'created':_0x9bd3c2[_0x3b2511(0x1b2)],'is_resolved':_0x1965ec[_0x3b2511(0x1bc)]});});return _0x1d1224;}function _0x225b(){const _0x46d38e=['then','all',':root','DateTimeFormat','11102848JQKlvT','indexOf','83735aKRmQT','ownerNode','resolvedOptions','20728359CEjWni','content','authorId','getSuggestions','fetch','has','42bkKXgT','suggestions','2772126UCpMQC','users','5725240WMItbu','name','trim','hasAttribute','455768errQFc','from','get','createdAt','CommentsRepository','join','TrackChanges','data-cke','push','.ck-content','text','cssText','keys','isResolved','plugins','map','warn','timeZone','comments','cssRules','author','489qUNORd','styleSheets','9644LhWgIz','length','Users','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.','EDITOR_STYLES','timezone','getCommentThreads'];_0x225b=function(){return _0x46d38e;};return _0x225b();}export function getSuggestions(_0x2a18be,_0x439567){const _0x53e229=_0x40e3,_0x1ed46c={};if(!_0x2a18be[_0x53e229(0x192)]||!_0x439567[_0x53e229(0x192)])return _0x1ed46c;for(const _0x1c8574 of _0x2a18be)_0x1ed46c[_0x1c8574['id']]={'author':_0x439567[_0x53e229(0x1b1)](_0x1c8574[_0x53e229(0x1a3)])[_0x53e229(0x1ac)],'created':_0x1c8574[_0x53e229(0x1b2)]};return _0x1ed46c;}
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;}