@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 7.32 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 _0x3c0e6d=_0x2363;(function(_0x102e59,_0x3e2793){const _0x3e1939=_0x2363,_0x2ab072=_0x102e59();while(!![]){try{const _0x4ea688=-parseInt(_0x3e1939(0x1db))/0x1+parseInt(_0x3e1939(0x1d4))/0x2+parseInt(_0x3e1939(0x1e1))/0x3*(parseInt(_0x3e1939(0x1e4))/0x4)+parseInt(_0x3e1939(0x1f6))/0x5+parseInt(_0x3e1939(0x1d9))/0x6+-parseInt(_0x3e1939(0x1dc))/0x7+parseInt(_0x3e1939(0x1e0))/0x8*(-parseInt(_0x3e1939(0x1d1))/0x9);if(_0x4ea688===_0x3e2793)break;else _0x2ab072['push'](_0x2ab072['shift']());}catch(_0x36dbf6){_0x2ab072['push'](_0x2ab072['shift']());}}}(_0x379d,0x36969));function _0x379d(){const _0x41ca07=['692772ntjifk','_innerViewToAnnotation','64166AoxgIM','810201sAsQTd','_viewToAnnotation','getByView','left','16312cnPBwc','42fkIJeG','fire','focusTracker','15580DwWKXT','_getOrderInContent','view','sort','top','targetRect','updateTargetRect','from','isFocused','get','destroy','change:isFocused','has','stopListening','blur','_sort','set','getIndex','879085vPhclZ','add','_focusTracker','annotationcollection-not-existing-item','delete','innerView','refreshPositioning','focus','remove','603YjUIqv','length','getByInnerView','388612VKenSO','annotationcollection-duplicated-item','focusableElements','clear','listenTo'];_0x379d=function(){return _0x41ca07;};return _0x379d();}import{CKEditorError as _0x5d0d0e,Collection as _0x3c4ada,FocusTracker as _0x16bea3}from'ckeditor5/src/utils.js';export class AnnotationCollection extends _0x3c4ada{[_0x3c0e6d(0x1da)];[_0x3c0e6d(0x1dd)];[_0x3c0e6d(0x1ca)];constructor(_0x3418b7=[]){const _0x9ad6fd=_0x3c0e6d;super(),this[_0x9ad6fd(0x1da)]=new Map(),this[_0x9ad6fd(0x1dd)]=new Map(),this[_0x9ad6fd(0x1ca)]=new _0x16bea3(),this[_0x9ad6fd(0x1ca)]['on'](_0x9ad6fd(0x1ef),(_0x5a75b8,_0x466424,_0x55b7fd)=>{const _0x5627b7=_0x9ad6fd;_0x55b7fd||this[_0x5627b7(0x1e2)](_0x5627b7(0x1f2));});for(const _0x437efc of _0x3418b7)this[_0x9ad6fd(0x1c9)](_0x437efc);}get[_0x3c0e6d(0x1ec)](){const _0x46e454=_0x3c0e6d;return this[_0x46e454(0x1ca)][_0x46e454(0x1ec)];}[_0x3c0e6d(0x1c9)](_0x31a006){const _0x3fa5ba=_0x3c0e6d;if(this[_0x3fa5ba(0x1f0)](_0x31a006))throw new _0x5d0d0e(_0x3fa5ba(0x1d5),null);this[_0x3fa5ba(0x1da)][_0x3fa5ba(0x1f4)](_0x31a006[_0x3fa5ba(0x1cd)],_0x31a006),this[_0x3fa5ba(0x1dd)][_0x3fa5ba(0x1f4)](_0x31a006[_0x3fa5ba(0x1e6)],_0x31a006);for(const _0x111d0d of _0x31a006[_0x3fa5ba(0x1d6)])this[_0x3fa5ba(0x1ca)][_0x3fa5ba(0x1c9)](_0x111d0d);this[_0x3fa5ba(0x1d8)](_0x31a006[_0x3fa5ba(0x1d6)],_0x3fa5ba(0x1c9),(_0x11f8b9,_0x53d25f)=>{const _0x4756d2=_0x3fa5ba;this[_0x4756d2(0x1ca)][_0x4756d2(0x1c9)](_0x53d25f);}),this[_0x3fa5ba(0x1d8)](_0x31a006[_0x3fa5ba(0x1d6)],_0x3fa5ba(0x1d0),(_0x9b5fbd,_0x1722dd)=>{const _0x8ceb50=_0x3fa5ba;this[_0x8ceb50(0x1ca)][_0x8ceb50(0x1d0)](_0x1722dd);}),this[_0x3fa5ba(0x1d8)](_0x31a006[_0x3fa5ba(0x1e6)][_0x3fa5ba(0x1e3)],_0x3fa5ba(0x1ef),(_0xbad148,_0x32073e,_0x211819)=>{const _0x452990=_0x3fa5ba;_0x211819&&this[_0x452990(0x1e2)](_0x452990(0x1cf),_0x31a006);}),_0x31a006[_0x3fa5ba(0x1ea)]();const _0x28fc9a=this[_0x3fa5ba(0x1e5)](_0x31a006[_0x3fa5ba(0x1e6)][_0x3fa5ba(0x1e9)]);return super[_0x3fa5ba(0x1c9)](_0x31a006,_0x28fc9a);}[_0x3c0e6d(0x1d0)](_0x217a40){const _0x2210bb=_0x3c0e6d;if(!this[_0x2210bb(0x1f0)](_0x217a40))throw new _0x5d0d0e(_0x2210bb(0x1cb),null);this[_0x2210bb(0x1f1)](_0x217a40[_0x2210bb(0x1e6)][_0x2210bb(0x1e3)]),this[_0x2210bb(0x1f1)](_0x217a40[_0x2210bb(0x1d6)]);for(const _0x58f2e3 of _0x217a40[_0x2210bb(0x1d6)])this[_0x2210bb(0x1ca)][_0x2210bb(0x1d0)](_0x58f2e3);return this[_0x2210bb(0x1dd)][_0x2210bb(0x1cc)](_0x217a40[_0x2210bb(0x1e6)]),this[_0x2210bb(0x1da)][_0x2210bb(0x1cc)](_0x217a40[_0x2210bb(0x1cd)]),super[_0x2210bb(0x1d0)](_0x217a40);}[_0x3c0e6d(0x1d3)](_0x2ea503){const _0x234b3c=_0x3c0e6d;return this[_0x234b3c(0x1da)][_0x234b3c(0x1ed)](_0x2ea503);}[_0x3c0e6d(0x1de)](_0x4804d8){const _0x226abd=_0x3c0e6d;return this[_0x226abd(0x1dd)][_0x226abd(0x1ed)](_0x4804d8);}[_0x3c0e6d(0x1ee)](){const _0x5d9954=_0x3c0e6d;super[_0x5d9954(0x1d7)](),this[_0x5d9954(0x1f1)](),this[_0x5d9954(0x1da)][_0x5d9954(0x1d7)](),this[_0x5d9954(0x1dd)][_0x5d9954(0x1d7)](),this[_0x5d9954(0x1ca)][_0x5d9954(0x1ee)]();}[_0x3c0e6d(0x1ce)](){const _0x5d1a6a=_0x3c0e6d;for(const _0x25522e of this)_0x25522e[_0x5d1a6a(0x1ea)]();this[_0x5d1a6a(0x1f3)]();}[_0x3c0e6d(0x1f3)](){const _0x22b251=_0x3c0e6d,_0x37dfed=Array[_0x22b251(0x1eb)](this)[_0x22b251(0x1e7)]((_0x119278,_0x3358c7)=>w(_0x119278[_0x22b251(0x1e6)][_0x22b251(0x1e9)],_0x3358c7[_0x22b251(0x1e6)][_0x22b251(0x1e9)]));for(let _0x39b193=_0x37dfed[_0x22b251(0x1d2)]-0x1;_0x39b193>0x0;_0x39b193--){const _0x3ea4e7=_0x37dfed[_0x39b193];_0x39b193!==this[_0x22b251(0x1f5)](_0x3ea4e7)&&(this[_0x22b251(0x1d0)](_0x3ea4e7),this[_0x22b251(0x1c9)](_0x3ea4e7));}}[_0x3c0e6d(0x1e5)](_0x1afec3){const _0x44e73a=_0x3c0e6d;let _0x2832db=0x0;if(!_0x1afec3)return this[_0x44e73a(0x1d2)];for(const _0x46291d of this){const _0xf632bb=_0x46291d[_0x44e73a(0x1e6)][_0x44e73a(0x1e9)];if(_0xf632bb){if(w(_0x1afec3,_0xf632bb)<0x0)return _0x2832db;_0x2832db++;}}return _0x2832db;}}function _0x2363(_0x4c9d1d,_0x4a92e4){const _0x379d8a=_0x379d();return _0x2363=function(_0x23631a,_0x39188e){_0x23631a=_0x23631a-0x1c9;let _0x1edbd6=_0x379d8a[_0x23631a];return _0x1edbd6;},_0x2363(_0x4c9d1d,_0x4a92e4);}export function bindAnnotationCollections({source:_0x71ac64,target:_0x2f9bf0,filter:_0x23cef3}){const _0x5147b8=_0x3c0e6d;for(const _0x47c9da of _0x71ac64)_0x23cef3(_0x47c9da)&&_0x2f9bf0[_0x5147b8(0x1c9)](_0x47c9da);_0x2f9bf0[_0x5147b8(0x1d8)](_0x71ac64,_0x5147b8(0x1c9),(_0x79bce6,_0x59f5dd)=>{const _0x54c7e9=_0x5147b8;_0x23cef3(_0x59f5dd)&&_0x2f9bf0[_0x54c7e9(0x1c9)](_0x59f5dd);}),_0x2f9bf0[_0x5147b8(0x1d8)](_0x71ac64,_0x5147b8(0x1d0),(_0x6ba525,_0x8e6784)=>{const _0x26bc80=_0x5147b8;_0x2f9bf0[_0x26bc80(0x1f0)](_0x8e6784)&&_0x2f9bf0[_0x26bc80(0x1d0)](_0x8e6784);});}function w(_0x30fa5a,_0x18b073){const _0x351912=_0x3c0e6d;if(null===_0x30fa5a&&null===_0x18b073)return 0x0;if(null===_0x30fa5a)return-0x1;if(null===_0x18b073)return 0x1;const _0x5b7f33=_0x30fa5a[_0x351912(0x1e8)]-_0x18b073[_0x351912(0x1e8)];return 0x0==_0x5b7f33?_0x30fa5a[_0x351912(0x1df)]-_0x18b073[_0x351912(0x1df)]:_0x5b7f33;}