@ckeditor/ckeditor5-collaboration-core 43.1.0-alpha.4 → 43.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 _0x24dccc,Editor as _0x3d050d,icons as _0x31617c}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x53e0f9,Collection as _0x198160,uid as _0x30030c,first as _0x4b128c,FocusTracker as _0x8a9c08,KeystrokeHandler as _0xba63cc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x6d55f0,IconView as _0x4a160a,ButtonView as _0x55689f,DropdownButtonView as _0xaa6ed2,FocusCycler as _0xe5c12f,isViewWithFocusCycler as _0x145f23}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x3a62f3 from'date-fns/format/index.js';import _0x4ea909 from'date-fns/parseISO/index.js';import _0x2f2f2b from'date-fns/differenceInCalendarDays/index.js';class n extends _0x24dccc{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x4410fe,_0x67e22f){let _0x25cdbd;if(_0x67e22f||(_0x67e22f=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x67e22f?_0x25cdbd=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x25cdbd=this['context']['editors']['find'](_0x7ce13b=>_0x7ce13b['config']['get']('collaboration.channelId')==_0x67e22f)),!_0x25cdbd)throw new _0x53e0f9('permissions-set-permissions-invalid-channel-id',null);const _0x1b371d=_0x25cdbd['plugins'],_0x17a74e=_0x1b371d['has']('CommentsRepository')?_0x1b371d['get']('CommentsRepository'):void 0x0,_0x29be75=_0x1b371d['has']('CommentsOnly')&&_0x1b371d['get']('CommentsOnly'),_0x529038=_0x4410fe['includes']('document:write'),_0xaacdd0=_0x4410fe['includes']('comment:modify_all'),_0x5ed5a7=_0x4410fe['includes']('comment:admin'),_0x184976=_0x4410fe['includes']('comment:write'),_0x5886b9=_0x184976||_0x5ed5a7,_0x2b99cd=_0x5886b9||_0xaacdd0,_0x465343=_0x529038||_0x5886b9;(_0x29be75&&(_0x29be75['isEnabled']=!_0x529038&&_0x2b99cd),_0x25cdbd instanceof _0x3d050d)&&(!(_0x529038||_0x2b99cd&&_0x17a74e)?_0x25cdbd['enableReadOnlyMode']('no-permissions'):_0x25cdbd['disableReadOnlyMode']('no-permissions'));if(_0x17a74e){_0x17a74e['setPermissions']({'admin':_0x5ed5a7,'modifyAll':_0xaacdd0,'write':_0x184976,'resolve':_0x465343},_0x67e22f);const _0x587667=_0x25cdbd instanceof _0x3d050d&&_0x25cdbd['commands']['get']('addCommentThread');_0x587667&&(_0x5886b9?_0x587667['clearForceDisabled']('noPermissions'):_0x587667['forceDisabled']('noPermissions'));}}}function r(_0x4cde97,_0x51bb7d){const t=_0x4cde97['t'];switch(_0x51bb7d){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 l extends _0x24dccc{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x35fdb4){super(_0x35fdb4),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x198160(),this['_locale']=_0x35fdb4['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x350bce=this['context'];this['licenseKey']=_0x350bce['config']['get']('licenseKey');const _0x3fe7d1=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x397115;for(const _0x1410b1 in _0x350bce){const _0x19ecaa=_0x350bce[_0x1410b1];if(_0x3fe7d1['includes'](_0x19ecaa)){delete _0x350bce[_0x1410b1],_0x397115=_0x19ecaa;break;}}if('licenseKeyInvalid'===_0x397115)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x53e0f9('invalid-license-key',null);if('licenseKeyTrial'===_0x397115&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20collaboration\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'licenseKeyTrialLimit:operations'===_0x397115)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x53e0f9('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x397115)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x53e0f9('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x397115)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x53e0f9('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x397115&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x260df3,name:_0x3bb752,..._0x276b21}){if(!_0x260df3||'string'!=typeof _0x260df3)throw new _0x53e0f9('users-add-invalid-id');if(this['users']['has'](_0x260df3))throw new _0x53e0f9('users-add-duplicated-id',null,{'id':_0x260df3});const _0x1f1a0d={..._0x276b21,'id':_0x260df3,'name':a(this['_locale'],_0x3bb752),'color':this['_getNextColor']()};_0x1f1a0d['name']=a(this['_locale'],_0x1f1a0d['name']);const _0x12766b=new U(_0x1f1a0d);return this['users']['add'](_0x12766b),_0x12766b;}['getUser'](_0x5b7280){return this['users']['get'](_0x5b7280);}['useAnonymousUser'](){const _0x4ffbfd=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x4ffbfd);}['defineMe'](_0x3c8935){if(this['_myId'])throw new _0x53e0f9('users-me-already-defined',null);const _0x2cd063=this['getUser'](_0x3c8935);if(!_0x2cd063)throw new _0x53e0f9('users-me-missing-user',null);this['_myId']=_0x3c8935,_0x2cd063['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x1d2adc=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x1d2adc&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0x2c065d=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x2c065d,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class U{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x47c623){this['id']=_0x47c623['id'],this['color']=_0x47c623['color'],this['name']=_0x47c623['name'],this['avatar']=_0x47c623['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0xc866d2=this['name']['split']('\x20');return 0x1===_0xc866d2['length']?this['_getInitial'](_0xc866d2[0x0]):this['_getInitial'](_0xc866d2[0x0])+this['_getInitial'](_0xc866d2[_0xc866d2['length']-0x1]);}['_getInitial'](_0x2c3671){return _0x2c3671['charAt'](0x0)['toUpperCase']();}}function a(_0xd30342,_0x52ff24=''){return''==(_0x52ff24=_0x52ff24['trim']())?r(_0xd30342,'Anonymous'):_0x52ff24;}class u{['_id'];constructor(_0x4ad2a2){this['_id']=_0x4ad2a2;}['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 _0x6d55f0{['name'];['notificationView'];constructor(_0x5d1955,_0xd0f345,_0x3107a7){super(_0x5d1955),this['name']=_0xd0f345['name'],this['notificationView']=null;const _0x37a502=['ck','ck-user'],_0x11cfdf=['ck','ck-user__img'];if(_0xd0f345['isAnonymous']&&_0x11cfdf['push']('ck-user__anonymous'),!_0xd0f345['isAnonymous']&&_0xd0f345['isMe']&&_0x37a502['push']('ck-user_me'),_0xd0f345['avatar']&&_0x11cfdf['push']('ck-user__avatar'),_0x3107a7){const _0x5ae266=new _0x4a160a();_0x5ae266['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x5ae266['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':_0x3107a7},'children':[_0x5ae266]};}const _0x110c06=[{'tag':'div','attributes':{'class':_0x11cfdf,'style':{'background-image':_0xd0f345['avatar']?'url(\x27'+_0xd0f345['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0xd0f345['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0xd0f345['name']},'children':[{'text':_0xd0f345['initials']}]}];this['notificationView']&&_0x110c06['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x37a502,'data-user-id':_0xd0f345['id']},'children':_0x110c06});}}class G extends _0x6d55f0{['id'];constructor(_0x4bcb90,_0x430fe8){super(_0x4bcb90),this['id']='ck-aria-description-'+_0x30030c(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x430fe8}]});}}class P extends _0x55689f{['render'](){super['render'](),V(this);}}class Y extends _0xaa6ed2{['render'](){super['render'](),V(this);}}function V(_0x4d0899){_0x4d0899['listenTo'](_0x4d0899['element'],'mousedown',(_0x3ddd9f,_0xdc16de)=>{_0xdc16de['stopPropagation'](),_0xdc16de['preventDefault']();}),_0x4d0899['listenTo'](_0x4d0899['element'],'mouseup',()=>{_0x4d0899['element']['focus']();});}function E(_0x1bbfc8={}){if(void 0x0!==_0x1bbfc8['dateTimeFormat']&&'function'!=typeof _0x1bbfc8['dateTimeFormat'])throw new _0x53e0f9('invalid-date-time-format');return _0x883a75=>{const _0x926c21='string'==typeof _0x883a75?_0x4ea909(_0x883a75):_0x883a75,_0x40481c=new Date(),_0x527219=_0x2f2f2b(_0x40481c,_0x926c21);return _0x1bbfc8['dateTimeFormat']?_0x1bbfc8['dateTimeFormat'](_0x926c21):_0x3a62f3(_0x926c21,0x0===_0x527219?'\x27Today\x27\x20hh:mma':0x1===_0x527219?'\x27Yesterday\x27\x20hh:mma':_0x527219<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x1ece89,_0x44c3ec){const _0x140f76=_0x1ece89['mapper']['markerNameToElements'](_0x44c3ec['name']);if(!_0x140f76)return null;const _0x112bac=_0x4b128c(_0x140f76['values']());return _0x1ece89['view']['domConverter']['mapViewToDom'](_0x112bac)||null;}function R(_0x4085cd,_0x467fc8){if(0x0===_0x467fc8['length'])return null;const _0x53602a=[],_0x38f902=_0x4085cd['view']['domConverter'];for(const _0x5d9705 of _0x467fc8){const _0xe2b294=_0x4085cd['mapper']['markerNameToElements'](_0x5d9705['name']);if(!_0xe2b294)continue;const _0x281c3f=Array['from'](_0xe2b294)['map'](_0x30789c=>_0x38f902['mapViewToDom'](_0x30789c))['filter'](_0x3fb77b=>!!_0x3fb77b);_0x53602a['push'](..._0x281c3f);}if(0x0===_0x53602a['length'])return null;const _0x6e44ae=[];for(const _0x118817 of _0x53602a){const _0x5cddb5=_0x118817['getClientRects']()['item'](0x0);_0x5cddb5&&_0x6e44ae['push']({'x':_0x5cddb5['x'],'y':_0x5cddb5['y'],'domElement':_0x118817});}return 0x0===_0x6e44ae['length']?null:(_0x6e44ae['sort']((_0x23389f,_0x100547)=>_0x23389f['y']-_0x100547['y']||_0x23389f['x']-_0x100547['x']),_0x6e44ae['map'](_0x7408a9=>_0x7408a9['domElement']));}function Z(_0x102ddc,{limit:_0x1940c9,suffix:_0x463af7='...'}){const _0x636918=[];let _0x516037=0x0;const _0x5af9f3=_0x102ddc['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x4b9d57=0x0;_0x4b9d57<_0x5af9f3['length'];_0x4b9d57++){let _0x1e9b57=_0x5af9f3[_0x4b9d57];const _0x3a31f9=$(_0x1e9b57);if(_0x1e9b57['startsWith']('<')){if(_0x516037>=_0x1940c9){const _0x4039d7=_0x1e9b57['match'](/[a-zA-Z]+/);if(!_0x4039d7){_0x5af9f3[_0x4b9d57]='';continue;}const _0x45b525=_0x4039d7[0x0];_0x1e9b57['startsWith']('</')?(_0x636918['length']&&(_0x1e9b57=''),_0x636918['pop']()):(_0x636918['push'](_0x45b525),_0x1e9b57='');}}else{if(_0x516037>=_0x1940c9)_0x1e9b57='';else{if(_0x516037+_0x3a31f9['length']>=_0x1940c9){let _0x4a938c=_0x1940c9-_0x516037;if('\x20'===_0x3a31f9[_0x4a938c-0x1])_0x4a938c--;else{const _0x1f0dbf=_0x3a31f9['slice'](_0x4a938c)['indexOf']('\x20');-0x1!==_0x1f0dbf?_0x4a938c+=_0x1f0dbf:_0x4a938c=_0x1e9b57['length'];}_0x1e9b57=_0x3a31f9['slice'](0x0,_0x4a938c)['join']('')+_0x463af7,_0x516037=_0x1940c9;}else _0x516037+=_0x3a31f9['length'];}}_0x5af9f3[_0x4b9d57]=_0x1e9b57;}return _0x5af9f3['join']('\x0a')['replace'](/\n/g,'');}function $(_0x437916){const _0x462751=[];for(let _0x3ca55d=0x0;_0x3ca55d<_0x437916['length'];_0x3ca55d++){const _0x10ddf5=_0x437916['substring'](_0x3ca55d)['match'](/^&[a-z0-9#]+;/);if(_0x10ddf5){const _0x45738b=_0x10ddf5[0x0];_0x462751['push'](_0x45738b),_0x3ca55d+=_0x45738b['length']-0x1;}else _0x462751['push'](_0x437916[_0x3ca55d]);}return _0x462751;}class h extends _0x6d55f0{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0xb70c5a){super(_0xb70c5a);const _0x21ba77=this['bindTemplate'];this['set']('message',r(_0xb70c5a,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0xb70c5a,r(_0xb70c5a,'Yes'),_0x31617c['check'],'submit'),this['cancelView']=this['_createButtonView'](_0xb70c5a,r(_0xb70c5a,'No'),_0x31617c['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x8a9c08(),this['keystrokes']=new _0xba63cc(),this['focusCycler']=new _0xe5c12f({'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':_0x21ba77['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'](_0x37ebe9,_0x2c1162,_0x37159d,_0x16bc11){const _0x272428=new _0x55689f(_0x37ebe9);return _0x272428['label']=_0x2c1162,_0x272428['icon']=_0x37159d,_0x272428['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x16bc11}}),_0x272428['on']('execute',()=>this['fire'](_0x16bc11)),_0x272428;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x3c642b=>{this['keystrokes']['listenTo'](_0x3c642b['element']),this['focusTracker']['add'](_0x3c642b['element']);}),this['keystrokes']['set']('esc',(_0x1d1ee3,_0x420a78)=>{this['fire']('cancel'),_0x420a78();});}}function m(_0x2a9435){return class extends _0x2a9435{['showConfirm'](_0x267dec,_0x3ac5f9){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x267dec,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x3ac5f9['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x285256=>this['confirmView']['on']('submit',_0x285256));}['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(_0x5acfc6){let _0x54fbd0=0x0,_0x1f13f5=0x0;for(const _0x55ca05 of q(_0x5acfc6))_0x54fbd0=(_0x54fbd0<<0x5)-_0x54fbd0+_0x55ca05,_0x54fbd0|=0x0,[_0x54fbd0,_0x1f13f5]=[_0x1f13f5,_0x54fbd0];return z(_0x54fbd0)+z(_0x1f13f5);}function*O(_0x56b896){null==_0x56b896||null==_0x56b896?yield 0x12b9b0a1:0x0===_0x56b896||!0x1===_0x56b896?yield 0x0:0x1===_0x56b896||0x1==_0x56b896?yield 0x1:Array['isArray'](_0x56b896)?yield*function*(_0x95496b){for(const _0x1dbd05 of _0x95496b)yield*O(_0x1dbd05);}(_0x56b896):'object'==typeof _0x56b896?yield*q(_0x56b896):'string'==typeof _0x56b896?yield*v(_0x56b896):'number'==typeof _0x56b896&&(yield _0x56b896);}function*q(_0xdf06a2){if(yield w('{'),_0xdf06a2){const _0x598d01=Object['keys'](_0xdf06a2)['sort']();for(const _0x3848df of _0x598d01){yield*v(_0x3848df),yield w(':');const _0x1d418a=_0xdf06a2[_0x3848df];yield*O(_0x1d418a);}}yield w('}');}function*v(_0x4de823){yield w('\x22');for(const _0x1253bf of _0x4de823)yield w(_0x1253bf);yield w('\x22');}function w(_0x3ccd60){return _0x3ccd60['charCodeAt'](0x0);}function z(_0x113952){return(_0x113952*=Math['sign'](_0x113952))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x4545e7,_0x14945d,_0xea5415,_0x238668=[]){const _0xf10c56='string'==typeof _0x4545e7?_0xea5415['get'](_0x4545e7)['constructor']:_0x4545e7['prototype']['constructor'];if(_0x14945d['has'](_0xf10c56))return _0x14945d['get'](_0xf10c56);_0x14945d['set'](_0xf10c56,!0x0);const _0x5a3232=[...D,..._0x238668]['map'](_0x3eb141=>{if(_0xea5415['has'](_0x3eb141))return _0xea5415['get'](_0x3eb141)['constructor'];})['filter'](_0x44cdc=>_0x44cdc);if(_0xf10c56&&_0x5a3232['includes'](_0xf10c56))return _0x14945d['set'](_0xf10c56,!0x1),!0x1;if(!_0xf10c56['requires'])return _0x14945d['set'](_0xf10c56,!0x0),!0x0;const _0x1ea128=_0xf10c56['requires']['every'](_0x2399dd=>S(_0x2399dd,_0x14945d,_0xea5415,_0x238668));return _0x14945d['set'](_0xf10c56,_0x1ea128),_0x1ea128;}function C(_0x561206,_0x39ff5c){const _0x252d99={};for(const _0x2ecae2 of _0x561206['config']['names']())W['includes'](_0x2ecae2)||(_0x252d99[_0x2ecae2]=_0x561206['config']['get'](_0x2ecae2));const _0x57dde2=_0x252d99['plugins']||[],_0x75607c=_0x561206['constructor']['builtinPlugins']||[],_0x2ed882=_0x57dde2['length']?_0x57dde2:_0x75607c,_0x5daa76=_0x252d99['extraPlugins']||[];delete _0x252d99['extraPlugins'];const _0x1edf7a=_0x252d99['removePlugins']||[];delete _0x252d99['removePlugins'];const _0x29aac5=_0x561206['_context']['config']['get']('plugins')||[],_0x3e88c0=_0x2ed882['concat'](_0x5daa76)['concat'](_0x29aac5)['map'](_0x393b3b=>'string'==typeof _0x393b3b?_0x75607c['find'](_0xe193d7=>_0xe193d7['pluginName']==_0x393b3b):_0x393b3b)['filter'](_0x24a5ad=>!_0x1edf7a['includes'](_0x24a5ad)&&!_0x1edf7a['includes'](_0x24a5ad['pluginName'])),_0x1722d9=Array['from'](new Set(_0x3e88c0)),_0x126534=new Map();return _0x252d99['plugins']=_0x1722d9['filter'](_0x1addab=>S(_0x1addab,_0x126534,_0x561206['plugins'],_0x39ff5c)),_0x252d99;}function B(_0x309736,_0x41ec3a){const _0x484495=[];_0x309736['document']['selection']['on']('change:range',()=>{const _0x437e07=function(_0x1e0db0,_0x4e4b1b){const _0x3124b3=[];for(const _0x58e78e of _0x1e0db0['markers']){const _0x3cbdbd=_0x58e78e['getRange']();(_0x3cbdbd['containsPosition'](_0x4e4b1b)||_0x3cbdbd['start']['isEqual'](_0x4e4b1b)||_0x3cbdbd['end']['isEqual'](_0x4e4b1b))&&_0x3124b3['push'](_0x58e78e);}return _0x3124b3;}(_0x309736,_0x309736['document']['selection']['focus']),_0x31fea9=[],_0x420c15=[],_0x21ba3c=[];for(const _0x472835 of _0x484495)_0x437e07['includes'](_0x472835)||_0x31fea9['push'](_0x472835);for(const _0x58679f of _0x437e07)_0x484495['includes'](_0x58679f)||_0x420c15['push'](_0x58679f),_0x21ba3c['push'](_0x58679f);(_0x31fea9['length']||_0x420c15['length'])&&_0x41ec3a({'left':_0x31fea9,'entered':_0x420c15}),_0x484495['length']=0x0,_0x484495['push'](..._0x21ba3c);});}const Q='Ctrl+Shift+E';function T(_0xbfd6ad,_0x4feee6){const _0x58ff04=_0xbfd6ad['element'];_0xbfd6ad['keystrokes']['listenTo'](_0x58ff04);for(const _0x2a2de2 of _0x4feee6)K(_0xbfd6ad,_0x2a2de2);_0x4feee6['on']('change',(_0x2601b5,_0x25e8a5)=>{for(const _0x546748 of _0x25e8a5['removed'])_(_0xbfd6ad,_0x546748);for(const _0x284433 of Array['from'](_0x25e8a5['added'])['reverse']())K(_0xbfd6ad,_0x284433);}),_0xbfd6ad['keystrokes']['set']('enter',(_0x19cd6a,_0x466267)=>{_0x58ff04===_0x19cd6a['target']&&(_0xbfd6ad['focusCycler']['focusFirst'](),_0x466267());},{'filter':_0x2aaba1=>_0x2aaba1['target']===_0x58ff04}),_0xbfd6ad['keystrokes']['set']('esc',(_0x4991b9,_0x2ee35c)=>{_0x58ff04!==_0x4991b9['target']?_0xbfd6ad['focus']():_0xbfd6ad['fire']('escape'),_0x2ee35c();}),_0xbfd6ad['keystrokes']['set']('arrowdown',(_0x2a4917,_0x47ecc1)=>{_0x58ff04===_0x2a4917['target']&&(_0xbfd6ad['fire']('arrowdown'),_0x47ecc1());}),_0xbfd6ad['keystrokes']['set']('arrowup',(_0x363c49,_0x33dd42)=>{_0x58ff04===_0x363c49['target']&&(_0xbfd6ad['fire']('arrowup'),_0x33dd42());});}function K(_0x598d3b,_0x5a9302){_0x5a9302['isRendered']&&(_0x598d3b['focusTracker']['add'](_0x5a9302['element']),_0x598d3b['keystrokes']['listenTo'](_0x5a9302['element']),_0x145f23(_0x5a9302)&&function(_0x449ba4,_0x55f5e){const _0x203aea=_0x449ba4['actions'],_0x1a6a07=_0x55f5e['actions'];for(const _0xa90fe8 of Object['keys'](_0x203aea))if(_0xa90fe8 in _0x1a6a07&&_0x203aea[_0xa90fe8]!==_0x1a6a07[_0xa90fe8])return!0x1;return!0x0;}(_0x598d3b['focusCycler'],_0x5a9302['focusCycler'])&&_0x598d3b['focusCycler']['chain'](_0x5a9302['focusCycler']));}function _(_0x11d773,_0x2690c0){_0x11d773['focusTracker']['remove'](_0x2690c0['element']),_0x11d773['keystrokes']['stopListening'](_0x2690c0['element']),_0x145f23(_0x2690c0)&&_0x11d773['focusCycler']['unchain'](_0x2690c0['focusCycler']);}export{G as AriaDescriptionView,m as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,P as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,J as UserView,l 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 _0x1d02ff,Editor as _0x165f5e,icons as _0x21bf81}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x1b6634,Collection as _0x1b4da3,uid as _0x144b28,first as _0x405e79,FocusTracker as _0x2f72f4,KeystrokeHandler as _0x5a8b28}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x3f14cc,IconView as _0x1bba23,ButtonView as _0x3dd98a,DropdownButtonView as _0x56e8a0,FocusCycler as _0x5a5b53,isViewWithFocusCycler as _0x1e66ba}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0xbf279b from'date-fns/format/index.js';import _0x535d33 from'date-fns/parseISO/index.js';import _0x1f355d from'date-fns/differenceInCalendarDays/index.js';class n extends _0x1d02ff{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x290571,_0x3df106){let _0x25d736;if(_0x3df106||(_0x3df106=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x3df106?_0x25d736=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x25d736=this['context']['editors']['find'](_0x5883b2=>_0x5883b2['config']['get']('collaboration.channelId')==_0x3df106)),!_0x25d736)throw new _0x1b6634('permissions-set-permissions-invalid-channel-id',null);const _0x2ecba6=_0x25d736['plugins'],_0x20dace=_0x2ecba6['has']('CommentsRepository')?_0x2ecba6['get']('CommentsRepository'):void 0x0,_0x5cf9f3=_0x2ecba6['has']('CommentsOnly')&&_0x2ecba6['get']('CommentsOnly'),_0x33b5bc=_0x290571['includes']('document:write'),_0x4c9029=_0x290571['includes']('comment:modify_all'),_0x1a19b4=_0x290571['includes']('comment:admin'),_0x69d0cb=_0x290571['includes']('comment:write'),_0x4d2714=_0x69d0cb||_0x1a19b4,_0x41ce7f=_0x4d2714||_0x4c9029,_0x4b7dc9=_0x33b5bc||_0x4d2714;(_0x5cf9f3&&(_0x5cf9f3['isEnabled']=!_0x33b5bc&&_0x41ce7f),_0x25d736 instanceof _0x165f5e)&&(!(_0x33b5bc||_0x41ce7f&&_0x20dace)?_0x25d736['enableReadOnlyMode']('no-permissions'):_0x25d736['disableReadOnlyMode']('no-permissions'));if(_0x20dace){_0x20dace['setPermissions']({'admin':_0x1a19b4,'modifyAll':_0x4c9029,'write':_0x69d0cb,'resolve':_0x4b7dc9},_0x3df106);const _0x1de7e0=_0x25d736 instanceof _0x165f5e&&_0x25d736['commands']['get']('addCommentThread');_0x1de7e0&&(_0x4d2714?_0x1de7e0['clearForceDisabled']('noPermissions'):_0x1de7e0['forceDisabled']('noPermissions'));}}}function r(_0x23131b,_0x4d68c2){const t=_0x23131b['t'];switch(_0x4d68c2){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 l extends _0x1d02ff{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x365ac6){super(_0x365ac6),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x1b4da3(),this['_locale']=_0x365ac6['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x49299e=this['context'];this['licenseKey']=_0x49299e['config']['get']('licenseKey');const _0x696614=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4fd3f4;for(const _0x3f4bf6 in _0x49299e){const _0x2be25e=_0x49299e[_0x3f4bf6];if(_0x696614['includes'](_0x2be25e)){delete _0x49299e[_0x3f4bf6],_0x4fd3f4=_0x2be25e;break;}}if('licenseKeyInvalid'===_0x4fd3f4)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x1b6634('invalid-license-key',null);if('licenseKeyTrial'===_0x4fd3f4&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20collaboration\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'licenseKeyTrialLimit:operations'===_0x4fd3f4)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x1b6634('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x4fd3f4)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x1b6634('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x4fd3f4)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x1b6634('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x4fd3f4&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x4528f9,name:_0x2f5a30,..._0x47bb71}){if(!_0x4528f9||'string'!=typeof _0x4528f9)throw new _0x1b6634('users-add-invalid-id');if(this['users']['has'](_0x4528f9))throw new _0x1b6634('users-add-duplicated-id',null,{'id':_0x4528f9});const _0x3dc19d={..._0x47bb71,'id':_0x4528f9,'name':a(this['_locale'],_0x2f5a30),'color':this['_getNextColor']()};_0x3dc19d['name']=a(this['_locale'],_0x3dc19d['name']);const _0x247ccc=new U(_0x3dc19d);return this['users']['add'](_0x247ccc),_0x247ccc;}['getUser'](_0x483bcc){return this['users']['get'](_0x483bcc);}['useAnonymousUser'](){const _0x36a2a8=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x36a2a8);}['defineMe'](_0x33575f){if(this['_myId'])throw new _0x1b6634('users-me-already-defined',null);const _0x260aba=this['getUser'](_0x33575f);if(!_0x260aba)throw new _0x1b6634('users-me-missing-user',null);this['_myId']=_0x33575f,_0x260aba['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x35eda2=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x35eda2&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0x160d29=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x160d29,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class U{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x1ef31c){this['id']=_0x1ef31c['id'],this['color']=_0x1ef31c['color'],this['name']=_0x1ef31c['name'],this['avatar']=_0x1ef31c['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x4b4da4=this['name']['split']('\x20');return 0x1===_0x4b4da4['length']?this['_getInitial'](_0x4b4da4[0x0]):this['_getInitial'](_0x4b4da4[0x0])+this['_getInitial'](_0x4b4da4[_0x4b4da4['length']-0x1]);}['_getInitial'](_0x5b7875){return _0x5b7875['charAt'](0x0)['toUpperCase']();}}function a(_0x4379f1,_0xadf48=''){return''==(_0xadf48=_0xadf48['trim']())?r(_0x4379f1,'Anonymous'):_0xadf48;}class u{['_id'];constructor(_0x4198fa){this['_id']=_0x4198fa;}['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 _0x3f14cc{['name'];['notificationView'];constructor(_0x1c7637,_0x4caaa2,_0x4d1768){super(_0x1c7637),this['name']=_0x4caaa2['name'],this['notificationView']=null;const _0x5b4f61=['ck','ck-user'],_0x376f21=['ck','ck-user__img'];if(_0x4caaa2['isAnonymous']&&_0x376f21['push']('ck-user__anonymous'),!_0x4caaa2['isAnonymous']&&_0x4caaa2['isMe']&&_0x5b4f61['push']('ck-user_me'),_0x4caaa2['avatar']&&_0x376f21['push']('ck-user__avatar'),_0x4d1768){const _0x4ecec3=new _0x1bba23();_0x4ecec3['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x4ecec3['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':_0x4d1768},'children':[_0x4ecec3]};}const _0x1943e8=[{'tag':'div','attributes':{'class':_0x376f21,'style':{'background-image':_0x4caaa2['avatar']?'url(\x27'+_0x4caaa2['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x4caaa2['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x4caaa2['name']},'children':[{'text':_0x4caaa2['initials']}]}];this['notificationView']&&_0x1943e8['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x5b4f61,'data-user-id':_0x4caaa2['id']},'children':_0x1943e8});}}class J extends _0x3f14cc{['id'];constructor(_0x1bc621,_0x5f2e89){super(_0x1bc621),this['id']='ck-aria-description-'+_0x144b28(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x5f2e89}]});}}class P extends _0x3dd98a{['render'](){super['render'](),V(this);}}class Y extends _0x56e8a0{['render'](){super['render'](),V(this);}}function V(_0x4a360e){_0x4a360e['listenTo'](_0x4a360e['element'],'mousedown',(_0x45c832,_0xf535ce)=>{_0xf535ce['stopPropagation'](),_0xf535ce['preventDefault']();}),_0x4a360e['listenTo'](_0x4a360e['element'],'mouseup',()=>{_0x4a360e['element']['focus']();});}function E(_0x3bc78f={}){if(void 0x0!==_0x3bc78f['dateTimeFormat']&&'function'!=typeof _0x3bc78f['dateTimeFormat'])throw new _0x1b6634('invalid-date-time-format');return _0x284732=>{const _0x37199b='string'==typeof _0x284732?_0x535d33(_0x284732):_0x284732,_0x29a982=new Date(),_0x35830f=_0x1f355d(_0x29a982,_0x37199b);return _0x3bc78f['dateTimeFormat']?_0x3bc78f['dateTimeFormat'](_0x37199b):_0xbf279b(_0x37199b,0x0===_0x35830f?'\x27Today\x27\x20hh:mma':0x1===_0x35830f?'\x27Yesterday\x27\x20hh:mma':_0x35830f<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x13a2f2,_0x4f6928){const _0x18c28a=_0x13a2f2['mapper']['markerNameToElements'](_0x4f6928['name']);if(!_0x18c28a)return null;const _0x146ea3=_0x405e79(_0x18c28a['values']());return _0x13a2f2['view']['domConverter']['mapViewToDom'](_0x146ea3)||null;}function R(_0x55d629,_0x22a860){if(0x0===_0x22a860['length'])return null;const _0x3940ed=[],_0x28c3bd=_0x55d629['view']['domConverter'];for(const _0x26584e of _0x22a860){const _0x11d530=_0x55d629['mapper']['markerNameToElements'](_0x26584e['name']);if(!_0x11d530)continue;const _0x55564f=Array['from'](_0x11d530)['map'](_0x4a016d=>_0x28c3bd['mapViewToDom'](_0x4a016d))['filter'](_0xadf234=>!!_0xadf234);_0x3940ed['push'](..._0x55564f);}if(0x0===_0x3940ed['length'])return null;const _0x3f896e=[];for(const _0x370b8c of _0x3940ed){const _0x215e8d=_0x370b8c['getClientRects']()['item'](0x0);_0x215e8d&&_0x3f896e['push']({'x':_0x215e8d['x'],'y':_0x215e8d['y'],'domElement':_0x370b8c});}return 0x0===_0x3f896e['length']?null:(_0x3f896e['sort']((_0x281047,_0x11d4ae)=>_0x281047['y']-_0x11d4ae['y']||_0x281047['x']-_0x11d4ae['x']),_0x3f896e['map'](_0x4a41dc=>_0x4a41dc['domElement']));}function Z(_0x50a4f7,{limit:_0x1ceab7,suffix:_0x37ba97='...'}){const _0x1ef41b=[];let _0x3debd6=0x0;const _0x12b03a=_0x50a4f7['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x5be1df=0x0;_0x5be1df<_0x12b03a['length'];_0x5be1df++){let _0x66eaf5=_0x12b03a[_0x5be1df];const _0x2bcbdd=$(_0x66eaf5);if(_0x66eaf5['startsWith']('<')){if(_0x3debd6>=_0x1ceab7){const _0x14df76=_0x66eaf5['match'](/[a-zA-Z]+/);if(!_0x14df76){_0x12b03a[_0x5be1df]='';continue;}const _0x1663c4=_0x14df76[0x0];_0x66eaf5['startsWith']('</')?(_0x1ef41b['length']&&(_0x66eaf5=''),_0x1ef41b['pop']()):(_0x1ef41b['push'](_0x1663c4),_0x66eaf5='');}}else{if(_0x3debd6>=_0x1ceab7)_0x66eaf5='';else{if(_0x3debd6+_0x2bcbdd['length']>=_0x1ceab7){let _0x24fbb6=_0x1ceab7-_0x3debd6;if('\x20'===_0x2bcbdd[_0x24fbb6-0x1])_0x24fbb6--;else{const _0x9c53dc=_0x2bcbdd['slice'](_0x24fbb6)['indexOf']('\x20');-0x1!==_0x9c53dc?_0x24fbb6+=_0x9c53dc:_0x24fbb6=_0x66eaf5['length'];}_0x66eaf5=_0x2bcbdd['slice'](0x0,_0x24fbb6)['join']('')+_0x37ba97,_0x3debd6=_0x1ceab7;}else _0x3debd6+=_0x2bcbdd['length'];}}_0x12b03a[_0x5be1df]=_0x66eaf5;}return _0x12b03a['join']('\x0a')['replace'](/\n/g,'');}function $(_0x3ab407){const _0x32694b=[];for(let _0x550bd7=0x0;_0x550bd7<_0x3ab407['length'];_0x550bd7++){const _0x55167=_0x3ab407['substring'](_0x550bd7)['match'](/^&[a-z0-9#]+;/);if(_0x55167){const _0x4d2f27=_0x55167[0x0];_0x32694b['push'](_0x4d2f27),_0x550bd7+=_0x4d2f27['length']-0x1;}else _0x32694b['push'](_0x3ab407[_0x550bd7]);}return _0x32694b;}class h extends _0x3f14cc{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x2e3757){super(_0x2e3757);const _0x2c2e9b=this['bindTemplate'];this['set']('message',r(_0x2e3757,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x2e3757,r(_0x2e3757,'Yes'),_0x21bf81['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x2e3757,r(_0x2e3757,'No'),_0x21bf81['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x2f72f4(),this['keystrokes']=new _0x5a8b28(),this['focusCycler']=new _0x5a5b53({'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':_0x2c2e9b['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'](_0x1c6ac1,_0x123668,_0x197090,_0x1fa89c){const _0x369a12=new _0x3dd98a(_0x1c6ac1);return _0x369a12['label']=_0x123668,_0x369a12['icon']=_0x197090,_0x369a12['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x1fa89c}}),_0x369a12['on']('execute',()=>this['fire'](_0x1fa89c)),_0x369a12;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x5bbde7=>{this['keystrokes']['listenTo'](_0x5bbde7['element']),this['focusTracker']['add'](_0x5bbde7['element']);}),this['keystrokes']['set']('esc',(_0x12517d,_0x3b65c3)=>{this['fire']('cancel'),_0x3b65c3();});}}function m(_0x4d3756){return class extends _0x4d3756{['showConfirm'](_0x2aa40d,_0x8da4e){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x2aa40d,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x8da4e['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x4d9f33=>this['confirmView']['on']('submit',_0x4d9f33));}['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(_0x2e07be){let _0x4450ec=0x0,_0x29de64=0x0;for(const _0x1fd2bb of q(_0x2e07be))_0x4450ec=(_0x4450ec<<0x5)-_0x4450ec+_0x1fd2bb,_0x4450ec|=0x0,[_0x4450ec,_0x29de64]=[_0x29de64,_0x4450ec];return z(_0x4450ec)+z(_0x29de64);}function*O(_0x56c2b3){null==_0x56c2b3||null==_0x56c2b3?yield 0x12b9b0a1:0x0===_0x56c2b3||!0x1===_0x56c2b3?yield 0x0:0x1===_0x56c2b3||0x1==_0x56c2b3?yield 0x1:Array['isArray'](_0x56c2b3)?yield*function*(_0x1e8dd3){for(const _0x513b3a of _0x1e8dd3)yield*O(_0x513b3a);}(_0x56c2b3):'object'==typeof _0x56c2b3?yield*q(_0x56c2b3):'string'==typeof _0x56c2b3?yield*v(_0x56c2b3):'number'==typeof _0x56c2b3&&(yield _0x56c2b3);}function*q(_0x1e677c){if(yield w('{'),_0x1e677c){const _0x5aa8c6=Object['keys'](_0x1e677c)['sort']();for(const _0x5a151b of _0x5aa8c6){yield*v(_0x5a151b),yield w(':');const _0x129147=_0x1e677c[_0x5a151b];yield*O(_0x129147);}}yield w('}');}function*v(_0x332288){yield w('\x22');for(const _0x6c06a of _0x332288)yield w(_0x6c06a);yield w('\x22');}function w(_0x4b1703){return _0x4b1703['charCodeAt'](0x0);}function z(_0x1fe71a){return(_0x1fe71a*=Math['sign'](_0x1fe71a))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x1af025,_0x36e927,_0x17d43b,_0x3ced11=[]){const _0x2eb76c='string'==typeof _0x1af025?_0x17d43b['get'](_0x1af025)['constructor']:_0x1af025['prototype']['constructor'];if(_0x36e927['has'](_0x2eb76c))return _0x36e927['get'](_0x2eb76c);_0x36e927['set'](_0x2eb76c,!0x0);const _0x4d3d0b=[...D,..._0x3ced11]['map'](_0x45f5af=>{if(_0x17d43b['has'](_0x45f5af))return _0x17d43b['get'](_0x45f5af)['constructor'];})['filter'](_0x55b67b=>_0x55b67b);if(_0x2eb76c&&_0x4d3d0b['includes'](_0x2eb76c))return _0x36e927['set'](_0x2eb76c,!0x1),!0x1;if(!_0x2eb76c['requires'])return _0x36e927['set'](_0x2eb76c,!0x0),!0x0;const _0xf2ae49=_0x2eb76c['requires']['every'](_0x1298b6=>S(_0x1298b6,_0x36e927,_0x17d43b,_0x3ced11));return _0x36e927['set'](_0x2eb76c,_0xf2ae49),_0xf2ae49;}function C(_0x4a0276,_0x3ea4b3){const _0x52c106={};for(const _0xd61df of _0x4a0276['config']['names']())W['includes'](_0xd61df)||(_0x52c106[_0xd61df]=_0x4a0276['config']['get'](_0xd61df));const _0x59b6b3=_0x52c106['plugins']||[],_0x29901b=_0x4a0276['constructor']['builtinPlugins']||[],_0x423c41=_0x59b6b3['length']?_0x59b6b3:_0x29901b,_0x12d040=_0x52c106['extraPlugins']||[];delete _0x52c106['extraPlugins'];const _0x1a8779=_0x52c106['removePlugins']||[];delete _0x52c106['removePlugins'];const _0x489cba=_0x4a0276['_context']['config']['get']('plugins')||[],_0x25c33f=_0x423c41['concat'](_0x12d040)['concat'](_0x489cba)['map'](_0x17de80=>'string'==typeof _0x17de80?_0x29901b['find'](_0x55c94e=>_0x55c94e['pluginName']==_0x17de80):_0x17de80)['filter'](_0x712be1=>!_0x1a8779['includes'](_0x712be1)&&!_0x1a8779['includes'](_0x712be1['pluginName'])),_0x456ea7=Array['from'](new Set(_0x25c33f)),_0xaff9b2=new Map();return _0x52c106['plugins']=_0x456ea7['filter'](_0x38a675=>S(_0x38a675,_0xaff9b2,_0x4a0276['plugins'],_0x3ea4b3)),_0x52c106;}function B(_0x21db13,_0x8086e6){const _0x8cc17d=[];_0x21db13['document']['selection']['on']('change:range',()=>{const _0x518071=function(_0xc6075,_0x4b3478){const _0x28c9aa=[];for(const _0x2c7a20 of _0xc6075['markers']){const _0x31efa3=_0x2c7a20['getRange']();(_0x31efa3['containsPosition'](_0x4b3478)||_0x31efa3['start']['isEqual'](_0x4b3478)||_0x31efa3['end']['isEqual'](_0x4b3478))&&_0x28c9aa['push'](_0x2c7a20);}return _0x28c9aa;}(_0x21db13,_0x21db13['document']['selection']['focus']),_0x20670c=[],_0x5630ba=[],_0x4992cd=[];for(const _0x2704bd of _0x8cc17d)_0x518071['includes'](_0x2704bd)||_0x20670c['push'](_0x2704bd);for(const _0x2ea6d0 of _0x518071)_0x8cc17d['includes'](_0x2ea6d0)||_0x5630ba['push'](_0x2ea6d0),_0x4992cd['push'](_0x2ea6d0);(_0x20670c['length']||_0x5630ba['length'])&&_0x8086e6({'left':_0x20670c,'entered':_0x5630ba}),_0x8cc17d['length']=0x0,_0x8cc17d['push'](..._0x4992cd);});}const Q='Ctrl+Shift+E';function T(_0x46b11b,_0x325620){const _0x3511e2=_0x46b11b['element'];_0x46b11b['keystrokes']['listenTo'](_0x3511e2);for(const _0x5c2f6a of _0x325620)K(_0x46b11b,_0x5c2f6a);_0x325620['on']('change',(_0x1e9a0f,_0x2a8f77)=>{for(const _0x409397 of _0x2a8f77['removed'])_(_0x46b11b,_0x409397);for(const _0x30e899 of Array['from'](_0x2a8f77['added'])['reverse']())K(_0x46b11b,_0x30e899);}),_0x46b11b['keystrokes']['set']('enter',(_0x4a2c54,_0x59c256)=>{_0x3511e2===_0x4a2c54['target']&&(_0x46b11b['focusCycler']['focusFirst'](),_0x59c256());},{'filter':_0x519e62=>_0x519e62['target']===_0x3511e2}),_0x46b11b['keystrokes']['set']('esc',(_0x245e97,_0x2892d3)=>{_0x3511e2!==_0x245e97['target']?_0x46b11b['focus']():_0x46b11b['fire']('escape'),_0x2892d3();}),_0x46b11b['keystrokes']['set']('arrowdown',(_0x3ce058,_0x4f5633)=>{_0x3511e2===_0x3ce058['target']&&(_0x46b11b['fire']('arrowdown'),_0x4f5633());}),_0x46b11b['keystrokes']['set']('arrowup',(_0x263eb9,_0x2c7d7b)=>{_0x3511e2===_0x263eb9['target']&&(_0x46b11b['fire']('arrowup'),_0x2c7d7b());});}function K(_0xbc9f84,_0x1f1599){_0x1f1599['isRendered']&&(_0xbc9f84['focusTracker']['add'](_0x1f1599['element']),_0xbc9f84['keystrokes']['listenTo'](_0x1f1599['element']),_0x1e66ba(_0x1f1599)&&function(_0x1892ab,_0x170c43){const _0x2f1eeb=_0x1892ab['actions'],_0x2a8820=_0x170c43['actions'];for(const _0x5f3e48 of Object['keys'](_0x2f1eeb))if(_0x5f3e48 in _0x2a8820&&_0x2f1eeb[_0x5f3e48]!==_0x2a8820[_0x5f3e48])return!0x1;return!0x0;}(_0xbc9f84['focusCycler'],_0x1f1599['focusCycler'])&&_0xbc9f84['focusCycler']['chain'](_0x1f1599['focusCycler']));}function _(_0x67334f,_0x106b8c){_0x67334f['focusTracker']['remove'](_0x106b8c['element']),_0x67334f['keystrokes']['stopListening'](_0x106b8c['element']),_0x1e66ba(_0x106b8c)&&_0x67334f['focusCycler']['unchain'](_0x106b8c['focusCycler']);}export{J as AriaDescriptionView,m as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,P as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,H as UserView,l 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": "43.1.0-alpha.
|
3
|
+
"version": "43.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,11 +32,11 @@
|
|
32
32
|
"type": "module",
|
33
33
|
"main": "src/index.js",
|
34
34
|
"dependencies": {
|
35
|
-
"@ckeditor/ckeditor5-core": "43.1.0-alpha.
|
36
|
-
"@ckeditor/ckeditor5-theme-lark": "43.1.0-alpha.
|
37
|
-
"@ckeditor/ckeditor5-ui": "43.1.0-alpha.
|
38
|
-
"@ckeditor/ckeditor5-utils": "43.1.0-alpha.
|
39
|
-
"ckeditor5": "43.1.0-alpha.
|
35
|
+
"@ckeditor/ckeditor5-core": "43.1.0-alpha.5",
|
36
|
+
"@ckeditor/ckeditor5-theme-lark": "43.1.0-alpha.5",
|
37
|
+
"@ckeditor/ckeditor5-ui": "43.1.0-alpha.5",
|
38
|
+
"@ckeditor/ckeditor5-utils": "43.1.0-alpha.5",
|
39
|
+
"ckeditor5": "43.1.0-alpha.5",
|
40
40
|
"date-fns": "2.30.0"
|
41
41
|
},
|
42
42
|
"files": [
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(function(
|
23
|
+
(function(_0x205078,_0x568984){var _0x195122=_0x3987,_0x220de2=_0x205078();while(!![]){try{var _0x54fd15=parseInt(_0x195122(0x1c1))/0x1*(-parseInt(_0x195122(0x1c0))/0x2)+parseInt(_0x195122(0x1b7))/0x3+parseInt(_0x195122(0x1bc))/0x4+parseInt(_0x195122(0x1bb))/0x5*(parseInt(_0x195122(0x1ba))/0x6)+-parseInt(_0x195122(0x1c4))/0x7+-parseInt(_0x195122(0x1b9))/0x8*(parseInt(_0x195122(0x1be))/0x9)+parseInt(_0x195122(0x1bd))/0xa;if(_0x54fd15===_0x568984)break;else _0x220de2['push'](_0x220de2['shift']());}catch(_0x1f6c6d){_0x220de2['push'](_0x220de2['shift']());}}}(_0x324b,0xa2546));function _0x324b(){var _0x2e3b39=['ck-aria-description-','span','3987718ZBPkXh','1724028xTlYVc','setTemplate','4256024yxNQxs','186zJPOEV','24665sGLXUO','4451392RPVNZO','10775180lkuVEA','18GbydWL','ck-aria-description','1238766OEPrIH','1BYOmIi'];_0x324b=function(){return _0x2e3b39;};return _0x324b();}import{uid as _0x734f63}from'ckeditor5/src/utils.js';import{View as _0x5fbaa3}from'ckeditor5/src/ui.js';function _0x3987(_0x147a17,_0x42376c){var _0x324bf1=_0x324b();return _0x3987=function(_0x3987ef,_0x71d1af){_0x3987ef=_0x3987ef-0x1b7;var _0x191a35=_0x324bf1[_0x3987ef];return _0x191a35;},_0x3987(_0x147a17,_0x42376c);}export default class J extends _0x5fbaa3{constructor(_0x49108a,_0x54a1c3){var _0x3022e1=_0x3987;super(_0x49108a),this['id']=_0x3022e1(0x1c2)+_0x734f63(),this[_0x3022e1(0x1b8)]({'tag':_0x3022e1(0x1c3),'attributes':{'class':['ck',_0x3022e1(0x1bf)],'id':this['id']},'children':[{'text':_0x54a1c3}]});}}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(function(
|
23
|
+
(function(_0x140b20,_0x41c1f3){const _0x1bc83c=_0x1ab7,_0x3d8974=_0x140b20();while(!![]){try{const _0x5434fa=parseInt(_0x1bc83c(0xb3))/0x1*(-parseInt(_0x1bc83c(0xbb))/0x2)+-parseInt(_0x1bc83c(0xba))/0x3*(parseInt(_0x1bc83c(0xc1))/0x4)+parseInt(_0x1bc83c(0xb9))/0x5*(-parseInt(_0x1bc83c(0xbd))/0x6)+-parseInt(_0x1bc83c(0xbe))/0x7*(-parseInt(_0x1bc83c(0xcb))/0x8)+parseInt(_0x1bc83c(0xc7))/0x9+-parseInt(_0x1bc83c(0xc5))/0xa+parseInt(_0x1bc83c(0xc9))/0xb;if(_0x5434fa===_0x41c1f3)break;else _0x3d8974['push'](_0x3d8974['shift']());}catch(_0x141f93){_0x3d8974['push'](_0x3d8974['shift']());}}}(_0x190d,0x8f225));import{View as _0x59888f,IconView as _0x61aa10}from'ckeditor5/src/ui.js';import _0x25c173 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class H extends _0x59888f{constructor(_0x5807b6,_0x1add3c,_0xdd34ea){const _0x4cbe46=_0x1ab7;super(_0x5807b6),this[_0x4cbe46(0xca)]=_0x1add3c[_0x4cbe46(0xca)],this[_0x4cbe46(0xcd)]=null;const _0x5a1098=['ck',_0x4cbe46(0xbf)],_0x57446c=['ck',_0x4cbe46(0xc0)];if(_0x1add3c[_0x4cbe46(0xb0)]&&_0x57446c[_0x4cbe46(0xbc)](_0x4cbe46(0xb1)),!_0x1add3c[_0x4cbe46(0xb0)]&&_0x1add3c[_0x4cbe46(0xc8)]&&_0x5a1098[_0x4cbe46(0xbc)](_0x4cbe46(0xb6)),_0x1add3c[_0x4cbe46(0xc6)]&&_0x57446c[_0x4cbe46(0xbc)](_0x4cbe46(0xc2)),_0xdd34ea){const _0x415638=new _0x61aa10();_0x415638[_0x4cbe46(0xb4)]({'attributes':{'class':[_0x4cbe46(0xb5)]}}),_0x415638[_0x4cbe46(0xc3)]=_0x25c173,this[_0x4cbe46(0xcd)]={'tag':_0x4cbe46(0xaf),'attributes':{'class':['ck',_0x4cbe46(0xb8)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0xdd34ea},'children':[_0x415638]};}const _0x2acc0b=[{'tag':_0x4cbe46(0xaf),'attributes':{'class':_0x57446c,'style':{'background-image':_0x1add3c[_0x4cbe46(0xc6)]?_0x4cbe46(0xae)+_0x1add3c[_0x4cbe46(0xc6)]+'\x27)':''}}},{'tag':_0x4cbe46(0xaf),'attributes':{'class':_0x1add3c[_0x4cbe46(0xc6)]?_0x4cbe46(0xc4):_0x4cbe46(0xb2),'aria-label':_0x1add3c[_0x4cbe46(0xca)]},'children':[{'text':_0x1add3c[_0x4cbe46(0xcc)]}]}];this[_0x4cbe46(0xcd)]&&_0x2acc0b[_0x4cbe46(0xbc)](this[_0x4cbe46(0xcd)]),this[_0x4cbe46(0xb7)]({'tag':_0x4cbe46(0xaf),'attributes':{'class':_0x5a1098,'data-user-id':_0x1add3c['id']},'children':_0x2acc0b});}}function _0x1ab7(_0x1f3136,_0x276d6c){const _0x190d17=_0x190d();return _0x1ab7=function(_0x1ab7f6,_0x5938ad){_0x1ab7f6=_0x1ab7f6-0xae;let _0x23eb66=_0x190d17[_0x1ab7f6];return _0x23eb66;},_0x1ab7(_0x1f3136,_0x276d6c);}function _0x190d(){const _0x5efc32=['990635rEQOsT','663MkzkYH','58QPvIkY','push','12rfSyIq','7qvWuxJ','ck-user','ck-user__img','16412kgJFPl','ck-user__avatar','content','ck\x20ck-user__name\x20ck-user__name--hidden','8263970yZycbr','avatar','4986954lPSblV','isMe','23641717hFHsdR','name','6155528XSzocb','initials','notificationView','url(\x27','div','isAnonymous','ck-user__anonymous','ck\x20ck-user__name','26107qxbGdg','extendTemplate','ck-user__icon','ck-user_me','setTemplate','ck-user__notification'];_0x190d=function(){return _0x5efc32;};return _0x190d();}
|