@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
23 lines • 10 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x4ac4eb=_0x2689;(function(_0x55604c,_0x557cfa){const _0x58bc9d=_0x2689,_0x4b83ce=_0x55604c();while(!![]){try{const _0x3059eb=-parseInt(_0x58bc9d(0x1a7))/0x1*(-parseInt(_0x58bc9d(0x1b3))/0x2)+parseInt(_0x58bc9d(0x18f))/0x3+-parseInt(_0x58bc9d(0x18e))/0x4+parseInt(_0x58bc9d(0x195))/0x5+-parseInt(_0x58bc9d(0x192))/0x6*(-parseInt(_0x58bc9d(0x172))/0x7)+-parseInt(_0x58bc9d(0x196))/0x8*(parseInt(_0x58bc9d(0x198))/0x9)+-parseInt(_0x58bc9d(0x16b))/0xa;if(_0x3059eb===_0x557cfa)break;else _0x4b83ce['push'](_0x4b83ce['shift']());}catch(_0x30f7bf){_0x4b83ce['push'](_0x4b83ce['shift']());}}}(_0x17c9,0x55804));function _0x17c9(){const _0x46d81c=['locale','todoList','length','model','type','*Change\x20to:*\x20%0','3508850uliwlK','listIndent','value','ELEMENT_TODO_LIST','descriptionFactory','format','afterInit','7LuZHFL','todoListChecked','findIndex','from','get','getAttribute','indentList','editor','push','markBlockFormat','numbered','listType','numberedList','registerElementLabel','bulletedList','_selectedElements','filter','document','*Check\x20item*','ELEMENT_NUMBERED_LIST','createPositionAt','formatInline','commandName','replace','getSelectedBlocks','selection','todo','commandParams','686848zZGFwC','1524186YSSJie','end','parent','3601740KtGMaV','List','outdentList','456770UjfGuH','1648PuixlJ','checkTodoList','16938sLAocM','isObject','paragraph','change','schema','formatBlock','slice','plugins','LegacyTodoListEditing','ELEMENT_LIST_ITEM','listItem','enableCommand','commands','createRange','checkChild','965gcRRdb','add','*Uncheck\x20item*','blockName','TrackChangesEditing','execute','LegacyListEditing','name','ELEMENT_BULLETED_LIST','*Outdent:*\x20%0','has','*Indent:*\x20%0','126FKslnx','before','forceValue','registerDescriptionCallback','bulleted','nextSibling','previousSibling','element'];_0x17c9=function(){return _0x46d81c;};return _0x17c9();}function _0x2689(_0x4c0a07,_0x2f5103){const _0x17c9ae=_0x17c9();return _0x2689=function(_0x2689ae,_0x11daf2){_0x2689ae=_0x2689ae-0x162;let _0x2e38d8=_0x17c9ae[_0x2689ae];return _0x2e38d8;},_0x2689(_0x4c0a07,_0x2f5103);}import{Plugin as _0x5961a2}from'ckeditor5/src/core.js';import{getTranslation as _0x26abe3}from'../utils/common-translations.js';export class TrackChangesLegacyList extends _0x5961a2{[_0x4ac4eb(0x171)](){const _0x5239bd=_0x4ac4eb,_0xdc28fc=this[_0x5239bd(0x179)],_0x65f4f9=_0xdc28fc[_0x5239bd(0x165)];if(!_0xdc28fc[_0x5239bd(0x19f)][_0x5239bd(0x1b1)](_0x5239bd(0x1ad)))return;const _0xc7af60=_0xdc28fc[_0x5239bd(0x19f)][_0x5239bd(0x176)](_0x5239bd(0x1ab)),_0x23f48a=_0xdc28fc[_0x5239bd(0x19f)][_0x5239bd(0x1b1)](_0x5239bd(0x1a0));function _0x3d6259(_0x55c7ca){return()=>{const _0x22fbdb=_0x2689,_0x40f7af=_0xdc28fc[_0x22fbdb(0x168)][_0x22fbdb(0x183)][_0x22fbdb(0x18b)],_0xd11532=_0xdc28fc[_0x22fbdb(0x1a4)][_0x22fbdb(0x176)](_0x55c7ca);if(_0xd11532[_0x22fbdb(0x16d)])return void _0xdc28fc[_0x22fbdb(0x1ac)](_0x22fbdb(0x19a),{});const _0x324e89=_0x55c7ca[_0x22fbdb(0x19e)](0x0,-0x4),_0x2090c0=function(_0x57d676,_0xd5fc33,_0x3a0660){const _0x322c69=_0x22fbdb;let _0x3ba4fd=Array[_0x322c69(0x175)](_0x57d676)[_0x322c69(0x182)](_0x12f2e5=>function(_0x3c9049,_0x57cd1a){const _0x582f85=_0x322c69;return _0x57cd1a[_0x582f85(0x1a6)](_0x3c9049[_0x582f85(0x191)],_0x582f85(0x1a2))&&!_0x57cd1a[_0x582f85(0x199)](_0x3c9049);}(_0x12f2e5,_0x3a0660));_0x3ba4fd=_0x3ba4fd[_0x322c69(0x182)](_0x396774=>!_0x396774['is'](_0x322c69(0x164),_0x322c69(0x1a2))||_0x396774[_0x322c69(0x177)](_0x322c69(0x17d))!=_0xd5fc33);const _0x252574=new Set();for(const _0x5423db of _0x3ba4fd)_0x5423db['is'](_0x322c69(0x164),_0x322c69(0x1a2))?_0x252574[_0x322c69(0x1a8)](Le(_0x5423db)):_0x252574[_0x322c69(0x1a8)](_0x5423db);return Array[_0x322c69(0x175)](_0x252574);}(_0x40f7af[_0x22fbdb(0x18a)](),_0x324e89,_0xdc28fc[_0x22fbdb(0x168)][_0x22fbdb(0x19c)]);_0xdc28fc[_0x22fbdb(0x168)][_0x22fbdb(0x19b)](()=>{const _0x56389e=_0x22fbdb;for(const _0x3971d9 of _0x2090c0)_0xc7af60[_0x56389e(0x17b)](_0x3971d9,{'commandName':_0x55c7ca,'commandParams':[{'forceValue':!_0xd11532[_0x56389e(0x16d)]}],'formatGroupId':_0x56389e(0x1aa)},Ee(_0x3971d9));});};}function _0x195b69(_0x4cff49){return()=>{const _0x35f32b=_0x2689,_0xd705d2=function(_0x2d1928){const _0x1ff28e=_0x2689;let _0x2d2351=Array[_0x1ff28e(0x175)](_0x2d1928);const _0x101c2f=_0x2d2351[_0x1ff28e(0x174)](_0x4abda0=>_0x1ff28e(0x1a2)!=_0x4abda0[_0x1ff28e(0x1ae)]);return _0x101c2f>-0x1&&(_0x2d2351=_0x2d2351[_0x1ff28e(0x19e)](0x0,_0x101c2f)),_0x2d2351;}(_0xdc28fc[_0x35f32b(0x168)][_0x35f32b(0x183)][_0x35f32b(0x18b)][_0x35f32b(0x18a)]()),_0x5cf745=_0xdc28fc[_0x35f32b(0x168)][_0x35f32b(0x1a5)](_0xdc28fc[_0x35f32b(0x168)][_0x35f32b(0x186)](_0xd705d2[0x0],_0x35f32b(0x1b4)),_0xdc28fc[_0x35f32b(0x168)][_0x35f32b(0x186)](_0xd705d2[_0xd705d2[_0x35f32b(0x167)]-0x1],_0x35f32b(0x190)));_0xdc28fc[_0x35f32b(0x168)][_0x35f32b(0x19b)](()=>{const _0x285c0a=_0x35f32b;_0xc7af60[_0x285c0a(0x17b)](_0x5cf745,{'commandName':_0x4cff49,'commandParams':[],'formatGroupId':_0x285c0a(0x16c)},function(_0x371377){const _0x412a26=_0x285c0a,_0x5740bd=new Set();for(const _0x4cd458 of _0x371377){let _0x1b6221=_0x4cd458[_0x412a26(0x162)];for(;_0x1b6221&&_0x1b6221[_0x412a26(0x177)](_0x412a26(0x16c))>_0x4cd458[_0x412a26(0x177)](_0x412a26(0x16c));)_0x5740bd[_0x412a26(0x1a8)](_0x1b6221),_0x1b6221=_0x1b6221[_0x412a26(0x162)];}return Array[_0x412a26(0x175)](_0x5740bd);}(_0xd705d2));});};}_0xc7af60[_0x5239bd(0x1a3)](_0x5239bd(0x17e),_0x3d6259(_0x5239bd(0x17e))),_0xc7af60[_0x5239bd(0x1a3)](_0x5239bd(0x180),_0x3d6259(_0x5239bd(0x180))),_0x23f48a&&_0xc7af60[_0x5239bd(0x1a3)](_0x5239bd(0x166),_0x3d6259(_0x5239bd(0x166))),_0xc7af60[_0x5239bd(0x1a3)](_0x5239bd(0x178),_0x195b69(_0x5239bd(0x178))),_0xc7af60[_0x5239bd(0x1a3)](_0x5239bd(0x194),_0x195b69(_0x5239bd(0x194))),_0x23f48a&&_0xc7af60[_0x5239bd(0x1a3)](_0x5239bd(0x197),()=>{const _0x563d9c=_0x5239bd,_0x466dcd=_0xdc28fc[_0x563d9c(0x1a4)][_0x563d9c(0x176)](_0x563d9c(0x197)),_0x34a683=Array[_0x563d9c(0x175)](_0x466dcd[_0x563d9c(0x181)]);_0x34a683[_0x563d9c(0x182)](_0x1c2416=>_0x1c2416[_0x563d9c(0x177)](_0x563d9c(0x173))!=_0x466dcd[_0x563d9c(0x16d)]),_0xdc28fc[_0x563d9c(0x168)][_0x563d9c(0x19b)](()=>{const _0x29b530=_0x563d9c;for(const _0x4dbbe3 of _0x34a683)_0xc7af60[_0x29b530(0x17b)](_0x4dbbe3,{'commandName':_0x29b530(0x197),'commandParams':[{'forceValue':!_0x466dcd[_0x29b530(0x16d)]}]});});}),_0xc7af60[_0x5239bd(0x16f)][_0x5239bd(0x17f)](_0x5239bd(0x1a2),_0x1430c8=>_0x26abe3(_0x65f4f9,_0x5239bd(0x1a1),_0x1430c8)),_0xc7af60[_0x5239bd(0x16f)][_0x5239bd(0x1b6)](_0x54db81=>{const _0x3d69da=_0x5239bd;if(_0x3d69da(0x19d)!=_0x54db81[_0x3d69da(0x169)]&&_0x3d69da(0x187)!=_0x54db81[_0x3d69da(0x169)])return;const {data:_0x117542}=_0x54db81;if(_0x117542){if(_0x3d69da(0x17e)==_0x117542[_0x3d69da(0x188)]||_0x3d69da(0x180)==_0x117542[_0x3d69da(0x188)]||_0x3d69da(0x166)==_0x117542[_0x3d69da(0x188)])switch(_0x117542[_0x3d69da(0x188)][_0x3d69da(0x189)](_0x3d69da(0x193),'')){case _0x3d69da(0x1b7):return _0x2c1078(_0x26abe3(_0x65f4f9,_0x3d69da(0x1af)));case _0x3d69da(0x17c):return _0x2c1078(_0x26abe3(_0x65f4f9,_0x3d69da(0x185)));case _0x3d69da(0x18c):return _0x2c1078(_0x26abe3(_0x65f4f9,_0x3d69da(0x16e)));}if(_0x3d69da(0x178)==_0x117542[_0x3d69da(0x188)])return{'type':_0x3d69da(0x170),'content':_0x26abe3(_0x65f4f9,_0x3d69da(0x1b2),_0x26abe3(_0x65f4f9,_0x3d69da(0x1a1)))};if(_0x3d69da(0x194)==_0x117542[_0x3d69da(0x188)])return{'type':_0x3d69da(0x170),'content':_0x26abe3(_0x65f4f9,_0x3d69da(0x1b0),_0x26abe3(_0x65f4f9,_0x3d69da(0x1a1)))};if(_0x3d69da(0x197)==_0x117542[_0x3d69da(0x188)])return _0x117542[_0x3d69da(0x18d)][0x0][_0x3d69da(0x1b5)]?{'type':_0x3d69da(0x170),'content':_0x26abe3(_0x65f4f9,_0x3d69da(0x184))}:{'type':_0x3d69da(0x170),'content':_0x26abe3(_0x65f4f9,_0x3d69da(0x1a9))};}function _0x2c1078(_0x23a961){const _0x468ffc=_0x3d69da;return{'type':_0x468ffc(0x170),'content':_0x26abe3(_0x65f4f9,_0x468ffc(0x16a),_0x23a961)};}});}}function Le(_0x3e8c68){const _0x320c21=_0x4ac4eb,_0x704ec4=_0x3e8c68[_0x320c21(0x177)](_0x320c21(0x16c));if(0x0==_0x704ec4)return _0x3e8c68;let _0x379455=_0x3e8c68;for(;_0x3e8c68[_0x320c21(0x163)]&&_0x3e8c68[_0x320c21(0x163)]['is'](_0x320c21(0x164),_0x320c21(0x1a2));){const _0x33b854=_0x3e8c68[_0x320c21(0x163)][_0x320c21(0x177)](_0x320c21(0x16c));if(_0x33b854==_0x704ec4)_0x379455=_0x3e8c68[_0x320c21(0x163)];else{if(_0x33b854<_0x704ec4)break;}_0x3e8c68=_0x3e8c68[_0x320c21(0x163)];}return _0x379455;}function Ee(_0xb8bab6){const _0x5095b6=_0x4ac4eb,_0x3baf93=[];if(_0xb8bab6['is'](_0x5095b6(0x164),_0x5095b6(0x1a2))&&_0xb8bab6[_0x5095b6(0x177)](_0x5095b6(0x16c))>0x0){let _0x44cf3=_0xb8bab6[_0x5095b6(0x162)];for(;_0x44cf3&&_0x5095b6(0x1a2)==_0x44cf3[_0x5095b6(0x1ae)]&&_0x44cf3[_0x5095b6(0x177)](_0x5095b6(0x16c))==_0xb8bab6[_0x5095b6(0x177)](_0x5095b6(0x16c));)_0x3baf93[_0x5095b6(0x17a)](_0x44cf3),_0x44cf3=_0x44cf3[_0x5095b6(0x162)];}return _0x3baf93;}