@ckeditor/ckeditor5-operations-compressor
Version:
CKEditor 5 operations compressor for real-time collaboration.
23 lines • 3.85 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
(function(_0x197ef2,_0x2e1db5){const _0x4071d4=_0x3624,_0x3828f5=_0x197ef2();while(!![]){try{const _0x55ee71=parseInt(_0x4071d4(0x1d6))/0x1+parseInt(_0x4071d4(0x1d9))/0x2+parseInt(_0x4071d4(0x1d1))/0x3*(parseInt(_0x4071d4(0x1d3))/0x4)+parseInt(_0x4071d4(0x1d5))/0x5+-parseInt(_0x4071d4(0x1cd))/0x6+parseInt(_0x4071d4(0x1ca))/0x7*(parseInt(_0x4071d4(0x1cc))/0x8)+-parseInt(_0x4071d4(0x1cf))/0x9;if(_0x55ee71===_0x2e1db5)break;else _0x3828f5['push'](_0x3828f5['shift']());}catch(_0x337b6b){_0x3828f5['push'](_0x3828f5['shift']());}}}(_0x3cab,0x5bbcf));function _0x3cab(){const _0x1254a6=['1332270LtiYrm','rootMain','11570193IvijnJ','path','3BIPsPS','$graveyard','439124SABwTR','rootGraveyard','3636610NelyLw','732471CtduTE','main','root','596826NHulPz','nodes','107758IxHvrc','length','8tTZrCr'];_0x3cab=function(){return _0x1254a6;};return _0x3cab();}import{cloneDeep as _0x5eeaea,isEqual as _0x5caa90,isObject as _0x158a5f}from'es-toolkit/compat';export function getPositionShiftedBy(_0x40c1cf,_0x1027a3){const _0x31a29c=_0x3624,_0x3fb096=_0x5eeaea(_0x40c1cf);return _0x3fb096[_0x31a29c(0x1d0)][_0x3fb096[_0x31a29c(0x1d0)][_0x31a29c(0x1cb)]-0x1]+=_0x1027a3,_0x3fb096;}export function arePositionsEqual(_0x33fcdc,_0x5ed287){const _0x596edf=_0x3624;return _0x33fcdc[_0x596edf(0x1d8)]===_0x5ed287[_0x596edf(0x1d8)]&&_0x5caa90(_0x33fcdc[_0x596edf(0x1d0)],_0x5ed287[_0x596edf(0x1d0)]);}function _0x3624(_0x17105f,_0x1c5f3c){const _0x3cab51=_0x3cab();return _0x3624=function(_0x362447,_0xc2f218){_0x362447=_0x362447-0x1c9;let _0xda46e9=_0x3cab51[_0x362447];return _0xda46e9;},_0x3624(_0x17105f,_0x1c5f3c);}export function parsePositionBeforeCompression(_0x4738ff){const _0x33bd75=_0x3624;P(_0x4738ff,_0x172046=>(_0x33bd75(0x1d7)==_0x172046[_0x33bd75(0x1d8)]?(_0x172046[_0x33bd75(0x1ce)]=!0x0,delete _0x172046[_0x33bd75(0x1d8)]):_0x33bd75(0x1d2)==_0x172046[_0x33bd75(0x1d8)]&&(_0x172046[_0x33bd75(0x1d4)]=!0x0,delete _0x172046[_0x33bd75(0x1d8)]),_0x172046));}export function parsePositionAfterCompression(_0xd11f04){const _0x5ea39a=_0x3624;P(_0xd11f04,_0x5d5041=>(_0x5d5041[_0x5ea39a(0x1ce)]?(_0x5d5041[_0x5ea39a(0x1d8)]=_0x5ea39a(0x1d7),delete _0x5d5041[_0x5ea39a(0x1ce)]):_0x5d5041[_0x5ea39a(0x1d4)]&&(_0x5d5041[_0x5ea39a(0x1d8)]=_0x5ea39a(0x1d2),delete _0x5d5041[_0x5ea39a(0x1d4)]),_0x5d5041));}function P(_0x215c7a,_0x124f64){const _0x545d2b=_0x3624;for(const _0x25615f in _0x215c7a){const _0x559426=_0x215c7a[_0x25615f];_0x545d2b(0x1c9)!==_0x25615f&&_0x158a5f(_0x559426)&&(_0x559426[_0x545d2b(0x1d0)]&&(_0x559426[_0x545d2b(0x1d8)]||_0x559426[_0x545d2b(0x1ce)]||_0x559426[_0x545d2b(0x1d4)])?_0x215c7a[_0x25615f]=_0x124f64(_0x559426):P(_0x559426,_0x124f64));}return _0x215c7a;}