@ckeditor/ckeditor5-collaboration-core 44.0.0-alpha.3 → 44.0.0-alpha.4
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 _0x215eed,Editor as _0x36fecc,icons as _0x4686d0}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x11be03,Collection as _0x145406,uid as _0x2280f7,first as _0x1fe018,FocusTracker as _0x3365af,KeystrokeHandler as _0x3cd631}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x19dba4,IconView as _0x4d879e,ButtonView as _0x411509,DropdownButtonView as _0x33ef16,FocusCycler as _0x9c8120,isViewWithFocusCycler as _0x15acdf}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x19c286 from'date-fns/format/index.js';import _0x313d12 from'date-fns/parseISO/index.js';import _0x16775e from'date-fns/differenceInCalendarDays/index.js';class n extends _0x215eed{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x367d99,_0x3570c2){let _0x42153a;if(_0x3570c2||(_0x3570c2=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x3570c2?_0x42153a=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x42153a=this['context']['editors']['find'](_0x3e3464=>_0x3e3464['config']['get']('collaboration.channelId')==_0x3570c2)),!_0x42153a)throw new _0x11be03('permissions-set-permissions-invalid-channel-id',null);const _0x488988=_0x42153a['plugins'],_0xaa9482=_0x488988['has']('CommentsRepository')?_0x488988['get']('CommentsRepository'):void 0x0,_0x312ab7=_0x488988['has']('CommentsOnly')&&_0x488988['get']('CommentsOnly'),_0x5b255b=_0x367d99['includes']('document:write'),_0x25f7d1=_0x367d99['includes']('comment:modify_all'),_0x569d22=_0x367d99['includes']('comment:admin'),_0x485942=_0x367d99['includes']('comment:write'),_0x26ddd9=_0x485942||_0x569d22,_0x5a8ffc=_0x26ddd9||_0x25f7d1,_0x3d3f5d=_0x5b255b||_0x26ddd9;(_0x312ab7&&(_0x312ab7['isEnabled']=!_0x5b255b&&_0x5a8ffc),_0x42153a instanceof _0x36fecc)&&(!(_0x5b255b||_0x5a8ffc&&_0xaa9482)?_0x42153a['enableReadOnlyMode']('no-permissions'):_0x42153a['disableReadOnlyMode']('no-permissions'));if(_0xaa9482){_0xaa9482['setPermissions']({'admin':_0x569d22,'modifyAll':_0x25f7d1,'write':_0x485942,'resolve':_0x3d3f5d},_0x3570c2);const _0x130e7b=_0x42153a instanceof _0x36fecc&&_0x42153a['commands']['get']('addCommentThread');_0x130e7b&&(_0x26ddd9?_0x130e7b['clearForceDisabled']('noPermissions'):_0x130e7b['forceDisabled']('noPermissions'));}}}function o(_0x3f63eb,_0xa442b8){const t=_0x3f63eb['t'];switch(_0xa442b8){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class u extends _0x215eed{['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(_0x5a2931){super(_0x5a2931),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x145406(),this['_locale']=_0x5a2931['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:_0x44142f,name:_0x5af96c,..._0x315af2}){if(!_0x44142f||'string'!=typeof _0x44142f)throw new _0x11be03('users-add-invalid-id');if(this['users']['has'](_0x44142f))throw new _0x11be03('users-add-duplicated-id',null,{'id':_0x44142f});const _0x171365={..._0x315af2,'id':_0x44142f,'name':h(this['_locale'],_0x5af96c),'color':this['_getNextColor']()};_0x171365['name']=h(this['_locale'],_0x171365['name']);const _0x253f76=new P(_0x171365);return this['users']['add'](_0x253f76),_0x253f76;}['getUser'](_0x79481c){return this['users']['get'](_0x79481c);}['useAnonymousUser'](){const _0x26458e=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x26458e);}['defineMe'](_0x3f6908){if(this['_myId'])throw new _0x11be03('users-me-already-defined',null);const _0x5761c5=this['getUser'](_0x3f6908);if(!_0x5761c5)throw new _0x11be03('users-me-missing-user',null);this['_myId']=_0x3f6908,_0x5761c5['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x4460f9=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x4460f9&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x2e6cb2=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x2e6cb2,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x4e2bbf){this['id']=_0x4e2bbf['id'],this['color']=_0x4e2bbf['color'],this['name']=_0x4e2bbf['name'],this['avatar']=_0x4e2bbf['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x57d680=this['name']['split']('\x20');return 0x1===_0x57d680['length']?this['_getInitial'](_0x57d680[0x0]):this['_getInitial'](_0x57d680[0x0])+this['_getInitial'](_0x57d680[_0x57d680['length']-0x1]);}['_getInitial'](_0x1a118e){return _0x1a118e['charAt'](0x0)['toUpperCase']();}}function h(_0x4649d0,_0x15687e=''){return''==(_0x15687e=_0x15687e['trim']())?o(_0x4649d0,'Anonymous'):_0x15687e;}class c{['_id'];constructor(_0x4b9dca){this['_id']=_0x4b9dca;}['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 _0x19dba4{['name'];['notificationView'];constructor(_0x1fd611,_0x2495f5,_0x522ff8){super(_0x1fd611),this['name']=_0x2495f5['name'],this['notificationView']=null;const _0x5bd7b3=['ck','ck-user'],_0x431656=['ck','ck-user__img'];if(_0x2495f5['isAnonymous']&&_0x431656['push']('ck-user__anonymous'),!_0x2495f5['isAnonymous']&&_0x2495f5['isMe']&&_0x5bd7b3['push']('ck-user_me'),_0x2495f5['avatar']&&_0x431656['push']('ck-user__avatar'),_0x522ff8){const _0x58f85d=new _0x4d879e();_0x58f85d['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x58f85d['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':_0x522ff8},'children':[_0x58f85d]};}const _0x2269ae=[{'tag':'div','attributes':{'class':_0x431656,'style':{'background-image':_0x2495f5['avatar']?'url(\x27'+_0x2495f5['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x2495f5['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x2495f5['name']},'children':[{'text':_0x2495f5['initials']}]}];this['notificationView']&&_0x2269ae['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x5bd7b3,'data-user-id':_0x2495f5['id']},'children':_0x2269ae});}}class G extends _0x19dba4{['id'];constructor(_0x9c46b5,_0x18f69f){super(_0x9c46b5),this['id']='ck-aria-description-'+_0x2280f7(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x18f69f}]});}}class U extends _0x411509{['render'](){super['render'](),V(this);}}class Y extends _0x33ef16{['render'](){super['render'](),V(this);}}function V(_0x3c75e4){_0x3c75e4['listenTo'](_0x3c75e4['element'],'mousedown',(_0x20203c,_0x523186)=>{_0x523186['stopPropagation'](),_0x523186['preventDefault']();}),_0x3c75e4['listenTo'](_0x3c75e4['element'],'mouseup',()=>{_0x3c75e4['element']['focus']();});}function E(_0x41d5d7={}){if(void 0x0!==_0x41d5d7['dateTimeFormat']&&'function'!=typeof _0x41d5d7['dateTimeFormat'])throw new _0x11be03('invalid-date-time-format');return _0x5c1d04=>{const _0x99cc76='string'==typeof _0x5c1d04?_0x313d12(_0x5c1d04):_0x5c1d04,_0x39713f=new Date(),_0x5da1e0=_0x16775e(_0x39713f,_0x99cc76);return _0x41d5d7['dateTimeFormat']?_0x41d5d7['dateTimeFormat'](_0x99cc76):_0x19c286(_0x99cc76,0x0===_0x5da1e0?'\x27Today\x27\x20hh:mma':0x1===_0x5da1e0?'\x27Yesterday\x27\x20hh:mma':_0x5da1e0<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x3af880,_0x4fcc92){const _0x27f8b0=_0x3af880['mapper']['markerNameToElements'](_0x4fcc92['name']);if(!_0x27f8b0)return null;const _0x3e5871=_0x1fe018(_0x27f8b0['values']());return _0x3af880['view']['domConverter']['mapViewToDom'](_0x3e5871)||null;}function R(_0x49bcd3,_0x4f3f1b){if(0x0===_0x4f3f1b['length'])return null;const _0x484218=[],_0x66853a=_0x49bcd3['view']['domConverter'];for(const _0x357029 of _0x4f3f1b){const _0x1ecce1=_0x49bcd3['mapper']['markerNameToElements'](_0x357029['name']);if(!_0x1ecce1)continue;const _0x3ffa69=Array['from'](_0x1ecce1)['map'](_0x54ad2c=>_0x66853a['mapViewToDom'](_0x54ad2c))['filter'](_0x47f9fe=>!!_0x47f9fe);_0x484218['push'](..._0x3ffa69);}if(0x0===_0x484218['length'])return null;const _0x224390=[];for(const _0x48b055 of _0x484218){const _0x4186f9=_0x48b055['getClientRects']()['item'](0x0);_0x4186f9&&_0x224390['push']({'x':_0x4186f9['x'],'y':_0x4186f9['y'],'domElement':_0x48b055});}return 0x0===_0x224390['length']?null:(_0x224390['sort']((_0x582259,_0x4e43a5)=>_0x582259['y']-_0x4e43a5['y']||_0x582259['x']-_0x4e43a5['x']),_0x224390['map'](_0x41977c=>_0x41977c['domElement']));}function Z(_0x36955b,{limit:_0x484145,suffix:_0x7a9a5='...'}){const _0x4530a1=[];let _0x586fe7=0x0;const _0x39f40c=_0x36955b['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x32c9cd=0x0;_0x32c9cd<_0x39f40c['length'];_0x32c9cd++){let _0x4f282f=_0x39f40c[_0x32c9cd];const _0x37f3b1=$(_0x4f282f);if(_0x4f282f['startsWith']('<')){if(_0x586fe7>=_0x484145){const _0x18975d=_0x4f282f['match'](/[a-zA-Z]+/);if(!_0x18975d){_0x39f40c[_0x32c9cd]='';continue;}const _0x4b9b3c=_0x18975d[0x0];_0x4f282f['startsWith']('</')?(_0x4530a1['length']&&(_0x4f282f=''),_0x4530a1['pop']()):(_0x4530a1['push'](_0x4b9b3c),_0x4f282f='');}}else{if(_0x586fe7>=_0x484145)_0x4f282f='';else{if(_0x586fe7+_0x37f3b1['length']>=_0x484145){let _0x56d516=_0x484145-_0x586fe7;if('\x20'===_0x37f3b1[_0x56d516-0x1])_0x56d516--;else{const _0x51588b=_0x37f3b1['slice'](_0x56d516)['indexOf']('\x20');-0x1!==_0x51588b?_0x56d516+=_0x51588b:_0x56d516=_0x4f282f['length'];}_0x4f282f=_0x37f3b1['slice'](0x0,_0x56d516)['join']('')+_0x7a9a5,_0x586fe7=_0x484145;}else _0x586fe7+=_0x37f3b1['length'];}}_0x39f40c[_0x32c9cd]=_0x4f282f;}return _0x39f40c['join']('\x0a')['replace'](/\n/g,'');}function $(_0x276d23){const _0x8edf5a=[];for(let _0x47ac44=0x0;_0x47ac44<_0x276d23['length'];_0x47ac44++){const _0x427d11=_0x276d23['substring'](_0x47ac44)['match'](/^&[a-z0-9#]+;/);if(_0x427d11){const _0x3e03f5=_0x427d11[0x0];_0x8edf5a['push'](_0x3e03f5),_0x47ac44+=_0x3e03f5['length']-0x1;}else _0x8edf5a['push'](_0x276d23[_0x47ac44]);}return _0x8edf5a;}class m extends _0x19dba4{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0xf9b5e6){super(_0xf9b5e6);const _0x4cfa86=this['bindTemplate'];this['set']('message',o(_0xf9b5e6,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0xf9b5e6,o(_0xf9b5e6,'Yes'),_0x4686d0['check'],'submit'),this['cancelView']=this['_createButtonView'](_0xf9b5e6,o(_0xf9b5e6,'No'),_0x4686d0['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x3365af(),this['keystrokes']=new _0x3cd631(),this['focusCycler']=new _0x9c8120({'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':_0x4cfa86['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'](_0x5aad8,_0x36f62b,_0x317a7c,_0x53f446){const _0x5b51da=new _0x411509(_0x5aad8);return _0x5b51da['label']=_0x36f62b,_0x5b51da['icon']=_0x317a7c,_0x5b51da['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x53f446}}),_0x5b51da['on']('execute',()=>this['fire'](_0x53f446)),_0x5b51da;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x1950ee=>{this['keystrokes']['listenTo'](_0x1950ee['element']),this['focusTracker']['add'](_0x1950ee['element']);}),this['keystrokes']['set']('esc',(_0x5d251e,_0x4c3dc5)=>{this['fire']('cancel'),_0x4c3dc5();});}}function f(_0x9819aa){return class extends _0x9819aa{['showConfirm'](_0xaf6a14,_0xb9996f){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0xaf6a14,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0xb9996f['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x4abef2=>this['confirmView']['on']('submit',_0x4abef2));}['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(_0x4035ed){let _0x4021a9=0x0,_0x38f033=0x0;for(const _0x15c720 of q(_0x4035ed))_0x4021a9=(_0x4021a9<<0x5)-_0x4021a9+_0x15c720,_0x4021a9|=0x0,[_0x4021a9,_0x38f033]=[_0x38f033,_0x4021a9];return z(_0x4021a9)+z(_0x38f033);}function*O(_0x3a61d3){null==_0x3a61d3||null==_0x3a61d3?yield 0x12b9b0a1:0x0===_0x3a61d3||!0x1===_0x3a61d3?yield 0x0:0x1===_0x3a61d3||0x1==_0x3a61d3?yield 0x1:Array['isArray'](_0x3a61d3)?yield*function*(_0x7a83b9){for(const _0x403991 of _0x7a83b9)yield*O(_0x403991);}(_0x3a61d3):'object'==typeof _0x3a61d3?yield*q(_0x3a61d3):'string'==typeof _0x3a61d3?yield*v(_0x3a61d3):'number'==typeof _0x3a61d3&&(yield _0x3a61d3);}function*q(_0x5f0442){if(yield w('{'),_0x5f0442){const _0x5c2799=Object['keys'](_0x5f0442)['sort']();for(const _0x714e49 of _0x5c2799){yield*v(_0x714e49),yield w(':');const _0x43dd38=_0x5f0442[_0x714e49];yield*O(_0x43dd38);}}yield w('}');}function*v(_0x585824){yield w('\x22');for(const _0x1f0a1c of _0x585824)yield w(_0x1f0a1c);yield w('\x22');}function w(_0x165cbe){return _0x165cbe['charCodeAt'](0x0);}function z(_0x4f7d59){return(_0x4f7d59*=Math['sign'](_0x4f7d59))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x283df5,_0x5be68c,_0x5a9537,_0x853b4f=[]){const _0xdd597d='string'==typeof _0x283df5?_0x5a9537['get'](_0x283df5)['constructor']:_0x283df5['prototype']['constructor'];if(_0x5be68c['has'](_0xdd597d))return _0x5be68c['get'](_0xdd597d);_0x5be68c['set'](_0xdd597d,!0x0);const _0x17d6de=[...D,..._0x853b4f]['map'](_0x342cd9=>{if(_0x5a9537['has'](_0x342cd9))return _0x5a9537['get'](_0x342cd9)['constructor'];})['filter'](_0x1a2f6f=>_0x1a2f6f);if(_0xdd597d&&_0x17d6de['includes'](_0xdd597d))return _0x5be68c['set'](_0xdd597d,!0x1),!0x1;if(!_0xdd597d['requires'])return _0x5be68c['set'](_0xdd597d,!0x0),!0x0;const _0x4128dc=_0xdd597d['requires']['every'](_0x6cc0b9=>S(_0x6cc0b9,_0x5be68c,_0x5a9537,_0x853b4f));return _0x5be68c['set'](_0xdd597d,_0x4128dc),_0x4128dc;}function C(_0x3102e1,_0x198a08){const _0x2ab1f0={};for(const _0x557ea7 of _0x3102e1['config']['names']())W['includes'](_0x557ea7)||(_0x2ab1f0[_0x557ea7]=_0x3102e1['config']['get'](_0x557ea7));const _0x5d21f5=_0x2ab1f0['plugins']||[],_0x87aa6=_0x3102e1['constructor']['builtinPlugins']||[],_0x38023c=_0x5d21f5['length']?_0x5d21f5:_0x87aa6,_0x49f9f6=_0x2ab1f0['extraPlugins']||[];delete _0x2ab1f0['extraPlugins'];const _0x10a9d8=_0x2ab1f0['removePlugins']||[];delete _0x2ab1f0['removePlugins'];const _0x297373=_0x3102e1['_context']['config']['get']('plugins')||[],_0x988451=_0x38023c['concat'](_0x49f9f6)['concat'](_0x297373)['map'](_0x3c5b94=>'string'==typeof _0x3c5b94?_0x87aa6['find'](_0x26185b=>_0x26185b['pluginName']==_0x3c5b94):_0x3c5b94)['filter'](_0x406433=>!_0x10a9d8['includes'](_0x406433)&&!_0x10a9d8['includes'](_0x406433['pluginName'])),_0x3a2a0e=Array['from'](new Set(_0x988451)),_0x27a347=new Map();return _0x2ab1f0['plugins']=_0x3a2a0e['filter'](_0x569d10=>S(_0x569d10,_0x27a347,_0x3102e1['plugins'],_0x198a08)),_0x2ab1f0;}function B(_0x55ed23,_0x5139ad){const _0x503192=[];_0x55ed23['document']['selection']['on']('change:range',()=>{const _0x1a72f1=function(_0x502cc6,_0x1953d2){const _0x33cfe2=[];for(const _0x3c33d7 of _0x502cc6['markers']){const _0xa560f6=_0x3c33d7['getRange']();(_0xa560f6['containsPosition'](_0x1953d2)||_0xa560f6['start']['isEqual'](_0x1953d2)||_0xa560f6['end']['isEqual'](_0x1953d2))&&_0x33cfe2['push'](_0x3c33d7);}return _0x33cfe2;}(_0x55ed23,_0x55ed23['document']['selection']['focus']),_0x51f4da=[],_0x3b9d7c=[],_0x3419f7=[];for(const _0xeb2146 of _0x503192)_0x1a72f1['includes'](_0xeb2146)||_0x51f4da['push'](_0xeb2146);for(const _0x410413 of _0x1a72f1)_0x503192['includes'](_0x410413)||_0x3b9d7c['push'](_0x410413),_0x3419f7['push'](_0x410413);(_0x51f4da['length']||_0x3b9d7c['length'])&&_0x5139ad({'left':_0x51f4da,'entered':_0x3b9d7c}),_0x503192['length']=0x0,_0x503192['push'](..._0x3419f7);});}const Q='Ctrl+Shift+E';function T(_0x503b60,_0x4fe48b){const _0x2626a6=_0x503b60['element'];_0x503b60['keystrokes']['listenTo'](_0x2626a6);for(const _0x4c93b3 of _0x4fe48b)K(_0x503b60,_0x4c93b3);_0x4fe48b['on']('change',(_0x4eaef1,_0x3ad33f)=>{for(const _0x306520 of _0x3ad33f['removed'])_(_0x503b60,_0x306520);for(const _0x41253f of Array['from'](_0x3ad33f['added'])['reverse']())K(_0x503b60,_0x41253f);}),_0x503b60['keystrokes']['set']('enter',(_0x347c9b,_0x4dcd9f)=>{_0x2626a6===_0x347c9b['target']&&(_0x503b60['focusCycler']['focusFirst'](),_0x4dcd9f());},{'filter':_0x3fa487=>_0x3fa487['target']===_0x2626a6}),_0x503b60['keystrokes']['set']('esc',(_0x58fbf0,_0x228fc0)=>{_0x2626a6!==_0x58fbf0['target']?_0x503b60['focus']():_0x503b60['fire']('escape'),_0x228fc0();}),_0x503b60['keystrokes']['set']('arrowdown',(_0x37dc39,_0x39b0c0)=>{_0x2626a6===_0x37dc39['target']&&(_0x503b60['fire']('arrowdown'),_0x39b0c0());}),_0x503b60['keystrokes']['set']('arrowup',(_0x3144a0,_0x7b0a7d)=>{_0x2626a6===_0x3144a0['target']&&(_0x503b60['fire']('arrowup'),_0x7b0a7d());});}function K(_0x5ee5b4,_0x3aecc4){_0x3aecc4['isRendered']&&(_0x5ee5b4['focusTracker']['add'](_0x3aecc4['element']),_0x5ee5b4['keystrokes']['listenTo'](_0x3aecc4['element']),_0x15acdf(_0x3aecc4)&&function(_0x320ece,_0xfa7126){const _0x282455=_0x320ece['actions'],_0x4fc209=_0xfa7126['actions'];for(const _0x178352 of Object['keys'](_0x282455))if(_0x178352 in _0x4fc209&&_0x282455[_0x178352]!==_0x4fc209[_0x178352])return!0x1;return!0x0;}(_0x5ee5b4['focusCycler'],_0x3aecc4['focusCycler'])&&_0x5ee5b4['focusCycler']['chain'](_0x3aecc4['focusCycler']));}function _(_0x4c9a2c,_0x4700e8){_0x4c9a2c['focusTracker']['remove'](_0x4700e8['element']),_0x4c9a2c['keystrokes']['stopListening'](_0x4700e8['element']),_0x15acdf(_0x4700e8)&&_0x4c9a2c['focusCycler']['unchain'](_0x4700e8['focusCycler']);}export{G as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,J as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
|
23
|
+
import{ContextPlugin as _0x2c611c,Editor as _0x3d0282,icons as _0x557821}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x4b7825,Collection as _0x191e59,uid as _0xb5d356,first as _0x6298d1,FocusTracker as _0x5a1e96,KeystrokeHandler as _0x30c2da}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x425b54,IconView as _0x339dbb,ButtonView as _0x22bec8,DropdownButtonView as _0x117c2b,FocusCycler as _0x43a414,isViewWithFocusCycler as _0x4a347c}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x5ee2c9 from'date-fns/format/index.js';import _0x56b526 from'date-fns/parseISO/index.js';import _0x11fda2 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x2c611c{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x12f081,_0x36fc55){let _0x892dae;if(_0x36fc55||(_0x36fc55=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x36fc55?_0x892dae=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x892dae=this['context']['editors']['find'](_0x56fb6e=>_0x56fb6e['config']['get']('collaboration.channelId')==_0x36fc55)),!_0x892dae)throw new _0x4b7825('permissions-set-permissions-invalid-channel-id',null);const _0x3df65d=_0x892dae['plugins'],_0x167db1=_0x3df65d['has']('CommentsRepository')?_0x3df65d['get']('CommentsRepository'):void 0x0,_0x2fbdcd=_0x3df65d['has']('CommentsOnly')&&_0x3df65d['get']('CommentsOnly'),_0x28bbd1=_0x12f081['includes']('document:write'),_0x56cda1=_0x12f081['includes']('comment:modify_all'),_0x291364=_0x12f081['includes']('comment:admin'),_0x256f9b=_0x12f081['includes']('comment:write'),_0x3f5ea2=_0x256f9b||_0x291364,_0x2ea21c=_0x3f5ea2||_0x56cda1,_0x4a772c=_0x28bbd1||_0x3f5ea2;(_0x2fbdcd&&(_0x2fbdcd['isEnabled']=!_0x28bbd1&&_0x2ea21c),_0x892dae instanceof _0x3d0282)&&(!(_0x28bbd1||_0x2ea21c&&_0x167db1)?_0x892dae['enableReadOnlyMode']('no-permissions'):_0x892dae['disableReadOnlyMode']('no-permissions'));if(_0x167db1){_0x167db1['setPermissions']({'admin':_0x291364,'modifyAll':_0x56cda1,'write':_0x256f9b,'resolve':_0x4a772c},_0x36fc55);const _0x52942c=_0x892dae instanceof _0x3d0282&&_0x892dae['commands']['get']('addCommentThread');_0x52942c&&(_0x3f5ea2?_0x52942c['clearForceDisabled']('noPermissions'):_0x52942c['forceDisabled']('noPermissions'));}}}function o(_0x799f6d,_0x774119){const t=_0x799f6d['t'];switch(_0x774119){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class u extends _0x2c611c{['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(_0x3697e4){super(_0x3697e4),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x191e59(),this['_locale']=_0x3697e4['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:_0x12cf5d,name:_0x320920,..._0x4f8939}){if(!_0x12cf5d||'string'!=typeof _0x12cf5d)throw new _0x4b7825('users-add-invalid-id');if(this['users']['has'](_0x12cf5d))throw new _0x4b7825('users-add-duplicated-id',null,{'id':_0x12cf5d});const _0x204788={..._0x4f8939,'id':_0x12cf5d,'name':h(this['_locale'],_0x320920),'color':this['_getNextColor']()};_0x204788['name']=h(this['_locale'],_0x204788['name']);const _0x557db5=new P(_0x204788);return this['users']['add'](_0x557db5),_0x557db5;}['getUser'](_0x356ba9){return this['users']['get'](_0x356ba9);}['useAnonymousUser'](){const _0x483ec6=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x483ec6);}['defineMe'](_0x30016b){if(this['_myId'])throw new _0x4b7825('users-me-already-defined',null);const _0x2467cf=this['getUser'](_0x30016b);if(!_0x2467cf)throw new _0x4b7825('users-me-missing-user',null);this['_myId']=_0x30016b,_0x2467cf['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x4af51d=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x4af51d&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x24037b=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x24037b,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x248af5){this['id']=_0x248af5['id'],this['color']=_0x248af5['color'],this['name']=_0x248af5['name'],this['avatar']=_0x248af5['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x277c2a=this['name']['split']('\x20');return 0x1===_0x277c2a['length']?this['_getInitial'](_0x277c2a[0x0]):this['_getInitial'](_0x277c2a[0x0])+this['_getInitial'](_0x277c2a[_0x277c2a['length']-0x1]);}['_getInitial'](_0x5dac72){return _0x5dac72['charAt'](0x0)['toUpperCase']();}}function h(_0x19f22d,_0x59d752=''){return''==(_0x59d752=_0x59d752['trim']())?o(_0x19f22d,'Anonymous'):_0x59d752;}class c{['_id'];constructor(_0x536afa){this['_id']=_0x536afa;}['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 _0x425b54{['name'];['notificationView'];constructor(_0xcd631,_0x224d50,_0x2d8694){super(_0xcd631),this['name']=_0x224d50['name'],this['notificationView']=null;const _0x3c797b=['ck','ck-user'],_0x5615c7=['ck','ck-user__img'];if(_0x224d50['isAnonymous']&&_0x5615c7['push']('ck-user__anonymous'),!_0x224d50['isAnonymous']&&_0x224d50['isMe']&&_0x3c797b['push']('ck-user_me'),_0x224d50['avatar']&&_0x5615c7['push']('ck-user__avatar'),_0x2d8694){const _0x59d1c1=new _0x339dbb();_0x59d1c1['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x59d1c1['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':_0x2d8694},'children':[_0x59d1c1]};}const _0x3b8353=[{'tag':'div','attributes':{'class':_0x5615c7,'style':{'background-image':_0x224d50['avatar']?'url(\x27'+_0x224d50['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x224d50['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x224d50['name']},'children':[{'text':_0x224d50['initials']}]}];this['notificationView']&&_0x3b8353['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x3c797b,'data-user-id':_0x224d50['id']},'children':_0x3b8353});}}class J extends _0x425b54{['id'];constructor(_0x2a5881,_0x396f05){super(_0x2a5881),this['id']='ck-aria-description-'+_0xb5d356(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x396f05}]});}}class U extends _0x22bec8{['render'](){super['render'](),V(this);}}class Y extends _0x117c2b{['render'](){super['render'](),V(this);}}function V(_0x52afaf){_0x52afaf['listenTo'](_0x52afaf['element'],'mousedown',(_0xaf156f,_0x1c8bc0)=>{_0x1c8bc0['stopPropagation'](),_0x1c8bc0['preventDefault']();}),_0x52afaf['listenTo'](_0x52afaf['element'],'mouseup',()=>{_0x52afaf['element']['focus']();});}function E(_0x3c2388={}){if(void 0x0!==_0x3c2388['dateTimeFormat']&&'function'!=typeof _0x3c2388['dateTimeFormat'])throw new _0x4b7825('invalid-date-time-format');return _0x37032a=>{const _0x5578df='string'==typeof _0x37032a?_0x56b526(_0x37032a):_0x37032a,_0x1780b5=new Date(),_0x51b5b8=_0x11fda2(_0x1780b5,_0x5578df);return _0x3c2388['dateTimeFormat']?_0x3c2388['dateTimeFormat'](_0x5578df):_0x5ee2c9(_0x5578df,0x0===_0x51b5b8?'\x27Today\x27\x20hh:mma':0x1===_0x51b5b8?'\x27Yesterday\x27\x20hh:mma':_0x51b5b8<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x1c8b69,_0x31932e){const _0x3f8e2b=_0x1c8b69['mapper']['markerNameToElements'](_0x31932e['name']);if(!_0x3f8e2b)return null;const _0x3b4c03=_0x6298d1(_0x3f8e2b['values']());return _0x1c8b69['view']['domConverter']['mapViewToDom'](_0x3b4c03)||null;}function R(_0x46fa73,_0x4e446d){if(0x0===_0x4e446d['length'])return null;const _0x2798f7=[],_0x15bb4e=_0x46fa73['view']['domConverter'];for(const _0x1b9818 of _0x4e446d){const _0x33a0f1=_0x46fa73['mapper']['markerNameToElements'](_0x1b9818['name']);if(!_0x33a0f1)continue;const _0x192c97=Array['from'](_0x33a0f1)['map'](_0x54d085=>_0x15bb4e['mapViewToDom'](_0x54d085))['filter'](_0x127a59=>!!_0x127a59);_0x2798f7['push'](..._0x192c97);}if(0x0===_0x2798f7['length'])return null;const _0x2401e5=[];for(const _0x4e601b of _0x2798f7){const _0xcef818=_0x4e601b['getClientRects']()['item'](0x0);_0xcef818&&_0x2401e5['push']({'x':_0xcef818['x'],'y':_0xcef818['y'],'domElement':_0x4e601b});}return 0x0===_0x2401e5['length']?null:(_0x2401e5['sort']((_0x47d7a6,_0x9b3b2a)=>_0x47d7a6['y']-_0x9b3b2a['y']||_0x47d7a6['x']-_0x9b3b2a['x']),_0x2401e5['map'](_0x1178e2=>_0x1178e2['domElement']));}function Z(_0x49cfa7,{limit:_0x4602b2,suffix:_0x394a8a='...'}){const _0x42180c=[];let _0x37abf8=0x0;const _0x522dbb=_0x49cfa7['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x75722e=0x0;_0x75722e<_0x522dbb['length'];_0x75722e++){let _0x148bb6=_0x522dbb[_0x75722e];const _0x38a794=$(_0x148bb6);if(_0x148bb6['startsWith']('<')){if(_0x37abf8>=_0x4602b2){const _0x31a5fe=_0x148bb6['match'](/[a-zA-Z]+/);if(!_0x31a5fe){_0x522dbb[_0x75722e]='';continue;}const _0x31aef7=_0x31a5fe[0x0];_0x148bb6['startsWith']('</')?(_0x42180c['length']&&(_0x148bb6=''),_0x42180c['pop']()):(_0x42180c['push'](_0x31aef7),_0x148bb6='');}}else{if(_0x37abf8>=_0x4602b2)_0x148bb6='';else{if(_0x37abf8+_0x38a794['length']>=_0x4602b2){let _0x4071f8=_0x4602b2-_0x37abf8;if('\x20'===_0x38a794[_0x4071f8-0x1])_0x4071f8--;else{const _0x1f336b=_0x38a794['slice'](_0x4071f8)['indexOf']('\x20');-0x1!==_0x1f336b?_0x4071f8+=_0x1f336b:_0x4071f8=_0x148bb6['length'];}_0x148bb6=_0x38a794['slice'](0x0,_0x4071f8)['join']('')+_0x394a8a,_0x37abf8=_0x4602b2;}else _0x37abf8+=_0x38a794['length'];}}_0x522dbb[_0x75722e]=_0x148bb6;}return _0x522dbb['join']('\x0a')['replace'](/\n/g,'');}function $(_0x4860ff){const _0x56ddbb=[];for(let _0x2597aa=0x0;_0x2597aa<_0x4860ff['length'];_0x2597aa++){const _0xff0ed9=_0x4860ff['substring'](_0x2597aa)['match'](/^&[a-z0-9#]+;/);if(_0xff0ed9){const _0x515019=_0xff0ed9[0x0];_0x56ddbb['push'](_0x515019),_0x2597aa+=_0x515019['length']-0x1;}else _0x56ddbb['push'](_0x4860ff[_0x2597aa]);}return _0x56ddbb;}class m extends _0x425b54{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x128b0a){super(_0x128b0a);const _0x1f64e2=this['bindTemplate'];this['set']('message',o(_0x128b0a,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x128b0a,o(_0x128b0a,'Yes'),_0x557821['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x128b0a,o(_0x128b0a,'No'),_0x557821['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x5a1e96(),this['keystrokes']=new _0x30c2da(),this['focusCycler']=new _0x43a414({'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':_0x1f64e2['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'](_0x35967a,_0x485287,_0x64c722,_0x2eace8){const _0x1e4769=new _0x22bec8(_0x35967a);return _0x1e4769['label']=_0x485287,_0x1e4769['icon']=_0x64c722,_0x1e4769['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x2eace8}}),_0x1e4769['on']('execute',()=>this['fire'](_0x2eace8)),_0x1e4769;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x5cfaa2=>{this['keystrokes']['listenTo'](_0x5cfaa2['element']),this['focusTracker']['add'](_0x5cfaa2['element']);}),this['keystrokes']['set']('esc',(_0x54c8ec,_0x5e1bd0)=>{this['fire']('cancel'),_0x5e1bd0();});}}function f(_0x484c6d){return class extends _0x484c6d{['showConfirm'](_0x1c487f,_0x5e9cdc){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x1c487f,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x5e9cdc['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x4e195d=>this['confirmView']['on']('submit',_0x4e195d));}['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(_0x205314){let _0xc3cdbc=0x0,_0x4567db=0x0;for(const _0x30b6dd of q(_0x205314))_0xc3cdbc=(_0xc3cdbc<<0x5)-_0xc3cdbc+_0x30b6dd,_0xc3cdbc|=0x0,[_0xc3cdbc,_0x4567db]=[_0x4567db,_0xc3cdbc];return z(_0xc3cdbc)+z(_0x4567db);}function*O(_0x2f6d24){null==_0x2f6d24||null==_0x2f6d24?yield 0x12b9b0a1:0x0===_0x2f6d24||!0x1===_0x2f6d24?yield 0x0:0x1===_0x2f6d24||0x1==_0x2f6d24?yield 0x1:Array['isArray'](_0x2f6d24)?yield*function*(_0x2d291f){for(const _0x1128cf of _0x2d291f)yield*O(_0x1128cf);}(_0x2f6d24):'object'==typeof _0x2f6d24?yield*q(_0x2f6d24):'string'==typeof _0x2f6d24?yield*v(_0x2f6d24):'number'==typeof _0x2f6d24&&(yield _0x2f6d24);}function*q(_0x5f0373){if(yield w('{'),_0x5f0373){const _0x560ed4=Object['keys'](_0x5f0373)['sort']();for(const _0x26ce52 of _0x560ed4){yield*v(_0x26ce52),yield w(':');const _0x18f5b8=_0x5f0373[_0x26ce52];yield*O(_0x18f5b8);}}yield w('}');}function*v(_0x5e4372){yield w('\x22');for(const _0x55c641 of _0x5e4372)yield w(_0x55c641);yield w('\x22');}function w(_0x14c6b8){return _0x14c6b8['charCodeAt'](0x0);}function z(_0x382266){return(_0x382266*=Math['sign'](_0x382266))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x56b8f6,_0x302b6f,_0x4c148d,_0x3facbf=[]){const _0xda5c6d='string'==typeof _0x56b8f6?_0x4c148d['get'](_0x56b8f6)['constructor']:_0x56b8f6['prototype']['constructor'];if(_0x302b6f['has'](_0xda5c6d))return _0x302b6f['get'](_0xda5c6d);_0x302b6f['set'](_0xda5c6d,!0x0);const _0x3cff53=[...D,..._0x3facbf]['map'](_0x301694=>{if(_0x4c148d['has'](_0x301694))return _0x4c148d['get'](_0x301694)['constructor'];})['filter'](_0x45004a=>_0x45004a);if(_0xda5c6d&&_0x3cff53['includes'](_0xda5c6d))return _0x302b6f['set'](_0xda5c6d,!0x1),!0x1;if(!_0xda5c6d['requires'])return _0x302b6f['set'](_0xda5c6d,!0x0),!0x0;const _0x5182f9=_0xda5c6d['requires']['every'](_0x5473d6=>S(_0x5473d6,_0x302b6f,_0x4c148d,_0x3facbf));return _0x302b6f['set'](_0xda5c6d,_0x5182f9),_0x5182f9;}function C(_0x399185,_0x495ada){const _0x23c9a4={};for(const _0x220682 of _0x399185['config']['names']())W['includes'](_0x220682)||(_0x23c9a4[_0x220682]=_0x399185['config']['get'](_0x220682));const _0x4e2503=_0x23c9a4['plugins']||[],_0x3b6d2a=_0x399185['constructor']['builtinPlugins']||[],_0x37ec2d=_0x4e2503['length']?_0x4e2503:_0x3b6d2a,_0x1f008d=_0x23c9a4['extraPlugins']||[];delete _0x23c9a4['extraPlugins'];const _0x47cddc=_0x23c9a4['removePlugins']||[];delete _0x23c9a4['removePlugins'];const _0x2baf18=_0x399185['_context']['config']['get']('plugins')||[],_0x5235c9=_0x37ec2d['concat'](_0x1f008d)['concat'](_0x2baf18)['map'](_0x5d11a0=>'string'==typeof _0x5d11a0?_0x3b6d2a['find'](_0x5564c9=>_0x5564c9['pluginName']==_0x5d11a0):_0x5d11a0)['filter'](_0x416573=>!_0x47cddc['includes'](_0x416573)&&!_0x47cddc['includes'](_0x416573['pluginName'])),_0x5a8108=Array['from'](new Set(_0x5235c9)),_0x2c67dd=new Map();return _0x23c9a4['plugins']=_0x5a8108['filter'](_0x2cbb5d=>S(_0x2cbb5d,_0x2c67dd,_0x399185['plugins'],_0x495ada)),_0x23c9a4;}function B(_0x11b661,_0x38c097){const _0x5c0e99=[];_0x11b661['document']['selection']['on']('change:range',()=>{const _0x3d6c86=function(_0x1b726f,_0xbab5bc){const _0x4e8a0=[];for(const _0xd14338 of _0x1b726f['markers']){const _0x4982cc=_0xd14338['getRange']();(_0x4982cc['containsPosition'](_0xbab5bc)||_0x4982cc['start']['isEqual'](_0xbab5bc)||_0x4982cc['end']['isEqual'](_0xbab5bc))&&_0x4e8a0['push'](_0xd14338);}return _0x4e8a0;}(_0x11b661,_0x11b661['document']['selection']['focus']),_0x3a19f4=[],_0x28f77a=[],_0x128560=[];for(const _0x23c86c of _0x5c0e99)_0x3d6c86['includes'](_0x23c86c)||_0x3a19f4['push'](_0x23c86c);for(const _0x69c4a3 of _0x3d6c86)_0x5c0e99['includes'](_0x69c4a3)||_0x28f77a['push'](_0x69c4a3),_0x128560['push'](_0x69c4a3);(_0x3a19f4['length']||_0x28f77a['length'])&&_0x38c097({'left':_0x3a19f4,'entered':_0x28f77a}),_0x5c0e99['length']=0x0,_0x5c0e99['push'](..._0x128560);});}const Q='Ctrl+Shift+E';function T(_0x343be0,_0x1b0b5e){const _0x543c57=_0x343be0['element'];_0x343be0['keystrokes']['listenTo'](_0x543c57);for(const _0x10fe77 of _0x1b0b5e)K(_0x343be0,_0x10fe77);_0x1b0b5e['on']('change',(_0x588976,_0x4e6dda)=>{for(const _0x3f7eb3 of _0x4e6dda['removed'])_(_0x343be0,_0x3f7eb3);for(const _0x3b1829 of Array['from'](_0x4e6dda['added'])['reverse']())K(_0x343be0,_0x3b1829);}),_0x343be0['keystrokes']['set']('enter',(_0x5999c9,_0x59a685)=>{_0x543c57===_0x5999c9['target']&&(_0x343be0['focusCycler']['focusFirst'](),_0x59a685());},{'filter':_0x5d5f6a=>_0x5d5f6a['target']===_0x543c57}),_0x343be0['keystrokes']['set']('esc',(_0x247973,_0x538048)=>{_0x543c57!==_0x247973['target']?_0x343be0['focus']():_0x343be0['fire']('escape'),_0x538048();}),_0x343be0['keystrokes']['set']('arrowdown',(_0x297590,_0x13d277)=>{_0x543c57===_0x297590['target']&&(_0x343be0['fire']('arrowdown'),_0x13d277());}),_0x343be0['keystrokes']['set']('arrowup',(_0x67e1ac,_0x65fc72)=>{_0x543c57===_0x67e1ac['target']&&(_0x343be0['fire']('arrowup'),_0x65fc72());});}function K(_0x65458f,_0x586a01){_0x586a01['isRendered']&&(_0x65458f['focusTracker']['add'](_0x586a01['element']),_0x65458f['keystrokes']['listenTo'](_0x586a01['element']),_0x4a347c(_0x586a01)&&function(_0x33b3bc,_0x530aa7){const _0x93fb6f=_0x33b3bc['actions'],_0x329225=_0x530aa7['actions'];for(const _0x5e921c of Object['keys'](_0x93fb6f))if(_0x5e921c in _0x329225&&_0x93fb6f[_0x5e921c]!==_0x329225[_0x5e921c])return!0x1;return!0x0;}(_0x65458f['focusCycler'],_0x586a01['focusCycler'])&&_0x65458f['focusCycler']['chain'](_0x586a01['focusCycler']));}function _(_0x2bc5de,_0x3125d5){_0x2bc5de['focusTracker']['remove'](_0x3125d5['element']),_0x2bc5de['keystrokes']['stopListening'](_0x3125d5['element']),_0x4a347c(_0x3125d5)&&_0x2bc5de['focusCycler']['unchain'](_0x3125d5['focusCycler']);}export{J as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,H as UserView,u as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-collaboration-core",
|
3
|
-
"version": "44.0.0-alpha.
|
3
|
+
"version": "44.0.0-alpha.4",
|
4
4
|
"description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
@@ -32,11 +32,11 @@
|
|
32
32
|
"type": "module",
|
33
33
|
"main": "src/index.js",
|
34
34
|
"dependencies": {
|
35
|
-
"@ckeditor/ckeditor5-core": "44.0.0-alpha.
|
36
|
-
"@ckeditor/ckeditor5-theme-lark": "44.0.0-alpha.
|
37
|
-
"@ckeditor/ckeditor5-ui": "44.0.0-alpha.
|
38
|
-
"@ckeditor/ckeditor5-utils": "44.0.0-alpha.
|
39
|
-
"ckeditor5": "44.0.0-alpha.
|
35
|
+
"@ckeditor/ckeditor5-core": "44.0.0-alpha.4",
|
36
|
+
"@ckeditor/ckeditor5-theme-lark": "44.0.0-alpha.4",
|
37
|
+
"@ckeditor/ckeditor5-ui": "44.0.0-alpha.4",
|
38
|
+
"@ckeditor/ckeditor5-utils": "44.0.0-alpha.4",
|
39
|
+
"ckeditor5": "44.0.0-alpha.4",
|
40
40
|
"date-fns": "2.30.0"
|
41
41
|
},
|
42
42
|
"files": [
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
|
23
|
+
(function(_0x566f4c,_0x3ca0ba){var _0x3fa246=_0x2758,_0xc78e6=_0x566f4c();while(!![]){try{var _0x13eb7f=-parseInt(_0x3fa246(0xaf))/0x1+-parseInt(_0x3fa246(0xb5))/0x2+parseInt(_0x3fa246(0xbd))/0x3*(parseInt(_0x3fa246(0xb0))/0x4)+parseInt(_0x3fa246(0xb6))/0x5+parseInt(_0x3fa246(0xb8))/0x6*(parseInt(_0x3fa246(0xb2))/0x7)+parseInt(_0x3fa246(0xb7))/0x8*(parseInt(_0x3fa246(0xbc))/0x9)+parseInt(_0x3fa246(0xb4))/0xa*(-parseInt(_0x3fa246(0xb3))/0xb);if(_0x13eb7f===_0x3ca0ba)break;else _0xc78e6['push'](_0xc78e6['shift']());}catch(_0x3b224a){_0xc78e6['push'](_0xc78e6['shift']());}}}(_0x5376,0x7d827));import{uid as _0x1eaa3d}from'ckeditor5/src/utils.js';import{View as _0x1305c4}from'ckeditor5/src/ui.js';function _0x2758(_0x4c6bb4,_0x41400d){var _0x537661=_0x5376();return _0x2758=function(_0x2758fa,_0xc884ef){_0x2758fa=_0x2758fa-0xaf;var _0x277fd5=_0x537661[_0x2758fa];return _0x277fd5;},_0x2758(_0x4c6bb4,_0x41400d);}function _0x5376(){var _0x396201=['31047eUSpoI','44rqscVo','ck-aria-description','2002168LuXjJI','11SBGIhn','7902980ZRSkkq','1432658OENBot','541060RrabPG','2432jQvAxp','6etGaqU','setTemplate','ck-aria-description-','span','20664vOOfcH','261693DqOOEn'];_0x5376=function(){return _0x396201;};return _0x5376();}export default class J extends _0x1305c4{constructor(_0xe9d79f,_0x1b8448){var _0xb9dd88=_0x2758;super(_0xe9d79f),this['id']=_0xb9dd88(0xba)+_0x1eaa3d(),this[_0xb9dd88(0xb9)]({'tag':_0xb9dd88(0xbb),'attributes':{'class':['ck',_0xb9dd88(0xb1)],'id':this['id']},'children':[{'text':_0x1b8448}]});}}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
|
23
|
+
(function(_0x58e268,_0x1d48c6){const _0x3a3957=_0x2816,_0x3cce9a=_0x58e268();while(!![]){try{const _0x97affb=-parseInt(_0x3a3957(0x123))/0x1*(parseInt(_0x3a3957(0x119))/0x2)+-parseInt(_0x3a3957(0x125))/0x3+-parseInt(_0x3a3957(0x12a))/0x4+parseInt(_0x3a3957(0x11a))/0x5+parseInt(_0x3a3957(0x10f))/0x6+-parseInt(_0x3a3957(0x110))/0x7+parseInt(_0x3a3957(0x10e))/0x8*(parseInt(_0x3a3957(0x116))/0x9);if(_0x97affb===_0x1d48c6)break;else _0x3cce9a['push'](_0x3cce9a['shift']());}catch(_0x370be4){_0x3cce9a['push'](_0x3cce9a['shift']());}}}(_0x5b8f,0xc6410));function _0x2816(_0x5a859b,_0x41500c){const _0x5b8ff0=_0x5b8f();return _0x2816=function(_0x281682,_0xe36c02){_0x281682=_0x281682-0x10e;let _0xd3bfff=_0x5b8ff0[_0x281682];return _0xd3bfff;},_0x2816(_0x5a859b,_0x41500c);}function _0x5b8f(){const _0x1d53b9=['ck-user__notification','notificationView','name','initials','url(\x27','1469224YTUYis','ck-user__avatar','605493JZNSvg','setTemplate','ck-user__img','extendTemplate','isMe','113660dGAxEF','push','8vvCfJQ','1396020INVSED','8189874uWqmQV','ck\x20ck-user__name\x20ck-user__name--hidden','ck-user','ck-user__anonymous','content','ck\x20ck-user__name','22827861ZIUQTo','ck-user_me','div','2xQcmgN','4562005YvhIVD','isAnonymous','avatar','ck-user__icon'];_0x5b8f=function(){return _0x1d53b9;};return _0x5b8f();}import{View as _0x5bd2cb,IconView as _0x513d04}from'ckeditor5/src/ui.js';import _0x10ed9a from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class H extends _0x5bd2cb{constructor(_0x54f0c0,_0x515252,_0x147d26){const _0x22bbc9=_0x2816;super(_0x54f0c0),this[_0x22bbc9(0x120)]=_0x515252[_0x22bbc9(0x120)],this[_0x22bbc9(0x11f)]=null;const _0x4a87d3=['ck',_0x22bbc9(0x112)],_0x357d39=['ck',_0x22bbc9(0x127)];if(_0x515252[_0x22bbc9(0x11b)]&&_0x357d39[_0x22bbc9(0x12b)](_0x22bbc9(0x113)),!_0x515252[_0x22bbc9(0x11b)]&&_0x515252[_0x22bbc9(0x129)]&&_0x4a87d3[_0x22bbc9(0x12b)](_0x22bbc9(0x117)),_0x515252[_0x22bbc9(0x11c)]&&_0x357d39[_0x22bbc9(0x12b)](_0x22bbc9(0x124)),_0x147d26){const _0x5b593b=new _0x513d04();_0x5b593b[_0x22bbc9(0x128)]({'attributes':{'class':[_0x22bbc9(0x11d)]}}),_0x5b593b[_0x22bbc9(0x114)]=_0x10ed9a,this[_0x22bbc9(0x11f)]={'tag':_0x22bbc9(0x118),'attributes':{'class':['ck',_0x22bbc9(0x11e)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x147d26},'children':[_0x5b593b]};}const _0x3b8c8a=[{'tag':_0x22bbc9(0x118),'attributes':{'class':_0x357d39,'style':{'background-image':_0x515252[_0x22bbc9(0x11c)]?_0x22bbc9(0x122)+_0x515252[_0x22bbc9(0x11c)]+'\x27)':''}}},{'tag':_0x22bbc9(0x118),'attributes':{'class':_0x515252[_0x22bbc9(0x11c)]?_0x22bbc9(0x111):_0x22bbc9(0x115),'aria-label':_0x515252[_0x22bbc9(0x120)]},'children':[{'text':_0x515252[_0x22bbc9(0x121)]}]}];this[_0x22bbc9(0x11f)]&&_0x3b8c8a[_0x22bbc9(0x12b)](this[_0x22bbc9(0x11f)]),this[_0x22bbc9(0x126)]({'tag':_0x22bbc9(0x118),'attributes':{'class':_0x4a87d3,'data-user-id':_0x515252['id']},'children':_0x3b8c8a});}}
|