UNPKG

@ckeditor/ckeditor5-track-changes

Version:

CKEditor 5 track changes plugin.

23 lines 9.07 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 _0x54e377=_0x4fea;(function(_0x2f6702,_0x273788){const _0x4cea62=_0x4fea,_0x143190=_0x2f6702();while(!![]){try{const _0x499f5f=parseInt(_0x4cea62(0x163))/0x1+-parseInt(_0x4cea62(0x17b))/0x2*(-parseInt(_0x4cea62(0x16a))/0x3)+-parseInt(_0x4cea62(0x166))/0x4+parseInt(_0x4cea62(0x151))/0x5*(-parseInt(_0x4cea62(0x17c))/0x6)+parseInt(_0x4cea62(0x127))/0x7+parseInt(_0x4cea62(0x15b))/0x8+-parseInt(_0x4cea62(0x158))/0x9;if(_0x499f5f===_0x273788)break;else _0x143190['push'](_0x143190['shift']());}catch(_0x2e4e47){_0x143190['push'](_0x143190['shift']());}}}(_0x2549,0x4a08c));import{FocusTracker as _0x41c848,KeystrokeHandler as _0x30bd98}from'ckeditor5/src/utils.js';import{View as _0x237440,ViewCollection as _0x54c6bb,FocusCycler as _0x4708e4}from'ckeditor5/src/ui.js';function _0x2549(){const _0x17b7d4=['_model','Discard\x20suggestion','ck-annotation__content-wrapper','focusCycler','shift+tab','add','tab','ck-comment__info-time','push','ck-suggestion__main','ck-comment__external','EXTERNAL_IMPORT_WORD_SUGGESTION','presentation','discardSuggestion','focusFirst','span','298120nfVvjz','ck-suggestion__info','enter','setTemplate','EXTERNAL_IMPORT_WORD_AVATAR','div','@external','2622636exbDjx','keystrokes','_createButton','1734352kEwTVf','isExternal','set','focusTracker','ck-annotation','authoredAt','change:description','getTemplate','209097NutsGX','ck-annotation__info','ck-suggestion__info-name','1630812ZqyDQd','render','focus','esc','3SdWdKu','name','ck-annotation__user','listenTo','source','acceptButton','acceptSuggestion','author','_config','ck-annotation__actions','importWord','getUserViewNotificationText','EXTERNAL_SUGGESTION','ck-suggestion__actions','focusables','querySelector','attributes','240936roeFdF','6eViLgK','bind','discardButton','3609312FRScuy','ck-suggestion__user','ck-suggestion','description','fire','extendTemplate','time','ck-suggestion--discard','ck-annotation__main','ck-suggestion--accept','bindTemplate','userView','getExternalSuggestionNote','innerHTML','formatDateTime','Accept\x20suggestion','EXTERNAL_AVATAR','locale','execute','.ck-annotation__content-wrapper','element','ck-annotation__info-name','ck-annotation__info-time','_setupKeyboardNavigation','creator','target'];_0x2549=function(){return _0x17b7d4;};return _0x2549();}function _0x4fea(_0x22534c,_0x398554){const _0x2549ad=_0x2549();return _0x4fea=function(_0x4fea79,_0x3468a3){_0x4fea79=_0x4fea79-0x125;let _0x907c92=_0x2549ad[_0x4fea79];return _0x907c92;},_0x4fea(_0x22534c,_0x398554);}import{LateFocusButtonView as _0x72d373,UserView as _0x1d4c00}from'ckeditor5-collaboration/src/collaboration-core.js';import{IconCancel as _0x41d0ae,IconCheck as _0x5d0fa0}from'ckeditor5/src/icons.js';import{getTranslation as _0x1f9a02}from'../../utils/common-translations.js';export default class we extends _0x237440{[_0x54e377(0x132)];[_0x54e377(0x16f)];[_0x54e377(0x126)];[_0x54e377(0x178)];[_0x54e377(0x15e)];[_0x54e377(0x159)];[_0x54e377(0x144)];[_0x54e377(0x141)];[_0x54e377(0x172)];constructor(_0x4be6bf,_0x36c598,_0x258659){const _0x336566=_0x54e377;super(_0x4be6bf),this[_0x336566(0x141)]=_0x36c598,this[_0x336566(0x172)]=_0x258659,this[_0x336566(0x15d)](_0x336566(0x12a),''),this[_0x336566(0x125)](_0x336566(0x160))['to'](_0x36c598),this[_0x336566(0x16f)]=this[_0x336566(0x15a)](_0x1f9a02(_0x4be6bf,_0x336566(0x136)),_0x5d0fa0,_0x336566(0x130),_0x336566(0x170),'sw'),this[_0x336566(0x126)]=this[_0x336566(0x15a)](_0x1f9a02(_0x4be6bf,_0x336566(0x142)),_0x41d0ae,_0x336566(0x12e),_0x336566(0x14e),'sw'),this[_0x336566(0x132)]=new _0x1d4c00(_0x4be6bf,_0x36c598[_0x336566(0x171)],this[_0x336566(0x175)]()),this[_0x336566(0x132)][_0x336566(0x12c)]({'attributes':{'class':[_0x336566(0x128),_0x336566(0x16c)],'aria-hidden':!0x0}}),this[_0x336566(0x178)]=new _0x54c6bb([this[_0x336566(0x16f)],this[_0x336566(0x126)]]),this[_0x336566(0x15e)]=new _0x41c848(),this[_0x336566(0x159)]=new _0x30bd98(),this[_0x336566(0x144)]=new _0x4708e4({'focusables':this[_0x336566(0x178)],'focusTracker':this[_0x336566(0x15e)],'keystrokeHandler':this[_0x336566(0x159)],'actions':{'focusPrevious':_0x336566(0x145),'focusNext':_0x336566(0x147)},'keystrokeHandlerOptions':{'filter':_0x2e9d47=>_0x2e9d47[_0x336566(0x140)]!==this[_0x336566(0x13b)]}}),this[_0x336566(0x154)](this[_0x336566(0x162)]());}[_0x54e377(0x167)](){const _0x54ef96=_0x54e377;super[_0x54ef96(0x167)]();const _0x8f2e4c=this[_0x54ef96(0x13b)][_0x54ef96(0x179)](_0x54ef96(0x13a));_0x8f2e4c[_0x54ef96(0x134)]=this[_0x54ef96(0x12a)],this['on'](_0x54ef96(0x161),(_0x5f12df,_0x380f49,_0x5f3d40)=>{const _0x59d9eb=_0x54ef96;_0x8f2e4c[_0x59d9eb(0x134)]=_0x5f3d40;}),this[_0x54ef96(0x13e)]();}[_0x54e377(0x162)](){const _0x42a021=_0x54e377,_0x156c35=this[_0x42a021(0x131)],_0x522b75=[{'tag':_0x42a021(0x156),'attributes':{'class':[_0x42a021(0x152),_0x42a021(0x164)]},'children':[{'tag':_0x42a021(0x150),'children':[{'text':this[_0x42a021(0x132)][_0x42a021(0x16b)]}],'attributes':{'class':[_0x42a021(0x165),_0x42a021(0x13c)],'data-cke-tooltip-text':this[_0x42a021(0x132)][_0x42a021(0x16b)]}},{'tag':_0x42a021(0x12d),'attributes':{'datetime':_0x156c35['to'](_0x42a021(0x160)),'class':[_0x42a021(0x148),_0x42a021(0x13d)]},'children':[{'text':_0x156c35['to'](_0x42a021(0x160),_0x2fb00f=>this[_0x42a021(0x172)][_0x42a021(0x135)](_0x2fb00f))}]}]},{'tag':_0x42a021(0x156),'attributes':{'class':[_0x42a021(0x177),_0x42a021(0x173)]},'children':[this[_0x42a021(0x16f)],this[_0x42a021(0x126)]]},{'tag':_0x42a021(0x156),'attributes':{'class':[_0x42a021(0x143)]}}];return this[_0x42a021(0x141)][_0x42a021(0x15c)]&&_0x522b75[_0x42a021(0x149)]({'tag':_0x42a021(0x156),'attributes':{'class':[_0x42a021(0x14b)]},'children':[{'text':this[_0x42a021(0x133)]()}]}),{'tag':_0x42a021(0x156),'attributes':{'class':[_0x42a021(0x129),_0x42a021(0x15f)],'tabindex':-0x1},'children':[this[_0x42a021(0x132)],{'tag':_0x42a021(0x156),'attributes':{'class':[_0x42a021(0x14a),_0x42a021(0x12f)],'role':_0x42a021(0x14d)},'children':_0x522b75}]};}[_0x54e377(0x168)](){const _0x558aa9=_0x54e377;this[_0x558aa9(0x13b)][_0x558aa9(0x168)]();}[_0x54e377(0x175)](){const _0x3585a5=_0x54e377;return this[_0x3585a5(0x141)][_0x3585a5(0x15c)]?_0x3585a5(0x174)===this[_0x3585a5(0x141)][_0x3585a5(0x17a)][_0x3585a5(0x157)][_0x3585a5(0x16e)]?_0x1f9a02(this[_0x3585a5(0x138)],_0x3585a5(0x155),this[_0x3585a5(0x141)][_0x3585a5(0x13f)][_0x3585a5(0x16b)]):_0x1f9a02(this[_0x3585a5(0x138)],_0x3585a5(0x137),this[_0x3585a5(0x141)][_0x3585a5(0x13f)][_0x3585a5(0x16b)]):null;}[_0x54e377(0x133)](){const _0x25d2eb=_0x54e377;return _0x25d2eb(0x174)===this[_0x25d2eb(0x141)][_0x25d2eb(0x17a)][_0x25d2eb(0x157)][_0x25d2eb(0x16e)]?_0x1f9a02(this[_0x25d2eb(0x138)],_0x25d2eb(0x14c)):_0x1f9a02(this[_0x25d2eb(0x138)],_0x25d2eb(0x176));}[_0x54e377(0x15a)](_0x436987,_0x2be741,_0x26e94b,_0x5aea99,_0x54b1e0){const _0x307bfd=_0x54e377,_0x44787f=new _0x72d373(this[_0x307bfd(0x138)]);return _0x44787f[_0x307bfd(0x15d)]({'label':_0x436987,'icon':_0x2be741,'tooltip':!0x0,'tooltipPosition':_0x54b1e0}),_0x44787f[_0x307bfd(0x12c)]({'attributes':{'class':_0x26e94b}}),_0x44787f['on'](_0x307bfd(0x139),()=>{const _0x2a5bc4=_0x307bfd;this[_0x2a5bc4(0x12b)](_0x5aea99,this[_0x2a5bc4(0x141)]['id']);}),_0x44787f;}[_0x54e377(0x13e)](){const _0x58c094=_0x54e377,_0x201e45=this[_0x58c094(0x13b)];this[_0x58c094(0x159)][_0x58c094(0x16d)](_0x201e45);for(const _0x4eb00f of this[_0x58c094(0x178)])this[_0x58c094(0x15e)][_0x58c094(0x146)](_0x4eb00f[_0x58c094(0x13b)]),this[_0x58c094(0x159)][_0x58c094(0x16d)](_0x4eb00f[_0x58c094(0x13b)]);this[_0x58c094(0x159)][_0x58c094(0x15d)](_0x58c094(0x153),(_0x20d124,_0x4c9454)=>{const _0x3efc4b=_0x58c094;_0x201e45===_0x20d124[_0x3efc4b(0x140)]&&(this[_0x3efc4b(0x144)][_0x3efc4b(0x14f)](),_0x4c9454());}),this[_0x58c094(0x159)][_0x58c094(0x15d)](_0x58c094(0x169),(_0x2bbf7a,_0x2854a6)=>{const _0xaf38fd=_0x58c094;_0x201e45!==_0x2bbf7a[_0xaf38fd(0x140)]&&(this[_0xaf38fd(0x168)](),_0x2854a6());});}}