@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.52 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 _0x24ecce=_0x54d1;(function(_0x31de3f,_0x23debe){const _0x3a9bf9=_0x54d1,_0x2738c8=_0x31de3f();while(!![]){try{const _0x4493c7=-parseInt(_0x3a9bf9(0x146))/0x1+parseInt(_0x3a9bf9(0x157))/0x2*(-parseInt(_0x3a9bf9(0x132))/0x3)+-parseInt(_0x3a9bf9(0x150))/0x4+parseInt(_0x3a9bf9(0x149))/0x5*(parseInt(_0x3a9bf9(0x131))/0x6)+-parseInt(_0x3a9bf9(0x14f))/0x7+parseInt(_0x3a9bf9(0x12c))/0x8+parseInt(_0x3a9bf9(0x14b))/0x9;if(_0x4493c7===_0x23debe)break;else _0x2738c8['push'](_0x2738c8['shift']());}catch(_0x53f6bf){_0x2738c8['push'](_0x2738c8['shift']());}}}(_0x2113,0xbf46b));import{ContextPlugin as _0x41bc10,Editor as _0x238bab}from'ckeditor5/src/core.js';import{first as _0x21cb75}from'ckeditor5/src/utils.js';import{Annotation as _0x4f97a4}from'./annotation.js';import{AnnotationCollection as _0x113629}from'./annotationcollection.js';import{AnnotationView as _0x253ccb}from'./view/annotationview.js';import{getTranslation as _0x5f31df}from'../utils/common-translations.js';function _0x54d1(_0x541174,_0x47f983){const _0x211321=_0x2113();return _0x54d1=function(_0x54d130,_0x3359d4){_0x54d130=_0x54d130-0x129;let _0xae75d7=_0x211321[_0x54d130];return _0xae75d7;},_0x54d1(_0x541174,_0x47f983);}function _0x2113(){const _0x4d08d6=['_deactivateAllAnnotations','Ctrl+Enter','isVisible','annotations','ACCESSIBILITY_HELP_ANNOTATIONS_EXIT','ACCESSIBILITY_HELP_ANNOTATIONS_GROUP','Shift+Tab','_addActiveAnnotation','delete','1257329giPmHm','createAnnotation','ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS','615970wUBXhv','keystrokes','23106303ylBExT','_bindAnnotationsToVisibleAnnotations','source','_setupEscapeAnnotationHandling','5613454pqqLkZ','991916fViONQ','Esc','collection','fire','ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO','has','_removeActiveAnnotation','4ORazFV','isOfficialPlugin','focusTracker','editors','remove','isPremiumPlugin','push','getByInnerView','Annotations','Arrowdown','accessibility','_setupEnterAnnotationKeystroke','ready','createAnnotationView','deactivateAll','Ctrl+Shift+E','refreshVisibility','ACCESSIBILITY_HELP_ANNOTATIONS_ENTER','element','contains','Tab','low','ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS','_visibleAnnotations','context','view','activate','_activateAnnotation','refreshPositioning','values','escape','editing','activeAnnotations','destroy','domRoots','2669376PqYBPD','listenTo','add','target','locale','24ILRmTw','454677maPIYL','addKeystrokeInfoGroup','stopListening','focus','Enter','ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT','pluginName','Arrowup','isArray','change:isVisible','set'];_0x2113=function(){return _0x4d08d6;};return _0x2113();}import{FOCUS_ANNOTATION_KEYSTROKE as _0x52d575}from'@ckeditor/ckeditor5-collaboration-core';export class Annotations extends _0x41bc10{[_0x24ecce(0x152)];[_0x24ecce(0x16e)];static get[_0x24ecce(0x138)](){const _0x1400b3=_0x24ecce;return _0x1400b3(0x15f);}static get[_0x24ecce(0x158)](){return!0x0;}static get[_0x24ecce(0x15c)](){return!0x0;}constructor(_0x247ab7){const _0x635db8=_0x24ecce;if(super(_0x247ab7),this[_0x635db8(0x152)]=new _0x113629(),this[_0x635db8(0x16e)]=new _0x113629(),this[_0x635db8(0x13c)](_0x635db8(0x129),new Set()),this[_0x635db8(0x14c)](),_0x247ab7 instanceof _0x238bab){const _0x4a8630=_0x247ab7[_0x635db8(0x130)];_0x247ab7[_0x635db8(0x161)][_0x635db8(0x133)]({'id':_0x635db8(0x140),'label':_0x5f31df(_0x4a8630,_0x635db8(0x142)),'keystrokes':[{'label':_0x5f31df(_0x4a8630,_0x635db8(0x154)),'keystroke':_0x635db8(0x166)},{'label':_0x5f31df(_0x4a8630,_0x635db8(0x141)),'keystroke':_0x635db8(0x151)},{'label':_0x5f31df(_0x4a8630,_0x635db8(0x168)),'keystroke':_0x635db8(0x136)},{'label':_0x5f31df(_0x4a8630,_0x635db8(0x148)),'keystroke':[[_0x635db8(0x16b)],[_0x635db8(0x143)]]},{'label':_0x5f31df(_0x4a8630,_0x635db8(0x137)),'keystroke':[_0x635db8(0x13e)]},{'label':_0x5f31df(_0x4a8630,_0x635db8(0x16d)),'keystroke':[[_0x635db8(0x139)],[_0x635db8(0x160)]]}]});}this[_0x635db8(0x162)](),this[_0x635db8(0x14e)]();}[_0x24ecce(0x12e)](_0x33c70b){const _0x41abaf=_0x24ecce;this[_0x41abaf(0x152)][_0x41abaf(0x12e)](_0x33c70b);}[_0x24ecce(0x15b)](_0x2a4ff6){const _0x2942b5=_0x24ecce;this[_0x2942b5(0x152)][_0x2942b5(0x15b)](_0x2a4ff6),_0x2a4ff6[_0x2942b5(0x12a)]();}[_0x24ecce(0x167)](){const _0x226005=_0x24ecce;for(const _0x374418 of this[_0x226005(0x152)])_0x374418[_0x226005(0x167)]();}[_0x24ecce(0x173)](){const _0x514cb2=_0x24ecce;this[_0x514cb2(0x16e)][_0x514cb2(0x173)]();}[_0x24ecce(0x15e)](_0x2bb5b3){const _0x1288cc=_0x24ecce;return this[_0x1288cc(0x152)][_0x1288cc(0x15e)](_0x2bb5b3);}[_0x24ecce(0x165)](){const _0x1498f3=_0x24ecce;this[_0x1498f3(0x153)](_0x1498f3(0x13d));}[_0x24ecce(0x12a)](){const _0x2b2b2f=_0x24ecce;for(const _0x2f9e75 of this[_0x2b2b2f(0x152)])_0x2f9e75[_0x2b2b2f(0x12a)]();this[_0x2b2b2f(0x16e)][_0x2b2b2f(0x12a)](),this[_0x2b2b2f(0x152)][_0x2b2b2f(0x12a)](),super[_0x2b2b2f(0x12a)]();}[_0x24ecce(0x171)](_0x4f3f02){const _0x5f4a59=_0x24ecce;this[_0x5f4a59(0x153)](_0x5f4a59(0x172),_0x4f3f02);}[_0x24ecce(0x147)](_0x157991){return new _0x4f97a4(_0x157991);}[_0x24ecce(0x164)](_0x19178f,_0x303247){return new _0x253ccb(_0x19178f,_0x303247);}[_0x24ecce(0x144)](_0x22defd){const _0x5a5b39=_0x24ecce,_0x23e54a=new Set(this[_0x5a5b39(0x129)]);_0x23e54a[_0x5a5b39(0x12e)](_0x22defd),this[_0x5a5b39(0x129)]=_0x23e54a;}[_0x24ecce(0x156)](_0x333241){const _0x4bf2a1=_0x24ecce,_0x45cecf=new Set(this[_0x4bf2a1(0x129)]);_0x45cecf[_0x4bf2a1(0x145)](_0x333241),this[_0x4bf2a1(0x129)]=_0x45cecf;}[_0x24ecce(0x14c)](){const _0x2348b3=_0x24ecce,_0x493001=this[_0x2348b3(0x152)],_0x2083cc=this[_0x2348b3(0x16e)];function _0x5225b0(_0x426dce){const _0x43be34=_0x2348b3,_0x1569c8=_0x426dce[_0x43be34(0x14d)];_0x1569c8[_0x43be34(0x13f)]&&!_0x2083cc[_0x43be34(0x155)](_0x1569c8)?_0x2083cc[_0x43be34(0x12e)](_0x1569c8):!_0x1569c8[_0x43be34(0x13f)]&&_0x2083cc[_0x43be34(0x155)](_0x1569c8)&&_0x2083cc[_0x43be34(0x15b)](_0x1569c8),_0x1569c8[_0x43be34(0x170)][_0x43be34(0x159)][_0x43be34(0x15b)](_0x1569c8[_0x43be34(0x170)][_0x43be34(0x169)]),_0x1569c8[_0x43be34(0x170)][_0x43be34(0x159)][_0x43be34(0x12e)](_0x1569c8[_0x43be34(0x170)][_0x43be34(0x169)]);}this[_0x2348b3(0x12d)](_0x493001,_0x2348b3(0x12e),(_0x354c7b,_0x1d9c02)=>{const _0x2f300d=_0x2348b3;_0x1d9c02[_0x2f300d(0x13f)]&&_0x2083cc[_0x2f300d(0x12e)](_0x1d9c02),this[_0x2f300d(0x12d)](_0x1d9c02,_0x2f300d(0x13b),_0x5225b0);}),this[_0x2348b3(0x12d)](_0x493001,_0x2348b3(0x15b),(_0x689607,_0x15b2e1)=>{const _0x1d42ec=_0x2348b3;_0x2083cc[_0x1d42ec(0x155)](_0x15b2e1)&&_0x2083cc[_0x1d42ec(0x15b)](_0x15b2e1),this[_0x1d42ec(0x134)](_0x15b2e1,_0x1d42ec(0x13b),_0x5225b0);});}[_0x24ecce(0x162)](){const _0xaf83b9=_0x24ecce,_0x38a4ab=_0x2bf805=>{const _0x26adb0=_0x54d1;_0x2bf805['on'](_0x26adb0(0x163),()=>{const _0x2723f1=_0x26adb0;_0x2bf805[_0x2723f1(0x14a)][_0x2723f1(0x13c)](_0x52d575,(_0x522aa4,_0x3cc354)=>{const _0x857d70=_0x2723f1,_0xa87acb=_0x21cb75(this[_0x857d70(0x129)][_0x857d70(0x174)]());_0xa87acb&&(_0xa87acb[_0x857d70(0x170)][_0x857d70(0x135)](),_0x3cc354());});});};this[_0xaf83b9(0x16f)]instanceof _0x238bab?_0x38a4ab(this[_0xaf83b9(0x16f)]):this[_0xaf83b9(0x16f)][_0xaf83b9(0x15a)]&&this[_0xaf83b9(0x16f)][_0xaf83b9(0x15a)]['on'](_0xaf83b9(0x12e),(_0x3b97a6,_0x22f8db)=>{_0x38a4ab(_0x22f8db);});}[_0x24ecce(0x14e)](){const _0xb911f7=_0x24ecce,_0x4ba767=_0x35347b=>{const _0x3db9cc=_0x54d1,_0x2f9398=_0x35347b[_0x3db9cc(0x14d)],_0x5d3c01=[];let _0x1c1617;if(Array[_0x3db9cc(0x13a)](_0x2f9398[_0x3db9cc(0x12f)])){_0x1c1617=_0x2f9398[_0x3db9cc(0x12f)][0x0],this[_0x3db9cc(0x16f)]instanceof _0x238bab?_0x5d3c01[_0x3db9cc(0x15d)](this[_0x3db9cc(0x16f)]):this[_0x3db9cc(0x16f)][_0x3db9cc(0x15a)]&&_0x5d3c01[_0x3db9cc(0x15d)](...this[_0x3db9cc(0x16f)][_0x3db9cc(0x15a)]);for(const _0x79d2ee of _0x5d3c01)for(const _0x11fe6f of _0x79d2ee[_0x3db9cc(0x176)][_0x3db9cc(0x170)][_0x3db9cc(0x12b)][_0x3db9cc(0x174)]())if(_0x11fe6f[_0x3db9cc(0x16a)](_0x1c1617))return void _0x79d2ee[_0x3db9cc(0x176)][_0x3db9cc(0x170)][_0x3db9cc(0x135)]();_0x1c1617[_0x3db9cc(0x135)]();}};this[_0xb911f7(0x12d)](this[_0xb911f7(0x152)],_0xb911f7(0x12e),(_0xc690f8,_0x28290f)=>{const _0x97b4a2=_0xb911f7;this[_0x97b4a2(0x12d)](_0x28290f,_0x97b4a2(0x175),_0x4ba767,{'priority':_0x97b4a2(0x16c)});}),this[_0xb911f7(0x12d)](this[_0xb911f7(0x152)],_0xb911f7(0x15b),(_0x1269d5,_0x13667b)=>{const _0x57e2bd=_0xb911f7;this[_0x57e2bd(0x134)](_0x13667b,_0x57e2bd(0x175),_0x4ba767);});}}