UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 6.91 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 _0x3d489a=_0x332a;(function(_0x52c6ec,_0x120d01){const _0x4c548d=_0x332a,_0x581e33=_0x52c6ec();while(!![]){try{const _0x50f5d9=parseInt(_0x4c548d(0x17e))/0x1*(-parseInt(_0x4c548d(0x16b))/0x2)+-parseInt(_0x4c548d(0x172))/0x3*(parseInt(_0x4c548d(0x187))/0x4)+parseInt(_0x4c548d(0x15d))/0x5+-parseInt(_0x4c548d(0x16c))/0x6+parseInt(_0x4c548d(0x19d))/0x7*(parseInt(_0x4c548d(0x195))/0x8)+parseInt(_0x4c548d(0x189))/0x9*(parseInt(_0x4c548d(0x17d))/0xa)+parseInt(_0x4c548d(0x199))/0xb*(parseInt(_0x4c548d(0x16d))/0xc);if(_0x50f5d9===_0x120d01)break;else _0x581e33['push'](_0x581e33['shift']());}catch(_0x1a6df4){_0x581e33['push'](_0x581e33['shift']());}}}(_0x59d2,0x48a94));function _0x332a(_0x2938bd,_0x6c5c29){const _0x59d275=_0x59d2();return _0x332a=function(_0x332a44,_0x3636ad){_0x332a44=_0x332a44-0x15c;let _0x3c9570=_0x59d275[_0x332a44];return _0x3c9570;},_0x332a(_0x2938bd,_0x6c5c29);}import{Plugin as _0x2ff62f}from'ckeditor5/src/core.js';function _0x59d2(){const _0x25f810=['12atDTTo','locale','showSuggestionHighlights','ck-suggestion-marker--active','start','2427GbaWRj','writer','format','registerDescriptionCallback','model','consume','formatBlock','has','mapper','insertion','*Insert:*\x20%0','3678070rBzFhq','364601sDifIu','schema','get','markerRange','enableCommand','_splitMarkerName','ELEMENT_PARAGRAPH','$text','consumable','2396zHxAmN','ck-suggestion-marker-split','9AUdXyo','name','enableDefaultAttributesIntegration','includes','nodeAfter','isBlock','insertParagraph','paragraph','highest','getItemLabel','insert','registerElementLabel','10608eJwOje','addClass','isLimit','addMarker:suggestion:insertion','3777521iYchWi','type','Paragraph','TrackChangesEditing','1589ScWGJL','downcastDispatcher','toViewPosition','bindElementToMarker','descriptionFactory','*Change\x20to:*\x20%0','span','_registerLegacyDescription','afterInit','2294460wsrvpd','editing','options','checkChild','editor','isTouching','plugins','markerName','data','commandName','getFirstRange','activeMarkers','end','createUIElement','2xJeDxH','1945800dqLIcI'];_0x59d2=function(){return _0x25f810;};return _0x59d2();}import{getTranslation as _0x3f9f14}from'../utils/common-translations.js';export default class yt extends _0x2ff62f{[_0x3d489a(0x15c)](){const _0x5ec0b5=_0x3d489a,_0x31d8c8=this[_0x5ec0b5(0x161)];if(!_0x31d8c8[_0x5ec0b5(0x163)][_0x5ec0b5(0x179)](_0x5ec0b5(0x19b)))return;const _0x1db9d6=_0x31d8c8[_0x5ec0b5(0x16e)],_0x499cbf=_0x31d8c8[_0x5ec0b5(0x163)][_0x5ec0b5(0x180)](_0x5ec0b5(0x19c));_0x499cbf[_0x5ec0b5(0x1a1)][_0x5ec0b5(0x194)](_0x5ec0b5(0x190),_0x5bf805=>_0x3f9f14(_0x1db9d6,_0x5ec0b5(0x184),_0x5bf805)),_0x499cbf[_0x5ec0b5(0x18b)](_0x5ec0b5(0x190)),_0x499cbf[_0x5ec0b5(0x182)](_0x5ec0b5(0x18f)),_0x31d8c8[_0x5ec0b5(0x15e)][_0x5ec0b5(0x19e)]['on'](_0x5ec0b5(0x198),nr(_0x31d8c8),{'priority':_0x5ec0b5(0x191)}),_0x31d8c8[_0x5ec0b5(0x165)][_0x5ec0b5(0x19e)]['on'](_0x5ec0b5(0x198),(_0x37415d,_0x3c81d2,_0x762164)=>{const _0x5f0d20=_0x5ec0b5;_0x762164[_0x5f0d20(0x15f)][_0x5f0d20(0x16f)]&&nr(_0x31d8c8,{'showActiveMarker':!0x1})(_0x37415d,_0x3c81d2,_0x762164);},{'priority':_0x5ec0b5(0x191)});const _0xe79b02=_0x499cbf[_0x5ec0b5(0x1a1)];_0xe79b02[_0x5ec0b5(0x175)](_0x17e730=>{const _0x1fe59b=_0x5ec0b5;if(_0x1fe59b(0x17b)!==_0x17e730[_0x1fe59b(0x19a)])return;const {start:_0x3cf9af,end:_0x5803f1}=_0x17e730[_0x1fe59b(0x167)]();if(!_0x3cf9af[_0x1fe59b(0x162)](_0x5803f1)||!_0x3cf9af[_0x1fe59b(0x18d)])return;const _0x588e28=_0x31d8c8[_0x1fe59b(0x176)][_0x1fe59b(0x17f)],_0x33adbf=_0x3cf9af[_0x1fe59b(0x18d)];return _0x588e28[_0x1fe59b(0x18e)](_0x33adbf)&&!_0x588e28[_0x1fe59b(0x197)](_0x33adbf)&&_0x588e28[_0x1fe59b(0x160)](_0x33adbf,_0x1fe59b(0x185))?{'type':_0x1fe59b(0x17b),'content':_0x3f9f14(_0x1db9d6,_0x1fe59b(0x17c),_0xe79b02[_0x1fe59b(0x192)](_0x33adbf,0x1))}:void 0x0;}),this[_0x5ec0b5(0x1a4)]();}[_0x3d489a(0x1a4)](){const _0x1530d3=_0x3d489a,_0x2b320c=this[_0x1530d3(0x161)],_0x233c0e=_0x2b320c[_0x1530d3(0x16e)];_0x2b320c[_0x1530d3(0x163)][_0x1530d3(0x180)](_0x1530d3(0x19c))[_0x1530d3(0x1a1)][_0x1530d3(0x175)](_0x446e9f=>{const _0x2d5d90=_0x1530d3;if(_0x2d5d90(0x178)!=_0x446e9f[_0x2d5d90(0x19a)])return;const {data:_0x306c1a}=_0x446e9f;return _0x306c1a&&_0x2d5d90(0x190)==_0x306c1a[_0x2d5d90(0x166)]?{'type':_0x2d5d90(0x174),'content':_0x3f9f14(_0x233c0e,_0x2d5d90(0x1a2),_0x3f9f14(_0x233c0e,_0x2d5d90(0x184)))}:void 0x0;});}}function nr(_0x456656,{showActiveMarker:_0x4e67d2=!0x0}={}){return(_0xb62011,_0x5d2f95,_0x5672f2)=>{const _0x3113ca=_0x332a,_0x237009=_0x456656[_0x3113ca(0x163)][_0x3113ca(0x180)](_0x3113ca(0x19c)),_0x1d70d1=_0x5d2f95[_0x3113ca(0x181)][_0x3113ca(0x171)],_0x5f282e=_0x5d2f95[_0x3113ca(0x181)][_0x3113ca(0x169)],_0x2e1a93=_0x456656[_0x3113ca(0x176)][_0x3113ca(0x17f)];if(!_0x1d70d1[_0x3113ca(0x162)](_0x5f282e)||!_0x1d70d1[_0x3113ca(0x18d)])return;const _0x3cb057=_0x1d70d1[_0x3113ca(0x18d)];if(_0x2e1a93[_0x3113ca(0x18e)](_0x3cb057)&&!_0x2e1a93[_0x3113ca(0x197)](_0x3cb057)&&_0x2e1a93[_0x3113ca(0x160)](_0x3cb057,_0x3113ca(0x185))){if(!_0x5672f2[_0x3113ca(0x186)][_0x3113ca(0x177)](_0x5d2f95[_0x3113ca(0x181)],_0xb62011[_0x3113ca(0x18a)]))return;const {id:_0x30da5f,authorId:_0x5d492e}=_0x237009[_0x3113ca(0x183)](_0x5d2f95[_0x3113ca(0x164)]),_0x36f5be=_0x5672f2[_0x3113ca(0x173)][_0x3113ca(0x16a)](_0x3113ca(0x1a3),{'class':_0x3113ca(0x188),'data-suggestion':_0x30da5f,'data-author-id':_0x5d492e}),_0x271f08=_0x5672f2[_0x3113ca(0x17a)][_0x3113ca(0x19f)](_0x5f282e);_0x4e67d2&&_0x237009[_0x3113ca(0x168)][_0x3113ca(0x18c)](_0x5d2f95[_0x3113ca(0x164)])&&_0x5672f2[_0x3113ca(0x173)][_0x3113ca(0x196)](_0x3113ca(0x170),_0x36f5be),_0x5672f2[_0x3113ca(0x173)][_0x3113ca(0x193)](_0x271f08,_0x36f5be),_0x5672f2[_0x3113ca(0x17a)][_0x3113ca(0x1a0)](_0x36f5be,_0x5d2f95[_0x3113ca(0x164)]);}};}