UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines • 10.5 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 _0x38411f=_0x463a;function _0x120b(){const _0x27d4be=['getMediaViewElement','trackChanges.preview.renderFunction','Dialog','getDefaultValues','getRootsAttributes','\x20ck-reset_all','_getMergeFieldsData','365352bWhNEb','classList','children','updatePosition','then','$defaultValues','getMergeFieldsIds','view','has','_sortRoots','attachToDom','detachFromDom','39GsHYwM','figure.media','set','item','1295cUNaUV','getAttribute','MergeFieldsEditing','reduce','values','568UAAICj','locale','getRootNames','previewDataReady','min','Final\x20content\x20preview','push','forEach','editor','1444ljjjMF','getBoundingClientRect','setPreviewData','plugins','querySelectorAll','MediaEmbedEditing','width','string','headerView','add','get','replaceWith','innerHTML','TrackChangesData','clientHeight','destroy','editables','height','once','value','show','createElement','finalContentPreview','ck-focused','contentView','remove','155079FwcejM','40347lzVDfU','ck-reset_all','bodyCollectionContainer','1083957SqbKhh','affectsData','$labels','1428996TlxtZW','2esOsVN','ck-media__wrapper','editing','sort','replace','ck-track-changes-preview-dialog','getDataSetValues','_standarizeRootsData','documentElement','290ceJQhh','getClientRects','innerHeight','entries','getDataWithAcceptedSuggestions','class','model','config','refresh','oembed','element','previewMode','12oVEQzt','getDomRoot','getLabel','_fixMediaEmbeds','isEnabled','registry','domConverter','url','document','editable','max','execute','classes','76571xFouwS','render','querySelector','div'];_0x120b=function(){return _0x27d4be;};return _0x120b();}(function(_0x488c9f,_0x1c1ed3){const _0x2e8105=_0x463a,_0x27f782=_0x488c9f();while(!![]){try{const _0x47f9be=-parseInt(_0x2e8105(0xcd))/0x1*(parseInt(_0x2e8105(0xd5))/0x2)+-parseInt(_0x2e8105(0x102))/0x3+-parseInt(_0x2e8105(0x120))/0x4*(parseInt(_0x2e8105(0x112))/0x5)+parseInt(_0x2e8105(0xea))/0x6*(parseInt(_0x2e8105(0xd1))/0x7)+parseInt(_0x2e8105(0x117))/0x8*(-parseInt(_0x2e8105(0xce))/0x9)+parseInt(_0x2e8105(0xde))/0xa*(parseInt(_0x2e8105(0xf7))/0xb)+-parseInt(_0x2e8105(0xd4))/0xc*(-parseInt(_0x2e8105(0x10e))/0xd);if(_0x47f9be===_0x1c1ed3)break;else _0x27f782['push'](_0x27f782['shift']());}catch(_0x433c6e){_0x27f782['push'](_0x27f782['shift']());}}}(_0x120b,0x2bfc5));import{Command as _0x3b2da3}from'ckeditor5/src/core.js';import{BodyCollection as _0x5acb1d}from'ckeditor5/src/ui.js';function _0x463a(_0xffd462,_0x2fbffc){const _0x120b27=_0x120b();return _0x463a=function(_0x463a4d,_0x20a03c){_0x463a4d=_0x463a4d-0xbd;let _0x44cb22=_0x120b27[_0x463a4d];return _0x44cb22;},_0x463a(_0xffd462,_0x2fbffc);}import{DowncastWriter as _0x14d311}from'ckeditor5/src/engine.js';import _0x4df376 from'../ui/view/trackchangespreviewview.js';import{getTranslation as _0x546bd0}from'../utils/common-translations.js';export default class re extends _0x3b2da3{constructor(_0x5dd36b){const _0x310b0c=_0x463a;super(_0x5dd36b),this[_0x310b0c(0xd2)]=!0x1,this[_0x310b0c(0xee)]=!0x0;}[_0x38411f(0xe6)](){const _0x2e235e=_0x38411f;this[_0x2e235e(0xee)]=!0x0;}[_0x38411f(0xf5)](){const _0x30898b=_0x38411f,_0x54ef69=this[_0x30898b(0x11f)],_0x291cc9=_0x54ef69[_0x30898b(0x118)],_0x17bd28=_0x54ef69[_0x30898b(0x123)][_0x30898b(0xbd)](_0x30898b(0xfd));let _0x3d53a3;const _0x1a2549=function(_0x1299a7){const _0x4f8827=_0x30898b,_0x3a34e5={};if(_0x4f8827(0xc3)in _0x1299a7['ui'][_0x4f8827(0x109)]){for(const [_0x3af8b1,_0x8d80c3]of Object[_0x4f8827(0xe1)](_0x1299a7['ui'][_0x4f8827(0x109)][_0x4f8827(0xc3)]))_0x3a34e5[_0x3af8b1]=_0x8d80c3[_0x4f8827(0xe8)];}else _0x3a34e5[_0x1299a7[_0x4f8827(0xe4)][_0x4f8827(0xf2)][_0x4f8827(0x119)]()[0x0]]=_0x1299a7['ui'][_0x4f8827(0x109)][_0x4f8827(0xf3)][_0x4f8827(0xe8)];return _0x3a34e5;}(_0x54ef69),_0x470f51=function(_0x25cc88){const _0x287078=_0x30898b;let _0x4c7544=0x0;for(const _0x2c3e2a of Object[_0x287078(0x116)](_0x25cc88))_0x4c7544=Math[_0x287078(0xf4)](_0x4c7544,_0x2c3e2a[_0x287078(0x121)]()[_0x287078(0x126)]);let _0x4830d7=0x0;for(const _0x3d4b2d of Object[_0x287078(0x116)](_0x25cc88))_0x4830d7+=_0x3d4b2d[_0x287078(0x121)]()[_0x287078(0xc4)];const _0x4688c1=0.8*Math[_0x287078(0xf4)](document[_0x287078(0xdd)][_0x287078(0xc1)],window[_0x287078(0xe0)]),_0x263787=Math[_0x287078(0x11b)](_0x4830d7,_0x4688c1);return{'width':_0x4c7544,'height':_0x263787};}(_0x1a2549);_0x17bd28[_0x30898b(0xc7)]({'id':_0x30898b(0xc9),'title':_0x546bd0(_0x291cc9,_0x30898b(0x11c)),'isModal':!0x0,'className':_0x30898b(0xda),'content':new _0x4df376(_0x291cc9,{'dialogRects':_0x470f51}),'onHide':()=>{const _0x550365=_0x30898b;_0x3d53a3[_0x550365(0x10d)]();},'onShow':()=>{const _0x140858=_0x30898b;_0x54ef69[_0x140858(0x123)][_0x140858(0xbd)](_0x140858(0xc0))[_0x140858(0xe2)]({...this[_0x140858(0x101)]()})[_0x140858(0x106)](_0xffaba8=>{const _0x694984=_0x140858,_0x42c850=this[_0x694984(0xdc)](_0xffaba8,_0x54ef69,_0x1a2549);_0x17bd28[_0x694984(0x109)][_0x694984(0xcb)][_0x694984(0x104)][_0x694984(0xbd)](0x0)[_0x694984(0x122)](_0x42c850,_0x54ef69[_0x694984(0xe5)][_0x694984(0xbd)](_0x694984(0xfc)));}),_0x3d53a3=new _0x5acb1d(_0x291cc9,[_0x17bd28[_0x140858(0x109)]]),_0x3d53a3[_0x140858(0x10c)](),_0x3d53a3[_0x140858(0xd0)][_0x140858(0x103)][_0x140858(0xcc)](_0x140858(0xcf)),_0x54ef69[_0x140858(0xc5)](_0x140858(0xc2),()=>{const _0x2c21f6=_0x140858;_0x3d53a3[_0x2c21f6(0x10d)]();});const _0x286d28=_0x17bd28[_0x140858(0x109)][_0x140858(0x128)][_0x140858(0xe3)];_0x17bd28[_0x140858(0x109)][_0x140858(0x128)][_0x140858(0xe3)]=_0x286d28?_0x286d28+_0x140858(0x100):_0x140858(0xcf),_0x17bd28[_0x140858(0x109)][_0x140858(0xcb)][_0x140858(0x104)][_0x140858(0xbd)](0x0)['on'](_0x140858(0x11a),()=>{const _0x43ff2e=_0x140858;_0x17bd28[_0x43ff2e(0x109)][_0x43ff2e(0x105)]();});}});}[_0x38411f(0x101)](){const _0x4dc734=_0x38411f;if(!this[_0x4dc734(0x11f)][_0x4dc734(0x123)][_0x4dc734(0x10a)](_0x4dc734(0x114)))return{};const _0x54bfec=this[_0x4dc734(0x11f)][_0x4dc734(0x123)][_0x4dc734(0xbd)](_0x4dc734(0x114)),_0x5334c4=_0x54bfec[_0x4dc734(0xe9)],_0x1eaa09={};if(_0x4dc734(0xd3)===_0x5334c4){for(const _0x33e12f of _0x54bfec[_0x4dc734(0x108)]())_0x1eaa09[_0x33e12f]=_0x54bfec[_0x4dc734(0xec)](_0x33e12f)||_0x33e12f;}else{const _0x5801cf=_0x4dc734(0x107)===_0x5334c4?_0x54bfec[_0x4dc734(0xfe)]():_0x54bfec[_0x4dc734(0xdb)](_0x5334c4,!0x0);for(const _0x3f77a7 of Object[_0x4dc734(0xe1)](_0x5801cf)){const [_0x1af151,_0x612eb5]=_0x3f77a7;_0x1eaa09[_0x1af151]=null!==_0x612eb5?_0x612eb5:_0x54bfec[_0x4dc734(0xec)](_0x1af151)||_0x1af151;}}return{'mergeFieldsData':_0x1eaa09};}[_0x38411f(0xdc)](_0x32ecfa,_0x422c77,_0xc47969){const _0x347ac4=_0x38411f;let _0x1dbdc4;if(_0x347ac4(0x127)==typeof _0x32ecfa){const _0x30f0de=_0x422c77[_0x347ac4(0xe4)][_0x347ac4(0xf2)][_0x347ac4(0x119)]()[0x0];_0x1dbdc4={[_0x30f0de]:_0x32ecfa};}else _0x1dbdc4=_0x32ecfa;const _0x210ed7=this[_0x347ac4(0xed)](_0x1dbdc4,_0x422c77),_0x56e119=function(_0x324275,_0x224d0d){const _0x516fc2=_0x347ac4;for(const [_0x5bd9d1,_0x348e05]of _0x324275)_0x348e05[_0x516fc2(0xf6)]=_0x224d0d[_0x5bd9d1][_0x516fc2(0x103)][_0x516fc2(0xc6)][_0x516fc2(0xd9)](_0x516fc2(0xca),'');return _0x324275;}(this[_0x347ac4(0x10b)](_0x422c77)[_0x347ac4(0x115)]((_0x5edba2,_0x115156)=>(_0x5edba2[_0x347ac4(0x11d)]([_0x115156,{'content':_0x210ed7[_0x115156],'classes':''}]),_0x5edba2),[]),_0xc47969);return _0x56e119;}[_0x38411f(0xed)](_0xafba15,_0x382c7c){const _0x2f21cf=_0x38411f;if(!_0x382c7c[_0x2f21cf(0x123)][_0x2f21cf(0x10a)](_0x2f21cf(0x125)))return _0xafba15;const _0x5de1bc=_0x382c7c[_0x2f21cf(0x123)][_0x2f21cf(0xbd)](_0x2f21cf(0x125));for(const [_0x3bb720,_0x1eeace]of Object[_0x2f21cf(0xe1)](_0xafba15)){const _0x4dcfcf=document[_0x2f21cf(0xc8)](_0x2f21cf(0xfa));_0x4dcfcf[_0x2f21cf(0xbf)]=_0x1eeace,(_0x4dcfcf[_0x2f21cf(0x124)](_0x2f21cf(0x10f))[_0x2f21cf(0x11e)](_0x314628=>{const _0x1eb772=_0x2f21cf,_0x41fbb0=_0x314628[_0x1eb772(0xf9)](_0x1eb772(0xe7));if(_0x41fbb0){const _0x4f209c=_0x41fbb0[_0x1eb772(0x113)](_0x1eb772(0xf1));if(_0x4f209c){const _0x5ec6d8=_0x5de1bc[_0x1eb772(0xef)][_0x1eb772(0xfb)](new _0x14d311(_0x382c7c[_0x1eb772(0xd7)][_0x1eb772(0x109)][_0x1eb772(0xf2)]),_0x4f209c,{'elementName':'','renderForEditingView':!0x0}),_0x2218be=document[_0x1eb772(0xc8)](_0x1eb772(0xfa));_0x2218be[_0x1eb772(0x103)][_0x1eb772(0x129)](_0x1eb772(0xd6)),_0x5ec6d8[_0x1eb772(0xf8)](_0x2218be,_0x382c7c[_0x1eb772(0xd7)][_0x1eb772(0x109)][_0x1eb772(0xf0)]),_0x41fbb0[_0x1eb772(0xbe)](_0x2218be);}}}),_0xafba15[_0x3bb720]=_0x4dcfcf[_0x2f21cf(0xbf)]);}return _0xafba15;}[_0x38411f(0x10b)](_0x5ead83){const _0x3144d1=_0x38411f;if(!function(_0x2c2380){const _0x3e970b=_0x463a;return void 0x0!==_0x2c2380[_0x3e970b(0xff)];}(_0x5ead83))return _0x5ead83[_0x3144d1(0xe4)][_0x3144d1(0xf2)][_0x3144d1(0x119)]();const _0x372a16=[],_0x1eecd6=new Map();for(const _0x4c5663 of _0x5ead83[_0x3144d1(0xe4)][_0x3144d1(0xf2)][_0x3144d1(0x119)]()){const _0xd55a86=_0x5ead83[_0x3144d1(0xd7)][_0x3144d1(0x109)][_0x3144d1(0xeb)](_0x4c5663)[_0x3144d1(0xdf)]()[_0x3144d1(0x111)](0x0);_0x372a16[_0x3144d1(0x11d)](_0x4c5663),_0x1eecd6[_0x3144d1(0x110)](_0x4c5663,_0xd55a86);}return _0x372a16[_0x3144d1(0xd8)]((_0x628ffe,_0x47f5d0)=>{const _0x24b413=_0x3144d1,_0x48b9f1=_0x1eecd6[_0x24b413(0xbd)](_0x628ffe),_0xbd3260=_0x1eecd6[_0x24b413(0xbd)](_0x47f5d0);return _0x48b9f1['y']-_0xbd3260['y']||_0x48b9f1['x']-_0xbd3260['x'];}),_0x372a16;}}