@ckeditor/ckeditor5-operations-compressor 38.2.0-alpha.1 → 39.0.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.
Files changed (33) hide show
  1. package/README.md +0 -1
  2. package/package.json +4 -4
  3. package/src/actioncompressor/actioncompressor.d.ts +5 -1
  4. package/src/actioncompressor/actioncompressor.js +2 -2
  5. package/src/actioncompressor/deletingactioncompressor.d.ts +6 -2
  6. package/src/actioncompressor/deletingactioncompressor.js +2 -2
  7. package/src/actioncompressor/forwarddeletingactioncompressor.d.ts +6 -2
  8. package/src/actioncompressor/forwarddeletingactioncompressor.js +2 -2
  9. package/src/actioncompressor/typingactioncompressor.d.ts +6 -2
  10. package/src/actioncompressor/typingactioncompressor.js +2 -2
  11. package/src/actioncompressor/userselectionactioncompressor.d.ts +6 -2
  12. package/src/actioncompressor/userselectionactioncompressor.js +2 -2
  13. package/src/compressor.d.ts +4 -0
  14. package/src/compressor.js +2 -2
  15. package/src/lib/compiledmessages.js +2 -2
  16. package/src/operationcompressor/annotationmarkeroperationcompressor.d.ts +8 -4
  17. package/src/operationcompressor/annotationmarkeroperationcompressor.js +2 -2
  18. package/src/operationcompressor/attributeoperationcompressor.d.ts +7 -3
  19. package/src/operationcompressor/attributeoperationcompressor.js +2 -2
  20. package/src/operationcompressor/insertoperationcompressor.d.ts +7 -3
  21. package/src/operationcompressor/insertoperationcompressor.js +2 -2
  22. package/src/operationcompressor/markeroperationcompressor.d.ts +7 -3
  23. package/src/operationcompressor/markeroperationcompressor.js +2 -2
  24. package/src/operationcompressor/nooperationcompressor.d.ts +7 -3
  25. package/src/operationcompressor/nooperationcompressor.js +2 -2
  26. package/src/operationcompressor/operationcompressor.d.ts +7 -3
  27. package/src/operationcompressor/operationcompressor.js +2 -2
  28. package/src/protobufdescriptions.d.ts +2 -10
  29. package/src/protobufdescriptions.js +2 -2
  30. package/src/protobuffactory.d.ts +4 -0
  31. package/src/protobuffactory.js +2 -2
  32. package/src/utils.d.ts +4 -0
  33. package/src/utils.js +2 -2
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3c55=['compress','parse','stringify','buffers','every','_protobufDescriptor','children','attributes','attributesBoolean','nodes','__className','_deserializeNodesAttributes','boolean','keys','push','_serializeNodesAttributes','_areValuesBoolean','attributesJson','types','_id','decompress','shift','_operationName'];(function(_0xb09f96,_0x3c55d1){const _0x468a27=function(_0x9f60e0){while(--_0x9f60e0){_0xb09f96['push'](_0xb09f96['shift']());}};_0x468a27(++_0x3c55d1);}(_0x3c55,0x92));const _0x468a=function(_0xb09f96,_0x3c55d1){_0xb09f96=_0xb09f96-0x0;let _0x468a27=_0x3c55[_0xb09f96];return _0x468a27;};import _0x4f2f25 from'./operationcompressor.js';import{parsePositionBeforeCompression as _0x582970,parsePositionAfterCompression as _0x40d1ee}from'../utils.js';export default class i extends _0x4f2f25{[_0x468a('0xf')](_0x4f3017,_0x1f552e){const _0x5c50f9=_0x1f552e['shift']();return this[_0x468a('0x7')](_0x5c50f9[_0x468a('0x1')]),_0x582970(_0x5c50f9),_0x4f3017[_0x468a('0x12')][_0x468a('0x6')](this['_protobufDescriptor']['compress'](_0x5c50f9)),_0x4f3017[_0x468a('0xa')][_0x468a('0x6')](this[_0x468a('0xb')]),!0x0;}[_0x468a('0xc')](_0x5344ad,_0x36a26b){const {types:_0x3b5050,buffers:_0x5b8003}=_0x36a26b,_0x561747=this[_0x468a('0x14')]['decompress'](_0x5b8003['shift']());_0x3b5050[_0x468a('0xd')](),_0x561747[_0x468a('0x1')]||(_0x561747[_0x468a('0x1')]=[]),this['_deserializeNodesAttributes'](_0x561747['nodes']),_0x40d1ee(_0x561747),_0x561747[_0x468a('0x2')]=this[_0x468a('0xe')],_0x5344ad[_0x468a('0x6')](_0x561747);}[_0x468a('0x7')](_0x40e6f2){for(const _0x38dec3 of _0x40e6f2){if(_0x38dec3['attributes']){const _0x50453d=_0x38dec3['attributes'];this['_areValuesBoolean'](_0x50453d)?_0x38dec3[_0x468a('0x0')]=_0x50453d:_0x38dec3[_0x468a('0x9')]=JSON[_0x468a('0x11')](_0x50453d);}_0x38dec3[_0x468a('0x15')]&&this[_0x468a('0x7')](_0x38dec3[_0x468a('0x15')]);}}[_0x468a('0x3')](_0x279c7a){for(const _0x3d37e2 of _0x279c7a)(_0x3d37e2[_0x468a('0x0')]||_0x3d37e2[_0x468a('0x9')])&&(_0x3d37e2[_0x468a('0x0')]?(_0x3d37e2[_0x468a('0x16')]=_0x3d37e2[_0x468a('0x0')],delete _0x3d37e2[_0x468a('0x0')]):(_0x3d37e2[_0x468a('0x16')]=JSON[_0x468a('0x10')](_0x3d37e2['attributesJson']),delete _0x3d37e2[_0x468a('0x9')])),_0x3d37e2[_0x468a('0x15')]&&this[_0x468a('0x3')](_0x3d37e2[_0x468a('0x15')]);}[_0x468a('0x8')](_0x54608c){return Object[_0x468a('0x5')](_0x54608c)[_0x468a('0x13')](_0x427147=>_0x468a('0x4')==typeof _0x54608c[_0x427147]);}}
23
+ const _0x203a=['_id','_operationName','_serializeNodesAttributes','buffers','decompress','__className','compress','push','shift','stringify','every','_protobufDescriptor','children','nodes','types','attributes','_areValuesBoolean','keys','attributesJson','attributesBoolean','_deserializeNodesAttributes','boolean'];(function(_0x51c695,_0x203a4b){const _0x354830=function(_0xe6611e){while(--_0xe6611e){_0x51c695['push'](_0x51c695['shift']());}};_0x354830(++_0x203a4b);}(_0x203a,0x1bb));const _0x3548=function(_0x51c695,_0x203a4b){_0x51c695=_0x51c695-0x0;let _0x354830=_0x203a[_0x51c695];return _0x354830;};import _0x316593 from'./operationcompressor';import{parsePositionBeforeCompression as _0x2e95d6,parsePositionAfterCompression as _0x52843f}from'../utils';export default class s extends _0x316593{[_0x3548('0x3')](_0x4a7a2a,_0x2e6ed0){const _0x3422e8=_0x2e6ed0[_0x3548('0x5')]();return this[_0x3548('0x15')](_0x3422e8[_0x3548('0xa')]),_0x2e95d6(_0x3422e8),_0x4a7a2a[_0x3548('0x0')]['push'](this['_protobufDescriptor'][_0x3548('0x3')](_0x3422e8)),_0x4a7a2a[_0x3548('0xb')][_0x3548('0x4')](this[_0x3548('0x13')]),!0x0;}[_0x3548('0x1')](_0x515a7a,_0x1375c3){const {types:_0x224ddf,buffers:_0x529161}=_0x1375c3,_0x13fea6=this[_0x3548('0x8')]['decompress'](_0x529161['shift']());_0x224ddf['shift'](),_0x13fea6['nodes']||(_0x13fea6[_0x3548('0xa')]=[]),this[_0x3548('0x11')](_0x13fea6[_0x3548('0xa')]),_0x52843f(_0x13fea6),_0x13fea6[_0x3548('0x2')]=this[_0x3548('0x14')],_0x515a7a[_0x3548('0x4')](_0x13fea6);}[_0x3548('0x15')](_0x5d4f23){for(const _0xa522f1 of _0x5d4f23){if(_0xa522f1[_0x3548('0xc')]){const _0x470df5=_0xa522f1['attributes'];this[_0x3548('0xd')](_0x470df5)?_0xa522f1[_0x3548('0x10')]=_0x470df5:_0xa522f1[_0x3548('0xf')]=JSON[_0x3548('0x6')](_0x470df5);}_0xa522f1[_0x3548('0x9')]&&this[_0x3548('0x15')](_0xa522f1[_0x3548('0x9')]);}}['_deserializeNodesAttributes'](_0x1a4633){for(const _0xec175d of _0x1a4633)(_0xec175d[_0x3548('0x10')]||_0xec175d[_0x3548('0xf')])&&(_0xec175d[_0x3548('0x10')]?(_0xec175d[_0x3548('0xc')]=_0xec175d['attributesBoolean'],delete _0xec175d['attributesBoolean']):(_0xec175d[_0x3548('0xc')]=JSON['parse'](_0xec175d[_0x3548('0xf')]),delete _0xec175d[_0x3548('0xf')])),_0xec175d['children']&&this['_deserializeNodesAttributes'](_0xec175d[_0x3548('0x9')]);}[_0x3548('0xd')](_0x56a616){return Object[_0x3548('0xe')](_0x56a616)[_0x3548('0x7')](_0xc420ea=>_0x3548('0x12')==typeof _0x56a616[_0xc420ea]);}}
@@ -1,6 +1,10 @@
1
- import OperationCompressor from './operationcompressor.js';
2
- import type { CompressedOperationsData } from '../compressor.js';
3
- import type { MarkerOperation } from 'ckeditor5/src/engine.js';
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 OperationCompressor from './operationcompressor';
6
+ import type { CompressedOperationsData } from '../compressor';
7
+ import type { MarkerOperation } from 'ckeditor5/src/engine';
4
8
  export default class MarkerOperationCompressor extends OperationCompressor {
5
9
  /**
6
10
  * @inheritDoc
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x579d=['length','decompress','oldRange','newRange'];(function(_0x2b7873,_0x579db5){const _0x37b2a9=function(_0x58e502){while(--_0x58e502){_0x2b7873['push'](_0x2b7873['shift']());}};_0x37b2a9(++_0x579db5);}(_0x579d,0x11a));const _0x37b2=function(_0x2b7873,_0x579db5){_0x2b7873=_0x2b7873-0x0;let _0x37b2a9=_0x579d[_0x2b7873];return _0x37b2a9;};import _0x5721d6 from'./operationcompressor.js';export default class n extends _0x5721d6{[_0x37b2('0x3')](_0x12a974,_0x1017c8){super[_0x37b2('0x3')](_0x12a974,_0x1017c8);const _0x518404=_0x12a974[_0x12a974[_0x37b2('0x2')]-0x1];_0x518404[_0x37b2('0x0')]||(_0x518404[_0x37b2('0x0')]=null),_0x518404[_0x37b2('0x1')]||(_0x518404[_0x37b2('0x1')]=null);}}
23
+ const _0x10f1=['oldRange','decompress','newRange','length'];(function(_0x2ffaea,_0x10f155){const _0x6a4a24=function(_0x158905){while(--_0x158905){_0x2ffaea['push'](_0x2ffaea['shift']());}};_0x6a4a24(++_0x10f155);}(_0x10f1,0x12d));const _0x6a4a=function(_0x2ffaea,_0x10f155){_0x2ffaea=_0x2ffaea-0x0;let _0x6a4a24=_0x10f1[_0x2ffaea];return _0x6a4a24;};import _0x123e03 from'./operationcompressor';export default class n extends _0x123e03{[_0x6a4a('0x0')](_0x2eca1c,_0x10c256){super[_0x6a4a('0x0')](_0x2eca1c,_0x10c256);const _0x3b5b81=_0x2eca1c[_0x2eca1c[_0x6a4a('0x2')]-0x1];_0x3b5b81[_0x6a4a('0x3')]||(_0x3b5b81[_0x6a4a('0x3')]=null),_0x3b5b81['newRange']||(_0x3b5b81[_0x6a4a('0x1')]=null);}}
@@ -1,6 +1,10 @@
1
- import OperationCompressor from './operationcompressor.js';
2
- import type { CompressedOperationsData } from '../compressor.js';
3
- import type { Operation } from 'ckeditor5/src/engine.js';
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 OperationCompressor from './operationcompressor';
6
+ import type { CompressedOperationsData } from '../compressor';
7
+ import type { Operation } from 'ckeditor5/src/engine';
4
8
  /**
5
9
  * @extends OperationCompressor
6
10
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x34d2=['_id','shift','_operationName','push','compress','types'];(function(_0x2a9bb6,_0x34d244){var _0x577d4b=function(_0x9d5b06){while(--_0x9d5b06){_0x2a9bb6['push'](_0x2a9bb6['shift']());}};_0x577d4b(++_0x34d244);}(_0x34d2,0x117));var _0x577d=function(_0x2a9bb6,_0x34d244){_0x2a9bb6=_0x2a9bb6-0x0;var _0x577d4b=_0x34d2[_0x2a9bb6];return _0x577d4b;};import _0x57446e from'./operationcompressor.js';export default class p extends _0x57446e{[_0x577d('0x1')](_0x1c0e43,_0x17ac72){return _0x17ac72[_0x577d('0x4')](),_0x1c0e43['types']['push'](this[_0x577d('0x3')]),!0x0;}['decompress'](_0xfe446a,_0x1b6387){_0x1b6387[_0x577d('0x2')][_0x577d('0x4')](),_0xfe446a[_0x577d('0x0')]({'__className':this[_0x577d('0x5')]});}}
23
+ var _0xb653=['push','types','_id','compress','shift'];(function(_0x57ba30,_0xb653fc){var _0x5b8818=function(_0x4dbf2b){while(--_0x4dbf2b){_0x57ba30['push'](_0x57ba30['shift']());}};_0x5b8818(++_0xb653fc);}(_0xb653,0x1d4));var _0x5b88=function(_0x57ba30,_0xb653fc){_0x57ba30=_0x57ba30-0x0;var _0x5b8818=_0xb653[_0x57ba30];return _0x5b8818;};import _0x2beca3 from'./operationcompressor';export default class p extends _0x2beca3{[_0x5b88('0x0')](_0xa8cad5,_0x589932){return _0x589932[_0x5b88('0x1')](),_0xa8cad5[_0x5b88('0x3')][_0x5b88('0x2')](this[_0x5b88('0x4')]),!0x0;}['decompress'](_0x3d65a7,_0x9ba0ac){_0x9ba0ac[_0x5b88('0x3')][_0x5b88('0x1')](),_0x3d65a7[_0x5b88('0x2')]({'__className':this['_operationName']});}}
@@ -1,6 +1,10 @@
1
- import type { CompressedOperationsData } from '../compressor.js';
2
- import type { ProtobufDescriptor } from '../protobuffactory.js';
3
- import type { Operation } from 'ckeditor5/src/engine.js';
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 } from '../compressor';
6
+ import type { ProtobufDescriptor } from '../protobuffactory';
7
+ import type { Operation } from 'ckeditor5/src/engine';
4
8
  /**
5
9
  * Compresses and decompresses single operation to the binary format.
6
10
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2535=['__className','decompress','_operationName','push','_id','compress','shift','buffers','types','_protobufDescriptor'];(function(_0x37b82a,_0x2535e0){const _0x3e2a90=function(_0x5d90f0){while(--_0x5d90f0){_0x37b82a['push'](_0x37b82a['shift']());}};_0x3e2a90(++_0x2535e0);}(_0x2535,0x14e));const _0x3e2a=function(_0x37b82a,_0x2535e0){_0x37b82a=_0x37b82a-0x0;let _0x3e2a90=_0x2535[_0x37b82a];return _0x3e2a90;};import{parsePositionBeforeCompression as _0xb7c10f,parsePositionAfterCompression as _0x1e3ce3}from'../utils.js';export default class e{constructor(_0xfe7187,_0x1b90f0,_0x19dc6f){this['_id']=_0xfe7187,this[_0x3e2a('0x8')]=_0x1b90f0,this[_0x3e2a('0x5')]=_0x19dc6f;}[_0x3e2a('0x1')](_0x5621d2,_0x5e04bd){const _0x23c575=_0x5e04bd[_0x3e2a('0x2')]();return _0xb7c10f(_0x23c575),_0x5621d2[_0x3e2a('0x3')]['push'](this[_0x3e2a('0x5')][_0x3e2a('0x1')](_0x23c575)),_0x5621d2[_0x3e2a('0x4')]['push'](this[_0x3e2a('0x0')]),!0x0;}['decompress'](_0xb0847e,_0x13f284){_0x13f284[_0x3e2a('0x4')][_0x3e2a('0x2')]();const _0x5c608a=this['_protobufDescriptor'][_0x3e2a('0x7')](_0x13f284['buffers'][_0x3e2a('0x2')]());_0x1e3ce3(_0x5c608a),_0x5c608a[_0x3e2a('0x6')]=this[_0x3e2a('0x8')],_0xb0847e[_0x3e2a('0x9')](_0x5c608a);}}
23
+ const _0x4486=['buffers','shift','_id','push','_operationName','types','decompress','_protobufDescriptor','compress'];(function(_0x3201af,_0x4486b9){const _0x2a525c=function(_0x4d0361){while(--_0x4d0361){_0x3201af['push'](_0x3201af['shift']());}};_0x2a525c(++_0x4486b9);}(_0x4486,0x136));const _0x2a52=function(_0x3201af,_0x4486b9){_0x3201af=_0x3201af-0x0;let _0x2a525c=_0x4486[_0x3201af];return _0x2a525c;};import{parsePositionBeforeCompression as _0x3ac857,parsePositionAfterCompression as _0x48db58}from'../utils';export default class e{constructor(_0x5452d4,_0x48edb0,_0x492f01){this[_0x2a52('0x7')]=_0x5452d4,this[_0x2a52('0x0')]=_0x48edb0,this[_0x2a52('0x3')]=_0x492f01;}[_0x2a52('0x4')](_0x1aa7ad,_0x2a6649){const _0xb9ab46=_0x2a6649[_0x2a52('0x6')]();return _0x3ac857(_0xb9ab46),_0x1aa7ad[_0x2a52('0x5')][_0x2a52('0x8')](this[_0x2a52('0x3')][_0x2a52('0x4')](_0xb9ab46)),_0x1aa7ad[_0x2a52('0x1')][_0x2a52('0x8')](this['_id']),!0x0;}[_0x2a52('0x2')](_0x165f1c,_0x3e6928){_0x3e6928[_0x2a52('0x1')]['shift']();const _0x36f29a=this[_0x2a52('0x3')][_0x2a52('0x2')](_0x3e6928[_0x2a52('0x5')]['shift']());_0x48db58(_0x36f29a),_0x36f29a['__className']=this[_0x2a52('0x0')],_0x165f1c['push'](_0x36f29a);}}
@@ -1,12 +1,4 @@
1
1
  /**
2
- * Descriptions used by protobuf.
3
- *
4
- * If something fails regarding operations serialization, most probably you forgot to update and recompile protobuf descriptions.
5
- *
6
- * Change the below descriptions accordingly to changes done to the data that is compressed.
7
- * Then, rebuild compiled messages. To do that run `node dev/scripts/compilemessages.js` from main directory.
8
- *
9
- * If you added a new operation type, add it also in `compressor.ts`.
10
- *
11
- * Make sure that the new `compiledmessages.js` is pushed to GH repository.
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
12
4
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x2c82=['bool','string','repeated','Range','uint32','Position','exports'];(function(_0x5182dd,_0x2c824a){var _0x19ef8d=function(_0x5c3812){while(--_0x5c3812){_0x5182dd['push'](_0x5182dd['shift']());}};_0x19ef8d(++_0x2c824a);}(_0x2c82,0x1ba));var _0x19ef=function(_0x5182dd,_0x2c824a){_0x5182dd=_0x5182dd-0x0;var _0x19ef8d=_0x2c82[_0x5182dd];return _0x19ef8d;};'use strict';module[_0x19ef('0x5')]={'AttributeOperation':{'fields':{'range':{'type':'Range','id':0x1},'key':{'type':_0x19ef('0x0'),'id':0x2},'oldValueBoolean':{'type':_0x19ef('0x6'),'id':0x3},'oldValueJson':{'type':_0x19ef('0x0'),'id':0x4},'newValueBoolean':{'type':_0x19ef('0x6'),'id':0x5},'newValueJson':{'type':_0x19ef('0x0'),'id':0x6},'wasUndone':{'type':_0x19ef('0x6'),'id':0x7}}},'InsertOperation':{'fields':{'position':{'type':_0x19ef('0x4'),'id':0x1},'nodes':{'rule':'repeated','type':'Element','id':0x2},'shouldReceiveAttributes':{'type':'bool','id':0x3},'wasUndone':{'type':_0x19ef('0x6'),'id':0x4}}},'MarkerOperation':{'fields':{'name':{'type':_0x19ef('0x0'),'id':0x1},'oldRange':{'type':'Range','id':0x2},'newRange':{'type':_0x19ef('0x2'),'id':0x3},'affectsData':{'type':_0x19ef('0x6'),'id':0x4},'wasUndone':{'type':_0x19ef('0x6'),'id':0x5}}},'MergeOperation':{'fields':{'sourcePosition':{'type':_0x19ef('0x4'),'id':0x1},'targetPosition':{'type':_0x19ef('0x4'),'id':0x2},'graveyardPosition':{'type':'Position','id':0x3},'howMany':{'type':_0x19ef('0x3'),'id':0x4},'wasUndone':{'type':_0x19ef('0x6'),'id':0x5}}},'MoveOperation':{'fields':{'sourcePosition':{'type':'Position','id':0x1},'howMany':{'type':_0x19ef('0x3'),'id':0x2},'targetPosition':{'type':'Position','id':0x3},'wasUndone':{'type':_0x19ef('0x6'),'id':0x4}}},'RenameOperation':{'fields':{'position':{'type':_0x19ef('0x4'),'id':0x1},'oldName':{'type':_0x19ef('0x0'),'id':0x2},'newName':{'type':_0x19ef('0x0'),'id':0x3},'wasUndone':{'type':_0x19ef('0x6'),'id':0x4}}},'RootAttributeOperation':{'fields':{'root':{'type':_0x19ef('0x0'),'id':0x1},'key':{'type':'string','id':0x2},'oldValueBoolean':{'type':_0x19ef('0x6'),'id':0x3},'oldValueJson':{'type':_0x19ef('0x0'),'id':0x4},'newValueBoolean':{'type':_0x19ef('0x6'),'id':0x5},'newValueJson':{'type':_0x19ef('0x0'),'id':0x6},'wasUndone':{'type':_0x19ef('0x6'),'id':0x7}}},'RootOperation':{'fields':{'rootName':{'type':_0x19ef('0x0'),'id':0x1},'elementName':{'type':'string','id':0x2},'isAdd':{'type':'bool','id':0x3},'wasUndone':{'type':_0x19ef('0x6'),'id':0x4}}},'SplitOperation':{'fields':{'splitPosition':{'type':_0x19ef('0x4'),'id':0x1},'graveyardPosition':{'type':_0x19ef('0x4'),'id':0x2},'howMany':{'type':_0x19ef('0x3'),'id':0x3},'insertionPosition':{'type':_0x19ef('0x4'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'Position':{'fields':{'root':{'type':_0x19ef('0x0'),'id':0x1},'rootMain':{'type':_0x19ef('0x6'),'id':0x2},'rootGraveyard':{'type':_0x19ef('0x6'),'id':0x3},'path':{'rule':_0x19ef('0x1'),'type':_0x19ef('0x3'),'id':0x4},'stickiness':{'type':_0x19ef('0x0'),'id':0x5}}},'Range':{'fields':{'start':{'type':_0x19ef('0x4'),'id':0x1},'end':{'type':_0x19ef('0x4'),'id':0x2}}},'Element':{'fields':{'name':{'type':_0x19ef('0x0'),'id':0x1},'children':{'rule':_0x19ef('0x1'),'type':'Element','id':0x2},'data':{'type':_0x19ef('0x0'),'id':0x3},'attributesBoolean':{'keyType':'string','type':'bool','id':0x4},'attributesJson':{'type':_0x19ef('0x0'),'id':0x5}}}};
23
+ var _0x4d7c=['string','uint32','Element','exports','repeated','bool','Position','Range'];(function(_0x46ddfa,_0x4d7c43){var _0xf99a24=function(_0x54bff0){while(--_0x54bff0){_0x46ddfa['push'](_0x46ddfa['shift']());}};_0xf99a24(++_0x4d7c43);}(_0x4d7c,0x18d));var _0xf99a=function(_0x46ddfa,_0x4d7c43){_0x46ddfa=_0x46ddfa-0x0;var _0xf99a24=_0x4d7c[_0x46ddfa];return _0xf99a24;};'use strict';module[_0xf99a('0x6')]={'AttributeOperation':{'fields':{'range':{'type':_0xf99a('0x2'),'id':0x1},'key':{'type':'string','id':0x2},'oldValueBoolean':{'type':_0xf99a('0x0'),'id':0x3},'oldValueJson':{'type':_0xf99a('0x3'),'id':0x4},'newValueBoolean':{'type':_0xf99a('0x0'),'id':0x5},'newValueJson':{'type':_0xf99a('0x3'),'id':0x6},'wasUndone':{'type':_0xf99a('0x0'),'id':0x7}}},'InsertOperation':{'fields':{'position':{'type':'Position','id':0x1},'nodes':{'rule':'repeated','type':_0xf99a('0x5'),'id':0x2},'shouldReceiveAttributes':{'type':_0xf99a('0x0'),'id':0x3},'wasUndone':{'type':_0xf99a('0x0'),'id':0x4}}},'MarkerOperation':{'fields':{'name':{'type':_0xf99a('0x3'),'id':0x1},'oldRange':{'type':_0xf99a('0x2'),'id':0x2},'newRange':{'type':_0xf99a('0x2'),'id':0x3},'affectsData':{'type':_0xf99a('0x0'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'MergeOperation':{'fields':{'sourcePosition':{'type':_0xf99a('0x1'),'id':0x1},'targetPosition':{'type':_0xf99a('0x1'),'id':0x2},'graveyardPosition':{'type':_0xf99a('0x1'),'id':0x3},'howMany':{'type':_0xf99a('0x4'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'MoveOperation':{'fields':{'sourcePosition':{'type':_0xf99a('0x1'),'id':0x1},'howMany':{'type':_0xf99a('0x4'),'id':0x2},'targetPosition':{'type':_0xf99a('0x1'),'id':0x3},'wasUndone':{'type':_0xf99a('0x0'),'id':0x4}}},'RenameOperation':{'fields':{'position':{'type':'Position','id':0x1},'oldName':{'type':'string','id':0x2},'newName':{'type':_0xf99a('0x3'),'id':0x3},'wasUndone':{'type':_0xf99a('0x0'),'id':0x4}}},'RootAttributeOperation':{'fields':{'root':{'type':_0xf99a('0x3'),'id':0x1},'key':{'type':_0xf99a('0x3'),'id':0x2},'oldValueBoolean':{'type':_0xf99a('0x0'),'id':0x3},'oldValueJson':{'type':'string','id':0x4},'newValueBoolean':{'type':_0xf99a('0x0'),'id':0x5},'newValueJson':{'type':_0xf99a('0x3'),'id':0x6},'wasUndone':{'type':'bool','id':0x7}}},'RootOperation':{'fields':{'rootName':{'type':_0xf99a('0x3'),'id':0x1},'elementName':{'type':'string','id':0x2},'isAdd':{'type':'bool','id':0x3},'wasUndone':{'type':'bool','id':0x4}}},'SplitOperation':{'fields':{'splitPosition':{'type':_0xf99a('0x1'),'id':0x1},'graveyardPosition':{'type':_0xf99a('0x1'),'id':0x2},'howMany':{'type':_0xf99a('0x4'),'id':0x3},'insertionPosition':{'type':_0xf99a('0x1'),'id':0x4},'wasUndone':{'type':'bool','id':0x5}}},'Position':{'fields':{'root':{'type':_0xf99a('0x3'),'id':0x1},'rootMain':{'type':'bool','id':0x2},'rootGraveyard':{'type':_0xf99a('0x0'),'id':0x3},'path':{'rule':_0xf99a('0x7'),'type':_0xf99a('0x4'),'id':0x4},'stickiness':{'type':_0xf99a('0x3'),'id':0x5}}},'Range':{'fields':{'start':{'type':_0xf99a('0x1'),'id':0x1},'end':{'type':'Position','id':0x2}}},'Element':{'fields':{'name':{'type':_0xf99a('0x3'),'id':0x1},'children':{'rule':_0xf99a('0x7'),'type':'Element','id':0x2},'data':{'type':'string','id':0x3},'attributesBoolean':{'keyType':_0xf99a('0x3'),'type':_0xf99a('0x0'),'id':0x4},'attributesJson':{'type':_0xf99a('0x3'),'id':0x5}}}};
@@ -1 +1,5 @@
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
+ */
1
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x18de=['toObject','verify','decode','finish','_protobuf','_protobufRoot','getDescriptor','compress','encode'];(function(_0x36cbe6,_0x18decd){const _0x507791=function(_0x227f05){while(--_0x227f05){_0x36cbe6['push'](_0x36cbe6['shift']());}};_0x507791(++_0x18decd);}(_0x18de,0x14a));const _0x5077=function(_0x36cbe6,_0x18decd){_0x36cbe6=_0x36cbe6-0x0;let _0x507791=_0x18de[_0x36cbe6];return _0x507791;};import*as _0x512e8d from'./lib/compiledmessages.js';export default class r{constructor(){this[_0x5077('0x8')]=_0x512e8d;}[_0x5077('0x0')](_0x4c967b){return new ProtobufDescriptor(this[_0x5077('0x8')][_0x4c967b]);}}export class ProtobufDescriptor{constructor(_0x58187b){this[_0x5077('0x7')]=_0x58187b;}[_0x5077('0x1')](_0x5a52fd){const _0x43146b=this[_0x5077('0x7')][_0x5077('0x4')](_0x5a52fd);if(_0x43146b)throw Error(_0x43146b);return this[_0x5077('0x7')][_0x5077('0x2')](this[_0x5077('0x7')]['create'](_0x5a52fd))[_0x5077('0x6')]();}['decompress'](_0x134eb5){return this[_0x5077('0x7')][_0x5077('0x3')](this[_0x5077('0x7')][_0x5077('0x5')](_0x134eb5),{'oneofs':!0x0});}}
23
+ const _0x3f7f=['_protobuf','toObject','create','finish','decompress','compress','encode','getDescriptor','_protobufRoot'];(function(_0x160148,_0x3f7f40){const _0x3461f8=function(_0xa1f9d4){while(--_0xa1f9d4){_0x160148['push'](_0x160148['shift']());}};_0x3461f8(++_0x3f7f40);}(_0x3f7f,0xc0));const _0x3461=function(_0x160148,_0x3f7f40){_0x160148=_0x160148-0x0;let _0x3461f8=_0x3f7f[_0x160148];return _0x3461f8;};import*as _0x3f84e1 from'./lib/compiledmessages';export default class r{constructor(){this[_0x3461('0x5')]=_0x3f84e1;}[_0x3461('0x4')](_0x2b4d8b){return new ProtobufDescriptor(this[_0x3461('0x5')][_0x2b4d8b]);}}export class ProtobufDescriptor{constructor(_0x204011){this['_protobuf']=_0x204011;}[_0x3461('0x2')](_0xaba39f){const _0x2939f2=this[_0x3461('0x6')]['verify'](_0xaba39f);if(_0x2939f2)throw Error(_0x2939f2);return this['_protobuf'][_0x3461('0x3')](this[_0x3461('0x6')][_0x3461('0x8')](_0xaba39f))[_0x3461('0x0')]();}[_0x3461('0x1')](_0x27a493){return this[_0x3461('0x6')][_0x3461('0x7')](this['_protobuf']['decode'](_0x27a493),{'oneofs':!0x0});}}
package/src/utils.d.ts CHANGED
@@ -1,3 +1,7 @@
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
+ */
1
5
  /**
2
6
  * Return new position in JSON format shifted by given offset.
3
7
  *
package/src/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1745=['$graveyard','path','root','rootGraveyard','main','rootMain','nodes','length'];(function(_0x564207,_0x17455f){const _0x42f529=function(_0x2ecd8b){while(--_0x2ecd8b){_0x564207['push'](_0x564207['shift']());}};_0x42f529(++_0x17455f);}(_0x1745,0x1ce));const _0x42f5=function(_0x564207,_0x17455f){_0x564207=_0x564207-0x0;let _0x42f529=_0x1745[_0x564207];return _0x42f529;};import{cloneDeep as _0x52db35,isEqual as _0x27ac1e,isObject as _0x442f9a}from'lodash-es';export function getPositionShiftedBy(_0x4151cb,_0x5052cd){const _0x13fcbd=_0x52db35(_0x4151cb);return _0x13fcbd[_0x42f5('0x3')][_0x13fcbd[_0x42f5('0x3')][_0x42f5('0x1')]-0x1]+=_0x5052cd,_0x13fcbd;}export function arePositionsEqual(_0x1fbdb8,_0x344159){return _0x1fbdb8[_0x42f5('0x4')]===_0x344159[_0x42f5('0x4')]&&_0x27ac1e(_0x1fbdb8['path'],_0x344159[_0x42f5('0x3')]);}export function parsePositionBeforeCompression(_0x33a030){P(_0x33a030,_0x24a02c=>(_0x42f5('0x6')==_0x24a02c[_0x42f5('0x4')]?(_0x24a02c[_0x42f5('0x7')]=!0x0,delete _0x24a02c['root']):_0x42f5('0x2')==_0x24a02c[_0x42f5('0x4')]&&(_0x24a02c[_0x42f5('0x5')]=!0x0,delete _0x24a02c[_0x42f5('0x4')]),_0x24a02c));}export function parsePositionAfterCompression(_0x403377){P(_0x403377,_0x4d133d=>(_0x4d133d['rootMain']?(_0x4d133d[_0x42f5('0x4')]='main',delete _0x4d133d[_0x42f5('0x7')]):_0x4d133d[_0x42f5('0x5')]&&(_0x4d133d['root']=_0x42f5('0x2'),delete _0x4d133d[_0x42f5('0x5')]),_0x4d133d));}function P(_0x386f5b,_0x1360b3){for(const _0x46d655 in _0x386f5b){const _0x12faac=_0x386f5b[_0x46d655];_0x42f5('0x0')!==_0x46d655&&_0x442f9a(_0x12faac)&&(_0x12faac[_0x42f5('0x3')]&&(_0x12faac[_0x42f5('0x4')]||_0x12faac['rootMain']||_0x12faac[_0x42f5('0x5')])?_0x386f5b[_0x46d655]=_0x1360b3(_0x12faac):P(_0x12faac,_0x1360b3));}return _0x386f5b;}
23
+ const _0x3740=['main','rootGraveyard','nodes','path','rootMain','root','length','$graveyard'];(function(_0x1f0d08,_0x374000){const _0x20e8c3=function(_0x9cc46a){while(--_0x9cc46a){_0x1f0d08['push'](_0x1f0d08['shift']());}};_0x20e8c3(++_0x374000);}(_0x3740,0xe6));const _0x20e8=function(_0x1f0d08,_0x374000){_0x1f0d08=_0x1f0d08-0x0;let _0x20e8c3=_0x3740[_0x1f0d08];return _0x20e8c3;};import{cloneDeep as _0x41e2c4,isEqual as _0x3ae72b,isObject as _0x212a22}from'lodash-es';export function getPositionShiftedBy(_0x23601a,_0x2dc28c){const _0x577ce8=_0x41e2c4(_0x23601a);return _0x577ce8[_0x20e8('0x5')][_0x577ce8[_0x20e8('0x5')][_0x20e8('0x0')]-0x1]+=_0x2dc28c,_0x577ce8;}export function arePositionsEqual(_0xafed44,_0x19f008){return _0xafed44[_0x20e8('0x7')]===_0x19f008[_0x20e8('0x7')]&&_0x3ae72b(_0xafed44[_0x20e8('0x5')],_0x19f008[_0x20e8('0x5')]);}export function parsePositionBeforeCompression(_0x3ac3e7){P(_0x3ac3e7,_0x4bc938=>(_0x20e8('0x2')==_0x4bc938[_0x20e8('0x7')]?(_0x4bc938[_0x20e8('0x6')]=!0x0,delete _0x4bc938[_0x20e8('0x7')]):_0x20e8('0x1')==_0x4bc938[_0x20e8('0x7')]&&(_0x4bc938['rootGraveyard']=!0x0,delete _0x4bc938[_0x20e8('0x7')]),_0x4bc938));}export function parsePositionAfterCompression(_0x1663df){P(_0x1663df,_0x4a4726=>(_0x4a4726[_0x20e8('0x6')]?(_0x4a4726['root']=_0x20e8('0x2'),delete _0x4a4726['rootMain']):_0x4a4726[_0x20e8('0x3')]&&(_0x4a4726['root']=_0x20e8('0x1'),delete _0x4a4726['rootGraveyard']),_0x4a4726));}function P(_0xbb2675,_0x183f1f){for(const _0x4fd487 in _0xbb2675){const _0xe2344d=_0xbb2675[_0x4fd487];_0x20e8('0x4')!==_0x4fd487&&_0x212a22(_0xe2344d)&&(_0xe2344d[_0x20e8('0x5')]&&(_0xe2344d[_0x20e8('0x7')]||_0xe2344d[_0x20e8('0x6')]||_0xe2344d[_0x20e8('0x3')])?_0xbb2675[_0x4fd487]=_0x183f1f(_0xe2344d):P(_0xe2344d,_0x183f1f));}return _0xbb2675;}