@ckeditor/ckeditor5-operations-compressor 40.0.0 → 40.2.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.
- package/CHANGELOG.md +16 -16
- package/LICENSE.md +7 -8
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/actioncompressor/actioncompressor.d.ts +60 -60
- package/src/actioncompressor/actioncompressor.js +1 -1
- package/src/actioncompressor/deletingactioncompressor.d.ts +28 -28
- package/src/actioncompressor/deletingactioncompressor.js +1 -1
- package/src/actioncompressor/forwarddeletingactioncompressor.d.ts +28 -28
- package/src/actioncompressor/forwarddeletingactioncompressor.js +1 -1
- package/src/actioncompressor/typingactioncompressor.d.ts +28 -28
- package/src/actioncompressor/typingactioncompressor.js +1 -1
- package/src/actioncompressor/userselectionactioncompressor.d.ts +16 -16
- package/src/actioncompressor/userselectionactioncompressor.js +1 -1
- package/src/compressor.d.ts +45 -45
- package/src/compressor.js +1 -1
- package/src/lib/compiledmessages.js +1 -1
- package/src/operationcompressor/annotationmarkeroperationcompressor.d.ts +22 -22
- package/src/operationcompressor/annotationmarkeroperationcompressor.js +1 -1
- package/src/operationcompressor/attributeoperationcompressor.d.ts +17 -17
- package/src/operationcompressor/attributeoperationcompressor.js +1 -1
- package/src/operationcompressor/insertoperationcompressor.d.ts +17 -17
- package/src/operationcompressor/insertoperationcompressor.js +1 -1
- package/src/operationcompressor/markeroperationcompressor.d.ts +13 -13
- package/src/operationcompressor/markeroperationcompressor.js +1 -1
- package/src/operationcompressor/nooperationcompressor.d.ts +20 -20
- package/src/operationcompressor/nooperationcompressor.js +1 -1
- package/src/operationcompressor/operationcompressor.d.ts +28 -28
- package/src/operationcompressor/operationcompressor.js +1 -1
- package/src/protobufdescriptions.d.ts +4 -4
- package/src/protobufdescriptions.js +1 -1
- package/src/protobuffactory.d.ts +5 -5
- package/src/protobuffactory.js +1 -1
- package/src/utils.d.ts +30 -30
- package/src/utils.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,87 +6,87 @@ All changes in the package are documented at https://github.com/ckeditor/ckedito
|
|
|
6
6
|
Changes for the past releases are available below.
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
## 23.0.0 (2020
|
|
9
|
+
## 23.0.0 (September 25, 2020)
|
|
10
10
|
|
|
11
11
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## 22.0.0 (2020
|
|
14
|
+
## 22.0.0 (August 25, 2020)
|
|
15
15
|
|
|
16
16
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
## 21.0.0 (2020
|
|
19
|
+
## 21.0.0 (July 24, 2020)
|
|
20
20
|
|
|
21
21
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
## 20.0.1 (2020
|
|
24
|
+
## 20.0.1 (June 26, 2020)
|
|
25
25
|
|
|
26
26
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
## 19.0.2 (2020
|
|
29
|
+
## 19.0.2 (May 25, 2020)
|
|
30
30
|
|
|
31
31
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
## 19.0.1 (2020
|
|
34
|
+
## 19.0.1 (April 30, 2020)
|
|
35
35
|
|
|
36
36
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
## 18.0.0 (2020
|
|
39
|
+
## 18.0.0 (March 19, 2020)
|
|
40
40
|
|
|
41
41
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
## 17.0.0 (2020
|
|
44
|
+
## 17.0.0 (February 20, 2020)
|
|
45
45
|
|
|
46
46
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
## 16.0.0 (2019
|
|
49
|
+
## 16.0.0 (December 2, 2019)
|
|
50
50
|
|
|
51
51
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
## 15.0.0 (2019
|
|
54
|
+
## 15.0.0 (October 23, 2019)
|
|
55
55
|
|
|
56
56
|
### Other changes
|
|
57
57
|
|
|
58
58
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
## 1.1.3 (2019
|
|
61
|
+
## 1.1.3 (August 22, 2019)
|
|
62
62
|
|
|
63
63
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
## 1.1.2 (2019
|
|
66
|
+
## 1.1.2 (July 4, 2019)
|
|
67
67
|
|
|
68
68
|
### Bug fixes
|
|
69
69
|
|
|
70
70
|
* Undone user selection changes will now be properly recognized by the operations compressor.
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
## 1.1.1 (2019
|
|
73
|
+
## 1.1.1 (March 6, 2019)
|
|
74
74
|
|
|
75
75
|
### Bug fixes
|
|
76
76
|
|
|
77
77
|
* Fixed decompressing InsertOperation with no nodes.
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
## 1.1.0 (2019
|
|
80
|
+
## 1.1.0 (February 5, 2019)
|
|
81
81
|
|
|
82
82
|
Added special compression codes for annotation markers.
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
## 1.0.1 (2018
|
|
85
|
+
## 1.0.1 (December 6, 2018)
|
|
86
86
|
|
|
87
87
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
## 1.0.0 (2018
|
|
90
|
+
## 1.0.0 (October 8, 2018)
|
|
91
91
|
|
|
92
92
|
The first stable release of the CKEditor 5 operations compressor. Compress and decompress a collection of operations using [Protocol Buffers for JavaScript](https://github.com/dcodeIO/ProtoBuf.js/) and custom optimizations.
|
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 operations compressor**<br>
|
|
5
|
-
Copyright (c) 2003
|
|
5
|
+
Copyright (c) 2003–2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
6
|
|
|
7
7
|
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law.
|
|
8
8
|
For more details about available licensing options please contact us at sales@cksource.com.
|
|
@@ -10,18 +10,17 @@ For more details about available licensing options please contact us at sales@ck
|
|
|
10
10
|
Sources of Intellectual Property Included in CKEditor 5 operations compressor
|
|
11
11
|
-----------------------------------------------------
|
|
12
12
|
|
|
13
|
-
Where not otherwise indicated, all CKEditor 5
|
|
14
|
-
Any attempts to deobfuscate or disassemble the code are forbidden and will result in legal consequences.
|
|
13
|
+
Where not otherwise indicated, all CKEditor 5 operations compressor content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
15
14
|
|
|
16
|
-
The following libraries are included in CKEditor 5
|
|
15
|
+
The following libraries are included in CKEditor 5 operations compressor under the [MIT license](https://opensource.org/licenses/MIT):
|
|
17
16
|
|
|
18
|
-
*
|
|
17
|
+
* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
|
|
19
18
|
|
|
20
|
-
The following libraries are included in CKEditor 5
|
|
19
|
+
The following libraries are included in CKEditor 5 operations compressor under the [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause):
|
|
21
20
|
|
|
22
|
-
*
|
|
21
|
+
* protobuf.js - Copyright (c) 2016, Daniel Wirtz All rights reserved.
|
|
23
22
|
|
|
24
23
|
Trademarks
|
|
25
24
|
----------
|
|
26
25
|
|
|
27
|
-
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
|
26
|
+
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ As a licensed CKEditor 5 Collaboration features user you can report bugs an
|
|
|
19
19
|
## License
|
|
20
20
|
|
|
21
21
|
**CKEditor 5 operations compressor**<br>
|
|
22
|
-
Copyright (c) 2003
|
|
22
|
+
Copyright (c) 2003–2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
23
23
|
|
|
24
24
|
CKEditor 5 operations compressor is licensed under a commercial license and is protected by copyright law.
|
|
25
25
|
For more details about available licensing options please contact us at sales@cksource.com.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-operations-compressor",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.2.0",
|
|
4
4
|
"description": "CKEditor 5 operations compressor for real-time collaboration.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://ckeditor.com/collaboration/real-time/",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"url": "https://support.ckeditor.com/hc/en-us/requests/new"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"ckeditor5": "40.
|
|
33
|
+
"ckeditor5": "40.2.0",
|
|
34
34
|
"lodash-es": "4.17.21",
|
|
35
35
|
"protobufjs": "7.2.4"
|
|
36
36
|
},
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, 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 { CompressedOperationsData, default as Compressor } from '../compressor';
|
|
6
|
-
/**
|
|
7
|
-
* * Compresses and decompresses multiple operations into the one buffer.
|
|
8
|
-
*/
|
|
9
|
-
export default abstract class ActionCompressor {
|
|
10
|
-
constructor(id: number, context: Compressor);
|
|
11
|
-
/**
|
|
12
|
-
* Combines and compress operations from the list.
|
|
13
|
-
* Operations are consumed as long as match this compressor.
|
|
14
|
-
*
|
|
15
|
-
* @param result Object to which compression result should be added.
|
|
16
|
-
* @param operations List of operations in JSON format to compress.
|
|
17
|
-
* @returns `true` when operation is consumed `false` otherwise.
|
|
18
|
-
*/
|
|
19
|
-
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Decompress and split compressed operations. Decompressed operations are consumed (removed from the input data).
|
|
22
|
-
*
|
|
23
|
-
* @param result Decompressed operations in JSON format.
|
|
24
|
-
* @param data Compressed operations data.
|
|
25
|
-
*/
|
|
26
|
-
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
27
|
-
/**
|
|
28
|
-
* Compresses single operation using a proper compressor.
|
|
29
|
-
*
|
|
30
|
-
* @param operation Operation in JSON format.
|
|
31
|
-
* @returns Operation JSON compressed to the binary format.
|
|
32
|
-
*/
|
|
33
|
-
protected abstract _compressSingleOperation(operation: any): Uint8Array;
|
|
34
|
-
/**
|
|
35
|
-
* Decompresses combined operation using a proper compressor.
|
|
36
|
-
*
|
|
37
|
-
* @param data Data to compress.
|
|
38
|
-
* @returns Decompressed operation in JSON format.
|
|
39
|
-
*/
|
|
40
|
-
protected abstract _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
41
|
-
/**
|
|
42
|
-
* Combine next operation into the combined one.
|
|
43
|
-
*
|
|
44
|
-
* @param nextOperation Operation to combine in JSON format.
|
|
45
|
-
* @param combined Combined operation in JSON format.
|
|
46
|
-
* @returns Combined operation in JSON format.
|
|
47
|
-
*/
|
|
48
|
-
protected abstract _combineNext(nextOperation: any, combined: any): any;
|
|
49
|
-
/**
|
|
50
|
-
* Split operation from combined one.
|
|
51
|
-
*
|
|
52
|
-
* @param combined Combined operation in JSON format.
|
|
53
|
-
* @returns Split operation in JSON format.
|
|
54
|
-
*/
|
|
55
|
-
protected abstract _splitCurrent(combined: any): any;
|
|
56
|
-
/**
|
|
57
|
-
* Checks if two operations can be combined.
|
|
58
|
-
*/
|
|
59
|
-
protected abstract _compareOperations(opA: any, opB: any): boolean;
|
|
60
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, 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 { CompressedOperationsData, default as Compressor } from '../compressor';
|
|
6
|
+
/**
|
|
7
|
+
* * Compresses and decompresses multiple operations into the one buffer.
|
|
8
|
+
*/
|
|
9
|
+
export default abstract class ActionCompressor {
|
|
10
|
+
constructor(id: number, context: Compressor);
|
|
11
|
+
/**
|
|
12
|
+
* Combines and compress operations from the list.
|
|
13
|
+
* Operations are consumed as long as match this compressor.
|
|
14
|
+
*
|
|
15
|
+
* @param result Object to which compression result should be added.
|
|
16
|
+
* @param operations List of operations in JSON format to compress.
|
|
17
|
+
* @returns `true` when operation is consumed `false` otherwise.
|
|
18
|
+
*/
|
|
19
|
+
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Decompress and split compressed operations. Decompressed operations are consumed (removed from the input data).
|
|
22
|
+
*
|
|
23
|
+
* @param result Decompressed operations in JSON format.
|
|
24
|
+
* @param data Compressed operations data.
|
|
25
|
+
*/
|
|
26
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
27
|
+
/**
|
|
28
|
+
* Compresses single operation using a proper compressor.
|
|
29
|
+
*
|
|
30
|
+
* @param operation Operation in JSON format.
|
|
31
|
+
* @returns Operation JSON compressed to the binary format.
|
|
32
|
+
*/
|
|
33
|
+
protected abstract _compressSingleOperation(operation: any): Uint8Array;
|
|
34
|
+
/**
|
|
35
|
+
* Decompresses combined operation using a proper compressor.
|
|
36
|
+
*
|
|
37
|
+
* @param data Data to compress.
|
|
38
|
+
* @returns Decompressed operation in JSON format.
|
|
39
|
+
*/
|
|
40
|
+
protected abstract _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
41
|
+
/**
|
|
42
|
+
* Combine next operation into the combined one.
|
|
43
|
+
*
|
|
44
|
+
* @param nextOperation Operation to combine in JSON format.
|
|
45
|
+
* @param combined Combined operation in JSON format.
|
|
46
|
+
* @returns Combined operation in JSON format.
|
|
47
|
+
*/
|
|
48
|
+
protected abstract _combineNext(nextOperation: any, combined: any): any;
|
|
49
|
+
/**
|
|
50
|
+
* Split operation from combined one.
|
|
51
|
+
*
|
|
52
|
+
* @param combined Combined operation in JSON format.
|
|
53
|
+
* @returns Split operation in JSON format.
|
|
54
|
+
*/
|
|
55
|
+
protected abstract _splitCurrent(combined: any): any;
|
|
56
|
+
/**
|
|
57
|
+
* Checks if two operations can be combined.
|
|
58
|
+
*/
|
|
59
|
+
protected abstract _compareOperations(opA: any, opB: any): boolean;
|
|
60
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4311=['types','buffers','compress','_context','_decompressSingleOperation','_splitCurrent','_id','length','_compareOperations','shift','push','_combineNext'];(function(_0xaeaee6,_0x4311ab){const _0x1a6ef6=function(_0x45ef6e){while(--_0x45ef6e){_0xaeaee6['push'](_0xaeaee6['shift']());}};_0x1a6ef6(++_0x4311ab);}(_0x4311,0x91));const _0x1a6e=function(_0xaeaee6,_0x4311ab){_0xaeaee6=_0xaeaee6-0x0;let _0x1a6ef6=_0x4311[_0xaeaee6];return _0x1a6ef6;};import{cloneDeep as _0x5eb656}from'lodash-es';export default class b{constructor(_0x1b9562,_0xe54fbe){this['_id']=_0x1b9562,this[_0x1a6e('0x2')]=_0xe54fbe;}[_0x1a6e('0x1')](_0x494197,_0x5b9ae4){let _0xd49b01;for(;_0x5b9ae4[_0x1a6e('0x6')]>0x1&&this[_0x1a6e('0x7')](_0x5b9ae4[0x0],_0x5b9ae4[0x1]);)_0xd49b01?(_0xd49b01=this[_0x1a6e('0xa')](_0x5b9ae4[_0x1a6e('0x8')](),_0xd49b01),_0x494197[_0x1a6e('0xb')][_0x1a6e('0x9')](0x0)):(_0xd49b01=_0x5eb656(_0x5b9ae4[_0x1a6e('0x8')]()),_0x494197[_0x1a6e('0xb')][_0x1a6e('0x9')](this[_0x1a6e('0x5')]));return!!_0xd49b01&&(_0xd49b01=this[_0x1a6e('0xa')](_0x5b9ae4['shift'](),_0xd49b01),_0x494197[_0x1a6e('0xb')]['push'](0x0),_0x494197[_0x1a6e('0x0')][_0x1a6e('0x9')](this['_compressSingleOperation'](_0xd49b01)),!0x0);}['decompress'](_0x203d47,_0x5b06b1){const _0x727e99=this[_0x1a6e('0x3')](_0x5b06b1);for(;0x0==_0x5b06b1[_0x1a6e('0xb')][0x0];)_0x5b06b1[_0x1a6e('0xb')][_0x1a6e('0x8')](),_0x203d47[_0x1a6e('0x9')](this[_0x1a6e('0x4')](_0x727e99));_0x203d47[_0x1a6e('0x9')](_0x727e99);}}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
-
export default class DeletingActionCompressor extends ActionCompressor {
|
|
8
|
-
/**
|
|
9
|
-
* @inheritDoc
|
|
10
|
-
*/
|
|
11
|
-
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _splitCurrent(combined: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
+
export default class DeletingActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _splitCurrent(combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2ed6=['_combineNext','sourcePosition','_getCompressorByName','_context','_compareOperations','root','_checkOperation','$graveyard','MoveOperation','decompress','_splitCurrent','targetPosition','compress','wasUndone','__className','howMany'];(function(_0x129133,_0x2ed6c5){const _0x2692ed=function(_0x4e0c7d){while(--_0x4e0c7d){_0x129133['push'](_0x129133['shift']());}};_0x2692ed(++_0x2ed6c5);}(_0x2ed6,0xb2));const _0x2692=function(_0x129133,_0x2ed6c5){_0x129133=_0x129133-0x0;let _0x2692ed=_0x2ed6[_0x129133];return _0x2692ed;};import _0x40e73f from'./actioncompressor';import{arePositionsEqual as _0x107c24,getPositionShiftedBy as _0x2c9db6}from'../utils';import{cloneDeep as _0xd78ea4}from'lodash-es';export default class c extends _0x40e73f{[_0x2692('0xe')](_0x4910b1,_0x486d20){return _0x486d20[_0x2692('0xd')]++,_0x486d20[_0x2692('0xf')]=_0xd78ea4(_0x4910b1['sourcePosition']),_0x486d20;}[_0x2692('0x8')](_0x54a8ad){const _0xb15582=_0xd78ea4(_0x54a8ad);return _0x54a8ad[_0x2692('0xd')]--,_0xb15582[_0x2692('0xd')]=0x1,_0xb15582['sourcePosition']=_0x2c9db6(_0xb15582['sourcePosition'],_0x54a8ad['howMany']),_0xb15582;}[_0x2692('0x2')](_0x21549b,_0x871ee7){return!(!this['_checkOperation'](_0x21549b)||!this[_0x2692('0x4')](_0x871ee7))&&(_0x107c24(_0x2c9db6(_0x21549b[_0x2692('0xf')],-0x1),_0x871ee7[_0x2692('0xf')])&&_0x107c24(_0x21549b[_0x2692('0x9')],_0x871ee7['targetPosition']));}['_compressSingleOperation'](_0x35bc66){const _0x29c154={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x2692('0x1')][_0x2692('0x0')](_0x2692('0x6'))[_0x2692('0xa')](_0x29c154,[_0x35bc66]),_0x29c154['buffers'][0x0];}['_decompressSingleOperation'](_0x17b1ed){const _0x2a4263=[];return this[_0x2692('0x1')][_0x2692('0x0')]('MoveOperation')[_0x2692('0x7')](_0x2a4263,_0x17b1ed),_0x2a4263[0x0];}[_0x2692('0x4')](_0x4bc689){return _0x2692('0x6')==_0x4bc689[_0x2692('0xc')]&&_0x2692('0x5')==_0x4bc689[_0x2692('0x9')][_0x2692('0x3')]&&0x1==_0x4bc689[_0x2692('0xd')]&&!_0x4bc689[_0x2692('0xb')];}}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
-
export default class ForwardDeletingActionCompressor extends ActionCompressor {
|
|
8
|
-
/**
|
|
9
|
-
* @inheritDoc
|
|
10
|
-
*/
|
|
11
|
-
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _splitCurrent(combined: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
+
export default class ForwardDeletingActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _splitCurrent(combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0xb4cd=['wasUndone','_compareOperations','_context','_getCompressorByName','__className','root','_compressSingleOperation','MoveOperation','decompress','_checkOperation','sourcePosition','_decompressSingleOperation','compress','howMany','targetPosition'];(function(_0x192fd7,_0xb4cd40){const _0x267200=function(_0x5d3e5e){while(--_0x5d3e5e){_0x192fd7['push'](_0x192fd7['shift']());}};_0x267200(++_0xb4cd40);}(_0xb4cd,0x6a));const _0x2672=function(_0x192fd7,_0xb4cd40){_0x192fd7=_0x192fd7-0x0;let _0x267200=_0xb4cd[_0x192fd7];return _0x267200;};import _0x4957f4 from'./actioncompressor';import{arePositionsEqual as _0x2c6b61}from'../utils';import{cloneDeep as _0x18e53e}from'lodash-es';export default class h extends _0x4957f4{['_combineNext'](_0xf01d0c,_0x30e693){return _0x30e693[_0x2672('0xc')]++,_0x30e693;}['_splitCurrent'](_0x2c786b){const _0x400dda=_0x18e53e(_0x2c786b);return _0x400dda[_0x2672('0xc')]=0x1,_0x2c786b[_0x2672('0xc')]--,_0x400dda;}[_0x2672('0x0')](_0x568b62,_0x55b96d){return!(!this['_checkOperation'](_0x568b62)||!this['_checkOperation'](_0x55b96d))&&(_0x2c6b61(_0x568b62[_0x2672('0x9')],_0x55b96d[_0x2672('0x9')])&&_0x2c6b61(_0x568b62['targetPosition'],_0x55b96d[_0x2672('0xd')]));}[_0x2672('0x5')](_0x264ae6){const _0x1fcf37={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x2672('0x1')]['_getCompressorByName'](_0x2672('0x6'))[_0x2672('0xb')](_0x1fcf37,[_0x264ae6]),_0x1fcf37['buffers'][0x0];}[_0x2672('0xa')](_0x1fc1e3){const _0x1d8c54=[];return this[_0x2672('0x1')][_0x2672('0x2')](_0x2672('0x6'))[_0x2672('0x7')](_0x1d8c54,_0x1fc1e3),_0x1d8c54[0x0];}[_0x2672('0x8')](_0x3dd404){return _0x2672('0x6')==_0x3dd404[_0x2672('0x3')]&&'$graveyard'==_0x3dd404['targetPosition'][_0x2672('0x4')]&&0x1==_0x3dd404[_0x2672('0xc')]&&!_0x3dd404[_0x2672('0xe')];}}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
-
export default class TypingActionCompressor extends ActionCompressor {
|
|
8
|
-
/**
|
|
9
|
-
* @inheritDocs
|
|
10
|
-
*/
|
|
11
|
-
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _splitCurrent(combined: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
+
export default class TypingActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDocs
|
|
10
|
+
*/
|
|
11
|
+
protected _combineNext(nextOperation: any, combined: any): any;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
protected _splitCurrent(combined: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
protected _compareOperations(opA: any, opB: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
protected _compressSingleOperation(operation: any): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
protected _decompressSingleOperation(data: CompressedOperationsData): any;
|
|
28
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x451e=['_combineNext','compress','keys','position','wasUndone','length','_decompressSingleOperation','_compressSingleOperation','_compareOperations','next','_checkOperation','attributes','_compareAttributes','nodes','_context','__className','substr','decompress','InsertOperation','data','from','_getCompressorByName'];(function(_0x230d6c,_0x451e63){const _0xf1eb25=function(_0x5f1225){while(--_0x5f1225){_0x230d6c['push'](_0x230d6c['shift']());}};_0xf1eb25(++_0x451e63);}(_0x451e,0xf7));const _0xf1eb=function(_0x230d6c,_0x451e63){_0x230d6c=_0x230d6c-0x0;let _0xf1eb25=_0x451e[_0x230d6c];return _0xf1eb25;};import _0x54e4a9 from'./actioncompressor';import{arePositionsEqual as _0x14093b,getPositionShiftedBy as _0x176401}from'../utils';import{cloneDeep as _0xad6e31}from'lodash-es';export default class m extends _0x54e4a9{[_0xf1eb('0x11')](_0x47fb04,_0xd72c4b){return _0xd72c4b[_0xf1eb('0x8')][0x0][_0xf1eb('0xe')]+=_0x47fb04[_0xf1eb('0x8')][0x0][_0xf1eb('0xe')],_0xd72c4b;}['_splitCurrent'](_0x547547){const _0x434aa5=_0xad6e31(_0x547547),_0x397d37=_0x434aa5[_0xf1eb('0x8')][0x0],_0x301abf=_0x547547[_0xf1eb('0x8')][0x0],_0x279686=_0x301abf[_0xf1eb('0xe')][Symbol['iterator']]()[_0xf1eb('0x4')]()['value'],_0x187384=_0x279686[_0xf1eb('0x0')];return _0x397d37[_0xf1eb('0xe')]=_0x279686,_0x301abf[_0xf1eb('0xe')]=_0x301abf[_0xf1eb('0xe')][_0xf1eb('0xb')](_0x187384),_0x547547[_0xf1eb('0x14')]=_0x176401(_0x547547[_0xf1eb('0x14')],_0x187384),_0x434aa5;}[_0xf1eb('0x3')](_0xf00abb,_0x509e1b){if(this['_checkOperation'](_0xf00abb)&&this[_0xf1eb('0x5')](_0x509e1b)){const _0x1033be=_0xf00abb[_0xf1eb('0x8')][0x0][_0xf1eb('0xe')][_0xf1eb('0x0')],_0x442fe3=_0x14093b(_0x176401(_0xf00abb[_0xf1eb('0x14')],_0x1033be),_0x509e1b[_0xf1eb('0x14')]),_0x50f5c5=_0xf00abb[_0xf1eb('0x8')][0x0],_0x430edc=_0x509e1b[_0xf1eb('0x8')][0x0];return _0x442fe3&&this[_0xf1eb('0x7')](_0x50f5c5,_0x430edc);}return!0x1;}[_0xf1eb('0x2')](_0x50b5c3){const _0x1891d5={'types':[],'buffers':[],'baseVersion':0x0};return this[_0xf1eb('0x9')][_0xf1eb('0x10')]('InsertOperation')[_0xf1eb('0x12')](_0x1891d5,[_0x50b5c3]),_0x1891d5['buffers'][0x0];}[_0xf1eb('0x1')](_0x5006a7){const _0x457139=[];return this['_context'][_0xf1eb('0x10')](_0xf1eb('0xd'))[_0xf1eb('0xc')](_0x457139,_0x5006a7),_0x457139[0x0];}['_checkOperation'](_0x13c28b){return _0xf1eb('0xd')==_0x13c28b[_0xf1eb('0xa')]&&0x1==_0x13c28b['nodes']['length']&&_0x13c28b['nodes'][0x0][_0xf1eb('0xe')]&&!_0x13c28b[_0xf1eb('0x15')]&&0x1==Array[_0xf1eb('0xf')](_0x13c28b[_0xf1eb('0x8')][0x0][_0xf1eb('0xe')])[_0xf1eb('0x0')];}[_0xf1eb('0x7')](_0x2223dc,_0x45c41f){const _0x43b5f7=Object[_0xf1eb('0x13')](_0x2223dc[_0xf1eb('0x6')]||{}),_0x3f891d=Object[_0xf1eb('0x13')](_0x45c41f[_0xf1eb('0x6')]||{});return _0x43b5f7[_0xf1eb('0x0')]===_0x3f891d['length']&&_0x43b5f7['every'](_0x536b45=>_0x45c41f['attributes'][_0x536b45]&&_0x45c41f[_0xf1eb('0x6')][_0x536b45]===_0x2223dc[_0xf1eb('0x6')][_0x536b45]);}}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
-
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
-
export default class UserSelectionActionCompressor extends ActionCompressor {
|
|
8
|
-
/**
|
|
9
|
-
* @inheritDoc
|
|
10
|
-
*/
|
|
11
|
-
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
16
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, 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 ActionCompressor from './actioncompressor';
|
|
6
|
+
import type { CompressedOperationsData } from '../compressor';
|
|
7
|
+
export default class UserSelectionActionCompressor extends ActionCompressor {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
compress(result: CompressedOperationsData, operations: Array<any>): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
decompress(result: Array<any>, data: CompressedOperationsData): void;
|
|
16
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1b1d=['newRange','compress','split','toNone','buffers','startsWith','stickiness','_getCompressorByName','oldRange','__className','MarkerOperation','user:position:','name','start','types','end','_compressSingleOperation','_compareOperations','user:','decompress','_context','push','shift'];(function(_0x91cfda,_0x1b1dce){const _0x52d280=function(_0xbc336c){while(--_0xbc336c){_0x91cfda['push'](_0x91cfda['shift']());}};_0x52d280(++_0x1b1dce);}(_0x1b1d,0x8a));const _0x52d2=function(_0x91cfda,_0x1b1dce){_0x91cfda=_0x91cfda-0x0;let _0x52d280=_0x1b1d[_0x91cfda];return _0x52d280;};import _0x58ddf0 from'./actioncompressor';import{arePositionsEqual as _0x150dba}from'../utils';import{cloneDeep as _0x168330}from'lodash-es';export default class f extends _0x58ddf0{[_0x52d2('0x1')](_0x4612aa,_0x53b885){if(!this[_0x52d2('0x11')](_0x53b885[0x0],_0x53b885[0x1]))return!0x1;const _0x5503c5=_0x53b885[_0x52d2('0x16')]();return _0x5503c5[_0x52d2('0x8')]=null,_0x5503c5[_0x52d2('0x0')]&&_0x150dba(_0x5503c5['newRange'][_0x52d2('0xd')],_0x5503c5[_0x52d2('0x0')]['end'])&&(_0x5503c5[_0x52d2('0x0')]['end']=null),_0x53b885['shift'](),_0x4612aa[_0x52d2('0xe')][_0x52d2('0x15')](this['_id']),_0x4612aa[_0x52d2('0xe')][_0x52d2('0x15')](0x0),_0x4612aa['buffers']['push'](this[_0x52d2('0x10')](_0x5503c5)),!0x0;}['decompress'](_0x41c95f,_0xdf8ef0){const _0x41d565=this['_decompressSingleOperation'](_0xdf8ef0);_0x41d565[_0x52d2('0x0')]&&!_0x41d565[_0x52d2('0x0')][_0x52d2('0xf')]&&(_0x41d565[_0x52d2('0x0')][_0x52d2('0xf')]=_0x168330(_0x41d565[_0x52d2('0x0')]['start']));const _0x137d8d=_0x168330(_0x41d565);_0x137d8d[_0x52d2('0x0')]&&(_0x137d8d['newRange'][_0x52d2('0xd')][_0x52d2('0x6')]=_0x52d2('0x3'),_0x137d8d[_0x52d2('0x0')][_0x52d2('0xf')]=_0x168330(_0x137d8d[_0x52d2('0x0')][_0x52d2('0xd')])),_0x137d8d[_0x52d2('0xc')]=_0x52d2('0xb')+_0x137d8d['name'][_0x52d2('0x2')](':')[0x2],_0xdf8ef0[_0x52d2('0xe')][_0x52d2('0x16')](),_0x41c95f['push'](_0x41d565),_0x41c95f[_0x52d2('0x15')](_0x137d8d);}[_0x52d2('0x10')](_0x4f72ae){const _0x3d8314={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x52d2('0x14')]['_getCompressorByName']('MarkerOperation')[_0x52d2('0x1')](_0x3d8314,[_0x4f72ae]),_0x3d8314[_0x52d2('0x4')][0x0];}['_decompressSingleOperation'](_0x2917ad){const _0x5e4b1a=[];return this[_0x52d2('0x14')][_0x52d2('0x7')](_0x52d2('0xa'))[_0x52d2('0x13')](_0x5e4b1a,_0x2917ad),_0x5e4b1a[0x0];}[_0x52d2('0x11')](_0x4eff88,_0x17aa56){return!(!_0x4eff88||!_0x17aa56)&&(_0x52d2('0xa')==_0x4eff88[_0x52d2('0x9')]&&'MarkerOperation'==_0x17aa56[_0x52d2('0x9')]&&!(!_0x4eff88[_0x52d2('0xc')][_0x52d2('0x5')](_0x52d2('0x12'))||!_0x17aa56['name'][_0x52d2('0x5')](_0x52d2('0x12'))||_0x4eff88[_0x52d2('0xc')]==_0x17aa56[_0x52d2('0xc')]));}}
|