@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.71 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 _0x26fcbf=_0x2a7b;(function(_0x3a9ee4,_0x3aa1fa){const _0x1837db=_0x2a7b,_0x1c7b75=_0x3a9ee4();while(!![]){try{const _0x13bae7=-parseInt(_0x1837db(0x1ac))/0x1+parseInt(_0x1837db(0x1ae))/0x2*(-parseInt(_0x1837db(0x1c3))/0x3)+-parseInt(_0x1837db(0x1c9))/0x4*(parseInt(_0x1837db(0x188))/0x5)+parseInt(_0x1837db(0x18d))/0x6+parseInt(_0x1837db(0x195))/0x7+-parseInt(_0x1837db(0x1cf))/0x8+-parseInt(_0x1837db(0x1d1))/0x9*(-parseInt(_0x1837db(0x199))/0xa);if(_0x13bae7===_0x3aa1fa)break;else _0x1c7b75['push'](_0x1c7b75['shift']());}catch(_0x149258){_0x1c7b75['push'](_0x1c7b75['shift']());}}}(_0x22bf,0x26f08));function _0x22bf(){const _0x1d4336=['archivedThreads','tooltip','isEnabled','set','_visibleAnnotations','get','_calculatePosition','47740JNZcAa','execute','2uWtNyC','commentsArchive','requires','CommentsRepository','archivedAt','locale','Dialog','show','plugins','source','stop','_hideDialogOnAnnotationEscape','splice','isPremiumPlugin','channelId','menuBar:commentsArchive','pluginName','getByInnerView','_pendingThreads','componentFactory','hide','726891HOOAEi','stopListening','find','focusableElements','isOn','view','6968lysYNa','_toggleDialog','has','menuitemcheckbox','commentsArchiveView','isVisible','411264sOKkpj','Annotations','2943yEkOow','CommentsArchiveUI','escape','155QpwuqB','collection','forEach','includes','listenTo','1798494AiNuLs','isOpen','filter','findIndex','remove','push','init','editor','699083KpqNSm','_createCommentsArchiveButton','annotationViews','innerView','4750faSizd','collaboration.channelId','_handleNewThread','length','add','bind','isOfficialPlugin','EDITOR_TOP_SIDE','config','_threadToController','indexOf','COMMENTS_ARCHIVE'];_0x22bf=function(){return _0x1d4336;};return _0x22bf();}import'../../theme/commentsarchive.css';import{Plugin as _0x2bdafd}from'ckeditor5/src/core.js';import{IconCommentsArchive as _0x2b765c}from'ckeditor5/src/icons.js';import{ViewCollection as _0x2060fc,MenuBarMenuListItemButtonView as _0x1b515b,ButtonView as _0x24d4b5,Dialog as _0x54e54f,DialogViewPosition as _0x5822d0}from'ckeditor5/src/ui.js';import{getTranslation as _0x3aebfa}from'../utils/common-translations.js';import _0x2a02a8 from'./ui/view/commentsarchiveview.js';function _0x2a7b(_0x9a964f,_0x3c006b){const _0x22bf2c=_0x22bf();return _0x2a7b=function(_0x2a7ba5,_0x2645c9){_0x2a7ba5=_0x2a7ba5-0x186;let _0xe739ad=_0x22bf2c[_0x2a7ba5];return _0xe739ad;},_0x2a7b(_0x9a964f,_0x3c006b);}import _0x308002 from'./commentsarchive.js';export default class a extends _0x2bdafd{[_0x26fcbf(0x1cd)];[_0x26fcbf(0x197)];[_0x26fcbf(0x1c0)];static get[_0x26fcbf(0x1be)](){const _0x248968=_0x26fcbf;return _0x248968(0x186);}static get[_0x26fcbf(0x19f)](){return!0x0;}static get[_0x26fcbf(0x1bb)](){return!0x0;}static get[_0x26fcbf(0x1b0)](){return[_0x308002,_0x54e54f];}constructor(_0x4d97b7){const _0x315f3a=_0x26fcbf;super(_0x4d97b7),this[_0x315f3a(0x197)]=new _0x2060fc(),this[_0x315f3a(0x1c0)]=[];}[_0x26fcbf(0x193)](){const _0x5d24ea=_0x26fcbf,_0x186a6a=this[_0x5d24ea(0x194)],_0x5cfb9d=this[_0x5d24ea(0x1b9)][_0x5d24ea(0x19e)](this);_0x186a6a['ui'][_0x5d24ea(0x1c1)][_0x5d24ea(0x19d)](_0x5d24ea(0x1af),()=>this[_0x5d24ea(0x196)](_0x24d4b5,!0x0)),_0x186a6a['ui'][_0x5d24ea(0x1c1)][_0x5d24ea(0x19d)](_0x5d24ea(0x1bd),()=>{const _0x5efd08=_0x5d24ea,_0xb926d6=this[_0x5efd08(0x196)](_0x1b515b);return _0xb926d6[_0x5efd08(0x1a8)]({'role':_0x5efd08(0x1cc)}),_0xb926d6;});const _0x3d646c=_0x186a6a[_0x5d24ea(0x1b6)][_0x5d24ea(0x1aa)](_0x308002),_0x3f8289=_0x186a6a[_0x5d24ea(0x1b6)][_0x5d24ea(0x1aa)](_0x5d24ea(0x1d0)),_0x3ac5c6=_0x186a6a[_0x5d24ea(0x1b6)][_0x5d24ea(0x1aa)](_0x5d24ea(0x1b1));_0x3d646c[_0x5d24ea(0x1a5)][_0x5d24ea(0x18a)](_0x458881=>{const _0x51a21c=_0x5d24ea;this[_0x51a21c(0x19b)](_0x458881);}),this[_0x5d24ea(0x18c)](_0x3d646c[_0x5d24ea(0x1a5)],_0x5d24ea(0x19d),(_0x34345e,_0x49eb73)=>{const _0x28bc05=_0x5d24ea;this[_0x28bc05(0x19b)](_0x49eb73);}),this[_0x5d24ea(0x18c)](_0x3f8289[_0x5d24ea(0x189)],_0x5d24ea(0x19d),(_0x34685f,_0x5e07e8)=>{const _0x5e0ec4=_0x5d24ea,_0x5b2343=this[_0x5e0ec4(0x1c0)][_0x5e0ec4(0x1c5)](_0x5aa777=>{const _0x416a7f=_0x5e0ec4,_0x1369f6=_0x3ac5c6[_0x416a7f(0x1a2)][_0x416a7f(0x1aa)](_0x5aa777);return _0x1369f6&&_0x5e07e8[_0x416a7f(0x198)]===_0x1369f6[_0x416a7f(0x1c8)];});if(_0x5b2343){const _0x3c8aae=this[_0x5e0ec4(0x1ab)](_0x5b2343[_0x5e0ec4(0x1b2)]);this[_0x5e0ec4(0x197)][_0x5e0ec4(0x19d)](_0x5e07e8[_0x5e0ec4(0x1c8)],_0x3c8aae),this[_0x5e0ec4(0x1c0)][_0x5e0ec4(0x1ba)](this[_0x5e0ec4(0x1c0)][_0x5e0ec4(0x1a3)](_0x5b2343),0x1);}}),this[_0x5d24ea(0x18c)](_0x3d646c[_0x5d24ea(0x1a5)],_0x5d24ea(0x191),(_0x2a50e6,_0x5cda57)=>{const _0x1591d7=_0x5d24ea,_0x53ea97=_0x186a6a[_0x1591d7(0x1a1)][_0x1591d7(0x1aa)](_0x1591d7(0x19a));if(!_0x53ea97||_0x5cda57[_0x1591d7(0x1bc)]===_0x53ea97){if(this[_0x1591d7(0x1c0)][_0x1591d7(0x18b)](_0x5cda57))this[_0x1591d7(0x1c0)][_0x1591d7(0x1ba)](this[_0x1591d7(0x1c0)][_0x1591d7(0x1a3)](_0x5cda57),0x1);else{const _0x41441c=_0x3ac5c6[_0x1591d7(0x1a2)][_0x1591d7(0x1aa)](_0x5cda57),_0xc0dc97=_0x3f8289[_0x1591d7(0x1bf)](_0x41441c[_0x1591d7(0x1c8)]);this[_0x1591d7(0x197)][_0x1591d7(0x191)](_0xc0dc97[_0x1591d7(0x1c8)]),this[_0x1591d7(0x1c4)](_0xc0dc97[_0x1591d7(0x1c6)]);}}}),this[_0x5d24ea(0x18c)](_0x3f8289[_0x5d24ea(0x189)],_0x5d24ea(0x19d),(_0x540e8f,_0x34e55d)=>{const _0x3a8993=_0x5d24ea;this[_0x3a8993(0x18c)](_0x34e55d,_0x3a8993(0x187),_0x5cfb9d);}),this[_0x5d24ea(0x18c)](_0x3f8289[_0x5d24ea(0x189)],_0x5d24ea(0x191),(_0x499a46,_0x2c1302)=>{const _0x2ac841=_0x5d24ea;this[_0x2ac841(0x1c4)](_0x2c1302,_0x2ac841(0x187),_0x5cfb9d);});}[_0x26fcbf(0x19b)](_0x11b462){const _0x31deca=_0x26fcbf,_0x285a9e=this[_0x31deca(0x194)][_0x31deca(0x1b6)][_0x31deca(0x1aa)](_0x31deca(0x1b1)),_0x4342cf=this[_0x31deca(0x194)][_0x31deca(0x1b6)][_0x31deca(0x1aa)](_0x31deca(0x1d0)),_0xff3dfd=this[_0x31deca(0x194)][_0x31deca(0x1a1)][_0x31deca(0x1aa)](_0x31deca(0x19a));if(!_0xff3dfd||_0x11b462[_0x31deca(0x1bc)]===_0xff3dfd){const _0xad6251=_0x285a9e[_0x31deca(0x1a2)][_0x31deca(0x1aa)](_0x11b462);if(!_0xad6251)return void this[_0x31deca(0x1c0)][_0x31deca(0x192)](_0x11b462);const _0x44b885=this[_0x31deca(0x1ab)](_0x11b462[_0x31deca(0x1b2)]),_0x431879=_0x4342cf[_0x31deca(0x1bf)](_0xad6251[_0x31deca(0x1c8)]);_0x431879[_0x31deca(0x1ce)]&&_0x4342cf[_0x31deca(0x1a9)][_0x31deca(0x191)](_0x431879),this[_0x31deca(0x197)][_0x31deca(0x19d)](_0x431879[_0x31deca(0x1c8)],_0x44b885);}}[_0x26fcbf(0x1ab)](_0x4dfa61){const _0xcd9b91=_0x26fcbf,_0x2f0433=this[_0xcd9b91(0x194)][_0xcd9b91(0x1a1)][_0xcd9b91(0x1aa)](_0xcd9b91(0x19a)),_0x5585f6=[...this[_0xcd9b91(0x194)][_0xcd9b91(0x1b6)][_0xcd9b91(0x1aa)](_0x308002)[_0xcd9b91(0x1a5)]][_0xcd9b91(0x18f)](_0x1f471d=>_0x1f471d[_0xcd9b91(0x1bc)]===_0x2f0433)[_0xcd9b91(0x190)](_0x42c6c5=>_0x42c6c5[_0xcd9b91(0x1b2)]<_0x4dfa61);return _0x5585f6<0x0||_0x5585f6>this[_0xcd9b91(0x197)][_0xcd9b91(0x19c)]?this[_0xcd9b91(0x197)][_0xcd9b91(0x19c)]:_0x5585f6-0x1;}[_0x26fcbf(0x1ca)](){const _0x4a4376=_0x26fcbf,_0x55338e=this[_0x4a4376(0x194)],_0x122a1e=_0x55338e[_0x4a4376(0x1b6)][_0x4a4376(0x1aa)](_0x4a4376(0x1b4));this[_0x4a4376(0x1cd)]||(this[_0x4a4376(0x1cd)]=new _0x2a02a8(_0x55338e[_0x4a4376(0x1b3)],this[_0x4a4376(0x197)])),_0x4a4376(0x1af)===_0x122a1e['id']?_0x122a1e[_0x4a4376(0x1c2)]():_0x122a1e[_0x4a4376(0x1b5)]({'id':_0x4a4376(0x1af),'title':_0x3aebfa(_0x55338e[_0x4a4376(0x1b3)],_0x4a4376(0x1a4)),'icon':_0x2b765c,'hasCloseButton':!0x0,'content':this[_0x4a4376(0x1cd)],'position':_0x5822d0[_0x4a4376(0x1a0)]});}[_0x26fcbf(0x196)](_0x222c46,_0x2b1cdf=!0x1){const _0x566cfd=_0x26fcbf,_0x24b1c3=this[_0x566cfd(0x194)][_0x566cfd(0x1b3)],_0x3bae9c=this[_0x566cfd(0x194)][_0x566cfd(0x1b6)][_0x566cfd(0x1aa)](_0x566cfd(0x1b4)),_0x3eba89=new _0x222c46(_0x24b1c3);return _0x3eba89[_0x566cfd(0x19e)](_0x566cfd(0x1a7))['to'](this,_0x566cfd(0x1a7)),_0x3eba89[_0x566cfd(0x19e)](_0x566cfd(0x1c7))['to'](_0x3bae9c,'id',_0x48b773=>_0x566cfd(0x1af)===_0x48b773),_0x3eba89[_0x566cfd(0x1a8)]({'label':_0x3aebfa(_0x24b1c3,_0x566cfd(0x1a4)),'icon':_0x2b765c,'isToggleable':!0x0}),_0x2b1cdf&&(_0x3eba89[_0x566cfd(0x1a6)]=!0x0),this[_0x566cfd(0x18c)](_0x3eba89,_0x566cfd(0x1ad),()=>this[_0x566cfd(0x1ca)]()),_0x3eba89;}[_0x26fcbf(0x1b9)]=_0x26a14e=>{const _0x404a85=_0x26fcbf,_0x340af7=_0x26a14e[_0x404a85(0x1b7)];if(!this[_0x404a85(0x197)][_0x404a85(0x1cb)](_0x340af7[_0x404a85(0x1c8)]))return;const _0x13922a=this[_0x404a85(0x194)][_0x404a85(0x1b6)][_0x404a85(0x1aa)](_0x404a85(0x1b4));_0x13922a[_0x404a85(0x18e)]&&_0x404a85(0x1af)===_0x13922a['id']&&(_0x13922a[_0x404a85(0x1c2)](),_0x26a14e[_0x404a85(0x1b8)]());};}