@ckeditor/ckeditor5-track-changes 33.0.0 → 34.2.0
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/LICENSE.md +2 -2
- package/README.md +5 -2
- package/build/track-changes.js +2 -2
- package/build/translations/az.js +1 -0
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -1
- package/build/translations/lv.js +1 -0
- package/build/translations/nl.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +2 -0
- package/lang/translations/az.po +397 -0
- package/lang/translations/cs.po +40 -28
- package/lang/translations/da.po +10 -0
- package/lang/translations/de.po +10 -0
- package/lang/translations/el.po +10 -0
- package/lang/translations/en-au.po +15 -5
- package/lang/translations/en.po +10 -0
- package/lang/translations/es.po +29 -1
- package/lang/translations/et.po +10 -0
- package/lang/translations/fr.po +29 -1
- package/lang/translations/gl.po +13 -3
- package/lang/translations/hi.po +10 -0
- package/lang/translations/hr.po +24 -13
- package/lang/translations/id.po +379 -0
- package/lang/translations/it.po +29 -1
- package/lang/translations/lv.po +415 -0
- package/lang/translations/nl.po +19 -9
- package/lang/translations/pl.po +12 -0
- package/lang/translations/pt-br.po +29 -1
- package/lang/translations/sk.po +69 -57
- package/lang/translations/sr-latn.po +11 -0
- package/lang/translations/sr.po +11 -0
- package/lang/translations/tk.po +10 -0
- package/lang/translations/tr.po +10 -0
- package/lang/translations/zh-cn.po +13 -4
- package/lang/translations/zh.po +9 -0
- package/package.json +3 -3
- package/src/commands/acceptallsuggestionscommand.js +1 -1
- package/src/commands/acceptselectedsuggestionscommand.js +1 -1
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardallsuggestionscommand.js +1 -1
- package/src/commands/discardselectedsuggestionscommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/ckbox.js +23 -0
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/htmlembed.js +23 -0
- package/src/integrations/image.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.js +1 -1
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/common-translations.js +23 -0
- package/src/utils/getrangesofblockgroups.js +23 -0
- package/src/utils/getselectedsuggestions.js +1 -1
- package/src/utils/hashobject.js +1 -1
- package/src/utils/normalizedescription.js +1 -1
- package/src/utils/sortsuggestions.js +1 -1
- package/theme/integrations/horizontalline.css +0 -15
- package/theme/integrations/image.css +0 -55
- package/theme/integrations/mediaembed.css +0 -19
- package/theme/integrations/pagebreak.css +0 -15
- package/theme/integrations/table.css +0 -147
- package/theme/suggestion.css +0 -87
- package/theme/suggestionmarker.css +0 -161
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
const _0x363e=['toViewPosition','showSuggestionHighlights','ELEMENT_PARAGRAPH','afterInit','document','options','model','writer','registerElementLabel','TrackChangesEditing','isObject','end','locale','editing','editor','isBlock','nodeAfter','getItemLabel','mapper','parent','filter','span','registerDescriptionCallback','_descriptionFactory','has','paragraph','from','data','*Change\x20to:*\x20%0','ck-suggestion-marker--active','*Insert:*\x20%0','addMarker:suggestion:insertion','blockName','selection','name','consumable','commandName','bindElementToMarker','change','markerRange','consume','$text','markerName','type','includes','markBlockFormat','checkChild','plugins','insertion','schema','isLimit','get'];(function(_0x495e0f,_0x363ef3){const _0x47709c=function(_0x13942a){while(--_0x13942a){_0x495e0f['push'](_0x495e0f['shift']());}};_0x47709c(++_0x363ef3);}(_0x363e,0x198));const _0x4770=function(_0x495e0f,_0x363ef3){_0x495e0f=_0x495e0f-0x0;let _0x47709c=_0x363e[_0x495e0f];return _0x47709c;};import{Plugin as _0x1dfd0c}from'ckeditor5/src/core';import{getElementsAffectedByListItemRename as _0x22e13f}from'./utils';import{getTranslation as _0x127b90}from'../utils/common-translations';export default class nt extends _0x1dfd0c{[_0x4770('0xb')](){const _0x522267=this[_0x4770('0x16')];if(!_0x522267[_0x4770('0x3')][_0x4770('0x20')]('Paragraph'))return;const _0x2c2d81=_0x522267[_0x4770('0x14')],_0x9110e1=_0x522267[_0x4770('0x3')][_0x4770('0x7')](_0x4770('0x11'));_0x9110e1[_0x4770('0x1f')][_0x4770('0x10')](_0x4770('0x21'),_0x24cc6a=>_0x127b90(_0x2c2d81,'ELEMENT_PARAGRAPH',_0x24cc6a)),_0x9110e1['enableCommand'](_0x4770('0x21'),(_0x3dedf1,_0x520155={})=>{const _0x22143b=_0x522267[_0x4770('0xe')][_0x4770('0xc')],_0x5d387f=_0x520155[_0x4770('0x29')]||_0x22143b[_0x4770('0x29')],_0x5df525=Array[_0x4770('0x22')](_0x5d387f['getSelectedBlocks']())[_0x4770('0x1c')](_0x5a4a95=>function(_0x1de454,_0x3c2a9e){return _0x3c2a9e[_0x4770('0x2')](_0x1de454[_0x4770('0x1b')],'paragraph')&&!_0x3c2a9e[_0x4770('0x12')](_0x1de454)&&_0x4770('0x21')!=_0x1de454[_0x4770('0x2a')];}(_0x5a4a95,this[_0x4770('0x16')]['model'][_0x4770('0x5')]));_0x522267[_0x4770('0xe')][_0x4770('0x2e')](()=>{for(const _0xa7244c of _0x5df525)_0x9110e1[_0x4770('0x1')](_0xa7244c,{'commandName':_0x4770('0x21'),'commandParams':[],'formatGroupId':_0x4770('0x28')},_0x22e13f(_0xa7244c));});}),_0x9110e1['_descriptionFactory'][_0x4770('0x1e')](_0x4449aa=>{const {data:_0x24aeb2}=_0x4449aa;if(_0x24aeb2&&_0x4770('0x21')==_0x24aeb2[_0x4770('0x2c')])return{'type':'format','content':_0x127b90(_0x2c2d81,_0x4770('0x24'),_0x127b90(_0x2c2d81,_0x4770('0xa')))};}),_0x9110e1['enableCommand']('insertParagraph'),_0x522267[_0x4770('0x15')]['downcastDispatcher']['on'](_0x4770('0x27'),tr(_0x522267),{'priority':'highest'}),_0x522267[_0x4770('0x23')]['downcastDispatcher']['on'](_0x4770('0x27'),(_0x278e36,_0x4050b8,_0xc9ce5e)=>{_0xc9ce5e[_0x4770('0xd')][_0x4770('0x9')]&&tr(_0x522267,{'showActiveMarker':!0x1})(_0x278e36,_0x4050b8,_0xc9ce5e);},{'priority':'highest'});const _0x32e3c5=_0x9110e1[_0x4770('0x1f')];_0x32e3c5['registerDescriptionCallback'](_0x42aeb2=>{if(_0x4770('0x4')!==_0x42aeb2[_0x4770('0x33')])return;const {start:_0x4a2bdf,end:_0x322666}=_0x42aeb2['getFirstRange']();if(!_0x4a2bdf['isTouching'](_0x322666)||!_0x4a2bdf[_0x4770('0x18')])return;const _0x55b84c=_0x522267[_0x4770('0xe')]['schema'],_0x5c94c6=_0x4a2bdf[_0x4770('0x18')];return _0x55b84c[_0x4770('0x17')](_0x5c94c6)&&!_0x55b84c['isLimit'](_0x5c94c6)&&_0x55b84c[_0x4770('0x2')](_0x5c94c6,_0x4770('0x31'))?{'type':'insertion','content':_0x127b90(_0x2c2d81,_0x4770('0x26'),_0x32e3c5[_0x4770('0x19')](_0x5c94c6[_0x4770('0x2a')],0x1))}:void 0x0;});}}function tr(_0x95242e,{showActiveMarker:_0x48f827=!0x0}={}){return(_0x231ac1,_0xe33b34,_0x2144fd)=>{const _0x74cdee=_0x95242e[_0x4770('0x3')]['get'](_0x4770('0x11')),_0x40d60e=_0xe33b34[_0x4770('0x2f')]['start'],_0x5c6a73=_0xe33b34[_0x4770('0x2f')][_0x4770('0x13')],_0x4c6d24=_0x95242e['model'][_0x4770('0x5')];if(!_0x40d60e['isTouching'](_0x5c6a73)||!_0x40d60e[_0x4770('0x18')])return;const _0x1dc545=_0x40d60e[_0x4770('0x18')];if(_0x4c6d24[_0x4770('0x17')](_0x1dc545)&&!_0x4c6d24[_0x4770('0x6')](_0x1dc545)&&_0x4c6d24[_0x4770('0x2')](_0x1dc545,_0x4770('0x31'))){if(!_0x2144fd[_0x4770('0x2b')][_0x4770('0x30')](_0xe33b34[_0x4770('0x2f')],_0x231ac1[_0x4770('0x2a')]))return;const _0x589bd4=_0x2144fd[_0x4770('0xf')]['createUIElement'](_0x4770('0x1d'),{'class':'ck-suggestion-marker-split'}),_0x317bbb=_0x2144fd[_0x4770('0x1a')][_0x4770('0x8')](_0x5c6a73);_0x48f827&&_0x74cdee['activeMarkers'][_0x4770('0x0')](_0xe33b34[_0x4770('0x32')])&&_0x2144fd['writer']['addClass'](_0x4770('0x25'),_0x589bd4),_0x2144fd[_0x4770('0xf')]['insert'](_0x317bbb,_0x589bd4),_0x2144fd['mapper'][_0x4770('0x2d')](_0x589bd4,_0xe33b34[_0x4770('0x32')]);}};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
const _0x15d9=['locale','change','model','plugins','isCollapsed','commandName','*Remove\x20all\x20formatting*','_descriptionFactory','createRangeOn','from','TrackChangesEditing','registerDescriptionCallback','document','getRanges','getAttributes','removeFormat','isFormatting','getItems','get','markInlineFormat','schema','getAttributeProperties','afterInit'];(function(_0x29a42c,_0x15d975){const _0x316ab3=function(_0x3123d9){while(--_0x3123d9){_0x29a42c['push'](_0x29a42c['shift']());}};_0x316ab3(++_0x15d975);}(_0x15d9,0x113));const _0x316a=function(_0x29a42c,_0x15d975){_0x29a42c=_0x29a42c-0x0;let _0x316ab3=_0x15d9[_0x29a42c];return _0x316ab3;};import{Plugin as _0x281bf4}from'ckeditor5/src/core';import{getTranslation as _0x42f4ff}from'../utils/common-translations';export default class ot extends _0x281bf4{[_0x316a('0x0')](){const _0x58d3f7=this['editor'];if(!_0x58d3f7[_0x316a('0x4')]['has']('RemoveFormatEditing'))return;const _0x37885a=_0x58d3f7[_0x316a('0x4')][_0x316a('0x13')](_0x316a('0xb'));_0x37885a['enableCommand'](_0x316a('0x10'),_0x2c3f5b=>{const _0x56bb12=_0x58d3f7[_0x316a('0x3')][_0x316a('0xd')]['selection'];_0x56bb12[_0x316a('0x5')]?_0x2c3f5b():_0x58d3f7[_0x316a('0x3')][_0x316a('0x2')](()=>{const _0x2ed231=Array[_0x316a('0xa')](_0x56bb12[_0x316a('0xe')]());for(const _0x4a97fe of _0x2ed231)for(const _0x36b186 of _0x4a97fe[_0x316a('0x12')]())ro(_0x36b186,_0x58d3f7[_0x316a('0x3')][_0x316a('0x15')])&&_0x37885a[_0x316a('0x14')](_0x58d3f7[_0x316a('0x3')][_0x316a('0x9')](_0x36b186),{'commandName':_0x316a('0x10'),'commandParams':[]});});}),_0x37885a[_0x316a('0x8')][_0x316a('0xc')](_0x3fede6=>{const {data:_0x389edd}=_0x3fede6;if(_0x389edd&&'removeFormat'==_0x389edd[_0x316a('0x6')])return{'type':'format','content':_0x42f4ff(_0x58d3f7[_0x316a('0x1')],_0x316a('0x7'))};});}}function ro(_0x56fc72,_0x39791d){for(const [_0x1b73ab]of _0x56fc72[_0x316a('0xf')]()){const _0x453cea=_0x39791d[_0x316a('0x16')](_0x1b73ab);if(_0x453cea&&_0x453cea[_0x316a('0x11')])return!0x0;}return!0x1;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x58ae=['acceptSelectedSuggestions','RestrictedEditingModeEditing','trackChanges','editor','TrackChangesEditing','plugins','discardSuggestion','discardSelectedSuggestions','discardAllSuggestions','enableCommand','goToPreviousRestrictedEditingException','afterInit','acceptAllSuggestions','has','goToNextRestrictedEditingException'];(function(_0x9e33f8,_0x58ae08){const _0x5f21a3=function(_0xbfc863){while(--_0xbfc863){_0x9e33f8['push'](_0x9e33f8['shift']());}};_0x5f21a3(++_0x58ae08);}(_0x58ae,0x8d));const _0x5f21=function(_0x9e33f8,_0x58ae08){_0x9e33f8=_0x9e33f8-0x0;let _0x5f21a3=_0x58ae[_0x9e33f8];return _0x5f21a3;};import{Plugin as _0x1d5afb}from'ckeditor5/src/core';export default class et extends _0x1d5afb{[_0x5f21('0x5')](){const _0x2e120a=this[_0x5f21('0xc')];if(!_0x2e120a[_0x5f21('0xe')][_0x5f21('0x7')](_0x5f21('0xa')))return;const _0x6af53b=_0x2e120a[_0x5f21('0xe')]['get'](_0x5f21('0xd'));_0x6af53b['enableCommand'](_0x5f21('0x4')),_0x6af53b[_0x5f21('0x3')](_0x5f21('0x8'));const _0xe0a4cc=_0x2e120a[_0x5f21('0xe')]['get'](_0x5f21('0xa'));_0xe0a4cc[_0x5f21('0x3')](_0x5f21('0xb')),_0xe0a4cc[_0x5f21('0x3')]('acceptSuggestion'),_0xe0a4cc[_0x5f21('0x3')](_0x5f21('0x0')),_0xe0a4cc[_0x5f21('0x3')](_0x5f21('0x6')),_0xe0a4cc[_0x5f21('0x3')](_0x5f21('0x2')),_0xe0a4cc[_0x5f21('0x3')](_0x5f21('0x9')),_0xe0a4cc[_0x5f21('0x3')](_0x5f21('0x1'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
const _0x23ff=['element','markerName','addMarker:suggestion:deletion','softBreak','getItems','showSuggestionHighlights','editing','insert','split','addMarker:suggestion:insertion','editor','addClass','test','options','ck-suggestion-marker--active','consumable','init','_descriptionFactory','mapper','name','addMarker:suggestion','locale','ELEMENT_LINE_BREAK','model','get','markerRange','TrackChangesEditing','plugins','registerElementLabel','activeMarkers','deletion','createPositionBefore','writer','merge','downcastDispatcher','bindElementToMarker','high','span'];(function(_0x38c4bd,_0x23ffae){const _0x44653c=function(_0x3944fe){while(--_0x3944fe){_0x38c4bd['push'](_0x38c4bd['shift']());}};_0x44653c(++_0x23ffae);}(_0x23ff,0x152));const _0x4465=function(_0x38c4bd,_0x23ffae){_0x38c4bd=_0x38c4bd-0x0;let _0x44653c=_0x23ff[_0x38c4bd];return _0x44653c;};import{Plugin as _0x122341}from'ckeditor5/src/core';import{ShiftEnter as _0x511536}from'ckeditor5/src/enter';import{getTranslation as _0x42d52d}from'../utils/common-translations';export default class rt extends _0x122341{static get['requires'](){return[_0x511536];}[_0x4465('0x14')](){const _0xbf5713=this[_0x4465('0xe')],_0x342b98=_0xbf5713[_0x4465('0x1f')][_0x4465('0x1c')](_0x4465('0x1e'));_0x342b98['enableCommand']('shiftEnter'),_0xbf5713['editing'][_0x4465('0x0')]['on'](_0x4465('0xd'),re(_0xbf5713),{'priority':_0x4465('0x2')}),_0xbf5713[_0x4465('0xa')][_0x4465('0x0')]['on'](_0x4465('0x6'),re(_0xbf5713),{'priority':_0x4465('0x2')}),_0xbf5713['data'][_0x4465('0x0')]['on'](_0x4465('0x18'),(_0x5dede0,_0xc4c591,_0x266df4)=>{_0x266df4[_0x4465('0x11')][_0x4465('0x9')]&&re(_0xbf5713,{'showActiveMarker':!0x1})(_0x5dede0,_0xc4c591,_0x266df4);}),_0x342b98[_0x4465('0x15')][_0x4465('0x20')](_0x4465('0x7'),_0x1dd5bb=>_0x42d52d(_0xbf5713[_0x4465('0x19')],_0x4465('0x1a'),_0x1dd5bb));}}function re(_0x1dcd5f,{showActiveMarker:_0x3d9c04=!0x0}={}){return(_0x24a83e,_0x50fb1c,_0x14787c)=>{const _0x403ad0=_0x1dcd5f['plugins'][_0x4465('0x1c')](_0x4465('0x1e'));if(!_0x14787c[_0x4465('0x13')][_0x4465('0x10')](_0x50fb1c[_0x4465('0x1d')],_0x24a83e[_0x4465('0x17')]))return;const _0x133e58=_0x1dcd5f[_0x4465('0x1b')];for(const _0x1da682 of _0x50fb1c['markerRange'][_0x4465('0x8')]()){if(!_0x1da682['is'](_0x4465('0x4'),_0x4465('0x7')))continue;const _0x47b955=_0x4465('0x22')==_0x50fb1c[_0x4465('0x5')][_0x4465('0xc')](':')[0x1]?_0x4465('0x25'):_0x4465('0xc'),_0x6b2115=_0x14787c[_0x4465('0x24')]['createUIElement'](_0x4465('0x3'),{'class':'ck-suggestion-marker-'+_0x47b955}),_0x4e2692=_0x14787c[_0x4465('0x16')]['toViewPosition'](_0x133e58[_0x4465('0x23')](_0x1da682));_0x3d9c04&&_0x403ad0[_0x4465('0x21')]['includes'](_0x50fb1c['markerName'])&&_0x14787c[_0x4465('0x24')][_0x4465('0xf')](_0x4465('0x12'),_0x6b2115),_0x14787c['writer'][_0x4465('0xb')](_0x4e2692,_0x6b2115),_0x14787c[_0x4465('0x16')][_0x4465('0x1')](_0x6b2115,_0x50fb1c[_0x4465('0x5')]);}};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
const _0x9eac=['value','has','document','restrictedEditingException','FORMAT_RESTRICTED_ENABLED','getRanges','editor','FORMAT_RESTRICTED_DISABLED','locale','forceValue','selection','format','plugins','model','registerDescriptionCallback','enableCommand','_descriptionFactory','markInlineFormat','get','afterInit'];(function(_0x5d6937,_0x9eac72){const _0x34bdb4=function(_0x51b685){while(--_0x51b685){_0x5d6937['push'](_0x5d6937['shift']());}};_0x34bdb4(++_0x9eac72);}(_0x9eac,0x1ec));const _0x34bd=function(_0x5d6937,_0x9eac72){_0x5d6937=_0x5d6937-0x0;let _0x34bdb4=_0x9eac[_0x5d6937];return _0x34bdb4;};import{Plugin as _0x5eb953}from'ckeditor5/src/core';import{getRangesWithAttribute as _0x4504a6}from'./utils';import{getTranslation as _0x1f6e82}from'../utils/common-translations';export default class at extends _0x5eb953{[_0x34bd('0x7')](){const _0x4e20d7=this[_0x34bd('0xe')],_0x157590=_0x4e20d7[_0x34bd('0x1')],_0x31c92e=_0x4e20d7[_0x34bd('0x10')];if(!_0x4e20d7[_0x34bd('0x0')][_0x34bd('0x9')]('StandardEditingModeEditing'))return;const _0x8abcda=_0x4e20d7[_0x34bd('0x0')][_0x34bd('0x6')]('TrackChangesEditing'),_0x41bd67=_0x34bd('0xb'),_0x1ef0ed=_0x4e20d7['commands']['get'](_0x41bd67);_0x8abcda[_0x34bd('0x3')](_0x41bd67,(_0x102136,_0x49876b={})=>{const _0xcca297=_0x157590[_0x34bd('0xa')][_0x34bd('0x12')];if(_0xcca297['isCollapsed'])return void _0x102136(_0x49876b);const _0xd1442c=void 0x0!==_0x49876b[_0x34bd('0x11')]?_0x49876b[_0x34bd('0x11')]:!_0x1ef0ed[_0x34bd('0x8')];_0x157590['change'](()=>{const _0x3fecc2=Array['from'](_0xcca297[_0x34bd('0xd')]());for(const _0x5da665 of _0x3fecc2){const _0x1b8e88=_0xd1442c?[_0x5da665]:_0x4504a6(_0x41bd67,_0x5da665,_0x157590);for(const _0x47b7e0 of _0x1b8e88)_0x8abcda[_0x34bd('0x5')](_0x47b7e0,{'commandName':_0x41bd67,'commandParams':[{'forceValue':_0xd1442c}]});}});}),_0x8abcda[_0x34bd('0x4')][_0x34bd('0x2')](_0x170d9e=>{const {data:_0x2dcb62}=_0x170d9e;if(_0x2dcb62&&_0x2dcb62['commandName']==_0x41bd67)return _0x2dcb62['commandParams'][0x0][_0x34bd('0x11')]?{'type':'format','content':_0x1f6e82(_0x31c92e,_0x34bd('0xc'))}:{'type':_0x34bd('0x13'),'content':_0x1f6e82(_0x31c92e,_0x34bd('0xf'))};});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x441c69}from'ckeditor5/src/core';import{LiveRange as _0x3420fa}from'ckeditor5/src/engine';import'../../theme/integrations/table.css';import{setHighlightHandling as $t}from'ckeditor5/src/widget';export default class ot extends _0x441c69{constructor(_0x37c9e1){super(_0x37c9e1),this['_tablePostFixingSubtypes']=['tableRow','tableColumn'];}['afterInit'](){const _0x4a455f=this['editor'],_0x22750b=_0x4a455f['model']['document']['selection'];if(!_0x4a455f['plugins']['has']('TableEditing'))return;const {t:t}=_0x4a455f['locale'],_0x479bd0=_0x4a455f['plugins']['get']('TrackChangesEditing'),_0x439a96=_0x4a455f['plugins']['get']('TableUtils');_0x479bd0['_descriptionFactory']['registerElementLabel']('table',_0x4cab17=>t({'string':'table','plural':'%0\x20tables','id':'ELEMENT_TABLE'},_0x4cab17)),this['_setupColumnsRowsFixing'](),_0x479bd0['enableCommand']('insertTable'),_0x479bd0['enableCommand']('selectTableRow'),_0x479bd0['enableCommand']('selectTableColumn');for(const _0x137f0a of['insertTableRowAbove','insertTableRowBelow']){const _0x46a23d=_0x4a455f['commands']['get'](_0x137f0a);_0x479bd0['enableCommand'](_0x137f0a,_0x3cf2d2=>{_0x4a455f['model']['change'](_0x2938e8=>{_0x3cf2d2();const _0x5854d6='above'===_0x46a23d['order'],_0x9ae4ac=_0x439a96['getSelectionAffectedTableCells'](_0x22750b),_0xc5ac5a=_0x439a96['getRowIndexes'](_0x9ae4ac),_0x9211b=_0x5854d6?_0xc5ac5a['first']-0x1:_0xc5ac5a['last']+0x1,_0x3edfcb=_0x9ae4ac[0x0]['findAncestor']('table'),_0x5842bc=_0x439a96['createTableWalker'](_0x3edfcb,{'startRow':_0x9211b,'endRow':_0x9211b}),_0x137502=Array['from'](_0x5842bc)['map'](_0x15c408=>_0x2938e8['createRangeOn'](_0x15c408['cell']));_0x479bd0['markMultiRangeInsertion'](_0x137502,'tableRow');});});}for(const _0x316480 of['insertTableColumnLeft','insertTableColumnRight']){const _0x48baa6=_0x4a455f['commands']['get'](_0x316480);_0x479bd0['enableCommand'](_0x316480,_0x39cf31=>{_0x4a455f['model']['change'](_0x502fb1=>{_0x39cf31();const _0x194f6f='left'===_0x48baa6['order'],_0x508552=_0x439a96['getSelectionAffectedTableCells'](_0x22750b),_0x3b0b1d=_0x439a96['getColumnIndexes'](_0x508552),_0x2ff4a6=_0x194f6f?_0x3b0b1d['first']-0x1:_0x3b0b1d['last']+0x1,_0xf9352d=_0x508552[0x0]['findAncestor']('table'),_0x592e3e=_0x439a96['createTableWalker'](_0xf9352d,{'startRow':0x0,'column':_0x2ff4a6,'includeAllSlots':!0x1}),_0x3b6f94=Array['from'](_0x592e3e)['map'](_0x1eb6c3=>_0x502fb1['createRangeOn'](_0x1eb6c3['cell']));_0x479bd0['markMultiRangeInsertion'](_0x3b6f94,'tableColumn');});});}for(const _0x2e0fb5 of['removeTableRow','removeTableColumn']){const _0x4ab4d9=_0x2e0fb5['substr'](0xb),_0x1f2bac=_0x4ab4d9['toLowerCase'](),_0x3f8d06=_0x1f2bac['substr'](0x0,0x3)+'span',_0x1ed864='table'+_0x4ab4d9,_0x31fcca='min'+_0x4ab4d9,_0x261c94='max'+_0x4ab4d9;_0x479bd0['enableCommand'](_0x2e0fb5,()=>{_0x4a455f['model']['change'](_0x468257=>{const _0x540d68=_0x439a96['getSelectionAffectedTableCells'](_0x22750b),_0x57e0bf=_0x540d68[0x0]['findAncestor']('table');let _0x4f834c;if('removeTableRow'==_0x2e0fb5){const _0x1a19cf=_0x439a96['getRowIndexes'](_0x540d68);_0x4f834c={'startRow':_0x1a19cf['first'],'endRow':_0x1a19cf['last'],'includeAllSlots':!0x0};}else{const _0x3413a4=_0x439a96['getColumnIndexes'](_0x540d68);_0x4f834c={'startColumn':_0x3413a4['first'],'endColumn':_0x3413a4['last'],'includeAllSlots':!0x0};}const _0x48dac5=_0x439a96['createTableWalker'](_0x57e0bf,_0x4f834c),_0x241fc6=Array['from'](_0x48dac5)['map'](({cell:_0x3f4797})=>_0x3f4797),_0x4f9322=Wt(_0x241fc6['filter'](_0x2adbe0=>_0x2adbe0['hasAttribute'](_0x3f8d06))),_0x42fce6=Wt(_0x241fc6['filter'](_0x3ce684=>!_0x3ce684['hasAttribute'](_0x3f8d06)))['map'](_0x43b665=>_0x468257['createRangeOn'](_0x43b665)),_0x27acf2=_0x479bd0['markMultiRangeDeletion'](_0x42fce6,_0x1ed864);if(_0x27acf2&&('tableRow'==_0x27acf2['subType']||'tableColumn'==_0x27acf2['subType'])){const _0x4129e7=this['_getSuggestionCoords'](_0x27acf2);for(const _0x1a4319 of _0x4f9322){const _0x5dbdb7=_0x468257['createRangeOn'](_0x1a4319),_0x341905=_0x439a96['getCellLocation'](_0x1a4319),_0x4ae511=_0x1a4319['getAttribute'](_0x3f8d06)-0x1,_0x4f5d31=_0x4129e7[_0x31fcca],_0x15cd3c=_0x4129e7[_0x261c94];_0x4f5d31<=_0x341905[_0x1f2bac]&&_0x341905[_0x1f2bac]+_0x4ae511<=_0x15cd3c&&_0x27acf2['addRange'](_0x5dbdb7);}}});});}function _0x53c58a(_0x2cdad1){const _0x113862=Array['from'](_0x22750b['getRanges']())['map'](_0x547fce=>_0x3420fa['fromRange'](_0x547fce));_0x4a455f['model']['change'](_0x51107f=>{const _0x963c81=_0x51107f['batch'];_0x2cdad1=_0x2cdad1['filter'](_0x491565=>'$graveyard'!=_0x491565['root']['rootName']),_0x51107f['setSelection'](_0x2cdad1),_0x4a455f['commands']['get']('removeTableRow')['refresh'](),_0x4a455f['execute']('removeTableRow',{'forceDefaultExecution':!0x0}),_0x4a455f['model']['enqueueChange'](()=>{_0x4a455f['model']['enqueueChange'](_0x963c81,_0x5f131f=>{const _0x79238a=_0x113862['filter'](_0x23d8cd=>'$graveyard'!=_0x23d8cd['root']['rootName']);_0x79238a['length']>0x0&&_0x5f131f['setSelection'](_0x79238a);for(const _0x1af0c6 of _0x113862)_0x1af0c6['detach']();});});});}function _0xf5b8a5(_0x2405fb){_0x4a455f['model']['change'](_0xd94c94=>{const _0x48bb90=Array['from'](_0x22750b['getRanges']())['map'](_0x289e1b=>_0x3420fa['fromRange'](_0x289e1b)),_0x8d2dc0=[];for(const _0x8f63af of _0x2405fb)for(const _0x6d4bed of _0x8f63af['getItems']({'shallow':!0x0}))_0x8d2dc0['push'](_0x6d4bed);for(const _0xb2c6ea of _0x8d2dc0)'$graveyard'!=_0xb2c6ea['root']['rootName']&&(_0xd94c94['setSelection'](_0xd94c94['createPositionAt'](_0xb2c6ea,0x0)),_0x4a455f['commands']['get']('removeTableColumn')['refresh'](),_0x4a455f['execute']('removeTableColumn',{'forceDefaultExecution':!0x0}));const _0x48e4d9=_0x48bb90['filter'](_0x2be7aa=>'$graveyard'!=_0x2be7aa['root']['rootName']);_0x48e4d9['length']>0x0&&_0xd94c94['setSelection'](_0x48e4d9);for(const _0x3d762a of _0x48bb90)_0x3d762a['detach']();});}function _0x956b5b(_0x432419,_0x445ce5){return _0x445ce5['every'](_0x3ab399=>_0x432419['some'](_0x41bb3c=>_0x41bb3c['end']['isEqual'](_0x3ab399['start'])||_0x3ab399['end']['isEqual'](_0x41bb3c['start'])));}function _0x1dc2a9(_0x539ac7,_0x1df285){return _0x539ac7['some'](_0x43e52d=>_0x1df285['some'](_0x2b0254=>_0x43e52d['end']['isTouching'](_0x2b0254['start'])));}_0x4a455f['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x4b428c,_0x98c48f,_0x55edf7)=>{if(!_0x55edf7['options']['showSuggestionHighlights'])return;const _0x5d8979=_0x98c48f['item'];if(!_0x5d8979)return;const _0x3e7a8d=_0x55edf7['mapper']['toViewElement'](_0x5d8979);function _0x32d84b(_0x5c0206){return Array['isArray'](_0x5c0206)?_0x5c0206:[_0x5c0206];}_0x3e7a8d&&'tableCell'===_0x5d8979['name']&&$t(_0x3e7a8d,_0x55edf7['writer'],(_0x44ceea,_0x249850,_0x12dee9)=>_0x12dee9['addClass'](_0x32d84b(_0x249850['classes']),_0x44ceea),(_0x3027b9,_0xa4aa68,_0x2bacf2)=>_0x2bacf2['removeClass'](_0x32d84b(_0xa4aa68['classes']),_0x3027b9));},{'priority':'highest'}),_0x479bd0['_descriptionFactory']['registerDescriptionCallback'](_0x406610=>{if('insertion'!=_0x406610['type']&&'deletion'!=_0x406610['type'])return;const _0x3c49a0=_0x406610['getContainedElement']();if(null!=_0x3c49a0&&_0x3c49a0['is']('element','table')){if('insertion'==_0x406610['type']){const _0x547ad6=_0x406610['getItems']()['filter'](_0x5d5b12=>_0x5d5b12['is']('textProxy'))['map'](_0x52f99d=>_0x52f99d['data']);if(_0x547ad6['length'])return{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x547ad6['join']('\x20')+'\x22'))};}if('deletion'==_0x406610['type']){const _0x3f3122=_0x406610['getItems']()['filter'](_0x2795fb=>_0x2795fb['is']('textProxy'))['map'](_0x1c224a=>_0x1c224a['data']);if(_0x3f3122['length'])return{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x3f3122['join']('\x20')+'\x22'))};}}}),_0x479bd0['_descriptionFactory']['registerDescriptionCallback'](_0x454c5e=>{if('tableRow'==_0x454c5e['subType']){const _0x5ea154=_0x454c5e['getItems']()['filter'](_0x2915fa=>_0x2915fa['is']('textProxy'))['map'](_0x391cb7=>_0x391cb7['data']),_0x4abccd=this['_getSuggestionCoords'](_0x454c5e),_0x464c5a=_0x4abccd['maxRow']-_0x4abccd['minRow']+0x1;if('insertion'==_0x454c5e['type'])return _0x5ea154['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0x464c5a,'\x22'+_0x5ea154['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0x464c5a))};if('deletion'==_0x454c5e['type'])return _0x5ea154['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0x464c5a,'\x22'+_0x5ea154['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0x464c5a))};}if('tableColumn'==_0x454c5e['subType']){const _0x417f69=_0x454c5e['getItems']()['filter'](_0x41735d=>_0x41735d['is']('textProxy'))['map'](_0x28c5a5=>_0x28c5a5['data']),_0x5d5f71=this['_getSuggestionCoords'](_0x454c5e),_0x5e1d12=_0x5d5f71['maxColumn']-_0x5d5f71['minColumn']+0x1;if('insertion'==_0x454c5e['type'])return _0x417f69['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x5e1d12,'\x22'+_0x417f69['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x5e1d12))};if('deletion'==_0x454c5e['type'])return _0x417f69['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x5e1d12,'\x22'+_0x417f69['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x5e1d12))};}}),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','discard',_0x53c58a),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','accept',_0x53c58a),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','discard',_0xf5b8a5),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','accept',_0xf5b8a5),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','join',_0x956b5b),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','join',_0x956b5b),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','join',_0x1dc2a9),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','join',_0x1dc2a9);}['_acceptFormatSuggestionCallbackFactory'](){const _0x3e1988=this['editor'],_0x279260=_0x3e1988['model']['document']['selection'];return(_0x38c3c0,_0x25f032)=>{_0x3e1988['model']['change'](_0x3e582f=>{const {commandName:_0x43e1bd,commandParams:_0x5ed5e8}=_0x25f032;let _0x3e4f26=_0x38c3c0[0x0]['end']['nodeBefore'];_0x5ed5e8&&_0x5ed5e8[0x0]&&!0x1===_0x5ed5e8[0x0]['forceValue']&&(_0x3e4f26=_0x38c3c0[0x0]['start']['nodeAfter']);const _0x35c865=_0x3e582f['createRangeIn'](_0x3e4f26);if('$graveyard'==_0x35c865['root']['rootName'])return;const _0x5c6f54=Array['from'](_0x279260['getRanges']())['map'](_0x3e17cb=>_0x3420fa['fromRange'](_0x3e17cb));_0x3e582f['setSelection'](_0x35c865),_0x3e1988['commands']['get'](_0x43e1bd)['refresh'](),_0x5ed5e8['push']({'forceDefaultExecution':!0x0}),_0x3e1988['execute'](_0x43e1bd,..._0x5ed5e8);const _0xa1e130=_0x5c6f54['filter'](_0x5eb83d=>'$graveyard'!=_0x5eb83d['root']['rootName']);_0xa1e130['length']>0x0&&_0x3e582f['setSelection'](_0xa1e130);for(const _0x42eea5 of _0x5c6f54)_0x42eea5['detach']();});};}['_getCoordsForCells'](_0x560cc9){const _0x9e629=this['editor']['plugins']['get']('TableUtils');let _0x449b87=Number['MAX_SAFE_INTEGER'],_0x187b5c=Number['MIN_SAFE_INTEGER'],_0x55564e=Number['MAX_SAFE_INTEGER'],_0x5f5cd5=Number['MIN_SAFE_INTEGER'];for(const _0x5ba4bd of _0x560cc9){if('$graveyard'==_0x5ba4bd['root']['rootName'])continue;const {row:_0x5f420b,column:_0x1796c5}=_0x9e629['getCellLocation'](_0x5ba4bd),_0x377c7a=_0x5ba4bd['hasAttribute']('rowspan')?_0x5ba4bd['getAttribute']('rowspan')-0x1:0x0,_0x14e755=_0x5ba4bd['hasAttribute']('colspan')?_0x5ba4bd['getAttribute']('colspan')-0x1:0x0;_0x449b87=_0x5f420b<_0x449b87?_0x5f420b:_0x449b87,_0x187b5c=_0x5f420b+_0x377c7a>_0x187b5c?_0x5f420b+_0x377c7a:_0x187b5c,_0x55564e=_0x1796c5<_0x55564e?_0x1796c5:_0x55564e,_0x5f5cd5=_0x1796c5+_0x14e755>_0x5f5cd5?_0x1796c5+_0x14e755:_0x5f5cd5;}return{'minRow':_0x449b87,'maxRow':_0x187b5c,'minColumn':_0x55564e,'maxColumn':_0x5f5cd5};}['_setupColumnsRowsFixing'](){const _0x16750b=this['editor'],_0x2743cc=_0x16750b['plugins']['get']('TrackChangesEditing'),_0x23c4c4=_0x16750b['plugins']['get']('TableUtils');this['_tableSuggestions']=new Set(),_0x16750b['model']['document']['on']('change:data',()=>{const _0x3a31bc=Array['from'](_0x16750b['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x7631a4,data:_0x1afa0d}of _0x3a31bc){const {group:_0x3c53ca,id:_0x46ad27,subType:_0x3ae89d}=_0x2743cc['_splitMarkerName'](_0x7631a4);if('suggestion'!=_0x3c53ca)continue;if(null!=_0x1afa0d['oldRange'])continue;const _0x632d55=_0x2743cc['getSuggestion'](_0x46ad27);this['_tablePostFixingSubtypes']['includes'](_0x3ae89d)&&this['_tableSuggestions']['add'](_0x632d55);}},{'priority':'low'});const _0x387cc8=(_0x4d8d82,_0x3722df)=>{let _0x5072ac=!0x1;const _0x598ea6=_0x3722df['createRangeOn'](_0x4d8d82),_0x2524b6=_0x4d8d82['findAncestor']('table'),_0xe8f547=_0x23c4c4['getCellLocation'](_0x4d8d82);for(const _0x164120 of this['_tableSuggestions']){const _0x5f1adf=_0x164120['subType'],_0x101999=_0x5f1adf['startsWith']('tablePaste'),_0x165cd1=_0x5f1adf['substr'](_0x101999?0xa:0x5),_0xb94b1e=_0x165cd1['toLowerCase'](),_0x5f3b7d=_0xb94b1e['substr'](0x0,0x3)+'span',_0x277001='min'+_0x165cd1,_0x218f56='max'+_0x165cd1;if(!_0x164120['isInContent'])continue;if(_0x2524b6!=_0x164120['getFirstRange']()['start']['findAncestor']('table'))continue;if(_0x164120['isIntersectingWithRange'](_0x598ea6))continue;const _0x4c9194=_0x4d8d82['hasAttribute'](_0x5f3b7d)?_0x4d8d82['getAttribute'](_0x5f3b7d)-0x1:0x0,_0x24ee45=this['_getSuggestionCoords'](_0x164120),_0x2fe620=_0x24ee45[_0x277001],_0x301973=_0x24ee45[_0x218f56];_0x2fe620<=_0xe8f547[_0xb94b1e]&&_0xe8f547[_0xb94b1e]+_0x4c9194<=_0x301973&&(_0x164120['addRange'](_0x598ea6),_0x5072ac=!0x0);}return _0x5072ac;};_0x16750b['model']['document']['registerPostFixer'](_0x13cf8d=>{let _0x3bf694=!0x1;for(const _0x479be5 of _0x16750b['model']['document']['differ']['getChanges']())if('insert'==_0x479be5['type']){if('tableRow'==_0x479be5['name'])for(const _0x4b9a1d of _0x479be5['position']['nodeAfter']['getChildren']())_0x3bf694=_0x3bf694||_0x387cc8(_0x4b9a1d,_0x13cf8d);else'tableCell'==_0x479be5['name']&&(_0x3bf694=_0x3bf694||_0x387cc8(_0x479be5['position']['nodeAfter'],_0x13cf8d));}return _0x3bf694;});}['_getSuggestionCoords'](_0x4cebf8){return this['_getCoordsForCells'](_0x4cebf8['getRanges']()['map'](_0x527ebd=>_0x527ebd['start']['nodeAfter']));}}function Wt(_0x3ab41c){return Array['from'](new Set(_0x3ab41c)['values']());}
|
|
23
|
+
const _0x3967=['showSuggestionHighlights','table','left','getRanges','getSuggestion','insertTableColumnLeft','accept','textProxy','createTableWalker','has','enqueueChange','colspan','getChanges','_getCoordsForCells','TrackChangesEditing','isArray','plugins','minColumn','rootName','filter','position','_setupColumnsRowsFixing','join','refresh','length','_getSuggestionCoords','getAttribute','toLowerCase','tableCell','writer','getColumnIndexes','maxRow','item','low','start','isTouching','tablePaste','TableUtils','element','markMultiRangeInsertion','_descriptionFactory','batch','selectTableColumn','map','getChangedMarkers','createRangeOn','insert','_suggestionFactory','addRange','values','execute','getItems','createRangeIn','name','tableColumn','removeTableColumn','end','tableRow','discard','findAncestor','deletion','MAX_SAFE_INTEGER','ELEMENT_TABLE','change','ELEMENT_TABLE_COLUMN','insertion','_tableSuggestions','detach','ELEMENT_TABLE_WITH_TEXT','getRowIndexes','hasAttribute','min','isEqual','MIN_SAFE_INTEGER','removeTableRow','commands','isIntersectingWithRange','$graveyard','locale','data','cell','rowspan','getFirstRange','max','afterInit','*Insert:*\x20%0','suggestion','from','*Remove:*\x20%0','ELEMENT_TABLE_ROW_WITH_TEXT','highest','setSelection','above','model','_tablePostFixingSubtypes','fromRange','root','nodeBefore','getCellLocation','get','getSelectionAffectedTableCells','enableCommand','mapper','registerPostFixer','registerDescriptionCallback','markMultiRangeDeletion','removeClass','nodeAfter','insertTableColumnRight','last','downcastDispatcher','substr','forceValue','ELEMENT_TABLE_ROW','getChildren','differ','subType','span','options','editor','includes','registerCustomCallback','order','document','createPositionAt','type','toViewElement','first','addClass','selectTableRow'];(function(_0x31dfc6,_0x3967db){const _0x2fb83a=function(_0x2c9067){while(--_0x2c9067){_0x31dfc6['push'](_0x31dfc6['shift']());}};_0x2fb83a(++_0x3967db);}(_0x3967,0x135));const _0x2fb8=function(_0x31dfc6,_0x3967db){_0x31dfc6=_0x31dfc6-0x0;let _0x2fb83a=_0x3967[_0x31dfc6];return _0x2fb83a;};import{Plugin as _0x33cdf0}from'ckeditor5/src/core';import{LiveRange as _0x348d04}from'ckeditor5/src/engine';import{setHighlightHandling as _0x24dd65}from'ckeditor5/src/widget';import{getTranslation as _0x181965}from'../utils/common-translations';export default class ct extends _0x33cdf0{constructor(_0x225f56){super(_0x225f56),this['_tablePostFixingSubtypes']=[_0x2fb8('0x8'),_0x2fb8('0x5')];}[_0x2fb8('0x23')](){const _0x10a82a=this[_0x2fb8('0x46')],_0x1ebdd8=_0x10a82a[_0x2fb8('0x2c')][_0x2fb8('0x4a')]['selection'];if(!_0x10a82a['plugins'][_0x2fb8('0x5a')]('TableEditing'))return;const _0x59626a=_0x10a82a[_0x2fb8('0x1d')],_0x26443b=_0x10a82a['plugins'][_0x2fb8('0x32')](_0x2fb8('0x5f')),_0x1e7cf2=_0x10a82a[_0x2fb8('0x61')][_0x2fb8('0x32')](_0x2fb8('0x76'));_0x26443b[_0x2fb8('0x79')]['registerElementLabel'](_0x2fb8('0x52'),_0x2c6dd5=>_0x181965(_0x59626a,_0x2fb8('0xd'),_0x2c6dd5)),this[_0x2fb8('0x66')](),_0x26443b[_0x2fb8('0x34')]('insertTable'),_0x26443b[_0x2fb8('0x34')](_0x2fb8('0x50')),_0x26443b[_0x2fb8('0x34')](_0x2fb8('0x7b'));for(const _0x5ed7dd of['insertTableRowAbove','insertTableRowBelow']){const _0x296949=_0x10a82a[_0x2fb8('0x1a')][_0x2fb8('0x32')](_0x5ed7dd);_0x26443b[_0x2fb8('0x34')](_0x5ed7dd,_0x96a6bb=>{_0x10a82a[_0x2fb8('0x2c')][_0x2fb8('0xe')](_0x441a06=>{_0x96a6bb();const _0x295b9e=_0x2fb8('0x2b')===_0x296949[_0x2fb8('0x49')],_0x2746a6=_0x1e7cf2[_0x2fb8('0x33')](_0x1ebdd8),_0x3dcdd3=_0x1e7cf2[_0x2fb8('0x14')](_0x2746a6),_0x424169=_0x295b9e?_0x3dcdd3[_0x2fb8('0x4e')]-0x1:_0x3dcdd3[_0x2fb8('0x3c')]+0x1,_0x31fdcb=_0x2746a6[0x0][_0x2fb8('0xa')](_0x2fb8('0x52')),_0x385c64=_0x1e7cf2[_0x2fb8('0x59')](_0x31fdcb,{'startRow':_0x424169,'endRow':_0x424169}),_0x4e1d3f=Array[_0x2fb8('0x26')](_0x385c64)['map'](_0x823688=>_0x441a06[_0x2fb8('0x7e')](_0x823688['cell']));_0x26443b[_0x2fb8('0x78')](_0x4e1d3f,_0x2fb8('0x8'));});});}for(const _0x33af41 of[_0x2fb8('0x56'),_0x2fb8('0x3b')]){const _0x20fc94=_0x10a82a[_0x2fb8('0x1a')][_0x2fb8('0x32')](_0x33af41);_0x26443b[_0x2fb8('0x34')](_0x33af41,_0xb2e9b5=>{_0x10a82a['model'][_0x2fb8('0xe')](_0x1cdfa2=>{_0xb2e9b5();const _0x15e455=_0x2fb8('0x53')===_0x20fc94['order'],_0x4de95c=_0x1e7cf2['getSelectionAffectedTableCells'](_0x1ebdd8),_0x47dbc4=_0x1e7cf2[_0x2fb8('0x6f')](_0x4de95c),_0x3bfe5e=_0x15e455?_0x47dbc4['first']-0x1:_0x47dbc4[_0x2fb8('0x3c')]+0x1,_0x12b667=_0x4de95c[0x0]['findAncestor']('table'),_0x1d3337=_0x1e7cf2['createTableWalker'](_0x12b667,{'startRow':0x0,'column':_0x3bfe5e,'includeAllSlots':!0x1}),_0x13a98c=Array[_0x2fb8('0x26')](_0x1d3337)[_0x2fb8('0x7c')](_0x4e0999=>_0x1cdfa2[_0x2fb8('0x7e')](_0x4e0999[_0x2fb8('0x1f')]));_0x26443b[_0x2fb8('0x78')](_0x13a98c,'tableColumn');});});}for(const _0x4d8ff1 of['removeTableRow',_0x2fb8('0x6')]){const _0x538b86=_0x4d8ff1[_0x2fb8('0x3e')](0xb),_0x4b5222=_0x538b86[_0x2fb8('0x6c')](),_0x4a30df=_0x4b5222[_0x2fb8('0x3e')](0x0,0x3)+'span',_0x2620ec='table'+_0x538b86,_0x1a0755='min'+_0x538b86,_0x55caa4=_0x2fb8('0x22')+_0x538b86;_0x26443b[_0x2fb8('0x34')](_0x4d8ff1,()=>{_0x10a82a[_0x2fb8('0x2c')][_0x2fb8('0xe')](_0x49f891=>{const _0x1dfe75=_0x1e7cf2['getSelectionAffectedTableCells'](_0x1ebdd8),_0x20d37d=_0x1dfe75[0x0][_0x2fb8('0xa')](_0x2fb8('0x52'));let _0x5a45f4;if(_0x2fb8('0x19')==_0x4d8ff1){const _0x49bddd=_0x1e7cf2[_0x2fb8('0x14')](_0x1dfe75);_0x5a45f4={'startRow':_0x49bddd['first'],'endRow':_0x49bddd[_0x2fb8('0x3c')],'includeAllSlots':!0x0};}else{const _0x193381=_0x1e7cf2[_0x2fb8('0x6f')](_0x1dfe75);_0x5a45f4={'startColumn':_0x193381[_0x2fb8('0x4e')],'endColumn':_0x193381[_0x2fb8('0x3c')],'includeAllSlots':!0x0};}const _0x3d838e=_0x1e7cf2['createTableWalker'](_0x20d37d,_0x5a45f4),_0x4127e9=Array[_0x2fb8('0x26')](_0x3d838e)[_0x2fb8('0x7c')](({cell:_0x35b8ad})=>_0x35b8ad),_0x5a40a3=Bt(_0x4127e9[_0x2fb8('0x64')](_0x4067d3=>_0x4067d3['hasAttribute'](_0x4a30df))),_0x397216=Bt(_0x4127e9[_0x2fb8('0x64')](_0x36fd8e=>!_0x36fd8e[_0x2fb8('0x15')](_0x4a30df)))[_0x2fb8('0x7c')](_0x256992=>_0x49f891[_0x2fb8('0x7e')](_0x256992)),_0x3cb8e1=_0x26443b[_0x2fb8('0x38')](_0x397216,_0x2620ec);if(_0x3cb8e1&&(_0x2fb8('0x8')==_0x3cb8e1['subType']||'tableColumn'==_0x3cb8e1[_0x2fb8('0x43')])){const _0x136bdd=this[_0x2fb8('0x6a')](_0x3cb8e1);for(const _0x5e908a of _0x5a40a3){const _0x74004e=_0x49f891[_0x2fb8('0x7e')](_0x5e908a),_0x4d8ca7=_0x1e7cf2[_0x2fb8('0x31')](_0x5e908a),_0x97fd48=_0x5e908a[_0x2fb8('0x6b')](_0x4a30df)-0x1,_0x27c940=_0x136bdd[_0x1a0755],_0x2e8dfd=_0x136bdd[_0x55caa4];_0x27c940<=_0x4d8ca7[_0x4b5222]&&_0x4d8ca7[_0x4b5222]+_0x97fd48<=_0x2e8dfd&&_0x3cb8e1[_0x2fb8('0x81')](_0x74004e);}}});});}function _0x40210b(_0x52dc39){const _0x26f9af=Array['from'](_0x1ebdd8[_0x2fb8('0x54')]())[_0x2fb8('0x7c')](_0x2d1dea=>_0x348d04[_0x2fb8('0x2e')](_0x2d1dea));_0x10a82a['model'][_0x2fb8('0xe')](_0xf8d544=>{const _0x5ed68a=_0xf8d544[_0x2fb8('0x7a')];_0x52dc39=_0x52dc39[_0x2fb8('0x64')](_0x431051=>'$graveyard'!=_0x431051[_0x2fb8('0x2f')][_0x2fb8('0x63')]),_0xf8d544[_0x2fb8('0x2a')](_0x52dc39),_0x10a82a['commands'][_0x2fb8('0x32')](_0x2fb8('0x19'))[_0x2fb8('0x68')](),_0x10a82a[_0x2fb8('0x1')]('removeTableRow',{'forceDefaultExecution':!0x0}),_0x10a82a[_0x2fb8('0x2c')][_0x2fb8('0x5b')](()=>{_0x10a82a[_0x2fb8('0x2c')][_0x2fb8('0x5b')](_0x5ed68a,_0x149e2b=>{const _0x119bfc=_0x26f9af['filter'](_0x221cde=>_0x2fb8('0x1c')!=_0x221cde[_0x2fb8('0x2f')][_0x2fb8('0x63')]);_0x119bfc[_0x2fb8('0x69')]>0x0&&_0x149e2b[_0x2fb8('0x2a')](_0x119bfc);for(const _0x279df9 of _0x26f9af)_0x279df9[_0x2fb8('0x12')]();});});});}function _0x27ba6f(_0x1b776e){_0x10a82a[_0x2fb8('0x2c')][_0x2fb8('0xe')](_0x43b44c=>{const _0x275ae4=Array[_0x2fb8('0x26')](_0x1ebdd8[_0x2fb8('0x54')]())[_0x2fb8('0x7c')](_0x7671cd=>_0x348d04['fromRange'](_0x7671cd)),_0x1f74a9=[];for(const _0x11eb0a of _0x1b776e)for(const _0x5dda1d of _0x11eb0a[_0x2fb8('0x2')]({'shallow':!0x0}))_0x1f74a9['push'](_0x5dda1d);for(const _0x4190c2 of _0x1f74a9)_0x2fb8('0x1c')!=_0x4190c2[_0x2fb8('0x2f')][_0x2fb8('0x63')]&&(_0x43b44c[_0x2fb8('0x2a')](_0x43b44c[_0x2fb8('0x4b')](_0x4190c2,0x0)),_0x10a82a[_0x2fb8('0x1a')][_0x2fb8('0x32')](_0x2fb8('0x6'))[_0x2fb8('0x68')](),_0x10a82a['execute'](_0x2fb8('0x6'),{'forceDefaultExecution':!0x0}));const _0x3d0c4f=_0x275ae4['filter'](_0x2f57df=>_0x2fb8('0x1c')!=_0x2f57df[_0x2fb8('0x2f')]['rootName']);_0x3d0c4f[_0x2fb8('0x69')]>0x0&&_0x43b44c[_0x2fb8('0x2a')](_0x3d0c4f);for(const _0x41df61 of _0x275ae4)_0x41df61[_0x2fb8('0x12')]();});}function _0x1ac8e2(_0x98f6c1,_0x311606){return _0x311606['every'](_0x5a0cbc=>_0x98f6c1['some'](_0x186114=>_0x186114[_0x2fb8('0x7')][_0x2fb8('0x17')](_0x5a0cbc[_0x2fb8('0x73')])||_0x5a0cbc[_0x2fb8('0x7')]['isEqual'](_0x186114['start'])));}function _0xe7eec1(_0x3bb436,_0x495f39){return _0x3bb436['some'](_0x54b53b=>_0x495f39['some'](_0x3878b0=>_0x54b53b['end'][_0x2fb8('0x74')](_0x3878b0[_0x2fb8('0x73')])));}_0x10a82a['data'][_0x2fb8('0x3d')]['on']('addMarker:suggestion',(_0x19518f,_0x57b146,_0x44a255)=>{if(!_0x44a255[_0x2fb8('0x45')][_0x2fb8('0x51')])return;const _0xefa5ec=_0x57b146[_0x2fb8('0x71')];if(!_0xefa5ec)return;const _0xc31548=_0x44a255[_0x2fb8('0x35')][_0x2fb8('0x4d')](_0xefa5ec);function _0x5bd670(_0x57fdbd){return Array[_0x2fb8('0x60')](_0x57fdbd)?_0x57fdbd:[_0x57fdbd];}_0xc31548&&_0x2fb8('0x6d')===_0xefa5ec['name']&&_0x24dd65(_0xc31548,_0x44a255[_0x2fb8('0x6e')],(_0x12fb50,_0x46b2a7,_0x417d72)=>_0x417d72[_0x2fb8('0x4f')](_0x5bd670(_0x46b2a7['classes']),_0x12fb50),(_0x113309,_0xebc42e,_0x7e7ad0)=>_0x7e7ad0[_0x2fb8('0x39')](_0x5bd670(_0xebc42e['classes']),_0x113309));},{'priority':_0x2fb8('0x29')}),_0x26443b['_descriptionFactory'][_0x2fb8('0x37')](_0x429680=>{if(_0x2fb8('0x10')!=_0x429680[_0x2fb8('0x4c')]&&_0x2fb8('0xb')!=_0x429680[_0x2fb8('0x4c')])return;const _0x4f2e2f=_0x429680['getContainedElement']();if(null!=_0x4f2e2f&&_0x4f2e2f['is'](_0x2fb8('0x77'),_0x2fb8('0x52'))){if('insertion'==_0x429680[_0x2fb8('0x4c')]){const _0x71d17d=_0x429680[_0x2fb8('0x2')]()[_0x2fb8('0x64')](_0x5dd819=>_0x5dd819['is'](_0x2fb8('0x58')))['map'](_0x18227c=>_0x18227c[_0x2fb8('0x1e')]);if(_0x71d17d[_0x2fb8('0x69')])return{'type':_0x2fb8('0x10'),'content':_0x181965(_0x59626a,'*Insert:*\x20%0',_0x181965(_0x59626a,_0x2fb8('0x13'),'\x22'+_0x71d17d['join']('\x20')+'\x22'))};}if(_0x2fb8('0xb')==_0x429680[_0x2fb8('0x4c')]){const _0xb26763=_0x429680[_0x2fb8('0x2')]()['filter'](_0x38696c=>_0x38696c['is'](_0x2fb8('0x58')))[_0x2fb8('0x7c')](_0x2b8220=>_0x2b8220[_0x2fb8('0x1e')]);if(_0xb26763['length'])return{'type':'deletion','content':_0x181965(_0x59626a,_0x2fb8('0x27'),_0x181965(_0x59626a,_0x2fb8('0x13'),'\x22'+_0xb26763[_0x2fb8('0x67')]('\x20')+'\x22'))};}}}),_0x26443b[_0x2fb8('0x79')]['registerDescriptionCallback'](_0x233cd2=>{if(_0x2fb8('0x8')==_0x233cd2['subType']){const _0x5690f6=_0x233cd2[_0x2fb8('0x2')]()['filter'](_0x533693=>_0x533693['is']('textProxy'))[_0x2fb8('0x7c')](_0x2004ac=>_0x2004ac[_0x2fb8('0x1e')]),_0x448466=this['_getSuggestionCoords'](_0x233cd2),_0x5ef2e4=_0x448466[_0x2fb8('0x70')]-_0x448466['minRow']+0x1;if('insertion'==_0x233cd2[_0x2fb8('0x4c')])return _0x5690f6[_0x2fb8('0x69')]?{'type':'insertion','content':_0x181965(_0x59626a,'*Insert:*\x20%0',_0x181965(_0x59626a,_0x2fb8('0x28'),[_0x5ef2e4,'\x22'+_0x5690f6[_0x2fb8('0x67')]('\x20')+'\x22']))}:{'type':_0x2fb8('0x10'),'content':_0x181965(_0x59626a,_0x2fb8('0x24'),_0x181965(_0x59626a,_0x2fb8('0x40'),_0x5ef2e4))};if(_0x2fb8('0xb')==_0x233cd2[_0x2fb8('0x4c')])return _0x5690f6['length']?{'type':'deletion','content':_0x181965(_0x59626a,_0x2fb8('0x27'),_0x181965(_0x59626a,_0x2fb8('0x28'),[_0x5ef2e4,'\x22'+_0x5690f6[_0x2fb8('0x67')]('\x20')+'\x22']))}:{'type':_0x2fb8('0xb'),'content':_0x181965(_0x59626a,_0x2fb8('0x27'),_0x181965(_0x59626a,_0x2fb8('0x40'),_0x5ef2e4))};}if(_0x2fb8('0x5')==_0x233cd2[_0x2fb8('0x43')]){const _0x5af83a=_0x233cd2[_0x2fb8('0x2')]()[_0x2fb8('0x64')](_0x185629=>_0x185629['is'](_0x2fb8('0x58')))[_0x2fb8('0x7c')](_0x9eb162=>_0x9eb162[_0x2fb8('0x1e')]),_0x2bd91a=this[_0x2fb8('0x6a')](_0x233cd2),_0x1a5996=_0x2bd91a['maxColumn']-_0x2bd91a[_0x2fb8('0x62')]+0x1;if(_0x2fb8('0x10')==_0x233cd2[_0x2fb8('0x4c')])return _0x5af83a[_0x2fb8('0x69')]?{'type':'insertion','content':_0x181965(_0x59626a,'*Insert:*\x20%0',_0x181965(_0x59626a,'ELEMENT_TABLE_COLUMN_WITH_TEXT',[_0x1a5996,'\x22'+_0x5af83a['join']('\x20')+'\x22']))}:{'type':_0x2fb8('0x10'),'content':_0x181965(_0x59626a,_0x2fb8('0x24'),_0x181965(_0x59626a,_0x2fb8('0xf'),_0x1a5996))};if('deletion'==_0x233cd2['type'])return _0x5af83a[_0x2fb8('0x69')]?{'type':_0x2fb8('0xb'),'content':_0x181965(_0x59626a,_0x2fb8('0x27'),_0x181965(_0x59626a,'ELEMENT_TABLE_COLUMN_WITH_TEXT',[_0x1a5996,'\x22'+_0x5af83a['join']('\x20')+'\x22']))}:{'type':'deletion','content':_0x181965(_0x59626a,_0x2fb8('0x27'),_0x181965(_0x59626a,_0x2fb8('0xf'),_0x1a5996))};}}),_0x26443b[_0x2fb8('0x80')][_0x2fb8('0x48')](_0x2fb8('0x10'),_0x2fb8('0x8'),_0x2fb8('0x9'),_0x40210b),_0x26443b[_0x2fb8('0x80')]['registerCustomCallback'](_0x2fb8('0xb'),'tableRow',_0x2fb8('0x57'),_0x40210b),_0x26443b[_0x2fb8('0x80')][_0x2fb8('0x48')](_0x2fb8('0x10'),'tableColumn',_0x2fb8('0x9'),_0x27ba6f),_0x26443b[_0x2fb8('0x80')][_0x2fb8('0x48')]('deletion',_0x2fb8('0x5'),_0x2fb8('0x57'),_0x27ba6f),_0x26443b[_0x2fb8('0x80')][_0x2fb8('0x48')](_0x2fb8('0x10'),_0x2fb8('0x5'),_0x2fb8('0x67'),_0x1ac8e2),_0x26443b[_0x2fb8('0x80')][_0x2fb8('0x48')]('deletion',_0x2fb8('0x5'),'join',_0x1ac8e2),_0x26443b[_0x2fb8('0x80')][_0x2fb8('0x48')](_0x2fb8('0x10'),_0x2fb8('0x8'),'join',_0xe7eec1),_0x26443b[_0x2fb8('0x80')]['registerCustomCallback'](_0x2fb8('0xb'),_0x2fb8('0x8'),_0x2fb8('0x67'),_0xe7eec1);}['_acceptFormatSuggestionCallbackFactory'](){const _0x35a8ba=this[_0x2fb8('0x46')],_0x23e8f4=_0x35a8ba['model']['document']['selection'];return(_0x25eb70,_0x4a844b)=>{_0x35a8ba[_0x2fb8('0x2c')][_0x2fb8('0xe')](_0x12c8ff=>{const {commandName:_0x233952,commandParams:_0x31aa28}=_0x4a844b;let _0x3d79d0=_0x25eb70[0x0][_0x2fb8('0x7')][_0x2fb8('0x30')];_0x31aa28&&_0x31aa28[0x0]&&!0x1===_0x31aa28[0x0][_0x2fb8('0x3f')]&&(_0x3d79d0=_0x25eb70[0x0]['start'][_0x2fb8('0x3a')]);const _0x1e548c=_0x12c8ff[_0x2fb8('0x3')](_0x3d79d0);if('$graveyard'==_0x1e548c[_0x2fb8('0x2f')][_0x2fb8('0x63')])return;const _0x3deeb3=Array['from'](_0x23e8f4['getRanges']())[_0x2fb8('0x7c')](_0x200f38=>_0x348d04[_0x2fb8('0x2e')](_0x200f38));_0x12c8ff['setSelection'](_0x1e548c),_0x35a8ba['commands'][_0x2fb8('0x32')](_0x233952)[_0x2fb8('0x68')](),_0x31aa28['push']({'forceDefaultExecution':!0x0}),_0x35a8ba[_0x2fb8('0x1')](_0x233952,..._0x31aa28);const _0x273cf6=_0x3deeb3[_0x2fb8('0x64')](_0x2899c4=>'$graveyard'!=_0x2899c4[_0x2fb8('0x2f')][_0x2fb8('0x63')]);_0x273cf6['length']>0x0&&_0x12c8ff['setSelection'](_0x273cf6);for(const _0x51eb4e of _0x3deeb3)_0x51eb4e['detach']();});};}[_0x2fb8('0x5e')](_0x4a17b1){const _0x565476=this['editor']['plugins'][_0x2fb8('0x32')]('TableUtils');let _0x5e5a8b=Number[_0x2fb8('0xc')],_0x42da49=Number[_0x2fb8('0x18')],_0x347c55=Number[_0x2fb8('0xc')],_0x47f095=Number[_0x2fb8('0x18')];for(const _0x4e3209 of _0x4a17b1){if('$graveyard'==_0x4e3209[_0x2fb8('0x2f')][_0x2fb8('0x63')])continue;const {row:_0x548fe4,column:_0x55c2cc}=_0x565476[_0x2fb8('0x31')](_0x4e3209),_0x5156c0=_0x4e3209['hasAttribute'](_0x2fb8('0x20'))?_0x4e3209[_0x2fb8('0x6b')](_0x2fb8('0x20'))-0x1:0x0,_0x58cd39=_0x4e3209[_0x2fb8('0x15')](_0x2fb8('0x5c'))?_0x4e3209[_0x2fb8('0x6b')](_0x2fb8('0x5c'))-0x1:0x0;_0x5e5a8b=_0x548fe4<_0x5e5a8b?_0x548fe4:_0x5e5a8b,_0x42da49=_0x548fe4+_0x5156c0>_0x42da49?_0x548fe4+_0x5156c0:_0x42da49,_0x347c55=_0x55c2cc<_0x347c55?_0x55c2cc:_0x347c55,_0x47f095=_0x55c2cc+_0x58cd39>_0x47f095?_0x55c2cc+_0x58cd39:_0x47f095;}return{'minRow':_0x5e5a8b,'maxRow':_0x42da49,'minColumn':_0x347c55,'maxColumn':_0x47f095};}[_0x2fb8('0x66')](){const _0x5d4d75=this[_0x2fb8('0x46')],_0xcd31ad=_0x5d4d75[_0x2fb8('0x61')][_0x2fb8('0x32')](_0x2fb8('0x5f')),_0x463b11=_0x5d4d75[_0x2fb8('0x61')][_0x2fb8('0x32')](_0x2fb8('0x76'));this[_0x2fb8('0x11')]=new Set(),_0x5d4d75[_0x2fb8('0x2c')][_0x2fb8('0x4a')]['on']('change:data',()=>{const _0x3ea38e=Array[_0x2fb8('0x26')](_0x5d4d75[_0x2fb8('0x2c')][_0x2fb8('0x4a')][_0x2fb8('0x42')][_0x2fb8('0x7d')]());for(const {name:_0xf7890a,data:_0x48697d}of _0x3ea38e){const {group:_0x220f71,id:_0x13a3db,subType:_0x131804}=_0xcd31ad['_splitMarkerName'](_0xf7890a);if(_0x2fb8('0x25')!=_0x220f71)continue;if(null!=_0x48697d['oldRange'])continue;const _0x4368b2=_0xcd31ad[_0x2fb8('0x55')](_0x13a3db);this[_0x2fb8('0x2d')][_0x2fb8('0x47')](_0x131804)&&this[_0x2fb8('0x11')]['add'](_0x4368b2);}},{'priority':_0x2fb8('0x72')});const _0xdddbe5=(_0x3071b5,_0x3d2851)=>{let _0x539fb7=!0x1;const _0x226d29=_0x3d2851[_0x2fb8('0x7e')](_0x3071b5),_0x9915c0=_0x3071b5[_0x2fb8('0xa')](_0x2fb8('0x52')),_0x2e47ee=_0x463b11[_0x2fb8('0x31')](_0x3071b5);for(const _0x1d3f63 of this[_0x2fb8('0x11')]){const _0x3e5d87=_0x1d3f63[_0x2fb8('0x43')],_0x4edf53=_0x3e5d87['startsWith'](_0x2fb8('0x75')),_0x2064b3=_0x3e5d87['substr'](_0x4edf53?0xa:0x5),_0x146e1c=_0x2064b3[_0x2fb8('0x6c')](),_0x2b7846=_0x146e1c['substr'](0x0,0x3)+_0x2fb8('0x44'),_0x2a8367=_0x2fb8('0x16')+_0x2064b3,_0x1ec7ec=_0x2fb8('0x22')+_0x2064b3;if(!_0x1d3f63['isInContent'])continue;if(_0x9915c0!=_0x1d3f63[_0x2fb8('0x21')]()[_0x2fb8('0x73')]['findAncestor'](_0x2fb8('0x52')))continue;if(_0x1d3f63[_0x2fb8('0x1b')](_0x226d29))continue;const _0x1e6e33=_0x3071b5['hasAttribute'](_0x2b7846)?_0x3071b5[_0x2fb8('0x6b')](_0x2b7846)-0x1:0x0,_0x300bd7=this[_0x2fb8('0x6a')](_0x1d3f63),_0xb0090f=_0x300bd7[_0x2a8367],_0x293cb1=_0x300bd7[_0x1ec7ec];_0xb0090f<=_0x2e47ee[_0x146e1c]&&_0x2e47ee[_0x146e1c]+_0x1e6e33<=_0x293cb1&&(_0x1d3f63[_0x2fb8('0x81')](_0x226d29),_0x539fb7=!0x0);}return _0x539fb7;};_0x5d4d75[_0x2fb8('0x2c')][_0x2fb8('0x4a')][_0x2fb8('0x36')](_0x4c26fb=>{let _0x152be7=!0x1;for(const _0x2e873f of _0x5d4d75[_0x2fb8('0x2c')]['document']['differ'][_0x2fb8('0x5d')]())if(_0x2fb8('0x7f')==_0x2e873f['type']){if(_0x2fb8('0x8')==_0x2e873f[_0x2fb8('0x4')])for(const _0x9f35cc of _0x2e873f[_0x2fb8('0x65')][_0x2fb8('0x3a')][_0x2fb8('0x41')]())_0x152be7=_0x152be7||_0xdddbe5(_0x9f35cc,_0x4c26fb);else _0x2fb8('0x6d')==_0x2e873f[_0x2fb8('0x4')]&&(_0x152be7=_0x152be7||_0xdddbe5(_0x2e873f['position'][_0x2fb8('0x3a')],_0x4c26fb));}return _0x152be7;});}[_0x2fb8('0x6a')](_0x1c0b44){return this[_0x2fb8('0x5e')](_0x1c0b44['getRanges']()[_0x2fb8('0x7c')](_0x565e94=>_0x565e94[_0x2fb8('0x73')][_0x2fb8('0x3a')]));}}function Bt(_0x4fc43b){return Array[_0x2fb8('0x26')](new Set(_0x4fc43b)[_0x2fb8('0x0')]());}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x873171}from'ckeditor5/src/core';import ot from'./table';import{uid as _0x1df8a3,priorities as _0x3afe6b}from'ckeditor5/src/utils';const ne=['tableCellBorderWidth','tableCellBorderColor','tableCellBorderStyle','tableCellHorizontalAlignment','tableCellVerticalAlignment','tableCellBackgroundColor','tableCellPadding'],oe=Object['fromEntries'](ne['map'](_0x5e911d=>[_0x5e911d,null]));export default class ct extends _0x873171{static get['requires'](){return[ot];}['afterInit'](){const _0x4aff23=this['editor'];if(!_0x4aff23['plugins']['has']('TableClipboard'))return;const {t:t}=_0x4aff23['locale'],_0x34ad30=_0x4aff23['plugins']['get']('TrackChangesEditing'),_0x40b1be=_0x4aff23['plugins']['get']('TableUtils'),_0x327215=_0x4aff23['plugins']['get'](ot),_0xcb56c7=_0x4aff23['plugins']['get']('TableClipboard');_0x327215['_tablePostFixingSubtypes']['push']('tablePasteRow','tablePasteColumn'),_0x4aff23['model']['schema']['register']('tableCellSuggestion',{'allowIn':'tableCell','allowContentOf':'tableCell','isLimit':!0x0}),_0x4aff23['conversion']['elementToElement']({'model':'tableCellSuggestion','view':'suggestion-td'});let _0x315a63=null;_0x4aff23['model']['on']('insertContent',(_0xfd1764,_0x3e8ffc)=>{const [_0x27baf6,_0x62b2e8]=_0x3e8ffc,_0xa7c9c7=_0x3e8ffc[_0x3e8ffc['length']-0x1];_0xa7c9c7&&_0xa7c9c7['forceDefaultExecution']||_0x34ad30['_isForcedDefaultExecutionBlock']||this['editor']['commands']['get']('trackChanges')['value']&&function(_0x455848,_0x1ed957,_0x3dc540,_0xfd29ea,_0xd93403){if(_0x1ed957&&!_0x1ed957['is']('documentSelection'))return!0x1;const _0x239ace=_0xd93403['getTableIfOnlyTableInContent'](_0x455848,_0x3dc540);if(!_0x239ace||!se(_0x239ace,null,_0xfd29ea))return!0x1;const _0x3d97b2=_0xfd29ea['getSelectionAffectedTableCells'](_0x3dc540['document']['selection']);if(!_0x3d97b2['length'])return!0x1;const _0x40bf32=_0x3d97b2[0x0]['findAncestor']('table'),_0x4ec88e=_0xfd29ea['getRowIndexes'](_0x3d97b2),_0x177ff9=_0xfd29ea['getColumnIndexes'](_0x3d97b2),_0x1c903a={'startRow':_0x4ec88e['first'],'endRow':_0x4ec88e['last'],'startColumn':_0x177ff9['first'],'endColumn':_0x177ff9['last']};return 0x1==_0x3d97b2['length']&&(_0x1c903a['endRow']+=_0xfd29ea['getRows'](_0x239ace)-0x1,_0x1c903a['endColumn']+=_0xfd29ea['getColumns'](_0x239ace)-0x1),se(_0x40bf32,_0x1c903a,_0xfd29ea);}(_0x27baf6,_0x62b2e8,_0x4aff23['model'],_0x40b1be,_0xcb56c7)&&(_0xfd1764['stop'](),_0x315a63={'cells':[],'insertionRanges':[],'deletionRanges':[],'rowInsertionRanges':[],'rowInsertionIndexes':[],'columnInsertionRanges':[],'columnInsertionIndexes':[]},_0x4aff23['model']['change'](()=>{_0x4aff23['model']['insertContent'](_0x3e8ffc[0x0],_0x3e8ffc[0x1],_0x3e8ffc[0x2],_0x3e8ffc[0x3],{'forceDefaultExecution':!0x0});const _0x596bf2=_0x1df8a3(),{rowInsertionRanges:_0x36ae3a,columnInsertionRanges:_0x218cc9,insertionRanges:_0x15483b,deletionRanges:_0xb189c0,cells:_0x5568fb}=_0x315a63;_0x36ae3a['length']&&_0x34ad30['markMultiRangeInsertion'](_0x36ae3a,'tablePasteRow',{'tablePasteChainId':_0x596bf2}),_0x218cc9['length']&&_0x34ad30['markMultiRangeInsertion'](_0x218cc9,'tablePasteColumn',{'tablePasteChainId':_0x596bf2}),_0x15483b['length']&&_0x34ad30['markMultiRangeInsertion'](_0x15483b,'tablePaste',{'tablePasteChainId':_0x596bf2,'skipNestingCheck':!0x0}),_0xb189c0['length']&&_0x34ad30['markMultiRangeDeletion'](_0xb189c0,'tablePaste',{'tablePasteChainId':_0x596bf2,'skipNestingCheck':!0x0});const _0x417c92=_0x34ad30['markMultiRangeBlockFormat'](_0x5568fb['map'](({element:_0x12f042})=>_0x12f042),{'formatGroupId':_0x1df8a3()},[],'tablePasteCell',{'tablePasteChainId':_0x596bf2});if(_0x417c92){const _0x54b5bb=_0x417c92['getMarkers'](),_0x17f76a=[];for(const {element:_0x234dba,attributes:_0x65e824}of _0x5568fb){if(!_0x65e824)continue;const _0x565863=_0x4aff23['model']['createRangeOn'](_0x234dba),_0x5f3282=_0x54b5bb['find'](_0x1bce5d=>_0x1bce5d['getRange']()['isEqual'](_0x565863));_0x5f3282&&_0x17f76a['push']([_0x5f3282['name'],_0x65e824]);}_0x17f76a['length']&&_0x417c92['setAttribute']('markerAttributes',Object['fromEntries'](_0x17f76a));}_0x315a63=null;}));},{'priority':_0x3afe6b['high']+0xa}),_0x4aff23['plugins']['get']('TableClipboard')['on']('_replaceTableSlotCell',(_0x470bca,_0x4a5fd8)=>{const [_0xceef4b,_0x34d525,,_0x4ffd34]=_0x4a5fd8;if(!_0x315a63)return;_0x470bca['stop']();const _0x4246a1=_0xceef4b['cell'],_0x18106f=_0x34d525,_0xe0bec2=le(_0x4246a1),_0x23574b=le(_0x18106f);_0x470bca['return']=_0x4246a1;let _0x23e76b=null,_0x261b2f=null;if(_0x23574b||_0xe0bec2){if(_0xe0bec2&&!_0x23574b){_0x4ffd34['remove'](_0x4246a1['getChild'](0x0));for(const _0x301d02 of Array['from'](_0x18106f['getChildren']()))_0x4ffd34['insert'](_0x301d02,_0x4246a1,'end');const _0x451063=_0x315a63['rowInsertionIndexes']['includes'](_0xceef4b['row']),_0x2a4a4d=_0x315a63['columnInsertionIndexes']['includes'](_0xceef4b['column']);_0x451063||_0x2a4a4d||(_0x23e76b=_0x4ffd34['createRangeIn'](_0x4246a1));}else _0x23574b&&!_0xe0bec2&&(_0x261b2f=_0x4ffd34['createRangeIn'](_0x4246a1));}else{const _0x30bf14=_0x4ffd34['createElement']('tableCellSuggestion'),_0x434afe=_0x4ffd34['createElement']('tableCellSuggestion');_0x4ffd34['wrap'](_0x4ffd34['createRangeIn'](_0x4246a1),_0x434afe),_0x4ffd34['insert'](_0x30bf14,_0x4246a1,0x0);for(const _0x50afe4 of Array['from'](_0x18106f['getChildren']()))_0x4ffd34['insert'](_0x50afe4,_0x30bf14,'end');_0x23e76b=_0x4ffd34['createRangeOn'](_0x30bf14),_0x261b2f=_0x4ffd34['createRangeOn'](_0x434afe);}const _0x16c76e=Array['from'](_0x18106f['getAttributes']())['filter'](([_0xe802d6])=>ne['includes'](_0xe802d6));_0x315a63['cells']['push']({'element':_0x4246a1,'attributes':_0x16c76e['length']?Object['fromEntries'](_0x16c76e):null}),_0x23e76b&&_0x315a63['insertionRanges']['push'](_0x23e76b),_0x261b2f&&_0x315a63['deletionRanges']['push'](_0x261b2f);},{'priority':'high'}),_0x40b1be['on']('insertColumns',(_0x31c160,_0x1600dc)=>{const [_0x41f5cf,_0x36c22d={}]=_0x1600dc;if(!_0x315a63)return;const _0x45eb85=_0x36c22d['at']||0x0,_0x42478=_0x36c22d['columns']||0x1;_0x315a63['columnInsertionIndexes']=new Array(_0x42478)['fill'](_0x45eb85)['map']((_0x200bcd,_0x2f5c3b)=>_0x200bcd+_0x2f5c3b);for(const {cell:_0x13ab13}of _0x40b1be['createTableWalker'](_0x41f5cf,{'startColumn':_0x45eb85,'endColumn':_0x45eb85+_0x42478-0x1}))_0x315a63['columnInsertionRanges']['push'](_0x4aff23['model']['createRangeOn'](_0x13ab13));},{'priority':'low'}),_0x40b1be['on']('insertRows',(_0x53e7d8,_0xdc77e9)=>{const [_0x59e66b,_0x3b89ee={}]=_0xdc77e9;if(!_0x315a63)return;const _0x16c052=_0x3b89ee['at']||0x0,_0x4e8cd7=_0x3b89ee['rows']||0x1;_0x315a63['rowInsertionIndexes']=new Array(_0x4e8cd7)['fill'](_0x16c052)['map']((_0x130e1f,_0x2e4f9f)=>_0x130e1f+_0x2e4f9f);for(const {cell:_0x126553}of _0x40b1be['createTableWalker'](_0x59e66b,{'startRow':_0x16c052,'endRow':_0x16c052+_0x4e8cd7-0x1}))_0x315a63['rowInsertionRanges']['push'](_0x4aff23['model']['createRangeOn'](_0x126553));},{'priority':'low'}),_0x34ad30['_descriptionFactory']['registerDescriptionCallback'](_0x337a77=>{if(_0x337a77['subType']&&_0x337a77['subType']['startsWith']('tablePaste'))return _0x337a77['previous']?{}:{'type':'insertion','content':t('*Replace\x20table\x20cells*')};});const _0x47fcfe=()=>{};for(const _0x178fb4 of['tablePaste','tablePasteColumn','tablePasteRow','tablePasteCell'])_0x34ad30['_suggestionFactory']['registerCustomCallback']('insertion',_0x178fb4,'join',_0x47fcfe),_0x34ad30['_suggestionFactory']['registerCustomCallback']('deletion',_0x178fb4,'join',_0x47fcfe);_0x34ad30['_suggestionFactory']['registerCustomCallback']('formatBlock','tablePasteCell','discard',_0x47fcfe),_0x34ad30['_suggestionFactory']['registerCustomCallback']('formatBlock','tablePasteCell','accept',(_0x4ab348,_0x47c56b,_0x548032)=>{const _0xabd3b4=_0x4ab348['map'](_0xf874b6=>_0xf874b6['getContainedElement']())['filter'](_0x1fe92b=>_0x1fe92b),_0x9463dd=new Map(_0xabd3b4['map'](_0x55b2a8=>[_0x55b2a8,null]));if(_0x315a63)for(const {element:_0x4cf3e0,attributes:_0x515d7f}of _0x315a63['cells'])_0x515d7f&&_0x9463dd['set'](_0x4cf3e0,_0x515d7f);else{if(_0x548032&&_0x548032['markerAttributes'])for(const [_0x48889f,_0x55f7e4]of Object['entries'](_0x548032['markerAttributes'])){const _0x2236d3=_0x4aff23['model']['markers']['get'](_0x48889f),_0x465f23=_0x2236d3?_0x2236d3['getRange']()['getContainedElement']():null;_0x465f23&&_0x9463dd['set'](_0x465f23,_0x55f7e4);}}_0x4aff23['model']['change'](_0x3564ab=>{for(const [_0x439532,_0x25ae67]of _0x9463dd)_0x3564ab['setAttributes']({...oe,..._0x25ae67},_0x439532);});});const _0x119c65=(_0x1d80df,_0x17ce9a)=>{_0x34ad30['_suggestionFactory']['registerCustomCallback'](_0x1d80df,'tablePaste',_0x17ce9a,(_0x447c17,_0x4ef058,_0x4e5796)=>{_0x4aff23['model']['change'](_0x32030b=>{const _0x38a81b=[];for(const _0x1a31c6 of _0x447c17){const _0x4580bb=_0x1a31c6['start']['nodeAfter'];_0x4580bb['is']('element','tableCellSuggestion')&&_0x38a81b['push'](_0x4580bb);}_0x34ad30['_suggestionFactory']['getSuggestionCallback'](_0x1d80df,null,_0x17ce9a)(_0x447c17,_0x4ef058,_0x4e5796);for(const _0x7185f9 of _0x38a81b)'$graveyard'!=_0x7185f9['root']['rootName']&&_0x32030b['unwrap'](_0x7185f9);});});};_0x119c65('insertion','accept'),_0x119c65('insertion','discard'),_0x119c65('deletion','accept'),_0x119c65('deletion','discard'),_0x34ad30['_suggestionFactory']['registerCustomCallback']('insertion','tablePasteRow','discard',_0x5d5b87=>{const _0xdd8eb0=_0x5d5b87['map'](_0x264137=>_0x264137['getContainedElement']()),_0x3802c9=_0xdd8eb0[0x0]['findAncestor']('table'),{minRow:_0x58f013,maxRow:_0x4f497d}=_0x327215['_getCoordsForCells'](_0xdd8eb0);_0x40b1be['removeRows'](_0x3802c9,{'at':_0x58f013,'rows':_0x4f497d-_0x58f013+0x1});}),_0x34ad30['_suggestionFactory']['registerCustomCallback']('insertion','tablePasteColumn','discard',_0x32874f=>{const _0x492d73=_0x32874f['map'](_0x3eeaab=>_0x3eeaab['getContainedElement']()),_0x15391a=_0x492d73[0x0]['findAncestor']('table'),{minColumn:_0x997a5c,maxColumn:_0x343ef4}=_0x327215['_getCoordsForCells'](_0x492d73);_0x40b1be['removeColumns'](_0x15391a,{'at':_0x997a5c,'columns':_0x343ef4-_0x997a5c+0x1});});const _0x43ae45=(_0x43bd92,_0x97793f)=>{if(!_0x97793f['subType']||!_0x97793f['subType']['startsWith']('tablePaste'))return;const _0x33c5e5=_0x97793f['attributes']['tablePasteChainId'],_0x5886f4=_0x34ad30['getSuggestions']()['filter'](_0x42c26c=>_0x42c26c['isInContent']&&_0x42c26c['attributes']&&_0x42c26c['attributes']['tablePasteChainId']==_0x33c5e5);_0x5886f4['length']&&_0x97793f['getAllAdjacentSuggestions']()['length']!=_0x5886f4['length']&&_0x5886f4['reduce']((_0x574487,_0x299227)=>(_0x574487['next']=_0x299227,_0x299227['previous']=_0x574487,_0x299227));};function _0x575b4a(_0x1f5a68,{showActiveMarker:_0x34b095=!0x0}={}){const {id:_0x53660d}=_0x34ad30['_splitMarkerName'](_0x1f5a68['markerName']),_0x2c9a9c=['ck-suggestion-marker','ck-suggestion-marker-insertion'],_0x49fa49=_0x34ad30['activeMarkers']['includes'](_0x1f5a68['markerName']);return _0x49fa49&&_0x2c9a9c['push']('ck-suggestion-marker--active'),{'classes':_0x2c9a9c,'attributes':{'data-suggestion':_0x53660d},'priority':_0x49fa49&&_0x34b095?0xbc2:0xbb8};}_0x34ad30['on']('suggestionLoaded',_0x43ae45,{'priority':'high'}),_0x34ad30['on']('suggestionUnloaded',_0x43ae45,{'priority':'high'}),_0x4aff23['model']['document']['registerPostFixer'](()=>{let _0x19f820=!0x1;const _0x275c00=Array['from'](_0x4aff23['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x2ac97a,data:_0x4322b6}of _0x275c00){const {group:_0x307035,type:_0x46471e,id:_0x3314c6}=_0x34ad30['_splitMarkerName'](_0x2ac97a);if('suggestion'!=_0x307035||'deletion'!=_0x46471e||_0x4322b6['oldRange'])continue;if(!_0x34ad30['hasSuggestion'](_0x3314c6))continue;const _0xc2e0f5=_0x34ad30['getSuggestion'](_0x3314c6)['getRanges'](),_0x97e881=_0x4aff23['plugins']['get']('Users')['me'];for(const _0x31caca of _0x34ad30['getSuggestions']()){if(!_0x31caca['isInContent']||_0x31caca['author']!=_0x97e881)continue;if('formatBlock'!=_0x31caca['type']||'tablePasteCell'!=_0x31caca['subType'])continue;if(_0x31caca['getRanges']()['every'](_0x642453=>_0xc2e0f5['some'](_0x3f84e2=>_0x3f84e2['containsRange'](_0x642453,!0x0))))for(const _0x1249a8 of _0x31caca['getAllAdjacentSuggestions']())_0x1249a8['isInContent']&&(_0x1249a8['discard'](),_0x19f820=!0x0);}}return _0x19f820;}),_0x4aff23['model']['document']['registerPostFixer'](_0x1ce973=>{const _0x52d507=_0x4aff23['commands']['get']('redo');if(!_0x52d507||!_0x52d507['_createdBatches']['has'](_0x1ce973['batch']))return!0x1;let _0x15e4a3=!0x1;const _0x48c6d0=_0x4aff23['plugins']['get']('Users')['me'],_0x84e077=_0x4aff23['model']['document']['differ']['getChanges'](),_0x3bcdd7=Array['from'](_0x4aff23['model']['document']['differ']['getChangedMarkers']())['filter'](({name:_0x23c0a1,data:_0x194978})=>{const {group:_0x290ba5,subType:_0x33f453,authorId:_0x45b10e}=_0x34ad30['_splitMarkerName'](_0x23c0a1);return'suggestion'==_0x290ba5&&'tablePaste'==_0x33f453&&_0x45b10e==_0x48c6d0['id']&&!_0x194978['oldRange'];});for(const _0x5998c6 of _0x84e077){if('insert'!=_0x5998c6['type']||'tableCellSuggestion'!=_0x5998c6['name']||0x1!=_0x5998c6['length'])continue;const _0x17db2e=_0x1ce973['createRange'](_0x5998c6['position'],_0x5998c6['position']['getShiftedBy'](0x1));if(!_0x3bcdd7['find'](({data:_0x2e813a})=>_0x2e813a['newRange']['isEqual'](_0x17db2e)))for(const {name:_0xa9ab4d,data:_0x305876}of _0x3bcdd7)if(_0x17db2e['containsRange'](_0x305876['newRange'])){_0x1ce973['updateMarker'](_0xa9ab4d,{'range':_0x17db2e}),_0x15e4a3=!0x0;break;}}return _0x15e4a3;}),_0x4aff23['model']['document']['registerPostFixer'](_0x333e1f=>{let _0x64ed52=!0x1;const _0x4d24fe=_0x4aff23['plugins']['get']('Users')['me'],_0x17026d=_0x34ad30['getSuggestions']()['filter'](_0x5370d3=>_0x5370d3['isInContent']&&_0x5370d3['author']==_0x4d24fe),_0x4d6ee3=new Set(),_0x3cac06=new Set();for(const _0x351edd of _0x17026d)if('tablePaste'==_0x351edd['subType'])for(const _0x2e608e of _0x351edd['getMarkers']()){const _0x3eaaa6=_0x2e608e['getRange']()['getContainedElement']();if(_0x3eaaa6){if(_0x3eaaa6['is']('element','tableCellSuggestion')&&le(_0x3eaaa6)){_0x351edd['removeMarker'](_0x2e608e['name']),_0x4d6ee3['add'](_0x3eaaa6),_0x64ed52=!0x0;const _0x1fd815=_0x3eaaa6['nextSibling'],_0x2ed523=_0x3eaaa6['previousSibling'],_0xb395d4=_0x1fd815&&_0x1fd815['is']('element','tableCellSuggestion'),_0x121c42=_0x2ed523&&_0x2ed523['is']('element','tableCellSuggestion');_0xb395d4&&!_0x4d6ee3['has'](_0x1fd815)&&_0x3cac06['add'](_0x1fd815),_0x121c42&&!_0x4d6ee3['has'](_0x2ed523)&&_0x3cac06['add'](_0x2ed523);}else _0x3eaaa6['is']('element','paragraph')&&_0x3eaaa6['isEmpty']&&(_0x351edd['removeMarker'](_0x2e608e['name']),_0x64ed52=!0x0);}}else{if('tablePasteCell'==_0x351edd['subType']){if(!_0x351edd['attributes']||!_0x351edd['attributes']['tablePasteChainId'])continue;const _0x5c002c=_0x351edd['attributes']['markerAttributes'];if(_0x5c002c&&Object['keys'](_0x5c002c)['length'])continue;const _0x2db8e9=_0x351edd['attributes']['tablePasteChainId'];let _0x1482ab=!0x0,_0x24f2e6=!0x0;for(const _0x39643d of _0x17026d)if(_0x39643d['subType']&&_0x39643d['subType']['startsWith']('tablePaste')){if(!_0x39643d['attributes']['tablePasteChainId']){_0x24f2e6=!0x1;break;}if(_0x39643d['id']!=_0x351edd['id']&&_0x39643d['attributes']['tablePasteChainId']==_0x2db8e9){_0x1482ab=!0x1;break;}}_0x24f2e6&&_0x1482ab&&(_0x351edd['removeMarkers'](),_0x64ed52=!0x0);}}for(const _0xfc2b48 of _0x4d6ee3)_0x333e1f['remove'](_0xfc2b48);for(const _0x16ecd1 of _0x3cac06)_0x333e1f['unwrap'](_0x16ecd1);return _0x64ed52;}),_0x4aff23['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':_0x575b4a,'converterPriority':'high'}),_0x4aff23['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':(_0x5304f2,_0x3afae0)=>{if(_0x3afae0['options']['showSuggestionHighlights'])return _0x575b4a(_0x5304f2,{'showActiveMarker':!0x1});},'converterPriority':'high'});const _0xcde25e=_0x4aff23['editing']['view'];this['listenTo'](_0xcde25e['document'],'clipboardOutput',(_0x51dbc0,_0x2c1949)=>{const _0x1074ad=[];for(const _0x3ebc67 of _0xcde25e['createRangeIn'](_0x2c1949['content'])['getItems']())_0x3ebc67['is']('element','suggestion-td')&&_0x1074ad['push'](_0x3ebc67);_0xcde25e['change'](_0x379ff7=>{for(const _0x3cec10 of _0x1074ad)_0x379ff7['move'](_0x379ff7['createRangeIn'](_0x3cec10),_0x379ff7['createPositionBefore'](_0x3cec10)),_0x379ff7['remove'](_0x3cec10);});});}}function le(_0x174f40){if(_0x174f40['isEmpty'])return!0x0;const _0x205844=_0x174f40['getChild'](0x0);return _0x205844['is']('element','paragraph')&&_0x205844['isEmpty'];}function se(_0x33f428,_0x38d1ae={},_0x1ba8a6){for(const {isAnchor:_0x21a760,cellHeight:_0x3f597d,cellWidth:_0x1b669b}of _0x1ba8a6['createTableWalker'](_0x33f428,{'includeAllSlots':!0x0,..._0x38d1ae}))if(!_0x21a760||0x1!=_0x3f597d||0x1!=_0x1b669b)return!0x1;return!0x0;}
|
|
23
|
+
const _0x325b=['tablePasteCell','containsRange','oldRange','table','remove','columnInsertionIndexes','showSuggestionHighlights','requires','editor','TableUtils','tableCellBorderStyle','batch','first','findAncestor','change','stop','tablePasteRow','tableCellPadding','differ','last','from','wrap','suggestionUnloaded','Users','createRange','root','editingDowncast','get','ck-suggestion-marker-insertion','plugins','add','has','tablePaste','setAttribute','createRangeIn','formatBlock','getMarkers','activeMarkers','insertionRanges','set','markers','_suggestionFactory','includes','column','rowInsertionIndexes','registerDescriptionCallback','cell','afterInit','listenTo','move','tableCellHorizontalAlignment','find','ck-suggestion-marker','content','_descriptionFactory','fromEntries','insertContent','fill','registerCustomCallback','tableCell','updateMarker','endRow','getChildren','getContainedElement','tableCellSuggestion','commands','TableClipboard','previous','newRange','cells','markMultiRangeDeletion','isInContent','elementToElement','_isForcedDefaultExecutionBlock','row','_splitMarkerName','getRanges','setAttributes','getSuggestions','getAllAdjacentSuggestions','options','insertRows','removeMarker','tableCellBorderWidth','rootName','removeMarkers','join','removeRows','accept','dataDowncast','tablePasteChainId','suggestion','element','map','createPositionBefore','startsWith','attributes','markerToHighlight','locale','deletion','*Replace\x20table\x20cells*','markerAttributes','isEqual','markMultiRangeInsertion','filter','insert','TrackChangesEditing','getRows','_getCoordsForCells','discard','length','tableCellBorderColor','selection','type','getRange','getChangedMarkers','createTableWalker','unwrap','low','deletionRanges','registerPostFixer','insertion','_createdBatches','conversion','markerName','nextSibling','subType','model','suggestion-td','columnInsertionRanges','createElement','hasSuggestion','push','end','tablePasteColumn','rows','getTableIfOnlyTableInContent','insertColumns','_replaceTableSlotCell','getColumns','paragraph','getChild','isEmpty','register','high','getShiftedBy','document','redo','getItems','view','markMultiRangeBlockFormat','next','$graveyard','getAttributes','position','createRangeOn','nodeAfter','name','getColumnIndexes'];(function(_0x3caae0,_0x325bb1){const _0x52c57b=function(_0x4b9f64){while(--_0x4b9f64){_0x3caae0['push'](_0x3caae0['shift']());}};_0x52c57b(++_0x325bb1);}(_0x325b,0x163));const _0x52c5=function(_0x3caae0,_0x325bb1){_0x3caae0=_0x3caae0-0x0;let _0x52c57b=_0x325b[_0x3caae0];return _0x52c57b;};import{getTranslation as _0x2aa592}from'../utils/common-translations';import{Plugin as _0x80cd54}from'ckeditor5/src/core';import _0x266487 from'./table';import{uid as _0x320c25,priorities as _0x3c9fe5}from'ckeditor5/src/utils';const oe=[_0x52c5('0x2e'),_0x52c5('0x4a'),_0x52c5('0x84'),_0x52c5('0xd'),'tableCellVerticalAlignment','tableCellBackgroundColor',_0x52c5('0x8b')],ne=Object[_0x52c5('0x12')](oe[_0x52c5('0x38')](_0x3adc6c=>[_0x3adc6c,null]));export default class ft extends _0x80cd54{static get[_0x52c5('0x81')](){return[_0x266487];}[_0x52c5('0xa')](){const _0x316171=this[_0x52c5('0x82')];if(!_0x316171[_0x52c5('0x97')][_0x52c5('0x99')](_0x52c5('0x1d')))return;const _0xeb95ef=_0x316171[_0x52c5('0x97')][_0x52c5('0x95')](_0x52c5('0x45')),_0x19c2b0=_0x316171[_0x52c5('0x97')][_0x52c5('0x95')](_0x52c5('0x83')),_0x2c26ff=_0x316171['plugins'][_0x52c5('0x95')](_0x266487),_0x46858f=_0x316171['plugins'][_0x52c5('0x95')](_0x52c5('0x1d'));_0x2c26ff['_tablePostFixingSubtypes'][_0x52c5('0x5f')](_0x52c5('0x8a'),'tablePasteColumn'),_0x316171[_0x52c5('0x5a')]['schema'][_0x52c5('0x6a')](_0x52c5('0x1b'),{'allowIn':'tableCell','allowContentOf':_0x52c5('0x16'),'isLimit':!0x0}),_0x316171[_0x52c5('0x56')][_0x52c5('0x23')]({'model':_0x52c5('0x1b'),'view':_0x52c5('0x5b')});let _0x5677a9=null;_0x316171[_0x52c5('0x5a')]['on'](_0x52c5('0x13'),(_0x24c4ec,_0x229d2d)=>{const [_0x32ec79,_0x8fa9a4]=_0x229d2d,_0x3b16aa=_0x229d2d[_0x229d2d[_0x52c5('0x49')]-0x1];_0x3b16aa&&_0x3b16aa['forceDefaultExecution']||_0xeb95ef[_0x52c5('0x24')]||this[_0x52c5('0x82')][_0x52c5('0x1c')][_0x52c5('0x95')]('trackChanges')['value']&&function(_0x4689ce,_0x3d32ff,_0x115765,_0x3ec4a0,_0x38d9f6){if(_0x3d32ff&&!_0x3d32ff['is']('documentSelection'))return!0x1;const _0x2d679c=_0x38d9f6[_0x52c5('0x63')](_0x4689ce,_0x115765);if(!_0x2d679c||!se(_0x2d679c,null,_0x3ec4a0))return!0x1;const _0x2dafc9=_0x3ec4a0['getSelectionAffectedTableCells'](_0x115765[_0x52c5('0x6d')][_0x52c5('0x4b')]);if(!_0x2dafc9['length'])return!0x1;const _0x56e114=_0x2dafc9[0x0][_0x52c5('0x87')]('table'),_0x5216ed=_0x3ec4a0['getRowIndexes'](_0x2dafc9),_0x4df708=_0x3ec4a0[_0x52c5('0x79')](_0x2dafc9),_0x1cbbdf={'startRow':_0x5216ed[_0x52c5('0x86')],'endRow':_0x5216ed['last'],'startColumn':_0x4df708[_0x52c5('0x86')],'endColumn':_0x4df708[_0x52c5('0x8d')]};return 0x1==_0x2dafc9['length']&&(_0x1cbbdf[_0x52c5('0x18')]+=_0x3ec4a0[_0x52c5('0x46')](_0x2d679c)-0x1,_0x1cbbdf['endColumn']+=_0x3ec4a0[_0x52c5('0x66')](_0x2d679c)-0x1),se(_0x56e114,_0x1cbbdf,_0x3ec4a0);}(_0x32ec79,_0x8fa9a4,_0x316171[_0x52c5('0x5a')],_0x19c2b0,_0x46858f)&&(_0x24c4ec[_0x52c5('0x89')](),_0x5677a9={'cells':[],'insertionRanges':[],'deletionRanges':[],'rowInsertionRanges':[],'rowInsertionIndexes':[],'columnInsertionRanges':[],'columnInsertionIndexes':[]},_0x316171[_0x52c5('0x5a')]['change'](()=>{_0x316171[_0x52c5('0x5a')]['insertContent'](_0x229d2d[0x0],_0x229d2d[0x1],_0x229d2d[0x2],_0x229d2d[0x3],{'forceDefaultExecution':!0x0});const _0x17036d=_0x320c25(),{rowInsertionRanges:_0x3de74c,columnInsertionRanges:_0x3efe23,insertionRanges:_0xbaad53,deletionRanges:_0x36d635,cells:_0x22e6cd}=_0x5677a9;_0x3de74c[_0x52c5('0x49')]&&_0xeb95ef['markMultiRangeInsertion'](_0x3de74c,_0x52c5('0x8a'),{'tablePasteChainId':_0x17036d}),_0x3efe23['length']&&_0xeb95ef[_0x52c5('0x42')](_0x3efe23,'tablePasteColumn',{'tablePasteChainId':_0x17036d}),_0xbaad53[_0x52c5('0x49')]&&_0xeb95ef[_0x52c5('0x42')](_0xbaad53,_0x52c5('0x9a'),{'tablePasteChainId':_0x17036d,'skipNestingCheck':!0x0}),_0x36d635[_0x52c5('0x49')]&&_0xeb95ef[_0x52c5('0x21')](_0x36d635,_0x52c5('0x9a'),{'tablePasteChainId':_0x17036d,'skipNestingCheck':!0x0});const _0x73891b=_0xeb95ef[_0x52c5('0x71')](_0x22e6cd['map'](({element:_0x347bdb})=>_0x347bdb),{'formatGroupId':_0x320c25()},[],_0x52c5('0x7a'),{'tablePasteChainId':_0x17036d});if(_0x73891b){const _0x32081f=_0x73891b[_0x52c5('0x9e')](),_0x480866=[];for(const {element:_0x1287e3,attributes:_0x305e9d}of _0x22e6cd){if(!_0x305e9d)continue;const _0x152dba=_0x316171['model']['createRangeOn'](_0x1287e3),_0x2f114b=_0x32081f[_0x52c5('0xe')](_0xa77782=>_0xa77782[_0x52c5('0x4d')]()[_0x52c5('0x41')](_0x152dba));_0x2f114b&&_0x480866[_0x52c5('0x5f')]([_0x2f114b['name'],_0x305e9d]);}_0x480866[_0x52c5('0x49')]&&_0x73891b[_0x52c5('0x9b')](_0x52c5('0x40'),Object[_0x52c5('0x12')](_0x480866));}_0x5677a9=null;}));},{'priority':_0x3c9fe5[_0x52c5('0x6b')]+0xa}),_0x316171[_0x52c5('0x97')]['get'](_0x52c5('0x1d'))['on'](_0x52c5('0x65'),(_0x213c3c,_0x29620b)=>{const [_0x7a04d8,_0x379c91,,_0x1129d9]=_0x29620b;if(!_0x5677a9)return;_0x213c3c[_0x52c5('0x89')]();const _0x3c571b=_0x7a04d8[_0x52c5('0x9')],_0x4bb569=_0x379c91,_0x1521e2=le(_0x3c571b),_0x1ef57c=le(_0x4bb569);_0x213c3c['return']=_0x3c571b;let _0x3e6045=null,_0x28a83a=null;if(_0x1ef57c||_0x1521e2){if(_0x1521e2&&!_0x1ef57c){_0x1129d9['remove'](_0x3c571b[_0x52c5('0x68')](0x0));for(const _0x2c0ac6 of Array[_0x52c5('0x8e')](_0x4bb569[_0x52c5('0x19')]()))_0x1129d9[_0x52c5('0x44')](_0x2c0ac6,_0x3c571b,'end');const _0x20ee1c=_0x5677a9[_0x52c5('0x7')][_0x52c5('0x5')](_0x7a04d8[_0x52c5('0x25')]),_0x3a61fc=_0x5677a9[_0x52c5('0x7f')][_0x52c5('0x5')](_0x7a04d8[_0x52c5('0x6')]);_0x20ee1c||_0x3a61fc||(_0x3e6045=_0x1129d9[_0x52c5('0x9c')](_0x3c571b));}else _0x1ef57c&&!_0x1521e2&&(_0x28a83a=_0x1129d9[_0x52c5('0x9c')](_0x3c571b));}else{const _0xdec88f=_0x1129d9[_0x52c5('0x5d')](_0x52c5('0x1b')),_0x35af8f=_0x1129d9[_0x52c5('0x5d')]('tableCellSuggestion');_0x1129d9[_0x52c5('0x8f')](_0x1129d9['createRangeIn'](_0x3c571b),_0x35af8f),_0x1129d9[_0x52c5('0x44')](_0xdec88f,_0x3c571b,0x0);for(const _0x51830e of Array[_0x52c5('0x8e')](_0x4bb569[_0x52c5('0x19')]()))_0x1129d9[_0x52c5('0x44')](_0x51830e,_0xdec88f,_0x52c5('0x60'));_0x3e6045=_0x1129d9[_0x52c5('0x76')](_0xdec88f),_0x28a83a=_0x1129d9[_0x52c5('0x76')](_0x35af8f);}const _0x39428c=Array[_0x52c5('0x8e')](_0x4bb569[_0x52c5('0x74')]())['filter'](([_0x4ba6ff])=>oe[_0x52c5('0x5')](_0x4ba6ff));_0x5677a9[_0x52c5('0x20')][_0x52c5('0x5f')]({'element':_0x3c571b,'attributes':_0x39428c['length']?Object['fromEntries'](_0x39428c):null}),_0x3e6045&&_0x5677a9[_0x52c5('0x1')][_0x52c5('0x5f')](_0x3e6045),_0x28a83a&&_0x5677a9[_0x52c5('0x52')]['push'](_0x28a83a);},{'priority':_0x52c5('0x6b')}),_0x19c2b0['on'](_0x52c5('0x64'),(_0x4e6688,_0x4f45c9)=>{const [_0x416fd3,_0x2fe8da={}]=_0x4f45c9;if(!_0x5677a9)return;const _0x52f5e8=_0x2fe8da['at']||0x0,_0x10adfc=_0x2fe8da['columns']||0x1;_0x5677a9[_0x52c5('0x7f')]=new Array(_0x10adfc)[_0x52c5('0x14')](_0x52f5e8)[_0x52c5('0x38')]((_0x91850f,_0x522f35)=>_0x91850f+_0x522f35);for(const {cell:_0x3af8f2}of _0x19c2b0[_0x52c5('0x4f')](_0x416fd3,{'startColumn':_0x52f5e8,'endColumn':_0x52f5e8+_0x10adfc-0x1}))_0x5677a9[_0x52c5('0x5c')][_0x52c5('0x5f')](_0x316171[_0x52c5('0x5a')]['createRangeOn'](_0x3af8f2));},{'priority':_0x52c5('0x51')}),_0x19c2b0['on'](_0x52c5('0x2c'),(_0xf54c6a,_0x244110)=>{const [_0x551ba9,_0x23ae17={}]=_0x244110;if(!_0x5677a9)return;const _0x5433f7=_0x23ae17['at']||0x0,_0x5d34b6=_0x23ae17[_0x52c5('0x62')]||0x1;_0x5677a9[_0x52c5('0x7')]=new Array(_0x5d34b6)[_0x52c5('0x14')](_0x5433f7)[_0x52c5('0x38')]((_0x58a517,_0x271ed9)=>_0x58a517+_0x271ed9);for(const {cell:_0x54569c}of _0x19c2b0[_0x52c5('0x4f')](_0x551ba9,{'startRow':_0x5433f7,'endRow':_0x5433f7+_0x5d34b6-0x1}))_0x5677a9['rowInsertionRanges'][_0x52c5('0x5f')](_0x316171[_0x52c5('0x5a')]['createRangeOn'](_0x54569c));},{'priority':_0x52c5('0x51')}),_0xeb95ef[_0x52c5('0x11')][_0x52c5('0x8')](_0x3d7c72=>{if(_0x3d7c72[_0x52c5('0x59')]&&_0x3d7c72[_0x52c5('0x59')]['startsWith'](_0x52c5('0x9a')))return _0x3d7c72[_0x52c5('0x1e')]?{}:{'type':'insertion','content':_0x2aa592(_0x316171[_0x52c5('0x3d')],_0x52c5('0x3f'))};});const _0x3e58b5=()=>{};for(const _0x59234d of['tablePaste',_0x52c5('0x61'),_0x52c5('0x8a'),'tablePasteCell'])_0xeb95ef['_suggestionFactory'][_0x52c5('0x15')](_0x52c5('0x54'),_0x59234d,_0x52c5('0x31'),_0x3e58b5),_0xeb95ef[_0x52c5('0x4')][_0x52c5('0x15')](_0x52c5('0x3e'),_0x59234d,_0x52c5('0x31'),_0x3e58b5);_0xeb95ef[_0x52c5('0x4')][_0x52c5('0x15')](_0x52c5('0x9d'),_0x52c5('0x7a'),_0x52c5('0x48'),_0x3e58b5),_0xeb95ef['_suggestionFactory'][_0x52c5('0x15')](_0x52c5('0x9d'),_0x52c5('0x7a'),_0x52c5('0x33'),(_0x4ff8ab,_0x310fcd,_0x2ef7d2)=>{const _0x539f64=_0x4ff8ab[_0x52c5('0x38')](_0x3f82f7=>_0x3f82f7[_0x52c5('0x1a')]())['filter'](_0x18e45e=>_0x18e45e),_0x34e0a9=new Map(_0x539f64['map'](_0x33bfd9=>[_0x33bfd9,null]));if(_0x5677a9)for(const {element:_0x2e3c62,attributes:_0x5076db}of _0x5677a9[_0x52c5('0x20')])_0x5076db&&_0x34e0a9[_0x52c5('0x2')](_0x2e3c62,_0x5076db);else{if(_0x2ef7d2&&_0x2ef7d2[_0x52c5('0x40')])for(const [_0x5d0df5,_0x31b171]of Object['entries'](_0x2ef7d2['markerAttributes'])){const _0x40511c=_0x316171[_0x52c5('0x5a')][_0x52c5('0x3')][_0x52c5('0x95')](_0x5d0df5),_0x244fd1=_0x40511c?_0x40511c[_0x52c5('0x4d')]()[_0x52c5('0x1a')]():null;_0x244fd1&&_0x34e0a9[_0x52c5('0x2')](_0x244fd1,_0x31b171);}}_0x316171[_0x52c5('0x5a')][_0x52c5('0x88')](_0x786c0b=>{for(const [_0x1a440f,_0x13b08c]of _0x34e0a9)_0x786c0b[_0x52c5('0x28')]({...ne,..._0x13b08c},_0x1a440f);});});const _0x23b94f=(_0x1c6dbf,_0x10a287)=>{_0xeb95ef[_0x52c5('0x4')][_0x52c5('0x15')](_0x1c6dbf,_0x52c5('0x9a'),_0x10a287,(_0x1cfe7d,_0x34dbfd,_0x28e697)=>{_0x316171['model'][_0x52c5('0x88')](_0x39d623=>{const _0x319462=[];for(const _0x3f667d of _0x1cfe7d){const _0x3195d8=_0x3f667d['start'][_0x52c5('0x77')];_0x3195d8['is']('element',_0x52c5('0x1b'))&&_0x319462['push'](_0x3195d8);}_0xeb95ef[_0x52c5('0x4')]['getSuggestionCallback'](_0x1c6dbf,null,_0x10a287)(_0x1cfe7d,_0x34dbfd,_0x28e697);for(const _0x2c7074 of _0x319462)_0x52c5('0x73')!=_0x2c7074[_0x52c5('0x93')][_0x52c5('0x2f')]&&_0x39d623[_0x52c5('0x50')](_0x2c7074);});});};_0x23b94f('insertion',_0x52c5('0x33')),_0x23b94f(_0x52c5('0x54'),'discard'),_0x23b94f('deletion',_0x52c5('0x33')),_0x23b94f(_0x52c5('0x3e'),_0x52c5('0x48')),_0xeb95ef['_suggestionFactory'][_0x52c5('0x15')](_0x52c5('0x54'),_0x52c5('0x8a'),_0x52c5('0x48'),_0x25c776=>{const _0x16d907=_0x25c776['map'](_0x2cb7a4=>_0x2cb7a4['getContainedElement']()),_0x45e5c6=_0x16d907[0x0]['findAncestor'](_0x52c5('0x7d')),{minRow:_0x50dc23,maxRow:_0x213cf7}=_0x2c26ff[_0x52c5('0x47')](_0x16d907);_0x19c2b0[_0x52c5('0x32')](_0x45e5c6,{'at':_0x50dc23,'rows':_0x213cf7-_0x50dc23+0x1});}),_0xeb95ef['_suggestionFactory'][_0x52c5('0x15')](_0x52c5('0x54'),'tablePasteColumn',_0x52c5('0x48'),_0x14b5c3=>{const _0x557172=_0x14b5c3[_0x52c5('0x38')](_0x3f4309=>_0x3f4309[_0x52c5('0x1a')]()),_0x1bf74f=_0x557172[0x0][_0x52c5('0x87')](_0x52c5('0x7d')),{minColumn:_0x1bde3c,maxColumn:_0x466bc9}=_0x2c26ff['_getCoordsForCells'](_0x557172);_0x19c2b0['removeColumns'](_0x1bf74f,{'at':_0x1bde3c,'columns':_0x466bc9-_0x1bde3c+0x1});});const _0x30c213=(_0x3c1f7e,_0x15d322)=>{if(!_0x15d322[_0x52c5('0x59')]||!_0x15d322[_0x52c5('0x59')][_0x52c5('0x3a')](_0x52c5('0x9a')))return;const _0x8998ac=_0x15d322['attributes']['tablePasteChainId'],_0x10bc0b=_0xeb95ef['getSuggestions']()[_0x52c5('0x43')](_0x3fff33=>_0x3fff33[_0x52c5('0x22')]&&_0x3fff33[_0x52c5('0x3b')]&&_0x3fff33['attributes']['tablePasteChainId']==_0x8998ac);_0x10bc0b['length']&&_0x15d322[_0x52c5('0x2a')]()[_0x52c5('0x49')]!=_0x10bc0b[_0x52c5('0x49')]&&_0x10bc0b['reduce']((_0x42ed1c,_0x26a41b)=>(_0x42ed1c[_0x52c5('0x72')]=_0x26a41b,_0x26a41b[_0x52c5('0x1e')]=_0x42ed1c,_0x26a41b));};function _0x3a585b(_0xea4427,{showActiveMarker:_0x4472fa=!0x0}={}){const {id:_0x504f50}=_0xeb95ef[_0x52c5('0x26')](_0xea4427[_0x52c5('0x57')]),_0x3a8b0f=[_0x52c5('0xf'),_0x52c5('0x96')],_0x599828=_0xeb95ef[_0x52c5('0x0')][_0x52c5('0x5')](_0xea4427[_0x52c5('0x57')]);return _0x599828&&_0x3a8b0f['push']('ck-suggestion-marker--active'),{'classes':_0x3a8b0f,'attributes':{'data-suggestion':_0x504f50},'priority':_0x599828&&_0x4472fa?0xbc2:0xbb8};}_0xeb95ef['on']('suggestionLoaded',_0x30c213,{'priority':_0x52c5('0x6b')}),_0xeb95ef['on'](_0x52c5('0x90'),_0x30c213,{'priority':_0x52c5('0x6b')}),_0x316171['model'][_0x52c5('0x6d')][_0x52c5('0x53')](()=>{let _0x2a08c2=!0x1;const _0x471166=Array[_0x52c5('0x8e')](_0x316171['model'][_0x52c5('0x6d')][_0x52c5('0x8c')][_0x52c5('0x4e')]());for(const {name:_0x21510b,data:_0x7100c1}of _0x471166){const {group:_0x15d4fe,type:_0x455e85,id:_0x4a32f8}=_0xeb95ef[_0x52c5('0x26')](_0x21510b);if(_0x52c5('0x36')!=_0x15d4fe||'deletion'!=_0x455e85||_0x7100c1[_0x52c5('0x7c')])continue;if(!_0xeb95ef[_0x52c5('0x5e')](_0x4a32f8))continue;const _0xce8b4e=_0xeb95ef['getSuggestion'](_0x4a32f8)[_0x52c5('0x27')](),_0x4915fb=_0x316171[_0x52c5('0x97')][_0x52c5('0x95')](_0x52c5('0x91'))['me'];for(const _0x379710 of _0xeb95ef['getSuggestions']()){if(!_0x379710[_0x52c5('0x22')]||_0x379710['author']!=_0x4915fb)continue;if(_0x52c5('0x9d')!=_0x379710[_0x52c5('0x4c')]||_0x52c5('0x7a')!=_0x379710[_0x52c5('0x59')])continue;if(_0x379710[_0x52c5('0x27')]()['every'](_0x11e120=>_0xce8b4e['some'](_0x463d03=>_0x463d03[_0x52c5('0x7b')](_0x11e120,!0x0))))for(const _0xb96f29 of _0x379710['getAllAdjacentSuggestions']())_0xb96f29[_0x52c5('0x22')]&&(_0xb96f29[_0x52c5('0x48')](),_0x2a08c2=!0x0);}}return _0x2a08c2;}),_0x316171[_0x52c5('0x5a')][_0x52c5('0x6d')]['registerPostFixer'](_0x523761=>{const _0x4199dc=_0x316171[_0x52c5('0x1c')]['get'](_0x52c5('0x6e'));if(!_0x4199dc||!_0x4199dc[_0x52c5('0x55')][_0x52c5('0x99')](_0x523761[_0x52c5('0x85')]))return!0x1;let _0x2d0cc0=!0x1;const _0x408866=_0x316171[_0x52c5('0x97')]['get']('Users')['me'],_0x9ece20=_0x316171[_0x52c5('0x5a')]['document'][_0x52c5('0x8c')]['getChanges'](),_0x3df30c=Array[_0x52c5('0x8e')](_0x316171[_0x52c5('0x5a')][_0x52c5('0x6d')][_0x52c5('0x8c')][_0x52c5('0x4e')]())[_0x52c5('0x43')](({name:_0x582c5f,data:_0x1d2c1c})=>{const {group:_0x59d4ba,subType:_0x3987db,authorId:_0x113055}=_0xeb95ef['_splitMarkerName'](_0x582c5f);return _0x52c5('0x36')==_0x59d4ba&&_0x52c5('0x9a')==_0x3987db&&_0x113055==_0x408866['id']&&!_0x1d2c1c[_0x52c5('0x7c')];});for(const _0x2ed22b of _0x9ece20){if(_0x52c5('0x44')!=_0x2ed22b[_0x52c5('0x4c')]||_0x52c5('0x1b')!=_0x2ed22b[_0x52c5('0x78')]||0x1!=_0x2ed22b[_0x52c5('0x49')])continue;const _0x1b5c2a=_0x523761[_0x52c5('0x92')](_0x2ed22b[_0x52c5('0x75')],_0x2ed22b['position'][_0x52c5('0x6c')](0x1));if(!_0x3df30c[_0x52c5('0xe')](({data:_0xcef99})=>_0xcef99[_0x52c5('0x1f')][_0x52c5('0x41')](_0x1b5c2a)))for(const {name:_0x37ee9a,data:_0x521efd}of _0x3df30c)if(_0x1b5c2a[_0x52c5('0x7b')](_0x521efd[_0x52c5('0x1f')])){_0x523761[_0x52c5('0x17')](_0x37ee9a,{'range':_0x1b5c2a}),_0x2d0cc0=!0x0;break;}}return _0x2d0cc0;}),_0x316171[_0x52c5('0x5a')][_0x52c5('0x6d')][_0x52c5('0x53')](_0x109bae=>{let _0x2f960c=!0x1;const _0x26e69e=_0x316171[_0x52c5('0x97')][_0x52c5('0x95')]('Users')['me'],_0x130f59=_0xeb95ef[_0x52c5('0x29')]()[_0x52c5('0x43')](_0x271085=>_0x271085['isInContent']&&_0x271085['author']==_0x26e69e),_0x3e6a29=new Set(),_0x23205c=new Set();for(const _0x133490 of _0x130f59)if(_0x52c5('0x9a')==_0x133490[_0x52c5('0x59')])for(const _0x43f773 of _0x133490[_0x52c5('0x9e')]()){const _0x5561f8=_0x43f773['getRange']()[_0x52c5('0x1a')]();if(_0x5561f8){if(_0x5561f8['is'](_0x52c5('0x37'),_0x52c5('0x1b'))&&le(_0x5561f8)){_0x133490[_0x52c5('0x2d')](_0x43f773[_0x52c5('0x78')]),_0x3e6a29[_0x52c5('0x98')](_0x5561f8),_0x2f960c=!0x0;const _0x4dea50=_0x5561f8[_0x52c5('0x58')],_0x614bb1=_0x5561f8['previousSibling'],_0x3a3b45=_0x4dea50&&_0x4dea50['is']('element',_0x52c5('0x1b')),_0x58a844=_0x614bb1&&_0x614bb1['is'](_0x52c5('0x37'),_0x52c5('0x1b'));_0x3a3b45&&!_0x3e6a29[_0x52c5('0x99')](_0x4dea50)&&_0x23205c[_0x52c5('0x98')](_0x4dea50),_0x58a844&&!_0x3e6a29[_0x52c5('0x99')](_0x614bb1)&&_0x23205c['add'](_0x614bb1);}else _0x5561f8['is'](_0x52c5('0x37'),_0x52c5('0x67'))&&_0x5561f8[_0x52c5('0x69')]&&(_0x133490[_0x52c5('0x2d')](_0x43f773[_0x52c5('0x78')]),_0x2f960c=!0x0);}}else{if(_0x52c5('0x7a')==_0x133490['subType']){if(!_0x133490[_0x52c5('0x3b')]||!_0x133490['attributes'][_0x52c5('0x35')])continue;const _0x54159a=_0x133490['attributes'][_0x52c5('0x40')];if(_0x54159a&&Object['keys'](_0x54159a)[_0x52c5('0x49')])continue;const _0x518619=_0x133490['attributes'][_0x52c5('0x35')];let _0x5d669c=!0x0,_0xf5b601=!0x0;for(const _0x45f7f3 of _0x130f59)if(_0x45f7f3[_0x52c5('0x59')]&&_0x45f7f3[_0x52c5('0x59')][_0x52c5('0x3a')](_0x52c5('0x9a'))){if(!_0x45f7f3[_0x52c5('0x3b')][_0x52c5('0x35')]){_0xf5b601=!0x1;break;}if(_0x45f7f3['id']!=_0x133490['id']&&_0x45f7f3['attributes'][_0x52c5('0x35')]==_0x518619){_0x5d669c=!0x1;break;}}_0xf5b601&&_0x5d669c&&(_0x133490[_0x52c5('0x30')](),_0x2f960c=!0x0);}}for(const _0x5c4150 of _0x3e6a29)_0x109bae[_0x52c5('0x7e')](_0x5c4150);for(const _0x38eefd of _0x23205c)_0x109bae[_0x52c5('0x50')](_0x38eefd);return _0x2f960c;}),_0x316171['conversion']['for'](_0x52c5('0x94'))['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':_0x3a585b,'converterPriority':_0x52c5('0x6b')}),_0x316171['conversion']['for'](_0x52c5('0x34'))[_0x52c5('0x3c')]({'model':'suggestion:formatBlock:tablePasteCell','view':(_0x2d4710,_0x810fd0)=>{if(_0x810fd0[_0x52c5('0x2b')][_0x52c5('0x80')])return _0x3a585b(_0x2d4710,{'showActiveMarker':!0x1});},'converterPriority':_0x52c5('0x6b')});const _0x56ba2b=_0x316171['editing'][_0x52c5('0x70')];this[_0x52c5('0xb')](_0x56ba2b[_0x52c5('0x6d')],'clipboardOutput',(_0x54256b,_0x17c804)=>{const _0x247247=[];for(const _0x55277c of _0x56ba2b[_0x52c5('0x9c')](_0x17c804[_0x52c5('0x10')])[_0x52c5('0x6f')]())_0x55277c['is'](_0x52c5('0x37'),'suggestion-td')&&_0x247247['push'](_0x55277c);_0x56ba2b[_0x52c5('0x88')](_0x234484=>{for(const _0x379767 of _0x247247)_0x234484[_0x52c5('0xc')](_0x234484[_0x52c5('0x9c')](_0x379767),_0x234484[_0x52c5('0x39')](_0x379767)),_0x234484[_0x52c5('0x7e')](_0x379767);});});}}function le(_0x115eab){if(_0x115eab[_0x52c5('0x69')])return!0x0;const _0x401a62=_0x115eab[_0x52c5('0x68')](0x0);return _0x401a62['is'](_0x52c5('0x37'),_0x52c5('0x67'))&&_0x401a62[_0x52c5('0x69')];}function se(_0x3236ce,_0x40b548={},_0xffd351){for(const {isAnchor:_0x3d8d92,cellHeight:_0x5a93e0,cellWidth:_0x4d7348}of _0xffd351[_0x52c5('0x4f')](_0x3236ce,{'includeAllSlots':!0x0,..._0x40b548}))if(!_0x3d8d92||0x1!=_0x5a93e0||0x1!=_0x4d7348)return!0x1;return!0x0;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
const _0x2a15=['start','forceValue','requires','commandParams','markerRange','change','addClass','value','data','highest','FORMAT_HEADER_COLUMN','item','selection','isBefore','document','stop','_splitMarkerName','options','name','registerDescriptionCallback','headingRows','formatBlock','FORMAT_HEADER_ROW','TableUtils','createRange','getChild','end','markerNameToElements','showSuggestionHighlights','last','locale','setTableRowHeader','unbindElementFromMarkerName','nodeAfter','toViewElement','first','downcastDispatcher','ck-suggestion-marker-','editing','createPositionBefore','commandName','_acceptFormatSuggestionCallbackFactory','_suggestionFactory','enableCommand','createTableWalker','markBlockFormat','mapper','FORMAT_REGULAR_ROW','*Format:*\x20%0','TrackChangesEditing','setAttribute','cell','commands','has','markerName','createPositionAfter','writer','accept','findAncestor','headingColumns','parent','childCount','getSuggestion','ck-suggestion-marker--active','get','getCellLocation','setTableColumnHeader','model','registerCustomCallback','removeClass','getSelectionAffectedTableCells','consumable','bindElementToMarker','plugins','format'];(function(_0x261d99,_0x2a157b){const _0x50a1d9=function(_0x313b39){while(--_0x313b39){_0x261d99['push'](_0x261d99['shift']());}};_0x50a1d9(++_0x2a157b);}(_0x2a15,0x104));const _0x50a1=function(_0x261d99,_0x2a157b){_0x261d99=_0x261d99-0x0;let _0x50a1d9=_0x2a15[_0x261d99];return _0x50a1d9;};import{Plugin as _0x1b6de9}from'ckeditor5/src/core';import _0x538f45 from'./table';import{getTranslation as _0x4240f4}from'../utils/common-translations';export default class ut extends _0x1b6de9{static get[_0x50a1('0x2a')](){return[_0x538f45];}['afterInit'](){const _0x421188=this['editor'];if(!_0x421188['plugins'][_0x50a1('0x12')]('TableEditing'))return;const _0x22416d=_0x421188[_0x50a1('0x46')],_0x550f57=_0x421188[_0x50a1('0x26')][_0x50a1('0x1d')](_0x50a1('0xe')),_0x40ad59=_0x421188['plugins']['get'](_0x50a1('0x3f')),_0x12b2c0=_0x421188['plugins']['get'](_0x538f45);function _0x15bacd({showActiveMarker:_0x2e9093=!0x0,setDataAttribute:_0x5410db=!0x0}={}){return(_0x3af62f,_0xaca5d0,_0x2686b8)=>{const {type:_0x3d138b,id:_0x5d2060}=_0x550f57[_0x50a1('0x38')](_0xaca5d0[_0x50a1('0x13')]),_0x385100=_0x550f57['getSuggestion'](_0x5d2060);if(!_0x385100[_0x50a1('0x30')]||_0x50a1('0x1f')!=_0x385100[_0x50a1('0x30')][_0x50a1('0x5')])return;if(_0xaca5d0[_0x50a1('0x33')])return void _0x3af62f[_0x50a1('0x37')]();if(!_0x2686b8[_0x50a1('0x24')]['consume'](_0xaca5d0[_0x50a1('0x2c')],_0x3af62f[_0x50a1('0x3a')]))return;const _0x327d3f=_0xaca5d0[_0x50a1('0x2c')][_0x50a1('0x28')][_0x50a1('0x49')],_0x2c02cc=_0xaca5d0[_0x50a1('0x2c')][_0x50a1('0x42')]['nodeBefore'],_0x1b9ccc=_0x327d3f[_0x50a1('0x19')]['parent'],{column:_0x2d2205}=_0x40ad59[_0x50a1('0x1e')](_0x327d3f),{column:_0x555af4}=_0x40ad59[_0x50a1('0x1e')](_0x2c02cc);for(let _0xbd31ae=_0x2d2205;_0xbd31ae<=_0x555af4;_0xbd31ae++){const _0x107efe=_0x40ad59['createTableWalker'](_0x1b9ccc,{'column':_0xbd31ae,'includeAllSlots':!0x1});for(const _0x94dff6 of _0x107efe){const _0x18c438=_0x94dff6[_0x50a1('0x10')],_0x2a6336=_0x2686b8['mapper'][_0x50a1('0x4a')](_0x18c438);_0x2686b8[_0x50a1('0x15')][_0x50a1('0x2e')](_0x50a1('0x2')+_0x3d138b,_0x2a6336),_0x5410db&&_0x2686b8[_0x50a1('0x15')][_0x50a1('0xf')]('data-suggestion',_0x5d2060,_0x2a6336),_0x2686b8[_0x50a1('0xb')][_0x50a1('0x25')](_0x2a6336,_0xaca5d0[_0x50a1('0x13')]),_0x2e9093&&(_0x550f57['activeMarkers']['includes'](_0xaca5d0['markerName'])?_0x2686b8['writer'][_0x50a1('0x2e')](_0x50a1('0x1c'),_0x2a6336):_0x2686b8[_0x50a1('0x15')][_0x50a1('0x22')]('ck-suggestion-marker--active',_0x2a6336));}}};}_0x550f57[_0x50a1('0x8')]('setTableRowHeader',(_0xaa7bf0,_0x3098f0)=>{const _0x46d8e9=_0x40ad59[_0x50a1('0x23')](_0x421188[_0x50a1('0x20')][_0x50a1('0x36')][_0x50a1('0x34')]),_0x1edfe4=_0x40ad59['getRowIndexes'](_0x46d8e9),_0x5cfb65=_0x46d8e9[0x0][_0x50a1('0x17')]('table'),_0x314ab0=_0x5cfb65['getAttribute'](_0x50a1('0x3c'))||0x0,_0x50868d=_0x3098f0&&null!==_0x3098f0['forceValue']?_0x3098f0['forceValue']:!_0x421188[_0x50a1('0x11')][_0x50a1('0x1d')](_0x50a1('0x47'))[_0x50a1('0x2f')],_0x4476ef=_0x50868d?_0x1edfe4[_0x50a1('0x45')]:_0x1edfe4[_0x50a1('0x0')],_0x5e3e2b=_0x5cfb65[_0x50a1('0x41')](_0x4476ef);let _0x4b0d75;if(_0x50868d){const _0x365cbd=_0x5cfb65[_0x50a1('0x41')](_0x314ab0);if(_0x5e3e2b['index']<_0x365cbd['index'])return;_0x4b0d75=_0x421188[_0x50a1('0x20')][_0x50a1('0x40')](_0x421188['model'][_0x50a1('0x4')](_0x365cbd[_0x50a1('0x41')](0x0)),_0x421188[_0x50a1('0x20')][_0x50a1('0x14')](_0x5e3e2b[_0x50a1('0x41')](_0x5e3e2b[_0x50a1('0x1a')]-0x1)));}else{const _0x54486f=_0x5cfb65[_0x50a1('0x41')](_0x314ab0-0x1);if(!_0x54486f)return;_0x4b0d75=_0x421188['model'][_0x50a1('0x40')](_0x421188[_0x50a1('0x20')][_0x50a1('0x4')](_0x5e3e2b['getChild'](0x0)),_0x421188[_0x50a1('0x20')][_0x50a1('0x14')](_0x54486f[_0x50a1('0x41')](_0x54486f['childCount']-0x1)));}_0x421188[_0x50a1('0x20')][_0x50a1('0x2d')](()=>{_0x550f57[_0x50a1('0xa')](_0x4b0d75,{'commandName':_0x50a1('0x47'),'commandParams':[{'forceValue':_0x50868d}]},[],_0x50a1('0x47'));});}),_0x550f57[_0x50a1('0x8')](_0x50a1('0x1f'),(_0xe9cd15,_0x57cd20)=>{const _0x3793b4=_0x421188[_0x50a1('0x26')][_0x50a1('0x1d')](_0x50a1('0x3f')),_0x49af97=_0x3793b4['getSelectionAffectedTableCells'](_0x421188[_0x50a1('0x20')][_0x50a1('0x36')][_0x50a1('0x34')]),_0x3fa5a0=_0x3793b4['getColumnIndexes'](_0x49af97),_0x3b6133=_0x49af97[0x0]['findAncestor']('table'),_0x4f7693=_0x3b6133['getAttribute'](_0x50a1('0x18'))||0x0,_0x488418=_0x57cd20&&null!==_0x57cd20['forceValue']?_0x57cd20[_0x50a1('0x29')]:!_0x421188[_0x50a1('0x11')][_0x50a1('0x1d')]('setTableColumnHeader')[_0x50a1('0x2f')];let _0x19d1aa;const _0x2771f8=_0x3b6133['getChild'](0x0),_0x588040=_0x488418?_0x3fa5a0[_0x50a1('0x45')]:_0x3fa5a0[_0x50a1('0x0')],_0x3a9672=_0x3793b4[_0x50a1('0x9')](_0x3b6133,{'startRow':0x0,'column':_0x588040,'includeAllSlots':!0x1}),_0x4abf9a=Array['from'](_0x3a9672)[0x0]['cell'];if(_0x488418){const _0x14120a=_0x2771f8[_0x50a1('0x41')](_0x4f7693);if(_0x4abf9a[_0x50a1('0x35')](_0x14120a))return;_0x19d1aa=_0x421188[_0x50a1('0x20')][_0x50a1('0x40')](_0x421188[_0x50a1('0x20')]['createPositionBefore'](_0x14120a),_0x421188[_0x50a1('0x20')][_0x50a1('0x14')](_0x4abf9a));}else{const _0x5655ab=_0x2771f8[_0x50a1('0x41')](_0x4f7693-0x1);if(!_0x5655ab)return;_0x19d1aa=_0x421188[_0x50a1('0x20')][_0x50a1('0x40')](_0x421188['model']['createPositionBefore'](_0x4abf9a),_0x421188[_0x50a1('0x20')]['createPositionAfter'](_0x5655ab));}_0x421188['model'][_0x50a1('0x2d')](()=>{_0x550f57['markBlockFormat'](_0x19d1aa,{'commandName':_0x50a1('0x1f'),'commandParams':[{'forceValue':_0x488418}]},[],'setTableColumnHeader');});}),_0x421188[_0x50a1('0x3')][_0x50a1('0x1')]['on']('addMarker:suggestion',_0x15bacd(),{'priority':_0x50a1('0x31')}),_0x421188['data'][_0x50a1('0x1')]['on']('addMarker:suggestion',(_0x575057,_0x24c942,_0x50fceb)=>{_0x50fceb[_0x50a1('0x39')][_0x50a1('0x44')]&&_0x15bacd({'showActiveMarker':!0x1,'setDataAttribute':!0x1})(_0x575057,_0x24c942,_0x50fceb);},{'priority':_0x50a1('0x31')}),_0x421188[_0x50a1('0x3')][_0x50a1('0x1')]['on']('removeMarker:suggestion',(_0x94da9f,_0x171991,_0x41c956)=>{const {type:_0x5455be,id:_0x33805e}=_0x550f57[_0x50a1('0x38')](_0x171991[_0x50a1('0x13')]),_0x20bf89=_0x550f57[_0x50a1('0x1b')](_0x33805e);if(!_0x20bf89['data']||'setTableColumnHeader'!=_0x20bf89[_0x50a1('0x30')][_0x50a1('0x5')])return;const _0x2dc529=_0x41c956['mapper'][_0x50a1('0x43')](_0x171991['markerName']);if(_0x2dc529)for(const _0x2766ee of _0x2dc529)_0x41c956[_0x50a1('0x15')][_0x50a1('0x22')]('ck-suggestion-marker-'+_0x5455be,_0x2766ee),_0x41c956[_0x50a1('0x15')][_0x50a1('0x22')](_0x50a1('0x1c'),_0x2766ee),_0x41c956['writer']['removeAttribute']('data-suggestion',_0x2766ee),_0x41c956[_0x50a1('0xb')][_0x50a1('0x48')](_0x2766ee,_0x171991[_0x50a1('0x13')]);},{'priority':_0x50a1('0x31')}),_0x550f57['_descriptionFactory'][_0x50a1('0x3b')](_0x2505f6=>{const {data:_0x552d4c}=_0x2505f6;if(_0x552d4c){if(_0x50a1('0x47')==_0x552d4c[_0x50a1('0x5')]){const _0x43ea7d=_0x552d4c['commandParams'][0x0][_0x50a1('0x29')];return _0x5400c5(_0x4240f4(_0x22416d,_0x43ea7d?_0x50a1('0x3e'):_0x50a1('0xc')));}if(_0x50a1('0x1f')==_0x552d4c[_0x50a1('0x5')]){const _0x14c06b=_0x552d4c[_0x50a1('0x2b')][0x0]['forceValue'];return _0x5400c5(_0x4240f4(_0x22416d,_0x14c06b?_0x50a1('0x32'):'FORMAT_REGULAR_COLUMN'));}}function _0x5400c5(_0x5bd19d){return{'type':_0x50a1('0x27'),'content':_0x4240f4(_0x22416d,_0x50a1('0xd'),_0x5bd19d)};}});const _0x5a667c=_0x12b2c0[_0x50a1('0x6')]();_0x550f57[_0x50a1('0x7')][_0x50a1('0x21')](_0x50a1('0x3d'),_0x50a1('0x47'),'accept',_0x5a667c),_0x550f57['_suggestionFactory']['registerCustomCallback']('formatBlock',_0x50a1('0x1f'),_0x50a1('0x16'),_0x5a667c);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
const _0x1ba6=['registerDescriptionCallback','markMultiRangeBlockFormat','subType','mergeTableCellDown','$graveyard','change','markBlockFormat','from','accept','TableEditing','*Split\x20cell:*\x20vertically','isInContent','enableCommand','length','commands','value','document','createRangeOn','map','_suggestionFactory','trackChanges','size','containsRange','_areMergableCells','getAncestors','execute','splitTableCellVertically','*Merge\x20cells*','selection','push','fromRange','return','element','findAncestor','forceDefaultExecution','splitTableCellHorizontally','createTableWalker','_tablePostFixingSubtypes','stop','mergeTableCellLeft','model','refresh','plugins','isEnabled','mergeTableCellUp','rootName','mergeTableCells','registerCustomCallback','editor','tableCell','insertion','format','highest','TableUtils','mergeTableCellRight','cell','has','_areSelectedCellsMergable','type','low','commandName','getFirstPosition','author','get','add','_descriptionFactory','locale','TrackChangesEditing','setSelection','getSelectionAffectedTableCells','detach','formatBlock','find','getRanges'];(function(_0x211cf6,_0x1ba627){const _0x658bcd=function(_0x56f409){while(--_0x56f409){_0x211cf6['push'](_0x211cf6['shift']());}};_0x658bcd(++_0x1ba627);}(_0x1ba6,0xef));const _0x658b=function(_0x211cf6,_0x1ba627){_0x211cf6=_0x211cf6-0x0;let _0x658bcd=_0x1ba6[_0x211cf6];return _0x658bcd;};import{Plugin as _0x200229}from'ckeditor5/src/core';import _0x37633c from'./table';import{LiveRange as _0x205e47}from'ckeditor5/src/engine';import{getTranslation as _0x67cf9b}from'../utils/common-translations';export default class ht extends _0x200229{static get['requires'](){return[_0x37633c];}['afterInit'](){const _0x4a0a31=this[_0x658b('0x1f')],_0x3615f1=_0x4a0a31[_0x658b('0x17')]['document'][_0x658b('0xb')],_0x2f9036=_0x4a0a31[_0x658b('0x31')];if(!_0x4a0a31['plugins'][_0x658b('0x27')](_0x658b('0x42')))return;const _0x10961c=_0x4a0a31[_0x658b('0x19')]['get'](_0x658b('0x32')),_0x395278=_0x4a0a31[_0x658b('0x19')][_0x658b('0x2e')](_0x658b('0x24')),_0x1f1bb7=_0x4a0a31[_0x658b('0x19')]['get'](_0x37633c);_0x1f1bb7[_0x658b('0x14')][_0x658b('0xc')](_0x658b('0x1d')),_0x10961c[_0x658b('0x45')](_0x658b('0x1d'),()=>{const _0x2ca9ac=_0x395278[_0x658b('0x34')](_0x4a0a31[_0x658b('0x17')][_0x658b('0x49')]['selection']);_0x4a0a31['model']['change'](()=>{_0x10961c[_0x658b('0x3a')](_0x2ca9ac,{'commandName':'mergeTableCells','commandParams':[]},[],_0x658b('0x1d'));});}),_0x4a0a31['commands'][_0x658b('0x2e')]('mergeTableCells')['on'](_0x658b('0x8'),(_0x21c817,_0x510c49)=>{_0x4a0a31[_0x658b('0x47')]['get'](_0x658b('0x3'))['value']&&(_0x510c49[_0x658b('0x46')]>0x0&&_0x510c49[_0x510c49['length']-0x1]&&_0x510c49[_0x510c49[_0x658b('0x46')]-0x1][_0x658b('0x11')]||_0x10961c['_isForcedDefaultExecutionBlock']||this[_0x658b('0x28')]()||_0x21c817[_0x658b('0x15')]());},{'priority':_0x658b('0x23')});for(const _0x3c8fb1 of[_0x658b('0x1b'),_0x658b('0x25'),_0x658b('0x3c'),_0x658b('0x16')]){const _0x407b14=_0x4a0a31['commands']['get'](_0x3c8fb1);_0x10961c[_0x658b('0x45')](_0x3c8fb1,()=>{const _0x5850c6=_0x4a0a31[_0x658b('0x17')][_0x658b('0x49')][_0x658b('0xb')][_0x658b('0x2c')]()['getAncestors']()[_0x658b('0x37')](_0x3455de=>_0x3455de['is'](_0x658b('0xf'),_0x658b('0x20'))),_0x1189fe=_0x407b14['value'];_0x4a0a31['model'][_0x658b('0x3e')](()=>{_0x10961c[_0x658b('0x3a')]([_0x5850c6,_0x1189fe],{'commandName':_0x658b('0x1d'),'commandParams':[]},[],'mergeTableCells');});});}for(const _0x157ac7 of[_0x658b('0x9'),_0x658b('0x12')]){const _0x9d9403=_0x4a0a31[_0x658b('0x47')][_0x658b('0x2e')](_0x157ac7);_0x10961c[_0x658b('0x45')](_0x157ac7,()=>{const _0x5f2eba=_0x395278[_0x658b('0x34')](_0x4a0a31[_0x658b('0x17')][_0x658b('0x49')][_0x658b('0xb')])[0x0],_0x40486f=_0x5f2eba[_0x658b('0x10')]('table'),{column:_0x22204e,row:_0x2f6ccc}=_0x395278['getCellLocation'](_0x5f2eba);let _0x1fb804=[];if('horizontally'==_0x9d9403['direction']){const _0x57a188=_0x395278['createTableWalker'](_0x40486f,{'startRow':_0x2f6ccc,'endRow':_0x2f6ccc,'includeAllSlots':!0x0});_0x1fb804=Array[_0x658b('0x40')](_0x57a188)[_0x658b('0x1')](_0x144590=>_0x144590[_0x658b('0x26')]);}else{const _0x2beacd=_0x395278[_0x658b('0x13')](_0x40486f,{'column':_0x22204e,'includeAllSlots':!0x0});_0x1fb804=Array[_0x658b('0x40')](_0x2beacd)['map'](_0x633cd6=>_0x633cd6[_0x658b('0x26')]);}_0x4a0a31[_0x658b('0x17')][_0x658b('0x3e')](_0xcee008=>{_0x10961c[_0x658b('0x3f')](_0xcee008[_0x658b('0x0')](_0x5f2eba),{'commandName':_0x157ac7,'commandParams':[]},_0x1fb804,_0x157ac7);});});}_0x10961c[_0x658b('0x30')][_0x658b('0x39')](_0x28df79=>{const {data:_0x21483a}=_0x28df79;if(_0x21483a)return _0x658b('0x1d')==_0x21483a[_0x658b('0x2b')]?{'type':_0x658b('0x22'),'content':_0x67cf9b(_0x2f9036,_0x658b('0xa'))}:void 0x0;}),_0x10961c[_0x658b('0x30')][_0x658b('0x39')](_0x264b60=>{const {data:_0x344cae}=_0x264b60;if(_0x344cae)return'splitTableCellVertically'==_0x344cae[_0x658b('0x2b')]?{'type':_0x658b('0x22'),'content':_0x67cf9b(_0x2f9036,_0x658b('0x43'))}:_0x658b('0x12')==_0x344cae[_0x658b('0x2b')]?{'type':'format','content':_0x67cf9b(_0x2f9036,'*Split\x20cell:*\x20horizontally')}:void 0x0;});const _0x99663e=_0x1f1bb7['_acceptFormatSuggestionCallbackFactory']();for(const _0x29ca57 of[_0x658b('0x1b'),_0x658b('0x25'),_0x658b('0x3c'),'mergeTableCellLeft'])_0x10961c['_suggestionFactory'][_0x658b('0x1e')](_0x658b('0x36'),_0x29ca57,'accept',_0x99663e);for(const _0x576f08 of[_0x658b('0x9'),'splitTableCellHorizontally'])_0x10961c[_0x658b('0x2')][_0x658b('0x1e')](_0x658b('0x36'),_0x576f08,_0x658b('0x41'),_0x99663e);_0x10961c[_0x658b('0x2')][_0x658b('0x1e')](_0x658b('0x36'),_0x658b('0x1d'),_0x658b('0x41'),_0x5ed496=>{_0x4a0a31['model'][_0x658b('0x3e')](_0x37ca4f=>{const _0x12fb8a=Array[_0x658b('0x40')](_0x3615f1[_0x658b('0x38')]())[_0x658b('0x1')](_0x2fd5ae=>_0x205e47[_0x658b('0xd')](_0x2fd5ae));_0x37ca4f[_0x658b('0x33')](_0x5ed496),_0x4a0a31[_0x658b('0x47')][_0x658b('0x2e')](_0x658b('0x1d'))[_0x658b('0x18')](),_0x4a0a31[_0x658b('0x8')](_0x658b('0x1d'),{'forceDefaultExecution':!0x0});const _0x1af728=_0x12fb8a['filter'](_0xb4cbcd=>_0x658b('0x3d')!=_0xb4cbcd['root'][_0x658b('0x1c')]);_0x1af728[_0x658b('0x46')]>0x0&&_0x37ca4f['setSelection'](_0x1af728);for(const _0x4ccae9 of _0x12fb8a)_0x4ccae9[_0x658b('0x35')]();});});for(const _0x31ea46 of[_0x658b('0x1b'),'mergeTableCellDown',_0x658b('0x16'),_0x658b('0x25')]){const _0x45a019=_0x4a0a31[_0x658b('0x47')][_0x658b('0x2e')](_0x31ea46);_0x45a019['on']('set:isEnabled',(_0x34223b,_0x4002bb,_0xdf7341)=>{if(_0xdf7341){const _0x300aa0=_0x4a0a31[_0x658b('0x17')][_0x658b('0x49')][_0x658b('0xb')][_0x658b('0x2c')]()[_0x658b('0x7')]()['find'](_0x2f1e70=>_0x2f1e70['is'](_0x658b('0xf'),_0x658b('0x20')));this['_areMergableCells'](_0x45a019[_0x658b('0x48')],_0x300aa0)||(_0x34223b[_0x658b('0xe')]=!0x1,_0x34223b[_0x658b('0x15')]());}},{'priority':_0x658b('0x2a')});}}[_0x658b('0x28')](){const _0x3688a9=this[_0x658b('0x1f')][_0x658b('0x47')][_0x658b('0x2e')]('mergeTableCells'),_0x1b2bb5=this[_0x658b('0x1f')]['plugins'][_0x658b('0x2e')]('TableUtils');if(!_0x3688a9[_0x658b('0x1a')])return!0x1;const _0x1312d1=_0x1b2bb5[_0x658b('0x34')](this['editor'][_0x658b('0x17')][_0x658b('0x49')][_0x658b('0xb')]);for(const _0x5a8fa7 of _0x1312d1)for(const _0x3a7bba of _0x1312d1)if(_0x5a8fa7!=_0x3a7bba&&!this[_0x658b('0x6')](_0x5a8fa7,_0x3a7bba))return!0x1;return!0x0;}[_0x658b('0x6')](_0x5587aa,_0x1894ff){const _0x380691=this[_0x658b('0x1f')]['plugins'][_0x658b('0x2e')](_0x658b('0x32')),_0x1760a6=this[_0x658b('0x1f')][_0x658b('0x17')][_0x658b('0x0')](_0x5587aa),_0x108686=this['editor'][_0x658b('0x17')][_0x658b('0x0')](_0x1894ff),_0x5d0a2e=new Set(),_0x52f593=new Set();for(const _0x23bc2c of _0x380691['getSuggestions']())if((_0x658b('0x21')==_0x23bc2c[_0x658b('0x29')]||'deletion'==_0x23bc2c[_0x658b('0x29')]||_0x658b('0x1d')==_0x23bc2c[_0x658b('0x3b')])&&_0x23bc2c[_0x658b('0x44')])for(const _0x238f76 of _0x23bc2c[_0x658b('0x38')]())_0x238f76[_0x658b('0x5')](_0x1760a6,!0x0)&&_0x5d0a2e[_0x658b('0x2f')](_0x23bc2c[_0x658b('0x29')]+':'+_0x23bc2c[_0x658b('0x2d')]['id']),_0x238f76[_0x658b('0x5')](_0x108686,!0x0)&&_0x52f593[_0x658b('0x2f')](_0x23bc2c[_0x658b('0x29')]+':'+_0x23bc2c[_0x658b('0x2d')]['id']);if(_0x5d0a2e[_0x658b('0x4')]!=_0x52f593[_0x658b('0x4')])return!0x1;for(const _0x40a479 of _0x5d0a2e)if(!_0x52f593[_0x658b('0x27')](_0x40a479))return!0x1;return!0x0;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
const _0x458b=['createRange','ELEMENT_TITLE','editor','schema','nodeBefore','start','isCollapsed','TrackChangesEditing','title-content','model','plugins','Title','_descriptionFactory','registerPostFixer','getChangedMarkers','_splitMarkerName','updateMarker','forward','suggestion','document','element','from','end','newRange','has','afterInit','getNearestSelectionRange','isTouching'];(function(_0x1c89b1,_0x458b00){const _0x4cbbb8=function(_0x5a8107){while(--_0x5a8107){_0x1c89b1['push'](_0x1c89b1['shift']());}};_0x4cbbb8(++_0x458b00);}(_0x458b,0xdb));const _0x4cbb=function(_0x1c89b1,_0x458b00){_0x1c89b1=_0x1c89b1-0x0;let _0x4cbbb8=_0x458b[_0x1c89b1];return _0x4cbbb8;};import{Plugin as _0x7ac867}from'ckeditor5/src/core';import{getTranslation as _0x4f00cd}from'../utils/common-translations';export default class gt extends _0x7ac867{[_0x4cbb('0x2')](){const _0x5a69b8=this[_0x4cbb('0x7')];if(!_0x5a69b8[_0x4cbb('0xf')][_0x4cbb('0x1')](_0x4cbb('0x10')))return;const _0x555a7f=_0x5a69b8[_0x4cbb('0xf')]['get'](_0x4cbb('0xc'));_0x555a7f[_0x4cbb('0x11')]['registerElementLabel'](_0x4cbb('0xd'),()=>_0x4f00cd(_0x5a69b8['locale'],_0x4cbb('0x6'))),_0x5a69b8[_0x4cbb('0xe')][_0x4cbb('0x18')][_0x4cbb('0x12')](_0x818371=>{let _0x231849=!0x1;const _0x11fd95=Array[_0x4cbb('0x1a')](_0x5a69b8[_0x4cbb('0xe')][_0x4cbb('0x18')]['differ'][_0x4cbb('0x13')]());for(const {name:_0x3004dc,data:_0xd1bc8c}of _0x11fd95){const {group:_0x913ba7}=_0x555a7f[_0x4cbb('0x14')](_0x3004dc);if(_0x4cbb('0x17')!==_0x913ba7||!_0xd1bc8c[_0x4cbb('0x0')])continue;const _0x1d7b69=_0xd1bc8c[_0x4cbb('0x0')],_0x332499=_0x1d7b69['end'][_0x4cbb('0x9')];if(!_0x332499||!_0x332499['is'](_0x4cbb('0x19'),_0x4cbb('0xd')))continue;if(!_0x1d7b69[_0x4cbb('0xa')][_0x4cbb('0x4')](_0x1d7b69[_0x4cbb('0x1b')]))continue;const _0x3b4fda=_0x5a69b8[_0x4cbb('0xe')][_0x4cbb('0x8')][_0x4cbb('0x3')](_0x1d7b69[_0x4cbb('0x1b')],_0x4cbb('0x16'));if(_0x3b4fda&&_0x3b4fda[_0x4cbb('0xb')]){const _0x496cd9=_0x818371[_0x4cbb('0x5')](_0x1d7b69[_0x4cbb('0xa')],_0x3b4fda[_0x4cbb('0xa')]);_0x496cd9['isEqual'](_0x1d7b69)||(_0x818371[_0x4cbb('0x15')](_0x3004dc,{'range':_0x496cd9}),_0x231849=!0x0);}_0x231849||(_0x818371['removeMarker'](_0x3004dc),_0x231849=!0x0);}return _0x231849;});}}
|
package/src/integrations/undo.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1c45=['editor','enableCommand','UndoEditing','afterInit','get','redo','plugins','has'];(function(_0x278b4c,_0x1c45f7){const _0x20d2e5=function(_0x473875){while(--_0x473875){_0x278b4c['push'](_0x278b4c['shift']());}};_0x20d2e5(++_0x1c45f7);}(_0x1c45,0x10a));const _0x20d2=function(_0x278b4c,_0x1c45f7){_0x278b4c=_0x278b4c-0x0;let _0x20d2e5=_0x1c45[_0x278b4c];return _0x20d2e5;};import{Plugin as _0x3ba084}from'ckeditor5/src/core';export default class lt extends _0x3ba084{[_0x20d2('0x1')](){const _0x19e505=this[_0x20d2('0x6')],_0x59659a=_0x19e505[_0x20d2('0x4')][_0x20d2('0x2')]('TrackChangesEditing');_0x19e505[_0x20d2('0x4')][_0x20d2('0x5')](_0x20d2('0x0'))&&(_0x59659a[_0x20d2('0x7')]('undo'),_0x59659a[_0x20d2('0x7')](_0x20d2('0x3')));}}
|