@ckeditor/ckeditor5-export-pdf 41.3.0 → 41.4.0-alpha.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 (114) hide show
  1. package/build/export-pdf.js +1 -1
  2. package/dist/index-content.css +4 -0
  3. package/dist/index-editor.css +4 -0
  4. package/dist/index.css +4 -0
  5. package/dist/index.js +23 -0
  6. package/dist/translations/af.d.ts +8 -0
  7. package/dist/translations/af.js +23 -0
  8. package/dist/translations/ar.d.ts +8 -0
  9. package/dist/translations/ar.js +23 -0
  10. package/dist/translations/bg.d.ts +8 -0
  11. package/dist/translations/bg.js +23 -0
  12. package/dist/translations/bn.d.ts +8 -0
  13. package/dist/translations/bn.js +23 -0
  14. package/dist/translations/ca.d.ts +8 -0
  15. package/dist/translations/ca.js +23 -0
  16. package/dist/translations/cs.d.ts +8 -0
  17. package/dist/translations/cs.js +23 -0
  18. package/dist/translations/da.d.ts +8 -0
  19. package/dist/translations/da.js +23 -0
  20. package/dist/translations/de.d.ts +8 -0
  21. package/dist/translations/de.js +23 -0
  22. package/dist/translations/el.d.ts +8 -0
  23. package/dist/translations/el.js +23 -0
  24. package/dist/translations/en-au.d.ts +8 -0
  25. package/dist/translations/en-au.js +23 -0
  26. package/dist/translations/en.d.ts +8 -0
  27. package/dist/translations/en.js +23 -0
  28. package/dist/translations/es-co.d.ts +8 -0
  29. package/dist/translations/es-co.js +23 -0
  30. package/dist/translations/es.d.ts +8 -0
  31. package/dist/translations/es.js +23 -0
  32. package/dist/translations/et.d.ts +8 -0
  33. package/dist/translations/et.js +23 -0
  34. package/dist/translations/fi.d.ts +8 -0
  35. package/dist/translations/fi.js +23 -0
  36. package/dist/translations/fr.d.ts +8 -0
  37. package/dist/translations/fr.js +23 -0
  38. package/dist/translations/gl.d.ts +8 -0
  39. package/dist/translations/gl.js +23 -0
  40. package/dist/translations/he.d.ts +8 -0
  41. package/dist/translations/he.js +23 -0
  42. package/dist/translations/hi.d.ts +8 -0
  43. package/dist/translations/hi.js +23 -0
  44. package/dist/translations/hr.d.ts +8 -0
  45. package/dist/translations/hr.js +23 -0
  46. package/dist/translations/hu.d.ts +8 -0
  47. package/dist/translations/hu.js +23 -0
  48. package/dist/translations/id.d.ts +8 -0
  49. package/dist/translations/id.js +23 -0
  50. package/dist/translations/it.d.ts +8 -0
  51. package/dist/translations/it.js +23 -0
  52. package/dist/translations/ja.d.ts +8 -0
  53. package/dist/translations/ja.js +23 -0
  54. package/dist/translations/jv.d.ts +8 -0
  55. package/dist/translations/jv.js +23 -0
  56. package/dist/translations/ko.d.ts +8 -0
  57. package/dist/translations/ko.js +23 -0
  58. package/dist/translations/lt.d.ts +8 -0
  59. package/dist/translations/lt.js +23 -0
  60. package/dist/translations/lv.d.ts +8 -0
  61. package/dist/translations/lv.js +23 -0
  62. package/dist/translations/ms.d.ts +8 -0
  63. package/dist/translations/ms.js +23 -0
  64. package/dist/translations/nl.d.ts +8 -0
  65. package/dist/translations/nl.js +23 -0
  66. package/dist/translations/no.d.ts +8 -0
  67. package/dist/translations/no.js +23 -0
  68. package/dist/translations/pl.d.ts +8 -0
  69. package/dist/translations/pl.js +23 -0
  70. package/dist/translations/pt-br.d.ts +8 -0
  71. package/dist/translations/pt-br.js +23 -0
  72. package/dist/translations/pt.d.ts +8 -0
  73. package/dist/translations/pt.js +23 -0
  74. package/dist/translations/ro.d.ts +8 -0
  75. package/dist/translations/ro.js +23 -0
  76. package/dist/translations/ru.d.ts +8 -0
  77. package/dist/translations/ru.js +23 -0
  78. package/dist/translations/sk.d.ts +8 -0
  79. package/dist/translations/sk.js +23 -0
  80. package/dist/translations/sr-latn.d.ts +8 -0
  81. package/dist/translations/sr-latn.js +23 -0
  82. package/dist/translations/sr.d.ts +8 -0
  83. package/dist/translations/sr.js +23 -0
  84. package/dist/translations/sv.d.ts +8 -0
  85. package/dist/translations/sv.js +23 -0
  86. package/dist/translations/th.d.ts +8 -0
  87. package/dist/translations/th.js +23 -0
  88. package/dist/translations/tr.d.ts +8 -0
  89. package/dist/translations/tr.js +23 -0
  90. package/dist/translations/ug.d.ts +8 -0
  91. package/dist/translations/ug.js +23 -0
  92. package/dist/translations/uk.d.ts +8 -0
  93. package/dist/translations/uk.js +23 -0
  94. package/dist/translations/ur.d.ts +8 -0
  95. package/dist/translations/ur.js +23 -0
  96. package/dist/translations/vi.d.ts +8 -0
  97. package/dist/translations/vi.js +23 -0
  98. package/dist/translations/zh-cn.d.ts +8 -0
  99. package/dist/translations/zh-cn.js +23 -0
  100. package/dist/translations/zh.d.ts +8 -0
  101. package/dist/translations/zh.js +23 -0
  102. package/dist/types/augmentation.d.ts +25 -0
  103. package/dist/types/exportpdf.d.ts +225 -0
  104. package/dist/types/exportpdfcommand.d.ts +43 -0
  105. package/dist/types/exportpdfui.d.ts +27 -0
  106. package/dist/types/index.d.ts +14 -0
  107. package/dist/types/utils.d.ts +14 -0
  108. package/lang/contexts.json +4 -1
  109. package/package.json +3 -2
  110. package/src/exportpdf.js +1 -1
  111. package/src/exportpdfcommand.js +1 -1
  112. package/src/exportpdfui.js +1 -1
  113. package/src/index.js +1 -1
  114. package/src/utils.js +1 -1
@@ -0,0 +1,225 @@
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-pdf/exportpdf
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
+ import ExportPdfUI from './exportpdfui.js';
17
+ /**
18
+ * The export to PDF feature.
19
+ *
20
+ * It allows you to generate a PDF file directly from the editor content.
21
+ *
22
+ * For a detailed overview, check the {@glink features/converters/export-pdf export to PDF} feature documentation.
23
+ */
24
+ export default class ExportPdf extends Plugin {
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get pluginName(): "ExportPdf";
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static get requires(): readonly ["CloudServices", typeof Notification, typeof ExportPdfUI];
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ init(): void;
37
+ }
38
+ /**
39
+ * The configuration of the export to PDF feature. It is used by the PDF export features from the `@ckeditor/ckeditor5-export-pdf` package.
40
+ *
41
+ * ```ts
42
+ * ClassicEditor
43
+ * .create( editorElement, {
44
+ * exportPdf: ... // Export to PDF feature options.
45
+ * } )
46
+ * .then( ... )
47
+ * .catch( ... );
48
+ * ```
49
+ *
50
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
51
+ */
52
+ export interface ExportPdfConfig {
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 exportPdfConfig = {
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 PDF 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 exportPdfConfig = {
72
+ * stylesheets: [ './path/to/custom-editor-styles.css' ]
73
+ * }
74
+ * ```
75
+ *
76
+ * **Web fonts:** If you want to {@glink features/converters/export-pdf#providing-web-font-styles use web fonts} in your PDF document,
77
+ * you should provide a path to the file containing the web font declaration before the `'EDITOR_STYLES'` token:
78
+ *
79
+ * ```ts
80
+ * const exportPdfConfig = {
81
+ * stylesheets: [
82
+ * './path/to/fonts.css',
83
+ * 'EDITOR_STYLES'
84
+ * ]
85
+ * }
86
+ * ```
87
+ *
88
+ * **Web fonts and custom styling:** For more advanced styling, your configuration should look like this:
89
+ *
90
+ * ```ts
91
+ * const exportPdfConfig = {
92
+ * stylesheets: [
93
+ * './path/to/fonts.css',
94
+ * 'EDITOR_STYLES',
95
+ * './path/to/custom-styles.css'
96
+ * ]
97
+ * }
98
+ * ```
99
+ *
100
+ * @default `[ 'EDITOR_STYLES' ]`
101
+ */
102
+ stylesheets?: Array<string>;
103
+ /**
104
+ * The name of the generated PDF file.
105
+ *
106
+ * ```ts
107
+ * // Static file name.
108
+ * const exportPdfConfig = {
109
+ * fileName: 'my-document.pdf'
110
+ * }
111
+ *
112
+ * // Dynamic file name.
113
+ * const exportPdfConfig = {
114
+ * fileName: () => {
115
+ * const articleTitle = document.querySelector( '#title' );
116
+ *
117
+ * return `${ articleTitle.value }.pdf`;
118
+ * }
119
+ * }
120
+ * ```
121
+ *
122
+ * **NOTE:** The file name must contain the `.pdf` extension.
123
+ * Otherwise your operating system or device may have trouble identifying the file type.
124
+ *
125
+ * @default 'document.pdf'
126
+ */
127
+ fileName?: string | (() => string);
128
+ /**
129
+ * A URL to the HTML to PDF converter.
130
+ *
131
+ * ```ts
132
+ * const exportPdfConfig = {
133
+ * converterUrl: 'https://myconverter.com/v1/'
134
+ * }
135
+ * ```
136
+ *
137
+ * **NOTE:** The plugin uses the default HTML to PDF converter delivered by CKEditor Cloud Services.
138
+ * You can provide a URL to an on-premises converter instead.
139
+ *
140
+ * @default 'https://pdf-converter.cke-cs.com/v1/convert'
141
+ */
142
+ converterUrl?: string;
143
+ /**
144
+ * The HTML to PDF converter options.
145
+ *
146
+ * **NOTE:** Configuring the plugin is not mandatory but it is highly recommended,
147
+ * especially if you want to get the most accurate results when generating the PDF file.
148
+ * To learn more, please check the [HTML to PDF converter configuration](https://pdf-converter.cke-cs.com/docs).
149
+ *
150
+ * ```ts
151
+ * const exportPdfConfig = {
152
+ * converterOptions: {
153
+ * ...
154
+ * }
155
+ * }
156
+ * ```
157
+ *
158
+ * @default `{
159
+ * format: 'A4',
160
+ * margin_top: '0',
161
+ * margin_bottom: '0',
162
+ * margin_right: '0',
163
+ * margin_left: '0',
164
+ * page_orientation: 'portrait',
165
+ * header_html: undefined,
166
+ * footer_html: undefined,
167
+ * header_and_footer_css: undefined,
168
+ * wait_for_network: true,
169
+ * wait_time: 0
170
+ * }`
171
+ */
172
+ converterOptions?: ExportPdfConverterOptions;
173
+ /**
174
+ * A function to gather the HTML to be converted to PDF.
175
+ *
176
+ * **NOTE:** This option may be useful when the editor does not have `getData()` method,
177
+ * or if the HTML to be converted should be different than the edited one.
178
+ *
179
+ * ```ts
180
+ * const exportPdfConfig = {
181
+ * dataCallback: ( editor: Editor ) => {
182
+ * return `
183
+ * <header id="header">${ editor.data.get( { rootName: 'header' } ) }</header>
184
+ * <div id="content">${ editor.data.get( { rootName: 'content' } ) }</div>
185
+ * `;
186
+ * }
187
+ * }
188
+ * ```
189
+ *
190
+ * @default `( editor: Editor ) => editor.getData()`
191
+ */
192
+ dataCallback?: (editor: Editor) => string;
193
+ /**
194
+ * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl` is required for
195
+ * the export to PDF feature.
196
+ *
197
+ * **Note:** The token can be disabled with the `false` value provided.
198
+ *
199
+ * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
200
+ */
201
+ tokenUrl?: TokenUrl | false;
202
+ /**
203
+ * The authentication token.
204
+ *
205
+ * See: {@link module:cloud-services/cloudservices~CloudServices#token}
206
+ */
207
+ token?: InitializedToken;
208
+ /**
209
+ * The application unique identifier.
210
+ */
211
+ appID?: string;
212
+ }
213
+ export type ExportPdfConverterOptions = {
214
+ format?: 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6';
215
+ margin_top?: string;
216
+ margin_bottom?: string;
217
+ margin_right?: string;
218
+ margin_left?: string;
219
+ header_html?: string;
220
+ footer_html?: string;
221
+ header_and_footer_css?: string;
222
+ page_orientation?: 'portrait' | 'landscape';
223
+ wait_for_network?: boolean;
224
+ wait_time?: number;
225
+ };
@@ -0,0 +1,43 @@
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-pdf/exportpdfcommand
11
+ * @publicApi
12
+ */
13
+ import { Command, type Editor } from 'ckeditor5/src/core.js';
14
+ import { type ExportPdfConfig } from './exportpdf.js';
15
+ /**
16
+ * The export to PDF command.
17
+ *
18
+ * It takes the editor's HTML and CSS rules from the document and sends them to the HTML to PDF converter.
19
+ * After processing, the converter will send back a PDF file for download.
20
+ */
21
+ export default class ExportPdfCommand 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
+ * Executes the command.
38
+ *
39
+ * @fires execute
40
+ * @param options Options for the executed command.
41
+ */
42
+ execute(options?: ExportPdfConfig): Promise<void>;
43
+ }
@@ -0,0 +1,27 @@
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-pdf/exportpdfui
11
+ */
12
+ import { Plugin } from 'ckeditor5/src/core.js';
13
+ /**
14
+ * The export to PDF UI feature.
15
+ *
16
+ * It introduces 'Export to PDF' button in toolbar and menu bar.
17
+ */
18
+ export default class ExportPdfUI extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): "ExportPdfUI";
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ init(): void;
27
+ }
@@ -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-pdf
11
+ */
12
+ export { default as ExportPdf, type ExportPdfConfig } from './exportpdf.js';
13
+ export type { default as ExportPdfCommand } from './exportpdfcommand.js';
14
+ import './augmentation.js';
@@ -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
+ * A helper function for getting concatenated CSS rules from external stylesheets and the editor.
11
+ *
12
+ * @param stylesheets An array of stylesheet paths delivered by the user through the plugin configuration.
13
+ */
14
+ export declare function getStyles(stylesheets?: Array<string>): Promise<string>;
@@ -1,4 +1,7 @@
1
1
  {
2
2
  "Export to PDF": "A toolbar button tooltip for a PDF export feature.",
3
- "An error occurred while generating the PDF.": "An error message shown to the user when an error occurred during the generation of the PDF file."
3
+ "An error occurred while generating the PDF.": "An error message shown to the user when an error occurred during the generation of the PDF file.",
4
+ "PDF export started": "Aria status message indicating start of PDF document export. Example: 'PDF export started'.",
5
+ "PDF export failed": "Aria status message indicating failed PDF document export. Example: 'PDF export failed'.",
6
+ "PDF export successful": "Aria status message indicating successful PDF document export. Example: 'PDF export successful'."
4
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-export-pdf",
3
- "version": "41.3.0",
3
+ "version": "41.4.0-alpha.0",
4
4
  "description": "Export to PDF 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.3.0"
33
+ "ckeditor5": "41.4.0-alpha.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (http://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/exportpdf.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x21d6a4=_0x6349;(function(_0x2ea7e8,_0x206e52){const _0x203450=_0x6349,_0x4ede8e=_0x2ea7e8();while(!![]){try{const _0x3cbb83=-parseInt(_0x203450(0x194))/0x1+parseInt(_0x203450(0x192))/0x2*(parseInt(_0x203450(0x1a0))/0x3)+parseInt(_0x203450(0x18f))/0x4+parseInt(_0x203450(0x189))/0x5+-parseInt(_0x203450(0x197))/0x6*(-parseInt(_0x203450(0x1a3))/0x7)+-parseInt(_0x203450(0x18a))/0x8+parseInt(_0x203450(0x18b))/0x9*(-parseInt(_0x203450(0x190))/0xa);if(_0x3cbb83===_0x206e52)break;else _0x4ede8e['push'](_0x4ede8e['shift']());}catch(_0x5781e7){_0x4ede8e['push'](_0x4ede8e['shift']());}}}(_0x5c14,0xddab9));function _0x5c14(){const _0x1a20bb=['token','config','registerTokenUrl','requires','editor','commands','75156eFzfmM','pluginName','tokenUrl','8055194BWMnBq','8414005xlSsIn','6954024BeLwvH','207ewAKAj','exportPdf','_token','plugins','6515408BiGitB','856230XjnMWU','get','26wNVqzA','ExportPdf','1041528vIPPVf','then','CloudServices','6xXTUky','add','init'];_0x5c14=function(){return _0x1a20bb;};return _0x5c14();}import{Plugin as _0x410669}from'ckeditor5/src/core.js';import{Notification as _0xb88791}from'ckeditor5/src/ui.js';function _0x6349(_0xafccf1,_0xdef481){const _0x5c149a=_0x5c14();return _0x6349=function(_0x6349b0,_0x3bdf6c){_0x6349b0=_0x6349b0-0x189;let _0x1f1aad=_0x5c149a[_0x6349b0];return _0x1f1aad;},_0x6349(_0xafccf1,_0xdef481);}import _0xbf2df0 from'./exportpdfcommand.js';import _0x2c6d5d from'./exportpdfui.js';export default class s extends _0x410669{static get[_0x21d6a4(0x1a1)](){const _0x424a72=_0x21d6a4;return _0x424a72(0x193);}static get[_0x21d6a4(0x19d)](){const _0x3b4806=_0x21d6a4;return[_0x3b4806(0x196),_0xb88791,_0x2c6d5d];}[_0x21d6a4(0x199)](){const _0x77557f=_0x21d6a4,_0x563353=this[_0x77557f(0x19e)],_0x4653ad=_0x563353[_0x77557f(0x19b)][_0x77557f(0x191)](_0x77557f(0x18c))||{};_0x563353[_0x77557f(0x19f)][_0x77557f(0x198)](_0x77557f(0x18c),new _0xbf2df0(_0x563353));const _0x5e6cc6=_0x563353[_0x77557f(0x18e)][_0x77557f(0x191)](_0x77557f(0x196));!0x1===_0x4653ad[_0x77557f(0x1a2)]?this[_0x77557f(0x18d)]=null:_0x4653ad[_0x77557f(0x1a2)]?_0x5e6cc6[_0x77557f(0x19c)](_0x4653ad[_0x77557f(0x1a2)])[_0x77557f(0x195)](_0x3f894e=>{const _0x3b5398=_0x77557f;this[_0x3b5398(0x18d)]=_0x3f894e;}):this[_0x77557f(0x18d)]=_0x5e6cc6[_0x77557f(0x19a)];}}
23
+ function _0x3024(){const _0x196c07=['614895atyueG','4662309lAnmlk','tokenUrl','requires','2bIlJFy','config','plugins','pluginName','8889642UxgpqS','_token','CloudServices','exportPdf','get','token','then','registerTokenUrl','6125080ZHptNy','add','init','ExportPdf','1168358ZEswQD','1635396TNyABe','commands','editor','78GxSmNG','8884552uiwgjn'];_0x3024=function(){return _0x196c07;};return _0x3024();}const _0x4d634e=_0xd47b;(function(_0x182841,_0x457134){const _0x487364=_0xd47b,_0x93e382=_0x182841();while(!![]){try{const _0x2ac2ec=-parseInt(_0x487364(0x16d))/0x1+-parseInt(_0x487364(0x177))/0x2*(-parseInt(_0x487364(0x174))/0x3)+-parseInt(_0x487364(0x169))/0x4+-parseInt(_0x487364(0x173))/0x5*(-parseInt(_0x487364(0x171))/0x6)+parseInt(_0x487364(0x16e))/0x7+parseInt(_0x487364(0x172))/0x8+-parseInt(_0x487364(0x17b))/0x9;if(_0x2ac2ec===_0x457134)break;else _0x93e382['push'](_0x93e382['shift']());}catch(_0x784031){_0x93e382['push'](_0x93e382['shift']());}}}(_0x3024,0xc5abd));import{Plugin as _0x14cdfa}from'ckeditor5/src/core.js';import{Notification as _0xb70c22}from'ckeditor5/src/ui.js';import _0x302cf7 from'./exportpdfcommand.js';import _0x51ae46 from'./exportpdfui.js';function _0xd47b(_0x3a61a1,_0xb7fbc1){const _0x30246a=_0x3024();return _0xd47b=function(_0xd47b41,_0x311635){_0xd47b41=_0xd47b41-0x168;let _0x10dbac=_0x30246a[_0xd47b41];return _0x10dbac;},_0xd47b(_0x3a61a1,_0xb7fbc1);}export default class s extends _0x14cdfa{static get[_0x4d634e(0x17a)](){const _0x1e91bd=_0x4d634e;return _0x1e91bd(0x16c);}static get[_0x4d634e(0x176)](){const _0x1b90ed=_0x4d634e;return[_0x1b90ed(0x17d),_0xb70c22,_0x51ae46];}[_0x4d634e(0x16b)](){const _0xf706b7=_0x4d634e,_0x476887=this[_0xf706b7(0x170)],_0xa738dd=_0x476887[_0xf706b7(0x178)][_0xf706b7(0x17f)](_0xf706b7(0x17e))||{};_0x476887[_0xf706b7(0x16f)][_0xf706b7(0x16a)](_0xf706b7(0x17e),new _0x302cf7(_0x476887));const _0xb2f921=_0x476887[_0xf706b7(0x179)][_0xf706b7(0x17f)](_0xf706b7(0x17d));!0x1===_0xa738dd[_0xf706b7(0x175)]?this[_0xf706b7(0x17c)]=null:_0xa738dd[_0xf706b7(0x175)]?_0xb2f921[_0xf706b7(0x168)](_0xa738dd[_0xf706b7(0x175)])[_0xf706b7(0x181)](_0x39c528=>{const _0x4a3fcc=_0xf706b7;this[_0x4a3fcc(0x17c)]=_0x39c528;}):this[_0xf706b7(0x17c)]=_0xb2f921[_0xf706b7(0x180)];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x302481}from'ckeditor5/src/core.js';import{getStyles as _0x507028}from'./utils.js';export default class o extends _0x302481{constructor(_0x499776){super(_0x499776),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x1ce5cc={}){const _0x523da9=this['editor'],t=_0x523da9['t'],_0x311843=_0x1ce5cc['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x55cea3=_0x1ce5cc['dataCallback']||(_0x1b2cf3=>_0x1b2cf3['data']['get']()),_0x4a868f=_0x523da9['plugins']['get']('ExportPdf'),_0x5492d7=_0x1ce5cc['token']||_0x4a868f['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x507028(_0x1ce5cc['stylesheets']||['EDITOR_STYLES'])['then'](async _0x452bf8=>{const _0x2701fa={'html':'<html>\x0a\x09\x09\x09\x09\x09\x09<head>\x0a\x09\x09\x09\x09\x09\x09\x09<title>CKEditor\x205\x20PDF\x20document</title>\x0a\x09\x09\x09\x09\x09\x09\x09<meta\x20charset=\x22utf-8\x22>\x0a\x09\x09\x09\x09\x09\x09</head>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09\x09\x09<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x523da9['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0x55cea3(_0x523da9)+'\x0a\x09\x09\x09\x09\x09\x09\x09</div>\x0a\x09\x09\x09\x09\x09\x09</body>\x0a\x09\x09\x09\x09\x09</html>','css':_0x452bf8,'options':_0x1ce5cc['converterOptions']},_0x14f92b={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x5492d7?{'Authorization':_0x5492d7['value']}:null,'x-cs-app-id':_0x1ce5cc['appID']||'cke5'},'body':JSON['stringify'](_0x2701fa)};return window['fetch'](_0x311843,_0x14f92b)['then'](_0x45a366=>{if(0xc8!==_0x45a366['status'])throw _0x45a366;return _0x45a366['blob']();})['then'](_0x23fa26=>{const _0x1bc00a='function'==typeof _0x1ce5cc['fileName']?_0x1ce5cc['fileName']():_0x1ce5cc['fileName'];this['_downloadFile'](_0x23fa26,_0x1bc00a||'document.pdf');});})['catch'](_0xae6d5d=>{throw _0x523da9['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0xae6d5d;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x2cd1ab,_0x262f3d){const _0xeaf8d6=document['createElement']('a');_0xeaf8d6['href']=window['URL']['createObjectURL'](_0x2cd1ab),_0xeaf8d6['download']=_0x262f3d,_0xeaf8d6['click'](),_0xeaf8d6['remove']();}}
23
+ import{Command as _0x5eeb4e}from'ckeditor5/src/core.js';import{getStyles as _0xd29df1}from'./utils.js';export default class o extends _0x5eeb4e{constructor(_0x4ec486){super(_0x4ec486),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x51cc2d={}){const _0x46cc5b=this['editor'],t=_0x46cc5b['t'],_0x4a62b8=_0x51cc2d['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x588d18=_0x51cc2d['dataCallback']||(_0x176ea1=>_0x176ea1['data']['get']()),_0x5c1171=_0x46cc5b['plugins']['get']('ExportPdf'),_0x21bb72=_0x51cc2d['token']||_0x5c1171['_token'];return this['isBusy']=!0x0,this['refresh'](),_0xd29df1(_0x51cc2d['stylesheets']||['EDITOR_STYLES'])['then'](async _0x9ca653=>{_0x46cc5b['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20started'));const _0x4b7f05={'html':'<html>\x0a\x09\x09\x09\x09\x09\x09<head>\x0a\x09\x09\x09\x09\x09\x09\x09<title>CKEditor\x205\x20PDF\x20document</title>\x0a\x09\x09\x09\x09\x09\x09\x09<meta\x20charset=\x22utf-8\x22>\x0a\x09\x09\x09\x09\x09\x09</head>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09\x09\x09<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x46cc5b['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+await _0x588d18(_0x46cc5b)+'\x0a\x09\x09\x09\x09\x09\x09\x09</div>\x0a\x09\x09\x09\x09\x09\x09</body>\x0a\x09\x09\x09\x09\x09</html>','css':_0x9ca653,'options':_0x51cc2d['converterOptions']},_0x330b2e={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x21bb72?{'Authorization':_0x21bb72['value']}:null,'x-cs-app-id':_0x51cc2d['appID']||'cke5'},'body':JSON['stringify'](_0x4b7f05)};return window['fetch'](_0x4a62b8,_0x330b2e)['then'](_0x350202=>{if(0xc8!==_0x350202['status'])throw _0x350202;return _0x350202['blob']();})['then'](_0x1d7b13=>{_0x46cc5b['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20successful'));const _0x5de482='function'==typeof _0x51cc2d['fileName']?_0x51cc2d['fileName']():_0x51cc2d['fileName'];this['_downloadFile'](_0x1d7b13,_0x5de482||'document.pdf');});})['catch'](_0x313334=>{const _0x79c594=_0x46cc5b['plugins']['get']('Notification');throw _0x46cc5b['ui']['ariaLiveAnnouncer']['announce'](t('PDF\x20export\x20failed'),{'politeness':'assertive'}),_0x79c594['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0x313334;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_downloadFile'](_0x3eff36,_0x4a9c11){const _0x276a6d=document['createElement']('a');_0x276a6d['href']=window['URL']['createObjectURL'](_0x3eff36),_0x276a6d['download']=_0x4a9c11,_0x276a6d['click'](),_0x276a6d['remove']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x1d0923}from'ckeditor5/src/core.js';import{ButtonView as _0x5df30d,MenuBarMenuListItemButtonView as _0x3864ac,SpinnerView as _0x4f5471}from'ckeditor5/src/ui.js';import _0x423a9d from'../theme/icons/exportpdf.svg';export default class i extends _0x1d0923{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x17a0ff=this['editor'];_0x17a0ff['ui']['componentFactory']['add']('exportPdf',()=>{const _0x59852a=this['_createButton'](_0x5df30d),_0x44c54d=_0x17a0ff['commands']['get']('exportPdf');return _0x59852a['set']({'tooltip':!0x0}),_0x59852a['bind']('isOn')['to'](_0x44c54d,'isBusy'),_0x59852a;}),_0x17a0ff['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x3864ac));}['_createButton'](_0x2e2e1a){const _0x220c91=this['editor'],_0x515b14=_0x220c91['config']['get']('exportPdf')||{},t=_0x220c91['locale']['t'],_0x2c2b48=_0x220c91['commands']['get']('exportPdf'),_0x2894db=new _0x2e2e1a(_0x220c91['locale']),_0x57db97=new _0x4f5471();return _0x2894db['children']['add'](_0x57db97),_0x57db97['bind']('isVisible')['to'](_0x2c2b48,'isBusy'),_0x2894db['iconView']['bind']('isVisible')['to'](_0x2c2b48,'isBusy',_0x585bf1=>!_0x585bf1),_0x2894db['set']({'label':t('Export\x20to\x20PDF'),'icon':_0x423a9d}),_0x2894db['bind']('isEnabled')['to'](_0x2c2b48,'isEnabled'),this['listenTo'](_0x2894db,'execute',()=>{_0x220c91['execute']('exportPdf',_0x515b14),_0x220c91['editing']['view']['focus']();}),_0x2894db;}}
23
+ import{Plugin as _0x6dd82b}from'ckeditor5/src/core.js';import{ButtonView as _0x4c2c09,MenuBarMenuListItemButtonView as _0x5b7373,SpinnerView as _0x203724}from'ckeditor5/src/ui.js';import _0x1eb690 from'../theme/icons/exportpdf.svg';export default class i extends _0x6dd82b{static get['pluginName'](){return'ExportPdfUI';}['init'](){const _0x4bccae=this['editor'];_0x4bccae['ui']['componentFactory']['add']('exportPdf',()=>{const _0x35fa83=this['_createButton'](_0x4c2c09),_0x4e5bd2=_0x4bccae['commands']['get']('exportPdf');return _0x35fa83['set']({'tooltip':!0x0}),_0x35fa83['bind']('isOn')['to'](_0x4e5bd2,'isBusy'),_0x35fa83;}),_0x4bccae['ui']['componentFactory']['add']('menuBar:exportPdf',()=>this['_createButton'](_0x5b7373));}['_createButton'](_0x59c449){const _0x602801=this['editor'],_0xdb5a13=_0x602801['config']['get']('exportPdf')||{},t=_0x602801['locale']['t'],_0x757b8e=_0x602801['commands']['get']('exportPdf'),_0x574564=new _0x59c449(_0x602801['locale']),_0x5dbb36=new _0x203724();return _0x574564['children']['add'](_0x5dbb36),_0x5dbb36['bind']('isVisible')['to'](_0x757b8e,'isBusy'),_0x574564['iconView']['bind']('isVisible')['to'](_0x757b8e,'isBusy',_0x5d069c=>!_0x5d069c),_0x574564['set']({'label':t('Export\x20to\x20PDF'),'icon':_0x1eb690}),_0x574564['bind']('isEnabled')['to'](_0x757b8e,'isEnabled'),this['listenTo'](_0x574564,'execute',()=>{_0x602801['execute']('exportPdf',_0xdb5a13),_0x602801['editing']['view']['focus']();}),_0x574564;}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x4b7f(_0xca9afc,_0x517f05){var _0x24ce8e=_0x24ce();return _0x4b7f=function(_0x4b7f08,_0xcaddc6){_0x4b7f08=_0x4b7f08-0x12d;var _0x247791=_0x24ce8e[_0x4b7f08];return _0x247791;},_0x4b7f(_0xca9afc,_0x517f05);}(function(_0x93abea,_0x1ec846){var _0x4b8f4b=_0x4b7f,_0x4d0955=_0x93abea();while(!![]){try{var _0x2db38f=parseInt(_0x4b8f4b(0x135))/0x1+-parseInt(_0x4b8f4b(0x131))/0x2*(-parseInt(_0x4b8f4b(0x12e))/0x3)+-parseInt(_0x4b8f4b(0x130))/0x4*(parseInt(_0x4b8f4b(0x137))/0x5)+parseInt(_0x4b8f4b(0x136))/0x6+parseInt(_0x4b8f4b(0x133))/0x7*(-parseInt(_0x4b8f4b(0x12d))/0x8)+-parseInt(_0x4b8f4b(0x134))/0x9+parseInt(_0x4b8f4b(0x132))/0xa*(parseInt(_0x4b8f4b(0x12f))/0xb);if(_0x2db38f===_0x1ec846)break;else _0x4d0955['push'](_0x4d0955['shift']());}catch(_0x3c6d7f){_0x4d0955['push'](_0x4d0955['shift']());}}}(_0x24ce,0x32acc));export{default as ExportPdf}from'./exportpdf.js';function _0x24ce(){var _0x330591=['19420htZcfl','618764EUJadP','155580UOTzFP','38654gJqxvd','43605iySkYu','64173sdbJgd','2335596aceWyg','360jrTBqu','584kutNij','3LIwCRA','143BrJduu'];_0x24ce=function(){return _0x330591;};return _0x24ce();}import'./augmentation.js';
23
+ function _0x2298(_0x4a0c1d,_0x149b9c){var _0x7d1448=_0x7d14();return _0x2298=function(_0x2298f0,_0x1ee943){_0x2298f0=_0x2298f0-0xc4;var _0x2ba938=_0x7d1448[_0x2298f0];return _0x2ba938;},_0x2298(_0x4a0c1d,_0x149b9c);}function _0x7d14(){var _0x18fb43=['3165910BpNPPF','1386gxEoiB','283920tbSFcV','8603sxBwLo','556VDkBQz','1407LTUqwW','5139VZMhVm','1416YDKwkS','1164555UcVLIo','467462bZThFG'];_0x7d14=function(){return _0x18fb43;};return _0x7d14();}(function(_0x22f452,_0x438626){var _0x358980=_0x2298,_0x513fdf=_0x22f452();while(!![]){try{var _0x352aca=-parseInt(_0x358980(0xc5))/0x1+-parseInt(_0x358980(0xcc))/0x2+parseInt(_0x358980(0xc8))/0x3*(-parseInt(_0x358980(0xc7))/0x4)+parseInt(_0x358980(0xcb))/0x5+-parseInt(_0x358980(0xc4))/0x6*(-parseInt(_0x358980(0xc6))/0x7)+parseInt(_0x358980(0xca))/0x8*(-parseInt(_0x358980(0xc9))/0x9)+parseInt(_0x358980(0xcd))/0xa;if(_0x352aca===_0x438626)break;else _0x513fdf['push'](_0x513fdf['shift']());}catch(_0x266db7){_0x513fdf['push'](_0x513fdf['shift']());}}}(_0x7d14,0x247f4));export{default as ExportPdf}from'./exportpdf.js';import'./augmentation.js';
package/src/utils.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x2a93(){const _0x2937d8=['1642JGFPXf','then','4640812hDghkw','fetch','push','length','.ck-content','hasAttribute','EDITOR_STYLES','all','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.','cssText','from','4265241agQeSk','ownerNode','text','join','cssRules','96yRxdrJ','2544755Henkoj','4361100yeagei','13245804Vpytjo','warn','indexOf','138600CEcjuz','data-cke','trim',':root','1153omBBSJ','styleSheets'];_0x2a93=function(){return _0x2937d8;};return _0x2a93();}function _0x399b(_0x1cd65b,_0x58c37e){const _0x2a93e3=_0x2a93();return _0x399b=function(_0x399bd8,_0x408fbf){_0x399bd8=_0x399bd8-0x13d;let _0x4e1f77=_0x2a93e3[_0x399bd8];return _0x4e1f77;},_0x399b(_0x1cd65b,_0x58c37e);}(function(_0x154d29,_0x483a71){const _0x3771ef=_0x399b,_0x3079eb=_0x154d29();while(!![]){try{const _0x38c785=-parseInt(_0x3771ef(0x141))/0x1*(parseInt(_0x3771ef(0x143))/0x2)+parseInt(_0x3771ef(0x150))/0x3+-parseInt(_0x3771ef(0x145))/0x4+-parseInt(_0x3771ef(0x156))/0x5+parseInt(_0x3771ef(0x157))/0x6+-parseInt(_0x3771ef(0x13d))/0x7*(parseInt(_0x3771ef(0x155))/0x8)+parseInt(_0x3771ef(0x158))/0x9;if(_0x38c785===_0x483a71)break;else _0x3079eb['push'](_0x3079eb['shift']());}catch(_0x16e7eb){_0x3079eb['push'](_0x3079eb['shift']());}}}(_0x2a93,0xbb40a));export function getStyles(_0x41c2e2){const _0x2332c7=_0x399b;if(!_0x41c2e2)return new Promise(_0x52f911=>_0x52f911(''));const _0x261f74=[];for(const _0x2b17d1 of _0x41c2e2)_0x2332c7(0x14b)!==_0x2b17d1?_0x261f74[_0x2332c7(0x147)](window[_0x2332c7(0x146)](_0x2b17d1)[_0x2332c7(0x144)](_0x2598d4=>_0x2598d4[_0x2332c7(0x152)]())):_0x261f74[_0x2332c7(0x147)](a());return Promise[_0x2332c7(0x14c)](_0x261f74)[_0x2332c7(0x144)](_0x2011cc=>_0x2011cc[_0x2332c7(0x153)]('\x20')[_0x2332c7(0x13f)]());}function a(){const _0x1ef8a3=_0x399b,_0x5c7b19=[],_0x2e5815=[];for(const _0x3cbe1c of Array[_0x1ef8a3(0x14f)](document[_0x1ef8a3(0x142)])){if(_0x3cbe1c[_0x1ef8a3(0x151)][_0x1ef8a3(0x14a)](_0x1ef8a3(0x13e))){for(const _0x5df405 of Array[_0x1ef8a3(0x14f)](_0x3cbe1c[_0x1ef8a3(0x154)]))-0x1!==_0x5df405[_0x1ef8a3(0x14e)][_0x1ef8a3(0x15a)](_0x1ef8a3(0x149))?_0x5c7b19[_0x1ef8a3(0x147)](_0x5df405[_0x1ef8a3(0x14e)]):-0x1!==_0x5df405[_0x1ef8a3(0x14e)][_0x1ef8a3(0x15a)](_0x1ef8a3(0x140))&&_0x2e5815[_0x1ef8a3(0x147)](_0x5df405[_0x1ef8a3(0x14e)]);}}return _0x5c7b19[_0x1ef8a3(0x148)]||console[_0x1ef8a3(0x159)](_0x1ef8a3(0x14d)),[..._0x2e5815,..._0x5c7b19][_0x1ef8a3(0x153)]('\x20')[_0x1ef8a3(0x13f)]();}
23
+ function _0x41c8(){const _0x17bf80=['ownerNode','cssRules','join','length','trim','63eOJIAp','135497TkeLhT','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.','357dMkUYt','fetch','then','4TwqAqW','text','101714pqnRXi','122615FJEuYj','.ck-content','push','19449dAaDDK','EDITOR_STYLES','5238186YnuyyM','260248VbaiiU','indexOf','3160355LNBTRw','all','styleSheets','data-cke','from','cssText','1510YdzWiB','hasAttribute','warn',':root'];_0x41c8=function(){return _0x17bf80;};return _0x41c8();}(function(_0x32af40,_0x31507b){const _0x337727=_0x18f9,_0x311a54=_0x32af40();while(!![]){try{const _0x219751=parseInt(_0x337727(0x1fa))/0x1+-parseInt(_0x337727(0x1e1))/0x2*(parseInt(_0x337727(0x1f9))/0x3)+-parseInt(_0x337727(0x1df))/0x4*(parseInt(_0x337727(0x1e2))/0x5)+parseInt(_0x337727(0x1e7))/0x6+parseInt(_0x337727(0x1fc))/0x7*(parseInt(_0x337727(0x1e8))/0x8)+parseInt(_0x337727(0x1e5))/0x9*(-parseInt(_0x337727(0x1f0))/0xa)+-parseInt(_0x337727(0x1ea))/0xb;if(_0x219751===_0x31507b)break;else _0x311a54['push'](_0x311a54['shift']());}catch(_0x362e9){_0x311a54['push'](_0x311a54['shift']());}}}(_0x41c8,0xeabc1));function _0x18f9(_0x5801e9,_0x24e472){const _0x41c83c=_0x41c8();return _0x18f9=function(_0x18f931,_0x43bc88){_0x18f931=_0x18f931-0x1dd;let _0xb4f4c8=_0x41c83c[_0x18f931];return _0xb4f4c8;},_0x18f9(_0x5801e9,_0x24e472);}export function getStyles(_0x128e51){const _0x44ca8b=_0x18f9;if(!_0x128e51)return new Promise(_0x429a28=>_0x429a28(''));const _0x2f7082=[];for(const _0x42b42a of _0x128e51)_0x44ca8b(0x1e6)!==_0x42b42a?_0x2f7082[_0x44ca8b(0x1e4)](window[_0x44ca8b(0x1dd)](_0x42b42a)[_0x44ca8b(0x1de)](_0x2684b5=>_0x2684b5[_0x44ca8b(0x1e0)]())):_0x2f7082[_0x44ca8b(0x1e4)](a());return Promise[_0x44ca8b(0x1eb)](_0x2f7082)[_0x44ca8b(0x1de)](_0x42bee6=>_0x42bee6[_0x44ca8b(0x1f6)]('\x20')[_0x44ca8b(0x1f8)]());}function a(){const _0x384dd4=_0x18f9,_0x2895f9=[],_0x229bc4=[];for(const _0x17ad66 of Array[_0x384dd4(0x1ee)](document[_0x384dd4(0x1ec)])){if(_0x17ad66[_0x384dd4(0x1f4)][_0x384dd4(0x1f1)](_0x384dd4(0x1ed))){for(const _0x5d63c6 of Array[_0x384dd4(0x1ee)](_0x17ad66[_0x384dd4(0x1f5)]))-0x1!==_0x5d63c6[_0x384dd4(0x1ef)][_0x384dd4(0x1e9)](_0x384dd4(0x1e3))?_0x2895f9[_0x384dd4(0x1e4)](_0x5d63c6[_0x384dd4(0x1ef)]):-0x1!==_0x5d63c6[_0x384dd4(0x1ef)][_0x384dd4(0x1e9)](_0x384dd4(0x1f3))&&_0x229bc4[_0x384dd4(0x1e4)](_0x5d63c6[_0x384dd4(0x1ef)]);}}return _0x2895f9[_0x384dd4(0x1f7)]||console[_0x384dd4(0x1f2)](_0x384dd4(0x1fb)),[..._0x229bc4,..._0x2895f9][_0x384dd4(0x1f6)]('\x20')[_0x384dd4(0x1f8)]();}