UNPKG

@ckeditor/ckeditor5-operations-compressor

Version:

CKEditor 5 operations compressor for real-time collaboration.

23 lines 4.27 kB
/* * Copyright (c) 2003-2026, 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 _0x32db(){const _0x24958f=['51802SInCrQ','wasUndone','37464CfYjwO','compress','262536AMsBsY','5923848gumnpr','1086OabVES','_decompressSingleOperation','_checkOperation','_compareOperations','_combineNext','$graveyard','4716153ZLRPDS','buffers','__className','MoveOperation','_compressSingleOperation','242NMCefs','_context','howMany','_getCompressorByName','root','906190XBDzpy','decompress','targetPosition','4nVDTYe','_splitCurrent','31HhywFC','4441190tXXHxz','sourcePosition'];_0x32db=function(){return _0x24958f;};return _0x32db();}const _0x31e31a=_0x1bbd;(function(_0x33083d,_0x3fb79f){const _0x591cd0=_0x1bbd,_0x5ce70f=_0x33083d();while(!![]){try{const _0x47c777=parseInt(_0x591cd0(0x15d))/0x1*(parseInt(_0x591cd0(0x160))/0x2)+parseInt(_0x591cd0(0x164))/0x3*(parseInt(_0x591cd0(0x15b))/0x4)+parseInt(_0x591cd0(0x15e))/0x5+parseInt(_0x591cd0(0x166))/0x6*(parseInt(_0x591cd0(0x162))/0x7)+-parseInt(_0x591cd0(0x165))/0x8+parseInt(_0x591cd0(0x16c))/0x9+-parseInt(_0x591cd0(0x158))/0xa*(parseInt(_0x591cd0(0x171))/0xb);if(_0x47c777===_0x3fb79f)break;else _0x5ce70f['push'](_0x5ce70f['shift']());}catch(_0x357a82){_0x5ce70f['push'](_0x5ce70f['shift']());}}}(_0x32db,0x832df));function _0x1bbd(_0x5d2df2,_0x35afc0){const _0x32dbb8=_0x32db();return _0x1bbd=function(_0x1bbdad,_0x4fdf04){_0x1bbdad=_0x1bbdad-0x157;let _0x82dc7a=_0x32dbb8[_0x1bbdad];return _0x82dc7a;},_0x1bbd(_0x5d2df2,_0x35afc0);}import{ActionCompressor as _0x3db81c}from'./actioncompressor.js';import{arePositionsEqual as _0x2c500e,getPositionShiftedBy as _0x3ef363}from'../utils.js';import{cloneDeep as _0x33e42e}from'es-toolkit/compat';export class DeletingActionCompressor extends _0x3db81c{[_0x31e31a(0x16a)](_0xe89855,_0xf05710){const _0x5bea17=_0x31e31a;return _0xf05710[_0x5bea17(0x173)]++,_0xf05710[_0x5bea17(0x15f)]=_0x33e42e(_0xe89855[_0x5bea17(0x15f)]),_0xf05710;}[_0x31e31a(0x15c)](_0x4869a5){const _0xcaeef7=_0x31e31a,_0x1c83fa=_0x33e42e(_0x4869a5);return _0x4869a5[_0xcaeef7(0x173)]--,_0x1c83fa[_0xcaeef7(0x173)]=0x1,_0x1c83fa[_0xcaeef7(0x15f)]=_0x3ef363(_0x1c83fa[_0xcaeef7(0x15f)],_0x4869a5[_0xcaeef7(0x173)]),_0x1c83fa;}[_0x31e31a(0x169)](_0x2b4f47,_0x285e7b){const _0xa317a1=_0x31e31a;return!(!this[_0xa317a1(0x168)](_0x2b4f47)||!this[_0xa317a1(0x168)](_0x285e7b))&&(_0x2c500e(_0x3ef363(_0x2b4f47[_0xa317a1(0x15f)],-0x1),_0x285e7b[_0xa317a1(0x15f)])&&_0x2c500e(_0x2b4f47[_0xa317a1(0x15a)],_0x285e7b[_0xa317a1(0x15a)]));}[_0x31e31a(0x170)](_0x3c14d0){const _0x15418b=_0x31e31a,_0x3d3d69={'types':[],'buffers':[],'baseVersion':0x0};return this[_0x15418b(0x172)][_0x15418b(0x174)](_0x15418b(0x16f))[_0x15418b(0x163)](_0x3d3d69,[_0x3c14d0]),_0x3d3d69[_0x15418b(0x16d)][0x0];}[_0x31e31a(0x167)](_0x54bc2a){const _0x39463d=_0x31e31a,_0x16a6ed=[];return this[_0x39463d(0x172)][_0x39463d(0x174)](_0x39463d(0x16f))[_0x39463d(0x159)](_0x16a6ed,_0x54bc2a),_0x16a6ed[0x0];}[_0x31e31a(0x168)](_0x397414){const _0x44aacf=_0x31e31a;return _0x44aacf(0x16f)==_0x397414[_0x44aacf(0x16e)]&&_0x44aacf(0x16b)==_0x397414[_0x44aacf(0x15a)][_0x44aacf(0x157)]&&0x1==_0x397414[_0x44aacf(0x173)]&&!_0x397414[_0x44aacf(0x161)];}}