@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.48 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 _0x290e9a=_0x59d7;(function(_0x46f193,_0x5e593e){const _0x5a4c56=_0x59d7,_0x1fe62b=_0x46f193();while(!![]){try{const _0x429664=parseInt(_0x5a4c56(0xf1))/0x1*(parseInt(_0x5a4c56(0xbc))/0x2)+parseInt(_0x5a4c56(0xe4))/0x3+parseInt(_0x5a4c56(0xe2))/0x4*(-parseInt(_0x5a4c56(0xe7))/0x5)+-parseInt(_0x5a4c56(0xae))/0x6+-parseInt(_0x5a4c56(0xad))/0x7*(-parseInt(_0x5a4c56(0xd4))/0x8)+parseInt(_0x5a4c56(0xc0))/0x9*(-parseInt(_0x5a4c56(0xc9))/0xa)+-parseInt(_0x5a4c56(0xea))/0xb*(-parseInt(_0x5a4c56(0xda))/0xc);if(_0x429664===_0x5e593e)break;else _0x1fe62b['push'](_0x1fe62b['shift']());}catch(_0x5a341a){_0x1fe62b['push'](_0x1fe62b['shift']());}}}(_0x2a0d,0x56d5a));import{ContextPlugin as _0x13a703,Editor as _0x59c559}from'ckeditor5/src/core.js';import{first as _0x17113d}from'ckeditor5/src/utils.js';import{Annotation as _0x32913a}from'./annotation.js';import{AnnotationCollection as _0x1355fa}from'./annotationcollection.js';import{AnnotationView as _0x4a32b3}from'./view/annotationview.js';import{getTranslation as _0x41ab37}from'../utils/common-translations.js';function _0x2a0d(){const _0x548838=['4095414SiDhbt','locale','ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT','refreshPositioning','change:isVisible','ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO','source','_activateAnnotation','collection','keystrokes','Enter','add','values','createAnnotation','92NPBZak','ready','domRoots','_addActiveAnnotation','3641553zMMcTB','listenTo','Ctrl+Shift+E','element','ACCESSIBILITY_HELP_ANNOTATIONS_EXIT','_setupEnterAnnotationKeystroke','Esc','_bindAnnotationsToVisibleAnnotations','addKeystrokeInfoGroup','10qaIysU','_removeActiveAnnotation','set','refreshVisibility','push','isArray','createAnnotationView','fire','focus','Shift+Tab','stopListening','688nngLvl','has','editing','Arrowdown','ACCESSIBILITY_HELP_ANNOTATIONS_GROUP','editors','570012iwYVSM','view','getByInnerView','isVisible','ACCESSIBILITY_HELP_ANNOTATIONS_ENTER','_setupEscapeAnnotationHandling','destroy','_visibleAnnotations','276EmRBoM','target','866835QKzpAV','Annotations','context','17505LLTgqB','pluginName','isPremiumPlugin','154sMrmZH','delete','Tab','focusTracker','ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS','isOfficialPlugin','activate','1787WAzQfy','deactivateAll','Ctrl+Enter','Arrowup','activeAnnotations','accessibility','escape','low','annotations','contains','ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS','remove','_deactivateAllAnnotations','52766TrnAUv'];_0x2a0d=function(){return _0x548838;};return _0x2a0d();}function _0x59d7(_0xe0dbbf,_0x1f792f){const _0x2a0d22=_0x2a0d();return _0x59d7=function(_0x59d7d7,_0x5d16fa){_0x59d7d7=_0x59d7d7-0xa8;let _0x43061f=_0x2a0d22[_0x59d7d7];return _0x43061f;},_0x59d7(_0xe0dbbf,_0x1f792f);}import{FOCUS_ANNOTATION_KEYSTROKE as _0x4919ec}from'@ckeditor/ckeditor5-collaboration-core';export class Annotations extends _0x13a703{[_0x290e9a(0xb6)];[_0x290e9a(0xe1)];static get[_0x290e9a(0xe8)](){const _0x1d08fd=_0x290e9a;return _0x1d08fd(0xe5);}static get[_0x290e9a(0xef)](){return!0x0;}static get[_0x290e9a(0xe9)](){return!0x0;}constructor(_0x166e56){const _0x567109=_0x290e9a;if(super(_0x166e56),this[_0x567109(0xb6)]=new _0x1355fa(),this[_0x567109(0xe1)]=new _0x1355fa(),this[_0x567109(0xcb)](_0x567109(0xf5),new Set()),this[_0x567109(0xc7)](),_0x166e56 instanceof _0x59c559){const _0x1e0b23=_0x166e56[_0x567109(0xaf)];_0x166e56[_0x567109(0xf6)][_0x567109(0xc8)]({'id':_0x567109(0xa8),'label':_0x41ab37(_0x1e0b23,_0x567109(0xd8)),'keystrokes':[{'label':_0x41ab37(_0x1e0b23,_0x567109(0xb3)),'keystroke':_0x567109(0xc2)},{'label':_0x41ab37(_0x1e0b23,_0x567109(0xc4)),'keystroke':_0x567109(0xc6)},{'label':_0x41ab37(_0x1e0b23,_0x567109(0xde)),'keystroke':_0x567109(0xb8)},{'label':_0x41ab37(_0x1e0b23,_0x567109(0xaa)),'keystroke':[[_0x567109(0xec)],[_0x567109(0xd2)]]},{'label':_0x41ab37(_0x1e0b23,_0x567109(0xb0)),'keystroke':[_0x567109(0xf3)]},{'label':_0x41ab37(_0x1e0b23,_0x567109(0xee)),'keystroke':[[_0x567109(0xf4)],[_0x567109(0xd7)]]}]});}this[_0x567109(0xc5)](),this[_0x567109(0xdf)]();}[_0x290e9a(0xb9)](_0x60aef2){const _0x1610ff=_0x290e9a;this[_0x1610ff(0xb6)][_0x1610ff(0xb9)](_0x60aef2);}[_0x290e9a(0xab)](_0x5c2131){const _0x36b7b8=_0x290e9a;this[_0x36b7b8(0xb6)][_0x36b7b8(0xab)](_0x5c2131),_0x5c2131[_0x36b7b8(0xe0)]();}[_0x290e9a(0xcc)](){const _0x3aa81a=_0x290e9a;for(const _0x40c09e of this[_0x3aa81a(0xb6)])_0x40c09e[_0x3aa81a(0xcc)]();}[_0x290e9a(0xb1)](){const _0x53700e=_0x290e9a;this[_0x53700e(0xe1)][_0x53700e(0xb1)]();}[_0x290e9a(0xdc)](_0x59d5cb){const _0x4038f2=_0x290e9a;return this[_0x4038f2(0xb6)][_0x4038f2(0xdc)](_0x59d5cb);}[_0x290e9a(0xf2)](){const _0x395ce1=_0x290e9a;this[_0x395ce1(0xd0)](_0x395ce1(0xac));}[_0x290e9a(0xe0)](){const _0x25300c=_0x290e9a;for(const _0x1525cb of this[_0x25300c(0xb6)])_0x1525cb[_0x25300c(0xe0)]();this[_0x25300c(0xe1)][_0x25300c(0xe0)](),this[_0x25300c(0xb6)][_0x25300c(0xe0)](),super[_0x25300c(0xe0)]();}[_0x290e9a(0xf0)](_0x2c1753){const _0x1e7087=_0x290e9a;this[_0x1e7087(0xd0)](_0x1e7087(0xb5),_0x2c1753);}[_0x290e9a(0xbb)](_0x5260b6){return new _0x32913a(_0x5260b6);}[_0x290e9a(0xcf)](_0x1a52cc,_0xd7c6d){return new _0x4a32b3(_0x1a52cc,_0xd7c6d);}[_0x290e9a(0xbf)](_0x4d5b77){const _0x25fe05=_0x290e9a,_0x20904b=new Set(this[_0x25fe05(0xf5)]);_0x20904b[_0x25fe05(0xb9)](_0x4d5b77),this[_0x25fe05(0xf5)]=_0x20904b;}[_0x290e9a(0xca)](_0x8a553a){const _0x46c040=_0x290e9a,_0x5868e8=new Set(this[_0x46c040(0xf5)]);_0x5868e8[_0x46c040(0xeb)](_0x8a553a),this[_0x46c040(0xf5)]=_0x5868e8;}[_0x290e9a(0xc7)](){const _0x32e927=_0x290e9a,_0x31def4=this[_0x32e927(0xb6)],_0x47cef5=this[_0x32e927(0xe1)];function _0xd1458f(_0x24ba23){const _0x5647ab=_0x32e927,_0x593104=_0x24ba23[_0x5647ab(0xb4)];_0x593104[_0x5647ab(0xdd)]&&!_0x47cef5[_0x5647ab(0xd5)](_0x593104)?_0x47cef5[_0x5647ab(0xb9)](_0x593104):!_0x593104[_0x5647ab(0xdd)]&&_0x47cef5[_0x5647ab(0xd5)](_0x593104)&&_0x47cef5[_0x5647ab(0xab)](_0x593104),_0x593104[_0x5647ab(0xdb)][_0x5647ab(0xed)][_0x5647ab(0xab)](_0x593104[_0x5647ab(0xdb)][_0x5647ab(0xc3)]),_0x593104[_0x5647ab(0xdb)][_0x5647ab(0xed)][_0x5647ab(0xb9)](_0x593104[_0x5647ab(0xdb)][_0x5647ab(0xc3)]);}this[_0x32e927(0xc1)](_0x31def4,_0x32e927(0xb9),(_0x44e597,_0x302f99)=>{const _0x483dfb=_0x32e927;_0x302f99[_0x483dfb(0xdd)]&&_0x47cef5[_0x483dfb(0xb9)](_0x302f99),this[_0x483dfb(0xc1)](_0x302f99,_0x483dfb(0xb2),_0xd1458f);}),this[_0x32e927(0xc1)](_0x31def4,_0x32e927(0xab),(_0x21b96b,_0x447271)=>{const _0x8dc96e=_0x32e927;_0x47cef5[_0x8dc96e(0xd5)](_0x447271)&&_0x47cef5[_0x8dc96e(0xab)](_0x447271),this[_0x8dc96e(0xd3)](_0x447271,_0x8dc96e(0xb2),_0xd1458f);});}[_0x290e9a(0xc5)](){const _0x293944=_0x290e9a,_0x5074aa=_0x16b848=>{const _0x192894=_0x59d7;_0x16b848['on'](_0x192894(0xbd),()=>{const _0x56f5c=_0x192894;_0x16b848[_0x56f5c(0xb7)][_0x56f5c(0xcb)](_0x4919ec,(_0x1df0af,_0x1b9590)=>{const _0x150275=_0x56f5c,_0x8f026d=_0x17113d(this[_0x150275(0xf5)][_0x150275(0xba)]());_0x8f026d&&(_0x8f026d[_0x150275(0xdb)][_0x150275(0xd1)](),_0x1b9590());});});};this[_0x293944(0xe6)]instanceof _0x59c559?_0x5074aa(this[_0x293944(0xe6)]):this[_0x293944(0xe6)][_0x293944(0xd9)]&&this[_0x293944(0xe6)][_0x293944(0xd9)]['on'](_0x293944(0xb9),(_0x181ead,_0x5e6d78)=>{_0x5074aa(_0x5e6d78);});}[_0x290e9a(0xdf)](){const _0x508309=_0x290e9a,_0x20cb95=_0x55f2ad=>{const _0x1335ec=_0x59d7,_0x22b5d3=_0x55f2ad[_0x1335ec(0xb4)],_0x55001c=[];let _0x326fc5;if(Array[_0x1335ec(0xce)](_0x22b5d3[_0x1335ec(0xe3)])){_0x326fc5=_0x22b5d3[_0x1335ec(0xe3)][0x0],this[_0x1335ec(0xe6)]instanceof _0x59c559?_0x55001c[_0x1335ec(0xcd)](this[_0x1335ec(0xe6)]):this[_0x1335ec(0xe6)][_0x1335ec(0xd9)]&&_0x55001c[_0x1335ec(0xcd)](...this[_0x1335ec(0xe6)][_0x1335ec(0xd9)]);for(const _0x103f17 of _0x55001c)for(const _0x77cce2 of _0x103f17[_0x1335ec(0xd6)][_0x1335ec(0xdb)][_0x1335ec(0xbe)][_0x1335ec(0xba)]())if(_0x77cce2[_0x1335ec(0xa9)](_0x326fc5))return void _0x103f17[_0x1335ec(0xd6)][_0x1335ec(0xdb)][_0x1335ec(0xd1)]();_0x326fc5[_0x1335ec(0xd1)]();}};this[_0x508309(0xc1)](this[_0x508309(0xb6)],_0x508309(0xb9),(_0x41cbb4,_0x583517)=>{const _0x13a7bf=_0x508309;this[_0x13a7bf(0xc1)](_0x583517,_0x13a7bf(0xf7),_0x20cb95,{'priority':_0x13a7bf(0xf8)});}),this[_0x508309(0xc1)](this[_0x508309(0xb6)],_0x508309(0xab),(_0x1f63a1,_0x3989f4)=>{const _0x3191ad=_0x508309;this[_0x3191ad(0xd3)](_0x3989f4,_0x3191ad(0xf7),_0x20cb95);});}}