@ckeditor/ckeditor5-collaboration-core 44.1.0-alpha.0 → 44.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ContextPlugin as _0x5e5642,Editor as _0xcfff72,icons as _0x5aa1fd}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x302a1b,Collection as _0x18330e,uid as _0x2d31d0,first as _0x3125b5,FocusTracker as _0x169378,KeystrokeHandler as _0x1ef244}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x350083,IconView as _0x52f527,ButtonView as _0x41496f,DropdownButtonView as _0x1ca69d,FocusCycler as _0x2d6c6c,isViewWithFocusCycler as _0x2a3726}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x37a444 from'date-fns/format/index.js';import _0x2c413b from'date-fns/parseISO/index.js';import _0x2a1395 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x5e5642{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x59ab11,_0x4273bc){let _0x28ceb6;if(_0x4273bc||(_0x4273bc=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x4273bc?_0x28ceb6=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x28ceb6=this['context']['editors']['find'](_0xecd6bd=>_0xecd6bd['config']['get']('collaboration.channelId')==_0x4273bc)),!_0x28ceb6)throw new _0x302a1b('permissions-set-permissions-invalid-channel-id',null);const _0x4aa0d6=_0x28ceb6['plugins'],_0x21495c=_0x4aa0d6['has']('CommentsRepository')?_0x4aa0d6['get']('CommentsRepository'):void 0x0,_0x1df988=_0x4aa0d6['has']('CommentsOnly')&&_0x4aa0d6['get']('CommentsOnly'),_0x51dda0=_0x59ab11['includes']('document:write'),_0x40ff73=_0x59ab11['includes']('comment:modify_all'),_0x516364=_0x59ab11['includes']('comment:admin'),_0x42ee3a=_0x59ab11['includes']('comment:write'),_0x5d64f7=_0x42ee3a||_0x516364,_0x15fb95=_0x5d64f7||_0x40ff73,_0x3d6397=_0x51dda0||_0x5d64f7;(_0x1df988&&(_0x1df988['isEnabled']=!_0x51dda0&&_0x15fb95),_0x28ceb6 instanceof _0xcfff72)&&(!(_0x51dda0||_0x15fb95&&_0x21495c)?_0x28ceb6['enableReadOnlyMode']('no-permissions'):_0x28ceb6['disableReadOnlyMode']('no-permissions'));if(_0x21495c){_0x21495c['setPermissions']({'admin':_0x516364,'modifyAll':_0x40ff73,'write':_0x42ee3a,'resolve':_0x3d6397},_0x4273bc);const _0x289296=_0x28ceb6 instanceof _0xcfff72&&_0x28ceb6['commands']['get']('addCommentThread');_0x289296&&(_0x5d64f7?_0x289296['clearForceDisabled']('noPermissions'):_0x289296['forceDisabled']('noPermissions'));}}}function o(_0x46cb34,_0x50bc20){const t=_0x46cb34['t'];switch(_0x50bc20){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class u extends _0x5e5642{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[n];}constructor(_0x42191c){super(_0x42191c),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x18330e(),this['_locale']=_0x42191c['locale'],this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x1a7333,name:_0x4d2d48,..._0x58a915}){if(!_0x1a7333||'string'!=typeof _0x1a7333)throw new _0x302a1b('users-add-invalid-id');if(this['users']['has'](_0x1a7333))throw new _0x302a1b('users-add-duplicated-id',null,{'id':_0x1a7333});const _0x3b132f={..._0x58a915,'id':_0x1a7333,'name':h(this['_locale'],_0x4d2d48),'color':this['_getNextColor']()};_0x3b132f['name']=h(this['_locale'],_0x3b132f['name']);const _0x17a556=new P(_0x3b132f);return this['users']['add'](_0x17a556),_0x17a556;}['getUser'](_0x438c53){return this['users']['get'](_0x438c53);}['useAnonymousUser'](){const _0x3ac343=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x3ac343);}['defineMe'](_0x367eba){if(this['_myId'])throw new _0x302a1b('users-me-already-defined',null);const _0x47c4e9=this['getUser'](_0x367eba);if(!_0x47c4e9)throw new _0x302a1b('users-me-missing-user',null);this['_myId']=_0x367eba,_0x47c4e9['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x3336cc=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x3336cc&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x167d55=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x167d55,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x42a461){this['id']=_0x42a461['id'],this['color']=_0x42a461['color'],this['name']=_0x42a461['name'],this['avatar']=_0x42a461['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x10d79f=this['name']['split']('\x20');return 0x1===_0x10d79f['length']?this['_getInitial'](_0x10d79f[0x0]):this['_getInitial'](_0x10d79f[0x0])+this['_getInitial'](_0x10d79f[_0x10d79f['length']-0x1]);}['_getInitial'](_0x2311c2){return _0x2311c2['charAt'](0x0)['toUpperCase']();}}function h(_0x38e083,_0x4afe7d=''){return''==(_0x4afe7d=_0x4afe7d['trim']())?o(_0x38e083,'Anonymous'):_0x4afe7d;}class c{['_id'];constructor(_0x185db2){this['_id']=_0x185db2;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class H extends _0x350083{['name'];['notificationView'];constructor(_0x117b88,_0x5aa2e6,_0x19ef9d){super(_0x117b88),this['name']=_0x5aa2e6['name'],this['notificationView']=null;const _0x32c0a9=['ck','ck-user'],_0x539da2=['ck','ck-user__img'];if(_0x5aa2e6['isAnonymous']&&_0x539da2['push']('ck-user__anonymous'),!_0x5aa2e6['isAnonymous']&&_0x5aa2e6['isMe']&&_0x32c0a9['push']('ck-user_me'),_0x5aa2e6['avatar']&&_0x539da2['push']('ck-user__avatar'),_0x19ef9d){const _0x3ce83a=new _0x52f527();_0x3ce83a['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x3ce83a['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x19ef9d},'children':[_0x3ce83a]};}const _0x3a6604=[{'tag':'div','attributes':{'class':_0x539da2,'style':{'background-image':_0x5aa2e6['avatar']?'url(\x27'+_0x5aa2e6['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x5aa2e6['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x5aa2e6['name']},'children':[{'text':_0x5aa2e6['initials']}]}];this['notificationView']&&_0x3a6604['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x32c0a9,'data-user-id':_0x5aa2e6['id']},'children':_0x3a6604});}}class J extends _0x350083{['id'];constructor(_0x63a04e,_0x7e1cc){super(_0x63a04e),this['id']='ck-aria-description-'+_0x2d31d0(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x7e1cc}]});}}class U extends _0x41496f{['render'](){super['render'](),V(this);}}class Y extends _0x1ca69d{['render'](){super['render'](),V(this);}}function V(_0x3adab4){_0x3adab4['listenTo'](_0x3adab4['element'],'mousedown',(_0x4da397,_0x2b7c99)=>{_0x2b7c99['stopPropagation'](),_0x2b7c99['preventDefault']();}),_0x3adab4['listenTo'](_0x3adab4['element'],'mouseup',()=>{_0x3adab4['element']['focus']();});}function E(_0x33fdf4={}){if(void 0x0!==_0x33fdf4['dateTimeFormat']&&'function'!=typeof _0x33fdf4['dateTimeFormat'])throw new _0x302a1b('invalid-date-time-format');return _0xbc036c=>{const _0x23c9c9='string'==typeof _0xbc036c?_0x2c413b(_0xbc036c):_0xbc036c,_0x20dacd=new Date(),_0x254636=_0x2a1395(_0x20dacd,_0x23c9c9);return _0x33fdf4['dateTimeFormat']?_0x33fdf4['dateTimeFormat'](_0x23c9c9):_0x37a444(_0x23c9c9,0x0===_0x254636?'\x27Today\x27\x20hh:mma':0x1===_0x254636?'\x27Yesterday\x27\x20hh:mma':_0x254636<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0xc8104b,_0x3967d1){const _0x1bce53=_0xc8104b['mapper']['markerNameToElements'](_0x3967d1['name']);if(!_0x1bce53)return null;const _0x56f6e6=_0x3125b5(_0x1bce53['values']());return _0xc8104b['view']['domConverter']['mapViewToDom'](_0x56f6e6)||null;}function R(_0x3a41ed,_0x49f6ad){if(0x0===_0x49f6ad['length'])return null;const _0xf6ceac=[],_0x3bd292=_0x3a41ed['view']['domConverter'];for(const _0x59e360 of _0x49f6ad){const _0x1448fa=_0x3a41ed['mapper']['markerNameToElements'](_0x59e360['name']);if(!_0x1448fa)continue;const _0x5ea4d6=Array['from'](_0x1448fa)['map'](_0x3f3709=>_0x3bd292['mapViewToDom'](_0x3f3709))['filter'](_0x4ea375=>!!_0x4ea375);_0xf6ceac['push'](..._0x5ea4d6);}if(0x0===_0xf6ceac['length'])return null;const _0x47d5cf=[];for(const _0x25a782 of _0xf6ceac){const _0x4cc20f=_0x25a782['getClientRects']()['item'](0x0);_0x4cc20f&&_0x47d5cf['push']({'x':_0x4cc20f['x'],'y':_0x4cc20f['y'],'domElement':_0x25a782});}return 0x0===_0x47d5cf['length']?null:(_0x47d5cf['sort']((_0x20e471,_0x129ed7)=>_0x20e471['y']-_0x129ed7['y']||_0x20e471['x']-_0x129ed7['x']),_0x47d5cf['map'](_0x3915e2=>_0x3915e2['domElement']));}function Z(_0x3f330f,{limit:_0x187b5e,suffix:_0x581a7='...'}){const _0x103b22=[];let _0x19eda2=0x0;const _0x1ada89=_0x3f330f['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x434edf=0x0;_0x434edf<_0x1ada89['length'];_0x434edf++){let _0x2ecdfc=_0x1ada89[_0x434edf];const _0x3b2fd2=$(_0x2ecdfc);if(_0x2ecdfc['startsWith']('<')){if(_0x19eda2>=_0x187b5e){const _0x5e64ea=_0x2ecdfc['match'](/[a-zA-Z]+/);if(!_0x5e64ea){_0x1ada89[_0x434edf]='';continue;}const _0x148ec4=_0x5e64ea[0x0];_0x2ecdfc['startsWith']('</')?(_0x103b22['length']&&(_0x2ecdfc=''),_0x103b22['pop']()):(_0x103b22['push'](_0x148ec4),_0x2ecdfc='');}}else{if(_0x19eda2>=_0x187b5e)_0x2ecdfc='';else{if(_0x19eda2+_0x3b2fd2['length']>=_0x187b5e){let _0x4fdf50=_0x187b5e-_0x19eda2;if('\x20'===_0x3b2fd2[_0x4fdf50-0x1])_0x4fdf50--;else{const _0x4fd5cf=_0x3b2fd2['slice'](_0x4fdf50)['indexOf']('\x20');-0x1!==_0x4fd5cf?_0x4fdf50+=_0x4fd5cf:_0x4fdf50=_0x2ecdfc['length'];}_0x2ecdfc=_0x3b2fd2['slice'](0x0,_0x4fdf50)['join']('')+_0x581a7,_0x19eda2=_0x187b5e;}else _0x19eda2+=_0x3b2fd2['length'];}}_0x1ada89[_0x434edf]=_0x2ecdfc;}return _0x1ada89['join']('\x0a')['replace'](/\n/g,'');}function $(_0x5a823c){const _0x5e3227=[];for(let _0x2cd90e=0x0;_0x2cd90e<_0x5a823c['length'];_0x2cd90e++){const _0x29e577=_0x5a823c['substring'](_0x2cd90e)['match'](/^&[a-z0-9#]+;/);if(_0x29e577){const _0x256073=_0x29e577[0x0];_0x5e3227['push'](_0x256073),_0x2cd90e+=_0x256073['length']-0x1;}else _0x5e3227['push'](_0x5a823c[_0x2cd90e]);}return _0x5e3227;}class m extends _0x350083{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x884633){super(_0x884633);const _0x2506b3=this['bindTemplate'];this['set']('message',o(_0x884633,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x884633,o(_0x884633,'Yes'),_0x5aa1fd['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x884633,o(_0x884633,'No'),_0x5aa1fd['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x169378(),this['keystrokes']=new _0x1ef244(),this['focusCycler']=new _0x2d6c6c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-thread__remove-confirm'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0x2506b3['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x5d8ec6,_0x1a5168,_0x44be30,_0x37e054){const _0x5303e8=new _0x41496f(_0x5d8ec6);return _0x5303e8['label']=_0x1a5168,_0x5303e8['icon']=_0x44be30,_0x5303e8['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x37e054}}),_0x5303e8['on']('execute',()=>this['fire'](_0x37e054)),_0x5303e8;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x5db9de=>{this['keystrokes']['listenTo'](_0x5db9de['element']),this['focusTracker']['add'](_0x5db9de['element']);}),this['keystrokes']['set']('esc',(_0x26e30b,_0x583e23)=>{this['fire']('cancel'),_0x583e23();});}}function f(_0x4b301a){return class extends _0x4b301a{['showConfirm'](_0x2e8d7a,_0x5409f9){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x2e8d7a,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x5409f9['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x16040e=>this['confirmView']['on']('submit',_0x16040e));}['cancelConfirm'](){this['isConfirm']&&this['confirmView']['fire']('cancel');}['_removeConfirm'](){this['element']&&this['confirmView']&&this['confirmView']['element']&&(this['element']['focus'](),this['confirmView']['element']['remove'](),this['deregisterChild'](this['confirmView']),this['isConfirm']=!0x1,this['fire']('removeConfirm'),this['confirmView']['destroy'](),this['confirmView']=void 0x0);}};}function M(_0x11277c){let _0x3b20e5=0x0,_0x457370=0x0;for(const _0x1e6e08 of q(_0x11277c))_0x3b20e5=(_0x3b20e5<<0x5)-_0x3b20e5+_0x1e6e08,_0x3b20e5|=0x0,[_0x3b20e5,_0x457370]=[_0x457370,_0x3b20e5];return z(_0x3b20e5)+z(_0x457370);}function*O(_0xe5d1ff){null==_0xe5d1ff||null==_0xe5d1ff?yield 0x12b9b0a1:0x0===_0xe5d1ff||!0x1===_0xe5d1ff?yield 0x0:0x1===_0xe5d1ff||0x1==_0xe5d1ff?yield 0x1:Array['isArray'](_0xe5d1ff)?yield*function*(_0x124eb6){for(const _0x7bd7df of _0x124eb6)yield*O(_0x7bd7df);}(_0xe5d1ff):'object'==typeof _0xe5d1ff?yield*q(_0xe5d1ff):'string'==typeof _0xe5d1ff?yield*v(_0xe5d1ff):'number'==typeof _0xe5d1ff&&(yield _0xe5d1ff);}function*q(_0x3722ea){if(yield w('{'),_0x3722ea){const _0x1bbeed=Object['keys'](_0x3722ea)['sort']();for(const _0x49c63f of _0x1bbeed){yield*v(_0x49c63f),yield w(':');const _0x1cb3ad=_0x3722ea[_0x49c63f];yield*O(_0x1cb3ad);}}yield w('}');}function*v(_0x2a8c62){yield w('\x22');for(const _0xe28267 of _0x2a8c62)yield w(_0xe28267);yield w('\x22');}function w(_0x51e450){return _0x51e450['charCodeAt'](0x0);}function z(_0x5105da){return(_0x5105da*=Math['sign'](_0x5105da))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x64b637,_0x4b8e6e,_0x5c5461,_0x17e7ab=[]){const _0x2b40ac='string'==typeof _0x64b637?_0x5c5461['get'](_0x64b637)['constructor']:_0x64b637['prototype']['constructor'];if(_0x4b8e6e['has'](_0x2b40ac))return _0x4b8e6e['get'](_0x2b40ac);_0x4b8e6e['set'](_0x2b40ac,!0x0);const _0x1bd0cd=[...D,..._0x17e7ab]['map'](_0x316840=>{if(_0x5c5461['has'](_0x316840))return _0x5c5461['get'](_0x316840)['constructor'];})['filter'](_0x21d3e5=>_0x21d3e5);if(_0x2b40ac&&_0x1bd0cd['includes'](_0x2b40ac))return _0x4b8e6e['set'](_0x2b40ac,!0x1),!0x1;if(!_0x2b40ac['requires'])return _0x4b8e6e['set'](_0x2b40ac,!0x0),!0x0;const _0x16085f=_0x2b40ac['requires']['every'](_0x3a4cc7=>S(_0x3a4cc7,_0x4b8e6e,_0x5c5461,_0x17e7ab));return _0x4b8e6e['set'](_0x2b40ac,_0x16085f),_0x16085f;}function C(_0x314561,_0x2454a6){const _0x82783d={};for(const _0x972ffb of _0x314561['config']['names']())W['includes'](_0x972ffb)||(_0x82783d[_0x972ffb]=_0x314561['config']['get'](_0x972ffb));const _0x3eb196=_0x82783d['plugins']||[],_0x3dd21b=_0x314561['constructor']['builtinPlugins']||[],_0x3b657b=_0x3eb196['length']?_0x3eb196:_0x3dd21b,_0x2cb292=_0x82783d['extraPlugins']||[];delete _0x82783d['extraPlugins'];const _0x1f98c7=_0x82783d['removePlugins']||[];delete _0x82783d['removePlugins'];const _0x252fc5=_0x314561['_context']['config']['get']('plugins')||[],_0xe7e68a=_0x3b657b['concat'](_0x2cb292)['concat'](_0x252fc5)['map'](_0x582ad3=>'string'==typeof _0x582ad3?_0x3dd21b['find'](_0x548c34=>_0x548c34['pluginName']==_0x582ad3):_0x582ad3)['filter'](_0x1edf7e=>!_0x1f98c7['includes'](_0x1edf7e)&&!_0x1f98c7['includes'](_0x1edf7e['pluginName'])),_0x5d85a2=Array['from'](new Set(_0xe7e68a)),_0x20dbee=new Map();return _0x82783d['plugins']=_0x5d85a2['filter'](_0x1f74b8=>S(_0x1f74b8,_0x20dbee,_0x314561['plugins'],_0x2454a6)),_0x82783d;}function B(_0x4ce012,_0xff5d2a){const _0x40c61c=[];_0x4ce012['document']['selection']['on']('change:range',()=>{const _0x2e0bc3=function(_0x29413c,_0x4b8fb0){const _0xfbdbd2=[];for(const _0x29834a of _0x29413c['markers']){const _0x4b2921=_0x29834a['getRange']();(_0x4b2921['containsPosition'](_0x4b8fb0)||_0x4b2921['start']['isEqual'](_0x4b8fb0)||_0x4b2921['end']['isEqual'](_0x4b8fb0))&&_0xfbdbd2['push'](_0x29834a);}return _0xfbdbd2;}(_0x4ce012,_0x4ce012['document']['selection']['focus']),_0x57f0ad=[],_0x4f7b0e=[],_0x306a41=[];for(const _0x36b1a0 of _0x40c61c)_0x2e0bc3['includes'](_0x36b1a0)||_0x57f0ad['push'](_0x36b1a0);for(const _0x257700 of _0x2e0bc3)_0x40c61c['includes'](_0x257700)||_0x4f7b0e['push'](_0x257700),_0x306a41['push'](_0x257700);(_0x57f0ad['length']||_0x4f7b0e['length'])&&_0xff5d2a({'left':_0x57f0ad,'entered':_0x4f7b0e}),_0x40c61c['length']=0x0,_0x40c61c['push'](..._0x306a41);});}const Q='Ctrl+Shift+E';function T(_0xb05cda,_0x18775f){const _0x168b93=_0xb05cda['element'];_0xb05cda['keystrokes']['listenTo'](_0x168b93);for(const _0x5ce33e of _0x18775f)K(_0xb05cda,_0x5ce33e);_0x18775f['on']('change',(_0x4cf7af,_0x4ec336)=>{for(const _0x117269 of _0x4ec336['removed'])_(_0xb05cda,_0x117269);for(const _0x3e4145 of Array['from'](_0x4ec336['added'])['reverse']())K(_0xb05cda,_0x3e4145);}),_0xb05cda['keystrokes']['set']('enter',(_0x1150c8,_0x18323a)=>{_0x168b93===_0x1150c8['target']&&(_0xb05cda['focusCycler']['focusFirst'](),_0x18323a());},{'filter':_0x4af374=>_0x4af374['target']===_0x168b93}),_0xb05cda['keystrokes']['set']('esc',(_0x39625f,_0x21c95c)=>{_0x168b93!==_0x39625f['target']?_0xb05cda['focus']():_0xb05cda['fire']('escape'),_0x21c95c();}),_0xb05cda['keystrokes']['set']('arrowdown',(_0x386ab4,_0x1f5178)=>{_0x168b93===_0x386ab4['target']&&(_0xb05cda['fire']('arrowdown'),_0x1f5178());}),_0xb05cda['keystrokes']['set']('arrowup',(_0x29d3b6,_0x2d33b9)=>{_0x168b93===_0x29d3b6['target']&&(_0xb05cda['fire']('arrowup'),_0x2d33b9());});}function K(_0x153b7a,_0x1a6496){_0x1a6496['isRendered']&&(_0x153b7a['focusTracker']['add'](_0x1a6496['element']),_0x153b7a['keystrokes']['listenTo'](_0x1a6496['element']),_0x2a3726(_0x1a6496)&&function(_0x494f93,_0x32f4b0){const _0x44eeb6=_0x494f93['actions'],_0x152138=_0x32f4b0['actions'];for(const _0x2ff23f of Object['keys'](_0x44eeb6))if(_0x2ff23f in _0x152138&&_0x44eeb6[_0x2ff23f]!==_0x152138[_0x2ff23f])return!0x1;return!0x0;}(_0x153b7a['focusCycler'],_0x1a6496['focusCycler'])&&_0x153b7a['focusCycler']['chain'](_0x1a6496['focusCycler']));}function _(_0x5c55e3,_0x5b9a0){_0x5c55e3['focusTracker']['remove'](_0x5b9a0['element']),_0x5c55e3['keystrokes']['stopListening'](_0x5b9a0['element']),_0x2a3726(_0x5b9a0)&&_0x5c55e3['focusCycler']['unchain'](_0x5b9a0['focusCycler']);}export{J as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,H as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
23
+ import{ContextPlugin as _0xc46b8e,Editor as _0x4279f3,icons as _0x292fb0}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x26cf0c,Collection as _0x26f663,uid as _0x4b268c,first as _0x13a890,FocusTracker as _0x273e04,KeystrokeHandler as _0x39da7b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x20118b,IconView as _0xf75e6c,ButtonView as _0x47f953,DropdownButtonView as _0x320515,FocusCycler as _0x5e7e17,isViewWithFocusCycler as _0xa53e9f}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0xba4c05 from'date-fns/format/index.js';import _0x4f402b from'date-fns/parseISO/index.js';import _0x3af197 from'date-fns/differenceInCalendarDays/index.js';class n extends _0xc46b8e{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x50e8c1,_0x34a237){let _0x5ca049;if(_0x34a237||(_0x34a237=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x34a237?_0x5ca049=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x5ca049=this['context']['editors']['find'](_0x3c275f=>_0x3c275f['config']['get']('collaboration.channelId')==_0x34a237)),!_0x5ca049)throw new _0x26cf0c('permissions-set-permissions-invalid-channel-id',null);const _0x14e7bd=_0x5ca049['plugins'],_0x4d6354=_0x14e7bd['has']('CommentsRepository')?_0x14e7bd['get']('CommentsRepository'):void 0x0,_0x242515=_0x14e7bd['has']('CommentsOnly')&&_0x14e7bd['get']('CommentsOnly'),_0x337d0d=_0x50e8c1['includes']('document:write'),_0x53e515=_0x50e8c1['includes']('comment:modify_all'),_0xbe1cd7=_0x50e8c1['includes']('comment:admin'),_0x5e259d=_0x50e8c1['includes']('comment:write'),_0x387125=_0x5e259d||_0xbe1cd7,_0x4ea662=_0x387125||_0x53e515,_0x594fb4=_0x337d0d||_0x387125;(_0x242515&&(_0x242515['isEnabled']=!_0x337d0d&&_0x4ea662),_0x5ca049 instanceof _0x4279f3)&&(!(_0x337d0d||_0x4ea662&&_0x4d6354)?_0x5ca049['enableReadOnlyMode']('no-permissions'):_0x5ca049['disableReadOnlyMode']('no-permissions'));if(_0x4d6354){_0x4d6354['setPermissions']({'admin':_0xbe1cd7,'modifyAll':_0x53e515,'write':_0x5e259d,'resolve':_0x594fb4},_0x34a237);const _0x21bc41=_0x5ca049 instanceof _0x4279f3&&_0x5ca049['commands']['get']('addCommentThread');_0x21bc41&&(_0x387125?_0x21bc41['clearForceDisabled']('noPermissions'):_0x21bc41['forceDisabled']('noPermissions'));}}}function o(_0x475881,_0x2adaa9){const t=_0x475881['t'];switch(_0x2adaa9){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class u extends _0xc46b8e{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[n];}constructor(_0x2d4c8e){super(_0x2d4c8e),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x26f663(),this['_locale']=_0x2d4c8e['locale'],this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x5a8708,name:_0x20fd71,..._0x211d47}){if(!_0x5a8708||'string'!=typeof _0x5a8708)throw new _0x26cf0c('users-add-invalid-id');if(this['users']['has'](_0x5a8708))throw new _0x26cf0c('users-add-duplicated-id',null,{'id':_0x5a8708});const _0x52365f={..._0x211d47,'id':_0x5a8708,'name':h(this['_locale'],_0x20fd71),'color':this['_getNextColor']()};_0x52365f['name']=h(this['_locale'],_0x52365f['name']);const _0xf4cd07=new P(_0x52365f);return this['users']['add'](_0xf4cd07),_0xf4cd07;}['getUser'](_0x384a1c){return this['users']['get'](_0x384a1c);}['useAnonymousUser'](){const _0x4f4769=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x4f4769);}['defineMe'](_0x2194d4){if(this['_myId'])throw new _0x26cf0c('users-me-already-defined',null);const _0x46c82b=this['getUser'](_0x2194d4);if(!_0x46c82b)throw new _0x26cf0c('users-me-missing-user',null);this['_myId']=_0x2194d4,_0x46c82b['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x1341f7=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x1341f7&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x223a56=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x223a56,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x2f9cd1){this['id']=_0x2f9cd1['id'],this['color']=_0x2f9cd1['color'],this['name']=_0x2f9cd1['name'],this['avatar']=_0x2f9cd1['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x23b22e=this['name']['split']('\x20');return 0x1===_0x23b22e['length']?this['_getInitial'](_0x23b22e[0x0]):this['_getInitial'](_0x23b22e[0x0])+this['_getInitial'](_0x23b22e[_0x23b22e['length']-0x1]);}['_getInitial'](_0x29bf1f){return _0x29bf1f['charAt'](0x0)['toUpperCase']();}}function h(_0x714268,_0x526ca1=''){return''==(_0x526ca1=_0x526ca1['trim']())?o(_0x714268,'Anonymous'):_0x526ca1;}class c{['_id'];constructor(_0x5c6c8e){this['_id']=_0x5c6c8e;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class J extends _0x20118b{['name'];['notificationView'];constructor(_0x26b390,_0x38deb4,_0x1f87ad){super(_0x26b390),this['name']=_0x38deb4['name'],this['notificationView']=null;const _0x297199=['ck','ck-user'],_0x578ff9=['ck','ck-user__img'];if(_0x38deb4['isAnonymous']&&_0x578ff9['push']('ck-user__anonymous'),!_0x38deb4['isAnonymous']&&_0x38deb4['isMe']&&_0x297199['push']('ck-user_me'),_0x38deb4['avatar']&&_0x578ff9['push']('ck-user__avatar'),_0x1f87ad){const _0x78cda8=new _0xf75e6c();_0x78cda8['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x78cda8['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x1f87ad},'children':[_0x78cda8]};}const _0x3d1d00=[{'tag':'div','attributes':{'class':_0x578ff9,'style':{'background-image':_0x38deb4['avatar']?'url(\x27'+_0x38deb4['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x38deb4['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x38deb4['name']},'children':[{'text':_0x38deb4['initials']}]}];this['notificationView']&&_0x3d1d00['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x297199,'data-user-id':_0x38deb4['id']},'children':_0x3d1d00});}}class G extends _0x20118b{['id'];constructor(_0x55b506,_0x439b1b){super(_0x55b506),this['id']='ck-aria-description-'+_0x4b268c(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x439b1b}]});}}class U extends _0x47f953{['render'](){super['render'](),V(this);}}class Y extends _0x320515{['render'](){super['render'](),V(this);}}function V(_0x4926d3){_0x4926d3['listenTo'](_0x4926d3['element'],'mousedown',(_0xefb6b7,_0x4ae73f)=>{_0x4ae73f['stopPropagation'](),_0x4ae73f['preventDefault']();}),_0x4926d3['listenTo'](_0x4926d3['element'],'mouseup',()=>{_0x4926d3['element']['focus']();});}function E(_0xaf203f={}){if(void 0x0!==_0xaf203f['dateTimeFormat']&&'function'!=typeof _0xaf203f['dateTimeFormat'])throw new _0x26cf0c('invalid-date-time-format');return _0x47e30f=>{const _0x39c8c4='string'==typeof _0x47e30f?_0x4f402b(_0x47e30f):_0x47e30f,_0x354dd0=new Date(),_0x423b9f=_0x3af197(_0x354dd0,_0x39c8c4);return _0xaf203f['dateTimeFormat']?_0xaf203f['dateTimeFormat'](_0x39c8c4):_0xba4c05(_0x39c8c4,0x0===_0x423b9f?'\x27Today\x27\x20hh:mma':0x1===_0x423b9f?'\x27Yesterday\x27\x20hh:mma':_0x423b9f<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x50f78e,_0x4c1b9b){const _0x67d77=_0x50f78e['mapper']['markerNameToElements'](_0x4c1b9b['name']);if(!_0x67d77)return null;const _0x5ace8d=_0x13a890(_0x67d77['values']());return _0x50f78e['view']['domConverter']['mapViewToDom'](_0x5ace8d)||null;}function R(_0x532fda,_0x14509f){if(0x0===_0x14509f['length'])return null;const _0x6fd5d0=[],_0x445672=_0x532fda['view']['domConverter'];for(const _0x3268c6 of _0x14509f){const _0x4580ff=_0x532fda['mapper']['markerNameToElements'](_0x3268c6['name']);if(!_0x4580ff)continue;const _0x4d1175=Array['from'](_0x4580ff)['map'](_0x27cad9=>_0x445672['mapViewToDom'](_0x27cad9))['filter'](_0x5c601e=>!!_0x5c601e);_0x6fd5d0['push'](..._0x4d1175);}if(0x0===_0x6fd5d0['length'])return null;const _0x2d2828=[];for(const _0xfec22f of _0x6fd5d0){const _0x3763bd=_0xfec22f['getClientRects']()['item'](0x0);_0x3763bd&&_0x2d2828['push']({'x':_0x3763bd['x'],'y':_0x3763bd['y'],'domElement':_0xfec22f});}return 0x0===_0x2d2828['length']?null:(_0x2d2828['sort']((_0x3b0401,_0x589f7e)=>_0x3b0401['y']-_0x589f7e['y']||_0x3b0401['x']-_0x589f7e['x']),_0x2d2828['map'](_0x3403bb=>_0x3403bb['domElement']));}function Z(_0x2259a3,{limit:_0x5b8f1c,suffix:_0x5ecd24='...'}){const _0x466b55=[];let _0x3a3b18=0x0;const _0x434ab5=_0x2259a3['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x546590=0x0;_0x546590<_0x434ab5['length'];_0x546590++){let _0x3e0b93=_0x434ab5[_0x546590];const _0x17b77a=$(_0x3e0b93);if(_0x3e0b93['startsWith']('<')){if(_0x3a3b18>=_0x5b8f1c){const _0x366b45=_0x3e0b93['match'](/[a-zA-Z]+/);if(!_0x366b45){_0x434ab5[_0x546590]='';continue;}const _0x1e31bc=_0x366b45[0x0];_0x3e0b93['startsWith']('</')?(_0x466b55['length']&&(_0x3e0b93=''),_0x466b55['pop']()):(_0x466b55['push'](_0x1e31bc),_0x3e0b93='');}}else{if(_0x3a3b18>=_0x5b8f1c)_0x3e0b93='';else{if(_0x3a3b18+_0x17b77a['length']>=_0x5b8f1c){let _0x4be03d=_0x5b8f1c-_0x3a3b18;if('\x20'===_0x17b77a[_0x4be03d-0x1])_0x4be03d--;else{const _0x53c636=_0x17b77a['slice'](_0x4be03d)['indexOf']('\x20');-0x1!==_0x53c636?_0x4be03d+=_0x53c636:_0x4be03d=_0x3e0b93['length'];}_0x3e0b93=_0x17b77a['slice'](0x0,_0x4be03d)['join']('')+_0x5ecd24,_0x3a3b18=_0x5b8f1c;}else _0x3a3b18+=_0x17b77a['length'];}}_0x434ab5[_0x546590]=_0x3e0b93;}return _0x434ab5['join']('\x0a')['replace'](/\n/g,'');}function $(_0x53508d){const _0x1f14a9=[];for(let _0x51c85c=0x0;_0x51c85c<_0x53508d['length'];_0x51c85c++){const _0x562c3a=_0x53508d['substring'](_0x51c85c)['match'](/^&[a-z0-9#]+;/);if(_0x562c3a){const _0x250d3e=_0x562c3a[0x0];_0x1f14a9['push'](_0x250d3e),_0x51c85c+=_0x250d3e['length']-0x1;}else _0x1f14a9['push'](_0x53508d[_0x51c85c]);}return _0x1f14a9;}class m extends _0x20118b{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x127c56){super(_0x127c56);const _0x2a7cf3=this['bindTemplate'];this['set']('message',o(_0x127c56,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x127c56,o(_0x127c56,'Yes'),_0x292fb0['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x127c56,o(_0x127c56,'No'),_0x292fb0['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x273e04(),this['keystrokes']=new _0x39da7b(),this['focusCycler']=new _0x5e7e17({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-thread__remove-confirm'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0x2a7cf3['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x514a5d,_0x474de2,_0x3d128a,_0x203be6){const _0x3e5334=new _0x47f953(_0x514a5d);return _0x3e5334['label']=_0x474de2,_0x3e5334['icon']=_0x3d128a,_0x3e5334['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x203be6}}),_0x3e5334['on']('execute',()=>this['fire'](_0x203be6)),_0x3e5334;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x3563e1=>{this['keystrokes']['listenTo'](_0x3563e1['element']),this['focusTracker']['add'](_0x3563e1['element']);}),this['keystrokes']['set']('esc',(_0x4cab4f,_0x2a07e5)=>{this['fire']('cancel'),_0x2a07e5();});}}function f(_0x21c3a0){return class extends _0x21c3a0{['showConfirm'](_0x14eab7,_0x1e6a41){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x14eab7,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x1e6a41['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x10ee78=>this['confirmView']['on']('submit',_0x10ee78));}['cancelConfirm'](){this['isConfirm']&&this['confirmView']['fire']('cancel');}['_removeConfirm'](){this['element']&&this['confirmView']&&this['confirmView']['element']&&(this['element']['focus'](),this['confirmView']['element']['remove'](),this['deregisterChild'](this['confirmView']),this['isConfirm']=!0x1,this['fire']('removeConfirm'),this['confirmView']['destroy'](),this['confirmView']=void 0x0);}};}function M(_0x1346aa){let _0x1ac4e6=0x0,_0x29de93=0x0;for(const _0x196520 of q(_0x1346aa))_0x1ac4e6=(_0x1ac4e6<<0x5)-_0x1ac4e6+_0x196520,_0x1ac4e6|=0x0,[_0x1ac4e6,_0x29de93]=[_0x29de93,_0x1ac4e6];return z(_0x1ac4e6)+z(_0x29de93);}function*O(_0x515159){null==_0x515159||null==_0x515159?yield 0x12b9b0a1:0x0===_0x515159||!0x1===_0x515159?yield 0x0:0x1===_0x515159||0x1==_0x515159?yield 0x1:Array['isArray'](_0x515159)?yield*function*(_0x1aead5){for(const _0x4b3925 of _0x1aead5)yield*O(_0x4b3925);}(_0x515159):'object'==typeof _0x515159?yield*q(_0x515159):'string'==typeof _0x515159?yield*v(_0x515159):'number'==typeof _0x515159&&(yield _0x515159);}function*q(_0x2bb788){if(yield w('{'),_0x2bb788){const _0xfbbdc5=Object['keys'](_0x2bb788)['sort']();for(const _0x507d8b of _0xfbbdc5){yield*v(_0x507d8b),yield w(':');const _0x38de7b=_0x2bb788[_0x507d8b];yield*O(_0x38de7b);}}yield w('}');}function*v(_0x4a0773){yield w('\x22');for(const _0x5e6271 of _0x4a0773)yield w(_0x5e6271);yield w('\x22');}function w(_0x189ddf){return _0x189ddf['charCodeAt'](0x0);}function z(_0x25c7be){return(_0x25c7be*=Math['sign'](_0x25c7be))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x56e0dc,_0x3de81b,_0x43187a,_0x120bba=[]){const _0x3a434b='string'==typeof _0x56e0dc?_0x43187a['get'](_0x56e0dc)['constructor']:_0x56e0dc['prototype']['constructor'];if(_0x3de81b['has'](_0x3a434b))return _0x3de81b['get'](_0x3a434b);_0x3de81b['set'](_0x3a434b,!0x0);const _0x7ee37c=[...D,..._0x120bba]['map'](_0x37d355=>{if(_0x43187a['has'](_0x37d355))return _0x43187a['get'](_0x37d355)['constructor'];})['filter'](_0x498085=>_0x498085);if(_0x3a434b&&_0x7ee37c['includes'](_0x3a434b))return _0x3de81b['set'](_0x3a434b,!0x1),!0x1;if(!_0x3a434b['requires'])return _0x3de81b['set'](_0x3a434b,!0x0),!0x0;const _0x47d17a=_0x3a434b['requires']['every'](_0x21fa77=>S(_0x21fa77,_0x3de81b,_0x43187a,_0x120bba));return _0x3de81b['set'](_0x3a434b,_0x47d17a),_0x47d17a;}function C(_0x528638,_0x1ce9c8){const _0xec3207={};for(const _0x186615 of _0x528638['config']['names']())W['includes'](_0x186615)||(_0xec3207[_0x186615]=_0x528638['config']['get'](_0x186615));const _0x227fb0=_0xec3207['plugins']||[],_0xd1e849=_0x528638['constructor']['builtinPlugins']||[],_0x51c8b7=_0x227fb0['length']?_0x227fb0:_0xd1e849,_0x410a4b=_0xec3207['extraPlugins']||[];delete _0xec3207['extraPlugins'];const _0x2ed58a=_0xec3207['removePlugins']||[];delete _0xec3207['removePlugins'];const _0x3f7897=_0x528638['_context']['config']['get']('plugins')||[],_0x1cf119=_0x51c8b7['concat'](_0x410a4b)['concat'](_0x3f7897)['map'](_0x125920=>'string'==typeof _0x125920?_0xd1e849['find'](_0x1b00f7=>_0x1b00f7['pluginName']==_0x125920):_0x125920)['filter'](_0x633b71=>!_0x2ed58a['includes'](_0x633b71)&&!_0x2ed58a['includes'](_0x633b71['pluginName'])),_0x57587c=Array['from'](new Set(_0x1cf119)),_0xea450e=new Map();return _0xec3207['plugins']=_0x57587c['filter'](_0x35269f=>S(_0x35269f,_0xea450e,_0x528638['plugins'],_0x1ce9c8)),_0xec3207;}function B(_0x2aec1a,_0x123e6c){const _0x38d272=[];_0x2aec1a['document']['selection']['on']('change:range',()=>{const _0x5afa55=function(_0x3eafd2,_0x4100ba){const _0x4ce8fc=[];for(const _0x50cf95 of _0x3eafd2['markers']){const _0xe42e54=_0x50cf95['getRange']();(_0xe42e54['containsPosition'](_0x4100ba)||_0xe42e54['start']['isEqual'](_0x4100ba)||_0xe42e54['end']['isEqual'](_0x4100ba))&&_0x4ce8fc['push'](_0x50cf95);}return _0x4ce8fc;}(_0x2aec1a,_0x2aec1a['document']['selection']['focus']),_0x4d688c=[],_0x14621c=[],_0x3e75f5=[];for(const _0x453564 of _0x38d272)_0x5afa55['includes'](_0x453564)||_0x4d688c['push'](_0x453564);for(const _0x65e0f9 of _0x5afa55)_0x38d272['includes'](_0x65e0f9)||_0x14621c['push'](_0x65e0f9),_0x3e75f5['push'](_0x65e0f9);(_0x4d688c['length']||_0x14621c['length'])&&_0x123e6c({'left':_0x4d688c,'entered':_0x14621c}),_0x38d272['length']=0x0,_0x38d272['push'](..._0x3e75f5);});}const Q='Ctrl+Shift+E';function T(_0x40b03b,_0x1a3d21){const _0x45e48a=_0x40b03b['element'];_0x40b03b['keystrokes']['listenTo'](_0x45e48a);for(const _0x4eb89d of _0x1a3d21)K(_0x40b03b,_0x4eb89d);_0x1a3d21['on']('change',(_0x1781a6,_0x3078fc)=>{for(const _0x585e1b of _0x3078fc['removed'])_(_0x40b03b,_0x585e1b);for(const _0x5efb59 of Array['from'](_0x3078fc['added'])['reverse']())K(_0x40b03b,_0x5efb59);}),_0x40b03b['keystrokes']['set']('enter',(_0x400b0c,_0x2919a9)=>{_0x45e48a===_0x400b0c['target']&&(_0x40b03b['focusCycler']['focusFirst'](),_0x2919a9());},{'filter':_0x2e7ef7=>_0x2e7ef7['target']===_0x45e48a}),_0x40b03b['keystrokes']['set']('esc',(_0x1b1dc2,_0x1cc812)=>{_0x45e48a!==_0x1b1dc2['target']?_0x40b03b['focus']():_0x40b03b['fire']('escape'),_0x1cc812();}),_0x40b03b['keystrokes']['set']('arrowdown',(_0xe6dd03,_0x4686c1)=>{_0x45e48a===_0xe6dd03['target']&&(_0x40b03b['fire']('arrowdown'),_0x4686c1());}),_0x40b03b['keystrokes']['set']('arrowup',(_0x119a36,_0x18b78b)=>{_0x45e48a===_0x119a36['target']&&(_0x40b03b['fire']('arrowup'),_0x18b78b());});}function K(_0x5efafe,_0xd7e762){_0xd7e762['isRendered']&&(_0x5efafe['focusTracker']['add'](_0xd7e762['element']),_0x5efafe['keystrokes']['listenTo'](_0xd7e762['element']),_0xa53e9f(_0xd7e762)&&function(_0x30dcdf,_0x6612f0){const _0x1e83d6=_0x30dcdf['actions'],_0x3410ea=_0x6612f0['actions'];for(const _0xae1b6c of Object['keys'](_0x1e83d6))if(_0xae1b6c in _0x3410ea&&_0x1e83d6[_0xae1b6c]!==_0x3410ea[_0xae1b6c])return!0x1;return!0x0;}(_0x5efafe['focusCycler'],_0xd7e762['focusCycler'])&&_0x5efafe['focusCycler']['chain'](_0xd7e762['focusCycler']));}function _(_0x5e27f1,_0x3bacef){_0x5e27f1['focusTracker']['remove'](_0x3bacef['element']),_0x5e27f1['keystrokes']['stopListening'](_0x3bacef['element']),_0xa53e9f(_0x3bacef)&&_0x5e27f1['focusCycler']['unchain'](_0x3bacef['focusCycler']);}export{G as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,J as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-collaboration-core",
3
- "version": "44.1.0-alpha.0",
3
+ "version": "44.1.0-alpha.2",
4
4
  "description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -32,11 +32,11 @@
32
32
  "type": "module",
33
33
  "main": "src/index.js",
34
34
  "dependencies": {
35
- "@ckeditor/ckeditor5-core": "44.1.0-alpha.0",
36
- "@ckeditor/ckeditor5-theme-lark": "44.1.0-alpha.0",
37
- "@ckeditor/ckeditor5-ui": "44.1.0-alpha.0",
38
- "@ckeditor/ckeditor5-utils": "44.1.0-alpha.0",
39
- "ckeditor5": "44.1.0-alpha.0",
35
+ "@ckeditor/ckeditor5-core": "44.1.0-alpha.2",
36
+ "@ckeditor/ckeditor5-theme-lark": "44.1.0-alpha.2",
37
+ "@ckeditor/ckeditor5-ui": "44.1.0-alpha.2",
38
+ "@ckeditor/ckeditor5-utils": "44.1.0-alpha.2",
39
+ "ckeditor5": "44.1.0-alpha.2",
40
40
  "date-fns": "2.30.0"
41
41
  },
42
42
  "files": [
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x1439bb,_0x3d7348){var _0x5bc677=_0x5695,_0xa185de=_0x1439bb();while(!![]){try{var _0x165cb2=-parseInt(_0x5bc677(0x1c5))/0x1*(parseInt(_0x5bc677(0x1c4))/0x2)+parseInt(_0x5bc677(0x1ca))/0x3*(parseInt(_0x5bc677(0x1cb))/0x4)+-parseInt(_0x5bc677(0x1d0))/0x5+-parseInt(_0x5bc677(0x1c7))/0x6*(parseInt(_0x5bc677(0x1c8))/0x7)+-parseInt(_0x5bc677(0x1d1))/0x8*(parseInt(_0x5bc677(0x1c6))/0x9)+parseInt(_0x5bc677(0x1cc))/0xa*(parseInt(_0x5bc677(0x1cd))/0xb)+parseInt(_0x5bc677(0x1d2))/0xc;if(_0x165cb2===_0x3d7348)break;else _0xa185de['push'](_0xa185de['shift']());}catch(_0x433865){_0xa185de['push'](_0xa185de['shift']());}}}(_0x1eb1,0x946da));import{uid as _0x4e703a}from'ckeditor5/src/utils.js';import{View as _0x40b8bb}from'ckeditor5/src/ui.js';export default class J extends _0x40b8bb{constructor(_0x5487b1,_0x26dd01){var _0x5ad7c0=_0x5695;super(_0x5487b1),this['id']=_0x5ad7c0(0x1ce)+_0x4e703a(),this[_0x5ad7c0(0x1c3)]({'tag':_0x5ad7c0(0x1cf),'attributes':{'class':['ck',_0x5ad7c0(0x1c9)],'id':this['id']},'children':[{'text':_0x26dd01}]});}}function _0x5695(_0x55c324,_0x55e9db){var _0x1eb1b1=_0x1eb1();return _0x5695=function(_0x569562,_0x24de34){_0x569562=_0x569562-0x1c3;var _0xea8672=_0x1eb1b1[_0x569562];return _0xea8672;},_0x5695(_0x55c324,_0x55e9db);}function _0x1eb1(){var _0xf2a904=['9863BWfPnu','ck-aria-description','2906748eNJgJn','4SqyEpw','70Xtltxn','110726BquYvg','ck-aria-description-','span','5110925ovFEDe','51760vifyQz','37402776GfMVyh','setTemplate','2205012iNcnJT','1VLjdpo','1359jTjTRR','1902DSPQuQ'];_0x1eb1=function(){return _0xf2a904;};return _0x1eb1();}
23
+ (function(_0x386166,_0x53e7ae){var _0x13bf03=_0x2f2d,_0x31f952=_0x386166();while(!![]){try{var _0x3a3a9a=parseInt(_0x13bf03(0x116))/0x1*(-parseInt(_0x13bf03(0x113))/0x2)+-parseInt(_0x13bf03(0x115))/0x3+parseInt(_0x13bf03(0x11b))/0x4*(-parseInt(_0x13bf03(0x110))/0x5)+-parseInt(_0x13bf03(0x111))/0x6+-parseInt(_0x13bf03(0x11c))/0x7*(-parseInt(_0x13bf03(0x11a))/0x8)+-parseInt(_0x13bf03(0x11d))/0x9*(-parseInt(_0x13bf03(0x112))/0xa)+parseInt(_0x13bf03(0x117))/0xb;if(_0x3a3a9a===_0x53e7ae)break;else _0x31f952['push'](_0x31f952['shift']());}catch(_0x2f817a){_0x31f952['push'](_0x31f952['shift']());}}}(_0xae4f,0xb36fd));import{uid as _0xaf04d1}from'ckeditor5/src/utils.js';function _0x2f2d(_0xa7e018,_0x2f88f){var _0xae4f12=_0xae4f();return _0x2f2d=function(_0x2f2da2,_0x4eb93d){_0x2f2da2=_0x2f2da2-0x110;var _0x5097b0=_0xae4f12[_0x2f2da2];return _0x5097b0;},_0x2f2d(_0xa7e018,_0x2f88f);}import{View as _0x17e8fc}from'ckeditor5/src/ui.js';function _0xae4f(){var _0x58a28f=['6892JMmELy','133THQrrD','9ruVkNo','setTemplate','2495QKGICH','6419244vNHIem','8815600zzjzXf','10814ryUpgd','span','1797552EbyuUt','12JeseND','23471833xuHlFk','ck-aria-description-','ck-aria-description','131928pAXPMK'];_0xae4f=function(){return _0x58a28f;};return _0xae4f();}export default class G extends _0x17e8fc{constructor(_0x28f545,_0x32ea3b){var _0x4dfd2b=_0x2f2d;super(_0x28f545),this['id']=_0x4dfd2b(0x118)+_0xaf04d1(),this[_0x4dfd2b(0x11e)]({'tag':_0x4dfd2b(0x114),'attributes':{'class':['ck',_0x4dfd2b(0x119)],'id':this['id']},'children':[{'text':_0x32ea3b}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x3344f7,_0x448886){const _0x4f158a=_0x3fdc,_0x50d924=_0x3344f7();while(!![]){try{const _0x5353dc=parseInt(_0x4f158a(0xa0))/0x1+parseInt(_0x4f158a(0x9f))/0x2*(parseInt(_0x4f158a(0x9d))/0x3)+-parseInt(_0x4f158a(0xa5))/0x4+parseInt(_0x4f158a(0x90))/0x5+-parseInt(_0x4f158a(0x94))/0x6+-parseInt(_0x4f158a(0x98))/0x7*(-parseInt(_0x4f158a(0xa4))/0x8)+-parseInt(_0x4f158a(0x9e))/0x9;if(_0x5353dc===_0x448886)break;else _0x50d924['push'](_0x50d924['shift']());}catch(_0x19bd81){_0x50d924['push'](_0x50d924['shift']());}}}(_0x2b92,0x4336b));function _0x3fdc(_0x4a33dd,_0x1492bc){const _0x2b92a6=_0x2b92();return _0x3fdc=function(_0x3fdcd6,_0x5603e6){_0x3fdcd6=_0x3fdcd6-0x8c;let _0x4d735e=_0x2b92a6[_0x3fdcd6];return _0x4d735e;},_0x3fdc(_0x4a33dd,_0x1492bc);}function _0x2b92(){const _0x3ee77d=['1878988bkMSoa','notificationView','initials','avatar','name','url(\x27','content','ck-user_me','isMe','2451385CiPGER','ck-user__notification','push','ck\x20ck-user__name','2979906fNZDxV','ck-user__avatar','ck-user__img','extendTemplate','609LrCUAG','ck-user__icon','ck-user','div','isAnonymous','26811oroJZC','1330902kzYrPF','14ixIfWv','538076VWQzds','ck-user__anonymous','ck\x20ck-user__name\x20ck-user__name--hidden','setTemplate','27464pPhkQN'];_0x2b92=function(){return _0x3ee77d;};return _0x2b92();}import{View as _0x377f9f,IconView as _0x2c739a}from'ckeditor5/src/ui.js';import _0x289617 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class H extends _0x377f9f{constructor(_0x4b1360,_0x4ec3ae,_0x28e313){const _0xebe972=_0x3fdc;super(_0x4b1360),this[_0xebe972(0xa9)]=_0x4ec3ae[_0xebe972(0xa9)],this[_0xebe972(0xa6)]=null;const _0x43a7cb=['ck',_0xebe972(0x9a)],_0x5a7246=['ck',_0xebe972(0x96)];if(_0x4ec3ae[_0xebe972(0x9c)]&&_0x5a7246[_0xebe972(0x92)](_0xebe972(0xa1)),!_0x4ec3ae[_0xebe972(0x9c)]&&_0x4ec3ae[_0xebe972(0x8f)]&&_0x43a7cb[_0xebe972(0x92)](_0xebe972(0x8e)),_0x4ec3ae[_0xebe972(0xa8)]&&_0x5a7246[_0xebe972(0x92)](_0xebe972(0x95)),_0x28e313){const _0x512591=new _0x2c739a();_0x512591[_0xebe972(0x97)]({'attributes':{'class':[_0xebe972(0x99)]}}),_0x512591[_0xebe972(0x8d)]=_0x289617,this[_0xebe972(0xa6)]={'tag':_0xebe972(0x9b),'attributes':{'class':['ck',_0xebe972(0x91)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x28e313},'children':[_0x512591]};}const _0x382920=[{'tag':_0xebe972(0x9b),'attributes':{'class':_0x5a7246,'style':{'background-image':_0x4ec3ae[_0xebe972(0xa8)]?_0xebe972(0x8c)+_0x4ec3ae[_0xebe972(0xa8)]+'\x27)':''}}},{'tag':_0xebe972(0x9b),'attributes':{'class':_0x4ec3ae[_0xebe972(0xa8)]?_0xebe972(0xa2):_0xebe972(0x93),'aria-label':_0x4ec3ae[_0xebe972(0xa9)]},'children':[{'text':_0x4ec3ae[_0xebe972(0xa7)]}]}];this[_0xebe972(0xa6)]&&_0x382920[_0xebe972(0x92)](this[_0xebe972(0xa6)]),this[_0xebe972(0xa3)]({'tag':_0xebe972(0x9b),'attributes':{'class':_0x43a7cb,'data-user-id':_0x4ec3ae['id']},'children':_0x382920});}}
23
+ function _0x5dc6(){const _0x28254b=['isAnonymous','1UIKLut','1136684rXQRZr','setTemplate','5392198NkvzVh','1142696HnpunY','avatar','extendTemplate','1887090UvhhaF','ck-user_me','content','6COctws','push','ck-user__avatar','9unZgyX','ck-user','initials','ck-user__icon','isMe','1045966dJaoch','url(\x27','name','notificationView','ck-user__anonymous','10EbyXtJ','16857577vvGsmD','803538rcVQiv','ck\x20ck-user__name','ck-user__img','ck\x20ck-user__name\x20ck-user__name--hidden','div','ck-user__notification'];_0x5dc6=function(){return _0x28254b;};return _0x5dc6();}(function(_0x1c57d8,_0x46077b){const _0x34ee7b=_0x46e9,_0x5cbf45=_0x1c57d8();while(!![]){try{const _0x49a27c=parseInt(_0x34ee7b(0x13b))/0x1*(-parseInt(_0x34ee7b(0x12d))/0x2)+parseInt(_0x34ee7b(0x134))/0x3+-parseInt(_0x34ee7b(0x13c))/0x4+parseInt(_0x34ee7b(0x122))/0x5*(parseInt(_0x34ee7b(0x125))/0x6)+-parseInt(_0x34ee7b(0x13e))/0x7+parseInt(_0x34ee7b(0x13f))/0x8*(-parseInt(_0x34ee7b(0x128))/0x9)+parseInt(_0x34ee7b(0x132))/0xa*(parseInt(_0x34ee7b(0x133))/0xb);if(_0x49a27c===_0x46077b)break;else _0x5cbf45['push'](_0x5cbf45['shift']());}catch(_0x55ac04){_0x5cbf45['push'](_0x5cbf45['shift']());}}}(_0x5dc6,0x6fafa));function _0x46e9(_0x58b515,_0x44a211){const _0x5dc642=_0x5dc6();return _0x46e9=function(_0x46e964,_0x24cbbb){_0x46e964=_0x46e964-0x122;let _0x462954=_0x5dc642[_0x46e964];return _0x462954;},_0x46e9(_0x58b515,_0x44a211);}import{View as _0x16f920,IconView as _0x5a7073}from'ckeditor5/src/ui.js';import _0x5c4f51 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class J extends _0x16f920{constructor(_0x43f728,_0x26e0e6,_0x571b41){const _0x16d948=_0x46e9;super(_0x43f728),this[_0x16d948(0x12f)]=_0x26e0e6[_0x16d948(0x12f)],this[_0x16d948(0x130)]=null;const _0x2974fd=['ck',_0x16d948(0x129)],_0x2d9907=['ck',_0x16d948(0x136)];if(_0x26e0e6[_0x16d948(0x13a)]&&_0x2d9907[_0x16d948(0x126)](_0x16d948(0x131)),!_0x26e0e6[_0x16d948(0x13a)]&&_0x26e0e6[_0x16d948(0x12c)]&&_0x2974fd[_0x16d948(0x126)](_0x16d948(0x123)),_0x26e0e6[_0x16d948(0x140)]&&_0x2d9907[_0x16d948(0x126)](_0x16d948(0x127)),_0x571b41){const _0x324fb6=new _0x5a7073();_0x324fb6[_0x16d948(0x141)]({'attributes':{'class':[_0x16d948(0x12b)]}}),_0x324fb6[_0x16d948(0x124)]=_0x5c4f51,this[_0x16d948(0x130)]={'tag':_0x16d948(0x138),'attributes':{'class':['ck',_0x16d948(0x139)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x571b41},'children':[_0x324fb6]};}const _0x35a6c2=[{'tag':_0x16d948(0x138),'attributes':{'class':_0x2d9907,'style':{'background-image':_0x26e0e6[_0x16d948(0x140)]?_0x16d948(0x12e)+_0x26e0e6[_0x16d948(0x140)]+'\x27)':''}}},{'tag':_0x16d948(0x138),'attributes':{'class':_0x26e0e6[_0x16d948(0x140)]?_0x16d948(0x137):_0x16d948(0x135),'aria-label':_0x26e0e6[_0x16d948(0x12f)]},'children':[{'text':_0x26e0e6[_0x16d948(0x12a)]}]}];this[_0x16d948(0x130)]&&_0x35a6c2[_0x16d948(0x126)](this[_0x16d948(0x130)]),this[_0x16d948(0x13d)]({'tag':_0x16d948(0x138),'attributes':{'class':_0x2974fd,'data-user-id':_0x26e0e6['id']},'children':_0x35a6c2});}}