@ckeditor/ckeditor5-collaboration-core 45.1.0-alpha.3 → 45.1.0-alpha.5
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 _0x26562d,Editor as _0x539643}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x22ae27,Collection as _0x52f1e7,uid as _0xbc6b88,first as _0x4fe2dc,FocusTracker as _0x55f97e,KeystrokeHandler as _0x21add0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0xa3d527,IconView as _0x292b7d,ButtonView as _0x26cc1c,DropdownButtonView as _0x5d9902,FocusCycler as _0x524414,isViewWithFocusCycler as _0x42af11}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconNotification as _0x48c056,IconCheck as _0x5cd869,IconCancel as _0x2a1424}from'@ckeditor/ckeditor5-icons/dist/index.js';import{DateTime as _0x544b9b}from'luxon';class n extends _0x26562d{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x4189d5,_0x32dc2f){let _0x53cd20;if(_0x32dc2f||(_0x32dc2f=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x32dc2f?_0x53cd20=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x53cd20=this['context']['editors']['find'](_0x59a67b=>_0x59a67b['config']['get']('collaboration.channelId')==_0x32dc2f)),!_0x53cd20)throw new _0x22ae27('permissions-set-permissions-invalid-channel-id',null);const _0x22a369=_0x53cd20['plugins'],_0x4fa3d7=_0x22a369['has']('CommentsRepository')?_0x22a369['get']('CommentsRepository'):void 0x0,_0x2a99a3=_0x22a369['has']('CommentsOnly')&&_0x22a369['get']('CommentsOnly'),_0x58c085=_0x4189d5['includes']('document:write'),_0x5d9117=_0x4189d5['includes']('comment:modify_all'),_0xc183e4=_0x4189d5['includes']('comment:admin'),_0x2daa6d=_0x4189d5['includes']('comment:write'),_0x3cf81a=_0x2daa6d||_0xc183e4,_0x2e8b01=_0x3cf81a||_0x5d9117,_0xd9906=_0x58c085||_0x3cf81a;(_0x2a99a3&&(_0x2a99a3['isEnabled']=!_0x58c085&&_0x2e8b01),_0x53cd20 instanceof _0x539643)&&(!(_0x58c085||_0x2e8b01&&_0x4fa3d7)?_0x53cd20['enableReadOnlyMode']('no-permissions'):_0x53cd20['disableReadOnlyMode']('no-permissions'));if(_0x4fa3d7){_0x4fa3d7['setPermissions']({'admin':_0xc183e4,'modifyAll':_0x5d9117,'write':_0x2daa6d,'resolve':_0xd9906},_0x32dc2f);const _0x440c62=_0x53cd20 instanceof _0x539643&&_0x53cd20['commands']['get']('addCommentThread');_0x440c62&&(_0x3cf81a?_0x440c62['clearForceDisabled']('noPermissions'):_0x440c62['forceDisabled']('noPermissions'));}}}function o(_0x25c64a,_0x2b60d3){const t=_0x25c64a['t'];switch(_0x2b60d3){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');case'Today':return t('Today');case'Yesterday':return t('Yesterday');case'Last':return t('Last');case'Monday':return t('Monday');case'Tuesday':return t('Tuesday');case'Wednesday':return t('Wednesday');case'Thursday':return t('Thursday');case'Friday':return t('Friday');case'Saturday':return t('Saturday');case'Sunday':return t('Sunday');default:return'';}}class u extends _0x26562d{['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(_0x3a85a1){super(_0x3a85a1),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x52f1e7(),this['_locale']=_0x3a85a1['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:_0x468da0,name:_0x4caa79,..._0x11bc51}){if(!_0x468da0||'string'!=typeof _0x468da0)throw new _0x22ae27('users-add-invalid-id');if(this['users']['has'](_0x468da0))throw new _0x22ae27('users-add-duplicated-id',null,{'id':_0x468da0});const _0xc87615=this['context']['config']['get']('users.getInitialsCallback'),_0x1ec103={..._0x11bc51,'id':_0x468da0,'name':h(this['_locale'],_0x4caa79),'color':this['_getNextColor']()};_0x1ec103['name']=h(this['_locale'],_0x1ec103['name']);const _0x14d7e3=new P(_0x1ec103,_0xc87615);return this['users']['add'](_0x14d7e3),_0x14d7e3;}['getUser'](_0x5c15ad){return this['users']['get'](_0x5c15ad);}['useAnonymousUser'](){const _0x4b7124=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x4b7124);}['defineMe'](_0x3205ad){if(this['_myId'])throw new _0x22ae27('users-me-already-defined',null);const _0x1f0aa9=this['getUser'](_0x3205ad);if(!_0x1f0aa9)throw new _0x22ae27('users-me-missing-user',null);this['_myId']=_0x3205ad,_0x1f0aa9['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0xb827e7=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0xb827e7&&(this['_lastColor']=0x0),new l(this['_lastColor']++);}['_addAnonymousUser'](){const _0x4d1ba3=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x4d1ba3,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['initials'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x14da39,_0x26ff48){this['id']=_0x14da39['id'],this['color']=_0x14da39['color'],this['name']=_0x14da39['name'],this['initials']=_0x26ff48?_0x26ff48(this['name']):this['_computeInitials'](),this['avatar']=_0x14da39['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}['_computeInitials'](){const _0x2f38f1=this['name']['split']('\x20')['filter'](_0x5211b0=>/^[\p{Letter}]/u['test'](_0x5211b0));return 0x1===_0x2f38f1['length']?this['_getInitial'](_0x2f38f1[0x0]):0x0===_0x2f38f1['length']?this['_getInitial'](this['name']):this['_getInitial'](_0x2f38f1[0x0])+this['_getInitial'](_0x2f38f1[_0x2f38f1['length']-0x1]);}['_getInitial'](_0x10605c){return String['fromCodePoint'](_0x10605c['codePointAt'](0x0))['toUpperCase']();}}function h(_0x3f53e9,_0x1844ff=''){return''==(_0x1844ff=_0x1844ff['trim']())?o(_0x3f53e9,'Anonymous'):_0x1844ff;}class l{['_id'];constructor(_0x2ad2c4){this['_id']=_0x2ad2c4;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class I extends _0xa3d527{['name'];['notificationView'];constructor(_0x3c54ae,_0x4c41c3,_0x5f5a0b){super(_0x3c54ae),this['name']=_0x4c41c3['name'],this['notificationView']=null;const _0x1ffa79=['ck','ck-user'],_0x497a50=['ck','ck-user__img'];if(_0x4c41c3['isAnonymous']&&_0x497a50['push']('ck-user__anonymous'),!_0x4c41c3['isAnonymous']&&_0x4c41c3['isMe']&&_0x1ffa79['push']('ck-user_me'),_0x4c41c3['avatar']&&_0x497a50['push']('ck-user__avatar'),_0x5f5a0b){const _0x1f4ace=new _0x292b7d();_0x1f4ace['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x1f4ace['content']=_0x48c056,this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x5f5a0b},'children':[_0x1f4ace]};}const _0x2725e4=[{'tag':'div','attributes':{'class':_0x497a50,'style':{'background-image':_0x4c41c3['avatar']?'url(\x27'+_0x4c41c3['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x4c41c3['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x4c41c3['name']},'children':[{'text':_0x4c41c3['initials']}]}];this['notificationView']&&_0x2725e4['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x1ffa79,'data-user-id':_0x4c41c3['id']},'children':_0x2725e4});}}class F extends _0xa3d527{['id'];constructor(_0x2f0126,_0x397116){super(_0x2f0126),this['id']='ck-aria-description-'+_0xbc6b88(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x397116}]});}}class U extends _0x26cc1c{['render'](){super['render'](),V(this);}}class Y extends _0x5d9902{['render'](){super['render'](),V(this);}}function V(_0x2a2713){_0x2a2713['listenTo'](_0x2a2713['element'],'mousedown',(_0x53a658,_0x8c498b)=>{_0x8c498b['stopPropagation'](),_0x8c498b['preventDefault']();}),_0x2a2713['listenTo'](_0x2a2713['element'],'mouseup',()=>{_0x2a2713['element']['focus']();});}function E(_0x2a7340={},_0x5ca9f5){if(void 0x0!==_0x2a7340['dateTimeFormat']&&'function'!=typeof _0x2a7340['dateTimeFormat'])throw new _0x22ae27('invalid-date-time-format');return _0x22bc4b=>{const _0x4c4ebf='string'==typeof _0x22bc4b?_0x544b9b['fromISO'](_0x22bc4b):_0x544b9b['fromJSDate'](_0x22bc4b),_0x3ac9f6=_0x544b9b['now'](),_0x748f43=Math['floor'](_0x3ac9f6['diff'](_0x4c4ebf,'days')['days']);return _0x2a7340['dateTimeFormat']?_0x2a7340['dateTimeFormat'](_0x4c4ebf['toJSDate'](),_0x5ca9f5&&_0x5ca9f5['t']?_0x5ca9f5['t']:void 0x0):0x0===_0x748f43?_0x5ca9f5?o(_0x5ca9f5,'Today')+'\x20'+_0x4c4ebf['toFormat']('hh:mma'):_0x4c4ebf['toFormat']('\x27Today\x27\x20hh:mma'):0x1===_0x748f43?_0x5ca9f5?o(_0x5ca9f5,'Yesterday')+'\x20'+_0x4c4ebf['toFormat']('hh:mma'):_0x4c4ebf['toFormat']('\x27Yesterday\x27\x20hh:mma'):_0x748f43<0x7?_0x5ca9f5?o(_0x5ca9f5,'Last')+'\x20'+o(_0x5ca9f5,_0x4c4ebf['toFormat']('EEEE'))+'\x20'+_0x4c4ebf['toFormat']('hh:mma'):_0x4c4ebf['toFormat']('\x27Last\x27\x20EEEE\x20hh:mma'):_0x4c4ebf['toFormat']('LL-dd-yyyy\x20hh:mma');};}function A(_0x1ce40f,_0x4fdbd4){const _0x5e1e39=_0x1ce40f['mapper']['markerNameToElements'](_0x4fdbd4['name']);if(!_0x5e1e39)return null;const _0x1b2386=_0x4fe2dc(_0x5e1e39['values']());return _0x1ce40f['view']['domConverter']['mapViewToDom'](_0x1b2386)||null;}function R(_0x78606c,_0x351605){if(0x0===_0x351605['length'])return null;const _0x16667b=[],_0xbe118a=_0x78606c['view']['domConverter'];for(const _0x4cbfab of _0x351605){const _0x2c52e3=_0x78606c['mapper']['markerNameToElements'](_0x4cbfab['name']);if(!_0x2c52e3)continue;const _0x5f3630=Array['from'](_0x2c52e3)['map'](_0x4a40ca=>_0xbe118a['mapViewToDom'](_0x4a40ca))['filter'](_0x2ba275=>!!_0x2ba275);_0x16667b['push'](..._0x5f3630);}if(0x0===_0x16667b['length'])return null;const _0xf5f79a=[];for(const _0x513717 of _0x16667b){const _0x3059ab=_0x513717['getClientRects']()['item'](0x0);_0x3059ab&&_0xf5f79a['push']({'x':_0x3059ab['x'],'y':_0x3059ab['y'],'domElement':_0x513717});}return 0x0===_0xf5f79a['length']?null:(_0xf5f79a['sort']((_0x485511,_0xe93bb2)=>_0x485511['y']-_0xe93bb2['y']||_0x485511['x']-_0xe93bb2['x']),_0xf5f79a['map'](_0x4cbbdc=>_0x4cbbdc['domElement']));}function Z(_0x3560b0,{limit:_0x188a8f,suffix:_0x5a0e61='...'}){const _0x2ddde5=[];let _0xdb79ff=0x0;const _0x21bb90=_0x3560b0['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x4a9bbe=0x0;_0x4a9bbe<_0x21bb90['length'];_0x4a9bbe++){let _0x1105ac=_0x21bb90[_0x4a9bbe];const _0x2bfa99=$(_0x1105ac);if(_0x1105ac['startsWith']('<')){if(_0xdb79ff>=_0x188a8f){const _0x3df84b=_0x1105ac['match'](/[a-zA-Z]+/);if(!_0x3df84b){_0x21bb90[_0x4a9bbe]='';continue;}const _0x2e6dd5=_0x3df84b[0x0];_0x1105ac['startsWith']('</')?(_0x2ddde5['length']&&(_0x1105ac=''),_0x2ddde5['pop']()):(_0x2ddde5['push'](_0x2e6dd5),_0x1105ac='');}}else{if(_0xdb79ff>=_0x188a8f)_0x1105ac='';else{if(_0xdb79ff+_0x2bfa99['length']>=_0x188a8f){let _0x53d89b=_0x188a8f-_0xdb79ff;if('\x20'===_0x2bfa99[_0x53d89b-0x1])_0x53d89b--;else{const _0x304624=_0x2bfa99['slice'](_0x53d89b)['indexOf']('\x20');-0x1!==_0x304624?_0x53d89b+=_0x304624:_0x53d89b=_0x1105ac['length'];}_0x1105ac=_0x2bfa99['slice'](0x0,_0x53d89b)['join']('')+_0x5a0e61,_0xdb79ff=_0x188a8f;}else _0xdb79ff+=_0x2bfa99['length'];}}_0x21bb90[_0x4a9bbe]=_0x1105ac;}return _0x21bb90['join']('\x0a')['replace'](/\n/g,'');}function $(_0x4eb3f4){const _0x48a773=[];for(let _0x48dec8=0x0;_0x48dec8<_0x4eb3f4['length'];_0x48dec8++){const _0x11dca0=_0x4eb3f4['substring'](_0x48dec8)['match'](/^&[a-z0-9#]+;/);if(_0x11dca0){const _0x3fef9b=_0x11dca0[0x0];_0x48a773['push'](_0x3fef9b),_0x48dec8+=_0x3fef9b['length']-0x1;}else _0x48a773['push'](_0x4eb3f4[_0x48dec8]);}return _0x48a773;}class m extends _0xa3d527{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x3c4aa3){super(_0x3c4aa3);const _0x47f2b1=this['bindTemplate'];this['set']('message',o(_0x3c4aa3,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x3c4aa3,o(_0x3c4aa3,'Yes'),_0x5cd869,'submit'),this['cancelView']=this['_createButtonView'](_0x3c4aa3,o(_0x3c4aa3,'No'),_0x2a1424,'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x55f97e(),this['keystrokes']=new _0x21add0(),this['focusCycler']=new _0x524414({'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':_0x47f2b1['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'](_0x3e2d1a,_0x1f7d13,_0x2e9fc5,_0xb6027c){const _0x53bee5=new _0x26cc1c(_0x3e2d1a);return _0x53bee5['label']=_0x1f7d13,_0x53bee5['icon']=_0x2e9fc5,_0x53bee5['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0xb6027c}}),_0x53bee5['on']('execute',()=>this['fire'](_0xb6027c)),_0x53bee5;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x1dc63f=>{this['keystrokes']['listenTo'](_0x1dc63f['element']),this['focusTracker']['add'](_0x1dc63f['element']);}),this['keystrokes']['set']('esc',(_0x926d48,_0x433bbc)=>{this['fire']('cancel'),_0x433bbc();});}}function c(_0x4417a9){return class extends _0x4417a9{['showConfirm'](_0x44a700,_0xec6e2a){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x44a700,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0xec6e2a['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x1061eb=>this['confirmView']['on']('submit',_0x1061eb));}['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 j(_0x3fbca7){let _0x14bcd8=0x0,_0x4b1822=0x0;for(const _0x6b4799 of M(_0x3fbca7))_0x14bcd8=(_0x14bcd8<<0x5)-_0x14bcd8+_0x6b4799,_0x14bcd8|=0x0,[_0x14bcd8,_0x4b1822]=[_0x4b1822,_0x14bcd8];return w(_0x14bcd8)+w(_0x4b1822);}function*g(_0x290462){null==_0x290462||null==_0x290462?yield 0x12b9b0a1:0x0===_0x290462||!0x1===_0x290462?yield 0x0:0x1===_0x290462||0x1==_0x290462?yield 0x1:Array['isArray'](_0x290462)?yield*function*(_0x453c3c){for(const _0x71a6a3 of _0x453c3c)yield*g(_0x71a6a3);}(_0x290462):'object'==typeof _0x290462?yield*M(_0x290462):'string'==typeof _0x290462?yield*O(_0x290462):'number'==typeof _0x290462&&(yield _0x290462);}function*M(_0x28438d){if(yield q('{'),_0x28438d){const _0x37e57b=Object['keys'](_0x28438d)['sort']();for(const _0x449f50 of _0x37e57b){yield*O(_0x449f50),yield q(':');const _0x557af6=_0x28438d[_0x449f50];yield*g(_0x557af6);}}yield q('}');}function*O(_0x206dcd){yield q('\x22');for(const _0x3a186a of _0x206dcd)yield q(_0x3a186a);yield q('\x22');}function q(_0x101d1c){return _0x101d1c['charCodeAt'](0x0);}function w(_0x30e3d5){return(_0x30e3d5*=Math['sign'](_0x30e3d5))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x3b5ebf,_0x42c36f,_0x279979,_0x238f20=[]){const _0x2775b3='string'==typeof _0x3b5ebf?_0x279979['get'](_0x3b5ebf)['constructor']:_0x3b5ebf['prototype']['constructor'];if(_0x42c36f['has'](_0x2775b3))return _0x42c36f['get'](_0x2775b3);_0x42c36f['set'](_0x2775b3,!0x0);const _0x22a777=[...D,..._0x238f20]['map'](_0x1c5ae6=>{if(_0x279979['has'](_0x1c5ae6))return _0x279979['get'](_0x1c5ae6)['constructor'];})['filter'](_0x288c3f=>_0x288c3f);if(_0x2775b3&&_0x22a777['includes'](_0x2775b3))return _0x42c36f['set'](_0x2775b3,!0x1),!0x1;if(!_0x2775b3['requires'])return _0x42c36f['set'](_0x2775b3,!0x0),!0x0;const _0x47c663=_0x2775b3['requires']['every'](_0x54cbe4=>S(_0x54cbe4,_0x42c36f,_0x279979,_0x238f20));return _0x42c36f['set'](_0x2775b3,_0x47c663),_0x47c663;}function C(_0x58f893,_0x40972d){const _0x59c43e={};for(const _0x7df58e of _0x58f893['config']['names']())W['includes'](_0x7df58e)||(_0x59c43e[_0x7df58e]=_0x58f893['config']['get'](_0x7df58e));const _0x513305=_0x59c43e['plugins']||[],_0x3efbbf=_0x58f893['constructor']['builtinPlugins']||[],_0x2656a1=_0x513305['length']?_0x513305:_0x3efbbf,_0x22b5bc=_0x59c43e['extraPlugins']||[];delete _0x59c43e['extraPlugins'];const _0xec29db=_0x59c43e['removePlugins']||[];delete _0x59c43e['removePlugins'];const _0x4a4433=_0x58f893['_context']['config']['get']('plugins')||[],_0x2c9f82=_0x2656a1['concat'](_0x22b5bc)['concat'](_0x4a4433)['map'](_0x2c32a0=>'string'==typeof _0x2c32a0?_0x3efbbf['find'](_0x5f0409=>_0x5f0409['pluginName']==_0x2c32a0):_0x2c32a0)['filter'](_0x4f523d=>!_0xec29db['includes'](_0x4f523d)&&!_0xec29db['includes'](_0x4f523d['pluginName'])),_0x3441f8=Array['from'](new Set(_0x2c9f82)),_0x53ec6f=new Map();return _0x59c43e['plugins']=_0x3441f8['filter'](_0x27cb44=>S(_0x27cb44,_0x53ec6f,_0x58f893['plugins'],_0x40972d)),_0x59c43e;}function z(_0x42ee46,_0x587bdb){const _0x4bcf87=[];_0x42ee46['document']['selection']['on']('change:range',()=>{const _0x1d0dfe=function(_0x25f375,_0x38a4fc){const _0x47b18b=[];for(const _0x404111 of _0x25f375['markers']){const _0x1ef479=_0x404111['getRange']();(_0x1ef479['containsPosition'](_0x38a4fc)||_0x1ef479['start']['isEqual'](_0x38a4fc)||_0x1ef479['end']['isEqual'](_0x38a4fc))&&_0x47b18b['push'](_0x404111);}return _0x47b18b;}(_0x42ee46,_0x42ee46['document']['selection']['focus']),_0x3497fc=[],_0x1ce946=[],_0x4db028=[];for(const _0x1aa179 of _0x4bcf87)_0x1d0dfe['includes'](_0x1aa179)||_0x3497fc['push'](_0x1aa179);for(const _0x2d1205 of _0x1d0dfe)_0x4bcf87['includes'](_0x2d1205)||_0x1ce946['push'](_0x2d1205),_0x4db028['push'](_0x2d1205);(_0x3497fc['length']||_0x1ce946['length'])&&_0x587bdb({'left':_0x3497fc,'entered':_0x1ce946}),_0x4bcf87['length']=0x0,_0x4bcf87['push'](..._0x4db028);});}const J='Ctrl+Shift+E';function T(_0x5f4625,_0x5c1a73){const _0x2a3cc8=_0x5f4625['element'];_0x5f4625['keystrokes']['listenTo'](_0x2a3cc8);for(const _0x17f987 of _0x5c1a73)K(_0x5f4625,_0x17f987);_0x5c1a73['on']('change',(_0x1dc86b,_0x3efb6b)=>{for(const _0x19caab of _0x3efb6b['removed'])_(_0x5f4625,_0x19caab);for(const _0x207bf4 of Array['from'](_0x3efb6b['added'])['reverse']())K(_0x5f4625,_0x207bf4);}),_0x5f4625['keystrokes']['set']('enter',(_0x131b6c,_0x2beb88)=>{_0x2a3cc8===_0x131b6c['target']&&(_0x5f4625['focusCycler']['focusFirst'](),_0x2beb88());},{'filter':_0x505aca=>_0x505aca['target']===_0x2a3cc8}),_0x5f4625['keystrokes']['set']('esc',(_0x57e0d8,_0x57a155)=>{_0x2a3cc8!==_0x57e0d8['target']?_0x5f4625['focus']():_0x5f4625['fire']('escape'),_0x57a155();}),_0x5f4625['keystrokes']['set']('arrowdown',(_0x557b73,_0x49424f)=>{_0x2a3cc8===_0x557b73['target']&&(_0x5f4625['fire']('arrowdown'),_0x49424f());}),_0x5f4625['keystrokes']['set']('arrowup',(_0x55fd87,_0x4aff11)=>{_0x2a3cc8===_0x55fd87['target']&&(_0x5f4625['fire']('arrowup'),_0x4aff11());});}function K(_0x3bb36b,_0x22e45c){_0x22e45c['isRendered']&&(_0x3bb36b['focusTracker']['add'](_0x22e45c['element']),_0x3bb36b['keystrokes']['listenTo'](_0x22e45c['element']),_0x42af11(_0x22e45c)&&function(_0x1c2e92,_0x4d4418){const _0x370c79=_0x1c2e92['actions'],_0x5969b4=_0x4d4418['actions'];for(const _0x10006e of Object['keys'](_0x370c79))if(_0x10006e in _0x5969b4&&_0x370c79[_0x10006e]!==_0x5969b4[_0x10006e])return!0x1;return!0x0;}(_0x3bb36b['focusCycler'],_0x22e45c['focusCycler'])&&_0x3bb36b['focusCycler']['chain'](_0x22e45c['focusCycler']));}function _(_0x4db1eb,_0x1d8d5d){_0x4db1eb['focusTracker']['remove'](_0x1d8d5d['element']),_0x4db1eb['keystrokes']['stopListening'](_0x1d8d5d['element']),_0x42af11(_0x1d8d5d)&&_0x4db1eb['focusCycler']['unchain'](_0x1d8d5d['focusCycler']);}export{F as AriaDescriptionView,c as ConfirmMixin,J as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,I as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,A as getMarkerDomElement,j as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,z as surroundingMarkersDetector,Z as trimHtml};
|
23
|
+
import{ContextPlugin as _0x58ed4f,Editor as _0x4530b3}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x3f9f6b,Collection as _0x4f932f,uid as _0x229b25,first as _0x3705f2,FocusTracker as _0x27fbe0,KeystrokeHandler as _0x47addf}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0xb01e0a,IconView as _0x2d93cd,ButtonView as _0x18248a,DropdownButtonView as _0xf0313b,FocusCycler as _0x22977,isViewWithFocusCycler as _0xbc465b}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconNotification as _0x3099bf,IconCheck as _0x165a20,IconCancel as _0x5ffa60}from'@ckeditor/ckeditor5-icons/dist/index.js';import{DateTime as _0x41db7b}from'luxon';class n extends _0x58ed4f{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x2f83f4,_0x5ae315){let _0x1a25ab;if(_0x5ae315||(_0x5ae315=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x5ae315?_0x1a25ab=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x1a25ab=this['context']['editors']['find'](_0x244220=>_0x244220['config']['get']('collaboration.channelId')==_0x5ae315)),!_0x1a25ab)throw new _0x3f9f6b('permissions-set-permissions-invalid-channel-id',null);const _0x21de04=_0x1a25ab['plugins'],_0x180897=_0x21de04['has']('CommentsRepository')?_0x21de04['get']('CommentsRepository'):void 0x0,_0x45cfb8=_0x21de04['has']('CommentsOnly')&&_0x21de04['get']('CommentsOnly'),_0x37d82e=_0x2f83f4['includes']('document:write'),_0x5044a6=_0x2f83f4['includes']('comment:modify_all'),_0x3b0118=_0x2f83f4['includes']('comment:admin'),_0x33ad34=_0x2f83f4['includes']('comment:write'),_0x1893eb=_0x33ad34||_0x3b0118,_0x3ec748=_0x1893eb||_0x5044a6,_0x55ffe4=_0x37d82e||_0x1893eb;(_0x45cfb8&&(_0x45cfb8['isEnabled']=!_0x37d82e&&_0x3ec748),_0x1a25ab instanceof _0x4530b3)&&(!(_0x37d82e||_0x3ec748&&_0x180897)?_0x1a25ab['enableReadOnlyMode']('no-permissions'):_0x1a25ab['disableReadOnlyMode']('no-permissions'));if(_0x180897){_0x180897['setPermissions']({'admin':_0x3b0118,'modifyAll':_0x5044a6,'write':_0x33ad34,'resolve':_0x55ffe4},_0x5ae315);const _0x1dcbce=_0x1a25ab instanceof _0x4530b3&&_0x1a25ab['commands']['get']('addCommentThread');_0x1dcbce&&(_0x1893eb?_0x1dcbce['clearForceDisabled']('noPermissions'):_0x1dcbce['forceDisabled']('noPermissions'));}}}function o(_0x30d460,_0xcba751){const t=_0x30d460['t'];switch(_0xcba751){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');case'Today':return t('Today');case'Yesterday':return t('Yesterday');case'Last':return t('Last');case'Monday':return t('Monday');case'Tuesday':return t('Tuesday');case'Wednesday':return t('Wednesday');case'Thursday':return t('Thursday');case'Friday':return t('Friday');case'Saturday':return t('Saturday');case'Sunday':return t('Sunday');default:return'';}}class u extends _0x58ed4f{['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(_0x591dc5){super(_0x591dc5),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x4f932f(),this['_locale']=_0x591dc5['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:_0xa44991,name:_0x19da39,..._0x473124}){if(!_0xa44991||'string'!=typeof _0xa44991)throw new _0x3f9f6b('users-add-invalid-id');if(this['users']['has'](_0xa44991))throw new _0x3f9f6b('users-add-duplicated-id',null,{'id':_0xa44991});const _0x133ae2=this['context']['config']['get']('users.getInitialsCallback'),_0x206ca4={..._0x473124,'id':_0xa44991,'name':h(this['_locale'],_0x19da39),'color':this['_getNextColor']()};_0x206ca4['name']=h(this['_locale'],_0x206ca4['name']);const _0x341b0f=new P(_0x206ca4,_0x133ae2);return this['users']['add'](_0x341b0f),_0x341b0f;}['getUser'](_0x301e5d){return this['users']['get'](_0x301e5d);}['useAnonymousUser'](){const _0x7970b2=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x7970b2);}['defineMe'](_0x4bf90a){if(this['_myId'])throw new _0x3f9f6b('users-me-already-defined',null);const _0x3b0e7a=this['getUser'](_0x4bf90a);if(!_0x3b0e7a)throw new _0x3f9f6b('users-me-missing-user',null);this['_myId']=_0x4bf90a,_0x3b0e7a['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x2ef0e2=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x2ef0e2&&(this['_lastColor']=0x0),new l(this['_lastColor']++);}['_addAnonymousUser'](){const _0x521de5=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x521de5,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['initials'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x11e437,_0x4b694d){this['id']=_0x11e437['id'],this['color']=_0x11e437['color'],this['name']=_0x11e437['name'],this['initials']=_0x4b694d?_0x4b694d(this['name']):this['_computeInitials'](),this['avatar']=_0x11e437['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}['_computeInitials'](){const _0xce2d30=this['name']['split']('\x20')['filter'](_0x32665f=>/^[\p{Letter}]/u['test'](_0x32665f));return 0x1===_0xce2d30['length']?this['_getInitial'](_0xce2d30[0x0]):0x0===_0xce2d30['length']?this['_getInitial'](this['name']):this['_getInitial'](_0xce2d30[0x0])+this['_getInitial'](_0xce2d30[_0xce2d30['length']-0x1]);}['_getInitial'](_0x1836ed){return String['fromCodePoint'](_0x1836ed['codePointAt'](0x0))['toUpperCase']();}}function h(_0x16fb26,_0x2f8e9f=''){return''==(_0x2f8e9f=_0x2f8e9f['trim']())?o(_0x16fb26,'Anonymous'):_0x2f8e9f;}class l{['_id'];constructor(_0x30b378){this['_id']=_0x30b378;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class F extends _0xb01e0a{['name'];['notificationView'];constructor(_0x1f2cd1,_0x13049d,_0x1c830e){super(_0x1f2cd1),this['name']=_0x13049d['name'],this['notificationView']=null;const _0x170062=['ck','ck-user'],_0x1a2ae4=['ck','ck-user__img'];if(_0x13049d['isAnonymous']&&_0x1a2ae4['push']('ck-user__anonymous'),!_0x13049d['isAnonymous']&&_0x13049d['isMe']&&_0x170062['push']('ck-user_me'),_0x13049d['avatar']&&_0x1a2ae4['push']('ck-user__avatar'),_0x1c830e){const _0x24eab7=new _0x2d93cd();_0x24eab7['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x24eab7['content']=_0x3099bf,this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x1c830e},'children':[_0x24eab7]};}const _0x301a26=[{'tag':'div','attributes':{'class':_0x1a2ae4,'style':{'background-image':_0x13049d['avatar']?'url(\x27'+_0x13049d['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x13049d['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x13049d['name']},'children':[{'text':_0x13049d['initials']}]}];this['notificationView']&&_0x301a26['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x170062,'data-user-id':_0x13049d['id']},'children':_0x301a26});}}class H extends _0xb01e0a{['id'];constructor(_0x37fe30,_0x5d11b1){super(_0x37fe30),this['id']='ck-aria-description-'+_0x229b25(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x5d11b1}]});}}class U extends _0x18248a{['render'](){super['render'](),I(this);}}class Y extends _0xf0313b{['render'](){super['render'](),I(this);}}function I(_0x477a6e){_0x477a6e['listenTo'](_0x477a6e['element'],'mousedown',(_0x28014c,_0x2bb8ad)=>{_0x2bb8ad['stopPropagation'](),_0x2bb8ad['preventDefault']();}),_0x477a6e['listenTo'](_0x477a6e['element'],'mouseup',()=>{_0x477a6e['element']['focus']();});}function E(_0x17c884={},_0x21b778){if(void 0x0!==_0x17c884['dateTimeFormat']&&'function'!=typeof _0x17c884['dateTimeFormat'])throw new _0x3f9f6b('invalid-date-time-format');return _0x3305cf=>{const _0x81b3dd='string'==typeof _0x3305cf?_0x41db7b['fromISO'](_0x3305cf):_0x41db7b['fromJSDate'](_0x3305cf),_0x326450=_0x41db7b['now'](),_0x21c854=Math['floor'](_0x326450['diff'](_0x81b3dd,'days')['days']);return _0x17c884['dateTimeFormat']?_0x17c884['dateTimeFormat'](_0x81b3dd['toJSDate'](),_0x21b778&&_0x21b778['t']?_0x21b778['t']:void 0x0):0x0===_0x21c854?_0x21b778?o(_0x21b778,'Today')+'\x20'+_0x81b3dd['toFormat']('hh:mma'):_0x81b3dd['toFormat']('\x27Today\x27\x20hh:mma'):0x1===_0x21c854?_0x21b778?o(_0x21b778,'Yesterday')+'\x20'+_0x81b3dd['toFormat']('hh:mma'):_0x81b3dd['toFormat']('\x27Yesterday\x27\x20hh:mma'):_0x21c854<0x7?_0x21b778?o(_0x21b778,'Last')+'\x20'+o(_0x21b778,_0x81b3dd['toFormat']('EEEE'))+'\x20'+_0x81b3dd['toFormat']('hh:mma'):_0x81b3dd['toFormat']('\x27Last\x27\x20EEEE\x20hh:mma'):_0x81b3dd['toFormat']('LL-dd-yyyy\x20hh:mma');};}function A(_0x557d95,_0x2c4194){const _0x15b795=_0x557d95['mapper']['markerNameToElements'](_0x2c4194['name']);if(!_0x15b795)return null;const _0x33a309=_0x3705f2(_0x15b795['values']());return _0x557d95['view']['domConverter']['mapViewToDom'](_0x33a309)||null;}function R(_0x280559,_0x536600){if(0x0===_0x536600['length'])return null;const _0x4032a8=[],_0x43ef22=_0x280559['view']['domConverter'];for(const _0x4d8271 of _0x536600){const _0x58a7b6=_0x280559['mapper']['markerNameToElements'](_0x4d8271['name']);if(!_0x58a7b6)continue;const _0x1d91de=Array['from'](_0x58a7b6)['map'](_0x5bc123=>_0x43ef22['mapViewToDom'](_0x5bc123))['filter'](_0x39a926=>!!_0x39a926);_0x4032a8['push'](..._0x1d91de);}if(0x0===_0x4032a8['length'])return null;const _0x355b6a=[];for(const _0x47bcc0 of _0x4032a8){const _0x1496cc=_0x47bcc0['getClientRects']()['item'](0x0);_0x1496cc&&_0x355b6a['push']({'x':_0x1496cc['x'],'y':_0x1496cc['y'],'domElement':_0x47bcc0});}return 0x0===_0x355b6a['length']?null:(_0x355b6a['sort']((_0x3e1691,_0x31cbeb)=>_0x3e1691['y']-_0x31cbeb['y']||_0x3e1691['x']-_0x31cbeb['x']),_0x355b6a['map'](_0x23aeff=>_0x23aeff['domElement']));}function Z(_0x35529b,{limit:_0x52c5e7,suffix:_0x1c8f34='...'}){const _0x1fe33a=[];let _0x49c774=0x0;const _0x58da9e=_0x35529b['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x4e821a=0x0;_0x4e821a<_0x58da9e['length'];_0x4e821a++){let _0x1eaa18=_0x58da9e[_0x4e821a];const _0x476595=$(_0x1eaa18);if(_0x1eaa18['startsWith']('<')){if(_0x49c774>=_0x52c5e7){const _0x9e944c=_0x1eaa18['match'](/[a-zA-Z]+/);if(!_0x9e944c){_0x58da9e[_0x4e821a]='';continue;}const _0x1902a0=_0x9e944c[0x0];_0x1eaa18['startsWith']('</')?(_0x1fe33a['length']&&(_0x1eaa18=''),_0x1fe33a['pop']()):(_0x1fe33a['push'](_0x1902a0),_0x1eaa18='');}}else{if(_0x49c774>=_0x52c5e7)_0x1eaa18='';else{if(_0x49c774+_0x476595['length']>=_0x52c5e7){let _0x217915=_0x52c5e7-_0x49c774;if('\x20'===_0x476595[_0x217915-0x1])_0x217915--;else{const _0x5c24cf=_0x476595['slice'](_0x217915)['indexOf']('\x20');-0x1!==_0x5c24cf?_0x217915+=_0x5c24cf:_0x217915=_0x1eaa18['length'];}_0x1eaa18=_0x476595['slice'](0x0,_0x217915)['join']('')+_0x1c8f34,_0x49c774=_0x52c5e7;}else _0x49c774+=_0x476595['length'];}}_0x58da9e[_0x4e821a]=_0x1eaa18;}return _0x58da9e['join']('\x0a')['replace'](/\n/g,'');}function $(_0x174ca5){const _0x8d6e75=[];for(let _0x4d6e2a=0x0;_0x4d6e2a<_0x174ca5['length'];_0x4d6e2a++){const _0x237bc4=_0x174ca5['substring'](_0x4d6e2a)['match'](/^&[a-z0-9#]+;/);if(_0x237bc4){const _0x31e734=_0x237bc4[0x0];_0x8d6e75['push'](_0x31e734),_0x4d6e2a+=_0x31e734['length']-0x1;}else _0x8d6e75['push'](_0x174ca5[_0x4d6e2a]);}return _0x8d6e75;}class m extends _0xb01e0a{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0xbfb822){super(_0xbfb822);const _0x51a4a4=this['bindTemplate'];this['set']('message',o(_0xbfb822,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0xbfb822,o(_0xbfb822,'Yes'),_0x165a20,'submit'),this['cancelView']=this['_createButtonView'](_0xbfb822,o(_0xbfb822,'No'),_0x5ffa60,'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x27fbe0(),this['keystrokes']=new _0x47addf(),this['focusCycler']=new _0x22977({'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':_0x51a4a4['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'](_0x3a2a0e,_0x25ca24,_0x57201f,_0x4d1d81){const _0x4ccde2=new _0x18248a(_0x3a2a0e);return _0x4ccde2['label']=_0x25ca24,_0x4ccde2['icon']=_0x57201f,_0x4ccde2['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x4d1d81}}),_0x4ccde2['on']('execute',()=>this['fire'](_0x4d1d81)),_0x4ccde2;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x418e26=>{this['keystrokes']['listenTo'](_0x418e26['element']),this['focusTracker']['add'](_0x418e26['element']);}),this['keystrokes']['set']('esc',(_0x10e0d6,_0xe17490)=>{this['fire']('cancel'),_0xe17490();});}}function c(_0x230e5f){return class extends _0x230e5f{['showConfirm'](_0x32671d,_0x44ddb2){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x32671d,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x44ddb2['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x592d44=>this['confirmView']['on']('submit',_0x592d44));}['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 j(_0x226010){let _0x48a17d=0x0,_0x305227=0x0;for(const _0x5d148e of M(_0x226010))_0x48a17d=(_0x48a17d<<0x5)-_0x48a17d+_0x5d148e,_0x48a17d|=0x0,[_0x48a17d,_0x305227]=[_0x305227,_0x48a17d];return w(_0x48a17d)+w(_0x305227);}function*g(_0x37a179){null==_0x37a179||null==_0x37a179?yield 0x12b9b0a1:0x0===_0x37a179||!0x1===_0x37a179?yield 0x0:0x1===_0x37a179||0x1==_0x37a179?yield 0x1:Array['isArray'](_0x37a179)?yield*function*(_0x329e48){for(const _0x4f6939 of _0x329e48)yield*g(_0x4f6939);}(_0x37a179):'object'==typeof _0x37a179?yield*M(_0x37a179):'string'==typeof _0x37a179?yield*O(_0x37a179):'number'==typeof _0x37a179&&(yield _0x37a179);}function*M(_0x43ab6d){if(yield q('{'),_0x43ab6d){const _0xa862ca=Object['keys'](_0x43ab6d)['sort']();for(const _0x24ac47 of _0xa862ca){yield*O(_0x24ac47),yield q(':');const _0x581ff3=_0x43ab6d[_0x24ac47];yield*g(_0x581ff3);}}yield q('}');}function*O(_0x362818){yield q('\x22');for(const _0x4b235f of _0x362818)yield q(_0x4b235f);yield q('\x22');}function q(_0x176498){return _0x176498['charCodeAt'](0x0);}function w(_0x2edab9){return(_0x2edab9*=Math['sign'](_0x2edab9))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x4795c1,_0x1a8d78,_0x39fbb4,_0x28b12a=[]){const _0x5dc9a6='string'==typeof _0x4795c1?_0x39fbb4['get'](_0x4795c1)['constructor']:_0x4795c1['prototype']['constructor'];if(_0x1a8d78['has'](_0x5dc9a6))return _0x1a8d78['get'](_0x5dc9a6);_0x1a8d78['set'](_0x5dc9a6,!0x0);const _0x3ce1f3=[...D,..._0x28b12a]['map'](_0x2de749=>{if(_0x39fbb4['has'](_0x2de749))return _0x39fbb4['get'](_0x2de749)['constructor'];})['filter'](_0x2496c7=>_0x2496c7);if(_0x5dc9a6&&_0x3ce1f3['includes'](_0x5dc9a6))return _0x1a8d78['set'](_0x5dc9a6,!0x1),!0x1;if(!_0x5dc9a6['requires'])return _0x1a8d78['set'](_0x5dc9a6,!0x0),!0x0;const _0x2daeb2=_0x5dc9a6['requires']['every'](_0x4065f0=>S(_0x4065f0,_0x1a8d78,_0x39fbb4,_0x28b12a));return _0x1a8d78['set'](_0x5dc9a6,_0x2daeb2),_0x2daeb2;}function C(_0x2af007,_0x541c84){const _0x578605={};for(const _0x3e5ec4 of _0x2af007['config']['names']())W['includes'](_0x3e5ec4)||(_0x578605[_0x3e5ec4]=_0x2af007['config']['get'](_0x3e5ec4));const _0x573188=_0x578605['plugins']||[],_0x34aab6=_0x2af007['constructor']['builtinPlugins']||[],_0x2bbf76=_0x573188['length']?_0x573188:_0x34aab6,_0x562646=_0x578605['extraPlugins']||[];delete _0x578605['extraPlugins'];const _0x4c9ae5=_0x578605['removePlugins']||[];delete _0x578605['removePlugins'];const _0x287472=_0x2af007['_context']['config']['get']('plugins')||[],_0x2c7337=_0x2bbf76['concat'](_0x562646)['concat'](_0x287472)['map'](_0x18b04d=>'string'==typeof _0x18b04d?_0x34aab6['find'](_0x2bbfd8=>_0x2bbfd8['pluginName']==_0x18b04d):_0x18b04d)['filter'](_0x1dddf4=>!_0x4c9ae5['includes'](_0x1dddf4)&&!_0x4c9ae5['includes'](_0x1dddf4['pluginName'])),_0x4d28d8=Array['from'](new Set(_0x2c7337)),_0x345770=new Map();return _0x578605['plugins']=_0x4d28d8['filter'](_0x420063=>S(_0x420063,_0x345770,_0x2af007['plugins'],_0x541c84)),_0x578605;}function z(_0x4ae17d,_0x108dfa){const _0x184680=[];_0x4ae17d['document']['selection']['on']('change:range',()=>{const _0x1e64e8=function(_0x2d6678,_0x10bbc1){const _0x305b8b=[];for(const _0x48f1a3 of _0x2d6678['markers']){const _0xbf33fa=_0x48f1a3['getRange']();(_0xbf33fa['containsPosition'](_0x10bbc1)||_0xbf33fa['start']['isEqual'](_0x10bbc1)||_0xbf33fa['end']['isEqual'](_0x10bbc1))&&_0x305b8b['push'](_0x48f1a3);}return _0x305b8b;}(_0x4ae17d,_0x4ae17d['document']['selection']['focus']),_0x93b3ea=[],_0x299b52=[],_0x46357c=[];for(const _0x2fd796 of _0x184680)_0x1e64e8['includes'](_0x2fd796)||_0x93b3ea['push'](_0x2fd796);for(const _0x23ff24 of _0x1e64e8)_0x184680['includes'](_0x23ff24)||_0x299b52['push'](_0x23ff24),_0x46357c['push'](_0x23ff24);(_0x93b3ea['length']||_0x299b52['length'])&&_0x108dfa({'left':_0x93b3ea,'entered':_0x299b52}),_0x184680['length']=0x0,_0x184680['push'](..._0x46357c);});}const J='Ctrl+Shift+E';function T(_0x2a823c,_0x8bee66){const _0x26b9b1=_0x2a823c['element'];_0x2a823c['keystrokes']['listenTo'](_0x26b9b1);for(const _0x1b3e00 of _0x8bee66)K(_0x2a823c,_0x1b3e00);_0x8bee66['on']('change',(_0x21d46d,_0x50f428)=>{for(const _0xd55a9c of _0x50f428['removed'])_(_0x2a823c,_0xd55a9c);for(const _0x39bfd7 of Array['from'](_0x50f428['added'])['reverse']())K(_0x2a823c,_0x39bfd7);}),_0x2a823c['keystrokes']['set']('enter',(_0x1acb9c,_0x214649)=>{_0x26b9b1===_0x1acb9c['target']&&(_0x2a823c['focusCycler']['focusFirst'](),_0x214649());},{'filter':_0x19abce=>_0x19abce['target']===_0x26b9b1}),_0x2a823c['keystrokes']['set']('esc',(_0x5d3a78,_0x472c5c)=>{_0x26b9b1!==_0x5d3a78['target']?_0x2a823c['focus']():_0x2a823c['fire']('escape'),_0x472c5c();}),_0x2a823c['keystrokes']['set']('arrowdown',(_0x191007,_0x57f448)=>{_0x26b9b1===_0x191007['target']&&(_0x2a823c['fire']('arrowdown'),_0x57f448());}),_0x2a823c['keystrokes']['set']('arrowup',(_0x414168,_0x32aa4d)=>{_0x26b9b1===_0x414168['target']&&(_0x2a823c['fire']('arrowup'),_0x32aa4d());});}function K(_0x2e8a64,_0x39492c){_0x39492c['isRendered']&&(_0x2e8a64['focusTracker']['add'](_0x39492c['element']),_0x2e8a64['keystrokes']['listenTo'](_0x39492c['element']),_0xbc465b(_0x39492c)&&function(_0x15d7ce,_0x31baef){const _0x4d432e=_0x15d7ce['actions'],_0x37eaa0=_0x31baef['actions'];for(const _0x4ae1b4 of Object['keys'](_0x4d432e))if(_0x4ae1b4 in _0x37eaa0&&_0x4d432e[_0x4ae1b4]!==_0x37eaa0[_0x4ae1b4])return!0x1;return!0x0;}(_0x2e8a64['focusCycler'],_0x39492c['focusCycler'])&&_0x2e8a64['focusCycler']['chain'](_0x39492c['focusCycler']));}function _(_0x51d4dc,_0xeccaca){_0x51d4dc['focusTracker']['remove'](_0xeccaca['element']),_0x51d4dc['keystrokes']['stopListening'](_0xeccaca['element']),_0xbc465b(_0xeccaca)&&_0x51d4dc['focusCycler']['unchain'](_0xeccaca['focusCycler']);}export{H as AriaDescriptionView,c as ConfirmMixin,J as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,F as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,A as getMarkerDomElement,j as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,z as surroundingMarkersDetector,Z as trimHtml};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-collaboration-core",
|
3
|
-
"version": "45.1.0-alpha.
|
3
|
+
"version": "45.1.0-alpha.5",
|
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,15 +32,15 @@
|
|
32
32
|
"type": "module",
|
33
33
|
"main": "src/index.js",
|
34
34
|
"dependencies": {
|
35
|
-
"@ckeditor/ckeditor5-comments": "45.1.0-alpha.
|
36
|
-
"@ckeditor/ckeditor5-core": "45.1.0-alpha.
|
37
|
-
"@ckeditor/ckeditor5-icons": "45.1.0-alpha.
|
38
|
-
"@ckeditor/ckeditor5-theme-lark": "45.1.0-alpha.
|
39
|
-
"@ckeditor/ckeditor5-track-changes": "45.1.0-alpha.
|
40
|
-
"@ckeditor/ckeditor5-ui": "45.1.0-alpha.
|
41
|
-
"@ckeditor/ckeditor5-utils": "45.1.0-alpha.
|
35
|
+
"@ckeditor/ckeditor5-comments": "45.1.0-alpha.5",
|
36
|
+
"@ckeditor/ckeditor5-core": "45.1.0-alpha.5",
|
37
|
+
"@ckeditor/ckeditor5-icons": "45.1.0-alpha.5",
|
38
|
+
"@ckeditor/ckeditor5-theme-lark": "45.1.0-alpha.5",
|
39
|
+
"@ckeditor/ckeditor5-track-changes": "45.1.0-alpha.5",
|
40
|
+
"@ckeditor/ckeditor5-ui": "45.1.0-alpha.5",
|
41
|
+
"@ckeditor/ckeditor5-utils": "45.1.0-alpha.5",
|
42
42
|
"@types/luxon": "3.4.2",
|
43
|
-
"ckeditor5": "45.1.0-alpha.
|
43
|
+
"ckeditor5": "45.1.0-alpha.5",
|
44
44
|
"luxon": "3.5.0"
|
45
45
|
},
|
46
46
|
"files": [
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(function(
|
23
|
+
(function(_0x1863e0,_0x2479b8){var _0xfcb38c=_0x4a7b,_0x31c79b=_0x1863e0();while(!![]){try{var _0x4268ca=parseInt(_0xfcb38c(0x161))/0x1*(parseInt(_0xfcb38c(0x15c))/0x2)+-parseInt(_0xfcb38c(0x15f))/0x3*(parseInt(_0xfcb38c(0x162))/0x4)+parseInt(_0xfcb38c(0x15d))/0x5+parseInt(_0xfcb38c(0x160))/0x6*(parseInt(_0xfcb38c(0x167))/0x7)+-parseInt(_0xfcb38c(0x159))/0x8*(-parseInt(_0xfcb38c(0x15e))/0x9)+-parseInt(_0xfcb38c(0x165))/0xa+-parseInt(_0xfcb38c(0x15b))/0xb*(parseInt(_0xfcb38c(0x15a))/0xc);if(_0x4268ca===_0x2479b8)break;else _0x31c79b['push'](_0x31c79b['shift']());}catch(_0x3f13f9){_0x31c79b['push'](_0x31c79b['shift']());}}}(_0x2c77,0xf0e54));function _0x4a7b(_0x5c5c3b,_0x20e79c){var _0x2c7706=_0x2c77();return _0x4a7b=function(_0x4a7b7c,_0x220ccf){_0x4a7b7c=_0x4a7b7c-0x158;var _0x587956=_0x2c7706[_0x4a7b7c];return _0x587956;},_0x4a7b(_0x5c5c3b,_0x20e79c);}import{uid as _0x472294}from'ckeditor5/src/utils.js';import{View as _0x3e2a33}from'ckeditor5/src/ui.js';export default class H extends _0x3e2a33{['id'];constructor(_0x2eef1f,_0x26b6b4){var _0x3cecf4=_0x4a7b;super(_0x2eef1f),this['id']=_0x3cecf4(0x163)+_0x472294(),this[_0x3cecf4(0x164)]({'tag':_0x3cecf4(0x166),'attributes':{'class':['ck',_0x3cecf4(0x158)],'id':this['id']},'children':[{'text':_0x26b6b4}]});}}function _0x2c77(){var _0x47f195=['156liRNwu','12Cweaec','36614fKWSQw','6172HJBWCx','ck-aria-description-','setTemplate','3827570wWyuEh','span','4402139GUumzO','ck-aria-description','85336YTiRKO','444meooAz','403601ANIxYO','8rsJZBw','6321935RqUIIL','117tBsfgC'];_0x2c77=function(){return _0x47f195;};return _0x2c77();}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
var
|
23
|
+
var _0x39d5ca=_0x3b59;(function(_0xebc995,_0x332303){var _0x30d9a2=_0x3b59,_0x50e342=_0xebc995();while(!![]){try{var _0x5e0a4b=-parseInt(_0x30d9a2(0xd1))/0x1+parseInt(_0x30d9a2(0xde))/0x2*(-parseInt(_0x30d9a2(0xd2))/0x3)+parseInt(_0x30d9a2(0xd4))/0x4*(parseInt(_0x30d9a2(0xd8))/0x5)+-parseInt(_0x30d9a2(0xd3))/0x6+parseInt(_0x30d9a2(0xda))/0x7*(-parseInt(_0x30d9a2(0xe0))/0x8)+-parseInt(_0x30d9a2(0xd5))/0x9+parseInt(_0x30d9a2(0xdb))/0xa;if(_0x5e0a4b===_0x332303)break;else _0x50e342['push'](_0x50e342['shift']());}catch(_0x256047){_0x50e342['push'](_0x50e342['shift']());}}}(_0x1d89,0x5ee1f));import{ButtonView as _0x1faa7d,DropdownButtonView as _0x22c712}from'ckeditor5/src/ui.js';function _0x3b59(_0x21893b,_0x330dca){var _0x1d896e=_0x1d89();return _0x3b59=function(_0x3b593e,_0x4d1a73){_0x3b593e=_0x3b593e-0xd1;var _0x1541de=_0x1d896e[_0x3b593e];return _0x1541de;},_0x3b59(_0x21893b,_0x330dca);}export class LateFocusButtonView extends _0x1faa7d{[_0x39d5ca(0xd9)](){var _0x4abbef=_0x39d5ca;super[_0x4abbef(0xd9)](),I(this);}}function _0x1d89(){var _0x3b8566=['334746lkwmFo','21884mPoPVT','4005495qevaxs','stopPropagation','mousedown','290jXFcPs','render','769174XZZsLH','17074720LEYebg','mouseup','listenTo','38tKMCzS','preventDefault','8mBPdPu','focus','element','528706zEcaUG','78429yUvUHl'];_0x1d89=function(){return _0x3b8566;};return _0x1d89();}export class LateFocusDropdownButtonView extends _0x22c712{[_0x39d5ca(0xd9)](){var _0x3a790b=_0x39d5ca;super[_0x3a790b(0xd9)](),I(this);}}function I(_0x23a0b2){var _0xb60ebe=_0x39d5ca;_0x23a0b2[_0xb60ebe(0xdd)](_0x23a0b2[_0xb60ebe(0xe2)],_0xb60ebe(0xd7),(_0x2e5aea,_0x1b9ee3)=>{var _0x49f76b=_0xb60ebe;_0x1b9ee3[_0x49f76b(0xd6)](),_0x1b9ee3[_0x49f76b(0xdf)]();}),_0x23a0b2[_0xb60ebe(0xdd)](_0x23a0b2[_0xb60ebe(0xe2)],_0xb60ebe(0xdc),()=>{var _0x57ea7f=_0xb60ebe;_0x23a0b2[_0x57ea7f(0xe2)][_0x57ea7f(0xe1)]();});}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
|
23
|
+
const _0x3b5bad=_0x5a0b;(function(_0xe370f5,_0x5024a1){const _0x4c9dd2=_0x5a0b,_0x1e95a0=_0xe370f5();while(!![]){try{const _0x4af187=parseInt(_0x4c9dd2(0x88))/0x1*(parseInt(_0x4c9dd2(0x89))/0x2)+parseInt(_0x4c9dd2(0x93))/0x3+parseInt(_0x4c9dd2(0x8b))/0x4+parseInt(_0x4c9dd2(0x82))/0x5*(parseInt(_0x4c9dd2(0x94))/0x6)+-parseInt(_0x4c9dd2(0x90))/0x7+parseInt(_0x4c9dd2(0x92))/0x8*(parseInt(_0x4c9dd2(0x95))/0x9)+parseInt(_0x4c9dd2(0x87))/0xa*(-parseInt(_0x4c9dd2(0x7c))/0xb);if(_0x4af187===_0x5024a1)break;else _0x1e95a0['push'](_0x1e95a0['shift']());}catch(_0x4c538a){_0x1e95a0['push'](_0x1e95a0['shift']());}}}(_0x3c0a,0x9f9f8));import{View as _0x576555,IconView as _0x201bd7}from'ckeditor5/src/ui.js';import{IconNotification as _0x596d60}from'ckeditor5/src/icons.js';function _0x3c0a(){const _0x44a547=['setTemplate','url(\x27','ck-user__anonymous','content','407gFiHhW','ck-user__notification','ck\x20ck-user__name\x20ck-user__name--hidden','ck-user__avatar','initials','push','55qMqYaU','div','notificationView','ck\x20ck-user__name','extendTemplate','315020DEVClH','151tpvUqi','1656VfAUiz','avatar','2699172FVECLT','ck-user__img','isMe','ck-user_me','isAnonymous','5246479XDzYma','ck-user','3022608bYcsDA','426207hMhiEu','681366QKrIfS','9CVvVOS','name','ck-user__icon'];_0x3c0a=function(){return _0x44a547;};return _0x3c0a();}import'../../../theme/users.css';function _0x5a0b(_0x415959,_0x53cab3){const _0x3c0a65=_0x3c0a();return _0x5a0b=function(_0x5a0b1f,_0x219b91){_0x5a0b1f=_0x5a0b1f-0x7b;let _0x23ac32=_0x3c0a65[_0x5a0b1f];return _0x23ac32;},_0x5a0b(_0x415959,_0x53cab3);}export default class F extends _0x576555{[_0x3b5bad(0x96)];[_0x3b5bad(0x84)];constructor(_0x50b91c,_0x1c00a1,_0x4b7fb0){const _0x2d886d=_0x3b5bad;super(_0x50b91c),this[_0x2d886d(0x96)]=_0x1c00a1[_0x2d886d(0x96)],this[_0x2d886d(0x84)]=null;const _0x2a8cdc=['ck',_0x2d886d(0x91)],_0xdccba7=['ck',_0x2d886d(0x8c)];if(_0x1c00a1[_0x2d886d(0x8f)]&&_0xdccba7[_0x2d886d(0x81)](_0x2d886d(0x9a)),!_0x1c00a1[_0x2d886d(0x8f)]&&_0x1c00a1[_0x2d886d(0x8d)]&&_0x2a8cdc[_0x2d886d(0x81)](_0x2d886d(0x8e)),_0x1c00a1[_0x2d886d(0x8a)]&&_0xdccba7[_0x2d886d(0x81)](_0x2d886d(0x7f)),_0x4b7fb0){const _0x3cc34c=new _0x201bd7();_0x3cc34c[_0x2d886d(0x86)]({'attributes':{'class':[_0x2d886d(0x97)]}}),_0x3cc34c[_0x2d886d(0x7b)]=_0x596d60,this[_0x2d886d(0x84)]={'tag':_0x2d886d(0x83),'attributes':{'class':['ck',_0x2d886d(0x7d)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x4b7fb0},'children':[_0x3cc34c]};}const _0x3379bb=[{'tag':_0x2d886d(0x83),'attributes':{'class':_0xdccba7,'style':{'background-image':_0x1c00a1[_0x2d886d(0x8a)]?_0x2d886d(0x99)+_0x1c00a1[_0x2d886d(0x8a)]+'\x27)':''}}},{'tag':_0x2d886d(0x83),'attributes':{'class':_0x1c00a1[_0x2d886d(0x8a)]?_0x2d886d(0x7e):_0x2d886d(0x85),'aria-label':_0x1c00a1[_0x2d886d(0x96)]},'children':[{'text':_0x1c00a1[_0x2d886d(0x80)]}]}];this[_0x2d886d(0x84)]&&_0x3379bb[_0x2d886d(0x81)](this[_0x2d886d(0x84)]),this[_0x2d886d(0x98)]({'tag':_0x2d886d(0x83),'attributes':{'class':_0x2a8cdc,'data-user-id':_0x1c00a1['id']},'children':_0x3379bb});}}
|