UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 6.92 kB
/* * 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 _0x4a9dd4=_0xe44f;(function(_0x109b52,_0x2e7560){const _0x8d35ac=_0xe44f,_0x429606=_0x109b52();while(!![]){try{const _0x165957=parseInt(_0x8d35ac(0x149))/0x1*(-parseInt(_0x8d35ac(0x153))/0x2)+-parseInt(_0x8d35ac(0x157))/0x3*(-parseInt(_0x8d35ac(0x145))/0x4)+parseInt(_0x8d35ac(0x12e))/0x5*(parseInt(_0x8d35ac(0x14b))/0x6)+parseInt(_0x8d35ac(0x143))/0x7*(-parseInt(_0x8d35ac(0x13b))/0x8)+-parseInt(_0x8d35ac(0x13a))/0x9+parseInt(_0x8d35ac(0x150))/0xa+parseInt(_0x8d35ac(0x166))/0xb*(-parseInt(_0x8d35ac(0x151))/0xc);if(_0x165957===_0x2e7560)break;else _0x429606['push'](_0x429606['shift']());}catch(_0x52e373){_0x429606['push'](_0x429606['shift']());}}}(_0x68c7,0x6ca0d));import{Plugin as _0xa05755}from'ckeditor5/src/core.js';function _0x68c7(){const _0x553617=['writer','editor','schema','name','4770330cQdTPr','11364crCOMF','getFirstRange','2dhUnZb','*Change\x20to:*\x20%0','toViewPosition','end','12XRxiBn','model','highest','data','descriptionFactory','locale','afterInit','isBlock','consume','markerRange','options','activeMarkers','registerDescriptionCallback','isLimit','consumable','10978hLfqcx','span','get','commandName','showSuggestionHighlights','enableCommand','has','ck-suggestion-marker-split','registerElementLabel','start','TrackChangesEditing','format','addClass','_splitMarkerName','ck-suggestion-marker--active','checkChild','enableDefaultAttributesIntegration','5405bYoWpw','paragraph','bindElementToMarker','insertParagraph','createUIElement','type','plugins','mapper','downcastDispatcher','markerName','nodeAfter','_registerLegacyDescription','272034ZaVnun','1753648jbCCyc','insert','addMarker:suggestion:insertion','formatBlock','insertion','includes','$text','ELEMENT_PARAGRAPH','7qRLVLR','editing','833908YimINO','*Insert:*\x20%0','Paragraph','getItemLabel','175208ZCvWpG','isTouching','2796nemklC'];_0x68c7=function(){return _0x553617;};return _0x68c7();}import{getTranslation as _0x2aef22}from'../utils/common-translations.js';export class TrackChangesParagraph extends _0xa05755{[_0x4a9dd4(0x15d)](){const _0x4b4143=_0x4a9dd4,_0x1ceef4=this[_0x4b4143(0x14d)];if(!_0x1ceef4[_0x4b4143(0x134)][_0x4b4143(0x16c)](_0x4b4143(0x147)))return;const _0x32f030=_0x1ceef4[_0x4b4143(0x15c)],_0x45837f=_0x1ceef4[_0x4b4143(0x134)][_0x4b4143(0x168)](_0x4b4143(0x170));_0x45837f[_0x4b4143(0x15b)][_0x4b4143(0x16e)](_0x4b4143(0x12f),_0x4bb102=>_0x2aef22(_0x32f030,_0x4b4143(0x142),_0x4bb102)),_0x45837f[_0x4b4143(0x12d)](_0x4b4143(0x12f)),_0x45837f[_0x4b4143(0x16b)](_0x4b4143(0x131)),_0x1ceef4[_0x4b4143(0x144)][_0x4b4143(0x136)]['on'](_0x4b4143(0x13d),nr(_0x1ceef4),{'priority':_0x4b4143(0x159)}),_0x1ceef4[_0x4b4143(0x15a)][_0x4b4143(0x136)]['on'](_0x4b4143(0x13d),(_0x5ec362,_0x5a89b8,_0x562097)=>{const _0x171642=_0x4b4143;_0x562097[_0x171642(0x161)][_0x171642(0x16a)]&&nr(_0x1ceef4,{'showActiveMarker':!0x1})(_0x5ec362,_0x5a89b8,_0x562097);},{'priority':_0x4b4143(0x159)});const _0x57b825=_0x45837f[_0x4b4143(0x15b)];_0x57b825[_0x4b4143(0x163)](_0x40fbae=>{const _0x6d33bf=_0x4b4143;if(_0x6d33bf(0x13f)!==_0x40fbae[_0x6d33bf(0x133)])return;const {start:_0x592f83,end:_0x200aeb}=_0x40fbae[_0x6d33bf(0x152)]();if(!_0x592f83[_0x6d33bf(0x14a)](_0x200aeb)||!_0x592f83[_0x6d33bf(0x138)])return;const _0x420340=_0x1ceef4[_0x6d33bf(0x158)][_0x6d33bf(0x14e)],_0x3e95ee=_0x592f83[_0x6d33bf(0x138)];return _0x420340[_0x6d33bf(0x15e)](_0x3e95ee)&&!_0x420340[_0x6d33bf(0x164)](_0x3e95ee)&&_0x420340[_0x6d33bf(0x12c)](_0x3e95ee,_0x6d33bf(0x141))?{'type':_0x6d33bf(0x13f),'content':_0x2aef22(_0x32f030,_0x6d33bf(0x146),_0x57b825[_0x6d33bf(0x148)](_0x3e95ee,0x1))}:void 0x0;}),this[_0x4b4143(0x139)]();}[_0x4a9dd4(0x139)](){const _0xf6c18a=_0x4a9dd4,_0x5a4658=this[_0xf6c18a(0x14d)],_0x4b4e6f=_0x5a4658[_0xf6c18a(0x15c)];_0x5a4658[_0xf6c18a(0x134)][_0xf6c18a(0x168)](_0xf6c18a(0x170))[_0xf6c18a(0x15b)][_0xf6c18a(0x163)](_0xcd6a19=>{const _0x17c47b=_0xf6c18a;if(_0x17c47b(0x13e)!=_0xcd6a19[_0x17c47b(0x133)])return;const {data:_0xa62510}=_0xcd6a19;return _0xa62510&&_0x17c47b(0x12f)==_0xa62510[_0x17c47b(0x169)]?{'type':_0x17c47b(0x171),'content':_0x2aef22(_0x4b4e6f,_0x17c47b(0x154),_0x2aef22(_0x4b4e6f,_0x17c47b(0x142)))}:void 0x0;});}}function _0xe44f(_0x33ad25,_0x885334){const _0x68c7ad=_0x68c7();return _0xe44f=function(_0xe44f83,_0x5c93f1){_0xe44f83=_0xe44f83-0x129;let _0x51eb15=_0x68c7ad[_0xe44f83];return _0x51eb15;},_0xe44f(_0x33ad25,_0x885334);}function nr(_0x3f1211,{showActiveMarker:_0x55d9cb=!0x0}={}){return(_0x4998c2,_0x22dca3,_0x15c57b)=>{const _0x8020cb=_0xe44f,_0x397222=_0x3f1211[_0x8020cb(0x134)][_0x8020cb(0x168)](_0x8020cb(0x170)),_0x530ced=_0x22dca3[_0x8020cb(0x160)][_0x8020cb(0x16f)],_0x5939cb=_0x22dca3[_0x8020cb(0x160)][_0x8020cb(0x156)],_0x1abbb4=_0x3f1211[_0x8020cb(0x158)][_0x8020cb(0x14e)];if(!_0x530ced[_0x8020cb(0x14a)](_0x5939cb)||!_0x530ced[_0x8020cb(0x138)])return;const _0xfa136=_0x530ced[_0x8020cb(0x138)];if(_0x1abbb4[_0x8020cb(0x15e)](_0xfa136)&&!_0x1abbb4[_0x8020cb(0x164)](_0xfa136)&&_0x1abbb4[_0x8020cb(0x12c)](_0xfa136,_0x8020cb(0x141))){if(!_0x15c57b[_0x8020cb(0x165)][_0x8020cb(0x15f)](_0x22dca3[_0x8020cb(0x160)],_0x4998c2[_0x8020cb(0x14f)]))return;const {id:_0x529b14,authorId:_0x5d38dd}=_0x397222[_0x8020cb(0x12a)](_0x22dca3[_0x8020cb(0x137)]),_0x41f5ee=_0x15c57b[_0x8020cb(0x14c)][_0x8020cb(0x132)](_0x8020cb(0x167),{'class':_0x8020cb(0x16d),'data-suggestion':_0x529b14,'data-author-id':_0x5d38dd}),_0x38d4b8=_0x15c57b[_0x8020cb(0x135)][_0x8020cb(0x155)](_0x5939cb);_0x55d9cb&&_0x397222[_0x8020cb(0x162)][_0x8020cb(0x140)](_0x22dca3[_0x8020cb(0x137)])&&_0x15c57b[_0x8020cb(0x14c)][_0x8020cb(0x129)](_0x8020cb(0x12b),_0x41f5ee),_0x15c57b[_0x8020cb(0x14c)][_0x8020cb(0x13c)](_0x38d4b8,_0x41f5ee),_0x15c57b[_0x8020cb(0x135)][_0x8020cb(0x130)](_0x41f5ee,_0x22dca3[_0x8020cb(0x137)]);}};}