@ckeditor/ckeditor5-export-inline-styles 48.2.0 → 48.3.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.
@@ -1,22 +1,22 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import type { ExportInlineStyles, ExportInlineStylesCommand, ExportInlineStylesConfig, ExportInlineStylesEditing } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface PluginsMap {
8
- [ExportInlineStyles.pluginName]: ExportInlineStyles;
9
- [ExportInlineStylesEditing.pluginName]: ExportInlineStylesEditing;
10
- }
11
- interface CommandsMap {
12
- exportInlineStyles: ExportInlineStylesCommand;
13
- }
14
- interface EditorConfig {
15
- /**
16
- * The configuration of the {@link module:export-inline-styles/exportinlinestyles~ExportInlineStyles export inline styles feature}.
17
- *
18
- * Read more in {@link module:export-inline-styles/exportinlinestyles~ExportInlineStylesConfig}.
19
- */
20
- exportInlineStyles?: ExportInlineStylesConfig;
21
- }
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { ExportInlineStyles, ExportInlineStylesCommand, ExportInlineStylesConfig, ExportInlineStylesEditing } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface PluginsMap {
8
+ [ExportInlineStyles.pluginName]: ExportInlineStyles;
9
+ [ExportInlineStylesEditing.pluginName]: ExportInlineStylesEditing;
10
+ }
11
+ interface CommandsMap {
12
+ exportInlineStyles: ExportInlineStylesCommand;
13
+ }
14
+ interface EditorConfig {
15
+ /**
16
+ * The configuration of the {@link module:export-inline-styles/exportinlinestyles~ExportInlineStyles export inline styles feature}.
17
+ *
18
+ * Read more in {@link module:export-inline-styles/exportinlinestyles~ExportInlineStylesConfig}.
19
+ */
20
+ exportInlineStyles?: ExportInlineStylesConfig;
21
+ }
22
22
  }
@@ -1,207 +1,207 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module export-inline-styles/exportinlinestyles
7
- * @publicApi
8
- */
9
- import type { StylesMap } from '@ckeditor/ckeditor5-engine';
10
- import { Plugin } from '@ckeditor/ckeditor5-core';
11
- import { ExportInlineStylesEditing } from './exportinlinestylesediting.js';
6
+ * @module export-inline-styles/exportinlinestyles
7
+ * @publicApi
8
+ */
9
+ import type { StylesMap } from "@ckeditor/ckeditor5-engine";
10
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
11
+ import { ExportInlineStylesEditing } from "./exportinlinestylesediting.js";
12
12
  /**
13
- * The plugin responsible for converting external CSS styles to inline styles.
14
- */
13
+ * The plugin responsible for converting external CSS styles to inline styles.
14
+ */
15
15
  export declare class ExportInlineStyles extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "ExportInlineStyles";
20
- /**
21
- * @inheritDoc
22
- */
23
- static get isOfficialPlugin(): true;
24
- /**
25
- * @inheritDoc
26
- */
27
- static get isPremiumPlugin(): true;
28
- /**
29
- * @inheritDoc
30
- */
31
- static get requires(): readonly [typeof ExportInlineStylesEditing];
32
- /**
33
- * @inheritDoc
34
- */
35
- init(): void;
36
- /**
37
- * @inheritDoc
38
- */
39
- destroy(): void;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "ExportInlineStyles";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static override get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static override get isPremiumPlugin(): true;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get requires(): PluginDependenciesOf<[ExportInlineStylesEditing]>;
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ init(): void;
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ override destroy(): void;
40
40
  }
41
41
  /**
42
- * The configuration of the export inline styles feature. It is used by the `@ckeditor/ckeditor5-export-inline-styles` package.
43
- *
44
- * ```ts
45
- * ClassicEditor
46
- * .create( {
47
- * exportInlineStyles: ... // Export inline styles feature options.
48
- * } )
49
- * .then( ... )
50
- * .catch( ... );
51
- */
42
+ * The configuration of the export inline styles feature. It is used by the `@ckeditor/ckeditor5-export-inline-styles` package.
43
+ *
44
+ * ```ts
45
+ * ClassicEditor
46
+ * .create( {
47
+ * exportInlineStyles: ... // Export inline styles feature options.
48
+ * } )
49
+ * .then( ... )
50
+ * .catch( ... );
51
+ */
52
52
  export interface ExportInlineStylesConfig {
53
- /**
54
- * Paths to the `.css` files containing styling that should be converted to inline styles (**the order of provided items matters**).
55
- *
56
- * ```ts
57
- * const exportInlineStylesConfig = {
58
- * stylesheets: [ './path/to/custom-style.css' ]
59
- * }
60
- * ```
61
- *
62
- * **NOTE:** If `stylesheets` are not provided, the plugin will process only
63
- * {@glink getting-started/setup/css the default editor content styles}.
64
- *
65
- * **Default editor's content styles**:
66
- * {@glink getting-started/setup/css The default editor content styles}
67
- * are processed thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
68
- * If you don't want them to be processed, you have to omit the token:
69
- *
70
- * **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
71
- * In other setups you always need to pass the stylesheets.
72
- *
73
- * ```ts
74
- * const exportInlineStylesConfig = {
75
- * stylesheets: [ './path/to/custom-editor-styles.css' ]
76
- * }
77
- * ```
78
- *
79
- * **Multiple stylesheets:** You can provide multiple stylesheets that will be processed in order:
80
- *
81
- * ```ts
82
- * const exportInlineStylesConfig = {
83
- * stylesheets: [
84
- * './path/to/base-styles.css',
85
- * './path/to/theme-styles.css',
86
- * './path/to/custom-styles.css'
87
- * ]
88
- * ]
89
- * }
90
- * ```
91
- *
92
- * @default [ 'EDITOR_STYLES' ]
93
- */
94
- stylesheets?: Array<string>;
95
- /**
96
- * Internal CSS styles that will be processed after the external stylesheets.
97
- * The styles should be provided as a regular CSS string.
98
- *
99
- * ```ts
100
- * const exportInlineStylesConfig = {
101
- * inlineCss: `
102
- * .my-class {
103
- * color: red;
104
- * font-weight: bold;
105
- * }
106
- *
107
- * .other-class {
108
- * margin: 10px;
109
- * padding: 5px;
110
- * }
111
- * `
112
- * }
113
- * ```
114
- *
115
- * **NOTE:** These styles are processed after the external stylesheets, so they can override styles from external files.
116
- *
117
- * @default ''
118
- */
119
- inlineCss?: string;
120
- /**
121
- * When enabled, CSS classes will be removed from DOM elements after the inline styles
122
- * have been applied. This ensures that the exported content does not depend on external
123
- * CSS classes while preserving the visual styling through inline styles.
124
- *
125
- * ```ts
126
- * const exportInlineStylesConfig = {
127
- * stripCssClasses: true
128
- * }
129
- * ```
130
- *
131
- * @default false
132
- */
133
- stripCssClasses?: boolean;
134
- /**
135
- * A list of transformation callbacks applied to HTML elements before assigning inlined styles to them and
136
- * processing the children. It allows you to modify the elements based on the applied styles.
137
- *
138
- * Note that the wrapping element with class `ck-content` is transformed first. Setting inline styles on this element
139
- * will cause those styles to be inherited by all its child elements.
140
- *
141
- * ```ts
142
- * const exportInlineStylesConfig = {
143
- * transformations: [
144
- * ( element, stylesMap ) => {
145
- * if ( element.tagName.toLowerCase() === 'p' && stylesMap.get( 'text-align' ) === 'center' ) {
146
- * element.setAttribute( 'data-aligned', 'center' );
147
- * stylesMap.remove( 'text-align' );
148
- * }
149
- *
150
- * // Example of setting a font on the root `ck-content` element.
151
- * // This will cause all child elements to inherit the font and color.
152
- * if ( element.classList.contains( 'ck-content' ) ) {
153
- * stylesMap.set( 'font-family', 'Arial, sans-serif' );
154
- * stylesMap.set( 'color', '#333' );
155
- * }
156
- * },
157
- * // ...
158
- * ]
159
- * }
160
- * ```
161
- *
162
- * @default []
163
- */
164
- transformations?: Array<ExportInlineStylesTransformation>;
53
+ /**
54
+ * Paths to the `.css` files containing styling that should be converted to inline styles (**the order of provided items matters**).
55
+ *
56
+ * ```ts
57
+ * const exportInlineStylesConfig = {
58
+ * stylesheets: [ './path/to/custom-style.css' ]
59
+ * }
60
+ * ```
61
+ *
62
+ * **NOTE:** If `stylesheets` are not provided, the plugin will process only
63
+ * {@glink getting-started/setup/css the default editor content styles}.
64
+ *
65
+ * **Default editor's content styles**:
66
+ * {@glink getting-started/setup/css The default editor content styles}
67
+ * are processed thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
68
+ * If you don't want them to be processed, you have to omit the token:
69
+ *
70
+ * **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
71
+ * In other setups you always need to pass the stylesheets.
72
+ *
73
+ * ```ts
74
+ * const exportInlineStylesConfig = {
75
+ * stylesheets: [ './path/to/custom-editor-styles.css' ]
76
+ * }
77
+ * ```
78
+ *
79
+ * **Multiple stylesheets:** You can provide multiple stylesheets that will be processed in order:
80
+ *
81
+ * ```ts
82
+ * const exportInlineStylesConfig = {
83
+ * stylesheets: [
84
+ * './path/to/base-styles.css',
85
+ * './path/to/theme-styles.css',
86
+ * './path/to/custom-styles.css'
87
+ * ]
88
+ * ]
89
+ * }
90
+ * ```
91
+ *
92
+ * @default [ 'EDITOR_STYLES' ]
93
+ */
94
+ stylesheets?: Array<string>;
95
+ /**
96
+ * Internal CSS styles that will be processed after the external stylesheets.
97
+ * The styles should be provided as a regular CSS string.
98
+ *
99
+ * ```ts
100
+ * const exportInlineStylesConfig = {
101
+ * inlineCss: `
102
+ * .my-class {
103
+ * color: red;
104
+ * font-weight: bold;
105
+ * }
106
+ *
107
+ * .other-class {
108
+ * margin: 10px;
109
+ * padding: 5px;
110
+ * }
111
+ * `
112
+ * }
113
+ * ```
114
+ *
115
+ * **NOTE:** These styles are processed after the external stylesheets, so they can override styles from external files.
116
+ *
117
+ * @default ''
118
+ */
119
+ inlineCss?: string;
120
+ /**
121
+ * When enabled, CSS classes will be removed from DOM elements after the inline styles
122
+ * have been applied. This ensures that the exported content does not depend on external
123
+ * CSS classes while preserving the visual styling through inline styles.
124
+ *
125
+ * ```ts
126
+ * const exportInlineStylesConfig = {
127
+ * stripCssClasses: true
128
+ * }
129
+ * ```
130
+ *
131
+ * @default false
132
+ */
133
+ stripCssClasses?: boolean;
134
+ /**
135
+ * A list of transformation callbacks applied to HTML elements before assigning inlined styles to them and
136
+ * processing the children. It allows you to modify the elements based on the applied styles.
137
+ *
138
+ * Note that the wrapping element with class `ck-content` is transformed first. Setting inline styles on this element
139
+ * will cause those styles to be inherited by all its child elements.
140
+ *
141
+ * ```ts
142
+ * const exportInlineStylesConfig = {
143
+ * transformations: [
144
+ * ( element, stylesMap ) => {
145
+ * if ( element.tagName.toLowerCase() === 'p' && stylesMap.get( 'text-align' ) === 'center' ) {
146
+ * element.setAttribute( 'data-aligned', 'center' );
147
+ * stylesMap.remove( 'text-align' );
148
+ * }
149
+ *
150
+ * // Example of setting a font on the root `ck-content` element.
151
+ * // This will cause all child elements to inherit the font and color.
152
+ * if ( element.classList.contains( 'ck-content' ) ) {
153
+ * stylesMap.set( 'font-family', 'Arial, sans-serif' );
154
+ * stylesMap.set( 'color', '#333' );
155
+ * }
156
+ * },
157
+ * // ...
158
+ * ]
159
+ * }
160
+ * ```
161
+ *
162
+ * @default []
163
+ */
164
+ transformations?: Array<ExportInlineStylesTransformation>;
165
165
  }
166
166
  /**
167
- * A "runner" function that allows controlling the execution of logic after an element's children have been processed.
168
- * * It is passed as an argument to the transformation callback, enabling additional operations
169
- * on the element after its descendants have had their styles inlined.
170
- *
171
- * @param runner The function that executes the post-transformation logic.
172
- */
167
+ * A "runner" function that allows controlling the execution of logic after an element's children have been processed.
168
+ * * It is passed as an argument to the transformation callback, enabling additional operations
169
+ * on the element after its descendants have had their styles inlined.
170
+ *
171
+ * @param runner The function that executes the post-transformation logic.
172
+ */
173
173
  export type ExportInlineStylesPostTransformationRunner = (runner: VoidFunction) => void;
174
174
  /**
175
- * An object containing helper functions to control the transformation flow during the inline styles conversion.
176
- */
175
+ * An object containing helper functions to control the transformation flow during the inline styles conversion.
176
+ */
177
177
  export type ExportInlineStylesTransformationAttrs = {
178
- /**
179
- * A function used to register a callback to be executed after the entire document has been processed.
180
- *
181
- * It is particularly useful when you want to modify or replace the HTML structure of the document
182
- * (e.g., replacing a `figure` with a `section`) without breaking the CSS selector matching for inline styles.
183
- * By deferring structural changes to this callback, elements will still receive inline styles based on
184
- * their original DOM structure (e.g., a `div` will still get styles from a `figure > div` selector before
185
- * the parent `figure` is turned into a `section`).
186
- */
187
- runAfterDocumentTransformation: ExportInlineStylesPostTransformationRunner;
188
- /**
189
- * A function used to register a callback to be executed after the current element's children
190
- * have been processed.
191
- *
192
- * This allows for modifications based on the final state of the descendants.
193
- */
194
- runAfterChildrenTransformation: ExportInlineStylesPostTransformationRunner;
178
+ /**
179
+ * A function used to register a callback to be executed after the entire document has been processed.
180
+ *
181
+ * It is particularly useful when you want to modify or replace the HTML structure of the document
182
+ * (e.g., replacing a `figure` with a `section`) without breaking the CSS selector matching for inline styles.
183
+ * By deferring structural changes to this callback, elements will still receive inline styles based on
184
+ * their original DOM structure (e.g., a `div` will still get styles from a `figure > div` selector before
185
+ * the parent `figure` is turned into a `section`).
186
+ */
187
+ runAfterDocumentTransformation: ExportInlineStylesPostTransformationRunner;
188
+ /**
189
+ * A function used to register a callback to be executed after the current element's children
190
+ * have been processed.
191
+ *
192
+ * This allows for modifications based on the final state of the descendants.
193
+ */
194
+ runAfterChildrenTransformation: ExportInlineStylesPostTransformationRunner;
195
195
  };
196
196
  /**
197
- * The callback function that is called for each element being processed during the inline styles conversion.
198
- *
199
- * @param element The DOM element being processed.
200
- * @param stylesMap The map of styles to be applied to the element. This map can be modified
201
- * (adding, removing, or updating styles) before they are inlined.
202
- * @param attrs Helpers to control the transformation flow.
203
- * @returns The new element that will be used instead of the original one, or `undefined` to
204
- * keep the original element. It may be used when a transformer replaces one element with
205
- * another (e.g., converting a `figure` to a `div`).
206
- */
197
+ * The callback function that is called for each element being processed during the inline styles conversion.
198
+ *
199
+ * @param element The DOM element being processed.
200
+ * @param stylesMap The map of styles to be applied to the element. This map can be modified
201
+ * (adding, removing, or updating styles) before they are inlined.
202
+ * @param attrs Helpers to control the transformation flow.
203
+ * @returns The new element that will be used instead of the original one, or `undefined` to
204
+ * keep the original element. It may be used when a transformer replaces one element with
205
+ * another (e.g., converting a `figure` to a `div`).
206
+ */
207
207
  export type ExportInlineStylesTransformation = (element: HTMLElement, stylesMap: StylesMap, attrs: ExportInlineStylesTransformationAttrs) => HTMLElement | undefined | void;
@@ -1,46 +1,46 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module export-inline-styles/exportinlinestylescommand
7
- * @publicApi
8
- */
9
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
10
- import type { ExportInlineStylesTransformation } from './exportinlinestyles.js';
6
+ * @module export-inline-styles/exportinlinestylescommand
7
+ * @publicApi
8
+ */
9
+ import { Command, type Editor } from "@ckeditor/ckeditor5-core";
10
+ import type { ExportInlineStylesTransformation } from "./exportinlinestyles.js";
11
11
  /**
12
- * The export to inline styles command.
13
- */
12
+ * The export to inline styles command.
13
+ */
14
14
  export declare class ExportInlineStylesCommand extends Command {
15
- /**
16
- * A command status that indicates whether the command is currently being executed.
17
- *
18
- * @observable
19
- */
20
- isBusy: boolean;
21
- /**
22
- * @inheritDoc
23
- */
24
- constructor(editor: Editor);
25
- /**
26
- * @inheritDoc
27
- */
28
- refresh(): void;
29
- /**
30
- * Executes a command that converts the editor's content to a string HTML representation.
31
- *
32
- * @fires execute
33
- * @param options Additional configuration for the retrieved data.
34
- * @param options.rootName The name of the root element to get. Defaults to `'main'`.
35
- * @param options.dataControllerDowncastOptions Additional configuration that will be available through the
36
- * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#options} during the conversion process.
37
- * @param options.transformations An array of transformation callbacks. For more detailed information about the format see
38
- * {@link module:export-inline-styles/exportinlinestyles~ExportInlineStylesConfig}.
39
- * @returns A promise resolved with the processed string HTML content.
40
- */
41
- execute(options: {
42
- rootName?: string;
43
- dataControllerDowncastOptions?: Record<string, unknown>;
44
- transformations?: Array<ExportInlineStylesTransformation>;
45
- }): Promise<string>;
15
+ /**
16
+ * A command status that indicates whether the command is currently being executed.
17
+ *
18
+ * @observable
19
+ */
20
+ isBusy: boolean;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ constructor(editor: Editor);
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ override refresh(): void;
29
+ /**
30
+ * Executes a command that converts the editor's content to a string HTML representation.
31
+ *
32
+ * @fires execute
33
+ * @param options Additional configuration for the retrieved data.
34
+ * @param options.rootName The name of the root element to get. Defaults to `'main'`.
35
+ * @param options.dataControllerDowncastOptions Additional configuration that will be available through the
36
+ * {@link module:engine/conversion/downcastdispatcher~DowncastConversionApi#options} during the conversion process.
37
+ * @param options.transformations An array of transformation callbacks. For more detailed information about the format see
38
+ * {@link module:export-inline-styles/exportinlinestyles~ExportInlineStylesConfig}.
39
+ * @returns A promise resolved with the processed string HTML content.
40
+ */
41
+ override execute(options: {
42
+ rootName?: string;
43
+ dataControllerDowncastOptions?: Record<string, unknown>;
44
+ transformations?: Array<ExportInlineStylesTransformation>;
45
+ }): Promise<string>;
46
46
  }
@@ -1,34 +1,34 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module export-inline-styles/exportinlinestylesediting
7
- * @publicApi
8
- */
9
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module export-inline-styles/exportinlinestylesediting
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from "@ckeditor/ckeditor5-core";
10
10
  /**
11
- * The editing part of the plugin responsible for converting external CSS styles to inline styles.
12
- */
11
+ * The editing part of the plugin responsible for converting external CSS styles to inline styles.
12
+ */
13
13
  export declare class ExportInlineStylesEditing extends Plugin {
14
- /**
15
- * @inheritDoc
16
- */
17
- static get pluginName(): "ExportInlineStylesEditing";
18
- /**
19
- * @inheritDoc
20
- */
21
- static get isOfficialPlugin(): true;
22
- /**
23
- * @inheritDoc
24
- */
25
- static get isPremiumPlugin(): true;
26
- /**
27
- * @inheritDoc
28
- */
29
- init(): void;
30
- /**
31
- * @inheritDoc
32
- */
33
- afterInit(): void;
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ static get pluginName(): "ExportInlineStylesEditing";
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static override get isOfficialPlugin(): true;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static override get isPremiumPlugin(): true;
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ init(): void;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ afterInit(): void;
34
34
  }
@@ -1,57 +1,57 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module export-inline-styles/exportinlinestylesutils
7
- */
6
+ * @module export-inline-styles/exportinlinestylesutils
7
+ */
8
8
  /**
9
- * Splits a string by top-level separators while preserving nested structures in parentheses.
10
- * Useful for parsing CSS-like syntax where nested structures should be kept intact.
11
- *
12
- * @param text The text to split.
13
- * @returns An array of individual segments.
14
- *
15
- * ```ts
16
- * // CSS selectors with nested pseudo-functions
17
- * splitByTopLevelComma( ':is(h1, h2, h3).title' );
18
- * // → [ ':is(h1, h2, h3).title' ]
19
- *
20
- * splitByTopLevelComma( '.foo:is(.bar, .baz), .qux' );
21
- * // → [ '.foo:is(.bar, .baz)', '.qux' ]
22
- *
23
- * // CSS values with color functions
24
- * splitByTopLevelComma( 'rgb(255, 0, 0), blue' );
25
- * // → [ 'rgb(255, 0, 0)', 'blue' ]
26
- *
27
- * // Generic nested structures
28
- * splitByTopLevelComma( 'foo(1, 2), bar(3, fn(4, 5)), baz' );
29
- * // → [ 'foo(1, 2)', 'bar(3, fn(4, 5))', 'baz' ]
30
- * ```
31
- */
9
+ * Splits a string by top-level separators while preserving nested structures in parentheses.
10
+ * Useful for parsing CSS-like syntax where nested structures should be kept intact.
11
+ *
12
+ * @param text The text to split.
13
+ * @returns An array of individual segments.
14
+ *
15
+ * ```ts
16
+ * // CSS selectors with nested pseudo-functions
17
+ * splitByTopLevelComma( ':is(h1, h2, h3).title' );
18
+ * // → [ ':is(h1, h2, h3).title' ]
19
+ *
20
+ * splitByTopLevelComma( '.foo:is(.bar, .baz), .qux' );
21
+ * // → [ '.foo:is(.bar, .baz)', '.qux' ]
22
+ *
23
+ * // CSS values with color functions
24
+ * splitByTopLevelComma( 'rgb(255, 0, 0), blue' );
25
+ * // → [ 'rgb(255, 0, 0)', 'blue' ]
26
+ *
27
+ * // Generic nested structures
28
+ * splitByTopLevelComma( 'foo(1, 2), bar(3, fn(4, 5)), baz' );
29
+ * // → [ 'foo(1, 2)', 'bar(3, fn(4, 5))', 'baz' ]
30
+ * ```
31
+ */
32
32
  export declare function splitByTopLevelComma(text: string): Array<string>;
33
33
  /**
34
- * Finds the position of matching closing parenthesis, handling nested parentheses.
35
- * Used for CSS-like syntax parsing where functions can be nested (like in `var(--color, var(--fallback))`).
36
- *
37
- * @param text The text to search in.
38
- * @param startPosition Position after the opening parenthesis.
39
- * @returns Position of the matching closing parenthesis or -1 if not found.
40
- *
41
- * @example
42
- * ```ts
43
- * findMatchingParenthesis( 'var(--color, var(--fallback))', 4 ); // returns 28
44
- * findMatchingParenthesis( 'rgb(255, 0, 0)', 4 ); // returns 13
45
- * ```
46
- */
34
+ * Finds the position of matching closing parenthesis, handling nested parentheses.
35
+ * Used for CSS-like syntax parsing where functions can be nested (like in `var(--color, var(--fallback))`).
36
+ *
37
+ * @param text The text to search in.
38
+ * @param startPosition Position after the opening parenthesis.
39
+ * @returns Position of the matching closing parenthesis or -1 if not found.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * findMatchingParenthesis( 'var(--color, var(--fallback))', 4 ); // returns 28
44
+ * findMatchingParenthesis( 'rgb(255, 0, 0)', 4 ); // returns 13
45
+ * ```
46
+ */
47
47
  export declare function findMatchingParenthesis(text: string, startPosition: number): number;
48
48
  /**
49
- * Removes the `!important` suffix from a CSS property value.
50
- *
51
- * @param value The CSS property value which might contain `!important`.
52
- * @returns The cleaned value without `!important`.
53
- *
54
- * @example
55
- * // returns "color: red" from "color: red !important"
56
- */
49
+ * Removes the `!important` suffix from a CSS property value.
50
+ *
51
+ * @param value The CSS property value which might contain `!important`.
52
+ * @returns The cleaned value without `!important`.
53
+ *
54
+ * @example
55
+ * // returns "color: red" from "color: red !important"
56
+ */
57
57
  export declare function dropImportantStyleSuffix(value: string): string;
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module export-inline-styles
7
- */
8
- export { ExportInlineStyles, type ExportInlineStylesConfig, type ExportInlineStylesTransformation, type ExportInlineStylesPostTransformationRunner, type ExportInlineStylesTransformationAttrs } from './exportinlinestyles.js';
9
- export { ExportInlineStylesCommand } from './exportinlinestylescommand.js';
10
- export { ExportInlineStylesEditing } from './exportinlinestylesediting.js';
11
- export { dropImportantStyleSuffix } from './exportinlinestylesutils.js';
12
- import './augmentation.js';
6
+ * @module export-inline-styles
7
+ */
8
+ export { ExportInlineStyles, type ExportInlineStylesConfig, type ExportInlineStylesTransformation, type ExportInlineStylesPostTransformationRunner, type ExportInlineStylesTransformationAttrs } from "./exportinlinestyles.js";
9
+ export { ExportInlineStylesCommand } from "./exportinlinestylescommand.js";
10
+ export { ExportInlineStylesEditing } from "./exportinlinestylesediting.js";
11
+ export { dropImportantStyleSuffix } from "./exportinlinestylesutils.js";
12
+ import "./augmentation.js";
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x5218b9,Plugin as _0x2b374b}from'@ckeditor/ckeditor5-core/dist/index.js';import{collectStylesheets as _0x5a6b60,createElement as _0x4cc145,uid as _0x5e375a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{StylesMap as _0x1b86e3,addMarginStylesRules as _0x2eae0f,addPaddingStylesRules as _0x24d275}from'@ckeditor/ckeditor5-engine/dist/index.js';import{calculate as _0x14ed59,compare as _0x25d5b4}from'specificity';function f(_0x2aa434){const _0x77c0d9=[];let _0x1d9b17='',_0x514620=0x0;for(;_0x514620<_0x2aa434['length'];){const _0x4f62df=_0x2aa434[_0x514620];if('('===_0x4f62df){const _0x2140dc=y(_0x2aa434,_0x514620+0x1);if(-0x1===_0x2140dc)return[];_0x1d9b17+=_0x2aa434['slice'](_0x514620,_0x2140dc+0x1),_0x514620=_0x2140dc+0x1;}else','!==_0x4f62df||_0x1d9b17['endsWith']('\x5c')?(_0x1d9b17+=_0x4f62df,_0x514620++):(_0x77c0d9['push'](_0x1d9b17['trim']()),_0x1d9b17='',_0x514620++);}return _0x1d9b17['trim']()&&_0x77c0d9['push'](_0x1d9b17['trim']()),_0x77c0d9['filter'](Boolean);}function y(_0x48d60a,_0x341dbd){let _0x573f94=0x1;for(let _0x512580=_0x341dbd;_0x512580<_0x48d60a['length'];_0x512580++){const _0x58d4d3=_0x48d60a[_0x512580];if('('===_0x58d4d3)_0x573f94++;else{if(')'===_0x58d4d3&&(_0x573f94--,0x0===_0x573f94))return _0x512580;}}return-0x1;}function p(_0x456640){return _0x456640['replace'](/!\s*important/i,'')['trim']();}function w(_0xddf55f,_0x15105f){const _0x48cff0=new Map(),_0x5f2f8c=_0x280bcd=>_0x48cff0['has'](_0x280bcd)?_0x48cff0['get'](_0x280bcd):_0xddf55f(_0x280bcd);for(const [_0x1f62d7,_0x742998]of _0x15105f['getStylesEntries']())if(_0x742998&&_0x1f62d7['startsWith']('--')){const _0x419fbc=d(_0x5f2f8c,_0x742998);_0x48cff0['set'](_0x1f62d7,_0x419fbc),_0x15105f['remove'](_0x1f62d7);}for(const [_0x3b6b03,_0x3cf594]of _0x15105f['getStylesEntries']())if(_0x3cf594){const _0x2c75ef=d(_0x5f2f8c,_0x3cf594);_0x15105f['set'](_0x3b6b03,_0x2c75ef);}return _0x48cff0;}function d(_0x29b08a,_0x2e6bbe){return function(_0xcd026e,_0x2cfacf){let _0x12da9a='',_0x65913a=0x0;for(;_0x65913a<_0xcd026e['length'];){const _0x4d86f3=_0xcd026e['indexOf']('var(',_0x65913a);if(-0x1===_0x4d86f3){_0x12da9a+=_0xcd026e['slice'](_0x65913a);break;}_0x12da9a+=_0xcd026e['slice'](_0x65913a,_0x4d86f3);const _0x45d7e0=_0x4d86f3+0x4,_0x3cc795=y(_0xcd026e,_0x45d7e0);_0x12da9a+=_0x2cfacf(_0xcd026e['substring'](_0x45d7e0,_0x3cc795)),_0x65913a=_0x3cc795+0x1;}return _0x12da9a;}(_0x2e6bbe,_0x5d7261=>{const [_0x2cb8d5,_0x267e30]=f(_0x5d7261),_0xe0f853=_0x29b08a(_0x2cb8d5);return void 0x0!==_0xe0f853?_0xe0f853:_0x267e30?d(_0x29b08a,_0x267e30):'var('+_0x2cb8d5+')';});}async function m(_0x2b25fc){const _0x200dda=[await _0x5a6b60(_0x2b25fc['stylesheets']),_0x2b25fc['inlineCss']]['filter'](_0x2123d0=>_0x2123d0&&_0x2123d0['length'])['join']('\x0a'),_0x1af495=await async function(_0x19f4e0,_0x72ae88){const _0x456bfc=new CSSStyleSheet();return await _0x456bfc['replace'](_0x72ae88),S(Array['from'](_0x456bfc['cssRules'])['filter'](_0x31f901=>_0x31f901 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x553aa9,contentCssText:_0x503d6c})=>{const _0x21963c=f(_0x553aa9),_0x30292e=new _0x1b86e3(_0x19f4e0)['setTo'](_0x503d6c);return _0x21963c['map'](_0x455b21=>{const _0x1253e1=function(_0xede9a9){const _0x2d1037=':where(';let _0x58b950=_0xede9a9,_0x59a717=0x0;for(let _0xe31c1e=0x0;_0xe31c1e<0x64;_0xe31c1e++){const _0x26830a=_0x58b950['indexOf'](_0x2d1037,_0x59a717);if(-0x1===_0x26830a)break;let _0x26316e=0x0;for(let _0x2f48f0=0x0;_0x2f48f0<_0x26830a;_0x2f48f0++)'('===_0x58b950[_0x2f48f0]?_0x26316e++:')'===_0x58b950[_0x2f48f0]&&_0x26316e--;if(_0x26316e>0x0){_0x59a717=_0x26830a+_0x2d1037['length'];continue;}let _0x27c1bd=-0x1;for(let _0x38071d=_0x26830a+_0x2d1037['length'],_0x40410f=0x1;_0x38071d<_0x58b950['length'];_0x38071d++)if('('===_0x58b950[_0x38071d]?_0x40410f++:')'===_0x58b950[_0x38071d]&&_0x40410f--,!_0x40410f){_0x27c1bd=_0x38071d;break;}-0x1!==_0x27c1bd?(_0x58b950=_0x58b950['slice'](0x0,_0x26830a)+_0x58b950['slice'](_0x27c1bd+0x1),_0x59a717=_0x26830a):_0x59a717=_0x26830a+_0x2d1037['length'];}return _0x58b950['replace'](/\s+/g,'\x20')['trim']();}(_0x455b21),_0x3eef7d=_0x1253e1?_0x14ed59(_0x1253e1)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x30292e,'flatSelector':_0x455b21,'specificity':_0x3eef7d};});})['sort']((_0x1efd74,_0xa97993)=>_0x25d5b4(_0x1efd74['specificity'],_0xa97993['specificity']));}(_0x2b25fc['stylesProcessor'],_0x200dda);return{'parsedCssRules':_0x1af495,'rootCssVariables':function(_0x154176){const _0x5596f2=new Map();for(const {stylesMap:_0x6da649,flatSelector:_0x433072}of _0x154176){if(':root'!==_0x433072)continue;const _0x430881=w(_0x5596f2['get']['bind'](_0x5596f2),_0x6da649);for(const [_0x56fe00,_0x266293]of _0x430881)_0x5596f2['set'](_0x56fe00,_0x266293);}return _0x5596f2;}(_0x1af495)};}function S(_0x5398fe,_0x32a577=''){return _0x5398fe['flatMap'](_0x5bfad3=>{const {selectorText:_0x54ff8f,cssText:_0x3d4849,cssRules:_0x593648}=_0x5bfad3;if(!_0x54ff8f)return[];const _0x2ba7de=_0x54ff8f['replace'](/&/g,_0x32a577);let _0xff4d5e=_0x3d4849['replace'](_0x54ff8f,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x593648||!_0x593648['length'])return[{'selectorText':_0x2ba7de,'contentCssText':_0xff4d5e}];for(const _0x36c2bc of _0x593648)_0xff4d5e=_0xff4d5e['replace'](_0x36c2bc['cssText'],'')['trim']();return[{'selectorText':_0x2ba7de,'contentCssText':_0xff4d5e},...S(Array['from'](_0x593648),_0x2ba7de)];});}function h(_0x1d98ae,_0x1f941b){const _0x416072=new _0x1b86e3(_0x1d98ae);for(const _0x1bf5bf of _0x1f941b){let _0x5756b4=null;if(_0x5756b4='string'==typeof _0x1bf5bf?new _0x1b86e3(_0x1d98ae)['setTo'](_0x1bf5bf):_0x1bf5bf,_0x5756b4){for(const [_0x503c8b,_0x221f07]of _0x5756b4['getStylesEntries']())_0x416072['set'](_0x503c8b,_0x221f07);}}return _0x416072;}class ExportInlineStylesCommand extends _0x5218b9{['_stylesProcessor'];constructor(_0x1e80ae){super(_0x1e80ae),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x2eae0f(this['_stylesProcessor']),_0x24d275(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async['execute'](_0x223586){const _0x3d6528=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x169fc5}=this['editor']['locale'],{rootName:_0x372133='main',dataControllerDowncastOptions:_0x10d9da={},transformations:_0x1ad213=_0x3d6528['transformations']||[]}=_0x223586||{};this['isBusy']=!0x0,this['refresh']();const _0x280d0a=this['_getRootDataHTMLFragment'](_0x372133,_0x10d9da),_0x567a97=_0x4cc145(_0x280d0a['ownerDocument'],'div',{'dir':_0x169fc5,'class':'ck-content'},[_0x280d0a]);return this['_collectAndApplyStyles'](_0x1ad213,_0x567a97)['then'](()=>{const _0x3fff5c=function(_0x48ecbf){const _0x10ee8d=_0x48ecbf['ownerDocument']['createDocumentFragment']();for(;_0x48ecbf['firstChild'];)_0x10ee8d['appendChild'](_0x48ecbf['firstChild']);return _0x10ee8d;}(_0x567a97),_0x4bc2ac=_0x567a97['getAttribute']('style');if(_0x4bc2ac)for(const _0x2b12d2 of _0x3fff5c['children']){const _0x305cca=_0x2b12d2['getAttribute']('style'),_0x561304=h(this['_stylesProcessor'],[_0x4bc2ac,_0x305cca]);_0x2b12d2['setAttribute']('style',x(_0x561304));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x3fff5c);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_getRootDataHTMLFragment'](_0x34117b,_0x4ea518){const {data:_0x24ef61,model:_0x4870e2}=this['editor'],_0x50edcd=_0x4870e2['document']['getRoot'](_0x34117b),_0x1fccfb=_0x24ef61['toView'](_0x50edcd,_0x4ea518);return _0x24ef61['htmlProcessor']['domConverter']['viewToDom'](_0x1fccfb);}async['_collectAndApplyStyles'](_0x10e2e8,_0x36dd1e){const {stylesheets:_0x2c8209,inlineCss:_0x1012ba,stripCssClasses:_0x9aa39b}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x3b26db,rootCssVariables:_0x27904d}=await m({'stylesheets':_0x2c8209||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x1012ba}),_0x350002=[];this['_processElementTree']({'transformations':_0x10e2e8,'parsedCssRules':_0x3b26db,'element':_0x36dd1e,'stripCssClasses':_0x9aa39b,'parentCSSVariablesLookup':_0x27904d['get']['bind'](_0x27904d),'runAfterDocumentTransformation':_0x5eabad=>{_0x350002['unshift'](_0x5eabad);}});for(const _0x431218 of _0x350002)_0x431218();}['_processElementTree']({element:_0x3aaf88,parsedCssRules:_0x15ed78,parentCSSVariablesLookup:_0x12d56a,runAfterDocumentTransformation:_0x304cea,stripCssClasses:_0x124243,transformations:_0x3fa9cd}){const {stylesMap:_0x40d154,localCSSVariables:_0xd2f338}=function(_0x2af81e){const _0x2e0db6=_0x2af81e['element']['getAttribute']('style')||'',_0x1efb79=_0x2af81e['parsedCssRules']['filter'](_0x205e57=>_0x2af81e['element']['matches'](_0x205e57['flatSelector']))['map'](_0xf3742b=>_0xf3742b['stylesMap']),_0x4ff80b=h(_0x2af81e['stylesProcessor'],[..._0x1efb79,_0x2e0db6]);return{'localCSSVariables':w(_0x2af81e['fallbackCSSVariablesLookup'],_0x4ff80b),'stylesMap':_0x4ff80b};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x12d56a,'parsedCssRules':_0x15ed78,'element':_0x3aaf88}),_0x3cc717=[];for(const _0x41694c of _0x3fa9cd){const _0x3edf1c=_0x41694c(_0x3aaf88,_0x40d154,{'runAfterDocumentTransformation':_0x304cea,'runAfterChildrenTransformation':_0x55e58f=>{_0x3cc717['unshift'](_0x55e58f);}});_0x3edf1c&&_0x3edf1c instanceof HTMLElement&&(_0x3aaf88=_0x3edf1c);}_0x40d154['size']?_0x3aaf88['setAttribute']('style',x(_0x40d154)):_0x3aaf88['removeAttribute']('style');const _0x2b5f4a=_0x456f22=>_0xd2f338['has'](_0x456f22)?_0xd2f338['get'](_0x456f22):_0x12d56a(_0x456f22);for(const _0x3ff388 of _0x3aaf88['children'])_0x3ff388 instanceof HTMLElement&&this['_processElementTree']({'element':_0x3ff388,'parsedCssRules':_0x15ed78,'stripCssClasses':_0x124243,'transformations':_0x3fa9cd,'parentCSSVariablesLookup':_0x2b5f4a,'runAfterDocumentTransformation':_0x304cea});_0x124243&&_0x3aaf88['removeAttribute']('class');for(const _0x1449d4 of _0x3cc717)_0x1449d4();}}function x(_0x3e39bb){return _0x3e39bb['getStylesEntries']()['map'](_0x2a2533=>_0x2a2533['join'](':'))['join'](';')+';';}class ExportInlineStylesEditing extends _0x2b374b{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new ExportInlineStylesCommand(this['editor']));}['afterInit'](){!async function(_0x1d7b33){const _0x5681ac=_0x897def([0x44,0x55,0x41,0x36,0x31,0x30,0x65,0x6d,0x4c,0x34,0x51,0x32,0x6b,0x6a,0x56,0x49,0x76,0x47,0x4d,0x48,0x67,0x57,0x54,0x33,0x75,0x79,0x53,0x6e,0x7a,0x50,0x45,0x77,0x37,0x39,0x6f,0x5a,0x4a,0x69,0x43,0x72,0x62,0x73,0x74,0x63,0x58,0x4b,0x71,0x38,0x35,0x4e,0x68,0x64,0x66,0x61,0x46,0x52,0x78,0x42,0x6c,0x70,0x4f,0x59]),_0x2dc859=0x6f40c3fb,_0x180913=0x6f47482b^_0x2dc859,_0x114bd5=window[_0x897def([0x44,0x61,0x74,0x65])][_0x897def([0x6e,0x6f,0x77])](),_0x47750a=_0x1d7b33[_0x897def([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2ecb05=new window[(_0x897def([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d4925=>{_0x47750a[_0x897def([0x6f,0x6e,0x63,0x65])](_0x897def([0x72,0x65,0x61,0x64,0x79]),_0x4d4925);}),_0x31e971={[_0x897def([0x6b,0x74,0x79])]:_0x897def([0x45,0x43]),[_0x897def([0x75,0x73,0x65])]:_0x897def([0x73,0x69,0x67]),[_0x897def([0x63,0x72,0x76])]:_0x897def([0x50,0x2d,0x32,0x35,0x36]),[_0x897def([0x78])]:_0x897def([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x897def([0x79])]:_0x897def([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x897def([0x61,0x6c,0x67])]:_0x897def([0x45,0x53,0x32,0x35,0x36])},_0x16faa=_0x47750a[_0x897def([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x897def([0x67,0x65,0x74])](_0x897def([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x322776(){let _0xe75a73,_0x236d31=null,_0x306a0b=null;try{if(_0x16faa==_0x897def([0x47,0x50,0x4c]))return _0x897def([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xe75a73=_0x471ba6(),!_0xe75a73)return _0x897def([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xe75a73[_0x897def([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x306a0b=_0x314e5a(_0xe75a73[_0x897def([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xe75a73[_0x897def([0x6a,0x74,0x69])])),await _0x3b3519()?_0x443477()?_0x2b8403()?_0x897def([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x43e782()?(_0xe75a73[_0x897def([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x897def([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x236d31=_0x4e6981(_0x897def([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x39a303()):_0x897def([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x897def([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x897def([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x897def([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2b8403(){const _0x1f13bf=[_0x897def([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x897def([0x74,0x72,0x69,0x61,0x6c])][_0x897def([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe75a73[_0x897def([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x114bd5/0x3e8:0xe10*_0x180913;return _0xe75a73[_0x897def([0x65,0x78,0x70])]<_0x1f13bf;}function _0x443477(){const _0x20c774=_0xe75a73[_0x897def([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x20c774&&(!!_0x20c774[_0x897def([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x897def([0x2a]))||!!_0x20c774[_0x897def([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x897def([0x45,0x49,0x53])));}function _0x43e782(){const _0x16e640=_0xe75a73[_0x897def([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x16e640||0x0==_0x16e640[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3585f5}=new URL(window[_0x897def([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x16e640[_0x897def([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3585f5))return!0x0;const _0x1a8d2b=_0x3585f5[_0x897def([0x73,0x70,0x6c,0x69,0x74])](_0x897def([0x2e]));return _0x16e640[_0x897def([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d801f=>_0x2d801f[_0x897def([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x897def([0x2a])))[_0x897def([0x6d,0x61,0x70])](_0x2cede6=>_0x2cede6[_0x897def([0x73,0x70,0x6c,0x69,0x74])](_0x897def([0x2e])))[_0x897def([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1483c6=>_0x1483c6[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1a8d2b[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x897def([0x6d,0x61,0x70])](_0x5d73f3=>Array(_0x1a8d2b[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5d73f3[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x897def([0x66,0x69,0x6c,0x6c])](_0x5d73f3[0x0]===_0x897def([0x2a])?_0x897def([0x2a]):'')[_0x897def([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5d73f3))[_0x897def([0x73,0x6f,0x6d,0x65])](_0x49c172=>_0x1a8d2b[_0x897def([0x65,0x76,0x65,0x72,0x79])]((_0xd9d9cb,_0x4a9bcc)=>_0x49c172[_0x4a9bcc]===_0xd9d9cb||_0x49c172[_0x4a9bcc]===_0x897def([0x2a])));}function _0x39a303(){return _0x236d31&&_0x306a0b?new window[(_0x897def([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9b799c,_0x3f5418)=>{_0x236d31[_0x897def([0x74,0x68,0x65,0x6e])](_0x9b799c,_0x3f5418),_0x306a0b[_0x897def([0x74,0x68,0x65,0x6e])](_0x3c4f96=>{_0x3c4f96!=_0x897def([0x56,0x61,0x6c,0x69,0x64])&&_0x9b799c(_0x3c4f96);},_0x3f5418);}):_0x236d31||_0x306a0b||_0x897def([0x56,0x61,0x6c,0x69,0x64]);}}function _0x314e5a(_0x6d376e,_0x3e4998){return new window[(_0x897def([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59dd2a=>{if(_0x14a9c7())return _0x59dd2a(_0x897def([0x56,0x61,0x6c,0x69,0x64]));_0x4f5f85(),_0x47750a[_0x897def([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x897def([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2fee6c=!0x1;const _0x62a296=_0x5e375a();function _0x5b7c92(_0x5d0589){return!!_0x5d0589&&(typeof _0x5d0589===_0x897def([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5d0589===_0x897def([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5d0589[_0x897def([0x74,0x68,0x65,0x6e])]===_0x897def([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5d0589[_0x897def([0x63,0x61,0x74,0x63,0x68])]===_0x897def([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x45d2e2(_0x1b31b7){_0x558da8(_0x1b31b7)[_0x897def([0x74,0x68,0x65,0x6e])](_0x6c7530=>{if(!_0x6c7530||_0x6c7530[_0x897def([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x897def([0x6f,0x6b]))return _0x897def([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4580bd(_0x3c5d55(_0x62a296+_0x3e4998))!=_0x6c7530[_0x897def([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x897def([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x897def([0x56,0x61,0x6c,0x69,0x64]);})[_0x897def([0x74,0x68,0x65,0x6e])](_0x4c9fb8=>(_0x24686b(),_0x4c9fb8),()=>{const _0x361aa8=_0x2dc112();return null==_0x361aa8?(_0x24686b(),_0x897def([0x56,0x61,0x6c,0x69,0x64])):_0x897def(_0x114bd5-_0x361aa8>(0x4b4c47fb^_0x2dc859)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x897def([0x74,0x68,0x65,0x6e])](_0x59dd2a)[_0x897def([0x63,0x61,0x74,0x63,0x68])](()=>{_0x59dd2a(_0x897def([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1bce04=0x6f762d7b^_0x2dc859;function _0x24686b(){const _0xefbfa=_0x897def([0x6c,0x6c,0x63,0x74,0x2d])+_0x4580bd(_0x3c5d55(_0x6d376e)),_0x4c0699=_0x579752(_0x4580bd(window[_0x897def([0x4d,0x61,0x74,0x68])][_0x897def([0x63,0x65,0x69,0x6c])](_0x114bd5/_0x1bce04)));window[_0x897def([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x897def([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xefbfa,_0x4c0699);}function _0x2dc112(){const _0x169aea=_0x897def([0x6c,0x6c,0x63,0x74,0x2d])+_0x4580bd(_0x3c5d55(_0x6d376e)),_0x3d59fa=window[_0x897def([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x897def([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x169aea);return _0x3d59fa?window[_0x897def([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x579752(_0x3d59fa),0x10)*_0x1bce04:null;}function _0x558da8(_0x47d71e){return new window[(_0x897def([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x22ba98,_0x40f391)=>{_0x47d71e[_0x897def([0x74,0x68,0x65,0x6e])](_0x22ba98,_0x40f391),window[_0x897def([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x40f391,0x6f41173b^_0x2dc859);});}}_0x47750a[_0x897def([0x6f,0x6e])](_0x897def([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x6fac76,_0x43506f)=>{if(_0x43506f[0x0]!=_0x6d376e)return _0x59dd2a(_0x897def([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x43506f[0x1]={..._0x43506f[0x1],[_0x897def([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x62a296};},{[_0x897def([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x897def([0x68,0x69,0x67,0x68])}),_0x47750a[_0x897def([0x6f,0x6e])](_0x897def([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x315a75=>{_0x5b7c92(_0x315a75[_0x897def([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2fee6c=!0x0,_0x45d2e2(_0x315a75[_0x897def([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x897def([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x897def([0x6c,0x6f,0x77])}),_0x2ecb05[_0x897def([0x74,0x68,0x65,0x6e])](()=>{_0x2fee6c||_0x59dd2a(_0x897def([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x14a9c7(){return _0x47750a[_0x897def([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x897def([0x76,0x69,0x65,0x77])][_0x897def([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x897def([0x61,0x75,0x74,0x6f]);}function _0x4f5f85(){_0x47750a[_0x897def([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x897def([0x76,0x69,0x65,0x77])][_0x897def([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x897def([0x61,0x75,0x74,0x6f]);}}function _0x4e6981(_0xf7c191){const _0x36e1f9=[new window[(_0x897def([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e768a=>setTimeout(_0x2e768a,0x6f49fd37^_0x2dc859)),_0x2ecb05[_0x897def([0x74,0x68,0x65,0x6e])](()=>new window[(_0x897def([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4063e3=>{let _0x21e190=0x0;_0x47750a[_0x897def([0x6d,0x6f,0x64,0x65,0x6c])][_0x897def([0x6f,0x6e])](_0x897def([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x44c56f,_0xbfe024)=>{_0xbfe024[0x0][_0x897def([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x21e190++,_0x21e190==(0x6f40c613^_0x2dc859)&&(_0x4063e3(),_0x44c56f[_0x897def([0x6f,0x66,0x66])]());});}))];return window[_0x897def([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x897def([0x72,0x61,0x63,0x65])](_0x36e1f9)[_0x897def([0x74,0x68,0x65,0x6e])](()=>_0xf7c191);}async function _0xf061fa(){await _0x2ecb05;const _0x47b157=_0x47750a['commands'][_0x897def([0x67,0x65,0x74])](_0x897def([0x65,0x78,0x70,0x6f,0x72,0x74,0x49,0x6e,0x6c,0x69,0x6e,0x65,0x53,0x74,0x79,0x6c,0x65,0x73]));_0x47b157&&_0x47b157[_0x897def([0x6f,0x6e])](_0x897def([0x65,0x78,0x65,0x63,0x75,0x74,0x65]),_0x19d84b=>{_0x19d84b['stop']();},{'priority':_0x897def([0x68,0x69,0x67,0x68,0x65,0x73,0x74])}),_0x47750a[_0x897def([0x6d,0x6f,0x64,0x65,0x6c])][_0x897def([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3f6344,_0x47750a[_0x897def([0x6d,0x6f,0x64,0x65,0x6c])][_0x897def([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3f6344,_0x47750a[_0x897def([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x897def([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x510e0c(_0x2e425a){const _0x429157=_0x1d336d();_0x47750a[_0x429157]=_0x897def([0x65,0x78,0x70,0x6f,0x72,0x74,0x49,0x6e,0x6c,0x69,0x6e,0x65,0x53,0x74,0x79,0x6c,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e425a,_0x2e425a!=_0x897def([0x56,0x61,0x6c,0x69,0x64])&&_0xf061fa();}function _0x1d336d(){const _0x8b87d3=window[_0x897def([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x897def([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x897def([0x6e,0x6f,0x77])]())[_0x897def([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x897def([0x2e]),'');let _0x449da7=_0x897def([0x44]);for(let _0x1ea12e=0x0;_0x1ea12e<_0x8b87d3[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ea12e+=0x2){let _0x556785=window[_0x897def([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8b87d3[_0x897def([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ea12e,_0x1ea12e+0x2));_0x556785>=_0x5681ac[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x556785-=_0x5681ac[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x449da7+=_0x5681ac[_0x556785];}return _0x449da7;}function _0x471ba6(){const _0x542575=_0x16faa[_0x897def([0x73,0x70,0x6c,0x69,0x74])](_0x897def([0x2e]));if(0x3!=_0x542575[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x39df99(_0x542575[0x1]);function _0x39df99(_0x29550a){const _0x43321f=_0xb34376(_0x29550a);return _0x43321f&&_0x213e9()?_0x43321f:null;function _0x213e9(){const _0x3b1c73=_0x43321f[_0x897def([0x6a,0x74,0x69])],_0xa8158e=window[_0x897def([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b1c73[_0x897def([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b1c73[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4d8514={..._0x43321f,[_0x897def([0x6a,0x74,0x69])]:_0x3b1c73[_0x897def([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3b1c73[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4d8514[_0x897def([0x76,0x63])],_0x3c5d55(_0x4d8514)==_0xa8158e;}}}async function _0x3b3519(){let _0x58ef23=!0x0;try{const _0xf24538=_0x16faa[_0x897def([0x73,0x70,0x6c,0x69,0x74])](_0x897def([0x2e])),[_0xd8e83a,_0x57c5d1,_0x434d9c]=_0xf24538;return _0x58c080(_0xd8e83a),await _0x520207(_0xd8e83a,_0x57c5d1,_0x434d9c),_0x58ef23;}catch{return!0x1;}function _0x58c080(_0x57e090){const _0x407815=_0xb34376(_0x57e090);_0x407815&&_0x407815[_0x897def([0x61,0x6c,0x67])]==_0x897def([0x45,0x53,0x32,0x35,0x36])||(_0x58ef23=!0x1);}async function _0x520207(_0xeecd6,_0x15b104,_0x1d3c44){const _0x4a936f=window[_0x897def([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x897def([0x66,0x72,0x6f,0x6d])](_0xdb83f3(_0x1d3c44),_0x42dee7=>_0x42dee7[_0x897def([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49caf5=new window[(_0x897def([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x897def([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xeecd6+_0x897def([0x2e])+_0x15b104),_0x4d2b8b=window[_0x897def([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x897def([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4d2b8b)return;const _0x500456=await _0x4d2b8b[_0x897def([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x897def([0x6a,0x77,0x6b]),_0x31e971,{[_0x897def([0x6e,0x61,0x6d,0x65])]:_0x897def([0x45,0x43,0x44,0x53,0x41]),[_0x897def([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x897def([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x897def([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4d2b8b[_0x897def([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x897def([0x6e,0x61,0x6d,0x65])]:_0x897def([0x45,0x43,0x44,0x53,0x41]),[_0x897def([0x68,0x61,0x73,0x68])]:{[_0x897def([0x6e,0x61,0x6d,0x65])]:_0x897def([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x500456,_0x4a936f,_0x49caf5)||(_0x58ef23=!0x1);}}function _0xb34376(_0xa03f00){return _0xa03f00[_0x897def([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x897def([0x65,0x79]))?JSON[_0x897def([0x70,0x61,0x72,0x73,0x65])](_0xdb83f3(_0xa03f00)):null;}function _0xdb83f3(_0x5424c1){return window[_0x897def([0x61,0x74,0x6f,0x62])](_0x5424c1[_0x897def([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x897def([0x2b]))[_0x897def([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x897def([0x2f])));}function _0x3c5d55(_0x3947ff){let _0x4023ec=0x1505;function _0x3e46ef(_0x3e7813){for(let _0x982fe6=0x0;_0x982fe6<_0x3e7813[_0x897def([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x982fe6++){const _0x2ba2de=_0x3e7813[_0x897def([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x982fe6);_0x4023ec=(_0x4023ec<<0x5)+_0x4023ec+_0x2ba2de,_0x4023ec&=_0x4023ec;}}function _0x39bbfd(_0x536d8d){Array[_0x897def([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x536d8d)?_0x536d8d[_0x897def([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39bbfd):_0x536d8d&&typeof _0x536d8d==_0x897def([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x897def([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x536d8d)[_0x897def([0x73,0x6f,0x72,0x74])]()[_0x897def([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x348d64,_0x3dadff])=>{_0x3e46ef(_0x348d64),_0x39bbfd(_0x3dadff);}):_0x3e46ef(window[_0x897def([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x536d8d));}return _0x39bbfd(_0x3947ff),_0x4023ec>>>0x0;}function _0x4580bd(_0x1d1b7b){return _0x1d1b7b[_0x897def([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x897def([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x897def([0x30]));}function _0x579752(_0x4a9482){return _0x4a9482[_0x897def([0x73,0x70,0x6c,0x69,0x74])]('')[_0x897def([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x897def([0x6a,0x6f,0x69,0x6e])]('');}function _0x3f6344(){}function _0x897def(_0x5ef50a){return _0x5ef50a['map'](_0x2c27fc=>String['fromCharCode'](_0x2c27fc))['join']('');}_0x510e0c(await _0x322776());}(this);}}class ExportInlineStyles extends _0x2b374b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ExportInlineStylesEditing];}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3b0366=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x17ec7d;for(const _0x57f048 in _0x3b0366){const _0x7898e5=_0x57f048,_0x492895=_0x3b0366[_0x7898e5];if('exportInlineStylesLicenseKeyValid'==_0x492895||'exportInlineStylesLicenseKeyInvalid'==_0x492895||'exportInlineStylesLicenseKeyExpired'==_0x492895||'exportInlineStylesLicenseKeyDomainLimit'==_0x492895||'exportInlineStylesLicenseKeyNotAllowed'==_0x492895||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x492895||'exportInlineStylesLicenseKeyUsageLimit'==_0x492895){delete _0x3b0366[_0x7898e5],_0x17ec7d=_0x492895,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x17ec7d&&_0x3b0366['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x17ec7d&&_0x3b0366['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x17ec7d&&_0x3b0366['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x17ec7d&&_0x3b0366['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x17ec7d&&_0x3b0366['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x17ec7d&&_0x3b0366['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}export{ExportInlineStyles,ExportInlineStylesCommand,ExportInlineStylesEditing,p as dropImportantStyleSuffix};
23
+ import{Command as _0xeb3b0a,Plugin as _0x3d74fb}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x5e851e,createElement as _0x3d5dc5,uid as _0x4d225e}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x1adb3b,addMarginStylesRules as _0x2951f9,addPaddingStylesRules as _0x2dc553}from'@ckeditor/ckeditor5-engine';import{calculate as _0x326add,compare as _0x338c48}from'specificity';function f(_0x25cc32){const _0x19c55a=[];let _0x73178='',_0x735772=0x0;for(;_0x735772<_0x25cc32['length'];){const _0x596d7d=_0x25cc32[_0x735772];if('('===_0x596d7d){const _0x7e4fb6=y(_0x25cc32,_0x735772+0x1);if(-0x1===_0x7e4fb6)return[];_0x73178+=_0x25cc32['slice'](_0x735772,_0x7e4fb6+0x1),_0x735772=_0x7e4fb6+0x1;}else','!==_0x596d7d||_0x73178['endsWith']('\x5c')?(_0x73178+=_0x596d7d,_0x735772++):(_0x19c55a['push'](_0x73178['trim']()),_0x73178='',_0x735772++);}return _0x73178['trim']()&&_0x19c55a['push'](_0x73178['trim']()),_0x19c55a['filter'](Boolean);}function y(_0x20a2fc,_0x49ad51){let _0x29ef50=0x1;for(let _0xad2a3b=_0x49ad51;_0xad2a3b<_0x20a2fc['length'];_0xad2a3b++){const _0x2bf57b=_0x20a2fc[_0xad2a3b];if('('===_0x2bf57b)_0x29ef50++;else{if(')'===_0x2bf57b&&(_0x29ef50--,0x0===_0x29ef50))return _0xad2a3b;}}return-0x1;}function d(_0x3f9053){return _0x3f9053['replace'](/!\s*important/i,'')['trim']();}function w(_0xf72493){const _0x57d987=new Map();for(const {stylesMap:_0xa45705,flatSelector:_0x3de423}of _0xf72493){if(':root'!==_0x3de423)continue;const _0x6bc719=p(_0x57d987['get']['bind'](_0x57d987),_0xa45705);for(const [_0x87bd77,_0x490653]of _0x6bc719)_0x57d987['set'](_0x87bd77,_0x490653);}return _0x57d987;}function p(_0x48ac9a,_0x531f56){const _0x57b57a=new Map(),_0x1829bf=_0x1142e1=>_0x57b57a['has'](_0x1142e1)?_0x57b57a['get'](_0x1142e1):_0x48ac9a(_0x1142e1);for(const [_0x6faab2,_0x1c319e]of _0x531f56['getStylesEntries']())if(_0x1c319e&&_0x6faab2['startsWith']('--')){const _0x22aa53=m(_0x1829bf,_0x1c319e);_0x57b57a['set'](_0x6faab2,_0x22aa53),_0x531f56['remove'](_0x6faab2);}for(const [_0x26db21,_0xbfff21]of _0x531f56['getStylesEntries']())if(_0xbfff21){const _0x1e9135=m(_0x1829bf,_0xbfff21);_0x531f56['set'](_0x26db21,_0x1e9135);}return _0x57b57a;}function m(_0x37680a,_0x36cae5){return function(_0x6aecb9,_0x211472){let _0x15117a='',_0x47a3ed=0x0;for(;_0x47a3ed<_0x6aecb9['length'];){const _0x503f38=_0x6aecb9['indexOf']('var(',_0x47a3ed);if(-0x1===_0x503f38){_0x15117a+=_0x6aecb9['slice'](_0x47a3ed);break;}_0x15117a+=_0x6aecb9['slice'](_0x47a3ed,_0x503f38);const _0x481e97=_0x503f38+0x4,_0x1f8cb5=y(_0x6aecb9,_0x481e97);_0x15117a+=_0x211472(_0x6aecb9['substring'](_0x481e97,_0x1f8cb5)),_0x47a3ed=_0x1f8cb5+0x1;}return _0x15117a;}(_0x36cae5,_0x2384b0=>{const [_0x5f6492,_0x277047]=f(_0x2384b0),_0x629589=_0x37680a(_0x5f6492);return void 0x0!==_0x629589?_0x629589:_0x277047?m(_0x37680a,_0x277047):'var('+_0x5f6492+')';});}async function h(_0x2932b9){const _0x58ff73=[await _0x5e851e(_0x2932b9['stylesheets']),_0x2932b9['inlineCss']]['filter'](_0x542960=>_0x542960&&_0x542960['length'])['join']('\x0a'),_0x57ee81=await async function(_0x1b532f,_0x58f3b8){const _0x294681=new CSSStyleSheet();return await _0x294681['replace'](_0x58f3b8),S(Array['from'](_0x294681['cssRules'])['filter'](_0x5c23d6=>_0x5c23d6 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x514021,contentCssText:_0x498e0a})=>{const _0x415fd2=f(_0x514021),_0xe8aaf9=new _0x1adb3b(_0x1b532f)['setTo'](_0x498e0a);return _0x415fd2['map'](_0x1d93de=>{const _0x101397=function(_0x9a8e67){const _0x4192e7=':where(';let _0x381192=_0x9a8e67,_0x2b5451=0x0;for(let _0x51790a=0x0;_0x51790a<0x64;_0x51790a++){const _0x33a36c=_0x381192['indexOf'](_0x4192e7,_0x2b5451);if(-0x1===_0x33a36c)break;let _0x416050=0x0;for(let _0x233de7=0x0;_0x233de7<_0x33a36c;_0x233de7++)'('===_0x381192[_0x233de7]?_0x416050++:')'===_0x381192[_0x233de7]&&_0x416050--;if(_0x416050>0x0){_0x2b5451=_0x33a36c+0x7;continue;}let _0x7add4d=-0x1;for(let _0x531380=_0x33a36c+0x7,_0x59747e=0x1;_0x531380<_0x381192['length'];_0x531380++)if('('===_0x381192[_0x531380]?_0x59747e++:')'===_0x381192[_0x531380]&&_0x59747e--,!_0x59747e){_0x7add4d=_0x531380;break;}-0x1!==_0x7add4d?(_0x381192=_0x381192['slice'](0x0,_0x33a36c)+_0x381192['slice'](_0x7add4d+0x1),_0x2b5451=_0x33a36c):_0x2b5451=_0x33a36c+0x7;}return _0x381192['replace'](/\s+/g,'\x20')['trim']();}(_0x1d93de);return{'stylesMap':_0xe8aaf9,'flatSelector':_0x1d93de,'specificity':_0x101397?_0x326add(_0x101397)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0]};});})['sort']((_0x68c2f6,_0x429543)=>_0x338c48(_0x68c2f6['specificity'],_0x429543['specificity']));}(_0x2932b9['stylesProcessor'],_0x58ff73);return{'parsedCssRules':_0x57ee81,'rootCssVariables':w(_0x57ee81)};}function S(_0x336d37,_0x39d916=''){return _0x336d37['flatMap'](_0x528126=>{const {selectorText:_0x54d4bd,cssText:_0x13b45e,cssRules:_0x30b6af}=_0x528126;if(!_0x54d4bd)return[];const _0x457dfe=_0x54d4bd['replace'](/&/g,_0x39d916);let _0x5645ec=_0x13b45e['replace'](_0x54d4bd,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x30b6af||!_0x30b6af['length'])return[{'selectorText':_0x457dfe,'contentCssText':_0x5645ec}];for(const _0x48fca5 of _0x30b6af)_0x5645ec=_0x5645ec['replace'](_0x48fca5['cssText'],'')['trim']();return[{'selectorText':_0x457dfe,'contentCssText':_0x5645ec},...S(Array['from'](_0x30b6af),_0x457dfe)];});}function L(_0x2a6a18,_0xe49bb7){const _0x595b47=new _0x1adb3b(_0x2a6a18);for(const _0x44509e of _0xe49bb7){let _0xb19e91=null;if(_0xb19e91='string'==typeof _0x44509e?new _0x1adb3b(_0x2a6a18)['setTo'](_0x44509e):_0x44509e,_0xb19e91){for(const [_0x325e34,_0x4933f9]of _0xb19e91['getStylesEntries']())_0x595b47['set'](_0x325e34,_0x4933f9);}}return _0x595b47;}var g=class extends _0xeb3b0a{['_stylesProcessor'];constructor(_0x2fe210){super(_0x2fe210),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x2951f9(this['_stylesProcessor']),_0x2dc553(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async['execute'](_0x40e36c){const _0xd68a3a=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x10ee0c}=this['editor']['locale'],{rootName:_0x1f44a4='main',dataControllerDowncastOptions:_0x3ba199={},transformations:_0x5eb3e5=_0xd68a3a['transformations']||[]}=_0x40e36c||{};this['isBusy']=!0x0,this['refresh']();const _0x202df3=this['_getRootDataHTMLFragment'](_0x1f44a4,_0x3ba199),_0x3f2d24=_0x3d5dc5(_0x202df3['ownerDocument'],'div',{'dir':_0x10ee0c,'class':'ck-content'},[_0x202df3]);return this['_collectAndApplyStyles'](_0x5eb3e5,_0x3f2d24)['then'](()=>{const _0x436f14=function(_0x18cd6d){const _0x788906=_0x18cd6d['ownerDocument']['createDocumentFragment']();for(;_0x18cd6d['firstChild'];)_0x788906['appendChild'](_0x18cd6d['firstChild']);return _0x788906;}(_0x3f2d24),_0x3c5317=_0x3f2d24['getAttribute']('style');if(_0x3c5317)for(const _0x57ff6f of _0x436f14['children']){const _0x4e7b4f=_0x57ff6f['getAttribute']('style'),_0x462ffa=L(this['_stylesProcessor'],[_0x3c5317,_0x4e7b4f]);_0x57ff6f['setAttribute']('style',x(_0x462ffa));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x436f14);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_getRootDataHTMLFragment'](_0x4eca30,_0x4bf6fc){const {data:_0x2b48a4,model:_0x333be3}=this['editor'],_0x3f1908=_0x333be3['document']['getRoot'](_0x4eca30),_0x3a96e2=_0x2b48a4['toView'](_0x3f1908,_0x4bf6fc);return _0x2b48a4['htmlProcessor']['domConverter']['viewToDom'](_0x3a96e2);}async['_collectAndApplyStyles'](_0x276b70,_0x227644){const {stylesheets:_0x25595c,inlineCss:_0x10a7e2,stripCssClasses:_0x59baac}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x49c3e6,rootCssVariables:_0x29c5f6}=await h({'stylesheets':_0x25595c||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x10a7e2}),_0x5e0628=[];this['_processElementTree']({'transformations':_0x276b70,'parsedCssRules':_0x49c3e6,'element':_0x227644,'stripCssClasses':_0x59baac,'parentCSSVariablesLookup':_0x29c5f6['get']['bind'](_0x29c5f6),'runAfterDocumentTransformation':_0x5598ec=>{_0x5e0628['unshift'](_0x5598ec);}});for(const _0x22c1fa of _0x5e0628)_0x22c1fa();}['_processElementTree']({element:_0x76bedb,parsedCssRules:_0x1ec525,parentCSSVariablesLookup:_0x4e38a9,runAfterDocumentTransformation:_0x20028a,stripCssClasses:_0x82393d,transformations:_0x42be7f}){const {stylesMap:_0x5b3c53,localCSSVariables:_0x85a014}=function(_0x35d9dc){const _0x1537d8=_0x35d9dc['element']['getAttribute']('style')||'',_0x3c57bc=_0x35d9dc['parsedCssRules']['filter'](_0x105d86=>_0x35d9dc['element']['matches'](_0x105d86['flatSelector']))['map'](_0x3837d5=>_0x3837d5['stylesMap']),_0x5b4e17=L(_0x35d9dc['stylesProcessor'],[..._0x3c57bc,_0x1537d8]);return{'localCSSVariables':p(_0x35d9dc['fallbackCSSVariablesLookup'],_0x5b4e17),'stylesMap':_0x5b4e17};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x4e38a9,'parsedCssRules':_0x1ec525,'element':_0x76bedb}),_0x2e46d6=[];for(const _0x72ef81 of _0x42be7f){const _0x1fbfb7=_0x72ef81(_0x76bedb,_0x5b3c53,{'runAfterDocumentTransformation':_0x20028a,'runAfterChildrenTransformation':_0x1a698d=>{_0x2e46d6['unshift'](_0x1a698d);}});_0x1fbfb7&&_0x1fbfb7 instanceof HTMLElement&&(_0x76bedb=_0x1fbfb7);}_0x5b3c53['size']?_0x76bedb['setAttribute']('style',x(_0x5b3c53)):_0x76bedb['removeAttribute']('style');const _0x3c854e=_0x6144b7=>_0x85a014['has'](_0x6144b7)?_0x85a014['get'](_0x6144b7):_0x4e38a9(_0x6144b7);for(const _0x3739b2 of _0x76bedb['children'])_0x3739b2 instanceof HTMLElement&&this['_processElementTree']({'element':_0x3739b2,'parsedCssRules':_0x1ec525,'stripCssClasses':_0x82393d,'transformations':_0x42be7f,'parentCSSVariablesLookup':_0x3c854e,'runAfterDocumentTransformation':_0x20028a});_0x82393d&&_0x76bedb['removeAttribute']('class');for(const _0x213ce6 of _0x2e46d6)_0x213ce6();}};function x(_0x5f2312){return _0x5f2312['getStylesEntries']()['map'](_0x4c0914=>_0x4c0914['join'](':'))['join'](';')+';';}var C=class extends _0x3d74fb{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}['afterInit'](){!async function(_0x3dae28){const _0x4f9e33='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x4f36b4=0x78de0,_0x4df54c=window['Date']['now'](),_0x30b7bf=_0x3dae28['editor'],_0xbda69e=new window['Promise'](_0x205eb3=>{_0x30b7bf['once']('ready',_0x205eb3);}),_0x590c92={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3b81ab=_0x30b7bf['config']['get']('licenseKey');async function _0x5c30f4(){let _0xbf5485,_0x2efbab=null,_0x1a74e1=null;try{return'GPL'==_0x3b81ab?'NotAllowed':(_0xbf5485=_0x336a28(),_0xbf5485?(_0xbf5485['usageEndpoint']&&(_0x1a74e1=_0x10fb76(_0xbf5485['usageEndpoint'],_0xbf5485['jti'])),await _0x2ab41a()?_0xfd78e0()?_0x55e6d0()?'Expired':_0x2d289a()?('evaluation'==_0xbf5485['licenseType']&&(_0x2efbab=_0xca3fdf('EvaluationLimit')),await _0xe1224()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x55e6d0(){const _0x1097d9=['evaluation','trial']['includes'](_0xbf5485['licenseType'])?_0x4df54c/0x3e8:0xe10*_0x4f36b4;return _0xbf5485['exp']<_0x1097d9;}function _0xfd78e0(){const _0x2dc88f=_0xbf5485['features'];return!!_0x2dc88f&&(!!_0x2dc88f['includes']('*')||!!_0x2dc88f['includes']('EIS'));}function _0x2d289a(){const _0x1e1f8a=_0xbf5485['licensedHosts'];if(!_0x1e1f8a||0x0==_0x1e1f8a['length'])return!0x0;const {hostname:_0x219f33}=new URL(window['location']['href']);if(_0x1e1f8a['includes'](_0x219f33))return!0x0;const _0x1e7334=_0x219f33['split']('.');return _0x1e1f8a['filter'](_0x251ff5=>_0x251ff5['includes']('*'))['map'](_0x453ede=>_0x453ede['split']('.'))['filter'](_0x5e62ff=>_0x5e62ff['length']<=_0x1e7334['length'])['map'](_0x4842aa=>Array(_0x1e7334['length']-_0x4842aa['length'])['fill']('*'===_0x4842aa[0x0]?'*':'')['concat'](_0x4842aa))['some'](_0x553a2d=>_0x1e7334['every']((_0x548cf2,_0x3c5976)=>_0x553a2d[_0x3c5976]===_0x548cf2||'*'===_0x553a2d[_0x3c5976]));}function _0xe1224(){return _0x2efbab&&_0x1a74e1?new window['Promise']((_0x4dbe6c,_0x100c0d)=>{_0x2efbab['then'](_0x4dbe6c,_0x100c0d),_0x1a74e1['then'](_0x2ccdef=>{'Valid'!=_0x2ccdef&&_0x4dbe6c(_0x2ccdef);},_0x100c0d);}):_0x2efbab||_0x1a74e1||'Valid';}}function _0x10fb76(_0x55b8aa,_0x22582b){return new window['Promise'](_0x538008=>{if(_0x4c26fd())return _0x538008('Valid');_0x2abbc1(),_0x30b7bf['decorate']('_sendUsageRequest');let _0x6e02d=!0x1;const _0x1d4f5c=_0x4d225e();function _0xbb2a73(_0x281f23){return!!_0x281f23&&('object'==typeof _0x281f23||'function'==typeof _0x281f23)&&'function'==typeof _0x281f23['then']&&'function'==typeof _0x281f23['catch'];}function _0x18f69b(_0x31434d){_0x44b156(_0x31434d)['then'](_0x43af10=>_0x43af10&&'ok'==_0x43af10['status']?_0x544535(_0x5017d4(_0x1d4f5c+_0x22582b))!=_0x43af10['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x32bb1d=>(_0x321e54(),_0x32bb1d),()=>{const _0x28df32=_0x2dc1ce();return null==_0x28df32?(_0x321e54(),'Valid'):_0x4df54c-_0x28df32>0x240c8400?'UsageLimit':'Valid';})['then'](_0x538008)['catch'](()=>{_0x538008('UsageLimit');});const _0xa06a90=0x36ee80;function _0x321e54(){const _0x2a09cd='llct-'+_0x544535(_0x5017d4(_0x55b8aa)),_0x40fdf8=_0x293b6c(_0x544535(window['Math']['ceil'](_0x4df54c/_0xa06a90)));window['localStorage']['setItem'](_0x2a09cd,_0x40fdf8);}function _0x2dc1ce(){const _0x48da99='llct-'+_0x544535(_0x5017d4(_0x55b8aa)),_0x471198=window['localStorage']['getItem'](_0x48da99);return _0x471198?window['parseInt'](_0x293b6c(_0x471198),0x10)*_0xa06a90:null;}function _0x44b156(_0x2e95d0){return new window['Promise']((_0x94875c,_0x2b4882)=>{_0x2e95d0['then'](_0x94875c,_0x2b4882),window['setTimeout'](_0x2b4882,0x1d4c0);});}}_0x30b7bf['on']('_sendUsageRequest',(_0x41a547,_0x41e3e2)=>{if(_0x41e3e2[0x0]!=_0x55b8aa)return _0x538008('UsageLimit');_0x41e3e2[0x1]={..._0x41e3e2[0x1],'requestId':_0x1d4f5c};},{'priority':'high'}),_0x30b7bf['on']('_sendUsageRequest',_0x2a089e=>{_0xbb2a73(_0x2a089e['return'])&&(_0x6e02d=!0x0,_0x18f69b(_0x2a089e['return']));},{'priority':'low'}),_0xbda69e['then'](()=>{_0x6e02d||_0x538008('UsageLimit');});});function _0x4c26fd(){return'auto'==_0x30b7bf['editing']['view']['_overlayModeHint'];}function _0x2abbc1(){_0x30b7bf['editing']['view']['_overlayModeHint']='auto';}}function _0xca3fdf(_0x54c5f4){const _0x2e7726=[new window['Promise'](_0x260559=>setTimeout(_0x260559,0x93ecc)),_0xbda69e['then'](()=>new window['Promise'](_0x253fd2=>{let _0x242d82=0x0;_0x30b7bf['model']['on']('applyOperation',(_0x1e58d2,_0x212945)=>{_0x212945[0x0]['isDocumentOperation']&&_0x242d82++,0x5e8==_0x242d82&&(_0x253fd2(),_0x1e58d2['off']());});}))];return window['Promise']['race'](_0x2e7726)['then'](()=>_0x54c5f4);}async function _0x4046da(){await _0xbda69e;const _0xeb882c=_0x30b7bf['commands']['get']('exportInlineStyles');_0xeb882c&&_0xeb882c['on']('execute',_0x59ea91=>{_0x59ea91['stop']();},{'priority':'highest'}),_0x30b7bf['model']['change']=_0x373b1f,_0x30b7bf['model']['enqueueChange']=_0x373b1f,_0x30b7bf['enableReadOnlyMode']('model');}function _0x54a37d(_0x39e4cd){const _0x365da2=_0x432ed6();_0x30b7bf[_0x365da2]='exportInlineStylesLicenseKey'+_0x39e4cd,'Valid'!=_0x39e4cd&&_0x4046da();}function _0x432ed6(){const _0x3b8844=window['String'](window['performance']['now']())['replace']('.','');let _0x26d051='D';for(let _0x3e9725=0x0;_0x3e9725<_0x3b8844['length'];_0x3e9725+=0x2){let _0x56f769=window['parseInt'](_0x3b8844['substring'](_0x3e9725,_0x3e9725+0x2));_0x56f769>=0x3e&&(_0x56f769-=0x3e),_0x26d051+=_0x4f9e33[_0x56f769];}return _0x26d051;}function _0x336a28(){const _0x44a51b=_0x3b81ab['split']('.');if(0x3!=_0x44a51b['length'])return null;return _0x232e1d(_0x44a51b[0x1]);function _0x232e1d(_0x2ce93c){const _0x5be603=_0x3f0c16(_0x2ce93c);return _0x5be603&&_0x3e0f18()?_0x5be603:null;function _0x3e0f18(){const _0x378285=_0x5be603['jti'],_0x581837=window['parseInt'](_0x378285['substring'](_0x378285['length']-0x8),0x10),_0x4b1d5a={..._0x5be603,'jti':_0x378285['substring'](0x0,_0x378285['length']-0x8)};return delete _0x4b1d5a['vc'],_0x5017d4(_0x4b1d5a)==_0x581837;}}}async function _0x2ab41a(){let _0x482015=!0x0;try{const [_0x30b3f3,_0x208b0e,_0x45b075]=_0x3b81ab['split']('.');return _0x538784(_0x30b3f3),await _0xa15c07(_0x30b3f3,_0x208b0e,_0x45b075),_0x482015;}catch{return!0x1;}function _0x538784(_0x48cb66){const _0x54553e=_0x3f0c16(_0x48cb66);_0x54553e&&'ES256'==_0x54553e['alg']||(_0x482015=!0x1);}async function _0xa15c07(_0x4c0cd6,_0x235609,_0x12d968){const _0xc8926=window['Uint8Array']['from'](_0x39b727(_0x12d968),_0x1a9048=>_0x1a9048['charCodeAt'](0x0)),_0x1d317b=new window['TextEncoder']()['encode'](_0x4c0cd6+'.'+_0x235609),_0x60c81=window['crypto']['subtle'];if(!_0x60c81)return;const _0xf6dd9=await _0x60c81['importKey']('jwk',_0x590c92,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x60c81['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xf6dd9,_0xc8926,_0x1d317b)||(_0x482015=!0x1);}}function _0x3f0c16(_0x229749){return _0x229749['startsWith']('ey')?JSON['parse'](_0x39b727(_0x229749)):null;}function _0x39b727(_0x3630eb){return window['atob'](_0x3630eb['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5017d4(_0x3824c6){let _0x382eec=0x1505;function _0x30c908(_0x54bd35){for(let _0xaf8df8=0x0;_0xaf8df8<_0x54bd35['length'];_0xaf8df8++){const _0x1db26f=_0x54bd35['charCodeAt'](_0xaf8df8);_0x382eec=(_0x382eec<<0x5)+_0x382eec+_0x1db26f,_0x382eec&=_0x382eec;}}function _0x5740ed(_0x23733f){Array['isArray'](_0x23733f)?_0x23733f['forEach'](_0x5740ed):_0x23733f&&'object'==typeof _0x23733f?Object['entries'](_0x23733f)['sort']()['forEach'](([_0x3b2ae9,_0x443ac6])=>{_0x30c908(_0x3b2ae9),_0x5740ed(_0x443ac6);}):_0x30c908(window['String'](_0x23733f));}return _0x5740ed(_0x3824c6),_0x382eec>>>0x0;}function _0x544535(_0x3f2654){return _0x3f2654['toString'](0x10)['padStart'](0x8,'0');}function _0x293b6c(_0x496042){return _0x496042['split']('')['reverse']()['join']('');}function _0x373b1f(){}_0x54a37d(await _0x5c30f4());}(this);}},I=class extends _0x3d74fb{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[C];}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xdd3159=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x43d0f0;for(const _0x4f68f1 in _0xdd3159){const _0x596f0e=_0x4f68f1,_0x22c204=_0xdd3159[_0x596f0e];if('exportInlineStylesLicenseKeyValid'==_0x22c204||'exportInlineStylesLicenseKeyInvalid'==_0x22c204||'exportInlineStylesLicenseKeyExpired'==_0x22c204||'exportInlineStylesLicenseKeyDomainLimit'==_0x22c204||'exportInlineStylesLicenseKeyNotAllowed'==_0x22c204||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x22c204||'exportInlineStylesLicenseKeyUsageLimit'==_0x22c204){delete _0xdd3159[_0x596f0e],_0x43d0f0=_0x22c204,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x43d0f0&&_0xdd3159['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x43d0f0&&_0xdd3159['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x43d0f0&&_0xdd3159['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x43d0f0&&_0xdd3159['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x43d0f0&&_0xdd3159['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x43d0f0&&_0xdd3159['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
@@ -1,41 +1,41 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { StylesMap, type StylesProcessor } from '@ckeditor/ckeditor5-engine';
6
- import { type CSSVariablesMap } from './exportinlinestylescssvariables.js';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { StylesMap, type StylesProcessor } from "@ckeditor/ckeditor5-engine";
6
+ import { type CSSVariablesMap } from "./exportinlinestylescssvariables.js";
7
7
  /**
8
- * Processes raw stylesheets from various sources and converts them into parsed CSS rules.
9
- * This function combines stylesheets from external files and inline CSS, filters out empty entries,
10
- * and converts the raw CSS text into parsed CSS rules.
11
- *
12
- * **NOTE:**
13
- *
14
- * 1. The order of the stylesheets matters.
15
- * 2. The rules from the last stylesheet have the highest priority.
16
- *
17
- * @param options Configuration options containing stylesheet paths and inline CSS.
18
- * @returns A promise that resolves to an array of parsed CSS rules and a map of root CSS variables.
19
- */
8
+ * Processes raw stylesheets from various sources and converts them into parsed CSS rules.
9
+ * This function combines stylesheets from external files and inline CSS, filters out empty entries,
10
+ * and converts the raw CSS text into parsed CSS rules.
11
+ *
12
+ * **NOTE:**
13
+ *
14
+ * 1. The order of the stylesheets matters.
15
+ * 2. The rules from the last stylesheet have the highest priority.
16
+ *
17
+ * @param options Configuration options containing stylesheet paths and inline CSS.
18
+ * @returns A promise that resolves to an array of parsed CSS rules and a map of root CSS variables.
19
+ */
20
20
  export declare function collectAndProcessStylesheets(options: {
21
- stylesProcessor: StylesProcessor;
22
- stylesheets?: Array<string>;
23
- inlineCss?: string;
21
+ stylesProcessor: StylesProcessor;
22
+ stylesheets?: Array<string>;
23
+ inlineCss?: string;
24
24
  }): Promise<{
25
- parsedCssRules: Array<ParsedCSSRule>;
26
- rootCssVariables: CSSVariablesMap;
25
+ parsedCssRules: Array<ParsedCSSRule>;
26
+ rootCssVariables: CSSVariablesMap;
27
27
  }>;
28
28
  /**
29
- * Represents a flattened CSS rule with its selector and style information.
30
- */
29
+ * Represents a flattened CSS rule with its selector and style information.
30
+ */
31
31
  export type ParsedCSSRule = {
32
- /**
33
- * A single CSS selector extracted from potentially comma-separated selectors.
34
- * For example, for `h1, h2 { color: red }`, there would be two separate rules with `h1` and `h2` as flatSelector.
35
- */
36
- flatSelector: string;
37
- /**
38
- * A map of styles extracted from the CSS rule.
39
- */
40
- stylesMap: StylesMap;
32
+ /**
33
+ * A single CSS selector extracted from potentially comma-separated selectors.
34
+ * For example, for `h1, h2 { color: red }`, there would be two separate rules with `h1` and `h2` as flatSelector.
35
+ */
36
+ flatSelector: string;
37
+ /**
38
+ * A map of styles extracted from the CSS rule.
39
+ */
40
+ stylesMap: StylesMap;
41
41
  };
@@ -1,68 +1,68 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module export-inline-styles/utils/exportinlinestylescssvariables
7
- */
8
- import type { StylesMap } from '@ckeditor/ckeditor5-engine';
9
- import type { ParsedCSSRule } from './exportinlinestylescollector.js';
6
+ * @module export-inline-styles/utils/exportinlinestylescssvariables
7
+ */
8
+ import type { StylesMap } from "@ckeditor/ckeditor5-engine";
9
+ import type { ParsedCSSRule } from "./exportinlinestylescollector.js";
10
10
  /**
11
- * Collects CSS custom properties (variables) that are defined in `:root` selector rules.
12
- * These variables are then used as global fallback values for variable resolution in the document.
13
- *
14
- * **Note:** Since `element.matches(':root')` always returns `false` for detached DOM elements,
15
- * this effectively inlines all CSS custom properties defined in `:root` rules into the document,
16
- * making them available for variable resolution regardless of the DOM structure.
17
- *
18
- * @param rules An array of parsed CSS rules to extract variables from.
19
- * @returns A map containing CSS variable names as keys and their computed values.
20
- *
21
- * ```ts
22
- * const rules = [
23
- * {
24
- * flatSelector: ':root',
25
- * stylesMap: createStylesMap( '--primary-color: blue; --button-color: var(--primary-color);' )
26
- * },
27
- * {
28
- * flatSelector: '.button',
29
- * stylesMap: createStylesMap( 'background: var(--button-color); border: 1px solid var(--primary-color);' )
30
- * }
31
- * ];
32
- *
33
- * const rootVariables = collectRootStylesheetsVariables( rules );
34
- * // Returns: Map {
35
- * // '--primary-color' => 'blue',
36
- * // '--button-color' => 'blue'
37
- * // }
38
- * ```
39
- */
11
+ * Collects CSS custom properties (variables) that are defined in `:root` selector rules.
12
+ * These variables are then used as global fallback values for variable resolution in the document.
13
+ *
14
+ * **Note:** Since `element.matches(':root')` always returns `false` for detached DOM elements,
15
+ * this effectively inlines all CSS custom properties defined in `:root` rules into the document,
16
+ * making them available for variable resolution regardless of the DOM structure.
17
+ *
18
+ * @param rules An array of parsed CSS rules to extract variables from.
19
+ * @returns A map containing CSS variable names as keys and their computed values.
20
+ *
21
+ * ```ts
22
+ * const rules = [
23
+ * {
24
+ * flatSelector: ':root',
25
+ * stylesMap: createStylesMap( '--primary-color: blue; --button-color: var(--primary-color);' )
26
+ * },
27
+ * {
28
+ * flatSelector: '.button',
29
+ * stylesMap: createStylesMap( 'background: var(--button-color); border: 1px solid var(--primary-color);' )
30
+ * }
31
+ * ];
32
+ *
33
+ * const rootVariables = collectRootStylesheetsVariables( rules );
34
+ * // Returns: Map {
35
+ * // '--primary-color' => 'blue',
36
+ * // '--button-color' => 'blue'
37
+ * // }
38
+ * ```
39
+ */
40
40
  export declare function collectRootStylesheetsVariables(rules: Array<ParsedCSSRule>): CSSVariablesMap;
41
41
  /**
42
- * Processes CSS variables in a styles map by inlining their values.
43
- *
44
- * **Note:** This function modifies the input StylesMap object. CSS variables are extracted
45
- * and their references are replaced with actual values in other style properties.
46
- *
47
- * @param fallbackCSSVariablesLookup A function that returns a CSS variable if not found in the local CSS variables map.
48
- * @param stylesMap The styles map to process. Will be modified in-place.
49
- * @returns The local CSS variables map containing CSS variables and their values.
50
- *
51
- * ```ts
52
- * const stylesMap = new StylesMap();
53
- * stylesMap.set( '--color', 'red' );
54
- * stylesMap.set( 'color', 'var(--color)' );
55
- *
56
- * inlineStylesMapCSSVariables( stylesMap );
57
- * // stylesMap now contains: color: red
58
- * ```
59
- */
42
+ * Processes CSS variables in a styles map by inlining their values.
43
+ *
44
+ * **Note:** This function modifies the input StylesMap object. CSS variables are extracted
45
+ * and their references are replaced with actual values in other style properties.
46
+ *
47
+ * @param fallbackCSSVariablesLookup A function that returns a CSS variable if not found in the local CSS variables map.
48
+ * @param stylesMap The styles map to process. Will be modified in-place.
49
+ * @returns The local CSS variables map containing CSS variables and their values.
50
+ *
51
+ * ```ts
52
+ * const stylesMap = new StylesMap();
53
+ * stylesMap.set( '--color', 'red' );
54
+ * stylesMap.set( 'color', 'var(--color)' );
55
+ *
56
+ * inlineStylesMapCSSVariables( stylesMap );
57
+ * // stylesMap now contains: color: red
58
+ * ```
59
+ */
60
60
  export declare function inlineStylesMapCSSVariables(fallbackCSSVariablesLookup: CSSVariableLookupCallback, stylesMap: StylesMap): CSSVariablesMap;
61
61
  /**
62
- * A function that returns a CSS variable value for a given variable name.
63
- */
62
+ * A function that returns a CSS variable value for a given variable name.
63
+ */
64
64
  export type CSSVariableLookupCallback = (name: string) => string | undefined;
65
65
  /**
66
- * A map of CSS variables and their values.
67
- */
66
+ * A map of CSS variables and their values.
67
+ */
68
68
  export type CSSVariablesMap = Map<string, string>;
@@ -1,48 +1,48 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module export-inline-styles/utils/exportinlinestylesmatcher
7
- */
8
- import { StylesMap, type StylesProcessor } from '@ckeditor/ckeditor5-engine';
9
- import type { ParsedCSSRule } from './exportinlinestylescollector.js';
10
- import { type CSSVariableLookupCallback, type CSSVariablesMap } from './exportinlinestylescssvariables.js';
6
+ * @module export-inline-styles/utils/exportinlinestylesmatcher
7
+ */
8
+ import { StylesMap, type StylesProcessor } from "@ckeditor/ckeditor5-engine";
9
+ import type { ParsedCSSRule } from "./exportinlinestylescollector.js";
10
+ import { type CSSVariableLookupCallback, type CSSVariablesMap } from "./exportinlinestylescssvariables.js";
11
11
  /**
12
- * Returns inline styles that should be applied to the given element based on matched CSS rules.
13
- *
14
- * @param options.stylesProcessor A StylesProcessor instance.
15
- * @param options.fallbackCSSVariablesLookup A function that returns a CSS variable value for a given variable name.
16
- * @param options.parsedCssRules An array of parsed CSS rules.
17
- * @param options.element The HTML element to get inline styles for.
18
- * @returns A string containing inline styles.
19
- *
20
- * ```ts
21
- * const rules = [
22
- * { flatSelector: 'p.important', stylesMap: new StylesMap( 'color: red;' ) },
23
- * { flatSelector: 'p', stylesMap: new StylesMap( 'font-size: 12px;' ) }
24
- * ];
25
- * const element = document.createElement( 'p' );
26
- * element.className = 'important';
27
- *
28
- * const { stylesMap } = getElementInlineStyles( rules, element );
29
- * // Returns styles map with: "color: red; font-size: 12px"
30
- * ```
31
- */
12
+ * Returns inline styles that should be applied to the given element based on matched CSS rules.
13
+ *
14
+ * @param options.stylesProcessor A StylesProcessor instance.
15
+ * @param options.fallbackCSSVariablesLookup A function that returns a CSS variable value for a given variable name.
16
+ * @param options.parsedCssRules An array of parsed CSS rules.
17
+ * @param options.element The HTML element to get inline styles for.
18
+ * @returns A string containing inline styles.
19
+ *
20
+ * ```ts
21
+ * const rules = [
22
+ * { flatSelector: 'p.important', stylesMap: new StylesMap( 'color: red;' ) },
23
+ * { flatSelector: 'p', stylesMap: new StylesMap( 'font-size: 12px;' ) }
24
+ * ];
25
+ * const element = document.createElement( 'p' );
26
+ * element.className = 'important';
27
+ *
28
+ * const { stylesMap } = getElementInlineStyles( rules, element );
29
+ * // Returns styles map with: "color: red; font-size: 12px"
30
+ * ```
31
+ */
32
32
  export declare function getElementInlineStyles(options: {
33
- stylesProcessor: StylesProcessor;
34
- fallbackCSSVariablesLookup: CSSVariableLookupCallback;
35
- parsedCssRules: Array<ParsedCSSRule>;
36
- element: HTMLElement;
33
+ stylesProcessor: StylesProcessor;
34
+ fallbackCSSVariablesLookup: CSSVariableLookupCallback;
35
+ parsedCssRules: Array<ParsedCSSRule>;
36
+ element: HTMLElement;
37
37
  }): {
38
- localCSSVariables: CSSVariablesMap;
39
- stylesMap: StylesMap;
38
+ localCSSVariables: CSSVariablesMap;
39
+ stylesMap: StylesMap;
40
40
  };
41
41
  /**
42
- * Combines multiple StylesMap or String objects into a single StylesMap object.
43
- *
44
- * @param stylesProcessor A StylesProcessor instance.
45
- * @param stylesMaps An array of StylesMap objects to combine.
46
- * @returns A StylesMap object containing all combined styles.
47
- */
42
+ * Combines multiple StylesMap or String objects into a single StylesMap object.
43
+ *
44
+ * @param stylesProcessor A StylesProcessor instance.
45
+ * @param stylesMaps An array of StylesMap objects to combine.
46
+ * @returns A StylesMap object containing all combined styles.
47
+ */
48
48
  export declare function concatStylesMaps(stylesProcessor: StylesProcessor, stylesMaps: Array<StylesMap | string | null>): StylesMap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-export-inline-styles",
3
- "version": "48.2.0",
3
+ "version": "48.3.0-alpha.0",
4
4
  "description": "The export with inline styles feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -34,9 +34,9 @@
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "dependencies": {
37
- "@ckeditor/ckeditor5-core": "48.2.0",
38
- "@ckeditor/ckeditor5-engine": "48.2.0",
39
- "@ckeditor/ckeditor5-utils": "48.2.0",
37
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.0",
38
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.0",
39
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.0",
40
40
  "specificity": "0.4.1"
41
41
  },
42
42
  "files": [