@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 5.76 kB
JavaScript
/*
* Copyright (c) 2003-2026, 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 _0x2edfe2=_0x2f16;(function(_0x56bd9a,_0x392eb6){const _0x5abef8=_0x2f16,_0x26fd8=_0x56bd9a();while(!![]){try{const _0x242989=-parseInt(_0x5abef8(0xb1))/0x1*(parseInt(_0x5abef8(0x9b))/0x2)+parseInt(_0x5abef8(0x8c))/0x3*(-parseInt(_0x5abef8(0xa2))/0x4)+parseInt(_0x5abef8(0x8f))/0x5+parseInt(_0x5abef8(0xa4))/0x6+-parseInt(_0x5abef8(0x8d))/0x7*(parseInt(_0x5abef8(0xb5))/0x8)+parseInt(_0x5abef8(0xb3))/0x9+parseInt(_0x5abef8(0xb6))/0xa;if(_0x242989===_0x392eb6)break;else _0x26fd8['push'](_0x26fd8['shift']());}catch(_0x4b5df7){_0x26fd8['push'](_0x26fd8['shift']());}}}(_0x3e12,0xe8d76));function _0x3e12(){const _0x41f038=['isObject','push','from','start','_createCommentThread','backward','4pUEMXt','_createMarkersFromRanges','element','addMarker','getItems','execute','createRange','4GViXVh','change','10573176FCsOyt','isEnabled','config','editor','model','tableCell','get','refresh','collaboration.channelId','getRanges','Users','plugins','end','616852anWjrt','addcommentthreadcommand-user-not-found','15057603kqTOwv','length','8uDFpye','11441820zjyjsi','_itemIsContent','hasContent','substr','_trimToContent','comment:','schema','getLastMatchingPosition','_hasContent','addCommentThread','CommentsRepository','3010401IdZSTE','12305377ULpgMJ','item','1846775YdhEnk','addcommentthreadcommand-incorrect-ranges','selection','document','$textProxy','set'];_0x3e12=function(){return _0x41f038;};return _0x3e12();}import{Command as _0x114806}from'ckeditor5/src/core.js';import{uid as _0x2310fa,CKEditorError as _0x328dc6}from'ckeditor5/src/utils.js';function _0x2f16(_0x4af13b,_0x1013a4){const _0x3e1278=_0x3e12();return _0x2f16=function(_0x2f16ae,_0x3e78bd){_0x2f16ae=_0x2f16ae-0x85;let _0x3ebbf1=_0x3e1278[_0x2f16ae];return _0x3ebbf1;},_0x2f16(_0x4af13b,_0x1013a4);}export class AddCommentThreadCommand extends _0x114806{constructor(_0xcd628b){const _0x3c8a55=_0x2f16;super(_0xcd628b),this[_0x3c8a55(0x94)](_0x3c8a55(0xb8),!0x1);}[_0x2edfe2(0xab)](){const _0x32e50c=_0x2edfe2,_0x23b445=this[_0x32e50c(0xa7)][_0x32e50c(0xa8)][_0x32e50c(0x92)][_0x32e50c(0x91)];this[_0x32e50c(0xa5)]=!0x0,this[_0x32e50c(0xb8)]=!0x1;for(const _0x1b6090 of _0x23b445[_0x32e50c(0xad)]())if(this[_0x32e50c(0x89)](_0x1b6090))return void(this[_0x32e50c(0xb8)]=!0x0);}[_0x2edfe2(0xa0)]({threadId:_0x3a2629=_0x2310fa(),ranges:_0x85fde2,comment:_0x1ae34e}={}){const _0x21f584=_0x2edfe2,_0x4af636=this[_0x21f584(0xa7)][_0x21f584(0xa8)],_0x2532ec=_0x85fde2??Array[_0x21f584(0x97)](_0x4af636[_0x21f584(0x92)][_0x21f584(0x91)][_0x21f584(0xad)]()),_0xce2d09=[];for(const _0x4c4452 of _0x2532ec)this[_0x21f584(0x89)](_0x4c4452)&&_0xce2d09[_0x21f584(0x96)](this[_0x21f584(0x85)](_0x4c4452));if(!_0xce2d09[_0x21f584(0xb4)])throw new _0x328dc6(_0x21f584(0x90),null);_0x1ae34e&&this[_0x21f584(0x99)](_0x3a2629,_0x1ae34e),this[_0x21f584(0x9c)](_0x3a2629,_0xce2d09,!!_0x1ae34e);}[_0x2edfe2(0x9c)](_0x118f7c,_0x4e2a0d,_0x34db0b){const _0x4c4f86=_0x2edfe2;this[_0x4c4f86(0xa7)][_0x4c4f86(0xa8)][_0x4c4f86(0xa3)](_0x5f2b80=>{const _0x53e384=_0x4c4f86;for(const _0x5e4411 of _0x4e2a0d){const _0x2d2b21=_0x2310fa()[_0x53e384(0xb9)](0x1,0x5),_0x56a200=_0x53e384(0x86)+_0x118f7c+':'+_0x2d2b21;_0x5f2b80[_0x53e384(0x9e)](_0x56a200,{'range':_0x5e4411,'usingOperation':_0x34db0b,'affectsData':_0x34db0b});}});}[_0x2edfe2(0x99)](_0x5cf9d4,_0x526cc2){const _0x56ff90=_0x2edfe2,_0x554578=this[_0x56ff90(0xa7)][_0x56ff90(0xaf)][_0x56ff90(0xaa)](_0x56ff90(0x8b)),_0x1aebcc=this[_0x56ff90(0xa7)][_0x56ff90(0xa6)][_0x56ff90(0xaa)](_0x56ff90(0xac)),_0xb19338=this[_0x56ff90(0xa7)][_0x56ff90(0xaf)][_0x56ff90(0xaa)](_0x56ff90(0xae))['me'];if(!_0xb19338)throw new _0x328dc6(_0x56ff90(0xb2),null);_0x554578[_0x56ff90(0x8a)]({'threadId':_0x5cf9d4,'channelId':_0x1aebcc,'comments':[{'authorId':_0xb19338['id'],'content':_0x526cc2,'createdAt':new Date(),'attributes':{}}]});}[_0x2edfe2(0x89)](_0x516027){const _0x40dabb=_0x2edfe2;for(const _0x59f774 of _0x516027[_0x40dabb(0x9f)]())if(this[_0x40dabb(0xb7)](_0x59f774))return!0x0;return!0x1;}[_0x2edfe2(0xb7)](_0xce7049){const _0x5ab734=_0x2edfe2;return _0xce7049['is'](_0x5ab734(0x93))||this[_0x5ab734(0xa7)][_0x5ab734(0xa8)][_0x5ab734(0x87)][_0x5ab734(0x95)](_0xce7049)&&!_0xce7049['is'](_0x5ab734(0x9d),_0x5ab734(0xa9));}[_0x2edfe2(0x85)](_0x7012f0){const _0x586ade=_0x2edfe2,_0x3bffba=_0x11b36b=>!this[_0x586ade(0xb7)](_0x11b36b[_0x586ade(0x8e)]),_0x29c6c8=_0x7012f0[_0x586ade(0x98)][_0x586ade(0x88)](_0x3bffba),_0x23b1d3=_0x7012f0[_0x586ade(0xb0)][_0x586ade(0x88)](_0x3bffba,{'direction':_0x586ade(0x9a)});return this[_0x586ade(0xa7)][_0x586ade(0xa8)][_0x586ade(0xa1)](_0x29c6c8,_0x23b1d3);}}