@ckeditor/ckeditor5-revision-history 48.2.0-alpha.3 → 48.2.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +7 -7
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x4cc566,uid as _0x39af30,Collection as _0x4ec909,logWarning as _0x58e586,FocusTracker as _0x3faa7f,KeystrokeHandler as _0x4dc357,scrollViewportToShowTarget as _0x1f3b6f,ResizeObserver as _0x938bc0,ElementReplacer as _0xf2e4c6,CKEditorError as _0x37ae31}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x80fe75,set as _0x3f1c53,unset as _0x201552,isEqual as _0x51eea3}from'es-toolkit/compat';import{Plugin as _0x41f403,PendingActions as _0xcf8949,Command as _0x5bba97,ElementApiMixin as _0x47b989,Editor as _0x5909ee}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x5445fe,getMarkerDomElement as _0x1827f5,ConfirmMixin as _0x4def72,sanitizeEditorConfig as _0xee47a9}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x2c0c23,ViewAttributeElement as _0x26364e,ViewEmptyElement as _0x1ca6f7,ViewRawElement as _0x1355c1,ViewUIElement as _0x16bb6e,ViewDocumentFragment as _0x314527,ViewText as _0x39aa85,ViewElement as _0x326378,ModelElement as _0x3afe29,ModelRange as _0x303fe7,ModelPosition as _0x33bdb0,ModelDocumentFragment as _0x479b0a,ModelText as _0x5f2a14}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x4718bb,IconChevronUp as _0x284f98,IconChevronDown as _0x5976d2,IconUndo as _0x26b685,IconUser as _0x498d03,IconThreeVerticalDots as _0x4836c2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x3babf8,View as _0x1d5c9d,submitHandler as _0x4990f0,LabeledFieldView as _0x5b487d,createLabeledInputText as _0x58f4b5,createDropdown as _0x47df31,ListView as _0x44e5cd,ListItemView as _0x504708,ButtonView as _0x4e9658,MenuBarMenuView as _0x30a116,MenuBarMenuListView as _0x559a0c,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
24
- _0x4cc566(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x11f425){super(),this['id']=_0x11f425['id']||_0x39af30(),this['creator']=_0x11f425['creator']||null,this['authors']=_0x11f425['authors']||[],this['diffData']=_0x11f425['diffData']||null,this['toVersion']=_0x11f425['toVersion']||0x0,this['fromVersion']=_0x11f425['fromVersion']||0x0,this['set']('name',_0x11f425['name']||''),this['set']('createdAt',_0x11f425['createdAt']||new Date()),this['set']('attributes',_0x11f425['attributes']||{});}['setName'](_0x5dd046){this['_update']({'name':_0x5dd046});}['setAttribute'](_0x55b7d1,_0x1dc25c){const _0x23b239=_0x80fe75(this['attributes']);_0x3f1c53(_0x23b239,_0x55b7d1,_0x1dc25c),this['_update']({'attributes':_0x23b239});}['removeAttribute'](_0x349fa2){const _0x579de8=_0x80fe75(this['attributes']);_0x201552(_0x579de8,_0x349fa2),this['_update']({'attributes':_0x579de8});}['_update'](_0x396747,_0x4c929f=!0x1){let _0x154054=!0x1;const _0x119519={'id':this['id']},_0x72fd1a=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x899217 of _0x72fd1a){const _0x52733c=_0x396747[_0x899217];void 0x0!==_0x52733c&&_0x52733c!==this[_0x899217]&&(this[_0x899217]=_0x52733c,_0x119519[_0x899217]=_0x52733c,_0x154054=!0x0);}_0x154054&&(_0x119519['authors']&&(_0x119519['authorsIds']=_0x119519['authors']['map'](_0x1cc1eb=>_0x1cc1eb['id']),delete _0x119519['authors']),this['fire']('_update',_0x119519,_0x4c929f));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x16947f=>_0x16947f['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x41f403{['_revisions'];static get['requires'](){return[_0x5445fe];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2659f5){super(_0x2659f5),this['_revisions']=new _0x4ec909();}['afterInit'](){!async function(_0x3ac7fb){const _0x5a325f=_0x45f8b2([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x2716ba=0xeb829,_0x15c312=0x359e09b0,_0x3f2c8b=0x35998238^_0x15c312,_0x48de87=window[_0x45f8b2([0x44,0x61,0x74,0x65])][_0x45f8b2([0x6e,0x6f,0x77])](),_0x303aac=_0x3ac7fb[_0x45f8b2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x32740d=new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x523831=>{_0x303aac[_0x45f8b2([0x6f,0x6e,0x63,0x65])](_0x45f8b2([0x72,0x65,0x61,0x64,0x79]),_0x523831);}),_0x53c2d5={[_0x45f8b2([0x6b,0x74,0x79])]:_0x45f8b2([0x45,0x43]),[_0x45f8b2([0x75,0x73,0x65])]:_0x45f8b2([0x73,0x69,0x67]),[_0x45f8b2([0x63,0x72,0x76])]:_0x45f8b2([0x50,0x2d,0x32,0x35,0x36]),[_0x45f8b2([0x78])]:_0x45f8b2([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x45f8b2([0x79])]:_0x45f8b2([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x45f8b2([0x61,0x6c,0x67])]:_0x45f8b2([0x45,0x53,0x32,0x35,0x36])},_0x1475ce=_0x303aac[_0x45f8b2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x45f8b2([0x67,0x65,0x74])](_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3993a0(){let _0x2e434d,_0x581c40=null,_0x1783e0=null;try{if(_0x1475ce==_0x45f8b2([0x47,0x50,0x4c]))return _0x45f8b2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e434d=_0x263503(),!_0x2e434d)return _0x45f8b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e434d[_0x45f8b2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1783e0=_0x1779ce(_0x2e434d[_0x45f8b2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e434d[_0x45f8b2([0x6a,0x74,0x69])])),await _0x1ed1d5()?_0xae9f01()?_0x25ebc7()?_0x45f8b2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x485e57()?(_0x2e434d[_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x45f8b2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x581c40=_0x50cf21(_0x45f8b2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xcd6d18()):_0x45f8b2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x45f8b2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x45f8b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x45f8b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x25ebc7(){const _0x217f8d=[_0x45f8b2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x45f8b2([0x74,0x72,0x69,0x61,0x6c])][_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e434d[_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x48de87/0x3e8:0xe10*_0x3f2c8b;return _0x2e434d[_0x45f8b2([0x65,0x78,0x70])]<_0x217f8d;}function _0xae9f01(){const _0x3c31a7=_0x2e434d[_0x45f8b2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3c31a7)return!0x1;if(_0x3c31a7[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x2a])))return!0x0;if(_0x3c31a7[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x52,0x48])))return!0x0;if(_0x3c31a7[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x52,0x52,0x48]))){if(_0x3c394a())return!0x0;if(_0x2c342e()||_0x57cbd4())return!0x0;}return!0x1;}function _0x485e57(){const _0x1f438a=_0x2e434d[_0x45f8b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1f438a||0x0==_0x1f438a[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x32cc0e}=new URL(window[_0x45f8b2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1f438a[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32cc0e))return!0x0;const _0x46d078=_0x32cc0e[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e]));return _0x1f438a[_0x45f8b2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xcd6043=>_0xcd6043[_0x45f8b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45f8b2([0x2a])))[_0x45f8b2([0x6d,0x61,0x70])](_0x500b8a=>_0x500b8a[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e])))[_0x45f8b2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e8536=>_0x4e8536[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x46d078[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45f8b2([0x6d,0x61,0x70])](_0x1636ec=>Array(_0x46d078[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1636ec[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45f8b2([0x66,0x69,0x6c,0x6c])](_0x1636ec[0x0]===_0x45f8b2([0x2a])?_0x45f8b2([0x2a]):'')[_0x45f8b2([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1636ec))[_0x45f8b2([0x73,0x6f,0x6d,0x65])](_0x1ff7df=>_0x46d078[_0x45f8b2([0x65,0x76,0x65,0x72,0x79])]((_0x41f879,_0x30fefc)=>_0x1ff7df[_0x30fefc]===_0x41f879||_0x1ff7df[_0x30fefc]===_0x45f8b2([0x2a])));}function _0xcd6d18(){return _0x581c40&&_0x1783e0?new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2cbf18,_0xef1222)=>{_0x581c40[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x2cbf18,_0xef1222),_0x1783e0[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x3068bc=>{_0x3068bc!=_0x45f8b2([0x56,0x61,0x6c,0x69,0x64])&&_0x2cbf18(_0x3068bc);},_0xef1222);}):_0x581c40||_0x1783e0||_0x45f8b2([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1779ce(_0x19f56d,_0x528b60){return new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x376df4=>{if(_0x52e574())return _0x376df4(_0x45f8b2([0x56,0x61,0x6c,0x69,0x64]));_0x24566c(),_0x303aac[_0x45f8b2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x45f8b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x164918=!0x1;const _0x4a6344=_0x39af30();function _0x2624de(_0xc70b91){return!!_0xc70b91&&(typeof _0xc70b91===_0x45f8b2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xc70b91===_0x45f8b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xc70b91[_0x45f8b2([0x74,0x68,0x65,0x6e])]===_0x45f8b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xc70b91[_0x45f8b2([0x63,0x61,0x74,0x63,0x68])]===_0x45f8b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4b9b0b(_0x39d078){_0x16ddf6(_0x39d078)[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x1c6ba4=>{if(!_0x1c6ba4||_0x1c6ba4[_0x45f8b2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x45f8b2([0x6f,0x6b]))return _0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x523873(_0x2cf24c(_0x4a6344+_0x528b60))!=_0x1c6ba4[_0x45f8b2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x45f8b2([0x56,0x61,0x6c,0x69,0x64]);})[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x1ccf72=>(_0x59e7a2(),_0x1ccf72),()=>{const _0x50ae50=_0x45aac3();return null==_0x50ae50?(_0x59e7a2(),_0x45f8b2([0x56,0x61,0x6c,0x69,0x64])):_0x45f8b2(_0x48de87-_0x50ae50>(0x11928db0^_0x15c312)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x376df4)[_0x45f8b2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x376df4(_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x483ca8=0x35a8e730^_0x15c312;function _0x59e7a2(){const _0x3530b5=_0x45f8b2([0x6c,0x6c,0x63,0x74,0x2d])+_0x523873(_0x2cf24c(_0x19f56d)),_0x10a5dc=_0x5dc02d(_0x523873(window[_0x45f8b2([0x4d,0x61,0x74,0x68])][_0x45f8b2([0x63,0x65,0x69,0x6c])](_0x48de87/_0x483ca8)));window[_0x45f8b2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45f8b2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3530b5,_0x10a5dc);}function _0x45aac3(){const _0x2b5924=_0x45f8b2([0x6c,0x6c,0x63,0x74,0x2d])+_0x523873(_0x2cf24c(_0x19f56d)),_0x1b6289=window[_0x45f8b2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45f8b2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b5924);return _0x1b6289?window[_0x45f8b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5dc02d(_0x1b6289),0x10)*_0x483ca8:null;}function _0x16ddf6(_0x294bfe){return new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a9017,_0x39950c)=>{_0x294bfe[_0x45f8b2([0x74,0x68,0x65,0x6e])](_0x1a9017,_0x39950c),window[_0x45f8b2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x39950c,0x359fdd70^_0x15c312);});}}_0x303aac[_0x45f8b2([0x6f,0x6e])](_0x45f8b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2b6c14,_0x3b6b69)=>{if(_0x3b6b69[0x0]!=_0x19f56d)return _0x376df4(_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3b6b69[0x1]={..._0x3b6b69[0x1],[_0x45f8b2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4a6344};},{[_0x45f8b2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45f8b2([0x68,0x69,0x67,0x68])}),_0x303aac[_0x45f8b2([0x6f,0x6e])](_0x45f8b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x15b5a2=>{_0x2624de(_0x15b5a2[_0x45f8b2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x164918=!0x0,_0x4b9b0b(_0x15b5a2[_0x45f8b2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x45f8b2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45f8b2([0x6c,0x6f,0x77])}),_0x32740d[_0x45f8b2([0x74,0x68,0x65,0x6e])](()=>{_0x164918||_0x376df4(_0x45f8b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52e574(){return _0x303aac[_0x45f8b2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45f8b2([0x76,0x69,0x65,0x77])][_0x45f8b2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x45f8b2([0x61,0x75,0x74,0x6f]);}function _0x24566c(){_0x303aac[_0x45f8b2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45f8b2([0x76,0x69,0x65,0x77])][_0x45f8b2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x45f8b2([0x61,0x75,0x74,0x6f]);}}function _0x50cf21(_0x1c95c8){const _0x580966=[new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2758d2=>setTimeout(_0x2758d2,0x3597377c^_0x15c312)),_0x32740d[_0x45f8b2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51dabb=>{const _0x22de52=0x359e09b7^_0x15c312,_0x3b9daa=_0x3ac7fb[_0x45f8b2([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x1d5d0d(){_0x3b9daa[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x22de52&&_0x51dabb();}_0x1d5d0d(),_0x3b9daa[_0x45f8b2([0x6f,0x6e])](_0x45f8b2([0x61,0x64,0x64]),_0x1d5d0d);})),new window[(_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19bbae=>{function _0x1b6aab(){for(const _0x2203b5 in window)if(window[_0x45f8b2([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x45f8b2([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2203b5))&&window[_0x2203b5]==_0x2716ba)return _0x19bbae();_0x303aac[_0x45f8b2([0x73,0x74,0x61,0x74,0x65])]!=_0x45f8b2([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x45f8b2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1b6aab,0x359e1a38^_0x15c312);}_0x16a9c6(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1b6aab();})];return window[_0x45f8b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x45f8b2([0x72,0x61,0x63,0x65])](_0x580966)[_0x45f8b2([0x74,0x68,0x65,0x6e])](()=>_0x1c95c8);}async function _0x35b485(){if(await _0x32740d,_0x16a9c6(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x42066d=_0x3ac7fb[_0x45f8b2([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x235a48=_0x3ac7fb[_0x45f8b2([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x42066d[_0x45f8b2([0x69,0x64])]),_0x1f2a6d=_0x47dd27(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1f2a6d[_0x45f8b2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x42066d['id'],_0x235a48?_0x235a48['id']:null,!0x0),_0x1f2a6d[_0x45f8b2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1f2a6d[_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1f2a6d[_0x45f8b2([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x1cf479,void(_0x1f2a6d[_0x45f8b2([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x1cf479);}if(_0x16a9c6(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3399d6=_0x47dd27(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3399d6[_0x45f8b2([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3399d6[_0x45f8b2([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3399d6[_0x45f8b2([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x1cf479,_0x3399d6[_0x45f8b2([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x1cf479;}_0x303aac[_0x45f8b2([0x6d,0x6f,0x64,0x65,0x6c])][_0x45f8b2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1cf479,_0x303aac[_0x45f8b2([0x6d,0x6f,0x64,0x65,0x6c])][_0x45f8b2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1cf479,_0x303aac[_0x45f8b2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x45f8b2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3c394a(){return _0x16a9c6(_0x45f8b2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x47dd27(_0x45f8b2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x45f8b2([0x73,0x74,0x61,0x74,0x65])]==_0x45f8b2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2c342e(){return _0x16a9c6(_0x45f8b2([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x57cbd4(){return _0x16a9c6(_0x45f8b2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x470352(_0x1f2012){const _0x58be43=_0x1a1eef();_0x303aac[_0x58be43]=_0x45f8b2([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1f2012,_0x1f2012[_0x45f8b2([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x45f8b2([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x1a1eef()]=_0x2716ba),_0x1f2012!=_0x45f8b2([0x56,0x61,0x6c,0x69,0x64])&&_0x35b485();}function _0x1a1eef(){const _0xc47bf1=window[_0x45f8b2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x45f8b2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x45f8b2([0x6e,0x6f,0x77])]())[_0x45f8b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x45f8b2([0x2e]),'');let _0x47bf17=_0x45f8b2([0x76]);for(let _0x220308=0x0;_0x220308<_0xc47bf1[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x220308+=0x2){let _0x38ac25=window[_0x45f8b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc47bf1[_0x45f8b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x220308,_0x220308+0x2));_0x38ac25>=_0x5a325f[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x38ac25-=_0x5a325f[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x47bf17+=_0x5a325f[_0x38ac25];}return _0x47bf17;}function _0x263503(){const _0x23cbff=_0x1475ce[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e]));if(0x3!=_0x23cbff[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x33763e(_0x23cbff[0x1]);function _0x33763e(_0x26f89f){const _0x33f659=_0x125bff(_0x26f89f);return _0x33f659&&_0x486d45()?_0x33f659:null;function _0x486d45(){const _0x1b2f4a=_0x33f659[_0x45f8b2([0x6a,0x74,0x69])],_0x18dc63=window[_0x45f8b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b2f4a[_0x45f8b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b2f4a[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1d09cb={..._0x33f659,[_0x45f8b2([0x6a,0x74,0x69])]:_0x1b2f4a[_0x45f8b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b2f4a[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1d09cb[_0x45f8b2([0x76,0x63])],_0x2cf24c(_0x1d09cb)==_0x18dc63;}}}async function _0x1ed1d5(){let _0x2a5b08=!0x0;try{const _0xf17fa=_0x1475ce[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])](_0x45f8b2([0x2e])),[_0x5ec3e5,_0x279c1f,_0xf7931d]=_0xf17fa;return _0x1c6b8c(_0x5ec3e5),await _0x25de89(_0x5ec3e5,_0x279c1f,_0xf7931d),_0x2a5b08;}catch{return!0x1;}function _0x1c6b8c(_0x29b1c7){const _0xa00b87=_0x125bff(_0x29b1c7);_0xa00b87&&_0xa00b87[_0x45f8b2([0x61,0x6c,0x67])]==_0x45f8b2([0x45,0x53,0x32,0x35,0x36])||(_0x2a5b08=!0x1);}async function _0x25de89(_0xa41a8,_0x304850,_0x32639f){const _0x5527ef=window[_0x45f8b2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x45f8b2([0x66,0x72,0x6f,0x6d])](_0x32ca25(_0x32639f),_0x3c817f=>_0x3c817f[_0x45f8b2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4f36b6=new window[(_0x45f8b2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x45f8b2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xa41a8+_0x45f8b2([0x2e])+_0x304850),_0x3f7ddb=window[_0x45f8b2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x45f8b2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f7ddb)return;const _0x7c691b=await _0x3f7ddb[_0x45f8b2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x45f8b2([0x6a,0x77,0x6b]),_0x53c2d5,{[_0x45f8b2([0x6e,0x61,0x6d,0x65])]:_0x45f8b2([0x45,0x43,0x44,0x53,0x41]),[_0x45f8b2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x45f8b2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x45f8b2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f7ddb[_0x45f8b2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x45f8b2([0x6e,0x61,0x6d,0x65])]:_0x45f8b2([0x45,0x43,0x44,0x53,0x41]),[_0x45f8b2([0x68,0x61,0x73,0x68])]:{[_0x45f8b2([0x6e,0x61,0x6d,0x65])]:_0x45f8b2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x7c691b,_0x5527ef,_0x4f36b6)||(_0x2a5b08=!0x1);}}function _0x125bff(_0x545061){return _0x545061[_0x45f8b2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x45f8b2([0x65,0x79]))?JSON[_0x45f8b2([0x70,0x61,0x72,0x73,0x65])](_0x32ca25(_0x545061)):null;}function _0x32ca25(_0x1735a9){return window[_0x45f8b2([0x61,0x74,0x6f,0x62])](_0x1735a9[_0x45f8b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x45f8b2([0x2b]))[_0x45f8b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x45f8b2([0x2f])));}function _0x2cf24c(_0x1fa3c7){let _0x2733dc=0x1505;function _0x5f0adc(_0x4e0b92){for(let _0x28cb63=0x0;_0x28cb63<_0x4e0b92[_0x45f8b2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28cb63++){const _0x5c79f1=_0x4e0b92[_0x45f8b2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x28cb63);_0x2733dc=(_0x2733dc<<0x5)+_0x2733dc+_0x5c79f1,_0x2733dc&=_0x2733dc;}}function _0x3189fa(_0xaabfe6){Array[_0x45f8b2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xaabfe6)?_0xaabfe6[_0x45f8b2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3189fa):_0xaabfe6&&typeof _0xaabfe6==_0x45f8b2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x45f8b2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xaabfe6)[_0x45f8b2([0x73,0x6f,0x72,0x74])]()[_0x45f8b2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x536e91,_0x38a994])=>{_0x5f0adc(_0x536e91),_0x3189fa(_0x38a994);}):_0x5f0adc(window[_0x45f8b2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xaabfe6));}return _0x3189fa(_0x1fa3c7),_0x2733dc>>>0x0;}function _0x523873(_0x1c52bf){return _0x1c52bf[_0x45f8b2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x45f8b2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x45f8b2([0x30]));}function _0x5dc02d(_0x5e6d70){return _0x5e6d70[_0x45f8b2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x45f8b2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x45f8b2([0x6a,0x6f,0x69,0x6e])]('');}function _0x16a9c6(_0x2fc427){return _0x303aac[_0x45f8b2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x45f8b2([0x68,0x61,0x73])](_0x2fc427);}function _0x47dd27(_0x16f14b){return _0x303aac[_0x45f8b2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x45f8b2([0x67,0x65,0x74])](_0x16f14b);}function _0x1cf479(){}function _0x45f8b2(_0x2f9bd1){return _0x2f9bd1['map'](_0x5cc708=>String['fromCharCode'](_0x5cc708))['join']('');}_0x470352(await _0x3993a0());}(this);}['createRevision'](_0x55a276){const _0xf8f372=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x55a276['id'],'name':_0x55a276['name'],'creator':_0x55a276['creatorId']?_0xf8f372['getUser'](_0x55a276['creatorId']):null,'diffData':_0x55a276['diffData']||_0x55a276['data'],'authors':_0x55a276['authorsIds']['map'](_0xdec7dc=>_0xf8f372['getUser'](_0xdec7dc)),'createdAt':new Date(_0x55a276['createdAt']),'attributes':_0x55a276['attributes'],'fromVersion':_0x55a276['fromVersion'],'toVersion':_0x55a276['toVersion']});}['addRevision'](_0x15cf65,_0x4a4c0a=0x0){this['_revisions']['add'](_0x15cf65,_0x4a4c0a);}['getRevision'](_0x2655a3){return this['_revisions']['get'](_0x2655a3);}['getRevisions'](_0x4390ec={'toJSON':!0x1}){const _0x195864=Array['from'](this['_revisions']);return _0x195864['reverse'](),_0x4390ec['toJSON']?_0x195864['map'](_0x54fc04=>_0x54fc04['toJSON']()):_0x195864;}['getIndex'](_0x1743a1){return this['_revisions']['getIndex'](_0x1743a1);}['getEarlierVisibleRevision'](_0x150411){const [,_0x1f8d54]=this['getRevisionsIterator'](_0x150411,{'direction':'earlier'});return _0x1f8d54;}['getLaterVisibleRevision'](_0x5a966b){const [,_0x548af1]=this['getRevisionsIterator'](_0x5a966b,{'direction':'later'});return _0x548af1;}['getRevisionsInDiff'](_0x28a5dc){const _0x284834=[];for(const _0x50fadf of this['getRevisionsIterator'](_0x28a5dc['newRevisionId']))if(_0x284834['push'](_0x50fadf),_0x50fadf['id']===_0x28a5dc['oldRevisionId'])break;return _0x284834;}*['getRevisionsIterator'](_0x479e49,{direction:_0x3da5db='earlier',filter:_0x5add4e=()=>!0x0}={}){const _0x13fc49='earlier'===_0x3da5db?0x1:-0x1;let _0x382d26=this['_revisions']['get'](_0x479e49),_0x192d0b=this['getIndex'](_0x382d26);for(yield _0x382d26;_0x382d26;){if(_0x192d0b+=_0x13fc49,_0x382d26=this['getRevision'](_0x192d0b),!_0x382d26)return;_0x5add4e(_0x382d26)&&(yield _0x382d26);}}}class RevisionHistoryUtils extends _0x41f403{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2c0c23,'c'],[_0x26364e,'a'],[_0x1ca6f7,'e'],[_0x1355c1,'r'],[_0x16bb6e,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2c0c23],['a',_0x26364e],['e',_0x1ca6f7],['r',_0x1355c1],['u',_0x16bb6e]]);async['loadRevisionData'](_0x10e5f6,_0x170612){if(_0x10e5f6['diffData']||!_0x170612)return;const _0x1e57dc=this['editor']['config']['get']('collaboration.channelId'),_0x577bd0=await _0x170612['getRevision']({'channelId':_0x1e57dc,'revisionId':_0x10e5f6['id']});_0x10e5f6['diffData']=_0x577bd0['diffData'];}['getRevisionDocumentData'](_0x12e8d9){const _0x668b8e={};for(const _0x40fb1d in _0x12e8d9['diffData']){if(_0x12e8d9['diffData'][_0x40fb1d]['attachChange']&&!_0x12e8d9['diffData'][_0x40fb1d]['attachChange']['isAttached'])continue;const _0x4e22b8=this['_removeRevisionMarkers'](JSON['parse'](_0x12e8d9['diffData'][_0x40fb1d]['insertions'])),_0x593356=this['editor']['editing']['view']['document'],_0xc4e44a=new _0x314527(_0x593356,_0x4e22b8['map'](_0xc3d98c=>this['_getViewFromDiffObj'](_0xc3d98c,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x668b8e[_0x40fb1d]=this['editor']['data']['processor']['toData'](_0xc4e44a),this['editor']['data']['processor']['useFillerType']('default');}return _0x668b8e;}['getRevisionRootsAttributes'](_0x1da376){const _0x122d64={};for(const _0xaf8cf7 in _0x1da376['diffData'])_0x1da376['diffData'][_0xaf8cf7]['attachChange']&&!_0x1da376['diffData'][_0xaf8cf7]['attachChange']['isAttached']||(_0x122d64[_0xaf8cf7]=_0x1da376['diffData'][_0xaf8cf7]['attributesAfter']||{});return _0x122d64;}['getRevisionRootsModelElements'](_0x4eac23){const _0x42e948={};for(const _0x49987e in _0x4eac23['diffData']){if(_0x4eac23['diffData'][_0x49987e]['attachChange']&&!_0x4eac23['diffData'][_0x49987e]['attachChange']['isAttached'])continue;const _0x46fd72=_0x4eac23['diffData'][_0x49987e]['rootElementName'];_0x46fd72&&(_0x42e948[_0x49987e]=_0x46fd72);}return _0x42e948;}['_getTypeCharForViewElement'](_0x118cc0){return this['_viewClassToTypeChar']['get'](_0x118cc0['constructor']);}['_getViewFromDiffObj'](_0x43c654,_0x4cbd1c){const _0x22c545=this['editor']['editing']['view']['document'];if('string'==typeof _0x43c654)return new _0x39aa85(_0x22c545,_0x43c654);{let _0xa651b5,_0x23a3aa;_0x23a3aa='u'==_0x43c654['type']||'r'==_0x43c654['type']?[]:_0x43c654['children']['map'](_0xa3e971=>this['_getViewFromDiffObj'](_0xa3e971,_0x4cbd1c));const _0x156397=this['_typeCharToViewClass']['get'](_0x43c654['type'])||_0x326378,_0x4e972c=this['editor']['data']['htmlProcessor']['domConverter'];if(_0xa651b5=new _0x156397(_0x22c545,_0x43c654['name'],_0x43c654['attributes'],_0x23a3aa),'u'==_0x43c654['type']&&_0x43c654['children'][0x0]){const _0x3bef2d=_0x43c654['children'][0x0];if(_0xa651b5['render']=function(_0x560701){const _0x1e8d17=_0x560701['createElement']('div');return _0x1e8d17['innerHTML']=_0x3bef2d,_0x1e8d17['childNodes'][0x0];},_0x4cbd1c){const _0x2d63e1=new _0x314527(_0x22c545);_0x2d63e1['_appendChild'](_0xa651b5);const _0x5b46ab=Array['from'](_0x4e972c['viewChildrenToDom'](_0x2d63e1,{'bind':!0x1})),_0x171608=_0x4e972c['domDocument']['createElement']('div');_0x171608['append'](..._0x5b46ab),_0xa651b5=Array['from'](_0x4e972c['domChildrenToView'](_0x171608))[0x0];}}else{if('r'==_0x43c654['type']&&_0x43c654['children'][0x0]){const _0x5f534e=_0x43c654['children'][0x0];if(_0xa651b5['render']=function(_0x21f003){_0x21f003['innerHTML']=_0x5f534e;},_0x4cbd1c){const _0xb1050e=new _0x314527(_0x22c545);_0xb1050e['_appendChild'](_0xa651b5);const _0x3986f3=Array['from'](_0x4e972c['viewChildrenToDom'](_0xb1050e,{'bind':!0x1})),_0x5df9b6=_0x4e972c['domDocument']['createElement']('div');_0x5df9b6['append'](..._0x3986f3);const _0x49e14d=Array['from'](_0x4e972c['domChildrenToView'](_0x5df9b6));_0x49e14d['length']>0x1?_0xa651b5['_appendChild'](_0x49e14d):_0xa651b5=_0x49e14d[0x0];}}}if(_0x43c654['customProperties']){for(const [_0x36a591,_0x46a434]of _0x43c654['customProperties'])_0xa651b5['_setCustomProperty'](_0x36a591,_0x46a434);}const _0x546d26=void 0x0===_0x43c654['fillerOffset']?null:_0x43c654['fillerOffset'];return null!==_0x546d26&&(_0xa651b5['getFillerOffset']=()=>_0x546d26),_0xa651b5;}}['_makeModelFromViewString'](_0x5a6b29,_0x510750){const _0x2f0e96=JSON['parse'](_0x5a6b29),_0x4d4640=this['editor']['editing']['view']['document'],_0x37a3cf=new _0x314527(_0x4d4640,_0x2f0e96['map'](_0x12da0d=>this['_getViewFromDiffObj'](_0x12da0d,!0x0))),_0x1303fd=this['editor']['data']['toModel'](_0x37a3cf,_0x510750);return _0x1303fd['name']=_0x510750,_0x1303fd;}['_removeRevisionMarkers'](_0x1f487f){return(_0x1f487f=_0x1f487f['filter'](_0x2e9aee=>!_0x2e9aee['name']||'revision-start'!==_0x2e9aee['name']&&'revision-end'!==_0x2e9aee['name']))['forEach'](_0x35be32=>{'string'!=typeof _0x35be32&&(_0x35be32['children']=this['_removeRevisionMarkers'](_0x35be32['children']),_0x35be32['attributes']=_0x35be32['attributes']['filter'](_0x4435de=>!_0x4435de[0x0]['startsWith']('data-revision-')));}),_0x1f487f;}}function ft(_0x359d28,_0x3a1a37,_0x337d64){const t=_0x359d28['t'];switch(_0x3a1a37){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x337d64);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x337d64);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x41f403{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5445fe,RevisionsRepository,RevisionHistoryUtils,_0xcf8949];}constructor(_0x254d29){super(_0x254d29),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3984ec=_0x39af30();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3984ec},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x56c37f=this['repository']['getRevision'](0x0),_0x523728=_0x56c37f&&null===_0x56c37f['creator']?_0x56c37f:null;if(this['_continueCurrentRevision']=!!_0x523728&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5f4ace=this['_source']['getCurrentRevisionId'](),_0x8f333e=this['repository']['getRevision'](_0x5f4ace);if(_0x8f333e)this['_startingVersion']=_0x8f333e['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3c7979=this['_source']['history']['_operations']['find'](_0x1b3d97=>!_0x1b3d97['_isInit']),_0x552bb3=_0x3c7979?_0x3c7979['baseVersion']:this['_source']['history']['version'];_0x56c37f?(_0x56c37f['toVersion']<_0x552bb3&&_0x56c37f['_update']({'toVersion':_0x552bb3}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x523728['id'],this['_startingVersion']=_0x523728['fromVersion']):(this['_startingVersion']=_0x56c37f['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x552bb3,this['_continueCurrentRevision']=!0x1);}}else _0x523728&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x523728['toVersion'],this['editor']['model']['document']['history']['version']),_0x523728['fromVersion']===_0x523728['toVersion']?(0x0!==_0x523728['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x523728['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x523728['id'],this['_startingVersion']=_0x523728['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x145e80=>!_0x145e80),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x11efe2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ef1e9;for(const _0x134890 in _0x11efe2){const _0x38e36f=_0x134890,_0x5be723=_0x11efe2[_0x38e36f];if('revisionHistoryLicenseKeyValid'==_0x5be723||'revisionHistoryLicenseKeyInvalid'==_0x5be723||'revisionHistoryLicenseKeyExpired'==_0x5be723||'revisionHistoryLicenseKeyDomainLimit'==_0x5be723||'revisionHistoryLicenseKeyNotAllowed'==_0x5be723||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5be723||'revisionHistoryLicenseKeyUsageLimit'==_0x5be723){delete _0x11efe2[_0x38e36f],_0x4ef1e9=_0x5be723,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4ef1e9&&_0x11efe2['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4d0f8f=this['repository']['getRevision'](0x0),_0x16b7e3=await this['getRevisionDocumentData'](_0x4d0f8f),_0xedf393=await this['getRevisionRootsAttributes'](_0x4d0f8f),_0x23b4ae=this['_utils']['getRevisionRootsModelElements'](_0x4d0f8f);this['_replaceEditorDataWithRevisionData'](_0x16b7e3,_0xedf393,_0x23b4ae);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x5e5128){this['_source']=_0x5e5128;}async['update'](){const _0x1be3d7=await this['_source']['getLatestVersion']();if(_0x1be3d7>this['currentRevision']['toVersion']){await this['_loadState']();const _0x338056=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1be3d7});_0x338056['authors']=_0x338056['authorsIds']['map'](_0x467815=>this['editor']['plugins']['get']('Users')['getUser'](_0x467815)),this['currentRevision']['_update'](_0x338056);}}async['saveRevision'](_0x441f40={},_0x42b305=null){const _0x4d5403=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x42b305>this['currentRevision']['toVersion']&&(_0x42b305=null),null===_0x42b305&&(_0x42b305=await this['_source']['getLatestVersion']());const _0x50f4c3=this['_getFromVersion'](_0x42b305),_0x2c8b2b=this['buildRevisionData']({'from':_0x50f4c3,'to':_0x42b305});if(this['currentRevision']['toVersion']<_0x42b305){const _0x99ed1e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x42b305,'to':_0x42b305});_0x99ed1e['authors']=[],_0x99ed1e['authorsIds']=[],_0x99ed1e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x99ed1e,!0x0),delete _0x99ed1e['authors'],_0x4d5403['push'](_0x99ed1e);}_0x441f40['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x441f40['name']=_0x441f40['name']||null,_0x441f40['id']=_0x441f40['id']||_0x39af30(),_0x441f40={..._0x441f40,..._0x2c8b2b};const _0x4b4b65=this['addRevisionData'](_0x441f40);_0x4d5403['push'](_0x441f40);const _0x316354=this['repository']['getIndex'](_0x4b4b65);if(0x0!==_0x316354){const _0x4519ac=this['repository']['getRevision'](_0x316354-0x1);if(_0x4519ac['fromVersion']!==_0x42b305){const _0x1e3150=this['_revisionDataBuilder']['getData'](_0x42b305,_0x4519ac['toVersion']),_0x5342db={'id':_0x4519ac['id'],'diffData':_0x1e3150['diffData'],'authorsIds':_0x1e3150['authorsIds'],'authors':_0x1e3150['authorsIds']['map'](_0x118358=>this['editor']['plugins']['get']('Users')['getUser'](_0x118358)),'fromVersion':_0x42b305};_0x4519ac===this['currentRevision']&&(_0x5342db['createdAt']=new Date(_0x441f40['createdAt']['getTime']()+0xa)),_0x4519ac['_update'](_0x5342db,!0x0),delete _0x5342db['authors'],_0x4d5403['push'](_0x5342db);}}if(this['adapter']){for(const _0x2ad9ed of _0x4d5403)this['_bufferUpdate'](_0x2ad9ed['id'],_0x2ad9ed,!0x0);this['sendBufferedUpdates']();}return _0x4b4b65;}['addRevisionData'](_0x2a6007){const _0x44f782=this['repository']['createRevision'](_0x2a6007);return this['adapter']&&_0x44f782['on']('_update',(_0x56daf9,_0x4f5369,_0x415c8f)=>{_0x415c8f||(this['_bufferUpdate'](_0x4f5369['id'],_0x4f5369,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x44f782,this['_findInsertionIndex'](_0x44f782)),_0x44f782;}async['getRevisionDocumentData'](_0x2f7f52){return await this['_utils']['loadRevisionData'](_0x2f7f52,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2f7f52);}async['getRevisionRootsAttributes'](_0xf08ebc){return await this['_utils']['loadRevisionData'](_0xf08ebc,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xf08ebc);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x4d30b4=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1fc2d2=0x0;_0x1fc2d2<_0x4d30b4['length'];_0x1fc2d2++){const _0x5a84d8=_0x4d30b4[_0x1fc2d2];let _0x26c1fa=!0x1;for(const _0x14d5b7 of Object['keys'](_0x5a84d8))void 0x0===_0x5a84d8[_0x14d5b7]?delete _0x5a84d8[_0x14d5b7]:'id'!==_0x14d5b7&&(_0x26c1fa=!0x0);_0x26c1fa||(_0x4d30b4[_0x1fc2d2]=null);}if(_0x4d30b4=_0x4d30b4['filter'](_0x2a0c69=>null!==_0x2a0c69),!_0x4d30b4['length'])return;for(let _0x3fd1d6=0x0;_0x3fd1d6<_0x4d30b4['length'];_0x3fd1d6++){const _0x2020d0=_0x4d30b4[_0x3fd1d6];void 0x0!==_0x2020d0['fromVersion']&&void 0x0===_0x2020d0['toVersion']&&(_0x2020d0['toVersion']=this['repository']['getRevision'](_0x2020d0['id'])['toVersion']),void 0x0!==_0x2020d0['toVersion']&&void 0x0===_0x2020d0['fromVersion']&&(_0x2020d0['fromVersion']=this['repository']['getRevision'](_0x2020d0['id'])['fromVersion']);}const _0x635e91=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x4d30b4,_0x635e91)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x48dda6=>{if(_0x48dda6){for(const _0x35b2c0 of _0x48dda6)this['setRevisionData']({'id':_0x35b2c0['id'],'createdAt':_0x35b2c0['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x2b9859=null,from:_0x2eadde=null,to:_0x1d0e99=null}){_0x2eadde=null!==_0x2eadde?_0x2eadde:_0x2b9859['fromVersion'],_0x1d0e99=null!==_0x1d0e99?_0x1d0e99:_0x2b9859['toVersion'];const _0x5d00c8=this['_revisionDataBuilder']['getData'](_0x2eadde,_0x1d0e99),_0x2b7985={'diffData':_0x5d00c8['diffData'],'authorsIds':_0x5d00c8['authorsIds'],'fromVersion':_0x2eadde,'toVersion':_0x1d0e99};if(!_0x2b9859||_0x1d0e99!==_0x2b9859['toVersion']){const _0x13d14d=_0x1d0e99-0x1,_0x15b736=this['_source']['history']['getOperation'](_0x13d14d);_0x2b7985['createdAt']=_0x15b736&&_0x15b736['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2eadde===this['_loadedStateData']['fromVersion']){for(const _0x3dc95c of this['_loadedStateData']['authors'])_0x2b7985['authorsIds']['includes'](_0x3dc95c['id'])||_0x2b7985['authorsIds']['push'](_0x3dc95c['id']);}return _0x2b7985;}['_bufferUpdate'](_0x9ee8dc,_0x2e3f9c,_0x5d4450){if(this['_bufferedUpdates']['has'](_0x9ee8dc)){const _0x389c8f=this['_bufferedUpdates']['get'](_0x9ee8dc);_0x2e3f9c=_0x5d4450?{..._0x389c8f,..._0x2e3f9c}:{..._0x2e3f9c,..._0x389c8f};}this['_bufferedUpdates']['set'](_0x9ee8dc,_0x2e3f9c);}['setRevisionData'](_0x37834d){const _0x4c1d77=this['repository']['getRevision'](_0x37834d['id']);if(_0x37834d['createdAt']&&(_0x37834d['createdAt']=new Date(_0x37834d['createdAt'])),_0x37834d['authorsIds']){const _0x3c5d81=this['editor']['plugins']['get']('Users');_0x37834d['authors']=_0x37834d['authorsIds']['map'](_0x56e914=>_0x3c5d81['getUser'](_0x56e914));}_0x4c1d77['_update'](_0x37834d,!0x0);}['_createInitialRevision'](_0x8329da){const _0x4acd53=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4acd53)this['_initialRevisionId']=_0x4acd53['id'];else{const _0xe755a8=!this['editor']['model']['document']['roots']['find'](_0x9881b6=>this['editor']['model']['hasContent'](_0x9881b6)),_0x187ba2=this['editor']['plugins']['get']('Users')['me']['id'],_0x19cda8=ft(this['editor']['locale'],_0xe755a8?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x8329da,'to':_0x8329da,'id':this['_initialRevisionId'],'name':_0x19cda8,'creatorId':_0x187ba2});}}['_createCurrentRevision'](_0x479bb4){const _0x2aa6b4=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2aa6b4),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x479bb4,'to':_0x479bb4,'id':_0x2aa6b4,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x26e19f,_0x5c4962,_0x3fb73d){const _0x5406fe={},_0x5621a1={},_0x577b5d={},_0x3878fa=this['editor']['config']['get']('roots')||{};for(const [_0x52446b,_0x237694]of Object['entries'](_0x3878fa))_0x237694['lazyLoad']||(_0x5406fe[_0x52446b]=_0x237694['initialData']??'',_0x5621a1[_0x52446b]=_0x237694['modelAttributes']||{},_0x237694['modelElement']&&(_0x577b5d[_0x52446b]=_0x237694['modelElement']));for(const _0x436113 of this['editor']['model']['document']['getRootNames']())_0x5406fe[_0x436113]??='',_0x5621a1[_0x436113]??={};let _0x4c513d=!0x1;const _0x5ec3a9=Object['keys'](_0x5406fe),_0x1cb258=Object['keys'](_0x26e19f);for(const _0xf9a7b4 of _0x5ec3a9){if(_0x5406fe[_0xf9a7b4]!==_0x26e19f[_0xf9a7b4]&&''!==_0x5406fe[_0xf9a7b4]['trim']()){_0x4c513d=!0x0;break;}if(!_0x51eea3(_0x5621a1[_0xf9a7b4],_0x5c4962[_0xf9a7b4])&&Object['keys'](_0x5621a1[_0xf9a7b4])['length']>0x0){_0x4c513d=!0x0;break;}const _0x4136a4=_0x577b5d[_0xf9a7b4],_0x1a6a50=_0x3fb73d[_0xf9a7b4];if(_0x4136a4&&_0x1a6a50&&_0x4136a4!==_0x1a6a50){_0x4c513d=!0x0;break;}}_0x4c513d||(_0x4c513d=_0x1cb258['some'](_0x1627cd=>!this['editor']['model']['document']['getRoot'](_0x1627cd))),_0x4c513d&&_0x58e586('editor-initial-data-replaced-with-revision-data',{'editorData':_0x5406fe,'editorRootsAttributes':_0x5621a1,'editorRootsModelElements':_0x577b5d,'revisionData':_0x26e19f,'revisionRootsAttributes':_0x5c4962,'revisionRootsModelElements':_0x3fb73d});for(const [_0x58d362,_0x153628]of Object['entries'](_0x26e19f))this['editor']['config']['set']('roots.'+_0x58d362+'.initialData',_0x153628);for(const [_0x563f0a,_0x3ed76e]of Object['entries'](_0x5c4962))this['editor']['config']['set']('roots.'+_0x563f0a+'.modelAttributes',_0x3ed76e);const _0x195f29=this['editor']['model']['document'];for(const [_0x55ef8,_0x52b69c]of Object['entries'](_0x3fb73d)){this['editor']['config']['set']('roots.'+_0x55ef8+'.modelElement',_0x52b69c);const _0x47b826=_0x195f29['getRoot'](_0x55ef8);_0x47b826&&_0x47b826['name']!==_0x52b69c&&(_0x195f29['roots']['remove'](_0x55ef8),_0x195f29['createRoot'](_0x52b69c,_0x55ef8));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2ea4ba=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2ea4ba['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x50f5fa){const _0x7484d3=this['repository']['getRevisions']();_0x7484d3['reverse']();let _0x1152b6=0x0;for(;_0x1152b6<_0x7484d3['length'];){const _0x3743f4=_0x7484d3[_0x1152b6];if(_0x3743f4===this['currentRevision']){_0x1152b6++;continue;}if(_0x3743f4['id']===this['_initialRevisionId'])break;const _0x358b68=_0x50f5fa['toVersion']-_0x3743f4['toVersion']||_0x50f5fa['fromVersion']-_0x3743f4['fromVersion'];if(_0x358b68>0x0)break;if(_0x358b68<0x0)_0x1152b6++;else{if(!_0x50f5fa['creator']&&_0x3743f4['creator'])break;if(_0x3743f4['creator']||!_0x50f5fa['creator']){if(_0x50f5fa['createdAt']>_0x3743f4['createdAt'])break;_0x1152b6++;}else _0x1152b6++;}}return _0x1152b6;}['_getFromVersion'](_0x4f4f96){const _0x54c175=this['repository']['getRevisions']();_0x54c175['reverse'](),_0x54c175['shift']();const _0x46cfb5=_0x54c175['find'](_0x94ccae=>_0x94ccae['toVersion']<=_0x4f4f96)['toVersion'];return _0x46cfb5<this['_startingVersion']?this['_startingVersion']:_0x46cfb5;}['_makeRevision']({name:_0x359d9e,from:_0x30a167,to:_0x1cd6b0,creatorId:_0x44944f,id:_0x7756c1}){const _0x2920c7=this['buildRevisionData']({'from':_0x30a167,'to':_0x1cd6b0});_0x2920c7['name']=_0x359d9e,_0x2920c7['creatorId']=_0x44944f,_0x2920c7['id']=_0x7756c1;const _0x25edc8=this['addRevisionData'](_0x2920c7);return this['adapter']&&this['_bufferUpdate'](_0x2920c7['id'],_0x2920c7,!0x0),_0x25edc8;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3ab851){this['editor']=_0x3ab851,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x14080e){this['source']=_0x14080e;const _0x435e7f=new Map(),_0x49fb1b=new Map(),_0x2f747b=this['editor']['model']['document']['roots']['map'](_0x5a0e1c=>_0x5a0e1c['rootName']);for(const _0x248557 of _0x2f747b){const _0x2cf8d4=this['editor']['model']['document']['getRoot'](_0x248557),_0x56f26a=gt(_0x2cf8d4);_0x435e7f['set'](_0x248557,_0x56f26a),_0x49fb1b['set'](_0x248557,Object['fromEntries'](_0x2cf8d4['getAttributes']()));}const _0x38a7b5=Array['from'](this['editor']['model']['markers'])['map'](_0x1f6fd9=>[_0x1f6fd9['name'],_0x1f6fd9['getRange']()]),_0x5e70fa=this['source']['version'];this['_saveMetaData'](_0x5e70fa,_0x435e7f,_0x38a7b5,_0x49fb1b),this['_startingRevisionId']=this['_revisionId'];const _0x3fbea1=new Map(),_0xfaf4dd=new Map();for(const _0x5b4920 of _0x2f747b){const _0xdccbec=wt(_0x5b4920,this['editor']['model']['document']['getRoot'](_0x5b4920)['name']);_0x3fbea1['set'](_0x5b4920,_0xdccbec),_0xfaf4dd['set'](_0x5b4920,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3fbea1,[],_0xfaf4dd);}['getData'](_0x11238e,_0x473c08){if(this['_lastFrom']===_0x11238e&&this['_lastTo']<=_0x473c08)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x473c08,!0x0);else{if(!this['_savedMetaData']['has'](_0x11238e)){const _0x5272e3=this['_getPreviousFrom'](_0x11238e);this['_calculateMetaData'](_0x5272e3,_0x11238e,!0x1);}this['_calculateMetaData'](_0x11238e,_0x473c08,!0x0);}return this['_lastFrom']=_0x11238e,this['_lastTo']=_0x473c08,this['_getState']();}['loadState'](_0xe11def){if(!this['_savedMetaData']['has'](_0xe11def['fromVersion'])){const _0x50abc7=this['_getPreviousFrom'](_0xe11def['fromVersion']);this['_calculateMetaData'](_0x50abc7,_0xe11def['fromVersion'],!0x1);}this['_calculateMetaData'](_0xe11def['fromVersion'],_0xe11def['toVersion'],!0x1);const _0x1545ec=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0xe11def['fromVersion'],this['_lastTo']=_0xe11def['toVersion'];for(const _0x49ab40 in _0xe11def['diffData']){const _0x3c9f58=_0xe11def['diffData'][_0x49ab40]['attachChange'],_0x513db6=_0x80fe75(_0xe11def['diffData'][_0x49ab40]['attributesBefore'])||{},_0x1c053f=_0xe11def['diffData'][_0x49ab40],_0x50e2e6=_0x1545ec['_makeModelFromViewString'](_0x1c053f['deletions'],_0x1c053f['rootElementName']||'$root');_0x50e2e6['rootName']=_0x49ab40,_0x50e2e6['_isAttached']=!_0x3c9f58||!_0x3c9f58['isAttached'],_0x50e2e6['isAttached']=()=>_0x50e2e6['_isAttached'],this['_baseRoots']['set'](_0x49ab40,_0x50e2e6),this['_baseRootsAttributes']['set'](_0x49ab40,_0x513db6),_0x3c9f58&&this['_touchedRoots']['set'](_0x49ab40,_0x3c9f58);const _0x7d4f11=this['_makeIdsRoot'](_0x50e2e6);this['_baseIdsRoots']['set'](_0x49ab40,_0x7d4f11);for(const [_0x1ac9ec,_0x4996cc]of _0x50e2e6['markers']){if(!_0x1ac9ec['startsWith']('revision:'))continue;const _0x9184c9=_0x1ac9ec['split'](':')[0x2];for(const _0x4d24e2 of _0x4996cc['getWalker']({'singleCharacters':!0x0})){const _0xfa04b7=this['_getVidAttributeName'](_0x4d24e2),_0x6526f0='elementEnd'==_0x4d24e2['type']?_0x4d24e2['previousPosition']['path']['slice'](0x0,-0x1):_0x4d24e2['previousPosition']['path'],_0x28c551=_0x7d4f11['getNodeByPath'](_0x6526f0)['getAttribute'](_0xfa04b7);this['_touched']['set'](_0x28c551,{'userId':_0x9184c9});}_0x50e2e6['markers']['delete'](_0x1ac9ec);}}this['_startingRevisionId']=this['_revisionId'];const _0x34196c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5f1c8c=>!this['_touched']['has'](_0x5f1c8c));let _0x458990=0x0;const _0x1851f8=new Map();for(const _0x50cd06 in _0xe11def['diffData']){const _0x39339d=_0xe11def['diffData'][_0x50cd06]['attachChange'],_0x24099d=_0x80fe75(_0xe11def['diffData'][_0x50cd06]['attributesAfter'])||{},_0x14e817=_0xe11def['diffData'][_0x50cd06],_0x180abd=_0x1545ec['_makeModelFromViewString'](_0x14e817['insertions'],_0x14e817['rootElementName']||'$root');_0x180abd['rootName']=_0x50cd06,_0x180abd['_isAttached']=!_0x39339d||_0x39339d['isAttached'],_0x180abd['isAttached']=()=>_0x180abd['_isAttached'],this['_diffRoots']['set'](_0x50cd06,_0x180abd),this['_diffRootsAttributes']['set'](_0x50cd06,_0x24099d);const _0x31c706=this['_makeIdsRoot'](_0x180abd,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x50cd06,_0x31c706),_0x1851f8['set'](_0x50cd06,_0x180abd['isAttached']()?_0x24099d:{});for(const [_0x21e0cd,_0x29c0ad]of _0x180abd['markers']){if(!_0x21e0cd['startsWith']('revision:'))continue;const _0x43f03b=_0x21e0cd['split'](':')[0x2];for(const _0x221ad4 of _0x29c0ad['getWalker']({'singleCharacters':!0x0})){const _0x3f2bba=this['_getVidAttributeName'](_0x221ad4),_0x417099=this['_revisionId']++,_0x59df53='elementEnd'==_0x221ad4['type']?_0x221ad4['previousPosition']['path']['slice'](0x0,-0x1):_0x221ad4['previousPosition']['path'];_0x31c706['getNodeByPath'](_0x59df53)['_setAttribute'](_0x3f2bba,_0x417099),this['_touched']['set'](_0x417099,{'userId':_0x43f03b});}_0x180abd['markers']['delete'](_0x21e0cd);}for(const _0x42c0ce of this['editor']['model']['createRangeIn'](_0x180abd)['getWalker']({'singleCharacters':!0x0})){const _0x1d20d3=this['_getVidAttributeName'](_0x42c0ce),_0x5086f0='elementEnd'==_0x42c0ce['type']?_0x42c0ce['previousPosition']['path']['slice'](0x0,-0x1):_0x42c0ce['previousPosition']['path'],_0x5033ab=_0x31c706['getNodeByPath'](_0x5086f0);_0x5033ab['getAttribute'](_0x1d20d3)>0x0||_0x5033ab['_setAttribute'](_0x1d20d3,_0x34196c[_0x458990++]);}for(const [_0x172139,_0x2da2ae]of _0x180abd['markers'])_0x172139['startsWith']('revision:')||this['_markers']['set'](_0x172139,_0x2da2ae);}const {roots:_0x1565bb}=this['_savedMetaData']['get'](_0xe11def['fromVersion']),{roots:_0x4037d9}=this['_savedMetaData']['get'](_0xe11def['toVersion']),_0xf743ee=gt(_0x1565bb['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xf743ee),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xf743ee,Number['NEGATIVE_INFINITY']));const _0x2927a6=gt(_0x4037d9['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2927a6),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2927a6));const _0x39b176=Array['from'](this['_diffRoots'])['map'](([_0x105c0e,_0x3e77c5])=>[_0x105c0e,gt(_0x3e77c5)]);this['_saveMetaData'](this['_lastTo'],_0x39b176,this['_markers'],_0x1851f8);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x30e7c8,_0xad9b11,_0x4f1277,_0x1ef7df){const _0x24ea74=new Map(_0xad9b11),_0x17363c=new Map(_0x80fe75(_0x1ef7df)),_0x4ef6af=new Map();for(const [_0xa80718,_0x4d0ff5]of _0x4f1277)_0x4ef6af['set'](_0xa80718,{'start':_0x4d0ff5['start']['clone'](),'end':_0x4d0ff5['end']['clone'](),'rootName':_0x4d0ff5['root']['rootName']});this['_savedMetaData']['set'](_0x30e7c8,{'roots':_0x24ea74,'markers':_0x4ef6af,'rootsAttributes':_0x17363c});}['_removeMetaData'](_0x38511b){this['_savedMetaData']['delete'](_0x38511b);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x1d7239,_0x2996bf=null){let _0x3b0415=null;_0x1d7239['is']('documentFragment')||(_0x3b0415=new _0x3afe29(_0x1d7239['name'],{'vid_start':null===_0x2996bf?this['_revisionId']++:_0x2996bf++}));const _0x275302=[];for(const _0x18eef9 of _0x1d7239['getChildren']())if(_0x18eef9['is']('element')){_0x275302['push'](this['_makeIdsRoot'](_0x18eef9,_0x2996bf));const _0x1b6cbc=_0x275302[_0x275302['length']-0x1];null!==_0x2996bf&&(_0x2996bf=_0x1b6cbc['is']('element','$text')?_0x1b6cbc['getAttribute']('vid')+0x1:_0x1b6cbc['getAttribute']('vid_end')+0x1);}else{for(let _0x9ff7c2=0x0;_0x9ff7c2<_0x18eef9['offsetSize'];_0x9ff7c2++)_0x275302['push'](new _0x3afe29('$text',{'vid':null===_0x2996bf?this['_revisionId']++:_0x2996bf++}));}if(_0x1d7239['is']('documentFragment')){const _0x142406=wt(_0x1d7239['rootName'],_0x1d7239['name']);return _0x142406['_insertChild'](0x0,_0x275302),_0x142406;}return _0x3b0415['_setAttribute']('vid_end',null===_0x2996bf?this['_revisionId']++:_0x2996bf++),_0x3b0415['_insertChild'](0x0,_0x275302),_0x3b0415;}['_calculateMetaData'](_0x2255e2,_0x1e3170,_0x5aea2e){this['_reset']();const {roots:_0x599605,markers:_0x11790f,rootsAttributes:_0x544ca4}=this['_savedMetaData']['get'](_0x2255e2);this['_baseRoots']=new Map(_0x599605),this['_baseRootsAttributes']=new Map(_0x80fe75(_0x544ca4));for(const [_0x3b7f66,_0x2da3c4]of this['_baseRoots'])if('$graveyard'!==_0x3b7f66&&(this['_diffRoots']['set'](_0x3b7f66,gt(_0x2da3c4)),this['_diffRootsAttributes']=new Map(_0x80fe75(_0x544ca4)),_0x5aea2e)){const _0x23f88a=this['_revisionId'];this['_idsRoots']['set'](_0x3b7f66,this['_makeIdsRoot'](_0x2da3c4)),this['_baseIdsRoots']['set'](_0x3b7f66,this['_makeIdsRoot'](_0x2da3c4,_0x23f88a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x5aea2e&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x340ea9,_0x37d0d8]of _0x11790f){const _0x225252=this['_baseRoots']['get'](_0x37d0d8['rootName']),_0x3723dc=this['_diffRoots']['get'](_0x37d0d8['rootName']),_0x22e5f1=new _0x303fe7(this['_fixPosition'](_0x37d0d8['start'],_0x225252),this['_fixPosition'](_0x37d0d8['end'],_0x225252)),_0x533c6a=this['_fixRange'](_0x22e5f1,_0x3723dc);_0x225252['markers']['set'](_0x340ea9,_0x22e5f1),this['_markers']['set'](_0x340ea9,_0x533c6a);}this['_applyOperations'](_0x2255e2,_0x1e3170,_0x5aea2e);}['_applyOperations'](_0x46eed8,_0x3392b4,_0x2da813){for(const _0x4f25d0 of this['source']['getOperations'](_0x46eed8,_0x3392b4))this['_handleOperation'](_0x4f25d0,_0x2da813);for(const _0x195c27 of this['_diffRoots']['values']())_0x195c27['markers']['clear']();for(const [_0x23496c,_0x52c438]of this['_markers']){this['_diffRoots']['get'](_0x52c438['root']['rootName'])['markers']['set'](_0x23496c,_0x52c438['clone']());}const _0x2a88a1=new Map(),_0x599530=new Map();for(const [_0x25036a,_0x2daf71]of this['_diffRoots'])_0x2a88a1['set'](_0x25036a,gt(_0x2daf71)),_0x599530['set'](_0x25036a,this['_diffRootsAttributes']['get'](_0x25036a));this['_saveMetaData'](_0x3392b4,_0x2a88a1,this['_markers'],_0x599530);}['_getPreviousFrom'](_0x2e72a0){const _0x411252=Array['from'](this['_savedMetaData']['keys']());_0x411252['sort']((_0xd2fc94,_0x1083f5)=>_0xd2fc94-_0x1083f5),_0x411252['reverse']();for(const _0xdc8c36 of _0x411252)if(_0xdc8c36<_0x2e72a0)return _0xdc8c36;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x32477e,_0xe1b814){const _0xd1a3a0=Array['from'](_0xe1b814['markers'])['map'](([_0x34e215,_0x861d07])=>[_0x34e215,this['_fixRange'](_0x861d07,_0x32477e)]);_0x32477e['markers']=new Map(_0xd1a3a0);}['_transformMarkers'](_0xd95faf){for(const _0x13d380 of this['_markers']['values']()){const _0x4e3e85=_0x13d380['getTransformedByOperation'](_0xd95faf),_0x222c4c=_0x303fe7['_createFromRanges'](_0x4e3e85);_0x13d380['start']=_0x222c4c['start'],_0x13d380['end']=_0x222c4c['end'];}}['_handleOperation'](_0x53cef8,_0x30e020){if('addRoot'!=_0x53cef8['type']&&'detachRoot'!=_0x53cef8['type']){if('insert'==_0x53cef8['type']){const _0x2cbaca=_0x53cef8['position']['root'],_0x256678=_0x2cbaca['rootName'],_0x33de09=_0x2cbaca['name'];this['_diffRoots']['has'](_0x256678)||(this['_diffRoots']['set'](_0x256678,wt(_0x256678,_0x33de09,!0x0)),this['_diffRootsAttributes']['set'](_0x256678,{}),_0x30e020&&this['_idsRoots']['set'](_0x256678,wt(_0x256678,_0x33de09,!0x0)));}else{if('addRootAttribute'==_0x53cef8['type']||'removeRootAttribute'==_0x53cef8['type']||'changeRootAttribute'==_0x53cef8['type'])return void this['_handleRootAttributeOperation'](_0x53cef8);'marker'==_0x53cef8['type']&&this['_handleMarkerOperation'](_0x53cef8);}if('marker'!==_0x53cef8['type']){const _0x2fedde=this['_cloneOperation'](_0x53cef8,this['_diffRoots']);_0x2fedde['_execute'](),this['_transformMarkers'](_0x2fedde);}if(_0x30e020)switch(_0x53cef8['type']){case'insert':this['_handleInsertOperation'](_0x53cef8);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x53cef8);break;case'merge':this['_handleMergeOperation'](_0x53cef8);break;case'split':this['_handleSplitOperation'](_0x53cef8);}}else this['_handleRootOperation'](_0x53cef8,_0x30e020);}['_cloneOperation'](_0x28d146,_0x2efa29){const _0x324a3b=_0x28d146['clone']();return _0x324a3b['_authorId']=_0x28d146['_authorId'],this['_fixOperation'](_0x324a3b,_0x2efa29),_0x324a3b;}['_getBaseVids'](_0x5b725a){return _0x5b725a['map'](_0xc639b6=>{const _0x490a18=this['_getVidAttributeName'](_0xc639b6);return Number(_0xc639b6['item']['getAttribute'](_0x490a18));});}['_generateTape'](_0x5313d9,_0x4e84d5){if(_0x5313d9['is']('element','$text'))_0x4e84d5['push']({'item':_0x5313d9,'type':'text'});else{_0x5313d9['is']('element')&&_0x4e84d5['push']({'item':_0x5313d9,'type':'elementStart'});for(const _0x4e8224 of _0x5313d9['getChildren']())this['_generateTape'](_0x4e8224,_0x4e84d5);_0x5313d9['is']('element')&&_0x4e84d5['push']({'item':_0x5313d9,'type':'elementEnd'});}return _0x4e84d5;}['_getState'](){const _0x579490=new Map(this['_touched']),_0x327991=new Map(_0x579490),_0x261489=new Map(),_0xfdf6e1={'insertions':{},'deletions':{}},_0x409949={'insertions':{},'deletions':{}},_0xbf2827=new Map(),_0x530223=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1f6fa8=new Map();_0x530223['delete']('$graveyard');for(const _0x4d9bf0 of _0x530223){const _0x17101f=(this['_diffRoots']['get'](_0x4d9bf0)??this['_baseRoots']['get'](_0x4d9bf0))['name'],_0x344064=this['_diffRoots']['get'](_0x4d9bf0)||wt(_0x4d9bf0,_0x17101f,!0x1),_0x369dbf=this['_baseRoots']['get'](_0x4d9bf0)||wt(_0x4d9bf0,_0x17101f,!0x1);_0x344064['isAttached']()||_0x369dbf['isAttached']()?(_0x1f6fa8['set'](_0x4d9bf0,_0x17101f),_0xfdf6e1['insertions'][_0x4d9bf0]=gt(_0x344064),_0xfdf6e1['deletions'][_0x4d9bf0]=gt(_0x369dbf),this['_copyMarkers'](_0xfdf6e1['deletions'][_0x4d9bf0],_0x369dbf),this['_copyMarkers'](_0xfdf6e1['insertions'][_0x4d9bf0],_0x344064),_0x409949['insertions'][_0x4d9bf0]=this['_generateTape'](this['_idsRoots']['get'](_0x4d9bf0),[]),_0x409949['deletions'][_0x4d9bf0]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4d9bf0)||wt(_0x4d9bf0,_0x17101f,!0x1),[])):_0x530223['delete'](_0x4d9bf0);}for(const _0x3bbbf0 of _0x530223){const _0x27b79f=_0x409949['insertions'][_0x3bbbf0];for(const _0x51c5ad of _0x27b79f){const _0x3ac59f=this['_getVidAttributeName'](_0x51c5ad),_0x1f97fc=_0x51c5ad['item']['getAttribute'](_0x3ac59f);_0x327991['delete'](_0x1f97fc),_0x1f97fc>=this['_startingRevisionId']&&_0x261489['set'](_0x1f97fc,_0x579490['get'](_0x1f97fc));}}for(const _0x452db9 of _0x530223){const _0x2b933c=_0x409949['insertions'][_0x452db9],_0x56858d=this['_getBaseVids'](_0x409949['deletions'][_0x452db9]);let _0x5269ef=0x0;for(const _0x144968 of _0x2b933c){const _0x2571e7=this['_getVidAttributeName'](_0x144968),_0x1b1f8a=_0x144968['item']['getAttribute'](_0x2571e7);if(!_0x261489['has'](_0x1b1f8a)&&!_0xbf2827['has'](_0x1b1f8a)){if(_0x327991['has'](_0x1b1f8a))_0x5269ef++;else{if(_0x1b1f8a!=_0x56858d[_0x5269ef]){const _0x31c48e=_0x579490['get'](_0x1b1f8a)||_0x579490['get'](_0x56858d[_0x5269ef]);for(;_0x1b1f8a!=_0x56858d[_0x5269ef];)_0x327991['has'](_0x56858d[_0x5269ef])||(_0xbf2827['set'](_0x56858d[_0x5269ef],_0x31c48e),_0x579490['set'](_0x56858d[_0x5269ef],_0x31c48e)),_0x5269ef++;}_0x5269ef++;}}}}for(const _0x5a2787 of _0x530223){const _0x232cba=_0x409949['insertions'][_0x5a2787];for(const _0x5693f0 of _0x232cba){const _0x29c42d=this['_getVidAttributeName'](_0x5693f0),_0x35f0fe=_0x5693f0['item']['getAttribute'](_0x29c42d);if(_0xbf2827['has'](_0x35f0fe)){const _0x5c48b0=_0xbf2827['get'](_0x35f0fe);_0x327991['has'](_0x35f0fe)||_0x327991['set'](_0x35f0fe,{..._0x5c48b0}),_0x261489['set'](_0x35f0fe,{..._0x5c48b0});}}}for(const _0x231a05 of _0x327991['keys']())_0x231a05>=this['_startingRevisionId']&&_0x327991['delete'](_0x231a05);const _0x2f602a=new Map();for(const _0x1b4647 of _0x530223){let _0x5833f1=_0x409949['insertions'][_0x1b4647];for(const _0x3ab83c of _0x5833f1)if(_0x3ab83c['item']['is']('element','tableCell')){const _0x2e871e=this['_getVidAttributeName'](_0x3ab83c),_0x3585a5=_0x3ab83c['item']['getAttribute'](_0x2e871e);if(_0x261489['has'](_0x3585a5)){const _0x445914=_0x3ab83c['item']['parent']['parent']['getAttribute']('vid_start'),_0x487a28=_0x2f602a['get'](_0x445914)||new Set();_0x487a28['add'](_0x261489['get'](_0x3585a5)['userId']),_0x2f602a['set'](_0x445914,_0x487a28);}}_0x5833f1=_0x409949['deletions'][_0x1b4647];for(const _0x2a0b3d of _0x5833f1)if(_0x2a0b3d['item']['is']('element','tableCell')){const _0x4bbcd0=this['_getVidAttributeName'](_0x2a0b3d),_0x52cf53=_0x2a0b3d['item']['getAttribute'](_0x4bbcd0);if(_0x327991['has'](_0x52cf53)){const _0x1cd093=_0x2a0b3d['item']['parent']['parent']['getAttribute']('vid_start'),_0x4184d1=_0x2f602a['get'](_0x1cd093)||new Set();_0x4184d1['add'](_0x327991['get'](_0x52cf53)['userId']),_0x2f602a['set'](_0x1cd093,_0x4184d1);}}for(const _0x3426cb of _0x2f602a['keys']())(_0x261489['has'](_0x3426cb)||_0x327991['has'](_0x3426cb))&&_0x2f602a['delete'](_0x3426cb);}for(const _0x4d73c4 of _0x530223){const _0x1e95b3=_0x409949['insertions'][_0x4d73c4];let _0x8da23c=null,_0x3a14d8=null;for(const _0x53fcee of _0x1e95b3){const _0x5aa40e=this['_getVidAttributeName'](_0x53fcee),_0x105c97=_0x53fcee['item']['getAttribute'](_0x5aa40e),_0x77d0d2=_0x2f602a['get'](_0x105c97);_0x77d0d2&&'elementStart'==_0x53fcee['type']&&(_0x8da23c=Array['from'](_0x77d0d2)[0x0],_0x3a14d8=_0x53fcee['item']['getAttribute']('vid_end')),_0x8da23c&&(_0x327991['set'](_0x105c97,{'userId':_0x8da23c}),_0x261489['set'](_0x105c97,{'userId':_0x8da23c})),_0x105c97==_0x3a14d8&&(_0x8da23c=null,_0x3a14d8=null);}}const _0x309b72={},_0x5fb9f8=new Set();for(const _0x1d9353 of _0x530223){const _0x3b14da=_0xfdf6e1['deletions'][_0x1d9353],_0x4a6872=_0xfdf6e1['insertions'][_0x1d9353];for(const {userId:_0x35b520}of this['_touchedMarkers']['values']())null!==_0x35b520&&_0x5fb9f8['add'](_0x35b520);for(const {userId:_0x461049}of this['_touchedRoots']['values']())null!==_0x461049&&_0x5fb9f8['add'](_0x461049);this['_markChanges'](_0x4a6872,_0x409949['insertions'][_0x1d9353],_0x261489,'insertion',_0x5fb9f8),this['_markChanges'](_0x3b14da,_0x409949['deletions'][_0x1d9353],_0x327991,'deletion',_0x5fb9f8),_0x309b72[_0x1d9353]={'insertions':this['_prepareViewToSave'](_0x4a6872),'deletions':this['_prepareViewToSave'](_0x3b14da),'attachChange':this['_touchedRoots']['get'](_0x1d9353)||null,'attributesBefore':_0x80fe75(this['_baseRootsAttributes']['get'](_0x1d9353))||{},'attributesAfter':_0x80fe75(this['_diffRootsAttributes']['get'](_0x1d9353)),'rootElementName':_0x1f6fa8['get'](_0x1d9353)};}return{'diffData':_0x309b72,'authorsIds':Array['from'](_0x5fb9f8)};}['_processRootBeforeSave'](_0x235a42){for(const [,_0x16dd4d]of _0x235a42['markers']){const _0x366c21=_0x16dd4d['start']['getAncestors']()['filter'](_0x1f5c8a=>'tableCell'==_0x1f5c8a['name']);for(const _0x16217c of _0x366c21)0x1==_0x16217c['childCount']&&_0x16217c['getChild'](0x0)['is']('element','paragraph')&&_0x16217c['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1da7fa){this['_processRootBeforeSave'](_0x1da7fa);const _0x258fbf=this['editor']['data']['toView'](_0x1da7fa,{}),_0x3c63f8=Array['from'](_0x258fbf['getChildren']())['map'](_0x386147=>this['_getViewJson'](_0x386147));return JSON['stringify'](_0x3c63f8);}['_getViewJson'](_0x2cc8eb){if(_0x2cc8eb['is']('$text'))return _0x2cc8eb['data'];{const _0x4ee344=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x48e813=_0x2cc8eb,_0x4bd42c=this['editor']['data']['htmlProcessor']['domConverter'],_0xc71773={'type':_0x4ee344['_getTypeCharForViewElement'](_0x48e813),'name':_0x48e813['name'],'attributes':Array['from'](_0x48e813['getAttributes']()),'children':Array['from'](_0x48e813['getChildren']())['map'](_0x21540b=>this['_getViewJson'](_0x21540b))};if(_0x2cc8eb['is']('uiElement')&&'$comment'!=_0x2cc8eb['name']){const _0x4efc36=_0x2cc8eb['render'](_0x4bd42c['domDocument'],_0x4bd42c);_0xc71773['children']['push'](_0x4efc36['outerHTML']);}else{if(_0x2cc8eb['is']('rawElement')){const _0x238e50=_0x4bd42c['domDocument']['createElement'](_0x48e813['name']);_0x2cc8eb['render'](_0x238e50,_0x4bd42c),_0xc71773['children']['push'](_0x238e50['innerHTML']);}}const _0x14cad5=Array['from'](_0x48e813['getCustomProperties']());_0x14cad5['length']>0x0&&(_0xc71773['customProperties']=_0x14cad5);const _0x24559a=_0x48e813['getFillerOffset']();return null!==_0x24559a&&(_0xc71773['fillerOffset']=_0x24559a),_0xc71773;}}['_markChanges'](_0x2c254d,_0x3abb0d,_0x53037d,_0x24de3e,_0x2f9f59){let _0x5d6bee=null,_0x191ab8=null,_0x3d487f=0x0;const _0x353f13=this['editor']['model'];for(let _0xb5867b=0x0;_0xb5867b<_0x3abb0d['length'];_0xb5867b++){const _0x235fd1=this['_getVidAttributeName'](_0x3abb0d[_0xb5867b]),_0x5b8ecd=_0x3abb0d[_0xb5867b]['item']['getAttribute'](_0x235fd1),_0x34cc09=_0x53037d['get'](_0x5b8ecd),_0x295d06=_0xb5867b==_0x3abb0d['length']-0x1;(!_0x5d6bee&&_0x34cc09&&(_0x5d6bee=_0x34cc09,_0x191ab8=_0x3abb0d[_0xb5867b]),_0x5d6bee&&(!_0x34cc09||_0x34cc09['userId']!=_0x5d6bee['userId']))&&(_0x50a819(_0x34cc09,mt(_0x191ab8,_0x2c254d,_0x353f13),mt(_0x3abb0d[_0xb5867b],_0x2c254d,_0x353f13)),_0x5d6bee=_0x34cc09||null,_0x191ab8=_0x34cc09?_0x3abb0d[_0xb5867b]:null),_0x5d6bee&&_0x295d06&&_0x50a819(_0x34cc09,mt(_0x191ab8,_0x2c254d,_0x353f13),pt(_0x3abb0d[_0xb5867b],_0x2c254d,_0x353f13));}function _0x50a819(_0x2835ae,_0x355abb,_0x40f18b){const _0x3b773c=_0x5d6bee['userId'],_0x5ee31b='revision:'+_0x24de3e+':'+_0x3b773c+':'+_0x3d487f++,_0x117bc4=_0x353f13['createRange'](_0x355abb,_0x40f18b);_0x2c254d['markers']['set'](_0x5ee31b,_0x117bc4),null!==_0x3b773c&&_0x2f9f59['add'](_0x3b773c);}}['_getVidAttributeName'](_0x587c1e){switch(_0x587c1e['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0xcb3ce8,_0x2acb0){_0xcb3ce8['baseVersion']=null;for(const _0x4d8f2d in _0xcb3ce8){const _0x29f54b=_0xcb3ce8[_0x4d8f2d];if(_0x29f54b instanceof _0x33bdb0){const _0x340133=_0x2acb0['get'](_0x29f54b['root']['rootName']);_0xcb3ce8[_0x4d8f2d]=this['_fixPosition'](_0x29f54b,_0x340133);}if(_0x29f54b instanceof _0x303fe7){const _0x1d8ff1=_0x2acb0['get'](_0x29f54b['root']['rootName']);_0xcb3ce8[_0x4d8f2d]=this['_fixRange'](_0x29f54b,_0x1d8ff1);}'root'===_0x4d8f2d&&(_0xcb3ce8['root']=_0x2acb0['get'](_0xcb3ce8['root']['rootName']));}}['_fixRange'](_0x34bbc1,_0x20ceec){return this['editor']['model']['createRange'](this['_fixPosition'](_0x34bbc1['start'],_0x20ceec),this['_fixPosition'](_0x34bbc1['end'],_0x20ceec));}['_fixPosition'](_0x480d0e,_0x27e9e0){return this['editor']['model']['createPositionFromPath'](_0x27e9e0,_0x480d0e['path'],_0x480d0e['stickiness']);}['_handleInsertOperation'](_0x176cbf){const _0x124d01=this['_idsRoots']['get'](_0x176cbf['position']['root']['rootName']),_0x2644b1=this['_fixPosition'](_0x176cbf['position'],_0x124d01),_0x20ba23=null===_0x176cbf['_authorId']?null:_0x176cbf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1338a9=_0x2644b1['parent'],_0x10dd92=this['_revisionId'],_0x28343f=[];for(const _0x2ce820 of _0x176cbf['nodes'])if(_0x2ce820['is']('element'))_0x28343f['push'](this['_makeIdsRoot'](_0x2ce820));else{for(let _0x17a263=0x0;_0x17a263<_0x2ce820['offsetSize'];_0x17a263++)_0x28343f['push'](new _0x3afe29('$text',{'vid':this['_revisionId']++}));}const _0xb5031b=this['_revisionId'];for(let _0x5115cc=_0x10dd92;_0x5115cc<_0xb5031b;_0x5115cc++)this['_touched']['set'](_0x5115cc,{'userId':_0x20ba23});_0x1338a9['_insertChild'](_0x2644b1['offset'],_0x28343f);}['_handleMoveOperation'](_0x29a52a){(_0x29a52a=this['_cloneOperation'](_0x29a52a,this['_idsRoots']))['_execute']();const _0x3dfa64=null===_0x29a52a['_authorId']?null:_0x29a52a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40190f=_0x29a52a['getMovedRangeStart'](),_0x32d288=_0x40190f['parent'],_0x99d994=_0x40190f['offset'];!function _0x104f1f(_0x1acf32,_0x341e5c,_0x5553cb,_0x2d84f7){for(let _0x2c5fa1=_0x5553cb;_0x2c5fa1<_0x2d84f7;_0x2c5fa1++){const _0x5b538e=_0x341e5c['getChild'](_0x2c5fa1);_0x5b538e['is']('element','$text')?_0x1acf32['set'](_0x5b538e['getAttribute']('vid'),{'userId':_0x3dfa64}):(_0x1acf32['set'](_0x5b538e['getAttribute']('vid_start'),{'userId':_0x3dfa64}),_0x104f1f(_0x1acf32,_0x5b538e,0x0,_0x5b538e['childCount']),_0x1acf32['set'](_0x5b538e['getAttribute']('vid_end'),{'userId':_0x3dfa64}));}}(this['_touched'],_0x32d288,_0x99d994,_0x99d994+_0x29a52a['howMany']);}['_handleMergeOperation'](_0x355d00){const _0x19e5a0=null===(_0x355d00=this['_cloneOperation'](_0x355d00,this['_idsRoots']))['_authorId']?null:_0x355d00['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3bf1a7=_0x355d00['targetPosition']['parent'],_0x44d403=_0x355d00['sourcePosition']['parent'],_0x41b296=_0x3bf1a7['getAttribute']('vid_end'),_0x5648c5=_0x44d403['getAttribute']('vid_start');_0x3bf1a7['_setAttribute']('vid_end',_0x44d403['getAttribute']('vid_end')),_0x44d403['_setAttribute']('vid_end',_0x41b296),this['_touched']['set'](_0x5648c5,{'userId':_0x19e5a0}),this['_touched']['set'](_0x41b296,{'userId':_0x19e5a0}),_0x355d00['_execute']();}['_handleSplitOperation'](_0x4fd9bf){const _0x2144e5=null===(_0x4fd9bf=this['_cloneOperation'](_0x4fd9bf,this['_idsRoots']))['_authorId']?null:_0x4fd9bf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cb7f3=_0x4fd9bf['graveyardPosition'],_0x45b993=_0x4fd9bf['splitPosition']['parent'];_0x4fd9bf['_execute']();const _0x29b850=_0x45b993['getAttribute']('vid_end'),_0x1c109f=_0x4fd9bf['insertionPosition']['nodeAfter'];if(_0x1cb7f3){const _0x46f5fb=_0x1c109f['getAttribute']('vid_end'),_0x4de35c=_0x45b993['getAttribute']('vid_end');_0x45b993['_setAttribute']('vid_end',_0x46f5fb),_0x1c109f['_setAttribute']('vid_end',_0x4de35c),this['_touched']['set'](_0x45b993['getAttribute']('vid_end'),{'userId':_0x2144e5}),this['_touched']['set'](_0x1c109f['getAttribute']('vid_start'),{'userId':_0x2144e5});}else{const _0x18db28=this['_revisionId']++,_0x2f6d72=this['_revisionId']++;_0x45b993['_setAttribute']('vid_end',_0x18db28),_0x1c109f['_setAttribute']('vid_start',_0x2f6d72),_0x1c109f['_setAttribute']('vid_end',_0x29b850),this['_touched']['set'](_0x18db28,{'userId':_0x2144e5}),this['_touched']['set'](_0x2f6d72,{'userId':_0x2144e5});}}['_handleMarkerOperation'](_0x52e4c5){if(!_0x52e4c5['affectsData'])return;const _0x44e1cf=(_0x52e4c5=this['_cloneOperation'](_0x52e4c5,this['_diffRoots']))['oldRange']?_0x52e4c5['oldRange']['root']:null,_0xaf2ca2=_0x52e4c5['newRange']?_0x52e4c5['newRange']['root']:null;_0x44e1cf&&this['_markers']['delete'](_0x52e4c5['name']),_0xaf2ca2&&this['_markers']['set'](_0x52e4c5['name'],_0x52e4c5['newRange']['clone']());const _0x5bdfbf=null===_0x52e4c5['_authorId']?null:_0x52e4c5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x343089=_0x52e4c5['name'];if(!this['_touchedMarkers']['has'](_0x343089))return void this['_touchedMarkers']['set'](_0x343089,{'range':_0x52e4c5['oldRange'],'userId':_0x5bdfbf});const _0x48ebfe=this['_touchedMarkers']['get'](_0x343089),_0xc06f58=_0x48ebfe['range'],_0x32f8a0=_0x52e4c5['newRange'];null==_0xc06f58&&null==_0x32f8a0||_0xc06f58&&_0x32f8a0&&_0xc06f58['isEqual'](_0x32f8a0)?this['_touchedMarkers']['delete'](_0x52e4c5['name']):_0x48ebfe['userId']=_0x5bdfbf;}['_handleRootOperation'](_0x464aa,_0x3f9a7d){this['_diffRoots']['has'](_0x464aa['rootName'])?this['_diffRoots']['get'](_0x464aa['rootName'])['_isAttached']=_0x464aa['isAdd']:(this['_diffRoots']['set'](_0x464aa['rootName'],wt(_0x464aa['rootName'],_0x464aa['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x464aa['rootName'],{}),_0x3f9a7d&&this['_idsRoots']['set'](_0x464aa['rootName'],wt(_0x464aa['rootName'],_0x464aa['elementName'],!0x0)));const _0x407931=null===_0x464aa['_authorId']?null:_0x464aa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d0f19=this['_touchedRoots']['get'](_0x464aa['rootName']);_0x5d0f19&&_0x5d0f19['userId']===_0x407931?this['_touchedRoots']['delete'](_0x464aa['rootName']):this['_touchedRoots']['set'](_0x464aa['rootName'],{'userId':_0x407931,'isAttached':_0x464aa['isAdd']});}['_handleRootAttributeOperation'](_0x547fd3){const _0x10e947=this['_diffRootsAttributes']['get'](_0x547fd3['root']['rootName']);null===_0x547fd3['newValue']?delete _0x10e947[_0x547fd3['key']]:_0x10e947[_0x547fd3['key']]=_0x547fd3['newValue'];}}function gt(_0x28df75){const _0x46007b=wt(_0x28df75['rootName'],_0x28df75['name'],_0x28df75['isAttached']());for(const _0x230e32 of _0x28df75['getChildren']()){const _0xd92853=_0x230e32['_clone'](!0x0);_0x46007b['_appendChild'](_0xd92853);}return _0x46007b;}function wt(_0xfa3ff0,_0x116ffe,_0x3be68d=!0x0){const _0x493bd5=new _0x479b0a();return _0x493bd5['rootName']=_0xfa3ff0,_0x493bd5['name']=_0x116ffe,_0x493bd5['_isAttached']=_0x3be68d,_0x493bd5['isAttached']=()=>_0x493bd5['_isAttached'],_0x493bd5;}function mt(_0xec1e97,_0x154404,_0x22bb0c){const _0x2fac91='elementEnd'==_0xec1e97['type']?_0x22bb0c['createPositionAt'](_0xec1e97['item'],'end'):_0x22bb0c['createPositionBefore'](_0xec1e97['item']);return _0x22bb0c['createPositionFromPath'](_0x154404,_0x2fac91['path'],_0x2fac91['stickiness']);}function pt(_0x3cd21f,_0x125449,_0x5c17ba){const _0x3613b1='elementStart'==_0x3cd21f['type']?_0x5c17ba['createPositionAt'](_0x3cd21f['item'],0x0):_0x5c17ba['createPositionAfter'](_0x3cd21f['item']);return _0x5c17ba['createPositionFromPath'](_0x125449,_0x3613b1['path'],_0x3613b1['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
25
- _0x3babf8(_0x1d5c9d){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x486430,_0x2339cc){super(_0x486430),this['focusTracker']=new _0x3faa7f(),this['keystrokes']=new _0x4dc357(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2339cc),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x4990f0({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x28f19f=_0x4ca96a=>_0x4ca96a['stopPropagation']();this['keystrokes']['set']('arrowright',_0x28f19f),this['keystrokes']['set']('arrowleft',_0x28f19f),this['keystrokes']['set']('arrowup',_0x28f19f),this['keystrokes']['set']('arrowdown',_0x28f19f);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xbfc2ad){this['revisionNameInputView']['fieldView']['element']['value']=_0xbfc2ad['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x1784e3){const _0x3f1d72=new _0x5b487d(this['locale'],_0x58f4b5),_0x2f1c09=_0x3f1d72['fieldView'];_0x2f1c09['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x403bd0=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1784e3&&(_0x403bd0+='\x20('+ft(this['locale'],'optional')+')'),(_0x3f1d72['label']=_0x403bd0,_0x2f1c09['on']('input',()=>{this['revisionNameInputValue']=_0x2f1c09['element']['value']['trim']();}),_0x3f1d72);}}class RevisionHistoryUI extends _0x41f403{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x59e6dd=this['editor'],_0x28aa0b=_0x59e6dd['plugins']['get']('RevisionTracker');_0x59e6dd['ui']['componentFactory']['add']('revisionHistory',_0x289273=>{const _0x3a083a=_0x47df31(_0x289273),_0x4c5544=_0x3a083a['panelView']['children'],_0x37de29=new _0x44e5cd(_0x289273),_0x3f0fd4=new _0x504708(_0x289273),_0x94151d=this['_createSaveRevisionButton'](_0x4e9658),_0x433464=new _0x504708(_0x289273),_0x5928bc=this['_createOpenRevisionButton'](_0x4e9658);return _0x3a083a['bind']('isEnabled')['to'](_0x28aa0b,'isReady',_0x28aa0b,'isEnabled',_0x59e6dd,'isReadOnly',(_0x4239a3,_0x222368,_0x57a6c6)=>_0x4239a3&&_0x222368&&!_0x57a6c6),_0x3a083a['buttonView']['set']({'icon':_0x4718bb,'label':ft(_0x289273,'Revision\x20history'),'tooltip':!0x0}),_0x94151d['set']({'withText':!0x0,'role':'menuitem'}),_0x5928bc['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x5928bc,'execute',()=>{_0x3a083a['isOpen']=!0x1,_0x59e6dd['editing']['view']['focus']();},{'priority':'low'}),_0x3f0fd4['children']['add'](_0x94151d),_0x433464['children']['add'](_0x5928bc),_0x37de29['role']='menu',_0x37de29['items']['addMany']([_0x3f0fd4,_0x433464]),_0x4c5544['add'](_0x37de29),_0x3a083a;}),_0x59e6dd['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x81ece1=this['editor'],_0x529d3f=_0x81ece1['locale'],_0x1d6323=_0x81ece1['plugins']['get']('RevisionTracker'),_0x1f88d8=new _0x30a116(_0x529d3f),_0x3e7860=new _0x559a0c(_0x529d3f);_0x1f88d8['bind']('isEnabled')['to'](_0x1d6323,'isReady',_0x1d6323,'isEnabled',_0x81ece1,'isReadOnly',(_0xfa2517,_0x2d5501,_0x351ae2)=>_0xfa2517&&_0x2d5501&&!_0x351ae2),_0x1f88d8['buttonView']['set']({'icon':_0x4718bb,'label':ft(_0x529d3f,'Revision\x20history')});const _0x37c9b5=new tt(_0x529d3f,_0x1f88d8),_0x9a24e9=this['_createSaveRevisionButton'](it);_0x9a24e9['delegate']('execute')['to'](_0x1f88d8),_0x37c9b5['children']['add'](_0x9a24e9),_0x3e7860['items']['add'](_0x37c9b5);const _0x5bc49c=new tt(_0x529d3f,_0x1f88d8),_0x378285=this['_createOpenRevisionButton'](it);return _0x378285['delegate']('execute')['to'](_0x1f88d8),_0x5bc49c['children']['add'](_0x378285),_0x3e7860['items']['add'](_0x5bc49c),_0x1f88d8['panelView']['children']['add'](_0x3e7860),_0x1f88d8;}['_createSaveRevisionButton'](_0x7e07a){const _0x302627=this['editor'],_0x395a6e=_0x302627['plugins']['get']('RevisionTracker'),_0x278760=new _0x7e07a(_0x302627['locale']);return _0x278760['set']({'label':ft(_0x302627['locale'],'Save\x20current\x20revision')}),_0x278760['bind']('isEnabled')['to'](_0x395a6e,'isReady',_0x395a6e,'isEnabled',_0x302627,'isReadOnly',(_0x410378,_0xade205,_0x4e3b7d)=>_0x410378&&_0xade205&&!_0x4e3b7d),this['listenTo'](_0x278760,'execute',()=>{this['_showDialog']();}),_0x278760;}['_createOpenRevisionButton'](_0x43bb9b){const _0x208b76=this['editor'],_0x2eb974=_0x208b76['plugins']['get']('RevisionTracker'),_0xff08f0=new _0x43bb9b(_0x208b76['locale']);return _0xff08f0['set']({'label':ft(_0x208b76['locale'],'Open\x20revision\x20history')}),_0xff08f0['bind']('isEnabled')['to'](_0x2eb974,'isReady',_0x208b76,'isReadOnly',(_0xfa7c8c,_0x4a225a)=>_0xfa7c8c&&!_0x4a225a),this['listenTo'](_0xff08f0,'execute',()=>{_0x208b76['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0xff08f0;}['_showDialog'](){const _0x2d7cb6=this['editor'],_0xd23138=_0x2d7cb6['locale'],_0x3518fc=_0x2d7cb6['plugins']['get']('Dialog'),_0x5a7ad7=_0x2d7cb6['plugins']['get']('RevisionTracker');function _0x262ec3(_0x4fdc3b){_0x2d7cb6['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4fdc3b['revisionName']?_0x4fdc3b['revisionNameInputView']['errorText']=ft(_0xd23138,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2d7cb6['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x4fdc3b['revisionName']}),_0x3518fc['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x262ec3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3518fc['show']({'id':'revisionSave','title':ft(_0xd23138,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x2d7cb6['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3518fc['hide']()},{'label':ft(_0x2d7cb6['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x142ea6){_0x142ea6['bind']('isEnabled')['to'](_0x5a7ad7,'isReady',_0x5a7ad7,'isEnabled',_0x2d7cb6,'isReadOnly',(_0x2b0747,_0x4fd49e,_0x1f225b)=>_0x2b0747&&_0x4fd49e&&!_0x1f225b);},'onExecute':()=>_0x262ec3(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2aa3d0=this['editor'],_0x19144a=_0x2aa3d0['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x19144a,_0x2aa3d0['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x1d5c9d{['changeId'];['_model'];constructor(_0x5c866c,_0x51e7fc){super(_0x5c866c),this['_model']=_0x51e7fc,this['changeId']=_0x51e7fc['id'];const _0x35a466=this['bindTemplate'],_0x401161=ft(_0x5c866c,_0x51e7fc['data']['isSuggestion']?'Suggested\x20by':'add'==_0x51e7fc['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x51e7fc['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x35a466['to']('type',_0x51540f=>'ck-revision-change__'+_0x51540f)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x401161}]},{'text':'\x20'+_0x51e7fc['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
26
- _0x4cc566(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x255694){super(),this['id']=_0x255694['id']||_0x39af30(),this['author']=_0x255694['author'],this['type']=_0x255694['type'],this['data']=_0x255694['data']||{},this['rootName']=_0x255694['rootName'],this['set']('createdAt',_0x255694['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x55e5d7,_0x33ee6e){this['newRevisionId']=_0x55e5d7,this['oldRevisionId']=_0x33ee6e,this['changes']=new _0x4ec909();}['_setChanges'](_0x1c13bf){for(const _0x15f127 of _0x1c13bf)this['changes']['add'](_0x15f127);}}class RevisionViewer extends _0x41f403{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5445fe,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x3880a7){super(_0x3880a7),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x4fe094,_0x2fa85f,_0x18038b)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0xf7805f=>{for(const _0xdb636e of this['editor']['editing']['view']['document']['roots'])_0x18038b?_0xf7805f['removeClass']('ck-editor__editable__overlay',_0xdb636e):_0xf7805f['addClass']('ck-editor__editable__overlay',_0xdb636e);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2582ba=>null!==_0x2582ba),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x137033,_0x1e3c38,_0x20dc1f)=>_0x137033&&_0x20dc1f?_0x1e3c38['changes']['getIndex'](_0x20dc1f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3843c4,_0x3b2bac)=>_0x3843c4?_0x3b2bac['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x47fe8a=this['editor'],_0x3d067f=new ShowChangeCommand(_0x47fe8a,{'direction':'backward'}),_0x1a22f4=new ShowChangeCommand(_0x47fe8a,{'direction':'forward'});(_0x47fe8a['commands']['add']('showPreviousChange',_0x3d067f),_0x47fe8a['commands']['add']('showNextChange',_0x1a22f4),_0x47fe8a['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x47fe8a)),this['on']('change:numberOfChanges',()=>{_0x3d067f['refresh'](),_0x1a22f4['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x47fe8a['enableReadOnlyMode']('revision-viewer'),_0x47fe8a['plugins']['has']('WidgetToolbarRepository'))&&_0x47fe8a['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x36d758){return await this['_utils']['loadRevisionData'](_0x36d758,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x36d758);}async['getRevisionRootsAttributes'](_0x1e1030){return await this['_utils']['loadRevisionData'](_0x1e1030,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1e1030);}async['compare'](_0x325a7c,_0x1389fd,_0x240774=!0x1){if(!this['isEnabled'])return;const _0x53244d=this['diff'],_0x4fe332=this['repository'],_0x3623ac='string'==typeof _0x325a7c?_0x4fe332['getRevision'](_0x325a7c):_0x325a7c,_0xa2b3f='string'==typeof _0x1389fd?_0x4fe332['getRevision'](_0x1389fd):_0x1389fd,_0x5b6336=_0x3623ac['id'],_0x57679d=_0xa2b3f?_0xa2b3f['id']:null;if(!_0x240774&&this['diff']&&this['diff']['newRevisionId']===_0x5b6336&&this['diff']['oldRevisionId']===_0x57679d)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x5b6336,_0x57679d);const _0x20463b=this['_getRevisionsRange'](_0x3623ac,_0xa2b3f,!0x0)['map'](_0x9d8059=>this['_utils']['loadRevisionData'](_0x9d8059,this['adapter']));return _0x20463b['push'](new Promise(_0x5dd02b=>{setTimeout(_0x5dd02b,0x14);})),Promise['all'](_0x20463b)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x252f25=this['_getDiff'](_0x5b6336,_0x57679d);for(const _0x53edfd of _0x252f25['changes'])this['_changeIdToChange']['set'](_0x53edfd['id'],_0x53edfd);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x33b750=>{for(const _0x457e8b of this['editor']['model']['document']['getRootNames']())_0x33b750['detachRoot'](_0x457e8b);for(const _0xd4814a of Object['keys'](_0x252f25['model'])){const _0x59964f=_0x252f25['model'][_0xd4814a]['name'],_0x23b942=_0x33b750['addRoot'](_0xd4814a,_0x59964f);for(const _0x3c430f of Object['keys'](_0x252f25['attributes'][_0xd4814a]))_0x33b750['setAttribute'](_0x3c430f,_0x252f25['attributes'][_0xd4814a][_0x3c430f],_0x23b942);_0x33b750['insert'](_0x252f25['model'][_0xd4814a],_0x23b942,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x252f25['changes'])),this['isReady']=!0x0;})['catch'](_0x7c2596=>{console['error'](_0x7c2596),this['_cleanUp'](),_0x53244d&&(this['diff']=_0x53244d),this['isReady']=!0x0;});}['addRevisionData'](_0x5d5a23,_0x42d081){const _0xe9cf29=this['repository']['createRevision'](_0x5d5a23);return _0xe9cf29['on']('_update',(_0x159a08,_0x592c5f,_0x2cc53b)=>_0x42d081(_0x592c5f,_0x2cc53b,_0xe9cf29)),this['repository']['addRevision'](_0xe9cf29),_0xe9cf29;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5abcec=>{for(const _0x2afea4 of this['editor']['model']['document']['getRootNames']())_0x5abcec['detachRoot'](_0x2afea4);});}['_sortAndFilterDiffChanges'](_0x47749c){const _0x299430=[],_0x15f663=new Map();for(const _0x6dd381 of this['editor']['model']['document']['getRootNames']()){const _0x4ee856=this['editor']['editing']['view']['getDomRoot'](_0x6dd381);if(!_0x4ee856)continue;const _0x1f965b=_0x4ee856['getClientRects']()['item'](0x0);_0x1f965b&&(_0x299430['push'](_0x6dd381),_0x15f663['set'](_0x6dd381,_0x1f965b));}return _0x299430['sort']((_0x41aa0d,_0xf3b7c7)=>{const _0xeed970=_0x15f663['get'](_0x41aa0d),_0x543cef=_0x15f663['get'](_0xf3b7c7);return _0xeed970['y']-_0x543cef['y']||_0xeed970['x']-_0x543cef['x'];}),(_0x47749c=_0x47749c['filter'](_0x3ebaea=>_0x299430['includes'](_0x3ebaea['rootName'])))['sort']((_0x24ebf0,_0x31fa36)=>_0x299430['indexOf'](_0x24ebf0['rootName'])-_0x299430['indexOf'](_0x31fa36['rootName'])),_0x47749c;}['_makeTape'](_0x2cc02f){const _0x10d165=Array['from'](_0x2cc02f['markers'])['filter'](([_0x105698,_0x55ae45])=>_0x105698['startsWith']('revision:')&&!_0x55ae45['isCollapsed']),_0x2f57ce=Array['from'](this['editor']['model']['createRangeIn'](_0x2cc02f)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x10d165['length'])for(const _0x5c69f2 of _0x2f57ce){const [_0x1ff761,_0x2265f7]=_0x10d165[0x0],[,_0x3cc8fd,_0x3a636a]=_0x1ff761['split'](':');if(_0x2265f7['end']['isEqual'](_0x5c69f2['nextPosition'])&&_0x10d165['shift'](),(_0x5c69f2['previousPosition']['isEqual'](_0x2265f7['start'])||_0x5c69f2['previousPosition']['isAfter'](_0x2265f7['start']))&&('insertion'==_0x3cc8fd?_0x5c69f2['isAdded']={'userId':_0x3a636a}:'deletion'==_0x3cc8fd&&(_0x5c69f2['isRemoved']={'userId':_0x3a636a})),0x0==_0x10d165['length'])break;}return _0x2f57ce;}['_refreshStartEndIndex'](_0x5b405f){const _0x22e009=new Map();for(let _0x387999=0x0;_0x387999<_0x5b405f['length'];_0x387999++)'text'===_0x5b405f[_0x387999]['type']?(_0x5b405f[_0x387999]['item']['startIndex']=_0x387999,_0x5b405f[_0x387999]['item']['endIndex']=_0x387999):('elementStart'===_0x5b405f[_0x387999]['type']?_0x5b405f[_0x387999]['item']['startIndex']=_0x387999:'elementEnd'===_0x5b405f[_0x387999]['type']&&(_0x5b405f[_0x387999]['item']['endIndex']=_0x387999),_0x22e009['set'](_0x5b405f[_0x387999]['id'],_0x387999));for(const _0x4643ed of _0x22e009['values']())'elementStart'===_0x5b405f[_0x4643ed]['type']?_0x5b405f[_0x4643ed]['item']['endIndex']=_0x22e009['get'](_0x5b405f[_0x4643ed]['pairId']):'elementEnd'===_0x5b405f[_0x4643ed]['type']&&(_0x5b405f[_0x4643ed]['item']['startIndex']=_0x22e009['get'](_0x5b405f[_0x4643ed]['pairId']));}['_processTape'](_0x3ab99d){for(let _0x113729=0x0;_0x113729<_0x3ab99d['length'];_0x113729++){if('elementStart'===_0x3ab99d[_0x113729]['type'])_0x3ab99d[_0x113729]['item']['startIndex']=_0x113729;else{if('elementEnd'===_0x3ab99d[_0x113729]['type']){_0x3ab99d[_0x113729]['item']['endIndex']=_0x113729;const _0x33a4d9=_0x3ab99d[_0x113729]['item']['startIndex'];_0x3ab99d[_0x33a4d9]['pairId']=_0x3ab99d[_0x113729]['id'],_0x3ab99d[_0x113729]['pairId']=_0x3ab99d[_0x33a4d9]['id'];}else _0x3ab99d[_0x113729]['item']['startIndex']=_0x113729,_0x3ab99d[_0x113729]['item']['endIndex']=_0x113729,_0x3ab99d[_0x113729]['pairId']=null;}_0x3ab99d[_0x113729]['markersStart']||(_0x3ab99d[_0x113729]['markersStart']=[],_0x3ab99d[_0x113729]['markersEnd']=[]);}}['_markInsertions'](_0xe435e7,_0x1c20b9){const _0x28f050=_0xe435e7['filter'](_0x3cc738=>!_0x3cc738['isAdded']);for(let _0x569bc2=0x0;_0x569bc2<_0x1c20b9['length'];_0x569bc2++)_0x1c20b9[_0x569bc2]['isAdded']&&(_0x28f050[_0x569bc2]['isAdded']=_0x1c20b9[_0x569bc2]['isAdded']);}['_getDiff'](_0x20f493,_0xca9ae4=null){const _0x426bca=this['repository']['getRevision'](_0x20f493),_0x5e22a9=_0xca9ae4?this['repository']['getRevision'](_0xca9ae4):null,_0x135c4f=this['_getRevisionsRange'](_0x426bca,_0x5e22a9),_0x14d8c0=_0x135c4f[_0x135c4f['length']-0x1],_0x592855=new Map(),_0x2b88d9={'model':{},'attributes':{},'changes':[]},_0x35de04=new Set(),_0x666f74=new Map();for(let _0x132a90=_0x135c4f['length']-0x1;_0x132a90>=0x0;_0x132a90--){const _0x55c6cc=_0x135c4f[_0x132a90];for(const _0x9cf711 of Object['keys'](_0x55c6cc['diffData']))if(_0x55c6cc['diffData'][_0x9cf711]['attachChange']){const _0x4a3e60=_0x55c6cc['diffData'][_0x9cf711]['attachChange'];_0x4a3e60['isAttached']?(_0x35de04['add'](_0x9cf711),_0x666f74['has'](_0x9cf711)&&_0x666f74['get'](_0x9cf711)['userId']==_0x4a3e60['userId']?_0x666f74['delete'](_0x9cf711):_0x666f74['set'](_0x9cf711,_0x4a3e60)):_0x666f74['has'](_0x9cf711)?(_0x35de04['delete'](_0x9cf711),_0x666f74['delete'](_0x9cf711)):(_0x35de04['add'](_0x9cf711),_0x666f74['set'](_0x9cf711,_0x4a3e60));}else _0x35de04['add'](_0x9cf711);}for(const _0x4fff73 of _0x35de04){const _0x4313b8=_0x666f74['has'](_0x4fff73)&&!_0x666f74['get'](_0x4fff73)['isAttached'];let _0x4490dc=_0x4313b8?_0x135c4f['length']-0x1:0x0;const _0x1bb959=_0x4313b8?-0x1:0x1;for(;_0x135c4f[_0x4490dc];){const _0x8c4cf0=_0x135c4f[_0x4490dc];if(_0x8c4cf0['diffData'][_0x4fff73]){const _0x4f0225=_0x4313b8?_0x8c4cf0['diffData'][_0x4fff73]['attributesBefore']:_0x8c4cf0['diffData'][_0x4fff73]['attributesAfter'];_0x2b88d9['attributes'][_0x4fff73]=_0x4f0225?_0x80fe75(_0x4f0225):{};break;}_0x4490dc+=_0x1bb959;}}for(const _0x453af8 of _0x135c4f){_0x453af8['model']={};for(const _0x57a719 of _0x453af8['authors'])_0x592855['set'](_0x57a719['id'],_0x57a719);for(const _0x330fc9 of _0x35de04){const _0x3edb72=_0x453af8['diffData'][_0x330fc9]?_0x453af8['diffData'][_0x330fc9]['insertions']:'[]',_0x10a097=_0x453af8['diffData'][_0x330fc9]?_0x453af8['diffData'][_0x330fc9]['deletions']:'[]',_0x372286=_0x453af8['diffData'][_0x330fc9]?.['rootElementName']||'$root';_0x453af8['model'][_0x330fc9]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3edb72,_0x372286),'deletions':this['_utils']['_makeModelFromViewString'](_0x10a097,_0x372286)};}}for(const _0x49cd56 of _0x35de04){let _0x3d8871=null,_0x141147=0x0;const _0x10fc80=_0x135c4f['map'](_0x18c66c=>_0x18c66c['diffData'][_0x49cd56]?.['rootElementName'])['find'](_0x5c49e9=>void 0x0!==_0x5c49e9)||'$root',_0x4627a2=new Map(Array['from'](_0x426bca['model'][_0x49cd56]['insertions']['markers'])['filter'](([_0x1f56a7])=>!_0x1f56a7['startsWith']('revision:')));let _0x229c5a=0x0;for(const _0x3883d5 of _0x135c4f){const _0x4182e8=this['_makeTape'](_0x3883d5['model'][_0x49cd56]['insertions']);_0x3883d5==_0x426bca?(_0x3d8871=_0x4182e8,_0x141147=_0x3d8871['length'],_0x3d8871['forEach'](_0xaf6daa=>{_0xaf6daa['id']=_0x229c5a++;}),this['_processTape'](_0x3d8871)):this['_markInsertions'](_0x3d8871,_0x4182e8);const _0x1ecdaf=_0x3d8871['filter'](_0x77becf=>!_0x77becf['isAdded'])['map'](_0x2db882=>_0x2db882['id']);let _0x222ff=0x0;const _0x1ba1a9=this['_makeTape'](_0x3883d5['model'][_0x49cd56]['deletions']);_0x1ba1a9['forEach'](_0x1717a9=>{_0x1717a9['isRemoved']?_0x1717a9['id']=_0x141147++:_0x1717a9['id']=_0x1ecdaf[_0x222ff++];}),this['_processTape'](_0x1ba1a9),this['_setDistance'](_0x3d8871,'isAdded'),this['_setDistance'](_0x1ba1a9,'isRemoved'),_0x3883d5==_0x426bca&&this['_markMarkers'](_0x3d8871,_0x4627a2),_0x3d8871=this['_joinTapes'](_0x3d8871,_0x1ba1a9),this['_refreshStartEndIndex'](_0x3d8871),this['_setDistance'](_0x3d8871,'isRemoved');}_0x3d8871=_0x3d8871['filter'](_0x143b68=>!(_0x143b68['isAdded']&&_0x143b68['isRemoved']));const _0x2d486b=new Map(_0x14d8c0['model'][_0x49cd56]['deletions']['markers']),_0x3a3d35=new Set(_0x4627a2['keys']());for(const _0x5cad50 of _0x2d486b['keys']())_0x3a3d35['delete'](_0x5cad50);this['_markSuggestions'](_0x3d8871,_0x3a3d35),this['_fixObsoleteTags'](_0x3d8871),_0x3d8871=this['_removeMissingPairs'](_0x3d8871),_0x3d8871=this['_markMismatchedRemovedTags'](_0x3d8871),_0x3d8871=this['_removeUnsupportedChanges'](_0x3d8871);const {root:_0x2e0260,changes:_0x4eb176}=this['_makeModelFromTape'](_0x3d8871,_0x592855,_0x49cd56,_0x10fc80);_0x2b88d9['model'][_0x49cd56]=_0x2e0260;const _0xa865a0=_0x666f74['get'](_0x49cd56);if(_0xa865a0){const _0x579347=_0x592855['get'](_0xa865a0['userId']),_0x34e583=new ChangeItem({'author':_0x579347,'type':_0xa865a0['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x49cd56});_0x4eb176['unshift'](_0x34e583),_0x2b88d9['attributes'][_0x49cd56]['revisionHistoryAttachChange']=_0x34e583['id'];}_0x2b88d9['changes']=_0x2b88d9['changes']['concat'](_0x4eb176);}return _0x2b88d9;}['_markMarkers'](_0x37244b,_0x545e79){for(let _0x3513c4=0x0;_0x3513c4<_0x37244b['length'];_0x3513c4++)for(const [_0x10ea6a,_0x321a8d]of _0x545e79)!_0x321a8d['isCollapsed']&&_0x321a8d['start']['isEqual'](_0x37244b[_0x3513c4]['previousPosition'])&&_0x37244b[_0x3513c4]['markersStart']['push'](_0x10ea6a),_0x321a8d['end']['isEqual'](_0x37244b[_0x3513c4]['nextPosition'])&&_0x37244b[_0x3513c4]['markersEnd']['push'](_0x10ea6a);}['_joinTapes'](_0x286e6a,_0x201a87){let _0x1ce05b=[],_0x2de695=0x0,_0x213ff7=0x0;for(;_0x2de695<_0x286e6a['length']||_0x213ff7<_0x201a87['length'];){const _0x3b430c=_0x286e6a[_0x2de695]||{},_0x133cc1=_0x201a87[_0x213ff7]||{};if(_0x3b430c['id']==_0x133cc1['id'])_0x2de695++,_0x213ff7++,_0x1ce05b['push'](_0x3b430c);else{if(_0x133cc1['isRemoved']&&_0x3b430c['isAdded']){const {commonTape:_0x3cd83e,iEnd:_0x1f3e23,jEnd:_0x54fd70}=this['_threeWayMerge'](_0x286e6a,_0x2de695,_0x201a87,_0x213ff7);_0x1ce05b=_0x1ce05b['concat'](_0x3cd83e),_0x2de695=_0x1f3e23,_0x213ff7=_0x54fd70;}else _0x133cc1['isRemoved']?(_0x213ff7++,_0x1ce05b['push'](_0x133cc1)):(_0x2de695++,_0x1ce05b['push'](_0x3b430c));}}return _0x1ce05b;}['_markSuggestions'](_0x5baf6a,_0x349a84){const _0x5377ef=[];for(let _0x4fd71=0x0;_0x4fd71<_0x5baf6a['length'];_0x4fd71++){for(let _0x1ed228=0x0;_0x1ed228<_0x5baf6a[_0x4fd71]['markersStart']['length'];_0x1ed228++){const _0x28c14c=_0x5baf6a[_0x4fd71]['markersStart'][_0x1ed228];if(!_0x349a84['has'](_0x28c14c))continue;const {group:_0x558260,type:_0x41e85a,authorId:_0x5a1251}=_0x3c1299(_0x28c14c);'revision-suggestion'!=_0x558260||'insertion'!=_0x41e85a&&'deletion'!=_0x41e85a||(_0x5377ef['unshift']({'type':_0x41e85a,'name':_0x28c14c,'userId':_0x5a1251}),_0x5baf6a[_0x4fd71]['markersStart']['splice'](_0x1ed228,0x1),_0x1ed228--);}_0x215bdd(_0x5baf6a[_0x4fd71]);for(let _0x3d0014=0x0;_0x3d0014<_0x5baf6a[_0x4fd71]['markersEnd']['length'];_0x3d0014++){const _0x914264=_0x5baf6a[_0x4fd71]['markersEnd'][_0x3d0014];if(!_0x349a84['has'](_0x914264))continue;const {group:_0x404edc,type:_0x35434b}=_0x3c1299(_0x914264);if('revision-suggestion'!=_0x404edc||'insertion'!=_0x35434b&&'deletion'!=_0x35434b)continue;_0x5baf6a[_0x4fd71]['markersEnd']['splice'](_0x3d0014,0x1),_0x3d0014--;const _0x5f4500=_0x5377ef['findIndex'](_0x467a3c=>_0x467a3c['name']==_0x914264);_0x5f4500>-0x1&&_0x5377ef['splice'](_0x5f4500,0x1);}}function _0x3c1299(_0x40c4e0){const _0x5592bb=_0x40c4e0['split'](':');return{'group':_0x5592bb[0x0],'type':_0x5592bb[0x1],'subType':_0x5592bb['length']>=0x5?_0x5592bb[0x2]:null,'id':_0x5592bb['length']<0x5?_0x5592bb[0x2]:_0x5592bb[0x3],'authorId':_0x5592bb['length']<0x5?_0x5592bb[0x3]:_0x5592bb[0x4],'markerCount':0x6==_0x5592bb['length']?_0x5592bb[0x5]:null};}function _0x215bdd(_0x41228c){for(let _0x397ec2=0x0;_0x397ec2<_0x5377ef['length'];_0x397ec2++){if(_0x41228c['isAdded']&&'insertion'==_0x5377ef[_0x397ec2]['type']&&_0x41228c['isAdded']['userId']==_0x5377ef[_0x397ec2]['userId'])return _0x41228c['isAddSuggestion']=_0x5377ef[_0x397ec2],void delete _0x41228c['isAdded'];if(!_0x41228c['isAdded']&&!_0x41228c['isRemoved']&&'deletion'==_0x5377ef[_0x397ec2]['type'])return void(_0x41228c['isRemoveSuggestion']=_0x5377ef[_0x397ec2]);}}}['_setDistance'](_0x34c710,_0x3d8551){let _0x33cb20=0x0,_0x50319e=!0x1;const _0x568427=new Map();for(const _0x3d44c9 of _0x34c710)_0x3d44c9[_0x3d8551]?_0x50319e&&(_0x33cb20++,_0x50319e=!0x1):(_0x33cb20++,_0x50319e=!0x0),_0x568427['set'](_0x3d44c9['id'],_0x33cb20);for(let _0x1cecc9=0x0;_0x1cecc9<_0x34c710['length'];_0x1cecc9++){if('isRemoved'==_0x3d8551&&_0x34c710[_0x1cecc9]['isAdded']||'isAdded'==_0x3d8551&&_0x34c710[_0x1cecc9]['isRemoved'])continue;if('text'==_0x34c710[_0x1cecc9]['type']){_0x34c710[_0x1cecc9]['distance']=0x0;continue;}const _0x4c4afc=_0x568427['get'](_0x34c710[_0x1cecc9]['pairId']),_0x18c3aa=_0x568427['get'](_0x34c710[_0x1cecc9]['id']);_0x34c710[_0x1cecc9]['distance']=_0x4c4afc-_0x18c3aa;}}['_getRevisionsRange'](_0x4fc912,_0x3fccf2,_0x193ae1=!0x1){const _0xaf84e2=[];let _0xcd8b5=this['repository']['getIndex'](_0x4fc912),_0x3d169c=this['repository']['getIndex'](_0x3fccf2);for(-0x1==_0x3d169c&&(_0x3d169c=this['repository']['_revisions']['length'],_0x193ae1=!0x1);_0xcd8b5<_0x3d169c;)_0xaf84e2['push'](this['repository']['getRevision'](_0xcd8b5)),_0xcd8b5++;return _0x193ae1&&_0xaf84e2['push'](this['repository']['getRevision'](_0xcd8b5)),_0xaf84e2;}['_threeWayMerge'](_0x465719,_0xd5d405,_0x55e0b3,_0x153101){const _0x5147b0=this['editor']['model']['schema'];let _0x55b3d9=_0xd5d405;for(;_0x465719[_0x55b3d9]&&_0x465719[_0x55b3d9]['isAdded'];)_0x55b3d9++;let _0xa5c561=_0x153101;for(;_0x55e0b3[_0xa5c561]&&_0x55e0b3[_0xa5c561]['isRemoved'];)_0xa5c561++;_0x223ee6(_0x465719,_0xd5d405,_0x55b3d9),_0x223ee6(_0x55e0b3,_0x153101,_0xa5c561);const _0x10811c=_0x55e0b3['slice'](_0x153101,_0xa5c561)['concat'](_0x465719['slice'](_0xd5d405,_0x55b3d9));return _0x10811c['sort']((_0x4369de,_0x39635e)=>_0x4369de['side']!=_0x39635e['side']?_0x4369de['side']-_0x39635e['side']:_0x4369de['level']!=_0x39635e['level']?_0x4369de['level']-_0x39635e['level']:_0x4369de['distance']!=_0x39635e['distance']?_0x39635e['distance']-_0x4369de['distance']:!!_0x4369de['isAdded']!=!!_0x39635e['isAdded']?-0x1==_0x4369de['side']||0x0==_0x4369de['side']?_0x4369de['isAdded']?-0x1:0x1:_0x4369de['isAdded']?0x1:-0x1:_0x4369de['index']-_0x39635e['index']),{'commonTape':_0x10811c,'iEnd':_0x55b3d9,'jEnd':_0xa5c561};function _0x223ee6(_0x5589b2,_0x4ad39f,_0x5eb9f0){let _0x1473e1=-0x1,_0x24f10b=Number['POSITIVE_INFINITY'],_0x175404=!0x0;for(let _0x5bb264=_0x4ad39f;_0x5bb264<_0x5eb9f0;_0x5bb264++)if(_0x5147b0['isInline'](_0x5589b2[_0x5bb264]['item'])||(_0x175404=!0x1),_0x5589b2[_0x5bb264]['item']['startIndex']<_0x4ad39f&&(_0x1473e1=_0x5bb264),_0x5589b2[_0x5bb264]['item']['endIndex']>=_0x5eb9f0){_0x24f10b=_0x5bb264;break;}_0x175404&&(_0x1473e1=_0x5eb9f0-0x1);for(let _0x14c365=_0x4ad39f;_0x14c365<_0x5eb9f0;_0x14c365++)_0x5589b2[_0x14c365]['side']=_0x14c365<=_0x1473e1?-0x1:_0x14c365<_0x24f10b?0x0:0x1,_0x5589b2[_0x14c365]['index']=_0x14c365;let _0x21b75d=0x0;for(let _0x14f851=_0x4ad39f;_0x14f851<=_0x1473e1;_0x14f851++)0x0==_0x5589b2[_0x14f851]['distance']?_0x5589b2[_0x14f851]['level']=_0x21b75d:(_0x21b75d++,_0x5589b2[_0x14f851]['level']=_0x21b75d,_0x21b75d++);for(let _0x4c1403=_0x4ad39f;_0x4c1403<_0x5eb9f0;_0x4c1403++)0x0==_0x5589b2[_0x4c1403]['side']&&(_0x5589b2[_0x4c1403]['level']=_0x21b75d);_0x21b75d=0x0;for(let _0x4dd7f1=_0x5eb9f0-0x1;_0x4dd7f1>=_0x24f10b;_0x4dd7f1--)0x0==_0x5589b2[_0x4dd7f1]['distance']?_0x5589b2[_0x4dd7f1]['level']=_0x21b75d:(_0x21b75d--,_0x5589b2[_0x4dd7f1]['level']=_0x21b75d,_0x21b75d--);}}['_fixObsoleteTags'](_0x5c87a9){const _0x2e75c2=new Map(),_0x1860f8=this['editor']['model']['schema'];for(let _0x149b47=0x1;_0x149b47<_0x5c87a9['length'];_0x149b47++){let _0x4f9584,_0x5beaed,_0x41336a;const _0x2823b6=_0x5c87a9[_0x149b47],_0x34a3c8=_0x5c87a9[_0x149b47-0x1];if('text'==_0x2823b6['type'])continue;if(_0x2823b6['type']!=_0x34a3c8['type'])continue;if(!_0x1860f8['isBlock'](_0x34a3c8['item'])||_0x1860f8['isLimit'](_0x34a3c8['item']))continue;if(!_0x1860f8['isBlock'](_0x2823b6['item'])||_0x1860f8['isLimit'](_0x2823b6['item']))continue;if((_0x5c87a9[_0x149b47]['isAdded']||_0x5c87a9[_0x149b47]['isAddSuggestion'])&&_0x5c87a9[_0x149b47-0x1]['isRemoved'])_0x4f9584=_0x5c87a9[_0x149b47],_0x5beaed=_0x5c87a9[_0x149b47-0x1],_0x41336a=_0x149b47-0x1;else{if(!_0x5c87a9[_0x149b47]['isRemoved']||!_0x5c87a9[_0x149b47-0x1]['isAdded']&&!_0x5c87a9[_0x149b47-0x1]['isAddSuggestion'])continue;_0x4f9584=_0x5c87a9[_0x149b47-0x1],_0x5beaed=_0x5c87a9[_0x149b47],_0x41336a=_0x149b47;}const _0xd5d3db=_0x4f9584['level']==_0x5beaed['level'],_0x20f586=Math['abs'](_0x4f9584['level'])<Math['abs'](_0x5beaed['level'])&&0x0==_0x5beaed['distance'];(_0xd5d3db||_0x20f586)&&(_0x2e75c2['set'](_0x5beaed['id'],_0x4f9584['id']),_0x5c87a9['splice'](_0x41336a,0x1),_0x149b47--,_0x4f9584['isAdded']=!0x1);}for(let _0x16e9e1=0x0;_0x16e9e1<_0x5c87a9['length'];_0x16e9e1++)_0x2e75c2['has'](_0x5c87a9[_0x16e9e1]['pairId'])&&(_0x5c87a9[_0x16e9e1]['pairId']=_0x2e75c2['get'](_0x5c87a9[_0x16e9e1]['pairId']));}['_removeMissingPairs'](_0x1af801){const _0x39c98b=new Set(_0x1af801['map'](_0x5ce2d8=>_0x5ce2d8['id']));for(let _0x559f2e=0x0;_0x559f2e<_0x1af801['length'];_0x559f2e++)_0x39c98b['has'](_0x1af801[_0x559f2e]['pairId'])||0x0==_0x1af801[_0x559f2e]['distance']||(_0x1af801[_0x559f2e]['isIncorrect']=!0x0);return _0x1af801['filter'](_0x563e3b=>!_0x563e3b['isIncorrect']);}['_markMismatchedRemovedTags'](_0x503c1d){const _0x101e15=new Set();for(let _0x4e5510=0x0;_0x4e5510<_0x503c1d['length'];_0x4e5510++){if(_0x101e15['has'](_0x503c1d[_0x4e5510]['id'])&&_0x503c1d[_0x4e5510]['isRemoved']&&(_0x503c1d[_0x4e5510]['isIncorrect']=!0x0),_0x503c1d[_0x4e5510]['isIncorrect'])continue;if(0x0==_0x503c1d[_0x4e5510]['distance'])continue;if('elementStart'!=_0x503c1d[_0x4e5510]['type'])continue;if(null==_0x503c1d[_0x4e5510]['pairId'])continue;let _0x81a79f=_0x4e5510+0x1,_0x518195=0x0;for(;_0x503c1d[_0x81a79f]['id']!=_0x503c1d[_0x4e5510]['pairId'];)'elementStart'==_0x503c1d[_0x81a79f]['type']?_0x518195++:'elementEnd'==_0x503c1d[_0x81a79f]['type']&&_0x518195--,_0x81a79f++;if(0x0!=_0x518195){if(_0x503c1d[_0x4e5510]['isRemoved'])_0x503c1d[_0x4e5510]['isIncorrect']=!0x0;else{for(;_0x81a79f!=_0x4e5510;)_0x503c1d[_0x81a79f]['isRemoved']&&0x0!=_0x503c1d[_0x81a79f]['distance']&&(_0x503c1d[_0x81a79f]['isIncorrect']=!0x0,_0x101e15['add'](_0x503c1d[_0x81a79f]['pairId'])),_0x81a79f--;}}}return _0x503c1d['filter'](_0x3fba55=>!_0x3fba55['isIncorrect']);}['_removeUnsupportedChanges'](_0x2df116){const _0x8bbed6=this['editor']['model']['schema'];for(let _0x365c2a=0x0;_0x365c2a<_0x2df116['length'];_0x365c2a++){if(!(_0x2df116[_0x365c2a]['isAdded']||_0x2df116[_0x365c2a]['isAddSuggestion']||_0x2df116[_0x365c2a]['isRemoved']||_0x2df116[_0x365c2a]['isRemoveSuggestion']))continue;if(0x0==_0x2df116[_0x365c2a]['distance'])continue;const _0x48d2ad=_0x2df116[_0x365c2a]['item'];_0x8bbed6['isBlock'](_0x48d2ad)||_0x8bbed6['isLimit'](_0x48d2ad)||(_0x2df116[_0x365c2a]['isAdded']&&delete _0x2df116[_0x365c2a]['isAdded'],_0x2df116[_0x365c2a]['isAddSuggestion']&&delete _0x2df116[_0x365c2a]['isAddSuggestion'],_0x2df116[_0x365c2a]['isRemoveSuggestion']&&delete _0x2df116[_0x365c2a]['isRemoveSuggestion'],_0x2df116[_0x365c2a]['isRemoved']&&(_0x2df116[_0x365c2a]['isIncorrect']=!0x0));}return _0x2df116['filter'](_0x4f2673=>!_0x4f2673['isIncorrect']);}['_makeModelFromTape'](_0x34b281,_0xe1ef0e,_0xdcee0a,_0x285d9b){const _0x24cf1e=new _0x479b0a(),_0x4fb617=[],_0x504732=new Map(),_0x37d2f5=this['editor']['model'],_0xf761f8=_0x37d2f5['schema'],_0x2cb798=[_0x24cf1e],_0x448da7={},_0x1bd22b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x24cf1e['name']=_0x285d9b;let _0x3aa019=null;const _0x8dac8e=[0x0];for(let _0x2663f6=0x0;_0x2663f6<_0x34b281['length'];_0x2663f6++)if('elementStart'===_0x34b281[_0x2663f6]['type']){_0x34b281[_0x2663f6]['previousPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e);const _0x338dc8=new _0x3afe29(_0x34b281[_0x2663f6]['item']['name'],_0x34b281[_0x2663f6]['item']['getAttributes']());_0x2cb798[0x0]['_appendChild'](_0x338dc8),_0x8dac8e['push'](0x0),_0x2cb798['unshift'](_0x338dc8),_0x34b281[_0x2663f6]['nextPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e);}else'elementEnd'===_0x34b281[_0x2663f6]['type']?(_0x2cb798['shift'](),_0x34b281[_0x2663f6]['previousPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e),_0x8dac8e['pop'](),_0x8dac8e[_0x8dac8e['length']-0x1]++,_0x34b281[_0x2663f6]['nextPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e)):(_0x34b281[_0x2663f6]['previousPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e),_0x3aa019?_0x3aa019['_data']+=_0x34b281[_0x2663f6]['item']['data']:_0x3aa019=new _0x5f2a14(_0x34b281[_0x2663f6]['item']['data'],_0x34b281[_0x2663f6]['item']['getAttributes']()),_0x34b281[_0x2663f6+0x1]&&'text'===_0x34b281[_0x2663f6+0x1]['type']&&_0x321234(_0x3aa019,_0x34b281[_0x2663f6+0x1]['item'])||(_0x2cb798[0x0]['_appendChild'](_0x3aa019),_0x3aa019=null),_0x8dac8e[_0x8dac8e['length']-0x1]+=_0x34b281[_0x2663f6]['item']['offsetSize'],_0x34b281[_0x2663f6]['nextPosition']=_0x37d2f5['createPositionFromPath'](_0x24cf1e,_0x8dac8e));for(let _0x6b81f0=0x0;_0x6b81f0<_0x34b281['length'];_0x6b81f0++){const _0x31c9d8=_0x34b281[_0x6b81f0]['previousPosition'],_0x5e6920=_0x34b281[_0x6b81f0]['nextPosition'];for(const _0x456b90 of _0x34b281[_0x6b81f0]['markersStart'])_0x504732['set'](_0x456b90,{'start':_0x31c9d8,'end':null});_0x52cdea('isRemoveSuggestion',_0x6b81f0,_0x31c9d8,_0x5e6920),_0x52cdea('isAddSuggestion',_0x6b81f0,_0x31c9d8,_0x5e6920),_0x52cdea('isRemoved',_0x6b81f0,_0x31c9d8,_0x5e6920),_0x52cdea('isAdded',_0x6b81f0,_0x31c9d8,_0x5e6920);for(const _0x325995 of _0x34b281[_0x6b81f0]['markersEnd']){const _0x313aec=_0x504732['get'](_0x325995);_0x313aec?_0x313aec['end']=_0x5e6920:_0x504732['set'](_0x325995,{'start':_0x5e6920,'end':_0x5e6920});}}for(const [_0x4f66cd,_0x21e53b]of _0x504732){const _0xb62b01=this['editor']['model']['createRange'](_0x21e53b['start'],_0x21e53b['end']);_0x24cf1e['markers']['set'](_0x4f66cd,_0xb62b01);}return _0x4fb617['sort']((_0x45fc17,_0xf1aae9)=>{const _0x38b1b7=_0x24cf1e['markers']['get']('revision:'+_0x45fc17['id']),_0x32844a=_0x24cf1e['markers']['get']('revision:'+_0xf1aae9['id']);return _0x38b1b7['start']['isBefore'](_0x32844a['start'])?-0x1:_0x38b1b7['start']['isAfter'](_0x32844a['start'])?0x1:_0x38b1b7['end']['isBefore'](_0x32844a['end'])?-0x1:_0x38b1b7['end']['isAfter'](_0x32844a['end'])?0x1:'add'===_0x45fc17['type']?-0x1:0x1;}),{'root':_0x24cf1e,'changes':_0x4fb617};function _0x52cdea(_0x17fe00,_0x10305f,_0x2b3690,_0x9d8aa3){const _0x4decfa=!!_0x34b281[_0x10305f][_0x17fe00],_0x5c37e9=_0x4decfa?_0x34b281[_0x10305f][_0x17fe00]['userId']:null,_0x2f0d22=_0x10305f===_0x34b281['length']-0x1,_0x40d2ce=_0x1bd22b[_0x17fe00][0x0],_0x27fb92=_0xf761f8['isObject'](_0x34b281[_0x10305f]['item']);!_0x448da7[_0x17fe00]&&_0x4decfa?_0x448da7[_0x17fe00]={'start':_0x2b3690,'tapeItem':_0x34b281[_0x10305f],'userId':_0x5c37e9,'type':_0x17fe00}:_0x448da7[_0x17fe00]&&!_0x4decfa?(_0x448da7[_0x17fe00]['end']=_0x2b3690,_0x2b068f(_0x448da7[_0x17fe00]),_0x448da7[_0x17fe00]=null):_0x448da7[_0x17fe00]&&_0x4decfa&&_0x448da7[_0x17fe00]['userId']!==_0x5c37e9&&(_0x448da7[_0x17fe00]['end']=_0x2b3690,_0x40d2ce&&_0x40d2ce['userId']===_0x448da7[_0x17fe00]['userId']||_0x2b068f(_0x448da7[_0x17fe00]),_0x448da7[_0x17fe00]={'start':_0x2b3690,'tapeItem':_0x34b281[_0x10305f],'userId':_0x5c37e9,'type':_0x17fe00}),_0x448da7[_0x17fe00]&&_0x27fb92&&('elementStart'!==_0x34b281[_0x10305f]['type']||_0x40d2ce&&_0x40d2ce['userId']===_0x5c37e9||_0x1bd22b[_0x17fe00]['unshift']({'userId':_0x5c37e9,'object':_0x34b281[_0x10305f]['item'],'change':_0x448da7[_0x17fe00]}),'elementEnd'===_0x34b281[_0x10305f]['type']&&_0x40d2ce&&_0x40d2ce['object']===_0x34b281[_0x10305f]['item']&&(_0x1bd22b[_0x17fe00]['shift'](),_0x448da7[_0x17fe00]=_0x40d2ce['change'])),_0x448da7[_0x17fe00]&&_0x2f0d22&&(_0x448da7[_0x17fe00]['end']=_0x9d8aa3,_0x2b068f(_0x448da7[_0x17fe00]),_0x448da7[_0x17fe00]=null);}function _0x2b068f({start:_0x5a30e7,end:_0x185c2e,tapeItem:_0x190def,userId:_0x4d7f73,type:_0x22c6c8}){const _0x32d157=_0x190def['item'],_0x2ab42b=_0x37d2f5['schema']['isBlock'](_0x32d157)&&!_0x37d2f5['schema']['isLimit'](_0x32d157),_0xa87689=_0x5a30e7['nodeAfter']==_0x185c2e['parent']&&_0x185c2e['isAtStart'];if(_0x2ab42b&&_0xa87689)return;const _0x59465d=_0x37d2f5['createRange'](_0x5a30e7,_0x185c2e),_0x5a3f38=_0xe1ef0e['get'](_0x4d7f73),_0x3d471b=new ChangeItem({'author':_0x5a3f38,'type':'isAdded'==_0x22c6c8||'isAddSuggestion'==_0x22c6c8?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x22c6c8||'isRemoveSuggestion'==_0x22c6c8},'createdAt':new Date(),'rootName':_0xdcee0a});_0x4fb617['push'](_0x3d471b),_0x24cf1e['markers']['set']('revision:'+_0x3d471b['id'],_0x59465d);}function _0x321234(_0x1d7451,_0x3927bf){const _0x55e7e2=_0x1d7451['getAttributes'](),_0x4e7922=_0x3927bf['getAttributes']();for(const _0x567874 of _0x55e7e2){if(_0x567874[0x1]!==_0x3927bf['getAttribute'](_0x567874[0x0]))return!0x1;_0x4e7922['next']();}return _0x4e7922['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x5f8525=>{const _0x4d6b71=_0x5f8525['markerName']['split'](':')[0x1],_0x3a35d9=this['_getChangeFromId'](_0x4d6b71);if(!_0x3a35d9)return null;const _0x51f660='add'==_0x3a35d9['type']?'insertion':'deletion',_0x46e884=['ck-suggestion-marker','ck-suggestion-marker-'+_0x51f660];return _0x3a35d9['data']['isSuggestion']&&_0x46e884['push']('ck-suggestion-marker-'+_0x51f660+'-new'),this['activeChange']==_0x3a35d9&&_0x46e884['push']('ck-suggestion-marker--active'),{'classes':_0x46e884,'attributes':{'data-change-id':_0x4d6b71}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x364f93=>{_0x364f93['on']('element:pre',(_0x5d631f,_0x14e25a,_0x29f5bd)=>{const _0x487160=_0x14e25a['viewItem']['getChild'](0x0);if(!_0x487160||!_0x487160['is']('element','code'))return;if(!_0x29f5bd['consumable']['consume'](_0x487160,{'attributes':['vid_start','vid_end']}))return;const _0x3895da=_0x14e25a['modelRange']['start']['nodeAfter'];_0x29f5bd['writer']['setAttribute']('vid_start',_0x487160['getAttribute']('vid_start'),_0x3895da),_0x29f5bd['writer']['setAttribute']('vid_end',_0x487160['getAttribute']('vid_end'),_0x3895da);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xa3469=>{_0xa3469['on']('element',(_0x5cf0d2,_0x32a563,_0x1919a7)=>{if(!_0x1919a7['consumable']['consume'](_0x32a563['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x32a563['modelRange']['isCollapsed'])return;const _0x51ab75=_0x32a563['modelRange']['start']['nodeAfter'];_0x51ab75['hasAttribute']('vid_start')||_0x51ab75['hasAttribute']('vid')||(_0x1919a7['writer']['setAttribute']('vid_start',_0x32a563['viewItem']['getAttribute']('vid_start'),_0x51ab75),_0x1919a7['writer']['setAttribute']('vid_end',_0x32a563['viewItem']['getAttribute']('vid_end'),_0x51ab75));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x154713=>_0x154713['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x55bb7f,[,_0x27048a])=>{['vid_start','vid_end','vid']['includes'](_0x27048a)&&(_0x55bb7f['return']=!0x0,_0x55bb7f['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x147873=>{_0x147873['on']('attribute:vid',(_0x348b46,_0x55df4e,_0x530174)=>{if('\x20'!=_0x55df4e['item']['data']||_0x55df4e['item']['parent']['maxOffset']>0x1)return;if(!_0x530174['consumable']['consume'](_0x55df4e['item'],_0x348b46['name']))return;const _0x4819f5=_0x530174['writer'],_0x2d7151=_0x530174['mapper']['toViewRange'](_0x55df4e['range']);_0x4819f5['wrap'](_0x2d7151,_0x4819f5['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x4ef685){const _0x4c5e21=_0x4ef685['plugins']['get']('RevisionViewer');return(_0x3b5f2f,_0x13481b,_0x201c74)=>{const _0x26af71=_0x13481b['markerName']['split'](':')[0x1],_0x5caf8e=_0x4c5e21['_getChangeFromId'](_0x26af71);if(!_0x5caf8e)return null;const _0x5fcb8a='add'==_0x5caf8e['type']?'split':'merge';if(!_0x201c74['consumable']['test'](_0x13481b['markerRange'],_0x3b5f2f['name']))return;const _0x1c4c35=_0x13481b['markerRange']['getWalker'](),_0x5e2c23=_0x13481b['markerRange']['start'],_0x418fd4=_0x4ef685['model']['schema'];let _0x464d6a=null,_0x54f27d=null,_0x3bffaf=!0x1,_0x51a99c=!0x1;for(const _0x65b454 of _0x1c4c35){const _0x3fbc09=_0x65b454['item'];_0x3bffaf=_0x3bffaf||_0x418fd4['isContent'](_0x3fbc09);const _0x17680f=_0x201c74['mapper']['toViewElement'](_0x3fbc09);if(_0x17680f&&_0x17680f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x65b454['type']&&(_0x418fd4['isBlock'](_0x3fbc09)&&!_0x418fd4['isLimit'](_0x3fbc09)&&(_0x3fbc09['nextSibling']||_0x5e2c23['isAtEnd']?_0x464d6a&&_0x464d6a['parent']==_0x3fbc09||(_0x464d6a=_0x3fbc09,_0x38c475(_0x65b454['previousPosition']),_0x51a99c=!0x0):_0x54f27d=_0x54f27d||_0x65b454['previousPosition']));}function _0x38c475(_0x1a486f){const _0x44c129=_0x201c74['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5fcb8a}),_0x361640=_0x201c74['mapper']['toViewPosition'](_0x1a486f);_0x5caf8e['data']['isSuggestion']&&_0x201c74['writer']['addClass']('ck-suggestion-marker-'+_0x5fcb8a+'-new',_0x44c129),_0x4c5e21['activeChange']==_0x5caf8e&&_0x201c74['writer']['addClass']('ck-suggestion-marker--active',_0x44c129),_0x201c74['writer']['insert'](_0x361640,_0x44c129),_0x201c74['mapper']['bindElementToMarker'](_0x44c129,_0x13481b['markerName']);}_0x3bffaf||_0x51a99c||!_0x54f27d||_0x38c475(_0x54f27d);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x233461,_0x354e18,_0x1412f4)=>{const _0x184303=_0x1412f4['mapper']['markerNameToElements'](_0x354e18['markerName']);if(_0x184303){for(const _0x5762ae of _0x184303)(_0x5762ae['hasClass']('ck-suggestion-marker-split')||_0x5762ae['hasClass']('ck-suggestion-marker-merge'))&&(_0x1412f4['mapper']['unbindElementFromMarkerName'](_0x5762ae,_0x354e18['markerName']),_0x1412f4['writer']['remove'](_0x5762ae));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4ddf7e,_0x2ddde9,_0x45ca80)=>{const _0xbe2a0e=_0x2ddde9['markerName']['split'](':')[0x1],_0x17ae49=this['_getChangeFromId'](_0xbe2a0e);if(!_0x17ae49)return null;const _0x405b84='add'==_0x17ae49['type']?'split':'merge';if(_0x45ca80['consumable']['test'](_0x2ddde9['markerRange'],_0x4ddf7e['name']))for(const _0x5802df of _0x2ddde9['markerRange']['getItems']()){if(!_0x5802df['is']('element','softBreak'))continue;const _0x3e643e=_0x45ca80['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x405b84}),_0x20f9bc=_0x45ca80['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5802df));_0x17ae49['data']['isSuggestion']&&_0x45ca80['writer']['addClass']('ck-suggestion-marker-'+_0x405b84+'-new',_0x3e643e),this['activeChange']==_0x17ae49&&_0x45ca80['writer']['addClass']('ck-suggestion-marker--active',_0x3e643e),_0x45ca80['writer']['insert'](_0x20f9bc,_0x3e643e),_0x45ca80['mapper']['bindElementToMarker'](_0x3e643e,_0x2ddde9['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4e6c9a=>{for(const _0x2f6cad of this['editor']['model']['document']['getRootNames']()){const _0x492795=this['editor']['model']['document']['getRoot'](_0x2f6cad),_0x1f7e81=this['editor']['editing']['view']['document']['getRoot'](_0x2f6cad);if(_0x1f7e81){const _0x32e86f=_0x492795['getAttribute']('revisionHistoryAttachChange');if(_0x4e6c9a['removeAttribute']('data-change-id',_0x1f7e81),_0x4e6c9a['removeClass']('ck-revision-history-root-add',_0x1f7e81),_0x4e6c9a['removeClass']('ck-revision-history-root-remove',_0x1f7e81),_0x4e6c9a['removeClass']('ck-revision-history-root--active',_0x1f7e81),_0x32e86f){const _0x1624dd=this['_getChangeFromId'](_0x32e86f);if(!_0x1624dd)return null;_0x4e6c9a['setAttribute']('data-change-id',_0x32e86f,_0x1f7e81),_0x4e6c9a['addClass']('ck-revision-history-root-'+_0x1624dd['type'],_0x1f7e81),this['activeChange']==_0x1624dd&&_0x4e6c9a['addClass']('ck-revision-history-root--active',_0x1f7e81);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x5a62e0=>'revision-comment:'+_0x5a62e0,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1c29d0=>'revision-suggestion:'+_0x1c29d0,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x17e8d4=>({'name':'suggestion:'+_0x17e8d4,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5e0a38=>{const _0x492f49=_0x5e0a38['markerName']['split'](':')[0x1];return'insertion'!=_0x492f49&&'deletion'!=_0x492f49?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x492f49]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x4f6569,_0x1c5607,_0x5a262e)=>{const _0x366ad9=_0x5a262e['mapper']['markerNameToElements'](_0x1c5607['markerName']);if(_0x366ad9){for(const _0x28161c of _0x366ad9)_0x28161c['is']('uiElement')&&(_0x5a262e['mapper']['unbindElementFromMarkerName'](_0x28161c,_0x1c5607['markerName']),_0x5a262e['writer']['remove'](_0x28161c));}},{'priority':'high'});}['_getChangeFromId'](_0x516bd6){return this['_changeIdToChange']['get'](_0x516bd6);}['_getViewForChange'](_0x1e224c){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x1e224c),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x3e9aa6,_0x2bbb65,_0x1a1c0f,_0x37fe40)=>{_0x37fe40&&this['_balloon']['remove'](_0x37fe40),_0x1a1c0f&&(this['_balloon']['add']({'view':_0x1a1c0f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x557df2=this['editor']['editing'],_0x55d994=this['_getChangeFromId'](_0x1a1c0f['changeId']);let _0x26d9ea;if(_0x55d994['data']['isOnRoot']){const _0x34ce03=_0x557df2['view']['getDomRoot'](_0x55d994['rootName']);_0x26d9ea=Array['from'](_0x34ce03['getClientRects']());}else{const _0x26ac99=this['editor']['model']['markers']['get']('revision:'+_0x1a1c0f['changeId']);_0x26d9ea=Array['from'](_0x557df2['mapper']['markerNameToElements'](_0x26ac99['name']))['map'](_0x1b7fae=>_0x557df2['view']['domConverter']['mapViewToDom'](_0x1b7fae))['map'](_0x20eb8b=>Array['from'](_0x20eb8b['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x26d9ea[0x0];return _0x26d9ea['find'](_0x6ee466=>_0x6ee466['top']-0x3<=this['_activeViewTarget']['y']&&_0x6ee466['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x6ee466['left']-0x3<=this['_activeViewTarget']['x']&&_0x6ee466['right']+0x3>=this['_activeViewTarget']['x'])||_0x26d9ea[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1096d0,_0x2c6d88,_0xbc8ac6,_0x2fc9ee)=>{this['activeView']=_0xbc8ac6?this['_getViewForChange'](_0xbc8ac6):null,this['editor']['model']['change'](()=>{const _0x2a2a6f=this['editor']['editing'];_0x2fc9ee&&(_0x2fc9ee['data']['isOnRoot']?_0x2a2a6f['view']['change'](_0x85714c=>{_0x85714c['removeClass']('ck-revision-history-root--active',_0x2a2a6f['view']['document']['getRoot'](_0x2fc9ee['rootName']));}):_0x2a2a6f['reconvertMarker']('revision:'+_0x2fc9ee['id'])),_0xbc8ac6&&(_0xbc8ac6['data']['isOnRoot']?_0x2a2a6f['view']['change'](_0x576f20=>{_0x576f20['addClass']('ck-revision-history-root--active',_0x2a2a6f['view']['document']['getRoot'](_0xbc8ac6['rootName']));}):_0x2a2a6f['reconvertMarker']('revision:'+_0xbc8ac6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x414585,_0x195d76)=>{if(this['activeChange'])return;const _0x330b32=this['_findChangeIdFromDomTarget'](_0x195d76['target']),_0x77f411=this['_changeIdToChange']['get'](_0x330b32);_0x77f411?(this['_activeViewTarget']={'x':_0x195d76['domEvent']['x'],'y':_0x195d76['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x77f411)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x151c33,_0x135dcf)=>{const _0x592ae0=this['_findChangeIdFromDomTarget'](_0x135dcf['target']),_0x4a7065=this['_changeIdToChange']['get'](_0x592ae0);_0x4a7065?(this['_activeViewTarget']={'x':_0x135dcf['domEvent']['x'],'y':_0x135dcf['domEvent']['y']},_0x4a7065===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4a7065):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x51a42f){do{const _0x3b5358=_0x51a42f['getAttribute']('data-change-id');if(_0x3b5358)return _0x3b5358;_0x51a42f=_0x51a42f['parent'];}while(_0x51a42f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5a9b6a=>{for(const _0xf6eba2 of this['editor']['model']['markers'])_0x5a9b6a['removeMarker'](_0xf6eba2);});}}function _t(_0x33b276,_0x183f02){return(_0x154d12,_0x9c4f21,_0x5a839d)=>{if(!_0x5a839d['consumable']['test'](_0x9c4f21['markerRange'],_0x154d12['name']))return;const _0x2d2bab=_0x9c4f21['markerRange']['getWalker'](),_0x360a1c=_0x9c4f21['markerRange']['start'],_0x165a4a=_0x33b276['model']['schema'];let _0x3da140=null,_0x4d446a=null,_0x168d3e=!0x1,_0x2ba3eb=!0x1;for(const _0x3bac81 of _0x2d2bab){const _0x3eab76=_0x3bac81['item'];_0x168d3e=_0x168d3e||_0x165a4a['isContent'](_0x3eab76);const _0x1ec986=_0x5a839d['mapper']['toViewElement'](_0x3eab76);if(_0x1ec986&&_0x1ec986['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3bac81['type']&&(_0x165a4a['isBlock'](_0x3eab76)&&!_0x165a4a['isLimit'](_0x3eab76)&&(_0x3eab76['nextSibling']||_0x360a1c['isAtEnd']?_0x3da140&&_0x3da140['parent']==_0x3eab76||(_0x3da140=_0x3eab76,_0x14c8bf(_0x3bac81['previousPosition']),_0x2ba3eb=!0x0):_0x4d446a=_0x4d446a||_0x3bac81['previousPosition']));}function _0x14c8bf(_0x27b0a7){const _0xaa6158=_0x5a839d['mapper']['toViewPosition'](_0x27b0a7),_0x32c71e=_0x5a839d['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x183f02});_0x5a839d['writer']['insert'](_0xaa6158,_0x32c71e),_0x5a839d['mapper']['bindElementToMarker'](_0x32c71e,_0x9c4f21['markerName']);}_0x168d3e||_0x2ba3eb||!_0x4d446a||_0x14c8bf(_0x4d446a);};}class RestoreRevisionCommand extends _0x5bba97{constructor(_0x274e38){super(_0x274e38);const _0x1b1855=_0x274e38['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1b1855,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1b1855,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5a3bc2=this['editor'],_0x15fd35=_0x5a3bc2['plugins']['get'](RevisionViewer),_0x3ceb8d=_0x15fd35['isReady']?_0x15fd35['diff']['newRevisionId']:null;_0x5a3bc2['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3ceb8d);}['refresh'](){const {isReady:_0x7bae4,isEnabled:_0xcaa085,repository:_0x464c79,diff:_0xbc3872}=this['editor']['plugins']['get'](RevisionViewer),_0x2915f0=_0xbc3872&&_0x464c79['getLaterVisibleRevision'](_0xbc3872['newRevisionId']);this['isEnabled']=_0x7bae4&&_0xcaa085&&Boolean(_0x2915f0);}}class ShowChangeCommand extends _0x5bba97{['_step'];constructor(_0xa5be2d,{direction:_0x44f5fb}){super(_0xa5be2d);const _0x1d5ef2=_0xa5be2d['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x44f5fb?0x1:-0x1,this['listenTo'](_0x1d5ef2,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d5ef2,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1d5ef2,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xcb0157=this['editor'],_0x336f82=_0xcb0157['plugins']['get'](RevisionViewer),{isNavigationMode:_0x8073a1,currentChangeNumber:_0x2f9fb9}=_0x336f82;let _0x113c35;if(_0x336f82['activeChange']=_0x8073a1?_0x336f82['diff']['changes']['get'](_0x2f9fb9+this['_step']):_0x336f82['diff']['changes']['first'],_0x336f82['activeChange']['data']['isOnRoot'])_0x113c35=_0xcb0157['editing']['view']['getDomRoot'](_0x336f82['activeChange']['rootName']);else{const _0x5eafa8=_0xcb0157['model']['markers']['get']('revision:'+_0x336f82['activeChange']['id']);_0x113c35=_0x1827f5(_0xcb0157['editing'],_0x5eafa8);}_0x1f3b6f({'target':_0x113c35,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x32a616,currentChangeNumber:_0x21bac1,numberOfChanges:_0x255db5,isReady:_0xbfe9ee,isEnabled:_0x27abb4}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x27abb4&&_0xbfe9ee&&_0x255db5)&&(!_0x32a616||(0x1===this['_step']?_0x21bac1<_0x255db5-0x1:_0x21bac1>0x0));}}class ChangesNavigationView extends _0x1d5c9d{constructor(_0x4b3c5c){super(_0x4b3c5c);const _0x4a6f3b=this['bindTemplate'],_0x481962=new _0x4e9658(_0x4b3c5c),_0x394ec5=new _0x4e9658(_0x4b3c5c);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0x17b9b9,_0x20e8f0)=>_0x17b9b9&&_0x20e8f0>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1b014e,_0x18eb9e,_0x7fb9b0,_0x2ab323)=>{if(!_0x1b014e)return ft(_0x4b3c5c,'Loading...');if(!_0x7fb9b0)return ft(_0x4b3c5c,'No\x20changes');const _0x242b5c=ft(_0x4b3c5c,'NUMBER_OF_CHANGES',_0x7fb9b0);return _0x2ab323?ft(_0x4b3c5c,'X_OF_Y_CHANGES',[_0x18eb9e+0x1,_0x7fb9b0]):_0x242b5c;}),_0x481962['set']({'label':ft(_0x4b3c5c,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x284f98}),_0x394ec5['set']({'label':ft(_0x4b3c5c,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5976d2}),_0x481962['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x394ec5['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x481962['on']('execute',()=>this['fire']('execute','backward')),_0x394ec5['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x4a6f3b['if']('_isStatusLabelVisible','ck-hidden',_0x39dc4b=>!_0x39dc4b)]},'children':[{'text':_0x4a6f3b['to']('isNavigationMode',_0x46b144=>_0x46b144?ft(_0x4b3c5c,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x4b3c5c,'Total')+':\x20')}]},{'text':_0x4a6f3b['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x481962,_0x394ec5]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x41f403{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1e163c=this['editor']['editing']['view'];_0x1e163c['change'](_0x4caa3d=>{for(const _0x35d92d of _0x1e163c['document']['roots'])_0x4caa3d['addClass'](yt,_0x35d92d);});}['hide'](){const _0x229e9a=this['editor']['editing']['view'];_0x229e9a['change'](_0x41bce0=>{for(const _0x32f22a of _0x229e9a['document']['roots'])_0x41bce0['removeClass'](yt,_0x32f22a);});}}class RevisionViewerUI extends _0x41f403{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x73fafd=this['editor'],_0x558857=_0x73fafd['plugins']['get'](RevisionViewer),_0x2ca01a=_0x73fafd['plugins']['get'](RevisionViewerLoadingOverlay);_0x73fafd['ui']['componentFactory']['add']('exitToEditing',_0x18ec09=>{const _0x49dfb1=new _0x4e9658(_0x18ec09);return _0x49dfb1['set']({'label':ft(_0x18ec09,'Back\x20to\x20editing'),'icon':_0x26b685,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x49dfb1,'execute',()=>{_0x73fafd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x49dfb1;}),_0x73fafd['ui']['componentFactory']['add']('restoreRevision',_0x1da2da=>{const _0x4cb3f6=new _0x4e9658(_0x1da2da);return _0x4cb3f6['set']({'label':ft(_0x1da2da,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4cb3f6['bind']('isEnabled')['to'](_0x73fafd['commands']['get']('restoreRevision')),this['listenTo'](_0x4cb3f6,'execute',()=>_0x73fafd['execute']('restoreRevision')),_0x4cb3f6;}),_0x73fafd['ui']['componentFactory']['add']('changesNavigation',_0x20a4a8=>{const _0x4120e7=new ChangesNavigationView(_0x20a4a8),_0x32a7c9=_0x73fafd['commands']['get']('showPreviousChange'),_0xf01be8=_0x73fafd['commands']['get']('showNextChange');return _0x4120e7['bind']('isBackwardNavigationEnabled')['to'](_0x32a7c9,'isEnabled'),_0x4120e7['bind']('isForwardNavigationEnabled')['to'](_0xf01be8,'isEnabled'),_0x4120e7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x558857),this['listenTo'](_0x4120e7,'execute',(_0x191622,_0x2a25c8)=>{_0x73fafd['execute']('forward'===_0x2a25c8?'showNextChange':'showPreviousChange');}),_0x4120e7;}),_0x2ca01a['show'](),_0x558857['on']('change:isReady',(_0x240162,_0x58bf85,_0xf3a652)=>{_0xf3a652?_0x2ca01a['hide']():_0x2ca01a['show']();});}}class RevisionNameView extends _0x5b487d{['_resizeObserver']=null;constructor(_0x554ab8,_0x2fa6d3){super(_0x554ab8,_0x2fa6d3);const _0x5ae292=this['bindTemplate'];this['set']({'label':ft(_0x554ab8,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x554ab8,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5ae292['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x938bc0(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x2a3480=this['fieldView']['element'];this['_tooltipString']=_0x2a3480['scrollWidth']>_0x2a3480['clientWidth']&&_0x2a3480['value']||'';}}class RevisionAuthorView extends _0x1d5c9d{constructor(_0xdaf5db,_0x4f672e,_0x86e4a8){super(_0xdaf5db);const _0x4accec=new nt();_0x4accec['set']({'content':_0x498d03,'viewBox':'0\x200\x2011\x2010'});const _0x5d1635=['ck','ck-revision-history-sidebar__revision-author'];_0x86e4a8&&_0x5d1635['push']('ck-revision-history-sidebar__revision-author_creator');const _0x136a74=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0xdaf5db,_0x86e4a8?'Revision\x20creator':'Revision\x20author')},'children':[_0x4accec,_0x4f672e['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x5d1635},'children':_0x136a74});}}function Rt(_0xb1e204,_0x5d07c2){const _0x381c5c=_0xb1e204['bindTemplate'],_0x5031ed=_0xb1e204['locale'],_0x4c98b6=_0x47df31(_0x5031ed);_0x4c98b6['panelPosition']='sw';const _0x383914=function(_0x271d4e,_0x566d07){const _0x3c927b=function(_0x4a5d74,_0x5b77ed){const _0x44bc24=_0x4a5d74['locale'],_0x25a58f={'Compare\x20against\x20selected':ft(_0x44bc24,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x44bc24,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x44bc24,'Restore\x20this\x20revision')};return _0x5b77ed['map'](_0x4d6c0f=>{const _0x2c9a49=_0x25a58f[_0x4d6c0f['name']];return _0x2c9a49&&_0x2c9a49!==_0x4d6c0f['name']&&(_0x4d6c0f['name']=_0x2c9a49),_0x4d6c0f;});}(_0x271d4e,_0x566d07),_0x5ab883=new _0x4ec909();for(const _0xf9ea67 of _0x3c927b){const _0x34e07e={'type':'button','model':new rt({'label':_0xf9ea67['name'],'class':_0xf9ea67['class'],'withText':!0x0,'role':'menuitem','_action':_0xf9ea67['action']})};_0x34e07e['model']['bind']('isEnabled')['to'](_0x271d4e,'isActionsDropdownOpen',_0x12abc2=>'function'!=typeof _0xf9ea67['isEnabled']||(!_0x12abc2||_0xf9ea67['isEnabled'](_0x271d4e))),_0x5ab883['add'](_0x34e07e);}return _0x5ab883;}(_0xb1e204,_0x5d07c2);return _0xb1e204['bind']('isActionsDropdownOpen')['to'](_0x4c98b6,'isOpen'),_0x4c98b6['buttonView']['set']({'label':ft(_0x5031ed,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x4836c2}),_0x4c98b6['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x381c5c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x381c5c['to'](_0x2ae93c=>_0x2ae93c['stopPropagation']())}}),_0x4c98b6['on']('execute',_0xebcf9c=>{_0xb1e204['isReady']&&'function'==typeof _0xebcf9c['source']['_action']&&_0xebcf9c['source']['_action'](_0xb1e204);}),ot(_0x4c98b6,_0x383914,{'role':'menu'}),_0x4c98b6['listenTo'](_0xb1e204,'change:isActionsDropdownOpen',(_0x45029e,_0x5c1694,_0xe6659f)=>{if(_0xe6659f)for(const _0x47b55c of _0x4c98b6['listView']['items']){const _0x130461=_0x47b55c['children']['first'],_0xca9476=_0x5d07c2['find'](_0x3831d6=>_0x3831d6['action']===_0x130461['_action'])['isVisible'];_0x47b55c['isVisible']=void 0x0===_0xca9476||_0xca9476(_0xb1e204);}}),_0x4c98b6;}class RevisionView extends/* #__PURE__ -- @preserve */
27
- _0x4def72(_0x1d5c9d){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1ebfce,_0x41f43a,_0x340af3,_0x20fc3e){super(_0x1ebfce);const _0xc57351=this['bindTemplate'],_0x706dbc=function(_0x445400,_0x44a851){const _0x1a6035=Array['from'](_0x44a851['authors'])['filter'](_0x68fe3e=>_0x68fe3e!=_0x44a851['creator']);return _0x44a851['creator']&&_0x1a6035['unshift'](_0x44a851['creator']),_0x1a6035['map'](_0x53aa64=>new RevisionAuthorView(_0x445400,_0x53aa64,_0x53aa64==_0x44a851['creator']));}(_0x1ebfce,_0x41f43a);this['id']=_0x41f43a['id'],this['_revision']=_0x41f43a,this['_requireRevisionName']=_0x20fc3e,this['bind']('name','createdAt')['to'](_0x41f43a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x30d4cc=>{return _0x576009=_0x1ebfce['uiLanguage'],(_0x4b932a=_0x30d4cc)['toLocaleDateString'](_0x576009,{'month':'long','day':'numeric'})+',\x20'+_0x4b932a['toLocaleTimeString'](_0x576009,{'hour':'numeric','minute':'numeric'});var _0x576009,_0x4b932a;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x1ebfce,_0x58f4b5),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x305585=>_0x305585||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0xb4e3b0,_0xe1ff74)=>_0xb4e3b0&&_0xe1ff74),this['revisionActionsView']=_0x340af3&&_0x340af3['length']?Rt(this,_0x340af3):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xc57351['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xc57351['if']('isEnabled','ck-disabled',_0x1ff437=>!_0x1ff437),_0xc57351['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xc57351['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xc57351['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0xc57351['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x706dbc}]},this['revisionActionsView']],'on':{'click':_0xc57351['to'](_0x212b59=>{_0x212b59['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x17abcc=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x17abcc,'change',()=>{this['_requireRevisionName']&&!_0x17abcc['value']||this['fire']('setName',{'id':this['id'],'name':_0x17abcc['value']}),_0x17abcc['value']||(_0x17abcc['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x19e6eb,_0x406889){const _0x5b5a3c=vt['fromJSDate'](_0x19e6eb)['setLocale'](_0x406889),_0x5f0100=vt['local'](),_0x469baf=_0x5f0100['minus']({'days':0x1})['startOf']('day');let _0x4e88f9,_0x5c0dbd;return _0x5b5a3c['hasSame'](_0x5f0100,'day')?(_0x4e88f9=_0x5b5a3c['startOf']('day')['toJSDate'](),_0x5c0dbd=_0x5b5a3c['toRelativeCalendar']()):_0x5b5a3c['hasSame'](_0x469baf,'day')?(_0x4e88f9=_0x469baf['toJSDate'](),_0x5c0dbd=_0x5b5a3c['toRelativeCalendar']()):_0x5b5a3c['hasSame'](_0x5f0100,'week')?(_0x4e88f9=_0x5b5a3c['startOf']('week')['toJSDate'](),_0x5c0dbd=_0x5b5a3c['weekdayLong']||''):_0x5b5a3c['hasSame'](_0x5f0100,'year')?(_0x4e88f9=_0x5b5a3c['startOf']('month')['toJSDate'](),_0x5c0dbd=_0x5b5a3c['monthLong']||''):(_0x4e88f9=_0x5b5a3c['startOf']('year')['toJSDate'](),_0x5c0dbd=String(_0x5b5a3c['year'])),{'startDate':_0x4e88f9,'localizedPeriodName':_0x5c0dbd};}class RevisionsSidebarTimePeriodView extends _0x1d5c9d{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x318ea5,_0x488c02,_0x1f516c,_0x28bf70){super(_0x318ea5);const _0x28bffe=bt(_0x488c02,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x488c02,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x1f516c,this['_requireRevisionName']=_0x28bf70,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0x28bffe}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2dc1d3){const _0x1d6254=new RevisionView(this['locale'],_0x2dc1d3,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1d6254);}['removeRevision'](_0x122490){const _0x254f81=this['revisionViews']['find'](_0x4a06e5=>_0x4a06e5['id']===_0x122490['id']);this['revisionViews']['remove'](_0x254f81);}}class RevisionsSidebarHeaderView extends _0x1d5c9d{constructor(_0x4d6364){super(_0x4d6364);const _0x36026c=new nt();_0x36026c['content']=_0x4718bb,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x36026c,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x4d6364,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x1d5c9d{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x23298d,_0x1a1296,_0x18ca20,_0xae41d6){super(_0x23298d);const _0x163670=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1a1296,this['_revisionActions']=_0x18ca20,this['_requireRevisionName']=_0xae41d6,this['on']('select',(_0x2606e0,_0x4fd958)=>{this['fire']('revisionSelected',_0x4fd958);}),this['on']('setName',(_0xead834,_0x2856c2)=>{this['fire']('revisionSetName',_0x2856c2);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x23298d),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x163670['if']('isEnabled','ck-disabled',_0x4d62b2=>!_0x4d62b2)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x35a9bf of this['_revisions'])this['_addRevision'](_0x35a9bf);this['_revisions']['on']('add',(_0x32f5df,_0x1495bf)=>{this['_addRevision'](_0x1495bf);}),this['_revisions']['on']('remove',(_0x43a5ba,_0x3b1e91)=>{this['_removeRevision'](_0x3b1e91);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xfbf8b3=>_0xfbf8b3['revisionViews']['map'](_0xa914ee=>_0xa914ee))['flat']();}['selectRevision'](_0x48f1fd){for(const _0x8d6e8e of this['revisionViews'])_0x48f1fd&&_0x48f1fd['id']===_0x8d6e8e['id']?_0x8d6e8e['select']():_0x8d6e8e['deselect']();}['highlightRevisions'](_0x5cb9c0){for(const _0x513749 of this['revisionViews'])_0x5cb9c0['some'](({id:_0x3b1632})=>_0x3b1632===_0x513749['id'])?_0x513749['highlight']():_0x513749['unhighlight']();}['_addRevision'](_0x2a3483){const _0x3406ad=bt(_0x2a3483['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5bd82b=this['_getTimePeriodViewByStartDate'](_0x3406ad);_0x5bd82b||(_0x5bd82b=new RevisionsSidebarTimePeriodView(this['locale'],_0x3406ad,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5bd82b)),_0x5bd82b['addRevision'](_0x2a3483);}['_removeRevision'](_0x163782){const _0x50dae9=bt(_0x163782['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x50dae9)['removeRevision'](_0x163782);}['_getTimePeriodViewByStartDate'](_0xcd4bd8){return this['timePeriodViews']['find'](_0x235f1d=>_0x235f1d['startDate']['getTime']()===_0xcd4bd8['getTime']());}}class RevisionsSidebar extends _0x41f403{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x3f7e8f,uid as _0x13bc90,Collection as _0x2d3a61,logWarning as _0x14e875,FocusTracker as _0x5dcc57,KeystrokeHandler as _0x45f686,scrollViewportToShowTarget as _0x39f26f,ResizeObserver as _0x21024a,ElementReplacer as _0x3bda9b,CKEditorError as _0x5e0c91}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2a882c,set as _0x407876,unset as _0x23291e,isEqual as _0x1d7c60}from'es-toolkit/compat';import{Plugin as _0x20daab,PendingActions as _0xd00ec3,Command as _0x1a1b5b,ElementApiMixin as _0xa4dcc7,Editor as _0xb70b37}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0xf95694,getMarkerDomElement as _0x49adfb,ConfirmMixin as _0x526cd1,sanitizeEditorConfig as _0x4eb3e3}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x175b4f,ViewAttributeElement as _0x1abd8e,ViewEmptyElement as _0x581a07,ViewRawElement as _0x5b2cfd,ViewUIElement as _0x47a5a3,ViewDocumentFragment as _0x4cca8f,ViewText as _0x1b99a8,ViewElement as _0x9bdf37,ModelElement as _0x587783,ModelRange as _0x1f7a25,ModelPosition as _0x12b3d0,ModelDocumentFragment as _0x23d676,ModelText as _0xfa86cb}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x1681be,IconChevronUp as _0x5053dd,IconChevronDown as _0x2b02d,IconUndo as _0x204b25,IconUser as _0xabede7,IconThreeVerticalDots as _0x592620}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x59269f,View as _0x5c0571,submitHandler as _0x207f90,LabeledFieldView as _0x46d49f,createLabeledInputText as _0x515ec4,createDropdown as _0x16d7f1,ListView as _0x5a819b,ListItemView as _0x13a593,ButtonView as _0x48a0f1,MenuBarMenuView as _0x20b172,MenuBarMenuListView as _0x30b9b5,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
24
+ _0x3f7e8f(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1fa759){super(),this['id']=_0x1fa759['id']||_0x13bc90(),this['creator']=_0x1fa759['creator']||null,this['authors']=_0x1fa759['authors']||[],this['diffData']=_0x1fa759['diffData']||null,this['toVersion']=_0x1fa759['toVersion']||0x0,this['fromVersion']=_0x1fa759['fromVersion']||0x0,this['set']('name',_0x1fa759['name']||''),this['set']('createdAt',_0x1fa759['createdAt']||new Date()),this['set']('attributes',_0x1fa759['attributes']||{});}['setName'](_0x2b8584){this['_update']({'name':_0x2b8584});}['setAttribute'](_0x4e7589,_0x19bc6b){const _0x46f420=_0x2a882c(this['attributes']);_0x407876(_0x46f420,_0x4e7589,_0x19bc6b),this['_update']({'attributes':_0x46f420});}['removeAttribute'](_0x42b65b){const _0x59a0d6=_0x2a882c(this['attributes']);_0x23291e(_0x59a0d6,_0x42b65b),this['_update']({'attributes':_0x59a0d6});}['_update'](_0x1256e9,_0x5eb184=!0x1){let _0x24aef4=!0x1;const _0x12ff43={'id':this['id']},_0x430317=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x199072 of _0x430317){const _0x301fc3=_0x1256e9[_0x199072];void 0x0!==_0x301fc3&&_0x301fc3!==this[_0x199072]&&(this[_0x199072]=_0x301fc3,_0x12ff43[_0x199072]=_0x301fc3,_0x24aef4=!0x0);}_0x24aef4&&(_0x12ff43['authors']&&(_0x12ff43['authorsIds']=_0x12ff43['authors']['map'](_0x24a95f=>_0x24a95f['id']),delete _0x12ff43['authors']),this['fire']('_update',_0x12ff43,_0x5eb184));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2a36b2=>_0x2a36b2['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x20daab{['_revisions'];static get['requires'](){return[_0xf95694];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x101366){super(_0x101366),this['_revisions']=new _0x2d3a61();}['afterInit'](){!async function(_0x30b789){const _0x3cb577=_0x35ba46([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x574bd2=0xeb829,_0x21dbc2=0x359e09b0,_0x300ddf=0x35998210^_0x21dbc2,_0xb9adeb=window[_0x35ba46([0x44,0x61,0x74,0x65])][_0x35ba46([0x6e,0x6f,0x77])](),_0x552209=_0x30b789[_0x35ba46([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1a03e2=new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a67b1=>{_0x552209[_0x35ba46([0x6f,0x6e,0x63,0x65])](_0x35ba46([0x72,0x65,0x61,0x64,0x79]),_0x4a67b1);}),_0x273ecf={[_0x35ba46([0x6b,0x74,0x79])]:_0x35ba46([0x45,0x43]),[_0x35ba46([0x75,0x73,0x65])]:_0x35ba46([0x73,0x69,0x67]),[_0x35ba46([0x63,0x72,0x76])]:_0x35ba46([0x50,0x2d,0x32,0x35,0x36]),[_0x35ba46([0x78])]:_0x35ba46([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x35ba46([0x79])]:_0x35ba46([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x35ba46([0x61,0x6c,0x67])]:_0x35ba46([0x45,0x53,0x32,0x35,0x36])},_0x32bd4d=_0x552209[_0x35ba46([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x35ba46([0x67,0x65,0x74])](_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x316ea0(){let _0xfeb1d5,_0x50c404=null,_0x49656a=null;try{if(_0x32bd4d==_0x35ba46([0x47,0x50,0x4c]))return _0x35ba46([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xfeb1d5=_0x3b459e(),!_0xfeb1d5)return _0x35ba46([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xfeb1d5[_0x35ba46([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x49656a=_0x38a572(_0xfeb1d5[_0x35ba46([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xfeb1d5[_0x35ba46([0x6a,0x74,0x69])])),await _0x57cad8()?_0xc03bdc()?_0x136a75()?_0x35ba46([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x598029()?(_0xfeb1d5[_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x35ba46([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x50c404=_0x5159a0(_0x35ba46([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a737d()):_0x35ba46([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x35ba46([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x35ba46([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x35ba46([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x136a75(){const _0x21f12c=[_0x35ba46([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x35ba46([0x74,0x72,0x69,0x61,0x6c])][_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfeb1d5[_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xb9adeb/0x3e8:0xe10*_0x300ddf;return _0xfeb1d5[_0x35ba46([0x65,0x78,0x70])]<_0x21f12c;}function _0xc03bdc(){const _0x177c35=_0xfeb1d5[_0x35ba46([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x177c35)return!0x1;if(_0x177c35[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x2a])))return!0x0;if(_0x177c35[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x52,0x48])))return!0x0;if(_0x177c35[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x52,0x52,0x48]))){if(_0x13e881())return!0x0;if(_0x3b2a32()||_0x2e6b80())return!0x0;}return!0x1;}function _0x598029(){const _0x3028b7=_0xfeb1d5[_0x35ba46([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3028b7||0x0==_0x3028b7[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x548336}=new URL(window[_0x35ba46([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3028b7[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548336))return!0x0;const _0xc9b9cf=_0x548336[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e]));return _0x3028b7[_0x35ba46([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e9cfb=>_0x4e9cfb[_0x35ba46([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x35ba46([0x2a])))[_0x35ba46([0x6d,0x61,0x70])](_0x13ad5c=>_0x13ad5c[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e])))[_0x35ba46([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b128d=>_0x5b128d[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xc9b9cf[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x35ba46([0x6d,0x61,0x70])](_0x3bbf9a=>Array(_0xc9b9cf[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3bbf9a[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x35ba46([0x66,0x69,0x6c,0x6c])](_0x3bbf9a[0x0]===_0x35ba46([0x2a])?_0x35ba46([0x2a]):'')[_0x35ba46([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3bbf9a))[_0x35ba46([0x73,0x6f,0x6d,0x65])](_0x4d4f14=>_0xc9b9cf[_0x35ba46([0x65,0x76,0x65,0x72,0x79])]((_0x48d300,_0x50a4d2)=>_0x4d4f14[_0x50a4d2]===_0x48d300||_0x4d4f14[_0x50a4d2]===_0x35ba46([0x2a])));}function _0x5a737d(){return _0x50c404&&_0x49656a?new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x243eaf,_0x1371eb)=>{_0x50c404[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x243eaf,_0x1371eb),_0x49656a[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x1adcbd=>{_0x1adcbd!=_0x35ba46([0x56,0x61,0x6c,0x69,0x64])&&_0x243eaf(_0x1adcbd);},_0x1371eb);}):_0x50c404||_0x49656a||_0x35ba46([0x56,0x61,0x6c,0x69,0x64]);}}function _0x38a572(_0x169452,_0x5aab95){return new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x149137=>{if(_0x2ae996())return _0x149137(_0x35ba46([0x56,0x61,0x6c,0x69,0x64]));_0xb30fd8(),_0x552209[_0x35ba46([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x35ba46([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x11af57=!0x1;const _0x1e5758=_0x13bc90();function _0xbcbae(_0x308e7e){return!!_0x308e7e&&(typeof _0x308e7e===_0x35ba46([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x308e7e===_0x35ba46([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x308e7e[_0x35ba46([0x74,0x68,0x65,0x6e])]===_0x35ba46([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x308e7e[_0x35ba46([0x63,0x61,0x74,0x63,0x68])]===_0x35ba46([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x462000(_0x5d1ac5){_0x3714f1(_0x5d1ac5)[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x35f4b7=>{if(!_0x35f4b7||_0x35f4b7[_0x35ba46([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x35ba46([0x6f,0x6b]))return _0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1cbb92(_0x2b834b(_0x1e5758+_0x5aab95))!=_0x35f4b7[_0x35ba46([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x35ba46([0x56,0x61,0x6c,0x69,0x64]);})[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x11c269=>(_0x163431(),_0x11c269),()=>{const _0x3efc2a=_0x5a5ef1();return null==_0x3efc2a?(_0x163431(),_0x35ba46([0x56,0x61,0x6c,0x69,0x64])):_0x35ba46(_0xb9adeb-_0x3efc2a>(0x11928db0^_0x21dbc2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x149137)[_0x35ba46([0x63,0x61,0x74,0x63,0x68])](()=>{_0x149137(_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x19d123=0x35a8e730^_0x21dbc2;function _0x163431(){const _0x7b0266=_0x35ba46([0x6c,0x6c,0x63,0x74,0x2d])+_0x1cbb92(_0x2b834b(_0x169452)),_0x2360f7=_0x41ce1b(_0x1cbb92(window[_0x35ba46([0x4d,0x61,0x74,0x68])][_0x35ba46([0x63,0x65,0x69,0x6c])](_0xb9adeb/_0x19d123)));window[_0x35ba46([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x35ba46([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7b0266,_0x2360f7);}function _0x5a5ef1(){const _0x24ce51=_0x35ba46([0x6c,0x6c,0x63,0x74,0x2d])+_0x1cbb92(_0x2b834b(_0x169452)),_0x322c49=window[_0x35ba46([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x35ba46([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x24ce51);return _0x322c49?window[_0x35ba46([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x41ce1b(_0x322c49),0x10)*_0x19d123:null;}function _0x3714f1(_0x40459a){return new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5bd2d7,_0xa1b6b3)=>{_0x40459a[_0x35ba46([0x74,0x68,0x65,0x6e])](_0x5bd2d7,_0xa1b6b3),window[_0x35ba46([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xa1b6b3,0x359fdd70^_0x21dbc2);});}}_0x552209[_0x35ba46([0x6f,0x6e])](_0x35ba46([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5c9ab6,_0x86cc64)=>{if(_0x86cc64[0x0]!=_0x169452)return _0x149137(_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x86cc64[0x1]={..._0x86cc64[0x1],[_0x35ba46([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1e5758};},{[_0x35ba46([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x35ba46([0x68,0x69,0x67,0x68])}),_0x552209[_0x35ba46([0x6f,0x6e])](_0x35ba46([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x303c07=>{_0xbcbae(_0x303c07[_0x35ba46([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x11af57=!0x0,_0x462000(_0x303c07[_0x35ba46([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x35ba46([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x35ba46([0x6c,0x6f,0x77])}),_0x1a03e2[_0x35ba46([0x74,0x68,0x65,0x6e])](()=>{_0x11af57||_0x149137(_0x35ba46([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2ae996(){return _0x552209[_0x35ba46([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x35ba46([0x76,0x69,0x65,0x77])][_0x35ba46([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x35ba46([0x61,0x75,0x74,0x6f]);}function _0xb30fd8(){_0x552209[_0x35ba46([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x35ba46([0x76,0x69,0x65,0x77])][_0x35ba46([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x35ba46([0x61,0x75,0x74,0x6f]);}}function _0x5159a0(_0x294eca){const _0x22a79c=[new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xdc6d02=>setTimeout(_0xdc6d02,0x3597377c^_0x21dbc2)),_0x1a03e2[_0x35ba46([0x74,0x68,0x65,0x6e])](()=>new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e2b27=>{const _0x568505=0x359e09b7^_0x21dbc2,_0x224b07=_0x30b789[_0x35ba46([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x5f45fd(){_0x224b07[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x568505&&_0x5e2b27();}_0x5f45fd(),_0x224b07[_0x35ba46([0x6f,0x6e])](_0x35ba46([0x61,0x64,0x64]),_0x5f45fd);})),new window[(_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d5b78=>{function _0xe13dae(){for(const _0x1fa544 in window)if(window[_0x35ba46([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x35ba46([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1fa544))&&window[_0x1fa544]==_0x574bd2)return _0x3d5b78();_0x552209[_0x35ba46([0x73,0x74,0x61,0x74,0x65])]!=_0x35ba46([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x35ba46([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xe13dae,0x359e1a38^_0x21dbc2);}_0x25c932(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0xe13dae();})];return window[_0x35ba46([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x35ba46([0x72,0x61,0x63,0x65])](_0x22a79c)[_0x35ba46([0x74,0x68,0x65,0x6e])](()=>_0x294eca);}async function _0x2fd58c(){if(await _0x1a03e2,_0x25c932(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x46d478=_0x30b789[_0x35ba46([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5ad2a5=_0x30b789[_0x35ba46([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x46d478[_0x35ba46([0x69,0x64])]),_0x4dcd27=_0x201a2c(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4dcd27[_0x35ba46([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x46d478['id'],_0x5ad2a5?_0x5ad2a5['id']:null,!0x0),_0x4dcd27[_0x35ba46([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4dcd27[_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4dcd27[_0x35ba46([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x28a084,void(_0x4dcd27[_0x35ba46([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x28a084);}if(_0x25c932(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x424f92=_0x201a2c(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x424f92[_0x35ba46([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x424f92[_0x35ba46([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x424f92[_0x35ba46([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x28a084,_0x424f92[_0x35ba46([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x28a084;}_0x552209[_0x35ba46([0x6d,0x6f,0x64,0x65,0x6c])][_0x35ba46([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x28a084,_0x552209[_0x35ba46([0x6d,0x6f,0x64,0x65,0x6c])][_0x35ba46([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x28a084,_0x552209[_0x35ba46([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x35ba46([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x13e881(){return _0x25c932(_0x35ba46([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x201a2c(_0x35ba46([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x35ba46([0x73,0x74,0x61,0x74,0x65])]==_0x35ba46([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3b2a32(){return _0x25c932(_0x35ba46([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x2e6b80(){return _0x25c932(_0x35ba46([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xa100c9(_0x18f149){const _0x1aaa73=_0x443e54();_0x552209[_0x1aaa73]=_0x35ba46([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x18f149,_0x18f149[_0x35ba46([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x35ba46([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x443e54()]=_0x574bd2),_0x18f149!=_0x35ba46([0x56,0x61,0x6c,0x69,0x64])&&_0x2fd58c();}function _0x443e54(){const _0x5d6fe0=window[_0x35ba46([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x35ba46([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x35ba46([0x6e,0x6f,0x77])]())[_0x35ba46([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x35ba46([0x2e]),'');let _0x135e89=_0x35ba46([0x76]);for(let _0x38b2b8=0x0;_0x38b2b8<_0x5d6fe0[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x38b2b8+=0x2){let _0x41a08c=window[_0x35ba46([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d6fe0[_0x35ba46([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x38b2b8,_0x38b2b8+0x2));_0x41a08c>=_0x3cb577[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x41a08c-=_0x3cb577[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x135e89+=_0x3cb577[_0x41a08c];}return _0x135e89;}function _0x3b459e(){const _0x3b5ace=_0x32bd4d[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e]));if(0x3!=_0x3b5ace[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3f8797(_0x3b5ace[0x1]);function _0x3f8797(_0x531761){const _0x57aad4=_0x398ecb(_0x531761);return _0x57aad4&&_0x4cad37()?_0x57aad4:null;function _0x4cad37(){const _0x2930fe=_0x57aad4[_0x35ba46([0x6a,0x74,0x69])],_0xc2f5f1=window[_0x35ba46([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2930fe[_0x35ba46([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2930fe[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x15c7ed={..._0x57aad4,[_0x35ba46([0x6a,0x74,0x69])]:_0x2930fe[_0x35ba46([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2930fe[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x15c7ed[_0x35ba46([0x76,0x63])],_0x2b834b(_0x15c7ed)==_0xc2f5f1;}}}async function _0x57cad8(){let _0x14c435=!0x0;try{const _0x7ed29d=_0x32bd4d[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])](_0x35ba46([0x2e])),[_0x19ac06,_0x28fe60,_0x89d667]=_0x7ed29d;return _0x58c19d(_0x19ac06),await _0x1ca3bf(_0x19ac06,_0x28fe60,_0x89d667),_0x14c435;}catch{return!0x1;}function _0x58c19d(_0x5942a0){const _0x5ce3cf=_0x398ecb(_0x5942a0);_0x5ce3cf&&_0x5ce3cf[_0x35ba46([0x61,0x6c,0x67])]==_0x35ba46([0x45,0x53,0x32,0x35,0x36])||(_0x14c435=!0x1);}async function _0x1ca3bf(_0x58b3c7,_0x1beaff,_0x23f525){const _0x10db89=window[_0x35ba46([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x35ba46([0x66,0x72,0x6f,0x6d])](_0x485449(_0x23f525),_0x300d07=>_0x300d07[_0x35ba46([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x429161=new window[(_0x35ba46([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x35ba46([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x58b3c7+_0x35ba46([0x2e])+_0x1beaff),_0x1af728=window[_0x35ba46([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x35ba46([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1af728)return;const _0x6393f9=await _0x1af728[_0x35ba46([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x35ba46([0x6a,0x77,0x6b]),_0x273ecf,{[_0x35ba46([0x6e,0x61,0x6d,0x65])]:_0x35ba46([0x45,0x43,0x44,0x53,0x41]),[_0x35ba46([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x35ba46([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x35ba46([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1af728[_0x35ba46([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x35ba46([0x6e,0x61,0x6d,0x65])]:_0x35ba46([0x45,0x43,0x44,0x53,0x41]),[_0x35ba46([0x68,0x61,0x73,0x68])]:{[_0x35ba46([0x6e,0x61,0x6d,0x65])]:_0x35ba46([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x6393f9,_0x10db89,_0x429161)||(_0x14c435=!0x1);}}function _0x398ecb(_0x2dce29){return _0x2dce29[_0x35ba46([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x35ba46([0x65,0x79]))?JSON[_0x35ba46([0x70,0x61,0x72,0x73,0x65])](_0x485449(_0x2dce29)):null;}function _0x485449(_0x29e253){return window[_0x35ba46([0x61,0x74,0x6f,0x62])](_0x29e253[_0x35ba46([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x35ba46([0x2b]))[_0x35ba46([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x35ba46([0x2f])));}function _0x2b834b(_0xf8e63){let _0x46314b=0x1505;function _0x4d07bc(_0x907ca3){for(let _0x18647e=0x0;_0x18647e<_0x907ca3[_0x35ba46([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x18647e++){const _0x1d89ea=_0x907ca3[_0x35ba46([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x18647e);_0x46314b=(_0x46314b<<0x5)+_0x46314b+_0x1d89ea,_0x46314b&=_0x46314b;}}function _0x183f90(_0x2b27a4){Array[_0x35ba46([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2b27a4)?_0x2b27a4[_0x35ba46([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x183f90):_0x2b27a4&&typeof _0x2b27a4==_0x35ba46([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x35ba46([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2b27a4)[_0x35ba46([0x73,0x6f,0x72,0x74])]()[_0x35ba46([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1a596c,_0x4b9008])=>{_0x4d07bc(_0x1a596c),_0x183f90(_0x4b9008);}):_0x4d07bc(window[_0x35ba46([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2b27a4));}return _0x183f90(_0xf8e63),_0x46314b>>>0x0;}function _0x1cbb92(_0x3816b7){return _0x3816b7[_0x35ba46([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x35ba46([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x35ba46([0x30]));}function _0x41ce1b(_0x345a4a){return _0x345a4a[_0x35ba46([0x73,0x70,0x6c,0x69,0x74])]('')[_0x35ba46([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x35ba46([0x6a,0x6f,0x69,0x6e])]('');}function _0x25c932(_0x393fbe){return _0x552209[_0x35ba46([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x35ba46([0x68,0x61,0x73])](_0x393fbe);}function _0x201a2c(_0x57a7f8){return _0x552209[_0x35ba46([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x35ba46([0x67,0x65,0x74])](_0x57a7f8);}function _0x28a084(){}function _0x35ba46(_0x4c487b){return _0x4c487b['map'](_0x117ccc=>String['fromCharCode'](_0x117ccc))['join']('');}_0xa100c9(await _0x316ea0());}(this);}['createRevision'](_0x525a61){const _0x3d03c0=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x525a61['id'],'name':_0x525a61['name'],'creator':_0x525a61['creatorId']?_0x3d03c0['getUser'](_0x525a61['creatorId']):null,'diffData':_0x525a61['diffData']||_0x525a61['data'],'authors':_0x525a61['authorsIds']['map'](_0x2c8ece=>_0x3d03c0['getUser'](_0x2c8ece)),'createdAt':new Date(_0x525a61['createdAt']),'attributes':_0x525a61['attributes'],'fromVersion':_0x525a61['fromVersion'],'toVersion':_0x525a61['toVersion']});}['addRevision'](_0x5e5462,_0x4ea53e=0x0){this['_revisions']['add'](_0x5e5462,_0x4ea53e);}['getRevision'](_0x541d08){return this['_revisions']['get'](_0x541d08);}['getRevisions'](_0x310612={'toJSON':!0x1}){const _0x41c7ef=Array['from'](this['_revisions']);return _0x41c7ef['reverse'](),_0x310612['toJSON']?_0x41c7ef['map'](_0x26b6b5=>_0x26b6b5['toJSON']()):_0x41c7ef;}['getIndex'](_0x2b9ad3){return this['_revisions']['getIndex'](_0x2b9ad3);}['getEarlierVisibleRevision'](_0x421149){const [,_0x36d430]=this['getRevisionsIterator'](_0x421149,{'direction':'earlier'});return _0x36d430;}['getLaterVisibleRevision'](_0xbe609c){const [,_0x42277e]=this['getRevisionsIterator'](_0xbe609c,{'direction':'later'});return _0x42277e;}['getRevisionsInDiff'](_0x42b364){const _0x25117a=[];for(const _0x3c6bdc of this['getRevisionsIterator'](_0x42b364['newRevisionId']))if(_0x25117a['push'](_0x3c6bdc),_0x3c6bdc['id']===_0x42b364['oldRevisionId'])break;return _0x25117a;}*['getRevisionsIterator'](_0x13cc6b,{direction:_0x2ce234='earlier',filter:_0x47e085=()=>!0x0}={}){const _0x286619='earlier'===_0x2ce234?0x1:-0x1;let _0x5f38bd=this['_revisions']['get'](_0x13cc6b),_0x5d6bf6=this['getIndex'](_0x5f38bd);for(yield _0x5f38bd;_0x5f38bd;){if(_0x5d6bf6+=_0x286619,_0x5f38bd=this['getRevision'](_0x5d6bf6),!_0x5f38bd)return;_0x47e085(_0x5f38bd)&&(yield _0x5f38bd);}}}class RevisionHistoryUtils extends _0x20daab{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x175b4f,'c'],[_0x1abd8e,'a'],[_0x581a07,'e'],[_0x5b2cfd,'r'],[_0x47a5a3,'u']]);['_typeCharToViewClass']=new Map([['c',_0x175b4f],['a',_0x1abd8e],['e',_0x581a07],['r',_0x5b2cfd],['u',_0x47a5a3]]);async['loadRevisionData'](_0xc87762,_0xfe643b){if(_0xc87762['diffData']||!_0xfe643b)return;const _0x38e916=this['editor']['config']['get']('collaboration.channelId'),_0x37a965=await _0xfe643b['getRevision']({'channelId':_0x38e916,'revisionId':_0xc87762['id']});_0xc87762['diffData']=_0x37a965['diffData'];}['getRevisionDocumentData'](_0x30ef81){const _0x1705a5={};for(const _0x221b3e in _0x30ef81['diffData']){if(_0x30ef81['diffData'][_0x221b3e]['attachChange']&&!_0x30ef81['diffData'][_0x221b3e]['attachChange']['isAttached'])continue;const _0x5f2734=this['_removeRevisionMarkers'](JSON['parse'](_0x30ef81['diffData'][_0x221b3e]['insertions'])),_0xf9e022=this['editor']['editing']['view']['document'],_0x37a232=new _0x4cca8f(_0xf9e022,_0x5f2734['map'](_0x3b9622=>this['_getViewFromDiffObj'](_0x3b9622,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1705a5[_0x221b3e]=this['editor']['data']['processor']['toData'](_0x37a232),this['editor']['data']['processor']['useFillerType']('default');}return _0x1705a5;}['getRevisionRootsAttributes'](_0x1e1f7e){const _0x2bec7b={};for(const _0x4f9739 in _0x1e1f7e['diffData'])_0x1e1f7e['diffData'][_0x4f9739]['attachChange']&&!_0x1e1f7e['diffData'][_0x4f9739]['attachChange']['isAttached']||(_0x2bec7b[_0x4f9739]=_0x1e1f7e['diffData'][_0x4f9739]['attributesAfter']||{});return _0x2bec7b;}['getRevisionRootsModelElements'](_0x5b027a){const _0x281d6c={};for(const _0x362a69 in _0x5b027a['diffData']){if(_0x5b027a['diffData'][_0x362a69]['attachChange']&&!_0x5b027a['diffData'][_0x362a69]['attachChange']['isAttached'])continue;const _0x3e614d=_0x5b027a['diffData'][_0x362a69]['rootElementName'];_0x3e614d&&(_0x281d6c[_0x362a69]=_0x3e614d);}return _0x281d6c;}['_getTypeCharForViewElement'](_0x3b97c2){return this['_viewClassToTypeChar']['get'](_0x3b97c2['constructor']);}['_getViewFromDiffObj'](_0x30f588,_0x35c76a){const _0x451495=this['editor']['editing']['view']['document'];if('string'==typeof _0x30f588)return new _0x1b99a8(_0x451495,_0x30f588);{let _0x4bc67c,_0x4556c3;_0x4556c3='u'==_0x30f588['type']||'r'==_0x30f588['type']?[]:_0x30f588['children']['map'](_0x40810d=>this['_getViewFromDiffObj'](_0x40810d,_0x35c76a));const _0x2c80f2=this['_typeCharToViewClass']['get'](_0x30f588['type'])||_0x9bdf37,_0x2a0ee9=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4bc67c=new _0x2c80f2(_0x451495,_0x30f588['name'],_0x30f588['attributes'],_0x4556c3),'u'==_0x30f588['type']&&_0x30f588['children'][0x0]){const _0x45790d=_0x30f588['children'][0x0];if(_0x4bc67c['render']=function(_0xdc17ac){const _0x1e4305=_0xdc17ac['createElement']('div');return _0x1e4305['innerHTML']=_0x45790d,_0x1e4305['childNodes'][0x0];},_0x35c76a){const _0x4e15a6=new _0x4cca8f(_0x451495);_0x4e15a6['_appendChild'](_0x4bc67c);const _0x5d8a0a=Array['from'](_0x2a0ee9['viewChildrenToDom'](_0x4e15a6,{'bind':!0x1})),_0x44b5f3=_0x2a0ee9['domDocument']['createElement']('div');_0x44b5f3['append'](..._0x5d8a0a),_0x4bc67c=Array['from'](_0x2a0ee9['domChildrenToView'](_0x44b5f3))[0x0];}}else{if('r'==_0x30f588['type']&&_0x30f588['children'][0x0]){const _0x2c3a11=_0x30f588['children'][0x0];if(_0x4bc67c['render']=function(_0x2c1507){_0x2c1507['innerHTML']=_0x2c3a11;},_0x35c76a){const _0x278e47=new _0x4cca8f(_0x451495);_0x278e47['_appendChild'](_0x4bc67c);const _0x54d3df=Array['from'](_0x2a0ee9['viewChildrenToDom'](_0x278e47,{'bind':!0x1})),_0x50b116=_0x2a0ee9['domDocument']['createElement']('div');_0x50b116['append'](..._0x54d3df);const _0x15c8a0=Array['from'](_0x2a0ee9['domChildrenToView'](_0x50b116));_0x15c8a0['length']>0x1?_0x4bc67c['_appendChild'](_0x15c8a0):_0x4bc67c=_0x15c8a0[0x0];}}}if(_0x30f588['customProperties']){for(const [_0x5de405,_0x4ab31f]of _0x30f588['customProperties'])_0x4bc67c['_setCustomProperty'](_0x5de405,_0x4ab31f);}const _0x3adb64=void 0x0===_0x30f588['fillerOffset']?null:_0x30f588['fillerOffset'];return null!==_0x3adb64&&(_0x4bc67c['getFillerOffset']=()=>_0x3adb64),_0x4bc67c;}}['_makeModelFromViewString'](_0x440f83,_0x7ac001){const _0x29aa86=JSON['parse'](_0x440f83),_0x256528=this['editor']['editing']['view']['document'],_0x50b06a=new _0x4cca8f(_0x256528,_0x29aa86['map'](_0x5c65fc=>this['_getViewFromDiffObj'](_0x5c65fc,!0x0))),_0x26441e=this['editor']['data']['toModel'](_0x50b06a,_0x7ac001);return _0x26441e['name']=_0x7ac001,_0x26441e;}['_removeRevisionMarkers'](_0x2066c6){return(_0x2066c6=_0x2066c6['filter'](_0x1ed0d7=>!_0x1ed0d7['name']||'revision-start'!==_0x1ed0d7['name']&&'revision-end'!==_0x1ed0d7['name']))['forEach'](_0x97af5a=>{'string'!=typeof _0x97af5a&&(_0x97af5a['children']=this['_removeRevisionMarkers'](_0x97af5a['children']),_0x97af5a['attributes']=_0x97af5a['attributes']['filter'](_0x4bd72f=>!_0x4bd72f[0x0]['startsWith']('data-revision-')));}),_0x2066c6;}}function ft(_0x1aca6f,_0x9eeadf,_0x15cb52){const t=_0x1aca6f['t'];switch(_0x9eeadf){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x15cb52);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x15cb52);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x20daab{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xf95694,RevisionsRepository,RevisionHistoryUtils,_0xd00ec3];}constructor(_0x5089f2){super(_0x5089f2),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x21ea53=_0x13bc90();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x21ea53},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x1a20e8=this['repository']['getRevision'](0x0),_0x1df43a=_0x1a20e8&&null===_0x1a20e8['creator']?_0x1a20e8:null;if(this['_continueCurrentRevision']=!!_0x1df43a&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3c1de1=this['_source']['getCurrentRevisionId'](),_0x4d5dcc=this['repository']['getRevision'](_0x3c1de1);if(_0x4d5dcc)this['_startingVersion']=_0x4d5dcc['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x3730d6=this['_source']['history']['_operations']['find'](_0x4299aa=>!_0x4299aa['_isInit']),_0xf8f66=_0x3730d6?_0x3730d6['baseVersion']:this['_source']['history']['version'];_0x1a20e8?(_0x1a20e8['toVersion']<_0xf8f66&&_0x1a20e8['_update']({'toVersion':_0xf8f66}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x1df43a['id'],this['_startingVersion']=_0x1df43a['fromVersion']):(this['_startingVersion']=_0x1a20e8['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xf8f66,this['_continueCurrentRevision']=!0x1);}}else _0x1df43a&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x1df43a['toVersion'],this['editor']['model']['document']['history']['version']),_0x1df43a['fromVersion']===_0x1df43a['toVersion']?(0x0!==_0x1df43a['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x1df43a['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x1df43a['id'],this['_startingVersion']=_0x1df43a['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x121681=>!_0x121681),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x178c75=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x617065;for(const _0x19721a in _0x178c75){const _0x114c3f=_0x19721a,_0x2e26ae=_0x178c75[_0x114c3f];if('revisionHistoryLicenseKeyValid'==_0x2e26ae||'revisionHistoryLicenseKeyInvalid'==_0x2e26ae||'revisionHistoryLicenseKeyExpired'==_0x2e26ae||'revisionHistoryLicenseKeyDomainLimit'==_0x2e26ae||'revisionHistoryLicenseKeyNotAllowed'==_0x2e26ae||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2e26ae||'revisionHistoryLicenseKeyUsageLimit'==_0x2e26ae){delete _0x178c75[_0x114c3f],_0x617065=_0x2e26ae,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x617065&&_0x178c75['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x617065&&_0x178c75['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x617065&&_0x178c75['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x617065&&_0x178c75['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x617065&&_0x178c75['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x617065&&_0x178c75['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x25cf8b=this['repository']['getRevision'](0x0),_0x5f044c=await this['getRevisionDocumentData'](_0x25cf8b),_0xa3ea60=await this['getRevisionRootsAttributes'](_0x25cf8b),_0x4d84e1=this['_utils']['getRevisionRootsModelElements'](_0x25cf8b);this['_replaceEditorDataWithRevisionData'](_0x5f044c,_0xa3ea60,_0x4d84e1);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1a0332){this['_source']=_0x1a0332;}async['update'](){const _0x1a98e0=await this['_source']['getLatestVersion']();if(_0x1a98e0>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1d48c5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1a98e0});_0x1d48c5['authors']=_0x1d48c5['authorsIds']['map'](_0x31b169=>this['editor']['plugins']['get']('Users')['getUser'](_0x31b169)),this['currentRevision']['_update'](_0x1d48c5);}}async['saveRevision'](_0x41776a={},_0x598047=null){const _0x4ddd15=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x598047>this['currentRevision']['toVersion']&&(_0x598047=null),null===_0x598047&&(_0x598047=await this['_source']['getLatestVersion']());const _0x1c2b9f=this['_getFromVersion'](_0x598047),_0x495012=this['buildRevisionData']({'from':_0x1c2b9f,'to':_0x598047});if(this['currentRevision']['toVersion']<_0x598047){const _0x59f0fa=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x598047,'to':_0x598047});_0x59f0fa['authors']=[],_0x59f0fa['authorsIds']=[],_0x59f0fa['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x59f0fa,!0x0),delete _0x59f0fa['authors'],_0x4ddd15['push'](_0x59f0fa);}_0x41776a['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x41776a['name']=_0x41776a['name']||null,_0x41776a['id']=_0x41776a['id']||_0x13bc90(),_0x41776a={..._0x41776a,..._0x495012};const _0x214008=this['addRevisionData'](_0x41776a);_0x4ddd15['push'](_0x41776a);const _0x21d823=this['repository']['getIndex'](_0x214008);if(0x0!==_0x21d823){const _0x44c472=this['repository']['getRevision'](_0x21d823-0x1);if(_0x44c472['fromVersion']!==_0x598047){const _0x524ffe=this['_revisionDataBuilder']['getData'](_0x598047,_0x44c472['toVersion']),_0x1b3572={'id':_0x44c472['id'],'diffData':_0x524ffe['diffData'],'authorsIds':_0x524ffe['authorsIds'],'authors':_0x524ffe['authorsIds']['map'](_0x4ca5b8=>this['editor']['plugins']['get']('Users')['getUser'](_0x4ca5b8)),'fromVersion':_0x598047};_0x44c472===this['currentRevision']&&(_0x1b3572['createdAt']=new Date(_0x41776a['createdAt']['getTime']()+0xa)),_0x44c472['_update'](_0x1b3572,!0x0),delete _0x1b3572['authors'],_0x4ddd15['push'](_0x1b3572);}}if(this['adapter']){for(const _0x444ce7 of _0x4ddd15)this['_bufferUpdate'](_0x444ce7['id'],_0x444ce7,!0x0);this['sendBufferedUpdates']();}return _0x214008;}['addRevisionData'](_0x456f3e){const _0x4ccad8=this['repository']['createRevision'](_0x456f3e);return this['adapter']&&_0x4ccad8['on']('_update',(_0xc4357e,_0x9c31c6,_0x5e79db)=>{_0x5e79db||(this['_bufferUpdate'](_0x9c31c6['id'],_0x9c31c6,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4ccad8,this['_findInsertionIndex'](_0x4ccad8)),_0x4ccad8;}async['getRevisionDocumentData'](_0x54f789){return await this['_utils']['loadRevisionData'](_0x54f789,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x54f789);}async['getRevisionRootsAttributes'](_0x42c1f7){return await this['_utils']['loadRevisionData'](_0x42c1f7,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x42c1f7);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x227d98=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x6b18b0=0x0;_0x6b18b0<_0x227d98['length'];_0x6b18b0++){const _0x21c048=_0x227d98[_0x6b18b0];let _0x1e353f=!0x1;for(const _0x272008 of Object['keys'](_0x21c048))void 0x0===_0x21c048[_0x272008]?delete _0x21c048[_0x272008]:'id'!==_0x272008&&(_0x1e353f=!0x0);_0x1e353f||(_0x227d98[_0x6b18b0]=null);}if(_0x227d98=_0x227d98['filter'](_0x1217c2=>null!==_0x1217c2),!_0x227d98['length'])return;for(let _0x215f8a=0x0;_0x215f8a<_0x227d98['length'];_0x215f8a++){const _0x84429f=_0x227d98[_0x215f8a];void 0x0!==_0x84429f['fromVersion']&&void 0x0===_0x84429f['toVersion']&&(_0x84429f['toVersion']=this['repository']['getRevision'](_0x84429f['id'])['toVersion']),void 0x0!==_0x84429f['toVersion']&&void 0x0===_0x84429f['fromVersion']&&(_0x84429f['fromVersion']=this['repository']['getRevision'](_0x84429f['id'])['fromVersion']);}const _0x51e7ce=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x227d98,_0x51e7ce)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2d21ca=>{if(_0x2d21ca){for(const _0x242a89 of _0x2d21ca)this['setRevisionData']({'id':_0x242a89['id'],'createdAt':_0x242a89['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x37ab80=null,from:_0x500bdc=null,to:_0x5ccb5c=null}){_0x500bdc=null!==_0x500bdc?_0x500bdc:_0x37ab80['fromVersion'],_0x5ccb5c=null!==_0x5ccb5c?_0x5ccb5c:_0x37ab80['toVersion'];const _0x3a4018=this['_revisionDataBuilder']['getData'](_0x500bdc,_0x5ccb5c),_0x2f3a56={'diffData':_0x3a4018['diffData'],'authorsIds':_0x3a4018['authorsIds'],'fromVersion':_0x500bdc,'toVersion':_0x5ccb5c};if(!_0x37ab80||_0x5ccb5c!==_0x37ab80['toVersion']){const _0x2f0071=_0x5ccb5c-0x1,_0x345193=this['_source']['history']['getOperation'](_0x2f0071);_0x2f3a56['createdAt']=_0x345193&&_0x345193['createdAt']||new Date();}if(this['_loadedStateData']&&_0x500bdc===this['_loadedStateData']['fromVersion']){for(const _0x1c928b of this['_loadedStateData']['authors'])_0x2f3a56['authorsIds']['includes'](_0x1c928b['id'])||_0x2f3a56['authorsIds']['push'](_0x1c928b['id']);}return _0x2f3a56;}['_bufferUpdate'](_0x1ceb54,_0x5b4263,_0x106aa3){if(this['_bufferedUpdates']['has'](_0x1ceb54)){const _0x3b49e5=this['_bufferedUpdates']['get'](_0x1ceb54);_0x5b4263=_0x106aa3?{..._0x3b49e5,..._0x5b4263}:{..._0x5b4263,..._0x3b49e5};}this['_bufferedUpdates']['set'](_0x1ceb54,_0x5b4263);}['setRevisionData'](_0x5cab84){const _0x4ff828=this['repository']['getRevision'](_0x5cab84['id']);if(_0x5cab84['createdAt']&&(_0x5cab84['createdAt']=new Date(_0x5cab84['createdAt'])),_0x5cab84['authorsIds']){const _0x583386=this['editor']['plugins']['get']('Users');_0x5cab84['authors']=_0x5cab84['authorsIds']['map'](_0x55b3d8=>_0x583386['getUser'](_0x55b3d8));}_0x4ff828['_update'](_0x5cab84,!0x0);}['_createInitialRevision'](_0x1a6e76){const _0x5e16c9=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5e16c9)this['_initialRevisionId']=_0x5e16c9['id'];else{const _0x3e5a55=!this['editor']['model']['document']['roots']['find'](_0x2935fc=>this['editor']['model']['hasContent'](_0x2935fc)),_0x48bee7=this['editor']['plugins']['get']('Users')['me']['id'],_0x14a612=ft(this['editor']['locale'],_0x3e5a55?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x1a6e76,'to':_0x1a6e76,'id':this['_initialRevisionId'],'name':_0x14a612,'creatorId':_0x48bee7});}}['_createCurrentRevision'](_0x249dd1){const _0x475c8d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x475c8d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x249dd1,'to':_0x249dd1,'id':_0x475c8d,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x2133ad,_0x4ee9a8,_0x1eb431){const _0x51b8eb={},_0x211155={},_0x1fef80={},_0x2fe858=this['editor']['config']['get']('roots')||{};for(const [_0x1a9889,_0xf03ce1]of Object['entries'](_0x2fe858))_0xf03ce1['lazyLoad']||(_0x51b8eb[_0x1a9889]=_0xf03ce1['initialData']??'',_0x211155[_0x1a9889]=_0xf03ce1['modelAttributes']||{},_0xf03ce1['modelElement']&&(_0x1fef80[_0x1a9889]=_0xf03ce1['modelElement']));for(const _0x500e51 of this['editor']['model']['document']['getRootNames']())_0x51b8eb[_0x500e51]??='',_0x211155[_0x500e51]??={};let _0x10bc17=!0x1;const _0x13c63c=Object['keys'](_0x51b8eb),_0x13c6aa=Object['keys'](_0x2133ad);for(const _0x4b8a6f of _0x13c63c){if(_0x51b8eb[_0x4b8a6f]!==_0x2133ad[_0x4b8a6f]&&''!==_0x51b8eb[_0x4b8a6f]['trim']()){_0x10bc17=!0x0;break;}if(!_0x1d7c60(_0x211155[_0x4b8a6f],_0x4ee9a8[_0x4b8a6f])&&Object['keys'](_0x211155[_0x4b8a6f])['length']>0x0){_0x10bc17=!0x0;break;}const _0x42e002=_0x1fef80[_0x4b8a6f],_0x29ff48=_0x1eb431[_0x4b8a6f];if(_0x42e002&&_0x29ff48&&_0x42e002!==_0x29ff48){_0x10bc17=!0x0;break;}}_0x10bc17||(_0x10bc17=_0x13c6aa['some'](_0xb6952d=>!this['editor']['model']['document']['getRoot'](_0xb6952d))),_0x10bc17&&_0x14e875('editor-initial-data-replaced-with-revision-data',{'editorData':_0x51b8eb,'editorRootsAttributes':_0x211155,'editorRootsModelElements':_0x1fef80,'revisionData':_0x2133ad,'revisionRootsAttributes':_0x4ee9a8,'revisionRootsModelElements':_0x1eb431});for(const [_0x4cb667,_0x463e42]of Object['entries'](_0x2133ad))this['editor']['config']['set']('roots.'+_0x4cb667+'.initialData',_0x463e42);for(const [_0x4974a2,_0x4286d3]of Object['entries'](_0x4ee9a8))this['editor']['config']['set']('roots.'+_0x4974a2+'.modelAttributes',_0x4286d3);const _0x332988=this['editor']['model']['document'];for(const [_0x36e8af,_0x5b8dd9]of Object['entries'](_0x1eb431)){this['editor']['config']['set']('roots.'+_0x36e8af+'.modelElement',_0x5b8dd9);const _0x1f06c1=_0x332988['getRoot'](_0x36e8af);_0x1f06c1&&_0x1f06c1['name']!==_0x5b8dd9&&(_0x332988['roots']['remove'](_0x36e8af),_0x332988['createRoot'](_0x5b8dd9,_0x36e8af));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x2033fa=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2033fa['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x297ba0){const _0x5ec7e3=this['repository']['getRevisions']();_0x5ec7e3['reverse']();let _0x1a5876=0x0;for(;_0x1a5876<_0x5ec7e3['length'];){const _0x20a059=_0x5ec7e3[_0x1a5876];if(_0x20a059===this['currentRevision']){_0x1a5876++;continue;}if(_0x20a059['id']===this['_initialRevisionId'])break;const _0x40adae=_0x297ba0['toVersion']-_0x20a059['toVersion']||_0x297ba0['fromVersion']-_0x20a059['fromVersion'];if(_0x40adae>0x0)break;if(_0x40adae<0x0)_0x1a5876++;else{if(!_0x297ba0['creator']&&_0x20a059['creator'])break;if(_0x20a059['creator']||!_0x297ba0['creator']){if(_0x297ba0['createdAt']>_0x20a059['createdAt'])break;_0x1a5876++;}else _0x1a5876++;}}return _0x1a5876;}['_getFromVersion'](_0x3f65bc){const _0x4ddca4=this['repository']['getRevisions']();_0x4ddca4['reverse'](),_0x4ddca4['shift']();const _0x3c3dd7=_0x4ddca4['find'](_0x9c1401=>_0x9c1401['toVersion']<=_0x3f65bc)['toVersion'];return _0x3c3dd7<this['_startingVersion']?this['_startingVersion']:_0x3c3dd7;}['_makeRevision']({name:_0x11d45d,from:_0x58e8c3,to:_0x23aba2,creatorId:_0x40fec8,id:_0x395f6c}){const _0x5c1990=this['buildRevisionData']({'from':_0x58e8c3,'to':_0x23aba2});_0x5c1990['name']=_0x11d45d,_0x5c1990['creatorId']=_0x40fec8,_0x5c1990['id']=_0x395f6c;const _0x3f8287=this['addRevisionData'](_0x5c1990);return this['adapter']&&this['_bufferUpdate'](_0x5c1990['id'],_0x5c1990,!0x0),_0x3f8287;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1c263a){this['editor']=_0x1c263a,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x3e465e){this['source']=_0x3e465e;const _0x530776=new Map(),_0x4cf606=new Map(),_0x129de8=this['editor']['model']['document']['roots']['map'](_0x311b0c=>_0x311b0c['rootName']);for(const _0x33164f of _0x129de8){const _0x292d1a=this['editor']['model']['document']['getRoot'](_0x33164f),_0x27a151=gt(_0x292d1a);_0x530776['set'](_0x33164f,_0x27a151),_0x4cf606['set'](_0x33164f,Object['fromEntries'](_0x292d1a['getAttributes']()));}const _0x25906d=Array['from'](this['editor']['model']['markers'])['map'](_0x4008f9=>[_0x4008f9['name'],_0x4008f9['getRange']()]),_0x48b68a=this['source']['version'];this['_saveMetaData'](_0x48b68a,_0x530776,_0x25906d,_0x4cf606),this['_startingRevisionId']=this['_revisionId'];const _0x1b19a7=new Map(),_0x31916d=new Map();for(const _0x4ee08c of _0x129de8){const _0x5e4314=wt(_0x4ee08c,this['editor']['model']['document']['getRoot'](_0x4ee08c)['name']);_0x1b19a7['set'](_0x4ee08c,_0x5e4314),_0x31916d['set'](_0x4ee08c,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1b19a7,[],_0x31916d);}['getData'](_0x2bdfee,_0x1a7cb9){if(this['_lastFrom']===_0x2bdfee&&this['_lastTo']<=_0x1a7cb9)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1a7cb9,!0x0);else{if(!this['_savedMetaData']['has'](_0x2bdfee)){const _0x47146f=this['_getPreviousFrom'](_0x2bdfee);this['_calculateMetaData'](_0x47146f,_0x2bdfee,!0x1);}this['_calculateMetaData'](_0x2bdfee,_0x1a7cb9,!0x0);}return this['_lastFrom']=_0x2bdfee,this['_lastTo']=_0x1a7cb9,this['_getState']();}['loadState'](_0x628564){if(!this['_savedMetaData']['has'](_0x628564['fromVersion'])){const _0x533e46=this['_getPreviousFrom'](_0x628564['fromVersion']);this['_calculateMetaData'](_0x533e46,_0x628564['fromVersion'],!0x1);}this['_calculateMetaData'](_0x628564['fromVersion'],_0x628564['toVersion'],!0x1);const _0x1038da=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x628564['fromVersion'],this['_lastTo']=_0x628564['toVersion'];for(const _0x11b504 in _0x628564['diffData']){const _0xcf5bf1=_0x628564['diffData'][_0x11b504]['attachChange'],_0x594d4f=_0x2a882c(_0x628564['diffData'][_0x11b504]['attributesBefore'])||{},_0x3d2749=_0x628564['diffData'][_0x11b504],_0x9b1917=_0x1038da['_makeModelFromViewString'](_0x3d2749['deletions'],_0x3d2749['rootElementName']||'$root');_0x9b1917['rootName']=_0x11b504,_0x9b1917['_isAttached']=!_0xcf5bf1||!_0xcf5bf1['isAttached'],_0x9b1917['isAttached']=()=>_0x9b1917['_isAttached'],this['_baseRoots']['set'](_0x11b504,_0x9b1917),this['_baseRootsAttributes']['set'](_0x11b504,_0x594d4f),_0xcf5bf1&&this['_touchedRoots']['set'](_0x11b504,_0xcf5bf1);const _0x1a240d=this['_makeIdsRoot'](_0x9b1917);this['_baseIdsRoots']['set'](_0x11b504,_0x1a240d);for(const [_0x4196be,_0xe5d5ab]of _0x9b1917['markers']){if(!_0x4196be['startsWith']('revision:'))continue;const _0x36d2cf=_0x4196be['split'](':')[0x2];for(const _0x5aac88 of _0xe5d5ab['getWalker']({'singleCharacters':!0x0})){const _0x3be32f=this['_getVidAttributeName'](_0x5aac88),_0x2aa1e8='elementEnd'==_0x5aac88['type']?_0x5aac88['previousPosition']['path']['slice'](0x0,-0x1):_0x5aac88['previousPosition']['path'],_0x2c90e2=_0x1a240d['getNodeByPath'](_0x2aa1e8)['getAttribute'](_0x3be32f);this['_touched']['set'](_0x2c90e2,{'userId':_0x36d2cf});}_0x9b1917['markers']['delete'](_0x4196be);}}this['_startingRevisionId']=this['_revisionId'];const _0x25fe8e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4c8640=>!this['_touched']['has'](_0x4c8640));let _0x33d899=0x0;const _0x2bfdc5=new Map();for(const _0x429592 in _0x628564['diffData']){const _0x435a59=_0x628564['diffData'][_0x429592]['attachChange'],_0x512916=_0x2a882c(_0x628564['diffData'][_0x429592]['attributesAfter'])||{},_0x42472f=_0x628564['diffData'][_0x429592],_0x2414fe=_0x1038da['_makeModelFromViewString'](_0x42472f['insertions'],_0x42472f['rootElementName']||'$root');_0x2414fe['rootName']=_0x429592,_0x2414fe['_isAttached']=!_0x435a59||_0x435a59['isAttached'],_0x2414fe['isAttached']=()=>_0x2414fe['_isAttached'],this['_diffRoots']['set'](_0x429592,_0x2414fe),this['_diffRootsAttributes']['set'](_0x429592,_0x512916);const _0x3b336a=this['_makeIdsRoot'](_0x2414fe,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x429592,_0x3b336a),_0x2bfdc5['set'](_0x429592,_0x2414fe['isAttached']()?_0x512916:{});for(const [_0x408803,_0x7a08f]of _0x2414fe['markers']){if(!_0x408803['startsWith']('revision:'))continue;const _0x2cbb5f=_0x408803['split'](':')[0x2];for(const _0x4c8d92 of _0x7a08f['getWalker']({'singleCharacters':!0x0})){const _0xe97920=this['_getVidAttributeName'](_0x4c8d92),_0x3d0a2a=this['_revisionId']++,_0xe5609e='elementEnd'==_0x4c8d92['type']?_0x4c8d92['previousPosition']['path']['slice'](0x0,-0x1):_0x4c8d92['previousPosition']['path'];_0x3b336a['getNodeByPath'](_0xe5609e)['_setAttribute'](_0xe97920,_0x3d0a2a),this['_touched']['set'](_0x3d0a2a,{'userId':_0x2cbb5f});}_0x2414fe['markers']['delete'](_0x408803);}for(const _0x354e15 of this['editor']['model']['createRangeIn'](_0x2414fe)['getWalker']({'singleCharacters':!0x0})){const _0x301592=this['_getVidAttributeName'](_0x354e15),_0x284eb6='elementEnd'==_0x354e15['type']?_0x354e15['previousPosition']['path']['slice'](0x0,-0x1):_0x354e15['previousPosition']['path'],_0x16a012=_0x3b336a['getNodeByPath'](_0x284eb6);_0x16a012['getAttribute'](_0x301592)>0x0||_0x16a012['_setAttribute'](_0x301592,_0x25fe8e[_0x33d899++]);}for(const [_0x1496a5,_0x19404f]of _0x2414fe['markers'])_0x1496a5['startsWith']('revision:')||this['_markers']['set'](_0x1496a5,_0x19404f);}const {roots:_0x374842}=this['_savedMetaData']['get'](_0x628564['fromVersion']),{roots:_0x2c3334}=this['_savedMetaData']['get'](_0x628564['toVersion']),_0x2b0117=gt(_0x374842['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x2b0117),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2b0117,Number['NEGATIVE_INFINITY']));const _0x1e93c4=gt(_0x2c3334['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x1e93c4),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1e93c4));const _0x4e174e=Array['from'](this['_diffRoots'])['map'](([_0x54bb91,_0x36d605])=>[_0x54bb91,gt(_0x36d605)]);this['_saveMetaData'](this['_lastTo'],_0x4e174e,this['_markers'],_0x2bfdc5);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x2be200,_0x38c631,_0x42c73c,_0x4487d9){const _0x13cf67=new Map(_0x38c631),_0x4b93b4=new Map(_0x2a882c(_0x4487d9)),_0xa8e890=new Map();for(const [_0x5b08da,_0x189e11]of _0x42c73c)_0xa8e890['set'](_0x5b08da,{'start':_0x189e11['start']['clone'](),'end':_0x189e11['end']['clone'](),'rootName':_0x189e11['root']['rootName']});this['_savedMetaData']['set'](_0x2be200,{'roots':_0x13cf67,'markers':_0xa8e890,'rootsAttributes':_0x4b93b4});}['_removeMetaData'](_0x584f06){this['_savedMetaData']['delete'](_0x584f06);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x35dbd9,_0x36258e=null){let _0x285074=null;_0x35dbd9['is']('documentFragment')||(_0x285074=new _0x587783(_0x35dbd9['name'],{'vid_start':null===_0x36258e?this['_revisionId']++:_0x36258e++}));const _0x30cc9b=[];for(const _0x314b65 of _0x35dbd9['getChildren']())if(_0x314b65['is']('element')){_0x30cc9b['push'](this['_makeIdsRoot'](_0x314b65,_0x36258e));const _0x4b1f8c=_0x30cc9b[_0x30cc9b['length']-0x1];null!==_0x36258e&&(_0x36258e=_0x4b1f8c['is']('element','$text')?_0x4b1f8c['getAttribute']('vid')+0x1:_0x4b1f8c['getAttribute']('vid_end')+0x1);}else{for(let _0x139a3b=0x0;_0x139a3b<_0x314b65['offsetSize'];_0x139a3b++)_0x30cc9b['push'](new _0x587783('$text',{'vid':null===_0x36258e?this['_revisionId']++:_0x36258e++}));}if(_0x35dbd9['is']('documentFragment')){const _0x5ef243=wt(_0x35dbd9['rootName'],_0x35dbd9['name']);return _0x5ef243['_insertChild'](0x0,_0x30cc9b),_0x5ef243;}return _0x285074['_setAttribute']('vid_end',null===_0x36258e?this['_revisionId']++:_0x36258e++),_0x285074['_insertChild'](0x0,_0x30cc9b),_0x285074;}['_calculateMetaData'](_0xa7c43a,_0x559923,_0x22a040){this['_reset']();const {roots:_0x5c9588,markers:_0x2d6877,rootsAttributes:_0xaae097}=this['_savedMetaData']['get'](_0xa7c43a);this['_baseRoots']=new Map(_0x5c9588),this['_baseRootsAttributes']=new Map(_0x2a882c(_0xaae097));for(const [_0x435a77,_0x39e830]of this['_baseRoots'])if('$graveyard'!==_0x435a77&&(this['_diffRoots']['set'](_0x435a77,gt(_0x39e830)),this['_diffRootsAttributes']=new Map(_0x2a882c(_0xaae097)),_0x22a040)){const _0x1ce0f1=this['_revisionId'];this['_idsRoots']['set'](_0x435a77,this['_makeIdsRoot'](_0x39e830)),this['_baseIdsRoots']['set'](_0x435a77,this['_makeIdsRoot'](_0x39e830,_0x1ce0f1));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x22a040&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2e551f,_0x306dcf]of _0x2d6877){const _0x5297ce=this['_baseRoots']['get'](_0x306dcf['rootName']),_0x526f0f=this['_diffRoots']['get'](_0x306dcf['rootName']),_0x3fd4fa=new _0x1f7a25(this['_fixPosition'](_0x306dcf['start'],_0x5297ce),this['_fixPosition'](_0x306dcf['end'],_0x5297ce)),_0x10618f=this['_fixRange'](_0x3fd4fa,_0x526f0f);_0x5297ce['markers']['set'](_0x2e551f,_0x3fd4fa),this['_markers']['set'](_0x2e551f,_0x10618f);}this['_applyOperations'](_0xa7c43a,_0x559923,_0x22a040);}['_applyOperations'](_0x319b7e,_0x182cbe,_0x2c8953){for(const _0x2efdb8 of this['source']['getOperations'](_0x319b7e,_0x182cbe))this['_handleOperation'](_0x2efdb8,_0x2c8953);for(const _0x597fbf of this['_diffRoots']['values']())_0x597fbf['markers']['clear']();for(const [_0x2e1e56,_0x52399a]of this['_markers']){this['_diffRoots']['get'](_0x52399a['root']['rootName'])['markers']['set'](_0x2e1e56,_0x52399a['clone']());}const _0x57ee16=new Map(),_0xa0b869=new Map();for(const [_0x3d8a42,_0x150bb7]of this['_diffRoots'])_0x57ee16['set'](_0x3d8a42,gt(_0x150bb7)),_0xa0b869['set'](_0x3d8a42,this['_diffRootsAttributes']['get'](_0x3d8a42));this['_saveMetaData'](_0x182cbe,_0x57ee16,this['_markers'],_0xa0b869);}['_getPreviousFrom'](_0x4ebf8e){const _0x75bb8d=Array['from'](this['_savedMetaData']['keys']());_0x75bb8d['sort']((_0x4524a1,_0x40d6a0)=>_0x4524a1-_0x40d6a0),_0x75bb8d['reverse']();for(const _0x28ce5b of _0x75bb8d)if(_0x28ce5b<_0x4ebf8e)return _0x28ce5b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x29e39e,_0x4f082c){const _0x3c1f7c=Array['from'](_0x4f082c['markers'])['map'](([_0x4ea2ac,_0xb165a6])=>[_0x4ea2ac,this['_fixRange'](_0xb165a6,_0x29e39e)]);_0x29e39e['markers']=new Map(_0x3c1f7c);}['_transformMarkers'](_0x1ff449){for(const _0x2f8bbe of this['_markers']['values']()){const _0x209080=_0x2f8bbe['getTransformedByOperation'](_0x1ff449),_0x5c343e=_0x1f7a25['_createFromRanges'](_0x209080);_0x2f8bbe['start']=_0x5c343e['start'],_0x2f8bbe['end']=_0x5c343e['end'];}}['_handleOperation'](_0x3dc95b,_0x5c79e1){if('addRoot'!=_0x3dc95b['type']&&'detachRoot'!=_0x3dc95b['type']){if('insert'==_0x3dc95b['type']){const _0x4a724f=_0x3dc95b['position']['root'],_0x238c27=_0x4a724f['rootName'],_0x432c47=_0x4a724f['name'];this['_diffRoots']['has'](_0x238c27)||(this['_diffRoots']['set'](_0x238c27,wt(_0x238c27,_0x432c47,!0x0)),this['_diffRootsAttributes']['set'](_0x238c27,{}),_0x5c79e1&&this['_idsRoots']['set'](_0x238c27,wt(_0x238c27,_0x432c47,!0x0)));}else{if('addRootAttribute'==_0x3dc95b['type']||'removeRootAttribute'==_0x3dc95b['type']||'changeRootAttribute'==_0x3dc95b['type'])return void this['_handleRootAttributeOperation'](_0x3dc95b);'marker'==_0x3dc95b['type']&&this['_handleMarkerOperation'](_0x3dc95b);}if('marker'!==_0x3dc95b['type']){const _0x50c078=this['_cloneOperation'](_0x3dc95b,this['_diffRoots']);_0x50c078['_execute'](),this['_transformMarkers'](_0x50c078);}if(_0x5c79e1)switch(_0x3dc95b['type']){case'insert':this['_handleInsertOperation'](_0x3dc95b);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3dc95b);break;case'merge':this['_handleMergeOperation'](_0x3dc95b);break;case'split':this['_handleSplitOperation'](_0x3dc95b);}}else this['_handleRootOperation'](_0x3dc95b,_0x5c79e1);}['_cloneOperation'](_0x286c46,_0x5094b8){const _0x32932e=_0x286c46['clone']();return _0x32932e['_authorId']=_0x286c46['_authorId'],this['_fixOperation'](_0x32932e,_0x5094b8),_0x32932e;}['_getBaseVids'](_0x30929d){return _0x30929d['map'](_0x31acd5=>{const _0x10b7bf=this['_getVidAttributeName'](_0x31acd5);return Number(_0x31acd5['item']['getAttribute'](_0x10b7bf));});}['_generateTape'](_0x2ed277,_0x58f62a){if(_0x2ed277['is']('element','$text'))_0x58f62a['push']({'item':_0x2ed277,'type':'text'});else{_0x2ed277['is']('element')&&_0x58f62a['push']({'item':_0x2ed277,'type':'elementStart'});for(const _0x5bf436 of _0x2ed277['getChildren']())this['_generateTape'](_0x5bf436,_0x58f62a);_0x2ed277['is']('element')&&_0x58f62a['push']({'item':_0x2ed277,'type':'elementEnd'});}return _0x58f62a;}['_getState'](){const _0x2f8b4f=new Map(this['_touched']),_0x20a362=new Map(_0x2f8b4f),_0x35ef76=new Map(),_0x3555cf={'insertions':{},'deletions':{}},_0x403c26={'insertions':{},'deletions':{}},_0x123e3c=new Map(),_0x448140=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x1ed4e7=new Map();_0x448140['delete']('$graveyard');for(const _0xcd7db8 of _0x448140){const _0x1f9544=(this['_diffRoots']['get'](_0xcd7db8)??this['_baseRoots']['get'](_0xcd7db8))['name'],_0x5c70ef=this['_diffRoots']['get'](_0xcd7db8)||wt(_0xcd7db8,_0x1f9544,!0x1),_0x597cb6=this['_baseRoots']['get'](_0xcd7db8)||wt(_0xcd7db8,_0x1f9544,!0x1);_0x5c70ef['isAttached']()||_0x597cb6['isAttached']()?(_0x1ed4e7['set'](_0xcd7db8,_0x1f9544),_0x3555cf['insertions'][_0xcd7db8]=gt(_0x5c70ef),_0x3555cf['deletions'][_0xcd7db8]=gt(_0x597cb6),this['_copyMarkers'](_0x3555cf['deletions'][_0xcd7db8],_0x597cb6),this['_copyMarkers'](_0x3555cf['insertions'][_0xcd7db8],_0x5c70ef),_0x403c26['insertions'][_0xcd7db8]=this['_generateTape'](this['_idsRoots']['get'](_0xcd7db8),[]),_0x403c26['deletions'][_0xcd7db8]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xcd7db8)||wt(_0xcd7db8,_0x1f9544,!0x1),[])):_0x448140['delete'](_0xcd7db8);}for(const _0x197b42 of _0x448140){const _0x14159d=_0x403c26['insertions'][_0x197b42];for(const _0x15cdfe of _0x14159d){const _0xd53a30=this['_getVidAttributeName'](_0x15cdfe),_0x4854dd=_0x15cdfe['item']['getAttribute'](_0xd53a30);_0x20a362['delete'](_0x4854dd),_0x4854dd>=this['_startingRevisionId']&&_0x35ef76['set'](_0x4854dd,_0x2f8b4f['get'](_0x4854dd));}}for(const _0x2d645f of _0x448140){const _0x58185d=_0x403c26['insertions'][_0x2d645f],_0x114f90=this['_getBaseVids'](_0x403c26['deletions'][_0x2d645f]);let _0x18d5a3=0x0;for(const _0x445d32 of _0x58185d){const _0x28b543=this['_getVidAttributeName'](_0x445d32),_0x31240a=_0x445d32['item']['getAttribute'](_0x28b543);if(!_0x35ef76['has'](_0x31240a)&&!_0x123e3c['has'](_0x31240a)){if(_0x20a362['has'](_0x31240a))_0x18d5a3++;else{if(_0x31240a!=_0x114f90[_0x18d5a3]){const _0x364f92=_0x2f8b4f['get'](_0x31240a)||_0x2f8b4f['get'](_0x114f90[_0x18d5a3]);for(;_0x31240a!=_0x114f90[_0x18d5a3];)_0x20a362['has'](_0x114f90[_0x18d5a3])||(_0x123e3c['set'](_0x114f90[_0x18d5a3],_0x364f92),_0x2f8b4f['set'](_0x114f90[_0x18d5a3],_0x364f92)),_0x18d5a3++;}_0x18d5a3++;}}}}for(const _0x16699b of _0x448140){const _0x5970c9=_0x403c26['insertions'][_0x16699b];for(const _0x1784ac of _0x5970c9){const _0x21568b=this['_getVidAttributeName'](_0x1784ac),_0x5d8b35=_0x1784ac['item']['getAttribute'](_0x21568b);if(_0x123e3c['has'](_0x5d8b35)){const _0x252fd8=_0x123e3c['get'](_0x5d8b35);_0x20a362['has'](_0x5d8b35)||_0x20a362['set'](_0x5d8b35,{..._0x252fd8}),_0x35ef76['set'](_0x5d8b35,{..._0x252fd8});}}}for(const _0x5e9911 of _0x20a362['keys']())_0x5e9911>=this['_startingRevisionId']&&_0x20a362['delete'](_0x5e9911);const _0xa5f7e2=new Map();for(const _0xfb69df of _0x448140){let _0x28664c=_0x403c26['insertions'][_0xfb69df];for(const _0x4adb66 of _0x28664c)if(_0x4adb66['item']['is']('element','tableCell')){const _0x38e0af=this['_getVidAttributeName'](_0x4adb66),_0x142291=_0x4adb66['item']['getAttribute'](_0x38e0af);if(_0x35ef76['has'](_0x142291)){const _0x1f6727=_0x4adb66['item']['parent']['parent']['getAttribute']('vid_start'),_0x3bca19=_0xa5f7e2['get'](_0x1f6727)||new Set();_0x3bca19['add'](_0x35ef76['get'](_0x142291)['userId']),_0xa5f7e2['set'](_0x1f6727,_0x3bca19);}}_0x28664c=_0x403c26['deletions'][_0xfb69df];for(const _0x4280e5 of _0x28664c)if(_0x4280e5['item']['is']('element','tableCell')){const _0x23890a=this['_getVidAttributeName'](_0x4280e5),_0x18c7f3=_0x4280e5['item']['getAttribute'](_0x23890a);if(_0x20a362['has'](_0x18c7f3)){const _0x21fc86=_0x4280e5['item']['parent']['parent']['getAttribute']('vid_start'),_0x249817=_0xa5f7e2['get'](_0x21fc86)||new Set();_0x249817['add'](_0x20a362['get'](_0x18c7f3)['userId']),_0xa5f7e2['set'](_0x21fc86,_0x249817);}}for(const _0x38e9ae of _0xa5f7e2['keys']())(_0x35ef76['has'](_0x38e9ae)||_0x20a362['has'](_0x38e9ae))&&_0xa5f7e2['delete'](_0x38e9ae);}for(const _0x3caae5 of _0x448140){const _0x103ce0=_0x403c26['insertions'][_0x3caae5];let _0x2eaa1f=null,_0x33a6a4=null;for(const _0x4adc30 of _0x103ce0){const _0x2b3871=this['_getVidAttributeName'](_0x4adc30),_0x408e8a=_0x4adc30['item']['getAttribute'](_0x2b3871),_0x5b2a9b=_0xa5f7e2['get'](_0x408e8a);_0x5b2a9b&&'elementStart'==_0x4adc30['type']&&(_0x2eaa1f=Array['from'](_0x5b2a9b)[0x0],_0x33a6a4=_0x4adc30['item']['getAttribute']('vid_end')),_0x2eaa1f&&(_0x20a362['set'](_0x408e8a,{'userId':_0x2eaa1f}),_0x35ef76['set'](_0x408e8a,{'userId':_0x2eaa1f})),_0x408e8a==_0x33a6a4&&(_0x2eaa1f=null,_0x33a6a4=null);}}const _0x460927={},_0x15cd4d=new Set();for(const _0x28c80a of _0x448140){const _0x4aada9=_0x3555cf['deletions'][_0x28c80a],_0xb66f95=_0x3555cf['insertions'][_0x28c80a];for(const {userId:_0x2a0055}of this['_touchedMarkers']['values']())null!==_0x2a0055&&_0x15cd4d['add'](_0x2a0055);for(const {userId:_0x2f0508}of this['_touchedRoots']['values']())null!==_0x2f0508&&_0x15cd4d['add'](_0x2f0508);this['_markChanges'](_0xb66f95,_0x403c26['insertions'][_0x28c80a],_0x35ef76,'insertion',_0x15cd4d),this['_markChanges'](_0x4aada9,_0x403c26['deletions'][_0x28c80a],_0x20a362,'deletion',_0x15cd4d),_0x460927[_0x28c80a]={'insertions':this['_prepareViewToSave'](_0xb66f95),'deletions':this['_prepareViewToSave'](_0x4aada9),'attachChange':this['_touchedRoots']['get'](_0x28c80a)||null,'attributesBefore':_0x2a882c(this['_baseRootsAttributes']['get'](_0x28c80a))||{},'attributesAfter':_0x2a882c(this['_diffRootsAttributes']['get'](_0x28c80a)),'rootElementName':_0x1ed4e7['get'](_0x28c80a)};}return{'diffData':_0x460927,'authorsIds':Array['from'](_0x15cd4d)};}['_processRootBeforeSave'](_0xbabb9c){for(const [,_0x6fe52]of _0xbabb9c['markers']){const _0x4e57af=_0x6fe52['start']['getAncestors']()['filter'](_0xdd3b22=>'tableCell'==_0xdd3b22['name']);for(const _0x52fbb3 of _0x4e57af)0x1==_0x52fbb3['childCount']&&_0x52fbb3['getChild'](0x0)['is']('element','paragraph')&&_0x52fbb3['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4267c3){this['_processRootBeforeSave'](_0x4267c3);const _0x137c36=this['editor']['data']['toView'](_0x4267c3,{}),_0x1c790a=Array['from'](_0x137c36['getChildren']())['map'](_0x278707=>this['_getViewJson'](_0x278707));return JSON['stringify'](_0x1c790a);}['_getViewJson'](_0x2b5047){if(_0x2b5047['is']('$text'))return _0x2b5047['data'];{const _0x4b64d7=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x3ab233=_0x2b5047,_0x20bab7=this['editor']['data']['htmlProcessor']['domConverter'],_0x26526d={'type':_0x4b64d7['_getTypeCharForViewElement'](_0x3ab233),'name':_0x3ab233['name'],'attributes':Array['from'](_0x3ab233['getAttributes']()),'children':Array['from'](_0x3ab233['getChildren']())['map'](_0x560351=>this['_getViewJson'](_0x560351))};if(_0x2b5047['is']('uiElement')&&'$comment'!=_0x2b5047['name']){const _0x47ec99=_0x2b5047['render'](_0x20bab7['domDocument'],_0x20bab7);_0x26526d['children']['push'](_0x47ec99['outerHTML']);}else{if(_0x2b5047['is']('rawElement')){const _0x17c4ab=_0x20bab7['domDocument']['createElement'](_0x3ab233['name']);_0x2b5047['render'](_0x17c4ab,_0x20bab7),_0x26526d['children']['push'](_0x17c4ab['innerHTML']);}}const _0x417131=Array['from'](_0x3ab233['getCustomProperties']());_0x417131['length']>0x0&&(_0x26526d['customProperties']=_0x417131);const _0x4b3374=_0x3ab233['getFillerOffset']();return null!==_0x4b3374&&(_0x26526d['fillerOffset']=_0x4b3374),_0x26526d;}}['_markChanges'](_0x27ad2f,_0x2b9c51,_0x2b0e67,_0x3dfad5,_0x5809fc){let _0x4d1c7d=null,_0x66f6e1=null,_0x382351=0x0;const _0x123767=this['editor']['model'];for(let _0x1e3d8d=0x0;_0x1e3d8d<_0x2b9c51['length'];_0x1e3d8d++){const _0x353076=this['_getVidAttributeName'](_0x2b9c51[_0x1e3d8d]),_0x24d4eb=_0x2b9c51[_0x1e3d8d]['item']['getAttribute'](_0x353076),_0x1e5d98=_0x2b0e67['get'](_0x24d4eb),_0x70e410=_0x1e3d8d==_0x2b9c51['length']-0x1;(!_0x4d1c7d&&_0x1e5d98&&(_0x4d1c7d=_0x1e5d98,_0x66f6e1=_0x2b9c51[_0x1e3d8d]),_0x4d1c7d&&(!_0x1e5d98||_0x1e5d98['userId']!=_0x4d1c7d['userId']))&&(_0x399bf9(_0x1e5d98,mt(_0x66f6e1,_0x27ad2f,_0x123767),mt(_0x2b9c51[_0x1e3d8d],_0x27ad2f,_0x123767)),_0x4d1c7d=_0x1e5d98||null,_0x66f6e1=_0x1e5d98?_0x2b9c51[_0x1e3d8d]:null),_0x4d1c7d&&_0x70e410&&_0x399bf9(_0x1e5d98,mt(_0x66f6e1,_0x27ad2f,_0x123767),pt(_0x2b9c51[_0x1e3d8d],_0x27ad2f,_0x123767));}function _0x399bf9(_0x83a1c0,_0x18d501,_0x23a995){const _0x1f510f=_0x4d1c7d['userId'],_0x56693f='revision:'+_0x3dfad5+':'+_0x1f510f+':'+_0x382351++,_0x4b5b5a=_0x123767['createRange'](_0x18d501,_0x23a995);_0x27ad2f['markers']['set'](_0x56693f,_0x4b5b5a),null!==_0x1f510f&&_0x5809fc['add'](_0x1f510f);}}['_getVidAttributeName'](_0x28ca54){switch(_0x28ca54['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x579043,_0x50e545){_0x579043['baseVersion']=null;for(const _0x47987b in _0x579043){const _0x44e2c8=_0x579043[_0x47987b];if(_0x44e2c8 instanceof _0x12b3d0){const _0x39e38c=_0x50e545['get'](_0x44e2c8['root']['rootName']);_0x579043[_0x47987b]=this['_fixPosition'](_0x44e2c8,_0x39e38c);}if(_0x44e2c8 instanceof _0x1f7a25){const _0x5ca462=_0x50e545['get'](_0x44e2c8['root']['rootName']);_0x579043[_0x47987b]=this['_fixRange'](_0x44e2c8,_0x5ca462);}'root'===_0x47987b&&(_0x579043['root']=_0x50e545['get'](_0x579043['root']['rootName']));}}['_fixRange'](_0xcad17c,_0x5cbd99){return this['editor']['model']['createRange'](this['_fixPosition'](_0xcad17c['start'],_0x5cbd99),this['_fixPosition'](_0xcad17c['end'],_0x5cbd99));}['_fixPosition'](_0x412f6a,_0x416721){return this['editor']['model']['createPositionFromPath'](_0x416721,_0x412f6a['path'],_0x412f6a['stickiness']);}['_handleInsertOperation'](_0x3ea382){const _0x47c219=this['_idsRoots']['get'](_0x3ea382['position']['root']['rootName']),_0x380c46=this['_fixPosition'](_0x3ea382['position'],_0x47c219),_0x456d65=null===_0x3ea382['_authorId']?null:_0x3ea382['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x329ad5=_0x380c46['parent'],_0x36f1ff=this['_revisionId'],_0x38781d=[];for(const _0x1bdfc0 of _0x3ea382['nodes'])if(_0x1bdfc0['is']('element'))_0x38781d['push'](this['_makeIdsRoot'](_0x1bdfc0));else{for(let _0x22551e=0x0;_0x22551e<_0x1bdfc0['offsetSize'];_0x22551e++)_0x38781d['push'](new _0x587783('$text',{'vid':this['_revisionId']++}));}const _0x149796=this['_revisionId'];for(let _0xeebfa5=_0x36f1ff;_0xeebfa5<_0x149796;_0xeebfa5++)this['_touched']['set'](_0xeebfa5,{'userId':_0x456d65});_0x329ad5['_insertChild'](_0x380c46['offset'],_0x38781d);}['_handleMoveOperation'](_0x86da6c){(_0x86da6c=this['_cloneOperation'](_0x86da6c,this['_idsRoots']))['_execute']();const _0x4d1c5d=null===_0x86da6c['_authorId']?null:_0x86da6c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x161300=_0x86da6c['getMovedRangeStart'](),_0x14cce1=_0x161300['parent'],_0x48c757=_0x161300['offset'];!function _0x30568f(_0x349292,_0x3d124e,_0x1d35a4,_0x489dc8){for(let _0x544c10=_0x1d35a4;_0x544c10<_0x489dc8;_0x544c10++){const _0x3d7c49=_0x3d124e['getChild'](_0x544c10);_0x3d7c49['is']('element','$text')?_0x349292['set'](_0x3d7c49['getAttribute']('vid'),{'userId':_0x4d1c5d}):(_0x349292['set'](_0x3d7c49['getAttribute']('vid_start'),{'userId':_0x4d1c5d}),_0x30568f(_0x349292,_0x3d7c49,0x0,_0x3d7c49['childCount']),_0x349292['set'](_0x3d7c49['getAttribute']('vid_end'),{'userId':_0x4d1c5d}));}}(this['_touched'],_0x14cce1,_0x48c757,_0x48c757+_0x86da6c['howMany']);}['_handleMergeOperation'](_0x99c0bf){const _0x220c64=null===(_0x99c0bf=this['_cloneOperation'](_0x99c0bf,this['_idsRoots']))['_authorId']?null:_0x99c0bf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2219c2=_0x99c0bf['targetPosition']['parent'],_0x1e7e61=_0x99c0bf['sourcePosition']['parent'],_0x1afdc1=_0x2219c2['getAttribute']('vid_end'),_0x31996f=_0x1e7e61['getAttribute']('vid_start');_0x2219c2['_setAttribute']('vid_end',_0x1e7e61['getAttribute']('vid_end')),_0x1e7e61['_setAttribute']('vid_end',_0x1afdc1),this['_touched']['set'](_0x31996f,{'userId':_0x220c64}),this['_touched']['set'](_0x1afdc1,{'userId':_0x220c64}),_0x99c0bf['_execute']();}['_handleSplitOperation'](_0xd4c577){const _0x4bfc3f=null===(_0xd4c577=this['_cloneOperation'](_0xd4c577,this['_idsRoots']))['_authorId']?null:_0xd4c577['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x460995=_0xd4c577['graveyardPosition'],_0x2b726a=_0xd4c577['splitPosition']['parent'];_0xd4c577['_execute']();const _0x23e325=_0x2b726a['getAttribute']('vid_end'),_0x43208b=_0xd4c577['insertionPosition']['nodeAfter'];if(_0x460995){const _0x22c797=_0x43208b['getAttribute']('vid_end'),_0x52ab19=_0x2b726a['getAttribute']('vid_end');_0x2b726a['_setAttribute']('vid_end',_0x22c797),_0x43208b['_setAttribute']('vid_end',_0x52ab19),this['_touched']['set'](_0x2b726a['getAttribute']('vid_end'),{'userId':_0x4bfc3f}),this['_touched']['set'](_0x43208b['getAttribute']('vid_start'),{'userId':_0x4bfc3f});}else{const _0x1f5d4a=this['_revisionId']++,_0x10f7c9=this['_revisionId']++;_0x2b726a['_setAttribute']('vid_end',_0x1f5d4a),_0x43208b['_setAttribute']('vid_start',_0x10f7c9),_0x43208b['_setAttribute']('vid_end',_0x23e325),this['_touched']['set'](_0x1f5d4a,{'userId':_0x4bfc3f}),this['_touched']['set'](_0x10f7c9,{'userId':_0x4bfc3f});}}['_handleMarkerOperation'](_0x49894d){if(!_0x49894d['affectsData'])return;const _0x7cb63a=(_0x49894d=this['_cloneOperation'](_0x49894d,this['_diffRoots']))['oldRange']?_0x49894d['oldRange']['root']:null,_0x493b2f=_0x49894d['newRange']?_0x49894d['newRange']['root']:null;_0x7cb63a&&this['_markers']['delete'](_0x49894d['name']),_0x493b2f&&this['_markers']['set'](_0x49894d['name'],_0x49894d['newRange']['clone']());const _0xf645b4=null===_0x49894d['_authorId']?null:_0x49894d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x59b868=_0x49894d['name'];if(!this['_touchedMarkers']['has'](_0x59b868))return void this['_touchedMarkers']['set'](_0x59b868,{'range':_0x49894d['oldRange'],'userId':_0xf645b4});const _0x36b082=this['_touchedMarkers']['get'](_0x59b868),_0x4d6d01=_0x36b082['range'],_0x28d913=_0x49894d['newRange'];null==_0x4d6d01&&null==_0x28d913||_0x4d6d01&&_0x28d913&&_0x4d6d01['isEqual'](_0x28d913)?this['_touchedMarkers']['delete'](_0x49894d['name']):_0x36b082['userId']=_0xf645b4;}['_handleRootOperation'](_0x223e11,_0x322966){this['_diffRoots']['has'](_0x223e11['rootName'])?this['_diffRoots']['get'](_0x223e11['rootName'])['_isAttached']=_0x223e11['isAdd']:(this['_diffRoots']['set'](_0x223e11['rootName'],wt(_0x223e11['rootName'],_0x223e11['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x223e11['rootName'],{}),_0x322966&&this['_idsRoots']['set'](_0x223e11['rootName'],wt(_0x223e11['rootName'],_0x223e11['elementName'],!0x0)));const _0x22da36=null===_0x223e11['_authorId']?null:_0x223e11['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5c54fb=this['_touchedRoots']['get'](_0x223e11['rootName']);_0x5c54fb&&_0x5c54fb['userId']===_0x22da36?this['_touchedRoots']['delete'](_0x223e11['rootName']):this['_touchedRoots']['set'](_0x223e11['rootName'],{'userId':_0x22da36,'isAttached':_0x223e11['isAdd']});}['_handleRootAttributeOperation'](_0x203cf1){const _0x27d31f=this['_diffRootsAttributes']['get'](_0x203cf1['root']['rootName']);null===_0x203cf1['newValue']?delete _0x27d31f[_0x203cf1['key']]:_0x27d31f[_0x203cf1['key']]=_0x203cf1['newValue'];}}function gt(_0x1d39e4){const _0x707dc=wt(_0x1d39e4['rootName'],_0x1d39e4['name'],_0x1d39e4['isAttached']());for(const _0x361225 of _0x1d39e4['getChildren']()){const _0x53c9e8=_0x361225['_clone'](!0x0);_0x707dc['_appendChild'](_0x53c9e8);}return _0x707dc;}function wt(_0x3856bf,_0x244a8e,_0x5e67ab=!0x0){const _0x4cfc46=new _0x23d676();return _0x4cfc46['rootName']=_0x3856bf,_0x4cfc46['name']=_0x244a8e,_0x4cfc46['_isAttached']=_0x5e67ab,_0x4cfc46['isAttached']=()=>_0x4cfc46['_isAttached'],_0x4cfc46;}function mt(_0x2743bb,_0xcf64a9,_0x433d7c){const _0x1e4862='elementEnd'==_0x2743bb['type']?_0x433d7c['createPositionAt'](_0x2743bb['item'],'end'):_0x433d7c['createPositionBefore'](_0x2743bb['item']);return _0x433d7c['createPositionFromPath'](_0xcf64a9,_0x1e4862['path'],_0x1e4862['stickiness']);}function pt(_0x3e2eff,_0x4b96e7,_0x4e9c1a){const _0x4e3a86='elementStart'==_0x3e2eff['type']?_0x4e9c1a['createPositionAt'](_0x3e2eff['item'],0x0):_0x4e9c1a['createPositionAfter'](_0x3e2eff['item']);return _0x4e9c1a['createPositionFromPath'](_0x4b96e7,_0x4e3a86['path'],_0x4e3a86['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
25
+ _0x59269f(_0x5c0571){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x204edd,_0x1ae8a8){super(_0x204edd),this['focusTracker']=new _0x5dcc57(),this['keystrokes']=new _0x45f686(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1ae8a8),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x207f90({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2889d0=_0x4c93e2=>_0x4c93e2['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2889d0),this['keystrokes']['set']('arrowleft',_0x2889d0),this['keystrokes']['set']('arrowup',_0x2889d0),this['keystrokes']['set']('arrowdown',_0x2889d0);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4e76f3){this['revisionNameInputView']['fieldView']['element']['value']=_0x4e76f3['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x30271a){const _0x50aad0=new _0x46d49f(this['locale'],_0x515ec4),_0x2b3002=_0x50aad0['fieldView'];_0x2b3002['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x519182=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x30271a&&(_0x519182+='\x20('+ft(this['locale'],'optional')+')'),(_0x50aad0['label']=_0x519182,_0x2b3002['on']('input',()=>{this['revisionNameInputValue']=_0x2b3002['element']['value']['trim']();}),_0x50aad0);}}class RevisionHistoryUI extends _0x20daab{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x388c19=this['editor'],_0x4ef984=_0x388c19['plugins']['get']('RevisionTracker');_0x388c19['ui']['componentFactory']['add']('revisionHistory',_0x31bf39=>{const _0x5d5a7c=_0x16d7f1(_0x31bf39),_0x31b97a=_0x5d5a7c['panelView']['children'],_0x443dce=new _0x5a819b(_0x31bf39),_0x3fd7bd=new _0x13a593(_0x31bf39),_0x4cde7e=this['_createSaveRevisionButton'](_0x48a0f1),_0xfe3610=new _0x13a593(_0x31bf39),_0x121096=this['_createOpenRevisionButton'](_0x48a0f1);return _0x5d5a7c['bind']('isEnabled')['to'](_0x4ef984,'isReady',_0x4ef984,'isEnabled',_0x388c19,'isReadOnly',(_0x2fe1a2,_0x9f3da7,_0x51a9c9)=>_0x2fe1a2&&_0x9f3da7&&!_0x51a9c9),_0x5d5a7c['buttonView']['set']({'icon':_0x1681be,'label':ft(_0x31bf39,'Revision\x20history'),'tooltip':!0x0}),_0x4cde7e['set']({'withText':!0x0,'role':'menuitem'}),_0x121096['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x121096,'execute',()=>{_0x5d5a7c['isOpen']=!0x1,_0x388c19['editing']['view']['focus']();},{'priority':'low'}),_0x3fd7bd['children']['add'](_0x4cde7e),_0xfe3610['children']['add'](_0x121096),_0x443dce['role']='menu',_0x443dce['items']['addMany']([_0x3fd7bd,_0xfe3610]),_0x31b97a['add'](_0x443dce),_0x5d5a7c;}),_0x388c19['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3fb514=this['editor'],_0x4e5a45=_0x3fb514['locale'],_0x2b165b=_0x3fb514['plugins']['get']('RevisionTracker'),_0x4ceacf=new _0x20b172(_0x4e5a45),_0x5da8f9=new _0x30b9b5(_0x4e5a45);_0x4ceacf['bind']('isEnabled')['to'](_0x2b165b,'isReady',_0x2b165b,'isEnabled',_0x3fb514,'isReadOnly',(_0x314ffa,_0xb6029d,_0x3aacb5)=>_0x314ffa&&_0xb6029d&&!_0x3aacb5),_0x4ceacf['buttonView']['set']({'icon':_0x1681be,'label':ft(_0x4e5a45,'Revision\x20history')});const _0x1d4ec4=new tt(_0x4e5a45,_0x4ceacf),_0x2854b4=this['_createSaveRevisionButton'](it);_0x2854b4['delegate']('execute')['to'](_0x4ceacf),_0x1d4ec4['children']['add'](_0x2854b4),_0x5da8f9['items']['add'](_0x1d4ec4);const _0x369664=new tt(_0x4e5a45,_0x4ceacf),_0x171492=this['_createOpenRevisionButton'](it);return _0x171492['delegate']('execute')['to'](_0x4ceacf),_0x369664['children']['add'](_0x171492),_0x5da8f9['items']['add'](_0x369664),_0x4ceacf['panelView']['children']['add'](_0x5da8f9),_0x4ceacf;}['_createSaveRevisionButton'](_0x204db0){const _0x2c78ec=this['editor'],_0xf94c19=_0x2c78ec['plugins']['get']('RevisionTracker'),_0x4d1024=new _0x204db0(_0x2c78ec['locale']);return _0x4d1024['set']({'label':ft(_0x2c78ec['locale'],'Save\x20current\x20revision')}),_0x4d1024['bind']('isEnabled')['to'](_0xf94c19,'isReady',_0xf94c19,'isEnabled',_0x2c78ec,'isReadOnly',(_0x6ddb4b,_0x4d1046,_0x5a15ec)=>_0x6ddb4b&&_0x4d1046&&!_0x5a15ec),this['listenTo'](_0x4d1024,'execute',()=>{this['_showDialog']();}),_0x4d1024;}['_createOpenRevisionButton'](_0x4bb9bb){const _0x48cd5d=this['editor'],_0x21b945=_0x48cd5d['plugins']['get']('RevisionTracker'),_0x2cabf0=new _0x4bb9bb(_0x48cd5d['locale']);return _0x2cabf0['set']({'label':ft(_0x48cd5d['locale'],'Open\x20revision\x20history')}),_0x2cabf0['bind']('isEnabled')['to'](_0x21b945,'isReady',_0x48cd5d,'isReadOnly',(_0x5e4767,_0x467c77)=>_0x5e4767&&!_0x467c77),this['listenTo'](_0x2cabf0,'execute',()=>{_0x48cd5d['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x2cabf0;}['_showDialog'](){const _0x90f688=this['editor'],_0x623f2=_0x90f688['locale'],_0x27ecb4=_0x90f688['plugins']['get']('Dialog'),_0x244694=_0x90f688['plugins']['get']('RevisionTracker');function _0x10fb62(_0x4387d5){_0x90f688['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4387d5['revisionName']?_0x4387d5['revisionNameInputView']['errorText']=ft(_0x623f2,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x90f688['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x4387d5['revisionName']}),_0x27ecb4['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x10fb62(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x27ecb4['show']({'id':'revisionSave','title':ft(_0x623f2,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x90f688['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x27ecb4['hide']()},{'label':ft(_0x90f688['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x2202f8){_0x2202f8['bind']('isEnabled')['to'](_0x244694,'isReady',_0x244694,'isEnabled',_0x90f688,'isReadOnly',(_0x515e94,_0x50f52c,_0x50a6a1)=>_0x515e94&&_0x50f52c&&!_0x50a6a1);},'onExecute':()=>_0x10fb62(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x4e910d=this['editor'],_0x5745a7=_0x4e910d['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x5745a7,_0x4e910d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x5c0571{['changeId'];['_model'];constructor(_0x254353,_0x34d037){super(_0x254353),this['_model']=_0x34d037,this['changeId']=_0x34d037['id'];const _0x4d8fce=this['bindTemplate'],_0x232a46=ft(_0x254353,_0x34d037['data']['isSuggestion']?'Suggested\x20by':'add'==_0x34d037['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x34d037['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4d8fce['to']('type',_0x8c44ac=>'ck-revision-change__'+_0x8c44ac)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x232a46}]},{'text':'\x20'+_0x34d037['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
26
+ _0x3f7e8f(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x34127f){super(),this['id']=_0x34127f['id']||_0x13bc90(),this['author']=_0x34127f['author'],this['type']=_0x34127f['type'],this['data']=_0x34127f['data']||{},this['rootName']=_0x34127f['rootName'],this['set']('createdAt',_0x34127f['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x47c701,_0x1ae1b9){this['newRevisionId']=_0x47c701,this['oldRevisionId']=_0x1ae1b9,this['changes']=new _0x2d3a61();}['_setChanges'](_0x559bda){for(const _0x392257 of _0x559bda)this['changes']['add'](_0x392257);}}class RevisionViewer extends _0x20daab{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xf95694,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x391f33){super(_0x391f33),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x2d59e2,_0x9e6559,_0x3d44ef)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x278385=>{for(const _0x1cf5ee of this['editor']['editing']['view']['document']['roots'])_0x3d44ef?_0x278385['removeClass']('ck-editor__editable__overlay',_0x1cf5ee):_0x278385['addClass']('ck-editor__editable__overlay',_0x1cf5ee);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4c2acc=>null!==_0x4c2acc),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1ee4bd,_0x58fa57,_0x3b033a)=>_0x1ee4bd&&_0x3b033a?_0x58fa57['changes']['getIndex'](_0x3b033a):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5345cb,_0x30c86e)=>_0x5345cb?_0x30c86e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x1cf6a4=this['editor'],_0x4117d2=new ShowChangeCommand(_0x1cf6a4,{'direction':'backward'}),_0x950f2b=new ShowChangeCommand(_0x1cf6a4,{'direction':'forward'});(_0x1cf6a4['commands']['add']('showPreviousChange',_0x4117d2),_0x1cf6a4['commands']['add']('showNextChange',_0x950f2b),_0x1cf6a4['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x1cf6a4)),this['on']('change:numberOfChanges',()=>{_0x4117d2['refresh'](),_0x950f2b['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1cf6a4['enableReadOnlyMode']('revision-viewer'),_0x1cf6a4['plugins']['has']('WidgetToolbarRepository'))&&_0x1cf6a4['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x541d17){return await this['_utils']['loadRevisionData'](_0x541d17,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x541d17);}async['getRevisionRootsAttributes'](_0x167c7a){return await this['_utils']['loadRevisionData'](_0x167c7a,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x167c7a);}async['compare'](_0x2bece5,_0x17e1a3,_0x2c48be=!0x1){if(!this['isEnabled'])return;const _0x5af92f=this['diff'],_0x38debd=this['repository'],_0x1db981='string'==typeof _0x2bece5?_0x38debd['getRevision'](_0x2bece5):_0x2bece5,_0x43e17c='string'==typeof _0x17e1a3?_0x38debd['getRevision'](_0x17e1a3):_0x17e1a3,_0x1a7a91=_0x1db981['id'],_0x3fc422=_0x43e17c?_0x43e17c['id']:null;if(!_0x2c48be&&this['diff']&&this['diff']['newRevisionId']===_0x1a7a91&&this['diff']['oldRevisionId']===_0x3fc422)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x1a7a91,_0x3fc422);const _0x2fd95f=this['_getRevisionsRange'](_0x1db981,_0x43e17c,!0x0)['map'](_0x2c6edd=>this['_utils']['loadRevisionData'](_0x2c6edd,this['adapter']));return _0x2fd95f['push'](new Promise(_0x1046ae=>{setTimeout(_0x1046ae,0x14);})),Promise['all'](_0x2fd95f)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x54735a=this['_getDiff'](_0x1a7a91,_0x3fc422);for(const _0x466043 of _0x54735a['changes'])this['_changeIdToChange']['set'](_0x466043['id'],_0x466043);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x16b827=>{for(const _0x37aa0c of this['editor']['model']['document']['getRootNames']())_0x16b827['detachRoot'](_0x37aa0c);for(const _0x320edc of Object['keys'](_0x54735a['model'])){const _0x49bf49=_0x54735a['model'][_0x320edc]['name'],_0x225a71=_0x16b827['addRoot'](_0x320edc,_0x49bf49);for(const _0x1ad17d of Object['keys'](_0x54735a['attributes'][_0x320edc]))_0x16b827['setAttribute'](_0x1ad17d,_0x54735a['attributes'][_0x320edc][_0x1ad17d],_0x225a71);_0x16b827['insert'](_0x54735a['model'][_0x320edc],_0x225a71,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x54735a['changes'])),this['isReady']=!0x0;})['catch'](_0xb44239=>{console['error'](_0xb44239),this['_cleanUp'](),_0x5af92f&&(this['diff']=_0x5af92f),this['isReady']=!0x0;});}['addRevisionData'](_0x475358,_0x4fb2fa){const _0x92ce6d=this['repository']['createRevision'](_0x475358);return _0x92ce6d['on']('_update',(_0x77418c,_0x1ed8e0,_0x7c7f93)=>_0x4fb2fa(_0x1ed8e0,_0x7c7f93,_0x92ce6d)),this['repository']['addRevision'](_0x92ce6d),_0x92ce6d;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x33ceab=>{for(const _0x332e19 of this['editor']['model']['document']['getRootNames']())_0x33ceab['detachRoot'](_0x332e19);});}['_sortAndFilterDiffChanges'](_0x4f531b){const _0x14a691=[],_0x637281=new Map();for(const _0x1c2184 of this['editor']['model']['document']['getRootNames']()){const _0x4dd561=this['editor']['editing']['view']['getDomRoot'](_0x1c2184);if(!_0x4dd561)continue;const _0x24f7ca=_0x4dd561['getClientRects']()['item'](0x0);_0x24f7ca&&(_0x14a691['push'](_0x1c2184),_0x637281['set'](_0x1c2184,_0x24f7ca));}return _0x14a691['sort']((_0x15c751,_0x3f269c)=>{const _0x4bf4d2=_0x637281['get'](_0x15c751),_0x51fef5=_0x637281['get'](_0x3f269c);return _0x4bf4d2['y']-_0x51fef5['y']||_0x4bf4d2['x']-_0x51fef5['x'];}),(_0x4f531b=_0x4f531b['filter'](_0x508cb5=>_0x14a691['includes'](_0x508cb5['rootName'])))['sort']((_0x393445,_0x551429)=>_0x14a691['indexOf'](_0x393445['rootName'])-_0x14a691['indexOf'](_0x551429['rootName'])),_0x4f531b;}['_makeTape'](_0x3627a0){const _0x377108=Array['from'](_0x3627a0['markers'])['filter'](([_0xcd574d,_0x3d82a7])=>_0xcd574d['startsWith']('revision:')&&!_0x3d82a7['isCollapsed']),_0x4f8f42=Array['from'](this['editor']['model']['createRangeIn'](_0x3627a0)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x377108['length'])for(const _0x3dc63c of _0x4f8f42){const [_0xfbd2c1,_0x61f5bc]=_0x377108[0x0],[,_0x4d5fec,_0x3fc200]=_0xfbd2c1['split'](':');if(_0x61f5bc['end']['isEqual'](_0x3dc63c['nextPosition'])&&_0x377108['shift'](),(_0x3dc63c['previousPosition']['isEqual'](_0x61f5bc['start'])||_0x3dc63c['previousPosition']['isAfter'](_0x61f5bc['start']))&&('insertion'==_0x4d5fec?_0x3dc63c['isAdded']={'userId':_0x3fc200}:'deletion'==_0x4d5fec&&(_0x3dc63c['isRemoved']={'userId':_0x3fc200})),0x0==_0x377108['length'])break;}return _0x4f8f42;}['_refreshStartEndIndex'](_0x346a0d){const _0x31a1c1=new Map();for(let _0x43e26c=0x0;_0x43e26c<_0x346a0d['length'];_0x43e26c++)'text'===_0x346a0d[_0x43e26c]['type']?(_0x346a0d[_0x43e26c]['item']['startIndex']=_0x43e26c,_0x346a0d[_0x43e26c]['item']['endIndex']=_0x43e26c):('elementStart'===_0x346a0d[_0x43e26c]['type']?_0x346a0d[_0x43e26c]['item']['startIndex']=_0x43e26c:'elementEnd'===_0x346a0d[_0x43e26c]['type']&&(_0x346a0d[_0x43e26c]['item']['endIndex']=_0x43e26c),_0x31a1c1['set'](_0x346a0d[_0x43e26c]['id'],_0x43e26c));for(const _0x4a260c of _0x31a1c1['values']())'elementStart'===_0x346a0d[_0x4a260c]['type']?_0x346a0d[_0x4a260c]['item']['endIndex']=_0x31a1c1['get'](_0x346a0d[_0x4a260c]['pairId']):'elementEnd'===_0x346a0d[_0x4a260c]['type']&&(_0x346a0d[_0x4a260c]['item']['startIndex']=_0x31a1c1['get'](_0x346a0d[_0x4a260c]['pairId']));}['_processTape'](_0x5d847a){for(let _0x47cb4e=0x0;_0x47cb4e<_0x5d847a['length'];_0x47cb4e++){if('elementStart'===_0x5d847a[_0x47cb4e]['type'])_0x5d847a[_0x47cb4e]['item']['startIndex']=_0x47cb4e;else{if('elementEnd'===_0x5d847a[_0x47cb4e]['type']){_0x5d847a[_0x47cb4e]['item']['endIndex']=_0x47cb4e;const _0x429db4=_0x5d847a[_0x47cb4e]['item']['startIndex'];_0x5d847a[_0x429db4]['pairId']=_0x5d847a[_0x47cb4e]['id'],_0x5d847a[_0x47cb4e]['pairId']=_0x5d847a[_0x429db4]['id'];}else _0x5d847a[_0x47cb4e]['item']['startIndex']=_0x47cb4e,_0x5d847a[_0x47cb4e]['item']['endIndex']=_0x47cb4e,_0x5d847a[_0x47cb4e]['pairId']=null;}_0x5d847a[_0x47cb4e]['markersStart']||(_0x5d847a[_0x47cb4e]['markersStart']=[],_0x5d847a[_0x47cb4e]['markersEnd']=[]);}}['_markInsertions'](_0x11c314,_0x5d4dde){const _0x258ac5=_0x11c314['filter'](_0x3a69b5=>!_0x3a69b5['isAdded']);for(let _0xe8c734=0x0;_0xe8c734<_0x5d4dde['length'];_0xe8c734++)_0x5d4dde[_0xe8c734]['isAdded']&&(_0x258ac5[_0xe8c734]['isAdded']=_0x5d4dde[_0xe8c734]['isAdded']);}['_getDiff'](_0x11e822,_0x49b7c5=null){const _0x2fade0=this['repository']['getRevision'](_0x11e822),_0x220d1f=_0x49b7c5?this['repository']['getRevision'](_0x49b7c5):null,_0x58834c=this['_getRevisionsRange'](_0x2fade0,_0x220d1f),_0x180972=_0x58834c[_0x58834c['length']-0x1],_0x591dec=new Map(),_0x1d8f90={'model':{},'attributes':{},'changes':[]},_0x1dc77b=new Set(),_0x4180b7=new Map();for(let _0x47b90c=_0x58834c['length']-0x1;_0x47b90c>=0x0;_0x47b90c--){const _0x1ba615=_0x58834c[_0x47b90c];for(const _0x2ee4e7 of Object['keys'](_0x1ba615['diffData']))if(_0x1ba615['diffData'][_0x2ee4e7]['attachChange']){const _0xaa97e7=_0x1ba615['diffData'][_0x2ee4e7]['attachChange'];_0xaa97e7['isAttached']?(_0x1dc77b['add'](_0x2ee4e7),_0x4180b7['has'](_0x2ee4e7)&&_0x4180b7['get'](_0x2ee4e7)['userId']==_0xaa97e7['userId']?_0x4180b7['delete'](_0x2ee4e7):_0x4180b7['set'](_0x2ee4e7,_0xaa97e7)):_0x4180b7['has'](_0x2ee4e7)?(_0x1dc77b['delete'](_0x2ee4e7),_0x4180b7['delete'](_0x2ee4e7)):(_0x1dc77b['add'](_0x2ee4e7),_0x4180b7['set'](_0x2ee4e7,_0xaa97e7));}else _0x1dc77b['add'](_0x2ee4e7);}for(const _0x534ede of _0x1dc77b){const _0x5db505=_0x4180b7['has'](_0x534ede)&&!_0x4180b7['get'](_0x534ede)['isAttached'];let _0x5e087e=_0x5db505?_0x58834c['length']-0x1:0x0;const _0x326b41=_0x5db505?-0x1:0x1;for(;_0x58834c[_0x5e087e];){const _0x56d8dc=_0x58834c[_0x5e087e];if(_0x56d8dc['diffData'][_0x534ede]){const _0x25c5c1=_0x5db505?_0x56d8dc['diffData'][_0x534ede]['attributesBefore']:_0x56d8dc['diffData'][_0x534ede]['attributesAfter'];_0x1d8f90['attributes'][_0x534ede]=_0x25c5c1?_0x2a882c(_0x25c5c1):{};break;}_0x5e087e+=_0x326b41;}}for(const _0x1d22e9 of _0x58834c){_0x1d22e9['model']={};for(const _0x581b70 of _0x1d22e9['authors'])_0x591dec['set'](_0x581b70['id'],_0x581b70);for(const _0x156748 of _0x1dc77b){const _0x1eee4d=_0x1d22e9['diffData'][_0x156748]?_0x1d22e9['diffData'][_0x156748]['insertions']:'[]',_0x37f495=_0x1d22e9['diffData'][_0x156748]?_0x1d22e9['diffData'][_0x156748]['deletions']:'[]',_0x272119=_0x1d22e9['diffData'][_0x156748]?.['rootElementName']||'$root';_0x1d22e9['model'][_0x156748]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1eee4d,_0x272119),'deletions':this['_utils']['_makeModelFromViewString'](_0x37f495,_0x272119)};}}for(const _0x54096c of _0x1dc77b){let _0x34c52e=null,_0x447cab=0x0;const _0x1c168f=_0x58834c['map'](_0x10cb0c=>_0x10cb0c['diffData'][_0x54096c]?.['rootElementName'])['find'](_0x275fe8=>void 0x0!==_0x275fe8)||'$root',_0x5392da=new Map(Array['from'](_0x2fade0['model'][_0x54096c]['insertions']['markers'])['filter'](([_0x459b5e])=>!_0x459b5e['startsWith']('revision:')));let _0x1921f6=0x0;for(const _0x145650 of _0x58834c){const _0x5046a4=this['_makeTape'](_0x145650['model'][_0x54096c]['insertions']);_0x145650==_0x2fade0?(_0x34c52e=_0x5046a4,_0x447cab=_0x34c52e['length'],_0x34c52e['forEach'](_0x205a86=>{_0x205a86['id']=_0x1921f6++;}),this['_processTape'](_0x34c52e)):this['_markInsertions'](_0x34c52e,_0x5046a4);const _0x387c83=_0x34c52e['filter'](_0x498631=>!_0x498631['isAdded'])['map'](_0xcd10f9=>_0xcd10f9['id']);let _0x4b0c0c=0x0;const _0xc38869=this['_makeTape'](_0x145650['model'][_0x54096c]['deletions']);_0xc38869['forEach'](_0x1a8e61=>{_0x1a8e61['isRemoved']?_0x1a8e61['id']=_0x447cab++:_0x1a8e61['id']=_0x387c83[_0x4b0c0c++];}),this['_processTape'](_0xc38869),this['_setDistance'](_0x34c52e,'isAdded'),this['_setDistance'](_0xc38869,'isRemoved'),_0x145650==_0x2fade0&&this['_markMarkers'](_0x34c52e,_0x5392da),_0x34c52e=this['_joinTapes'](_0x34c52e,_0xc38869),this['_refreshStartEndIndex'](_0x34c52e),this['_setDistance'](_0x34c52e,'isRemoved');}_0x34c52e=_0x34c52e['filter'](_0x4994e1=>!(_0x4994e1['isAdded']&&_0x4994e1['isRemoved']));const _0x55d263=new Map(_0x180972['model'][_0x54096c]['deletions']['markers']),_0x38d55a=new Set(_0x5392da['keys']());for(const _0x50210d of _0x55d263['keys']())_0x38d55a['delete'](_0x50210d);this['_markSuggestions'](_0x34c52e,_0x38d55a),this['_fixObsoleteTags'](_0x34c52e),_0x34c52e=this['_removeMissingPairs'](_0x34c52e),_0x34c52e=this['_markMismatchedRemovedTags'](_0x34c52e),_0x34c52e=this['_removeUnsupportedChanges'](_0x34c52e);const {root:_0x5d3391,changes:_0x219d8a}=this['_makeModelFromTape'](_0x34c52e,_0x591dec,_0x54096c,_0x1c168f);_0x1d8f90['model'][_0x54096c]=_0x5d3391;const _0x4699d6=_0x4180b7['get'](_0x54096c);if(_0x4699d6){const _0x5bfe7b=_0x591dec['get'](_0x4699d6['userId']),_0x39fb5f=new ChangeItem({'author':_0x5bfe7b,'type':_0x4699d6['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x54096c});_0x219d8a['unshift'](_0x39fb5f),_0x1d8f90['attributes'][_0x54096c]['revisionHistoryAttachChange']=_0x39fb5f['id'];}_0x1d8f90['changes']=_0x1d8f90['changes']['concat'](_0x219d8a);}return _0x1d8f90;}['_markMarkers'](_0x424fd6,_0x19c819){for(let _0x366e4e=0x0;_0x366e4e<_0x424fd6['length'];_0x366e4e++)for(const [_0x3a8f38,_0x67a64e]of _0x19c819)!_0x67a64e['isCollapsed']&&_0x67a64e['start']['isEqual'](_0x424fd6[_0x366e4e]['previousPosition'])&&_0x424fd6[_0x366e4e]['markersStart']['push'](_0x3a8f38),_0x67a64e['end']['isEqual'](_0x424fd6[_0x366e4e]['nextPosition'])&&_0x424fd6[_0x366e4e]['markersEnd']['push'](_0x3a8f38);}['_joinTapes'](_0x316f3b,_0x1829d3){let _0x817ac5=[],_0x5f2a21=0x0,_0x527cc6=0x0;for(;_0x5f2a21<_0x316f3b['length']||_0x527cc6<_0x1829d3['length'];){const _0x2bb29=_0x316f3b[_0x5f2a21]||{},_0x4c65d0=_0x1829d3[_0x527cc6]||{};if(_0x2bb29['id']==_0x4c65d0['id'])_0x5f2a21++,_0x527cc6++,_0x817ac5['push'](_0x2bb29);else{if(_0x4c65d0['isRemoved']&&_0x2bb29['isAdded']){const {commonTape:_0x38d69c,iEnd:_0x1a51cd,jEnd:_0x5644aa}=this['_threeWayMerge'](_0x316f3b,_0x5f2a21,_0x1829d3,_0x527cc6);_0x817ac5=_0x817ac5['concat'](_0x38d69c),_0x5f2a21=_0x1a51cd,_0x527cc6=_0x5644aa;}else _0x4c65d0['isRemoved']?(_0x527cc6++,_0x817ac5['push'](_0x4c65d0)):(_0x5f2a21++,_0x817ac5['push'](_0x2bb29));}}return _0x817ac5;}['_markSuggestions'](_0x53c2ef,_0x1b7d3c){const _0x518c89=[];for(let _0x314a48=0x0;_0x314a48<_0x53c2ef['length'];_0x314a48++){for(let _0x116c5b=0x0;_0x116c5b<_0x53c2ef[_0x314a48]['markersStart']['length'];_0x116c5b++){const _0xd0f5fd=_0x53c2ef[_0x314a48]['markersStart'][_0x116c5b];if(!_0x1b7d3c['has'](_0xd0f5fd))continue;const {group:_0x49a8f4,type:_0xb8180a,authorId:_0x4a227e}=_0x390ae7(_0xd0f5fd);'revision-suggestion'!=_0x49a8f4||'insertion'!=_0xb8180a&&'deletion'!=_0xb8180a||(_0x518c89['unshift']({'type':_0xb8180a,'name':_0xd0f5fd,'userId':_0x4a227e}),_0x53c2ef[_0x314a48]['markersStart']['splice'](_0x116c5b,0x1),_0x116c5b--);}_0x2cad87(_0x53c2ef[_0x314a48]);for(let _0x17bbc2=0x0;_0x17bbc2<_0x53c2ef[_0x314a48]['markersEnd']['length'];_0x17bbc2++){const _0x47b3f7=_0x53c2ef[_0x314a48]['markersEnd'][_0x17bbc2];if(!_0x1b7d3c['has'](_0x47b3f7))continue;const {group:_0x3d07bf,type:_0x4a927d}=_0x390ae7(_0x47b3f7);if('revision-suggestion'!=_0x3d07bf||'insertion'!=_0x4a927d&&'deletion'!=_0x4a927d)continue;_0x53c2ef[_0x314a48]['markersEnd']['splice'](_0x17bbc2,0x1),_0x17bbc2--;const _0x2b7049=_0x518c89['findIndex'](_0x462550=>_0x462550['name']==_0x47b3f7);_0x2b7049>-0x1&&_0x518c89['splice'](_0x2b7049,0x1);}}function _0x390ae7(_0x383c2a){const _0x5ae59b=_0x383c2a['split'](':');return{'group':_0x5ae59b[0x0],'type':_0x5ae59b[0x1],'subType':_0x5ae59b['length']>=0x5?_0x5ae59b[0x2]:null,'id':_0x5ae59b['length']<0x5?_0x5ae59b[0x2]:_0x5ae59b[0x3],'authorId':_0x5ae59b['length']<0x5?_0x5ae59b[0x3]:_0x5ae59b[0x4],'markerCount':0x6==_0x5ae59b['length']?_0x5ae59b[0x5]:null};}function _0x2cad87(_0x55f873){for(let _0x25ec66=0x0;_0x25ec66<_0x518c89['length'];_0x25ec66++){if(_0x55f873['isAdded']&&'insertion'==_0x518c89[_0x25ec66]['type']&&_0x55f873['isAdded']['userId']==_0x518c89[_0x25ec66]['userId'])return _0x55f873['isAddSuggestion']=_0x518c89[_0x25ec66],void delete _0x55f873['isAdded'];if(!_0x55f873['isAdded']&&!_0x55f873['isRemoved']&&'deletion'==_0x518c89[_0x25ec66]['type'])return void(_0x55f873['isRemoveSuggestion']=_0x518c89[_0x25ec66]);}}}['_setDistance'](_0x2c9e01,_0x5bfc67){let _0x2a60ac=0x0,_0x5afe80=!0x1;const _0x1ac61f=new Map();for(const _0x4b71f6 of _0x2c9e01)_0x4b71f6[_0x5bfc67]?_0x5afe80&&(_0x2a60ac++,_0x5afe80=!0x1):(_0x2a60ac++,_0x5afe80=!0x0),_0x1ac61f['set'](_0x4b71f6['id'],_0x2a60ac);for(let _0x538851=0x0;_0x538851<_0x2c9e01['length'];_0x538851++){if('isRemoved'==_0x5bfc67&&_0x2c9e01[_0x538851]['isAdded']||'isAdded'==_0x5bfc67&&_0x2c9e01[_0x538851]['isRemoved'])continue;if('text'==_0x2c9e01[_0x538851]['type']){_0x2c9e01[_0x538851]['distance']=0x0;continue;}const _0x4d9aeb=_0x1ac61f['get'](_0x2c9e01[_0x538851]['pairId']),_0x2af103=_0x1ac61f['get'](_0x2c9e01[_0x538851]['id']);_0x2c9e01[_0x538851]['distance']=_0x4d9aeb-_0x2af103;}}['_getRevisionsRange'](_0x3541bb,_0x1119d2,_0x302283=!0x1){const _0x1c13c4=[];let _0x408abb=this['repository']['getIndex'](_0x3541bb),_0x31a6dc=this['repository']['getIndex'](_0x1119d2);for(-0x1==_0x31a6dc&&(_0x31a6dc=this['repository']['_revisions']['length'],_0x302283=!0x1);_0x408abb<_0x31a6dc;)_0x1c13c4['push'](this['repository']['getRevision'](_0x408abb)),_0x408abb++;return _0x302283&&_0x1c13c4['push'](this['repository']['getRevision'](_0x408abb)),_0x1c13c4;}['_threeWayMerge'](_0x49c735,_0x46d073,_0x62c0b1,_0x22d355){const _0x1760b3=this['editor']['model']['schema'];let _0x55bb6c=_0x46d073;for(;_0x49c735[_0x55bb6c]&&_0x49c735[_0x55bb6c]['isAdded'];)_0x55bb6c++;let _0x4de1c9=_0x22d355;for(;_0x62c0b1[_0x4de1c9]&&_0x62c0b1[_0x4de1c9]['isRemoved'];)_0x4de1c9++;_0x501d65(_0x49c735,_0x46d073,_0x55bb6c),_0x501d65(_0x62c0b1,_0x22d355,_0x4de1c9);const _0x1996e8=_0x62c0b1['slice'](_0x22d355,_0x4de1c9)['concat'](_0x49c735['slice'](_0x46d073,_0x55bb6c));return _0x1996e8['sort']((_0x238fd5,_0x324a)=>_0x238fd5['side']!=_0x324a['side']?_0x238fd5['side']-_0x324a['side']:_0x238fd5['level']!=_0x324a['level']?_0x238fd5['level']-_0x324a['level']:_0x238fd5['distance']!=_0x324a['distance']?_0x324a['distance']-_0x238fd5['distance']:!!_0x238fd5['isAdded']!=!!_0x324a['isAdded']?-0x1==_0x238fd5['side']||0x0==_0x238fd5['side']?_0x238fd5['isAdded']?-0x1:0x1:_0x238fd5['isAdded']?0x1:-0x1:_0x238fd5['index']-_0x324a['index']),{'commonTape':_0x1996e8,'iEnd':_0x55bb6c,'jEnd':_0x4de1c9};function _0x501d65(_0x465717,_0x1c2da5,_0x3aa5d1){let _0x555c54=-0x1,_0x47a460=Number['POSITIVE_INFINITY'],_0x12598a=!0x0;for(let _0x3fd3bc=_0x1c2da5;_0x3fd3bc<_0x3aa5d1;_0x3fd3bc++)if(_0x1760b3['isInline'](_0x465717[_0x3fd3bc]['item'])||(_0x12598a=!0x1),_0x465717[_0x3fd3bc]['item']['startIndex']<_0x1c2da5&&(_0x555c54=_0x3fd3bc),_0x465717[_0x3fd3bc]['item']['endIndex']>=_0x3aa5d1){_0x47a460=_0x3fd3bc;break;}_0x12598a&&(_0x555c54=_0x3aa5d1-0x1);for(let _0xd57910=_0x1c2da5;_0xd57910<_0x3aa5d1;_0xd57910++)_0x465717[_0xd57910]['side']=_0xd57910<=_0x555c54?-0x1:_0xd57910<_0x47a460?0x0:0x1,_0x465717[_0xd57910]['index']=_0xd57910;let _0x569346=0x0;for(let _0x5f4434=_0x1c2da5;_0x5f4434<=_0x555c54;_0x5f4434++)0x0==_0x465717[_0x5f4434]['distance']?_0x465717[_0x5f4434]['level']=_0x569346:(_0x569346++,_0x465717[_0x5f4434]['level']=_0x569346,_0x569346++);for(let _0x2e8214=_0x1c2da5;_0x2e8214<_0x3aa5d1;_0x2e8214++)0x0==_0x465717[_0x2e8214]['side']&&(_0x465717[_0x2e8214]['level']=_0x569346);_0x569346=0x0;for(let _0x24744b=_0x3aa5d1-0x1;_0x24744b>=_0x47a460;_0x24744b--)0x0==_0x465717[_0x24744b]['distance']?_0x465717[_0x24744b]['level']=_0x569346:(_0x569346--,_0x465717[_0x24744b]['level']=_0x569346,_0x569346--);}}['_fixObsoleteTags'](_0x434dba){const _0xacc756=new Map(),_0x285126=this['editor']['model']['schema'];for(let _0x1084de=0x1;_0x1084de<_0x434dba['length'];_0x1084de++){let _0xc284b2,_0x3f597b,_0x1ab0ae;const _0x185257=_0x434dba[_0x1084de],_0x26b372=_0x434dba[_0x1084de-0x1];if('text'==_0x185257['type'])continue;if(_0x185257['type']!=_0x26b372['type'])continue;if(!_0x285126['isBlock'](_0x26b372['item'])||_0x285126['isLimit'](_0x26b372['item']))continue;if(!_0x285126['isBlock'](_0x185257['item'])||_0x285126['isLimit'](_0x185257['item']))continue;if((_0x434dba[_0x1084de]['isAdded']||_0x434dba[_0x1084de]['isAddSuggestion'])&&_0x434dba[_0x1084de-0x1]['isRemoved'])_0xc284b2=_0x434dba[_0x1084de],_0x3f597b=_0x434dba[_0x1084de-0x1],_0x1ab0ae=_0x1084de-0x1;else{if(!_0x434dba[_0x1084de]['isRemoved']||!_0x434dba[_0x1084de-0x1]['isAdded']&&!_0x434dba[_0x1084de-0x1]['isAddSuggestion'])continue;_0xc284b2=_0x434dba[_0x1084de-0x1],_0x3f597b=_0x434dba[_0x1084de],_0x1ab0ae=_0x1084de;}const _0x4c7b31=_0xc284b2['level']==_0x3f597b['level'],_0xa3517=Math['abs'](_0xc284b2['level'])<Math['abs'](_0x3f597b['level'])&&0x0==_0x3f597b['distance'];(_0x4c7b31||_0xa3517)&&(_0xacc756['set'](_0x3f597b['id'],_0xc284b2['id']),_0x434dba['splice'](_0x1ab0ae,0x1),_0x1084de--,_0xc284b2['isAdded']=!0x1);}for(let _0xbd0aa7=0x0;_0xbd0aa7<_0x434dba['length'];_0xbd0aa7++)_0xacc756['has'](_0x434dba[_0xbd0aa7]['pairId'])&&(_0x434dba[_0xbd0aa7]['pairId']=_0xacc756['get'](_0x434dba[_0xbd0aa7]['pairId']));}['_removeMissingPairs'](_0x22e652){const _0x3a40a1=new Set(_0x22e652['map'](_0x2fe2f6=>_0x2fe2f6['id']));for(let _0x35acb7=0x0;_0x35acb7<_0x22e652['length'];_0x35acb7++)_0x3a40a1['has'](_0x22e652[_0x35acb7]['pairId'])||0x0==_0x22e652[_0x35acb7]['distance']||(_0x22e652[_0x35acb7]['isIncorrect']=!0x0);return _0x22e652['filter'](_0x522325=>!_0x522325['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3e2ce4){const _0x3b466d=new Set();for(let _0x3cdac9=0x0;_0x3cdac9<_0x3e2ce4['length'];_0x3cdac9++){if(_0x3b466d['has'](_0x3e2ce4[_0x3cdac9]['id'])&&_0x3e2ce4[_0x3cdac9]['isRemoved']&&(_0x3e2ce4[_0x3cdac9]['isIncorrect']=!0x0),_0x3e2ce4[_0x3cdac9]['isIncorrect'])continue;if(0x0==_0x3e2ce4[_0x3cdac9]['distance'])continue;if('elementStart'!=_0x3e2ce4[_0x3cdac9]['type'])continue;if(null==_0x3e2ce4[_0x3cdac9]['pairId'])continue;let _0x15d0aa=_0x3cdac9+0x1,_0x10baab=0x0;for(;_0x3e2ce4[_0x15d0aa]['id']!=_0x3e2ce4[_0x3cdac9]['pairId'];)'elementStart'==_0x3e2ce4[_0x15d0aa]['type']?_0x10baab++:'elementEnd'==_0x3e2ce4[_0x15d0aa]['type']&&_0x10baab--,_0x15d0aa++;if(0x0!=_0x10baab){if(_0x3e2ce4[_0x3cdac9]['isRemoved'])_0x3e2ce4[_0x3cdac9]['isIncorrect']=!0x0;else{for(;_0x15d0aa!=_0x3cdac9;)_0x3e2ce4[_0x15d0aa]['isRemoved']&&0x0!=_0x3e2ce4[_0x15d0aa]['distance']&&(_0x3e2ce4[_0x15d0aa]['isIncorrect']=!0x0,_0x3b466d['add'](_0x3e2ce4[_0x15d0aa]['pairId'])),_0x15d0aa--;}}}return _0x3e2ce4['filter'](_0x425695=>!_0x425695['isIncorrect']);}['_removeUnsupportedChanges'](_0x484ae7){const _0x1a50b2=this['editor']['model']['schema'];for(let _0xc1e3a9=0x0;_0xc1e3a9<_0x484ae7['length'];_0xc1e3a9++){if(!(_0x484ae7[_0xc1e3a9]['isAdded']||_0x484ae7[_0xc1e3a9]['isAddSuggestion']||_0x484ae7[_0xc1e3a9]['isRemoved']||_0x484ae7[_0xc1e3a9]['isRemoveSuggestion']))continue;if(0x0==_0x484ae7[_0xc1e3a9]['distance'])continue;const _0x816de7=_0x484ae7[_0xc1e3a9]['item'];_0x1a50b2['isBlock'](_0x816de7)||_0x1a50b2['isLimit'](_0x816de7)||(_0x484ae7[_0xc1e3a9]['isAdded']&&delete _0x484ae7[_0xc1e3a9]['isAdded'],_0x484ae7[_0xc1e3a9]['isAddSuggestion']&&delete _0x484ae7[_0xc1e3a9]['isAddSuggestion'],_0x484ae7[_0xc1e3a9]['isRemoveSuggestion']&&delete _0x484ae7[_0xc1e3a9]['isRemoveSuggestion'],_0x484ae7[_0xc1e3a9]['isRemoved']&&(_0x484ae7[_0xc1e3a9]['isIncorrect']=!0x0));}return _0x484ae7['filter'](_0x2eba5c=>!_0x2eba5c['isIncorrect']);}['_makeModelFromTape'](_0x512cb8,_0x296ad5,_0x5e4c0c,_0x33085c){const _0x447183=new _0x23d676(),_0x55ca=[],_0x88e2ba=new Map(),_0x46e61e=this['editor']['model'],_0x1634a2=_0x46e61e['schema'],_0x560e68=[_0x447183],_0x4c06cf={},_0x915353={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x447183['name']=_0x33085c;let _0x1051d8=null;const _0x2ead49=[0x0];for(let _0x52fc1c=0x0;_0x52fc1c<_0x512cb8['length'];_0x52fc1c++)if('elementStart'===_0x512cb8[_0x52fc1c]['type']){_0x512cb8[_0x52fc1c]['previousPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49);const _0x13740c=new _0x587783(_0x512cb8[_0x52fc1c]['item']['name'],_0x512cb8[_0x52fc1c]['item']['getAttributes']());_0x560e68[0x0]['_appendChild'](_0x13740c),_0x2ead49['push'](0x0),_0x560e68['unshift'](_0x13740c),_0x512cb8[_0x52fc1c]['nextPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49);}else'elementEnd'===_0x512cb8[_0x52fc1c]['type']?(_0x560e68['shift'](),_0x512cb8[_0x52fc1c]['previousPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49),_0x2ead49['pop'](),_0x2ead49[_0x2ead49['length']-0x1]++,_0x512cb8[_0x52fc1c]['nextPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49)):(_0x512cb8[_0x52fc1c]['previousPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49),_0x1051d8?_0x1051d8['_data']+=_0x512cb8[_0x52fc1c]['item']['data']:_0x1051d8=new _0xfa86cb(_0x512cb8[_0x52fc1c]['item']['data'],_0x512cb8[_0x52fc1c]['item']['getAttributes']()),_0x512cb8[_0x52fc1c+0x1]&&'text'===_0x512cb8[_0x52fc1c+0x1]['type']&&_0x1b5500(_0x1051d8,_0x512cb8[_0x52fc1c+0x1]['item'])||(_0x560e68[0x0]['_appendChild'](_0x1051d8),_0x1051d8=null),_0x2ead49[_0x2ead49['length']-0x1]+=_0x512cb8[_0x52fc1c]['item']['offsetSize'],_0x512cb8[_0x52fc1c]['nextPosition']=_0x46e61e['createPositionFromPath'](_0x447183,_0x2ead49));for(let _0x170440=0x0;_0x170440<_0x512cb8['length'];_0x170440++){const _0x481ab7=_0x512cb8[_0x170440]['previousPosition'],_0x23d9a7=_0x512cb8[_0x170440]['nextPosition'];for(const _0x21abb2 of _0x512cb8[_0x170440]['markersStart'])_0x88e2ba['set'](_0x21abb2,{'start':_0x481ab7,'end':null});_0x1d7d1b('isRemoveSuggestion',_0x170440,_0x481ab7,_0x23d9a7),_0x1d7d1b('isAddSuggestion',_0x170440,_0x481ab7,_0x23d9a7),_0x1d7d1b('isRemoved',_0x170440,_0x481ab7,_0x23d9a7),_0x1d7d1b('isAdded',_0x170440,_0x481ab7,_0x23d9a7);for(const _0x2e527a of _0x512cb8[_0x170440]['markersEnd']){const _0x46aeb3=_0x88e2ba['get'](_0x2e527a);_0x46aeb3?_0x46aeb3['end']=_0x23d9a7:_0x88e2ba['set'](_0x2e527a,{'start':_0x23d9a7,'end':_0x23d9a7});}}for(const [_0x485655,_0x4968f8]of _0x88e2ba){const _0x7f6257=this['editor']['model']['createRange'](_0x4968f8['start'],_0x4968f8['end']);_0x447183['markers']['set'](_0x485655,_0x7f6257);}return _0x55ca['sort']((_0x3b201d,_0x65eeb0)=>{const _0x1b9ec1=_0x447183['markers']['get']('revision:'+_0x3b201d['id']),_0x109a8d=_0x447183['markers']['get']('revision:'+_0x65eeb0['id']);return _0x1b9ec1['start']['isBefore'](_0x109a8d['start'])?-0x1:_0x1b9ec1['start']['isAfter'](_0x109a8d['start'])?0x1:_0x1b9ec1['end']['isBefore'](_0x109a8d['end'])?-0x1:_0x1b9ec1['end']['isAfter'](_0x109a8d['end'])?0x1:'add'===_0x3b201d['type']?-0x1:0x1;}),{'root':_0x447183,'changes':_0x55ca};function _0x1d7d1b(_0x23539b,_0x367ce3,_0x2c4d7d,_0xb30bcd){const _0x5a6c88=!!_0x512cb8[_0x367ce3][_0x23539b],_0x4738ab=_0x5a6c88?_0x512cb8[_0x367ce3][_0x23539b]['userId']:null,_0x59d7d5=_0x367ce3===_0x512cb8['length']-0x1,_0x3e785a=_0x915353[_0x23539b][0x0],_0x4c1dab=_0x1634a2['isObject'](_0x512cb8[_0x367ce3]['item']);!_0x4c06cf[_0x23539b]&&_0x5a6c88?_0x4c06cf[_0x23539b]={'start':_0x2c4d7d,'tapeItem':_0x512cb8[_0x367ce3],'userId':_0x4738ab,'type':_0x23539b}:_0x4c06cf[_0x23539b]&&!_0x5a6c88?(_0x4c06cf[_0x23539b]['end']=_0x2c4d7d,_0x430ec2(_0x4c06cf[_0x23539b]),_0x4c06cf[_0x23539b]=null):_0x4c06cf[_0x23539b]&&_0x5a6c88&&_0x4c06cf[_0x23539b]['userId']!==_0x4738ab&&(_0x4c06cf[_0x23539b]['end']=_0x2c4d7d,_0x3e785a&&_0x3e785a['userId']===_0x4c06cf[_0x23539b]['userId']||_0x430ec2(_0x4c06cf[_0x23539b]),_0x4c06cf[_0x23539b]={'start':_0x2c4d7d,'tapeItem':_0x512cb8[_0x367ce3],'userId':_0x4738ab,'type':_0x23539b}),_0x4c06cf[_0x23539b]&&_0x4c1dab&&('elementStart'!==_0x512cb8[_0x367ce3]['type']||_0x3e785a&&_0x3e785a['userId']===_0x4738ab||_0x915353[_0x23539b]['unshift']({'userId':_0x4738ab,'object':_0x512cb8[_0x367ce3]['item'],'change':_0x4c06cf[_0x23539b]}),'elementEnd'===_0x512cb8[_0x367ce3]['type']&&_0x3e785a&&_0x3e785a['object']===_0x512cb8[_0x367ce3]['item']&&(_0x915353[_0x23539b]['shift'](),_0x4c06cf[_0x23539b]=_0x3e785a['change'])),_0x4c06cf[_0x23539b]&&_0x59d7d5&&(_0x4c06cf[_0x23539b]['end']=_0xb30bcd,_0x430ec2(_0x4c06cf[_0x23539b]),_0x4c06cf[_0x23539b]=null);}function _0x430ec2({start:_0x3bf8fe,end:_0x2293b4,tapeItem:_0x5406e8,userId:_0x17cc0b,type:_0x557592}){const _0x3550ec=_0x5406e8['item'],_0x521602=_0x46e61e['schema']['isBlock'](_0x3550ec)&&!_0x46e61e['schema']['isLimit'](_0x3550ec),_0x3d905a=_0x3bf8fe['nodeAfter']==_0x2293b4['parent']&&_0x2293b4['isAtStart'];if(_0x521602&&_0x3d905a)return;const _0x250cb5=_0x46e61e['createRange'](_0x3bf8fe,_0x2293b4),_0x4a795b=_0x296ad5['get'](_0x17cc0b),_0x40458e=new ChangeItem({'author':_0x4a795b,'type':'isAdded'==_0x557592||'isAddSuggestion'==_0x557592?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x557592||'isRemoveSuggestion'==_0x557592},'createdAt':new Date(),'rootName':_0x5e4c0c});_0x55ca['push'](_0x40458e),_0x447183['markers']['set']('revision:'+_0x40458e['id'],_0x250cb5);}function _0x1b5500(_0x18e188,_0x369f55){const _0x505896=_0x18e188['getAttributes'](),_0x29138c=_0x369f55['getAttributes']();for(const _0x5bf152 of _0x505896){if(_0x5bf152[0x1]!==_0x369f55['getAttribute'](_0x5bf152[0x0]))return!0x1;_0x29138c['next']();}return _0x29138c['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x12be95=>{const _0x5d2834=_0x12be95['markerName']['split'](':')[0x1],_0x3843d7=this['_getChangeFromId'](_0x5d2834);if(!_0x3843d7)return null;const _0x4e5834='add'==_0x3843d7['type']?'insertion':'deletion',_0x57eae7=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4e5834];return _0x3843d7['data']['isSuggestion']&&_0x57eae7['push']('ck-suggestion-marker-'+_0x4e5834+'-new'),this['activeChange']==_0x3843d7&&_0x57eae7['push']('ck-suggestion-marker--active'),{'classes':_0x57eae7,'attributes':{'data-change-id':_0x5d2834}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x41f25d=>{_0x41f25d['on']('element:pre',(_0x3c8178,_0x10bc1e,_0x4b12e8)=>{const _0x2dff85=_0x10bc1e['viewItem']['getChild'](0x0);if(!_0x2dff85||!_0x2dff85['is']('element','code'))return;if(!_0x4b12e8['consumable']['consume'](_0x2dff85,{'attributes':['vid_start','vid_end']}))return;const _0x295a6e=_0x10bc1e['modelRange']['start']['nodeAfter'];_0x4b12e8['writer']['setAttribute']('vid_start',_0x2dff85['getAttribute']('vid_start'),_0x295a6e),_0x4b12e8['writer']['setAttribute']('vid_end',_0x2dff85['getAttribute']('vid_end'),_0x295a6e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x456730=>{_0x456730['on']('element',(_0x4568ab,_0xf11c58,_0x384e63)=>{if(!_0x384e63['consumable']['consume'](_0xf11c58['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xf11c58['modelRange']['isCollapsed'])return;const _0x4ebe5b=_0xf11c58['modelRange']['start']['nodeAfter'];_0x4ebe5b['hasAttribute']('vid_start')||_0x4ebe5b['hasAttribute']('vid')||(_0x384e63['writer']['setAttribute']('vid_start',_0xf11c58['viewItem']['getAttribute']('vid_start'),_0x4ebe5b),_0x384e63['writer']['setAttribute']('vid_end',_0xf11c58['viewItem']['getAttribute']('vid_end'),_0x4ebe5b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3e7b99=>_0x3e7b99['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x330405,[,_0xf142aa])=>{['vid_start','vid_end','vid']['includes'](_0xf142aa)&&(_0x330405['return']=!0x0,_0x330405['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x336d35=>{_0x336d35['on']('attribute:vid',(_0x8321b6,_0x594d22,_0x205866)=>{if('\x20'!=_0x594d22['item']['data']||_0x594d22['item']['parent']['maxOffset']>0x1)return;if(!_0x205866['consumable']['consume'](_0x594d22['item'],_0x8321b6['name']))return;const _0x4d4140=_0x205866['writer'],_0x21ae0f=_0x205866['mapper']['toViewRange'](_0x594d22['range']);_0x4d4140['wrap'](_0x21ae0f,_0x4d4140['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x15f922){const _0x5e2090=_0x15f922['plugins']['get']('RevisionViewer');return(_0x3d10c5,_0x2c66a8,_0x424666)=>{const _0x18c6dc=_0x2c66a8['markerName']['split'](':')[0x1],_0x2a7e79=_0x5e2090['_getChangeFromId'](_0x18c6dc);if(!_0x2a7e79)return null;const _0xd29f64='add'==_0x2a7e79['type']?'split':'merge';if(!_0x424666['consumable']['test'](_0x2c66a8['markerRange'],_0x3d10c5['name']))return;const _0x3102de=_0x2c66a8['markerRange']['getWalker'](),_0x42d66c=_0x2c66a8['markerRange']['start'],_0x201730=_0x15f922['model']['schema'];let _0x42318b=null,_0x3cf027=null,_0x58ae27=!0x1,_0x482279=!0x1;for(const _0x1e06d1 of _0x3102de){const _0x527d5e=_0x1e06d1['item'];_0x58ae27=_0x58ae27||_0x201730['isContent'](_0x527d5e);const _0x1cac50=_0x424666['mapper']['toViewElement'](_0x527d5e);if(_0x1cac50&&_0x1cac50['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1e06d1['type']&&(_0x201730['isBlock'](_0x527d5e)&&!_0x201730['isLimit'](_0x527d5e)&&(_0x527d5e['nextSibling']||_0x42d66c['isAtEnd']?_0x42318b&&_0x42318b['parent']==_0x527d5e||(_0x42318b=_0x527d5e,_0x5f77c5(_0x1e06d1['previousPosition']),_0x482279=!0x0):_0x3cf027=_0x3cf027||_0x1e06d1['previousPosition']));}function _0x5f77c5(_0x15575f){const _0x38cb47=_0x424666['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xd29f64}),_0x13c957=_0x424666['mapper']['toViewPosition'](_0x15575f);_0x2a7e79['data']['isSuggestion']&&_0x424666['writer']['addClass']('ck-suggestion-marker-'+_0xd29f64+'-new',_0x38cb47),_0x5e2090['activeChange']==_0x2a7e79&&_0x424666['writer']['addClass']('ck-suggestion-marker--active',_0x38cb47),_0x424666['writer']['insert'](_0x13c957,_0x38cb47),_0x424666['mapper']['bindElementToMarker'](_0x38cb47,_0x2c66a8['markerName']);}_0x58ae27||_0x482279||!_0x3cf027||_0x5f77c5(_0x3cf027);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x17683a,_0x14ab1b,_0x283e17)=>{const _0x329908=_0x283e17['mapper']['markerNameToElements'](_0x14ab1b['markerName']);if(_0x329908){for(const _0x40883e of _0x329908)(_0x40883e['hasClass']('ck-suggestion-marker-split')||_0x40883e['hasClass']('ck-suggestion-marker-merge'))&&(_0x283e17['mapper']['unbindElementFromMarkerName'](_0x40883e,_0x14ab1b['markerName']),_0x283e17['writer']['remove'](_0x40883e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1300a5,_0x52cca9,_0x24902b)=>{const _0xaa26e9=_0x52cca9['markerName']['split'](':')[0x1],_0x1ba5d5=this['_getChangeFromId'](_0xaa26e9);if(!_0x1ba5d5)return null;const _0x5605e7='add'==_0x1ba5d5['type']?'split':'merge';if(_0x24902b['consumable']['test'](_0x52cca9['markerRange'],_0x1300a5['name']))for(const _0x20ca9a of _0x52cca9['markerRange']['getItems']()){if(!_0x20ca9a['is']('element','softBreak'))continue;const _0x353975=_0x24902b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5605e7}),_0x41a054=_0x24902b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x20ca9a));_0x1ba5d5['data']['isSuggestion']&&_0x24902b['writer']['addClass']('ck-suggestion-marker-'+_0x5605e7+'-new',_0x353975),this['activeChange']==_0x1ba5d5&&_0x24902b['writer']['addClass']('ck-suggestion-marker--active',_0x353975),_0x24902b['writer']['insert'](_0x41a054,_0x353975),_0x24902b['mapper']['bindElementToMarker'](_0x353975,_0x52cca9['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x543dea=>{for(const _0xd807c3 of this['editor']['model']['document']['getRootNames']()){const _0x1e3f41=this['editor']['model']['document']['getRoot'](_0xd807c3),_0x2365cf=this['editor']['editing']['view']['document']['getRoot'](_0xd807c3);if(_0x2365cf){const _0x481dee=_0x1e3f41['getAttribute']('revisionHistoryAttachChange');if(_0x543dea['removeAttribute']('data-change-id',_0x2365cf),_0x543dea['removeClass']('ck-revision-history-root-add',_0x2365cf),_0x543dea['removeClass']('ck-revision-history-root-remove',_0x2365cf),_0x543dea['removeClass']('ck-revision-history-root--active',_0x2365cf),_0x481dee){const _0x2ae6c1=this['_getChangeFromId'](_0x481dee);if(!_0x2ae6c1)return null;_0x543dea['setAttribute']('data-change-id',_0x481dee,_0x2365cf),_0x543dea['addClass']('ck-revision-history-root-'+_0x2ae6c1['type'],_0x2365cf),this['activeChange']==_0x2ae6c1&&_0x543dea['addClass']('ck-revision-history-root--active',_0x2365cf);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3469e1=>'revision-comment:'+_0x3469e1,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4a37ae=>'revision-suggestion:'+_0x4a37ae,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x30fd79=>({'name':'suggestion:'+_0x30fd79,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4e89d6=>{const _0x4c48d5=_0x4e89d6['markerName']['split'](':')[0x1];return'insertion'!=_0x4c48d5&&'deletion'!=_0x4c48d5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4c48d5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x266de5,_0x43f54f,_0x1ce429)=>{const _0x2ee91a=_0x1ce429['mapper']['markerNameToElements'](_0x43f54f['markerName']);if(_0x2ee91a){for(const _0x5dcbc4 of _0x2ee91a)_0x5dcbc4['is']('uiElement')&&(_0x1ce429['mapper']['unbindElementFromMarkerName'](_0x5dcbc4,_0x43f54f['markerName']),_0x1ce429['writer']['remove'](_0x5dcbc4));}},{'priority':'high'});}['_getChangeFromId'](_0x33d788){return this['_changeIdToChange']['get'](_0x33d788);}['_getViewForChange'](_0x1ce1a8){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x1ce1a8),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x46290e,_0x185885,_0x16305d,_0x49261e)=>{_0x49261e&&this['_balloon']['remove'](_0x49261e),_0x16305d&&(this['_balloon']['add']({'view':_0x16305d,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x23902c=this['editor']['editing'],_0x3bc3ca=this['_getChangeFromId'](_0x16305d['changeId']);let _0x21ac9e;if(_0x3bc3ca['data']['isOnRoot']){const _0x462662=_0x23902c['view']['getDomRoot'](_0x3bc3ca['rootName']);_0x21ac9e=Array['from'](_0x462662['getClientRects']());}else{const _0x5ad8e8=this['editor']['model']['markers']['get']('revision:'+_0x16305d['changeId']);_0x21ac9e=Array['from'](_0x23902c['mapper']['markerNameToElements'](_0x5ad8e8['name']))['map'](_0x351c4c=>_0x23902c['view']['domConverter']['mapViewToDom'](_0x351c4c))['map'](_0x2c040a=>Array['from'](_0x2c040a['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x21ac9e[0x0];return _0x21ac9e['find'](_0x45480c=>_0x45480c['top']-0x3<=this['_activeViewTarget']['y']&&_0x45480c['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x45480c['left']-0x3<=this['_activeViewTarget']['x']&&_0x45480c['right']+0x3>=this['_activeViewTarget']['x'])||_0x21ac9e[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1d018f,_0x58ebf0,_0x3fdf9c,_0x4a651e)=>{this['activeView']=_0x3fdf9c?this['_getViewForChange'](_0x3fdf9c):null,this['editor']['model']['change'](()=>{const _0x3781c9=this['editor']['editing'];_0x4a651e&&(_0x4a651e['data']['isOnRoot']?_0x3781c9['view']['change'](_0x2160c0=>{_0x2160c0['removeClass']('ck-revision-history-root--active',_0x3781c9['view']['document']['getRoot'](_0x4a651e['rootName']));}):_0x3781c9['reconvertMarker']('revision:'+_0x4a651e['id'])),_0x3fdf9c&&(_0x3fdf9c['data']['isOnRoot']?_0x3781c9['view']['change'](_0x2fffb1=>{_0x2fffb1['addClass']('ck-revision-history-root--active',_0x3781c9['view']['document']['getRoot'](_0x3fdf9c['rootName']));}):_0x3781c9['reconvertMarker']('revision:'+_0x3fdf9c['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0xcd8d3,_0x396e2a)=>{if(this['activeChange'])return;const _0x4c0bbf=this['_findChangeIdFromDomTarget'](_0x396e2a['target']),_0xefc140=this['_changeIdToChange']['get'](_0x4c0bbf);_0xefc140?(this['_activeViewTarget']={'x':_0x396e2a['domEvent']['x'],'y':_0x396e2a['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0xefc140)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4657a8,_0x259ba7)=>{const _0x5ca194=this['_findChangeIdFromDomTarget'](_0x259ba7['target']),_0x539f25=this['_changeIdToChange']['get'](_0x5ca194);_0x539f25?(this['_activeViewTarget']={'x':_0x259ba7['domEvent']['x'],'y':_0x259ba7['domEvent']['y']},_0x539f25===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x539f25):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x228553){do{const _0x241fd1=_0x228553['getAttribute']('data-change-id');if(_0x241fd1)return _0x241fd1;_0x228553=_0x228553['parent'];}while(_0x228553);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x12508d=>{for(const _0x369496 of this['editor']['model']['markers'])_0x12508d['removeMarker'](_0x369496);});}}function _t(_0x5c8a24,_0x2c3c06){return(_0x4793d0,_0x54d636,_0x8f2efc)=>{if(!_0x8f2efc['consumable']['test'](_0x54d636['markerRange'],_0x4793d0['name']))return;const _0x4aba10=_0x54d636['markerRange']['getWalker'](),_0x4e5e5d=_0x54d636['markerRange']['start'],_0x3047bf=_0x5c8a24['model']['schema'];let _0x3f1364=null,_0xcd6779=null,_0x582563=!0x1,_0x42607e=!0x1;for(const _0xaa139d of _0x4aba10){const _0x5eea7c=_0xaa139d['item'];_0x582563=_0x582563||_0x3047bf['isContent'](_0x5eea7c);const _0x4611b9=_0x8f2efc['mapper']['toViewElement'](_0x5eea7c);if(_0x4611b9&&_0x4611b9['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xaa139d['type']&&(_0x3047bf['isBlock'](_0x5eea7c)&&!_0x3047bf['isLimit'](_0x5eea7c)&&(_0x5eea7c['nextSibling']||_0x4e5e5d['isAtEnd']?_0x3f1364&&_0x3f1364['parent']==_0x5eea7c||(_0x3f1364=_0x5eea7c,_0xca645e(_0xaa139d['previousPosition']),_0x42607e=!0x0):_0xcd6779=_0xcd6779||_0xaa139d['previousPosition']));}function _0xca645e(_0x494829){const _0x553a7f=_0x8f2efc['mapper']['toViewPosition'](_0x494829),_0x2cad98=_0x8f2efc['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2c3c06});_0x8f2efc['writer']['insert'](_0x553a7f,_0x2cad98),_0x8f2efc['mapper']['bindElementToMarker'](_0x2cad98,_0x54d636['markerName']);}_0x582563||_0x42607e||!_0xcd6779||_0xca645e(_0xcd6779);};}class RestoreRevisionCommand extends _0x1a1b5b{constructor(_0x4f9038){super(_0x4f9038);const _0x1e957c=_0x4f9038['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1e957c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1e957c,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4e1e54=this['editor'],_0x3957ed=_0x4e1e54['plugins']['get'](RevisionViewer),_0x4e677f=_0x3957ed['isReady']?_0x3957ed['diff']['newRevisionId']:null;_0x4e1e54['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4e677f);}['refresh'](){const {isReady:_0x40afe0,isEnabled:_0x8fdd13,repository:_0xe633ef,diff:_0x38ebd8}=this['editor']['plugins']['get'](RevisionViewer),_0x46cd8a=_0x38ebd8&&_0xe633ef['getLaterVisibleRevision'](_0x38ebd8['newRevisionId']);this['isEnabled']=_0x40afe0&&_0x8fdd13&&Boolean(_0x46cd8a);}}class ShowChangeCommand extends _0x1a1b5b{['_step'];constructor(_0x555821,{direction:_0x10c9b5}){super(_0x555821);const _0x1d5147=_0x555821['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x10c9b5?0x1:-0x1,this['listenTo'](_0x1d5147,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d5147,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1d5147,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xaf8e94=this['editor'],_0x489695=_0xaf8e94['plugins']['get'](RevisionViewer),{isNavigationMode:_0x54dabb,currentChangeNumber:_0x332a8f}=_0x489695;let _0x2dc013;if(_0x489695['activeChange']=_0x54dabb?_0x489695['diff']['changes']['get'](_0x332a8f+this['_step']):_0x489695['diff']['changes']['first'],_0x489695['activeChange']['data']['isOnRoot'])_0x2dc013=_0xaf8e94['editing']['view']['getDomRoot'](_0x489695['activeChange']['rootName']);else{const _0x2d6a3f=_0xaf8e94['model']['markers']['get']('revision:'+_0x489695['activeChange']['id']);_0x2dc013=_0x49adfb(_0xaf8e94['editing'],_0x2d6a3f);}_0x39f26f({'target':_0x2dc013,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x9ffa14,currentChangeNumber:_0x1a76fc,numberOfChanges:_0x4a95da,isReady:_0xcb25f2,isEnabled:_0x12bd3a}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x12bd3a&&_0xcb25f2&&_0x4a95da)&&(!_0x9ffa14||(0x1===this['_step']?_0x1a76fc<_0x4a95da-0x1:_0x1a76fc>0x0));}}class ChangesNavigationView extends _0x5c0571{constructor(_0x1ef24f){super(_0x1ef24f);const _0x3d52a2=this['bindTemplate'],_0x2253b9=new _0x48a0f1(_0x1ef24f),_0x529ba8=new _0x48a0f1(_0x1ef24f);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0x3a2106,_0x20f140)=>_0x3a2106&&_0x20f140>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3c30b1,_0x4ef698,_0x11a8be,_0x4be8f9)=>{if(!_0x3c30b1)return ft(_0x1ef24f,'Loading...');if(!_0x11a8be)return ft(_0x1ef24f,'No\x20changes');const _0x3a5e7b=ft(_0x1ef24f,'NUMBER_OF_CHANGES',_0x11a8be);return _0x4be8f9?ft(_0x1ef24f,'X_OF_Y_CHANGES',[_0x4ef698+0x1,_0x11a8be]):_0x3a5e7b;}),_0x2253b9['set']({'label':ft(_0x1ef24f,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5053dd}),_0x529ba8['set']({'label':ft(_0x1ef24f,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2b02d}),_0x2253b9['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x529ba8['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2253b9['on']('execute',()=>this['fire']('execute','backward')),_0x529ba8['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x3d52a2['if']('_isStatusLabelVisible','ck-hidden',_0x17053d=>!_0x17053d)]},'children':[{'text':_0x3d52a2['to']('isNavigationMode',_0x4e81f9=>_0x4e81f9?ft(_0x1ef24f,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x1ef24f,'Total')+':\x20')}]},{'text':_0x3d52a2['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2253b9,_0x529ba8]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x20daab{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5b8763=this['editor']['editing']['view'];_0x5b8763['change'](_0x246789=>{for(const _0x4d8cf9 of _0x5b8763['document']['roots'])_0x246789['addClass'](yt,_0x4d8cf9);});}['hide'](){const _0x403dd9=this['editor']['editing']['view'];_0x403dd9['change'](_0x27c94c=>{for(const _0x592b5b of _0x403dd9['document']['roots'])_0x27c94c['removeClass'](yt,_0x592b5b);});}}class RevisionViewerUI extends _0x20daab{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x2fff9a=this['editor'],_0x1cba98=_0x2fff9a['plugins']['get'](RevisionViewer),_0x37629c=_0x2fff9a['plugins']['get'](RevisionViewerLoadingOverlay);_0x2fff9a['ui']['componentFactory']['add']('exitToEditing',_0x4c1ddb=>{const _0x5647da=new _0x48a0f1(_0x4c1ddb);return _0x5647da['set']({'label':ft(_0x4c1ddb,'Back\x20to\x20editing'),'icon':_0x204b25,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5647da,'execute',()=>{_0x2fff9a['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5647da;}),_0x2fff9a['ui']['componentFactory']['add']('restoreRevision',_0x184eff=>{const _0x41fe4b=new _0x48a0f1(_0x184eff);return _0x41fe4b['set']({'label':ft(_0x184eff,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x41fe4b['bind']('isEnabled')['to'](_0x2fff9a['commands']['get']('restoreRevision')),this['listenTo'](_0x41fe4b,'execute',()=>_0x2fff9a['execute']('restoreRevision')),_0x41fe4b;}),_0x2fff9a['ui']['componentFactory']['add']('changesNavigation',_0x88fd7b=>{const _0x2baeb6=new ChangesNavigationView(_0x88fd7b),_0x50513f=_0x2fff9a['commands']['get']('showPreviousChange'),_0x2de1cd=_0x2fff9a['commands']['get']('showNextChange');return _0x2baeb6['bind']('isBackwardNavigationEnabled')['to'](_0x50513f,'isEnabled'),_0x2baeb6['bind']('isForwardNavigationEnabled')['to'](_0x2de1cd,'isEnabled'),_0x2baeb6['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1cba98),this['listenTo'](_0x2baeb6,'execute',(_0x30a10f,_0xa8f7cf)=>{_0x2fff9a['execute']('forward'===_0xa8f7cf?'showNextChange':'showPreviousChange');}),_0x2baeb6;}),_0x37629c['show'](),_0x1cba98['on']('change:isReady',(_0x3bb44d,_0x36bdd6,_0x294f4e)=>{_0x294f4e?_0x37629c['hide']():_0x37629c['show']();});}}class RevisionNameView extends _0x46d49f{['_resizeObserver']=null;constructor(_0x517fa1,_0x5bc476){super(_0x517fa1,_0x5bc476);const _0x2480ed=this['bindTemplate'];this['set']({'label':ft(_0x517fa1,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x517fa1,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x2480ed['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x21024a(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x3ca86c=this['fieldView']['element'];this['_tooltipString']=_0x3ca86c['scrollWidth']>_0x3ca86c['clientWidth']&&_0x3ca86c['value']||'';}}class RevisionAuthorView extends _0x5c0571{constructor(_0x4f8a3d,_0x231766,_0xfe9cb8){super(_0x4f8a3d);const _0x11e8f3=new nt();_0x11e8f3['set']({'content':_0xabede7,'viewBox':'0\x200\x2011\x2010'});const _0xbdc8eb=['ck','ck-revision-history-sidebar__revision-author'];_0xfe9cb8&&_0xbdc8eb['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3f37a7=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x4f8a3d,_0xfe9cb8?'Revision\x20creator':'Revision\x20author')},'children':[_0x11e8f3,_0x231766['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xbdc8eb},'children':_0x3f37a7});}}function Rt(_0x3d9392,_0xfa0efc){const _0x14ce62=_0x3d9392['bindTemplate'],_0x464b85=_0x3d9392['locale'],_0x56a9da=_0x16d7f1(_0x464b85);_0x56a9da['panelPosition']='sw';const _0x7187ce=function(_0x134878,_0x30b562){const _0x4a8362=function(_0x4b17a3,_0x2a75cd){const _0x69bfeb=_0x4b17a3['locale'],_0x56eba5={'Compare\x20against\x20selected':ft(_0x69bfeb,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x69bfeb,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x69bfeb,'Restore\x20this\x20revision')};return _0x2a75cd['map'](_0x139227=>{const _0x2a838a=_0x56eba5[_0x139227['name']];return _0x2a838a&&_0x2a838a!==_0x139227['name']&&(_0x139227['name']=_0x2a838a),_0x139227;});}(_0x134878,_0x30b562),_0x38c3bd=new _0x2d3a61();for(const _0x1d82f9 of _0x4a8362){const _0x5b225a={'type':'button','model':new rt({'label':_0x1d82f9['name'],'class':_0x1d82f9['class'],'withText':!0x0,'role':'menuitem','_action':_0x1d82f9['action']})};_0x5b225a['model']['bind']('isEnabled')['to'](_0x134878,'isActionsDropdownOpen',_0x119eb4=>'function'!=typeof _0x1d82f9['isEnabled']||(!_0x119eb4||_0x1d82f9['isEnabled'](_0x134878))),_0x38c3bd['add'](_0x5b225a);}return _0x38c3bd;}(_0x3d9392,_0xfa0efc);return _0x3d9392['bind']('isActionsDropdownOpen')['to'](_0x56a9da,'isOpen'),_0x56a9da['buttonView']['set']({'label':ft(_0x464b85,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x592620}),_0x56a9da['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x14ce62['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x14ce62['to'](_0x10a1b4=>_0x10a1b4['stopPropagation']())}}),_0x56a9da['on']('execute',_0x2a7682=>{_0x3d9392['isReady']&&'function'==typeof _0x2a7682['source']['_action']&&_0x2a7682['source']['_action'](_0x3d9392);}),ot(_0x56a9da,_0x7187ce,{'role':'menu'}),_0x56a9da['listenTo'](_0x3d9392,'change:isActionsDropdownOpen',(_0x3afa71,_0x3d1e15,_0x591ba1)=>{if(_0x591ba1)for(const _0x44b817 of _0x56a9da['listView']['items']){const _0x5a622f=_0x44b817['children']['first'],_0x596332=_0xfa0efc['find'](_0x8d74f8=>_0x8d74f8['action']===_0x5a622f['_action'])['isVisible'];_0x44b817['isVisible']=void 0x0===_0x596332||_0x596332(_0x3d9392);}}),_0x56a9da;}class RevisionView extends/* #__PURE__ -- @preserve */
27
+ _0x526cd1(_0x5c0571){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x674090,_0x48aaf3,_0x16d863,_0x1bdd16){super(_0x674090);const _0x58316c=this['bindTemplate'],_0x24212e=function(_0x8ef66c,_0x3c8edf){const _0xd9622f=Array['from'](_0x3c8edf['authors'])['filter'](_0x3eed6d=>_0x3eed6d!=_0x3c8edf['creator']);return _0x3c8edf['creator']&&_0xd9622f['unshift'](_0x3c8edf['creator']),_0xd9622f['map'](_0x425385=>new RevisionAuthorView(_0x8ef66c,_0x425385,_0x425385==_0x3c8edf['creator']));}(_0x674090,_0x48aaf3);this['id']=_0x48aaf3['id'],this['_revision']=_0x48aaf3,this['_requireRevisionName']=_0x1bdd16,this['bind']('name','createdAt')['to'](_0x48aaf3),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x36550f=>{return _0x2cc016=_0x674090['uiLanguage'],(_0x213192=_0x36550f)['toLocaleDateString'](_0x2cc016,{'month':'long','day':'numeric'})+',\x20'+_0x213192['toLocaleTimeString'](_0x2cc016,{'hour':'numeric','minute':'numeric'});var _0x2cc016,_0x213192;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x674090,_0x515ec4),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x2974fa=>_0x2974fa||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x41940c,_0x16bc93)=>_0x41940c&&_0x16bc93),this['revisionActionsView']=_0x16d863&&_0x16d863['length']?Rt(this,_0x16d863):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x58316c['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x58316c['if']('isEnabled','ck-disabled',_0x10db16=>!_0x10db16),_0x58316c['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x58316c['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x58316c['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x58316c['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x24212e}]},this['revisionActionsView']],'on':{'click':_0x58316c['to'](_0x3a10b9=>{_0x3a10b9['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4f51da=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4f51da,'change',()=>{this['_requireRevisionName']&&!_0x4f51da['value']||this['fire']('setName',{'id':this['id'],'name':_0x4f51da['value']}),_0x4f51da['value']||(_0x4f51da['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x4aa586,_0x4458b2){const _0x40dffd=vt['fromJSDate'](_0x4aa586)['setLocale'](_0x4458b2),_0x517877=vt['local'](),_0x1b02ba=_0x517877['minus']({'days':0x1})['startOf']('day');let _0x491e13,_0x46c71b;return _0x40dffd['hasSame'](_0x517877,'day')?(_0x491e13=_0x40dffd['startOf']('day')['toJSDate'](),_0x46c71b=_0x40dffd['toRelativeCalendar']()):_0x40dffd['hasSame'](_0x1b02ba,'day')?(_0x491e13=_0x1b02ba['toJSDate'](),_0x46c71b=_0x40dffd['toRelativeCalendar']()):_0x40dffd['hasSame'](_0x517877,'week')?(_0x491e13=_0x40dffd['startOf']('week')['toJSDate'](),_0x46c71b=_0x40dffd['weekdayLong']||''):_0x40dffd['hasSame'](_0x517877,'year')?(_0x491e13=_0x40dffd['startOf']('month')['toJSDate'](),_0x46c71b=_0x40dffd['monthLong']||''):(_0x491e13=_0x40dffd['startOf']('year')['toJSDate'](),_0x46c71b=String(_0x40dffd['year'])),{'startDate':_0x491e13,'localizedPeriodName':_0x46c71b};}class RevisionsSidebarTimePeriodView extends _0x5c0571{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x332fe5,_0x434d2e,_0x252f80,_0xe9707){super(_0x332fe5);const _0xf8ec3e=bt(_0x434d2e,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x434d2e,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x252f80,this['_requireRevisionName']=_0xe9707,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0xf8ec3e}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x272474){const _0x110831=new RevisionView(this['locale'],_0x272474,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x110831);}['removeRevision'](_0x5abeb5){const _0x4b67ad=this['revisionViews']['find'](_0x3be423=>_0x3be423['id']===_0x5abeb5['id']);this['revisionViews']['remove'](_0x4b67ad);}}class RevisionsSidebarHeaderView extends _0x5c0571{constructor(_0x453c44){super(_0x453c44);const _0x452303=new nt();_0x452303['content']=_0x1681be,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x452303,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x453c44,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x5c0571{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x213cb4,_0x1cf3c5,_0x3d6e4f,_0x354268){super(_0x213cb4);const _0x4e09ca=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1cf3c5,this['_revisionActions']=_0x3d6e4f,this['_requireRevisionName']=_0x354268,this['on']('select',(_0x4bfffd,_0x359baf)=>{this['fire']('revisionSelected',_0x359baf);}),this['on']('setName',(_0x19c3ca,_0x5a8952)=>{this['fire']('revisionSetName',_0x5a8952);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x213cb4),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4e09ca['if']('isEnabled','ck-disabled',_0x3e86d6=>!_0x3e86d6)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x297247 of this['_revisions'])this['_addRevision'](_0x297247);this['_revisions']['on']('add',(_0x228a31,_0x354eec)=>{this['_addRevision'](_0x354eec);}),this['_revisions']['on']('remove',(_0x225594,_0x29299b)=>{this['_removeRevision'](_0x29299b);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x18f94a=>_0x18f94a['revisionViews']['map'](_0x2f7ee3=>_0x2f7ee3))['flat']();}['selectRevision'](_0x16a695){for(const _0x172258 of this['revisionViews'])_0x16a695&&_0x16a695['id']===_0x172258['id']?_0x172258['select']():_0x172258['deselect']();}['highlightRevisions'](_0x5ee7a3){for(const _0x579ab8 of this['revisionViews'])_0x5ee7a3['some'](({id:_0x57d310})=>_0x57d310===_0x579ab8['id'])?_0x579ab8['highlight']():_0x579ab8['unhighlight']();}['_addRevision'](_0x534130){const _0x272c52=bt(_0x534130['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xec8000=this['_getTimePeriodViewByStartDate'](_0x272c52);_0xec8000||(_0xec8000=new RevisionsSidebarTimePeriodView(this['locale'],_0x272c52,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xec8000)),_0xec8000['addRevision'](_0x534130);}['_removeRevision'](_0x197dc8){const _0x29843c=bt(_0x197dc8['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x29843c)['removeRevision'](_0x197dc8);}['_getTimePeriodViewByStartDate'](_0x440baf){return this['timePeriodViews']['find'](_0x4da2a1=>_0x4da2a1['startDate']['getTime']()===_0x440baf['getTime']());}}class RevisionsSidebar extends _0x20daab{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x5e1eac){super(_0x5e1eac),this['_revisionViewer']=_0x5e1eac['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x3d089e=this['_revisionsRepository']['_revisions'],_0x1a1bbe=this['_createRevisionActions'](),_0x406b32=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x3d089e,_0x1a1bbe,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x6fda4a,_0x5adc23)=>{_0x5adc23['revisionViews']['on']('add',(_0x37ac87,_0x35cbc6)=>{_0x35cbc6['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0x406b32['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x158422=this['_revisionsRepository']['getRevision'](0x0);if(_0x158422){const _0x292e47=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x158422['id']);this['_revisionViewer']['compare'](_0x158422,_0x292e47);}}['_handleRevisionSelected'](_0x6d6da1,_0xdd258e){const _0x3e4b85=this['_revisionsRepository']['getRevision'](_0xdd258e['id']),_0xaa8dfe=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3e4b85['id']);this['_revisionViewer']['compare'](_0x3e4b85,_0xaa8dfe);}['_handleRevisionSetName'](_0x278688,_0x54f927){this['_revisionsRepository']['getRevision'](_0x54f927['id'])['setName'](_0x54f927['name']);}['_handleDiffChange'](_0x40d8f5,_0x27c212,_0x1a0ba3){const _0x539e3e=this['_revisionsRepository']['getRevisionsInDiff'](_0x1a0ba3);_0x539e3e['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x539e3e),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x539e3e[0x0]));}['_createRevisionActions'](){const _0x1a8fee=this['editor'],_0x3fd00c=RevisionsSidebar['availableRevisionActions'],_0x49c0ea=_0x1a8fee['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x49c0ea['length'])return _0x49c0ea['map'](_0x18374e=>{const _0x46b5aa='string'==typeof _0x18374e?Object['assign']({},_0x3fd00c[_0x18374e]):_0x18374e;return _0x46b5aa['action']=_0x46b5aa['action']['bind'](this,_0x1a8fee),_0x46b5aa['isVisible']&&(_0x46b5aa['isVisible']=_0x46b5aa['isVisible']['bind'](this,_0x1a8fee)),_0x46b5aa;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x50d21b},_0x2c8ca6)=>{const _0x219c5f=_0x50d21b['get'](RevisionViewer),_0x2f0ef4=_0x219c5f['repository'];let _0x469fc9=_0x219c5f['diff']['newRevisionId'],_0x5c52da=_0x2c8ca6['id'];_0x2f0ef4['getIndex'](_0x469fc9)>_0x2f0ef4['getIndex'](_0x5c52da)&&([_0x469fc9,_0x5c52da]=[_0x5c52da,_0x469fc9]),_0x219c5f['compare'](_0x469fc9,_0x5c52da);},'isVisible':({plugins:_0x4a0a95},_0x1f21e3)=>{const _0x3ba426=_0x4a0a95['get'](RevisionViewer);return!(_0x3ba426['repository']['getRevisionsInDiff'](_0x3ba426['diff'])['length']>0x2)&&!_0x1f21e3['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x36ddb1,{id:_0x4878ff})=>{_0x36ddb1['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4878ff);},'isVisible':({plugins:_0x42e534},_0x49b071)=>!!_0x42e534['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x49b071['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x387f9b},{id:_0x4b57f0,revisionNameView:_0x549742})=>{const _0x2c282f=_0x387f9b['get'](RevisionViewer),_0x27936a=_0x2c282f['repository']['getEarlierVisibleRevision'](_0x4b57f0);_0x2c282f['compare'](_0x4b57f0,_0x27936a),_0x549742['focus'](),_0x549742['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4a2f37,_0x5a726d){super(_0x4a2f37),this['_view']=_0x5a726d,this['_toolbarConfig']=ht(_0x4a2f37['config']['get']('toolbar')),this['_elementReplacer']=new _0xf2e4c6();}get['element'](){return this['view']['element'];}['init'](_0x3367a3){const _0x560b9c=this['editor'],_0x2f17e7=this['view'],_0x1ae77a=_0x560b9c['editing']['view'],_0x498a5c=_0x2f17e7['editable'],_0x4108be=_0x1ae77a['document']['getRoot']();_0x498a5c['name']=_0x4108be['rootName'],_0x2f17e7['render']();const _0x58c219=_0x498a5c['element'];this['setEditableElement'](_0x498a5c['name'],_0x58c219),_0x2f17e7['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1ae77a['attachDomRoot'](_0x58c219),this['_elementReplacer']['replace'](_0x3367a3,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x18d519=this['view'],_0x41eb6c=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x41eb6c['detachDomRoot'](_0x18d519['editable']['name']),_0x18d519['destroy']();}['_initToolbar'](){const _0x320e34=this['view'];_0x320e34['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x320e34['stickyPanel']['limiterElement']=_0x320e34['element'],_0x320e34['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x32e7d0})=>_0x32e7d0),_0x320e34['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x320e34['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x53c566,_0x3cddcb,_0x298273={}){super(_0x53c566),this['stickyPanel']=new lt(_0x53c566),this['toolbar']=new ut(_0x53c566,{'shouldGroupWhenFull':_0x298273['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x53c566,_0x3cddcb);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
30
- _0x47b989(_0x5909ee){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x300a83,_0xd7b820){super(_0xd7b820),this['sourceElement']=_0x300a83,this['model']['document']['createRoot']();const _0x46870e=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x46870e);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4ca788,_0x1c1ec8){const _0x5c4a80=new this(_0x4ca788,_0x1c1ec8);return await _0x5c4a80['initPlugins'](),await _0x5c4a80['ui']['init'](_0x4ca788),await _0x5c4a80['data']['init'](_0x5c4a80['config']['get']('initialData')||''),_0x5c4a80['fire']('ready'),_0x5c4a80;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x41f403{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f8dd2){function _0x85e897(_0x54c161){return _0x54c161['map'](_0x15ce16=>String['fromCharCode'](_0x15ce16))['join']('');}super(_0x4f8dd2),this['result']='end',_0x4f8dd2[_0x85e897([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x85e897([0x76,0x69,0x65,0x77])][_0x85e897([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x85e897([0x61,0x75,0x74,0x6f]),_0x4f8dd2[_0x85e897([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x85e897([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x85e897([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x85e897([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x85e897([0x6f,0x6b])});}}class RevisionHistory extends _0x41f403{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x200554){if(super(_0x200554),!this['editor']['config']['get']('revisionHistory'))throw new _0x37ae31('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3a957b=>this['_showRevisionViewer']({..._0x3a957b,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4e91f1=>this['_closeRevisionViewer'](_0x4e91f1)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x6c94d7=>this['_restoreRevision'](_0x6c94d7)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2f7429){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2f7429;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x29bacd){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x29bacd);}['getRevision'](_0x25d1d1){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x25d1d1);}['getRevisions'](_0x14aafd){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x14aafd||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x3bb264=this['editor'],_0x2f7414=_0xee47a9(_0x3bb264,It),_0xa49dd0=_0x3bb264['plugins']['get']('RevisionTracker'),_0x28c0f3=_0x3bb264['plugins']['get'](_0x5445fe)['users'];return _0x2f7414['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2f7414['lazyRoots'],(_0x2f7414['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x41f403{static get['requires'](){return[RevisionViewer,_0x5445fe];}['init'](){const _0xf1409d=this['editor']['plugins']['get'](_0x5445fe);for(const _0x23d76e of _0x28c0f3)_0x23d76e['isAnonymous']||_0xf1409d['getUser'](_0x23d76e['id'])||_0xf1409d['addUser'](_0x23d76e);const _0x7b1005=_0xa49dd0['repository']['getRevisions']();let _0x364ecc=null;const _0x1e45f2=this['editor']['plugins']['get']('RevisionViewer');_0x1e45f2['adapter']=_0xa49dd0['adapter'],_0x1e45f2['bind']('isEnabled')['to'](_0xa49dd0),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x3bb264,'isReadOnly',_0x5b4914=>!_0x5b4914);for(const _0x3ac34b of _0x7b1005){const _0x129016=null===_0x3ac34b['creator'];if(_0x129016&&_0x3ac34b['toVersion']===_0x3ac34b['fromVersion'])continue;const _0x516f15=_0x3ac34b['toJSON']();_0x1e45f2['addRevisionData'](_0x516f15,(_0x19a491,_0x18e431,_0x249bfe)=>{if(_0x129016){if(_0x364ecc)_0x364ecc['_update'](_0x19a491,_0x18e431);else{if(!_0x18e431){const _0x510277=_0x249bfe['toJSON']();_0x510277['id']=_0x39af30(),_0xa49dd0['saveRevision'](_0x510277,_0x249bfe['toVersion'])['then'](_0x18820e=>{_0x364ecc=_0x18820e;});}}}else _0x3ac34b['_update'](_0x19a491,_0x18e431);});}}},RevisionsSidebar),_0x2f7414);}['_enhanceShowRevisionViewerCallback'](){const _0x36118e=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x5a3a5c=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0xc0c909=this['editor']['plugins']['get']('Autosave');await _0xc0c909['save']();}else await _0x5a3a5c['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xb2cec4=this['editor']['plugins']['get']('Dialog');_0xb2cec4['isOpen']&&_0xb2cec4['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x590236=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0xd5ef21 of _0x590236)_0xd5ef21['class']=_0xd5ef21['class']?_0xd5ef21['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x19328e=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x19328e&&_0x19328e['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x43cc74=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x43cc74&&_0x43cc74['setAttribute']('tabindex','-1');}}const _0xc758ed=this['_getRevisionViewerEditorConfig']();return _0x36118e(_0xc758ed)['then'](_0x3750fd=>{return(this['_viewerEditor']=_0x3750fd,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x3750fd);})['catch'](_0x362168=>(console['error'](_0x362168),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4f0cb9=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0xe0ebd3=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1aa7ac of _0xe0ebd3)_0x1aa7ac['class']='ck-tab-panel_disabled'===_0x1aa7ac['class']?'':_0x1aa7ac['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x23b941=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x23b941&&_0x23b941['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x34c2bf=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x34c2bf&&_0x34c2bf['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4f0cb9(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2a2935=this['editor']['plugins']['get']('Annotations');_0x2a2935['refreshVisibility'](),_0x2a2935['refreshPositioning']();}});});}['_showRevisionViewer'](_0x142e91){const _0x1b5647=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4d1c9f=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x38c5c2=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x38c5c2,_0x142e91)['then'](_0x2321f5=>(_0x4d1c9f['style']['display']='block',_0x1b5647['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2321f5));}['_closeRevisionViewer'](_0x276bb7){const _0x5f9c84=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5f9c84['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x276bb7['destroy']();}async['_restoreRevision'](_0x1a480f){const _0x13a44b=this['editor'],_0x52f8cd=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x31b764=_0x13a44b['plugins']['get']('RevisionTracker'),_0xe0922f=_0x13a44b['plugins']['get']('RevisionHistoryUtils'),_0x52968a=_0x52f8cd['repository']['getRevision'](_0x1a480f);let _0x5c3b29,_0x738519,_0x42d3bc;try{await _0xe0922f['loadRevisionData'](_0x52968a,this['adapter']),_0x5c3b29=_0xe0922f['getRevisionDocumentData'](_0x52968a),_0x738519=_0xe0922f['getRevisionRootsAttributes'](_0x52968a);}catch(_0x3d757d){return void console['error'](_0x3d757d);}_0x13a44b['model']['change'](_0x40416c=>{for(const _0xe79c00 of Array['from'](_0x13a44b['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x40416c['removeMarker'](_0xe79c00);}),_0x52f8cd['isReady']=!0x1,_0x13a44b['model']['enqueueChange'](_0x4f8dc0=>{_0x4f8dc0['setSelection'](null),_0x4f8dc0['removeSelectionAttribute'](_0x13a44b['model']['document']['selection']['getAttributeKeys']());const _0x43edf7=Object['keys'](_0x5c3b29);for(const _0x1ef2e5 of _0x13a44b['model']['document']['roots'])'$graveyard'!=_0x1ef2e5['rootName']&&_0x1ef2e5['isAttached']()&&!_0x43edf7['includes'](_0x1ef2e5['rootName'])&&_0x4f8dc0['detachRoot'](_0x1ef2e5);for(const _0x3fdf9c of _0x43edf7){let _0x16060d=_0x13a44b['model']['document']['getRoot'](_0x3fdf9c);if(!_0x16060d||!_0x16060d['isAttached']()){const _0x43768a=_0x52968a['diffData']?.[_0x3fdf9c]?.['rootElementName']||'$root';_0x16060d=_0x4f8dc0['addRoot'](_0x3fdf9c,_0x43768a);}const _0x3ab28e=_0x738519[_0x3fdf9c],_0x58cfbe=Object['keys'](_0x3ab28e),_0x391397=_0x5c3b29[_0x3fdf9c];for(const _0x22b1f2 of _0x16060d['getAttributeKeys']())_0x58cfbe['includes'](_0x22b1f2)||_0x4f8dc0['removeAttribute'](_0x22b1f2,_0x16060d);for(const _0x5b0587 of _0x58cfbe)_0x4f8dc0['setAttribute'](_0x5b0587,_0x738519[_0x3fdf9c][_0x5b0587],_0x16060d);_0x4f8dc0['remove'](_0x4f8dc0['createRangeIn'](_0x16060d)),_0x4f8dc0['insert'](_0x13a44b['data']['parse'](_0x391397,_0x16060d),_0x16060d,0x0);}});const _0x2f31b6=ft(_0x13a44b['locale'],'Restored');if(_0x52968a['name'])_0x42d3bc=-0x1==_0x52968a['name']['indexOf'](_0x2f31b6)?_0x2f31b6+':\x20'+_0x52968a['name']:_0x52968a['name'];else _0x42d3bc=_0x2f31b6+':\x20'+(_0x52968a['createdAt']['toLocaleDateString'](_0x13a44b['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x52968a['createdAt']['toLocaleTimeString'](_0x13a44b['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x31b764['saveRevision']({'name':_0x42d3bc}),_0x52f8cd['isReady']=!0x0,_0x13a44b['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
29
+ kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x53c02c){super(_0x53c02c),this['_revisionViewer']=_0x53c02c['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xbd5076=this['_revisionsRepository']['_revisions'],_0x5e645c=this['_createRevisionActions'](),_0xce8a96=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0xbd5076,_0x5e645c,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0xa55637,_0x209c4a)=>{_0x209c4a['revisionViews']['on']('add',(_0x2b892c,_0x472daf)=>{_0x472daf['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0xce8a96['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x584cab=this['_revisionsRepository']['getRevision'](0x0);if(_0x584cab){const _0xebf29b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x584cab['id']);this['_revisionViewer']['compare'](_0x584cab,_0xebf29b);}}['_handleRevisionSelected'](_0xb0f67d,_0x140492){const _0x452455=this['_revisionsRepository']['getRevision'](_0x140492['id']),_0x22d74d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x452455['id']);this['_revisionViewer']['compare'](_0x452455,_0x22d74d);}['_handleRevisionSetName'](_0x185439,_0x3e61ff){this['_revisionsRepository']['getRevision'](_0x3e61ff['id'])['setName'](_0x3e61ff['name']);}['_handleDiffChange'](_0x45f992,_0x1beb63,_0x48793f){const _0x124e87=this['_revisionsRepository']['getRevisionsInDiff'](_0x48793f);_0x124e87['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x124e87),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x124e87[0x0]));}['_createRevisionActions'](){const _0x3dea73=this['editor'],_0x23d338=RevisionsSidebar['availableRevisionActions'],_0x265b97=_0x3dea73['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x265b97['length'])return _0x265b97['map'](_0x397775=>{const _0x502ed0='string'==typeof _0x397775?Object['assign']({},_0x23d338[_0x397775]):_0x397775;return _0x502ed0['action']=_0x502ed0['action']['bind'](this,_0x3dea73),_0x502ed0['isVisible']&&(_0x502ed0['isVisible']=_0x502ed0['isVisible']['bind'](this,_0x3dea73)),_0x502ed0;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0xd13574},_0x234aae)=>{const _0x310c4b=_0xd13574['get'](RevisionViewer),_0x27e00a=_0x310c4b['repository'];let _0x57a59c=_0x310c4b['diff']['newRevisionId'],_0x32b509=_0x234aae['id'];_0x27e00a['getIndex'](_0x57a59c)>_0x27e00a['getIndex'](_0x32b509)&&([_0x57a59c,_0x32b509]=[_0x32b509,_0x57a59c]),_0x310c4b['compare'](_0x57a59c,_0x32b509);},'isVisible':({plugins:_0x3d17be},_0x2e84f7)=>{const _0x438ee1=_0x3d17be['get'](RevisionViewer);return!(_0x438ee1['repository']['getRevisionsInDiff'](_0x438ee1['diff'])['length']>0x2)&&!_0x2e84f7['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xcbaf5e,{id:_0x4143bd})=>{_0xcbaf5e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4143bd);},'isVisible':({plugins:_0x26222a},_0x5b7e40)=>!!_0x26222a['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x5b7e40['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x2cf199},{id:_0x542088,revisionNameView:_0x211cf7})=>{const _0x4bd55b=_0x2cf199['get'](RevisionViewer),_0x1fae40=_0x4bd55b['repository']['getEarlierVisibleRevision'](_0x542088);_0x4bd55b['compare'](_0x542088,_0x1fae40),_0x211cf7['focus'](),_0x211cf7['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4bd1d9,_0x5cc175){super(_0x4bd1d9),this['_view']=_0x5cc175,this['_toolbarConfig']=ht(_0x4bd1d9['config']['get']('toolbar')),this['_elementReplacer']=new _0x3bda9b();}get['element'](){return this['view']['element'];}['init'](_0x388825){const _0x3e1207=this['editor'],_0x416387=this['view'],_0x5f42e8=_0x3e1207['editing']['view'],_0x2c54b6=_0x416387['editable'],_0x3d3bc9=_0x5f42e8['document']['getRoot']();_0x2c54b6['name']=_0x3d3bc9['rootName'],_0x416387['render']();const _0xb8cfb4=_0x2c54b6['element'];this['setEditableElement'](_0x2c54b6['name'],_0xb8cfb4),_0x416387['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5f42e8['attachDomRoot'](_0xb8cfb4),this['_elementReplacer']['replace'](_0x388825,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x2377c1=this['view'],_0x45ee2a=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x45ee2a['detachDomRoot'](_0x2377c1['editable']['name']),_0x2377c1['destroy']();}['_initToolbar'](){const _0x440844=this['view'];_0x440844['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x440844['stickyPanel']['limiterElement']=_0x440844['element'],_0x440844['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xeaa994})=>_0xeaa994),_0x440844['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x440844['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x2a919f,_0x5a98d5,_0x16b6b3={}){super(_0x2a919f),this['stickyPanel']=new lt(_0x2a919f),this['toolbar']=new ut(_0x2a919f,{'shouldGroupWhenFull':_0x16b6b3['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x2a919f,_0x5a98d5);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
30
+ _0xa4dcc7(_0xb70b37){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x47abf1,_0x11f02c){super(_0x11f02c),this['sourceElement']=_0x47abf1,this['model']['document']['createRoot']();const _0x5380cb=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x5380cb);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x447a3e,_0x37e5ba){const _0x42faee=new this(_0x447a3e,_0x37e5ba);return await _0x42faee['initPlugins'](),await _0x42faee['ui']['init'](_0x447a3e),await _0x42faee['data']['init'](_0x42faee['config']['get']('initialData')||''),_0x42faee['fire']('ready'),_0x42faee;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x20daab{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30455d){function _0x484fe6(_0x5a2742){return _0x5a2742['map'](_0x206975=>String['fromCharCode'](_0x206975))['join']('');}super(_0x30455d),this['result']='end',_0x30455d[_0x484fe6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x484fe6([0x76,0x69,0x65,0x77])][_0x484fe6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x484fe6([0x61,0x75,0x74,0x6f]),_0x30455d[_0x484fe6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x484fe6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x484fe6([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x484fe6([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x484fe6([0x6f,0x6b])});}}class RevisionHistory extends _0x20daab{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x37ab73){if(super(_0x37ab73),!this['editor']['config']['get']('revisionHistory'))throw new _0x5e0c91('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xcd640b=>this['_showRevisionViewer']({..._0xcd640b,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1edcc2=>this['_closeRevisionViewer'](_0x1edcc2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x5913be=>this['_restoreRevision'](_0x5913be)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4b11b9){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4b11b9;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x51e22b){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x51e22b);}['getRevision'](_0x3eca28){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3eca28);}['getRevisions'](_0x1b4811){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1b4811||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4fa0f3=this['editor'],_0x2c1119=_0x4eb3e3(_0x4fa0f3,It),_0x647851=_0x4fa0f3['plugins']['get']('RevisionTracker'),_0xd5254a=_0x4fa0f3['plugins']['get'](_0xf95694)['users'];return _0x2c1119['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2c1119['lazyRoots'],(_0x2c1119['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x20daab{static get['requires'](){return[RevisionViewer,_0xf95694];}['init'](){const _0x3ebac6=this['editor']['plugins']['get'](_0xf95694);for(const _0x177b80 of _0xd5254a)_0x177b80['isAnonymous']||_0x3ebac6['getUser'](_0x177b80['id'])||_0x3ebac6['addUser'](_0x177b80);const _0x3ac9f7=_0x647851['repository']['getRevisions']();let _0x5b2cc4=null;const _0x5722fe=this['editor']['plugins']['get']('RevisionViewer');_0x5722fe['adapter']=_0x647851['adapter'],_0x5722fe['bind']('isEnabled')['to'](_0x647851),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4fa0f3,'isReadOnly',_0x2d539f=>!_0x2d539f);for(const _0x39bcf8 of _0x3ac9f7){const _0x2c754b=null===_0x39bcf8['creator'];if(_0x2c754b&&_0x39bcf8['toVersion']===_0x39bcf8['fromVersion'])continue;const _0x3ebb9e=_0x39bcf8['toJSON']();_0x5722fe['addRevisionData'](_0x3ebb9e,(_0x55ac40,_0x23b7bd,_0x11795b)=>{if(_0x2c754b){if(_0x5b2cc4)_0x5b2cc4['_update'](_0x55ac40,_0x23b7bd);else{if(!_0x23b7bd){const _0x43ef26=_0x11795b['toJSON']();_0x43ef26['id']=_0x13bc90(),_0x647851['saveRevision'](_0x43ef26,_0x11795b['toVersion'])['then'](_0x189906=>{_0x5b2cc4=_0x189906;});}}}else _0x39bcf8['_update'](_0x55ac40,_0x23b7bd);});}}},RevisionsSidebar),_0x2c1119);}['_enhanceShowRevisionViewerCallback'](){const _0x1f9591=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x41a320=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x2f1121=this['editor']['plugins']['get']('Autosave');await _0x2f1121['save']();}else await _0x41a320['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x55579e=this['editor']['plugins']['get']('Dialog');_0x55579e['isOpen']&&_0x55579e['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x17f125=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x553db4 of _0x17f125)_0x553db4['class']=_0x553db4['class']?_0x553db4['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x3418e7=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3418e7&&_0x3418e7['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x37b756=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x37b756&&_0x37b756['setAttribute']('tabindex','-1');}}const _0x5bd27a=this['_getRevisionViewerEditorConfig']();return _0x1f9591(_0x5bd27a)['then'](_0x1fb280=>{return(this['_viewerEditor']=_0x1fb280,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x1fb280);})['catch'](_0x51c9c1=>(console['error'](_0x51c9c1),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x86554e=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x2e9d01=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x137af4 of _0x2e9d01)_0x137af4['class']='ck-tab-panel_disabled'===_0x137af4['class']?'':_0x137af4['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x4c09e4=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4c09e4&&_0x4c09e4['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x528dd4=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x528dd4&&_0x528dd4['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x86554e(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x10c4ae=this['editor']['plugins']['get']('Annotations');_0x10c4ae['refreshVisibility'](),_0x10c4ae['refreshPositioning']();}});});}['_showRevisionViewer'](_0x253cb5){const _0x5b52ea=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x365e71=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x365712=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x365712,_0x253cb5)['then'](_0x2d1dc4=>(_0x365e71['style']['display']='block',_0x5b52ea['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x2d1dc4));}['_closeRevisionViewer'](_0x37d149){const _0x16a2b0=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x16a2b0['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x37d149['destroy']();}async['_restoreRevision'](_0x2f42c2){const _0x5b85cf=this['editor'],_0x3302ad=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5cbdf7=_0x5b85cf['plugins']['get']('RevisionTracker'),_0x576daf=_0x5b85cf['plugins']['get']('RevisionHistoryUtils'),_0x50342a=_0x3302ad['repository']['getRevision'](_0x2f42c2);let _0x3a7803,_0x3bc2aa,_0xfe7c68;try{await _0x576daf['loadRevisionData'](_0x50342a,this['adapter']),_0x3a7803=_0x576daf['getRevisionDocumentData'](_0x50342a),_0x3bc2aa=_0x576daf['getRevisionRootsAttributes'](_0x50342a);}catch(_0x42964e){return void console['error'](_0x42964e);}_0x5b85cf['model']['change'](_0x259737=>{for(const _0x3fe73e of Array['from'](_0x5b85cf['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x259737['removeMarker'](_0x3fe73e);}),_0x3302ad['isReady']=!0x1,_0x5b85cf['model']['enqueueChange'](_0x3fecad=>{_0x3fecad['setSelection'](null),_0x3fecad['removeSelectionAttribute'](_0x5b85cf['model']['document']['selection']['getAttributeKeys']());const _0x137238=Object['keys'](_0x3a7803);for(const _0x1f51f8 of _0x5b85cf['model']['document']['roots'])'$graveyard'!=_0x1f51f8['rootName']&&_0x1f51f8['isAttached']()&&!_0x137238['includes'](_0x1f51f8['rootName'])&&_0x3fecad['detachRoot'](_0x1f51f8);for(const _0x2e4be9 of _0x137238){let _0x31769f=_0x5b85cf['model']['document']['getRoot'](_0x2e4be9);if(!_0x31769f||!_0x31769f['isAttached']()){const _0x1f2d85=_0x50342a['diffData']?.[_0x2e4be9]?.['rootElementName']||'$root';_0x31769f=_0x3fecad['addRoot'](_0x2e4be9,_0x1f2d85);}const _0x4857ee=_0x3bc2aa[_0x2e4be9],_0x399f32=Object['keys'](_0x4857ee),_0xc6d57=_0x3a7803[_0x2e4be9];for(const _0x57ea32 of _0x31769f['getAttributeKeys']())_0x399f32['includes'](_0x57ea32)||_0x3fecad['removeAttribute'](_0x57ea32,_0x31769f);for(const _0x5db14d of _0x399f32)_0x3fecad['setAttribute'](_0x5db14d,_0x3bc2aa[_0x2e4be9][_0x5db14d],_0x31769f);_0x3fecad['remove'](_0x3fecad['createRangeIn'](_0x31769f)),_0x3fecad['insert'](_0x5b85cf['data']['parse'](_0xc6d57,_0x31769f),_0x31769f,0x0);}});const _0xcdb98f=ft(_0x5b85cf['locale'],'Restored');if(_0x50342a['name'])_0xfe7c68=-0x1==_0x50342a['name']['indexOf'](_0xcdb98f)?_0xcdb98f+':\x20'+_0x50342a['name']:_0x50342a['name'];else _0xfe7c68=_0xcdb98f+':\x20'+(_0x50342a['createdAt']['toLocaleDateString'](_0x5b85cf['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x50342a['createdAt']['toLocaleTimeString'](_0x5b85cf['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5cbdf7['saveRevision']({'name':_0xfe7c68}),_0x3302ad['isReady']=!0x0,_0x5b85cf['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-revision-history",
3
- "version": "48.2.0-alpha.3",
3
+ "version": "48.2.0-alpha.4",
4
4
  "description": "Document revision history feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -34,15 +34,15 @@
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "dependencies": {
37
- "@ckeditor/ckeditor5-autosave": "48.2.0-alpha.3",
38
- "@ckeditor/ckeditor5-collaboration-core": "48.2.0-alpha.3",
39
- "@ckeditor/ckeditor5-comments": "48.2.0-alpha.3",
40
- "@ckeditor/ckeditor5-core": "48.2.0-alpha.3",
41
- "@ckeditor/ckeditor5-engine": "48.2.0-alpha.3",
42
- "@ckeditor/ckeditor5-icons": "48.2.0-alpha.3",
43
- "@ckeditor/ckeditor5-ui": "48.2.0-alpha.3",
44
- "@ckeditor/ckeditor5-utils": "48.2.0-alpha.3",
45
- "@ckeditor/ckeditor5-widget": "48.2.0-alpha.3",
37
+ "@ckeditor/ckeditor5-autosave": "48.2.0-alpha.4",
38
+ "@ckeditor/ckeditor5-collaboration-core": "48.2.0-alpha.4",
39
+ "@ckeditor/ckeditor5-comments": "48.2.0-alpha.4",
40
+ "@ckeditor/ckeditor5-core": "48.2.0-alpha.4",
41
+ "@ckeditor/ckeditor5-engine": "48.2.0-alpha.4",
42
+ "@ckeditor/ckeditor5-icons": "48.2.0-alpha.4",
43
+ "@ckeditor/ckeditor5-ui": "48.2.0-alpha.4",
44
+ "@ckeditor/ckeditor5-utils": "48.2.0-alpha.4",
45
+ "@ckeditor/ckeditor5-widget": "48.2.0-alpha.4",
46
46
  "@types/luxon": "3.6.2",
47
47
  "es-toolkit": "1.45.1",
48
48
  "luxon": "3.6.1"