@ckeditor/ckeditor5-revision-history 47.3.0-alpha.3 → 47.3.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x22a4be,uid as _0x2dfa83,Collection as _0x251a29,logWarning as _0x54b865,FocusTracker as _0x388333,KeystrokeHandler as _0x26fba6,scrollViewportToShowTarget as _0x3d2b4e,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x4077b7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x527c0e,set as _0x3b43e0,unset as _0x520551,isEqual as _0x39d83a}from'es-toolkit/compat';import{Plugin as _0x1364e3,PendingActions as _0x3a37f6,Command as _0xb5a33c,ElementApiMixin as _0x4af2d8,Editor as _0xb3fb01}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x5c9017,getMarkerDomElement as _0x3fd798,ConfirmMixin as _0x3a3f2,sanitizeEditorConfig as _0x1668a1}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x16a926,ViewAttributeElement as _0x3528c4,ViewEmptyElement as _0xffac54,ViewRawElement as _0x26afd9,ViewUIElement as _0x2d7c1c,ViewDocumentFragment as _0x4f4d4d,ViewText as _0x2f86d9,ViewElement as _0x3705f0,ModelElement as _0x16f0c7,ModelRange as _0xcb6e88,ModelPosition as _0x5b5e61,ModelDocumentFragment as _0x2f3b68,ModelText as _0x5f2ff2}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x259bca,IconChevronUp as _0x518d3d,IconChevronDown as _0x3c5bb8,IconUndo as _0x1aa720,IconUser as _0x2f25e7,IconThreeVerticalDots as _0x30c92e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x4bddad,View as _0x1f8770,submitHandler as _0x537bd1,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x487766,ListView as _0x5afdd7,ListItemView as _0x12265d,ButtonView as _0x29aa73,MenuBarMenuView as _0x3e57cc,MenuBarMenuListView as _0xf0202a,MenuBarMenuListItemView as _0x94d30d,MenuBarMenuListItemButtonView as _0x413118,ContextualBalloon as _0x534cd2,ToolbarSeparatorView as _0x2bbfd2,IconView as _0x34cdce,addListToDropdown as _0x46e463,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x5afad5,StickyPanelView as _0x2f947a,ToolbarView as _0x2f00e2,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x226922}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x22a4be(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x44071c){super(),this['id']=_0x44071c['id']||_0x2dfa83(),this['creator']=_0x44071c['creator']||null,this['authors']=_0x44071c['authors']||[],this['diffData']=_0x44071c['diffData']||null,this['toVersion']=_0x44071c['toVersion']||0x0,this['fromVersion']=_0x44071c['fromVersion']||0x0,this['set']('name',_0x44071c['name']||''),this['set']('createdAt',_0x44071c['createdAt']||new Date()),this['set']('attributes',_0x44071c['attributes']||{});}['setName'](_0x482d6d){this['_update']({'name':_0x482d6d});}['setAttribute'](_0x4529c5,_0xd421bb){const _0x21b6a2=_0x527c0e(this['attributes']);_0x3b43e0(_0x21b6a2,_0x4529c5,_0xd421bb),this['_update']({'attributes':_0x21b6a2});}['removeAttribute'](_0x4b3a3f){const _0x336e56=_0x527c0e(this['attributes']);_0x520551(_0x336e56,_0x4b3a3f),this['_update']({'attributes':_0x336e56});}['_update'](_0x4d9a01,_0x1c56eb=!0x1){let _0x3e9141=!0x1;const _0x434c21={'id':this['id']},_0x4d4970=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x5540eb of _0x4d4970){const _0x2170ac=_0x4d9a01[_0x5540eb];void 0x0!==_0x2170ac&&_0x2170ac!==this[_0x5540eb]&&(this[_0x5540eb]=_0x2170ac,_0x434c21[_0x5540eb]=_0x2170ac,_0x3e9141=!0x0);}_0x3e9141&&(_0x434c21['authors']&&(_0x434c21['authorsIds']=_0x434c21['authors']['map'](_0x142355=>_0x142355['id']),delete _0x434c21['authors']),this['fire']('_update',_0x434c21,_0x1c56eb));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x59f29e=>_0x59f29e['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x1364e3{['_revisions'];static get['requires'](){return[_0x5c9017];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5e252f){super(_0x5e252f),this['_revisions']=new _0x251a29();}['afterInit'](){!async function(_0x59d49a){const _0x15b042=_0x27e508([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]),_0x5ea56f=0xeb829,_0x5167ec=0x359e09b0,_0x426213=0x359973c8^_0x5167ec,_0x392f95=window[_0x27e508([0x44,0x61,0x74,0x65])][_0x27e508([0x6e,0x6f,0x77])](),_0x2ccfe=_0x59d49a[_0x27e508([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1687b7=new window[(_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x7fe942=>{_0x2ccfe[_0x27e508([0x6f,0x6e,0x63,0x65])](_0x27e508([0x72,0x65,0x61,0x64,0x79]),_0x7fe942);}),_0x4c8bb3={[_0x27e508([0x6b,0x74,0x79])]:_0x27e508([0x45,0x43]),[_0x27e508([0x75,0x73,0x65])]:_0x27e508([0x73,0x69,0x67]),[_0x27e508([0x63,0x72,0x76])]:_0x27e508([0x50,0x2d,0x32,0x35,0x36]),[_0x27e508([0x78])]:_0x27e508([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]),[_0x27e508([0x79])]:_0x27e508([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]),[_0x27e508([0x61,0x6c,0x67])]:_0x27e508([0x45,0x53,0x32,0x35,0x36])},_0x3b9fbf=_0x2ccfe[_0x27e508([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x27e508([0x67,0x65,0x74])](_0x27e508([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x97b1fd(){let _0x11bf3f,_0x2f0c29=null,_0x53d5cc=null;try{if(_0x3b9fbf==_0x27e508([0x47,0x50,0x4c]))return _0x27e508([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x11bf3f=_0x1b1b27(),!_0x11bf3f)return _0x27e508([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x11bf3f[_0x27e508([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x53d5cc=_0x3e4244(_0x11bf3f[_0x27e508([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x11bf3f[_0x27e508([0x6a,0x74,0x69])])),await _0x1b8bc0()?_0x54ac52()?_0x4373c8()?_0x27e508([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x360630()?(_0x11bf3f[_0x27e508([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x27e508([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2f0c29=_0x2ef1fd(_0x27e508([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x11bf3f[_0x27e508([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x27e508([0x74,0x72,0x69,0x61,0x6c])&&(_0x2f0c29=_0x2ef1fd(_0x27e508([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x942bf8()):_0x27e508([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x27e508([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x27e508([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x27e508([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4373c8(){const _0x56fbf4=[_0x27e508([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x27e508([0x74,0x72,0x69,0x61,0x6c])][_0x27e508([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11bf3f[_0x27e508([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x392f95/0x3e8:0xe10*_0x426213;return _0x11bf3f[_0x27e508([0x65,0x78,0x70])]<_0x56fbf4;}function _0x54ac52(){const _0x589726=_0x11bf3f[_0x27e508([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x589726)return!0x1;if(_0x589726[_0x27e508([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e508([0x2a])))return!0x0;if(_0x589726[_0x27e508([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e508([0x52,0x48])))return!0x0;if(_0x589726[_0x27e508([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e508([0x52,0x52,0x48]))){if(_0x3e50fa())return!0x0;if(_0x459cf8()||_0x1ffc7e())return!0x0;}return!0x1;}function _0x360630(){const _0x2888c1=_0x11bf3f[_0x27e508([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2888c1||0x0==_0x2888c1[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x31d1c8}=new URL(window[_0x27e508([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2888c1[_0x27e508([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31d1c8))return!0x0;const _0x298f6d=_0x31d1c8[_0x27e508([0x73,0x70,0x6c,0x69,0x74])](_0x27e508([0x2e]));return _0x2888c1[_0x27e508([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x146716=>_0x146716[_0x27e508([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27e508([0x2a])))[_0x27e508([0x6d,0x61,0x70])](_0xf797b9=>_0xf797b9[_0x27e508([0x73,0x70,0x6c,0x69,0x74])](_0x27e508([0x2e])))[_0x27e508([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x45b6c0=>_0x45b6c0[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x298f6d[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27e508([0x6d,0x61,0x70])](_0x52f0fe=>Array(_0x298f6d[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x52f0fe[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x27e508([0x66,0x69,0x6c,0x6c])](_0x52f0fe[0x0]===_0x27e508([0x2a])?_0x27e508([0x2a]):'')[_0x27e508([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x52f0fe))[_0x27e508([0x73,0x6f,0x6d,0x65])](_0x58f2a2=>_0x298f6d[_0x27e508([0x65,0x76,0x65,0x72,0x79])]((_0xf40e65,_0x129fa0)=>_0x58f2a2[_0x129fa0]===_0xf40e65||_0x58f2a2[_0x129fa0]===_0x27e508([0x2a])));}function _0x942bf8(){return _0x2f0c29&&_0x53d5cc?new window[(_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f09d4,_0x41b09f)=>{_0x2f0c29[_0x27e508([0x74,0x68,0x65,0x6e])](_0x3f09d4,_0x41b09f),_0x53d5cc[_0x27e508([0x74,0x68,0x65,0x6e])](_0x382a64=>{_0x382a64!=_0x27e508([0x56,0x61,0x6c,0x69,0x64])&&_0x3f09d4(_0x382a64);},_0x41b09f);}):_0x2f0c29||_0x53d5cc||_0x27e508([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3e4244(_0x5b7f9d,_0x2ca58c){return new window[(_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c5fe7=>{if(_0x29d019())return _0x3c5fe7(_0x27e508([0x56,0x61,0x6c,0x69,0x64]));_0xa69fe1(),_0x2ccfe[_0x27e508([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x27e508([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4a2597=!0x1;const _0x934acf=_0x2dfa83();function _0x2b48a9(_0x342df0){return!!_0x342df0&&(typeof _0x342df0===_0x27e508([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x342df0===_0x27e508([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x342df0[_0x27e508([0x74,0x68,0x65,0x6e])]===_0x27e508([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x342df0[_0x27e508([0x63,0x61,0x74,0x63,0x68])]===_0x27e508([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x50e66e(_0x31c22b){_0xa776d8(_0x31c22b)[_0x27e508([0x74,0x68,0x65,0x6e])](_0x2eb907=>{if(!_0x2eb907||_0x2eb907[_0x27e508([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x27e508([0x6f,0x6b]))return _0x27e508([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x325153(_0x4a8f0b(_0x934acf+_0x2ca58c))!=_0x2eb907[_0x27e508([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x27e508([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x27e508([0x56,0x61,0x6c,0x69,0x64]);})[_0x27e508([0x74,0x68,0x65,0x6e])](_0xbdc28=>(_0x5cacc6(),_0xbdc28),()=>{const _0x1f0883=_0x1cbfac();return null==_0x1f0883?(_0x5cacc6(),_0x27e508([0x56,0x61,0x6c,0x69,0x64])):_0x27e508(_0x392f95-_0x1f0883>(0x11928db0^_0x5167ec)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x27e508([0x74,0x68,0x65,0x6e])](_0x3c5fe7)[_0x27e508([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3c5fe7(_0x27e508([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x572a19=0x35a8e730^_0x5167ec;function _0x5cacc6(){const _0x327acb=_0x27e508([0x6c,0x6c,0x63,0x74,0x2d])+_0x325153(_0x4a8f0b(_0x5b7f9d)),_0x1330cd=_0x55a522(_0x325153(window[_0x27e508([0x4d,0x61,0x74,0x68])][_0x27e508([0x63,0x65,0x69,0x6c])](_0x392f95/_0x572a19)));window[_0x27e508([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27e508([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x327acb,_0x1330cd);}function _0x1cbfac(){const _0x4504a7=_0x27e508([0x6c,0x6c,0x63,0x74,0x2d])+_0x325153(_0x4a8f0b(_0x5b7f9d)),_0x5ea0de=window[_0x27e508([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x27e508([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4504a7);return _0x5ea0de?window[_0x27e508([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x55a522(_0x5ea0de),0x10)*_0x572a19:null;}function _0xa776d8(_0x5cd617){return new window[(_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x413d28,_0x401cae)=>{_0x5cd617[_0x27e508([0x74,0x68,0x65,0x6e])](_0x413d28,_0x401cae),window[_0x27e508([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x401cae,0x359fdd70^_0x5167ec);});}}_0x2ccfe[_0x27e508([0x6f,0x6e])](_0x27e508([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2e7404,_0xc36721)=>{if(_0xc36721[0x0]!=_0x5b7f9d)return _0x3c5fe7(_0x27e508([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xc36721[0x1]={..._0xc36721[0x1],[_0x27e508([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x934acf};},{[_0x27e508([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27e508([0x68,0x69,0x67,0x68])}),_0x2ccfe[_0x27e508([0x6f,0x6e])](_0x27e508([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x430dfa=>{_0x2b48a9(_0x430dfa[_0x27e508([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4a2597=!0x0,_0x50e66e(_0x430dfa[_0x27e508([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x27e508([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x27e508([0x6c,0x6f,0x77])}),_0x1687b7[_0x27e508([0x74,0x68,0x65,0x6e])](()=>{_0x4a2597||_0x3c5fe7(_0x27e508([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x29d019(){return _0x2ccfe[_0x27e508([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27e508([0x76,0x69,0x65,0x77])][_0x27e508([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x27e508([0x61,0x75,0x74,0x6f]);}function _0xa69fe1(){_0x2ccfe[_0x27e508([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x27e508([0x76,0x69,0x65,0x77])][_0x27e508([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x27e508([0x61,0x75,0x74,0x6f]);}}function _0x2ef1fd(_0x33b2d1){const _0x5c85d3=[new window[(_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ef13a=>setTimeout(_0x5ef13a,0x3597377c^_0x5167ec)),_0x1687b7[_0x27e508([0x74,0x68,0x65,0x6e])](()=>new window[(_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x238395=>{const _0xbcc518=0x359e09b7^_0x5167ec,_0x51c417=_0x59d49a[_0x27e508([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0xeabd5f(){_0x51c417[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xbcc518&&_0x238395();}_0xeabd5f(),_0x51c417[_0x27e508([0x6f,0x6e])](_0x27e508([0x61,0x64,0x64]),_0xeabd5f);})),new window[(_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d448f=>{function _0x261be7(){for(const _0x2ddd95 in window)if(window[_0x27e508([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x27e508([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2ddd95))&&window[_0x2ddd95]==_0x5ea56f)return _0x4d448f();_0x2ccfe[_0x27e508([0x73,0x74,0x61,0x74,0x65])]!=_0x27e508([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x27e508([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x261be7,0x359e1a38^_0x5167ec);}_0xf42b82(_0x27e508([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x261be7();})];return window[_0x27e508([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x27e508([0x72,0x61,0x63,0x65])](_0x5c85d3)[_0x27e508([0x74,0x68,0x65,0x6e])](()=>_0x33b2d1);}async function _0x107df9(){if(await _0x1687b7,_0xf42b82(_0x27e508([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x475f38=_0x59d49a[_0x27e508([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x104f9a=_0x59d49a[_0x27e508([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])](_0x475f38[_0x27e508([0x69,0x64])]),_0x4dc134=_0x34d985(_0x27e508([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4dc134[_0x27e508([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x475f38['id'],_0x104f9a?_0x104f9a['id']:null,!0x0),_0x4dc134[_0x27e508([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x27e508([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4dc134[_0x27e508([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4dc134[_0x27e508([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x18a6cd,void(_0x4dc134[_0x27e508([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x18a6cd);}if(_0xf42b82(_0x27e508([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1678ba=_0x34d985(_0x27e508([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1678ba[_0x27e508([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x27e508([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1678ba[_0x27e508([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1678ba[_0x27e508([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x18a6cd,_0x1678ba[_0x27e508([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x18a6cd;}_0x2ccfe[_0x27e508([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e508([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x18a6cd,_0x2ccfe[_0x27e508([0x6d,0x6f,0x64,0x65,0x6c])][_0x27e508([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x18a6cd,_0x2ccfe[_0x27e508([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x27e508([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3e50fa(){return _0xf42b82(_0x27e508([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x34d985(_0x27e508([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x27e508([0x73,0x74,0x61,0x74,0x65])]==_0x27e508([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x459cf8(){return _0xf42b82(_0x27e508([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 _0x1ffc7e(){return _0xf42b82(_0x27e508([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xde8b1c(_0x156daf){const _0x378c44=_0x3c1b0e();_0x2ccfe[_0x378c44]=_0x27e508([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])+_0x156daf,_0x156daf[_0x27e508([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x27e508([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x3c1b0e()]=_0x5ea56f),_0x156daf!=_0x27e508([0x56,0x61,0x6c,0x69,0x64])&&_0x107df9();}function _0x3c1b0e(){const _0x58ef87=window[_0x27e508([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x27e508([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x27e508([0x6e,0x6f,0x77])]())[_0x27e508([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x27e508([0x2e]),'');let _0x44272e=_0x27e508([0x76]);for(let _0x4dc1a6=0x0;_0x4dc1a6<_0x58ef87[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4dc1a6+=0x2){let _0x4d540b=window[_0x27e508([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58ef87[_0x27e508([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4dc1a6,_0x4dc1a6+0x2));_0x4d540b>=_0x15b042[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4d540b-=_0x15b042[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x44272e+=_0x15b042[_0x4d540b];}return _0x44272e;}function _0x1b1b27(){const _0x4fed1d=_0x3b9fbf[_0x27e508([0x73,0x70,0x6c,0x69,0x74])](_0x27e508([0x2e]));if(0x3!=_0x4fed1d[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x433d18(_0x4fed1d[0x1]);function _0x433d18(_0x4310f2){const _0x502803=_0xb60b87(_0x4310f2);return _0x502803&&_0x114c1c()?_0x502803:null;function _0x114c1c(){const _0x165efa=_0x502803[_0x27e508([0x6a,0x74,0x69])],_0x1da97c=window[_0x27e508([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x165efa[_0x27e508([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x165efa[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x13ab66={..._0x502803,[_0x27e508([0x6a,0x74,0x69])]:_0x165efa[_0x27e508([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x165efa[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x13ab66[_0x27e508([0x76,0x63])],_0x4a8f0b(_0x13ab66)==_0x1da97c;}}}async function _0x1b8bc0(){let _0x3126d2=!0x0;try{const _0x26a732=_0x3b9fbf[_0x27e508([0x73,0x70,0x6c,0x69,0x74])](_0x27e508([0x2e])),[_0x444c59,_0x722cf7,_0x2b9647]=_0x26a732;return _0x5a120b(_0x444c59),await _0x3b211b(_0x444c59,_0x722cf7,_0x2b9647),_0x3126d2;}catch{return!0x1;}function _0x5a120b(_0x283250){const _0x9a9382=_0xb60b87(_0x283250);_0x9a9382&&_0x9a9382[_0x27e508([0x61,0x6c,0x67])]==_0x27e508([0x45,0x53,0x32,0x35,0x36])||(_0x3126d2=!0x1);}async function _0x3b211b(_0x2d88d1,_0x531d2b,_0x50ee42){const _0x168f72=window[_0x27e508([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x27e508([0x66,0x72,0x6f,0x6d])](_0xf143fe(_0x50ee42),_0x492dc7=>_0x492dc7[_0x27e508([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2d5159=new window[(_0x27e508([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x27e508([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2d88d1+_0x27e508([0x2e])+_0x531d2b),_0x50dde6=window[_0x27e508([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x27e508([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x50dde6)return;const _0x5c23b4=await _0x50dde6[_0x27e508([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x27e508([0x6a,0x77,0x6b]),_0x4c8bb3,{[_0x27e508([0x6e,0x61,0x6d,0x65])]:_0x27e508([0x45,0x43,0x44,0x53,0x41]),[_0x27e508([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x27e508([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x27e508([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x50dde6[_0x27e508([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x27e508([0x6e,0x61,0x6d,0x65])]:_0x27e508([0x45,0x43,0x44,0x53,0x41]),[_0x27e508([0x68,0x61,0x73,0x68])]:{[_0x27e508([0x6e,0x61,0x6d,0x65])]:_0x27e508([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c23b4,_0x168f72,_0x2d5159)||(_0x3126d2=!0x1);}}function _0xb60b87(_0x43718f){return _0x43718f[_0x27e508([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x27e508([0x65,0x79]))?JSON[_0x27e508([0x70,0x61,0x72,0x73,0x65])](_0xf143fe(_0x43718f)):null;}function _0xf143fe(_0x286f74){return window[_0x27e508([0x61,0x74,0x6f,0x62])](_0x286f74[_0x27e508([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x27e508([0x2b]))[_0x27e508([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x27e508([0x2f])));}function _0x4a8f0b(_0x5e03e9){let _0x5e3b49=0x1505;function _0x44099b(_0xdcf96a){for(let _0x19ea81=0x0;_0x19ea81<_0xdcf96a[_0x27e508([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19ea81++){const _0x28ff64=_0xdcf96a[_0x27e508([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x19ea81);_0x5e3b49=(_0x5e3b49<<0x5)+_0x5e3b49+_0x28ff64,_0x5e3b49&=_0x5e3b49;}}function _0x3cdd61(_0x318c7c){Array[_0x27e508([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x318c7c)?_0x318c7c[_0x27e508([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3cdd61):_0x318c7c&&typeof _0x318c7c==_0x27e508([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x27e508([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x318c7c)[_0x27e508([0x73,0x6f,0x72,0x74])]()[_0x27e508([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x40c5fd,_0x1d6609])=>{_0x44099b(_0x40c5fd),_0x3cdd61(_0x1d6609);}):_0x44099b(window[_0x27e508([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x318c7c));}return _0x3cdd61(_0x5e03e9),_0x5e3b49>>>0x0;}function _0x325153(_0x3907c1){return _0x3907c1[_0x27e508([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x27e508([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x27e508([0x30]));}function _0x55a522(_0x22151d){return _0x22151d[_0x27e508([0x73,0x70,0x6c,0x69,0x74])]('')[_0x27e508([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x27e508([0x6a,0x6f,0x69,0x6e])]('');}function _0xf42b82(_0x39707c){return _0x2ccfe[_0x27e508([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x27e508([0x68,0x61,0x73])](_0x39707c);}function _0x34d985(_0x430921){return _0x2ccfe[_0x27e508([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x27e508([0x67,0x65,0x74])](_0x430921);}function _0x18a6cd(){}function _0x27e508(_0x2756eb){return _0x2756eb['map'](_0x4e088f=>String['fromCharCode'](_0x4e088f))['join']('');}_0xde8b1c(await _0x97b1fd());}(this);}['createRevision'](_0x550594){const _0x1fc9fd=this['editor']['plugins']['get']('Users');return new I({'id':_0x550594['id'],'name':_0x550594['name'],'creator':_0x550594['creatorId']?_0x1fc9fd['getUser'](_0x550594['creatorId']):null,'diffData':_0x550594['diffData']||_0x550594['data'],'authors':_0x550594['authorsIds']['map'](_0x2091d5=>_0x1fc9fd['getUser'](_0x2091d5)),'createdAt':new Date(_0x550594['createdAt']),'attributes':_0x550594['attributes'],'fromVersion':_0x550594['fromVersion'],'toVersion':_0x550594['toVersion']});}['addRevision'](_0x5888b6,_0x290259=0x0){this['_revisions']['add'](_0x5888b6,_0x290259);}['getRevision'](_0x593a77){return this['_revisions']['get'](_0x593a77);}['getRevisions'](_0x843288={'toJSON':!0x1}){const _0x7dd50c=Array['from'](this['_revisions']);return _0x7dd50c['reverse'](),_0x843288['toJSON']?_0x7dd50c['map'](_0x57c184=>_0x57c184['toJSON']()):_0x7dd50c;}['getIndex'](_0x52ee80){return this['_revisions']['getIndex'](_0x52ee80);}['getEarlierVisibleRevision'](_0x1f3b65){const [,_0x2dc010]=this['getRevisionsIterator'](_0x1f3b65,{'direction':'earlier'});return _0x2dc010;}['getLaterVisibleRevision'](_0x7d291){const [,_0x2d9773]=this['getRevisionsIterator'](_0x7d291,{'direction':'later'});return _0x2d9773;}['getRevisionsInDiff'](_0x1fc9a6){const _0x5f12cf=[];for(const _0x3872a2 of this['getRevisionsIterator'](_0x1fc9a6['newRevisionId']))if(_0x5f12cf['push'](_0x3872a2),_0x3872a2['id']===_0x1fc9a6['oldRevisionId'])break;return _0x5f12cf;}*['getRevisionsIterator'](_0x4971f3,{direction:_0x4f199b='earlier',filter:_0x4cfe92=()=>!0x0}={}){const _0xe9f1='earlier'===_0x4f199b?0x1:-0x1;let _0x4004f9=this['_revisions']['get'](_0x4971f3),_0x5d1ed2=this['getIndex'](_0x4004f9);for(yield _0x4004f9;_0x4004f9;){if(_0x5d1ed2+=_0xe9f1,_0x4004f9=this['getRevision'](_0x5d1ed2),!_0x4004f9)return;_0x4cfe92(_0x4004f9)&&(yield _0x4004f9);}}}class $ extends _0x1364e3{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x16a926,'c'],[_0x3528c4,'a'],[_0xffac54,'e'],[_0x26afd9,'r'],[_0x2d7c1c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x16a926],['a',_0x3528c4],['e',_0xffac54],['r',_0x26afd9],['u',_0x2d7c1c]]);async['loadRevisionData'](_0x74114c,_0x4e36b0){if(_0x74114c['diffData']||!_0x4e36b0)return;const _0x103741=this['editor']['config']['get']('collaboration.channelId'),_0x352dfb=await _0x4e36b0['getRevision']({'channelId':_0x103741,'revisionId':_0x74114c['id']});_0x74114c['diffData']=_0x352dfb['diffData'];}['getRevisionDocumentData'](_0x551247){const _0x4c944b={};for(const _0x5c2cf9 in _0x551247['diffData']){if(_0x551247['diffData'][_0x5c2cf9]['attachChange']&&!_0x551247['diffData'][_0x5c2cf9]['attachChange']['isAttached'])continue;const _0x519e07=this['_removeRevisionMarkers'](JSON['parse'](_0x551247['diffData'][_0x5c2cf9]['insertions'])),_0x488b8d=this['editor']['editing']['view']['document'],_0x458ab7=new _0x4f4d4d(_0x488b8d,_0x519e07['map'](_0x3fc688=>this['_getViewFromDiffObj'](_0x3fc688,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4c944b[_0x5c2cf9]=this['editor']['data']['processor']['toData'](_0x458ab7),this['editor']['data']['processor']['useFillerType']('default');}return _0x4c944b;}['getRevisionRootsAttributes'](_0x2144f2){const _0x2b9c4f={};for(const _0x224d08 in _0x2144f2['diffData'])_0x2144f2['diffData'][_0x224d08]['attachChange']&&!_0x2144f2['diffData'][_0x224d08]['attachChange']['isAttached']||(_0x2b9c4f[_0x224d08]=_0x2144f2['diffData'][_0x224d08]['attributesAfter']||{});return _0x2b9c4f;}['_getTypeCharForViewElement'](_0x7b5495){return this['_viewClassToTypeChar']['get'](_0x7b5495['constructor']);}['_getViewFromDiffObj'](_0x5c337c,_0x25233a){const _0x75c5a0=this['editor']['editing']['view']['document'];if('string'==typeof _0x5c337c)return new _0x2f86d9(_0x75c5a0,_0x5c337c);{let _0x13d39f,_0x32cc87;_0x32cc87='u'==_0x5c337c['type']||'r'==_0x5c337c['type']?[]:_0x5c337c['children']['map'](_0x22527e=>this['_getViewFromDiffObj'](_0x22527e,_0x25233a));const _0x4c8af0=this['_typeCharToViewClass']['get'](_0x5c337c['type'])||_0x3705f0,_0x1594d7=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x13d39f=new _0x4c8af0(_0x75c5a0,_0x5c337c['name'],_0x5c337c['attributes'],_0x32cc87),'u'==_0x5c337c['type']&&_0x5c337c['children'][0x0]){const _0x433ef9=_0x5c337c['children'][0x0];if(_0x13d39f['render']=function(_0x5cc291){const _0x122a20=_0x5cc291['createElement']('div');return _0x122a20['innerHTML']=_0x433ef9,_0x122a20['childNodes'][0x0];},_0x25233a){const _0x2a66fb=new _0x4f4d4d(_0x75c5a0);_0x2a66fb['_appendChild'](_0x13d39f);const _0x4886ef=Array['from'](_0x1594d7['viewChildrenToDom'](_0x2a66fb,{'bind':!0x1})),_0x2bafd6=_0x1594d7['domDocument']['createElement']('div');_0x2bafd6['append'](..._0x4886ef),_0x13d39f=Array['from'](_0x1594d7['domChildrenToView'](_0x2bafd6))[0x0];}}else{if('r'==_0x5c337c['type']&&_0x5c337c['children'][0x0]){const _0xb2bc66=_0x5c337c['children'][0x0];if(_0x13d39f['render']=function(_0x23e34c){_0x23e34c['innerHTML']=_0xb2bc66;},_0x25233a){const _0x3fb2c2=new _0x4f4d4d(_0x75c5a0);_0x3fb2c2['_appendChild'](_0x13d39f);const _0x20fe3c=Array['from'](_0x1594d7['viewChildrenToDom'](_0x3fb2c2,{'bind':!0x1})),_0xec626c=_0x1594d7['domDocument']['createElement']('div');_0xec626c['append'](..._0x20fe3c);const _0x4a626d=Array['from'](_0x1594d7['domChildrenToView'](_0xec626c));_0x4a626d['length']>0x1?_0x13d39f['_appendChild'](_0x4a626d):_0x13d39f=_0x4a626d[0x0];}}}if(_0x5c337c['customProperties']){for(const [_0x2db820,_0x524e92]of _0x5c337c['customProperties'])_0x13d39f['_setCustomProperty'](_0x2db820,_0x524e92);}const _0x492acf=void 0x0===_0x5c337c['fillerOffset']?null:_0x5c337c['fillerOffset'];return null!==_0x492acf&&(_0x13d39f['getFillerOffset']=()=>_0x492acf),_0x13d39f;}}['_makeModelFromViewString'](_0x14312c){const _0x5ecaf8=JSON['parse'](_0x14312c),_0x23cf81=this['editor']['editing']['view']['document'],_0xccbb1a=new _0x4f4d4d(_0x23cf81,_0x5ecaf8['map'](_0x400b81=>this['_getViewFromDiffObj'](_0x400b81,!0x0)));return this['editor']['data']['toModel'](_0xccbb1a);}['_removeRevisionMarkers'](_0x254a91){return(_0x254a91=_0x254a91['filter'](_0x36c5fd=>!_0x36c5fd['name']||'revision-start'!==_0x36c5fd['name']&&'revision-end'!==_0x36c5fd['name']))['forEach'](_0x200460=>{'string'!=typeof _0x200460&&(_0x200460['children']=this['_removeRevisionMarkers'](_0x200460['children']),_0x200460['attributes']=_0x200460['attributes']['filter'](_0x24ce11=>!_0x24ce11[0x0]['startsWith']('data-revision-')));}),_0x254a91;}}function m(_0x48ed8f,_0x56315e,_0x7ae511){const t=_0x48ed8f['t'];switch(_0x56315e){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'},_0x7ae511);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x7ae511);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 h extends _0x1364e3{['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[_0x5c9017,S,$,_0x3a37f6];}constructor(_0x411a16){super(_0x411a16),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x485fe0=_0x2dfa83();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x485fe0},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 _0x341771=this['repository']['getRevision'](0x0),_0x45e7cc=_0x341771&&null===_0x341771['creator']?_0x341771:null;if(this['_continueCurrentRevision']=!!_0x45e7cc&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4dddf6=this['_source']['getCurrentRevisionId'](),_0x3720f7=this['repository']['getRevision'](_0x4dddf6);if(_0x3720f7)this['_startingVersion']=_0x3720f7['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x442e01=this['_source']['history']['_operations']['find'](_0x376bb4=>!_0x376bb4['_isInit']),_0x352897=_0x442e01?_0x442e01['baseVersion']:this['_source']['history']['version'];_0x341771?(_0x341771['toVersion']<_0x352897&&_0x341771['_update']({'toVersion':_0x352897}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x45e7cc['id'],this['_startingVersion']=_0x45e7cc['fromVersion']):(this['_startingVersion']=_0x341771['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x352897,this['_continueCurrentRevision']=!0x1);}}else _0x45e7cc&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x45e7cc['toVersion'],this['editor']['model']['document']['history']['version']),_0x45e7cc['fromVersion']===_0x45e7cc['toVersion']?(0x0!==_0x45e7cc['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x45e7cc['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x45e7cc['id'],this['_startingVersion']=_0x45e7cc['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',_0xfa722d=>!_0xfa722d),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x22609f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x50e29b;for(const _0x185939 in _0x22609f){const _0x15ce55=_0x185939,_0x3a7b93=_0x22609f[_0x15ce55];if('revisionHistoryLicenseKeyValid'==_0x3a7b93||'revisionHistoryLicenseKeyInvalid'==_0x3a7b93||'revisionHistoryLicenseKeyExpired'==_0x3a7b93||'revisionHistoryLicenseKeyDomainLimit'==_0x3a7b93||'revisionHistoryLicenseKeyNotAllowed'==_0x3a7b93||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3a7b93||'revisionHistoryLicenseKeyTrialLimit'==_0x3a7b93||'revisionHistoryLicenseKeyUsageLimit'==_0x3a7b93){delete _0x22609f[_0x15ce55],_0x50e29b=_0x3a7b93,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x50e29b&&_0x22609f['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x50e29b&&_0x22609f['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x50e29b&&_0x22609f['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x50e29b&&_0x22609f['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x50e29b&&_0x22609f['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x50e29b&&_0x22609f['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x50e29b&&_0x22609f['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0xcc4229=this['repository']['getRevision'](0x0),_0xddadfb=await this['getRevisionDocumentData'](_0xcc4229),_0x420f60=await this['getRevisionRootsAttributes'](_0xcc4229);this['_replaceEditorDataWithRevisionData'](_0xddadfb,_0x420f60);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x5cbee7){this['_source']=_0x5cbee7;}async['update'](){const _0x40bd31=await this['_source']['getLatestVersion']();if(_0x40bd31>this['currentRevision']['toVersion']){await this['_loadState']();const _0x39a948=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x40bd31});_0x39a948['authors']=_0x39a948['authorsIds']['map'](_0x3deee7=>this['editor']['plugins']['get']('Users')['getUser'](_0x3deee7)),this['currentRevision']['_update'](_0x39a948);}}async['saveRevision'](_0x2eabe3={},_0x46fced=null){const _0xc78431=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x46fced>this['currentRevision']['toVersion']&&(_0x46fced=null),null===_0x46fced&&(_0x46fced=await this['_source']['getLatestVersion']());const _0x4dbf4c=this['_getFromVersion'](_0x46fced),_0x597215=this['buildRevisionData']({'from':_0x4dbf4c,'to':_0x46fced});if(this['currentRevision']['toVersion']<_0x46fced){const _0x2adc99=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x46fced,'to':_0x46fced});_0x2adc99['authors']=[],_0x2adc99['authorsIds']=[],_0x2adc99['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2adc99,!0x0),delete _0x2adc99['authors'],_0xc78431['push'](_0x2adc99);}_0x2eabe3['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x2eabe3['name']=_0x2eabe3['name']||null,_0x2eabe3['id']=_0x2eabe3['id']||_0x2dfa83(),_0x2eabe3={..._0x2eabe3,..._0x597215};const _0x2bda59=this['addRevisionData'](_0x2eabe3);_0xc78431['push'](_0x2eabe3);const _0x2737c9=this['repository']['getIndex'](_0x2bda59);if(0x0!==_0x2737c9){const _0x407793=this['repository']['getRevision'](_0x2737c9-0x1);if(_0x407793['fromVersion']!==_0x46fced){const _0x46b856=this['_revisionDataBuilder']['getData'](_0x46fced,_0x407793['toVersion']),_0x438ae4={'id':_0x407793['id'],'diffData':_0x46b856['diffData'],'authorsIds':_0x46b856['authorsIds'],'authors':_0x46b856['authorsIds']['map'](_0x15f6b6=>this['editor']['plugins']['get']('Users')['getUser'](_0x15f6b6)),'fromVersion':_0x46fced};_0x407793===this['currentRevision']&&(_0x438ae4['createdAt']=new Date(_0x2eabe3['createdAt']['getTime']()+0xa)),_0x407793['_update'](_0x438ae4,!0x0),delete _0x438ae4['authors'],_0xc78431['push'](_0x438ae4);}}if(this['adapter']){for(const _0xaa8265 of _0xc78431)this['_bufferUpdate'](_0xaa8265['id'],_0xaa8265,!0x0);this['sendBufferedUpdates']();}return _0x2bda59;}['addRevisionData'](_0x5986ca){const _0x291cd5=this['repository']['createRevision'](_0x5986ca);return this['adapter']&&_0x291cd5['on']('_update',(_0x21eceb,_0x41dfd5,_0x5e1c3b)=>{_0x5e1c3b||(this['_bufferUpdate'](_0x41dfd5['id'],_0x41dfd5,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x291cd5,this['_findInsertionIndex'](_0x291cd5)),_0x291cd5;}async['getRevisionDocumentData'](_0x3d9829){return await this['_utils']['loadRevisionData'](_0x3d9829,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3d9829);}async['getRevisionRootsAttributes'](_0x512da2){return await this['_utils']['loadRevisionData'](_0x512da2,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x512da2);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xefc4c8=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3823e7=0x0;_0x3823e7<_0xefc4c8['length'];_0x3823e7++){const _0x2043df=_0xefc4c8[_0x3823e7];let _0x131e5b=!0x1;for(const _0x3e511a of Object['keys'](_0x2043df))void 0x0===_0x2043df[_0x3e511a]?delete _0x2043df[_0x3e511a]:'id'!==_0x3e511a&&(_0x131e5b=!0x0);_0x131e5b||(_0xefc4c8[_0x3823e7]=null);}if(_0xefc4c8=_0xefc4c8['filter'](_0x63c105=>null!==_0x63c105),!_0xefc4c8['length'])return;for(let _0x59b3d8=0x0;_0x59b3d8<_0xefc4c8['length'];_0x59b3d8++){const _0x40219c=_0xefc4c8[_0x59b3d8];void 0x0!==_0x40219c['fromVersion']&&void 0x0===_0x40219c['toVersion']&&(_0x40219c['toVersion']=this['repository']['getRevision'](_0x40219c['id'])['toVersion']),void 0x0!==_0x40219c['toVersion']&&void 0x0===_0x40219c['fromVersion']&&(_0x40219c['fromVersion']=this['repository']['getRevision'](_0x40219c['id'])['fromVersion']);}const _0x530039=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xefc4c8,_0x530039)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1c106c=>{if(_0x1c106c){for(const _0x593b96 of _0x1c106c)this['setRevisionData']({'id':_0x593b96['id'],'createdAt':_0x593b96['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0xdcfeb=null,from:_0x7d992f=null,to:_0x2d9434=null}){_0x7d992f=null!==_0x7d992f?_0x7d992f:_0xdcfeb['fromVersion'],_0x2d9434=null!==_0x2d9434?_0x2d9434:_0xdcfeb['toVersion'];const _0x573284=this['_revisionDataBuilder']['getData'](_0x7d992f,_0x2d9434),_0x46ce87={'diffData':_0x573284['diffData'],'authorsIds':_0x573284['authorsIds'],'fromVersion':_0x7d992f,'toVersion':_0x2d9434};if(!_0xdcfeb||_0x2d9434!==_0xdcfeb['toVersion']){const _0x3f71a0=_0x2d9434-0x1,_0x2ea01d=this['_source']['history']['getOperation'](_0x3f71a0);_0x46ce87['createdAt']=_0x2ea01d&&_0x2ea01d['createdAt']||new Date();}if(this['_loadedStateData']&&_0x7d992f===this['_loadedStateData']['fromVersion']){for(const _0x5a8ea6 of this['_loadedStateData']['authors'])_0x46ce87['authorsIds']['includes'](_0x5a8ea6['id'])||_0x46ce87['authorsIds']['push'](_0x5a8ea6['id']);}return _0x46ce87;}['_bufferUpdate'](_0x24149b,_0x3219ea,_0x2a2892){if(this['_bufferedUpdates']['has'](_0x24149b)){const _0x5b622b=this['_bufferedUpdates']['get'](_0x24149b);_0x3219ea=_0x2a2892?{..._0x5b622b,..._0x3219ea}:{..._0x3219ea,..._0x5b622b};}this['_bufferedUpdates']['set'](_0x24149b,_0x3219ea);}['setRevisionData'](_0x923386){const _0x23dfb1=this['repository']['getRevision'](_0x923386['id']);if(_0x923386['createdAt']&&(_0x923386['createdAt']=new Date(_0x923386['createdAt'])),_0x923386['authorsIds']){const _0xa57a7b=this['editor']['plugins']['get']('Users');_0x923386['authors']=_0x923386['authorsIds']['map'](_0x2e406d=>_0xa57a7b['getUser'](_0x2e406d));}_0x23dfb1['_update'](_0x923386,!0x0);}['_createInitialRevision'](_0x594536){const _0x211b24=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x211b24)this['_initialRevisionId']=_0x211b24['id'];else{const _0x474eb3=!this['editor']['model']['document']['roots']['find'](_0x265e53=>this['editor']['model']['hasContent'](_0x265e53)),_0x368251=this['editor']['plugins']['get']('Users')['me']['id'],_0x44cdf7=m(this['editor']['locale'],_0x474eb3?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x594536,'to':_0x594536,'id':this['_initialRevisionId'],'name':_0x44cdf7,'creatorId':_0x368251});}}['_createCurrentRevision'](_0x4808f0){const _0x518aea=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x518aea),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4808f0,'to':_0x4808f0,'id':_0x518aea,'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'](_0x55608a,_0x3ec8a4){let _0x52e60e=this['editor']['config']['get']('initialData'),_0x49c9b7=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x52e60e){_0x52e60e={};for(const _0x37693c of this['editor']['model']['document']['getRootNames']())_0x52e60e[_0x37693c]='';}if('string'==typeof _0x52e60e&&(_0x52e60e={'main':_0x52e60e}),void 0x0===_0x49c9b7){_0x49c9b7={};for(const _0x17cfe of this['editor']['model']['document']['getRootNames']())_0x49c9b7[_0x17cfe]={};}let _0x37acd4=!0x1;const _0x55a3ed=Object['keys'](_0x52e60e),_0x3a05ec=Object['keys'](_0x55608a);for(const _0xe7e960 of _0x55a3ed){if(_0x52e60e[_0xe7e960]!==_0x55608a[_0xe7e960]&&''!==_0x52e60e[_0xe7e960]['trim']()){_0x37acd4=!0x0;break;}if(!_0x39d83a(_0x49c9b7[_0xe7e960],_0x3ec8a4[_0xe7e960])&&Object['keys'](_0x49c9b7[_0xe7e960])['length']>0x0){_0x37acd4=!0x0;break;}}_0x37acd4||(_0x37acd4=_0x3a05ec['some'](_0xc0feed=>!this['editor']['model']['document']['getRoot'](_0xc0feed))),_0x37acd4&&_0x54b865('editor-initial-data-replaced-with-revision-data',{'editorData':_0x52e60e,'editorRootsAttributes':_0x49c9b7,'revisionData':_0x55608a,'revisionRootsAttributes':_0x3ec8a4}),this['editor']['config']['set']('initialData',_0x55608a),this['editor']['config']['set']('rootsAttributes',_0x3ec8a4);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x49393f=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x49393f['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x5eacb8){const _0x2364de=this['repository']['getRevisions']();_0x2364de['reverse']();let _0xa35501=0x0;for(;_0xa35501<_0x2364de['length'];){const _0x2bf7a8=_0x2364de[_0xa35501];if(_0x2bf7a8===this['currentRevision']){_0xa35501++;continue;}if(_0x2bf7a8['id']===this['_initialRevisionId'])break;const _0x1841ce=_0x5eacb8['toVersion']-_0x2bf7a8['toVersion']||_0x5eacb8['fromVersion']-_0x2bf7a8['fromVersion'];if(_0x1841ce>0x0)break;if(_0x1841ce<0x0)_0xa35501++;else{if(!_0x5eacb8['creator']&&_0x2bf7a8['creator'])break;if(_0x2bf7a8['creator']||!_0x5eacb8['creator']){if(_0x5eacb8['createdAt']>_0x2bf7a8['createdAt'])break;_0xa35501++;}else _0xa35501++;}}return _0xa35501;}['_getFromVersion'](_0x483665){const _0x32878a=this['repository']['getRevisions']();_0x32878a['reverse'](),_0x32878a['shift']();const _0x5b7546=_0x32878a['find'](_0x6d066a=>_0x6d066a['toVersion']<=_0x483665)['toVersion'];return _0x5b7546<this['_startingVersion']?this['_startingVersion']:_0x5b7546;}['_makeRevision']({name:_0x4baf55,from:_0x3a656b,to:_0xef41a7,creatorId:_0x2fa16e,id:_0x476d9f}){const _0x3fafa3=this['buildRevisionData']({'from':_0x3a656b,'to':_0xef41a7});_0x3fafa3['name']=_0x4baf55,_0x3fafa3['creatorId']=_0x2fa16e,_0x3fafa3['id']=_0x476d9f;const _0x579826=this['addRevisionData'](_0x3fafa3);return this['adapter']&&this['_bufferUpdate'](_0x3fafa3['id'],_0x3fafa3,!0x0),_0x579826;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x480c58){this['editor']=_0x480c58,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'](_0x1f03b1){this['source']=_0x1f03b1;const _0x326fd2=new Map(),_0x11415c=new Map(),_0x2c0605=this['editor']['model']['document']['roots']['map'](_0x478050=>_0x478050['rootName']);for(const _0xbc90ad of _0x2c0605){const _0x418766=this['editor']['model']['document']['getRoot'](_0xbc90ad),_0x1f7c8b=x(_0x418766);_0x326fd2['set'](_0xbc90ad,_0x1f7c8b),_0x11415c['set'](_0xbc90ad,Object['fromEntries'](_0x418766['getAttributes']()));}const _0x210cea=Array['from'](this['editor']['model']['markers'])['map'](_0x195a9a=>[_0x195a9a['name'],_0x195a9a['getRange']()]),_0x69f47e=this['source']['version'];this['_saveMetaData'](_0x69f47e,_0x326fd2,_0x210cea,_0x11415c),this['_startingRevisionId']=this['_revisionId'];const _0x375f0d=new Map(),_0x57897c=new Map();for(const _0x5d3c47 of _0x2c0605){const _0x20ea93=N(_0x5d3c47);_0x375f0d['set'](_0x5d3c47,_0x20ea93),_0x57897c['set'](_0x5d3c47,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x375f0d,[],_0x57897c);}['getData'](_0x35fdc5,_0x153929){if(this['_lastFrom']===_0x35fdc5&&this['_lastTo']<=_0x153929)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x153929,!0x0);else{if(!this['_savedMetaData']['has'](_0x35fdc5)){const _0x318082=this['_getPreviousFrom'](_0x35fdc5);this['_calculateMetaData'](_0x318082,_0x35fdc5,!0x1);}this['_calculateMetaData'](_0x35fdc5,_0x153929,!0x0);}return this['_lastFrom']=_0x35fdc5,this['_lastTo']=_0x153929,this['_getState']();}['loadState'](_0x91da0a){if(!this['_savedMetaData']['has'](_0x91da0a['fromVersion'])){const _0x59ec8a=this['_getPreviousFrom'](_0x91da0a['fromVersion']);this['_calculateMetaData'](_0x59ec8a,_0x91da0a['fromVersion'],!0x1);}this['_calculateMetaData'](_0x91da0a['fromVersion'],_0x91da0a['toVersion'],!0x1);const _0x113fec=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x91da0a['fromVersion'],this['_lastTo']=_0x91da0a['toVersion'];for(const _0x574e14 in _0x91da0a['diffData']){const _0x538150=_0x91da0a['diffData'][_0x574e14]['attachChange'],_0x3022de=_0x527c0e(_0x91da0a['diffData'][_0x574e14]['attributesBefore'])||{},_0x885d6f=_0x113fec['_makeModelFromViewString'](_0x91da0a['diffData'][_0x574e14]['deletions']);_0x885d6f['rootName']=_0x574e14,_0x885d6f['_isAttached']=!_0x538150||!_0x538150['isAttached'],_0x885d6f['isAttached']=()=>_0x885d6f['_isAttached'],this['_baseRoots']['set'](_0x574e14,_0x885d6f),this['_baseRootsAttributes']['set'](_0x574e14,_0x3022de),_0x538150&&this['_touchedRoots']['set'](_0x574e14,_0x538150);const _0x4d7293=this['_makeIdsRoot'](_0x885d6f);this['_baseIdsRoots']['set'](_0x574e14,_0x4d7293);for(const [_0x17f564,_0x5b8989]of _0x885d6f['markers']){if(!_0x17f564['startsWith']('revision:'))continue;const _0x206484=_0x17f564['split'](':')[0x2];for(const _0x757d13 of _0x5b8989['getWalker']({'singleCharacters':!0x0})){const _0x1697ea=this['_getVidAttributeName'](_0x757d13),_0xd8fa63='elementEnd'==_0x757d13['type']?_0x757d13['previousPosition']['path']['slice'](0x0,-0x1):_0x757d13['previousPosition']['path'],_0x4bc4b4=_0x4d7293['getNodeByPath'](_0xd8fa63)['getAttribute'](_0x1697ea);this['_touched']['set'](_0x4bc4b4,{'userId':_0x206484});}_0x885d6f['markers']['delete'](_0x17f564);}}this['_startingRevisionId']=this['_revisionId'];const _0x21036e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2f6dc1=>!this['_touched']['has'](_0x2f6dc1));let _0x1a2187=0x0;const _0x1c1783=new Map();for(const _0x20af9d in _0x91da0a['diffData']){const _0x3e03f8=_0x91da0a['diffData'][_0x20af9d]['attachChange'],_0x25d838=_0x527c0e(_0x91da0a['diffData'][_0x20af9d]['attributesAfter'])||{},_0x15f868=_0x113fec['_makeModelFromViewString'](_0x91da0a['diffData'][_0x20af9d]['insertions']);_0x15f868['rootName']=_0x20af9d,_0x15f868['_isAttached']=!_0x3e03f8||_0x3e03f8['isAttached'],_0x15f868['isAttached']=()=>_0x15f868['_isAttached'],this['_diffRoots']['set'](_0x20af9d,_0x15f868),this['_diffRootsAttributes']['set'](_0x20af9d,_0x25d838);const _0xe02be5=this['_makeIdsRoot'](_0x15f868,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x20af9d,_0xe02be5),_0x1c1783['set'](_0x20af9d,_0x15f868['isAttached']()?_0x25d838:{});for(const [_0x20e3d5,_0x42afd9]of _0x15f868['markers']){if(!_0x20e3d5['startsWith']('revision:'))continue;const _0x82d53b=_0x20e3d5['split'](':')[0x2];for(const _0x45b91f of _0x42afd9['getWalker']({'singleCharacters':!0x0})){const _0x4215f4=this['_getVidAttributeName'](_0x45b91f),_0x49b4df=this['_revisionId']++,_0x59eda4='elementEnd'==_0x45b91f['type']?_0x45b91f['previousPosition']['path']['slice'](0x0,-0x1):_0x45b91f['previousPosition']['path'];_0xe02be5['getNodeByPath'](_0x59eda4)['_setAttribute'](_0x4215f4,_0x49b4df),this['_touched']['set'](_0x49b4df,{'userId':_0x82d53b});}_0x15f868['markers']['delete'](_0x20e3d5);}for(const _0x20d2c2 of this['editor']['model']['createRangeIn'](_0x15f868)['getWalker']({'singleCharacters':!0x0})){const _0x498e0d=this['_getVidAttributeName'](_0x20d2c2),_0x5ce6b6='elementEnd'==_0x20d2c2['type']?_0x20d2c2['previousPosition']['path']['slice'](0x0,-0x1):_0x20d2c2['previousPosition']['path'],_0x3e37fe=_0xe02be5['getNodeByPath'](_0x5ce6b6);_0x3e37fe['getAttribute'](_0x498e0d)>0x0||_0x3e37fe['_setAttribute'](_0x498e0d,_0x21036e[_0x1a2187++]);}for(const [_0x3ca34d,_0x479980]of _0x15f868['markers'])_0x3ca34d['startsWith']('revision:')||this['_markers']['set'](_0x3ca34d,_0x479980);}const {roots:_0x194b39}=this['_savedMetaData']['get'](_0x91da0a['fromVersion']),{roots:_0x2f30a8}=this['_savedMetaData']['get'](_0x91da0a['toVersion']),_0x505a70=x(_0x194b39['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x505a70),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x505a70,Number['NEGATIVE_INFINITY']));const _0x4813d4=x(_0x2f30a8['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4813d4),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4813d4));const _0x8ae4c5=Array['from'](this['_diffRoots'])['map'](([_0x3a7472,_0x18ec86])=>[_0x3a7472,x(_0x18ec86)]);this['_saveMetaData'](this['_lastTo'],_0x8ae4c5,this['_markers'],_0x1c1783);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x320783,_0x262893,_0x2cb03c,_0x14b67a){const _0x970e34=new Map(_0x262893),_0x226558=new Map(_0x527c0e(_0x14b67a)),_0x473cb4=new Map();for(const [_0x3a9a97,_0x27f729]of _0x2cb03c)_0x473cb4['set'](_0x3a9a97,{'start':_0x27f729['start']['clone'](),'end':_0x27f729['end']['clone'](),'rootName':_0x27f729['root']['rootName']});this['_savedMetaData']['set'](_0x320783,{'roots':_0x970e34,'markers':_0x473cb4,'rootsAttributes':_0x226558});}['_removeMetaData'](_0x2c7fab){this['_savedMetaData']['delete'](_0x2c7fab);}['_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'](_0x1f9cd8,_0x56e75a=null){let _0x50f45e=null;_0x1f9cd8['is']('documentFragment')||(_0x50f45e=new _0x16f0c7(_0x1f9cd8['name'],{'vid_start':null===_0x56e75a?this['_revisionId']++:_0x56e75a++}));const _0x3d3dca=[];for(const _0x2d5e30 of _0x1f9cd8['getChildren']())if(_0x2d5e30['is']('element')){_0x3d3dca['push'](this['_makeIdsRoot'](_0x2d5e30,_0x56e75a));const _0x1f0663=_0x3d3dca[_0x3d3dca['length']-0x1];null!==_0x56e75a&&(_0x56e75a=_0x1f0663['is']('element','$text')?_0x1f0663['getAttribute']('vid')+0x1:_0x1f0663['getAttribute']('vid_end')+0x1);}else{for(let _0x27d729=0x0;_0x27d729<_0x2d5e30['offsetSize'];_0x27d729++)_0x3d3dca['push'](new _0x16f0c7('$text',{'vid':null===_0x56e75a?this['_revisionId']++:_0x56e75a++}));}if(_0x1f9cd8['is']('documentFragment')){const _0x38c657=N(_0x1f9cd8['rootName']);return _0x38c657['_insertChild'](0x0,_0x3d3dca),_0x38c657;}return _0x50f45e['_setAttribute']('vid_end',null===_0x56e75a?this['_revisionId']++:_0x56e75a++),_0x50f45e['_insertChild'](0x0,_0x3d3dca),_0x50f45e;}['_calculateMetaData'](_0x1bbe4b,_0x1bbc30,_0x3730da){this['_reset']();const {roots:_0x535702,markers:_0x1b8b71,rootsAttributes:_0xf3ae56}=this['_savedMetaData']['get'](_0x1bbe4b);this['_baseRoots']=new Map(_0x535702),this['_baseRootsAttributes']=new Map(_0x527c0e(_0xf3ae56));for(const [_0x2db7a6,_0x519ede]of this['_baseRoots'])if('$graveyard'!==_0x2db7a6&&(this['_diffRoots']['set'](_0x2db7a6,x(_0x519ede)),this['_diffRootsAttributes']=new Map(_0x527c0e(_0xf3ae56)),_0x3730da)){const _0x2c9fde=this['_revisionId'];this['_idsRoots']['set'](_0x2db7a6,this['_makeIdsRoot'](_0x519ede)),this['_baseIdsRoots']['set'](_0x2db7a6,this['_makeIdsRoot'](_0x519ede,_0x2c9fde));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x3730da&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x15fa34,_0x343283]of _0x1b8b71){const _0x472231=this['_baseRoots']['get'](_0x343283['rootName']),_0x5ead2e=this['_diffRoots']['get'](_0x343283['rootName']),_0x36e344=new _0xcb6e88(this['_fixPosition'](_0x343283['start'],_0x472231),this['_fixPosition'](_0x343283['end'],_0x472231)),_0x570d66=this['_fixRange'](_0x36e344,_0x5ead2e);_0x472231['markers']['set'](_0x15fa34,_0x36e344),this['_markers']['set'](_0x15fa34,_0x570d66);}this['_applyOperations'](_0x1bbe4b,_0x1bbc30,_0x3730da);}['_applyOperations'](_0x508231,_0x524c37,_0x5ae23b){for(const _0x1d4fce of this['source']['getOperations'](_0x508231,_0x524c37))this['_handleOperation'](_0x1d4fce,_0x5ae23b);for(const _0x5bbe18 of this['_diffRoots']['values']())_0x5bbe18['markers']['clear']();for(const [_0x1c09ff,_0x449905]of this['_markers']){this['_diffRoots']['get'](_0x449905['root']['rootName'])['markers']['set'](_0x1c09ff,_0x449905['clone']());}const _0x241072=new Map(),_0x44a002=new Map();for(const [_0xafd0af,_0x1bbc11]of this['_diffRoots'])_0x241072['set'](_0xafd0af,x(_0x1bbc11)),_0x44a002['set'](_0xafd0af,this['_diffRootsAttributes']['get'](_0xafd0af));this['_saveMetaData'](_0x524c37,_0x241072,this['_markers'],_0x44a002);}['_getPreviousFrom'](_0x4d77a2){const _0x510933=Array['from'](this['_savedMetaData']['keys']());_0x510933['sort']((_0x83e3cb,_0x54bf25)=>_0x83e3cb-_0x54bf25),_0x510933['reverse']();for(const _0x3cabbe of _0x510933)if(_0x3cabbe<_0x4d77a2)return _0x3cabbe;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x40b4c8,_0x2780a0){const _0x10bf74=Array['from'](_0x2780a0['markers'])['map'](([_0x2f0af5,_0x3c191f])=>[_0x2f0af5,this['_fixRange'](_0x3c191f,_0x40b4c8)]);_0x40b4c8['markers']=new Map(_0x10bf74);}['_transformMarkers'](_0x4eb7b7){for(const _0x41cb8c of this['_markers']['values']()){const _0x5a9d5b=_0x41cb8c['getTransformedByOperation'](_0x4eb7b7),_0x3e5138=_0xcb6e88['_createFromRanges'](_0x5a9d5b);_0x41cb8c['start']=_0x3e5138['start'],_0x41cb8c['end']=_0x3e5138['end'];}}['_handleOperation'](_0x5463d9,_0x587586){if('addRoot'!=_0x5463d9['type']&&'detachRoot'!=_0x5463d9['type']){if('insert'==_0x5463d9['type']){const _0x2aefd7=_0x5463d9['position']['root']['rootName'];this['_diffRoots']['has'](_0x2aefd7)||(this['_diffRoots']['set'](_0x2aefd7,N(_0x2aefd7,!0x0)),this['_diffRootsAttributes']['set'](_0x2aefd7,{}),_0x587586&&this['_idsRoots']['set'](_0x2aefd7,N(_0x2aefd7,!0x0)));}else{if('addRootAttribute'==_0x5463d9['type']||'removeRootAttribute'==_0x5463d9['type']||'changeRootAttribute'==_0x5463d9['type'])return void this['_handleRootAttributeOperation'](_0x5463d9);'marker'==_0x5463d9['type']&&this['_handleMarkerOperation'](_0x5463d9);}if('marker'!==_0x5463d9['type']){const _0x5ccdc7=this['_cloneOperation'](_0x5463d9,this['_diffRoots']);_0x5ccdc7['_execute'](),this['_transformMarkers'](_0x5ccdc7);}if(_0x587586)switch(_0x5463d9['type']){case'insert':this['_handleInsertOperation'](_0x5463d9);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5463d9);break;case'merge':this['_handleMergeOperation'](_0x5463d9);break;case'split':this['_handleSplitOperation'](_0x5463d9);}}else this['_handleRootOperation'](_0x5463d9,_0x587586);}['_cloneOperation'](_0x24ad48,_0x3e7790){const _0x3334b9=_0x24ad48['clone']();return _0x3334b9['_authorId']=_0x24ad48['_authorId'],this['_fixOperation'](_0x3334b9,_0x3e7790),_0x3334b9;}['_getBaseVids'](_0x3d8641){return _0x3d8641['map'](_0x4b6eb7=>{const _0x4bb7f3=this['_getVidAttributeName'](_0x4b6eb7);return Number(_0x4b6eb7['item']['getAttribute'](_0x4bb7f3));});}['_generateTape'](_0x592f0b,_0x9b0db2){if(_0x592f0b['is']('element','$text'))_0x9b0db2['push']({'item':_0x592f0b,'type':'text'});else{_0x592f0b['is']('element')&&_0x9b0db2['push']({'item':_0x592f0b,'type':'elementStart'});for(const _0x554f8a of _0x592f0b['getChildren']())this['_generateTape'](_0x554f8a,_0x9b0db2);_0x592f0b['is']('element')&&_0x9b0db2['push']({'item':_0x592f0b,'type':'elementEnd'});}return _0x9b0db2;}['_getState'](){const _0x87cca7=new Map(this['_touched']),_0x14bb33=new Map(_0x87cca7),_0x2994a4=new Map(),_0x78fe14={'insertions':{},'deletions':{}},_0x5e28d5={'insertions':{},'deletions':{}},_0x194f19=new Map(),_0x186358=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x186358['delete']('$graveyard');for(const _0x525dd8 of _0x186358){const _0x34f618=this['_diffRoots']['get'](_0x525dd8)||N(_0x525dd8,!0x1),_0x11ed95=this['_baseRoots']['get'](_0x525dd8)||N(_0x525dd8,!0x1);_0x34f618['isAttached']()||_0x11ed95['isAttached']()?(_0x78fe14['insertions'][_0x525dd8]=x(_0x34f618),_0x78fe14['deletions'][_0x525dd8]=x(_0x11ed95),this['_copyMarkers'](_0x78fe14['deletions'][_0x525dd8],_0x11ed95),this['_copyMarkers'](_0x78fe14['insertions'][_0x525dd8],_0x34f618),_0x5e28d5['insertions'][_0x525dd8]=this['_generateTape'](this['_idsRoots']['get'](_0x525dd8),[]),_0x5e28d5['deletions'][_0x525dd8]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x525dd8)||N(_0x525dd8,!0x1),[])):_0x186358['delete'](_0x525dd8);}for(const _0x185c89 of _0x186358){const _0x17e1f0=_0x5e28d5['insertions'][_0x185c89];for(const _0x3de314 of _0x17e1f0){const _0x4df8e7=this['_getVidAttributeName'](_0x3de314),_0x619fbe=_0x3de314['item']['getAttribute'](_0x4df8e7);_0x14bb33['delete'](_0x619fbe),_0x619fbe>=this['_startingRevisionId']&&_0x2994a4['set'](_0x619fbe,_0x87cca7['get'](_0x619fbe));}}for(const _0x164729 of _0x186358){const _0x15b3ac=_0x5e28d5['insertions'][_0x164729],_0x54a198=this['_getBaseVids'](_0x5e28d5['deletions'][_0x164729]);let _0x445a09=0x0;for(const _0x3adc00 of _0x15b3ac){const _0x2fca48=this['_getVidAttributeName'](_0x3adc00),_0x5da359=_0x3adc00['item']['getAttribute'](_0x2fca48);if(!_0x2994a4['has'](_0x5da359)&&!_0x194f19['has'](_0x5da359)){if(_0x14bb33['has'](_0x5da359))_0x445a09++;else{if(_0x5da359!=_0x54a198[_0x445a09]){const _0x5c4bad=_0x87cca7['get'](_0x5da359)||_0x87cca7['get'](_0x54a198[_0x445a09]);for(;_0x5da359!=_0x54a198[_0x445a09];)_0x14bb33['has'](_0x54a198[_0x445a09])||(_0x194f19['set'](_0x54a198[_0x445a09],_0x5c4bad),_0x87cca7['set'](_0x54a198[_0x445a09],_0x5c4bad)),_0x445a09++;}_0x445a09++;}}}}for(const _0xce4ceb of _0x186358){const _0x195f26=_0x5e28d5['insertions'][_0xce4ceb];for(const _0x1d078c of _0x195f26){const _0x308634=this['_getVidAttributeName'](_0x1d078c),_0x449735=_0x1d078c['item']['getAttribute'](_0x308634);if(_0x194f19['has'](_0x449735)){const _0x2966de=_0x194f19['get'](_0x449735);_0x14bb33['has'](_0x449735)||_0x14bb33['set'](_0x449735,{..._0x2966de}),_0x2994a4['set'](_0x449735,{..._0x2966de});}}}for(const _0xb9fb9a of _0x14bb33['keys']())_0xb9fb9a>=this['_startingRevisionId']&&_0x14bb33['delete'](_0xb9fb9a);const _0x6aebf6=new Map();for(const _0x280960 of _0x186358){let _0x54d58=_0x5e28d5['insertions'][_0x280960];for(const _0x4914da of _0x54d58)if(_0x4914da['item']['is']('element','tableCell')){const _0x2db4b2=this['_getVidAttributeName'](_0x4914da),_0xb362a7=_0x4914da['item']['getAttribute'](_0x2db4b2);if(_0x2994a4['has'](_0xb362a7)){const _0x931404=_0x4914da['item']['parent']['parent']['getAttribute']('vid_start'),_0xb40c56=_0x6aebf6['get'](_0x931404)||new Set();_0xb40c56['add'](_0x2994a4['get'](_0xb362a7)['userId']),_0x6aebf6['set'](_0x931404,_0xb40c56);}}_0x54d58=_0x5e28d5['deletions'][_0x280960];for(const _0x5770b5 of _0x54d58)if(_0x5770b5['item']['is']('element','tableCell')){const _0xc44c20=this['_getVidAttributeName'](_0x5770b5),_0x119dda=_0x5770b5['item']['getAttribute'](_0xc44c20);if(_0x14bb33['has'](_0x119dda)){const _0x1add81=_0x5770b5['item']['parent']['parent']['getAttribute']('vid_start'),_0x2bb17f=_0x6aebf6['get'](_0x1add81)||new Set();_0x2bb17f['add'](_0x14bb33['get'](_0x119dda)['userId']),_0x6aebf6['set'](_0x1add81,_0x2bb17f);}}for(const _0x521243 of _0x6aebf6['keys']())(_0x2994a4['has'](_0x521243)||_0x14bb33['has'](_0x521243))&&_0x6aebf6['delete'](_0x521243);}for(const _0x4cbd13 of _0x186358){const _0x1928a9=_0x5e28d5['insertions'][_0x4cbd13];let _0x2f71d0=null,_0x3a2e21=null;for(const _0x19ec9b of _0x1928a9){const _0x162de9=this['_getVidAttributeName'](_0x19ec9b),_0x2a9276=_0x19ec9b['item']['getAttribute'](_0x162de9),_0x520c9a=_0x6aebf6['get'](_0x2a9276);_0x520c9a&&'elementStart'==_0x19ec9b['type']&&(_0x2f71d0=Array['from'](_0x520c9a)[0x0],_0x3a2e21=_0x19ec9b['item']['getAttribute']('vid_end')),_0x2f71d0&&(_0x14bb33['set'](_0x2a9276,{'userId':_0x2f71d0}),_0x2994a4['set'](_0x2a9276,{'userId':_0x2f71d0})),_0x2a9276==_0x3a2e21&&(_0x2f71d0=null,_0x3a2e21=null);}}const _0xf8cd76={},_0x1de0d0=new Set();for(const _0x2d44f8 of _0x186358){const _0x2c930d=_0x78fe14['deletions'][_0x2d44f8],_0x207267=_0x78fe14['insertions'][_0x2d44f8];for(const {userId:_0x2e3f95}of this['_touchedMarkers']['values']())null!==_0x2e3f95&&_0x1de0d0['add'](_0x2e3f95);for(const {userId:_0x301489}of this['_touchedRoots']['values']())null!==_0x301489&&_0x1de0d0['add'](_0x301489);this['_markChanges'](_0x207267,_0x5e28d5['insertions'][_0x2d44f8],_0x2994a4,'insertion',_0x1de0d0),this['_markChanges'](_0x2c930d,_0x5e28d5['deletions'][_0x2d44f8],_0x14bb33,'deletion',_0x1de0d0),_0xf8cd76[_0x2d44f8]={'insertions':this['_prepareViewToSave'](_0x207267),'deletions':this['_prepareViewToSave'](_0x2c930d),'attachChange':this['_touchedRoots']['get'](_0x2d44f8)||null,'attributesBefore':_0x527c0e(this['_baseRootsAttributes']['get'](_0x2d44f8))||{},'attributesAfter':_0x527c0e(this['_diffRootsAttributes']['get'](_0x2d44f8))};}return{'diffData':_0xf8cd76,'authorsIds':Array['from'](_0x1de0d0)};}['_processRootBeforeSave'](_0x796404){for(const [,_0x3bc8a1]of _0x796404['markers']){const _0x5b2b54=_0x3bc8a1['start']['getAncestors']()['filter'](_0x5c4a32=>'tableCell'==_0x5c4a32['name']);for(const _0x449927 of _0x5b2b54)0x1==_0x449927['childCount']&&_0x449927['getChild'](0x0)['is']('element','paragraph')&&_0x449927['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x38776f){this['_processRootBeforeSave'](_0x38776f);const _0x5ad568=this['editor']['data']['toView'](_0x38776f,{}),_0x204818=Array['from'](_0x5ad568['getChildren']())['map'](_0xefa4c2=>this['_getViewJson'](_0xefa4c2));return JSON['stringify'](_0x204818);}['_getViewJson'](_0x53c249){if(_0x53c249['is']('$text'))return _0x53c249['data'];{const _0x10334e=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1dc835=_0x53c249,_0x55e4fd=this['editor']['data']['htmlProcessor']['domConverter'],_0x45b53e={'type':_0x10334e['_getTypeCharForViewElement'](_0x1dc835),'name':_0x1dc835['name'],'attributes':Array['from'](_0x1dc835['getAttributes']()),'children':Array['from'](_0x1dc835['getChildren']())['map'](_0x780701=>this['_getViewJson'](_0x780701))};if(_0x53c249['is']('uiElement')&&'$comment'!=_0x53c249['name']){const _0xc487b0=_0x53c249['render'](_0x55e4fd['domDocument'],_0x55e4fd);_0x45b53e['children']['push'](_0xc487b0['outerHTML']);}else{if(_0x53c249['is']('rawElement')){const _0x447a5b=_0x55e4fd['domDocument']['createElement'](_0x1dc835['name']);_0x53c249['render'](_0x447a5b,_0x55e4fd),_0x45b53e['children']['push'](_0x447a5b['innerHTML']);}}const _0x181354=Array['from'](_0x1dc835['getCustomProperties']());_0x181354['length']>0x0&&(_0x45b53e['customProperties']=_0x181354);const _0x122b7a=_0x1dc835['getFillerOffset']();return null!==_0x122b7a&&(_0x45b53e['fillerOffset']=_0x122b7a),_0x45b53e;}}['_markChanges'](_0x87a82a,_0x3db24b,_0x2c9fad,_0xa6067d,_0x25b531){let _0x3ad167=null,_0x5bce16=null,_0x4fa2a4=0x0;const _0x4c554d=this['editor']['model'];for(let _0x368a5b=0x0;_0x368a5b<_0x3db24b['length'];_0x368a5b++){const _0x48bd42=this['_getVidAttributeName'](_0x3db24b[_0x368a5b]),_0x196d42=_0x3db24b[_0x368a5b]['item']['getAttribute'](_0x48bd42),_0x646415=_0x2c9fad['get'](_0x196d42),_0x20c3d2=_0x368a5b==_0x3db24b['length']-0x1;(!_0x3ad167&&_0x646415&&(_0x3ad167=_0x646415,_0x5bce16=_0x3db24b[_0x368a5b]),_0x3ad167&&(!_0x646415||_0x646415['userId']!=_0x3ad167['userId']))&&(_0x329392(_0x646415,P(_0x5bce16,_0x87a82a,_0x4c554d),P(_0x3db24b[_0x368a5b],_0x87a82a,_0x4c554d)),_0x3ad167=_0x646415||null,_0x5bce16=_0x646415?_0x3db24b[_0x368a5b]:null),_0x3ad167&&_0x20c3d2&&_0x329392(_0x646415,P(_0x5bce16,_0x87a82a,_0x4c554d),V(_0x3db24b[_0x368a5b],_0x87a82a,_0x4c554d));}function _0x329392(_0x37bb59,_0x5110eb,_0x4bb6f4){const _0x5d2b74=_0x3ad167['userId'],_0x51397f='revision:'+_0xa6067d+':'+_0x5d2b74+':'+_0x4fa2a4++,_0x5de4b4=_0x4c554d['createRange'](_0x5110eb,_0x4bb6f4);_0x87a82a['markers']['set'](_0x51397f,_0x5de4b4),null!==_0x5d2b74&&_0x25b531['add'](_0x5d2b74);}}['_getVidAttributeName'](_0x5364c3){switch(_0x5364c3['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3a0ed8,_0x45d984){_0x3a0ed8['baseVersion']=null;for(const _0x466050 in _0x3a0ed8){const _0x5270e0=_0x3a0ed8[_0x466050];if(_0x5270e0 instanceof _0x5b5e61){const _0x107e54=_0x45d984['get'](_0x5270e0['root']['rootName']);_0x3a0ed8[_0x466050]=this['_fixPosition'](_0x5270e0,_0x107e54);}if(_0x5270e0 instanceof _0xcb6e88){const _0x39a864=_0x45d984['get'](_0x5270e0['root']['rootName']);_0x3a0ed8[_0x466050]=this['_fixRange'](_0x5270e0,_0x39a864);}'root'===_0x466050&&(_0x3a0ed8['root']=_0x45d984['get'](_0x3a0ed8['root']['rootName']));}}['_fixRange'](_0x1d14ff,_0x227031){return this['editor']['model']['createRange'](this['_fixPosition'](_0x1d14ff['start'],_0x227031),this['_fixPosition'](_0x1d14ff['end'],_0x227031));}['_fixPosition'](_0x59c125,_0x3ac165){return this['editor']['model']['createPositionFromPath'](_0x3ac165,_0x59c125['path'],_0x59c125['stickiness']);}['_handleInsertOperation'](_0x333a7b){const _0x4b31be=this['_idsRoots']['get'](_0x333a7b['position']['root']['rootName']),_0x52a966=this['_fixPosition'](_0x333a7b['position'],_0x4b31be),_0x5b277d=null===_0x333a7b['_authorId']?null:_0x333a7b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x530b81=_0x52a966['parent'],_0x5d1458=this['_revisionId'],_0x15837c=[];for(const _0x5f4448 of _0x333a7b['nodes'])if(_0x5f4448['is']('element'))_0x15837c['push'](this['_makeIdsRoot'](_0x5f4448));else{for(let _0x4c7d12=0x0;_0x4c7d12<_0x5f4448['offsetSize'];_0x4c7d12++)_0x15837c['push'](new _0x16f0c7('$text',{'vid':this['_revisionId']++}));}const _0x196dc9=this['_revisionId'];for(let _0x2dee57=_0x5d1458;_0x2dee57<_0x196dc9;_0x2dee57++)this['_touched']['set'](_0x2dee57,{'userId':_0x5b277d});_0x530b81['_insertChild'](_0x52a966['offset'],_0x15837c);}['_handleMoveOperation'](_0x906186){(_0x906186=this['_cloneOperation'](_0x906186,this['_idsRoots']))['_execute']();const _0x3c673c=null===_0x906186['_authorId']?null:_0x906186['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x8aeb7e=_0x906186['getMovedRangeStart'](),_0x4e43bf=_0x8aeb7e['parent'],_0x58bb03=_0x8aeb7e['offset'];!function _0x4e0319(_0x3a86e5,_0x727804,_0x51300d,_0x154f4b){for(let _0x1f580c=_0x51300d;_0x1f580c<_0x154f4b;_0x1f580c++){const _0x1939ee=_0x727804['getChild'](_0x1f580c);_0x1939ee['is']('element','$text')?_0x3a86e5['set'](_0x1939ee['getAttribute']('vid'),{'userId':_0x3c673c}):(_0x3a86e5['set'](_0x1939ee['getAttribute']('vid_start'),{'userId':_0x3c673c}),_0x4e0319(_0x3a86e5,_0x1939ee,0x0,_0x1939ee['childCount']),_0x3a86e5['set'](_0x1939ee['getAttribute']('vid_end'),{'userId':_0x3c673c}));}}(this['_touched'],_0x4e43bf,_0x58bb03,_0x58bb03+_0x906186['howMany']);}['_handleMergeOperation'](_0x409a5b){const _0x2ba224=null===(_0x409a5b=this['_cloneOperation'](_0x409a5b,this['_idsRoots']))['_authorId']?null:_0x409a5b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x108c5c=_0x409a5b['targetPosition']['parent'],_0x4fb0f3=_0x409a5b['sourcePosition']['parent'],_0x569b9d=_0x108c5c['getAttribute']('vid_end'),_0x448b33=_0x4fb0f3['getAttribute']('vid_start');_0x108c5c['_setAttribute']('vid_end',_0x4fb0f3['getAttribute']('vid_end')),_0x4fb0f3['_setAttribute']('vid_end',_0x569b9d),this['_touched']['set'](_0x448b33,{'userId':_0x2ba224}),this['_touched']['set'](_0x569b9d,{'userId':_0x2ba224}),_0x409a5b['_execute']();}['_handleSplitOperation'](_0x230f20){const _0x429ceb=null===(_0x230f20=this['_cloneOperation'](_0x230f20,this['_idsRoots']))['_authorId']?null:_0x230f20['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3ad272=_0x230f20['graveyardPosition'],_0x1c4bb8=_0x230f20['splitPosition']['parent'];_0x230f20['_execute']();const _0x38c86a=_0x1c4bb8['getAttribute']('vid_end'),_0x50da85=_0x230f20['insertionPosition']['nodeAfter'];if(_0x3ad272){const _0x2f3b18=_0x50da85['getAttribute']('vid_end'),_0x14bac9=_0x1c4bb8['getAttribute']('vid_end');_0x1c4bb8['_setAttribute']('vid_end',_0x2f3b18),_0x50da85['_setAttribute']('vid_end',_0x14bac9),this['_touched']['set'](_0x1c4bb8['getAttribute']('vid_end'),{'userId':_0x429ceb}),this['_touched']['set'](_0x50da85['getAttribute']('vid_start'),{'userId':_0x429ceb});}else{const _0x476ccb=this['_revisionId']++,_0x27e6ad=this['_revisionId']++;_0x1c4bb8['_setAttribute']('vid_end',_0x476ccb),_0x50da85['_setAttribute']('vid_start',_0x27e6ad),_0x50da85['_setAttribute']('vid_end',_0x38c86a),this['_touched']['set'](_0x476ccb,{'userId':_0x429ceb}),this['_touched']['set'](_0x27e6ad,{'userId':_0x429ceb});}}['_handleMarkerOperation'](_0x4fd3b2){if(!_0x4fd3b2['affectsData'])return;const _0x551703=(_0x4fd3b2=this['_cloneOperation'](_0x4fd3b2,this['_diffRoots']))['oldRange']?_0x4fd3b2['oldRange']['root']:null,_0x41066a=_0x4fd3b2['newRange']?_0x4fd3b2['newRange']['root']:null;_0x551703&&this['_markers']['delete'](_0x4fd3b2['name']),_0x41066a&&this['_markers']['set'](_0x4fd3b2['name'],_0x4fd3b2['newRange']['clone']());const _0x4c75d1=null===_0x4fd3b2['_authorId']?null:_0x4fd3b2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x468d9b=_0x4fd3b2['name'];if(!this['_touchedMarkers']['has'](_0x468d9b))return void this['_touchedMarkers']['set'](_0x468d9b,{'range':_0x4fd3b2['oldRange'],'userId':_0x4c75d1});const _0x2b3f00=this['_touchedMarkers']['get'](_0x468d9b),_0x3f1f07=_0x2b3f00['range'],_0x592a3a=_0x4fd3b2['newRange'];null==_0x3f1f07&&null==_0x592a3a||_0x3f1f07&&_0x592a3a&&_0x3f1f07['isEqual'](_0x592a3a)?this['_touchedMarkers']['delete'](_0x4fd3b2['name']):_0x2b3f00['userId']=_0x4c75d1;}['_handleRootOperation'](_0x55500b,_0x3874bd){this['_diffRoots']['has'](_0x55500b['rootName'])?this['_diffRoots']['get'](_0x55500b['rootName'])['_isAttached']=_0x55500b['isAdd']:(this['_diffRoots']['set'](_0x55500b['rootName'],N(_0x55500b['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x55500b['rootName'],{}),_0x3874bd&&this['_idsRoots']['set'](_0x55500b['rootName'],N(_0x55500b['rootName'],!0x0)));const _0xda67fe=null===_0x55500b['_authorId']?null:_0x55500b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x41b036=this['_touchedRoots']['get'](_0x55500b['rootName']);_0x41b036&&_0x41b036['userId']===_0xda67fe?this['_touchedRoots']['delete'](_0x55500b['rootName']):this['_touchedRoots']['set'](_0x55500b['rootName'],{'userId':_0xda67fe,'isAttached':_0x55500b['isAdd']});}['_handleRootAttributeOperation'](_0x3f87d7){const _0x3f2eb8=this['_diffRootsAttributes']['get'](_0x3f87d7['root']['rootName']);null===_0x3f87d7['newValue']?delete _0x3f2eb8[_0x3f87d7['key']]:_0x3f2eb8[_0x3f87d7['key']]=_0x3f87d7['newValue'];}}function x(_0x516f69){const _0x1901d2=N(_0x516f69['rootName'],_0x516f69['isAttached']());for(const _0x897ee1 of _0x516f69['getChildren']()){const _0x2d75f7=_0x897ee1['_clone'](!0x0);_0x1901d2['_appendChild'](_0x2d75f7);}return _0x1901d2;}function N(_0x380304,_0xec34ec=!0x0){const _0x55a018=new _0x2f3b68();return _0x55a018['rootName']=_0x380304,_0x55a018['_isAttached']=_0xec34ec,_0x55a018['isAttached']=()=>_0x55a018['_isAttached'],_0x55a018;}function P(_0x24894a,_0x1a0f49,_0x3926a5){const _0x16659d='elementEnd'==_0x24894a['type']?_0x3926a5['createPositionAt'](_0x24894a['item'],'end'):_0x3926a5['createPositionBefore'](_0x24894a['item']);return _0x3926a5['createPositionFromPath'](_0x1a0f49,_0x16659d['path'],_0x16659d['stickiness']);}function V(_0x315504,_0xcd2d1,_0x1b1abb){const _0x50f6e7='elementStart'==_0x315504['type']?_0x1b1abb['createPositionAt'](_0x315504['item'],0x0):_0x1b1abb['createPositionAfter'](_0x315504['item']);return _0x1b1abb['createPositionFromPath'](_0xcd2d1,_0x50f6e7['path'],_0x50f6e7['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
- _0x4bddad(_0x1f8770){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x11284e,_0x6ccb98){super(_0x11284e),this['focusTracker']=new _0x388333(),this['keystrokes']=new _0x26fba6(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x6ccb98),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'](),_0x537bd1({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x29a2ea=_0x29082a=>_0x29082a['stopPropagation']();this['keystrokes']['set']('arrowright',_0x29a2ea),this['keystrokes']['set']('arrowleft',_0x29a2ea),this['keystrokes']['set']('arrowup',_0x29a2ea),this['keystrokes']['set']('arrowdown',_0x29a2ea);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x40040b){this['revisionNameInputView']['fieldView']['element']['value']=_0x40040b['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x36fa88){const _0x2a8367=new et(this['locale'],ti),_0x5d61d9=_0x2a8367['fieldView'];_0x5d61d9['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x429b80=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x36fa88&&(_0x429b80+='\x20('+m(this['locale'],'optional')+')'),(_0x2a8367['label']=_0x429b80,_0x5d61d9['on']('input',()=>{this['revisionNameInputValue']=_0x5d61d9['element']['value']['trim']();}),_0x2a8367);}}class l extends _0x1364e3{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x428cb0=this['editor'],_0x44b393=_0x428cb0['plugins']['get']('RevisionTracker');_0x428cb0['ui']['componentFactory']['add']('revisionHistory',_0x9c59d3=>{const _0x38ae78=_0x487766(_0x9c59d3),_0x1a49d5=_0x38ae78['panelView']['children'],_0x2e4f5e=new _0x5afdd7(_0x9c59d3),_0x2d191b=new _0x12265d(_0x9c59d3),_0x437fc1=this['_createSaveRevisionButton'](_0x29aa73),_0x3e6621=new _0x12265d(_0x9c59d3),_0x5dbf63=this['_createOpenRevisionButton'](_0x29aa73);return _0x38ae78['bind']('isEnabled')['to'](_0x44b393,'isReady',_0x44b393,'isEnabled',_0x428cb0,'isReadOnly',(_0x20ea8a,_0x27c0a7,_0x8bb2a0)=>_0x20ea8a&&_0x27c0a7&&!_0x8bb2a0),_0x38ae78['buttonView']['set']({'icon':_0x259bca,'label':m(_0x9c59d3,'Revision\x20history'),'tooltip':!0x0}),_0x437fc1['set']({'withText':!0x0,'role':'menuitem'}),_0x5dbf63['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x5dbf63,'execute',()=>{_0x38ae78['isOpen']=!0x1,_0x428cb0['editing']['view']['focus']();},{'priority':'low'}),_0x2d191b['children']['add'](_0x437fc1),_0x3e6621['children']['add'](_0x5dbf63),_0x2e4f5e['role']='menu',_0x2e4f5e['items']['addMany']([_0x2d191b,_0x3e6621]),_0x1a49d5['add'](_0x2e4f5e),_0x38ae78;}),_0x428cb0['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2a0268=this['editor'],_0x17b441=_0x2a0268['locale'],_0x48eaaf=_0x2a0268['plugins']['get']('RevisionTracker'),_0x59675d=new _0x3e57cc(_0x17b441),_0x3f58cd=new _0xf0202a(_0x17b441);_0x59675d['bind']('isEnabled')['to'](_0x48eaaf,'isReady',_0x48eaaf,'isEnabled',_0x2a0268,'isReadOnly',(_0x40991f,_0x2f3ba3,_0x44f577)=>_0x40991f&&_0x2f3ba3&&!_0x44f577),_0x59675d['buttonView']['set']({'icon':_0x259bca,'label':m(_0x17b441,'Revision\x20history')});const _0x320ab3=new _0x94d30d(_0x17b441,_0x59675d),_0x27f5af=this['_createSaveRevisionButton'](_0x413118);_0x27f5af['delegate']('execute')['to'](_0x59675d),_0x320ab3['children']['add'](_0x27f5af),_0x3f58cd['items']['add'](_0x320ab3);const _0x5c8fb6=new _0x94d30d(_0x17b441,_0x59675d),_0x345bb2=this['_createOpenRevisionButton'](_0x413118);return _0x345bb2['delegate']('execute')['to'](_0x59675d),_0x5c8fb6['children']['add'](_0x345bb2),_0x3f58cd['items']['add'](_0x5c8fb6),_0x59675d['panelView']['children']['add'](_0x3f58cd),_0x59675d;}['_createSaveRevisionButton'](_0x15f5ec){const _0x164bf0=this['editor'],_0x57df=_0x164bf0['plugins']['get']('RevisionTracker'),_0x491216=new _0x15f5ec(_0x164bf0['locale']);return _0x491216['set']({'label':m(_0x164bf0['locale'],'Save\x20current\x20revision')}),_0x491216['bind']('isEnabled')['to'](_0x57df,'isReady',_0x57df,'isEnabled',_0x164bf0,'isReadOnly',(_0x4427c9,_0x5283ff,_0x325534)=>_0x4427c9&&_0x5283ff&&!_0x325534),this['listenTo'](_0x491216,'execute',()=>{this['_showDialog']();}),_0x491216;}['_createOpenRevisionButton'](_0xa53d88){const _0x3e678c=this['editor'],_0x3b108e=_0x3e678c['plugins']['get']('RevisionTracker'),_0x2e6d52=new _0xa53d88(_0x3e678c['locale']);return _0x2e6d52['set']({'label':m(_0x3e678c['locale'],'Open\x20revision\x20history')}),_0x2e6d52['bind']('isEnabled')['to'](_0x3b108e,'isReady',_0x3e678c,'isReadOnly',(_0x58b956,_0x5d539e)=>_0x58b956&&!_0x5d539e),this['listenTo'](_0x2e6d52,'execute',()=>{_0x3e678c['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x2e6d52;}['_showDialog'](){const _0x2cfbe6=this['editor'],_0x354944=_0x2cfbe6['locale'],_0x25e9d7=_0x2cfbe6['plugins']['get']('Dialog'),_0x49c2c7=_0x2cfbe6['plugins']['get']('RevisionTracker');function _0x1d9a31(_0x4c775d){_0x2cfbe6['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4c775d['revisionName']?_0x4c775d['revisionNameInputView']['errorText']=m(_0x354944,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2cfbe6['plugins']['get'](h)['saveRevision']({'name':_0x4c775d['revisionName']}),_0x25e9d7['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1d9a31(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x25e9d7['show']({'id':'revisionSave','title':m(_0x354944,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x2cfbe6['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x25e9d7['hide']()},{'label':m(_0x2cfbe6['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xa5ca33){_0xa5ca33['bind']('isEnabled')['to'](_0x49c2c7,'isReady',_0x49c2c7,'isEnabled',_0x2cfbe6,'isReadOnly',(_0x50ab72,_0x3a92c0,_0x3ea7b4)=>_0x50ab72&&_0x3a92c0&&!_0x3ea7b4);},'onExecute':()=>_0x1d9a31(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2fd440=this['editor'],_0x4b26d6=_0x2fd440['locale'];this['_saveRevisionFormView']=new he(_0x4b26d6,_0x2fd440['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x1f8770{['changeId'];['_model'];constructor(_0x552511,_0x1284f6){super(_0x552511),this['_model']=_0x1284f6,this['changeId']=_0x1284f6['id'];const _0x529631=this['bindTemplate'],_0x32f247=m(_0x552511,_0x1284f6['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1284f6['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1284f6['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x529631['to']('type',_0x188202=>'ck-revision-change__'+_0x188202)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x32f247}]},{'text':'\x20'+_0x1284f6['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x22a4be(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0xac7a3b){super(),this['id']=_0xac7a3b['id']||_0x2dfa83(),this['author']=_0xac7a3b['author'],this['type']=_0xac7a3b['type'],this['data']=_0xac7a3b['data']||{},this['rootName']=_0xac7a3b['rootName'],this['set']('createdAt',_0xac7a3b['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x42cd3a,_0x1f5098){this['newRevisionId']=_0x42cd3a,this['oldRevisionId']=_0x1f5098,this['changes']=new _0x251a29();}['_setChanges'](_0x4d212e){for(const _0x208f05 of _0x4d212e)this['changes']['add'](_0x208f05);}}class u extends _0x1364e3{['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[_0x5c9017,_0x534cd2,S,$];}constructor(_0x19e924){super(_0x19e924),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',(_0x44126c,_0x2b20c7,_0x5b70f2)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3b27e6=>{for(const _0x4233be of this['editor']['editing']['view']['document']['roots'])_0x5b70f2?_0x3b27e6['removeClass']('ck-editor__editable__overlay',_0x4233be):_0x3b27e6['addClass']('ck-editor__editable__overlay',_0x4233be);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x19ba2a=>null!==_0x19ba2a),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1800d4,_0xfd7b69,_0x5ee42f)=>_0x1800d4&&_0x5ee42f?_0xfd7b69['changes']['getIndex'](_0x5ee42f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1cd0ff,_0x562860)=>_0x1cd0ff?_0x562860['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x534cd2);}['init'](){const _0x56e2cd=this['editor'],_0x3e500e=new rt(_0x56e2cd,{'direction':'backward'}),_0xc9d4d1=new rt(_0x56e2cd,{'direction':'forward'});(_0x56e2cd['commands']['add']('showPreviousChange',_0x3e500e),_0x56e2cd['commands']['add']('showNextChange',_0xc9d4d1),_0x56e2cd['commands']['add']('restoreRevision',new nt(_0x56e2cd)),this['on']('change:numberOfChanges',()=>{_0x3e500e['refresh'](),_0xc9d4d1['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x56e2cd['enableReadOnlyMode']('revision-viewer'),_0x56e2cd['plugins']['has']('WidgetToolbarRepository'))&&_0x56e2cd['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x3ed935){return await this['_utils']['loadRevisionData'](_0x3ed935,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3ed935);}async['getRevisionRootsAttributes'](_0xc75bfc){return await this['_utils']['loadRevisionData'](_0xc75bfc,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xc75bfc);}async['compare'](_0x1250a5,_0x35a9ad,_0x41adea=!0x1){if(!this['isEnabled'])return;const _0x3457df=this['diff'],_0x58749a=this['repository'],_0x2bd5f5='string'==typeof _0x1250a5?_0x58749a['getRevision'](_0x1250a5):_0x1250a5,_0x42e57b='string'==typeof _0x35a9ad?_0x58749a['getRevision'](_0x35a9ad):_0x35a9ad,_0x4a033b=_0x2bd5f5['id'],_0x338e37=_0x42e57b?_0x42e57b['id']:null;if(!_0x41adea&&this['diff']&&this['diff']['newRevisionId']===_0x4a033b&&this['diff']['oldRevisionId']===_0x338e37)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x4a033b,_0x338e37);const _0x4bb5f2=this['_getRevisionsRange'](_0x2bd5f5,_0x42e57b,!0x0)['map'](_0x31050a=>this['_utils']['loadRevisionData'](_0x31050a,this['adapter']));return _0x4bb5f2['push'](new Promise(_0x2da524=>{setTimeout(_0x2da524,0x14);})),Promise['all'](_0x4bb5f2)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x160e56=this['_getDiff'](_0x4a033b,_0x338e37);for(const _0xd94da1 of _0x160e56['changes'])this['_changeIdToChange']['set'](_0xd94da1['id'],_0xd94da1);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x123e5a=>{for(const _0x56bb77 of this['editor']['model']['document']['getRootNames']())_0x123e5a['detachRoot'](_0x56bb77);for(const _0x5e3569 of Object['keys'](_0x160e56['model'])){const _0x574861=_0x123e5a['addRoot'](_0x5e3569);for(const _0x3d224b of Object['keys'](_0x160e56['attributes'][_0x5e3569]))_0x123e5a['setAttribute'](_0x3d224b,_0x160e56['attributes'][_0x5e3569][_0x3d224b],_0x574861);_0x123e5a['insert'](_0x160e56['model'][_0x5e3569],_0x574861,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x160e56['changes'])),this['isReady']=!0x0;})['catch'](_0x5d59df=>{console['error'](_0x5d59df),this['_cleanUp'](),_0x3457df&&(this['diff']=_0x3457df),this['isReady']=!0x0;});}['addRevisionData'](_0x997800,_0x51ffa0){const _0x44516f=this['repository']['createRevision'](_0x997800);return _0x44516f['on']('_update',(_0xd211e3,_0x59b4c3,_0x1c7b61)=>_0x51ffa0(_0x59b4c3,_0x1c7b61,_0x44516f)),this['repository']['addRevision'](_0x44516f),_0x44516f;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1918cb=>{for(const _0x1b1f6d of this['editor']['model']['document']['getRootNames']())_0x1918cb['detachRoot'](_0x1b1f6d);});}['_sortAndFilterDiffChanges'](_0x32a74e){const _0x3e66a8=[],_0x54c763=new Map();for(const _0x2b64f8 of this['editor']['model']['document']['getRootNames']()){const _0x50656c=this['editor']['editing']['view']['getDomRoot'](_0x2b64f8);if(!_0x50656c)continue;const _0x180b57=_0x50656c['getClientRects']()['item'](0x0);_0x180b57&&(_0x3e66a8['push'](_0x2b64f8),_0x54c763['set'](_0x2b64f8,_0x180b57));}return _0x3e66a8['sort']((_0x139e70,_0x4e9af1)=>{const _0x4b7561=_0x54c763['get'](_0x139e70),_0x491dd0=_0x54c763['get'](_0x4e9af1);return _0x4b7561['y']-_0x491dd0['y']||_0x4b7561['x']-_0x491dd0['x'];}),(_0x32a74e=_0x32a74e['filter'](_0x535a2a=>_0x3e66a8['includes'](_0x535a2a['rootName'])))['sort']((_0x97a114,_0x125e04)=>_0x3e66a8['indexOf'](_0x97a114['rootName'])-_0x3e66a8['indexOf'](_0x125e04['rootName'])),_0x32a74e;}['_makeTape'](_0x37e3bc){const _0x50b072=Array['from'](_0x37e3bc['markers'])['filter'](([_0x2d73e0,_0x43deb4])=>_0x2d73e0['startsWith']('revision:')&&!_0x43deb4['isCollapsed']),_0x145dff=Array['from'](this['editor']['model']['createRangeIn'](_0x37e3bc)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x50b072['length'])for(const _0x659df4 of _0x145dff){const [_0x79387a,_0x1e0fae]=_0x50b072[0x0],[,_0x27c1f2,_0x56381b]=_0x79387a['split'](':');if(_0x1e0fae['end']['isEqual'](_0x659df4['nextPosition'])&&_0x50b072['shift'](),(_0x659df4['previousPosition']['isEqual'](_0x1e0fae['start'])||_0x659df4['previousPosition']['isAfter'](_0x1e0fae['start']))&&('insertion'==_0x27c1f2?_0x659df4['isAdded']={'userId':_0x56381b}:'deletion'==_0x27c1f2&&(_0x659df4['isRemoved']={'userId':_0x56381b})),0x0==_0x50b072['length'])break;}return _0x145dff;}['_refreshStartEndIndex'](_0x31f175){const _0xfa28db=new Map();for(let _0x515e53=0x0;_0x515e53<_0x31f175['length'];_0x515e53++)'text'===_0x31f175[_0x515e53]['type']?(_0x31f175[_0x515e53]['item']['startIndex']=_0x515e53,_0x31f175[_0x515e53]['item']['endIndex']=_0x515e53):('elementStart'===_0x31f175[_0x515e53]['type']?_0x31f175[_0x515e53]['item']['startIndex']=_0x515e53:'elementEnd'===_0x31f175[_0x515e53]['type']&&(_0x31f175[_0x515e53]['item']['endIndex']=_0x515e53),_0xfa28db['set'](_0x31f175[_0x515e53]['id'],_0x515e53));for(const _0x245957 of _0xfa28db['values']())'elementStart'===_0x31f175[_0x245957]['type']?_0x31f175[_0x245957]['item']['endIndex']=_0xfa28db['get'](_0x31f175[_0x245957]['pairId']):'elementEnd'===_0x31f175[_0x245957]['type']&&(_0x31f175[_0x245957]['item']['startIndex']=_0xfa28db['get'](_0x31f175[_0x245957]['pairId']));}['_processTape'](_0x45446c){for(let _0x1bb806=0x0;_0x1bb806<_0x45446c['length'];_0x1bb806++){if('elementStart'===_0x45446c[_0x1bb806]['type'])_0x45446c[_0x1bb806]['item']['startIndex']=_0x1bb806;else{if('elementEnd'===_0x45446c[_0x1bb806]['type']){_0x45446c[_0x1bb806]['item']['endIndex']=_0x1bb806;const _0x40caee=_0x45446c[_0x1bb806]['item']['startIndex'];_0x45446c[_0x40caee]['pairId']=_0x45446c[_0x1bb806]['id'],_0x45446c[_0x1bb806]['pairId']=_0x45446c[_0x40caee]['id'];}else _0x45446c[_0x1bb806]['item']['startIndex']=_0x1bb806,_0x45446c[_0x1bb806]['item']['endIndex']=_0x1bb806,_0x45446c[_0x1bb806]['pairId']=null;}_0x45446c[_0x1bb806]['markersStart']||(_0x45446c[_0x1bb806]['markersStart']=[],_0x45446c[_0x1bb806]['markersEnd']=[]);}}['_markInsertions'](_0x45833b,_0x5a2117){const _0x5aaa1f=_0x45833b['filter'](_0x141550=>!_0x141550['isAdded']);for(let _0x4ae77b=0x0;_0x4ae77b<_0x5a2117['length'];_0x4ae77b++)_0x5a2117[_0x4ae77b]['isAdded']&&(_0x5aaa1f[_0x4ae77b]['isAdded']=_0x5a2117[_0x4ae77b]['isAdded']);}['_getDiff'](_0x5d5a02,_0x2de775=null){const _0x5d7f71=this['repository']['getRevision'](_0x5d5a02),_0xc12e6b=_0x2de775?this['repository']['getRevision'](_0x2de775):null,_0x456de7=this['_getRevisionsRange'](_0x5d7f71,_0xc12e6b),_0x15cb44=_0x456de7[_0x456de7['length']-0x1],_0x2dc2b3=new Map(),_0xa97a7b={'model':{},'attributes':{},'changes':[]},_0x3dbdf5=new Set(),_0x5a2c01=new Map();for(let _0x3c0e5d=_0x456de7['length']-0x1;_0x3c0e5d>=0x0;_0x3c0e5d--){const _0x4cf77f=_0x456de7[_0x3c0e5d];for(const _0x3ab066 of Object['keys'](_0x4cf77f['diffData']))if(_0x4cf77f['diffData'][_0x3ab066]['attachChange']){const _0x558046=_0x4cf77f['diffData'][_0x3ab066]['attachChange'];_0x558046['isAttached']?(_0x3dbdf5['add'](_0x3ab066),_0x5a2c01['has'](_0x3ab066)&&_0x5a2c01['get'](_0x3ab066)['userId']==_0x558046['userId']?_0x5a2c01['delete'](_0x3ab066):_0x5a2c01['set'](_0x3ab066,_0x558046)):_0x5a2c01['has'](_0x3ab066)?(_0x3dbdf5['delete'](_0x3ab066),_0x5a2c01['delete'](_0x3ab066)):(_0x3dbdf5['add'](_0x3ab066),_0x5a2c01['set'](_0x3ab066,_0x558046));}else _0x3dbdf5['add'](_0x3ab066);}for(const _0x5b2878 of _0x3dbdf5){const _0x26724c=_0x5a2c01['has'](_0x5b2878)&&!_0x5a2c01['get'](_0x5b2878)['isAttached'];let _0x32277b=_0x26724c?_0x456de7['length']-0x1:0x0;const _0x1eaafe=_0x26724c?-0x1:0x1;for(;_0x456de7[_0x32277b];){const _0x323bb1=_0x456de7[_0x32277b];if(_0x323bb1['diffData'][_0x5b2878]){const _0x39c080=_0x26724c?_0x323bb1['diffData'][_0x5b2878]['attributesBefore']:_0x323bb1['diffData'][_0x5b2878]['attributesAfter'];_0xa97a7b['attributes'][_0x5b2878]=_0x39c080?_0x527c0e(_0x39c080):{};break;}_0x32277b+=_0x1eaafe;}}for(const _0x23167f of _0x456de7){_0x23167f['model']={};for(const _0xef5a4f of _0x23167f['authors'])_0x2dc2b3['set'](_0xef5a4f['id'],_0xef5a4f);for(const _0x3bf2ab of _0x3dbdf5){const _0x341a46=_0x23167f['diffData'][_0x3bf2ab]?_0x23167f['diffData'][_0x3bf2ab]['insertions']:'[]',_0x43e0a2=_0x23167f['diffData'][_0x3bf2ab]?_0x23167f['diffData'][_0x3bf2ab]['deletions']:'[]';_0x23167f['model'][_0x3bf2ab]={'insertions':this['_utils']['_makeModelFromViewString'](_0x341a46),'deletions':this['_utils']['_makeModelFromViewString'](_0x43e0a2)};}}for(const _0x217e0b of _0x3dbdf5){let _0x420eee=null,_0xcc5842=0x0;const _0x517843=new Map(Array['from'](_0x5d7f71['model'][_0x217e0b]['insertions']['markers'])['filter'](([_0x34f366])=>!_0x34f366['startsWith']('revision:')));let _0x34ff0b=0x0;for(const _0x30c049 of _0x456de7){const _0x1e2d1b=this['_makeTape'](_0x30c049['model'][_0x217e0b]['insertions']);_0x30c049==_0x5d7f71?(_0x420eee=_0x1e2d1b,_0xcc5842=_0x420eee['length'],_0x420eee['forEach'](_0x3736f9=>{_0x3736f9['id']=_0x34ff0b++;}),this['_processTape'](_0x420eee)):this['_markInsertions'](_0x420eee,_0x1e2d1b);const _0x166add=_0x420eee['filter'](_0x5ce898=>!_0x5ce898['isAdded'])['map'](_0x5c86e7=>_0x5c86e7['id']);let _0x50be89=0x0;const _0x49f899=this['_makeTape'](_0x30c049['model'][_0x217e0b]['deletions']);_0x49f899['forEach'](_0x112a3b=>{_0x112a3b['isRemoved']?_0x112a3b['id']=_0xcc5842++:_0x112a3b['id']=_0x166add[_0x50be89++];}),this['_processTape'](_0x49f899),this['_setDistance'](_0x420eee,'isAdded'),this['_setDistance'](_0x49f899,'isRemoved'),_0x30c049==_0x5d7f71&&this['_markMarkers'](_0x420eee,_0x517843),_0x420eee=this['_joinTapes'](_0x420eee,_0x49f899),this['_refreshStartEndIndex'](_0x420eee),this['_setDistance'](_0x420eee,'isRemoved');}_0x420eee=_0x420eee['filter'](_0x15497a=>!(_0x15497a['isAdded']&&_0x15497a['isRemoved']));const _0x2b492f=new Map(_0x15cb44['model'][_0x217e0b]['deletions']['markers']),_0xecd088=new Set(_0x517843['keys']());for(const _0x471108 of _0x2b492f['keys']())_0xecd088['delete'](_0x471108);this['_markSuggestions'](_0x420eee,_0xecd088),this['_fixObsoleteTags'](_0x420eee),_0x420eee=this['_removeMissingPairs'](_0x420eee),_0x420eee=this['_markMismatchedRemovedTags'](_0x420eee),_0x420eee=this['_removeUnsupportedChanges'](_0x420eee);const {root:_0x5e0cd3,changes:_0x356e93}=this['_makeModelFromTape'](_0x420eee,_0x2dc2b3,_0x217e0b);_0xa97a7b['model'][_0x217e0b]=_0x5e0cd3;const _0x3f9be2=_0x5a2c01['get'](_0x217e0b);if(_0x3f9be2){const _0x5409ed=_0x2dc2b3['get'](_0x3f9be2['userId']),_0x310380=new G({'author':_0x5409ed,'type':_0x3f9be2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x217e0b});_0x356e93['unshift'](_0x310380),_0xa97a7b['attributes'][_0x217e0b]['revisionHistoryAttachChange']=_0x310380['id'];}_0xa97a7b['changes']=_0xa97a7b['changes']['concat'](_0x356e93);}return _0xa97a7b;}['_markMarkers'](_0x455ee2,_0x2363cf){for(let _0x148faa=0x0;_0x148faa<_0x455ee2['length'];_0x148faa++)for(const [_0x1722b5,_0x348fae]of _0x2363cf)!_0x348fae['isCollapsed']&&_0x348fae['start']['isEqual'](_0x455ee2[_0x148faa]['previousPosition'])&&_0x455ee2[_0x148faa]['markersStart']['push'](_0x1722b5),_0x348fae['end']['isEqual'](_0x455ee2[_0x148faa]['nextPosition'])&&_0x455ee2[_0x148faa]['markersEnd']['push'](_0x1722b5);}['_joinTapes'](_0x303a02,_0x333ee2){let _0x27ee9d=[],_0x6d4ecd=0x0,_0x3d7315=0x0;for(;_0x6d4ecd<_0x303a02['length']||_0x3d7315<_0x333ee2['length'];){const _0x588753=_0x303a02[_0x6d4ecd]||{},_0x149cca=_0x333ee2[_0x3d7315]||{};if(_0x588753['id']==_0x149cca['id'])_0x6d4ecd++,_0x3d7315++,_0x27ee9d['push'](_0x588753);else{if(_0x149cca['isRemoved']&&_0x588753['isAdded']){const {commonTape:_0x2c1059,iEnd:_0x3fe440,jEnd:_0x5b1c6a}=this['_threeWayMerge'](_0x303a02,_0x6d4ecd,_0x333ee2,_0x3d7315);_0x27ee9d=_0x27ee9d['concat'](_0x2c1059),_0x6d4ecd=_0x3fe440,_0x3d7315=_0x5b1c6a;}else _0x149cca['isRemoved']?(_0x3d7315++,_0x27ee9d['push'](_0x149cca)):(_0x6d4ecd++,_0x27ee9d['push'](_0x588753));}}return _0x27ee9d;}['_markSuggestions'](_0x9cf07e,_0x57001b){const _0x26446f=[];for(let _0x1f1653=0x0;_0x1f1653<_0x9cf07e['length'];_0x1f1653++){for(let _0x14a3fa=0x0;_0x14a3fa<_0x9cf07e[_0x1f1653]['markersStart']['length'];_0x14a3fa++){const _0x4a7c05=_0x9cf07e[_0x1f1653]['markersStart'][_0x14a3fa];if(!_0x57001b['has'](_0x4a7c05))continue;const {group:_0x1e201e,type:_0x18ca80,authorId:_0x2608b6}=_0x59aab8(_0x4a7c05);'revision-suggestion'!=_0x1e201e||'insertion'!=_0x18ca80&&'deletion'!=_0x18ca80||(_0x26446f['unshift']({'type':_0x18ca80,'name':_0x4a7c05,'userId':_0x2608b6}),_0x9cf07e[_0x1f1653]['markersStart']['splice'](_0x14a3fa,0x1),_0x14a3fa--);}_0x2b8e82(_0x9cf07e[_0x1f1653]);for(let _0x1a9fec=0x0;_0x1a9fec<_0x9cf07e[_0x1f1653]['markersEnd']['length'];_0x1a9fec++){const _0x5e433e=_0x9cf07e[_0x1f1653]['markersEnd'][_0x1a9fec];if(!_0x57001b['has'](_0x5e433e))continue;const {group:_0x10541e,type:_0x395ac8}=_0x59aab8(_0x5e433e);if('revision-suggestion'!=_0x10541e||'insertion'!=_0x395ac8&&'deletion'!=_0x395ac8)continue;_0x9cf07e[_0x1f1653]['markersEnd']['splice'](_0x1a9fec,0x1),_0x1a9fec--;const _0x48ec7a=_0x26446f['findIndex'](_0x25387e=>_0x25387e['name']==_0x5e433e);_0x48ec7a>-0x1&&_0x26446f['splice'](_0x48ec7a,0x1);}}function _0x59aab8(_0x8ae0a6){const _0x1a4614=_0x8ae0a6['split'](':');return{'group':_0x1a4614[0x0],'type':_0x1a4614[0x1],'subType':_0x1a4614['length']>=0x5?_0x1a4614[0x2]:null,'id':_0x1a4614['length']<0x5?_0x1a4614[0x2]:_0x1a4614[0x3],'authorId':_0x1a4614['length']<0x5?_0x1a4614[0x3]:_0x1a4614[0x4],'markerCount':0x6==_0x1a4614['length']?_0x1a4614[0x5]:null};}function _0x2b8e82(_0x3fbb73){for(let _0x38d5c6=0x0;_0x38d5c6<_0x26446f['length'];_0x38d5c6++){if(_0x3fbb73['isAdded']&&'insertion'==_0x26446f[_0x38d5c6]['type']&&_0x3fbb73['isAdded']['userId']==_0x26446f[_0x38d5c6]['userId'])return _0x3fbb73['isAddSuggestion']=_0x26446f[_0x38d5c6],void delete _0x3fbb73['isAdded'];if(!_0x3fbb73['isAdded']&&!_0x3fbb73['isRemoved']&&'deletion'==_0x26446f[_0x38d5c6]['type'])return void(_0x3fbb73['isRemoveSuggestion']=_0x26446f[_0x38d5c6]);}}}['_setDistance'](_0x163c90,_0x418837){let _0xf54feb=0x0,_0x314e74=!0x1;const _0x33650c=new Map();for(const _0x20728a of _0x163c90)_0x20728a[_0x418837]?_0x314e74&&(_0xf54feb++,_0x314e74=!0x1):(_0xf54feb++,_0x314e74=!0x0),_0x33650c['set'](_0x20728a['id'],_0xf54feb);for(let _0x59ece2=0x0;_0x59ece2<_0x163c90['length'];_0x59ece2++){if('isRemoved'==_0x418837&&_0x163c90[_0x59ece2]['isAdded']||'isAdded'==_0x418837&&_0x163c90[_0x59ece2]['isRemoved'])continue;if('text'==_0x163c90[_0x59ece2]['type']){_0x163c90[_0x59ece2]['distance']=0x0;continue;}const _0x5e55ad=_0x33650c['get'](_0x163c90[_0x59ece2]['pairId']),_0x350fc8=_0x33650c['get'](_0x163c90[_0x59ece2]['id']);_0x163c90[_0x59ece2]['distance']=_0x5e55ad-_0x350fc8;}}['_getRevisionsRange'](_0x1d8504,_0x32f168,_0x175bfd=!0x1){const _0x3a63a2=[];let _0x3d5950=this['repository']['getIndex'](_0x1d8504),_0x1f04a8=this['repository']['getIndex'](_0x32f168);for(-0x1==_0x1f04a8&&(_0x1f04a8=this['repository']['_revisions']['length'],_0x175bfd=!0x1);_0x3d5950<_0x1f04a8;)_0x3a63a2['push'](this['repository']['getRevision'](_0x3d5950)),_0x3d5950++;return _0x175bfd&&_0x3a63a2['push'](this['repository']['getRevision'](_0x3d5950)),_0x3a63a2;}['_threeWayMerge'](_0x4e6793,_0x1bddf1,_0x53ec5e,_0x3ddc5b){const _0x5dc019=this['editor']['model']['schema'];let _0x4be763=_0x1bddf1;for(;_0x4e6793[_0x4be763]&&_0x4e6793[_0x4be763]['isAdded'];)_0x4be763++;let _0x2d1600=_0x3ddc5b;for(;_0x53ec5e[_0x2d1600]&&_0x53ec5e[_0x2d1600]['isRemoved'];)_0x2d1600++;_0x554a6a(_0x4e6793,_0x1bddf1,_0x4be763),_0x554a6a(_0x53ec5e,_0x3ddc5b,_0x2d1600);const _0x406877=_0x53ec5e['slice'](_0x3ddc5b,_0x2d1600)['concat'](_0x4e6793['slice'](_0x1bddf1,_0x4be763));return _0x406877['sort']((_0x5438b3,_0x2c43c8)=>_0x5438b3['side']!=_0x2c43c8['side']?_0x5438b3['side']-_0x2c43c8['side']:_0x5438b3['level']!=_0x2c43c8['level']?_0x5438b3['level']-_0x2c43c8['level']:_0x5438b3['distance']!=_0x2c43c8['distance']?_0x2c43c8['distance']-_0x5438b3['distance']:!!_0x5438b3['isAdded']!=!!_0x2c43c8['isAdded']?-0x1==_0x5438b3['side']||0x0==_0x5438b3['side']?_0x5438b3['isAdded']?-0x1:0x1:_0x5438b3['isAdded']?0x1:-0x1:_0x5438b3['index']-_0x2c43c8['index']),{'commonTape':_0x406877,'iEnd':_0x4be763,'jEnd':_0x2d1600};function _0x554a6a(_0xba7bc0,_0x43b3cc,_0x50cfc2){let _0x3db46d=-0x1,_0x4190ac=Number['POSITIVE_INFINITY'],_0x4e0b01=!0x0;for(let _0x44c9e6=_0x43b3cc;_0x44c9e6<_0x50cfc2;_0x44c9e6++)if(_0x5dc019['isInline'](_0xba7bc0[_0x44c9e6]['item'])||(_0x4e0b01=!0x1),_0xba7bc0[_0x44c9e6]['item']['startIndex']<_0x43b3cc&&(_0x3db46d=_0x44c9e6),_0xba7bc0[_0x44c9e6]['item']['endIndex']>=_0x50cfc2){_0x4190ac=_0x44c9e6;break;}_0x4e0b01&&(_0x3db46d=_0x50cfc2-0x1);for(let _0x4ed5a5=_0x43b3cc;_0x4ed5a5<_0x50cfc2;_0x4ed5a5++)_0xba7bc0[_0x4ed5a5]['side']=_0x4ed5a5<=_0x3db46d?-0x1:_0x4ed5a5<_0x4190ac?0x0:0x1,_0xba7bc0[_0x4ed5a5]['index']=_0x4ed5a5;let _0xc41509=0x0;for(let _0x72e716=_0x43b3cc;_0x72e716<=_0x3db46d;_0x72e716++)0x0==_0xba7bc0[_0x72e716]['distance']?_0xba7bc0[_0x72e716]['level']=_0xc41509:(_0xc41509++,_0xba7bc0[_0x72e716]['level']=_0xc41509,_0xc41509++);for(let _0x53ca28=_0x43b3cc;_0x53ca28<_0x50cfc2;_0x53ca28++)0x0==_0xba7bc0[_0x53ca28]['side']&&(_0xba7bc0[_0x53ca28]['level']=_0xc41509);_0xc41509=0x0;for(let _0x5f42c2=_0x50cfc2-0x1;_0x5f42c2>=_0x4190ac;_0x5f42c2--)0x0==_0xba7bc0[_0x5f42c2]['distance']?_0xba7bc0[_0x5f42c2]['level']=_0xc41509:(_0xc41509--,_0xba7bc0[_0x5f42c2]['level']=_0xc41509,_0xc41509--);}}['_fixObsoleteTags'](_0x24e4d9){const _0x504824=new Map(),_0x12c30f=this['editor']['model']['schema'];for(let _0x323784=0x1;_0x323784<_0x24e4d9['length'];_0x323784++){let _0x453bbe,_0x251e5b,_0x45044c;const _0x2d20ef=_0x24e4d9[_0x323784],_0x321542=_0x24e4d9[_0x323784-0x1];if('text'==_0x2d20ef['type'])continue;if(_0x2d20ef['type']!=_0x321542['type'])continue;if(!_0x12c30f['isBlock'](_0x321542['item'])||_0x12c30f['isLimit'](_0x321542['item']))continue;if(!_0x12c30f['isBlock'](_0x2d20ef['item'])||_0x12c30f['isLimit'](_0x2d20ef['item']))continue;if((_0x24e4d9[_0x323784]['isAdded']||_0x24e4d9[_0x323784]['isAddSuggestion'])&&_0x24e4d9[_0x323784-0x1]['isRemoved'])_0x453bbe=_0x24e4d9[_0x323784],_0x251e5b=_0x24e4d9[_0x323784-0x1],_0x45044c=_0x323784-0x1;else{if(!_0x24e4d9[_0x323784]['isRemoved']||!_0x24e4d9[_0x323784-0x1]['isAdded']&&!_0x24e4d9[_0x323784-0x1]['isAddSuggestion'])continue;_0x453bbe=_0x24e4d9[_0x323784-0x1],_0x251e5b=_0x24e4d9[_0x323784],_0x45044c=_0x323784;}const _0x388ef6=_0x453bbe['level']==_0x251e5b['level'],_0x310f65=Math['abs'](_0x453bbe['level'])<Math['abs'](_0x251e5b['level'])&&0x0==_0x251e5b['distance'];(_0x388ef6||_0x310f65)&&(_0x504824['set'](_0x251e5b['id'],_0x453bbe['id']),_0x24e4d9['splice'](_0x45044c,0x1),_0x323784--,_0x453bbe['isAdded']=!0x1);}for(let _0x19f375=0x0;_0x19f375<_0x24e4d9['length'];_0x19f375++)_0x504824['has'](_0x24e4d9[_0x19f375]['pairId'])&&(_0x24e4d9[_0x19f375]['pairId']=_0x504824['get'](_0x24e4d9[_0x19f375]['pairId']));}['_removeMissingPairs'](_0x330757){const _0x27c557=new Set(_0x330757['map'](_0x26abe=>_0x26abe['id']));for(let _0x5649ae=0x0;_0x5649ae<_0x330757['length'];_0x5649ae++)_0x27c557['has'](_0x330757[_0x5649ae]['pairId'])||0x0==_0x330757[_0x5649ae]['distance']||(_0x330757[_0x5649ae]['isIncorrect']=!0x0);return _0x330757['filter'](_0xd4c16f=>!_0xd4c16f['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3e2439){const _0x5440a3=new Set();for(let _0xe84227=0x0;_0xe84227<_0x3e2439['length'];_0xe84227++){if(_0x5440a3['has'](_0x3e2439[_0xe84227]['id'])&&_0x3e2439[_0xe84227]['isRemoved']&&(_0x3e2439[_0xe84227]['isIncorrect']=!0x0),_0x3e2439[_0xe84227]['isIncorrect'])continue;if(0x0==_0x3e2439[_0xe84227]['distance'])continue;if('elementStart'!=_0x3e2439[_0xe84227]['type'])continue;if(null==_0x3e2439[_0xe84227]['pairId'])continue;let _0x3f22b2=_0xe84227+0x1,_0x452639=0x0;for(;_0x3e2439[_0x3f22b2]['id']!=_0x3e2439[_0xe84227]['pairId'];)'elementStart'==_0x3e2439[_0x3f22b2]['type']?_0x452639++:'elementEnd'==_0x3e2439[_0x3f22b2]['type']&&_0x452639--,_0x3f22b2++;if(0x0!=_0x452639){if(_0x3e2439[_0xe84227]['isRemoved'])_0x3e2439[_0xe84227]['isIncorrect']=!0x0;else{for(;_0x3f22b2!=_0xe84227;)_0x3e2439[_0x3f22b2]['isRemoved']&&0x0!=_0x3e2439[_0x3f22b2]['distance']&&(_0x3e2439[_0x3f22b2]['isIncorrect']=!0x0,_0x5440a3['add'](_0x3e2439[_0x3f22b2]['pairId'])),_0x3f22b2--;}}}return _0x3e2439['filter'](_0x390a59=>!_0x390a59['isIncorrect']);}['_removeUnsupportedChanges'](_0xb7a354){const _0x2998ce=this['editor']['model']['schema'];for(let _0x401d7e=0x0;_0x401d7e<_0xb7a354['length'];_0x401d7e++){if(!(_0xb7a354[_0x401d7e]['isAdded']||_0xb7a354[_0x401d7e]['isAddSuggestion']||_0xb7a354[_0x401d7e]['isRemoved']||_0xb7a354[_0x401d7e]['isRemoveSuggestion']))continue;if(0x0==_0xb7a354[_0x401d7e]['distance'])continue;const _0x441126=_0xb7a354[_0x401d7e]['item'];_0x2998ce['isBlock'](_0x441126)||_0x2998ce['isLimit'](_0x441126)||(_0xb7a354[_0x401d7e]['isAdded']&&delete _0xb7a354[_0x401d7e]['isAdded'],_0xb7a354[_0x401d7e]['isAddSuggestion']&&delete _0xb7a354[_0x401d7e]['isAddSuggestion'],_0xb7a354[_0x401d7e]['isRemoveSuggestion']&&delete _0xb7a354[_0x401d7e]['isRemoveSuggestion'],_0xb7a354[_0x401d7e]['isRemoved']&&(_0xb7a354[_0x401d7e]['isIncorrect']=!0x0));}return _0xb7a354['filter'](_0x47a8d3=>!_0x47a8d3['isIncorrect']);}['_makeModelFromTape'](_0x4f12e0,_0x3020b8,_0x108e60){const _0x365750=new _0x2f3b68(),_0xdd6144=[],_0x1bd141=new Map(),_0x452dcc=this['editor']['model'],_0x201c62=_0x452dcc['schema'],_0x587c78=[_0x365750],_0x22b09f={},_0x471d59={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x222c5=null;const _0xb2db00=[0x0];for(let _0x2ebde7=0x0;_0x2ebde7<_0x4f12e0['length'];_0x2ebde7++)if('elementStart'===_0x4f12e0[_0x2ebde7]['type']){_0x4f12e0[_0x2ebde7]['previousPosition']=_0x452dcc['createPositionFromPath'](_0x365750,_0xb2db00);const _0x4e3c67=new _0x16f0c7(_0x4f12e0[_0x2ebde7]['item']['name'],_0x4f12e0[_0x2ebde7]['item']['getAttributes']());_0x587c78[0x0]['_appendChild'](_0x4e3c67),_0xb2db00['push'](0x0),_0x587c78['unshift'](_0x4e3c67),_0x4f12e0[_0x2ebde7]['nextPosition']=_0x452dcc['createPositionFromPath'](_0x365750,_0xb2db00);}else'elementEnd'===_0x4f12e0[_0x2ebde7]['type']?(_0x587c78['shift'](),_0x4f12e0[_0x2ebde7]['previousPosition']=_0x452dcc['createPositionFromPath'](_0x365750,_0xb2db00),_0xb2db00['pop'](),_0xb2db00[_0xb2db00['length']-0x1]++,_0x4f12e0[_0x2ebde7]['nextPosition']=_0x452dcc['createPositionFromPath'](_0x365750,_0xb2db00)):(_0x4f12e0[_0x2ebde7]['previousPosition']=_0x452dcc['createPositionFromPath'](_0x365750,_0xb2db00),_0x222c5?_0x222c5['_data']+=_0x4f12e0[_0x2ebde7]['item']['data']:_0x222c5=new _0x5f2ff2(_0x4f12e0[_0x2ebde7]['item']['data'],_0x4f12e0[_0x2ebde7]['item']['getAttributes']()),_0x4f12e0[_0x2ebde7+0x1]&&'text'===_0x4f12e0[_0x2ebde7+0x1]['type']&&_0x4dc671(_0x222c5,_0x4f12e0[_0x2ebde7+0x1]['item'])||(_0x587c78[0x0]['_appendChild'](_0x222c5),_0x222c5=null),_0xb2db00[_0xb2db00['length']-0x1]+=_0x4f12e0[_0x2ebde7]['item']['offsetSize'],_0x4f12e0[_0x2ebde7]['nextPosition']=_0x452dcc['createPositionFromPath'](_0x365750,_0xb2db00));for(let _0x420930=0x0;_0x420930<_0x4f12e0['length'];_0x420930++){const _0x4c5011=_0x4f12e0[_0x420930]['previousPosition'],_0x2a00c2=_0x4f12e0[_0x420930]['nextPosition'];for(const _0x402f7f of _0x4f12e0[_0x420930]['markersStart'])_0x1bd141['set'](_0x402f7f,{'start':_0x4c5011,'end':null});_0x52fa25('isRemoveSuggestion',_0x420930,_0x4c5011,_0x2a00c2),_0x52fa25('isAddSuggestion',_0x420930,_0x4c5011,_0x2a00c2),_0x52fa25('isRemoved',_0x420930,_0x4c5011,_0x2a00c2),_0x52fa25('isAdded',_0x420930,_0x4c5011,_0x2a00c2);for(const _0x1eed67 of _0x4f12e0[_0x420930]['markersEnd']){const _0x4baf2d=_0x1bd141['get'](_0x1eed67);_0x4baf2d?_0x4baf2d['end']=_0x2a00c2:_0x1bd141['set'](_0x1eed67,{'start':_0x2a00c2,'end':_0x2a00c2});}}for(const [_0x13b02e,_0xcf0a06]of _0x1bd141){const _0x2fc344=this['editor']['model']['createRange'](_0xcf0a06['start'],_0xcf0a06['end']);_0x365750['markers']['set'](_0x13b02e,_0x2fc344);}return _0xdd6144['sort']((_0x2ed6ff,_0x50a896)=>{const _0x3bd5da=_0x365750['markers']['get']('revision:'+_0x2ed6ff['id']),_0x1d8838=_0x365750['markers']['get']('revision:'+_0x50a896['id']);return _0x3bd5da['start']['isBefore'](_0x1d8838['start'])?-0x1:_0x3bd5da['start']['isAfter'](_0x1d8838['start'])?0x1:_0x3bd5da['end']['isBefore'](_0x1d8838['end'])?-0x1:_0x3bd5da['end']['isAfter'](_0x1d8838['end'])?0x1:'add'===_0x2ed6ff['type']?-0x1:0x1;}),{'root':_0x365750,'changes':_0xdd6144};function _0x52fa25(_0x840776,_0x541671,_0x51a359,_0x16525d){const _0x307c75=!!_0x4f12e0[_0x541671][_0x840776],_0x585b7a=_0x307c75?_0x4f12e0[_0x541671][_0x840776]['userId']:null,_0xf29b0a=_0x541671===_0x4f12e0['length']-0x1,_0x42d130=_0x471d59[_0x840776][0x0],_0x70ea5d=_0x201c62['isObject'](_0x4f12e0[_0x541671]['item']);!_0x22b09f[_0x840776]&&_0x307c75?_0x22b09f[_0x840776]={'start':_0x51a359,'tapeItem':_0x4f12e0[_0x541671],'userId':_0x585b7a,'type':_0x840776}:_0x22b09f[_0x840776]&&!_0x307c75?(_0x22b09f[_0x840776]['end']=_0x51a359,_0x15f760(_0x22b09f[_0x840776]),_0x22b09f[_0x840776]=null):_0x22b09f[_0x840776]&&_0x307c75&&_0x22b09f[_0x840776]['userId']!==_0x585b7a&&(_0x22b09f[_0x840776]['end']=_0x51a359,_0x42d130&&_0x42d130['userId']===_0x22b09f[_0x840776]['userId']||_0x15f760(_0x22b09f[_0x840776]),_0x22b09f[_0x840776]={'start':_0x51a359,'tapeItem':_0x4f12e0[_0x541671],'userId':_0x585b7a,'type':_0x840776}),_0x22b09f[_0x840776]&&_0x70ea5d&&('elementStart'!==_0x4f12e0[_0x541671]['type']||_0x42d130&&_0x42d130['userId']===_0x585b7a||_0x471d59[_0x840776]['unshift']({'userId':_0x585b7a,'object':_0x4f12e0[_0x541671]['item'],'change':_0x22b09f[_0x840776]}),'elementEnd'===_0x4f12e0[_0x541671]['type']&&_0x42d130&&_0x42d130['object']===_0x4f12e0[_0x541671]['item']&&(_0x471d59[_0x840776]['shift'](),_0x22b09f[_0x840776]=_0x42d130['change'])),_0x22b09f[_0x840776]&&_0xf29b0a&&(_0x22b09f[_0x840776]['end']=_0x16525d,_0x15f760(_0x22b09f[_0x840776]),_0x22b09f[_0x840776]=null);}function _0x15f760({start:_0x8a84c7,end:_0x1cd39c,tapeItem:_0x8c9a46,userId:_0x14c8ef,type:_0x2983d0}){const _0x5617be=_0x8c9a46['item'],_0x3e6f77=_0x452dcc['schema']['isBlock'](_0x5617be)&&!_0x452dcc['schema']['isLimit'](_0x5617be),_0x2a9ab8=_0x8a84c7['nodeAfter']==_0x1cd39c['parent']&&_0x1cd39c['isAtStart'];if(_0x3e6f77&&_0x2a9ab8)return;const _0x388240=_0x452dcc['createRange'](_0x8a84c7,_0x1cd39c),_0xbc010b=_0x3020b8['get'](_0x14c8ef),_0x39d840=new G({'author':_0xbc010b,'type':'isAdded'==_0x2983d0||'isAddSuggestion'==_0x2983d0?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2983d0||'isRemoveSuggestion'==_0x2983d0},'createdAt':new Date(),'rootName':_0x108e60});_0xdd6144['push'](_0x39d840),_0x365750['markers']['set']('revision:'+_0x39d840['id'],_0x388240);}function _0x4dc671(_0x5d3c2b,_0x56f0d1){const _0xf29b14=_0x5d3c2b['getAttributes'](),_0x223ba3=_0x56f0d1['getAttributes']();for(const _0x3396e9 of _0xf29b14){if(_0x3396e9[0x1]!==_0x56f0d1['getAttribute'](_0x3396e9[0x0]))return!0x1;_0x223ba3['next']();}return _0x223ba3['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4c2506=>{const _0x5b3223=_0x4c2506['markerName']['split'](':')[0x1],_0x1d1b26=this['_getChangeFromId'](_0x5b3223);if(!_0x1d1b26)return null;const _0x11212f='add'==_0x1d1b26['type']?'insertion':'deletion',_0x17b91d=['ck-suggestion-marker','ck-suggestion-marker-'+_0x11212f];return _0x1d1b26['data']['isSuggestion']&&_0x17b91d['push']('ck-suggestion-marker-'+_0x11212f+'-new'),this['activeChange']==_0x1d1b26&&_0x17b91d['push']('ck-suggestion-marker--active'),{'classes':_0x17b91d,'attributes':{'data-change-id':_0x5b3223}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x19d920=>{_0x19d920['on']('element:pre',(_0x2d3fad,_0x1c96c7,_0x1f1e79)=>{const _0x1c9543=_0x1c96c7['viewItem']['getChild'](0x0);if(!_0x1c9543||!_0x1c9543['is']('element','code'))return;if(!_0x1f1e79['consumable']['consume'](_0x1c9543,{'attributes':['vid_start','vid_end']}))return;const _0x42bf4f=_0x1c96c7['modelRange']['start']['nodeAfter'];_0x1f1e79['writer']['setAttribute']('vid_start',_0x1c9543['getAttribute']('vid_start'),_0x42bf4f),_0x1f1e79['writer']['setAttribute']('vid_end',_0x1c9543['getAttribute']('vid_end'),_0x42bf4f);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4a689c=>{_0x4a689c['on']('element',(_0x56f495,_0x49b7c6,_0x16e6de)=>{if(!_0x16e6de['consumable']['consume'](_0x49b7c6['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x49b7c6['modelRange']['isCollapsed'])return;const _0x3a05d1=_0x49b7c6['modelRange']['start']['nodeAfter'];_0x3a05d1['hasAttribute']('vid_start')||_0x3a05d1['hasAttribute']('vid')||(_0x16e6de['writer']['setAttribute']('vid_start',_0x49b7c6['viewItem']['getAttribute']('vid_start'),_0x3a05d1),_0x16e6de['writer']['setAttribute']('vid_end',_0x49b7c6['viewItem']['getAttribute']('vid_end'),_0x3a05d1));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1ab621=>_0x1ab621['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x146026,[,_0x243b57])=>{['vid_start','vid_end','vid']['includes'](_0x243b57)&&(_0x146026['return']=!0x0,_0x146026['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xad95bd=>{_0xad95bd['on']('attribute:vid',(_0x266fe2,_0x5c21cc,_0x118d32)=>{if('\x20'!=_0x5c21cc['item']['data']||_0x5c21cc['item']['parent']['maxOffset']>0x1)return;if(!_0x118d32['consumable']['consume'](_0x5c21cc['item'],_0x266fe2['name']))return;const _0x492876=_0x118d32['writer'],_0x2db1c1=_0x118d32['mapper']['toViewRange'](_0x5c21cc['range']);_0x492876['wrap'](_0x2db1c1,_0x492876['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x19a8d0){const _0x1a61b3=_0x19a8d0['plugins']['get']('RevisionViewer');return(_0x52d2a6,_0x101135,_0x463a36)=>{const _0x21c147=_0x101135['markerName']['split'](':')[0x1],_0x62a3a0=_0x1a61b3['_getChangeFromId'](_0x21c147);if(!_0x62a3a0)return null;const _0x361a0e='add'==_0x62a3a0['type']?'split':'merge';if(!_0x463a36['consumable']['test'](_0x101135['markerRange'],_0x52d2a6['name']))return;const _0x26ad39=_0x101135['markerRange']['getWalker'](),_0x1a1a6d=_0x101135['markerRange']['start'],_0x5e7396=_0x19a8d0['model']['schema'];let _0x561713=null,_0x37b819=null,_0x373fdf=!0x1,_0x4186e6=!0x1;for(const _0x34ae8b of _0x26ad39){const _0x4b0480=_0x34ae8b['item'];_0x373fdf=_0x373fdf||_0x5e7396['isContent'](_0x4b0480);const _0x44aff1=_0x463a36['mapper']['toViewElement'](_0x4b0480);if(_0x44aff1&&_0x44aff1['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x34ae8b['type']&&(_0x5e7396['isBlock'](_0x4b0480)&&!_0x5e7396['isLimit'](_0x4b0480)&&(_0x4b0480['nextSibling']||_0x1a1a6d['isAtEnd']?_0x561713&&_0x561713['parent']==_0x4b0480||(_0x561713=_0x4b0480,_0x1b5fb1(_0x34ae8b['previousPosition']),_0x4186e6=!0x0):_0x37b819=_0x37b819||_0x34ae8b['previousPosition']));}function _0x1b5fb1(_0x2cad7d){const _0x29c4d5=_0x463a36['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x361a0e}),_0x1186e5=_0x463a36['mapper']['toViewPosition'](_0x2cad7d);_0x62a3a0['data']['isSuggestion']&&_0x463a36['writer']['addClass']('ck-suggestion-marker-'+_0x361a0e+'-new',_0x29c4d5),_0x1a61b3['activeChange']==_0x62a3a0&&_0x463a36['writer']['addClass']('ck-suggestion-marker--active',_0x29c4d5),_0x463a36['writer']['insert'](_0x1186e5,_0x29c4d5),_0x463a36['mapper']['bindElementToMarker'](_0x29c4d5,_0x101135['markerName']);}_0x373fdf||_0x4186e6||!_0x37b819||_0x1b5fb1(_0x37b819);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3e6c8b,_0x2b86fc,_0x217f98)=>{const _0x237068=_0x217f98['mapper']['markerNameToElements'](_0x2b86fc['markerName']);if(_0x237068){for(const _0x2ac595 of _0x237068)(_0x2ac595['hasClass']('ck-suggestion-marker-split')||_0x2ac595['hasClass']('ck-suggestion-marker-merge'))&&(_0x217f98['mapper']['unbindElementFromMarkerName'](_0x2ac595,_0x2b86fc['markerName']),_0x217f98['writer']['remove'](_0x2ac595));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x54654f,_0x2147fd,_0x36743a)=>{const _0x5ad464=_0x2147fd['markerName']['split'](':')[0x1],_0x83b666=this['_getChangeFromId'](_0x5ad464);if(!_0x83b666)return null;const _0x4592f3='add'==_0x83b666['type']?'split':'merge';if(_0x36743a['consumable']['test'](_0x2147fd['markerRange'],_0x54654f['name']))for(const _0x4ca736 of _0x2147fd['markerRange']['getItems']()){if(!_0x4ca736['is']('element','softBreak'))continue;const _0x4ea72=_0x36743a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4592f3}),_0x795e56=_0x36743a['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4ca736));_0x83b666['data']['isSuggestion']&&_0x36743a['writer']['addClass']('ck-suggestion-marker-'+_0x4592f3+'-new',_0x4ea72),this['activeChange']==_0x83b666&&_0x36743a['writer']['addClass']('ck-suggestion-marker--active',_0x4ea72),_0x36743a['writer']['insert'](_0x795e56,_0x4ea72),_0x36743a['mapper']['bindElementToMarker'](_0x4ea72,_0x2147fd['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2b0b25=>{for(const _0x1359d3 of this['editor']['model']['document']['getRootNames']()){const _0x533fe1=this['editor']['model']['document']['getRoot'](_0x1359d3),_0x13a2e9=this['editor']['editing']['view']['document']['getRoot'](_0x1359d3);if(_0x13a2e9){const _0x3ed3d2=_0x533fe1['getAttribute']('revisionHistoryAttachChange');if(_0x2b0b25['removeAttribute']('data-change-id',_0x13a2e9),_0x2b0b25['removeClass']('ck-revision-history-root-add',_0x13a2e9),_0x2b0b25['removeClass']('ck-revision-history-root-remove',_0x13a2e9),_0x2b0b25['removeClass']('ck-revision-history-root--active',_0x13a2e9),_0x3ed3d2){const _0x3e8a74=this['_getChangeFromId'](_0x3ed3d2);if(!_0x3e8a74)return null;_0x2b0b25['setAttribute']('data-change-id',_0x3ed3d2,_0x13a2e9),_0x2b0b25['addClass']('ck-revision-history-root-'+_0x3e8a74['type'],_0x13a2e9),this['activeChange']==_0x3e8a74&&_0x2b0b25['addClass']('ck-revision-history-root--active',_0x13a2e9);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x31691d=>'revision-comment:'+_0x31691d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x63900e=>'revision-suggestion:'+_0x63900e,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x275e5a=>({'name':'suggestion:'+_0x275e5a,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x37164b=>{const _0x37d8e9=_0x37164b['markerName']['split'](':')[0x1];return'insertion'!=_0x37d8e9&&'deletion'!=_0x37d8e9?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x37d8e9]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x380676,_0x8f83ab,_0x5c8910)=>{const _0xfd61e7=_0x5c8910['mapper']['markerNameToElements'](_0x8f83ab['markerName']);if(_0xfd61e7){for(const _0x2a45f2 of _0xfd61e7)_0x2a45f2['is']('uiElement')&&(_0x5c8910['mapper']['unbindElementFromMarkerName'](_0x2a45f2,_0x8f83ab['markerName']),_0x5c8910['writer']['remove'](_0x2a45f2));}},{'priority':'high'});}['_getChangeFromId'](_0x3e403b){return this['_changeIdToChange']['get'](_0x3e403b);}['_getViewForChange'](_0x324fc6){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x324fc6),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5a0eaa,_0x2a71e9,_0xa31409,_0x2cd91e)=>{_0x2cd91e&&this['_balloon']['remove'](_0x2cd91e),_0xa31409&&(this['_balloon']['add']({'view':_0xa31409,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5f250c=this['editor']['editing'],_0xf6fd17=this['_getChangeFromId'](_0xa31409['changeId']);let _0x215a83;if(_0xf6fd17['data']['isOnRoot']){const _0x591ad5=_0x5f250c['view']['getDomRoot'](_0xf6fd17['rootName']);_0x215a83=Array['from'](_0x591ad5['getClientRects']());}else{const _0x26a7f9=this['editor']['model']['markers']['get']('revision:'+_0xa31409['changeId']);_0x215a83=Array['from'](_0x5f250c['mapper']['markerNameToElements'](_0x26a7f9['name']))['map'](_0x4e7070=>_0x5f250c['view']['domConverter']['mapViewToDom'](_0x4e7070))['map'](_0x45e155=>Array['from'](_0x45e155['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x215a83[0x0];return _0x215a83['find'](_0x3967fd=>_0x3967fd['top']-0x3<=this['_activeViewTarget']['y']&&_0x3967fd['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3967fd['left']-0x3<=this['_activeViewTarget']['x']&&_0x3967fd['right']+0x3>=this['_activeViewTarget']['x'])||_0x215a83[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x60bf15,_0x4f6d5f,_0x5127e5,_0xa67808)=>{this['activeView']=_0x5127e5?this['_getViewForChange'](_0x5127e5):null,this['editor']['model']['change'](()=>{const _0x2bacbc=this['editor']['editing'];_0xa67808&&(_0xa67808['data']['isOnRoot']?_0x2bacbc['view']['change'](_0x3f84de=>{_0x3f84de['removeClass']('ck-revision-history-root--active',_0x2bacbc['view']['document']['getRoot'](_0xa67808['rootName']));}):_0x2bacbc['reconvertMarker']('revision:'+_0xa67808['id'])),_0x5127e5&&(_0x5127e5['data']['isOnRoot']?_0x2bacbc['view']['change'](_0x58e627=>{_0x58e627['addClass']('ck-revision-history-root--active',_0x2bacbc['view']['document']['getRoot'](_0x5127e5['rootName']));}):_0x2bacbc['reconvertMarker']('revision:'+_0x5127e5['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x5f1b59,_0x13607f)=>{if(this['activeChange'])return;const _0x3ad1cd=this['_findChangeIdFromDomTarget'](_0x13607f['target']),_0x1454f9=this['_changeIdToChange']['get'](_0x3ad1cd);_0x1454f9?(this['_activeViewTarget']={'x':_0x13607f['domEvent']['x'],'y':_0x13607f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1454f9)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x34a078,_0x5297e3)=>{const _0xb1df21=this['_findChangeIdFromDomTarget'](_0x5297e3['target']),_0x521c8b=this['_changeIdToChange']['get'](_0xb1df21);_0x521c8b?(this['_activeViewTarget']={'x':_0x5297e3['domEvent']['x'],'y':_0x5297e3['domEvent']['y']},_0x521c8b===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x521c8b):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5738ba){do{const _0x373151=_0x5738ba['getAttribute']('data-change-id');if(_0x373151)return _0x373151;_0x5738ba=_0x5738ba['parent'];}while(_0x5738ba);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x254808=>{for(const _0x8ae105 of this['editor']['model']['markers'])_0x254808['removeMarker'](_0x8ae105);});}}function Q(_0xdd8897,_0x2c90eb){return(_0x2b6ede,_0x3cc7aa,_0x2736cd)=>{if(!_0x2736cd['consumable']['test'](_0x3cc7aa['markerRange'],_0x2b6ede['name']))return;const _0x5b2d5d=_0x3cc7aa['markerRange']['getWalker'](),_0x582ab7=_0x3cc7aa['markerRange']['start'],_0x2b592f=_0xdd8897['model']['schema'];let _0x457b61=null,_0x20ee57=null,_0x570e0c=!0x1,_0x3adcb9=!0x1;for(const _0x74162a of _0x5b2d5d){const _0x66af52=_0x74162a['item'];_0x570e0c=_0x570e0c||_0x2b592f['isContent'](_0x66af52);const _0xb2083d=_0x2736cd['mapper']['toViewElement'](_0x66af52);if(_0xb2083d&&_0xb2083d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x74162a['type']&&(_0x2b592f['isBlock'](_0x66af52)&&!_0x2b592f['isLimit'](_0x66af52)&&(_0x66af52['nextSibling']||_0x582ab7['isAtEnd']?_0x457b61&&_0x457b61['parent']==_0x66af52||(_0x457b61=_0x66af52,_0x4a9fcf(_0x74162a['previousPosition']),_0x3adcb9=!0x0):_0x20ee57=_0x20ee57||_0x74162a['previousPosition']));}function _0x4a9fcf(_0xb1d9be){const _0x898e93=_0x2736cd['mapper']['toViewPosition'](_0xb1d9be),_0x337c9b=_0x2736cd['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2c90eb});_0x2736cd['writer']['insert'](_0x898e93,_0x337c9b),_0x2736cd['mapper']['bindElementToMarker'](_0x337c9b,_0x3cc7aa['markerName']);}_0x570e0c||_0x3adcb9||!_0x20ee57||_0x4a9fcf(_0x20ee57);};}class nt extends _0xb5a33c{constructor(_0x3ef6a0){super(_0x3ef6a0);const _0x1d85da=_0x3ef6a0['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x1d85da,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d85da,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x431b3d=this['editor'],_0x3c4705=_0x431b3d['plugins']['get'](u),_0x2acf0e=_0x3c4705['isReady']?_0x3c4705['diff']['newRevisionId']:null;_0x431b3d['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2acf0e);}['refresh'](){const {isReady:_0x2e3d27,isEnabled:_0x3f81a3,repository:_0x143df9,diff:_0x265ed6}=this['editor']['plugins']['get'](u),_0x8db2aa=_0x265ed6&&_0x143df9['getLaterVisibleRevision'](_0x265ed6['newRevisionId']);this['isEnabled']=_0x2e3d27&&_0x3f81a3&&Boolean(_0x8db2aa);}}class rt extends _0xb5a33c{['_step'];constructor(_0x428254,{direction:_0x92e94e}){super(_0x428254);const _0x125fe6=_0x428254['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x92e94e?0x1:-0x1,this['listenTo'](_0x125fe6,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x125fe6,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x125fe6,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x21c0a0=this['editor'],_0x539964=_0x21c0a0['plugins']['get'](u),{isNavigationMode:_0x1b6d77,currentChangeNumber:_0x1ec866}=_0x539964;let _0x155584;if(_0x539964['activeChange']=_0x1b6d77?_0x539964['diff']['changes']['get'](_0x1ec866+this['_step']):_0x539964['diff']['changes']['first'],_0x539964['activeChange']['data']['isOnRoot'])_0x155584=_0x21c0a0['editing']['view']['getDomRoot'](_0x539964['activeChange']['rootName']);else{const _0x22c298=_0x21c0a0['model']['markers']['get']('revision:'+_0x539964['activeChange']['id']);_0x155584=_0x3fd798(_0x21c0a0['editing'],_0x22c298);}_0x3d2b4e({'target':_0x155584,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x3e2790,currentChangeNumber:_0x55236a,numberOfChanges:_0x4d9d78,isReady:_0x1701a0,isEnabled:_0x300106}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x300106&&_0x1701a0&&_0x4d9d78)&&(!_0x3e2790||(0x1===this['_step']?_0x55236a<_0x4d9d78-0x1:_0x55236a>0x0));}}class Ri extends _0x1f8770{constructor(_0x3a1633){super(_0x3a1633);const _0xa96703=this['bindTemplate'],_0x570c69=new _0x29aa73(_0x3a1633),_0x377a75=new _0x29aa73(_0x3a1633);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',(_0x8e37c9,_0x3e6624)=>_0x8e37c9&&_0x3e6624>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x7c89a,_0x3431e6,_0x2fdfad,_0x346761)=>{if(!_0x7c89a)return m(_0x3a1633,'Loading...');if(!_0x2fdfad)return m(_0x3a1633,'No\x20changes');const _0x631ce2=m(_0x3a1633,'NUMBER_OF_CHANGES',_0x2fdfad);return _0x346761?m(_0x3a1633,'X_OF_Y_CHANGES',[_0x3431e6+0x1,_0x2fdfad]):_0x631ce2;}),_0x570c69['set']({'label':m(_0x3a1633,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x518d3d}),_0x377a75['set']({'label':m(_0x3a1633,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3c5bb8}),_0x570c69['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x377a75['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x570c69['on']('execute',()=>this['fire']('execute','backward')),_0x377a75['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',_0xa96703['if']('_isStatusLabelVisible','ck-hidden',_0x12500d=>!_0x12500d)]},'children':[{'text':_0xa96703['to']('isNavigationMode',_0x1439fd=>_0x1439fd?m(_0x3a1633,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x3a1633,'Total')+':\x20')}]},{'text':_0xa96703['to']('_statusText')}]},new _0x2bbfd2(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x570c69,_0x377a75]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x1364e3{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x53df8d=this['editor']['editing']['view'];_0x53df8d['change'](_0x2569b1=>{for(const _0x32851f of _0x53df8d['document']['roots'])_0x2569b1['addClass'](ge,_0x32851f);});}['hide'](){const _0x584827=this['editor']['editing']['view'];_0x584827['change'](_0x17765a=>{for(const _0x1a0e66 of _0x584827['document']['roots'])_0x17765a['removeClass'](ge,_0x1a0e66);});}}class v extends _0x1364e3{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,ji];}['init'](){const _0x4a09f6=this['editor'],_0x2a29e5=_0x4a09f6['plugins']['get'](u),_0xac0151=_0x4a09f6['plugins']['get'](ji);_0x4a09f6['ui']['componentFactory']['add']('exitToEditing',_0x5afb24=>{const _0xb738d7=new _0x29aa73(_0x5afb24);return _0xb738d7['set']({'label':m(_0x5afb24,'Back\x20to\x20editing'),'icon':_0x1aa720,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xb738d7,'execute',()=>{_0x4a09f6['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xb738d7;}),_0x4a09f6['ui']['componentFactory']['add']('restoreRevision',_0x347388=>{const _0x2728a2=new _0x29aa73(_0x347388);return _0x2728a2['set']({'label':m(_0x347388,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2728a2['bind']('isEnabled')['to'](_0x4a09f6['commands']['get']('restoreRevision')),this['listenTo'](_0x2728a2,'execute',()=>_0x4a09f6['execute']('restoreRevision')),_0x2728a2;}),_0x4a09f6['ui']['componentFactory']['add']('changesNavigation',_0x309161=>{const _0x9d8498=new Ri(_0x309161),_0x24e5c4=_0x4a09f6['commands']['get']('showPreviousChange'),_0xb55db9=_0x4a09f6['commands']['get']('showNextChange');return _0x9d8498['bind']('isBackwardNavigationEnabled')['to'](_0x24e5c4,'isEnabled'),_0x9d8498['bind']('isForwardNavigationEnabled')['to'](_0xb55db9,'isEnabled'),_0x9d8498['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2a29e5),this['listenTo'](_0x9d8498,'execute',(_0x7349ff,_0x4c969d)=>{_0x4a09f6['execute']('forward'===_0x4c969d?'showNextChange':'showPreviousChange');}),_0x9d8498;}),_0xac0151['show'](),_0x2a29e5['on']('change:isReady',(_0x5a268b,_0x532024,_0x20381d)=>{_0x20381d?_0xac0151['hide']():_0xac0151['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x5b460b,_0x1b9068){super(_0x5b460b,_0x1b9068);const _0x3f8698=this['bindTemplate'];this['set']({'label':m(_0x5b460b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x5b460b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3f8698['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x44f689=this['fieldView']['element'];this['_tooltipString']=_0x44f689['scrollWidth']>_0x44f689['clientWidth']&&_0x44f689['value']||'';}}class ni extends _0x1f8770{constructor(_0x9371fc,_0x1f161b,_0x5b4156){super(_0x9371fc);const _0x2dc84b=new _0x34cdce();_0x2dc84b['set']({'content':_0x2f25e7,'viewBox':'0\x200\x2011\x2010'});const _0x16150a=['ck','ck-revision-history-sidebar__revision-author'];_0x5b4156&&_0x16150a['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5e4e69=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x9371fc,_0x5b4156?'Revision\x20creator':'Revision\x20author')},'children':[_0x2dc84b,_0x1f161b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x16150a},'children':_0x5e4e69});}}function ai(_0x1e044f,_0x234c7a){const _0x5d098e=_0x1e044f['bindTemplate'],_0x40db8f=_0x1e044f['locale'],_0x22795f=_0x487766(_0x40db8f);_0x22795f['panelPosition']='sw';const _0x3d08f5=function(_0x20d86d,_0x139040){const _0x55bf0e=function(_0x36a41e,_0x1b1e80){const _0x73ee53=_0x36a41e['locale'],_0xad78eb={'Compare\x20against\x20selected':m(_0x73ee53,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x73ee53,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x73ee53,'Restore\x20this\x20revision')};return _0x1b1e80['map'](_0x323246=>{const _0x41c6c9=_0xad78eb[_0x323246['name']];return _0x41c6c9&&_0x41c6c9!==_0x323246['name']&&(_0x323246['name']=_0x41c6c9),_0x323246;});}(_0x20d86d,_0x139040),_0x5bb607=new _0x251a29();for(const _0x448090 of _0x55bf0e){const _0x48d1c4={'type':'button','model':new to({'label':_0x448090['name'],'class':_0x448090['class'],'withText':!0x0,'role':'menuitem','_action':_0x448090['action']})};_0x48d1c4['model']['bind']('isEnabled')['to'](_0x20d86d,'isActionsDropdownOpen',_0x4c2414=>'function'!=typeof _0x448090['isEnabled']||(!_0x4c2414||_0x448090['isEnabled'](_0x20d86d))),_0x5bb607['add'](_0x48d1c4);}return _0x5bb607;}(_0x1e044f,_0x234c7a);return _0x1e044f['bind']('isActionsDropdownOpen')['to'](_0x22795f,'isOpen'),_0x22795f['buttonView']['set']({'label':m(_0x40db8f,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x30c92e}),_0x22795f['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5d098e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5d098e['to'](_0x21c049=>_0x21c049['stopPropagation']())}}),_0x22795f['on']('execute',_0x4895fb=>{_0x1e044f['isReady']&&'function'==typeof _0x4895fb['source']['_action']&&_0x4895fb['source']['_action'](_0x1e044f);}),_0x46e463(_0x22795f,_0x3d08f5,{'role':'menu'}),_0x22795f['listenTo'](_0x1e044f,'change:isActionsDropdownOpen',(_0x4cfabf,_0x102c51,_0x142ced)=>{if(_0x142ced)for(const _0x8836aa of _0x22795f['listView']['items']){const _0x1429ca=_0x8836aa['children']['first'],_0x6fde8c=_0x234c7a['find'](_0x5e2c79=>_0x5e2c79['action']===_0x1429ca['_action'])['isVisible'];_0x8836aa['isVisible']=void 0x0===_0x6fde8c||_0x6fde8c(_0x1e044f);}}),_0x22795f;}class vi extends/* #__PURE__ -- @preserve */
27
- _0x3a3f2(_0x1f8770){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x581ae3,_0x35b003,_0x4a1b4b,_0x369751){super(_0x581ae3);const _0x1f545c=this['bindTemplate'],_0x29d035=function(_0x15fff0,_0x19c7bd){const _0x2f431e=Array['from'](_0x19c7bd['authors'])['filter'](_0x12f0bf=>_0x12f0bf!=_0x19c7bd['creator']);return _0x19c7bd['creator']&&_0x2f431e['unshift'](_0x19c7bd['creator']),_0x2f431e['map'](_0x4d2216=>new ni(_0x15fff0,_0x4d2216,_0x4d2216==_0x19c7bd['creator']));}(_0x581ae3,_0x35b003);this['id']=_0x35b003['id'],this['_revision']=_0x35b003,this['_requireRevisionName']=_0x369751,this['bind']('name','createdAt')['to'](_0x35b003),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3eba3a=>{return _0x47c847=_0x581ae3['uiLanguage'],(_0x4c96ce=_0x3eba3a)['toLocaleDateString'](_0x47c847,{'month':'long','day':'numeric'})+',\x20'+_0x4c96ce['toLocaleTimeString'](_0x47c847,{'hour':'numeric','minute':'numeric'});var _0x47c847,_0x4c96ce;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x581ae3,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1f009d=>_0x1f009d||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x47ca9a,_0x24077d)=>_0x47ca9a&&_0x24077d),this['revisionActionsView']=_0x4a1b4b&&_0x4a1b4b['length']?ai(this,_0x4a1b4b):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1f545c['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1f545c['if']('isEnabled','ck-disabled',_0x1ce2e6=>!_0x1ce2e6),_0x1f545c['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1f545c['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1f545c['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':_0x1f545c['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':_0x29d035}]},this['revisionActionsView']],'on':{'click':_0x1f545c['to'](_0x22e2f8=>{_0x22e2f8['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4a0227=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4a0227,'change',()=>{this['_requireRevisionName']&&!_0x4a0227['value']||this['fire']('setName',{'id':this['id'],'name':_0x4a0227['value']}),_0x4a0227['value']||(_0x4a0227['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function mi(_0x35441a,_0x3da6f4){const _0x108ba2=_0x226922['fromJSDate'](_0x35441a)['setLocale'](_0x3da6f4),_0x1f3206=_0x226922['local'](),_0x2a6574=_0x1f3206['minus']({'days':0x1})['startOf']('day');let _0x11d44a,_0x3e2464;return _0x108ba2['hasSame'](_0x1f3206,'day')?(_0x11d44a=_0x108ba2['startOf']('day')['toJSDate'](),_0x3e2464=_0x108ba2['toRelativeCalendar']()):_0x108ba2['hasSame'](_0x2a6574,'day')?(_0x11d44a=_0x2a6574['toJSDate'](),_0x3e2464=_0x108ba2['toRelativeCalendar']()):_0x108ba2['hasSame'](_0x1f3206,'week')?(_0x11d44a=_0x108ba2['startOf']('week')['toJSDate'](),_0x3e2464=_0x108ba2['weekdayLong']||''):_0x108ba2['hasSame'](_0x1f3206,'year')?(_0x11d44a=_0x108ba2['startOf']('month')['toJSDate'](),_0x3e2464=_0x108ba2['monthLong']||''):(_0x11d44a=_0x108ba2['startOf']('year')['toJSDate'](),_0x3e2464=String(_0x108ba2['year'])),{'startDate':_0x11d44a,'localizedPeriodName':_0x3e2464};}class li extends _0x1f8770{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x21eb3e,_0x33d108,_0x54c09b,_0x4272df){super(_0x21eb3e);const _0x20f6b0=mi(_0x33d108,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x33d108,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x54c09b,this['_requireRevisionName']=_0x4272df,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':_0x20f6b0}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x23a510){const _0x3a7de8=new vi(this['locale'],_0x23a510,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3a7de8);}['removeRevision'](_0x86bd85){const _0x4f6d9c=this['revisionViews']['find'](_0x5d2f2a=>_0x5d2f2a['id']===_0x86bd85['id']);this['revisionViews']['remove'](_0x4f6d9c);}}class bi extends _0x1f8770{constructor(_0x403fea){super(_0x403fea);const _0x5f4234=new _0x34cdce();_0x5f4234['content']=_0x259bca,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x5f4234,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x403fea,'Revision\x20history')]}]});}}class di extends _0x1f8770{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x8c7d45,_0x13902b,_0x4886c9,_0x3f42d5){super(_0x8c7d45);const _0x24e32a=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x13902b,this['_revisionActions']=_0x4886c9,this['_requireRevisionName']=_0x3f42d5,this['on']('select',(_0x279a0e,_0x341aa1)=>{this['fire']('revisionSelected',_0x341aa1);}),this['on']('setName',(_0x20f098,_0x3a789e)=>{this['fire']('revisionSetName',_0x3a789e);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new bi(_0x8c7d45),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x24e32a['if']('isEnabled','ck-disabled',_0x515d86=>!_0x515d86)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x16b825 of this['_revisions'])this['_addRevision'](_0x16b825);this['_revisions']['on']('add',(_0x3e37d6,_0x343e80)=>{this['_addRevision'](_0x343e80);}),this['_revisions']['on']('remove',(_0x4987e9,_0x5cfbd4)=>{this['_removeRevision'](_0x5cfbd4);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5a0155=>_0x5a0155['revisionViews']['map'](_0x529cce=>_0x529cce))['flat']();}['selectRevision'](_0x14b2d8){for(const _0x5c3192 of this['revisionViews'])_0x14b2d8&&_0x14b2d8['id']===_0x5c3192['id']?_0x5c3192['select']():_0x5c3192['deselect']();}['highlightRevisions'](_0xfe862a){for(const _0x3e9e4a of this['revisionViews'])_0xfe862a['some'](({id:_0x2ed703})=>_0x2ed703===_0x3e9e4a['id'])?_0x3e9e4a['highlight']():_0x3e9e4a['unhighlight']();}['_addRevision'](_0x35568f){const _0x137009=mi(_0x35568f['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x3809b9=this['timePeriodViews']['get'](0x0);_0x3809b9&&_0x3809b9['startDate']['getTime']()===_0x137009['getTime']()||(_0x3809b9=new li(this['locale'],_0x137009,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x3809b9)),_0x3809b9['addRevision'](_0x35568f);}['_removeRevision'](_0x4edb5a){const _0x244b33=mi(_0x4edb5a['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x244b33)['removeRevision'](_0x4edb5a);}['_getTimePeriodViewByStartDate'](_0x3c7e62){return this['timePeriodViews']['find'](_0x1e15ae=>_0x1e15ae['startDate']['getTime']()===_0x3c7e62['getTime']());}}class d extends _0x1364e3{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x2cbca0,uid as _0x31075e,Collection as _0x5731ed,logWarning as _0x728dc7,FocusTracker as _0x51ad5c,KeystrokeHandler as _0x137948,scrollViewportToShowTarget as _0x332252,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x383d8c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x24b057,set as _0x2c8de9,unset as _0x7585f2,isEqual as _0x553c5f}from'es-toolkit/compat';import{Plugin as _0x38f444,PendingActions as _0x9122e7,Command as _0x740a59,ElementApiMixin as _0x298957,Editor as _0x30b7bf}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3fbc11,getMarkerDomElement as _0x3b78d7,ConfirmMixin as _0x241b49,sanitizeEditorConfig as _0x5ec73f}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x3f460b,ViewAttributeElement as _0x4e094d,ViewEmptyElement as _0xb7c34c,ViewRawElement as _0x4ce41f,ViewUIElement as _0x30665d,ViewDocumentFragment as _0x1acc86,ViewText as _0x48640e,ViewElement as _0x3c8e2b,ModelElement as _0xf20b09,ModelRange as _0x229d78,ModelPosition as _0x3d30d3,ModelDocumentFragment as _0x5439d1,ModelText as _0x51f73e}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x46dbf8,IconChevronUp as _0x54f29b,IconChevronDown as _0x53a08c,IconUndo as _0x4a12a7,IconUser as _0x4e42fe,IconThreeVerticalDots as _0x18b99b}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x2237ba,View as _0x3e0b15,submitHandler as _0x28e64e,LabeledFieldView as ti,createLabeledInputText as _0x4ca011,createDropdown as _0x54c274,ListView as _0x17bef3,ListItemView as _0x33aa7a,ButtonView as _0x1dcc9b,MenuBarMenuView as _0xb326f9,MenuBarMenuListView as _0x34f0da,MenuBarMenuListItemView as _0x2ea1e2,MenuBarMenuListItemButtonView as _0x54a271,ContextualBalloon as _0x4063c6,ToolbarSeparatorView as _0x1019e4,IconView as _0x137374,addListToDropdown as _0x28ae8a,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x2ed6c9,StickyPanelView as _0x468a35,ToolbarView as _0xeb63cb,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x3ae11b}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x2cbca0(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x29287b){super(),this['id']=_0x29287b['id']||_0x31075e(),this['creator']=_0x29287b['creator']||null,this['authors']=_0x29287b['authors']||[],this['diffData']=_0x29287b['diffData']||null,this['toVersion']=_0x29287b['toVersion']||0x0,this['fromVersion']=_0x29287b['fromVersion']||0x0,this['set']('name',_0x29287b['name']||''),this['set']('createdAt',_0x29287b['createdAt']||new Date()),this['set']('attributes',_0x29287b['attributes']||{});}['setName'](_0x5c2122){this['_update']({'name':_0x5c2122});}['setAttribute'](_0x3b3b33,_0x49a29d){const _0x4a8a46=_0x24b057(this['attributes']);_0x2c8de9(_0x4a8a46,_0x3b3b33,_0x49a29d),this['_update']({'attributes':_0x4a8a46});}['removeAttribute'](_0x24ed85){const _0x1ab80d=_0x24b057(this['attributes']);_0x7585f2(_0x1ab80d,_0x24ed85),this['_update']({'attributes':_0x1ab80d});}['_update'](_0x1f5e5c,_0x475dc2=!0x1){let _0x4afd1e=!0x1;const _0x204120={'id':this['id']},_0x9d211a=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x37809d of _0x9d211a){const _0x504d77=_0x1f5e5c[_0x37809d];void 0x0!==_0x504d77&&_0x504d77!==this[_0x37809d]&&(this[_0x37809d]=_0x504d77,_0x204120[_0x37809d]=_0x504d77,_0x4afd1e=!0x0);}_0x4afd1e&&(_0x204120['authors']&&(_0x204120['authorsIds']=_0x204120['authors']['map'](_0x4f3f96=>_0x4f3f96['id']),delete _0x204120['authors']),this['fire']('_update',_0x204120,_0x475dc2));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3eb63a=>_0x3eb63a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x38f444{['_revisions'];static get['requires'](){return[_0x3fbc11];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x596a89){super(_0x596a89),this['_revisions']=new _0x5731ed();}['afterInit'](){!async function(_0x4754b6){const _0x18aeeb=_0x25a801([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]),_0xe9763d=0xeb829,_0x47cd0d=0x359e09b0,_0x3a1b26=0x35997318^_0x47cd0d,_0x322a9b=window[_0x25a801([0x44,0x61,0x74,0x65])][_0x25a801([0x6e,0x6f,0x77])](),_0x330e96=_0x4754b6[_0x25a801([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x363584=new window[(_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x365edd=>{_0x330e96[_0x25a801([0x6f,0x6e,0x63,0x65])](_0x25a801([0x72,0x65,0x61,0x64,0x79]),_0x365edd);}),_0x119d9d={[_0x25a801([0x6b,0x74,0x79])]:_0x25a801([0x45,0x43]),[_0x25a801([0x75,0x73,0x65])]:_0x25a801([0x73,0x69,0x67]),[_0x25a801([0x63,0x72,0x76])]:_0x25a801([0x50,0x2d,0x32,0x35,0x36]),[_0x25a801([0x78])]:_0x25a801([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]),[_0x25a801([0x79])]:_0x25a801([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]),[_0x25a801([0x61,0x6c,0x67])]:_0x25a801([0x45,0x53,0x32,0x35,0x36])},_0x50a430=_0x330e96[_0x25a801([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x25a801([0x67,0x65,0x74])](_0x25a801([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x23876f(){let _0x922914,_0x5e84d1=null,_0x35a8a4=null;try{if(_0x50a430==_0x25a801([0x47,0x50,0x4c]))return _0x25a801([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x922914=_0x5549a0(),!_0x922914)return _0x25a801([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x922914[_0x25a801([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x35a8a4=_0x2ea5ce(_0x922914[_0x25a801([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x922914[_0x25a801([0x6a,0x74,0x69])])),await _0x28549c()?_0x3a99f0()?_0x2a9b2a()?_0x25a801([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x172e9d()?(_0x922914[_0x25a801([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x25a801([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5e84d1=_0x1e6a40(_0x25a801([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x922914[_0x25a801([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x25a801([0x74,0x72,0x69,0x61,0x6c])&&(_0x5e84d1=_0x1e6a40(_0x25a801([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4a5326()):_0x25a801([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x25a801([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x25a801([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x25a801([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2a9b2a(){const _0x30bfd5=[_0x25a801([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x25a801([0x74,0x72,0x69,0x61,0x6c])][_0x25a801([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x922914[_0x25a801([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x322a9b/0x3e8:0xe10*_0x3a1b26;return _0x922914[_0x25a801([0x65,0x78,0x70])]<_0x30bfd5;}function _0x3a99f0(){const _0x3c0c53=_0x922914[_0x25a801([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3c0c53)return!0x1;if(_0x3c0c53[_0x25a801([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25a801([0x2a])))return!0x0;if(_0x3c0c53[_0x25a801([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25a801([0x52,0x48])))return!0x0;if(_0x3c0c53[_0x25a801([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25a801([0x52,0x52,0x48]))){if(_0x564742())return!0x0;if(_0x1e2a2f()||_0x36dce7())return!0x0;}return!0x1;}function _0x172e9d(){const _0x279a2b=_0x922914[_0x25a801([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x279a2b||0x0==_0x279a2b[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x43294a}=new URL(window[_0x25a801([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x279a2b[_0x25a801([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43294a))return!0x0;const _0x35c6e7=_0x43294a[_0x25a801([0x73,0x70,0x6c,0x69,0x74])](_0x25a801([0x2e]));return _0x279a2b[_0x25a801([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x50a77d=>_0x50a77d[_0x25a801([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25a801([0x2a])))[_0x25a801([0x6d,0x61,0x70])](_0x26d407=>_0x26d407[_0x25a801([0x73,0x70,0x6c,0x69,0x74])](_0x25a801([0x2e])))[_0x25a801([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e5cf8=>_0x4e5cf8[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x35c6e7[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x25a801([0x6d,0x61,0x70])](_0x58889c=>Array(_0x35c6e7[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x58889c[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x25a801([0x66,0x69,0x6c,0x6c])](_0x58889c[0x0]===_0x25a801([0x2a])?_0x25a801([0x2a]):'')[_0x25a801([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x58889c))[_0x25a801([0x73,0x6f,0x6d,0x65])](_0x416a3b=>_0x35c6e7[_0x25a801([0x65,0x76,0x65,0x72,0x79])]((_0x3e4317,_0x42babc)=>_0x416a3b[_0x42babc]===_0x3e4317||_0x416a3b[_0x42babc]===_0x25a801([0x2a])));}function _0x4a5326(){return _0x5e84d1&&_0x35a8a4?new window[(_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5930f7,_0x5466c1)=>{_0x5e84d1[_0x25a801([0x74,0x68,0x65,0x6e])](_0x5930f7,_0x5466c1),_0x35a8a4[_0x25a801([0x74,0x68,0x65,0x6e])](_0x3038ca=>{_0x3038ca!=_0x25a801([0x56,0x61,0x6c,0x69,0x64])&&_0x5930f7(_0x3038ca);},_0x5466c1);}):_0x5e84d1||_0x35a8a4||_0x25a801([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2ea5ce(_0x36571c,_0x35565d){return new window[(_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x153b8c=>{if(_0x5f5311())return _0x153b8c(_0x25a801([0x56,0x61,0x6c,0x69,0x64]));_0x5010a9(),_0x330e96[_0x25a801([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x25a801([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x167910=!0x1;const _0x30fa6b=_0x31075e();function _0x3400db(_0x10510f){return!!_0x10510f&&(typeof _0x10510f===_0x25a801([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x10510f===_0x25a801([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x10510f[_0x25a801([0x74,0x68,0x65,0x6e])]===_0x25a801([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x10510f[_0x25a801([0x63,0x61,0x74,0x63,0x68])]===_0x25a801([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x51e83c(_0x2d2515){_0x238ec7(_0x2d2515)[_0x25a801([0x74,0x68,0x65,0x6e])](_0x3d72b3=>{if(!_0x3d72b3||_0x3d72b3[_0x25a801([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x25a801([0x6f,0x6b]))return _0x25a801([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xf44c0(_0x5248ec(_0x30fa6b+_0x35565d))!=_0x3d72b3[_0x25a801([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x25a801([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x25a801([0x56,0x61,0x6c,0x69,0x64]);})[_0x25a801([0x74,0x68,0x65,0x6e])](_0x456034=>(_0x110569(),_0x456034),()=>{const _0x264cf6=_0x106504();return null==_0x264cf6?(_0x110569(),_0x25a801([0x56,0x61,0x6c,0x69,0x64])):_0x25a801(_0x322a9b-_0x264cf6>(0x11928db0^_0x47cd0d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x25a801([0x74,0x68,0x65,0x6e])](_0x153b8c)[_0x25a801([0x63,0x61,0x74,0x63,0x68])](()=>{_0x153b8c(_0x25a801([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1b1a46=0x35a8e730^_0x47cd0d;function _0x110569(){const _0x30d401=_0x25a801([0x6c,0x6c,0x63,0x74,0x2d])+_0xf44c0(_0x5248ec(_0x36571c)),_0x3a8850=_0x2d9a42(_0xf44c0(window[_0x25a801([0x4d,0x61,0x74,0x68])][_0x25a801([0x63,0x65,0x69,0x6c])](_0x322a9b/_0x1b1a46)));window[_0x25a801([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x25a801([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30d401,_0x3a8850);}function _0x106504(){const _0x52326f=_0x25a801([0x6c,0x6c,0x63,0x74,0x2d])+_0xf44c0(_0x5248ec(_0x36571c)),_0x130a9a=window[_0x25a801([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x25a801([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x52326f);return _0x130a9a?window[_0x25a801([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d9a42(_0x130a9a),0x10)*_0x1b1a46:null;}function _0x238ec7(_0x4f8fb7){return new window[(_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1314b3,_0x22094a)=>{_0x4f8fb7[_0x25a801([0x74,0x68,0x65,0x6e])](_0x1314b3,_0x22094a),window[_0x25a801([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x22094a,0x359fdd70^_0x47cd0d);});}}_0x330e96[_0x25a801([0x6f,0x6e])](_0x25a801([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x335ade,_0x354952)=>{if(_0x354952[0x0]!=_0x36571c)return _0x153b8c(_0x25a801([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x354952[0x1]={..._0x354952[0x1],[_0x25a801([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x30fa6b};},{[_0x25a801([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x25a801([0x68,0x69,0x67,0x68])}),_0x330e96[_0x25a801([0x6f,0x6e])](_0x25a801([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2c1a2f=>{_0x3400db(_0x2c1a2f[_0x25a801([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x167910=!0x0,_0x51e83c(_0x2c1a2f[_0x25a801([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x25a801([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x25a801([0x6c,0x6f,0x77])}),_0x363584[_0x25a801([0x74,0x68,0x65,0x6e])](()=>{_0x167910||_0x153b8c(_0x25a801([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5f5311(){return _0x330e96[_0x25a801([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25a801([0x76,0x69,0x65,0x77])][_0x25a801([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x25a801([0x61,0x75,0x74,0x6f]);}function _0x5010a9(){_0x330e96[_0x25a801([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25a801([0x76,0x69,0x65,0x77])][_0x25a801([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x25a801([0x61,0x75,0x74,0x6f]);}}function _0x1e6a40(_0x33537f){const _0xc89dfb=[new window[(_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x6ea421=>setTimeout(_0x6ea421,0x3597377c^_0x47cd0d)),_0x363584[_0x25a801([0x74,0x68,0x65,0x6e])](()=>new window[(_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x76c5f=>{const _0x24b018=0x359e09b7^_0x47cd0d,_0x4fef63=_0x4754b6[_0x25a801([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x44e476(){_0x4fef63[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x24b018&&_0x76c5f();}_0x44e476(),_0x4fef63[_0x25a801([0x6f,0x6e])](_0x25a801([0x61,0x64,0x64]),_0x44e476);})),new window[(_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x506dd8=>{function _0x48ce3e(){for(const _0x120d6f in window)if(window[_0x25a801([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x25a801([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x120d6f))&&window[_0x120d6f]==_0xe9763d)return _0x506dd8();_0x330e96[_0x25a801([0x73,0x74,0x61,0x74,0x65])]!=_0x25a801([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x25a801([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x48ce3e,0x359e1a38^_0x47cd0d);}_0x21526b(_0x25a801([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x48ce3e();})];return window[_0x25a801([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x25a801([0x72,0x61,0x63,0x65])](_0xc89dfb)[_0x25a801([0x74,0x68,0x65,0x6e])](()=>_0x33537f);}async function _0x39a288(){if(await _0x363584,_0x21526b(_0x25a801([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2ff26b=_0x4754b6[_0x25a801([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1c35d2=_0x4754b6[_0x25a801([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])](_0x2ff26b[_0x25a801([0x69,0x64])]),_0x8603c=_0x365407(_0x25a801([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x8603c[_0x25a801([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2ff26b['id'],_0x1c35d2?_0x1c35d2['id']:null,!0x0),_0x8603c[_0x25a801([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x25a801([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x8603c[_0x25a801([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x8603c[_0x25a801([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x376dbd,void(_0x8603c[_0x25a801([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x376dbd);}if(_0x21526b(_0x25a801([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1d8af5=_0x365407(_0x25a801([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1d8af5[_0x25a801([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x25a801([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1d8af5[_0x25a801([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1d8af5[_0x25a801([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x376dbd,_0x1d8af5[_0x25a801([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x376dbd;}_0x330e96[_0x25a801([0x6d,0x6f,0x64,0x65,0x6c])][_0x25a801([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x376dbd,_0x330e96[_0x25a801([0x6d,0x6f,0x64,0x65,0x6c])][_0x25a801([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x376dbd,_0x330e96[_0x25a801([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x25a801([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x564742(){return _0x21526b(_0x25a801([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x365407(_0x25a801([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x25a801([0x73,0x74,0x61,0x74,0x65])]==_0x25a801([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1e2a2f(){return _0x21526b(_0x25a801([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 _0x36dce7(){return _0x21526b(_0x25a801([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x39e9e7(_0x5f0032){const _0x1d0f0b=_0x23ee4b();_0x330e96[_0x1d0f0b]=_0x25a801([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])+_0x5f0032,_0x5f0032[_0x25a801([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x25a801([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x23ee4b()]=_0xe9763d),_0x5f0032!=_0x25a801([0x56,0x61,0x6c,0x69,0x64])&&_0x39a288();}function _0x23ee4b(){const _0x5ce872=window[_0x25a801([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x25a801([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x25a801([0x6e,0x6f,0x77])]())[_0x25a801([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x25a801([0x2e]),'');let _0x4d7d1a=_0x25a801([0x76]);for(let _0x5dd7cd=0x0;_0x5dd7cd<_0x5ce872[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5dd7cd+=0x2){let _0x33ae86=window[_0x25a801([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5ce872[_0x25a801([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5dd7cd,_0x5dd7cd+0x2));_0x33ae86>=_0x18aeeb[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x33ae86-=_0x18aeeb[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4d7d1a+=_0x18aeeb[_0x33ae86];}return _0x4d7d1a;}function _0x5549a0(){const _0xdd93ba=_0x50a430[_0x25a801([0x73,0x70,0x6c,0x69,0x74])](_0x25a801([0x2e]));if(0x3!=_0xdd93ba[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2ece5b(_0xdd93ba[0x1]);function _0x2ece5b(_0x47f7e4){const _0x1e817d=_0x2f7305(_0x47f7e4);return _0x1e817d&&_0x554c4d()?_0x1e817d:null;function _0x554c4d(){const _0x814e26=_0x1e817d[_0x25a801([0x6a,0x74,0x69])],_0x4e21cd=window[_0x25a801([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x814e26[_0x25a801([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x814e26[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2f7315={..._0x1e817d,[_0x25a801([0x6a,0x74,0x69])]:_0x814e26[_0x25a801([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x814e26[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2f7315[_0x25a801([0x76,0x63])],_0x5248ec(_0x2f7315)==_0x4e21cd;}}}async function _0x28549c(){let _0x190a96=!0x0;try{const _0xe2d24f=_0x50a430[_0x25a801([0x73,0x70,0x6c,0x69,0x74])](_0x25a801([0x2e])),[_0x128155,_0x546a43,_0x3e46ce]=_0xe2d24f;return _0x49076d(_0x128155),await _0x2f2fd0(_0x128155,_0x546a43,_0x3e46ce),_0x190a96;}catch{return!0x1;}function _0x49076d(_0x2561e7){const _0x3e16f5=_0x2f7305(_0x2561e7);_0x3e16f5&&_0x3e16f5[_0x25a801([0x61,0x6c,0x67])]==_0x25a801([0x45,0x53,0x32,0x35,0x36])||(_0x190a96=!0x1);}async function _0x2f2fd0(_0x356804,_0x2f423b,_0x2bbc92){const _0xe4b44b=window[_0x25a801([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x25a801([0x66,0x72,0x6f,0x6d])](_0x1ee929(_0x2bbc92),_0x5e6897=>_0x5e6897[_0x25a801([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b9741=new window[(_0x25a801([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x25a801([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x356804+_0x25a801([0x2e])+_0x2f423b),_0x532420=window[_0x25a801([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x25a801([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x532420)return;const _0x65f717=await _0x532420[_0x25a801([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x25a801([0x6a,0x77,0x6b]),_0x119d9d,{[_0x25a801([0x6e,0x61,0x6d,0x65])]:_0x25a801([0x45,0x43,0x44,0x53,0x41]),[_0x25a801([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x25a801([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x25a801([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x532420[_0x25a801([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x25a801([0x6e,0x61,0x6d,0x65])]:_0x25a801([0x45,0x43,0x44,0x53,0x41]),[_0x25a801([0x68,0x61,0x73,0x68])]:{[_0x25a801([0x6e,0x61,0x6d,0x65])]:_0x25a801([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x65f717,_0xe4b44b,_0x1b9741)||(_0x190a96=!0x1);}}function _0x2f7305(_0x5e11fa){return _0x5e11fa[_0x25a801([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x25a801([0x65,0x79]))?JSON[_0x25a801([0x70,0x61,0x72,0x73,0x65])](_0x1ee929(_0x5e11fa)):null;}function _0x1ee929(_0x19eee8){return window[_0x25a801([0x61,0x74,0x6f,0x62])](_0x19eee8[_0x25a801([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x25a801([0x2b]))[_0x25a801([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x25a801([0x2f])));}function _0x5248ec(_0x28c0cf){let _0x174e50=0x1505;function _0x1f053c(_0x4b90ac){for(let _0x28ce59=0x0;_0x28ce59<_0x4b90ac[_0x25a801([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28ce59++){const _0x362eaa=_0x4b90ac[_0x25a801([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x28ce59);_0x174e50=(_0x174e50<<0x5)+_0x174e50+_0x362eaa,_0x174e50&=_0x174e50;}}function _0x5def05(_0x31de51){Array[_0x25a801([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x31de51)?_0x31de51[_0x25a801([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5def05):_0x31de51&&typeof _0x31de51==_0x25a801([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x25a801([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x31de51)[_0x25a801([0x73,0x6f,0x72,0x74])]()[_0x25a801([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2eedd8,_0x2d9dee])=>{_0x1f053c(_0x2eedd8),_0x5def05(_0x2d9dee);}):_0x1f053c(window[_0x25a801([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x31de51));}return _0x5def05(_0x28c0cf),_0x174e50>>>0x0;}function _0xf44c0(_0x1a0c12){return _0x1a0c12[_0x25a801([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x25a801([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x25a801([0x30]));}function _0x2d9a42(_0x51b15c){return _0x51b15c[_0x25a801([0x73,0x70,0x6c,0x69,0x74])]('')[_0x25a801([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x25a801([0x6a,0x6f,0x69,0x6e])]('');}function _0x21526b(_0x299350){return _0x330e96[_0x25a801([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x25a801([0x68,0x61,0x73])](_0x299350);}function _0x365407(_0xa87304){return _0x330e96[_0x25a801([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x25a801([0x67,0x65,0x74])](_0xa87304);}function _0x376dbd(){}function _0x25a801(_0x4782a0){return _0x4782a0['map'](_0x471703=>String['fromCharCode'](_0x471703))['join']('');}_0x39e9e7(await _0x23876f());}(this);}['createRevision'](_0x18290b){const _0x567fc6=this['editor']['plugins']['get']('Users');return new I({'id':_0x18290b['id'],'name':_0x18290b['name'],'creator':_0x18290b['creatorId']?_0x567fc6['getUser'](_0x18290b['creatorId']):null,'diffData':_0x18290b['diffData']||_0x18290b['data'],'authors':_0x18290b['authorsIds']['map'](_0x16b3f2=>_0x567fc6['getUser'](_0x16b3f2)),'createdAt':new Date(_0x18290b['createdAt']),'attributes':_0x18290b['attributes'],'fromVersion':_0x18290b['fromVersion'],'toVersion':_0x18290b['toVersion']});}['addRevision'](_0xdb13b4,_0x428aff=0x0){this['_revisions']['add'](_0xdb13b4,_0x428aff);}['getRevision'](_0x13f3a1){return this['_revisions']['get'](_0x13f3a1);}['getRevisions'](_0x38290a={'toJSON':!0x1}){const _0x248712=Array['from'](this['_revisions']);return _0x248712['reverse'](),_0x38290a['toJSON']?_0x248712['map'](_0x22ac62=>_0x22ac62['toJSON']()):_0x248712;}['getIndex'](_0x2fa479){return this['_revisions']['getIndex'](_0x2fa479);}['getEarlierVisibleRevision'](_0x368007){const [,_0xbfade7]=this['getRevisionsIterator'](_0x368007,{'direction':'earlier'});return _0xbfade7;}['getLaterVisibleRevision'](_0x130132){const [,_0x15c4dd]=this['getRevisionsIterator'](_0x130132,{'direction':'later'});return _0x15c4dd;}['getRevisionsInDiff'](_0x326f91){const _0x858656=[];for(const _0x55a151 of this['getRevisionsIterator'](_0x326f91['newRevisionId']))if(_0x858656['push'](_0x55a151),_0x55a151['id']===_0x326f91['oldRevisionId'])break;return _0x858656;}*['getRevisionsIterator'](_0x4922b9,{direction:_0x256152='earlier',filter:_0x418129=()=>!0x0}={}){const _0x739995='earlier'===_0x256152?0x1:-0x1;let _0x21d46a=this['_revisions']['get'](_0x4922b9),_0x43af16=this['getIndex'](_0x21d46a);for(yield _0x21d46a;_0x21d46a;){if(_0x43af16+=_0x739995,_0x21d46a=this['getRevision'](_0x43af16),!_0x21d46a)return;_0x418129(_0x21d46a)&&(yield _0x21d46a);}}}class $ extends _0x38f444{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3f460b,'c'],[_0x4e094d,'a'],[_0xb7c34c,'e'],[_0x4ce41f,'r'],[_0x30665d,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3f460b],['a',_0x4e094d],['e',_0xb7c34c],['r',_0x4ce41f],['u',_0x30665d]]);async['loadRevisionData'](_0x419b21,_0x453bff){if(_0x419b21['diffData']||!_0x453bff)return;const _0x169ed2=this['editor']['config']['get']('collaboration.channelId'),_0x5ef1b1=await _0x453bff['getRevision']({'channelId':_0x169ed2,'revisionId':_0x419b21['id']});_0x419b21['diffData']=_0x5ef1b1['diffData'];}['getRevisionDocumentData'](_0x2a20bb){const _0x2e231f={};for(const _0x17dfe9 in _0x2a20bb['diffData']){if(_0x2a20bb['diffData'][_0x17dfe9]['attachChange']&&!_0x2a20bb['diffData'][_0x17dfe9]['attachChange']['isAttached'])continue;const _0x43e6ab=this['_removeRevisionMarkers'](JSON['parse'](_0x2a20bb['diffData'][_0x17dfe9]['insertions'])),_0x2613b5=this['editor']['editing']['view']['document'],_0xd65404=new _0x1acc86(_0x2613b5,_0x43e6ab['map'](_0x583fd2=>this['_getViewFromDiffObj'](_0x583fd2,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2e231f[_0x17dfe9]=this['editor']['data']['processor']['toData'](_0xd65404),this['editor']['data']['processor']['useFillerType']('default');}return _0x2e231f;}['getRevisionRootsAttributes'](_0x56fe96){const _0x203394={};for(const _0x119e5d in _0x56fe96['diffData'])_0x56fe96['diffData'][_0x119e5d]['attachChange']&&!_0x56fe96['diffData'][_0x119e5d]['attachChange']['isAttached']||(_0x203394[_0x119e5d]=_0x56fe96['diffData'][_0x119e5d]['attributesAfter']||{});return _0x203394;}['_getTypeCharForViewElement'](_0x13f722){return this['_viewClassToTypeChar']['get'](_0x13f722['constructor']);}['_getViewFromDiffObj'](_0x382e12,_0x230dce){const _0x1c43bb=this['editor']['editing']['view']['document'];if('string'==typeof _0x382e12)return new _0x48640e(_0x1c43bb,_0x382e12);{let _0x1fb426,_0x16e7b7;_0x16e7b7='u'==_0x382e12['type']||'r'==_0x382e12['type']?[]:_0x382e12['children']['map'](_0xbb9be6=>this['_getViewFromDiffObj'](_0xbb9be6,_0x230dce));const _0x56f3aa=this['_typeCharToViewClass']['get'](_0x382e12['type'])||_0x3c8e2b,_0x4cde4b=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1fb426=new _0x56f3aa(_0x1c43bb,_0x382e12['name'],_0x382e12['attributes'],_0x16e7b7),'u'==_0x382e12['type']&&_0x382e12['children'][0x0]){const _0x4cd944=_0x382e12['children'][0x0];if(_0x1fb426['render']=function(_0x567a30){const _0x71c25e=_0x567a30['createElement']('div');return _0x71c25e['innerHTML']=_0x4cd944,_0x71c25e['childNodes'][0x0];},_0x230dce){const _0x2e185e=new _0x1acc86(_0x1c43bb);_0x2e185e['_appendChild'](_0x1fb426);const _0x2c090b=Array['from'](_0x4cde4b['viewChildrenToDom'](_0x2e185e,{'bind':!0x1})),_0x2e63ab=_0x4cde4b['domDocument']['createElement']('div');_0x2e63ab['append'](..._0x2c090b),_0x1fb426=Array['from'](_0x4cde4b['domChildrenToView'](_0x2e63ab))[0x0];}}else{if('r'==_0x382e12['type']&&_0x382e12['children'][0x0]){const _0x553775=_0x382e12['children'][0x0];if(_0x1fb426['render']=function(_0x23d1da){_0x23d1da['innerHTML']=_0x553775;},_0x230dce){const _0x159ab4=new _0x1acc86(_0x1c43bb);_0x159ab4['_appendChild'](_0x1fb426);const _0x570472=Array['from'](_0x4cde4b['viewChildrenToDom'](_0x159ab4,{'bind':!0x1})),_0x1119dc=_0x4cde4b['domDocument']['createElement']('div');_0x1119dc['append'](..._0x570472);const _0x3e662e=Array['from'](_0x4cde4b['domChildrenToView'](_0x1119dc));_0x3e662e['length']>0x1?_0x1fb426['_appendChild'](_0x3e662e):_0x1fb426=_0x3e662e[0x0];}}}if(_0x382e12['customProperties']){for(const [_0x8caf7,_0x106ffd]of _0x382e12['customProperties'])_0x1fb426['_setCustomProperty'](_0x8caf7,_0x106ffd);}const _0x5266d4=void 0x0===_0x382e12['fillerOffset']?null:_0x382e12['fillerOffset'];return null!==_0x5266d4&&(_0x1fb426['getFillerOffset']=()=>_0x5266d4),_0x1fb426;}}['_makeModelFromViewString'](_0x1243ea){const _0x55c9b8=JSON['parse'](_0x1243ea),_0x3b30db=this['editor']['editing']['view']['document'],_0x1425e8=new _0x1acc86(_0x3b30db,_0x55c9b8['map'](_0x312926=>this['_getViewFromDiffObj'](_0x312926,!0x0)));return this['editor']['data']['toModel'](_0x1425e8);}['_removeRevisionMarkers'](_0x1c8b6b){return(_0x1c8b6b=_0x1c8b6b['filter'](_0x455d34=>!_0x455d34['name']||'revision-start'!==_0x455d34['name']&&'revision-end'!==_0x455d34['name']))['forEach'](_0x47ade4=>{'string'!=typeof _0x47ade4&&(_0x47ade4['children']=this['_removeRevisionMarkers'](_0x47ade4['children']),_0x47ade4['attributes']=_0x47ade4['attributes']['filter'](_0x147e25=>!_0x147e25[0x0]['startsWith']('data-revision-')));}),_0x1c8b6b;}}function m(_0x28e7a1,_0x4462de,_0x1eca8b){const t=_0x28e7a1['t'];switch(_0x4462de){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'},_0x1eca8b);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1eca8b);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 h extends _0x38f444{['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[_0x3fbc11,S,$,_0x9122e7];}constructor(_0x40f30e){super(_0x40f30e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x37f592=_0x31075e();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x37f592},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 _0x642e83=this['repository']['getRevision'](0x0),_0x3e0c0e=_0x642e83&&null===_0x642e83['creator']?_0x642e83:null;if(this['_continueCurrentRevision']=!!_0x3e0c0e&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0xe2af12=this['_source']['getCurrentRevisionId'](),_0x3d50f4=this['repository']['getRevision'](_0xe2af12);if(_0x3d50f4)this['_startingVersion']=_0x3d50f4['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x2d4a0c=this['_source']['history']['_operations']['find'](_0x128225=>!_0x128225['_isInit']),_0x3733a4=_0x2d4a0c?_0x2d4a0c['baseVersion']:this['_source']['history']['version'];_0x642e83?(_0x642e83['toVersion']<_0x3733a4&&_0x642e83['_update']({'toVersion':_0x3733a4}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3e0c0e['id'],this['_startingVersion']=_0x3e0c0e['fromVersion']):(this['_startingVersion']=_0x642e83['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3733a4,this['_continueCurrentRevision']=!0x1);}}else _0x3e0c0e&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3e0c0e['toVersion'],this['editor']['model']['document']['history']['version']),_0x3e0c0e['fromVersion']===_0x3e0c0e['toVersion']?(0x0!==_0x3e0c0e['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3e0c0e['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3e0c0e['id'],this['_startingVersion']=_0x3e0c0e['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',_0x362b0c=>!_0x362b0c),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1e2614=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x586d6a;for(const _0x4ce93c in _0x1e2614){const _0x16b283=_0x4ce93c,_0x1fca8b=_0x1e2614[_0x16b283];if('revisionHistoryLicenseKeyValid'==_0x1fca8b||'revisionHistoryLicenseKeyInvalid'==_0x1fca8b||'revisionHistoryLicenseKeyExpired'==_0x1fca8b||'revisionHistoryLicenseKeyDomainLimit'==_0x1fca8b||'revisionHistoryLicenseKeyNotAllowed'==_0x1fca8b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1fca8b||'revisionHistoryLicenseKeyTrialLimit'==_0x1fca8b||'revisionHistoryLicenseKeyUsageLimit'==_0x1fca8b){delete _0x1e2614[_0x16b283],_0x586d6a=_0x1fca8b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x586d6a&&_0x1e2614['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x586d6a&&_0x1e2614['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x586d6a&&_0x1e2614['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x586d6a&&_0x1e2614['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x586d6a&&_0x1e2614['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x586d6a&&_0x1e2614['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x586d6a&&_0x1e2614['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x3ebeb4=this['repository']['getRevision'](0x0),_0x543731=await this['getRevisionDocumentData'](_0x3ebeb4),_0x16e7ca=await this['getRevisionRootsAttributes'](_0x3ebeb4);this['_replaceEditorDataWithRevisionData'](_0x543731,_0x16e7ca);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3ff349){this['_source']=_0x3ff349;}async['update'](){const _0x5a0874=await this['_source']['getLatestVersion']();if(_0x5a0874>this['currentRevision']['toVersion']){await this['_loadState']();const _0x580d8a=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5a0874});_0x580d8a['authors']=_0x580d8a['authorsIds']['map'](_0x2ac476=>this['editor']['plugins']['get']('Users')['getUser'](_0x2ac476)),this['currentRevision']['_update'](_0x580d8a);}}async['saveRevision'](_0x2bfa29={},_0x15295c=null){const _0x57aaa3=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x15295c>this['currentRevision']['toVersion']&&(_0x15295c=null),null===_0x15295c&&(_0x15295c=await this['_source']['getLatestVersion']());const _0x397892=this['_getFromVersion'](_0x15295c),_0x569af7=this['buildRevisionData']({'from':_0x397892,'to':_0x15295c});if(this['currentRevision']['toVersion']<_0x15295c){const _0x397673=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x15295c,'to':_0x15295c});_0x397673['authors']=[],_0x397673['authorsIds']=[],_0x397673['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x397673,!0x0),delete _0x397673['authors'],_0x57aaa3['push'](_0x397673);}_0x2bfa29['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x2bfa29['name']=_0x2bfa29['name']||null,_0x2bfa29['id']=_0x2bfa29['id']||_0x31075e(),_0x2bfa29={..._0x2bfa29,..._0x569af7};const _0x4dfc7e=this['addRevisionData'](_0x2bfa29);_0x57aaa3['push'](_0x2bfa29);const _0x4f494b=this['repository']['getIndex'](_0x4dfc7e);if(0x0!==_0x4f494b){const _0x4d4d73=this['repository']['getRevision'](_0x4f494b-0x1);if(_0x4d4d73['fromVersion']!==_0x15295c){const _0x45359a=this['_revisionDataBuilder']['getData'](_0x15295c,_0x4d4d73['toVersion']),_0x438b0a={'id':_0x4d4d73['id'],'diffData':_0x45359a['diffData'],'authorsIds':_0x45359a['authorsIds'],'authors':_0x45359a['authorsIds']['map'](_0x7b791=>this['editor']['plugins']['get']('Users')['getUser'](_0x7b791)),'fromVersion':_0x15295c};_0x4d4d73===this['currentRevision']&&(_0x438b0a['createdAt']=new Date(_0x2bfa29['createdAt']['getTime']()+0xa)),_0x4d4d73['_update'](_0x438b0a,!0x0),delete _0x438b0a['authors'],_0x57aaa3['push'](_0x438b0a);}}if(this['adapter']){for(const _0x37807d of _0x57aaa3)this['_bufferUpdate'](_0x37807d['id'],_0x37807d,!0x0);this['sendBufferedUpdates']();}return _0x4dfc7e;}['addRevisionData'](_0x4af40b){const _0x206af9=this['repository']['createRevision'](_0x4af40b);return this['adapter']&&_0x206af9['on']('_update',(_0x2569e5,_0xe5d47b,_0x3e1302)=>{_0x3e1302||(this['_bufferUpdate'](_0xe5d47b['id'],_0xe5d47b,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x206af9,this['_findInsertionIndex'](_0x206af9)),_0x206af9;}async['getRevisionDocumentData'](_0x4b798f){return await this['_utils']['loadRevisionData'](_0x4b798f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4b798f);}async['getRevisionRootsAttributes'](_0x184950){return await this['_utils']['loadRevisionData'](_0x184950,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x184950);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x534c43=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x116840=0x0;_0x116840<_0x534c43['length'];_0x116840++){const _0x330abb=_0x534c43[_0x116840];let _0x4a8207=!0x1;for(const _0x15f37a of Object['keys'](_0x330abb))void 0x0===_0x330abb[_0x15f37a]?delete _0x330abb[_0x15f37a]:'id'!==_0x15f37a&&(_0x4a8207=!0x0);_0x4a8207||(_0x534c43[_0x116840]=null);}if(_0x534c43=_0x534c43['filter'](_0x4837cc=>null!==_0x4837cc),!_0x534c43['length'])return;for(let _0x2aaaf5=0x0;_0x2aaaf5<_0x534c43['length'];_0x2aaaf5++){const _0x35b9d8=_0x534c43[_0x2aaaf5];void 0x0!==_0x35b9d8['fromVersion']&&void 0x0===_0x35b9d8['toVersion']&&(_0x35b9d8['toVersion']=this['repository']['getRevision'](_0x35b9d8['id'])['toVersion']),void 0x0!==_0x35b9d8['toVersion']&&void 0x0===_0x35b9d8['fromVersion']&&(_0x35b9d8['fromVersion']=this['repository']['getRevision'](_0x35b9d8['id'])['fromVersion']);}const _0x1f2a9b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x534c43,_0x1f2a9b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x3f9a9b=>{if(_0x3f9a9b){for(const _0x73eb93 of _0x3f9a9b)this['setRevisionData']({'id':_0x73eb93['id'],'createdAt':_0x73eb93['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x24ef41=null,from:_0x5014d8=null,to:_0x584f2a=null}){_0x5014d8=null!==_0x5014d8?_0x5014d8:_0x24ef41['fromVersion'],_0x584f2a=null!==_0x584f2a?_0x584f2a:_0x24ef41['toVersion'];const _0x1b8208=this['_revisionDataBuilder']['getData'](_0x5014d8,_0x584f2a),_0x33fff5={'diffData':_0x1b8208['diffData'],'authorsIds':_0x1b8208['authorsIds'],'fromVersion':_0x5014d8,'toVersion':_0x584f2a};if(!_0x24ef41||_0x584f2a!==_0x24ef41['toVersion']){const _0x2d67a6=_0x584f2a-0x1,_0x38251c=this['_source']['history']['getOperation'](_0x2d67a6);_0x33fff5['createdAt']=_0x38251c&&_0x38251c['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5014d8===this['_loadedStateData']['fromVersion']){for(const _0x3322dd of this['_loadedStateData']['authors'])_0x33fff5['authorsIds']['includes'](_0x3322dd['id'])||_0x33fff5['authorsIds']['push'](_0x3322dd['id']);}return _0x33fff5;}['_bufferUpdate'](_0x184ce0,_0x451f40,_0x3a79b6){if(this['_bufferedUpdates']['has'](_0x184ce0)){const _0xe32b15=this['_bufferedUpdates']['get'](_0x184ce0);_0x451f40=_0x3a79b6?{..._0xe32b15,..._0x451f40}:{..._0x451f40,..._0xe32b15};}this['_bufferedUpdates']['set'](_0x184ce0,_0x451f40);}['setRevisionData'](_0x1915b0){const _0x3b0688=this['repository']['getRevision'](_0x1915b0['id']);if(_0x1915b0['createdAt']&&(_0x1915b0['createdAt']=new Date(_0x1915b0['createdAt'])),_0x1915b0['authorsIds']){const _0x139091=this['editor']['plugins']['get']('Users');_0x1915b0['authors']=_0x1915b0['authorsIds']['map'](_0x2812b7=>_0x139091['getUser'](_0x2812b7));}_0x3b0688['_update'](_0x1915b0,!0x0);}['_createInitialRevision'](_0xaa3fc7){const _0x1b8746=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1b8746)this['_initialRevisionId']=_0x1b8746['id'];else{const _0x36ff5e=!this['editor']['model']['document']['roots']['find'](_0x20ab4a=>this['editor']['model']['hasContent'](_0x20ab4a)),_0x54b8e0=this['editor']['plugins']['get']('Users')['me']['id'],_0x618d77=m(this['editor']['locale'],_0x36ff5e?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0xaa3fc7,'to':_0xaa3fc7,'id':this['_initialRevisionId'],'name':_0x618d77,'creatorId':_0x54b8e0});}}['_createCurrentRevision'](_0x289c65){const _0x217192=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x217192),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x289c65,'to':_0x289c65,'id':_0x217192,'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'](_0x2b1bbb,_0x436640){let _0x2ea0c1=this['editor']['config']['get']('initialData'),_0x506ddf=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2ea0c1){_0x2ea0c1={};for(const _0x163895 of this['editor']['model']['document']['getRootNames']())_0x2ea0c1[_0x163895]='';}if('string'==typeof _0x2ea0c1&&(_0x2ea0c1={'main':_0x2ea0c1}),void 0x0===_0x506ddf){_0x506ddf={};for(const _0x2e69d3 of this['editor']['model']['document']['getRootNames']())_0x506ddf[_0x2e69d3]={};}let _0x2924b3=!0x1;const _0x25fd2b=Object['keys'](_0x2ea0c1),_0x1b7e63=Object['keys'](_0x2b1bbb);for(const _0x914fbc of _0x25fd2b){if(_0x2ea0c1[_0x914fbc]!==_0x2b1bbb[_0x914fbc]&&''!==_0x2ea0c1[_0x914fbc]['trim']()){_0x2924b3=!0x0;break;}if(!_0x553c5f(_0x506ddf[_0x914fbc],_0x436640[_0x914fbc])&&Object['keys'](_0x506ddf[_0x914fbc])['length']>0x0){_0x2924b3=!0x0;break;}}_0x2924b3||(_0x2924b3=_0x1b7e63['some'](_0x4f05b7=>!this['editor']['model']['document']['getRoot'](_0x4f05b7))),_0x2924b3&&_0x728dc7('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2ea0c1,'editorRootsAttributes':_0x506ddf,'revisionData':_0x2b1bbb,'revisionRootsAttributes':_0x436640}),this['editor']['config']['set']('initialData',_0x2b1bbb),this['editor']['config']['set']('rootsAttributes',_0x436640);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1d0c82=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1d0c82['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4a8e67){const _0x26336a=this['repository']['getRevisions']();_0x26336a['reverse']();let _0xe0ffe7=0x0;for(;_0xe0ffe7<_0x26336a['length'];){const _0xbcedb0=_0x26336a[_0xe0ffe7];if(_0xbcedb0===this['currentRevision']){_0xe0ffe7++;continue;}if(_0xbcedb0['id']===this['_initialRevisionId'])break;const _0x2acbf9=_0x4a8e67['toVersion']-_0xbcedb0['toVersion']||_0x4a8e67['fromVersion']-_0xbcedb0['fromVersion'];if(_0x2acbf9>0x0)break;if(_0x2acbf9<0x0)_0xe0ffe7++;else{if(!_0x4a8e67['creator']&&_0xbcedb0['creator'])break;if(_0xbcedb0['creator']||!_0x4a8e67['creator']){if(_0x4a8e67['createdAt']>_0xbcedb0['createdAt'])break;_0xe0ffe7++;}else _0xe0ffe7++;}}return _0xe0ffe7;}['_getFromVersion'](_0x46fe29){const _0xa10c0c=this['repository']['getRevisions']();_0xa10c0c['reverse'](),_0xa10c0c['shift']();const _0x3d37cb=_0xa10c0c['find'](_0x28bfd8=>_0x28bfd8['toVersion']<=_0x46fe29)['toVersion'];return _0x3d37cb<this['_startingVersion']?this['_startingVersion']:_0x3d37cb;}['_makeRevision']({name:_0x16fe13,from:_0x6543f5,to:_0x53e73a,creatorId:_0x4e28d2,id:_0x4e57bb}){const _0x593103=this['buildRevisionData']({'from':_0x6543f5,'to':_0x53e73a});_0x593103['name']=_0x16fe13,_0x593103['creatorId']=_0x4e28d2,_0x593103['id']=_0x4e57bb;const _0x15c615=this['addRevisionData'](_0x593103);return this['adapter']&&this['_bufferUpdate'](_0x593103['id'],_0x593103,!0x0),_0x15c615;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x274554){this['editor']=_0x274554,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'](_0x4d61d5){this['source']=_0x4d61d5;const _0x28e32d=new Map(),_0x16a838=new Map(),_0x13ee62=this['editor']['model']['document']['roots']['map'](_0x1db670=>_0x1db670['rootName']);for(const _0x2a789b of _0x13ee62){const _0x383302=this['editor']['model']['document']['getRoot'](_0x2a789b),_0x33dce6=x(_0x383302);_0x28e32d['set'](_0x2a789b,_0x33dce6),_0x16a838['set'](_0x2a789b,Object['fromEntries'](_0x383302['getAttributes']()));}const _0x5f2191=Array['from'](this['editor']['model']['markers'])['map'](_0x189b40=>[_0x189b40['name'],_0x189b40['getRange']()]),_0x32f11f=this['source']['version'];this['_saveMetaData'](_0x32f11f,_0x28e32d,_0x5f2191,_0x16a838),this['_startingRevisionId']=this['_revisionId'];const _0x443149=new Map(),_0x314bab=new Map();for(const _0x7e5e8e of _0x13ee62){const _0x141c35=N(_0x7e5e8e);_0x443149['set'](_0x7e5e8e,_0x141c35),_0x314bab['set'](_0x7e5e8e,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x443149,[],_0x314bab);}['getData'](_0x1abbc0,_0x591da6){if(this['_lastFrom']===_0x1abbc0&&this['_lastTo']<=_0x591da6)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x591da6,!0x0);else{if(!this['_savedMetaData']['has'](_0x1abbc0)){const _0x593a64=this['_getPreviousFrom'](_0x1abbc0);this['_calculateMetaData'](_0x593a64,_0x1abbc0,!0x1);}this['_calculateMetaData'](_0x1abbc0,_0x591da6,!0x0);}return this['_lastFrom']=_0x1abbc0,this['_lastTo']=_0x591da6,this['_getState']();}['loadState'](_0x2f6dbf){if(!this['_savedMetaData']['has'](_0x2f6dbf['fromVersion'])){const _0x1a0a38=this['_getPreviousFrom'](_0x2f6dbf['fromVersion']);this['_calculateMetaData'](_0x1a0a38,_0x2f6dbf['fromVersion'],!0x1);}this['_calculateMetaData'](_0x2f6dbf['fromVersion'],_0x2f6dbf['toVersion'],!0x1);const _0x19069c=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x2f6dbf['fromVersion'],this['_lastTo']=_0x2f6dbf['toVersion'];for(const _0x40a8cd in _0x2f6dbf['diffData']){const _0x5390e5=_0x2f6dbf['diffData'][_0x40a8cd]['attachChange'],_0x3d1075=_0x24b057(_0x2f6dbf['diffData'][_0x40a8cd]['attributesBefore'])||{},_0x438fc3=_0x19069c['_makeModelFromViewString'](_0x2f6dbf['diffData'][_0x40a8cd]['deletions']);_0x438fc3['rootName']=_0x40a8cd,_0x438fc3['_isAttached']=!_0x5390e5||!_0x5390e5['isAttached'],_0x438fc3['isAttached']=()=>_0x438fc3['_isAttached'],this['_baseRoots']['set'](_0x40a8cd,_0x438fc3),this['_baseRootsAttributes']['set'](_0x40a8cd,_0x3d1075),_0x5390e5&&this['_touchedRoots']['set'](_0x40a8cd,_0x5390e5);const _0x28b647=this['_makeIdsRoot'](_0x438fc3);this['_baseIdsRoots']['set'](_0x40a8cd,_0x28b647);for(const [_0x543df2,_0x2f981e]of _0x438fc3['markers']){if(!_0x543df2['startsWith']('revision:'))continue;const _0x223999=_0x543df2['split'](':')[0x2];for(const _0xeddfe8 of _0x2f981e['getWalker']({'singleCharacters':!0x0})){const _0x1fd1ae=this['_getVidAttributeName'](_0xeddfe8),_0x24a1fb='elementEnd'==_0xeddfe8['type']?_0xeddfe8['previousPosition']['path']['slice'](0x0,-0x1):_0xeddfe8['previousPosition']['path'],_0x1f99d9=_0x28b647['getNodeByPath'](_0x24a1fb)['getAttribute'](_0x1fd1ae);this['_touched']['set'](_0x1f99d9,{'userId':_0x223999});}_0x438fc3['markers']['delete'](_0x543df2);}}this['_startingRevisionId']=this['_revisionId'];const _0x33057a=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4e0000=>!this['_touched']['has'](_0x4e0000));let _0x43f5e9=0x0;const _0xcbc20c=new Map();for(const _0x4f257a in _0x2f6dbf['diffData']){const _0x35d976=_0x2f6dbf['diffData'][_0x4f257a]['attachChange'],_0x3b7204=_0x24b057(_0x2f6dbf['diffData'][_0x4f257a]['attributesAfter'])||{},_0x12457c=_0x19069c['_makeModelFromViewString'](_0x2f6dbf['diffData'][_0x4f257a]['insertions']);_0x12457c['rootName']=_0x4f257a,_0x12457c['_isAttached']=!_0x35d976||_0x35d976['isAttached'],_0x12457c['isAttached']=()=>_0x12457c['_isAttached'],this['_diffRoots']['set'](_0x4f257a,_0x12457c),this['_diffRootsAttributes']['set'](_0x4f257a,_0x3b7204);const _0x4b7bde=this['_makeIdsRoot'](_0x12457c,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4f257a,_0x4b7bde),_0xcbc20c['set'](_0x4f257a,_0x12457c['isAttached']()?_0x3b7204:{});for(const [_0x2f69de,_0x57b64f]of _0x12457c['markers']){if(!_0x2f69de['startsWith']('revision:'))continue;const _0x562143=_0x2f69de['split'](':')[0x2];for(const _0x308095 of _0x57b64f['getWalker']({'singleCharacters':!0x0})){const _0x52ded7=this['_getVidAttributeName'](_0x308095),_0x367b4f=this['_revisionId']++,_0x557f23='elementEnd'==_0x308095['type']?_0x308095['previousPosition']['path']['slice'](0x0,-0x1):_0x308095['previousPosition']['path'];_0x4b7bde['getNodeByPath'](_0x557f23)['_setAttribute'](_0x52ded7,_0x367b4f),this['_touched']['set'](_0x367b4f,{'userId':_0x562143});}_0x12457c['markers']['delete'](_0x2f69de);}for(const _0x4b9f80 of this['editor']['model']['createRangeIn'](_0x12457c)['getWalker']({'singleCharacters':!0x0})){const _0xa5ce01=this['_getVidAttributeName'](_0x4b9f80),_0x4bae7c='elementEnd'==_0x4b9f80['type']?_0x4b9f80['previousPosition']['path']['slice'](0x0,-0x1):_0x4b9f80['previousPosition']['path'],_0x7ab245=_0x4b7bde['getNodeByPath'](_0x4bae7c);_0x7ab245['getAttribute'](_0xa5ce01)>0x0||_0x7ab245['_setAttribute'](_0xa5ce01,_0x33057a[_0x43f5e9++]);}for(const [_0x226656,_0x157d61]of _0x12457c['markers'])_0x226656['startsWith']('revision:')||this['_markers']['set'](_0x226656,_0x157d61);}const {roots:_0x4d7afc}=this['_savedMetaData']['get'](_0x2f6dbf['fromVersion']),{roots:_0x2a8bcb}=this['_savedMetaData']['get'](_0x2f6dbf['toVersion']),_0x59b47a=x(_0x4d7afc['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x59b47a),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x59b47a,Number['NEGATIVE_INFINITY']));const _0x45a502=x(_0x2a8bcb['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x45a502),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x45a502));const _0xadc73d=Array['from'](this['_diffRoots'])['map'](([_0x10ded6,_0x312e79])=>[_0x10ded6,x(_0x312e79)]);this['_saveMetaData'](this['_lastTo'],_0xadc73d,this['_markers'],_0xcbc20c);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x836873,_0x4da406,_0xab0599,_0x122a46){const _0x4b81af=new Map(_0x4da406),_0x1340fc=new Map(_0x24b057(_0x122a46)),_0x1ca9bc=new Map();for(const [_0x4bc76f,_0x17a3d1]of _0xab0599)_0x1ca9bc['set'](_0x4bc76f,{'start':_0x17a3d1['start']['clone'](),'end':_0x17a3d1['end']['clone'](),'rootName':_0x17a3d1['root']['rootName']});this['_savedMetaData']['set'](_0x836873,{'roots':_0x4b81af,'markers':_0x1ca9bc,'rootsAttributes':_0x1340fc});}['_removeMetaData'](_0xc5b732){this['_savedMetaData']['delete'](_0xc5b732);}['_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'](_0x590b24,_0x481899=null){let _0x3c75dc=null;_0x590b24['is']('documentFragment')||(_0x3c75dc=new _0xf20b09(_0x590b24['name'],{'vid_start':null===_0x481899?this['_revisionId']++:_0x481899++}));const _0x1baa6d=[];for(const _0x98043d of _0x590b24['getChildren']())if(_0x98043d['is']('element')){_0x1baa6d['push'](this['_makeIdsRoot'](_0x98043d,_0x481899));const _0x1eab90=_0x1baa6d[_0x1baa6d['length']-0x1];null!==_0x481899&&(_0x481899=_0x1eab90['is']('element','$text')?_0x1eab90['getAttribute']('vid')+0x1:_0x1eab90['getAttribute']('vid_end')+0x1);}else{for(let _0xed5427=0x0;_0xed5427<_0x98043d['offsetSize'];_0xed5427++)_0x1baa6d['push'](new _0xf20b09('$text',{'vid':null===_0x481899?this['_revisionId']++:_0x481899++}));}if(_0x590b24['is']('documentFragment')){const _0x33c1fe=N(_0x590b24['rootName']);return _0x33c1fe['_insertChild'](0x0,_0x1baa6d),_0x33c1fe;}return _0x3c75dc['_setAttribute']('vid_end',null===_0x481899?this['_revisionId']++:_0x481899++),_0x3c75dc['_insertChild'](0x0,_0x1baa6d),_0x3c75dc;}['_calculateMetaData'](_0xecfd32,_0x53f3dc,_0x5a2ccc){this['_reset']();const {roots:_0x1f974d,markers:_0x5ee3e0,rootsAttributes:_0x2509a6}=this['_savedMetaData']['get'](_0xecfd32);this['_baseRoots']=new Map(_0x1f974d),this['_baseRootsAttributes']=new Map(_0x24b057(_0x2509a6));for(const [_0x2530c4,_0x4cc97d]of this['_baseRoots'])if('$graveyard'!==_0x2530c4&&(this['_diffRoots']['set'](_0x2530c4,x(_0x4cc97d)),this['_diffRootsAttributes']=new Map(_0x24b057(_0x2509a6)),_0x5a2ccc)){const _0xb24d5a=this['_revisionId'];this['_idsRoots']['set'](_0x2530c4,this['_makeIdsRoot'](_0x4cc97d)),this['_baseIdsRoots']['set'](_0x2530c4,this['_makeIdsRoot'](_0x4cc97d,_0xb24d5a));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x5a2ccc&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x36ef0b,_0x2977f1]of _0x5ee3e0){const _0xf533b=this['_baseRoots']['get'](_0x2977f1['rootName']),_0x213e06=this['_diffRoots']['get'](_0x2977f1['rootName']),_0x1028ed=new _0x229d78(this['_fixPosition'](_0x2977f1['start'],_0xf533b),this['_fixPosition'](_0x2977f1['end'],_0xf533b)),_0x2e3945=this['_fixRange'](_0x1028ed,_0x213e06);_0xf533b['markers']['set'](_0x36ef0b,_0x1028ed),this['_markers']['set'](_0x36ef0b,_0x2e3945);}this['_applyOperations'](_0xecfd32,_0x53f3dc,_0x5a2ccc);}['_applyOperations'](_0x8586bd,_0x530129,_0x5bce6a){for(const _0x475612 of this['source']['getOperations'](_0x8586bd,_0x530129))this['_handleOperation'](_0x475612,_0x5bce6a);for(const _0x31ed96 of this['_diffRoots']['values']())_0x31ed96['markers']['clear']();for(const [_0x349179,_0x2c8e73]of this['_markers']){this['_diffRoots']['get'](_0x2c8e73['root']['rootName'])['markers']['set'](_0x349179,_0x2c8e73['clone']());}const _0x596f63=new Map(),_0x243a2e=new Map();for(const [_0x4edd85,_0x298ab3]of this['_diffRoots'])_0x596f63['set'](_0x4edd85,x(_0x298ab3)),_0x243a2e['set'](_0x4edd85,this['_diffRootsAttributes']['get'](_0x4edd85));this['_saveMetaData'](_0x530129,_0x596f63,this['_markers'],_0x243a2e);}['_getPreviousFrom'](_0x43502d){const _0x4aa00a=Array['from'](this['_savedMetaData']['keys']());_0x4aa00a['sort']((_0x428d8f,_0x5233da)=>_0x428d8f-_0x5233da),_0x4aa00a['reverse']();for(const _0x1b2f9a of _0x4aa00a)if(_0x1b2f9a<_0x43502d)return _0x1b2f9a;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x16b68c,_0x346af0){const _0x108204=Array['from'](_0x346af0['markers'])['map'](([_0x56a695,_0x3170b3])=>[_0x56a695,this['_fixRange'](_0x3170b3,_0x16b68c)]);_0x16b68c['markers']=new Map(_0x108204);}['_transformMarkers'](_0x29c82b){for(const _0x3ea3b9 of this['_markers']['values']()){const _0x5bd8d5=_0x3ea3b9['getTransformedByOperation'](_0x29c82b),_0x2d9ae2=_0x229d78['_createFromRanges'](_0x5bd8d5);_0x3ea3b9['start']=_0x2d9ae2['start'],_0x3ea3b9['end']=_0x2d9ae2['end'];}}['_handleOperation'](_0x31d154,_0x3afef2){if('addRoot'!=_0x31d154['type']&&'detachRoot'!=_0x31d154['type']){if('insert'==_0x31d154['type']){const _0xb536f9=_0x31d154['position']['root']['rootName'];this['_diffRoots']['has'](_0xb536f9)||(this['_diffRoots']['set'](_0xb536f9,N(_0xb536f9,!0x0)),this['_diffRootsAttributes']['set'](_0xb536f9,{}),_0x3afef2&&this['_idsRoots']['set'](_0xb536f9,N(_0xb536f9,!0x0)));}else{if('addRootAttribute'==_0x31d154['type']||'removeRootAttribute'==_0x31d154['type']||'changeRootAttribute'==_0x31d154['type'])return void this['_handleRootAttributeOperation'](_0x31d154);'marker'==_0x31d154['type']&&this['_handleMarkerOperation'](_0x31d154);}if('marker'!==_0x31d154['type']){const _0x3e126c=this['_cloneOperation'](_0x31d154,this['_diffRoots']);_0x3e126c['_execute'](),this['_transformMarkers'](_0x3e126c);}if(_0x3afef2)switch(_0x31d154['type']){case'insert':this['_handleInsertOperation'](_0x31d154);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x31d154);break;case'merge':this['_handleMergeOperation'](_0x31d154);break;case'split':this['_handleSplitOperation'](_0x31d154);}}else this['_handleRootOperation'](_0x31d154,_0x3afef2);}['_cloneOperation'](_0x36f83a,_0x9e3508){const _0x1725aa=_0x36f83a['clone']();return _0x1725aa['_authorId']=_0x36f83a['_authorId'],this['_fixOperation'](_0x1725aa,_0x9e3508),_0x1725aa;}['_getBaseVids'](_0x2b4b51){return _0x2b4b51['map'](_0x4b9f7f=>{const _0x2f4b5b=this['_getVidAttributeName'](_0x4b9f7f);return Number(_0x4b9f7f['item']['getAttribute'](_0x2f4b5b));});}['_generateTape'](_0x22cd37,_0x22aada){if(_0x22cd37['is']('element','$text'))_0x22aada['push']({'item':_0x22cd37,'type':'text'});else{_0x22cd37['is']('element')&&_0x22aada['push']({'item':_0x22cd37,'type':'elementStart'});for(const _0x82ebb7 of _0x22cd37['getChildren']())this['_generateTape'](_0x82ebb7,_0x22aada);_0x22cd37['is']('element')&&_0x22aada['push']({'item':_0x22cd37,'type':'elementEnd'});}return _0x22aada;}['_getState'](){const _0x28e846=new Map(this['_touched']),_0x5203ef=new Map(_0x28e846),_0x34a1b9=new Map(),_0x225846={'insertions':{},'deletions':{}},_0x4b7065={'insertions':{},'deletions':{}},_0x3130bb=new Map(),_0x285056=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x285056['delete']('$graveyard');for(const _0x5f08b4 of _0x285056){const _0x4658f2=this['_diffRoots']['get'](_0x5f08b4)||N(_0x5f08b4,!0x1),_0x303848=this['_baseRoots']['get'](_0x5f08b4)||N(_0x5f08b4,!0x1);_0x4658f2['isAttached']()||_0x303848['isAttached']()?(_0x225846['insertions'][_0x5f08b4]=x(_0x4658f2),_0x225846['deletions'][_0x5f08b4]=x(_0x303848),this['_copyMarkers'](_0x225846['deletions'][_0x5f08b4],_0x303848),this['_copyMarkers'](_0x225846['insertions'][_0x5f08b4],_0x4658f2),_0x4b7065['insertions'][_0x5f08b4]=this['_generateTape'](this['_idsRoots']['get'](_0x5f08b4),[]),_0x4b7065['deletions'][_0x5f08b4]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5f08b4)||N(_0x5f08b4,!0x1),[])):_0x285056['delete'](_0x5f08b4);}for(const _0x1c8dc1 of _0x285056){const _0x460c4a=_0x4b7065['insertions'][_0x1c8dc1];for(const _0x266cc7 of _0x460c4a){const _0x5de8e0=this['_getVidAttributeName'](_0x266cc7),_0xc50e05=_0x266cc7['item']['getAttribute'](_0x5de8e0);_0x5203ef['delete'](_0xc50e05),_0xc50e05>=this['_startingRevisionId']&&_0x34a1b9['set'](_0xc50e05,_0x28e846['get'](_0xc50e05));}}for(const _0x32b373 of _0x285056){const _0x57a659=_0x4b7065['insertions'][_0x32b373],_0x5f15fe=this['_getBaseVids'](_0x4b7065['deletions'][_0x32b373]);let _0x2ced15=0x0;for(const _0x5e8a7a of _0x57a659){const _0x3ac64c=this['_getVidAttributeName'](_0x5e8a7a),_0x37c6fc=_0x5e8a7a['item']['getAttribute'](_0x3ac64c);if(!_0x34a1b9['has'](_0x37c6fc)&&!_0x3130bb['has'](_0x37c6fc)){if(_0x5203ef['has'](_0x37c6fc))_0x2ced15++;else{if(_0x37c6fc!=_0x5f15fe[_0x2ced15]){const _0x34680d=_0x28e846['get'](_0x37c6fc)||_0x28e846['get'](_0x5f15fe[_0x2ced15]);for(;_0x37c6fc!=_0x5f15fe[_0x2ced15];)_0x5203ef['has'](_0x5f15fe[_0x2ced15])||(_0x3130bb['set'](_0x5f15fe[_0x2ced15],_0x34680d),_0x28e846['set'](_0x5f15fe[_0x2ced15],_0x34680d)),_0x2ced15++;}_0x2ced15++;}}}}for(const _0x5b87de of _0x285056){const _0x53a9c6=_0x4b7065['insertions'][_0x5b87de];for(const _0x54c9f8 of _0x53a9c6){const _0x15e6b4=this['_getVidAttributeName'](_0x54c9f8),_0x5bbba5=_0x54c9f8['item']['getAttribute'](_0x15e6b4);if(_0x3130bb['has'](_0x5bbba5)){const _0x1cd8fe=_0x3130bb['get'](_0x5bbba5);_0x5203ef['has'](_0x5bbba5)||_0x5203ef['set'](_0x5bbba5,{..._0x1cd8fe}),_0x34a1b9['set'](_0x5bbba5,{..._0x1cd8fe});}}}for(const _0x8e78e8 of _0x5203ef['keys']())_0x8e78e8>=this['_startingRevisionId']&&_0x5203ef['delete'](_0x8e78e8);const _0x5439cd=new Map();for(const _0x23d0df of _0x285056){let _0x549b2d=_0x4b7065['insertions'][_0x23d0df];for(const _0x4c6b36 of _0x549b2d)if(_0x4c6b36['item']['is']('element','tableCell')){const _0x50a8b4=this['_getVidAttributeName'](_0x4c6b36),_0x52638d=_0x4c6b36['item']['getAttribute'](_0x50a8b4);if(_0x34a1b9['has'](_0x52638d)){const _0x10b1a3=_0x4c6b36['item']['parent']['parent']['getAttribute']('vid_start'),_0x9f1e6f=_0x5439cd['get'](_0x10b1a3)||new Set();_0x9f1e6f['add'](_0x34a1b9['get'](_0x52638d)['userId']),_0x5439cd['set'](_0x10b1a3,_0x9f1e6f);}}_0x549b2d=_0x4b7065['deletions'][_0x23d0df];for(const _0x4a9695 of _0x549b2d)if(_0x4a9695['item']['is']('element','tableCell')){const _0x35a9ed=this['_getVidAttributeName'](_0x4a9695),_0x574b73=_0x4a9695['item']['getAttribute'](_0x35a9ed);if(_0x5203ef['has'](_0x574b73)){const _0x325617=_0x4a9695['item']['parent']['parent']['getAttribute']('vid_start'),_0x316a33=_0x5439cd['get'](_0x325617)||new Set();_0x316a33['add'](_0x5203ef['get'](_0x574b73)['userId']),_0x5439cd['set'](_0x325617,_0x316a33);}}for(const _0x3b563c of _0x5439cd['keys']())(_0x34a1b9['has'](_0x3b563c)||_0x5203ef['has'](_0x3b563c))&&_0x5439cd['delete'](_0x3b563c);}for(const _0x4f9355 of _0x285056){const _0x363574=_0x4b7065['insertions'][_0x4f9355];let _0xfc2c89=null,_0x3d00c3=null;for(const _0x5b57d3 of _0x363574){const _0x3d6575=this['_getVidAttributeName'](_0x5b57d3),_0x147c50=_0x5b57d3['item']['getAttribute'](_0x3d6575),_0x282c3f=_0x5439cd['get'](_0x147c50);_0x282c3f&&'elementStart'==_0x5b57d3['type']&&(_0xfc2c89=Array['from'](_0x282c3f)[0x0],_0x3d00c3=_0x5b57d3['item']['getAttribute']('vid_end')),_0xfc2c89&&(_0x5203ef['set'](_0x147c50,{'userId':_0xfc2c89}),_0x34a1b9['set'](_0x147c50,{'userId':_0xfc2c89})),_0x147c50==_0x3d00c3&&(_0xfc2c89=null,_0x3d00c3=null);}}const _0x157b75={},_0x23caee=new Set();for(const _0x7ccb0d of _0x285056){const _0x48c11f=_0x225846['deletions'][_0x7ccb0d],_0x48c7ea=_0x225846['insertions'][_0x7ccb0d];for(const {userId:_0x49c3f8}of this['_touchedMarkers']['values']())null!==_0x49c3f8&&_0x23caee['add'](_0x49c3f8);for(const {userId:_0x52de9d}of this['_touchedRoots']['values']())null!==_0x52de9d&&_0x23caee['add'](_0x52de9d);this['_markChanges'](_0x48c7ea,_0x4b7065['insertions'][_0x7ccb0d],_0x34a1b9,'insertion',_0x23caee),this['_markChanges'](_0x48c11f,_0x4b7065['deletions'][_0x7ccb0d],_0x5203ef,'deletion',_0x23caee),_0x157b75[_0x7ccb0d]={'insertions':this['_prepareViewToSave'](_0x48c7ea),'deletions':this['_prepareViewToSave'](_0x48c11f),'attachChange':this['_touchedRoots']['get'](_0x7ccb0d)||null,'attributesBefore':_0x24b057(this['_baseRootsAttributes']['get'](_0x7ccb0d))||{},'attributesAfter':_0x24b057(this['_diffRootsAttributes']['get'](_0x7ccb0d))};}return{'diffData':_0x157b75,'authorsIds':Array['from'](_0x23caee)};}['_processRootBeforeSave'](_0x393c28){for(const [,_0x61b2b0]of _0x393c28['markers']){const _0xb12ab2=_0x61b2b0['start']['getAncestors']()['filter'](_0x630670=>'tableCell'==_0x630670['name']);for(const _0x37f1bd of _0xb12ab2)0x1==_0x37f1bd['childCount']&&_0x37f1bd['getChild'](0x0)['is']('element','paragraph')&&_0x37f1bd['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2aa995){this['_processRootBeforeSave'](_0x2aa995);const _0xa5fc21=this['editor']['data']['toView'](_0x2aa995,{}),_0x44f291=Array['from'](_0xa5fc21['getChildren']())['map'](_0x4d546f=>this['_getViewJson'](_0x4d546f));return JSON['stringify'](_0x44f291);}['_getViewJson'](_0x3e43c4){if(_0x3e43c4['is']('$text'))return _0x3e43c4['data'];{const _0x2cb12f=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x117378=_0x3e43c4,_0xe90b26=this['editor']['data']['htmlProcessor']['domConverter'],_0x34a948={'type':_0x2cb12f['_getTypeCharForViewElement'](_0x117378),'name':_0x117378['name'],'attributes':Array['from'](_0x117378['getAttributes']()),'children':Array['from'](_0x117378['getChildren']())['map'](_0x5a0b7c=>this['_getViewJson'](_0x5a0b7c))};if(_0x3e43c4['is']('uiElement')&&'$comment'!=_0x3e43c4['name']){const _0x403ed1=_0x3e43c4['render'](_0xe90b26['domDocument'],_0xe90b26);_0x34a948['children']['push'](_0x403ed1['outerHTML']);}else{if(_0x3e43c4['is']('rawElement')){const _0x20852e=_0xe90b26['domDocument']['createElement'](_0x117378['name']);_0x3e43c4['render'](_0x20852e,_0xe90b26),_0x34a948['children']['push'](_0x20852e['innerHTML']);}}const _0x24684c=Array['from'](_0x117378['getCustomProperties']());_0x24684c['length']>0x0&&(_0x34a948['customProperties']=_0x24684c);const _0x4a6830=_0x117378['getFillerOffset']();return null!==_0x4a6830&&(_0x34a948['fillerOffset']=_0x4a6830),_0x34a948;}}['_markChanges'](_0x459c2b,_0x2823d0,_0x50e0b7,_0x1c46bf,_0x1d529f){let _0x2693ac=null,_0x3bb1d0=null,_0x817351=0x0;const _0x58f931=this['editor']['model'];for(let _0xaea1a9=0x0;_0xaea1a9<_0x2823d0['length'];_0xaea1a9++){const _0x301d1e=this['_getVidAttributeName'](_0x2823d0[_0xaea1a9]),_0x550e6d=_0x2823d0[_0xaea1a9]['item']['getAttribute'](_0x301d1e),_0x5c4aed=_0x50e0b7['get'](_0x550e6d),_0x249894=_0xaea1a9==_0x2823d0['length']-0x1;(!_0x2693ac&&_0x5c4aed&&(_0x2693ac=_0x5c4aed,_0x3bb1d0=_0x2823d0[_0xaea1a9]),_0x2693ac&&(!_0x5c4aed||_0x5c4aed['userId']!=_0x2693ac['userId']))&&(_0x3597bd(_0x5c4aed,P(_0x3bb1d0,_0x459c2b,_0x58f931),P(_0x2823d0[_0xaea1a9],_0x459c2b,_0x58f931)),_0x2693ac=_0x5c4aed||null,_0x3bb1d0=_0x5c4aed?_0x2823d0[_0xaea1a9]:null),_0x2693ac&&_0x249894&&_0x3597bd(_0x5c4aed,P(_0x3bb1d0,_0x459c2b,_0x58f931),V(_0x2823d0[_0xaea1a9],_0x459c2b,_0x58f931));}function _0x3597bd(_0x4e5ff7,_0x30afab,_0x16b162){const _0x4dfd40=_0x2693ac['userId'],_0xd37b35='revision:'+_0x1c46bf+':'+_0x4dfd40+':'+_0x817351++,_0x532a1e=_0x58f931['createRange'](_0x30afab,_0x16b162);_0x459c2b['markers']['set'](_0xd37b35,_0x532a1e),null!==_0x4dfd40&&_0x1d529f['add'](_0x4dfd40);}}['_getVidAttributeName'](_0x159dad){switch(_0x159dad['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x197ff0,_0x3a3d69){_0x197ff0['baseVersion']=null;for(const _0xa02945 in _0x197ff0){const _0x4be941=_0x197ff0[_0xa02945];if(_0x4be941 instanceof _0x3d30d3){const _0x4ceeb6=_0x3a3d69['get'](_0x4be941['root']['rootName']);_0x197ff0[_0xa02945]=this['_fixPosition'](_0x4be941,_0x4ceeb6);}if(_0x4be941 instanceof _0x229d78){const _0x5009d4=_0x3a3d69['get'](_0x4be941['root']['rootName']);_0x197ff0[_0xa02945]=this['_fixRange'](_0x4be941,_0x5009d4);}'root'===_0xa02945&&(_0x197ff0['root']=_0x3a3d69['get'](_0x197ff0['root']['rootName']));}}['_fixRange'](_0x38c087,_0x35c6de){return this['editor']['model']['createRange'](this['_fixPosition'](_0x38c087['start'],_0x35c6de),this['_fixPosition'](_0x38c087['end'],_0x35c6de));}['_fixPosition'](_0x51fc93,_0x1cbf67){return this['editor']['model']['createPositionFromPath'](_0x1cbf67,_0x51fc93['path'],_0x51fc93['stickiness']);}['_handleInsertOperation'](_0x24ab40){const _0x2973fd=this['_idsRoots']['get'](_0x24ab40['position']['root']['rootName']),_0x4c5412=this['_fixPosition'](_0x24ab40['position'],_0x2973fd),_0x624244=null===_0x24ab40['_authorId']?null:_0x24ab40['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3647e8=_0x4c5412['parent'],_0x3c936c=this['_revisionId'],_0x2a405f=[];for(const _0x3b871f of _0x24ab40['nodes'])if(_0x3b871f['is']('element'))_0x2a405f['push'](this['_makeIdsRoot'](_0x3b871f));else{for(let _0x543239=0x0;_0x543239<_0x3b871f['offsetSize'];_0x543239++)_0x2a405f['push'](new _0xf20b09('$text',{'vid':this['_revisionId']++}));}const _0x1505eb=this['_revisionId'];for(let _0x40f4c1=_0x3c936c;_0x40f4c1<_0x1505eb;_0x40f4c1++)this['_touched']['set'](_0x40f4c1,{'userId':_0x624244});_0x3647e8['_insertChild'](_0x4c5412['offset'],_0x2a405f);}['_handleMoveOperation'](_0x4b55dd){(_0x4b55dd=this['_cloneOperation'](_0x4b55dd,this['_idsRoots']))['_execute']();const _0x4a2a00=null===_0x4b55dd['_authorId']?null:_0x4b55dd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3dd2f6=_0x4b55dd['getMovedRangeStart'](),_0x421e60=_0x3dd2f6['parent'],_0x119a0f=_0x3dd2f6['offset'];!function _0x1902ac(_0x13aeef,_0x59b421,_0x1a4d17,_0x40cba3){for(let _0x50c0a3=_0x1a4d17;_0x50c0a3<_0x40cba3;_0x50c0a3++){const _0x39721c=_0x59b421['getChild'](_0x50c0a3);_0x39721c['is']('element','$text')?_0x13aeef['set'](_0x39721c['getAttribute']('vid'),{'userId':_0x4a2a00}):(_0x13aeef['set'](_0x39721c['getAttribute']('vid_start'),{'userId':_0x4a2a00}),_0x1902ac(_0x13aeef,_0x39721c,0x0,_0x39721c['childCount']),_0x13aeef['set'](_0x39721c['getAttribute']('vid_end'),{'userId':_0x4a2a00}));}}(this['_touched'],_0x421e60,_0x119a0f,_0x119a0f+_0x4b55dd['howMany']);}['_handleMergeOperation'](_0x1e5662){const _0x731829=null===(_0x1e5662=this['_cloneOperation'](_0x1e5662,this['_idsRoots']))['_authorId']?null:_0x1e5662['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x42e3b0=_0x1e5662['targetPosition']['parent'],_0x3a0293=_0x1e5662['sourcePosition']['parent'],_0xc3282e=_0x42e3b0['getAttribute']('vid_end'),_0x14bffa=_0x3a0293['getAttribute']('vid_start');_0x42e3b0['_setAttribute']('vid_end',_0x3a0293['getAttribute']('vid_end')),_0x3a0293['_setAttribute']('vid_end',_0xc3282e),this['_touched']['set'](_0x14bffa,{'userId':_0x731829}),this['_touched']['set'](_0xc3282e,{'userId':_0x731829}),_0x1e5662['_execute']();}['_handleSplitOperation'](_0x300f76){const _0x252404=null===(_0x300f76=this['_cloneOperation'](_0x300f76,this['_idsRoots']))['_authorId']?null:_0x300f76['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1ba9f1=_0x300f76['graveyardPosition'],_0xef7737=_0x300f76['splitPosition']['parent'];_0x300f76['_execute']();const _0x3e203=_0xef7737['getAttribute']('vid_end'),_0x403a3a=_0x300f76['insertionPosition']['nodeAfter'];if(_0x1ba9f1){const _0x41454c=_0x403a3a['getAttribute']('vid_end'),_0x85c529=_0xef7737['getAttribute']('vid_end');_0xef7737['_setAttribute']('vid_end',_0x41454c),_0x403a3a['_setAttribute']('vid_end',_0x85c529),this['_touched']['set'](_0xef7737['getAttribute']('vid_end'),{'userId':_0x252404}),this['_touched']['set'](_0x403a3a['getAttribute']('vid_start'),{'userId':_0x252404});}else{const _0x350b19=this['_revisionId']++,_0x4c6d20=this['_revisionId']++;_0xef7737['_setAttribute']('vid_end',_0x350b19),_0x403a3a['_setAttribute']('vid_start',_0x4c6d20),_0x403a3a['_setAttribute']('vid_end',_0x3e203),this['_touched']['set'](_0x350b19,{'userId':_0x252404}),this['_touched']['set'](_0x4c6d20,{'userId':_0x252404});}}['_handleMarkerOperation'](_0x1538b3){if(!_0x1538b3['affectsData'])return;const _0x8d8969=(_0x1538b3=this['_cloneOperation'](_0x1538b3,this['_diffRoots']))['oldRange']?_0x1538b3['oldRange']['root']:null,_0x17a94c=_0x1538b3['newRange']?_0x1538b3['newRange']['root']:null;_0x8d8969&&this['_markers']['delete'](_0x1538b3['name']),_0x17a94c&&this['_markers']['set'](_0x1538b3['name'],_0x1538b3['newRange']['clone']());const _0x583d15=null===_0x1538b3['_authorId']?null:_0x1538b3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53327c=_0x1538b3['name'];if(!this['_touchedMarkers']['has'](_0x53327c))return void this['_touchedMarkers']['set'](_0x53327c,{'range':_0x1538b3['oldRange'],'userId':_0x583d15});const _0x5707f5=this['_touchedMarkers']['get'](_0x53327c),_0x2b7db5=_0x5707f5['range'],_0x6bf1f2=_0x1538b3['newRange'];null==_0x2b7db5&&null==_0x6bf1f2||_0x2b7db5&&_0x6bf1f2&&_0x2b7db5['isEqual'](_0x6bf1f2)?this['_touchedMarkers']['delete'](_0x1538b3['name']):_0x5707f5['userId']=_0x583d15;}['_handleRootOperation'](_0x38a975,_0x1d9c02){this['_diffRoots']['has'](_0x38a975['rootName'])?this['_diffRoots']['get'](_0x38a975['rootName'])['_isAttached']=_0x38a975['isAdd']:(this['_diffRoots']['set'](_0x38a975['rootName'],N(_0x38a975['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x38a975['rootName'],{}),_0x1d9c02&&this['_idsRoots']['set'](_0x38a975['rootName'],N(_0x38a975['rootName'],!0x0)));const _0x3638fd=null===_0x38a975['_authorId']?null:_0x38a975['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x511d4b=this['_touchedRoots']['get'](_0x38a975['rootName']);_0x511d4b&&_0x511d4b['userId']===_0x3638fd?this['_touchedRoots']['delete'](_0x38a975['rootName']):this['_touchedRoots']['set'](_0x38a975['rootName'],{'userId':_0x3638fd,'isAttached':_0x38a975['isAdd']});}['_handleRootAttributeOperation'](_0x56c2db){const _0x447038=this['_diffRootsAttributes']['get'](_0x56c2db['root']['rootName']);null===_0x56c2db['newValue']?delete _0x447038[_0x56c2db['key']]:_0x447038[_0x56c2db['key']]=_0x56c2db['newValue'];}}function x(_0x2e43d5){const _0xf9f15b=N(_0x2e43d5['rootName'],_0x2e43d5['isAttached']());for(const _0x19ab95 of _0x2e43d5['getChildren']()){const _0x20d585=_0x19ab95['_clone'](!0x0);_0xf9f15b['_appendChild'](_0x20d585);}return _0xf9f15b;}function N(_0x1de5ce,_0x3f21b1=!0x0){const _0x1bea04=new _0x5439d1();return _0x1bea04['rootName']=_0x1de5ce,_0x1bea04['_isAttached']=_0x3f21b1,_0x1bea04['isAttached']=()=>_0x1bea04['_isAttached'],_0x1bea04;}function P(_0x41dd5b,_0x45003e,_0x2b10b1){const _0x4c6805='elementEnd'==_0x41dd5b['type']?_0x2b10b1['createPositionAt'](_0x41dd5b['item'],'end'):_0x2b10b1['createPositionBefore'](_0x41dd5b['item']);return _0x2b10b1['createPositionFromPath'](_0x45003e,_0x4c6805['path'],_0x4c6805['stickiness']);}function V(_0x371201,_0x325109,_0x14c13e){const _0x16753c='elementStart'==_0x371201['type']?_0x14c13e['createPositionAt'](_0x371201['item'],0x0):_0x14c13e['createPositionAfter'](_0x371201['item']);return _0x14c13e['createPositionFromPath'](_0x325109,_0x16753c['path'],_0x16753c['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x2237ba(_0x3e0b15){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x461ca7,_0x48c952){super(_0x461ca7),this['focusTracker']=new _0x51ad5c(),this['keystrokes']=new _0x137948(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x48c952),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'](),_0x28e64e({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x13ad14=_0x27475b=>_0x27475b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x13ad14),this['keystrokes']['set']('arrowleft',_0x13ad14),this['keystrokes']['set']('arrowup',_0x13ad14),this['keystrokes']['set']('arrowdown',_0x13ad14);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x5d11a6){this['revisionNameInputView']['fieldView']['element']['value']=_0x5d11a6['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x24ba39){const _0x8950d6=new ti(this['locale'],_0x4ca011),_0x26dcbf=_0x8950d6['fieldView'];_0x26dcbf['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x44b2e0=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x24ba39&&(_0x44b2e0+='\x20('+m(this['locale'],'optional')+')'),(_0x8950d6['label']=_0x44b2e0,_0x26dcbf['on']('input',()=>{this['revisionNameInputValue']=_0x26dcbf['element']['value']['trim']();}),_0x8950d6);}}class l extends _0x38f444{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x343040=this['editor'],_0x25517e=_0x343040['plugins']['get']('RevisionTracker');_0x343040['ui']['componentFactory']['add']('revisionHistory',_0x3bbfa5=>{const _0x229a91=_0x54c274(_0x3bbfa5),_0x5ebe44=_0x229a91['panelView']['children'],_0x4054b4=new _0x17bef3(_0x3bbfa5),_0x1e7f2a=new _0x33aa7a(_0x3bbfa5),_0x268eb3=this['_createSaveRevisionButton'](_0x1dcc9b),_0x148e73=new _0x33aa7a(_0x3bbfa5),_0x33f8f2=this['_createOpenRevisionButton'](_0x1dcc9b);return _0x229a91['bind']('isEnabled')['to'](_0x25517e,'isReady',_0x25517e,'isEnabled',_0x343040,'isReadOnly',(_0x229a51,_0x42b7f0,_0x1b00e5)=>_0x229a51&&_0x42b7f0&&!_0x1b00e5),_0x229a91['buttonView']['set']({'icon':_0x46dbf8,'label':m(_0x3bbfa5,'Revision\x20history'),'tooltip':!0x0}),_0x268eb3['set']({'withText':!0x0,'role':'menuitem'}),_0x33f8f2['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x33f8f2,'execute',()=>{_0x229a91['isOpen']=!0x1,_0x343040['editing']['view']['focus']();},{'priority':'low'}),_0x1e7f2a['children']['add'](_0x268eb3),_0x148e73['children']['add'](_0x33f8f2),_0x4054b4['role']='menu',_0x4054b4['items']['addMany']([_0x1e7f2a,_0x148e73]),_0x5ebe44['add'](_0x4054b4),_0x229a91;}),_0x343040['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x523f5a=this['editor'],_0x458647=_0x523f5a['locale'],_0x737b6a=_0x523f5a['plugins']['get']('RevisionTracker'),_0x11e784=new _0xb326f9(_0x458647),_0x5aad7f=new _0x34f0da(_0x458647);_0x11e784['bind']('isEnabled')['to'](_0x737b6a,'isReady',_0x737b6a,'isEnabled',_0x523f5a,'isReadOnly',(_0x59e760,_0x1730e9,_0x2baa9e)=>_0x59e760&&_0x1730e9&&!_0x2baa9e),_0x11e784['buttonView']['set']({'icon':_0x46dbf8,'label':m(_0x458647,'Revision\x20history')});const _0x42e152=new _0x2ea1e2(_0x458647,_0x11e784),_0x3ef310=this['_createSaveRevisionButton'](_0x54a271);_0x3ef310['delegate']('execute')['to'](_0x11e784),_0x42e152['children']['add'](_0x3ef310),_0x5aad7f['items']['add'](_0x42e152);const _0x5dffef=new _0x2ea1e2(_0x458647,_0x11e784),_0x58da9c=this['_createOpenRevisionButton'](_0x54a271);return _0x58da9c['delegate']('execute')['to'](_0x11e784),_0x5dffef['children']['add'](_0x58da9c),_0x5aad7f['items']['add'](_0x5dffef),_0x11e784['panelView']['children']['add'](_0x5aad7f),_0x11e784;}['_createSaveRevisionButton'](_0x1baa59){const _0x58ec6b=this['editor'],_0x4c375d=_0x58ec6b['plugins']['get']('RevisionTracker'),_0x2e2401=new _0x1baa59(_0x58ec6b['locale']);return _0x2e2401['set']({'label':m(_0x58ec6b['locale'],'Save\x20current\x20revision')}),_0x2e2401['bind']('isEnabled')['to'](_0x4c375d,'isReady',_0x4c375d,'isEnabled',_0x58ec6b,'isReadOnly',(_0x327779,_0x29c046,_0x12271d)=>_0x327779&&_0x29c046&&!_0x12271d),this['listenTo'](_0x2e2401,'execute',()=>{this['_showDialog']();}),_0x2e2401;}['_createOpenRevisionButton'](_0x3370e6){const _0x1232e1=this['editor'],_0x2d10cd=_0x1232e1['plugins']['get']('RevisionTracker'),_0x334bd9=new _0x3370e6(_0x1232e1['locale']);return _0x334bd9['set']({'label':m(_0x1232e1['locale'],'Open\x20revision\x20history')}),_0x334bd9['bind']('isEnabled')['to'](_0x2d10cd,'isReady',_0x1232e1,'isReadOnly',(_0x2d0a11,_0x33a2d9)=>_0x2d0a11&&!_0x33a2d9),this['listenTo'](_0x334bd9,'execute',()=>{_0x1232e1['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x334bd9;}['_showDialog'](){const _0x40b7a9=this['editor'],_0x18feb8=_0x40b7a9['locale'],_0x107828=_0x40b7a9['plugins']['get']('Dialog'),_0x23df16=_0x40b7a9['plugins']['get']('RevisionTracker');function _0x412ab1(_0x292440){_0x40b7a9['config']['get']('revisionHistory.requireRevisionName')&&''===_0x292440['revisionName']?_0x292440['revisionNameInputView']['errorText']=m(_0x18feb8,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x40b7a9['plugins']['get'](h)['saveRevision']({'name':_0x292440['revisionName']}),_0x107828['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x412ab1(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x107828['show']({'id':'revisionSave','title':m(_0x18feb8,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x40b7a9['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x107828['hide']()},{'label':m(_0x40b7a9['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x2f1993){_0x2f1993['bind']('isEnabled')['to'](_0x23df16,'isReady',_0x23df16,'isEnabled',_0x40b7a9,'isReadOnly',(_0x5e8d93,_0x25ae63,_0x537b27)=>_0x5e8d93&&_0x25ae63&&!_0x537b27);},'onExecute':()=>_0x412ab1(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3c7e7d=this['editor'],_0x1c0278=_0x3c7e7d['locale'];this['_saveRevisionFormView']=new me(_0x1c0278,_0x3c7e7d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x3e0b15{['changeId'];['_model'];constructor(_0x5ecee2,_0x546699){super(_0x5ecee2),this['_model']=_0x546699,this['changeId']=_0x546699['id'];const _0x376570=this['bindTemplate'],_0x331698=m(_0x5ecee2,_0x546699['data']['isSuggestion']?'Suggested\x20by':'add'==_0x546699['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x546699['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x376570['to']('type',_0x164fd8=>'ck-revision-change__'+_0x164fd8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x331698}]},{'text':'\x20'+_0x546699['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x2cbca0(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x12ca37){super(),this['id']=_0x12ca37['id']||_0x31075e(),this['author']=_0x12ca37['author'],this['type']=_0x12ca37['type'],this['data']=_0x12ca37['data']||{},this['rootName']=_0x12ca37['rootName'],this['set']('createdAt',_0x12ca37['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x126d7b,_0x319b5d){this['newRevisionId']=_0x126d7b,this['oldRevisionId']=_0x319b5d,this['changes']=new _0x5731ed();}['_setChanges'](_0x3492f1){for(const _0x1ed225 of _0x3492f1)this['changes']['add'](_0x1ed225);}}class u extends _0x38f444{['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[_0x3fbc11,_0x4063c6,S,$];}constructor(_0x4b749a){super(_0x4b749a),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',(_0x4fc0d5,_0x2f1eb2,_0x9873fc)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3e0891=>{for(const _0x1ba407 of this['editor']['editing']['view']['document']['roots'])_0x9873fc?_0x3e0891['removeClass']('ck-editor__editable__overlay',_0x1ba407):_0x3e0891['addClass']('ck-editor__editable__overlay',_0x1ba407);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x713eae=>null!==_0x713eae),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x396384,_0x16f752,_0x543b9c)=>_0x396384&&_0x543b9c?_0x16f752['changes']['getIndex'](_0x543b9c):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x26c8a9,_0x3c3cbf)=>_0x26c8a9?_0x3c3cbf['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x4063c6);}['init'](){const _0xeb997=this['editor'],_0x29d762=new ot(_0xeb997,{'direction':'backward'}),_0x43aefb=new ot(_0xeb997,{'direction':'forward'});(_0xeb997['commands']['add']('showPreviousChange',_0x29d762),_0xeb997['commands']['add']('showNextChange',_0x43aefb),_0xeb997['commands']['add']('restoreRevision',new nt(_0xeb997)),this['on']('change:numberOfChanges',()=>{_0x29d762['refresh'](),_0x43aefb['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xeb997['enableReadOnlyMode']('revision-viewer'),_0xeb997['plugins']['has']('WidgetToolbarRepository'))&&_0xeb997['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x3536a8){return await this['_utils']['loadRevisionData'](_0x3536a8,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x3536a8);}async['getRevisionRootsAttributes'](_0x3d4280){return await this['_utils']['loadRevisionData'](_0x3d4280,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3d4280);}async['compare'](_0x10f366,_0x122265,_0x4fe2d8=!0x1){if(!this['isEnabled'])return;const _0x33c99c=this['diff'],_0x48c667=this['repository'],_0x33b401='string'==typeof _0x10f366?_0x48c667['getRevision'](_0x10f366):_0x10f366,_0x4cf01d='string'==typeof _0x122265?_0x48c667['getRevision'](_0x122265):_0x122265,_0x33ea55=_0x33b401['id'],_0x46edf9=_0x4cf01d?_0x4cf01d['id']:null;if(!_0x4fe2d8&&this['diff']&&this['diff']['newRevisionId']===_0x33ea55&&this['diff']['oldRevisionId']===_0x46edf9)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x33ea55,_0x46edf9);const _0x679a87=this['_getRevisionsRange'](_0x33b401,_0x4cf01d,!0x0)['map'](_0x14e33e=>this['_utils']['loadRevisionData'](_0x14e33e,this['adapter']));return _0x679a87['push'](new Promise(_0x493508=>{setTimeout(_0x493508,0x14);})),Promise['all'](_0x679a87)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1d2f6c=this['_getDiff'](_0x33ea55,_0x46edf9);for(const _0x2e4720 of _0x1d2f6c['changes'])this['_changeIdToChange']['set'](_0x2e4720['id'],_0x2e4720);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x596cd4=>{for(const _0xf173ed of this['editor']['model']['document']['getRootNames']())_0x596cd4['detachRoot'](_0xf173ed);for(const _0x59bd0d of Object['keys'](_0x1d2f6c['model'])){const _0x26c95a=_0x596cd4['addRoot'](_0x59bd0d);for(const _0x4c79e4 of Object['keys'](_0x1d2f6c['attributes'][_0x59bd0d]))_0x596cd4['setAttribute'](_0x4c79e4,_0x1d2f6c['attributes'][_0x59bd0d][_0x4c79e4],_0x26c95a);_0x596cd4['insert'](_0x1d2f6c['model'][_0x59bd0d],_0x26c95a,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1d2f6c['changes'])),this['isReady']=!0x0;})['catch'](_0x52741f=>{console['error'](_0x52741f),this['_cleanUp'](),_0x33c99c&&(this['diff']=_0x33c99c),this['isReady']=!0x0;});}['addRevisionData'](_0x4358d7,_0x407c1c){const _0x200bbe=this['repository']['createRevision'](_0x4358d7);return _0x200bbe['on']('_update',(_0x5bbebc,_0x27ff46,_0x3eb9e0)=>_0x407c1c(_0x27ff46,_0x3eb9e0,_0x200bbe)),this['repository']['addRevision'](_0x200bbe),_0x200bbe;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x205c0e=>{for(const _0x4b6127 of this['editor']['model']['document']['getRootNames']())_0x205c0e['detachRoot'](_0x4b6127);});}['_sortAndFilterDiffChanges'](_0xf83bfd){const _0xf34299=[],_0x49f1f4=new Map();for(const _0x19d379 of this['editor']['model']['document']['getRootNames']()){const _0x279cec=this['editor']['editing']['view']['getDomRoot'](_0x19d379);if(!_0x279cec)continue;const _0x2d1b09=_0x279cec['getClientRects']()['item'](0x0);_0x2d1b09&&(_0xf34299['push'](_0x19d379),_0x49f1f4['set'](_0x19d379,_0x2d1b09));}return _0xf34299['sort']((_0x18c4e0,_0x10cfbb)=>{const _0x191a9b=_0x49f1f4['get'](_0x18c4e0),_0xb7bda7=_0x49f1f4['get'](_0x10cfbb);return _0x191a9b['y']-_0xb7bda7['y']||_0x191a9b['x']-_0xb7bda7['x'];}),(_0xf83bfd=_0xf83bfd['filter'](_0x946bb8=>_0xf34299['includes'](_0x946bb8['rootName'])))['sort']((_0x19992d,_0x7950e)=>_0xf34299['indexOf'](_0x19992d['rootName'])-_0xf34299['indexOf'](_0x7950e['rootName'])),_0xf83bfd;}['_makeTape'](_0x2b7c78){const _0x1a27b3=Array['from'](_0x2b7c78['markers'])['filter'](([_0x31f4e5,_0x57fef5])=>_0x31f4e5['startsWith']('revision:')&&!_0x57fef5['isCollapsed']),_0x2d3563=Array['from'](this['editor']['model']['createRangeIn'](_0x2b7c78)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1a27b3['length'])for(const _0x15fa05 of _0x2d3563){const [_0x25348b,_0x334cca]=_0x1a27b3[0x0],[,_0xd7dff0,_0x4cdae1]=_0x25348b['split'](':');if(_0x334cca['end']['isEqual'](_0x15fa05['nextPosition'])&&_0x1a27b3['shift'](),(_0x15fa05['previousPosition']['isEqual'](_0x334cca['start'])||_0x15fa05['previousPosition']['isAfter'](_0x334cca['start']))&&('insertion'==_0xd7dff0?_0x15fa05['isAdded']={'userId':_0x4cdae1}:'deletion'==_0xd7dff0&&(_0x15fa05['isRemoved']={'userId':_0x4cdae1})),0x0==_0x1a27b3['length'])break;}return _0x2d3563;}['_refreshStartEndIndex'](_0x56d744){const _0x3fd765=new Map();for(let _0x13c0b3=0x0;_0x13c0b3<_0x56d744['length'];_0x13c0b3++)'text'===_0x56d744[_0x13c0b3]['type']?(_0x56d744[_0x13c0b3]['item']['startIndex']=_0x13c0b3,_0x56d744[_0x13c0b3]['item']['endIndex']=_0x13c0b3):('elementStart'===_0x56d744[_0x13c0b3]['type']?_0x56d744[_0x13c0b3]['item']['startIndex']=_0x13c0b3:'elementEnd'===_0x56d744[_0x13c0b3]['type']&&(_0x56d744[_0x13c0b3]['item']['endIndex']=_0x13c0b3),_0x3fd765['set'](_0x56d744[_0x13c0b3]['id'],_0x13c0b3));for(const _0x1153c6 of _0x3fd765['values']())'elementStart'===_0x56d744[_0x1153c6]['type']?_0x56d744[_0x1153c6]['item']['endIndex']=_0x3fd765['get'](_0x56d744[_0x1153c6]['pairId']):'elementEnd'===_0x56d744[_0x1153c6]['type']&&(_0x56d744[_0x1153c6]['item']['startIndex']=_0x3fd765['get'](_0x56d744[_0x1153c6]['pairId']));}['_processTape'](_0x54489a){for(let _0xec1370=0x0;_0xec1370<_0x54489a['length'];_0xec1370++){if('elementStart'===_0x54489a[_0xec1370]['type'])_0x54489a[_0xec1370]['item']['startIndex']=_0xec1370;else{if('elementEnd'===_0x54489a[_0xec1370]['type']){_0x54489a[_0xec1370]['item']['endIndex']=_0xec1370;const _0x5350c4=_0x54489a[_0xec1370]['item']['startIndex'];_0x54489a[_0x5350c4]['pairId']=_0x54489a[_0xec1370]['id'],_0x54489a[_0xec1370]['pairId']=_0x54489a[_0x5350c4]['id'];}else _0x54489a[_0xec1370]['item']['startIndex']=_0xec1370,_0x54489a[_0xec1370]['item']['endIndex']=_0xec1370,_0x54489a[_0xec1370]['pairId']=null;}_0x54489a[_0xec1370]['markersStart']||(_0x54489a[_0xec1370]['markersStart']=[],_0x54489a[_0xec1370]['markersEnd']=[]);}}['_markInsertions'](_0x527808,_0x2a0c49){const _0x40b3e6=_0x527808['filter'](_0x2fabd7=>!_0x2fabd7['isAdded']);for(let _0x54a23c=0x0;_0x54a23c<_0x2a0c49['length'];_0x54a23c++)_0x2a0c49[_0x54a23c]['isAdded']&&(_0x40b3e6[_0x54a23c]['isAdded']=_0x2a0c49[_0x54a23c]['isAdded']);}['_getDiff'](_0xb86d40,_0x3b7f79=null){const _0x430b2f=this['repository']['getRevision'](_0xb86d40),_0x4e4b4c=_0x3b7f79?this['repository']['getRevision'](_0x3b7f79):null,_0x576435=this['_getRevisionsRange'](_0x430b2f,_0x4e4b4c),_0x187cc6=_0x576435[_0x576435['length']-0x1],_0x1cac0b=new Map(),_0xff5040={'model':{},'attributes':{},'changes':[]},_0x4640b8=new Set(),_0x52eac5=new Map();for(let _0x5dc97e=_0x576435['length']-0x1;_0x5dc97e>=0x0;_0x5dc97e--){const _0x5e2a8d=_0x576435[_0x5dc97e];for(const _0x2f2350 of Object['keys'](_0x5e2a8d['diffData']))if(_0x5e2a8d['diffData'][_0x2f2350]['attachChange']){const _0x23f409=_0x5e2a8d['diffData'][_0x2f2350]['attachChange'];_0x23f409['isAttached']?(_0x4640b8['add'](_0x2f2350),_0x52eac5['has'](_0x2f2350)&&_0x52eac5['get'](_0x2f2350)['userId']==_0x23f409['userId']?_0x52eac5['delete'](_0x2f2350):_0x52eac5['set'](_0x2f2350,_0x23f409)):_0x52eac5['has'](_0x2f2350)?(_0x4640b8['delete'](_0x2f2350),_0x52eac5['delete'](_0x2f2350)):(_0x4640b8['add'](_0x2f2350),_0x52eac5['set'](_0x2f2350,_0x23f409));}else _0x4640b8['add'](_0x2f2350);}for(const _0x29a189 of _0x4640b8){const _0x555765=_0x52eac5['has'](_0x29a189)&&!_0x52eac5['get'](_0x29a189)['isAttached'];let _0x465a99=_0x555765?_0x576435['length']-0x1:0x0;const _0x375438=_0x555765?-0x1:0x1;for(;_0x576435[_0x465a99];){const _0x4b4cfe=_0x576435[_0x465a99];if(_0x4b4cfe['diffData'][_0x29a189]){const _0x2eeaa5=_0x555765?_0x4b4cfe['diffData'][_0x29a189]['attributesBefore']:_0x4b4cfe['diffData'][_0x29a189]['attributesAfter'];_0xff5040['attributes'][_0x29a189]=_0x2eeaa5?_0x24b057(_0x2eeaa5):{};break;}_0x465a99+=_0x375438;}}for(const _0x38059a of _0x576435){_0x38059a['model']={};for(const _0x10a411 of _0x38059a['authors'])_0x1cac0b['set'](_0x10a411['id'],_0x10a411);for(const _0x32d99a of _0x4640b8){const _0x3f7aa7=_0x38059a['diffData'][_0x32d99a]?_0x38059a['diffData'][_0x32d99a]['insertions']:'[]',_0x650a2c=_0x38059a['diffData'][_0x32d99a]?_0x38059a['diffData'][_0x32d99a]['deletions']:'[]';_0x38059a['model'][_0x32d99a]={'insertions':this['_utils']['_makeModelFromViewString'](_0x3f7aa7),'deletions':this['_utils']['_makeModelFromViewString'](_0x650a2c)};}}for(const _0x2261af of _0x4640b8){let _0x72972d=null,_0x50bb0e=0x0;const _0x58b6a1=new Map(Array['from'](_0x430b2f['model'][_0x2261af]['insertions']['markers'])['filter'](([_0x18a169])=>!_0x18a169['startsWith']('revision:')));let _0x5a77b1=0x0;for(const _0x9a9212 of _0x576435){const _0x11cbc8=this['_makeTape'](_0x9a9212['model'][_0x2261af]['insertions']);_0x9a9212==_0x430b2f?(_0x72972d=_0x11cbc8,_0x50bb0e=_0x72972d['length'],_0x72972d['forEach'](_0x27a433=>{_0x27a433['id']=_0x5a77b1++;}),this['_processTape'](_0x72972d)):this['_markInsertions'](_0x72972d,_0x11cbc8);const _0x16cf66=_0x72972d['filter'](_0x324124=>!_0x324124['isAdded'])['map'](_0x279b9a=>_0x279b9a['id']);let _0x5812e0=0x0;const _0x53867e=this['_makeTape'](_0x9a9212['model'][_0x2261af]['deletions']);_0x53867e['forEach'](_0x4ce0fe=>{_0x4ce0fe['isRemoved']?_0x4ce0fe['id']=_0x50bb0e++:_0x4ce0fe['id']=_0x16cf66[_0x5812e0++];}),this['_processTape'](_0x53867e),this['_setDistance'](_0x72972d,'isAdded'),this['_setDistance'](_0x53867e,'isRemoved'),_0x9a9212==_0x430b2f&&this['_markMarkers'](_0x72972d,_0x58b6a1),_0x72972d=this['_joinTapes'](_0x72972d,_0x53867e),this['_refreshStartEndIndex'](_0x72972d),this['_setDistance'](_0x72972d,'isRemoved');}_0x72972d=_0x72972d['filter'](_0x7d6a98=>!(_0x7d6a98['isAdded']&&_0x7d6a98['isRemoved']));const _0x35285a=new Map(_0x187cc6['model'][_0x2261af]['deletions']['markers']),_0x21da7d=new Set(_0x58b6a1['keys']());for(const _0x4e8d67 of _0x35285a['keys']())_0x21da7d['delete'](_0x4e8d67);this['_markSuggestions'](_0x72972d,_0x21da7d),this['_fixObsoleteTags'](_0x72972d),_0x72972d=this['_removeMissingPairs'](_0x72972d),_0x72972d=this['_markMismatchedRemovedTags'](_0x72972d),_0x72972d=this['_removeUnsupportedChanges'](_0x72972d);const {root:_0xabee02,changes:_0x15ac0d}=this['_makeModelFromTape'](_0x72972d,_0x1cac0b,_0x2261af);_0xff5040['model'][_0x2261af]=_0xabee02;const _0x416b5a=_0x52eac5['get'](_0x2261af);if(_0x416b5a){const _0x57a181=_0x1cac0b['get'](_0x416b5a['userId']),_0x43ec89=new G({'author':_0x57a181,'type':_0x416b5a['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x2261af});_0x15ac0d['unshift'](_0x43ec89),_0xff5040['attributes'][_0x2261af]['revisionHistoryAttachChange']=_0x43ec89['id'];}_0xff5040['changes']=_0xff5040['changes']['concat'](_0x15ac0d);}return _0xff5040;}['_markMarkers'](_0x30a46f,_0x1e3b72){for(let _0x35acb3=0x0;_0x35acb3<_0x30a46f['length'];_0x35acb3++)for(const [_0x18b5f7,_0x2fba58]of _0x1e3b72)!_0x2fba58['isCollapsed']&&_0x2fba58['start']['isEqual'](_0x30a46f[_0x35acb3]['previousPosition'])&&_0x30a46f[_0x35acb3]['markersStart']['push'](_0x18b5f7),_0x2fba58['end']['isEqual'](_0x30a46f[_0x35acb3]['nextPosition'])&&_0x30a46f[_0x35acb3]['markersEnd']['push'](_0x18b5f7);}['_joinTapes'](_0x2e959e,_0x587baa){let _0x3fb402=[],_0x2acefb=0x0,_0x45c560=0x0;for(;_0x2acefb<_0x2e959e['length']||_0x45c560<_0x587baa['length'];){const _0xa05fc6=_0x2e959e[_0x2acefb]||{},_0x2edeb4=_0x587baa[_0x45c560]||{};if(_0xa05fc6['id']==_0x2edeb4['id'])_0x2acefb++,_0x45c560++,_0x3fb402['push'](_0xa05fc6);else{if(_0x2edeb4['isRemoved']&&_0xa05fc6['isAdded']){const {commonTape:_0x34c0ff,iEnd:_0x29547b,jEnd:_0x172355}=this['_threeWayMerge'](_0x2e959e,_0x2acefb,_0x587baa,_0x45c560);_0x3fb402=_0x3fb402['concat'](_0x34c0ff),_0x2acefb=_0x29547b,_0x45c560=_0x172355;}else _0x2edeb4['isRemoved']?(_0x45c560++,_0x3fb402['push'](_0x2edeb4)):(_0x2acefb++,_0x3fb402['push'](_0xa05fc6));}}return _0x3fb402;}['_markSuggestions'](_0x4c23c0,_0xdeca60){const _0x5b11cb=[];for(let _0x5c1b00=0x0;_0x5c1b00<_0x4c23c0['length'];_0x5c1b00++){for(let _0x51e43e=0x0;_0x51e43e<_0x4c23c0[_0x5c1b00]['markersStart']['length'];_0x51e43e++){const _0x1596c4=_0x4c23c0[_0x5c1b00]['markersStart'][_0x51e43e];if(!_0xdeca60['has'](_0x1596c4))continue;const {group:_0x599290,type:_0x137a0c,authorId:_0x5649ff}=_0x3f1a91(_0x1596c4);'revision-suggestion'!=_0x599290||'insertion'!=_0x137a0c&&'deletion'!=_0x137a0c||(_0x5b11cb['unshift']({'type':_0x137a0c,'name':_0x1596c4,'userId':_0x5649ff}),_0x4c23c0[_0x5c1b00]['markersStart']['splice'](_0x51e43e,0x1),_0x51e43e--);}_0x39e219(_0x4c23c0[_0x5c1b00]);for(let _0x38538e=0x0;_0x38538e<_0x4c23c0[_0x5c1b00]['markersEnd']['length'];_0x38538e++){const _0x2ffe14=_0x4c23c0[_0x5c1b00]['markersEnd'][_0x38538e];if(!_0xdeca60['has'](_0x2ffe14))continue;const {group:_0x21f785,type:_0x5c59cc}=_0x3f1a91(_0x2ffe14);if('revision-suggestion'!=_0x21f785||'insertion'!=_0x5c59cc&&'deletion'!=_0x5c59cc)continue;_0x4c23c0[_0x5c1b00]['markersEnd']['splice'](_0x38538e,0x1),_0x38538e--;const _0x124d8c=_0x5b11cb['findIndex'](_0x450588=>_0x450588['name']==_0x2ffe14);_0x124d8c>-0x1&&_0x5b11cb['splice'](_0x124d8c,0x1);}}function _0x3f1a91(_0x42ebdd){const _0x3eca7a=_0x42ebdd['split'](':');return{'group':_0x3eca7a[0x0],'type':_0x3eca7a[0x1],'subType':_0x3eca7a['length']>=0x5?_0x3eca7a[0x2]:null,'id':_0x3eca7a['length']<0x5?_0x3eca7a[0x2]:_0x3eca7a[0x3],'authorId':_0x3eca7a['length']<0x5?_0x3eca7a[0x3]:_0x3eca7a[0x4],'markerCount':0x6==_0x3eca7a['length']?_0x3eca7a[0x5]:null};}function _0x39e219(_0x5cc329){for(let _0x4aa488=0x0;_0x4aa488<_0x5b11cb['length'];_0x4aa488++){if(_0x5cc329['isAdded']&&'insertion'==_0x5b11cb[_0x4aa488]['type']&&_0x5cc329['isAdded']['userId']==_0x5b11cb[_0x4aa488]['userId'])return _0x5cc329['isAddSuggestion']=_0x5b11cb[_0x4aa488],void delete _0x5cc329['isAdded'];if(!_0x5cc329['isAdded']&&!_0x5cc329['isRemoved']&&'deletion'==_0x5b11cb[_0x4aa488]['type'])return void(_0x5cc329['isRemoveSuggestion']=_0x5b11cb[_0x4aa488]);}}}['_setDistance'](_0xedf074,_0x553881){let _0x5a95d5=0x0,_0x10f390=!0x1;const _0x172d63=new Map();for(const _0x1d944e of _0xedf074)_0x1d944e[_0x553881]?_0x10f390&&(_0x5a95d5++,_0x10f390=!0x1):(_0x5a95d5++,_0x10f390=!0x0),_0x172d63['set'](_0x1d944e['id'],_0x5a95d5);for(let _0xdd993f=0x0;_0xdd993f<_0xedf074['length'];_0xdd993f++){if('isRemoved'==_0x553881&&_0xedf074[_0xdd993f]['isAdded']||'isAdded'==_0x553881&&_0xedf074[_0xdd993f]['isRemoved'])continue;if('text'==_0xedf074[_0xdd993f]['type']){_0xedf074[_0xdd993f]['distance']=0x0;continue;}const _0x4adadf=_0x172d63['get'](_0xedf074[_0xdd993f]['pairId']),_0x55013a=_0x172d63['get'](_0xedf074[_0xdd993f]['id']);_0xedf074[_0xdd993f]['distance']=_0x4adadf-_0x55013a;}}['_getRevisionsRange'](_0x312502,_0x46fc07,_0x13d843=!0x1){const _0x4ff6bd=[];let _0x5b3b76=this['repository']['getIndex'](_0x312502),_0x3c372f=this['repository']['getIndex'](_0x46fc07);for(-0x1==_0x3c372f&&(_0x3c372f=this['repository']['_revisions']['length'],_0x13d843=!0x1);_0x5b3b76<_0x3c372f;)_0x4ff6bd['push'](this['repository']['getRevision'](_0x5b3b76)),_0x5b3b76++;return _0x13d843&&_0x4ff6bd['push'](this['repository']['getRevision'](_0x5b3b76)),_0x4ff6bd;}['_threeWayMerge'](_0x3c84c8,_0x32864d,_0x119a62,_0x35e36b){const _0x1d5e4f=this['editor']['model']['schema'];let _0x3f7316=_0x32864d;for(;_0x3c84c8[_0x3f7316]&&_0x3c84c8[_0x3f7316]['isAdded'];)_0x3f7316++;let _0x3dce71=_0x35e36b;for(;_0x119a62[_0x3dce71]&&_0x119a62[_0x3dce71]['isRemoved'];)_0x3dce71++;_0x1ca3b4(_0x3c84c8,_0x32864d,_0x3f7316),_0x1ca3b4(_0x119a62,_0x35e36b,_0x3dce71);const _0x189f6b=_0x119a62['slice'](_0x35e36b,_0x3dce71)['concat'](_0x3c84c8['slice'](_0x32864d,_0x3f7316));return _0x189f6b['sort']((_0x472a65,_0x463bb7)=>_0x472a65['side']!=_0x463bb7['side']?_0x472a65['side']-_0x463bb7['side']:_0x472a65['level']!=_0x463bb7['level']?_0x472a65['level']-_0x463bb7['level']:_0x472a65['distance']!=_0x463bb7['distance']?_0x463bb7['distance']-_0x472a65['distance']:!!_0x472a65['isAdded']!=!!_0x463bb7['isAdded']?-0x1==_0x472a65['side']||0x0==_0x472a65['side']?_0x472a65['isAdded']?-0x1:0x1:_0x472a65['isAdded']?0x1:-0x1:_0x472a65['index']-_0x463bb7['index']),{'commonTape':_0x189f6b,'iEnd':_0x3f7316,'jEnd':_0x3dce71};function _0x1ca3b4(_0x2b054c,_0x5beb01,_0x18a911){let _0x37004c=-0x1,_0x13fb7a=Number['POSITIVE_INFINITY'],_0x1b2fad=!0x0;for(let _0x41ce48=_0x5beb01;_0x41ce48<_0x18a911;_0x41ce48++)if(_0x1d5e4f['isInline'](_0x2b054c[_0x41ce48]['item'])||(_0x1b2fad=!0x1),_0x2b054c[_0x41ce48]['item']['startIndex']<_0x5beb01&&(_0x37004c=_0x41ce48),_0x2b054c[_0x41ce48]['item']['endIndex']>=_0x18a911){_0x13fb7a=_0x41ce48;break;}_0x1b2fad&&(_0x37004c=_0x18a911-0x1);for(let _0x240616=_0x5beb01;_0x240616<_0x18a911;_0x240616++)_0x2b054c[_0x240616]['side']=_0x240616<=_0x37004c?-0x1:_0x240616<_0x13fb7a?0x0:0x1,_0x2b054c[_0x240616]['index']=_0x240616;let _0x39bc8d=0x0;for(let _0x59e005=_0x5beb01;_0x59e005<=_0x37004c;_0x59e005++)0x0==_0x2b054c[_0x59e005]['distance']?_0x2b054c[_0x59e005]['level']=_0x39bc8d:(_0x39bc8d++,_0x2b054c[_0x59e005]['level']=_0x39bc8d,_0x39bc8d++);for(let _0x8ed17f=_0x5beb01;_0x8ed17f<_0x18a911;_0x8ed17f++)0x0==_0x2b054c[_0x8ed17f]['side']&&(_0x2b054c[_0x8ed17f]['level']=_0x39bc8d);_0x39bc8d=0x0;for(let _0x1c2c43=_0x18a911-0x1;_0x1c2c43>=_0x13fb7a;_0x1c2c43--)0x0==_0x2b054c[_0x1c2c43]['distance']?_0x2b054c[_0x1c2c43]['level']=_0x39bc8d:(_0x39bc8d--,_0x2b054c[_0x1c2c43]['level']=_0x39bc8d,_0x39bc8d--);}}['_fixObsoleteTags'](_0x4d2b96){const _0x452097=new Map(),_0x18b8fb=this['editor']['model']['schema'];for(let _0x5b77b6=0x1;_0x5b77b6<_0x4d2b96['length'];_0x5b77b6++){let _0x57b16c,_0x201fd9,_0x461254;const _0x4abbc6=_0x4d2b96[_0x5b77b6],_0xe8e662=_0x4d2b96[_0x5b77b6-0x1];if('text'==_0x4abbc6['type'])continue;if(_0x4abbc6['type']!=_0xe8e662['type'])continue;if(!_0x18b8fb['isBlock'](_0xe8e662['item'])||_0x18b8fb['isLimit'](_0xe8e662['item']))continue;if(!_0x18b8fb['isBlock'](_0x4abbc6['item'])||_0x18b8fb['isLimit'](_0x4abbc6['item']))continue;if((_0x4d2b96[_0x5b77b6]['isAdded']||_0x4d2b96[_0x5b77b6]['isAddSuggestion'])&&_0x4d2b96[_0x5b77b6-0x1]['isRemoved'])_0x57b16c=_0x4d2b96[_0x5b77b6],_0x201fd9=_0x4d2b96[_0x5b77b6-0x1],_0x461254=_0x5b77b6-0x1;else{if(!_0x4d2b96[_0x5b77b6]['isRemoved']||!_0x4d2b96[_0x5b77b6-0x1]['isAdded']&&!_0x4d2b96[_0x5b77b6-0x1]['isAddSuggestion'])continue;_0x57b16c=_0x4d2b96[_0x5b77b6-0x1],_0x201fd9=_0x4d2b96[_0x5b77b6],_0x461254=_0x5b77b6;}const _0xcb10c9=_0x57b16c['level']==_0x201fd9['level'],_0x2cb746=Math['abs'](_0x57b16c['level'])<Math['abs'](_0x201fd9['level'])&&0x0==_0x201fd9['distance'];(_0xcb10c9||_0x2cb746)&&(_0x452097['set'](_0x201fd9['id'],_0x57b16c['id']),_0x4d2b96['splice'](_0x461254,0x1),_0x5b77b6--,_0x57b16c['isAdded']=!0x1);}for(let _0x8354=0x0;_0x8354<_0x4d2b96['length'];_0x8354++)_0x452097['has'](_0x4d2b96[_0x8354]['pairId'])&&(_0x4d2b96[_0x8354]['pairId']=_0x452097['get'](_0x4d2b96[_0x8354]['pairId']));}['_removeMissingPairs'](_0x8bb4e6){const _0x104715=new Set(_0x8bb4e6['map'](_0x30cda5=>_0x30cda5['id']));for(let _0x24d94d=0x0;_0x24d94d<_0x8bb4e6['length'];_0x24d94d++)_0x104715['has'](_0x8bb4e6[_0x24d94d]['pairId'])||0x0==_0x8bb4e6[_0x24d94d]['distance']||(_0x8bb4e6[_0x24d94d]['isIncorrect']=!0x0);return _0x8bb4e6['filter'](_0x3c2f45=>!_0x3c2f45['isIncorrect']);}['_markMismatchedRemovedTags'](_0x54b072){const _0x45e2dd=new Set();for(let _0x28d1eb=0x0;_0x28d1eb<_0x54b072['length'];_0x28d1eb++){if(_0x45e2dd['has'](_0x54b072[_0x28d1eb]['id'])&&_0x54b072[_0x28d1eb]['isRemoved']&&(_0x54b072[_0x28d1eb]['isIncorrect']=!0x0),_0x54b072[_0x28d1eb]['isIncorrect'])continue;if(0x0==_0x54b072[_0x28d1eb]['distance'])continue;if('elementStart'!=_0x54b072[_0x28d1eb]['type'])continue;if(null==_0x54b072[_0x28d1eb]['pairId'])continue;let _0x3babeb=_0x28d1eb+0x1,_0x50d3de=0x0;for(;_0x54b072[_0x3babeb]['id']!=_0x54b072[_0x28d1eb]['pairId'];)'elementStart'==_0x54b072[_0x3babeb]['type']?_0x50d3de++:'elementEnd'==_0x54b072[_0x3babeb]['type']&&_0x50d3de--,_0x3babeb++;if(0x0!=_0x50d3de){if(_0x54b072[_0x28d1eb]['isRemoved'])_0x54b072[_0x28d1eb]['isIncorrect']=!0x0;else{for(;_0x3babeb!=_0x28d1eb;)_0x54b072[_0x3babeb]['isRemoved']&&0x0!=_0x54b072[_0x3babeb]['distance']&&(_0x54b072[_0x3babeb]['isIncorrect']=!0x0,_0x45e2dd['add'](_0x54b072[_0x3babeb]['pairId'])),_0x3babeb--;}}}return _0x54b072['filter'](_0x3003c2=>!_0x3003c2['isIncorrect']);}['_removeUnsupportedChanges'](_0x527b8c){const _0x9dec64=this['editor']['model']['schema'];for(let _0x488c16=0x0;_0x488c16<_0x527b8c['length'];_0x488c16++){if(!(_0x527b8c[_0x488c16]['isAdded']||_0x527b8c[_0x488c16]['isAddSuggestion']||_0x527b8c[_0x488c16]['isRemoved']||_0x527b8c[_0x488c16]['isRemoveSuggestion']))continue;if(0x0==_0x527b8c[_0x488c16]['distance'])continue;const _0x3ff19a=_0x527b8c[_0x488c16]['item'];_0x9dec64['isBlock'](_0x3ff19a)||_0x9dec64['isLimit'](_0x3ff19a)||(_0x527b8c[_0x488c16]['isAdded']&&delete _0x527b8c[_0x488c16]['isAdded'],_0x527b8c[_0x488c16]['isAddSuggestion']&&delete _0x527b8c[_0x488c16]['isAddSuggestion'],_0x527b8c[_0x488c16]['isRemoveSuggestion']&&delete _0x527b8c[_0x488c16]['isRemoveSuggestion'],_0x527b8c[_0x488c16]['isRemoved']&&(_0x527b8c[_0x488c16]['isIncorrect']=!0x0));}return _0x527b8c['filter'](_0x254942=>!_0x254942['isIncorrect']);}['_makeModelFromTape'](_0x107e81,_0x5ab2fa,_0x572bd2){const _0x45f6ef=new _0x5439d1(),_0x42473d=[],_0x571d5d=new Map(),_0x1ad0b4=this['editor']['model'],_0x10a54e=_0x1ad0b4['schema'],_0x28d09d=[_0x45f6ef],_0x12a231={},_0x530a5d={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x1ca75c=null;const _0x57e2ce=[0x0];for(let _0x39b680=0x0;_0x39b680<_0x107e81['length'];_0x39b680++)if('elementStart'===_0x107e81[_0x39b680]['type']){_0x107e81[_0x39b680]['previousPosition']=_0x1ad0b4['createPositionFromPath'](_0x45f6ef,_0x57e2ce);const _0x1c6768=new _0xf20b09(_0x107e81[_0x39b680]['item']['name'],_0x107e81[_0x39b680]['item']['getAttributes']());_0x28d09d[0x0]['_appendChild'](_0x1c6768),_0x57e2ce['push'](0x0),_0x28d09d['unshift'](_0x1c6768),_0x107e81[_0x39b680]['nextPosition']=_0x1ad0b4['createPositionFromPath'](_0x45f6ef,_0x57e2ce);}else'elementEnd'===_0x107e81[_0x39b680]['type']?(_0x28d09d['shift'](),_0x107e81[_0x39b680]['previousPosition']=_0x1ad0b4['createPositionFromPath'](_0x45f6ef,_0x57e2ce),_0x57e2ce['pop'](),_0x57e2ce[_0x57e2ce['length']-0x1]++,_0x107e81[_0x39b680]['nextPosition']=_0x1ad0b4['createPositionFromPath'](_0x45f6ef,_0x57e2ce)):(_0x107e81[_0x39b680]['previousPosition']=_0x1ad0b4['createPositionFromPath'](_0x45f6ef,_0x57e2ce),_0x1ca75c?_0x1ca75c['_data']+=_0x107e81[_0x39b680]['item']['data']:_0x1ca75c=new _0x51f73e(_0x107e81[_0x39b680]['item']['data'],_0x107e81[_0x39b680]['item']['getAttributes']()),_0x107e81[_0x39b680+0x1]&&'text'===_0x107e81[_0x39b680+0x1]['type']&&_0x215a31(_0x1ca75c,_0x107e81[_0x39b680+0x1]['item'])||(_0x28d09d[0x0]['_appendChild'](_0x1ca75c),_0x1ca75c=null),_0x57e2ce[_0x57e2ce['length']-0x1]+=_0x107e81[_0x39b680]['item']['offsetSize'],_0x107e81[_0x39b680]['nextPosition']=_0x1ad0b4['createPositionFromPath'](_0x45f6ef,_0x57e2ce));for(let _0x185d03=0x0;_0x185d03<_0x107e81['length'];_0x185d03++){const _0x1e4280=_0x107e81[_0x185d03]['previousPosition'],_0x202487=_0x107e81[_0x185d03]['nextPosition'];for(const _0x435de5 of _0x107e81[_0x185d03]['markersStart'])_0x571d5d['set'](_0x435de5,{'start':_0x1e4280,'end':null});_0x234af3('isRemoveSuggestion',_0x185d03,_0x1e4280,_0x202487),_0x234af3('isAddSuggestion',_0x185d03,_0x1e4280,_0x202487),_0x234af3('isRemoved',_0x185d03,_0x1e4280,_0x202487),_0x234af3('isAdded',_0x185d03,_0x1e4280,_0x202487);for(const _0x5b4664 of _0x107e81[_0x185d03]['markersEnd']){const _0x3f37b9=_0x571d5d['get'](_0x5b4664);_0x3f37b9?_0x3f37b9['end']=_0x202487:_0x571d5d['set'](_0x5b4664,{'start':_0x202487,'end':_0x202487});}}for(const [_0x269e49,_0x316310]of _0x571d5d){const _0x471ac4=this['editor']['model']['createRange'](_0x316310['start'],_0x316310['end']);_0x45f6ef['markers']['set'](_0x269e49,_0x471ac4);}return _0x42473d['sort']((_0x3b6f36,_0x2b948a)=>{const _0x3d58c4=_0x45f6ef['markers']['get']('revision:'+_0x3b6f36['id']),_0x5cbc29=_0x45f6ef['markers']['get']('revision:'+_0x2b948a['id']);return _0x3d58c4['start']['isBefore'](_0x5cbc29['start'])?-0x1:_0x3d58c4['start']['isAfter'](_0x5cbc29['start'])?0x1:_0x3d58c4['end']['isBefore'](_0x5cbc29['end'])?-0x1:_0x3d58c4['end']['isAfter'](_0x5cbc29['end'])?0x1:'add'===_0x3b6f36['type']?-0x1:0x1;}),{'root':_0x45f6ef,'changes':_0x42473d};function _0x234af3(_0x5d0175,_0x676f7a,_0x2bbb28,_0x5c97b2){const _0x2e7325=!!_0x107e81[_0x676f7a][_0x5d0175],_0x2c1e7e=_0x2e7325?_0x107e81[_0x676f7a][_0x5d0175]['userId']:null,_0x5a60b5=_0x676f7a===_0x107e81['length']-0x1,_0x1a723b=_0x530a5d[_0x5d0175][0x0],_0x236af0=_0x10a54e['isObject'](_0x107e81[_0x676f7a]['item']);!_0x12a231[_0x5d0175]&&_0x2e7325?_0x12a231[_0x5d0175]={'start':_0x2bbb28,'tapeItem':_0x107e81[_0x676f7a],'userId':_0x2c1e7e,'type':_0x5d0175}:_0x12a231[_0x5d0175]&&!_0x2e7325?(_0x12a231[_0x5d0175]['end']=_0x2bbb28,_0x58735f(_0x12a231[_0x5d0175]),_0x12a231[_0x5d0175]=null):_0x12a231[_0x5d0175]&&_0x2e7325&&_0x12a231[_0x5d0175]['userId']!==_0x2c1e7e&&(_0x12a231[_0x5d0175]['end']=_0x2bbb28,_0x1a723b&&_0x1a723b['userId']===_0x12a231[_0x5d0175]['userId']||_0x58735f(_0x12a231[_0x5d0175]),_0x12a231[_0x5d0175]={'start':_0x2bbb28,'tapeItem':_0x107e81[_0x676f7a],'userId':_0x2c1e7e,'type':_0x5d0175}),_0x12a231[_0x5d0175]&&_0x236af0&&('elementStart'!==_0x107e81[_0x676f7a]['type']||_0x1a723b&&_0x1a723b['userId']===_0x2c1e7e||_0x530a5d[_0x5d0175]['unshift']({'userId':_0x2c1e7e,'object':_0x107e81[_0x676f7a]['item'],'change':_0x12a231[_0x5d0175]}),'elementEnd'===_0x107e81[_0x676f7a]['type']&&_0x1a723b&&_0x1a723b['object']===_0x107e81[_0x676f7a]['item']&&(_0x530a5d[_0x5d0175]['shift'](),_0x12a231[_0x5d0175]=_0x1a723b['change'])),_0x12a231[_0x5d0175]&&_0x5a60b5&&(_0x12a231[_0x5d0175]['end']=_0x5c97b2,_0x58735f(_0x12a231[_0x5d0175]),_0x12a231[_0x5d0175]=null);}function _0x58735f({start:_0x3f92ac,end:_0x26ca1b,tapeItem:_0x1a62ed,userId:_0x47a85a,type:_0x4de3a1}){const _0x21e0ad=_0x1a62ed['item'],_0x35f590=_0x1ad0b4['schema']['isBlock'](_0x21e0ad)&&!_0x1ad0b4['schema']['isLimit'](_0x21e0ad),_0x3ba671=_0x3f92ac['nodeAfter']==_0x26ca1b['parent']&&_0x26ca1b['isAtStart'];if(_0x35f590&&_0x3ba671)return;const _0xf8ad83=_0x1ad0b4['createRange'](_0x3f92ac,_0x26ca1b),_0x52b106=_0x5ab2fa['get'](_0x47a85a),_0x33bd9b=new G({'author':_0x52b106,'type':'isAdded'==_0x4de3a1||'isAddSuggestion'==_0x4de3a1?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4de3a1||'isRemoveSuggestion'==_0x4de3a1},'createdAt':new Date(),'rootName':_0x572bd2});_0x42473d['push'](_0x33bd9b),_0x45f6ef['markers']['set']('revision:'+_0x33bd9b['id'],_0xf8ad83);}function _0x215a31(_0x335def,_0x49a078){const _0xa30625=_0x335def['getAttributes'](),_0x12691f=_0x49a078['getAttributes']();for(const _0x3ef20d of _0xa30625){if(_0x3ef20d[0x1]!==_0x49a078['getAttribute'](_0x3ef20d[0x0]))return!0x1;_0x12691f['next']();}return _0x12691f['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1d2fc8=>{const _0x562f94=_0x1d2fc8['markerName']['split'](':')[0x1],_0x521d72=this['_getChangeFromId'](_0x562f94);if(!_0x521d72)return null;const _0x3131d3='add'==_0x521d72['type']?'insertion':'deletion',_0x1e045b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3131d3];return _0x521d72['data']['isSuggestion']&&_0x1e045b['push']('ck-suggestion-marker-'+_0x3131d3+'-new'),this['activeChange']==_0x521d72&&_0x1e045b['push']('ck-suggestion-marker--active'),{'classes':_0x1e045b,'attributes':{'data-change-id':_0x562f94}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x108707=>{_0x108707['on']('element:pre',(_0x517626,_0x5b5294,_0x2ee5ef)=>{const _0x583158=_0x5b5294['viewItem']['getChild'](0x0);if(!_0x583158||!_0x583158['is']('element','code'))return;if(!_0x2ee5ef['consumable']['consume'](_0x583158,{'attributes':['vid_start','vid_end']}))return;const _0x5e951e=_0x5b5294['modelRange']['start']['nodeAfter'];_0x2ee5ef['writer']['setAttribute']('vid_start',_0x583158['getAttribute']('vid_start'),_0x5e951e),_0x2ee5ef['writer']['setAttribute']('vid_end',_0x583158['getAttribute']('vid_end'),_0x5e951e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x5377f0=>{_0x5377f0['on']('element',(_0x55a5c1,_0x315e73,_0x2baaf0)=>{if(!_0x2baaf0['consumable']['consume'](_0x315e73['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x315e73['modelRange']['isCollapsed'])return;const _0xcc3761=_0x315e73['modelRange']['start']['nodeAfter'];_0xcc3761['hasAttribute']('vid_start')||_0xcc3761['hasAttribute']('vid')||(_0x2baaf0['writer']['setAttribute']('vid_start',_0x315e73['viewItem']['getAttribute']('vid_start'),_0xcc3761),_0x2baaf0['writer']['setAttribute']('vid_end',_0x315e73['viewItem']['getAttribute']('vid_end'),_0xcc3761));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4f9726=>_0x4f9726['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x2cd8e9,[,_0x4910e4])=>{['vid_start','vid_end','vid']['includes'](_0x4910e4)&&(_0x2cd8e9['return']=!0x0,_0x2cd8e9['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x57fb4a=>{_0x57fb4a['on']('attribute:vid',(_0x190ebd,_0x409a1c,_0x531409)=>{if('\x20'!=_0x409a1c['item']['data']||_0x409a1c['item']['parent']['maxOffset']>0x1)return;if(!_0x531409['consumable']['consume'](_0x409a1c['item'],_0x190ebd['name']))return;const _0x2ac9fb=_0x531409['writer'],_0x3b7638=_0x531409['mapper']['toViewRange'](_0x409a1c['range']);_0x2ac9fb['wrap'](_0x3b7638,_0x2ac9fb['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x484abf){const _0x2db030=_0x484abf['plugins']['get']('RevisionViewer');return(_0x2d243b,_0x2b6b90,_0x1e32c8)=>{const _0x2c09e2=_0x2b6b90['markerName']['split'](':')[0x1],_0x4b1adc=_0x2db030['_getChangeFromId'](_0x2c09e2);if(!_0x4b1adc)return null;const _0x2ced3c='add'==_0x4b1adc['type']?'split':'merge';if(!_0x1e32c8['consumable']['test'](_0x2b6b90['markerRange'],_0x2d243b['name']))return;const _0x5b5b67=_0x2b6b90['markerRange']['getWalker'](),_0x5227ff=_0x2b6b90['markerRange']['start'],_0x15dcc9=_0x484abf['model']['schema'];let _0x5bdf5d=null,_0x4af086=null,_0x39f2e6=!0x1,_0x321648=!0x1;for(const _0x312feb of _0x5b5b67){const _0x4cef6a=_0x312feb['item'];_0x39f2e6=_0x39f2e6||_0x15dcc9['isContent'](_0x4cef6a);const _0x28d4ae=_0x1e32c8['mapper']['toViewElement'](_0x4cef6a);if(_0x28d4ae&&_0x28d4ae['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x312feb['type']&&(_0x15dcc9['isBlock'](_0x4cef6a)&&!_0x15dcc9['isLimit'](_0x4cef6a)&&(_0x4cef6a['nextSibling']||_0x5227ff['isAtEnd']?_0x5bdf5d&&_0x5bdf5d['parent']==_0x4cef6a||(_0x5bdf5d=_0x4cef6a,_0x2c6156(_0x312feb['previousPosition']),_0x321648=!0x0):_0x4af086=_0x4af086||_0x312feb['previousPosition']));}function _0x2c6156(_0x4cc4c6){const _0x527d35=_0x1e32c8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2ced3c}),_0xa686c2=_0x1e32c8['mapper']['toViewPosition'](_0x4cc4c6);_0x4b1adc['data']['isSuggestion']&&_0x1e32c8['writer']['addClass']('ck-suggestion-marker-'+_0x2ced3c+'-new',_0x527d35),_0x2db030['activeChange']==_0x4b1adc&&_0x1e32c8['writer']['addClass']('ck-suggestion-marker--active',_0x527d35),_0x1e32c8['writer']['insert'](_0xa686c2,_0x527d35),_0x1e32c8['mapper']['bindElementToMarker'](_0x527d35,_0x2b6b90['markerName']);}_0x39f2e6||_0x321648||!_0x4af086||_0x2c6156(_0x4af086);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x27b143,_0x11fa7b,_0x3562ba)=>{const _0x4cfbcb=_0x3562ba['mapper']['markerNameToElements'](_0x11fa7b['markerName']);if(_0x4cfbcb){for(const _0x469ad7 of _0x4cfbcb)(_0x469ad7['hasClass']('ck-suggestion-marker-split')||_0x469ad7['hasClass']('ck-suggestion-marker-merge'))&&(_0x3562ba['mapper']['unbindElementFromMarkerName'](_0x469ad7,_0x11fa7b['markerName']),_0x3562ba['writer']['remove'](_0x469ad7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x5c3546,_0x14cde8,_0x45895a)=>{const _0x2d1d8d=_0x14cde8['markerName']['split'](':')[0x1],_0x23f47e=this['_getChangeFromId'](_0x2d1d8d);if(!_0x23f47e)return null;const _0x2cc65f='add'==_0x23f47e['type']?'split':'merge';if(_0x45895a['consumable']['test'](_0x14cde8['markerRange'],_0x5c3546['name']))for(const _0x121c18 of _0x14cde8['markerRange']['getItems']()){if(!_0x121c18['is']('element','softBreak'))continue;const _0x33f276=_0x45895a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2cc65f}),_0xb7b81=_0x45895a['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x121c18));_0x23f47e['data']['isSuggestion']&&_0x45895a['writer']['addClass']('ck-suggestion-marker-'+_0x2cc65f+'-new',_0x33f276),this['activeChange']==_0x23f47e&&_0x45895a['writer']['addClass']('ck-suggestion-marker--active',_0x33f276),_0x45895a['writer']['insert'](_0xb7b81,_0x33f276),_0x45895a['mapper']['bindElementToMarker'](_0x33f276,_0x14cde8['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2553d4=>{for(const _0x1244f7 of this['editor']['model']['document']['getRootNames']()){const _0x5105a4=this['editor']['model']['document']['getRoot'](_0x1244f7),_0x5adb48=this['editor']['editing']['view']['document']['getRoot'](_0x1244f7);if(_0x5adb48){const _0x1b71e2=_0x5105a4['getAttribute']('revisionHistoryAttachChange');if(_0x2553d4['removeAttribute']('data-change-id',_0x5adb48),_0x2553d4['removeClass']('ck-revision-history-root-add',_0x5adb48),_0x2553d4['removeClass']('ck-revision-history-root-remove',_0x5adb48),_0x2553d4['removeClass']('ck-revision-history-root--active',_0x5adb48),_0x1b71e2){const _0x15a36a=this['_getChangeFromId'](_0x1b71e2);if(!_0x15a36a)return null;_0x2553d4['setAttribute']('data-change-id',_0x1b71e2,_0x5adb48),_0x2553d4['addClass']('ck-revision-history-root-'+_0x15a36a['type'],_0x5adb48),this['activeChange']==_0x15a36a&&_0x2553d4['addClass']('ck-revision-history-root--active',_0x5adb48);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1e04cc=>'revision-comment:'+_0x1e04cc,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x210010=>'revision-suggestion:'+_0x210010,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2b6bc5=>({'name':'suggestion:'+_0x2b6bc5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x527d28=>{const _0x535f87=_0x527d28['markerName']['split'](':')[0x1];return'insertion'!=_0x535f87&&'deletion'!=_0x535f87?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x535f87]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3b8f67,_0x3af780,_0x2320b1)=>{const _0x43dee3=_0x2320b1['mapper']['markerNameToElements'](_0x3af780['markerName']);if(_0x43dee3){for(const _0x1c7dad of _0x43dee3)_0x1c7dad['is']('uiElement')&&(_0x2320b1['mapper']['unbindElementFromMarkerName'](_0x1c7dad,_0x3af780['markerName']),_0x2320b1['writer']['remove'](_0x1c7dad));}},{'priority':'high'});}['_getChangeFromId'](_0x49bbaa){return this['_changeIdToChange']['get'](_0x49bbaa);}['_getViewForChange'](_0x4115ab){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x4115ab),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x469ae9,_0x35e6ab,_0x56991a,_0x8266f8)=>{_0x8266f8&&this['_balloon']['remove'](_0x8266f8),_0x56991a&&(this['_balloon']['add']({'view':_0x56991a,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4145f5=this['editor']['editing'],_0x107868=this['_getChangeFromId'](_0x56991a['changeId']);let _0x22e4f5;if(_0x107868['data']['isOnRoot']){const _0xf6c871=_0x4145f5['view']['getDomRoot'](_0x107868['rootName']);_0x22e4f5=Array['from'](_0xf6c871['getClientRects']());}else{const _0x24f1a3=this['editor']['model']['markers']['get']('revision:'+_0x56991a['changeId']);_0x22e4f5=Array['from'](_0x4145f5['mapper']['markerNameToElements'](_0x24f1a3['name']))['map'](_0x1c396b=>_0x4145f5['view']['domConverter']['mapViewToDom'](_0x1c396b))['map'](_0x17669e=>Array['from'](_0x17669e['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x22e4f5[0x0];return _0x22e4f5['find'](_0x3acb50=>_0x3acb50['top']-0x3<=this['_activeViewTarget']['y']&&_0x3acb50['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3acb50['left']-0x3<=this['_activeViewTarget']['x']&&_0x3acb50['right']+0x3>=this['_activeViewTarget']['x'])||_0x22e4f5[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0xe7578f,_0x1e3a44,_0x2b63f6,_0x3d2117)=>{this['activeView']=_0x2b63f6?this['_getViewForChange'](_0x2b63f6):null,this['editor']['model']['change'](()=>{const _0x40dfbb=this['editor']['editing'];_0x3d2117&&(_0x3d2117['data']['isOnRoot']?_0x40dfbb['view']['change'](_0x9129f5=>{_0x9129f5['removeClass']('ck-revision-history-root--active',_0x40dfbb['view']['document']['getRoot'](_0x3d2117['rootName']));}):_0x40dfbb['reconvertMarker']('revision:'+_0x3d2117['id'])),_0x2b63f6&&(_0x2b63f6['data']['isOnRoot']?_0x40dfbb['view']['change'](_0xcf7fbb=>{_0xcf7fbb['addClass']('ck-revision-history-root--active',_0x40dfbb['view']['document']['getRoot'](_0x2b63f6['rootName']));}):_0x40dfbb['reconvertMarker']('revision:'+_0x2b63f6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x27ed6a,_0x3ef671)=>{if(this['activeChange'])return;const _0x454726=this['_findChangeIdFromDomTarget'](_0x3ef671['target']),_0x3aca7b=this['_changeIdToChange']['get'](_0x454726);_0x3aca7b?(this['_activeViewTarget']={'x':_0x3ef671['domEvent']['x'],'y':_0x3ef671['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3aca7b)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x243c13,_0x48529e)=>{const _0x415e4d=this['_findChangeIdFromDomTarget'](_0x48529e['target']),_0x1c1065=this['_changeIdToChange']['get'](_0x415e4d);_0x1c1065?(this['_activeViewTarget']={'x':_0x48529e['domEvent']['x'],'y':_0x48529e['domEvent']['y']},_0x1c1065===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1c1065):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4f2d36){do{const _0x295623=_0x4f2d36['getAttribute']('data-change-id');if(_0x295623)return _0x295623;_0x4f2d36=_0x4f2d36['parent'];}while(_0x4f2d36);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2d9d8a=>{for(const _0x1e2199 of this['editor']['model']['markers'])_0x2d9d8a['removeMarker'](_0x1e2199);});}}function Q(_0x5c856f,_0xc0a5ab){return(_0x2dfdeb,_0xeb4cbd,_0x2fb916)=>{if(!_0x2fb916['consumable']['test'](_0xeb4cbd['markerRange'],_0x2dfdeb['name']))return;const _0x31de98=_0xeb4cbd['markerRange']['getWalker'](),_0x483f04=_0xeb4cbd['markerRange']['start'],_0x31214a=_0x5c856f['model']['schema'];let _0x17d8d0=null,_0x3c4150=null,_0x57e6cd=!0x1,_0xfca158=!0x1;for(const _0x2205ab of _0x31de98){const _0x1dec5a=_0x2205ab['item'];_0x57e6cd=_0x57e6cd||_0x31214a['isContent'](_0x1dec5a);const _0x9cfb97=_0x2fb916['mapper']['toViewElement'](_0x1dec5a);if(_0x9cfb97&&_0x9cfb97['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2205ab['type']&&(_0x31214a['isBlock'](_0x1dec5a)&&!_0x31214a['isLimit'](_0x1dec5a)&&(_0x1dec5a['nextSibling']||_0x483f04['isAtEnd']?_0x17d8d0&&_0x17d8d0['parent']==_0x1dec5a||(_0x17d8d0=_0x1dec5a,_0xc1bbf6(_0x2205ab['previousPosition']),_0xfca158=!0x0):_0x3c4150=_0x3c4150||_0x2205ab['previousPosition']));}function _0xc1bbf6(_0x3e536f){const _0x1e6c85=_0x2fb916['mapper']['toViewPosition'](_0x3e536f),_0xa7bedb=_0x2fb916['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xc0a5ab});_0x2fb916['writer']['insert'](_0x1e6c85,_0xa7bedb),_0x2fb916['mapper']['bindElementToMarker'](_0xa7bedb,_0xeb4cbd['markerName']);}_0x57e6cd||_0xfca158||!_0x3c4150||_0xc1bbf6(_0x3c4150);};}class nt extends _0x740a59{constructor(_0x5b7327){super(_0x5b7327);const _0x3d60a2=_0x5b7327['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x3d60a2,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3d60a2,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x1e07f9=this['editor'],_0x3695d5=_0x1e07f9['plugins']['get'](u),_0x5edeab=_0x3695d5['isReady']?_0x3695d5['diff']['newRevisionId']:null;_0x1e07f9['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5edeab);}['refresh'](){const {isReady:_0x937e40,isEnabled:_0x325571,repository:_0x3b7ca8,diff:_0x569e04}=this['editor']['plugins']['get'](u),_0x5a0715=_0x569e04&&_0x3b7ca8['getLaterVisibleRevision'](_0x569e04['newRevisionId']);this['isEnabled']=_0x937e40&&_0x325571&&Boolean(_0x5a0715);}}class ot extends _0x740a59{['_step'];constructor(_0x2016ec,{direction:_0x1b3388}){super(_0x2016ec);const _0x4d9dea=_0x2016ec['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x1b3388?0x1:-0x1,this['listenTo'](_0x4d9dea,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4d9dea,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4d9dea,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xb048d2=this['editor'],_0x16bf17=_0xb048d2['plugins']['get'](u),{isNavigationMode:_0x223067,currentChangeNumber:_0x597106}=_0x16bf17;let _0x289114;if(_0x16bf17['activeChange']=_0x223067?_0x16bf17['diff']['changes']['get'](_0x597106+this['_step']):_0x16bf17['diff']['changes']['first'],_0x16bf17['activeChange']['data']['isOnRoot'])_0x289114=_0xb048d2['editing']['view']['getDomRoot'](_0x16bf17['activeChange']['rootName']);else{const _0x2e6eae=_0xb048d2['model']['markers']['get']('revision:'+_0x16bf17['activeChange']['id']);_0x289114=_0x3b78d7(_0xb048d2['editing'],_0x2e6eae);}_0x332252({'target':_0x289114,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4f1b4f,currentChangeNumber:_0x4b29c8,numberOfChanges:_0x19791c,isReady:_0x14d424,isEnabled:_0x2118d8}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x2118d8&&_0x14d424&&_0x19791c)&&(!_0x4f1b4f||(0x1===this['_step']?_0x4b29c8<_0x19791c-0x1:_0x4b29c8>0x0));}}class Ri extends _0x3e0b15{constructor(_0x510a3a){super(_0x510a3a);const _0x4d04aa=this['bindTemplate'],_0x377356=new _0x1dcc9b(_0x510a3a),_0x54dda0=new _0x1dcc9b(_0x510a3a);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',(_0x41f86f,_0x2d908f)=>_0x41f86f&&_0x2d908f>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x76f221,_0x53d651,_0x421c8d,_0x5a11e4)=>{if(!_0x76f221)return m(_0x510a3a,'Loading...');if(!_0x421c8d)return m(_0x510a3a,'No\x20changes');const _0x591043=m(_0x510a3a,'NUMBER_OF_CHANGES',_0x421c8d);return _0x5a11e4?m(_0x510a3a,'X_OF_Y_CHANGES',[_0x53d651+0x1,_0x421c8d]):_0x591043;}),_0x377356['set']({'label':m(_0x510a3a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x54f29b}),_0x54dda0['set']({'label':m(_0x510a3a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x53a08c}),_0x377356['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x54dda0['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x377356['on']('execute',()=>this['fire']('execute','backward')),_0x54dda0['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',_0x4d04aa['if']('_isStatusLabelVisible','ck-hidden',_0x591b7f=>!_0x591b7f)]},'children':[{'text':_0x4d04aa['to']('isNavigationMode',_0x3dd8a3=>_0x3dd8a3?m(_0x510a3a,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x510a3a,'Total')+':\x20')}]},{'text':_0x4d04aa['to']('_statusText')}]},new _0x1019e4(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x377356,_0x54dda0]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x38f444{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2c055d=this['editor']['editing']['view'];_0x2c055d['change'](_0x3a5eee=>{for(const _0x295ab5 of _0x2c055d['document']['roots'])_0x3a5eee['addClass'](ge,_0x295ab5);});}['hide'](){const _0x853172=this['editor']['editing']['view'];_0x853172['change'](_0x47c2c9=>{for(const _0x166b85 of _0x853172['document']['roots'])_0x47c2c9['removeClass'](ge,_0x166b85);});}}class v extends _0x38f444{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,ji];}['init'](){const _0x2c1aff=this['editor'],_0x12e6ed=_0x2c1aff['plugins']['get'](u),_0x3bb2e9=_0x2c1aff['plugins']['get'](ji);_0x2c1aff['ui']['componentFactory']['add']('exitToEditing',_0x3696d8=>{const _0x5d5b67=new _0x1dcc9b(_0x3696d8);return _0x5d5b67['set']({'label':m(_0x3696d8,'Back\x20to\x20editing'),'icon':_0x4a12a7,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5d5b67,'execute',()=>{_0x2c1aff['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5d5b67;}),_0x2c1aff['ui']['componentFactory']['add']('restoreRevision',_0x18eb0d=>{const _0x2bbbf1=new _0x1dcc9b(_0x18eb0d);return _0x2bbbf1['set']({'label':m(_0x18eb0d,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2bbbf1['bind']('isEnabled')['to'](_0x2c1aff['commands']['get']('restoreRevision')),this['listenTo'](_0x2bbbf1,'execute',()=>_0x2c1aff['execute']('restoreRevision')),_0x2bbbf1;}),_0x2c1aff['ui']['componentFactory']['add']('changesNavigation',_0x41aca4=>{const _0x1124fb=new Ri(_0x41aca4),_0x1fd6b1=_0x2c1aff['commands']['get']('showPreviousChange'),_0x942b4a=_0x2c1aff['commands']['get']('showNextChange');return _0x1124fb['bind']('isBackwardNavigationEnabled')['to'](_0x1fd6b1,'isEnabled'),_0x1124fb['bind']('isForwardNavigationEnabled')['to'](_0x942b4a,'isEnabled'),_0x1124fb['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x12e6ed),this['listenTo'](_0x1124fb,'execute',(_0x45f09f,_0x3000e0)=>{_0x2c1aff['execute']('forward'===_0x3000e0?'showNextChange':'showPreviousChange');}),_0x1124fb;}),_0x3bb2e9['show'](),_0x12e6ed['on']('change:isReady',(_0x13b502,_0x53ac61,_0x2b740e)=>{_0x2b740e?_0x3bb2e9['hide']():_0x3bb2e9['show']();});}}class li extends ti{['_resizeObserver']=null;constructor(_0x35e20d,_0x33300a){super(_0x35e20d,_0x33300a);const _0x27a0f0=this['bindTemplate'];this['set']({'label':m(_0x35e20d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x35e20d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x27a0f0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x336a2a=this['fieldView']['element'];this['_tooltipString']=_0x336a2a['scrollWidth']>_0x336a2a['clientWidth']&&_0x336a2a['value']||'';}}class vi extends _0x3e0b15{constructor(_0x41291e,_0x49927b,_0x1e7a65){super(_0x41291e);const _0x409387=new _0x137374();_0x409387['set']({'content':_0x4e42fe,'viewBox':'0\x200\x2011\x2010'});const _0x392b52=['ck','ck-revision-history-sidebar__revision-author'];_0x1e7a65&&_0x392b52['push']('ck-revision-history-sidebar__revision-author_creator');const _0x187b4a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x41291e,_0x1e7a65?'Revision\x20creator':'Revision\x20author')},'children':[_0x409387,_0x49927b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x392b52},'children':_0x187b4a});}}function mi(_0x5e42bb,_0x1af6d7){const _0x96208f=_0x5e42bb['bindTemplate'],_0x3f77ef=_0x5e42bb['locale'],_0x1ebb20=_0x54c274(_0x3f77ef);_0x1ebb20['panelPosition']='sw';const _0x4b4787=function(_0x5b3d05,_0x24da02){const _0x4d196e=function(_0x32d351,_0x3717c8){const _0x11f029=_0x32d351['locale'],_0x2923f4={'Compare\x20against\x20selected':m(_0x11f029,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x11f029,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x11f029,'Restore\x20this\x20revision')};return _0x3717c8['map'](_0x42e528=>{const _0x5c0978=_0x2923f4[_0x42e528['name']];return _0x5c0978&&_0x5c0978!==_0x42e528['name']&&(_0x42e528['name']=_0x5c0978),_0x42e528;});}(_0x5b3d05,_0x24da02),_0x1c2605=new _0x5731ed();for(const _0x3f5288 of _0x4d196e){const _0x2a7723={'type':'button','model':new to({'label':_0x3f5288['name'],'class':_0x3f5288['class'],'withText':!0x0,'role':'menuitem','_action':_0x3f5288['action']})};_0x2a7723['model']['bind']('isEnabled')['to'](_0x5b3d05,'isActionsDropdownOpen',_0x5bcba2=>'function'!=typeof _0x3f5288['isEnabled']||(!_0x5bcba2||_0x3f5288['isEnabled'](_0x5b3d05))),_0x1c2605['add'](_0x2a7723);}return _0x1c2605;}(_0x5e42bb,_0x1af6d7);return _0x5e42bb['bind']('isActionsDropdownOpen')['to'](_0x1ebb20,'isOpen'),_0x1ebb20['buttonView']['set']({'label':m(_0x3f77ef,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x18b99b}),_0x1ebb20['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x96208f['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x96208f['to'](_0x2a1e5f=>_0x2a1e5f['stopPropagation']())}}),_0x1ebb20['on']('execute',_0x1c7abd=>{_0x5e42bb['isReady']&&'function'==typeof _0x1c7abd['source']['_action']&&_0x1c7abd['source']['_action'](_0x5e42bb);}),_0x28ae8a(_0x1ebb20,_0x4b4787,{'role':'menu'}),_0x1ebb20['listenTo'](_0x5e42bb,'change:isActionsDropdownOpen',(_0x4959ac,_0x3c226e,_0x5d5bca)=>{if(_0x5d5bca)for(const _0x36ab67 of _0x1ebb20['listView']['items']){const _0x3b5d0c=_0x36ab67['children']['first'],_0x3841fd=_0x1af6d7['find'](_0x78bb2b=>_0x78bb2b['action']===_0x3b5d0c['_action'])['isVisible'];_0x36ab67['isVisible']=void 0x0===_0x3841fd||_0x3841fd(_0x5e42bb);}}),_0x1ebb20;}class pi extends/* #__PURE__ -- @preserve */
27
+ _0x241b49(_0x3e0b15){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x180518,_0x47af2f,_0x32c58d,_0x256c7b){super(_0x180518);const _0x12d9f6=this['bindTemplate'],_0x433083=function(_0x305359,_0x39eb1d){const _0x239c35=Array['from'](_0x39eb1d['authors'])['filter'](_0x1990c8=>_0x1990c8!=_0x39eb1d['creator']);return _0x39eb1d['creator']&&_0x239c35['unshift'](_0x39eb1d['creator']),_0x239c35['map'](_0x193a92=>new vi(_0x305359,_0x193a92,_0x193a92==_0x39eb1d['creator']));}(_0x180518,_0x47af2f);this['id']=_0x47af2f['id'],this['_revision']=_0x47af2f,this['_requireRevisionName']=_0x256c7b,this['bind']('name','createdAt')['to'](_0x47af2f),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x53f584=>{return _0x39774c=_0x180518['uiLanguage'],(_0x4a83eb=_0x53f584)['toLocaleDateString'](_0x39774c,{'month':'long','day':'numeric'})+',\x20'+_0x4a83eb['toLocaleTimeString'](_0x39774c,{'hour':'numeric','minute':'numeric'});var _0x39774c,_0x4a83eb;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new li(_0x180518,_0x4ca011),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x439ca0=>_0x439ca0||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x330028,_0x14777a)=>_0x330028&&_0x14777a),this['revisionActionsView']=_0x32c58d&&_0x32c58d['length']?mi(this,_0x32c58d):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x12d9f6['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x12d9f6['if']('isEnabled','ck-disabled',_0x33d55d=>!_0x33d55d),_0x12d9f6['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x12d9f6['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x12d9f6['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':_0x12d9f6['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':_0x433083}]},this['revisionActionsView']],'on':{'click':_0x12d9f6['to'](_0x1a5464=>{_0x1a5464['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x38cfff=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x38cfff,'change',()=>{this['_requireRevisionName']&&!_0x38cfff['value']||this['fire']('setName',{'id':this['id'],'name':_0x38cfff['value']}),_0x38cfff['value']||(_0x38cfff['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bi(_0x322c83,_0x15bdf7){const _0xa253e8=_0x3ae11b['fromJSDate'](_0x322c83)['setLocale'](_0x15bdf7),_0x1a3fe8=_0x3ae11b['local'](),_0x2310d3=_0x1a3fe8['minus']({'days':0x1})['startOf']('day');let _0x14e6ca,_0xc0fc6a;return _0xa253e8['hasSame'](_0x1a3fe8,'day')?(_0x14e6ca=_0xa253e8['startOf']('day')['toJSDate'](),_0xc0fc6a=_0xa253e8['toRelativeCalendar']()):_0xa253e8['hasSame'](_0x2310d3,'day')?(_0x14e6ca=_0x2310d3['toJSDate'](),_0xc0fc6a=_0xa253e8['toRelativeCalendar']()):_0xa253e8['hasSame'](_0x1a3fe8,'week')?(_0x14e6ca=_0xa253e8['startOf']('week')['toJSDate'](),_0xc0fc6a=_0xa253e8['weekdayLong']||''):_0xa253e8['hasSame'](_0x1a3fe8,'year')?(_0x14e6ca=_0xa253e8['startOf']('month')['toJSDate'](),_0xc0fc6a=_0xa253e8['monthLong']||''):(_0x14e6ca=_0xa253e8['startOf']('year')['toJSDate'](),_0xc0fc6a=String(_0xa253e8['year'])),{'startDate':_0x14e6ca,'localizedPeriodName':_0xc0fc6a};}class fi extends _0x3e0b15{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4c08a5,_0x187ff6,_0xd732c,_0x20cdc5){super(_0x4c08a5);const _0x5e3705=bi(_0x187ff6,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x187ff6,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xd732c,this['_requireRevisionName']=_0x20cdc5,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':_0x5e3705}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x12e1ea){const _0x138a71=new pi(this['locale'],_0x12e1ea,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x138a71);}['removeRevision'](_0x34e9e5){const _0x1fd1d0=this['revisionViews']['find'](_0x1865b7=>_0x1865b7['id']===_0x34e9e5['id']);this['revisionViews']['remove'](_0x1fd1d0);}}class ki extends _0x3e0b15{constructor(_0x3b4fa1){super(_0x3b4fa1);const _0x1acceb=new _0x137374();_0x1acceb['content']=_0x46dbf8,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1acceb,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x3b4fa1,'Revision\x20history')]}]});}}class ui extends _0x3e0b15{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2457ce,_0x1ac705,_0xcd4bcb,_0xc3f9e6){super(_0x2457ce);const _0x8081b8=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1ac705,this['_revisionActions']=_0xcd4bcb,this['_requireRevisionName']=_0xc3f9e6,this['on']('select',(_0x55ece8,_0x547deb)=>{this['fire']('revisionSelected',_0x547deb);}),this['on']('setName',(_0xf3d696,_0xa961e2)=>{this['fire']('revisionSetName',_0xa961e2);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new ki(_0x2457ce),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x8081b8['if']('isEnabled','ck-disabled',_0x2d9117=>!_0x2d9117)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x25d657 of this['_revisions'])this['_addRevision'](_0x25d657);this['_revisions']['on']('add',(_0x476b36,_0x381fb7)=>{this['_addRevision'](_0x381fb7);}),this['_revisions']['on']('remove',(_0x22bccc,_0x2741d4)=>{this['_removeRevision'](_0x2741d4);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x54ec66=>_0x54ec66['revisionViews']['map'](_0x4c24cb=>_0x4c24cb))['flat']();}['selectRevision'](_0x2071c4){for(const _0x2996fd of this['revisionViews'])_0x2071c4&&_0x2071c4['id']===_0x2996fd['id']?_0x2996fd['select']():_0x2996fd['deselect']();}['highlightRevisions'](_0x4126ed){for(const _0x3dedbc of this['revisionViews'])_0x4126ed['some'](({id:_0xd98d66})=>_0xd98d66===_0x3dedbc['id'])?_0x3dedbc['highlight']():_0x3dedbc['unhighlight']();}['_addRevision'](_0x50f101){const _0x301853=bi(_0x50f101['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x295aa9=this['timePeriodViews']['get'](0x0);_0x295aa9&&_0x295aa9['startDate']['getTime']()===_0x301853['getTime']()||(_0x295aa9=new fi(this['locale'],_0x301853,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x295aa9)),_0x295aa9['addRevision'](_0x50f101);}['_removeRevision'](_0x11392f){const _0x9a5c97=bi(_0x11392f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x9a5c97)['removeRevision'](_0x11392f);}['_getTimePeriodViewByStartDate'](_0x4ab2c2){return this['timePeriodViews']['find'](_0x15328c=>_0x15328c['startDate']['getTime']()===_0x4ab2c2['getTime']());}}class d extends _0x38f444{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x13cb1e){super(_0x13cb1e),this['_revisionViewer']=_0x13cb1e['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2e7af5=this['_revisionsRepository']['_revisions'],_0x364c83=this['_createRevisionActions'](),_0x9c5d9d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x2e7af5,_0x364c83,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',(_0x3f95c3,_0x41bc63)=>{_0x41bc63['revisionViews']['on']('add',(_0x1e2ad9,_0x37cfd1)=>{_0x37cfd1['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)),_0x9c5d9d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x339c12=this['_revisionsRepository']['getRevision'](0x0);if(_0x339c12){const _0x11a464=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x339c12['id']);this['_revisionViewer']['compare'](_0x339c12,_0x11a464);}}['_handleRevisionSelected'](_0x541a36,_0xe2e96c){const _0x51f6c6=this['_revisionsRepository']['getRevision'](_0xe2e96c['id']),_0x402def=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x51f6c6['id']);this['_revisionViewer']['compare'](_0x51f6c6,_0x402def);}['_handleRevisionSetName'](_0xa7b9e1,_0x370734){this['_revisionsRepository']['getRevision'](_0x370734['id'])['setName'](_0x370734['name']);}['_handleDiffChange'](_0x31cf97,_0x5da594,_0x176742){const _0x185ed2=this['_revisionsRepository']['getRevisionsInDiff'](_0x176742);_0x185ed2['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x185ed2),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x185ed2[0x0]));}['_createRevisionActions'](){const _0x2eab8e=this['editor'],_0x1c3452=d['availableRevisionActions'],_0x385616=_0x2eab8e['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x385616['length'])return _0x385616['map'](_0x32e5e2=>{const _0x13db1e='string'==typeof _0x32e5e2?Object['assign']({},_0x1c3452[_0x32e5e2]):_0x32e5e2;return _0x13db1e['action']=_0x13db1e['action']['bind'](this,_0x2eab8e),_0x13db1e['isVisible']&&(_0x13db1e['isVisible']=_0x13db1e['isVisible']['bind'](this,_0x2eab8e)),_0x13db1e;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x4542d4},_0x4f7128)=>{const _0x1eb1e4=_0x4542d4['get'](u),_0x46d835=_0x1eb1e4['repository'];let _0x4fa122=_0x1eb1e4['diff']['newRevisionId'],_0x13c092=_0x4f7128['id'];_0x46d835['getIndex'](_0x4fa122)>_0x46d835['getIndex'](_0x13c092)&&([_0x4fa122,_0x13c092]=[_0x13c092,_0x4fa122]),_0x1eb1e4['compare'](_0x4fa122,_0x13c092);},'isVisible':({plugins:_0x44dcc7},_0x56e671)=>{const _0x2b0121=_0x44dcc7['get'](u);return!(_0x2b0121['repository']['getRevisionsInDiff'](_0x2b0121['diff'])['length']>0x2)&&!_0x56e671['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1bd19e,{id:_0x45c7b1})=>{_0x1bd19e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x45c7b1);},'isVisible':({plugins:_0x1bea43},_0x385da5)=>!!_0x1bea43['get'](u)['repository']['getLaterVisibleRevision'](_0x385da5['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x697ee9},{id:_0x79fab0,revisionNameView:_0x14468f})=>{const _0x1602c3=_0x697ee9['get'](u),_0x16fd5a=_0x1602c3['repository']['getEarlierVisibleRevision'](_0x79fab0);_0x1602c3['compare'](_0x79fab0,_0x16fd5a),_0x14468f['focus'](),_0x14468f['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x3e5a52,_0x3fab02){super(_0x3e5a52),this['_view']=_0x3fab02,this['_toolbarConfig']=st(_0x3e5a52['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x33d90b){const _0x3ab9a9=this['editor'],_0x49d024=this['view'],_0x50a584=_0x3ab9a9['editing']['view'],_0xffb93f=_0x49d024['editable'],_0x29fac6=_0x50a584['document']['getRoot']();_0xffb93f['name']=_0x29fac6['rootName'],_0x49d024['render']();const _0x56db1a=_0xffb93f['element'];this['setEditableElement'](_0xffb93f['name'],_0x56db1a),_0x49d024['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x50a584['attachDomRoot'](_0x56db1a),this['_elementReplacer']['replace'](_0x33d90b,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1de71b=this['view'],_0x3cd35e=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x3cd35e['detachDomRoot'](_0x1de71b['editable']['name']),_0x1de71b['destroy']();}['_initToolbar'](){const _0x54b1a8=this['view'];_0x54b1a8['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x54b1a8['stickyPanel']['limiterElement']=_0x54b1a8['element'],_0x54b1a8['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x2adad9})=>_0x2adad9),_0x54b1a8['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x54b1a8['toolbar']);}}class ii extends _0x5afad5{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3a376f,_0x4da57b,_0x5941ff={}){super(_0x3a376f),this['stickyPanel']=new _0x2f947a(_0x3a376f),this['toolbar']=new _0x2f00e2(_0x3a376f,{'shouldGroupWhenFull':_0x5941ff['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x3a376f,_0x4da57b);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
- _0x4af2d8(_0xb3fb01){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4d848a,_0x2a92c4){super(_0x2a92c4),this['sourceElement']=_0x4d848a,this['model']['document']['createRoot']();const _0x1ef4ba=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x1ef4ba);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x190f20,_0x5ecdf2){const _0x49e033=new this(_0x190f20,_0x5ecdf2);return await _0x49e033['initPlugins'](),await _0x49e033['ui']['init'](_0x190f20),await _0x49e033['data']['init'](_0x49e033['config']['get']('initialData')||''),_0x49e033['fire']('ready'),_0x49e033;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0x1364e3{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x470bed){function _0x2d315b(_0x44d95c){return _0x44d95c['map'](_0x4f10d5=>String['fromCharCode'](_0x4f10d5))['join']('');}super(_0x470bed),this['result']='end',_0x470bed[_0x2d315b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d315b([0x76,0x69,0x65,0x77])][_0x2d315b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d315b([0x61,0x75,0x74,0x6f]),_0x470bed[_0x2d315b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2d315b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d315b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2d315b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2d315b([0x6f,0x6b])});}}class ct extends _0x1364e3{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x21891d){if(super(_0x21891d),!this['editor']['config']['get']('revisionHistory'))throw new _0x4077b7('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x55821a=>this['_showRevisionViewer']({..._0x55821a,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xfdc249=>this['_closeRevisionViewer'](_0xfdc249)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2ef964=>this['_restoreRevision'](_0x2ef964)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2aa469){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2aa469;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x59aeab){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x59aeab);}['getRevision'](_0x187348){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x187348);}['getRevisions'](_0x2215fc){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2215fc||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4bc81d=this['editor'],_0x4032af=_0x1668a1(_0x4bc81d,p),_0x5db0e9=_0x4bc81d['plugins']['get']('RevisionTracker'),_0x31075f=_0x4bc81d['plugins']['get']('Users')['users'];return _0x4032af['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4032af['lazyRoots'],(_0x4032af['plugins']['push'](ht,u,v,class extends _0x1364e3{static get['requires'](){return[u,'Users'];}['init'](){const _0x5c7c96=this['editor']['plugins']['get']('Users');for(const _0x11d021 of _0x31075f)_0x11d021['isAnonymous']||_0x5c7c96['getUser'](_0x11d021['id'])||_0x5c7c96['addUser'](_0x11d021);const _0x18af71=_0x5db0e9['repository']['getRevisions']();let _0x23dcfa=null;const _0x472c4e=this['editor']['plugins']['get']('RevisionViewer');_0x472c4e['adapter']=_0x5db0e9['adapter'],_0x472c4e['bind']('isEnabled')['to'](_0x5db0e9),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4bc81d,'isReadOnly',_0x538a1e=>!_0x538a1e);for(const _0x33f4a9 of _0x18af71){const _0x2723b5=null===_0x33f4a9['creator'];if(_0x2723b5&&_0x33f4a9['toVersion']===_0x33f4a9['fromVersion'])continue;const _0x29d9d9=_0x33f4a9['toJSON']();_0x472c4e['addRevisionData'](_0x29d9d9,(_0xd41b1b,_0x2cd437,_0x32d184)=>{if(_0x2723b5){if(_0x23dcfa)_0x23dcfa['_update'](_0xd41b1b,_0x2cd437);else{if(!_0x2cd437){const _0x35b033=_0x32d184['toJSON']();_0x35b033['id']=_0x2dfa83(),_0x5db0e9['saveRevision'](_0x35b033,_0x32d184['toVersion'])['then'](_0x1ca5ca=>{_0x23dcfa=_0x1ca5ca;});}}}else _0x33f4a9['_update'](_0xd41b1b,_0x2cd437);});}}},d),_0x4032af);}['_enhanceShowRevisionViewerCallback'](){const _0x2c5141=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x47ecda=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x28dccc=this['editor']['plugins']['get']('Autosave');await _0x28dccc['save']();}else await _0x47ecda['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x57eb1f=this['editor']['plugins']['get']('Dialog');_0x57eb1f['isOpen']&&_0x57eb1f['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x495f7e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x408875 of _0x495f7e)_0x408875['class']=_0x408875['class']?_0x408875['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x3cc24c=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3cc24c&&_0x3cc24c['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x53fc2c=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x53fc2c&&_0x53fc2c['setAttribute']('tabindex','-1');}}const _0x165ac9=this['_getRevisionViewerEditorConfig']();return _0x2c5141(_0x165ac9)['then'](_0x1b1f7c=>{return(this['_viewerEditor']=_0x1b1f7c,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'),_0x1b1f7c);})['catch'](_0x5c83ba=>(console['error'](_0x5c83ba),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x50e1cd=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 _0x75d229=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x532460 of _0x75d229)_0x532460['class']='ck-tab-panel_disabled'===_0x532460['class']?'':_0x532460['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x22131d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22131d&&_0x22131d['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x396ee5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x396ee5&&_0x396ee5['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x50e1cd(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x276c2d=this['editor']['plugins']['get']('Annotations');_0x276c2d['refreshVisibility'](),_0x276c2d['refreshPositioning']();}});});}['_showRevisionViewer'](_0x59de67){const _0x119985=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xc08513=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x36f3a3=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x36f3a3,_0x59de67)['then'](_0x3648de=>(_0xc08513['style']['display']='block',_0x119985['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3648de));}['_closeRevisionViewer'](_0x476aa8){const _0x36e0f8=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x36e0f8['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x476aa8['destroy']();}async['_restoreRevision'](_0x3bd31e){const _0x2c4cb5=this['editor'],_0x311e85=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1054f7=_0x2c4cb5['plugins']['get']('RevisionTracker'),_0x2fa002=_0x2c4cb5['plugins']['get']('RevisionHistoryUtils'),_0xf92861=_0x311e85['repository']['getRevision'](_0x3bd31e);let _0x5f0bd0,_0x55afda,_0xb21bb4;try{await _0x2fa002['loadRevisionData'](_0xf92861,this['adapter']),_0x5f0bd0=_0x2fa002['getRevisionDocumentData'](_0xf92861),_0x55afda=_0x2fa002['getRevisionRootsAttributes'](_0xf92861);}catch(_0x474130){return void console['error'](_0x474130);}_0x2c4cb5['model']['change'](_0x592346=>{for(const _0x326bfb of Array['from'](_0x2c4cb5['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x592346['removeMarker'](_0x326bfb);}),_0x311e85['isReady']=!0x1,_0x2c4cb5['model']['enqueueChange'](_0x46312b=>{_0x46312b['setSelection'](null),_0x46312b['removeSelectionAttribute'](_0x2c4cb5['model']['document']['selection']['getAttributeKeys']());const _0x39091c=Object['keys'](_0x5f0bd0);for(const _0x2117bd of _0x2c4cb5['model']['document']['roots'])'$graveyard'!=_0x2117bd['rootName']&&_0x2117bd['isAttached']()&&!_0x39091c['includes'](_0x2117bd['rootName'])&&_0x46312b['detachRoot'](_0x2117bd);for(const _0x5a30e7 of _0x39091c){let _0x2a73a6=_0x2c4cb5['model']['document']['getRoot'](_0x5a30e7);_0x2a73a6&&_0x2a73a6['isAttached']()||(_0x2a73a6=_0x46312b['addRoot'](_0x5a30e7));const _0x21a506=_0x55afda[_0x5a30e7],_0x2ca190=Object['keys'](_0x21a506),_0x6f97c4=_0x5f0bd0[_0x5a30e7];for(const _0x42dbfa of _0x2a73a6['getAttributeKeys']())_0x2ca190['includes'](_0x42dbfa)||_0x46312b['removeAttribute'](_0x42dbfa,_0x2a73a6);for(const _0x1ff356 of _0x2ca190)_0x46312b['setAttribute'](_0x1ff356,_0x55afda[_0x5a30e7][_0x1ff356],_0x2a73a6);_0x46312b['remove'](_0x46312b['createRangeIn'](_0x2a73a6)),_0x46312b['insert'](_0x2c4cb5['data']['parse'](_0x6f97c4,_0x2a73a6),_0x2a73a6,0x0);}});const _0x379cbe=m(_0x2c4cb5['locale'],'Restored');if(_0xf92861['name'])_0xb21bb4=-0x1==_0xf92861['name']['indexOf'](_0x379cbe)?_0x379cbe+':\x20'+_0xf92861['name']:_0xf92861['name'];else _0xb21bb4=_0x379cbe+':\x20'+(_0xf92861['createdAt']['toLocaleDateString'](_0x2c4cb5['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xf92861['createdAt']['toLocaleTimeString'](_0x2c4cb5['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1054f7['saveRevision']({'name':_0xb21bb4}),_0x311e85['isReady']=!0x0,_0x2c4cb5['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};
29
+ rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0xe4465a){super(_0xe4465a),this['_revisionViewer']=_0xe4465a['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1db292=this['_revisionsRepository']['_revisions'],_0x2fc7fa=this['_createRevisionActions'](),_0x41d76c=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ui(this['editor']['locale'],_0x1db292,_0x2fc7fa,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',(_0xdb09ad,_0x118937)=>{_0x118937['revisionViews']['on']('add',(_0x219abc,_0x33a5f7)=>{_0x33a5f7['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)),_0x41d76c['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0xab3ccf=this['_revisionsRepository']['getRevision'](0x0);if(_0xab3ccf){const _0x5e8a31=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xab3ccf['id']);this['_revisionViewer']['compare'](_0xab3ccf,_0x5e8a31);}}['_handleRevisionSelected'](_0x3bf5d4,_0x354dd3){const _0x5d6883=this['_revisionsRepository']['getRevision'](_0x354dd3['id']),_0x14517d=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5d6883['id']);this['_revisionViewer']['compare'](_0x5d6883,_0x14517d);}['_handleRevisionSetName'](_0x2354b2,_0x2a756a){this['_revisionsRepository']['getRevision'](_0x2a756a['id'])['setName'](_0x2a756a['name']);}['_handleDiffChange'](_0x36dcf7,_0x230726,_0x474ec3){const _0x4e9058=this['_revisionsRepository']['getRevisionsInDiff'](_0x474ec3);_0x4e9058['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x4e9058),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x4e9058[0x0]));}['_createRevisionActions'](){const _0x31799b=this['editor'],_0x3da9c0=d['availableRevisionActions'],_0x817032=_0x31799b['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x817032['length'])return _0x817032['map'](_0x5dff1c=>{const _0x5b8a86='string'==typeof _0x5dff1c?Object['assign']({},_0x3da9c0[_0x5dff1c]):_0x5dff1c;return _0x5b8a86['action']=_0x5b8a86['action']['bind'](this,_0x31799b),_0x5b8a86['isVisible']&&(_0x5b8a86['isVisible']=_0x5b8a86['isVisible']['bind'](this,_0x31799b)),_0x5b8a86;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x5aa11c},_0x4e8ffe)=>{const _0x2eeefa=_0x5aa11c['get'](u),_0x30a0ab=_0x2eeefa['repository'];let _0x16bca=_0x2eeefa['diff']['newRevisionId'],_0x364d5b=_0x4e8ffe['id'];_0x30a0ab['getIndex'](_0x16bca)>_0x30a0ab['getIndex'](_0x364d5b)&&([_0x16bca,_0x364d5b]=[_0x364d5b,_0x16bca]),_0x2eeefa['compare'](_0x16bca,_0x364d5b);},'isVisible':({plugins:_0x23374c},_0x53bfa7)=>{const _0x229d43=_0x23374c['get'](u);return!(_0x229d43['repository']['getRevisionsInDiff'](_0x229d43['diff'])['length']>0x2)&&!_0x53bfa7['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1e238b,{id:_0x4d376e})=>{_0x1e238b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4d376e);},'isVisible':({plugins:_0x5358b5},_0x1e6a80)=>!!_0x5358b5['get'](u)['repository']['getLaterVisibleRevision'](_0x1e6a80['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xcbea88},{id:_0x20c3db,revisionNameView:_0x178f17})=>{const _0x225d70=_0xcbea88['get'](u),_0x40be1b=_0x225d70['repository']['getEarlierVisibleRevision'](_0x20c3db);_0x225d70['compare'](_0x20c3db,_0x40be1b),_0x178f17['focus'](),_0x178f17['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0xf6db3e,_0x14fb5e){super(_0xf6db3e),this['_view']=_0x14fb5e,this['_toolbarConfig']=st(_0xf6db3e['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x315a57){const _0x1dd037=this['editor'],_0x4cfcfa=this['view'],_0x2f5615=_0x1dd037['editing']['view'],_0x1ccdac=_0x4cfcfa['editable'],_0xeae7fe=_0x2f5615['document']['getRoot']();_0x1ccdac['name']=_0xeae7fe['rootName'],_0x4cfcfa['render']();const _0x5d5820=_0x1ccdac['element'];this['setEditableElement'](_0x1ccdac['name'],_0x5d5820),_0x4cfcfa['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2f5615['attachDomRoot'](_0x5d5820),this['_elementReplacer']['replace'](_0x315a57,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x18ab0f=this['view'],_0x1b0871=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x1b0871['detachDomRoot'](_0x18ab0f['editable']['name']),_0x18ab0f['destroy']();}['_initToolbar'](){const _0x40cc3f=this['view'];_0x40cc3f['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x40cc3f['stickyPanel']['limiterElement']=_0x40cc3f['element'],_0x40cc3f['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x39b955})=>_0x39b955),_0x40cc3f['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x40cc3f['toolbar']);}}class ii extends _0x2ed6c9{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3baa19,_0x6fae02,_0x452fb7={}){super(_0x3baa19),this['stickyPanel']=new _0x468a35(_0x3baa19),this['toolbar']=new _0xeb63cb(_0x3baa19,{'shouldGroupWhenFull':_0x452fb7['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x3baa19,_0x6fae02);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
+ _0x298957(_0x30b7bf){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x524dc8,_0x481fe3){super(_0x481fe3),this['sourceElement']=_0x524dc8,this['model']['document']['createRoot']();const _0x28429b=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x28429b);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x3e4dcc,_0x430595){const _0x497235=new this(_0x3e4dcc,_0x430595);return await _0x497235['initPlugins'](),await _0x497235['ui']['init'](_0x3e4dcc),await _0x497235['data']['init'](_0x497235['config']['get']('initialData')||''),_0x497235['fire']('ready'),_0x497235;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0x38f444{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46c92e){function _0x1c4bcc(_0x18f32f){return _0x18f32f['map'](_0x39d6cc=>String['fromCharCode'](_0x39d6cc))['join']('');}super(_0x46c92e),this['result']='end',_0x46c92e[_0x1c4bcc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c4bcc([0x76,0x69,0x65,0x77])][_0x1c4bcc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1c4bcc([0x61,0x75,0x74,0x6f]),_0x46c92e[_0x1c4bcc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1c4bcc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1c4bcc([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1c4bcc([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1c4bcc([0x6f,0x6b])});}}class ht extends _0x38f444{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0xabf0ab){if(super(_0xabf0ab),!this['editor']['config']['get']('revisionHistory'))throw new _0x383d8c('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2b87ea=>this['_showRevisionViewer']({..._0x2b87ea,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xfaf883=>this['_closeRevisionViewer'](_0xfaf883)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x280cc0=>this['_restoreRevision'](_0x280cc0)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x7d29d5){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x7d29d5;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x598ef4){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x598ef4);}['getRevision'](_0x9be6e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x9be6e);}['getRevisions'](_0x52d2ca){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x52d2ca||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x5104af=this['editor'],_0x42e1f4=_0x5ec73f(_0x5104af,p),_0x5a8522=_0x5104af['plugins']['get']('RevisionTracker'),_0x3bcb51=_0x5104af['plugins']['get']('Users')['users'];return _0x42e1f4['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x42e1f4['lazyRoots'],(_0x42e1f4['plugins']['push'](at,u,v,class extends _0x38f444{static get['requires'](){return[u,'Users'];}['init'](){const _0x43378b=this['editor']['plugins']['get']('Users');for(const _0x2c40f9 of _0x3bcb51)_0x2c40f9['isAnonymous']||_0x43378b['getUser'](_0x2c40f9['id'])||_0x43378b['addUser'](_0x2c40f9);const _0x13f886=_0x5a8522['repository']['getRevisions']();let _0x27c745=null;const _0xebae42=this['editor']['plugins']['get']('RevisionViewer');_0xebae42['adapter']=_0x5a8522['adapter'],_0xebae42['bind']('isEnabled')['to'](_0x5a8522),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x5104af,'isReadOnly',_0x677c3c=>!_0x677c3c);for(const _0x3a2c30 of _0x13f886){const _0x3c870f=null===_0x3a2c30['creator'];if(_0x3c870f&&_0x3a2c30['toVersion']===_0x3a2c30['fromVersion'])continue;const _0x2a16b4=_0x3a2c30['toJSON']();_0xebae42['addRevisionData'](_0x2a16b4,(_0x20eaab,_0x289fc2,_0x1a9c36)=>{if(_0x3c870f){if(_0x27c745)_0x27c745['_update'](_0x20eaab,_0x289fc2);else{if(!_0x289fc2){const _0xa7ab7a=_0x1a9c36['toJSON']();_0xa7ab7a['id']=_0x31075e(),_0x5a8522['saveRevision'](_0xa7ab7a,_0x1a9c36['toVersion'])['then'](_0x34cc74=>{_0x27c745=_0x34cc74;});}}}else _0x3a2c30['_update'](_0x20eaab,_0x289fc2);});}}},d),_0x42e1f4);}['_enhanceShowRevisionViewerCallback'](){const _0xbfae7c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x607d5f=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x16f0a4=this['editor']['plugins']['get']('Autosave');await _0x16f0a4['save']();}else await _0x607d5f['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x42d984=this['editor']['plugins']['get']('Dialog');_0x42d984['isOpen']&&_0x42d984['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x538148=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x708b6e of _0x538148)_0x708b6e['class']=_0x708b6e['class']?_0x708b6e['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x47d658=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x47d658&&_0x47d658['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3e4eba=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3e4eba&&_0x3e4eba['setAttribute']('tabindex','-1');}}const _0xa3b186=this['_getRevisionViewerEditorConfig']();return _0xbfae7c(_0xa3b186)['then'](_0x4a944d=>{return(this['_viewerEditor']=_0x4a944d,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'),_0x4a944d);})['catch'](_0x33bc17=>(console['error'](_0x33bc17),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x49adf9=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 _0x4b1c6c=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x2bfd40 of _0x4b1c6c)_0x2bfd40['class']='ck-tab-panel_disabled'===_0x2bfd40['class']?'':_0x2bfd40['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x3d81a6=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3d81a6&&_0x3d81a6['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x29d551=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x29d551&&_0x29d551['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x49adf9(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x23f943=this['editor']['plugins']['get']('Annotations');_0x23f943['refreshVisibility'](),_0x23f943['refreshPositioning']();}});});}['_showRevisionViewer'](_0x46a8e0){const _0x139d89=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x376712=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5613db=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x5613db,_0x46a8e0)['then'](_0x291907=>(_0x376712['style']['display']='block',_0x139d89['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x291907));}['_closeRevisionViewer'](_0x3e98fc){const _0x53aeb9=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x53aeb9['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x3e98fc['destroy']();}async['_restoreRevision'](_0x5a5b46){const _0x37a29d=this['editor'],_0x2cc75f=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x564073=_0x37a29d['plugins']['get']('RevisionTracker'),_0x5892e2=_0x37a29d['plugins']['get']('RevisionHistoryUtils'),_0x4f1128=_0x2cc75f['repository']['getRevision'](_0x5a5b46);let _0x42bf7c,_0x5f2acc,_0x30ff76;try{await _0x5892e2['loadRevisionData'](_0x4f1128,this['adapter']),_0x42bf7c=_0x5892e2['getRevisionDocumentData'](_0x4f1128),_0x5f2acc=_0x5892e2['getRevisionRootsAttributes'](_0x4f1128);}catch(_0x5dbec5){return void console['error'](_0x5dbec5);}_0x37a29d['model']['change'](_0x2e72cb=>{for(const _0x40c353 of Array['from'](_0x37a29d['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2e72cb['removeMarker'](_0x40c353);}),_0x2cc75f['isReady']=!0x1,_0x37a29d['model']['enqueueChange'](_0x4342b4=>{_0x4342b4['setSelection'](null),_0x4342b4['removeSelectionAttribute'](_0x37a29d['model']['document']['selection']['getAttributeKeys']());const _0x31dbbf=Object['keys'](_0x42bf7c);for(const _0x568bba of _0x37a29d['model']['document']['roots'])'$graveyard'!=_0x568bba['rootName']&&_0x568bba['isAttached']()&&!_0x31dbbf['includes'](_0x568bba['rootName'])&&_0x4342b4['detachRoot'](_0x568bba);for(const _0x36f9ef of _0x31dbbf){let _0x99feec=_0x37a29d['model']['document']['getRoot'](_0x36f9ef);_0x99feec&&_0x99feec['isAttached']()||(_0x99feec=_0x4342b4['addRoot'](_0x36f9ef));const _0xa58b1f=_0x5f2acc[_0x36f9ef],_0x9d1efc=Object['keys'](_0xa58b1f),_0x30dfbc=_0x42bf7c[_0x36f9ef];for(const _0x5eeb4a of _0x99feec['getAttributeKeys']())_0x9d1efc['includes'](_0x5eeb4a)||_0x4342b4['removeAttribute'](_0x5eeb4a,_0x99feec);for(const _0x439c9a of _0x9d1efc)_0x4342b4['setAttribute'](_0x439c9a,_0x5f2acc[_0x36f9ef][_0x439c9a],_0x99feec);_0x4342b4['remove'](_0x4342b4['createRangeIn'](_0x99feec)),_0x4342b4['insert'](_0x37a29d['data']['parse'](_0x30dfbc,_0x99feec),_0x99feec,0x0);}});const _0x1a1d95=m(_0x37a29d['locale'],'Restored');if(_0x4f1128['name'])_0x30ff76=-0x1==_0x4f1128['name']['indexOf'](_0x1a1d95)?_0x1a1d95+':\x20'+_0x4f1128['name']:_0x4f1128['name'];else _0x30ff76=_0x1a1d95+':\x20'+(_0x4f1128['createdAt']['toLocaleDateString'](_0x37a29d['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4f1128['createdAt']['toLocaleTimeString'](_0x37a29d['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x564073['saveRevision']({'name':_0x30ff76}),_0x2cc75f['isReady']=!0x0,_0x37a29d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,at as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ot as ShowChangeCommand};