@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.67 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 _0x1c98b1=_0x4c95;(function(_0x520cf9,_0x1f038c){const _0x2b6c5a=_0x4c95,_0x40f90b=_0x520cf9();while(!![]){try{const _0x240c8a=-parseInt(_0x2b6c5a(0x159))/0x1+-parseInt(_0x2b6c5a(0x147))/0x2*(-parseInt(_0x2b6c5a(0x187))/0x3)+parseInt(_0x2b6c5a(0x175))/0x4*(parseInt(_0x2b6c5a(0x19c))/0x5)+-parseInt(_0x2b6c5a(0x186))/0x6+parseInt(_0x2b6c5a(0x180))/0x7*(-parseInt(_0x2b6c5a(0x158))/0x8)+parseInt(_0x2b6c5a(0x155))/0x9+-parseInt(_0x2b6c5a(0x160))/0xa*(-parseInt(_0x2b6c5a(0x189))/0xb);if(_0x240c8a===_0x1f038c)break;else _0x40f90b['push'](_0x40f90b['shift']());}catch(_0x3f320e){_0x40f90b['push'](_0x40f90b['shift']());}}}(_0x2c77,0x25c33));import{View as _0x430e30,ViewCollection as _0x1dd302,FocusCycler as _0x3917c4}from'ckeditor5/src/ui.js';import{FocusTracker as _0x2591f7,KeystrokeHandler as _0x3b2959}from'ckeditor5/src/utils.js';import{AriaDescriptionView as _0x55571d,trimHtml as _0xe41dce}from'ckeditor5-collaboration/src/collaboration-core.js';function _0x2c77(){const _0xa2e74e=['formatDateTime','tab','name','stopListening','_setupKeyboardNavigation','visibleView','enter','focusCycler','disabledSubmit','ariaDescriptionView','EXTERNAL_COMMENT','isEditMode','focusFirst','6490HDFBhj','get','bind','text/html','delegate','COMMENT_ARIA_LABEL','_model','115366QSIgzw','@external','element','value','source','content','editorConfig','updateComment','createCollection','_config','added','collapse','render','isCollapsed','2148264QXHJxW','getUserViewNotificationText','remove','220552BToVTb','205821lSKPhz','set','isReadOnly','EXTERNAL_AVATAR','esc','submit','_createCommentInputView','3879550rrJAhh','change','textContent','focus','editorDestroyed','focusables','keystrokes','destroy','EXTERNAL_IMPORT_WORD_AVATAR','isExternal','importWord','parseFromString','removed','body','createEditor','submitLabel','switchToDisplayMode','switchToEditMode','ariaLabel','authoredAt','add','92zmCPsV','maxCommentCharsWhenCollapsed','locale','target','_createCommentContentView','Save','getExternalCommentNote','EXTERNAL_IMPORT_WORD_COMMENT','editorReady','once','author','77ihbiOE','expand','focusTracker','isSystemComment','creator','COMMENT_THREAD_DESCRIPTION','302598QpQaBu','3WwOTlC','cancel','11fpOlCg','fire','initialData','listenTo','shift+tab','attributes'];_0x2c77=function(){return _0xa2e74e;};return _0x2c77();}import _0x5b5958 from'./commentcontentview.js';import _0x20b193 from'./commentinputview.js';function _0x4c95(_0x5909d7,_0x43ea4e){const _0x2c776c=_0x2c77();return _0x4c95=function(_0x4c9564,_0x472bae){_0x4c9564=_0x4c9564-0x143;let _0x2aeedc=_0x2c776c[_0x4c9564];return _0x2aeedc;},_0x4c95(_0x5909d7,_0x43ea4e);}import{getTranslation as _0x5c3777}from'../../../utils/common-translations.js';export default class rs extends _0x430e30{constructor(_0x1ea2b2,_0x5b56a4,_0x56520a){const _0x3cc0fb=_0x4c95;super(_0x1ea2b2),this[_0x3cc0fb(0x146)]=_0x5b56a4,this[_0x3cc0fb(0x150)]=_0x56520a,this[_0x3cc0fb(0x183)]=!!this[_0x3cc0fb(0x150)][_0x3cc0fb(0x183)],this[_0x3cc0fb(0x15a)](_0x3cc0fb(0x19a),!0x1),this[_0x3cc0fb(0x15a)](_0x3cc0fb(0x154),!0x0),this[_0x3cc0fb(0x19e)](_0x3cc0fb(0x172))['to'](_0x5b56a4,_0x3cc0fb(0x14c),_0x5b56a4,_0x3cc0fb(0x173),(_0x4ac983,_0x23cb26)=>_0x5c3777(_0x1ea2b2,_0x3cc0fb(0x145),[_0x5b56a4[_0x3cc0fb(0x17f)][_0x3cc0fb(0x191)],_0x56520a[_0x3cc0fb(0x18f)](_0x23cb26),new DOMParser()[_0x3cc0fb(0x16b)](_0x4ac983,_0x3cc0fb(0x143))[_0x3cc0fb(0x16d)][_0x3cc0fb(0x162)],_0x5b56a4[_0x3cc0fb(0x169)]?this[_0x3cc0fb(0x17b)]():''])),this[_0x3cc0fb(0x198)]=new _0x55571d(_0x1ea2b2,_0x5c3777(_0x1ea2b2,_0x3cc0fb(0x185))),this[_0x3cc0fb(0x194)]=this[_0x3cc0fb(0x14f)](),this[_0x3cc0fb(0x194)][_0x3cc0fb(0x174)](this[_0x3cc0fb(0x179)]()),this[_0x3cc0fb(0x165)]=new _0x1dd302(),this[_0x3cc0fb(0x182)]=new _0x2591f7(),this[_0x3cc0fb(0x166)]=new _0x3b2959(),this[_0x3cc0fb(0x196)]=new _0x3917c4({'focusables':this[_0x3cc0fb(0x165)],'focusTracker':this[_0x3cc0fb(0x182)],'keystrokeHandler':this[_0x3cc0fb(0x166)],'keystrokeHandlerOptions':{'filter':_0x40ab41=>_0x40ab41[_0x3cc0fb(0x178)]!==this[_0x3cc0fb(0x149)]},'actions':{'focusPrevious':_0x3cc0fb(0x18d),'focusNext':_0x3cc0fb(0x190)}});}[_0x1c98b1(0x181)](){const _0x33c265=_0x1c98b1;this[_0x33c265(0x154)]=!0x1;}[_0x1c98b1(0x152)](){const _0x589b22=_0x1c98b1;this[_0x589b22(0x19a)]||(this[_0x589b22(0x154)]=!0x0);}[_0x1c98b1(0x163)](){const _0x3653e1=_0x1c98b1;this[_0x3653e1(0x149)][_0x3653e1(0x163)]();}[_0x1c98b1(0x153)](){const _0x3da8c8=_0x1c98b1;super[_0x3da8c8(0x153)](),this[_0x3da8c8(0x193)]();}async[_0x1c98b1(0x167)](){const _0x203a11=_0x1c98b1;await this[_0x203a11(0x194)][_0x203a11(0x19d)](0x0)[_0x203a11(0x167)](),super[_0x203a11(0x167)]();}[_0x1c98b1(0x171)](){const _0x42b18e=_0x1c98b1;this[_0x42b18e(0x19a)]||(this[_0x42b18e(0x19a)]=!0x0,this[_0x42b18e(0x194)][_0x42b18e(0x157)](0x0)[_0x42b18e(0x167)](),this[_0x42b18e(0x194)][_0x42b18e(0x174)](this[_0x42b18e(0x15f)]()));}[_0x1c98b1(0x170)](){const _0x100ee4=_0x1c98b1;this[_0x100ee4(0x19a)]&&(this[_0x100ee4(0x19a)]=!0x1,this[_0x100ee4(0x194)][_0x100ee4(0x157)](0x0)[_0x100ee4(0x167)](),this[_0x100ee4(0x194)][_0x100ee4(0x174)](this[_0x100ee4(0x179)]()));}[_0x1c98b1(0x17b)](){const _0x2147c4=_0x1c98b1;return _0x2147c4(0x16a)===this[_0x2147c4(0x146)][_0x2147c4(0x18e)][_0x2147c4(0x148)][_0x2147c4(0x14b)]?_0x5c3777(this[_0x2147c4(0x177)],_0x2147c4(0x17c)):_0x5c3777(this[_0x2147c4(0x177)],_0x2147c4(0x199));}[_0x1c98b1(0x156)](){const _0x21a750=_0x1c98b1;return this[_0x21a750(0x146)][_0x21a750(0x169)]?_0x21a750(0x16a)===this[_0x21a750(0x146)][_0x21a750(0x18e)][_0x21a750(0x148)][_0x21a750(0x14b)]?_0x5c3777(this[_0x21a750(0x177)],_0x21a750(0x168),this[_0x21a750(0x146)][_0x21a750(0x184)][_0x21a750(0x191)]):_0x5c3777(this[_0x21a750(0x177)],_0x21a750(0x15c),this[_0x21a750(0x146)][_0x21a750(0x184)][_0x21a750(0x191)]):null;}[_0x1c98b1(0x179)](){const _0xdbb76c=_0x1c98b1,_0x59a954=new _0x5b5958(this[_0xdbb76c(0x177)]);return _0x59a954[_0xdbb76c(0x19e)](_0xdbb76c(0x14c))['to'](this[_0xdbb76c(0x146)],_0xdbb76c(0x14c),this,_0xdbb76c(0x154),(_0xdfda34,_0x566be6)=>_0x566be6?_0xe41dce(_0xdfda34,{'limit':this[_0xdbb76c(0x150)][_0xdbb76c(0x176)]}):_0xdfda34),_0x59a954;}[_0x1c98b1(0x15f)](){const _0x312520=_0x1c98b1;this[_0x312520(0x150)][_0x312520(0x14d)]||(this[_0x312520(0x150)][_0x312520(0x14d)]={}),this[_0x312520(0x150)][_0x312520(0x14d)][_0x312520(0x18b)]=this[_0x312520(0x146)][_0x312520(0x14c)];const _0xbd6907=new _0x20b193(this[_0x312520(0x177)],this[_0x312520(0x150)][_0x312520(0x14d)]);return _0xbd6907[_0x312520(0x14a)]=this[_0x312520(0x146)][_0x312520(0x14c)],_0xbd6907[_0x312520(0x19e)](_0x312520(0x197))['to'](this[_0x312520(0x146)],_0x312520(0x15b)),_0xbd6907[_0x312520(0x16f)]=_0x5c3777(this[_0x312520(0x177)],_0x312520(0x17a)),_0xbd6907['on'](_0x312520(0x15e),(_0x211858,_0x35873f)=>{const _0x700b8b=_0x312520;this[_0x700b8b(0x18a)](_0x700b8b(0x14e),this[_0x700b8b(0x146)]['id'],_0x35873f),this[_0x700b8b(0x170)](),this[_0x700b8b(0x163)]();}),_0xbd6907['on'](_0x312520(0x188),()=>{const _0x3f5f3b=_0x312520;this[_0x3f5f3b(0x170)](),this[_0x3f5f3b(0x163)]();}),_0xbd6907[_0x312520(0x17e)](_0x312520(0x17d),()=>{const _0x5bd0c5=_0x312520;_0xbd6907[_0x5bd0c5(0x163)]();}),_0xbd6907[_0x312520(0x16e)](),_0xbd6907[_0x312520(0x144)](_0x312520(0x17d))['to'](this),_0xbd6907[_0x312520(0x144)](_0x312520(0x164))['to'](this),_0xbd6907;}[_0x1c98b1(0x193)](){const _0x67f53d=_0x1c98b1,_0x59a57a=this[_0x67f53d(0x149)];this[_0x67f53d(0x166)][_0x67f53d(0x18c)](_0x59a57a);for(const _0x25a01c of this[_0x67f53d(0x165)])this[_0x67f53d(0x182)][_0x67f53d(0x174)](_0x25a01c[_0x67f53d(0x149)]),this[_0x67f53d(0x166)][_0x67f53d(0x18c)](_0x25a01c[_0x67f53d(0x149)]);this[_0x67f53d(0x165)]['on'](_0x67f53d(0x161),(_0x5f0a2c,_0x3d57ea)=>{const _0x30b206=_0x67f53d;for(const _0x5414b0 of _0x3d57ea[_0x30b206(0x16c)])this[_0x30b206(0x182)][_0x30b206(0x157)](_0x5414b0[_0x30b206(0x149)]),this[_0x30b206(0x166)][_0x30b206(0x192)](_0x5414b0[_0x30b206(0x149)]);for(const _0x2cbbd2 of _0x3d57ea[_0x30b206(0x151)])this[_0x30b206(0x182)][_0x30b206(0x174)](_0x2cbbd2[_0x30b206(0x149)]),this[_0x30b206(0x166)][_0x30b206(0x18c)](_0x2cbbd2[_0x30b206(0x149)]);}),this[_0x67f53d(0x166)][_0x67f53d(0x15a)](_0x67f53d(0x195),(_0xc9216d,_0x2c6a33)=>{const _0x46ec71=_0x67f53d;_0x59a57a===_0xc9216d[_0x46ec71(0x178)]&&(this[_0x46ec71(0x196)][_0x46ec71(0x19b)](),_0x2c6a33());}),this[_0x67f53d(0x166)][_0x67f53d(0x15a)](_0x67f53d(0x15d),(_0x1d5b1b,_0x15d2bd)=>{const _0x3863f5=_0x67f53d;_0x59a57a!==_0x1d5b1b[_0x3863f5(0x178)]&&(this[_0x3863f5(0x163)](),_0x15d2bd());});}}