@ckeditor/ckeditor5-merge-fields 0.0.1 → 43.0.0-alpha.1
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.
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +5 -5
- package/README.md +35 -3
- package/build/merge-fields.js +5 -0
- package/ckeditor5-metadata.json +26 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +140 -0
- package/dist/index.css +172 -0
- package/dist/index.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/en.umd.js +23 -0
- package/lang/contexts.json +14 -0
- package/lang/translations/en.po +66 -0
- package/package.json +29 -4
- package/src/augmentation.d.ts +25 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +12 -0
- package/src/index.js +23 -0
- package/src/insertmergefieldcommand.d.ts +31 -0
- package/src/insertmergefieldcommand.js +23 -0
- package/src/mergefields.d.ts +56 -0
- package/src/mergefields.js +23 -0
- package/src/mergefieldsconfig.d.ts +155 -0
- package/src/mergefieldsconfig.js +23 -0
- package/src/mergefieldsediting.d.ts +76 -0
- package/src/mergefieldsediting.js +23 -0
- package/src/mergefieldsui.d.ts +36 -0
- package/src/mergefieldsui.js +23 -0
- package/src/previewmergefieldscommand.d.ts +43 -0
- package/src/previewmergefieldscommand.js +23 -0
- package/src/ui/mergefieldslistview.d.ts +22 -0
- package/src/ui/mergefieldslistview.js +23 -0
- package/src/ui/mergefieldspanelview.d.ts +16 -0
- package/src/ui/mergefieldspanelview.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/theme/icons/insert-merge-field.svg +7 -0
- package/theme/icons/preview-merge-fields.svg +8 -0
- package/theme/icons/warning.svg +3 -0
- package/theme/insert-dropdown.css +48 -0
- package/theme/mergefields.css +121 -0
package/package.json
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-merge-fields",
|
|
3
|
-
"version": "0.0.1",
|
|
3
|
+
"version": "43.0.0-alpha.1",
|
|
4
|
+
"description": "Merge fields feature for CKEditor 5.",
|
|
4
5
|
"keywords": [
|
|
5
6
|
"ckeditor",
|
|
6
7
|
"ckeditor5",
|
|
7
8
|
"ckeditor 5",
|
|
8
|
-
"ckeditor5-
|
|
9
|
+
"ckeditor5-feature",
|
|
10
|
+
"ckeditor5-plugin"
|
|
9
11
|
],
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "src/index.js",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"ckeditor5": "43.0.0-alpha.1",
|
|
16
|
+
"@ckeditor/ckeditor5-core": "43.0.0-alpha.1",
|
|
17
|
+
"@ckeditor/ckeditor5-engine": "43.0.0-alpha.1",
|
|
18
|
+
"@ckeditor/ckeditor5-ui": "43.0.0-alpha.1",
|
|
19
|
+
"@ckeditor/ckeditor5-utils": "43.0.0-alpha.1",
|
|
20
|
+
"@ckeditor/ckeditor5-widget": "43.0.0-alpha.1",
|
|
21
|
+
"lodash-es": "4.17.21"
|
|
22
|
+
},
|
|
23
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
10
24
|
"author": "CKSource (http://cksource.com/)",
|
|
11
|
-
"license": "GPL-2.0-or-later",
|
|
12
25
|
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
13
|
-
"bugs": "https://
|
|
26
|
+
"bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"lang",
|
|
30
|
+
"src/**/*.js",
|
|
31
|
+
"src/**/*.d.ts",
|
|
32
|
+
"theme",
|
|
33
|
+
"build",
|
|
34
|
+
"ckeditor5-metadata.json",
|
|
35
|
+
"CHANGELOG.md"
|
|
36
|
+
],
|
|
37
|
+
"types": "src/index.d.ts",
|
|
38
|
+
"obfuscated": true
|
|
14
39
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { MergeFields, MergeFieldsEditing, MergeFieldsUI } from './index.js';
|
|
6
|
+
import type InsertMergeFieldCommand from './insertmergefieldcommand.js';
|
|
7
|
+
import type PreviewMergeFieldsCommand from './previewmergefieldscommand.js';
|
|
8
|
+
import type { MergeFieldsConfig } from './mergefieldsconfig.js';
|
|
9
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
10
|
+
interface EditorConfig {
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for the merge fields feature.
|
|
13
|
+
*/
|
|
14
|
+
mergeFields?: MergeFieldsConfig;
|
|
15
|
+
}
|
|
16
|
+
interface PluginsMap {
|
|
17
|
+
[MergeFields.pluginName]: MergeFields;
|
|
18
|
+
[MergeFieldsEditing.pluginName]: MergeFieldsEditing;
|
|
19
|
+
[MergeFieldsUI.pluginName]: MergeFieldsUI;
|
|
20
|
+
}
|
|
21
|
+
interface CommandsMap {
|
|
22
|
+
insertMergeField: InsertMergeFieldCommand;
|
|
23
|
+
previewMergeFields: PreviewMergeFieldsCommand;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields
|
|
7
|
+
*/
|
|
8
|
+
export { default as MergeFields } from './mergefields.js';
|
|
9
|
+
export { default as MergeFieldsEditing } from './mergefieldsediting.js';
|
|
10
|
+
export { default as MergeFieldsUI } from './mergefieldsui.js';
|
|
11
|
+
export type { MergeFieldsConfig } from './mergefieldsconfig.js';
|
|
12
|
+
import './augmentation.js';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x5efd73,_0x2a22e9){var _0x54b250=_0x596d,_0x29e6fc=_0x5efd73();while(!![]){try{var _0x272b0a=parseInt(_0x54b250(0x1dd))/0x1+-parseInt(_0x54b250(0x1d5))/0x2+-parseInt(_0x54b250(0x1d8))/0x3+parseInt(_0x54b250(0x1d6))/0x4*(-parseInt(_0x54b250(0x1d7))/0x5)+parseInt(_0x54b250(0x1db))/0x6+parseInt(_0x54b250(0x1dc))/0x7*(-parseInt(_0x54b250(0x1da))/0x8)+parseInt(_0x54b250(0x1d9))/0x9;if(_0x272b0a===_0x2a22e9)break;else _0x29e6fc['push'](_0x29e6fc['shift']());}catch(_0xbd8018){_0x29e6fc['push'](_0x29e6fc['shift']());}}}(_0x252c,0x22aff));function _0x596d(_0x4c246e,_0x51fda0){var _0x252cf7=_0x252c();return _0x596d=function(_0x596dd7,_0x1815ef){_0x596dd7=_0x596dd7-0x1d5;var _0x3a8420=_0x252cf7[_0x596dd7];return _0x3a8420;},_0x596d(_0x4c246e,_0x51fda0);}export{default as MergeFields}from'./mergefields.js';export{default as MergeFieldsEditing}from'./mergefieldsediting.js';export{default as MergeFieldsUI}from'./mergefieldsui.js';import'./augmentation.js';function _0x252c(){var _0x45df33=['1070466sikqbB','7490ZoQCUp','116267AoDGmu','294856lQrENN','5444itIoIz','25ROiKmq','316410SZdJhh','1483956VJWPqV','432UVFwGp'];_0x252c=function(){return _0x45df33;};return _0x252c();}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields/insertmergefieldcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The insert merge field element command.
|
|
11
|
+
*
|
|
12
|
+
* The command is registered by {@link module:merge-fields/mergefieldsediting~MergeFieldsEditing} as `'insertMergeField'`.
|
|
13
|
+
*
|
|
14
|
+
* To insert a merge field element at the current selection, execute the command passing the merge field id as a parameter:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* editor.execute( 'insertMergeField', 'clientName' );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export default class InsertMergeFieldCommand extends Command {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
refresh(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Inserts a new merge field element with the given `id` attribute at the current selection.
|
|
27
|
+
*
|
|
28
|
+
* @fires execute
|
|
29
|
+
*/
|
|
30
|
+
execute(mergeFieldId: string): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x526ca0=_0x3d14;function _0x2974(){const _0x1ce701=['string','mergeField','1553673fxKzcn','42753560YISXit','refresh','6FDekMK','insertContent','4942196TKUMoW','model','execute','focus','selection','createElement','setAttribute','after','getAttributes','document','115pdeTCz','4360gRVAZC','checkAttribute','checkChild','20133jxOJcu','6908mIsmMH','isEnabled','schema','1569466WqyClS','1221206KmjzPX','change','deleteContent','editor'];_0x2974=function(){return _0x1ce701;};return _0x2974();}(function(_0x63821c,_0x168ced){const _0x147cee=_0x3d14,_0x1e5bfa=_0x63821c();while(!![]){try{const _0x3cd212=-parseInt(_0x147cee(0x17e))/0x1+-parseInt(_0x147cee(0x17d))/0x2+parseInt(_0x147cee(0x184))/0x3+parseInt(_0x147cee(0x17a))/0x4*(parseInt(_0x147cee(0x175))/0x5)+parseInt(_0x147cee(0x187))/0x6*(-parseInt(_0x147cee(0x189))/0x7)+-parseInt(_0x147cee(0x176))/0x8*(parseInt(_0x147cee(0x179))/0x9)+parseInt(_0x147cee(0x185))/0xa;if(_0x3cd212===_0x168ced)break;else _0x1e5bfa['push'](_0x1e5bfa['shift']());}catch(_0x52f45a){_0x1e5bfa['push'](_0x1e5bfa['shift']());}}}(_0x2974,0xdc2cc));import{Command as _0x17b712}from'ckeditor5/src/core.js';function _0x3d14(_0x1c25d1,_0x363d5d){const _0x29743e=_0x2974();return _0x3d14=function(_0x3d143b,_0xe2fa49){_0x3d143b=_0x3d143b-0x173;let _0x242a7a=_0x29743e[_0x3d143b];return _0x242a7a;},_0x3d14(_0x1c25d1,_0x363d5d);}export default class r extends _0x17b712{[_0x526ca0(0x186)](){const _0xc845f5=_0x526ca0,_0x24e34e=this[_0xc845f5(0x181)][_0xc845f5(0x18a)],_0x1ad103=_0x24e34e[_0xc845f5(0x17c)][_0xc845f5(0x178)](_0x24e34e[_0xc845f5(0x174)][_0xc845f5(0x18d)][_0xc845f5(0x18c)],_0xc845f5(0x183));this[_0xc845f5(0x17b)]=_0x1ad103;}[_0x526ca0(0x18b)](_0x31e3d4){const _0x3bd115=_0x526ca0;if(!_0x31e3d4||_0x3bd115(0x182)!=typeof _0x31e3d4)return;const _0x24c462=this[_0x3bd115(0x181)][_0x3bd115(0x18a)];_0x24c462[_0x3bd115(0x17f)](_0x69164b=>{const _0x3dc142=_0x3bd115;_0x24c462[_0x3dc142(0x180)](_0x24c462[_0x3dc142(0x174)][_0x3dc142(0x18d)]);const _0x439e95=_0x69164b[_0x3dc142(0x18e)](_0x3dc142(0x183),{'id':_0x31e3d4});for(const [_0x409ed6,_0x48134d]of _0x24c462[_0x3dc142(0x174)][_0x3dc142(0x18d)][_0x3dc142(0x173)]())_0x24c462[_0x3dc142(0x17c)][_0x3dc142(0x177)](_0x439e95,_0x409ed6)&&_0x69164b[_0x3dc142(0x18f)](_0x409ed6,_0x48134d,_0x439e95);_0x24c462[_0x3dc142(0x188)](_0x439e95,_0x24c462[_0x3dc142(0x174)][_0x3dc142(0x18d)],0x0,{'setSelection':_0x3dc142(0x190)});});}}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields/mergefields
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Widget } from 'ckeditor5/src/widget.js';
|
|
11
|
+
import MergeFieldsEditing from './mergefieldsediting.js';
|
|
12
|
+
import MergeFieldsUI from './mergefieldsui.js';
|
|
13
|
+
/**
|
|
14
|
+
* The merge fields feature.
|
|
15
|
+
*
|
|
16
|
+
* For a detailed overview, check the {@glink features/merge-fields Merge fields} feature documentation.
|
|
17
|
+
*
|
|
18
|
+
* @extends module:core/plugin~Plugin
|
|
19
|
+
*/
|
|
20
|
+
export default class MergeFields extends Plugin {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires(): readonly ["Mention", typeof MergeFieldsEditing, typeof MergeFieldsUI, typeof Widget];
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName(): "MergeFields";
|
|
29
|
+
/**
|
|
30
|
+
* Returns ids of all merge fields defined in the configuration and custom merge fields added by the user that exist in the document.
|
|
31
|
+
*/
|
|
32
|
+
getMergeFieldsIds(): Array<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns an object with default merge fields values.
|
|
35
|
+
*
|
|
36
|
+
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
37
|
+
*
|
|
38
|
+
* Values defined as functions are evaluated and their result is returned.
|
|
39
|
+
*/
|
|
40
|
+
getDefaultValues(): MergeFieldsValues;
|
|
41
|
+
/**
|
|
42
|
+
* Returns an object with merge fields values defined for given data set.
|
|
43
|
+
*
|
|
44
|
+
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
45
|
+
*
|
|
46
|
+
* Values defined as functions are evaluated and their result is returned.
|
|
47
|
+
*
|
|
48
|
+
* If the data set is not found, it throws an error.
|
|
49
|
+
*
|
|
50
|
+
* @param dataSetId
|
|
51
|
+
* @param useDefaultValues If set to `true`, merge field default value will be used for these merge fields, for which the data
|
|
52
|
+
* was not defined. If default value is not configured for given merge field, `null` will be still returned.
|
|
53
|
+
*/
|
|
54
|
+
getDataSetValues(dataSetId: string, useDefaultValues?: boolean): MergeFieldsValues;
|
|
55
|
+
}
|
|
56
|
+
export type MergeFieldsValues = Record<string, string | null>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x3609f9=_0x1a2f;function _0x54e4(){const _0x310f2d=['74025qWGRgR','getDefaultValues','MergeFields','plugins','Mention','5397zNaOfd','19574786EBepWe','5240AVThJd','getDataSetValues','731204gMXtnA','2985837ZITVeE','editor','getMergeFieldValue','getMergeFieldDefaultValue','requires','8884wVhgfT','get','11LkztkE','970ihsfSg','466794iyvWTi','35azDdGv','getMergeFieldsIds','pluginName'];_0x54e4=function(){return _0x310f2d;};return _0x54e4();}(function(_0x2980a7,_0x49bf9e){const _0x452865=_0x1a2f,_0x2c7ebd=_0x2980a7();while(!![]){try{const _0x421da0=parseInt(_0x452865(0xd0))/0x1*(-parseInt(_0x452865(0xce))/0x2)+-parseInt(_0x452865(0xc9))/0x3+-parseInt(_0x452865(0xc8))/0x4*(parseInt(_0x452865(0xd3))/0x5)+-parseInt(_0x452865(0xd2))/0x6+parseInt(_0x452865(0xc4))/0x7*(parseInt(_0x452865(0xc6))/0x8)+-parseInt(_0x452865(0xbf))/0x9*(-parseInt(_0x452865(0xd1))/0xa)+parseInt(_0x452865(0xc5))/0xb;if(_0x421da0===_0x49bf9e)break;else _0x2c7ebd['push'](_0x2c7ebd['shift']());}catch(_0x23ab6e){_0x2c7ebd['push'](_0x2c7ebd['shift']());}}}(_0x54e4,0xa6369));import{Plugin as _0x58ff56}from'ckeditor5/src/core.js';function _0x1a2f(_0x4cd33c,_0x37ab84){const _0x54e4bc=_0x54e4();return _0x1a2f=function(_0x1a2f08,_0xc07fda){_0x1a2f08=_0x1a2f08-0xbd;let _0x25af5c=_0x54e4bc[_0x1a2f08];return _0x25af5c;},_0x1a2f(_0x4cd33c,_0x37ab84);}import{Widget as _0x3e6fc5}from'ckeditor5/src/widget.js';import _0xed2e7e from'./mergefieldsediting.js';import _0x4d97df from'./mergefieldsui.js';export default class l extends _0x58ff56{static get[_0x3609f9(0xcd)](){const _0x31c42d=_0x3609f9;return[_0x31c42d(0xc3),_0xed2e7e,_0x4d97df,_0x3e6fc5];}static get[_0x3609f9(0xbe)](){const _0x29513e=_0x3609f9;return _0x29513e(0xc1);}[_0x3609f9(0xbd)](){const _0x1c7fc7=_0x3609f9;return this[_0x1c7fc7(0xca)][_0x1c7fc7(0xc2)][_0x1c7fc7(0xcf)](_0xed2e7e)[_0x1c7fc7(0xbd)]();}[_0x3609f9(0xc0)](){const _0x2cf4bf=_0x3609f9,_0x1708d0=this[_0x2cf4bf(0xca)][_0x2cf4bf(0xc2)][_0x2cf4bf(0xcf)](_0xed2e7e),_0xf61ec0={},_0x410028=this[_0x2cf4bf(0xbd)]();for(const _0x2c85ad of _0x410028)_0xf61ec0[_0x2c85ad]=_0x1708d0[_0x2cf4bf(0xcc)](_0x2c85ad);return _0xf61ec0;}[_0x3609f9(0xc7)](_0x44250f,_0x497b0e=!0x1){const _0x41ffbd=_0x3609f9,_0x483c15=this[_0x41ffbd(0xca)][_0x41ffbd(0xc2)][_0x41ffbd(0xcf)](_0xed2e7e),_0x597700={},_0x257613=this[_0x41ffbd(0xbd)]();for(const _0x16bcd2 of _0x257613){let _0x50dac3=_0x483c15[_0x41ffbd(0xcb)](_0x16bcd2,_0x44250f);null===_0x50dac3&&_0x497b0e&&(_0x50dac3=_0x483c15[_0x41ffbd(0xcc)](_0x16bcd2)),_0x597700[_0x16bcd2]=_0x50dac3;}return _0x597700;}}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields/mergefieldsconfig
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
/**
|
|
11
|
+
* The configuration of the merge fields feature.
|
|
12
|
+
*
|
|
13
|
+
* The properties defined in this config are set in the `config.mergeFields` namespace.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* ClassicEditor
|
|
17
|
+
* .create( editorElement, {
|
|
18
|
+
* mergeFields: {
|
|
19
|
+
* // Merge fields configuration.
|
|
20
|
+
* }
|
|
21
|
+
* } )
|
|
22
|
+
* .then( ... )
|
|
23
|
+
* .catch( ... );
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
27
|
+
*/
|
|
28
|
+
export interface MergeFieldsConfig {
|
|
29
|
+
/**
|
|
30
|
+
* The definitions of the merge fields that can be used in the editor.
|
|
31
|
+
* It's allowed to define them in any combination of groups and individual merge fields.
|
|
32
|
+
* The order of the definitions is respected when displaying the merge fields in the UI dropdown
|
|
33
|
+
* except that merge fields that are not assigned to any group are displayed at the
|
|
34
|
+
* very bottom of the list.
|
|
35
|
+
*/
|
|
36
|
+
definitions?: Array<GroupDefinition | MergeFieldDefinition>;
|
|
37
|
+
/**
|
|
38
|
+
* A prefix used to identify merge fields in the editor data.
|
|
39
|
+
*
|
|
40
|
+
* The list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
41
|
+
*
|
|
42
|
+
* @default '\{\{'
|
|
43
|
+
*/
|
|
44
|
+
prefix?: string;
|
|
45
|
+
/**
|
|
46
|
+
* A suffix used to identify merge fields in the editor data.
|
|
47
|
+
*
|
|
48
|
+
* The list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
49
|
+
*
|
|
50
|
+
* @default '\}\}'
|
|
51
|
+
*/
|
|
52
|
+
suffix?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The data sets that can be displayed in place of the merge fields in the editor.
|
|
55
|
+
*
|
|
56
|
+
* @default []
|
|
57
|
+
*/
|
|
58
|
+
dataSets?: Array<DataSetDefinition>;
|
|
59
|
+
/**
|
|
60
|
+
* Determines the available preview modes in the dropdown and menu bar. Possible values are:
|
|
61
|
+
*
|
|
62
|
+
* * `'$labels'` - adds the option to display the labels of the merge fields.
|
|
63
|
+
* * `'$defaultValues'` - adds the option to display the default values.
|
|
64
|
+
* * `'$dataSets'` - adds the options to display each of the configured data sets.
|
|
65
|
+
*
|
|
66
|
+
* At least one mode must be enabled. If more than one preview mode is configured,
|
|
67
|
+
* you can add `previewMergeFields` button to the toolbar to switch between them,
|
|
68
|
+
* and the menu bar button will be added automatically to the `View` category.
|
|
69
|
+
*
|
|
70
|
+
* @default [ '$labels', '$defaultValues', '$dataSets' ]
|
|
71
|
+
*/
|
|
72
|
+
previewModes?: Array<string>;
|
|
73
|
+
/**
|
|
74
|
+
* A name of the preview mode that should be active when the editor is initialized. Possible values are:
|
|
75
|
+
*
|
|
76
|
+
* * `'$labels'` - displays the labels of the merge fields,
|
|
77
|
+
* * `'$defaultValues'` - displays the default values,
|
|
78
|
+
* * one of the configured {@link module:merge-fields/mergefieldsconfig~MergeFieldsConfig#dataSets data sets} identifiers.
|
|
79
|
+
*
|
|
80
|
+
* If not set, it will default to the one of the {@link ~MergeFieldsConfig#previewModes available preview modes}, with the priority as
|
|
81
|
+
* in the list above.
|
|
82
|
+
*/
|
|
83
|
+
initialPreviewMode?: string;
|
|
84
|
+
}
|
|
85
|
+
export type GroupDefinition = {
|
|
86
|
+
/**
|
|
87
|
+
* The unique identifier of the group.
|
|
88
|
+
*
|
|
89
|
+
* If {@link GroupDefinition#groupLabel} is not specified, the ID will be used as a label in the UI.
|
|
90
|
+
*/
|
|
91
|
+
groupId: string;
|
|
92
|
+
/**
|
|
93
|
+
* The human-readable label of the group.
|
|
94
|
+
*
|
|
95
|
+
* It is displayed by the feature's UI.
|
|
96
|
+
*/
|
|
97
|
+
groupLabel?: string;
|
|
98
|
+
/**
|
|
99
|
+
* The array of merge fields definitions that belong to the group.
|
|
100
|
+
*/
|
|
101
|
+
definitions: Array<MergeFieldDefinition>;
|
|
102
|
+
};
|
|
103
|
+
export type MergeFieldDefinition = {
|
|
104
|
+
/**
|
|
105
|
+
* The unique identifier of the merge field.
|
|
106
|
+
*
|
|
107
|
+
* If {@link MergeFieldDefinition#label} is not specified, the ID will be used as a label.
|
|
108
|
+
*
|
|
109
|
+
* The list of allowed characters includes: `a-z`, `A-Z`, `0-9`, `_`, `.`, and `-`.
|
|
110
|
+
*/
|
|
111
|
+
id: string;
|
|
112
|
+
/**
|
|
113
|
+
* The human-readable label of the merge field.
|
|
114
|
+
*
|
|
115
|
+
* It is displayed by the feature's UI and inside the editing area.
|
|
116
|
+
*/
|
|
117
|
+
label?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Default value of the merge field.
|
|
120
|
+
*
|
|
121
|
+
* It is used if a value for given merge field has not been provided in a data set.
|
|
122
|
+
*/
|
|
123
|
+
defaultValue?: MergeFieldDataSetValue;
|
|
124
|
+
};
|
|
125
|
+
export type DataSetDefinition = {
|
|
126
|
+
/**
|
|
127
|
+
* A unique identifier of the data set. It cannot start with `$`, as it is reserved for internal use.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
/**
|
|
131
|
+
* A human-readable label of the data set.
|
|
132
|
+
*/
|
|
133
|
+
label: string;
|
|
134
|
+
/**
|
|
135
|
+
* The data to be displayed in the editor in place of merge fields when the data set is previewed.
|
|
136
|
+
*
|
|
137
|
+
* The keys of this object are merge field IDs, while values are the merge field values, which can be strings or functions.
|
|
138
|
+
* If the value is specified as a function, it should return a string. The function will be evaluated each time the data set values
|
|
139
|
+
* are retrieved.
|
|
140
|
+
*
|
|
141
|
+
* ```ts
|
|
142
|
+
* const mergeFieldsConfig = {
|
|
143
|
+
* dataSets: [
|
|
144
|
+
* id: 'customDataSet',
|
|
145
|
+
* values: {
|
|
146
|
+
* companyName: 'CKSource',
|
|
147
|
+
* productName: 'CKEditor 5'
|
|
148
|
+
* }
|
|
149
|
+
* ]
|
|
150
|
+
* };
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
values: Record<string, MergeFieldDataSetValue>;
|
|
154
|
+
};
|
|
155
|
+
export type MergeFieldDataSetValue = string | ((editor: Editor) => string);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import type { MergeFieldDefinition } from './mergefieldsconfig.js';
|
|
7
|
+
/**
|
|
8
|
+
* The merge fields editing feature.
|
|
9
|
+
*/
|
|
10
|
+
export default class MergeFieldsEditing extends Plugin {
|
|
11
|
+
licenseKey: string;
|
|
12
|
+
/**
|
|
13
|
+
* The current preview mode for merge fields. Determines the merge field values displayed in the editor.
|
|
14
|
+
*
|
|
15
|
+
* @observable
|
|
16
|
+
*/
|
|
17
|
+
previewMode: string;
|
|
18
|
+
/**
|
|
19
|
+
* All configured preview modes, available to be set as a value for {@link #previewMode}.
|
|
20
|
+
*/
|
|
21
|
+
readonly availablePreviewModes: Array<string>;
|
|
22
|
+
/**
|
|
23
|
+
* A flat list of all merge field definitions.
|
|
24
|
+
*/
|
|
25
|
+
flattenedMergeFieldDefinitions: Array<MergeFieldDefinition>;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "MergeFieldsEditing";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
constructor(editor: Editor);
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
init(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the label for the merge field with the given id.
|
|
40
|
+
*
|
|
41
|
+
* If the merge field definition for given id was not found, or a label was not specified, the merge field id is returned instead.
|
|
42
|
+
*/
|
|
43
|
+
getLabel(id: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the default value for the merge field with the given id.
|
|
46
|
+
*
|
|
47
|
+
* If the merge field default value was specified as a callback, it will be executed and the result will be returned.
|
|
48
|
+
*
|
|
49
|
+
* If the merge field definition for given id was not found, or a default value was not specified, `null` is returned.
|
|
50
|
+
*/
|
|
51
|
+
getMergeFieldDefaultValue(id: string): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the value specified for merge field with the given in given data set.
|
|
54
|
+
*
|
|
55
|
+
* If the merge field value was specified as a callback, it will be executed and the result will be returned.
|
|
56
|
+
*
|
|
57
|
+
* If the merge field definition for given id was not found, or the data set has no value for this merge field, `null` is returned.
|
|
58
|
+
*/
|
|
59
|
+
getMergeFieldValue(id: string, dataSetId: string): string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Returns ids of all merge fields that are present in the document.
|
|
62
|
+
*/
|
|
63
|
+
getDocumentMergeFieldsIds(): Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Returns ids of all merge fields defined in the configuration and custom merge fields added by the user that exist in the document.
|
|
66
|
+
*/
|
|
67
|
+
getMergeFieldsIds(): Array<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the merge field definition for the given id.
|
|
70
|
+
*/
|
|
71
|
+
getDefinition(id: string): MergeFieldDefinition;
|
|
72
|
+
/**
|
|
73
|
+
* @inheritDoc
|
|
74
|
+
*/
|
|
75
|
+
destroy(): void;
|
|
76
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x288191=_0x4b83;(function(_0x8fe486,_0x1904df){const _0x2b5ad9=_0x4b83,_0x274769=_0x8fe486();while(!![]){try{const _0x30cbe9=-parseInt(_0x2b5ad9(0x140))/0x1+-parseInt(_0x2b5ad9(0xbc))/0x2+-parseInt(_0x2b5ad9(0xf3))/0x3*(-parseInt(_0x2b5ad9(0xce))/0x4)+-parseInt(_0x2b5ad9(0xc1))/0x5*(-parseInt(_0x2b5ad9(0x10b))/0x6)+parseInt(_0x2b5ad9(0x142))/0x7+-parseInt(_0x2b5ad9(0x101))/0x8+parseInt(_0x2b5ad9(0xb3))/0x9;if(_0x30cbe9===_0x1904df)break;else _0x274769['push'](_0x274769['shift']());}catch(_0x49e379){_0x274769['push'](_0x274769['shift']());}}}(_0x3388,0x84d94));function _0x3388(){const _0x59cfd8=['createPositionAt','getChanges','hasClass','isLocal','reduce','_getFlattenedMergeFieldDefinitions','ck-merge-field','WARNING_MISSING_DEFAULT_VALUE','\x20]+','elementToElement','getShiftedBy','$dataSets','map','previewMergeFields','differ','batch','find','$defaultValues','_defineConverters','element','mergeFieldsData','merge-fields-invalid-preview-mode-set','_refreshMergeFields','change:previewMode','registerPostFixer','values','MergeFieldsEditing','bind','mergeFieldStatus','reconvertItem','consume','slice','merge-fields-invalid-prefix-or-suffix','toDomElement','getItems','54294hDzhSN','document','remove','merge-fields-duplicate-group-id','insert','getAttributes','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_missing-definition','merge-fields-invalid-license-key','schema','from','$text','insertObject','createRange','_createMergeFieldWidget','5268432DEaxFg','span','createText','value','getMergeFieldDefaultValue','dataDowncast','conversion','get','mergeFields.suffix','ck-merge-field__content','822wWIkta','getMergeFieldsIds','merge-fields-data-set-not-found','mergeFields.initialPreviewMode','editor','upcast','mapper','_validatePreviewMode','view','forEach','$inlineObject','includes','test','join','defaultValue','innerHTML','createRangeIn','_getAvailablePreviewModes','function','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_missing-data','availablePreviewModes','next','push','concat','data','_defineSchema','parent','pluginName','dataPipeline:transparentRendering','_createTextualMergeField','previewMode','_trackAddedMergeFields','_validateConfig','text','mergeField','_mergeFieldPrefix','merge-fields-trial-license-key-reached-limit-changes','register','registerInlineObjectMatcher','editingDowncast','flattenedMergeFieldDefinitions','licenseKey','delete','insertMergeField','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_no-default','add','getChildren','_licenseKeyCheckInterval','init','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20format\x20painter\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','index','checkChild','matchAll','286827GUsQIX','ck-merge-field__icon','4318811sTjkjE','WARNING_MISSING_DATA_USED_DEFAULT_VALUE','WARNING_MISSING_DATA','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_default-value-used','reverse','merge-fields-invalid-id','rootName','getDefinition','commands','nodeAfter','modelCursor','WARNING_MISSING_DEFINITION','ck-merge-field\x20ck-merge-field_with-value','length','getAttribute','change:data','filter','$labels','groupId','merge-fields-prefix-and-suffix-must-differ','mergeFields.previewModes','merge-fields-duplicate-data-set-id','_getDefaultDefinition','editing','split','set','start','domConverter','viewToModelPosition','setCustomProperty','has','_registerConversionPostFixer','model','render','createContainerElement','every','type','getMergeFieldValue','ck-merge-field__affix','modelRange','info','createElement','match','startOffset','definitions','mergeFieldsLicenseKeyInvalid','appendChild','label','listenTo','5842773jnUfII','offsetSize','mergeFieldsLicenseKeyTrialLimit:operations','position','getDocumentMergeFieldsIds','name','_mergeFieldElements','mergeFieldsLicenseKeyValid','$graveyard','1033212UvwqBt','_mergeFieldRegExp','mergeFields.prefix','_prepareViewElementData','_mergeFieldSuffix','25685RgyGdF','mergeFields.dataSets','root','nextSibling','merge-fields-duplicate-merge-field-id','define','mergeFields.definitions','merge-fields-invalid-preview-modes-configuration','createUIElement','for','getLabel','destroy','config','8qttwBH','mergeFieldsLicenseKeyTrial'];_0x3388=function(){return _0x59cfd8;};return _0x3388();}import{toWidget as _0x1b9990,viewToModelPositionOutsideModelElement as _0x95af61}from'ckeditor5/src/widget.js';import{Plugin as _0x1d6cdc}from'ckeditor5/src/core.js';import{IconView as _0x5743a3}from'ckeditor5/src/ui.js';import{isParagraphable as _0x13ddb4,wrapInParagraph as _0x1ba711}from'ckeditor5/src/engine.js';import{CKEditorError as _0x2dad35}from'ckeditor5/src/utils.js';import _0x585cc6 from'./insertmergefieldcommand.js';import _0x8aa6e6 from'./previewmergefieldscommand.js';import _0x42f126 from'../theme/icons/warning.svg';function _0x4b83(_0x4860bd,_0x158ffd){const _0x3388ea=_0x3388();return _0x4b83=function(_0x4b830b,_0x3eaa19){_0x4b830b=_0x4b830b-0xb0;let _0x378f26=_0x3388ea[_0x4b830b];return _0x378f26;},_0x4b83(_0x4860bd,_0x158ffd);}export default class o extends _0x1d6cdc{static get[_0x288191(0x126)](){const _0x439994=_0x288191;return _0x439994(0xea);}constructor(_0x1928bd){const _0x51d088=_0x288191;super(_0x1928bd),this[_0x51d088(0x133)]=[],_0x1928bd[_0x51d088(0xcd)][_0x51d088(0xc6)](_0x51d088(0x156),[_0x51d088(0x153),_0x51d088(0xe1),_0x51d088(0xdb)]),_0x1928bd[_0x51d088(0xcd)][_0x51d088(0xc6)](_0x51d088(0xc2),[]),_0x1928bd[_0x51d088(0xcd)][_0x51d088(0xc6)](_0x51d088(0xc7),[]),_0x1928bd[_0x51d088(0xcd)][_0x51d088(0xc6)](_0x51d088(0xbe),'{{'),_0x1928bd[_0x51d088(0xcd)][_0x51d088(0xc6)](_0x51d088(0x109),'}}'),this[_0x51d088(0x12e)]=_0x1928bd[_0x51d088(0xcd)][_0x51d088(0x108)](_0x51d088(0xbe)),this[_0x51d088(0xc0)]=_0x1928bd[_0x51d088(0xcd)][_0x51d088(0x108)](_0x51d088(0x109)),this[_0x51d088(0x133)]=this[_0x51d088(0xd5)](),this[_0x51d088(0x12b)]();const _0x36822e='\x5c'+this[_0x51d088(0x12e)][_0x51d088(0x15a)]('')[_0x51d088(0x118)]('\x5c'),_0x3e2789='\x5c'+this[_0x51d088(0xc0)][_0x51d088(0x15a)]('')[_0x51d088(0x118)]('\x5c');this[_0x51d088(0xbd)]=new RegExp('('+_0x36822e+'[^'+(_0x36822e+_0x3e2789)+_0x51d088(0xd8)+_0x3e2789+')','g'),this[_0x51d088(0x11f)]=this[_0x51d088(0x11c)]();const _0x5da506=_0x1928bd[_0x51d088(0xcd)][_0x51d088(0x108)](_0x51d088(0x10e))||this[_0x51d088(0x11f)][0x0];this[_0x51d088(0x112)](_0x5da506),this[_0x51d088(0x15b)](_0x51d088(0x129),_0x5da506),this[_0x51d088(0xb9)]=new Set(),this[_0x51d088(0x13a)]=null;}[_0x288191(0x13b)](){const _0x4ced37=_0x288191,_0x27e37e=this[_0x4ced37(0x10f)];_0x27e37e[_0x4ced37(0x14a)][_0x4ced37(0x138)](_0x4ced37(0x136),new _0x585cc6(_0x27e37e)),_0x27e37e[_0x4ced37(0x14a)][_0x4ced37(0x138)](_0x4ced37(0xdd),new _0x8aa6e6(_0x27e37e)),this[_0x4ced37(0x124)](),this[_0x4ced37(0xe2)](),this['on'](_0x4ced37(0xe7),(_0x41afce,_0x3ea16a,_0x5d888d)=>{const _0x4e015d=_0x4ced37;this[_0x4e015d(0x112)](_0x5d888d),this[_0x4e015d(0xe6)]();}),this[_0x4ced37(0xb2)](_0x27e37e[_0x4ced37(0x162)][_0x4ced37(0xf4)],_0x4ced37(0x151),()=>{const _0x2ed1a5=_0x4ced37;this[_0x2ed1a5(0x12a)]();}),_0x27e37e[_0x4ced37(0x159)][_0x4ced37(0x111)]['on'](_0x4ced37(0x15e),_0x95af61(_0x27e37e[_0x4ced37(0x162)],_0x3b1992=>_0x3b1992[_0x4ced37(0xd2)](_0x4ced37(0xd6)))),this[_0x4ced37(0x161)](),_0x27e37e[_0x4ced37(0x159)][_0x4ced37(0x113)][_0x4ced37(0x15d)][_0x4ced37(0x131)]({'name':_0x4ced37(0x102),'classes':[_0x4ced37(0xd6)]}),this[_0x4ced37(0x134)]=_0x27e37e[_0x4ced37(0xcd)][_0x4ced37(0x108)](_0x4ced37(0x134));const _0x1b654a=this[_0x4ced37(0x10f)];this[_0x4ced37(0x13a)]=setInterval(()=>{const _0x508a73=_0x4ced37;let _0x387dfd;for(const _0x4b33f6 in _0x1b654a){const _0x4e4c80=_0x4b33f6,_0x3d79bb=_0x1b654a[_0x4e4c80];if(_0x508a73(0xcf)===_0x3d79bb||_0x508a73(0x16f)===_0x3d79bb||_0x508a73(0xba)===_0x3d79bb||_0x508a73(0xb5)===_0x3d79bb){delete _0x1b654a[_0x4e4c80],_0x387dfd=_0x3d79bb;break;}}if(_0x508a73(0x16f)===_0x387dfd)throw clearInterval(this[_0x508a73(0x13a)]),new _0x2dad35(_0x508a73(0xfa),null);if(_0x508a73(0xcf)===_0x387dfd&&console[_0x508a73(0x16a)](_0x508a73(0x13c)),_0x508a73(0xb5)===_0x387dfd)throw clearInterval(this[_0x508a73(0x13a)]),new _0x2dad35(_0x508a73(0x12f),null);_0x508a73(0xba)===_0x387dfd&&clearInterval(this[_0x508a73(0x13a)]);},0x3e8);}[_0x288191(0xcb)](_0x1280e3){const _0x1b4ae7=_0x288191,_0x46bb44=this[_0x1b4ae7(0x149)](_0x1280e3);return _0x46bb44[_0x1b4ae7(0xb1)]||_0x46bb44['id'];}[_0x288191(0x105)](_0x24b610){const _0x22e859=_0x288191,_0x144830=this[_0x22e859(0x149)](_0x24b610);return void 0x0===_0x144830[_0x22e859(0x119)]?null:_0x22e859(0x11d)==typeof _0x144830[_0x22e859(0x119)]?_0x144830[_0x22e859(0x119)](this[_0x22e859(0x10f)]):_0x144830[_0x22e859(0x119)];}[_0x288191(0x167)](_0x4be34c,_0x421664){const _0x553f8b=_0x288191,_0x43e446=this[_0x553f8b(0x10f)][_0x553f8b(0xcd)][_0x553f8b(0x108)](_0x553f8b(0xc2))[_0x553f8b(0xe0)](_0x5e988a=>_0x5e988a['id']===_0x421664);if(!_0x43e446)throw new _0x2dad35(_0x553f8b(0x10d),null);const _0x1cf16a=this[_0x553f8b(0x149)](_0x4be34c),_0x239192=_0x43e446[_0x553f8b(0xe9)][_0x1cf16a['id']];return void 0x0===_0x239192?null:_0x553f8b(0x11d)==typeof _0x239192?_0x239192(this[_0x553f8b(0x10f)]):_0x239192;}[_0x288191(0xb7)](){const _0x468dd3=_0x288191,_0x4a952f=new Set();for(const _0x33a4a2 of this[_0x468dd3(0xb9)])_0x468dd3(0xbb)!==_0x33a4a2[_0x468dd3(0xc3)][_0x468dd3(0x148)]&&_0x4a952f[_0x468dd3(0x138)](_0x33a4a2[_0x468dd3(0x150)]('id'));return Array[_0x468dd3(0xfc)](_0x4a952f);}[_0x288191(0x10c)](){const _0x5b8552=_0x288191,_0x5f0c6d=this[_0x5b8552(0x133)][_0x5b8552(0xdc)](_0x1817cb=>_0x1817cb['id']),_0x48f55a=this[_0x5b8552(0xb7)]();return Array[_0x5b8552(0xfc)](new Set([..._0x5f0c6d,..._0x48f55a]));}[_0x288191(0x149)](_0x120832){const _0x1703ce=_0x288191;return this[_0x1703ce(0x133)][_0x1703ce(0xe0)](_0x139487=>_0x139487['id']===_0x120832)||this[_0x1703ce(0x158)](_0x120832);}[_0x288191(0xcc)](){const _0x2bbb83=_0x288191;this[_0x2bbb83(0x13a)]&&clearInterval(this[_0x2bbb83(0x13a)]);}[_0x288191(0xd5)](){const _0x9cd3fe=_0x288191,_0x1f8d24=new Set(),_0x182443=this[_0x9cd3fe(0x10f)];return _0x182443[_0x9cd3fe(0xcd)][_0x9cd3fe(0x108)](_0x9cd3fe(0xc7))[_0x9cd3fe(0xd4)]((_0x147284,_0x4a0f89)=>{const _0x4ce1c4=_0x9cd3fe;if(_0x4ce1c4(0x154)in _0x4a0f89){if(_0x1f8d24[_0x4ce1c4(0x160)](_0x4a0f89[_0x4ce1c4(0x154)]))throw new _0x2dad35(_0x4ce1c4(0xf6),_0x182443,{'duplicateId':_0x4a0f89[_0x4ce1c4(0x154)]});_0x1f8d24[_0x4ce1c4(0x138)](_0x4a0f89[_0x4ce1c4(0x154)]);}return _0x4ce1c4(0x154)in _0x4a0f89?function(_0x23b22a,_0x4466fd){const _0x4c0ae5=_0x4ce1c4;for(const _0x3f6155 of _0x4466fd[_0x4c0ae5(0x16e)])_0x23b22a=_0x23b22a[_0x4c0ae5(0x122)](_0x3f6155);return _0x23b22a;}[_0x4ce1c4(0xeb)](_0x182443)(_0x147284,_0x4a0f89):_0x147284[_0x4ce1c4(0x122)](_0x4a0f89);},new Array());}[_0x288191(0x12b)](){const _0x5bf1e3=_0x288191,_0x24e73b=/^['"`!#%:;=@{}~$()*+/?[\\\]^|]+$/;if(!_0x24e73b[_0x5bf1e3(0x117)](this[_0x5bf1e3(0x12e)])||!_0x24e73b[_0x5bf1e3(0x117)](this[_0x5bf1e3(0xc0)]))throw new _0x2dad35(_0x5bf1e3(0xf0),this,{'prefix':this[_0x5bf1e3(0x12e)],'suffix':this[_0x5bf1e3(0xc0)]});const _0x5d87f5=/^[a-zA-Z0-9_.-]+$/,_0x11bdcb=new Set();if(this[_0x5bf1e3(0x133)][_0x5bf1e3(0xdc)](_0x4aa41d=>{const _0x47c4f5=_0x5bf1e3;if(!_0x5d87f5[_0x47c4f5(0x117)](_0x4aa41d['id']))throw new _0x2dad35(_0x47c4f5(0x147),this,{'incorrectId':_0x4aa41d['id']});if(_0x11bdcb[_0x47c4f5(0x160)](_0x4aa41d['id']))throw new _0x2dad35(_0x47c4f5(0xc5),this,{'duplicateId':_0x4aa41d['id']});_0x11bdcb[_0x47c4f5(0x138)](_0x4aa41d['id']);}),this[_0x5bf1e3(0x12e)]===this[_0x5bf1e3(0xc0)])throw new _0x2dad35(_0x5bf1e3(0x155),this);const _0x493fe6=this[_0x5bf1e3(0x10f)][_0x5bf1e3(0xcd)][_0x5bf1e3(0x108)](_0x5bf1e3(0x156)),_0x5c787d=[_0x5bf1e3(0x153),_0x5bf1e3(0xe1),_0x5bf1e3(0xdb)];if(!_0x493fe6[_0x5bf1e3(0x14f)]||!_0x493fe6[_0x5bf1e3(0x165)](_0x5c2f35=>_0x5c787d[_0x5bf1e3(0x116)](_0x5c2f35)))throw new _0x2dad35(_0x5bf1e3(0xc8),this,{'invalidConfig':_0x493fe6});const _0x51ccba=new Set(),_0xe2f414=this[_0x5bf1e3(0x10f)][_0x5bf1e3(0xcd)][_0x5bf1e3(0x108)](_0x5bf1e3(0xc2));for(const _0x1545aa of _0xe2f414){if(_0x51ccba[_0x5bf1e3(0x160)](_0x1545aa['id']))throw new _0x2dad35(_0x5bf1e3(0x157),this,{'duplicateId':_0x1545aa['id']});_0x51ccba[_0x5bf1e3(0x138)](_0x1545aa['id']);}}[_0x288191(0x11c)](){const _0x4e12ea=_0x288191,_0x3bfa11=this[_0x4e12ea(0x10f)][_0x4e12ea(0xcd)][_0x4e12ea(0x108)](_0x4e12ea(0x156)),_0x46dc6d=[];if(_0x3bfa11[_0x4e12ea(0x116)](_0x4e12ea(0x153))&&_0x46dc6d[_0x4e12ea(0x121)](_0x4e12ea(0x153)),_0x3bfa11[_0x4e12ea(0x116)](_0x4e12ea(0xe1))&&_0x46dc6d[_0x4e12ea(0x121)](_0x4e12ea(0xe1)),_0x3bfa11[_0x4e12ea(0x116)](_0x4e12ea(0xdb))){const _0x5bc13e=this[_0x4e12ea(0x10f)][_0x4e12ea(0xcd)][_0x4e12ea(0x108)](_0x4e12ea(0xc2));_0x46dc6d[_0x4e12ea(0x121)](..._0x5bc13e[_0x4e12ea(0xdc)](_0x2fed1c=>_0x2fed1c['id']));}return _0x46dc6d;}[_0x288191(0x124)](){const _0x3a1937=_0x288191;this[_0x3a1937(0x10f)][_0x3a1937(0x162)][_0x3a1937(0xfb)][_0x3a1937(0x130)](_0x3a1937(0x12d),{'inheritAllFrom':_0x3a1937(0x115),'allowAttributes':['id'],'allowWhere':_0x3a1937(0xfd)});}[_0x288191(0xe2)](){const _0x5e0fc6=_0x288191,_0x11425f=this[_0x5e0fc6(0x10f)][_0x5e0fc6(0x107)];_0x11425f[_0x5e0fc6(0xca)](_0x5e0fc6(0x110))[_0x5e0fc6(0x138)](_0x7660eb=>{const _0xa0f046=_0x5e0fc6;_0x7660eb['on'](_0xa0f046(0x12c),(_0x10e017,_0x17c918,_0x385b20)=>{const _0x108b2e=_0xa0f046,{consumable:_0x157f51,writer:_0x5382e4,schema:_0x2ee4b2}=_0x385b20,{viewItem:_0x3e20eb}=_0x17c918;if(!_0x157f51[_0x108b2e(0x117)](_0x3e20eb))return;const _0x53d0fc=_0x3e20eb[_0x108b2e(0x123)][_0x108b2e(0x15a)](this[_0x108b2e(0xbd)])[_0x108b2e(0x152)](_0x113141=>_0x113141);if(0x1!==_0x53d0fc[_0x108b2e(0x14f)]||_0x53d0fc[0x0][_0x108b2e(0x16c)](this[_0x108b2e(0xbd)])){if(!_0x2ee4b2[_0x108b2e(0x13e)](_0x17c918[_0x108b2e(0x14c)],_0x108b2e(0xfd))){if(!_0x13ddb4(_0x17c918[_0x108b2e(0x14c)],_0x108b2e(0xfd),_0x2ee4b2))return;_0x17c918[_0x108b2e(0x14c)]=_0x1ba711(_0x17c918[_0x108b2e(0x14c)],_0x5382e4);}_0x157f51[_0x108b2e(0xee)](_0x3e20eb);for(const _0x791c94 of _0x53d0fc){const _0x37f1e1=_0x17c918[_0x108b2e(0x14c)];let _0x50206d;if(_0x791c94[_0x108b2e(0x16c)](this[_0x108b2e(0xbd)])){const _0x4ccfc0=_0x791c94[_0x108b2e(0xef)](this[_0x108b2e(0x12e)][_0x108b2e(0x14f)],_0x791c94[_0x108b2e(0x14f)]-this[_0x108b2e(0xc0)][_0x108b2e(0x14f)]);_0x50206d=_0x5382e4[_0x108b2e(0x16b)](_0x108b2e(0x12d),{'id':_0x4ccfc0});}else _0x50206d=_0x5382e4[_0x108b2e(0x103)](_0x791c94);_0x5382e4[_0x108b2e(0xf7)](_0x50206d,_0x37f1e1),_0x17c918[_0x108b2e(0x14c)]=_0x37f1e1[_0x108b2e(0xda)](_0x50206d[_0x108b2e(0xb4)]),_0x17c918[_0x108b2e(0x169)]=_0x5382e4[_0x108b2e(0xff)](_0x17c918[_0x108b2e(0x169)]?_0x17c918[_0x108b2e(0x169)][_0x108b2e(0x15c)]:_0x37f1e1,_0x17c918[_0x108b2e(0x14c)]);}}});}),_0x11425f[_0x5e0fc6(0xca)](_0x5e0fc6(0x132))[_0x5e0fc6(0xd9)]({'model':_0x5e0fc6(0x12d),'view':(_0x18a871,{writer:_0x52046c})=>this[_0x5e0fc6(0x100)](_0x18a871,_0x52046c)}),_0x11425f[_0x5e0fc6(0xca)](_0x5e0fc6(0x106))[_0x5e0fc6(0xd9)]({'model':_0x5e0fc6(0x12d),'view':(_0xca2a51,{writer:_0x291892,options:_0x6f0add})=>this[_0x5e0fc6(0x128)](_0xca2a51,_0x291892,_0x6f0add[_0x5e0fc6(0xe4)])});}[_0x288191(0x100)](_0x278cb2,_0x49af51){const _0x204897=_0x288191,{label:_0x25566c,classes:_0x2baa65,status:_0x319fab}=this[_0x204897(0xbf)](_0x278cb2),_0x45b777=this[_0x204897(0x12e)],_0x370d68=this[_0x204897(0xc0)];let _0x5f43d5;return _0x204897(0x153)===this[_0x204897(0x129)]?_0x5f43d5=_0x49af51[_0x204897(0x164)](_0x204897(0x102),{'class':_0x2baa65},[_0x49af51[_0x204897(0xc9)](_0x204897(0x102),{'class':_0x204897(0x168)},function(_0x2cc6b1){const _0x4a8b9f=_0x204897,_0x58e314=this[_0x4a8b9f(0xf1)](_0x2cc6b1);return _0x58e314[_0x4a8b9f(0x11a)]=_0x45b777,_0x58e314;}),_0x49af51[_0x204897(0x164)](_0x204897(0x102),{'class':_0x204897(0x10a)},_0x49af51[_0x204897(0x103)](String(_0x25566c))),_0x49af51[_0x204897(0xc9)](_0x204897(0x102),{'class':_0x204897(0x168)},function(_0x2ab6c7){const _0x22693b=_0x204897,_0x4aa76e=this[_0x22693b(0xf1)](_0x2ab6c7);return _0x4aa76e[_0x22693b(0x11a)]=_0x370d68,_0x4aa76e;})]):_0x319fab?(_0x5f43d5=_0x49af51[_0x204897(0x164)](_0x204897(0x102),{'class':_0x2baa65},[_0x49af51[_0x204897(0x103)](String(_0x25566c)),_0x49af51[_0x204897(0xc9)](_0x204897(0x102),{'class':_0x204897(0x141)},function(_0xa1b860){const _0x1ee77b=_0x204897,_0xf3ff19=this[_0x1ee77b(0xf1)](_0xa1b860),_0x495bde=new _0x5743a3();return _0x495bde[_0x1ee77b(0x15b)]({'content':_0x42f126}),_0x495bde[_0x1ee77b(0x163)](),_0xf3ff19[_0x1ee77b(0xb0)](_0x495bde[_0x1ee77b(0xe3)]),_0xf3ff19;})]),_0x49af51[_0x204897(0x15f)](_0x204897(0xec),_0x319fab,_0x5f43d5)):_0x5f43d5=_0x49af51[_0x204897(0x164)](_0x204897(0x102),{'class':_0x2baa65},[_0x49af51[_0x204897(0x103)](String(_0x25566c))]),_0x49af51[_0x204897(0x15f)](_0x204897(0x12d),!0x0,_0x5f43d5),_0x1b9990(_0x5f43d5,_0x49af51);}[_0x288191(0xbf)](_0x23aba3){const _0x5171c9=_0x288191,_0x4f23f7=this[_0x5171c9(0x133)][_0x5171c9(0xe0)](_0x49a17b=>_0x49a17b['id']===_0x23aba3[_0x5171c9(0x150)]('id'));if(!_0x4f23f7)return _0x5171c9(0x153)===this[_0x5171c9(0x129)]?{'label':_0x23aba3[_0x5171c9(0x150)]('id'),'classes':_0x5171c9(0xd6)}:{'label':_0x23aba3[_0x5171c9(0x150)]('id'),'classes':_0x5171c9(0xf9),'status':_0x5171c9(0x14d)};const _0x6fd77c=this[_0x5171c9(0xcb)](_0x4f23f7['id']),_0x3c9bed=this[_0x5171c9(0x105)](_0x23aba3[_0x5171c9(0x150)]('id'));if(_0x5171c9(0x153)===this[_0x5171c9(0x129)])return{'label':_0x6fd77c,'classes':_0x5171c9(0xd6)};if(_0x5171c9(0xe1)===this[_0x5171c9(0x129)])return _0x3c9bed?{'label':_0x3c9bed,'classes':_0x5171c9(0x14e)}:{'label':_0x6fd77c,'classes':_0x5171c9(0x137),'status':_0x5171c9(0xd7)};const _0x6d76eb=this[_0x5171c9(0x10f)][_0x5171c9(0xcd)][_0x5171c9(0x108)](_0x5171c9(0xc2))[_0x5171c9(0xe0)](_0x421345=>_0x421345['id']===this[_0x5171c9(0x129)])[_0x5171c9(0xe9)][_0x4f23f7['id']];return _0x6d76eb?{'label':_0x5171c9(0x11d)==typeof _0x6d76eb?_0x6d76eb(this[_0x5171c9(0x10f)]):_0x6d76eb,'classes':_0x5171c9(0x14e)}:_0x3c9bed?{'label':_0x3c9bed,'classes':_0x5171c9(0x145),'status':_0x5171c9(0x143)}:{'label':_0x6fd77c,'classes':_0x5171c9(0x11e),'status':_0x5171c9(0x144)};}[_0x288191(0x128)](_0x13b96c,_0x4e0a1e,_0x348376){const _0x5d3370=_0x288191,_0x447625=_0x13b96c[_0x5d3370(0x150)]('id'),_0x12ac31=_0x348376&&_0x348376[_0x447625]?_0x348376[_0x447625]:this[_0x5d3370(0x12e)]+_0x447625+this[_0x5d3370(0xc0)],_0xd608f3=_0x4e0a1e[_0x5d3370(0x103)](_0x12ac31),_0x70f2e9=_0x4e0a1e[_0x5d3370(0x164)](_0x5d3370(0x102));return _0x4e0a1e[_0x5d3370(0x15f)](_0x5d3370(0x127),!0x0,_0x70f2e9),_0x4e0a1e[_0x5d3370(0xf7)](_0x4e0a1e[_0x5d3370(0xd0)](_0x70f2e9,0x0),_0xd608f3),_0x70f2e9;}[_0x288191(0xe6)](){const _0xbeac7a=_0x288191;this[_0xbeac7a(0xb9)][_0xbeac7a(0x114)](_0x499e12=>{const _0x252604=_0xbeac7a;_0x252604(0xbb)!==_0x499e12[_0x252604(0xc3)][_0x252604(0x148)]&&this[_0x252604(0x10f)][_0x252604(0x159)][_0x252604(0xed)](_0x499e12);});}[_0x288191(0x112)](_0x47b2d2){const _0x4623d4=_0x288191;if(!this[_0x4623d4(0x11f)][_0x4623d4(0x116)](_0x47b2d2))throw new _0x2dad35(_0x4623d4(0xe5),this,{'availablePreviewModes':this[_0x4623d4(0x11f)],'previewMode':_0x47b2d2});}[_0x288191(0x12a)](){const _0x508fd2=_0x288191;for(const _0x541551 of this[_0x508fd2(0x10f)][_0x508fd2(0x162)][_0x508fd2(0xf4)][_0x508fd2(0xde)][_0x508fd2(0xd1)]({'includeChangesInGraveyard':!0x0})){if(_0x508fd2(0xf7)!==_0x541551[_0x508fd2(0x166)]||_0x508fd2(0xfd)===_0x541551[_0x508fd2(0xb8)])continue;if(_0x508fd2(0x12d)===_0x541551[_0x508fd2(0xb8)]){this[_0x508fd2(0xb9)][_0x508fd2(0x138)](_0x541551[_0x508fd2(0xb6)][_0x508fd2(0x14b)]);continue;}const _0x4bda41=this[_0x508fd2(0x10f)][_0x508fd2(0x162)][_0x508fd2(0x11b)](_0x541551[_0x508fd2(0xb6)][_0x508fd2(0x14b)]);for(const _0xdb3b42 of _0x4bda41[_0x508fd2(0xf2)]())_0xdb3b42['is'](_0x508fd2(0xe3),_0x508fd2(0x12d))&&this[_0x508fd2(0xb9)][_0x508fd2(0x138)](_0xdb3b42);}}[_0x288191(0x161)](){const _0x593910=_0x288191,_0x4f58d5=this[_0x593910(0x10f)];_0x4f58d5[_0x593910(0x162)][_0x593910(0xf4)][_0x593910(0xe8)](_0x56598a=>{const _0x24cd02=_0x593910;if(!_0x56598a[_0x24cd02(0xdf)][_0x24cd02(0xd3)])return!0x1;const _0x548513=[],_0x11a873=new Set(),_0x4165c1=this[_0x24cd02(0xbd)];let _0xfafbd5=!0x1;for(const _0x36e409 of _0x4f58d5[_0x24cd02(0x162)][_0x24cd02(0xf4)][_0x24cd02(0xde)][_0x24cd02(0xd1)]())if(_0x24cd02(0xf7)===_0x36e409[_0x24cd02(0x166)]||_0x24cd02(0xf5)===_0x36e409[_0x24cd02(0x166)]){let _0x527c46=_0x24cd02(0xfd)==_0x36e409[_0x24cd02(0xb8)]?_0x36e409[_0x24cd02(0xb6)][_0x24cd02(0x125)]:_0x36e409[_0x24cd02(0xb6)][_0x24cd02(0x14b)];if(!_0x527c46)continue;_0x527c46['is'](_0x24cd02(0xfd))&&(_0x527c46=_0x527c46[_0x24cd02(0x125)]),_0x1a6fd7(_0x527c46);}for(const _0x1ff846 of _0x548513[_0x24cd02(0x146)]()){const {match:_0x557e6a,item:_0x5263f9}=_0x1ff846,_0x420558=_0x56598a[_0x24cd02(0xd0)](_0x5263f9,_0x557e6a[_0x24cd02(0x13d)]),_0x5e32da=_0x420558[_0x24cd02(0xda)](_0x557e6a[0x0][_0x24cd02(0x14f)]),_0x1c0e6f=_0x56598a[_0x24cd02(0xff)](_0x420558,_0x5e32da),_0x5cdc99=_0x557e6a[0x0],_0x5318e1=_0x5cdc99[_0x24cd02(0xef)](this[_0x24cd02(0x12e)][_0x24cd02(0x14f)],_0x5cdc99[_0x24cd02(0x14f)]-this[_0x24cd02(0xc0)][_0x24cd02(0x14f)]),_0x414414=_0x33211b(_0x1c0e6f);_0x414414[_0x24cd02(0x15b)]('id',_0x5318e1);const _0x7f48c=_0x56598a[_0x24cd02(0x16b)](_0x24cd02(0x12d),_0x414414);_0x4f58d5[_0x24cd02(0x162)][_0x24cd02(0xfb)][_0x24cd02(0x13e)](_0x1c0e6f[_0x24cd02(0x15c)],_0x24cd02(0x12d))?_0x4f58d5[_0x24cd02(0x162)][_0x24cd02(0xfe)](_0x7f48c,_0x1c0e6f):_0x56598a[_0x24cd02(0xf5)](_0x1c0e6f),_0xfafbd5=!0x0;}return _0xfafbd5;function _0x1a6fd7(_0x3bb52b){const _0x4b8d56=_0x24cd02;let _0x4214b5='',_0x153399=0x0;if(!_0x11a873[_0x4b8d56(0x160)](_0x3bb52b))for(const _0x7ed13b of _0x3bb52b[_0x4b8d56(0x139)]()){const _0x27d436=_0x7ed13b[_0x4b8d56(0xc4)];if(_0x7ed13b['is'](_0x4b8d56(0xfd))&&(''===_0x4214b5&&_0x7ed13b[_0x4b8d56(0x16d)]&&(_0x153399=_0x7ed13b[_0x4b8d56(0x16d)]),_0x4214b5+=_0x7ed13b[_0x4b8d56(0x123)]),!_0x27d436||_0x27d436['is'](_0x4b8d56(0xe3))){for(const _0x7800e1 of _0x4214b5[_0x4b8d56(0x13f)](_0x4165c1))_0x7800e1[_0x4b8d56(0x13d)]=_0x7800e1[_0x4b8d56(0x13d)]+_0x153399,_0x548513[_0x4b8d56(0x121)]({'match':_0x7800e1,'item':_0x3bb52b});_0x11a873[_0x4b8d56(0x138)](_0x3bb52b),_0x4214b5='';}_0x7ed13b['is'](_0x4b8d56(0xe3))&&_0x1a6fd7(_0x7ed13b);}}function _0x33211b(_0x39e5e2){const _0x1bed35=_0x24cd02,_0x192690=_0x39e5e2[_0x1bed35(0xf2)](),_0x3e6e70=_0x192690[_0x1bed35(0x120)]()[_0x1bed35(0x104)],_0x338219=new Map(_0x3e6e70[_0x1bed35(0xf8)]());for(const _0x4e7534 of _0x192690)for(const [_0x39a43e,_0x2b1f86]of _0x338219)_0x4e7534[_0x1bed35(0x150)](_0x39a43e)!==_0x2b1f86&&_0x338219[_0x1bed35(0x135)](_0x39a43e);return _0x338219;}});}[_0x288191(0x158)](_0x4e6114){return{'id':_0x4e6114};}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields/mergefieldsui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import '../theme/mergefields.css';
|
|
11
|
+
import '../theme/insert-dropdown.css';
|
|
12
|
+
/**
|
|
13
|
+
* The merge fields UI feature.
|
|
14
|
+
*/
|
|
15
|
+
export default class MergeFieldsUI extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get requires(): readonly [typeof ContextualBalloon];
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "MergeFieldsUI";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(editor: Editor);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
init(): void;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
afterInit(): void;
|
|
36
|
+
}
|