@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.82 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 _0xed262d=_0x2c2b;function _0x2c2b(_0x4e7c08,_0x9ad70a){const _0x2fff05=_0x2fff();return _0x2c2b=function(_0x2c2b37,_0x7f3259){_0x2c2b37=_0x2c2b37-0x16b;let _0x51573e=_0x2fff05[_0x2c2b37];return _0x51573e;},_0x2c2b(_0x4e7c08,_0x9ad70a);}(function(_0x298d42,_0x466613){const _0x5cd6ec=_0x2c2b,_0x38d41c=_0x298d42();while(!![]){try{const _0x399133=parseInt(_0x5cd6ec(0x18d))/0x1*(parseInt(_0x5cd6ec(0x18e))/0x2)+parseInt(_0x5cd6ec(0x1b8))/0x3+parseInt(_0x5cd6ec(0x16d))/0x4+-parseInt(_0x5cd6ec(0x1b4))/0x5*(-parseInt(_0x5cd6ec(0x185))/0x6)+-parseInt(_0x5cd6ec(0x1b9))/0x7*(-parseInt(_0x5cd6ec(0x188))/0x8)+parseInt(_0x5cd6ec(0x173))/0x9*(parseInt(_0x5cd6ec(0x1c4))/0xa)+-parseInt(_0x5cd6ec(0x16c))/0xb;if(_0x399133===_0x466613)break;else _0x38d41c['push'](_0x38d41c['shift']());}catch(_0x444bd0){_0x38d41c['push'](_0x38d41c['shift']());}}}(_0x2fff,0xd8d86));import{View as _0x1972ce,ViewCollection as _0x20d162,FocusCycler as _0x1add6c}from'ckeditor5/src/ui.js';import{FocusTracker as _0x39d8cc,KeystrokeHandler as _0x5ba417}from'ckeditor5/src/utils.js';import{AriaDescriptionView as _0x286cf6,trimHtml as _0x3295cc}from'ckeditor5-collaboration/src/collaboration-core.js';import _0x5770d4 from'./commentcontentview.js';import _0x4699ac from'./commentinputview.js';function _0x2fff(){const _0x310043=['value','ariaDescriptionView','editorConfig','3524778vhtlHE','42avDfOq','cancel','textContent','EXTERNAL_IMPORT_WORD_COMMENT','switchToDisplayMode','isExternal','body','isSystemComment','tab','locale','change','260emGdce','_model','enter','attributes','56213641rHAXhf','4446332LEazIn','expand','set','add','authoredAt','EXTERNAL_COMMENT','416385eNbQsD','content','author','COMMENT_ARIA_LABEL','_config','importWord','focusCycler','listenTo','EXTERNAL_AVATAR','render','stopListening','keystrokes','esc','element','removed','_setupKeyboardNavigation','submitLabel','added','209190mDbekw','isReadOnly','focus','932344ZJsjth','updateComment','createEditor','destroy','editorReady','1901fzlrFy','1574WoJQTi','collapse','name','fire','source','Save','maxCommentCharsWhenCollapsed','@external','editorDestroyed','focusFirst','_createCommentInputView','creator','isCollapsed','COMMENT_THREAD_DESCRIPTION','_createCommentContentView','delegate','parseFromString','text/html','initialData','visibleView','remove','get','bind','getExternalCommentNote','createCollection','focusTracker','formatDateTime','target','switchToEditMode','submit','focusables','isEditMode','EXTERNAL_IMPORT_WORD_AVATAR','ariaLabel','once','disabledSubmit','getUserViewNotificationText','shift+tab','45oipWTL'];_0x2fff=function(){return _0x310043;};return _0x2fff();}import{getTranslation as _0x209acf}from'../../../utils/common-translations.js';export default class hs extends _0x1972ce{[_0xed262d(0x1a1)];[_0xed262d(0x1b6)];[_0xed262d(0x1ac)];[_0xed262d(0x1a7)];[_0xed262d(0x17e)];[_0xed262d(0x179)];[_0xed262d(0x1c5)];[_0xed262d(0x177)];constructor(_0x1d59b5,_0x100a8,_0x29af5c){const _0x5c1791=_0xed262d;super(_0x1d59b5),this[_0x5c1791(0x1c5)]=_0x100a8,this[_0x5c1791(0x177)]=_0x29af5c,this[_0x5c1791(0x1c0)]=!!this[_0x5c1791(0x177)][_0x5c1791(0x1c0)],this[_0x5c1791(0x16f)](_0x5c1791(0x1ad),!0x1),this[_0x5c1791(0x16f)](_0x5c1791(0x19a),!0x0),this[_0x5c1791(0x1a4)](_0x5c1791(0x1af))['to'](_0x100a8,_0x5c1791(0x174),_0x100a8,_0x5c1791(0x171),(_0x1bfcad,_0x120bad)=>_0x209acf(_0x1d59b5,_0x5c1791(0x176),[_0x100a8[_0x5c1791(0x175)][_0x5c1791(0x190)],_0x29af5c[_0x5c1791(0x1a8)](_0x120bad),new DOMParser()[_0x5c1791(0x19e)](_0x1bfcad,_0x5c1791(0x19f))[_0x5c1791(0x1bf)][_0x5c1791(0x1bb)],_0x100a8[_0x5c1791(0x1be)]?this[_0x5c1791(0x1a5)]():''])),this[_0x5c1791(0x1b6)]=new _0x286cf6(_0x1d59b5,_0x209acf(_0x1d59b5,_0x5c1791(0x19b))),this[_0x5c1791(0x1a1)]=this[_0x5c1791(0x1a6)](),this[_0x5c1791(0x1a1)][_0x5c1791(0x170)](this[_0x5c1791(0x19c)]()),this[_0x5c1791(0x1ac)]=new _0x20d162(),this[_0x5c1791(0x1a7)]=new _0x39d8cc(),this[_0x5c1791(0x17e)]=new _0x5ba417(),this[_0x5c1791(0x179)]=new _0x1add6c({'focusables':this[_0x5c1791(0x1ac)],'focusTracker':this[_0x5c1791(0x1a7)],'keystrokeHandler':this[_0x5c1791(0x17e)],'keystrokeHandlerOptions':{'filter':_0x329abc=>_0x329abc[_0x5c1791(0x1a9)]!==this[_0x5c1791(0x180)]},'actions':{'focusPrevious':_0x5c1791(0x1b3),'focusNext':_0x5c1791(0x1c1)}});}[_0xed262d(0x16e)](){const _0x109f77=_0xed262d;this[_0x109f77(0x19a)]=!0x1;}[_0xed262d(0x18f)](){const _0x336b73=_0xed262d;this[_0x336b73(0x1ad)]||(this[_0x336b73(0x19a)]=!0x0);}[_0xed262d(0x187)](){const _0x1f93cf=_0xed262d;this[_0x1f93cf(0x180)][_0x1f93cf(0x187)]();}[_0xed262d(0x17c)](){const _0x1c38ee=_0xed262d;super[_0x1c38ee(0x17c)](),this[_0x1c38ee(0x182)]();}async[_0xed262d(0x18b)](){const _0x18e2e3=_0xed262d;await this[_0x18e2e3(0x1a1)][_0x18e2e3(0x1a3)](0x0)[_0x18e2e3(0x18b)](),super[_0x18e2e3(0x18b)]();}[_0xed262d(0x1aa)](){const _0x3eb907=_0xed262d;this[_0x3eb907(0x1ad)]||(this[_0x3eb907(0x1ad)]=!0x0,this[_0x3eb907(0x1a1)][_0x3eb907(0x1a2)](0x0)[_0x3eb907(0x18b)](),this[_0x3eb907(0x1a1)][_0x3eb907(0x170)](this[_0x3eb907(0x198)]()));}[_0xed262d(0x1bd)](){const _0x518748=_0xed262d;this[_0x518748(0x1ad)]&&(this[_0x518748(0x1ad)]=!0x1,this[_0x518748(0x1a1)][_0x518748(0x1a2)](0x0)[_0x518748(0x18b)](),this[_0x518748(0x1a1)][_0x518748(0x170)](this[_0x518748(0x19c)]()));}[_0xed262d(0x1a5)](){const _0x3e091a=_0xed262d;return _0x3e091a(0x178)===this[_0x3e091a(0x1c5)][_0x3e091a(0x16b)][_0x3e091a(0x195)][_0x3e091a(0x192)]?_0x209acf(this[_0x3e091a(0x1c2)],_0x3e091a(0x1bc)):_0x209acf(this[_0x3e091a(0x1c2)],_0x3e091a(0x172));}[_0xed262d(0x1b2)](){const _0x1f4d00=_0xed262d;return this[_0x1f4d00(0x1c5)][_0x1f4d00(0x1be)]?_0x1f4d00(0x178)===this[_0x1f4d00(0x1c5)][_0x1f4d00(0x16b)][_0x1f4d00(0x195)][_0x1f4d00(0x192)]?_0x209acf(this[_0x1f4d00(0x1c2)],_0x1f4d00(0x1ae),this[_0x1f4d00(0x1c5)][_0x1f4d00(0x199)][_0x1f4d00(0x190)]):_0x209acf(this[_0x1f4d00(0x1c2)],_0x1f4d00(0x17b),this[_0x1f4d00(0x1c5)][_0x1f4d00(0x199)][_0x1f4d00(0x190)]):null;}[_0xed262d(0x19c)](){const _0x52c931=_0xed262d,_0x6b7d35=new _0x5770d4(this[_0x52c931(0x1c2)]);return _0x6b7d35[_0x52c931(0x1a4)](_0x52c931(0x174))['to'](this[_0x52c931(0x1c5)],_0x52c931(0x174),this,_0x52c931(0x19a),(_0x5574b5,_0x4cc321)=>_0x4cc321?_0x3295cc(_0x5574b5,{'limit':this[_0x52c931(0x177)][_0x52c931(0x194)]}):_0x5574b5),_0x6b7d35;}[_0xed262d(0x198)](){const _0x4d1dea=_0xed262d;this[_0x4d1dea(0x177)][_0x4d1dea(0x1b7)]||(this[_0x4d1dea(0x177)][_0x4d1dea(0x1b7)]={}),this[_0x4d1dea(0x177)][_0x4d1dea(0x1b7)][_0x4d1dea(0x1a0)]=this[_0x4d1dea(0x1c5)][_0x4d1dea(0x174)];const _0x488713=new _0x4699ac(this[_0x4d1dea(0x1c2)],this[_0x4d1dea(0x177)][_0x4d1dea(0x1b7)]);return _0x488713[_0x4d1dea(0x1b5)]=this[_0x4d1dea(0x1c5)][_0x4d1dea(0x174)],_0x488713[_0x4d1dea(0x1a4)](_0x4d1dea(0x1b1))['to'](this[_0x4d1dea(0x1c5)],_0x4d1dea(0x186)),_0x488713[_0x4d1dea(0x183)]=_0x209acf(this[_0x4d1dea(0x1c2)],_0x4d1dea(0x193)),_0x488713['on'](_0x4d1dea(0x1ab),(_0x26ea09,_0x7937fa)=>{const _0x209a13=_0x4d1dea;this[_0x209a13(0x191)](_0x209a13(0x189),this[_0x209a13(0x1c5)]['id'],_0x7937fa),this[_0x209a13(0x1bd)](),this[_0x209a13(0x187)]();}),_0x488713['on'](_0x4d1dea(0x1ba),()=>{const _0x1f567a=_0x4d1dea;this[_0x1f567a(0x1bd)](),this[_0x1f567a(0x187)]();}),_0x488713[_0x4d1dea(0x1b0)](_0x4d1dea(0x18c),()=>{const _0x52200c=_0x4d1dea;_0x488713[_0x52200c(0x187)]();}),_0x488713[_0x4d1dea(0x18a)](),_0x488713[_0x4d1dea(0x19d)](_0x4d1dea(0x18c))['to'](this),_0x488713[_0x4d1dea(0x19d)](_0x4d1dea(0x196))['to'](this),_0x488713;}[_0xed262d(0x182)](){const _0x37f385=_0xed262d,_0x5e9418=this[_0x37f385(0x180)];this[_0x37f385(0x17e)][_0x37f385(0x17a)](_0x5e9418);for(const _0x4d1782 of this[_0x37f385(0x1ac)])this[_0x37f385(0x1a7)][_0x37f385(0x170)](_0x4d1782[_0x37f385(0x180)]),this[_0x37f385(0x17e)][_0x37f385(0x17a)](_0x4d1782[_0x37f385(0x180)]);this[_0x37f385(0x1ac)]['on'](_0x37f385(0x1c3),(_0x41b208,_0x4f6ad4)=>{const _0x2ed588=_0x37f385;for(const _0x12ff54 of _0x4f6ad4[_0x2ed588(0x181)])this[_0x2ed588(0x1a7)][_0x2ed588(0x1a2)](_0x12ff54[_0x2ed588(0x180)]),this[_0x2ed588(0x17e)][_0x2ed588(0x17d)](_0x12ff54[_0x2ed588(0x180)]);for(const _0x491b19 of _0x4f6ad4[_0x2ed588(0x184)])this[_0x2ed588(0x1a7)][_0x2ed588(0x170)](_0x491b19[_0x2ed588(0x180)]),this[_0x2ed588(0x17e)][_0x2ed588(0x17a)](_0x491b19[_0x2ed588(0x180)]);}),this[_0x37f385(0x17e)][_0x37f385(0x16f)](_0x37f385(0x1c6),(_0x31617f,_0x8a9641)=>{const _0x32b39d=_0x37f385;_0x5e9418===_0x31617f[_0x32b39d(0x1a9)]&&(this[_0x32b39d(0x179)][_0x32b39d(0x197)](),_0x8a9641());}),this[_0x37f385(0x17e)][_0x37f385(0x16f)](_0x37f385(0x17f),(_0x522d17,_0x49d654)=>{const _0x1a4f61=_0x37f385;_0x5e9418!==_0x522d17[_0x1a4f61(0x1a9)]&&(this[_0x1a4f61(0x187)](),_0x49d654());});}}