@ckeditor/ckeditor5-revision-history 0.0.0-nightly-next-20250227.1 → 0.0.0-nightly-20250228.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/build/revision-history.js +1 -1
- package/ckeditor5-metadata.json +1 -1
- package/dist/index.js +6 -6
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +11 -12
- package/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.js +1 -1
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.js +1 -1
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/theme/icons/arrow-down.svg +1 -0
- package/theme/icons/arrow-up.svg +1 -0
- package/theme/icons/revision-history.svg +1 -0
- package/theme/icons/user.svg +1 -0
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x3ddaf9(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x5a6bba){super(),this['id']=_0x5a6bba['id']||_0x2d3c1e(),this['creator']=_0x5a6bba['creator']||null,this['authors']=_0x5a6bba['authors']||[],this['diffData']=_0x5a6bba['diffData']||null,this['toVersion']=_0x5a6bba['toVersion']||0x0,this['fromVersion']=_0x5a6bba['fromVersion']||0x0,this['set']('name',_0x5a6bba['name']||''),this['set']('createdAt',_0x5a6bba['createdAt']||new Date()),this['set']('attributes',_0x5a6bba['attributes']||{});}['setName'](_0x51903c){this['_update']({'name':_0x51903c});}['setAttribute'](_0x3790d0,_0x34ddf3){const _0xc56adb=_0x54079b(this['attributes']);_0x18db9c(_0xc56adb,_0x3790d0,_0x34ddf3),this['_update']({'attributes':_0xc56adb});}['removeAttribute'](_0x4c1d13){const _0x2f342d=_0x54079b(this['attributes']);_0x14fdd6(_0x2f342d,_0x4c1d13),this['_update']({'attributes':_0x2f342d});}['_update'](_0x1f7cbc,_0x174e1c=!0x1){let _0xc80756=!0x1;const _0x1844a0={'id':this['id']},_0x86b3ca=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x110c8b of _0x86b3ca){const _0x394389=_0x1f7cbc[_0x110c8b];void 0x0!==_0x394389&&_0x394389!==this[_0x110c8b]&&(this[_0x110c8b]=_0x394389,_0x1844a0[_0x110c8b]=_0x394389,_0xc80756=!0x0);}_0xc80756&&(_0x1844a0['authors']&&(_0x1844a0['authorsIds']=_0x1844a0['authors']['map'](_0x139c7f=>_0x139c7f['id']),delete _0x1844a0['authors']),this['fire']('_update',_0x1844a0,_0x174e1c));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x543ece=>_0x543ece['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x19eb44{['_revisions'];static get['requires'](){return[_0xb8447b];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x21ce24){super(_0x21ce24),this['_revisions']=new _0x1caf96();}['afterInit'](){!async function(_0x5d8fdf){const _0xddf0be=_0x5f5a7d([0x6f,0x31,0x55,0x56,0x70,0x72,0x65,0x7a,0x64,0x47,0x68,0x62,0x42,0x69,0x73,0x4f,0x32,0x43,0x38,0x35,0x37,0x79,0x4c,0x74,0x53,0x39,0x45,0x61,0x54,0x6a,0x4d,0x4e,0x30,0x58,0x36,0x59,0x6e,0x52,0x44,0x6c,0x6d,0x49,0x33,0x50,0x5a,0x77,0x63,0x6b,0x67,0x78,0x4b,0x71,0x4a,0x66,0x57,0x51,0x76,0x46,0x41,0x48,0x75,0x34]),_0x364e08=0xeb829,_0x349780=0x766d1642,_0x41cf77=0x766a76f2^_0x349780,_0x20c492=window[_0x5f5a7d([0x44,0x61,0x74,0x65])][_0x5f5a7d([0x6e,0x6f,0x77])](),_0x2da03e=_0x5d8fdf[_0x5f5a7d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2801ac=new window[(_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3182b4=>{_0x2da03e[_0x5f5a7d([0x6f,0x6e,0x63,0x65])](_0x5f5a7d([0x72,0x65,0x61,0x64,0x79]),_0x3182b4);}),_0x26fdc1={[_0x5f5a7d([0x6b,0x74,0x79])]:_0x5f5a7d([0x45,0x43]),[_0x5f5a7d([0x75,0x73,0x65])]:_0x5f5a7d([0x73,0x69,0x67]),[_0x5f5a7d([0x63,0x72,0x76])]:_0x5f5a7d([0x50,0x2d,0x32,0x35,0x36]),[_0x5f5a7d([0x78])]:_0x5f5a7d([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]),[_0x5f5a7d([0x79])]:_0x5f5a7d([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]),[_0x5f5a7d([0x61,0x6c,0x67])]:_0x5f5a7d([0x45,0x53,0x32,0x35,0x36])},_0x85e3e4=_0x2da03e[_0x5f5a7d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5f5a7d([0x67,0x65,0x74])](_0x5f5a7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x6bb5cb(){let _0x1bc4f7,_0x3bae8b=null,_0x2732f7=null;try{if(_0x85e3e4==_0x5f5a7d([0x47,0x50,0x4c]))return _0x5f5a7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1bc4f7=_0x1776d8(),!_0x1bc4f7)return _0x5f5a7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1bc4f7[_0x5f5a7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2732f7=_0x4f03fe(_0x1bc4f7[_0x5f5a7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1bc4f7[_0x5f5a7d([0x6a,0x74,0x69])])),await _0x3b144b()?_0x3aeb6d()?_0x52e87e()?_0x5f5a7d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1328df()?(_0x1bc4f7[_0x5f5a7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5f5a7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3bae8b=_0x17bce0(_0x5f5a7d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1bc4f7[_0x5f5a7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5f5a7d([0x74,0x72,0x69,0x61,0x6c])&&(_0x3bae8b=_0x17bce0(_0x5f5a7d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x10add4()):_0x5f5a7d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5f5a7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5f5a7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4612fc){return _0x5f5a7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x52e87e(){const _0x2f224a=[_0x5f5a7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5f5a7d([0x74,0x72,0x69,0x61,0x6c])][_0x5f5a7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1bc4f7[_0x5f5a7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x20c492/0x3e8:0xe10*_0x41cf77;return _0x1bc4f7[_0x5f5a7d([0x65,0x78,0x70])]<_0x2f224a;}function _0x3aeb6d(){const _0x492ba2=_0x1bc4f7[_0x5f5a7d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x492ba2)return!0x1;if(_0x492ba2[_0x5f5a7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f5a7d([0x2a])))return!0x0;if(_0x492ba2[_0x5f5a7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f5a7d([0x52,0x48])))return!0x0;if(_0x492ba2[_0x5f5a7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f5a7d([0x52,0x52,0x48]))){if(_0x100119())return!0x0;if(_0x388a65()||_0x177a29())return!0x0;}return!0x1;}function _0x1328df(){const _0x599298=_0x1bc4f7[_0x5f5a7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x599298||0x0==_0x599298[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c0f78}=new URL(window[_0x5f5a7d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x599298[_0x5f5a7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c0f78))return!0x0;const _0x77754=_0x5c0f78[_0x5f5a7d([0x73,0x70,0x6c,0x69,0x74])](_0x5f5a7d([0x2e]));return _0x599298[_0x5f5a7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x327154=>_0x327154[_0x5f5a7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f5a7d([0x2a])))[_0x5f5a7d([0x6d,0x61,0x70])](_0x2f6fa6=>_0x2f6fa6[_0x5f5a7d([0x73,0x70,0x6c,0x69,0x74])](_0x5f5a7d([0x2e])))[_0x5f5a7d([0x73,0x6f,0x6d,0x65])](_0x1f6612=>_0x77754[_0x5f5a7d([0x65,0x76,0x65,0x72,0x79])]((_0x561f7d,_0x84a9ec)=>_0x1f6612[_0x84a9ec]===_0x561f7d||_0x1f6612[_0x84a9ec]===_0x5f5a7d([0x2a])));}function _0x10add4(){return _0x3bae8b&&_0x2732f7?new window[(_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x163978,_0x405256)=>{_0x3bae8b[_0x5f5a7d([0x74,0x68,0x65,0x6e])](_0x163978,_0x405256),_0x2732f7[_0x5f5a7d([0x74,0x68,0x65,0x6e])](_0x389397=>{_0x389397!=_0x5f5a7d([0x56,0x61,0x6c,0x69,0x64])&&_0x163978(_0x389397);},_0x405256);}):_0x3bae8b||_0x2732f7||_0x5f5a7d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4f03fe(_0x457f73,_0x43201c){return new window[(_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39a93c=>{if(_0x108057())return _0x39a93c(_0x5f5a7d([0x56,0x61,0x6c,0x69,0x64]));_0x533a23(),_0x2da03e[_0x5f5a7d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5f5a7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x487d9a=!0x1;const _0x34a3dd=_0x2d3c1e();function _0x64bd43(_0x4f7c69){return!!_0x4f7c69&&(typeof _0x4f7c69===_0x5f5a7d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4f7c69===_0x5f5a7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4f7c69[_0x5f5a7d([0x74,0x68,0x65,0x6e])]===_0x5f5a7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4f7c69[_0x5f5a7d([0x63,0x61,0x74,0x63,0x68])]===_0x5f5a7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2f602f(_0x2b760a){_0x1be59e(_0x2b760a)[_0x5f5a7d([0x74,0x68,0x65,0x6e])](_0x33a7c2=>{if(!_0x33a7c2||_0x33a7c2[_0x5f5a7d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5f5a7d([0x6f,0x6b]))return _0x5f5a7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5e8468(_0x590cdc(_0x34a3dd+_0x43201c))!=_0x33a7c2[_0x5f5a7d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5f5a7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5f5a7d([0x56,0x61,0x6c,0x69,0x64]);})[_0x5f5a7d([0x74,0x68,0x65,0x6e])](_0x579725=>(_0x30c90d(),_0x579725),()=>{const _0x3bf39a=_0x2b7d76();return null==_0x3bf39a?(_0x30c90d(),_0x5f5a7d([0x56,0x61,0x6c,0x69,0x64])):_0x5f5a7d(_0x20c492-_0x3bf39a>(0x52619242^_0x349780)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5f5a7d([0x74,0x68,0x65,0x6e])](_0x39a93c)[_0x5f5a7d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x39a93c(_0x5f5a7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x186540=0x765bf8c2^_0x349780;function _0x30c90d(){const _0x43e128=_0x5f5a7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x5e8468(_0x590cdc(_0x457f73)),_0x36cc62=_0x3dba9f(_0x5e8468(window[_0x5f5a7d([0x4d,0x61,0x74,0x68])][_0x5f5a7d([0x63,0x65,0x69,0x6c])](_0x20c492/_0x186540)));window[_0x5f5a7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5f5a7d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x43e128,_0x36cc62);}function _0x2b7d76(){const _0x21d380=_0x5f5a7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x5e8468(_0x590cdc(_0x457f73)),_0x2d9e82=window[_0x5f5a7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5f5a7d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x21d380);return _0x2d9e82?window[_0x5f5a7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3dba9f(_0x2d9e82),0x10)*_0x186540:null;}function _0x1be59e(_0xe98ad8){return new window[(_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x31fc0a,_0x22e841)=>{_0xe98ad8[_0x5f5a7d([0x74,0x68,0x65,0x6e])](_0x31fc0a,_0x22e841),window[_0x5f5a7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x22e841,0x766cc282^_0x349780);});}}_0x2da03e[_0x5f5a7d([0x6f,0x6e])](_0x5f5a7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xa829a,_0x1d7496)=>{if(_0x1d7496[0x0]!=_0x457f73)return _0x39a93c(_0x5f5a7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1d7496[0x1]={..._0x1d7496[0x1],[_0x5f5a7d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x34a3dd};},{[_0x5f5a7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5f5a7d([0x68,0x69,0x67,0x68])}),_0x2da03e[_0x5f5a7d([0x6f,0x6e])](_0x5f5a7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x10e568=>{_0x64bd43(_0x10e568[_0x5f5a7d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x487d9a=!0x0,_0x2f602f(_0x10e568[_0x5f5a7d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5f5a7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5f5a7d([0x6c,0x6f,0x77])}),_0x2801ac[_0x5f5a7d([0x74,0x68,0x65,0x6e])](()=>{_0x487d9a||_0x39a93c(_0x5f5a7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x108057(){return _0x2da03e[_0x5f5a7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5f5a7d([0x76,0x69,0x65,0x77])][_0x5f5a7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5f5a7d([0x61,0x75,0x74,0x6f]);}function _0x533a23(){_0x2da03e[_0x5f5a7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5f5a7d([0x76,0x69,0x65,0x77])][_0x5f5a7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5f5a7d([0x61,0x75,0x74,0x6f]);}}function _0x17bce0(_0x987b98){const _0x16b0d0=[new window[(_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x123691=>setTimeout(_0x123691,0x7664288e^_0x349780)),_0x2801ac[_0x5f5a7d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb75d9c=>{const _0x543f49=0x766d1645^_0x349780,_0xb4371e=_0x5d8fdf[_0x5f5a7d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0xfc32a9(){_0xb4371e[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x543f49&&_0xb75d9c();}_0xfc32a9(),_0xb4371e[_0x5f5a7d([0x6f,0x6e])](_0x5f5a7d([0x61,0x64,0x64]),_0xfc32a9);})),new window[(_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9b4507=>{function _0x1d5c35(){for(const _0x47ee0a in window)if(window[_0x5f5a7d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5f5a7d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x47ee0a))&&window[_0x47ee0a]==_0x364e08)return _0x9b4507();_0x2da03e[_0x5f5a7d([0x73,0x74,0x61,0x74,0x65])]!=_0x5f5a7d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5f5a7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1d5c35,0x766d05ca^_0x349780);}_0x3539d7(_0x5f5a7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1d5c35();})];return window[_0x5f5a7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5f5a7d([0x72,0x61,0x63,0x65])](_0x16b0d0)[_0x5f5a7d([0x74,0x68,0x65,0x6e])](()=>_0x987b98);}async function _0x1f65b6(){if(await _0x2801ac,_0x3539d7(_0x5f5a7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x150107=_0x5d8fdf[_0x5f5a7d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1c84e1=_0x5d8fdf[_0x5f5a7d([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])](_0x150107[_0x5f5a7d([0x69,0x64])]),_0x4ed500=_0xf731a0(_0x5f5a7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4ed500[_0x5f5a7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x150107['id'],_0x1c84e1?_0x1c84e1['id']:null,!0x0),_0x4ed500[_0x5f5a7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5f5a7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4ed500[_0x5f5a7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4ed500[_0x5f5a7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x191e22,void(_0x4ed500[_0x5f5a7d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x191e22);}if(_0x3539d7(_0x5f5a7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3c503d=_0xf731a0(_0x5f5a7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3c503d[_0x5f5a7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5f5a7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3c503d[_0x5f5a7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3c503d[_0x5f5a7d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x191e22,_0x3c503d[_0x5f5a7d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x191e22;}_0x2da03e[_0x5f5a7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5f5a7d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x191e22,_0x2da03e[_0x5f5a7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5f5a7d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x191e22,_0x2da03e[_0x5f5a7d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5f5a7d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x100119(){return _0x3539d7(_0x5f5a7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xf731a0(_0x5f5a7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5f5a7d([0x73,0x74,0x61,0x74,0x65])]==_0x5f5a7d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x388a65(){return _0x3539d7(_0x5f5a7d([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 _0x177a29(){return _0x3539d7(_0x5f5a7d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3126c3(_0x5a695c){const _0x2c98ff=_0xb5ec69();_0x2da03e[_0x2c98ff]=_0x5f5a7d([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])+_0x5a695c,_0x5a695c[_0x5f5a7d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5f5a7d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0xb5ec69()]=_0x364e08),_0x5a695c!=_0x5f5a7d([0x56,0x61,0x6c,0x69,0x64])&&_0x1f65b6();}function _0xb5ec69(){const _0x5146f6=window[_0x5f5a7d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5f5a7d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5f5a7d([0x6e,0x6f,0x77])]())[_0x5f5a7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5f5a7d([0x2e]),'');let _0x2230c2=_0x5f5a7d([0x6f]);for(let _0x19e545=0x0;_0x19e545<_0x5146f6[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19e545+=0x2){let _0x485e7a=window[_0x5f5a7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5146f6[_0x5f5a7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x19e545,_0x19e545+0x2));_0x485e7a>=_0xddf0be[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x485e7a-=_0xddf0be[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2230c2+=_0xddf0be[_0x485e7a];}return _0x2230c2;}function _0x1776d8(){const _0xc686b5=_0x85e3e4[_0x5f5a7d([0x73,0x70,0x6c,0x69,0x74])](_0x5f5a7d([0x2e]));if(0x3!=_0xc686b5[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x54186e(_0xc686b5[0x1]);function _0x54186e(_0x6bb1d4){const _0x373f89=_0x202f7a(_0x6bb1d4);return _0x373f89&&_0x5d5e23()?_0x373f89:null;function _0x5d5e23(){const _0x53c3e0=_0x373f89[_0x5f5a7d([0x6a,0x74,0x69])],_0x5e69db=window[_0x5f5a7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53c3e0[_0x5f5a7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53c3e0[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1e32a9={..._0x373f89,[_0x5f5a7d([0x6a,0x74,0x69])]:_0x53c3e0[_0x5f5a7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x53c3e0[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1e32a9[_0x5f5a7d([0x76,0x63])],_0x590cdc(_0x1e32a9)==_0x5e69db;}}}async function _0x3b144b(){let _0x5cfbad=!0x0;try{const _0x56eb90=_0x85e3e4[_0x5f5a7d([0x73,0x70,0x6c,0x69,0x74])](_0x5f5a7d([0x2e])),[_0x4c8a61,_0x4b8b81,_0x382b00]=_0x56eb90;return _0x40abb0(_0x4c8a61),await _0x506604(_0x4c8a61,_0x4b8b81,_0x382b00),_0x5cfbad;}catch(_0x1edd8c){return!0x1;}function _0x40abb0(_0x5c3e54){const _0x4e544c=_0x202f7a(_0x5c3e54);_0x4e544c&&_0x4e544c[_0x5f5a7d([0x61,0x6c,0x67])]==_0x5f5a7d([0x45,0x53,0x32,0x35,0x36])||(_0x5cfbad=!0x1);}async function _0x506604(_0x24313f,_0x559386,_0x507d36){const _0x30db76=window[_0x5f5a7d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5f5a7d([0x66,0x72,0x6f,0x6d])](_0x35368a(_0x507d36),_0x141d85=>_0x141d85[_0x5f5a7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x45bd4b=new window[(_0x5f5a7d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5f5a7d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x24313f+_0x5f5a7d([0x2e])+_0x559386),_0x12c734=window[_0x5f5a7d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5f5a7d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x12c734)return;const _0x2ebab7=await _0x12c734[_0x5f5a7d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5f5a7d([0x6a,0x77,0x6b]),_0x26fdc1,{[_0x5f5a7d([0x6e,0x61,0x6d,0x65])]:_0x5f5a7d([0x45,0x43,0x44,0x53,0x41]),[_0x5f5a7d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5f5a7d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5f5a7d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x12c734[_0x5f5a7d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5f5a7d([0x6e,0x61,0x6d,0x65])]:_0x5f5a7d([0x45,0x43,0x44,0x53,0x41]),[_0x5f5a7d([0x68,0x61,0x73,0x68])]:{[_0x5f5a7d([0x6e,0x61,0x6d,0x65])]:_0x5f5a7d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2ebab7,_0x30db76,_0x45bd4b)||(_0x5cfbad=!0x1);}}function _0x202f7a(_0x5e9b2e){return _0x5e9b2e[_0x5f5a7d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5f5a7d([0x65,0x79]))?JSON[_0x5f5a7d([0x70,0x61,0x72,0x73,0x65])](_0x35368a(_0x5e9b2e)):null;}function _0x35368a(_0x30552b){return window[_0x5f5a7d([0x61,0x74,0x6f,0x62])](_0x30552b[_0x5f5a7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5f5a7d([0x2b]))[_0x5f5a7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5f5a7d([0x2f])));}function _0x590cdc(_0x17996a){let _0x25f507=0x1505;function _0x120ff4(_0x200ec4){for(let _0x163076=0x0;_0x163076<_0x200ec4[_0x5f5a7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x163076++){const _0x51298d=_0x200ec4[_0x5f5a7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x163076);_0x25f507=(_0x25f507<<0x5)+_0x25f507+_0x51298d,_0x25f507&=_0x25f507;}}function _0x2ad5b9(_0x54912f){Array[_0x5f5a7d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x54912f)?_0x54912f[_0x5f5a7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2ad5b9):_0x54912f&&typeof _0x54912f==_0x5f5a7d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5f5a7d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x54912f)[_0x5f5a7d([0x73,0x6f,0x72,0x74])]()[_0x5f5a7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x32ae9b,_0x496978])=>{_0x120ff4(_0x32ae9b),_0x2ad5b9(_0x496978);}):_0x120ff4(window[_0x5f5a7d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x54912f));}return _0x2ad5b9(_0x17996a),_0x25f507>>>0x0;}function _0x5e8468(_0x2ab6f0){return _0x2ab6f0[_0x5f5a7d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5f5a7d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5f5a7d([0x30]));}function _0x3dba9f(_0x386b05){return _0x386b05[_0x5f5a7d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5f5a7d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5f5a7d([0x6a,0x6f,0x69,0x6e])]('');}function _0x3539d7(_0x26e4af){return _0x2da03e[_0x5f5a7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5f5a7d([0x68,0x61,0x73])](_0x26e4af);}function _0xf731a0(_0x482d73){return _0x2da03e[_0x5f5a7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5f5a7d([0x67,0x65,0x74])](_0x482d73);}function _0x191e22(){}function _0x5f5a7d(_0x211290){return _0x211290['map'](_0x1b7eeb=>String['fromCharCode'](_0x1b7eeb))['join']('');}_0x3126c3(await _0x6bb5cb());}(this);}['createRevision'](_0x548cb1){const _0x1726a7=this['editor']['plugins']['get']('Users');return new h({'id':_0x548cb1['id'],'name':_0x548cb1['name'],'creator':_0x548cb1['creatorId']?_0x1726a7['getUser'](_0x548cb1['creatorId']):null,'diffData':_0x548cb1['diffData']||_0x548cb1['data'],'authors':_0x548cb1['authorsIds']['map'](_0x8599c5=>_0x1726a7['getUser'](_0x8599c5)),'createdAt':new Date(_0x548cb1['createdAt']),'attributes':_0x548cb1['attributes'],'fromVersion':_0x548cb1['fromVersion'],'toVersion':_0x548cb1['toVersion']});}['addRevision'](_0x3a5d71,_0x13c851=0x0){this['_revisions']['add'](_0x3a5d71,_0x13c851);}['getRevision'](_0x42d1b5){return this['_revisions']['get'](_0x42d1b5);}['getRevisions'](_0x29a29e={'toJSON':!0x1}){const _0x3ee01e=Array['from'](this['_revisions']);return _0x3ee01e['reverse'](),_0x29a29e['toJSON']?_0x3ee01e['map'](_0x58d446=>_0x58d446['toJSON']()):_0x3ee01e;}['getIndex'](_0x40b8db){return this['_revisions']['getIndex'](_0x40b8db);}['getEarlierVisibleRevision'](_0x2ee0fa){const [,_0x5003ef]=this['getRevisionsIterator'](_0x2ee0fa,{'direction':'earlier'});return _0x5003ef;}['getLaterVisibleRevision'](_0x2ae340){const [,_0x401282]=this['getRevisionsIterator'](_0x2ae340,{'direction':'later'});return _0x401282;}['getRevisionsInDiff'](_0x36e2a9){const _0xd0fdb8=[];for(const _0xc0ae9f of this['getRevisionsIterator'](_0x36e2a9['newRevisionId']))if(_0xd0fdb8['push'](_0xc0ae9f),_0xc0ae9f['id']===_0x36e2a9['oldRevisionId'])break;return _0xd0fdb8;}*['getRevisionsIterator'](_0x1cb747,{direction:_0x50539a='earlier',filter:_0x335645=()=>!0x0}={}){const _0x27ecf9='earlier'===_0x50539a?0x1:-0x1;let _0x14f5e3=this['_revisions']['get'](_0x1cb747),_0x44e32c=this['getIndex'](_0x14f5e3);for(yield _0x14f5e3;_0x14f5e3;){if(_0x44e32c+=_0x27ecf9,_0x14f5e3=this['getRevision'](_0x44e32c),!_0x14f5e3)return;_0x335645(_0x14f5e3)&&(yield _0x14f5e3);}}}function m(_0x216ae5,_0x56008e,_0x22f200){const t=_0x216ae5['t'];switch(_0x56008e){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'},_0x22f200);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x22f200);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'';}}const E={'c':_0x4b52e0,'a':_0x34b3a3,'e':_0xc09e33,'r':_0x2e2456,'u':_0x26460a};class u extends _0x19eb44{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xb8447b,j,_0x18cc44];}constructor(_0x117f1d){super(_0x117f1d),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x314d5c=_0x2d3c1e();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x314d5c},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x48c901=this['repository']['getRevision'](0x0),_0x16a940=_0x48c901&&null===_0x48c901['creator']?_0x48c901:null;if(this['_continueCurrentRevision']=!!_0x16a940&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x302d7a=this['_source']['getCurrentRevisionId'](),_0x3ec4cc=this['repository']['getRevision'](_0x302d7a);if(_0x3ec4cc)this['_startingVersion']=_0x3ec4cc['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x977e20=this['_source']['history']['_operations']['find'](_0x47ccf4=>!_0x47ccf4['_isInit']),_0x557a64=_0x977e20?_0x977e20['baseVersion']:this['_source']['history']['version'];_0x48c901?(_0x48c901['toVersion']<_0x557a64&&_0x48c901['_update']({'toVersion':_0x557a64}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x16a940['id'],this['_startingVersion']=_0x16a940['fromVersion']):(this['_startingVersion']=_0x48c901['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x557a64,this['_continueCurrentRevision']=!0x1);}}else _0x16a940&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x16a940['toVersion'],this['editor']['model']['document']['history']['version']),_0x16a940['fromVersion']===_0x16a940['toVersion']?(0x0!==_0x16a940['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x16a940['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x16a940['id'],this['_startingVersion']=_0x16a940['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',_0x55fd81=>!_0x55fd81),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2f87cc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5413e8;for(const _0x52f1a2 in _0x2f87cc){const _0x45c8d0=_0x52f1a2,_0x1898d8=_0x2f87cc[_0x45c8d0];if('revisionHistoryLicenseKeyValid'==_0x1898d8||'revisionHistoryLicenseKeyInvalid'==_0x1898d8||'revisionHistoryLicenseKeyExpired'==_0x1898d8||'revisionHistoryLicenseKeyDomainLimit'==_0x1898d8||'revisionHistoryLicenseKeyNotAllowed'==_0x1898d8||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1898d8||'revisionHistoryLicenseKeyTrialLimit'==_0x1898d8||'revisionHistoryLicenseKeyUsageLimit'==_0x1898d8){delete _0x2f87cc[_0x45c8d0],_0x5413e8=_0x1898d8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5413e8&&_0x2f87cc['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5413e8&&_0x2f87cc['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5413e8&&_0x2f87cc['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5413e8&&_0x2f87cc['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5413e8&&_0x2f87cc['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x5413e8&&_0x2f87cc['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5413e8&&_0x2f87cc['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x56b9fb=this['repository']['getRevision'](0x0),_0x34d39e=await this['getRevisionDocumentData'](_0x56b9fb),_0x2bcff3=await this['getRevisionRootsAttributes'](_0x56b9fb);this['_replaceEditorDataWithRevisionData'](_0x34d39e,_0x2bcff3);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x25f910){this['_source']=_0x25f910;}async['update'](){const _0x3f2c37=await this['_source']['getLatestVersion']();if(_0x3f2c37>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5d95f0=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3f2c37});_0x5d95f0['authors']=_0x5d95f0['authorsIds']['map'](_0x36d692=>this['editor']['plugins']['get']('Users')['getUser'](_0x36d692)),this['currentRevision']['_update'](_0x5d95f0);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0xe5c643={},_0x112cf3=null){const _0x1236a1=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x112cf3>this['currentRevision']['toVersion']&&(_0x112cf3=null),null===_0x112cf3&&(_0x112cf3=await this['_source']['getLatestVersion']());const _0x17374c=this['_getFromVersion'](_0x112cf3),_0x209782=this['buildRevisionData']({'from':_0x17374c,'to':_0x112cf3});if(this['currentRevision']['toVersion']<_0x112cf3){const _0x42151e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x112cf3,'to':_0x112cf3});_0x42151e['authors']=[],_0x42151e['authorsIds']=[],_0x42151e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x42151e,!0x0),delete _0x42151e['authors'],_0x1236a1['push'](_0x42151e);}_0xe5c643['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0xe5c643['name']=_0xe5c643['name']||null,_0xe5c643['id']=_0xe5c643['id']||_0x2d3c1e(),_0xe5c643={..._0xe5c643,..._0x209782};const _0x40f44f=this['addRevisionData'](_0xe5c643);_0x1236a1['push'](_0xe5c643);const _0x8d75f9=this['repository']['getIndex'](_0x40f44f);if(0x0!==_0x8d75f9){const _0x4ef281=this['repository']['getRevision'](_0x8d75f9-0x1);if(_0x4ef281['fromVersion']!==_0x112cf3){const _0x58b452=this['_revisionDataBuilder']['getData'](_0x112cf3,_0x4ef281['toVersion']),_0x41dce8={'id':_0x4ef281['id'],'diffData':_0x58b452['diffData'],'authorsIds':_0x58b452['authorsIds'],'authors':_0x58b452['authorsIds']['map'](_0x4a3cb3=>this['editor']['plugins']['get']('Users')['getUser'](_0x4a3cb3)),'fromVersion':_0x112cf3};_0x4ef281===this['currentRevision']&&(_0x41dce8['createdAt']=new Date(_0xe5c643['createdAt']['getTime']()+0xa)),_0x4ef281['_update'](_0x41dce8,!0x0),delete _0x41dce8['authors'],_0x1236a1['push'](_0x41dce8);}}if(this['adapter']){for(const _0xa8989d of _0x1236a1)this['_bufferUpdate'](_0xa8989d['id'],_0xa8989d,!0x0);this['sendBufferedUpdates']();}return _0x40f44f;}['addRevisionData'](_0x4d7b4f){const _0x570b65=this['repository']['createRevision'](_0x4d7b4f);return this['adapter']&&_0x570b65['on']('_update',(_0x471382,_0x373f23,_0x59fd8d)=>{_0x59fd8d||(this['_bufferUpdate'](_0x373f23['id'],_0x373f23,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x570b65,this['_findInsertionIndex'](_0x570b65)),_0x570b65;}async['getRevisionDocumentData'](_0x4decb7){await this['_loadRevisionData'](_0x4decb7);const _0x79c15d={};for(const _0x1addf5 in _0x4decb7['diffData']){if(_0x4decb7['diffData'][_0x1addf5]['attachChange']&&!_0x4decb7['diffData'][_0x1addf5]['attachChange']['isAttached'])continue;const _0x1f7985=this['_removeRevisionMarkers'](JSON['parse'](_0x4decb7['diffData'][_0x1addf5]['insertions'])),_0x52e7d2=this['editor']['editing']['view']['document'],_0x127a41=new _0x4daa75(_0x52e7d2,_0x1f7985['map'](_0x226e78=>P(_0x226e78,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x79c15d[_0x1addf5]=this['editor']['data']['processor']['toData'](_0x127a41),this['editor']['data']['processor']['useFillerType']('default');}return _0x79c15d;}async['getRevisionRootsAttributes'](_0x56ba28){await this['_loadRevisionData'](_0x56ba28);const _0x3432fe={};for(const _0x35078e in _0x56ba28['diffData'])_0x56ba28['diffData'][_0x35078e]['attachChange']&&!_0x56ba28['diffData'][_0x35078e]['attachChange']['isAttached']||(_0x3432fe[_0x35078e]=_0x56ba28['diffData'][_0x35078e]['attributesAfter']||{});return _0x3432fe;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2397e8=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2d3bc6=0x0;_0x2d3bc6<_0x2397e8['length'];_0x2d3bc6++){const _0x41deed=_0x2397e8[_0x2d3bc6];let _0x23e827=!0x1;for(const _0x53853a of Object['keys'](_0x41deed))void 0x0===_0x41deed[_0x53853a]?delete _0x41deed[_0x53853a]:'id'!==_0x53853a&&(_0x23e827=!0x0);_0x23e827||(_0x2397e8[_0x2d3bc6]=null);}if(_0x2397e8=_0x2397e8['filter'](_0x11b73d=>null!==_0x11b73d),!_0x2397e8['length'])return;for(let _0x2aed67=0x0;_0x2aed67<_0x2397e8['length'];_0x2aed67++){const _0x25fe0b=_0x2397e8[_0x2aed67];void 0x0!==_0x25fe0b['fromVersion']&&void 0x0===_0x25fe0b['toVersion']&&(_0x25fe0b['toVersion']=this['repository']['getRevision'](_0x25fe0b['id'])['toVersion']),void 0x0!==_0x25fe0b['toVersion']&&void 0x0===_0x25fe0b['fromVersion']&&(_0x25fe0b['fromVersion']=this['repository']['getRevision'](_0x25fe0b['id'])['fromVersion']);}const _0x479ba8=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2397e8,_0x479ba8)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x21ff37=>{if(_0x21ff37){for(const _0x281a05 of _0x21ff37)this['setRevisionData']({'id':_0x281a05['id'],'createdAt':_0x281a05['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x1db502,_0x33ffae){let _0x21c154=this['editor']['config']['get']('initialData'),_0x20028c=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x21c154){_0x21c154={};for(const _0x21de3f of this['editor']['model']['document']['getRootNames']())_0x21c154[_0x21de3f]='';}if('string'==typeof _0x21c154&&(_0x21c154={'main':_0x21c154}),void 0x0===_0x20028c){_0x20028c={};for(const _0x3a52a6 of this['editor']['model']['document']['getRootNames']())_0x20028c[_0x3a52a6]={};}let _0x457581=!0x1;const _0x3758af=Object['keys'](_0x21c154),_0x31efe9=Object['keys'](_0x1db502);for(const _0x37fbb5 of _0x3758af){if(_0x21c154[_0x37fbb5]!==_0x1db502[_0x37fbb5]&&''!==_0x21c154[_0x37fbb5]['trim']()){_0x457581=!0x0;break;}if(!_0x1cfb9a(_0x20028c[_0x37fbb5],_0x33ffae[_0x37fbb5])&&Object['keys'](_0x20028c[_0x37fbb5])['length']>0x0){_0x457581=!0x0;break;}}_0x457581||(_0x457581=_0x31efe9['some'](_0x134988=>!this['editor']['model']['document']['getRoot'](_0x134988))),_0x457581&&_0x565cf3('editor-initial-data-replaced-with-revision-data',{'editorData':_0x21c154,'editorRootsAttributes':_0x20028c,'revisionData':_0x1db502,'revisionRootsAttributes':_0x33ffae}),this['editor']['config']['set']('initialData',_0x1db502),this['editor']['config']['set']('rootsAttributes',_0x33ffae);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x35cbd0=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x35cbd0['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4f4ba2){const _0x2ff545=this['repository']['getRevisions']();_0x2ff545['reverse']();let _0x26f835=0x0;for(;_0x26f835<_0x2ff545['length'];){const _0x3471a3=_0x2ff545[_0x26f835];if(_0x3471a3===this['currentRevision']){_0x26f835++;continue;}if(_0x3471a3['id']===this['_initialRevisionId'])break;const _0x4ae8d0=_0x4f4ba2['toVersion']-_0x3471a3['toVersion']||_0x4f4ba2['fromVersion']-_0x3471a3['fromVersion'];if(_0x4ae8d0>0x0)break;if(_0x4ae8d0<0x0)_0x26f835++;else{if(!_0x4f4ba2['creator']&&_0x3471a3['creator'])break;if(_0x3471a3['creator']||!_0x4f4ba2['creator']){if(_0x4f4ba2['createdAt']>_0x3471a3['createdAt'])break;_0x26f835++;}else _0x26f835++;}}return _0x26f835;}['setRevisionData'](_0xed3550){const _0x50a237=this['repository']['getRevision'](_0xed3550['id']);if(_0xed3550['createdAt']&&(_0xed3550['createdAt']=new Date(_0xed3550['createdAt'])),_0xed3550['authorsIds']){const _0x364306=this['editor']['plugins']['get']('Users');_0xed3550['authors']=_0xed3550['authorsIds']['map'](_0x4fa63e=>_0x364306['getUser'](_0x4fa63e));}_0x50a237['_update'](_0xed3550,!0x0);}['buildRevisionData']({revision:_0x4d812f=null,from:_0x2946ed=null,to:_0x3606e9=null}){_0x2946ed=null!==_0x2946ed?_0x2946ed:_0x4d812f['fromVersion'],_0x3606e9=null!==_0x3606e9?_0x3606e9:_0x4d812f['toVersion'];const _0x5bacd6=this['_revisionDataBuilder']['getData'](_0x2946ed,_0x3606e9),_0x127529={'diffData':_0x5bacd6['diffData'],'authorsIds':_0x5bacd6['authorsIds'],'fromVersion':_0x2946ed,'toVersion':_0x3606e9};if(!_0x4d812f||_0x3606e9!==_0x4d812f['toVersion']){const _0x16ec04=_0x3606e9-0x1,_0x291acb=this['_source']['history']['getOperation'](_0x16ec04);_0x127529['createdAt']=_0x291acb&&_0x291acb['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2946ed===this['_loadedStateData']['fromVersion']){for(const _0x5996e6 of this['_loadedStateData']['authors'])_0x127529['authorsIds']['includes'](_0x5996e6['id'])||_0x127529['authorsIds']['push'](_0x5996e6['id']);}return _0x127529;}['_loadRevisionData'](_0x394c1f){if(!_0x394c1f||_0x394c1f['diffData'])return Promise['resolve']();{const _0x305e93=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x305e93,'revisionId':_0x394c1f['id']})['then'](_0x33168d=>{_0x394c1f['diffData']=_0x33168d['diffData'];});}}['_bufferUpdate'](_0x8b898a,_0x3717b8,_0x17e452){if(this['_bufferedUpdates']['has'](_0x8b898a)){const _0x137780=this['_bufferedUpdates']['get'](_0x8b898a);_0x3717b8=_0x17e452?{..._0x137780,..._0x3717b8}:{..._0x3717b8,..._0x137780};}this['_bufferedUpdates']['set'](_0x8b898a,_0x3717b8);}['_getFromVersion'](_0x44267f){const _0x5a16e5=this['repository']['getRevisions']();_0x5a16e5['reverse'](),_0x5a16e5['shift']();const _0x42019a=_0x5a16e5['find'](_0x7f7662=>_0x7f7662['toVersion']<=_0x44267f)['toVersion'];return _0x42019a<this['_startingVersion']?this['_startingVersion']:_0x42019a;}['_createInitialRevision'](_0x3d8a77){const _0x88c1f1=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x88c1f1)this['_initialRevisionId']=_0x88c1f1['id'];else{const _0x3f8ff3=!this['editor']['model']['document']['roots']['find'](_0x250f4e=>this['editor']['model']['hasContent'](_0x250f4e)),_0x838614=this['editor']['plugins']['get']('Users')['me']['id'],_0x340267=m(this['editor']['locale'],_0x3f8ff3?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3d8a77,'to':_0x3d8a77,'id':this['_initialRevisionId'],'name':_0x340267,'creatorId':_0x838614});}}['_createCurrentRevision'](_0x170481){const _0x214a90=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x214a90),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x170481,'to':_0x170481,'id':_0x214a90,'name':'','creatorId':null}));}['_makeRevision']({name:_0x12a8fe,from:_0x682842,to:_0x294f91,creatorId:_0x532710,id:_0x48c31d}){const _0xe9810f=this['buildRevisionData']({'from':_0x682842,'to':_0x294f91});_0xe9810f['name']=_0x12a8fe,_0xe9810f['creatorId']=_0x532710,_0xe9810f['id']=_0x48c31d;const _0x2c79a1=this['addRevisionData'](_0xe9810f);return this['adapter']&&this['_bufferUpdate'](_0xe9810f['id'],_0xe9810f,!0x0),_0x2c79a1;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x293173){return(_0x293173=_0x293173['filter'](_0x2cbf50=>!_0x2cbf50['name']||'revision-start'!==_0x2cbf50['name']&&'revision-end'!==_0x2cbf50['name']))['forEach'](_0x5647c8=>{'string'!=typeof _0x5647c8&&(_0x5647c8['children']=this['_removeRevisionMarkers'](_0x5647c8['children']),_0x5647c8['attributes']=_0x5647c8['attributes']['filter'](_0x3aec46=>!_0x3aec46[0x0]['startsWith']('data-revision-')));}),_0x293173;}}function P(_0x2ed2d5,_0x49beef){const _0x48147f=_0x49beef['editing']['view']['document'];if('string'==typeof _0x2ed2d5)return new _0x14d4f7(_0x48147f,_0x2ed2d5);{const _0x586ede=_0x2ed2d5['children']['map'](_0x15e916=>P(_0x15e916,_0x49beef));return new(E[_0x2ed2d5['type']]||_0x473b22)(_0x48147f,_0x2ed2d5['name'],_0x2ed2d5['attributes'],_0x586ede);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x9adf4d){this['editor']=_0x9adf4d,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'](_0x241257){this['source']=_0x241257;const _0x1c1fbc=new Map(),_0x123a1a=new Map(),_0x563363=this['editor']['model']['document']['roots']['map'](_0x4e15bc=>_0x4e15bc['rootName']);for(const _0x4b0ec8 of _0x563363){const _0x4f2978=this['editor']['model']['document']['getRoot'](_0x4b0ec8),_0x43083a=T(_0x4f2978);_0x1c1fbc['set'](_0x4b0ec8,_0x43083a),_0x123a1a['set'](_0x4b0ec8,Object['fromEntries'](_0x4f2978['getAttributes']()));}const _0x17890f=Array['from'](this['editor']['model']['markers'])['map'](_0xa4f5f7=>[_0xa4f5f7['name'],_0xa4f5f7['getRange']()]),_0x3097ca=this['source']['version'];this['_saveMetaData'](_0x3097ca,_0x1c1fbc,_0x17890f,_0x123a1a),this['_startingRevisionId']=this['_revisionId'];const _0x2f2040=new Map(),_0x9a073d=new Map();for(const _0x13f022 of _0x563363){const _0xecd7f=F(_0x13f022);_0x2f2040['set'](_0x13f022,_0xecd7f),_0x9a073d['set'](_0x13f022,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2f2040,[],_0x9a073d);}['getData'](_0x2e9171,_0x3dfeff){if(this['_lastFrom']===_0x2e9171&&this['_lastTo']<=_0x3dfeff)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3dfeff,!0x0);else{if(!this['_savedMetaData']['has'](_0x2e9171)){const _0x5394d9=this['_getPreviousFrom'](_0x2e9171);this['_calculateMetaData'](_0x5394d9,_0x2e9171,!0x1);}this['_calculateMetaData'](_0x2e9171,_0x3dfeff,!0x0);}return this['_lastFrom']=_0x2e9171,this['_lastTo']=_0x3dfeff,this['_getState']();}['loadState'](_0x5dbffc){this['_reset'](),this['_lastFrom']=_0x5dbffc['fromVersion'],this['_lastTo']=_0x5dbffc['toVersion'];for(const _0x5b06d8 in _0x5dbffc['diffData']){const _0x3d161d=_0x5dbffc['diffData'][_0x5b06d8]['attachChange'],_0x13858a=_0x54079b(_0x5dbffc['diffData'][_0x5b06d8]['attributesBefore'])||{},_0x5b2e7d=this['_makeModelFromViewString'](_0x5dbffc['diffData'][_0x5b06d8]['deletions']);_0x5b2e7d['rootName']=_0x5b06d8,_0x5b2e7d['_isAttached']=!_0x3d161d||!_0x3d161d['isAttached'],_0x5b2e7d['isAttached']=()=>_0x5b2e7d['_isAttached'],this['_baseRoots']['set'](_0x5b06d8,_0x5b2e7d),this['_baseRootsAttributes']['set'](_0x5b06d8,_0x13858a),_0x3d161d&&this['_touchedRoots']['set'](_0x5b06d8,_0x3d161d);const _0x2a8d5c=this['_makeIdsRoot'](_0x5b2e7d);this['_baseIdsRoots']['set'](_0x5b06d8,_0x2a8d5c);for(const [_0x56540d,_0x13a44b]of _0x5b2e7d['markers']){if(!_0x56540d['startsWith']('revision:'))continue;const _0xf1c3a4=_0x56540d['split'](':')[0x2];for(const _0x4678df of _0x13a44b['getWalker']({'singleCharacters':!0x0})){const _0xb070e6=this['_getVidAttributeName'](_0x4678df),_0x242de4='elementEnd'==_0x4678df['type']?_0x4678df['previousPosition']['path']['slice'](0x0,-0x1):_0x4678df['previousPosition']['path'],_0x5c7cde=_0x2a8d5c['getNodeByPath'](_0x242de4)['getAttribute'](_0xb070e6);this['_touched']['set'](_0x5c7cde,{'userId':_0xf1c3a4});}}}this['_startingRevisionId']=this['_revisionId'];const _0x242bbb=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2fca0e=>!this['_touched']['has'](_0x2fca0e));let _0x3a9ec3=0x0;const _0x41546d=new Map();for(const _0x2105c7 in _0x5dbffc['diffData']){const _0x353acb=_0x5dbffc['diffData'][_0x2105c7]['attachChange'],_0x4abb93=_0x54079b(_0x5dbffc['diffData'][_0x2105c7]['attributesAfter'])||{},_0x1825a1=this['_makeModelFromViewString'](_0x5dbffc['diffData'][_0x2105c7]['insertions']);_0x1825a1['rootName']=_0x2105c7,_0x1825a1['_isAttached']=!_0x353acb||_0x353acb['isAttached'],_0x1825a1['isAttached']=()=>_0x1825a1['_isAttached'],this['_diffRoots']['set'](_0x2105c7,_0x1825a1),this['_diffRootsAttributes']['set'](_0x2105c7,_0x4abb93);const _0x515dfa=this['_makeIdsRoot'](_0x1825a1,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2105c7,_0x515dfa),_0x41546d['set'](_0x2105c7,_0x1825a1['isAttached']()?_0x4abb93:{});for(const [_0x46edca,_0xb15dc4]of _0x1825a1['markers']){if(!_0x46edca['startsWith']('revision:'))continue;const _0x286386=_0x46edca['split'](':')[0x2];for(const _0x16d32b of _0xb15dc4['getWalker']({'singleCharacters':!0x0})){const _0x58296e=this['_getVidAttributeName'](_0x16d32b),_0xed5225=this['_revisionId']++,_0x1e4e8f='elementEnd'==_0x16d32b['type']?_0x16d32b['previousPosition']['path']['slice'](0x0,-0x1):_0x16d32b['previousPosition']['path'];_0x515dfa['getNodeByPath'](_0x1e4e8f)['_setAttribute'](_0x58296e,_0xed5225),this['_touched']['set'](_0xed5225,{'userId':_0x286386});}}for(const _0x243dd0 of this['editor']['model']['createRangeIn'](_0x1825a1)['getWalker']({'singleCharacters':!0x0})){const _0x4bba4e=this['_getVidAttributeName'](_0x243dd0),_0x451f4d='elementEnd'==_0x243dd0['type']?_0x243dd0['previousPosition']['path']['slice'](0x0,-0x1):_0x243dd0['previousPosition']['path'],_0x174bfc=_0x515dfa['getNodeByPath'](_0x451f4d);_0x174bfc['getAttribute'](_0x4bba4e)>0x0||_0x174bfc['_setAttribute'](_0x4bba4e,_0x242bbb[_0x3a9ec3++]);}for(const [_0x411e63,_0x259245]of _0x1825a1['markers'])_0x411e63['startsWith']('revision:')||this['_markers']['set'](_0x411e63,_0x259245);}const _0x2dff2a=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x2dff2a),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2dff2a,0x1));const _0x5d68b3=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x5d68b3),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5d68b3,0x1));const _0x3e72ad=Array['from'](this['_diffRoots'])['map'](([_0x50bf30,_0x45fa8f])=>[_0x50bf30,T(_0x45fa8f)]);this['_saveMetaData'](this['_lastTo'],_0x3e72ad,this['_markers'],_0x41546d);}['_makeModelFromViewString'](_0x2206ff){const _0x40c8a1=JSON['parse'](_0x2206ff),_0x292efa=this['editor']['editing']['view']['document'],_0x13489b=new _0x4daa75(_0x292efa,_0x40c8a1['map'](_0x1312d4=>P(_0x1312d4,this['editor'])));return this['editor']['data']['toModel'](_0x13489b);}['_saveMetaData'](_0x3c8d5f,_0x57bdfe,_0x29318c,_0x1c6c35){const _0x11f7b5=new Map(_0x57bdfe),_0x1e0fb1=new Map(_0x54079b(_0x1c6c35)),_0x54f5b9=new Map();for(const [_0x51f847,_0x15a0c7]of _0x29318c)_0x54f5b9['set'](_0x51f847,{'start':_0x15a0c7['start']['clone'](),'end':_0x15a0c7['end']['clone'](),'rootName':_0x15a0c7['root']['rootName']});this['_savedMetaData']['set'](_0x3c8d5f,{'roots':_0x11f7b5,'markers':_0x54f5b9,'rootsAttributes':_0x1e0fb1});}['_removeMetaData'](_0x385aba){this['_savedMetaData']['delete'](_0x385aba);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0x10f30b,_0x3c4407=null){let _0x52651e=null;_0x10f30b['is']('documentFragment')||(_0x52651e=new ut(_0x10f30b['name'],{'vid_start':null===_0x3c4407?this['_revisionId']++:_0x3c4407++}));const _0x2b2479=[];for(const _0x39ec27 of _0x10f30b['getChildren']())if(_0x39ec27['is']('element')){_0x2b2479['push'](this['_makeIdsRoot'](_0x39ec27,_0x3c4407));const _0x42ebff=_0x2b2479[_0x2b2479['length']-0x1];null!==_0x3c4407&&(_0x3c4407=_0x42ebff['is']('element','$text')?_0x42ebff['getAttribute']('vid')+0x1:_0x42ebff['getAttribute']('vid_end')+0x1);}else{for(let _0x9a62f0=0x0;_0x9a62f0<_0x39ec27['offsetSize'];_0x9a62f0++)_0x2b2479['push'](new ut('$text',{'vid':null===_0x3c4407?this['_revisionId']++:_0x3c4407++}));}if(_0x10f30b['is']('documentFragment')){const _0x50512=F(_0x10f30b['rootName']);return _0x50512['_insertChild'](0x0,_0x2b2479),_0x50512;}return _0x52651e['_setAttribute']('vid_end',null===_0x3c4407?this['_revisionId']++:_0x3c4407++),_0x52651e['_insertChild'](0x0,_0x2b2479),_0x52651e;}['_calculateMetaData'](_0x24f79d,_0x44d8a7,_0x2f417b){this['_reset']();const {roots:_0x46de2a,markers:_0xc6c9ed,rootsAttributes:_0x414d52}=this['_savedMetaData']['get'](_0x24f79d);this['_baseRoots']=new Map(_0x46de2a),this['_baseRootsAttributes']=new Map(_0x54079b(_0x414d52));for(const [_0x507260,_0x3782b7]of this['_baseRoots'])if('$graveyard'!==_0x507260&&(this['_diffRoots']['set'](_0x507260,T(_0x3782b7)),this['_diffRootsAttributes']=new Map(_0x54079b(_0x414d52)),_0x2f417b)){const _0x5a9a84=this['_revisionId'];this['_idsRoots']['set'](_0x507260,this['_makeIdsRoot'](_0x3782b7)),this['_baseIdsRoots']['set'](_0x507260,this['_makeIdsRoot'](_0x3782b7,_0x5a9a84));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x2f417b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5b9f7d,_0x32da4f]of _0xc6c9ed){const _0x362df8=this['_baseRoots']['get'](_0x32da4f['rootName']),_0x19116b=this['_diffRoots']['get'](_0x32da4f['rootName']),_0x2227e1=new ft(this['_fixPosition'](_0x32da4f['start'],_0x362df8),this['_fixPosition'](_0x32da4f['end'],_0x362df8)),_0x300c5f=this['_fixRange'](_0x2227e1,_0x19116b);_0x362df8['markers']['set'](_0x5b9f7d,_0x2227e1),this['_markers']['set'](_0x5b9f7d,_0x300c5f);}this['_applyOperations'](_0x24f79d,_0x44d8a7,_0x2f417b);}['_applyOperations'](_0x1d65cc,_0x23df37,_0x278f7f){for(const _0x1e8060 of this['source']['getOperations'](_0x1d65cc,_0x23df37))this['_handleOperation'](_0x1e8060,_0x278f7f);for(const _0x33d028 of this['_diffRoots']['values']())_0x33d028['markers']['clear']();for(const [_0x14a20e,_0x42690a]of this['_markers']){this['_diffRoots']['get'](_0x42690a['root']['rootName'])['markers']['set'](_0x14a20e,_0x42690a['clone']());}const _0x2e2e8d=new Map(),_0x431826=new Map();for(const [_0x3d0fca,_0x26b132]of this['_diffRoots'])_0x2e2e8d['set'](_0x3d0fca,T(_0x26b132)),_0x431826['set'](_0x3d0fca,this['_diffRootsAttributes']['get'](_0x3d0fca));this['_saveMetaData'](_0x23df37,_0x2e2e8d,this['_markers'],_0x431826);}['_getPreviousFrom'](_0x5bb6f0){const _0x5f17ac=Array['from'](this['_savedMetaData']['keys']());_0x5f17ac['sort']((_0x48dcb2,_0x1ed137)=>_0x48dcb2-_0x1ed137),_0x5f17ac['reverse']();for(const _0x5c05bf of _0x5f17ac)if(_0x5c05bf<_0x5bb6f0)return _0x5c05bf;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x206058,_0x559961){const _0x51f434=Array['from'](_0x559961['markers'])['map'](([_0x291ede,_0x5aaccf])=>[_0x291ede,this['_fixRange'](_0x5aaccf,_0x206058)]);_0x206058['markers']=new Map(_0x51f434);}['_transformMarkers'](_0x436f36){for(const _0x3e58cd of this['_markers']['values']()){const _0x22abac=_0x3e58cd['getTransformedByOperation'](_0x436f36),_0x26e1a5=ft['_createFromRanges'](_0x22abac);_0x3e58cd['start']=_0x26e1a5['start'],_0x3e58cd['end']=_0x26e1a5['end'];}}['_handleOperation'](_0x50cbaf,_0x8f401a){if('addRoot'!=_0x50cbaf['type']&&'detachRoot'!=_0x50cbaf['type']){if('insert'==_0x50cbaf['type']){const _0x380ea2=_0x50cbaf['position']['root']['rootName'];this['_diffRoots']['has'](_0x380ea2)||(this['_diffRoots']['set'](_0x380ea2,F(_0x380ea2,!0x0)),this['_diffRootsAttributes']['set'](_0x380ea2,{}),_0x8f401a&&this['_idsRoots']['set'](_0x380ea2,F(_0x380ea2,!0x0)));}else{if('addRootAttribute'==_0x50cbaf['type']||'removeRootAttribute'==_0x50cbaf['type']||'changeRootAttribute'==_0x50cbaf['type'])return void this['_handleRootAttributeOperation'](_0x50cbaf);'marker'==_0x50cbaf['type']&&this['_handleMarkerOperation'](_0x50cbaf);}if('marker'!==_0x50cbaf['type']){const _0x573d07=this['_cloneOperation'](_0x50cbaf,this['_diffRoots']);_0x573d07['_execute'](),this['_transformMarkers'](_0x573d07);}if(_0x8f401a)switch(_0x50cbaf['type']){case'insert':this['_handleInsertOperation'](_0x50cbaf);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x50cbaf);break;case'merge':this['_handleMergeOperation'](_0x50cbaf);break;case'split':this['_handleSplitOperation'](_0x50cbaf);}}else this['_handleRootOperation'](_0x50cbaf,_0x8f401a);}['_cloneOperation'](_0xc83aeb,_0x41a62e){const _0x43b407=_0xc83aeb['clone']();return _0x43b407['_authorId']=_0xc83aeb['_authorId'],this['_fixOperation'](_0x43b407,_0x41a62e),_0x43b407;}['_getBaseVids'](_0x2eaa62){return _0x2eaa62['map'](_0x7dd8f9=>{const _0x396ed0=this['_getVidAttributeName'](_0x7dd8f9);return Number(_0x7dd8f9['item']['getAttribute'](_0x396ed0));});}['_generateTape'](_0x7e4a8a,_0x506706){if(_0x7e4a8a['is']('element','$text'))_0x506706['push']({'item':_0x7e4a8a,'type':'text'});else{_0x7e4a8a['is']('element')&&_0x506706['push']({'item':_0x7e4a8a,'type':'elementStart'});for(const _0x6ecd5b of _0x7e4a8a['getChildren']())this['_generateTape'](_0x6ecd5b,_0x506706);_0x7e4a8a['is']('element')&&_0x506706['push']({'item':_0x7e4a8a,'type':'elementEnd'});}return _0x506706;}['_getState'](){const _0xe6845=new Map(this['_touched']),_0x1c1ae4=new Map(_0xe6845),_0x393343=new Map(),_0x30f496={'insertions':{},'deletions':{}},_0x4cfa07={'insertions':{},'deletions':{}},_0x5ea98a=new Map(),_0x36097c=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x36097c['delete']('$graveyard');for(const _0x1f63f4 of _0x36097c){const _0x1fa884=this['_diffRoots']['get'](_0x1f63f4)||F(_0x1f63f4,!0x1),_0x59ff33=this['_baseRoots']['get'](_0x1f63f4)||F(_0x1f63f4,!0x1);_0x1fa884['isAttached']()||_0x59ff33['isAttached']()?(_0x30f496['insertions'][_0x1f63f4]=T(_0x1fa884),_0x30f496['deletions'][_0x1f63f4]=T(_0x59ff33),this['_copyMarkers'](_0x30f496['deletions'][_0x1f63f4],_0x59ff33),this['_copyMarkers'](_0x30f496['insertions'][_0x1f63f4],_0x1fa884),_0x4cfa07['insertions'][_0x1f63f4]=this['_generateTape'](this['_idsRoots']['get'](_0x1f63f4),[]),_0x4cfa07['deletions'][_0x1f63f4]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1f63f4)||F(_0x1f63f4,!0x1),[])):_0x36097c['delete'](_0x1f63f4);}for(const _0x1f57ad of _0x36097c){const _0x26f654=_0x4cfa07['insertions'][_0x1f57ad];for(const _0x14e2f4 of _0x26f654){const _0x39e851=this['_getVidAttributeName'](_0x14e2f4),_0x279687=_0x14e2f4['item']['getAttribute'](_0x39e851);_0x1c1ae4['delete'](_0x279687),_0x279687>=this['_startingRevisionId']&&_0x393343['set'](_0x279687,_0xe6845['get'](_0x279687));}}for(const _0x676d14 of _0x36097c){const _0x25f43e=_0x4cfa07['insertions'][_0x676d14],_0xeb9493=this['_getBaseVids'](_0x4cfa07['deletions'][_0x676d14]);let _0x48586e=0x0;for(const _0x11d2ae of _0x25f43e){const _0x4a3ea1=this['_getVidAttributeName'](_0x11d2ae),_0x45fe3d=_0x11d2ae['item']['getAttribute'](_0x4a3ea1);if(!_0x393343['has'](_0x45fe3d)&&!_0x5ea98a['has'](_0x45fe3d)){if(_0x1c1ae4['has'](_0x45fe3d))_0x48586e++;else{if(_0x45fe3d!=_0xeb9493[_0x48586e]){const _0x461b74=_0xe6845['get'](_0x45fe3d)||_0xe6845['get'](_0xeb9493[_0x48586e]);for(;_0x45fe3d!=_0xeb9493[_0x48586e];)_0x1c1ae4['has'](_0xeb9493[_0x48586e])||(_0x5ea98a['set'](_0xeb9493[_0x48586e],_0x461b74),_0xe6845['set'](_0xeb9493[_0x48586e],_0x461b74)),_0x48586e++;}_0x48586e++;}}}}for(const _0x1f98c5 of _0x36097c){const _0x328fee=_0x4cfa07['insertions'][_0x1f98c5];for(const _0x2801e1 of _0x328fee){const _0x59401b=this['_getVidAttributeName'](_0x2801e1),_0x5113b1=_0x2801e1['item']['getAttribute'](_0x59401b);if(_0x5ea98a['has'](_0x5113b1)){const _0x3efc0f=_0x5ea98a['get'](_0x5113b1);_0x1c1ae4['has'](_0x5113b1)||_0x1c1ae4['set'](_0x5113b1,{..._0x3efc0f}),_0x393343['set'](_0x5113b1,{..._0x3efc0f});}}}for(const _0xed0f93 of _0x1c1ae4['keys']())_0xed0f93>=this['_startingRevisionId']&&_0x1c1ae4['delete'](_0xed0f93);const _0x1aed5d=new Map();for(const _0xa87b22 of _0x36097c){let _0xaba714=_0x4cfa07['insertions'][_0xa87b22];for(const _0x5831b4 of _0xaba714)if(_0x5831b4['item']['is']('element','tableCell')){const _0x3eaf73=this['_getVidAttributeName'](_0x5831b4),_0x3f8df9=_0x5831b4['item']['getAttribute'](_0x3eaf73);if(_0x393343['has'](_0x3f8df9)){const _0x3bd862=_0x5831b4['item']['parent']['parent']['getAttribute']('vid_start'),_0x3d0c1c=_0x1aed5d['get'](_0x3bd862)||new Set();_0x3d0c1c['add'](_0x393343['get'](_0x3f8df9)['userId']),_0x1aed5d['set'](_0x3bd862,_0x3d0c1c);}}_0xaba714=_0x4cfa07['deletions'][_0xa87b22];for(const _0x443480 of _0xaba714)if(_0x443480['item']['is']('element','tableCell')){const _0x21169a=this['_getVidAttributeName'](_0x443480),_0x368bb5=_0x443480['item']['getAttribute'](_0x21169a);if(_0x1c1ae4['has'](_0x368bb5)){const _0x5ebadd=_0x443480['item']['parent']['parent']['getAttribute']('vid_start'),_0x5bc7b9=_0x1aed5d['get'](_0x5ebadd)||new Set();_0x5bc7b9['add'](_0x1c1ae4['get'](_0x368bb5)['userId']),_0x1aed5d['set'](_0x5ebadd,_0x5bc7b9);}}for(const _0x2240a5 of _0x1aed5d['keys']())(_0x393343['has'](_0x2240a5)||_0x1c1ae4['has'](_0x2240a5))&&_0x1aed5d['delete'](_0x2240a5);}for(const _0x40eb9d of _0x36097c){const _0x2a1a9c=_0x4cfa07['insertions'][_0x40eb9d];let _0x5780b1=null,_0x1e358a=null;for(const _0x72547d of _0x2a1a9c){const _0x37a150=this['_getVidAttributeName'](_0x72547d),_0x29956e=_0x72547d['item']['getAttribute'](_0x37a150),_0x11dbff=_0x1aed5d['get'](_0x29956e);_0x11dbff&&'elementStart'==_0x72547d['type']&&(_0x5780b1=Array['from'](_0x11dbff)[0x0],_0x1e358a=_0x72547d['item']['getAttribute']('vid_end')),_0x5780b1&&(_0x1c1ae4['set'](_0x29956e,{'userId':_0x5780b1}),_0x393343['set'](_0x29956e,{'userId':_0x5780b1})),_0x29956e==_0x1e358a&&(_0x5780b1=null,_0x1e358a=null);}}const _0x5a35f6={},_0x6b3d75=new Set();for(const _0x1a01c1 of _0x36097c){const _0x27dd1b=_0x30f496['deletions'][_0x1a01c1],_0x6380f9=_0x30f496['insertions'][_0x1a01c1];for(const {userId:_0x3bf7a9}of this['_touchedMarkers']['values']())null!==_0x3bf7a9&&_0x6b3d75['add'](_0x3bf7a9);for(const {userId:_0x3d50b7}of this['_touchedRoots']['values']())null!==_0x3d50b7&&_0x6b3d75['add'](_0x3d50b7);this['_markChanges'](_0x6380f9,_0x4cfa07['insertions'][_0x1a01c1],_0x393343,'insertion',_0x6b3d75),this['_markChanges'](_0x27dd1b,_0x4cfa07['deletions'][_0x1a01c1],_0x1c1ae4,'deletion',_0x6b3d75),_0x5a35f6[_0x1a01c1]={'insertions':this['_prepareViewToSave'](_0x6380f9),'deletions':this['_prepareViewToSave'](_0x27dd1b),'attachChange':this['_touchedRoots']['get'](_0x1a01c1)||null,'attributesBefore':_0x54079b(this['_baseRootsAttributes']['get'](_0x1a01c1))||{},'attributesAfter':_0x54079b(this['_diffRootsAttributes']['get'](_0x1a01c1))};}return{'diffData':_0x5a35f6,'authorsIds':Array['from'](_0x6b3d75)};}['_processRootBeforeSave'](_0x484ed7){for(const [,_0x4310df]of _0x484ed7['markers']){const _0x2134ec=_0x4310df['start']['getAncestors']()['filter'](_0x2ef010=>'tableCell'==_0x2ef010['name']);for(const _0x6728be of _0x2134ec)0x1==_0x6728be['childCount']&&_0x6728be['getChild'](0x0)['is']('element','paragraph')&&_0x6728be['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3852f9){this['_processRootBeforeSave'](_0x3852f9);const _0x50d0a4=this['editor']['data']['toView'](_0x3852f9,{}),_0x4eaa4c=Array['from'](_0x50d0a4['getChildren']())['map'](_0x4f03c3=>this['_getViewJson'](_0x4f03c3));return JSON['stringify'](_0x4eaa4c);}['_getViewJson'](_0x39e0c8){if(_0x39e0c8['is']('$text'))return _0x39e0c8['data'];{const _0x308181=_0x39e0c8;return{'type':Object['keys'](E)['find'](_0x50a07f=>_0x39e0c8 instanceof E[_0x50a07f]),'name':_0x308181['name'],'attributes':Array['from'](_0x308181['getAttributes']()),'children':Array['from'](_0x308181['getChildren']())['map'](_0x5707f5=>this['_getViewJson'](_0x5707f5))};}}['_markChanges'](_0x1849d6,_0xfb4da9,_0x3a96fa,_0x1fd432,_0x511296){let _0x5d5d8b=null,_0x1738ea=null,_0x424bf3=0x0;const _0x10fb8b=this['editor']['model'];for(let _0x5a1f7b=0x0;_0x5a1f7b<_0xfb4da9['length'];_0x5a1f7b++){const _0x2a0247=this['_getVidAttributeName'](_0xfb4da9[_0x5a1f7b]),_0x1b3fa6=_0xfb4da9[_0x5a1f7b]['item']['getAttribute'](_0x2a0247),_0x4e34d0=_0x3a96fa['get'](_0x1b3fa6),_0x55f670=_0x5a1f7b==_0xfb4da9['length']-0x1;(!_0x5d5d8b&&_0x4e34d0&&(_0x5d5d8b=_0x4e34d0,_0x1738ea=_0xfb4da9[_0x5a1f7b]),_0x5d5d8b&&(!_0x4e34d0||_0x4e34d0['userId']!=_0x5d5d8b['userId']))&&(_0xe9fe43(_0x4e34d0,B(_0x1738ea,_0x1849d6,_0x10fb8b),B(_0xfb4da9[_0x5a1f7b],_0x1849d6,_0x10fb8b)),_0x5d5d8b=_0x4e34d0||null,_0x1738ea=_0x4e34d0?_0xfb4da9[_0x5a1f7b]:null),_0x5d5d8b&&_0x55f670&&_0xe9fe43(_0x4e34d0,B(_0x1738ea,_0x1849d6,_0x10fb8b),J(_0xfb4da9[_0x5a1f7b],_0x1849d6,_0x10fb8b));}function _0xe9fe43(_0x3a67b4,_0xea48e0,_0x4fa038){const _0x2985a0=_0x5d5d8b['userId'],_0x1ec1b2='revision:'+_0x1fd432+':'+_0x2985a0+':'+_0x424bf3++,_0x1b233b=_0x10fb8b['createRange'](_0xea48e0,_0x4fa038);_0x1849d6['markers']['set'](_0x1ec1b2,_0x1b233b),null!==_0x2985a0&&_0x511296['add'](_0x2985a0);}}['_getVidAttributeName'](_0x2b2565){switch(_0x2b2565['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x525c1d,_0x3f210d){_0x525c1d['baseVersion']=null;for(const _0x266dea in _0x525c1d){const _0x2501ec=_0x525c1d[_0x266dea];if(_0x2501ec instanceof vt){const _0x3d4e31=_0x3f210d['get'](_0x2501ec['root']['rootName']);_0x525c1d[_0x266dea]=this['_fixPosition'](_0x2501ec,_0x3d4e31);}if(_0x2501ec instanceof ft){const _0x25f925=_0x3f210d['get'](_0x2501ec['root']['rootName']);_0x525c1d[_0x266dea]=this['_fixRange'](_0x2501ec,_0x25f925);}'root'===_0x266dea&&(_0x525c1d['root']=_0x3f210d['get'](_0x525c1d['root']['rootName']));}}['_fixRange'](_0x42ce36,_0x3a569d){return this['editor']['model']['createRange'](this['_fixPosition'](_0x42ce36['start'],_0x3a569d),this['_fixPosition'](_0x42ce36['end'],_0x3a569d));}['_fixPosition'](_0x1b140e,_0x3f28d9){return this['editor']['model']['createPositionFromPath'](_0x3f28d9,_0x1b140e['path'],_0x1b140e['stickiness']);}['_handleInsertOperation'](_0x4e491c){const _0x199882=this['_idsRoots']['get'](_0x4e491c['position']['root']['rootName']),_0x3399b3=this['_fixPosition'](_0x4e491c['position'],_0x199882),_0x5e2ad3=null===_0x4e491c['_authorId']?null:_0x4e491c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x123946=_0x3399b3['parent'],_0x2ca43b=this['_revisionId'],_0x23009f=[];for(const _0x4fd7de of _0x4e491c['nodes'])if(_0x4fd7de['is']('element'))_0x23009f['push'](this['_makeIdsRoot'](_0x4fd7de));else{for(let _0x589b54=0x0;_0x589b54<_0x4fd7de['offsetSize'];_0x589b54++)_0x23009f['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x55cf91=this['_revisionId'];for(let _0x27fb59=_0x2ca43b;_0x27fb59<_0x55cf91;_0x27fb59++)this['_touched']['set'](_0x27fb59,{'userId':_0x5e2ad3});_0x123946['_insertChild'](_0x3399b3['offset'],_0x23009f);}['_handleMoveOperation'](_0x39d201){(_0x39d201=this['_cloneOperation'](_0x39d201,this['_idsRoots']))['_execute']();const _0x565ee3=null===_0x39d201['_authorId']?null:_0x39d201['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x30529e=_0x39d201['getMovedRangeStart'](),_0x4f16f5=_0x30529e['parent'],_0x174d3d=_0x30529e['offset'];!function _0x249146(_0x1667d1,_0x577395,_0x13c55a,_0x5e34ae){for(let _0x5e26c0=_0x13c55a;_0x5e26c0<_0x5e34ae;_0x5e26c0++){const _0x36a5b0=_0x577395['getChild'](_0x5e26c0);_0x36a5b0['is']('element','$text')?_0x1667d1['set'](_0x36a5b0['getAttribute']('vid'),{'userId':_0x565ee3}):(_0x1667d1['set'](_0x36a5b0['getAttribute']('vid_start'),{'userId':_0x565ee3}),_0x249146(_0x1667d1,_0x36a5b0,0x0,_0x36a5b0['childCount']),_0x1667d1['set'](_0x36a5b0['getAttribute']('vid_end'),{'userId':_0x565ee3}));}}(this['_touched'],_0x4f16f5,_0x174d3d,_0x174d3d+_0x39d201['howMany']);}['_handleMergeOperation'](_0x4f9dea){const _0x5b8366=null===(_0x4f9dea=this['_cloneOperation'](_0x4f9dea,this['_idsRoots']))['_authorId']?null:_0x4f9dea['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2c39a1=_0x4f9dea['targetPosition']['parent'],_0x5c41d1=_0x4f9dea['sourcePosition']['parent'],_0x1a82d0=_0x2c39a1['getAttribute']('vid_end'),_0x46fc09=_0x5c41d1['getAttribute']('vid_start');_0x2c39a1['_setAttribute']('vid_end',_0x5c41d1['getAttribute']('vid_end')),_0x5c41d1['_setAttribute']('vid_end',_0x1a82d0),this['_touched']['set'](_0x46fc09,{'userId':_0x5b8366}),this['_touched']['set'](_0x1a82d0,{'userId':_0x5b8366}),_0x4f9dea['_execute']();}['_handleSplitOperation'](_0x21591f){const _0x265f02=null===(_0x21591f=this['_cloneOperation'](_0x21591f,this['_idsRoots']))['_authorId']?null:_0x21591f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2388a8=_0x21591f['graveyardPosition'],_0x977dd=_0x21591f['splitPosition']['parent'];_0x21591f['_execute']();const _0x2c7a41=_0x977dd['getAttribute']('vid_end'),_0x2336f0=_0x21591f['insertionPosition']['nodeAfter'];if(_0x2388a8){const _0x447c18=_0x2336f0['getAttribute']('vid_end'),_0x2fa3ab=_0x977dd['getAttribute']('vid_end');_0x977dd['_setAttribute']('vid_end',_0x447c18),_0x2336f0['_setAttribute']('vid_end',_0x2fa3ab),this['_touched']['set'](_0x977dd['getAttribute']('vid_end'),{'userId':_0x265f02}),this['_touched']['set'](_0x2336f0['getAttribute']('vid_start'),{'userId':_0x265f02});}else{const _0x471494=this['_revisionId']++,_0x36ca75=this['_revisionId']++;_0x977dd['_setAttribute']('vid_end',_0x471494),_0x2336f0['_setAttribute']('vid_start',_0x36ca75),_0x2336f0['_setAttribute']('vid_end',_0x2c7a41),this['_touched']['set'](_0x471494,{'userId':_0x265f02}),this['_touched']['set'](_0x36ca75,{'userId':_0x265f02});}}['_handleMarkerOperation'](_0x105221){if(!_0x105221['affectsData'])return;const _0x1fccd0=(_0x105221=this['_cloneOperation'](_0x105221,this['_diffRoots']))['oldRange']?_0x105221['oldRange']['root']:null,_0x168d45=_0x105221['newRange']?_0x105221['newRange']['root']:null;_0x1fccd0&&this['_markers']['delete'](_0x105221['name']),_0x168d45&&this['_markers']['set'](_0x105221['name'],_0x105221['newRange']['clone']());const _0x1e5314=null===_0x105221['_authorId']?null:_0x105221['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3a39bd=_0x105221['name'];if(!this['_touchedMarkers']['has'](_0x3a39bd))return void this['_touchedMarkers']['set'](_0x3a39bd,{'range':_0x105221['oldRange'],'userId':_0x1e5314});const _0x5a469e=this['_touchedMarkers']['get'](_0x3a39bd),_0x54a4bc=_0x5a469e['range'],_0x5ee85f=_0x105221['newRange'];null==_0x54a4bc&&null==_0x5ee85f||_0x54a4bc&&_0x5ee85f&&_0x54a4bc['isEqual'](_0x5ee85f)?this['_touchedMarkers']['delete'](_0x105221['name']):_0x5a469e['userId']=_0x1e5314;}['_handleRootOperation'](_0x3aa656,_0x550ee9){this['_diffRoots']['has'](_0x3aa656['rootName'])?this['_diffRoots']['get'](_0x3aa656['rootName'])['_isAttached']=_0x3aa656['isAdd']:(this['_diffRoots']['set'](_0x3aa656['rootName'],F(_0x3aa656['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3aa656['rootName'],{}),_0x550ee9&&this['_idsRoots']['set'](_0x3aa656['rootName'],F(_0x3aa656['rootName'],!0x0)));const _0x5b5b03=null===_0x3aa656['_authorId']?null:_0x3aa656['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a2a90=this['_touchedRoots']['get'](_0x3aa656['rootName']);_0x1a2a90&&_0x1a2a90['userId']===_0x5b5b03?this['_touchedRoots']['delete'](_0x3aa656['rootName']):this['_touchedRoots']['set'](_0x3aa656['rootName'],{'userId':_0x5b5b03,'isAttached':_0x3aa656['isAdd']});}['_handleRootAttributeOperation'](_0x779975){const _0x4581d7=this['_diffRootsAttributes']['get'](_0x779975['root']['rootName']);null===_0x779975['newValue']?delete _0x4581d7[_0x779975['key']]:_0x4581d7[_0x779975['key']]=_0x779975['newValue'];}}function T(_0x2b4bcc){const _0x1b6756=F(_0x2b4bcc['rootName'],_0x2b4bcc['isAttached']());for(const _0x3a6ece of _0x2b4bcc['getChildren']()){const _0x19bb2f=_0x3a6ece['_clone'](!0x0);_0x1b6756['_appendChild'](_0x19bb2f);}return _0x1b6756;}function F(_0x529a72,_0x568d39=!0x0){const _0x2cf69b=new gt();return _0x2cf69b['rootName']=_0x529a72,_0x2cf69b['_isAttached']=_0x568d39,_0x2cf69b['isAttached']=()=>_0x2cf69b['_isAttached'],_0x2cf69b;}function B(_0x161dad,_0x316436,_0x4e1c9b){const _0x49cb5a='elementEnd'==_0x161dad['type']?_0x4e1c9b['createPositionAt'](_0x161dad['item'],'end'):_0x4e1c9b['createPositionBefore'](_0x161dad['item']);return _0x4e1c9b['createPositionFromPath'](_0x316436,_0x49cb5a['path'],_0x49cb5a['stickiness']);}function J(_0x5011df,_0x1fdabb,_0x249a1f){const _0x4a0fdb='elementStart'==_0x5011df['type']?_0x249a1f['createPositionAt'](_0x5011df['item'],0x0):_0x249a1f['createPositionAfter'](_0x5011df['item']);return _0x249a1f['createPositionFromPath'](_0x1fdabb,_0x4a0fdb['path'],_0x4a0fdb['stickiness']);}class os extends _0x3438c0{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1c43b1,_0x28d52a){super(_0x1c43b1),this['focusTracker']=new _0x30fc5d(),this['keystrokes']=new _0xe432c2(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x28d52a),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x124a44({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x4340eb=_0x3350c3=>_0x3350c3['stopPropagation']();this['keystrokes']['set']('arrowright',_0x4340eb),this['keystrokes']['set']('arrowleft',_0x4340eb),this['keystrokes']['set']('arrowup',_0x4340eb),this['keystrokes']['set']('arrowdown',_0x4340eb);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xe6e8d9){this['revisionNameInputView']['fieldView']['element']['value']=_0xe6e8d9['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x28213d){const _0xb3b20e=new at(this['locale'],ti),_0x3126c7=_0xb3b20e['fieldView'];_0x3126c7['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1b97c8=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x28213d&&(_0x1b97c8+='\x20('+m(this['locale'],'optional')+')'),(_0xb3b20e['label']=_0x1b97c8,_0x3126c7['on']('input',()=>{this['revisionNameInputValue']=_0x3126c7['element']['value']['trim']();}),_0xb3b20e);}}class f extends _0x19eb44{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x2d6990=this['editor'],_0x4657db=_0x2d6990['plugins']['get']('RevisionTracker');_0x2d6990['ui']['componentFactory']['add']('revisionHistory',_0x4f34cc=>{const _0xddc4f8=_0x36390b(_0x4f34cc),_0x3bc9a4=_0xddc4f8['panelView']['children'],_0x531e77=new _0x3e0030(_0x4f34cc),_0x5e8190=new te(_0x4f34cc),_0xf4da54=new _0x1cfe19(_0x4f34cc),_0x5a0691=new te(_0x4f34cc),_0x4813e4=new _0x1cfe19(_0x4f34cc);return _0xddc4f8['bind']('isEnabled')['to'](_0x4657db,'isReady',_0x4657db,'isEnabled',_0x2d6990,'isReadOnly',(_0x1d7301,_0x2afc3b,_0x419d12)=>_0x1d7301&&_0x2afc3b&&!_0x419d12),_0xddc4f8['buttonView']['set']({'icon':_0x533e5c,'label':m(_0x4f34cc,'Revision\x20history'),'tooltip':!0x0}),_0xf4da54['set']({'label':m(_0x4f34cc,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0xf4da54['bind']('isEnabled')['to'](_0x4657db,'isReady',_0x4657db,'isEnabled',_0x2d6990,'isReadOnly',(_0x3386f6,_0x484c41,_0x1b10a7)=>_0x3386f6&&_0x484c41&&!_0x1b10a7),_0xf4da54['on']('execute',()=>this['_showDialog']()),_0x4813e4['set']({'label':m(_0x4f34cc,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x4813e4['bind']('isEnabled')['to'](_0x4657db,'isReady',_0x2d6990,'isReadOnly',(_0x3ff84a,_0x1744d5)=>_0x3ff84a&&!_0x1744d5),_0x4813e4['on']('execute',()=>{_0x2d6990['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0xddc4f8['isOpen']=!0x1,_0x2d6990['editing']['view']['focus']();}),_0x5e8190['children']['add'](_0xf4da54),_0x5a0691['children']['add'](_0x4813e4),_0x531e77['role']='menu',_0x531e77['items']['addMany']([_0x5e8190,_0x5a0691]),_0x3bc9a4['add'](_0x531e77),_0xddc4f8;}),_0x2d6990['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x497c22=this['editor'],_0xebe45f=_0x497c22['locale'],_0x12d441=new _0x272de6(_0xebe45f),_0x277368=new _0x3b9875(_0xebe45f);_0x12d441['buttonView']['set']({'icon':_0x533e5c,'label':m(_0xebe45f,'Revision\x20history')});const _0x2b9da3=new _0x3168a2(_0xebe45f,_0x12d441),_0x27ef21=new _0x3b5cb8(_0xebe45f);_0x27ef21['set']({'label':m(_0xebe45f,'Save\x20current\x20revision')}),_0x27ef21['delegate']('execute')['to'](_0x12d441),_0x27ef21['on']('execute',()=>{this['_showDialog']();}),_0x2b9da3['children']['add'](_0x27ef21),_0x277368['items']['add'](_0x2b9da3);const _0x18cd23=new _0x3168a2(_0xebe45f,_0x12d441),_0x2d386e=new _0x3b5cb8(_0xebe45f);return _0x2d386e['set']({'label':m(_0xebe45f,'Open\x20revision\x20history')}),_0x2d386e['delegate']('execute')['to'](_0x12d441),_0x2d386e['on']('execute',()=>{_0x497c22['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x18cd23['children']['add'](_0x2d386e),_0x277368['items']['add'](_0x18cd23),_0x12d441['panelView']['children']['add'](_0x277368),_0x12d441;}['_showDialog'](){const _0x4108d8=this['editor'],_0x244e97=_0x4108d8['locale'],_0x4a6ec1=_0x4108d8['plugins']['get']('Dialog'),_0x4a0eaf=_0x4108d8['plugins']['get']('RevisionTracker');function _0x336470(_0x2dbe81){_0x4108d8['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2dbe81['revisionName']?_0x2dbe81['revisionNameInputView']['errorText']=m(_0x244e97,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4108d8['plugins']['get'](u)['saveRevision']({'name':_0x2dbe81['revisionName']}),_0x4a6ec1['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x336470(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4a6ec1['show']({'id':'revisionSave','title':m(_0x244e97,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x4108d8['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4a6ec1['hide']()},{'label':m(_0x4108d8['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x15a8d2){_0x15a8d2['bind']('isEnabled')['to'](_0x4a0eaf,'isReady',_0x4a0eaf,'isEnabled',_0x4108d8,'isReadOnly',(_0x52de6a,_0xd93c06,_0x27be5d)=>_0x52de6a&&_0xd93c06&&!_0x27be5d);},'onExecute':()=>_0x336470(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x48bd0e=this['editor'],_0x47e959=_0x48bd0e['locale'];this['_saveRevisionFormView']=new os(_0x47e959,_0x48bd0e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x3438c0{['changeId'];['_model'];constructor(_0x10cfcd,_0x181299){super(_0x10cfcd),this['_model']=_0x181299,this['changeId']=_0x181299['id'];const _0x38a43f=this['bindTemplate'],_0x5adad2=m(_0x10cfcd,_0x181299['data']['isSuggestion']?'Suggested\x20by':'add'==_0x181299['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x181299['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x38a43f['to']('type',_0x27e029=>'ck-revision-change__'+_0x27e029)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5adad2}]},{'text':'\x20'+_0x181299['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x3ddaf9(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x3e8ce6){super(),this['id']=_0x3e8ce6['id']||_0x2d3c1e(),this['author']=_0x3e8ce6['author'],this['type']=_0x3e8ce6['type'],this['data']=_0x3e8ce6['data']||{},this['rootName']=_0x3e8ce6['rootName'],this['set']('createdAt',_0x3e8ce6['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x5cbd8a,_0x7d7505){this['newRevisionId']=_0x5cbd8a,this['oldRevisionId']=_0x7d7505,this['changes']=new _0x1caf96();}['_setChanges'](_0x5dfc8f){for(const _0x4bb848 of _0x5dfc8f)this['changes']['add'](_0x4bb848);}}const Y={'c':_0x4b52e0,'a':_0x34b3a3,'e':_0xc09e33,'r':_0x2e2456,'u':_0x26460a};class d extends _0x19eb44{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xb8447b,_0x5cf708,j];}constructor(_0x47de53){super(_0x47de53),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x155ef3,_0x7b77dd,_0x4bd53f)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x317d36=>{for(const _0x12edcd of this['editor']['editing']['view']['document']['roots'])_0x4bd53f?_0x317d36['removeClass']('ck-editor__editable__overlay',_0x12edcd):_0x317d36['addClass']('ck-editor__editable__overlay',_0x12edcd);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xebb08c=>null!==_0xebb08c),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2fc123,_0x5a836c,_0x18c5e5)=>_0x2fc123&&_0x18c5e5?_0x5a836c['changes']['getIndex'](_0x18c5e5):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2f0b7a,_0x8ee546)=>_0x2f0b7a?_0x8ee546['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x5cf708);}['init'](){const _0x53dc0b=this['editor'],_0x351e0e=new yt(_0x53dc0b,{'direction':'backward'}),_0x5e42c7=new yt(_0x53dc0b,{'direction':'forward'});(_0x53dc0b['commands']['add']('showPreviousChange',_0x351e0e),_0x53dc0b['commands']['add']('showNextChange',_0x5e42c7),_0x53dc0b['commands']['add']('restoreRevision',new _t(_0x53dc0b)),this['on']('change:numberOfChanges',()=>{_0x351e0e['refresh'](),_0x5e42c7['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x53dc0b['enableReadOnlyMode']('revision-viewer'),_0x53dc0b['plugins']['has']('WidgetToolbarRepository'))&&_0x53dc0b['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x1a806f){await this['loadRevisionData'](_0x1a806f);const _0xc123f={};for(const _0x4a04e4 in _0x1a806f['diffData']){if(_0x1a806f['diffData'][_0x4a04e4]['attachChange']&&!_0x1a806f['diffData'][_0x4a04e4]['attachChange']['isAttached'])continue;const _0x157c1f=this['_removeRevisionMarkers'](JSON['parse'](_0x1a806f['diffData'][_0x4a04e4]['insertions'])),_0x1e0fc4=this['editor']['editing']['view']['document'],_0x30ba39=new _0x4daa75(_0x1e0fc4,_0x157c1f['map'](_0x337ec7=>this['_getViewObj'](_0x337ec7)));this['editor']['data']['processor']['useFillerType']('marked'),_0xc123f[_0x4a04e4]=this['editor']['data']['processor']['toData'](_0x30ba39),this['editor']['data']['processor']['useFillerType']('default');}return _0xc123f;}async['getRevisionRootsAttributes'](_0x4553a3){await this['loadRevisionData'](_0x4553a3);const _0x1ae6b8={};for(const _0x28f70e in _0x4553a3['diffData'])_0x4553a3['diffData'][_0x28f70e]['attachChange']&&!_0x4553a3['diffData'][_0x28f70e]['attachChange']['isAttached']||(_0x1ae6b8[_0x28f70e]=_0x4553a3['diffData'][_0x28f70e]['attributesAfter']||{});return _0x1ae6b8;}['_removeRevisionMarkers'](_0x207eab){return(_0x207eab=_0x207eab['filter'](_0x4be46f=>!_0x4be46f['name']||'revision-start'!==_0x4be46f['name']&&'revision-end'!==_0x4be46f['name']))['forEach'](_0x4d73a9=>{'string'!=typeof _0x4d73a9&&(_0x4d73a9['children']=this['_removeRevisionMarkers'](_0x4d73a9['children']),_0x4d73a9['attributes']=_0x4d73a9['attributes']['filter'](_0x20ecea=>!_0x20ecea[0x0]['startsWith']('data-revision-')));}),_0x207eab;}async['compare'](_0x292b9b,_0x206dc6,_0x7643e8=!0x1){if(!this['isEnabled'])return;const _0x11ae31=this['diff'],_0x2c040b=this['repository'],_0x162323='string'==typeof _0x292b9b?_0x2c040b['getRevision'](_0x292b9b):_0x292b9b,_0x59f2bb='string'==typeof _0x206dc6?_0x2c040b['getRevision'](_0x206dc6):_0x206dc6,_0x5b90b3=_0x162323['id'],_0x562721=_0x59f2bb?_0x59f2bb['id']:null;if(!_0x7643e8&&this['diff']&&this['diff']['newRevisionId']===_0x5b90b3&&this['diff']['oldRevisionId']===_0x562721)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x5b90b3,_0x562721);const _0x3604d4=this['_getRevisionsRange'](_0x162323,_0x59f2bb,!0x0)['map'](_0x1279df=>this['loadRevisionData'](_0x1279df));return _0x3604d4['push'](new Promise(_0x37f40f=>{setTimeout(_0x37f40f,0x14);})),Promise['all'](_0x3604d4)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x3d18ad=this['_getDiff'](_0x5b90b3,_0x562721);for(const _0x2cbe53 of _0x3d18ad['changes'])this['_changeIdToChange']['set'](_0x2cbe53['id'],_0x2cbe53);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3a4a48=>{for(const _0xe6f4f1 of this['editor']['model']['document']['getRootNames']())_0x3a4a48['detachRoot'](_0xe6f4f1);for(const _0x4932bc of Object['keys'](_0x3d18ad['model'])){const _0x3f30d1=_0x3a4a48['addRoot'](_0x4932bc);for(const _0x5c317d of Object['keys'](_0x3d18ad['attributes'][_0x4932bc]))_0x3a4a48['setAttribute'](_0x5c317d,_0x3d18ad['attributes'][_0x4932bc][_0x5c317d],_0x3f30d1);_0x3a4a48['insert'](_0x3d18ad['model'][_0x4932bc],_0x3f30d1,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x3d18ad['changes'])),this['isReady']=!0x0;})['catch'](_0x2d847a=>{console['error'](_0x2d847a),this['_cleanUp'](),_0x11ae31&&(this['diff']=_0x11ae31),this['isReady']=!0x0;});}['addRevisionData'](_0x47ab29,_0xa62c8){const _0x5c8326=this['repository']['createRevision'](_0x47ab29);return _0x5c8326['on']('_update',(_0x3ecfb5,_0x3bd549,_0x2d10e9)=>_0xa62c8(_0x3bd549,_0x2d10e9,_0x5c8326)),this['repository']['addRevision'](_0x5c8326),_0x5c8326;}['loadRevisionData'](_0x58d9d7){if(!_0x58d9d7||_0x58d9d7['diffData'])return Promise['resolve']();{const _0xdd7be0=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0xdd7be0,'revisionId':_0x58d9d7['id']})['then'](_0xcd6f3a=>{_0x58d9d7['_update']({'diffData':_0xcd6f3a['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1483d2=>{for(const _0x5945da of this['editor']['model']['document']['getRootNames']())_0x1483d2['detachRoot'](_0x5945da);});}['_sortAndFilterDiffChanges'](_0x566215){const _0x1b3dcd=[],_0x3336c1=new Map();for(const _0x13ae38 of this['editor']['model']['document']['getRootNames']()){const _0xdabcad=this['editor']['editing']['view']['getDomRoot'](_0x13ae38);if(!_0xdabcad)continue;const _0x1e8dd1=_0xdabcad['getClientRects']()['item'](0x0);_0x1e8dd1&&(_0x1b3dcd['push'](_0x13ae38),_0x3336c1['set'](_0x13ae38,_0x1e8dd1));}return _0x1b3dcd['sort']((_0x57c5b7,_0x2c78ee)=>{const _0x4be700=_0x3336c1['get'](_0x57c5b7),_0x58591c=_0x3336c1['get'](_0x2c78ee);return _0x4be700['y']-_0x58591c['y']||_0x4be700['x']-_0x58591c['x'];}),(_0x566215=_0x566215['filter'](_0x2522df=>_0x1b3dcd['includes'](_0x2522df['rootName'])))['sort']((_0x564f30,_0x2a5139)=>_0x1b3dcd['indexOf'](_0x564f30['rootName'])-_0x1b3dcd['indexOf'](_0x2a5139['rootName'])),_0x566215;}['_makeTape'](_0x26dd81){const _0x117ebe=Array['from'](_0x26dd81['markers'])['filter'](([_0x39b183,_0x22bd3f])=>_0x39b183['startsWith']('revision:')&&!_0x22bd3f['isCollapsed']),_0x192860=Array['from'](this['editor']['model']['createRangeIn'](_0x26dd81)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x117ebe['length'])for(const _0x1c27e6 of _0x192860){const [_0x5e6750,_0x314528]=_0x117ebe[0x0],[,_0x454b1b,_0xf23dd8]=_0x5e6750['split'](':');if(_0x314528['end']['isEqual'](_0x1c27e6['nextPosition'])&&_0x117ebe['shift'](),(_0x1c27e6['previousPosition']['isEqual'](_0x314528['start'])||_0x1c27e6['previousPosition']['isAfter'](_0x314528['start']))&&('insertion'==_0x454b1b?_0x1c27e6['isAdded']={'userId':_0xf23dd8}:'deletion'==_0x454b1b&&(_0x1c27e6['isRemoved']={'userId':_0xf23dd8})),0x0==_0x117ebe['length'])break;}return _0x192860;}['_refreshStartEndIndex'](_0x330648){const _0x2a1852=new Map();for(let _0x4b88d8=0x0;_0x4b88d8<_0x330648['length'];_0x4b88d8++)'text'===_0x330648[_0x4b88d8]['type']?(_0x330648[_0x4b88d8]['item']['startIndex']=_0x4b88d8,_0x330648[_0x4b88d8]['item']['endIndex']=_0x4b88d8):('elementStart'===_0x330648[_0x4b88d8]['type']?_0x330648[_0x4b88d8]['item']['startIndex']=_0x4b88d8:'elementEnd'===_0x330648[_0x4b88d8]['type']&&(_0x330648[_0x4b88d8]['item']['endIndex']=_0x4b88d8),_0x2a1852['set'](_0x330648[_0x4b88d8]['id'],_0x4b88d8));for(const _0x26ed61 of _0x2a1852['values']())'elementStart'===_0x330648[_0x26ed61]['type']?_0x330648[_0x26ed61]['item']['endIndex']=_0x2a1852['get'](_0x330648[_0x26ed61]['pairId']):'elementEnd'===_0x330648[_0x26ed61]['type']&&(_0x330648[_0x26ed61]['item']['startIndex']=_0x2a1852['get'](_0x330648[_0x26ed61]['pairId']));}['_processTape'](_0x2d09e5){for(let _0x5bc620=0x0;_0x5bc620<_0x2d09e5['length'];_0x5bc620++){if('elementStart'===_0x2d09e5[_0x5bc620]['type'])_0x2d09e5[_0x5bc620]['item']['startIndex']=_0x5bc620;else{if('elementEnd'===_0x2d09e5[_0x5bc620]['type']){_0x2d09e5[_0x5bc620]['item']['endIndex']=_0x5bc620;const _0x2c89ea=_0x2d09e5[_0x5bc620]['item']['startIndex'];_0x2d09e5[_0x2c89ea]['pairId']=_0x2d09e5[_0x5bc620]['id'],_0x2d09e5[_0x5bc620]['pairId']=_0x2d09e5[_0x2c89ea]['id'];}else _0x2d09e5[_0x5bc620]['item']['startIndex']=_0x5bc620,_0x2d09e5[_0x5bc620]['item']['endIndex']=_0x5bc620,_0x2d09e5[_0x5bc620]['pairId']=null;}_0x2d09e5[_0x5bc620]['markersStart']||(_0x2d09e5[_0x5bc620]['markersStart']=[],_0x2d09e5[_0x5bc620]['markersEnd']=[]);}}['_markInsertions'](_0x5d4464,_0x34bc1c){const _0x469370=_0x5d4464['filter'](_0x384441=>!_0x384441['isAdded']);for(let _0x2e8db5=0x0;_0x2e8db5<_0x34bc1c['length'];_0x2e8db5++)_0x34bc1c[_0x2e8db5]['isAdded']&&(_0x469370[_0x2e8db5]['isAdded']=_0x34bc1c[_0x2e8db5]['isAdded']);}['_makeModelFromViewString'](_0x45104){const _0x54818c=JSON['parse'](_0x45104),_0x401e82=this['editor']['editing']['view']['document'],_0x4a3865=new _0x4daa75(_0x401e82,_0x54818c['map'](_0x404c66=>this['_getViewObj'](_0x404c66)));return this['editor']['data']['toModel'](_0x4a3865);}['_getViewObj'](_0x5a0a45){const _0x5c9d74=this['editor']['editing']['view']['document'];if('string'==typeof _0x5a0a45)return new _0x14d4f7(_0x5c9d74,_0x5a0a45);{const _0x4958e4=_0x5a0a45['children']['map'](_0x1aa821=>this['_getViewObj'](_0x1aa821));return new(Y[_0x5a0a45['type']]||_0x473b22)(_0x5c9d74,_0x5a0a45['name'],_0x5a0a45['attributes'],_0x4958e4);}}['_getDiff'](_0x79bb87,_0x10f478=null){const _0x50b23f=this['repository']['getRevision'](_0x79bb87),_0x58da50=_0x10f478?this['repository']['getRevision'](_0x10f478):null,_0x50da7d=this['_getRevisionsRange'](_0x50b23f,_0x58da50),_0x1b8bc9=_0x50da7d[_0x50da7d['length']-0x1],_0x2ed243=new Map(),_0xf40c30={'model':{},'attributes':{},'changes':[]},_0x3071e1=new Set(),_0xf330ee=new Map();for(let _0x248490=_0x50da7d['length']-0x1;_0x248490>=0x0;_0x248490--){const _0x1f7ef8=_0x50da7d[_0x248490];for(const _0x2821c2 of Object['keys'](_0x1f7ef8['diffData']))if(_0x1f7ef8['diffData'][_0x2821c2]['attachChange']){const _0x7825f9=_0x1f7ef8['diffData'][_0x2821c2]['attachChange'];_0x7825f9['isAttached']?(_0x3071e1['add'](_0x2821c2),_0xf330ee['has'](_0x2821c2)&&_0xf330ee['get'](_0x2821c2)['userId']==_0x7825f9['userId']?_0xf330ee['delete'](_0x2821c2):_0xf330ee['set'](_0x2821c2,_0x7825f9)):_0xf330ee['has'](_0x2821c2)?(_0x3071e1['delete'](_0x2821c2),_0xf330ee['delete'](_0x2821c2)):(_0x3071e1['add'](_0x2821c2),_0xf330ee['set'](_0x2821c2,_0x7825f9));}else _0x3071e1['add'](_0x2821c2);}for(const _0x4c9338 of _0x3071e1){const _0x2d2edb=_0xf330ee['has'](_0x4c9338)&&!_0xf330ee['get'](_0x4c9338)['isAttached'];let _0x5d2b7c=_0x2d2edb?_0x50da7d['length']-0x1:0x0;const _0x1724aa=_0x2d2edb?-0x1:0x1;for(;_0x50da7d[_0x5d2b7c];){const _0x206e12=_0x50da7d[_0x5d2b7c];if(_0x206e12['diffData'][_0x4c9338]){const _0x1ce25c=_0x2d2edb?_0x206e12['diffData'][_0x4c9338]['attributesBefore']:_0x206e12['diffData'][_0x4c9338]['attributesAfter'];_0xf40c30['attributes'][_0x4c9338]=_0x1ce25c?_0x54079b(_0x1ce25c):{};break;}_0x5d2b7c+=_0x1724aa;}}for(const _0x53b1d7 of _0x50da7d){_0x53b1d7['model']={};for(const _0x2c919f of _0x53b1d7['authors'])_0x2ed243['set'](_0x2c919f['id'],_0x2c919f);for(const _0x3edf4b of _0x3071e1){const _0x277f6f=_0x53b1d7['diffData'][_0x3edf4b]?_0x53b1d7['diffData'][_0x3edf4b]['insertions']:'[]',_0x271cea=_0x53b1d7['diffData'][_0x3edf4b]?_0x53b1d7['diffData'][_0x3edf4b]['deletions']:'[]';_0x53b1d7['model'][_0x3edf4b]={'insertions':this['_makeModelFromViewString'](_0x277f6f),'deletions':this['_makeModelFromViewString'](_0x271cea)};}}for(const _0x23abee of _0x3071e1){let _0x6e6ae=null,_0x90b9e9=0x0;const _0x48f0d1=new Map(Array['from'](_0x50b23f['model'][_0x23abee]['insertions']['markers'])['filter'](([_0x50f321])=>!_0x50f321['startsWith']('revision:')));let _0x359d1f=0x0;for(const _0x788af1 of _0x50da7d){const _0x15a76d=this['_makeTape'](_0x788af1['model'][_0x23abee]['insertions']);_0x788af1==_0x50b23f?(_0x6e6ae=_0x15a76d,_0x90b9e9=_0x6e6ae['length'],_0x6e6ae['forEach'](_0x34972c=>{_0x34972c['id']=_0x359d1f++;}),this['_processTape'](_0x6e6ae)):this['_markInsertions'](_0x6e6ae,_0x15a76d);const _0x171462=_0x6e6ae['filter'](_0x46714c=>!_0x46714c['isAdded'])['map'](_0x1dad50=>_0x1dad50['id']);let _0x255d35=0x0;const _0x58ba2c=this['_makeTape'](_0x788af1['model'][_0x23abee]['deletions']);_0x58ba2c['forEach'](_0x46c627=>{_0x46c627['isRemoved']?_0x46c627['id']=_0x90b9e9++:_0x46c627['id']=_0x171462[_0x255d35++];}),this['_processTape'](_0x58ba2c),this['_setDistance'](_0x6e6ae,'isAdded'),this['_setDistance'](_0x58ba2c,'isRemoved'),_0x788af1==_0x50b23f&&this['_markMarkers'](_0x6e6ae,_0x48f0d1),_0x6e6ae=this['_joinTapes'](_0x6e6ae,_0x58ba2c),this['_refreshStartEndIndex'](_0x6e6ae),this['_setDistance'](_0x6e6ae,'isRemoved');}_0x6e6ae=_0x6e6ae['filter'](_0x3abadd=>!(_0x3abadd['isAdded']&&_0x3abadd['isRemoved']));const _0x1b8505=new Map(_0x1b8bc9['model'][_0x23abee]['deletions']['markers']),_0x2355ab=new Set(_0x48f0d1['keys']());for(const _0x50e2bd of _0x1b8505['keys']())_0x2355ab['delete'](_0x50e2bd);this['_markSuggestions'](_0x6e6ae,_0x2355ab),this['_fixObsoleteTags'](_0x6e6ae),_0x6e6ae=this['_removeMissingPairs'](_0x6e6ae),_0x6e6ae=this['_markMismatchedRemovedTags'](_0x6e6ae),_0x6e6ae=this['_removeUnsupportedChanges'](_0x6e6ae);const {root:_0x2595eb,changes:_0x4ddf11}=this['_makeModelFromTape'](_0x6e6ae,_0x2ed243,_0x23abee);_0xf40c30['model'][_0x23abee]=_0x2595eb;const _0x3c7ee6=_0xf330ee['get'](_0x23abee);if(_0x3c7ee6){const _0x27fd0b=_0x2ed243['get'](_0x3c7ee6['userId']),_0x1e6916=new r({'author':_0x27fd0b,'type':_0x3c7ee6['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x23abee});_0x4ddf11['unshift'](_0x1e6916),_0xf40c30['attributes'][_0x23abee]['revisionHistoryAttachChange']=_0x1e6916['id'];}_0xf40c30['changes']=_0xf40c30['changes']['concat'](_0x4ddf11);}return _0xf40c30;}['_markMarkers'](_0x547228,_0x163288){for(let _0x5edb8b=0x0;_0x5edb8b<_0x547228['length'];_0x5edb8b++)for(const [_0x559ae3,_0x1841d3]of _0x163288)_0x1841d3['start']['isEqual'](_0x547228[_0x5edb8b]['previousPosition'])&&_0x547228[_0x5edb8b]['markersStart']['push'](_0x559ae3),_0x1841d3['end']['isEqual'](_0x547228[_0x5edb8b]['nextPosition'])&&_0x547228[_0x5edb8b]['markersEnd']['push'](_0x559ae3);}['_joinTapes'](_0x59fa3e,_0x3aa18a){let _0x308cbd=[],_0x3b21ad=0x0,_0x945dbe=0x0;for(;_0x3b21ad<_0x59fa3e['length']||_0x945dbe<_0x3aa18a['length'];){const _0x42814c=_0x59fa3e[_0x3b21ad]||{},_0x42b562=_0x3aa18a[_0x945dbe]||{};if(_0x42814c['id']==_0x42b562['id'])_0x3b21ad++,_0x945dbe++,_0x308cbd['push'](_0x42814c);else{if(_0x42b562['isRemoved']&&_0x42814c['isAdded']){const {commonTape:_0x586c14,iEnd:_0x48498a,jEnd:_0xd5f0db}=this['_threeWayMerge'](_0x59fa3e,_0x3b21ad,_0x3aa18a,_0x945dbe);_0x308cbd=_0x308cbd['concat'](_0x586c14),_0x3b21ad=_0x48498a,_0x945dbe=_0xd5f0db;}else _0x42b562['isRemoved']?(_0x945dbe++,_0x308cbd['push'](_0x42b562)):(_0x3b21ad++,_0x308cbd['push'](_0x42814c));}}return _0x308cbd;}['_markSuggestions'](_0x12e5d9,_0x3afc24){const _0x50ff88=[];for(let _0x41f77a=0x0;_0x41f77a<_0x12e5d9['length'];_0x41f77a++){for(let _0x3bdaa8=0x0;_0x3bdaa8<_0x12e5d9[_0x41f77a]['markersStart']['length'];_0x3bdaa8++){const _0x44fd63=_0x12e5d9[_0x41f77a]['markersStart'][_0x3bdaa8];if(!_0x3afc24['has'](_0x44fd63))continue;const {group:_0xe9d559,type:_0xaf741f,authorId:_0x2138ba}=_0x36a75e(_0x44fd63);'revision-suggestion'!=_0xe9d559||'insertion'!=_0xaf741f&&'deletion'!=_0xaf741f||(_0x50ff88['unshift']({'type':_0xaf741f,'name':_0x44fd63,'userId':_0x2138ba}),_0x12e5d9[_0x41f77a]['markersStart']['splice'](_0x3bdaa8,0x1),_0x3bdaa8--);}_0x4a506e(_0x12e5d9[_0x41f77a]);for(let _0x1e404b=0x0;_0x1e404b<_0x12e5d9[_0x41f77a]['markersEnd']['length'];_0x1e404b++){const _0xa82c99=_0x12e5d9[_0x41f77a]['markersEnd'][_0x1e404b];if(!_0x3afc24['has'](_0xa82c99))continue;const {group:_0x256f66,type:_0x9abfd7}=_0x36a75e(_0xa82c99);if('revision-suggestion'!=_0x256f66||'insertion'!=_0x9abfd7&&'deletion'!=_0x9abfd7)continue;_0x12e5d9[_0x41f77a]['markersEnd']['splice'](_0x1e404b,0x1),_0x1e404b--;const _0x358fc6=_0x50ff88['findIndex'](_0x2be64f=>_0x2be64f['name']==_0xa82c99);_0x358fc6>-0x1&&_0x50ff88['splice'](_0x358fc6,0x1);}}function _0x36a75e(_0x5473c1){const _0x3c3bd2=_0x5473c1['split'](':');return{'group':_0x3c3bd2[0x0],'type':_0x3c3bd2[0x1],'subType':_0x3c3bd2['length']>=0x5?_0x3c3bd2[0x2]:null,'id':_0x3c3bd2['length']<0x5?_0x3c3bd2[0x2]:_0x3c3bd2[0x3],'authorId':_0x3c3bd2['length']<0x5?_0x3c3bd2[0x3]:_0x3c3bd2[0x4],'markerCount':0x6==_0x3c3bd2['length']?_0x3c3bd2[0x5]:null};}function _0x4a506e(_0x43fca0){for(let _0x18e820=0x0;_0x18e820<_0x50ff88['length'];_0x18e820++){if(_0x43fca0['isAdded']&&'insertion'==_0x50ff88[_0x18e820]['type'])return _0x43fca0['isAddSuggestion']=_0x50ff88[_0x18e820],void delete _0x43fca0['isAdded'];if(!_0x43fca0['isAdded']&&!_0x43fca0['isRemoved']&&'deletion'==_0x50ff88[_0x18e820]['type'])return void(_0x43fca0['isRemoveSuggestion']=_0x50ff88[_0x18e820]);}}}['_setDistance'](_0x13ba4e,_0x3272e6){let _0x5f599c=0x0,_0x441ff2=!0x1;const _0x2cd216=new Map();for(const _0x1326cd of _0x13ba4e)_0x1326cd[_0x3272e6]?_0x441ff2&&(_0x5f599c++,_0x441ff2=!0x1):(_0x5f599c++,_0x441ff2=!0x0),_0x2cd216['set'](_0x1326cd['id'],_0x5f599c);for(let _0x868b6e=0x0;_0x868b6e<_0x13ba4e['length'];_0x868b6e++){if('isRemoved'==_0x3272e6&&_0x13ba4e[_0x868b6e]['isAdded']||'isAdded'==_0x3272e6&&_0x13ba4e[_0x868b6e]['isRemoved'])continue;if('text'==_0x13ba4e[_0x868b6e]['type']){_0x13ba4e[_0x868b6e]['distance']=0x0;continue;}const _0x55e985=_0x2cd216['get'](_0x13ba4e[_0x868b6e]['pairId']),_0x30298d=_0x2cd216['get'](_0x13ba4e[_0x868b6e]['id']);_0x13ba4e[_0x868b6e]['distance']=_0x55e985-_0x30298d;}}['_getRevisionsRange'](_0xf7a91f,_0x496d0c,_0x339115=!0x1){const _0x331198=[];let _0x2f9132=this['repository']['getIndex'](_0xf7a91f),_0x1834ff=this['repository']['getIndex'](_0x496d0c);for(-0x1==_0x1834ff&&(_0x1834ff=this['repository']['_revisions']['length'],_0x339115=!0x1);_0x2f9132<_0x1834ff;)_0x331198['push'](this['repository']['getRevision'](_0x2f9132)),_0x2f9132++;return _0x339115&&_0x331198['push'](this['repository']['getRevision'](_0x2f9132)),_0x331198;}['_threeWayMerge'](_0x1f7354,_0x362520,_0x38b3e5,_0x5d1be9){const _0x57e523=this['editor']['model']['schema'];let _0xb7bc7c=_0x362520;for(;_0x1f7354[_0xb7bc7c]&&_0x1f7354[_0xb7bc7c]['isAdded'];)_0xb7bc7c++;let _0x355e9a=_0x5d1be9;for(;_0x38b3e5[_0x355e9a]&&_0x38b3e5[_0x355e9a]['isRemoved'];)_0x355e9a++;_0x4f0ca4(_0x1f7354,_0x362520,_0xb7bc7c),_0x4f0ca4(_0x38b3e5,_0x5d1be9,_0x355e9a);const _0x2084f8=_0x38b3e5['slice'](_0x5d1be9,_0x355e9a)['concat'](_0x1f7354['slice'](_0x362520,_0xb7bc7c));return _0x2084f8['sort']((_0x4c9f1c,_0x8a2bac)=>_0x4c9f1c['side']!=_0x8a2bac['side']?_0x4c9f1c['side']-_0x8a2bac['side']:_0x4c9f1c['level']!=_0x8a2bac['level']?_0x4c9f1c['level']-_0x8a2bac['level']:_0x4c9f1c['distance']!=_0x8a2bac['distance']?_0x8a2bac['distance']-_0x4c9f1c['distance']:!!_0x4c9f1c['isAdded']!=!!_0x8a2bac['isAdded']?-0x1==_0x4c9f1c['side']||0x0==_0x4c9f1c['side']?_0x4c9f1c['isAdded']?-0x1:0x1:_0x4c9f1c['isAdded']?0x1:-0x1:_0x4c9f1c['index']-_0x8a2bac['index']),{'commonTape':_0x2084f8,'iEnd':_0xb7bc7c,'jEnd':_0x355e9a};function _0x4f0ca4(_0x5c62e1,_0x22bc98,_0x281745){let _0x1d679c=-0x1,_0x35d184=Number['POSITIVE_INFINITY'],_0x4df543=!0x0;for(let _0x422807=_0x22bc98;_0x422807<_0x281745;_0x422807++)if(_0x57e523['isInline'](_0x5c62e1[_0x422807]['item'])||(_0x4df543=!0x1),_0x5c62e1[_0x422807]['item']['startIndex']<_0x22bc98&&(_0x1d679c=_0x422807),_0x5c62e1[_0x422807]['item']['endIndex']>=_0x281745){_0x35d184=_0x422807;break;}_0x4df543&&(_0x1d679c=_0x281745-0x1);for(let _0x4c60f2=_0x22bc98;_0x4c60f2<_0x281745;_0x4c60f2++)_0x5c62e1[_0x4c60f2]['side']=_0x4c60f2<=_0x1d679c?-0x1:_0x4c60f2<_0x35d184?0x0:0x1,_0x5c62e1[_0x4c60f2]['index']=_0x4c60f2;let _0x292821=0x0;for(let _0x1f6a26=_0x22bc98;_0x1f6a26<=_0x1d679c;_0x1f6a26++)0x0==_0x5c62e1[_0x1f6a26]['distance']?_0x5c62e1[_0x1f6a26]['level']=_0x292821:(_0x292821++,_0x5c62e1[_0x1f6a26]['level']=_0x292821,_0x292821++);for(let _0x1358d8=_0x22bc98;_0x1358d8<_0x281745;_0x1358d8++)0x0==_0x5c62e1[_0x1358d8]['side']&&(_0x5c62e1[_0x1358d8]['level']=_0x292821);_0x292821=0x0;for(let _0x5e0ac0=_0x281745-0x1;_0x5e0ac0>=_0x35d184;_0x5e0ac0--)0x0==_0x5c62e1[_0x5e0ac0]['distance']?_0x5c62e1[_0x5e0ac0]['level']=_0x292821:(_0x292821--,_0x5c62e1[_0x5e0ac0]['level']=_0x292821,_0x292821--);}}['_fixObsoleteTags'](_0x58e94a){const _0x368ed=new Map(),_0x381418=this['editor']['model']['schema'];for(let _0xb73937=0x1;_0xb73937<_0x58e94a['length'];_0xb73937++){let _0x560e4e,_0xa698f5,_0x377aa8;const _0x2ee966=_0x58e94a[_0xb73937],_0x3c2165=_0x58e94a[_0xb73937-0x1];if('text'==_0x2ee966['type'])continue;if(_0x2ee966['type']!=_0x3c2165['type'])continue;if(!_0x381418['isBlock'](_0x3c2165['item'])||_0x381418['isLimit'](_0x3c2165['item']))continue;if(!_0x381418['isBlock'](_0x2ee966['item'])||_0x381418['isLimit'](_0x2ee966['item']))continue;if((_0x58e94a[_0xb73937]['isAdded']||_0x58e94a[_0xb73937]['isAddSuggestion'])&&_0x58e94a[_0xb73937-0x1]['isRemoved'])_0x560e4e=_0x58e94a[_0xb73937],_0xa698f5=_0x58e94a[_0xb73937-0x1],_0x377aa8=_0xb73937-0x1;else{if(!_0x58e94a[_0xb73937]['isRemoved']||!_0x58e94a[_0xb73937-0x1]['isAdded']&&!_0x58e94a[_0xb73937-0x1]['isAddSuggestion'])continue;_0x560e4e=_0x58e94a[_0xb73937-0x1],_0xa698f5=_0x58e94a[_0xb73937],_0x377aa8=_0xb73937;}const _0xe5bc6a=_0x560e4e['level']==_0xa698f5['level'],_0x41f78c=Math['abs'](_0x560e4e['level'])<Math['abs'](_0xa698f5['level'])&&0x0==_0xa698f5['distance'];(_0xe5bc6a||_0x41f78c)&&(_0x368ed['set'](_0xa698f5['id'],_0x560e4e['id']),_0x58e94a['splice'](_0x377aa8,0x1),_0xb73937--,_0x560e4e['isAdded']=!0x1);}for(let _0x16f6c8=0x0;_0x16f6c8<_0x58e94a['length'];_0x16f6c8++)_0x368ed['has'](_0x58e94a[_0x16f6c8]['pairId'])&&(_0x58e94a[_0x16f6c8]['pairId']=_0x368ed['get'](_0x58e94a[_0x16f6c8]['pairId']));}['_removeMissingPairs'](_0x9001e8){const _0x5cb6d8=new Set(_0x9001e8['map'](_0x459cff=>_0x459cff['id']));for(let _0x2390d3=0x0;_0x2390d3<_0x9001e8['length'];_0x2390d3++)_0x5cb6d8['has'](_0x9001e8[_0x2390d3]['pairId'])||0x0==_0x9001e8[_0x2390d3]['distance']||(_0x9001e8[_0x2390d3]['isIncorrect']=!0x0);return _0x9001e8['filter'](_0x49b473=>!_0x49b473['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1c6811){const _0x204345=new Set();for(let _0x411901=0x0;_0x411901<_0x1c6811['length'];_0x411901++){if(_0x204345['has'](_0x1c6811[_0x411901]['id'])&&_0x1c6811[_0x411901]['isRemoved']&&(_0x1c6811[_0x411901]['isIncorrect']=!0x0),_0x1c6811[_0x411901]['isIncorrect'])continue;if(0x0==_0x1c6811[_0x411901]['distance'])continue;if('elementStart'!=_0x1c6811[_0x411901]['type'])continue;if(null==_0x1c6811[_0x411901]['pairId'])continue;let _0x55a736=_0x411901+0x1,_0x177ec3=0x0;for(;_0x1c6811[_0x55a736]['id']!=_0x1c6811[_0x411901]['pairId'];)'elementStart'==_0x1c6811[_0x55a736]['type']?_0x177ec3++:'elementEnd'==_0x1c6811[_0x55a736]['type']&&_0x177ec3--,_0x55a736++;if(0x0!=_0x177ec3){if(_0x1c6811[_0x411901]['isRemoved'])_0x1c6811[_0x411901]['isIncorrect']=!0x0;else{for(;_0x55a736!=_0x411901;)_0x1c6811[_0x55a736]['isRemoved']&&0x0!=_0x1c6811[_0x55a736]['distance']&&(_0x1c6811[_0x55a736]['isIncorrect']=!0x0,_0x204345['add'](_0x1c6811[_0x55a736]['pairId'])),_0x55a736--;}}}return _0x1c6811['filter'](_0x4c73a1=>!_0x4c73a1['isIncorrect']);}['_removeUnsupportedChanges'](_0x13cecb){const _0x1537c5=this['editor']['model']['schema'];for(let _0x5c0149=0x0;_0x5c0149<_0x13cecb['length'];_0x5c0149++){if(!(_0x13cecb[_0x5c0149]['isAdded']||_0x13cecb[_0x5c0149]['isAddSuggestion']||_0x13cecb[_0x5c0149]['isRemoved']||_0x13cecb[_0x5c0149]['isRemoveSuggestion']))continue;if(0x0==_0x13cecb[_0x5c0149]['distance'])continue;const _0x3a590e=_0x13cecb[_0x5c0149]['item'];_0x1537c5['isBlock'](_0x3a590e)||_0x1537c5['isLimit'](_0x3a590e)||(_0x13cecb[_0x5c0149]['isAdded']&&delete _0x13cecb[_0x5c0149]['isAdded'],_0x13cecb[_0x5c0149]['isAddSuggestion']&&delete _0x13cecb[_0x5c0149]['isAddSuggestion'],_0x13cecb[_0x5c0149]['isRemoveSuggestion']&&delete _0x13cecb[_0x5c0149]['isRemoveSuggestion'],_0x13cecb[_0x5c0149]['isRemoved']&&(_0x13cecb[_0x5c0149]['isIncorrect']=!0x0));}return _0x13cecb['filter'](_0x33322b=>!_0x33322b['isIncorrect']);}['_makeModelFromTape'](_0x4b6968,_0x37b0b4,_0x21655c){const _0x325851=new gt(),_0x1dadf4=[],_0x4ab826=new Map(),_0x2a28c8=this['editor']['model'],_0x5aa598=_0x2a28c8['schema'],_0x36b3ed=[_0x325851],_0x4b6ff5={},_0x4a85ac={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2d5fce=null;const _0x5c28c9=[0x0];for(let _0x344d20=0x0;_0x344d20<_0x4b6968['length'];_0x344d20++)if('elementStart'===_0x4b6968[_0x344d20]['type']){_0x4b6968[_0x344d20]['previousPosition']=_0x2a28c8['createPositionFromPath'](_0x325851,_0x5c28c9);const _0x321759=new ut(_0x4b6968[_0x344d20]['item']['name'],_0x4b6968[_0x344d20]['item']['getAttributes']());_0x36b3ed[0x0]['_appendChild'](_0x321759),_0x5c28c9['push'](0x0),_0x36b3ed['unshift'](_0x321759),_0x4b6968[_0x344d20]['nextPosition']=_0x2a28c8['createPositionFromPath'](_0x325851,_0x5c28c9);}else'elementEnd'===_0x4b6968[_0x344d20]['type']?(_0x36b3ed['shift'](),_0x4b6968[_0x344d20]['previousPosition']=_0x2a28c8['createPositionFromPath'](_0x325851,_0x5c28c9),_0x5c28c9['pop'](),_0x5c28c9[_0x5c28c9['length']-0x1]++,_0x4b6968[_0x344d20]['nextPosition']=_0x2a28c8['createPositionFromPath'](_0x325851,_0x5c28c9)):(_0x4b6968[_0x344d20]['previousPosition']=_0x2a28c8['createPositionFromPath'](_0x325851,_0x5c28c9),_0x2d5fce?_0x2d5fce['_data']+=_0x4b6968[_0x344d20]['item']['data']:_0x2d5fce=new wt(_0x4b6968[_0x344d20]['item']['data'],_0x4b6968[_0x344d20]['item']['getAttributes']()),_0x4b6968[_0x344d20+0x1]&&'text'===_0x4b6968[_0x344d20+0x1]['type']&&_0x24d7d2(_0x2d5fce,_0x4b6968[_0x344d20+0x1]['item'])||(_0x36b3ed[0x0]['_appendChild'](_0x2d5fce),_0x2d5fce=null),_0x5c28c9[_0x5c28c9['length']-0x1]+=_0x4b6968[_0x344d20]['item']['offsetSize'],_0x4b6968[_0x344d20]['nextPosition']=_0x2a28c8['createPositionFromPath'](_0x325851,_0x5c28c9));for(let _0x53a696=0x0;_0x53a696<_0x4b6968['length'];_0x53a696++){const _0x262b6e=_0x4b6968[_0x53a696]['previousPosition'],_0x352e5b=_0x4b6968[_0x53a696]['nextPosition'];for(const _0x548dfc of _0x4b6968[_0x53a696]['markersStart'])_0x4ab826['set'](_0x548dfc,{'start':_0x262b6e,'end':null});_0x2ddd30('isRemoveSuggestion',_0x53a696,_0x262b6e,_0x352e5b),_0x2ddd30('isAddSuggestion',_0x53a696,_0x262b6e,_0x352e5b),_0x2ddd30('isRemoved',_0x53a696,_0x262b6e,_0x352e5b),_0x2ddd30('isAdded',_0x53a696,_0x262b6e,_0x352e5b);for(const _0x471639 of _0x4b6968[_0x53a696]['markersEnd']){_0x4ab826['get'](_0x471639)['end']=_0x352e5b;}}for(const [_0x18a068,_0x2236f7]of _0x4ab826){const _0x1d0be8=this['editor']['model']['createRange'](_0x2236f7['start'],_0x2236f7['end']);_0x325851['markers']['set'](_0x18a068,_0x1d0be8);}return _0x1dadf4['sort']((_0x1711be,_0x38b18d)=>{const _0x423582=_0x325851['markers']['get']('revision:'+_0x1711be['id']),_0x51ebb0=_0x325851['markers']['get']('revision:'+_0x38b18d['id']);return _0x423582['start']['isBefore'](_0x51ebb0['start'])?-0x1:_0x423582['start']['isAfter'](_0x51ebb0['start'])?0x1:_0x423582['end']['isBefore'](_0x51ebb0['end'])?-0x1:_0x423582['end']['isAfter'](_0x51ebb0['end'])?0x1:'add'===_0x1711be['type']?-0x1:0x1;}),{'root':_0x325851,'changes':_0x1dadf4};function _0x2ddd30(_0xfc2858,_0x2d7599,_0x13640c,_0x132a13){const _0x3d2caa=!!_0x4b6968[_0x2d7599][_0xfc2858],_0x309b71=_0x3d2caa?_0x4b6968[_0x2d7599][_0xfc2858]['userId']:null,_0x31497e=_0x2d7599===_0x4b6968['length']-0x1,_0x2a58f5=_0x4a85ac[_0xfc2858][0x0],_0x1f8d6b=_0x5aa598['isObject'](_0x4b6968[_0x2d7599]['item']);!_0x4b6ff5[_0xfc2858]&&_0x3d2caa?_0x4b6ff5[_0xfc2858]={'start':_0x13640c,'tapeItem':_0x4b6968[_0x2d7599],'userId':_0x309b71,'type':_0xfc2858}:_0x4b6ff5[_0xfc2858]&&!_0x3d2caa?(_0x4b6ff5[_0xfc2858]['end']=_0x13640c,_0x760145(_0x4b6ff5[_0xfc2858]),_0x4b6ff5[_0xfc2858]=null):_0x4b6ff5[_0xfc2858]&&_0x3d2caa&&_0x4b6ff5[_0xfc2858]['userId']!==_0x309b71&&(_0x4b6ff5[_0xfc2858]['end']=_0x13640c,_0x2a58f5&&_0x2a58f5['userId']===_0x4b6ff5[_0xfc2858]['userId']||_0x760145(_0x4b6ff5[_0xfc2858]),_0x4b6ff5[_0xfc2858]={'start':_0x13640c,'tapeItem':_0x4b6968[_0x2d7599],'userId':_0x309b71,'type':_0xfc2858}),_0x4b6ff5[_0xfc2858]&&_0x1f8d6b&&('elementStart'!==_0x4b6968[_0x2d7599]['type']||_0x2a58f5&&_0x2a58f5['userId']===_0x309b71||_0x4a85ac[_0xfc2858]['unshift']({'userId':_0x309b71,'object':_0x4b6968[_0x2d7599]['item'],'change':_0x4b6ff5[_0xfc2858]}),'elementEnd'===_0x4b6968[_0x2d7599]['type']&&_0x2a58f5&&_0x2a58f5['object']===_0x4b6968[_0x2d7599]['item']&&(_0x4a85ac[_0xfc2858]['shift'](),_0x4b6ff5[_0xfc2858]=_0x2a58f5['change'])),_0x4b6ff5[_0xfc2858]&&_0x31497e&&(_0x4b6ff5[_0xfc2858]['end']=_0x132a13,_0x760145(_0x4b6ff5[_0xfc2858]),_0x4b6ff5[_0xfc2858]=null);}function _0x760145({start:_0x2d1970,end:_0x5e4587,tapeItem:_0x150232,userId:_0x594d23,type:_0x135c6f}){const _0x40732f=_0x150232['item'],_0x2276aa=_0x2a28c8['schema']['isBlock'](_0x40732f)&&!_0x2a28c8['schema']['isLimit'](_0x40732f),_0x341ccd=_0x2d1970['nodeAfter']==_0x5e4587['parent']&&_0x5e4587['isAtStart'];if(_0x2276aa&&_0x341ccd)return;const _0xb19198=_0x2a28c8['createRange'](_0x2d1970,_0x5e4587),_0x59b65b=_0x37b0b4['get'](_0x594d23),_0x17746d=new r({'author':_0x59b65b,'type':'isAdded'==_0x135c6f||'isAddSuggestion'==_0x135c6f?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x135c6f||'isRemoveSuggestion'==_0x135c6f},'createdAt':new Date(),'rootName':_0x21655c});_0x1dadf4['push'](_0x17746d),_0x325851['markers']['set']('revision:'+_0x17746d['id'],_0xb19198);}function _0x24d7d2(_0xfdb38f,_0x209cd7){const _0x83ceeb=_0xfdb38f['getAttributes'](),_0x574401=_0x209cd7['getAttributes']();for(const _0x1ffcf8 of _0x83ceeb){if(_0x1ffcf8[0x1]!==_0x209cd7['getAttribute'](_0x1ffcf8[0x0]))return!0x1;_0x574401['next']();}return _0x574401['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x332422=>{const _0x322a8a=_0x332422['markerName']['split'](':')[0x1],_0x27eac9=this['_getChangeFromId'](_0x322a8a);if(!_0x27eac9)return null;const _0x216a9f='add'==_0x27eac9['type']?'insertion':'deletion',_0x8345fa=['ck-suggestion-marker','ck-suggestion-marker-'+_0x216a9f];return _0x27eac9['data']['isSuggestion']&&_0x8345fa['push']('ck-suggestion-marker-'+_0x216a9f+'-new'),this['activeChange']==_0x27eac9&&_0x8345fa['push']('ck-suggestion-marker--active'),{'classes':_0x8345fa,'attributes':{'data-change-id':_0x322a8a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x257325=>{_0x257325['on']('element:pre',(_0x18c797,_0x52805a,_0x95b17e)=>{const _0x132778=_0x52805a['viewItem']['getChild'](0x0);if(!_0x132778||!_0x132778['is']('element','code'))return;if(!_0x95b17e['consumable']['consume'](_0x132778,{'attributes':['vid_start','vid_end']}))return;const _0x5012d9=_0x52805a['modelRange']['start']['nodeAfter'];_0x95b17e['writer']['setAttribute']('vid_start',_0x132778['getAttribute']('vid_start'),_0x5012d9),_0x95b17e['writer']['setAttribute']('vid_end',_0x132778['getAttribute']('vid_end'),_0x5012d9);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x5af070=>{_0x5af070['on']('element',(_0x49feda,_0x1d7c4e,_0x44b419)=>{if(!_0x44b419['consumable']['consume'](_0x1d7c4e['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1d7c4e['modelRange']['isCollapsed'])return;const _0x2b7c72=_0x1d7c4e['modelRange']['start']['nodeAfter'];_0x2b7c72['hasAttribute']('vid_start')||_0x2b7c72['hasAttribute']('vid')||(_0x44b419['writer']['setAttribute']('vid_start',_0x1d7c4e['viewItem']['getAttribute']('vid_start'),_0x2b7c72),_0x44b419['writer']['setAttribute']('vid_end',_0x1d7c4e['viewItem']['getAttribute']('vid_end'),_0x2b7c72));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x43ec02=>_0x43ec02['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xe9249a,[,_0x34f8dd])=>{['vid_start','vid_end','vid']['includes'](_0x34f8dd)&&(_0xe9249a['return']=!0x0,_0xe9249a['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x493459=>{_0x493459['on']('attribute:vid',(_0x278585,_0x540f32,_0x2abd3e)=>{if('\x20'!=_0x540f32['item']['data']||_0x540f32['item']['parent']['maxOffset']>0x1)return;if(!_0x2abd3e['consumable']['consume'](_0x540f32['item'],_0x278585['name']))return;const _0xd563d2=_0x2abd3e['writer'],_0x7c683b=_0x2abd3e['mapper']['toViewRange'](_0x540f32['range']);_0xd563d2['wrap'](_0x7c683b,_0xd563d2['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x55c5d4){const _0x20ee0a=_0x55c5d4['plugins']['get']('RevisionViewer');return(_0x4e82db,_0x48ea98,_0x3b5f11)=>{const _0x53a0ee=_0x48ea98['markerName']['split'](':')[0x1],_0x273cec=_0x20ee0a['_getChangeFromId'](_0x53a0ee);if(!_0x273cec)return null;const _0x1b7c2f='add'==_0x273cec['type']?'split':'merge';if(!_0x3b5f11['consumable']['test'](_0x48ea98['markerRange'],_0x4e82db['name']))return;const _0xfdb499=_0x48ea98['markerRange']['getWalker'](),_0x75ae90=_0x48ea98['markerRange']['start'],_0x499194=_0x55c5d4['model']['schema'];let _0x5683e4=null,_0x31a17b=null,_0x100e83=!0x1,_0x379f8d=!0x1;for(const _0x5264eb of _0xfdb499){const _0x41eedf=_0x5264eb['item'];_0x100e83=_0x100e83||_0x499194['isContent'](_0x41eedf);const _0xb7d2a8=_0x3b5f11['mapper']['toViewElement'](_0x41eedf);if(_0xb7d2a8&&_0xb7d2a8['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5264eb['type']&&(_0x499194['isBlock'](_0x41eedf)&&!_0x499194['isLimit'](_0x41eedf)&&(_0x41eedf['nextSibling']||_0x75ae90['isAtEnd']?_0x5683e4&&_0x5683e4['parent']==_0x41eedf||(_0x5683e4=_0x41eedf,_0x305dea(_0x5264eb['previousPosition']),_0x379f8d=!0x0):_0x31a17b=_0x31a17b||_0x5264eb['previousPosition']));}function _0x305dea(_0x3d89a2){const _0x14ad4b=_0x3b5f11['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1b7c2f}),_0x1bf8e7=_0x3b5f11['mapper']['toViewPosition'](_0x3d89a2);_0x273cec['data']['isSuggestion']&&_0x3b5f11['writer']['addClass']('ck-suggestion-marker-'+_0x1b7c2f+'-new',_0x14ad4b),_0x20ee0a['activeChange']==_0x273cec&&_0x3b5f11['writer']['addClass']('ck-suggestion-marker--active',_0x14ad4b),_0x3b5f11['writer']['insert'](_0x1bf8e7,_0x14ad4b),_0x3b5f11['mapper']['bindElementToMarker'](_0x14ad4b,_0x48ea98['markerName']);}_0x100e83||_0x379f8d||!_0x31a17b||_0x305dea(_0x31a17b);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x372868,_0x1e7a6a,_0x4533ff)=>{const _0x3ad723=_0x4533ff['mapper']['markerNameToElements'](_0x1e7a6a['markerName']);if(_0x3ad723){for(const _0x153386 of _0x3ad723)(_0x153386['hasClass']('ck-suggestion-marker-split')||_0x153386['hasClass']('ck-suggestion-marker-merge'))&&(_0x4533ff['mapper']['unbindElementFromMarkerName'](_0x153386,_0x1e7a6a['markerName']),_0x4533ff['writer']['remove'](_0x153386));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x58928c,_0x560dac,_0x166606)=>{const _0x1f3e25=_0x560dac['markerName']['split'](':')[0x1],_0x4f520a=this['_getChangeFromId'](_0x1f3e25);if(!_0x4f520a)return null;const _0x33e676='add'==_0x4f520a['type']?'split':'merge';if(_0x166606['consumable']['test'](_0x560dac['markerRange'],_0x58928c['name']))for(const _0x54ac7e of _0x560dac['markerRange']['getItems']()){if(!_0x54ac7e['is']('element','softBreak'))continue;const _0x46ef70=_0x166606['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x33e676}),_0x381b46=_0x166606['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x54ac7e));_0x4f520a['data']['isSuggestion']&&_0x166606['writer']['addClass']('ck-suggestion-marker-'+_0x33e676+'-new',_0x46ef70),this['activeChange']==_0x4f520a&&_0x166606['writer']['addClass']('ck-suggestion-marker--active',_0x46ef70),_0x166606['writer']['insert'](_0x381b46,_0x46ef70),_0x166606['mapper']['bindElementToMarker'](_0x46ef70,_0x560dac['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x5d81a5=>{for(const _0x27161f of this['editor']['model']['document']['getRootNames']()){const _0x898a35=this['editor']['model']['document']['getRoot'](_0x27161f),_0x53b5ca=this['editor']['editing']['view']['document']['getRoot'](_0x27161f);if(_0x53b5ca){const _0x935d74=_0x898a35['getAttribute']('revisionHistoryAttachChange');if(_0x5d81a5['removeAttribute']('data-change-id',_0x53b5ca),_0x5d81a5['removeClass']('ck-revision-history-root-add',_0x53b5ca),_0x5d81a5['removeClass']('ck-revision-history-root-remove',_0x53b5ca),_0x5d81a5['removeClass']('ck-revision-history-root--active',_0x53b5ca),_0x935d74){const _0x599378=this['_getChangeFromId'](_0x935d74);if(!_0x599378)return null;_0x5d81a5['setAttribute']('data-change-id',_0x935d74,_0x53b5ca),_0x5d81a5['addClass']('ck-revision-history-root-'+_0x599378['type'],_0x53b5ca),this['activeChange']==_0x599378&&_0x5d81a5['addClass']('ck-revision-history-root--active',_0x53b5ca);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x552764=>'revision-comment:'+_0x552764,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x43c0ba=>'revision-suggestion:'+_0x43c0ba,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4b1825=>({'name':'suggestion:'+_0x4b1825,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x38b412=>{const _0x2cbacb=_0x38b412['markerName']['split'](':')[0x1];return'insertion'!=_0x2cbacb&&'deletion'!=_0x2cbacb?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2cbacb]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x222e1a,_0x28939,_0x134161)=>{const _0xdbd83b=_0x134161['mapper']['markerNameToElements'](_0x28939['markerName']);if(_0xdbd83b){for(const _0x1ce5c5 of _0xdbd83b)_0x1ce5c5['is']('uiElement')&&(_0x134161['mapper']['unbindElementFromMarkerName'](_0x1ce5c5,_0x28939['markerName']),_0x134161['writer']['remove'](_0x1ce5c5));}},{'priority':'high'});}['_getChangeFromId'](_0x885749){return this['_changeIdToChange']['get'](_0x885749);}['_getViewForChange'](_0x3370a6){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x3370a6),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x554469,_0x5598a4,_0x194666,_0xbf56e1)=>{_0xbf56e1&&this['_balloon']['remove'](_0xbf56e1),_0x194666&&(this['_balloon']['add']({'view':_0x194666,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x7e8ec7=this['editor']['editing'],_0x59a1bd=this['_getChangeFromId'](_0x194666['changeId']);let _0x24085d;if(_0x59a1bd['data']['isOnRoot']){const _0x592771=_0x7e8ec7['view']['getDomRoot'](_0x59a1bd['rootName']);_0x24085d=Array['from'](_0x592771['getClientRects']());}else{const _0x25cb27=this['editor']['model']['markers']['get']('revision:'+_0x194666['changeId']);_0x24085d=Array['from'](_0x7e8ec7['mapper']['markerNameToElements'](_0x25cb27['name']))['map'](_0x491f83=>_0x7e8ec7['view']['domConverter']['mapViewToDom'](_0x491f83))['map'](_0x156668=>Array['from'](_0x156668['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x24085d[0x0];return _0x24085d['find'](_0x73705f=>_0x73705f['top']-0x3<=this['_activeViewTarget']['y']&&_0x73705f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x73705f['left']-0x3<=this['_activeViewTarget']['x']&&_0x73705f['right']+0x3>=this['_activeViewTarget']['x'])||_0x24085d[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5e51b3,_0x192cbf,_0x264ff6,_0x1d3440)=>{this['activeView']=_0x264ff6?this['_getViewForChange'](_0x264ff6):null,this['editor']['model']['change'](()=>{const _0x355411=this['editor']['editing'];_0x1d3440&&(_0x1d3440['data']['isOnRoot']?_0x355411['view']['change'](_0x132da0=>{_0x132da0['removeClass']('ck-revision-history-root--active',_0x355411['view']['document']['getRoot'](_0x1d3440['rootName']));}):_0x355411['reconvertMarker']('revision:'+_0x1d3440['id'])),_0x264ff6&&(_0x264ff6['data']['isOnRoot']?_0x355411['view']['change'](_0x14b8fd=>{_0x14b8fd['addClass']('ck-revision-history-root--active',_0x355411['view']['document']['getRoot'](_0x264ff6['rootName']));}):_0x355411['reconvertMarker']('revision:'+_0x264ff6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x17be40,_0x178727)=>{if(this['activeChange'])return;const _0x30a30b=this['_findChangeIdFromDomTarget'](_0x178727['target']),_0x1eca4f=this['_changeIdToChange']['get'](_0x30a30b);_0x1eca4f?(this['_activeViewTarget']={'x':_0x178727['domEvent']['x'],'y':_0x178727['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x1eca4f)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x42ec86,_0x4e722e)=>{const _0x5d299b=this['_findChangeIdFromDomTarget'](_0x4e722e['target']),_0x18740f=this['_changeIdToChange']['get'](_0x5d299b);_0x18740f?(this['_activeViewTarget']={'x':_0x4e722e['domEvent']['x'],'y':_0x4e722e['domEvent']['y']},_0x18740f===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x18740f):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0xaaf9b9){do{const _0x3ec264=_0xaaf9b9['getAttribute']('data-change-id');if(_0x3ec264)return _0x3ec264;_0xaaf9b9=_0xaaf9b9['parent'];}while(_0xaaf9b9);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5c696e=>{for(const _0x132158 of this['editor']['model']['markers'])_0x5c696e['removeMarker'](_0x132158);});}}function Z(_0x505026,_0x3a929e){return(_0x21afdc,_0x2a8936,_0x50f888)=>{if(!_0x50f888['consumable']['test'](_0x2a8936['markerRange'],_0x21afdc['name']))return;const _0x2e08a8=_0x2a8936['markerRange']['getWalker'](),_0x2ecbf6=_0x2a8936['markerRange']['start'],_0x52b16f=_0x505026['model']['schema'];let _0x4760b9=null,_0x54a04e=null,_0x15ee45=!0x1,_0x2d1ee5=!0x1;for(const _0x1351b9 of _0x2e08a8){const _0x3b0865=_0x1351b9['item'];_0x15ee45=_0x15ee45||_0x52b16f['isContent'](_0x3b0865);const _0x5dfbbf=_0x50f888['mapper']['toViewElement'](_0x3b0865);if(_0x5dfbbf&&_0x5dfbbf['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1351b9['type']&&(_0x52b16f['isBlock'](_0x3b0865)&&!_0x52b16f['isLimit'](_0x3b0865)&&(_0x3b0865['nextSibling']||_0x2ecbf6['isAtEnd']?_0x4760b9&&_0x4760b9['parent']==_0x3b0865||(_0x4760b9=_0x3b0865,_0x78f883(_0x1351b9['previousPosition']),_0x2d1ee5=!0x0):_0x54a04e=_0x54a04e||_0x1351b9['previousPosition']));}function _0x78f883(_0xd980bb){const _0xc3c57a=_0x50f888['mapper']['toViewPosition'](_0xd980bb),_0x2a1e7a=_0x50f888['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3a929e});_0x50f888['writer']['insert'](_0xc3c57a,_0x2a1e7a),_0x50f888['mapper']['bindElementToMarker'](_0x2a1e7a,_0x2a8936['markerName']);}_0x15ee45||_0x2d1ee5||!_0x54a04e||_0x78f883(_0x54a04e);};}class _t extends _0x3b1154{constructor(_0x5a1db3){super(_0x5a1db3);const _0xe885b0=_0x5a1db3['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0xe885b0,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xe885b0,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x1d29cf=this['editor'],_0x1e6dbb=_0x1d29cf['plugins']['get'](d),_0x6851e0=_0x1e6dbb['isReady']?_0x1e6dbb['diff']['newRevisionId']:null;_0x1d29cf['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x6851e0);}['refresh'](){const {isReady:_0x56a2b1,isEnabled:_0x52669d,repository:_0x429020,diff:_0x206c08}=this['editor']['plugins']['get'](d),_0x3d62bd=_0x206c08&&_0x429020['getLaterVisibleRevision'](_0x206c08['newRevisionId']);this['isEnabled']=_0x56a2b1&&_0x52669d&&Boolean(_0x3d62bd);}}class yt extends _0x3b1154{['_step'];constructor(_0x598815,{direction:_0x10633c}){super(_0x598815);const _0x1c1ce5=_0x598815['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x10633c?0x1:-0x1,this['listenTo'](_0x1c1ce5,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1c1ce5,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1c1ce5,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x111d23=this['editor'],_0x2be752=_0x111d23['plugins']['get'](d),{isNavigationMode:_0x1fdfa6,currentChangeNumber:_0x394764}=_0x2be752;let _0x1dde81;if(_0x2be752['activeChange']=_0x1fdfa6?_0x2be752['diff']['changes']['get'](_0x394764+this['_step']):_0x2be752['diff']['changes']['first'],_0x2be752['activeChange']['data']['isOnRoot'])_0x1dde81=_0x111d23['editing']['view']['getDomRoot'](_0x2be752['activeChange']['rootName']);else{const _0x46ad44=_0x111d23['model']['markers']['get']('revision:'+_0x2be752['activeChange']['id']);_0x1dde81=_0x12bc2a(_0x111d23['editing'],_0x46ad44);}_0x2cff1f({'target':_0x1dde81,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x7e4cee,currentChangeNumber:_0x136232,numberOfChanges:_0x28dbc8,isReady:_0x31913b,isEnabled:_0x1ef84a}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x1ef84a&&_0x31913b&&_0x28dbc8)&&(!_0x7e4cee||(0x1===this['_step']?_0x136232<_0x28dbc8-0x1:_0x136232>0x0));}}class _i extends _0x3438c0{constructor(_0x5c0969){super(_0x5c0969);const _0x213a46=this['bindTemplate'],_0x5ad439=new _0x1cfe19(_0x5c0969),_0x52d226=new _0x1cfe19(_0x5c0969);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',(_0x1ecf3c,_0x1da9c1)=>_0x1ecf3c&&_0x1da9c1>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x42fd21,_0x2e0d32,_0x27e4d5,_0x486849)=>{if(!_0x42fd21)return m(_0x5c0969,'Loading...');if(!_0x27e4d5)return m(_0x5c0969,'No\x20changes');const _0x397fcc=m(_0x5c0969,'NUMBER_OF_CHANGES',_0x27e4d5);return _0x486849?m(_0x5c0969,'X_OF_Y_CHANGES',[_0x2e0d32+0x1,_0x27e4d5]):_0x397fcc;}),_0x5ad439['set']({'label':m(_0x5c0969,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x20e947}),_0x52d226['set']({'label':m(_0x5c0969,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2efc78}),_0x5ad439['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x52d226['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5ad439['on']('execute',()=>this['fire']('execute','backward')),_0x52d226['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',_0x213a46['if']('_isStatusLabelVisible','ck-hidden',_0x56889e=>!_0x56889e)]},'children':[{'text':_0x213a46['to']('isNavigationMode',_0x5ab27f=>_0x5ab27f?m(_0x5c0969,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x5c0969,'Total')+':\x20')}]},{'text':_0x213a46['to']('_statusText')}]},new _0x139776(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5ad439,_0x52d226]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x19eb44{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5566e2=this['editor']['editing']['view'];_0x5566e2['change'](_0x3d938c=>{for(const _0x58f2bb of _0x5566e2['document']['roots'])_0x3d938c['addClass'](ce,_0x58f2bb);});}['hide'](){const _0xafec11=this['editor']['editing']['view'];_0xafec11['change'](_0x1804d3=>{for(const _0x2c17f0 of _0xafec11['document']['roots'])_0x1804d3['removeClass'](ce,_0x2c17f0);});}}class w extends _0x19eb44{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x36ed8e=this['editor'],_0x3efd1e=_0x36ed8e['plugins']['get'](d),_0x2414f8=_0x36ed8e['plugins']['get'](le);_0x36ed8e['ui']['componentFactory']['add']('exitToEditing',_0xe37b4a=>{const _0x5a188b=new _0x1cfe19(_0xe37b4a);return _0x5a188b['set']({'label':m(_0xe37b4a,'Back\x20to\x20editing'),'icon':_0x520d6c,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5a188b,'execute',()=>{_0x36ed8e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5a188b;}),_0x36ed8e['ui']['componentFactory']['add']('restoreRevision',_0x490948=>{const _0x179869=new _0x1cfe19(_0x490948);return _0x179869['set']({'label':m(_0x490948,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x179869['bind']('isEnabled')['to'](_0x36ed8e['commands']['get']('restoreRevision')),this['listenTo'](_0x179869,'execute',()=>_0x36ed8e['execute']('restoreRevision')),_0x179869;}),_0x36ed8e['ui']['componentFactory']['add']('changesNavigation',_0x34ed44=>{const _0x18e3e0=new _i(_0x34ed44),_0x32c54d=_0x36ed8e['commands']['get']('showPreviousChange'),_0xd3f57d=_0x36ed8e['commands']['get']('showNextChange');return _0x18e3e0['bind']('isBackwardNavigationEnabled')['to'](_0x32c54d,'isEnabled'),_0x18e3e0['bind']('isForwardNavigationEnabled')['to'](_0xd3f57d,'isEnabled'),_0x18e3e0['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3efd1e),this['listenTo'](_0x18e3e0,'execute',(_0x59bf43,_0x2d64ab)=>{_0x36ed8e['execute']('forward'===_0x2d64ab?'showNextChange':'showPreviousChange');}),_0x18e3e0;}),_0x2414f8['show'](),_0x3efd1e['on']('change:isReady',(_0x592f0a,_0x3bff0d,_0x59c736)=>{_0x59c736?_0x2414f8['hide']():_0x2414f8['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x338227,_0x3b98a1){super(_0x338227,_0x3b98a1);const _0x9bf87f=this['bindTemplate'];this['set']({'label':m(_0x338227,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x338227,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x9bf87f['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4424a6=this['fieldView']['element'];this['_tooltipString']=_0x4424a6['scrollWidth']>_0x4424a6['clientWidth']&&_0x4424a6['value']||'';}}class oi extends _0x3438c0{constructor(_0x4e5e72,_0x800377,_0x205423){super(_0x4e5e72);const _0x2febbf=new _0x2b6dd8();_0x2febbf['set']({'content':_0x14a93e,'viewBox':'0\x200\x2011\x2010'});const _0x171cb9=['ck','ck-revision-history-sidebar__revision-author'];_0x205423&&_0x171cb9['push']('ck-revision-history-sidebar__revision-author_creator');const _0x111330=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x4e5e72,_0x205423?'Revision\x20creator':'Revision\x20author')},'children':[_0x2febbf,_0x800377['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x171cb9},'children':_0x111330});}}function ni(_0x3d4233,_0x5a2b96){const _0x5484ac=_0x3d4233['bindTemplate'],_0x5a8880=_0x3d4233['locale'],_0x5e669d=_0x36390b(_0x5a8880);_0x5e669d['panelPosition']='sw';const _0x589c7a=function(_0x4f9356,_0xd6128c){const _0x4276fe=function(_0x21da80,_0x1ae8b1){const _0x1fb953=_0x21da80['locale'],_0x196cab={'Compare\x20against\x20selected':m(_0x1fb953,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x1fb953,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x1fb953,'Restore\x20this\x20revision')};return _0x1ae8b1['map'](_0x172e77=>{const _0x3d60c1=_0x196cab[_0x172e77['name']];return _0x3d60c1&&_0x3d60c1!==_0x172e77['name']&&(_0x172e77['name']=_0x3d60c1),_0x172e77;});}(_0x4f9356,_0xd6128c),_0xca437=new _0x1caf96();for(const _0x2799a0 of _0x4276fe){const _0x262887={'type':'button','model':new to({'label':_0x2799a0['name'],'class':_0x2799a0['class'],'withText':!0x0,'role':'menuitem','_action':_0x2799a0['action']})};_0x262887['model']['bind']('isEnabled')['to'](_0x4f9356,'isActionsDropdownOpen',_0x55b986=>'function'!=typeof _0x2799a0['isEnabled']||(!_0x55b986||_0x2799a0['isEnabled'](_0x4f9356))),_0xca437['add'](_0x262887);}return _0xca437;}(_0x3d4233,_0x5a2b96);return _0x3d4233['bind']('isActionsDropdownOpen')['to'](_0x5e669d,'isOpen'),_0x5e669d['buttonView']['set']({'label':m(_0x5a8880,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x28e837}),_0x5e669d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5484ac['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5484ac['to'](_0x2c651a=>_0x2c651a['stopPropagation']())}}),_0x5e669d['on']('execute',_0x4f8475=>{_0x3d4233['isReady']&&'function'==typeof _0x4f8475['source']['_action']&&_0x4f8475['source']['_action'](_0x3d4233);}),_0x59951c(_0x5e669d,_0x589c7a,{'role':'menu'}),_0x5e669d['listenTo'](_0x3d4233,'change:isActionsDropdownOpen',(_0x40254b,_0x3e0630,_0x3e7a6d)=>{if(_0x3e7a6d)for(const _0x4b4492 of _0x5e669d['listView']['items']){const _0xc12c1f=_0x4b4492['children']['first'],_0x3fa91b=_0x5a2b96['find'](_0x587d14=>_0x587d14['action']===_0xc12c1f['_action'])['isVisible'];_0x4b4492['isVisible']=void 0x0===_0x3fa91b||_0x3fa91b(_0x3d4233);}}),_0x5e669d;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x4fadb4,uid as _0x1dea48,Collection as _0x51fd93,logWarning as _0x44fa10,FocusTracker as _0x46ccc1,KeystrokeHandler as _0x5eeff1,scrollViewportToShowTarget as _0x41c46c,ResizeObserver as at,ElementReplacer as ht,CKEditorError as _0x404937}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0xfcbe04,set as _0x4dbb0a,unset as _0x11b2af,isEqual as _0x30c282}from'lodash-es';import{Plugin as _0x31843e,PendingActions as _0x357fc4,icons as _0x298223,Command as _0x108b4a,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x51111e,getMarkerDomElement as _0x434e89,ConfirmMixin as _0x5d4ea8,sanitizeEditorConfig as _0x381ab5}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x257c91,Element as ft,Range as vt,ViewUIElement as _0xbedaeb,ViewRawElement as _0x59e6eb,ViewEmptyElement as _0x4d5e80,ViewAttributeElement as _0x109915,ViewContainerElement as _0x268163,Position as gt,ViewText as _0x14b1c0,ViewElement as _0x1818ed,DocumentFragment as mt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as _0x4baf58,injectCssTransitionDisabler as ts,submitHandler as _0x14407a,LabeledFieldView as nt,createLabeledInputText as _0x1ac3e9,createDropdown as _0x30f2d2,ListView as te,ListItemView as _0x1727aa,ButtonView as _0xc6db79,MenuBarMenuView as _0x1070d5,MenuBarMenuListView as _0x3c6fa4,MenuBarMenuListItemView as _0x461fde,MenuBarMenuListItemButtonView as _0x578c8b,ContextualBalloon as _0x57f8c8,ToolbarSeparatorView as _0x435bd2,IconView as _0x4fddcf,addListToDropdown as _0x1b0e10,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x3808df}from'luxon';class a extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4fadb4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x58701d){super(),this['id']=_0x58701d['id']||_0x1dea48(),this['creator']=_0x58701d['creator']||null,this['authors']=_0x58701d['authors']||[],this['diffData']=_0x58701d['diffData']||null,this['toVersion']=_0x58701d['toVersion']||0x0,this['fromVersion']=_0x58701d['fromVersion']||0x0,this['set']('name',_0x58701d['name']||''),this['set']('createdAt',_0x58701d['createdAt']||new Date()),this['set']('attributes',_0x58701d['attributes']||{});}['setName'](_0x4c33f2){this['_update']({'name':_0x4c33f2});}['setAttribute'](_0x25e7e7,_0x5b8eed){const _0x47f51b=_0xfcbe04(this['attributes']);_0x4dbb0a(_0x47f51b,_0x25e7e7,_0x5b8eed),this['_update']({'attributes':_0x47f51b});}['removeAttribute'](_0x23a134){const _0x172853=_0xfcbe04(this['attributes']);_0x11b2af(_0x172853,_0x23a134),this['_update']({'attributes':_0x172853});}['_update'](_0x35eb79,_0x23f074=!0x1){let _0x188890=!0x1;const _0xbc3532={'id':this['id']},_0x6b96ff=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x316728 of _0x6b96ff){const _0xaa5d27=_0x35eb79[_0x316728];void 0x0!==_0xaa5d27&&_0xaa5d27!==this[_0x316728]&&(this[_0x316728]=_0xaa5d27,_0xbc3532[_0x316728]=_0xaa5d27,_0x188890=!0x0);}_0x188890&&(_0xbc3532['authors']&&(_0xbc3532['authorsIds']=_0xbc3532['authors']['map'](_0x4a30e5=>_0x4a30e5['id']),delete _0xbc3532['authors']),this['fire']('_update',_0xbc3532,_0x23f074));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x405e16=>_0x405e16['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x31843e{['_revisions'];static get['requires'](){return[_0x51111e];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x7ce9ec){super(_0x7ce9ec),this['_revisions']=new _0x51fd93();}['afterInit'](){!async function(_0x552545){const _0x330292=_0x4bef49([0x73,0x44,0x77,0x42,0x53,0x39,0x67,0x48,0x6b,0x57,0x76,0x6a,0x58,0x7a,0x52,0x4b,0x63,0x55,0x4f,0x79,0x34,0x65,0x64,0x35,0x46,0x61,0x4d,0x6f,0x31,0x71,0x59,0x6c,0x49,0x6e,0x56,0x69,0x70,0x62,0x68,0x6d,0x38,0x78,0x43,0x36,0x66,0x51,0x33,0x47,0x74,0x37,0x4a,0x4c,0x30,0x41,0x50,0x72,0x4e,0x32,0x75,0x54,0x5a,0x45]),_0x2c32a2=0xeb829,_0x4ab1c8=0x352d1290,_0x30edfb=0x352a7258^_0x4ab1c8,_0x2ee8a9=window[_0x4bef49([0x44,0x61,0x74,0x65])][_0x4bef49([0x6e,0x6f,0x77])](),_0x319a53=_0x552545[_0x4bef49([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x26e14d=new window[(_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ec52b=>{_0x319a53[_0x4bef49([0x6f,0x6e,0x63,0x65])](_0x4bef49([0x72,0x65,0x61,0x64,0x79]),_0x1ec52b);}),_0x5f4b0a={[_0x4bef49([0x6b,0x74,0x79])]:_0x4bef49([0x45,0x43]),[_0x4bef49([0x75,0x73,0x65])]:_0x4bef49([0x73,0x69,0x67]),[_0x4bef49([0x63,0x72,0x76])]:_0x4bef49([0x50,0x2d,0x32,0x35,0x36]),[_0x4bef49([0x78])]:_0x4bef49([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]),[_0x4bef49([0x79])]:_0x4bef49([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]),[_0x4bef49([0x61,0x6c,0x67])]:_0x4bef49([0x45,0x53,0x32,0x35,0x36])},_0x5359d2=_0x319a53[_0x4bef49([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4bef49([0x67,0x65,0x74])](_0x4bef49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x110e40(){let _0x2b1134,_0x5143e9=null,_0x1a3b84=null;try{if(_0x5359d2==_0x4bef49([0x47,0x50,0x4c]))return _0x4bef49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2b1134=_0xa0567e(),!_0x2b1134)return _0x4bef49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2b1134[_0x4bef49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1a3b84=_0x279cee(_0x2b1134[_0x4bef49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2b1134[_0x4bef49([0x6a,0x74,0x69])])),await _0x21ab68()?_0x3c5ed3()?_0x550739()?_0x4bef49([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x93281e()?(_0x2b1134[_0x4bef49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4bef49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5143e9=_0xaac113(_0x4bef49([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2b1134[_0x4bef49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4bef49([0x74,0x72,0x69,0x61,0x6c])&&(_0x5143e9=_0xaac113(_0x4bef49([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xe80bc2()):_0x4bef49([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4bef49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4bef49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3d3c77){return _0x4bef49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x550739(){const _0xff93ea=[_0x4bef49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4bef49([0x74,0x72,0x69,0x61,0x6c])][_0x4bef49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b1134[_0x4bef49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2ee8a9/0x3e8:0xe10*_0x30edfb;return _0x2b1134[_0x4bef49([0x65,0x78,0x70])]<_0xff93ea;}function _0x3c5ed3(){const _0x8f4455=_0x2b1134[_0x4bef49([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x8f4455)return!0x1;if(_0x8f4455[_0x4bef49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bef49([0x2a])))return!0x0;if(_0x8f4455[_0x4bef49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bef49([0x52,0x48])))return!0x0;if(_0x8f4455[_0x4bef49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bef49([0x52,0x52,0x48]))){if(_0x2fea20())return!0x0;if(_0x4398a9()||_0x19ecc7())return!0x0;}return!0x1;}function _0x93281e(){const _0x30fce4=_0x2b1134[_0x4bef49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x30fce4||0x0==_0x30fce4[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4d38c5}=new URL(window[_0x4bef49([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x30fce4[_0x4bef49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d38c5))return!0x0;const _0x4956c4=_0x4d38c5[_0x4bef49([0x73,0x70,0x6c,0x69,0x74])](_0x4bef49([0x2e]));return _0x30fce4[_0x4bef49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x381eb8=>_0x381eb8[_0x4bef49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bef49([0x2a])))[_0x4bef49([0x6d,0x61,0x70])](_0x23b557=>_0x23b557[_0x4bef49([0x73,0x70,0x6c,0x69,0x74])](_0x4bef49([0x2e])))[_0x4bef49([0x73,0x6f,0x6d,0x65])](_0x3d1d04=>_0x4956c4[_0x4bef49([0x65,0x76,0x65,0x72,0x79])]((_0x288acf,_0x3c0329)=>_0x3d1d04[_0x3c0329]===_0x288acf||_0x3d1d04[_0x3c0329]===_0x4bef49([0x2a])));}function _0xe80bc2(){return _0x5143e9&&_0x1a3b84?new window[(_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3de408,_0x3705e1)=>{_0x5143e9[_0x4bef49([0x74,0x68,0x65,0x6e])](_0x3de408,_0x3705e1),_0x1a3b84[_0x4bef49([0x74,0x68,0x65,0x6e])](_0x5df724=>{_0x5df724!=_0x4bef49([0x56,0x61,0x6c,0x69,0x64])&&_0x3de408(_0x5df724);},_0x3705e1);}):_0x5143e9||_0x1a3b84||_0x4bef49([0x56,0x61,0x6c,0x69,0x64]);}}function _0x279cee(_0x438340,_0xb65b6b){return new window[(_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d67d4=>{if(_0x26d7fe())return _0x5d67d4(_0x4bef49([0x56,0x61,0x6c,0x69,0x64]));_0x1b7b35(),_0x319a53[_0x4bef49([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4bef49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3d9ae8=!0x1;const _0x54e473=_0x1dea48();function _0x40f729(_0x5892ee){return!!_0x5892ee&&(typeof _0x5892ee===_0x4bef49([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5892ee===_0x4bef49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5892ee[_0x4bef49([0x74,0x68,0x65,0x6e])]===_0x4bef49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5892ee[_0x4bef49([0x63,0x61,0x74,0x63,0x68])]===_0x4bef49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x249960(_0x46179c){_0x288c3e(_0x46179c)[_0x4bef49([0x74,0x68,0x65,0x6e])](_0x506c34=>{if(!_0x506c34||_0x506c34[_0x4bef49([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4bef49([0x6f,0x6b]))return _0x4bef49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5027f4(_0x5a49e8(_0x54e473+_0xb65b6b))!=_0x506c34[_0x4bef49([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4bef49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4bef49([0x56,0x61,0x6c,0x69,0x64]);})[_0x4bef49([0x74,0x68,0x65,0x6e])](_0x5618da=>(_0x464797(),_0x5618da),()=>{const _0xd6401d=_0x49f8ea();return null==_0xd6401d?(_0x464797(),_0x4bef49([0x56,0x61,0x6c,0x69,0x64])):_0x4bef49(_0x2ee8a9-_0xd6401d>(0x11219690^_0x4ab1c8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4bef49([0x74,0x68,0x65,0x6e])](_0x5d67d4)[_0x4bef49([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5d67d4(_0x4bef49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd0e2e7=0x351bfc10^_0x4ab1c8;function _0x464797(){const _0x2ffa9a=_0x4bef49([0x6c,0x6c,0x63,0x74,0x2d])+_0x5027f4(_0x5a49e8(_0x438340)),_0x6ff8d1=_0x25d968(_0x5027f4(window[_0x4bef49([0x4d,0x61,0x74,0x68])][_0x4bef49([0x63,0x65,0x69,0x6c])](_0x2ee8a9/_0xd0e2e7)));window[_0x4bef49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4bef49([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ffa9a,_0x6ff8d1);}function _0x49f8ea(){const _0x70a839=_0x4bef49([0x6c,0x6c,0x63,0x74,0x2d])+_0x5027f4(_0x5a49e8(_0x438340)),_0x512504=window[_0x4bef49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4bef49([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x70a839);return _0x512504?window[_0x4bef49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25d968(_0x512504),0x10)*_0xd0e2e7:null;}function _0x288c3e(_0x457707){return new window[(_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47d42d,_0x466a4b)=>{_0x457707[_0x4bef49([0x74,0x68,0x65,0x6e])](_0x47d42d,_0x466a4b),window[_0x4bef49([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x466a4b,0x352cc650^_0x4ab1c8);});}}_0x319a53[_0x4bef49([0x6f,0x6e])](_0x4bef49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x52d64a,_0xbecfca)=>{if(_0xbecfca[0x0]!=_0x438340)return _0x5d67d4(_0x4bef49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xbecfca[0x1]={..._0xbecfca[0x1],[_0x4bef49([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x54e473};},{[_0x4bef49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4bef49([0x68,0x69,0x67,0x68])}),_0x319a53[_0x4bef49([0x6f,0x6e])](_0x4bef49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3574c4=>{_0x40f729(_0x3574c4[_0x4bef49([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3d9ae8=!0x0,_0x249960(_0x3574c4[_0x4bef49([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4bef49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4bef49([0x6c,0x6f,0x77])}),_0x26e14d[_0x4bef49([0x74,0x68,0x65,0x6e])](()=>{_0x3d9ae8||_0x5d67d4(_0x4bef49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x26d7fe(){return _0x319a53[_0x4bef49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4bef49([0x76,0x69,0x65,0x77])][_0x4bef49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4bef49([0x61,0x75,0x74,0x6f]);}function _0x1b7b35(){_0x319a53[_0x4bef49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4bef49([0x76,0x69,0x65,0x77])][_0x4bef49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4bef49([0x61,0x75,0x74,0x6f]);}}function _0xaac113(_0x5799de){const _0x1f6fba=[new window[(_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c4cf4=>setTimeout(_0x2c4cf4,0x35242c5c^_0x4ab1c8)),_0x26e14d[_0x4bef49([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1314ac=>{const _0x39e6d9=0x352d1297^_0x4ab1c8,_0x58ad39=_0x552545[_0x4bef49([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x59b687(){_0x58ad39[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x39e6d9&&_0x1314ac();}_0x59b687(),_0x58ad39[_0x4bef49([0x6f,0x6e])](_0x4bef49([0x61,0x64,0x64]),_0x59b687);})),new window[(_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x29234a=>{function _0x48e669(){for(const _0x499016 in window)if(window[_0x4bef49([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4bef49([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x499016))&&window[_0x499016]==_0x2c32a2)return _0x29234a();_0x319a53[_0x4bef49([0x73,0x74,0x61,0x74,0x65])]!=_0x4bef49([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4bef49([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x48e669,0x352d0118^_0x4ab1c8);}_0x5cc829(_0x4bef49([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x48e669();})];return window[_0x4bef49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4bef49([0x72,0x61,0x63,0x65])](_0x1f6fba)[_0x4bef49([0x74,0x68,0x65,0x6e])](()=>_0x5799de);}async function _0x4b813e(){if(await _0x26e14d,_0x5cc829(_0x4bef49([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x32adcc=_0x552545[_0x4bef49([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x9a0bdb=_0x552545[_0x4bef49([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])](_0x32adcc[_0x4bef49([0x69,0x64])]),_0x16b746=_0x19c5bc(_0x4bef49([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x16b746[_0x4bef49([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x32adcc['id'],_0x9a0bdb?_0x9a0bdb['id']:null,!0x0),_0x16b746[_0x4bef49([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4bef49([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x16b746[_0x4bef49([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x16b746[_0x4bef49([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3bd092,void(_0x16b746[_0x4bef49([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3bd092);}if(_0x5cc829(_0x4bef49([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x3a43d9=_0x19c5bc(_0x4bef49([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x3a43d9[_0x4bef49([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4bef49([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3a43d9[_0x4bef49([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3a43d9[_0x4bef49([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3bd092,_0x3a43d9[_0x4bef49([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3bd092;}_0x319a53[_0x4bef49([0x6d,0x6f,0x64,0x65,0x6c])][_0x4bef49([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3bd092,_0x319a53[_0x4bef49([0x6d,0x6f,0x64,0x65,0x6c])][_0x4bef49([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3bd092,_0x319a53[_0x4bef49([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4bef49([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2fea20(){return _0x5cc829(_0x4bef49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x19c5bc(_0x4bef49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4bef49([0x73,0x74,0x61,0x74,0x65])]==_0x4bef49([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4398a9(){return _0x5cc829(_0x4bef49([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 _0x19ecc7(){return _0x5cc829(_0x4bef49([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x200819(_0x1c0def){const _0x43cc22=_0x537878();_0x319a53[_0x43cc22]=_0x4bef49([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])+_0x1c0def,_0x1c0def[_0x4bef49([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4bef49([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x537878()]=_0x2c32a2),_0x1c0def!=_0x4bef49([0x56,0x61,0x6c,0x69,0x64])&&_0x4b813e();}function _0x537878(){const _0x592512=window[_0x4bef49([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4bef49([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4bef49([0x6e,0x6f,0x77])]())[_0x4bef49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4bef49([0x2e]),'');let _0x5f31d5=_0x4bef49([0x73]);for(let _0x410b4b=0x0;_0x410b4b<_0x592512[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x410b4b+=0x2){let _0x86e8e4=window[_0x4bef49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x592512[_0x4bef49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x410b4b,_0x410b4b+0x2));_0x86e8e4>=_0x330292[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x86e8e4-=_0x330292[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5f31d5+=_0x330292[_0x86e8e4];}return _0x5f31d5;}function _0xa0567e(){const _0x3fac7f=_0x5359d2[_0x4bef49([0x73,0x70,0x6c,0x69,0x74])](_0x4bef49([0x2e]));if(0x3!=_0x3fac7f[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2fb09a(_0x3fac7f[0x1]);function _0x2fb09a(_0x2a4a82){const _0x13acd9=_0x23029f(_0x2a4a82);return _0x13acd9&&_0x11a7e0()?_0x13acd9:null;function _0x11a7e0(){const _0x4f5afe=_0x13acd9[_0x4bef49([0x6a,0x74,0x69])],_0x4a372c=window[_0x4bef49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f5afe[_0x4bef49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f5afe[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x356e1c={..._0x13acd9,[_0x4bef49([0x6a,0x74,0x69])]:_0x4f5afe[_0x4bef49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f5afe[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x356e1c[_0x4bef49([0x76,0x63])],_0x5a49e8(_0x356e1c)==_0x4a372c;}}}async function _0x21ab68(){let _0x5b1969=!0x0;try{const _0x4ef32d=_0x5359d2[_0x4bef49([0x73,0x70,0x6c,0x69,0x74])](_0x4bef49([0x2e])),[_0x5b0adf,_0xc6d72b,_0x16161c]=_0x4ef32d;return _0x584462(_0x5b0adf),await _0x29dca2(_0x5b0adf,_0xc6d72b,_0x16161c),_0x5b1969;}catch(_0x54705a){return!0x1;}function _0x584462(_0x2d9772){const _0x141749=_0x23029f(_0x2d9772);_0x141749&&_0x141749[_0x4bef49([0x61,0x6c,0x67])]==_0x4bef49([0x45,0x53,0x32,0x35,0x36])||(_0x5b1969=!0x1);}async function _0x29dca2(_0x4aa455,_0x44ac96,_0x52e3c7){const _0x52f6d2=window[_0x4bef49([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4bef49([0x66,0x72,0x6f,0x6d])](_0xc64323(_0x52e3c7),_0xa06c09=>_0xa06c09[_0x4bef49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x48a3e5=new window[(_0x4bef49([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4bef49([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4aa455+_0x4bef49([0x2e])+_0x44ac96),_0x614f54=window[_0x4bef49([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4bef49([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x614f54)return;const _0x173993=await _0x614f54[_0x4bef49([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4bef49([0x6a,0x77,0x6b]),_0x5f4b0a,{[_0x4bef49([0x6e,0x61,0x6d,0x65])]:_0x4bef49([0x45,0x43,0x44,0x53,0x41]),[_0x4bef49([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4bef49([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4bef49([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x614f54[_0x4bef49([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4bef49([0x6e,0x61,0x6d,0x65])]:_0x4bef49([0x45,0x43,0x44,0x53,0x41]),[_0x4bef49([0x68,0x61,0x73,0x68])]:{[_0x4bef49([0x6e,0x61,0x6d,0x65])]:_0x4bef49([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x173993,_0x52f6d2,_0x48a3e5)||(_0x5b1969=!0x1);}}function _0x23029f(_0x198ae0){return _0x198ae0[_0x4bef49([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4bef49([0x65,0x79]))?JSON[_0x4bef49([0x70,0x61,0x72,0x73,0x65])](_0xc64323(_0x198ae0)):null;}function _0xc64323(_0x488420){return window[_0x4bef49([0x61,0x74,0x6f,0x62])](_0x488420[_0x4bef49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4bef49([0x2b]))[_0x4bef49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4bef49([0x2f])));}function _0x5a49e8(_0xcea45){let _0x31319f=0x1505;function _0x4f2482(_0x20d577){for(let _0x39dfa8=0x0;_0x39dfa8<_0x20d577[_0x4bef49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x39dfa8++){const _0x1ceb0d=_0x20d577[_0x4bef49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x39dfa8);_0x31319f=(_0x31319f<<0x5)+_0x31319f+_0x1ceb0d,_0x31319f&=_0x31319f;}}function _0x3c5818(_0x26a52b){Array[_0x4bef49([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x26a52b)?_0x26a52b[_0x4bef49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3c5818):_0x26a52b&&typeof _0x26a52b==_0x4bef49([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4bef49([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x26a52b)[_0x4bef49([0x73,0x6f,0x72,0x74])]()[_0x4bef49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x20a41f,_0x3e2b58])=>{_0x4f2482(_0x20a41f),_0x3c5818(_0x3e2b58);}):_0x4f2482(window[_0x4bef49([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x26a52b));}return _0x3c5818(_0xcea45),_0x31319f>>>0x0;}function _0x5027f4(_0x51c7c2){return _0x51c7c2[_0x4bef49([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4bef49([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4bef49([0x30]));}function _0x25d968(_0x319e07){return _0x319e07[_0x4bef49([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4bef49([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4bef49([0x6a,0x6f,0x69,0x6e])]('');}function _0x5cc829(_0x4dc9b5){return _0x319a53[_0x4bef49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4bef49([0x68,0x61,0x73])](_0x4dc9b5);}function _0x19c5bc(_0x41a195){return _0x319a53[_0x4bef49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4bef49([0x67,0x65,0x74])](_0x41a195);}function _0x3bd092(){}function _0x4bef49(_0x47a1f5){return _0x47a1f5['map'](_0xed5b41=>String['fromCharCode'](_0xed5b41))['join']('');}_0x200819(await _0x110e40());}(this);}['createRevision'](_0x5b43db){const _0x1694b5=this['editor']['plugins']['get']('Users');return new a({'id':_0x5b43db['id'],'name':_0x5b43db['name'],'creator':_0x5b43db['creatorId']?_0x1694b5['getUser'](_0x5b43db['creatorId']):null,'diffData':_0x5b43db['diffData']||_0x5b43db['data'],'authors':_0x5b43db['authorsIds']['map'](_0x5bf7a8=>_0x1694b5['getUser'](_0x5bf7a8)),'createdAt':new Date(_0x5b43db['createdAt']),'attributes':_0x5b43db['attributes'],'fromVersion':_0x5b43db['fromVersion'],'toVersion':_0x5b43db['toVersion']});}['addRevision'](_0x190834,_0x1fb7b4=0x0){this['_revisions']['add'](_0x190834,_0x1fb7b4);}['getRevision'](_0x3c7c48){return this['_revisions']['get'](_0x3c7c48);}['getRevisions'](_0x5eda08={'toJSON':!0x1}){const _0x334f0d=Array['from'](this['_revisions']);return _0x334f0d['reverse'](),_0x5eda08['toJSON']?_0x334f0d['map'](_0x5c96e8=>_0x5c96e8['toJSON']()):_0x334f0d;}['getIndex'](_0x8a9a8c){return this['_revisions']['getIndex'](_0x8a9a8c);}['getEarlierVisibleRevision'](_0x3e8007){const [,_0x2aa484]=this['getRevisionsIterator'](_0x3e8007,{'direction':'earlier'});return _0x2aa484;}['getLaterVisibleRevision'](_0x2c66e6){const [,_0x140fa7]=this['getRevisionsIterator'](_0x2c66e6,{'direction':'later'});return _0x140fa7;}['getRevisionsInDiff'](_0x50b107){const _0x5f1846=[];for(const _0x709861 of this['getRevisionsIterator'](_0x50b107['newRevisionId']))if(_0x5f1846['push'](_0x709861),_0x709861['id']===_0x50b107['oldRevisionId'])break;return _0x5f1846;}*['getRevisionsIterator'](_0x5e3223,{direction:_0x1d39da='earlier',filter:_0x64023b=()=>!0x0}={}){const _0x4adffa='earlier'===_0x1d39da?0x1:-0x1;let _0x43aff4=this['_revisions']['get'](_0x5e3223),_0x29bf7f=this['getIndex'](_0x43aff4);for(yield _0x43aff4;_0x43aff4;){if(_0x29bf7f+=_0x4adffa,_0x43aff4=this['getRevision'](_0x29bf7f),!_0x43aff4)return;_0x64023b(_0x43aff4)&&(yield _0x43aff4);}}}function m(_0x896863,_0x44a14a,_0x321570){const t=_0x896863['t'];switch(_0x44a14a){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'},_0x321570);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x321570);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'';}}const P={'c':_0x268163,'a':_0x109915,'e':_0x4d5e80,'r':_0x59e6eb,'u':_0xbedaeb};class l extends _0x31843e{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x51111e,j,_0x357fc4];}constructor(_0x15abb7){super(_0x15abb7),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1b52e2=_0x1dea48();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1b52e2},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['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0xe7291b=this['repository']['getRevision'](0x0),_0x579244=_0xe7291b&&null===_0xe7291b['creator']?_0xe7291b:null;if(this['_continueCurrentRevision']=!!_0x579244&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x5d92b7=this['_source']['getCurrentRevisionId'](),_0x5385dd=this['repository']['getRevision'](_0x5d92b7);if(_0x5385dd)this['_startingVersion']=_0x5385dd['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x101afe=this['_source']['history']['_operations']['find'](_0xe3ff7a=>!_0xe3ff7a['_isInit']),_0x5b96c6=_0x101afe?_0x101afe['baseVersion']:this['_source']['history']['version'];_0xe7291b?(_0xe7291b['toVersion']<_0x5b96c6&&_0xe7291b['_update']({'toVersion':_0x5b96c6}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x579244['id'],this['_startingVersion']=_0x579244['fromVersion']):(this['_startingVersion']=_0xe7291b['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x5b96c6,this['_continueCurrentRevision']=!0x1);}}else _0x579244&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x579244['toVersion'],this['editor']['model']['document']['history']['version']),_0x579244['fromVersion']===_0x579244['toVersion']?(0x0!==_0x579244['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x579244['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x579244['id'],this['_startingVersion']=_0x579244['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',_0x985270=>!_0x985270),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x29f315=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x336097;for(const _0x1b74b9 in _0x29f315){const _0x4c02f4=_0x1b74b9,_0x3cff5f=_0x29f315[_0x4c02f4];if('revisionHistoryLicenseKeyValid'==_0x3cff5f||'revisionHistoryLicenseKeyInvalid'==_0x3cff5f||'revisionHistoryLicenseKeyExpired'==_0x3cff5f||'revisionHistoryLicenseKeyDomainLimit'==_0x3cff5f||'revisionHistoryLicenseKeyNotAllowed'==_0x3cff5f||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3cff5f||'revisionHistoryLicenseKeyTrialLimit'==_0x3cff5f||'revisionHistoryLicenseKeyUsageLimit'==_0x3cff5f){delete _0x29f315[_0x4c02f4],_0x336097=_0x3cff5f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x336097&&_0x29f315['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x336097&&_0x29f315['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x336097&&_0x29f315['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x336097&&_0x29f315['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x336097&&_0x29f315['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x336097&&_0x29f315['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x336097&&_0x29f315['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x56181d=this['repository']['getRevision'](0x0),_0x2dbcde=await this['getRevisionDocumentData'](_0x56181d),_0x243c2f=await this['getRevisionRootsAttributes'](_0x56181d);this['_replaceEditorDataWithRevisionData'](_0x2dbcde,_0x243c2f);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x458739){this['_source']=_0x458739;}async['update'](){const _0xb717e0=await this['_source']['getLatestVersion']();if(_0xb717e0>this['currentRevision']['toVersion']){await this['_loadState']();const _0x39dbe8=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0xb717e0});_0x39dbe8['authors']=_0x39dbe8['authorsIds']['map'](_0xbea850=>this['editor']['plugins']['get']('Users')['getUser'](_0xbea850)),this['currentRevision']['_update'](_0x39dbe8);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x2a5b92={},_0x5d7b60=null){const _0x3ccbc5=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x5d7b60>this['currentRevision']['toVersion']&&(_0x5d7b60=null),null===_0x5d7b60&&(_0x5d7b60=await this['_source']['getLatestVersion']());const _0x4f6146=this['_getFromVersion'](_0x5d7b60),_0x1efc3d=this['buildRevisionData']({'from':_0x4f6146,'to':_0x5d7b60});if(this['currentRevision']['toVersion']<_0x5d7b60){const _0x169659=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x5d7b60,'to':_0x5d7b60});_0x169659['authors']=[],_0x169659['authorsIds']=[],_0x169659['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x169659,!0x0),delete _0x169659['authors'],_0x3ccbc5['push'](_0x169659);}_0x2a5b92['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x2a5b92['name']=_0x2a5b92['name']||null,_0x2a5b92['id']=_0x2a5b92['id']||_0x1dea48(),_0x2a5b92={..._0x2a5b92,..._0x1efc3d};const _0x134956=this['addRevisionData'](_0x2a5b92);_0x3ccbc5['push'](_0x2a5b92);const _0x1fde83=this['repository']['getIndex'](_0x134956);if(0x0!==_0x1fde83){const _0x4af658=this['repository']['getRevision'](_0x1fde83-0x1);if(_0x4af658['fromVersion']!==_0x5d7b60){const _0x55ea57=this['_revisionDataBuilder']['getData'](_0x5d7b60,_0x4af658['toVersion']),_0x501cf0={'id':_0x4af658['id'],'diffData':_0x55ea57['diffData'],'authorsIds':_0x55ea57['authorsIds'],'authors':_0x55ea57['authorsIds']['map'](_0x26a86c=>this['editor']['plugins']['get']('Users')['getUser'](_0x26a86c)),'fromVersion':_0x5d7b60};_0x4af658===this['currentRevision']&&(_0x501cf0['createdAt']=new Date(_0x2a5b92['createdAt']['getTime']()+0xa)),_0x4af658['_update'](_0x501cf0,!0x0),delete _0x501cf0['authors'],_0x3ccbc5['push'](_0x501cf0);}}if(this['adapter']){for(const _0x5537d4 of _0x3ccbc5)this['_bufferUpdate'](_0x5537d4['id'],_0x5537d4,!0x0);this['sendBufferedUpdates']();}return _0x134956;}['addRevisionData'](_0xff8840){const _0x38fed9=this['repository']['createRevision'](_0xff8840);return this['adapter']&&_0x38fed9['on']('_update',(_0x5af8eb,_0x46d921,_0x33dd09)=>{_0x33dd09||(this['_bufferUpdate'](_0x46d921['id'],_0x46d921,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x38fed9,this['_findInsertionIndex'](_0x38fed9)),_0x38fed9;}async['getRevisionDocumentData'](_0x317f4e){await this['_loadRevisionData'](_0x317f4e);const _0x3c5add={};for(const _0x271d2a in _0x317f4e['diffData']){if(_0x317f4e['diffData'][_0x271d2a]['attachChange']&&!_0x317f4e['diffData'][_0x271d2a]['attachChange']['isAttached'])continue;const _0x563b6d=this['_removeRevisionMarkers'](JSON['parse'](_0x317f4e['diffData'][_0x271d2a]['insertions'])),_0x124488=this['editor']['editing']['view']['document'],_0x5a4585=new _0x257c91(_0x124488,_0x563b6d['map'](_0x52b2f8=>C(_0x52b2f8,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x3c5add[_0x271d2a]=this['editor']['data']['processor']['toData'](_0x5a4585),this['editor']['data']['processor']['useFillerType']('default');}return _0x3c5add;}async['getRevisionRootsAttributes'](_0x26ee8d){await this['_loadRevisionData'](_0x26ee8d);const _0x1949a7={};for(const _0x2c6264 in _0x26ee8d['diffData'])_0x26ee8d['diffData'][_0x2c6264]['attachChange']&&!_0x26ee8d['diffData'][_0x2c6264]['attachChange']['isAttached']||(_0x1949a7[_0x2c6264]=_0x26ee8d['diffData'][_0x2c6264]['attributesAfter']||{});return _0x1949a7;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1ac269=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1b347b=0x0;_0x1b347b<_0x1ac269['length'];_0x1b347b++){const _0x3eddc6=_0x1ac269[_0x1b347b];let _0x23a281=!0x1;for(const _0x43fa62 of Object['keys'](_0x3eddc6))void 0x0===_0x3eddc6[_0x43fa62]?delete _0x3eddc6[_0x43fa62]:'id'!==_0x43fa62&&(_0x23a281=!0x0);_0x23a281||(_0x1ac269[_0x1b347b]=null);}if(_0x1ac269=_0x1ac269['filter'](_0x174b96=>null!==_0x174b96),!_0x1ac269['length'])return;for(let _0x295c20=0x0;_0x295c20<_0x1ac269['length'];_0x295c20++){const _0x132990=_0x1ac269[_0x295c20];void 0x0!==_0x132990['fromVersion']&&void 0x0===_0x132990['toVersion']&&(_0x132990['toVersion']=this['repository']['getRevision'](_0x132990['id'])['toVersion']),void 0x0!==_0x132990['toVersion']&&void 0x0===_0x132990['fromVersion']&&(_0x132990['fromVersion']=this['repository']['getRevision'](_0x132990['id'])['fromVersion']);}const _0x4cb0bf=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1ac269,_0x4cb0bf)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x324a7a=>{if(_0x324a7a){for(const _0x24e6ba of _0x324a7a)this['setRevisionData']({'id':_0x24e6ba['id'],'createdAt':_0x24e6ba['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x1c8156,_0x3c194e){let _0x30903f=this['editor']['config']['get']('initialData'),_0x3bc4ed=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x30903f){_0x30903f={};for(const _0x12a9c3 of this['editor']['model']['document']['getRootNames']())_0x30903f[_0x12a9c3]='';}if('string'==typeof _0x30903f&&(_0x30903f={'main':_0x30903f}),void 0x0===_0x3bc4ed){_0x3bc4ed={};for(const _0x1bbafa of this['editor']['model']['document']['getRootNames']())_0x3bc4ed[_0x1bbafa]={};}let _0xefa4aa=!0x1;const _0x8aa936=Object['keys'](_0x30903f),_0x57ea6b=Object['keys'](_0x1c8156);for(const _0x127b5c of _0x8aa936){if(_0x30903f[_0x127b5c]!==_0x1c8156[_0x127b5c]&&''!==_0x30903f[_0x127b5c]['trim']()){_0xefa4aa=!0x0;break;}if(!_0x30c282(_0x3bc4ed[_0x127b5c],_0x3c194e[_0x127b5c])&&Object['keys'](_0x3bc4ed[_0x127b5c])['length']>0x0){_0xefa4aa=!0x0;break;}}_0xefa4aa||(_0xefa4aa=_0x57ea6b['some'](_0x171164=>!this['editor']['model']['document']['getRoot'](_0x171164))),_0xefa4aa&&_0x44fa10('editor-initial-data-replaced-with-revision-data',{'editorData':_0x30903f,'editorRootsAttributes':_0x3bc4ed,'revisionData':_0x1c8156,'revisionRootsAttributes':_0x3c194e}),this['editor']['config']['set']('initialData',_0x1c8156),this['editor']['config']['set']('rootsAttributes',_0x3c194e);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x566fe3=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x566fe3['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0xf99d4d){const _0x1c99a2=this['repository']['getRevisions']();_0x1c99a2['reverse']();let _0x4a4796=0x0;for(;_0x4a4796<_0x1c99a2['length'];){const _0x1e6bf6=_0x1c99a2[_0x4a4796];if(_0x1e6bf6===this['currentRevision']){_0x4a4796++;continue;}if(_0x1e6bf6['id']===this['_initialRevisionId'])break;const _0xb104ca=_0xf99d4d['toVersion']-_0x1e6bf6['toVersion']||_0xf99d4d['fromVersion']-_0x1e6bf6['fromVersion'];if(_0xb104ca>0x0)break;if(_0xb104ca<0x0)_0x4a4796++;else{if(!_0xf99d4d['creator']&&_0x1e6bf6['creator'])break;if(_0x1e6bf6['creator']||!_0xf99d4d['creator']){if(_0xf99d4d['createdAt']>_0x1e6bf6['createdAt'])break;_0x4a4796++;}else _0x4a4796++;}}return _0x4a4796;}['setRevisionData'](_0x50680b){const _0x3f0ee0=this['repository']['getRevision'](_0x50680b['id']);if(_0x50680b['createdAt']&&(_0x50680b['createdAt']=new Date(_0x50680b['createdAt'])),_0x50680b['authorsIds']){const _0xa4631d=this['editor']['plugins']['get']('Users');_0x50680b['authors']=_0x50680b['authorsIds']['map'](_0x10d16b=>_0xa4631d['getUser'](_0x10d16b));}_0x3f0ee0['_update'](_0x50680b,!0x0);}['buildRevisionData']({revision:_0x2dfade=null,from:_0x176a01=null,to:_0x1dd422=null}){_0x176a01=null!==_0x176a01?_0x176a01:_0x2dfade['fromVersion'],_0x1dd422=null!==_0x1dd422?_0x1dd422:_0x2dfade['toVersion'];const _0x2f35e3=this['_revisionDataBuilder']['getData'](_0x176a01,_0x1dd422),_0x541b26={'diffData':_0x2f35e3['diffData'],'authorsIds':_0x2f35e3['authorsIds'],'fromVersion':_0x176a01,'toVersion':_0x1dd422};if(!_0x2dfade||_0x1dd422!==_0x2dfade['toVersion']){const _0x311cd4=_0x1dd422-0x1,_0x44a2d4=this['_source']['history']['getOperation'](_0x311cd4);_0x541b26['createdAt']=_0x44a2d4&&_0x44a2d4['createdAt']||new Date();}if(this['_loadedStateData']&&_0x176a01===this['_loadedStateData']['fromVersion']){for(const _0x3b3bac of this['_loadedStateData']['authors'])_0x541b26['authorsIds']['includes'](_0x3b3bac['id'])||_0x541b26['authorsIds']['push'](_0x3b3bac['id']);}return _0x541b26;}['_loadRevisionData'](_0x136d29){if(!_0x136d29||_0x136d29['diffData'])return Promise['resolve']();{const _0x4a69b9=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x4a69b9,'revisionId':_0x136d29['id']})['then'](_0x114d21=>{_0x136d29['diffData']=_0x114d21['diffData'];});}}['_bufferUpdate'](_0x497eb6,_0x21a77a,_0x5654b5){if(this['_bufferedUpdates']['has'](_0x497eb6)){const _0x37a53a=this['_bufferedUpdates']['get'](_0x497eb6);_0x21a77a=_0x5654b5?{..._0x37a53a,..._0x21a77a}:{..._0x21a77a,..._0x37a53a};}this['_bufferedUpdates']['set'](_0x497eb6,_0x21a77a);}['_getFromVersion'](_0xe45172){const _0x5ba03a=this['repository']['getRevisions']();_0x5ba03a['reverse'](),_0x5ba03a['shift']();const _0x3e8e57=_0x5ba03a['find'](_0x4b8f46=>_0x4b8f46['toVersion']<=_0xe45172)['toVersion'];return _0x3e8e57<this['_startingVersion']?this['_startingVersion']:_0x3e8e57;}['_createInitialRevision'](_0x54ddfd){const _0x1539aa=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1539aa)this['_initialRevisionId']=_0x1539aa['id'];else{const _0x4aa13b=!this['editor']['model']['document']['roots']['find'](_0x9e385f=>this['editor']['model']['hasContent'](_0x9e385f)),_0x33d9c2=this['editor']['plugins']['get']('Users')['me']['id'],_0x4f6b29=m(this['editor']['locale'],_0x4aa13b?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x54ddfd,'to':_0x54ddfd,'id':this['_initialRevisionId'],'name':_0x4f6b29,'creatorId':_0x33d9c2});}}['_createCurrentRevision'](_0x1f8f06){const _0x4e4f6c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4e4f6c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1f8f06,'to':_0x1f8f06,'id':_0x4e4f6c,'name':'','creatorId':null}));}['_makeRevision']({name:_0x251b6f,from:_0x57ad7f,to:_0x22096c,creatorId:_0x57200d,id:_0xbb02d0}){const _0x3865c0=this['buildRevisionData']({'from':_0x57ad7f,'to':_0x22096c});_0x3865c0['name']=_0x251b6f,_0x3865c0['creatorId']=_0x57200d,_0x3865c0['id']=_0xbb02d0;const _0x22256b=this['addRevisionData'](_0x3865c0);return this['adapter']&&this['_bufferUpdate'](_0x3865c0['id'],_0x3865c0,!0x0),_0x22256b;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x5f481b){return(_0x5f481b=_0x5f481b['filter'](_0x1c2743=>!_0x1c2743['name']||'revision-start'!==_0x1c2743['name']&&'revision-end'!==_0x1c2743['name']))['forEach'](_0x216ccc=>{'string'!=typeof _0x216ccc&&(_0x216ccc['children']=this['_removeRevisionMarkers'](_0x216ccc['children']),_0x216ccc['attributes']=_0x216ccc['attributes']['filter'](_0x58cbf2=>!_0x58cbf2[0x0]['startsWith']('data-revision-')));}),_0x5f481b;}}function C(_0x3d251a,_0x2e26c4){const _0x301c46=_0x2e26c4['editing']['view']['document'];if('string'==typeof _0x3d251a)return new _0x14b1c0(_0x301c46,_0x3d251a);{const _0x30f721=_0x3d251a['children']['map'](_0x24f6be=>C(_0x24f6be,_0x2e26c4));return new(P[_0x3d251a['type']]||_0x1818ed)(_0x301c46,_0x3d251a['name'],_0x3d251a['attributes'],_0x30f721);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1fa3d6){this['editor']=_0x1fa3d6,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'](_0x37770d){this['source']=_0x37770d;const _0x47b714=new Map(),_0xb96a42=new Map(),_0x218fd0=this['editor']['model']['document']['roots']['map'](_0x3ff0d7=>_0x3ff0d7['rootName']);for(const _0x2b8383 of _0x218fd0){const _0x365643=this['editor']['model']['document']['getRoot'](_0x2b8383),_0x40666c=T(_0x365643);_0x47b714['set'](_0x2b8383,_0x40666c),_0xb96a42['set'](_0x2b8383,Object['fromEntries'](_0x365643['getAttributes']()));}const _0x58d579=Array['from'](this['editor']['model']['markers'])['map'](_0xb02fb0=>[_0xb02fb0['name'],_0xb02fb0['getRange']()]),_0x4fa28a=this['source']['version'];this['_saveMetaData'](_0x4fa28a,_0x47b714,_0x58d579,_0xb96a42),this['_startingRevisionId']=this['_revisionId'];const _0x926163=new Map(),_0x4036ed=new Map();for(const _0x190996 of _0x218fd0){const _0x461a82=F(_0x190996);_0x926163['set'](_0x190996,_0x461a82),_0x4036ed['set'](_0x190996,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x926163,[],_0x4036ed);}['getData'](_0xf62f7a,_0x528a3f){if(this['_lastFrom']===_0xf62f7a&&this['_lastTo']<=_0x528a3f)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x528a3f,!0x0);else{if(!this['_savedMetaData']['has'](_0xf62f7a)){const _0x27ae06=this['_getPreviousFrom'](_0xf62f7a);this['_calculateMetaData'](_0x27ae06,_0xf62f7a,!0x1);}this['_calculateMetaData'](_0xf62f7a,_0x528a3f,!0x0);}return this['_lastFrom']=_0xf62f7a,this['_lastTo']=_0x528a3f,this['_getState']();}['loadState'](_0x16321f){this['_reset'](),this['_lastFrom']=_0x16321f['fromVersion'],this['_lastTo']=_0x16321f['toVersion'];for(const _0x3bd62d in _0x16321f['diffData']){const _0x1405fc=_0x16321f['diffData'][_0x3bd62d]['attachChange'],_0x22d74b=_0xfcbe04(_0x16321f['diffData'][_0x3bd62d]['attributesBefore'])||{},_0x308bff=this['_makeModelFromViewString'](_0x16321f['diffData'][_0x3bd62d]['deletions']);_0x308bff['rootName']=_0x3bd62d,_0x308bff['_isAttached']=!_0x1405fc||!_0x1405fc['isAttached'],_0x308bff['isAttached']=()=>_0x308bff['_isAttached'],this['_baseRoots']['set'](_0x3bd62d,_0x308bff),this['_baseRootsAttributes']['set'](_0x3bd62d,_0x22d74b),_0x1405fc&&this['_touchedRoots']['set'](_0x3bd62d,_0x1405fc);const _0x6321b=this['_makeIdsRoot'](_0x308bff);this['_baseIdsRoots']['set'](_0x3bd62d,_0x6321b);for(const [_0x2e5290,_0x1e6e7f]of _0x308bff['markers']){if(!_0x2e5290['startsWith']('revision:'))continue;const _0x218056=_0x2e5290['split'](':')[0x2];for(const _0x315c51 of _0x1e6e7f['getWalker']({'singleCharacters':!0x0})){const _0x7996de=this['_getVidAttributeName'](_0x315c51),_0x29eb0c='elementEnd'==_0x315c51['type']?_0x315c51['previousPosition']['path']['slice'](0x0,-0x1):_0x315c51['previousPosition']['path'],_0x364e4c=_0x6321b['getNodeByPath'](_0x29eb0c)['getAttribute'](_0x7996de);this['_touched']['set'](_0x364e4c,{'userId':_0x218056});}}}this['_startingRevisionId']=this['_revisionId'];const _0x3f876b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5ac9ce=>!this['_touched']['has'](_0x5ac9ce));let _0x1962d8=0x0;const _0x5b36e0=new Map();for(const _0x316cb0 in _0x16321f['diffData']){const _0x47fe98=_0x16321f['diffData'][_0x316cb0]['attachChange'],_0x5cc5a6=_0xfcbe04(_0x16321f['diffData'][_0x316cb0]['attributesAfter'])||{},_0x1e962a=this['_makeModelFromViewString'](_0x16321f['diffData'][_0x316cb0]['insertions']);_0x1e962a['rootName']=_0x316cb0,_0x1e962a['_isAttached']=!_0x47fe98||_0x47fe98['isAttached'],_0x1e962a['isAttached']=()=>_0x1e962a['_isAttached'],this['_diffRoots']['set'](_0x316cb0,_0x1e962a),this['_diffRootsAttributes']['set'](_0x316cb0,_0x5cc5a6);const _0x384a20=this['_makeIdsRoot'](_0x1e962a,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x316cb0,_0x384a20),_0x5b36e0['set'](_0x316cb0,_0x1e962a['isAttached']()?_0x5cc5a6:{});for(const [_0x675e93,_0x5bd584]of _0x1e962a['markers']){if(!_0x675e93['startsWith']('revision:'))continue;const _0xc6e4f2=_0x675e93['split'](':')[0x2];for(const _0x56d41c of _0x5bd584['getWalker']({'singleCharacters':!0x0})){const _0x1e2bf5=this['_getVidAttributeName'](_0x56d41c),_0x4739b2=this['_revisionId']++,_0x7f6bb7='elementEnd'==_0x56d41c['type']?_0x56d41c['previousPosition']['path']['slice'](0x0,-0x1):_0x56d41c['previousPosition']['path'];_0x384a20['getNodeByPath'](_0x7f6bb7)['_setAttribute'](_0x1e2bf5,_0x4739b2),this['_touched']['set'](_0x4739b2,{'userId':_0xc6e4f2});}}for(const _0x5146e of this['editor']['model']['createRangeIn'](_0x1e962a)['getWalker']({'singleCharacters':!0x0})){const _0x4b8e95=this['_getVidAttributeName'](_0x5146e),_0x566156='elementEnd'==_0x5146e['type']?_0x5146e['previousPosition']['path']['slice'](0x0,-0x1):_0x5146e['previousPosition']['path'],_0x550721=_0x384a20['getNodeByPath'](_0x566156);_0x550721['getAttribute'](_0x4b8e95)>0x0||_0x550721['_setAttribute'](_0x4b8e95,_0x3f876b[_0x1962d8++]);}for(const [_0x3ed2d4,_0x26d7ec]of _0x1e962a['markers'])_0x3ed2d4['startsWith']('revision:')||this['_markers']['set'](_0x3ed2d4,_0x26d7ec);}const _0x45487a=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x45487a),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x45487a,0x1));const _0x118e34=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x118e34),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x118e34,0x1));const _0x5c09a0=Array['from'](this['_diffRoots'])['map'](([_0x3cd733,_0x4a3c93])=>[_0x3cd733,T(_0x4a3c93)]);this['_saveMetaData'](this['_lastTo'],_0x5c09a0,this['_markers'],_0x5b36e0);}['_makeModelFromViewString'](_0x2032ee){const _0x1e1043=JSON['parse'](_0x2032ee),_0x32a091=this['editor']['editing']['view']['document'],_0x3b7d99=new _0x257c91(_0x32a091,_0x1e1043['map'](_0x2ab58a=>C(_0x2ab58a,this['editor'])));return this['editor']['data']['toModel'](_0x3b7d99);}['_saveMetaData'](_0x174fa9,_0x4abb38,_0xfac7df,_0x27c10c){const _0x5c13ed=new Map(_0x4abb38),_0x1a3b60=new Map(_0xfcbe04(_0x27c10c)),_0x125ca7=new Map();for(const [_0x35b3be,_0x40fb3b]of _0xfac7df)_0x125ca7['set'](_0x35b3be,{'start':_0x40fb3b['start']['clone'](),'end':_0x40fb3b['end']['clone'](),'rootName':_0x40fb3b['root']['rootName']});this['_savedMetaData']['set'](_0x174fa9,{'roots':_0x5c13ed,'markers':_0x125ca7,'rootsAttributes':_0x1a3b60});}['_removeMetaData'](_0x1ac556){this['_savedMetaData']['delete'](_0x1ac556);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_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'](_0x3daf39,_0x4aeb62=null){let _0x8baced=null;_0x3daf39['is']('documentFragment')||(_0x8baced=new ft(_0x3daf39['name'],{'vid_start':null===_0x4aeb62?this['_revisionId']++:_0x4aeb62++}));const _0x229678=[];for(const _0x2aea9c of _0x3daf39['getChildren']())if(_0x2aea9c['is']('element')){_0x229678['push'](this['_makeIdsRoot'](_0x2aea9c,_0x4aeb62));const _0x33d329=_0x229678[_0x229678['length']-0x1];null!==_0x4aeb62&&(_0x4aeb62=_0x33d329['is']('element','$text')?_0x33d329['getAttribute']('vid')+0x1:_0x33d329['getAttribute']('vid_end')+0x1);}else{for(let _0x41ec6d=0x0;_0x41ec6d<_0x2aea9c['offsetSize'];_0x41ec6d++)_0x229678['push'](new ft('$text',{'vid':null===_0x4aeb62?this['_revisionId']++:_0x4aeb62++}));}if(_0x3daf39['is']('documentFragment')){const _0x3133c1=F(_0x3daf39['rootName']);return _0x3133c1['_insertChild'](0x0,_0x229678),_0x3133c1;}return _0x8baced['_setAttribute']('vid_end',null===_0x4aeb62?this['_revisionId']++:_0x4aeb62++),_0x8baced['_insertChild'](0x0,_0x229678),_0x8baced;}['_calculateMetaData'](_0x338cd0,_0x11ff67,_0x32bdd0){this['_reset']();const {roots:_0x26d5e6,markers:_0x21efaa,rootsAttributes:_0x3afaa4}=this['_savedMetaData']['get'](_0x338cd0);this['_baseRoots']=new Map(_0x26d5e6),this['_baseRootsAttributes']=new Map(_0xfcbe04(_0x3afaa4));for(const [_0x4b1ebe,_0x3335c1]of this['_baseRoots'])if('$graveyard'!==_0x4b1ebe&&(this['_diffRoots']['set'](_0x4b1ebe,T(_0x3335c1)),this['_diffRootsAttributes']=new Map(_0xfcbe04(_0x3afaa4)),_0x32bdd0)){const _0x5dd518=this['_revisionId'];this['_idsRoots']['set'](_0x4b1ebe,this['_makeIdsRoot'](_0x3335c1)),this['_baseIdsRoots']['set'](_0x4b1ebe,this['_makeIdsRoot'](_0x3335c1,_0x5dd518));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x32bdd0&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x2e477b,_0x881795]of _0x21efaa){const _0x28bc8d=this['_baseRoots']['get'](_0x881795['rootName']),_0x139c5e=this['_diffRoots']['get'](_0x881795['rootName']),_0x941efc=new vt(this['_fixPosition'](_0x881795['start'],_0x28bc8d),this['_fixPosition'](_0x881795['end'],_0x28bc8d)),_0x114b9b=this['_fixRange'](_0x941efc,_0x139c5e);_0x28bc8d['markers']['set'](_0x2e477b,_0x941efc),this['_markers']['set'](_0x2e477b,_0x114b9b);}this['_applyOperations'](_0x338cd0,_0x11ff67,_0x32bdd0);}['_applyOperations'](_0x3ff612,_0x3826ed,_0x6bc4eb){for(const _0x37cde4 of this['source']['getOperations'](_0x3ff612,_0x3826ed))this['_handleOperation'](_0x37cde4,_0x6bc4eb);for(const _0x2a4dd0 of this['_diffRoots']['values']())_0x2a4dd0['markers']['clear']();for(const [_0x502067,_0x5e6f6d]of this['_markers']){this['_diffRoots']['get'](_0x5e6f6d['root']['rootName'])['markers']['set'](_0x502067,_0x5e6f6d['clone']());}const _0x5d354a=new Map(),_0x364352=new Map();for(const [_0x28d105,_0x4fcc6a]of this['_diffRoots'])_0x5d354a['set'](_0x28d105,T(_0x4fcc6a)),_0x364352['set'](_0x28d105,this['_diffRootsAttributes']['get'](_0x28d105));this['_saveMetaData'](_0x3826ed,_0x5d354a,this['_markers'],_0x364352);}['_getPreviousFrom'](_0x1730e6){const _0x221c94=Array['from'](this['_savedMetaData']['keys']());_0x221c94['sort']((_0x53b683,_0x2176d4)=>_0x53b683-_0x2176d4),_0x221c94['reverse']();for(const _0x2cb1df of _0x221c94)if(_0x2cb1df<_0x1730e6)return _0x2cb1df;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xff3aae,_0x3c6312){const _0x21702a=Array['from'](_0x3c6312['markers'])['map'](([_0x293f99,_0x59ab3e])=>[_0x293f99,this['_fixRange'](_0x59ab3e,_0xff3aae)]);_0xff3aae['markers']=new Map(_0x21702a);}['_transformMarkers'](_0x1a05d1){for(const _0x5ba016 of this['_markers']['values']()){const _0x28f7f9=_0x5ba016['getTransformedByOperation'](_0x1a05d1),_0x176692=vt['_createFromRanges'](_0x28f7f9);_0x5ba016['start']=_0x176692['start'],_0x5ba016['end']=_0x176692['end'];}}['_handleOperation'](_0x20d975,_0xb310c4){if('addRoot'!=_0x20d975['type']&&'detachRoot'!=_0x20d975['type']){if('insert'==_0x20d975['type']){const _0x52cc51=_0x20d975['position']['root']['rootName'];this['_diffRoots']['has'](_0x52cc51)||(this['_diffRoots']['set'](_0x52cc51,F(_0x52cc51,!0x0)),this['_diffRootsAttributes']['set'](_0x52cc51,{}),_0xb310c4&&this['_idsRoots']['set'](_0x52cc51,F(_0x52cc51,!0x0)));}else{if('addRootAttribute'==_0x20d975['type']||'removeRootAttribute'==_0x20d975['type']||'changeRootAttribute'==_0x20d975['type'])return void this['_handleRootAttributeOperation'](_0x20d975);'marker'==_0x20d975['type']&&this['_handleMarkerOperation'](_0x20d975);}if('marker'!==_0x20d975['type']){const _0x23b90a=this['_cloneOperation'](_0x20d975,this['_diffRoots']);_0x23b90a['_execute'](),this['_transformMarkers'](_0x23b90a);}if(_0xb310c4)switch(_0x20d975['type']){case'insert':this['_handleInsertOperation'](_0x20d975);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x20d975);break;case'merge':this['_handleMergeOperation'](_0x20d975);break;case'split':this['_handleSplitOperation'](_0x20d975);}}else this['_handleRootOperation'](_0x20d975,_0xb310c4);}['_cloneOperation'](_0x2b97a4,_0x4d1947){const _0xe742d4=_0x2b97a4['clone']();return _0xe742d4['_authorId']=_0x2b97a4['_authorId'],this['_fixOperation'](_0xe742d4,_0x4d1947),_0xe742d4;}['_getBaseVids'](_0x5b147a){return _0x5b147a['map'](_0x52ab2a=>{const _0x1180bd=this['_getVidAttributeName'](_0x52ab2a);return Number(_0x52ab2a['item']['getAttribute'](_0x1180bd));});}['_generateTape'](_0x15f0bc,_0x404d0a){if(_0x15f0bc['is']('element','$text'))_0x404d0a['push']({'item':_0x15f0bc,'type':'text'});else{_0x15f0bc['is']('element')&&_0x404d0a['push']({'item':_0x15f0bc,'type':'elementStart'});for(const _0x323165 of _0x15f0bc['getChildren']())this['_generateTape'](_0x323165,_0x404d0a);_0x15f0bc['is']('element')&&_0x404d0a['push']({'item':_0x15f0bc,'type':'elementEnd'});}return _0x404d0a;}['_getState'](){const _0x46fcfe=new Map(this['_touched']),_0x2fe4da=new Map(_0x46fcfe),_0x4d1e9b=new Map(),_0x5998df={'insertions':{},'deletions':{}},_0x2b0bae={'insertions':{},'deletions':{}},_0x11bd3b=new Map(),_0x233003=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x233003['delete']('$graveyard');for(const _0x52b3ba of _0x233003){const _0x1b8b20=this['_diffRoots']['get'](_0x52b3ba)||F(_0x52b3ba,!0x1),_0x1f2aee=this['_baseRoots']['get'](_0x52b3ba)||F(_0x52b3ba,!0x1);_0x1b8b20['isAttached']()||_0x1f2aee['isAttached']()?(_0x5998df['insertions'][_0x52b3ba]=T(_0x1b8b20),_0x5998df['deletions'][_0x52b3ba]=T(_0x1f2aee),this['_copyMarkers'](_0x5998df['deletions'][_0x52b3ba],_0x1f2aee),this['_copyMarkers'](_0x5998df['insertions'][_0x52b3ba],_0x1b8b20),_0x2b0bae['insertions'][_0x52b3ba]=this['_generateTape'](this['_idsRoots']['get'](_0x52b3ba),[]),_0x2b0bae['deletions'][_0x52b3ba]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x52b3ba)||F(_0x52b3ba,!0x1),[])):_0x233003['delete'](_0x52b3ba);}for(const _0xa863d5 of _0x233003){const _0x304bc6=_0x2b0bae['insertions'][_0xa863d5];for(const _0x661b66 of _0x304bc6){const _0x54e4c2=this['_getVidAttributeName'](_0x661b66),_0x4c15e1=_0x661b66['item']['getAttribute'](_0x54e4c2);_0x2fe4da['delete'](_0x4c15e1),_0x4c15e1>=this['_startingRevisionId']&&_0x4d1e9b['set'](_0x4c15e1,_0x46fcfe['get'](_0x4c15e1));}}for(const _0x226051 of _0x233003){const _0x2c0c4f=_0x2b0bae['insertions'][_0x226051],_0x60543d=this['_getBaseVids'](_0x2b0bae['deletions'][_0x226051]);let _0x1a1fb6=0x0;for(const _0x255ec9 of _0x2c0c4f){const _0x486e03=this['_getVidAttributeName'](_0x255ec9),_0x3976fc=_0x255ec9['item']['getAttribute'](_0x486e03);if(!_0x4d1e9b['has'](_0x3976fc)&&!_0x11bd3b['has'](_0x3976fc)){if(_0x2fe4da['has'](_0x3976fc))_0x1a1fb6++;else{if(_0x3976fc!=_0x60543d[_0x1a1fb6]){const _0x1f973c=_0x46fcfe['get'](_0x3976fc)||_0x46fcfe['get'](_0x60543d[_0x1a1fb6]);for(;_0x3976fc!=_0x60543d[_0x1a1fb6];)_0x2fe4da['has'](_0x60543d[_0x1a1fb6])||(_0x11bd3b['set'](_0x60543d[_0x1a1fb6],_0x1f973c),_0x46fcfe['set'](_0x60543d[_0x1a1fb6],_0x1f973c)),_0x1a1fb6++;}_0x1a1fb6++;}}}}for(const _0x1dfd9d of _0x233003){const _0x4a573a=_0x2b0bae['insertions'][_0x1dfd9d];for(const _0x11aa77 of _0x4a573a){const _0x20ae8b=this['_getVidAttributeName'](_0x11aa77),_0x4546c0=_0x11aa77['item']['getAttribute'](_0x20ae8b);if(_0x11bd3b['has'](_0x4546c0)){const _0x391b5c=_0x11bd3b['get'](_0x4546c0);_0x2fe4da['has'](_0x4546c0)||_0x2fe4da['set'](_0x4546c0,{..._0x391b5c}),_0x4d1e9b['set'](_0x4546c0,{..._0x391b5c});}}}for(const _0x43bc7d of _0x2fe4da['keys']())_0x43bc7d>=this['_startingRevisionId']&&_0x2fe4da['delete'](_0x43bc7d);const _0x407085=new Map();for(const _0x100487 of _0x233003){let _0x2625a0=_0x2b0bae['insertions'][_0x100487];for(const _0x2af94c of _0x2625a0)if(_0x2af94c['item']['is']('element','tableCell')){const _0x3027e1=this['_getVidAttributeName'](_0x2af94c),_0x5064fa=_0x2af94c['item']['getAttribute'](_0x3027e1);if(_0x4d1e9b['has'](_0x5064fa)){const _0x7b1ac8=_0x2af94c['item']['parent']['parent']['getAttribute']('vid_start'),_0xd7fef6=_0x407085['get'](_0x7b1ac8)||new Set();_0xd7fef6['add'](_0x4d1e9b['get'](_0x5064fa)['userId']),_0x407085['set'](_0x7b1ac8,_0xd7fef6);}}_0x2625a0=_0x2b0bae['deletions'][_0x100487];for(const _0xdfc30 of _0x2625a0)if(_0xdfc30['item']['is']('element','tableCell')){const _0x2f7162=this['_getVidAttributeName'](_0xdfc30),_0x4f866d=_0xdfc30['item']['getAttribute'](_0x2f7162);if(_0x2fe4da['has'](_0x4f866d)){const _0x509948=_0xdfc30['item']['parent']['parent']['getAttribute']('vid_start'),_0x2d9557=_0x407085['get'](_0x509948)||new Set();_0x2d9557['add'](_0x2fe4da['get'](_0x4f866d)['userId']),_0x407085['set'](_0x509948,_0x2d9557);}}for(const _0x452f80 of _0x407085['keys']())(_0x4d1e9b['has'](_0x452f80)||_0x2fe4da['has'](_0x452f80))&&_0x407085['delete'](_0x452f80);}for(const _0x55b469 of _0x233003){const _0x598391=_0x2b0bae['insertions'][_0x55b469];let _0x17d2e1=null,_0x12b527=null;for(const _0x43c91c of _0x598391){const _0x25e755=this['_getVidAttributeName'](_0x43c91c),_0x551fc8=_0x43c91c['item']['getAttribute'](_0x25e755),_0x40efb1=_0x407085['get'](_0x551fc8);_0x40efb1&&'elementStart'==_0x43c91c['type']&&(_0x17d2e1=Array['from'](_0x40efb1)[0x0],_0x12b527=_0x43c91c['item']['getAttribute']('vid_end')),_0x17d2e1&&(_0x2fe4da['set'](_0x551fc8,{'userId':_0x17d2e1}),_0x4d1e9b['set'](_0x551fc8,{'userId':_0x17d2e1})),_0x551fc8==_0x12b527&&(_0x17d2e1=null,_0x12b527=null);}}const _0x5da863={},_0x3dddd4=new Set();for(const _0x3a30f8 of _0x233003){const _0x4d4650=_0x5998df['deletions'][_0x3a30f8],_0x449400=_0x5998df['insertions'][_0x3a30f8];for(const {userId:_0x3420ad}of this['_touchedMarkers']['values']())null!==_0x3420ad&&_0x3dddd4['add'](_0x3420ad);for(const {userId:_0xd4abb9}of this['_touchedRoots']['values']())null!==_0xd4abb9&&_0x3dddd4['add'](_0xd4abb9);this['_markChanges'](_0x449400,_0x2b0bae['insertions'][_0x3a30f8],_0x4d1e9b,'insertion',_0x3dddd4),this['_markChanges'](_0x4d4650,_0x2b0bae['deletions'][_0x3a30f8],_0x2fe4da,'deletion',_0x3dddd4),_0x5da863[_0x3a30f8]={'insertions':this['_prepareViewToSave'](_0x449400),'deletions':this['_prepareViewToSave'](_0x4d4650),'attachChange':this['_touchedRoots']['get'](_0x3a30f8)||null,'attributesBefore':_0xfcbe04(this['_baseRootsAttributes']['get'](_0x3a30f8))||{},'attributesAfter':_0xfcbe04(this['_diffRootsAttributes']['get'](_0x3a30f8))};}return{'diffData':_0x5da863,'authorsIds':Array['from'](_0x3dddd4)};}['_processRootBeforeSave'](_0x5ac794){for(const [,_0xfb5aa7]of _0x5ac794['markers']){const _0x2e5950=_0xfb5aa7['start']['getAncestors']()['filter'](_0x1b2e5a=>'tableCell'==_0x1b2e5a['name']);for(const _0x28c792 of _0x2e5950)0x1==_0x28c792['childCount']&&_0x28c792['getChild'](0x0)['is']('element','paragraph')&&_0x28c792['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5c03a3){this['_processRootBeforeSave'](_0x5c03a3);const _0x3828d5=this['editor']['data']['toView'](_0x5c03a3,{}),_0x29a914=Array['from'](_0x3828d5['getChildren']())['map'](_0x412101=>this['_getViewJson'](_0x412101));return JSON['stringify'](_0x29a914);}['_getViewJson'](_0xcb371f){if(_0xcb371f['is']('$text'))return _0xcb371f['data'];{const _0x3e86a6=_0xcb371f;return{'type':Object['keys'](P)['find'](_0xdf4fac=>_0xcb371f instanceof P[_0xdf4fac]),'name':_0x3e86a6['name'],'attributes':Array['from'](_0x3e86a6['getAttributes']()),'children':Array['from'](_0x3e86a6['getChildren']())['map'](_0xe1f34f=>this['_getViewJson'](_0xe1f34f))};}}['_markChanges'](_0xeca666,_0x3de598,_0x345946,_0x2edf6a,_0x4da824){let _0x25048d=null,_0x2b589e=null,_0xc7d4dd=0x0;const _0x10315f=this['editor']['model'];for(let _0x1f43df=0x0;_0x1f43df<_0x3de598['length'];_0x1f43df++){const _0x1a16dd=this['_getVidAttributeName'](_0x3de598[_0x1f43df]),_0x4a128a=_0x3de598[_0x1f43df]['item']['getAttribute'](_0x1a16dd),_0x3f8907=_0x345946['get'](_0x4a128a),_0x214994=_0x1f43df==_0x3de598['length']-0x1;(!_0x25048d&&_0x3f8907&&(_0x25048d=_0x3f8907,_0x2b589e=_0x3de598[_0x1f43df]),_0x25048d&&(!_0x3f8907||_0x3f8907['userId']!=_0x25048d['userId']))&&(_0x117c5a(_0x3f8907,B(_0x2b589e,_0xeca666,_0x10315f),B(_0x3de598[_0x1f43df],_0xeca666,_0x10315f)),_0x25048d=_0x3f8907||null,_0x2b589e=_0x3f8907?_0x3de598[_0x1f43df]:null),_0x25048d&&_0x214994&&_0x117c5a(_0x3f8907,B(_0x2b589e,_0xeca666,_0x10315f),J(_0x3de598[_0x1f43df],_0xeca666,_0x10315f));}function _0x117c5a(_0x4d5368,_0x7154c8,_0x1cff8d){const _0xe75b60=_0x25048d['userId'],_0x12af15='revision:'+_0x2edf6a+':'+_0xe75b60+':'+_0xc7d4dd++,_0x370644=_0x10315f['createRange'](_0x7154c8,_0x1cff8d);_0xeca666['markers']['set'](_0x12af15,_0x370644),null!==_0xe75b60&&_0x4da824['add'](_0xe75b60);}}['_getVidAttributeName'](_0x59deca){switch(_0x59deca['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x509ff9,_0x13e9bf){_0x509ff9['baseVersion']=null;for(const _0xdc0cb8 in _0x509ff9){const _0x1c461b=_0x509ff9[_0xdc0cb8];if(_0x1c461b instanceof gt){const _0x534a82=_0x13e9bf['get'](_0x1c461b['root']['rootName']);_0x509ff9[_0xdc0cb8]=this['_fixPosition'](_0x1c461b,_0x534a82);}if(_0x1c461b instanceof vt){const _0x1b79a5=_0x13e9bf['get'](_0x1c461b['root']['rootName']);_0x509ff9[_0xdc0cb8]=this['_fixRange'](_0x1c461b,_0x1b79a5);}'root'===_0xdc0cb8&&(_0x509ff9['root']=_0x13e9bf['get'](_0x509ff9['root']['rootName']));}}['_fixRange'](_0x333279,_0x49f16f){return this['editor']['model']['createRange'](this['_fixPosition'](_0x333279['start'],_0x49f16f),this['_fixPosition'](_0x333279['end'],_0x49f16f));}['_fixPosition'](_0x18dc56,_0x400806){return this['editor']['model']['createPositionFromPath'](_0x400806,_0x18dc56['path'],_0x18dc56['stickiness']);}['_handleInsertOperation'](_0x3adc3a){const _0x3079d5=this['_idsRoots']['get'](_0x3adc3a['position']['root']['rootName']),_0x108e90=this['_fixPosition'](_0x3adc3a['position'],_0x3079d5),_0x18c408=null===_0x3adc3a['_authorId']?null:_0x3adc3a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4cfe01=_0x108e90['parent'],_0xfb431a=this['_revisionId'],_0x53aa60=[];for(const _0x78075a of _0x3adc3a['nodes'])if(_0x78075a['is']('element'))_0x53aa60['push'](this['_makeIdsRoot'](_0x78075a));else{for(let _0x401b61=0x0;_0x401b61<_0x78075a['offsetSize'];_0x401b61++)_0x53aa60['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x4b1281=this['_revisionId'];for(let _0x17d1a3=_0xfb431a;_0x17d1a3<_0x4b1281;_0x17d1a3++)this['_touched']['set'](_0x17d1a3,{'userId':_0x18c408});_0x4cfe01['_insertChild'](_0x108e90['offset'],_0x53aa60);}['_handleMoveOperation'](_0x322521){(_0x322521=this['_cloneOperation'](_0x322521,this['_idsRoots']))['_execute']();const _0x5df71c=null===_0x322521['_authorId']?null:_0x322521['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3b2882=_0x322521['getMovedRangeStart'](),_0x1c5a48=_0x3b2882['parent'],_0x220a36=_0x3b2882['offset'];!function _0x1bb5f0(_0x56bf78,_0x5d1bf3,_0xd1a95f,_0x4ac9da){for(let _0x2ae671=_0xd1a95f;_0x2ae671<_0x4ac9da;_0x2ae671++){const _0x15cb90=_0x5d1bf3['getChild'](_0x2ae671);_0x15cb90['is']('element','$text')?_0x56bf78['set'](_0x15cb90['getAttribute']('vid'),{'userId':_0x5df71c}):(_0x56bf78['set'](_0x15cb90['getAttribute']('vid_start'),{'userId':_0x5df71c}),_0x1bb5f0(_0x56bf78,_0x15cb90,0x0,_0x15cb90['childCount']),_0x56bf78['set'](_0x15cb90['getAttribute']('vid_end'),{'userId':_0x5df71c}));}}(this['_touched'],_0x1c5a48,_0x220a36,_0x220a36+_0x322521['howMany']);}['_handleMergeOperation'](_0x50fbd4){const _0x4cee7f=null===(_0x50fbd4=this['_cloneOperation'](_0x50fbd4,this['_idsRoots']))['_authorId']?null:_0x50fbd4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ea152=_0x50fbd4['targetPosition']['parent'],_0x5996a1=_0x50fbd4['sourcePosition']['parent'],_0x221523=_0x4ea152['getAttribute']('vid_end'),_0x5378a4=_0x5996a1['getAttribute']('vid_start');_0x4ea152['_setAttribute']('vid_end',_0x5996a1['getAttribute']('vid_end')),_0x5996a1['_setAttribute']('vid_end',_0x221523),this['_touched']['set'](_0x5378a4,{'userId':_0x4cee7f}),this['_touched']['set'](_0x221523,{'userId':_0x4cee7f}),_0x50fbd4['_execute']();}['_handleSplitOperation'](_0x2fe1b0){const _0x2903f3=null===(_0x2fe1b0=this['_cloneOperation'](_0x2fe1b0,this['_idsRoots']))['_authorId']?null:_0x2fe1b0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x513022=_0x2fe1b0['graveyardPosition'],_0x540a4a=_0x2fe1b0['splitPosition']['parent'];_0x2fe1b0['_execute']();const _0x3320d8=_0x540a4a['getAttribute']('vid_end'),_0x178f96=_0x2fe1b0['insertionPosition']['nodeAfter'];if(_0x513022){const _0x551be7=_0x178f96['getAttribute']('vid_end'),_0x458a4f=_0x540a4a['getAttribute']('vid_end');_0x540a4a['_setAttribute']('vid_end',_0x551be7),_0x178f96['_setAttribute']('vid_end',_0x458a4f),this['_touched']['set'](_0x540a4a['getAttribute']('vid_end'),{'userId':_0x2903f3}),this['_touched']['set'](_0x178f96['getAttribute']('vid_start'),{'userId':_0x2903f3});}else{const _0x4d64b6=this['_revisionId']++,_0x1dc5a9=this['_revisionId']++;_0x540a4a['_setAttribute']('vid_end',_0x4d64b6),_0x178f96['_setAttribute']('vid_start',_0x1dc5a9),_0x178f96['_setAttribute']('vid_end',_0x3320d8),this['_touched']['set'](_0x4d64b6,{'userId':_0x2903f3}),this['_touched']['set'](_0x1dc5a9,{'userId':_0x2903f3});}}['_handleMarkerOperation'](_0xaa4bd3){if(!_0xaa4bd3['affectsData'])return;const _0x1c300d=(_0xaa4bd3=this['_cloneOperation'](_0xaa4bd3,this['_diffRoots']))['oldRange']?_0xaa4bd3['oldRange']['root']:null,_0x465146=_0xaa4bd3['newRange']?_0xaa4bd3['newRange']['root']:null;_0x1c300d&&this['_markers']['delete'](_0xaa4bd3['name']),_0x465146&&this['_markers']['set'](_0xaa4bd3['name'],_0xaa4bd3['newRange']['clone']());const _0x366adb=null===_0xaa4bd3['_authorId']?null:_0xaa4bd3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x47679b=_0xaa4bd3['name'];if(!this['_touchedMarkers']['has'](_0x47679b))return void this['_touchedMarkers']['set'](_0x47679b,{'range':_0xaa4bd3['oldRange'],'userId':_0x366adb});const _0x8ab5f7=this['_touchedMarkers']['get'](_0x47679b),_0x146735=_0x8ab5f7['range'],_0xbdef77=_0xaa4bd3['newRange'];null==_0x146735&&null==_0xbdef77||_0x146735&&_0xbdef77&&_0x146735['isEqual'](_0xbdef77)?this['_touchedMarkers']['delete'](_0xaa4bd3['name']):_0x8ab5f7['userId']=_0x366adb;}['_handleRootOperation'](_0x30f27e,_0x40be5f){this['_diffRoots']['has'](_0x30f27e['rootName'])?this['_diffRoots']['get'](_0x30f27e['rootName'])['_isAttached']=_0x30f27e['isAdd']:(this['_diffRoots']['set'](_0x30f27e['rootName'],F(_0x30f27e['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x30f27e['rootName'],{}),_0x40be5f&&this['_idsRoots']['set'](_0x30f27e['rootName'],F(_0x30f27e['rootName'],!0x0)));const _0x192247=null===_0x30f27e['_authorId']?null:_0x30f27e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43428f=this['_touchedRoots']['get'](_0x30f27e['rootName']);_0x43428f&&_0x43428f['userId']===_0x192247?this['_touchedRoots']['delete'](_0x30f27e['rootName']):this['_touchedRoots']['set'](_0x30f27e['rootName'],{'userId':_0x192247,'isAttached':_0x30f27e['isAdd']});}['_handleRootAttributeOperation'](_0x4f949c){const _0x43b439=this['_diffRootsAttributes']['get'](_0x4f949c['root']['rootName']);null===_0x4f949c['newValue']?delete _0x43b439[_0x4f949c['key']]:_0x43b439[_0x4f949c['key']]=_0x4f949c['newValue'];}}function T(_0x58b76e){const _0x51e477=F(_0x58b76e['rootName'],_0x58b76e['isAttached']());for(const _0x21667f of _0x58b76e['getChildren']()){const _0x29429b=_0x21667f['_clone'](!0x0);_0x51e477['_appendChild'](_0x29429b);}return _0x51e477;}function F(_0x58add2,_0x58fc08=!0x0){const _0x20e477=new mt();return _0x20e477['rootName']=_0x58add2,_0x20e477['_isAttached']=_0x58fc08,_0x20e477['isAttached']=()=>_0x20e477['_isAttached'],_0x20e477;}function B(_0xfc10a1,_0x36ce9a,_0x39874f){const _0x4e0c4b='elementEnd'==_0xfc10a1['type']?_0x39874f['createPositionAt'](_0xfc10a1['item'],'end'):_0x39874f['createPositionBefore'](_0xfc10a1['item']);return _0x39874f['createPositionFromPath'](_0x36ce9a,_0x4e0c4b['path'],_0x4e0c4b['stickiness']);}function J(_0x7cb93a,_0x39b79a,_0x506733){const _0x7ad42='elementStart'==_0x7cb93a['type']?_0x506733['createPositionAt'](_0x7cb93a['item'],0x0):_0x506733['createPositionAfter'](_0x7cb93a['item']);return _0x506733['createPositionFromPath'](_0x39b79a,_0x7ad42['path'],_0x7ad42['stickiness']);}class ns extends _0x4baf58{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x208f90,_0xdfdefe){super(_0x208f90),this['focusTracker']=new _0x46ccc1(),this['keystrokes']=new _0x5eeff1(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xdfdefe),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x14407a({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x673b7=_0x2260a7=>_0x2260a7['stopPropagation']();this['keystrokes']['set']('arrowright',_0x673b7),this['keystrokes']['set']('arrowleft',_0x673b7),this['keystrokes']['set']('arrowup',_0x673b7),this['keystrokes']['set']('arrowdown',_0x673b7);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x5c6f37){this['revisionNameInputView']['fieldView']['element']['value']=_0x5c6f37['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x372dc7){const _0x35e4cb=new nt(this['locale'],_0x1ac3e9),_0xe1e89d=_0x35e4cb['fieldView'];_0xe1e89d['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3baebb=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x372dc7&&(_0x3baebb+='\x20('+m(this['locale'],'optional')+')'),(_0x35e4cb['label']=_0x3baebb,_0xe1e89d['on']('input',()=>{this['revisionNameInputValue']=_0xe1e89d['element']['value']['trim']();}),_0x35e4cb);}}class u extends _0x31843e{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x2e3a1f=this['editor'],_0x2bad93=_0x2e3a1f['plugins']['get']('RevisionTracker');_0x2e3a1f['ui']['componentFactory']['add']('revisionHistory',_0xa7e2fa=>{const _0x402a6d=_0x30f2d2(_0xa7e2fa),_0x4461b5=_0x402a6d['panelView']['children'],_0x5cd694=new te(_0xa7e2fa),_0x126531=new _0x1727aa(_0xa7e2fa),_0xb70bcd=new _0xc6db79(_0xa7e2fa),_0x2020a1=new _0x1727aa(_0xa7e2fa),_0x140056=new _0xc6db79(_0xa7e2fa);return _0x402a6d['bind']('isEnabled')['to'](_0x2bad93,'isReady',_0x2bad93,'isEnabled',_0x2e3a1f,'isReadOnly',(_0x300043,_0x113823,_0x753ac1)=>_0x300043&&_0x113823&&!_0x753ac1),_0x402a6d['buttonView']['set']({'icon':_0x298223['history'],'label':m(_0xa7e2fa,'Revision\x20history'),'tooltip':!0x0}),_0xb70bcd['set']({'label':m(_0xa7e2fa,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0xb70bcd['bind']('isEnabled')['to'](_0x2bad93,'isReady',_0x2bad93,'isEnabled',_0x2e3a1f,'isReadOnly',(_0x151b9b,_0x4c843f,_0x2d5368)=>_0x151b9b&&_0x4c843f&&!_0x2d5368),_0xb70bcd['on']('execute',()=>this['_showDialog']()),_0x140056['set']({'label':m(_0xa7e2fa,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x140056['bind']('isEnabled')['to'](_0x2bad93,'isReady',_0x2e3a1f,'isReadOnly',(_0x30dde8,_0x7d3a18)=>_0x30dde8&&!_0x7d3a18),_0x140056['on']('execute',()=>{_0x2e3a1f['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x402a6d['isOpen']=!0x1,_0x2e3a1f['editing']['view']['focus']();}),_0x126531['children']['add'](_0xb70bcd),_0x2020a1['children']['add'](_0x140056),_0x5cd694['role']='menu',_0x5cd694['items']['addMany']([_0x126531,_0x2020a1]),_0x4461b5['add'](_0x5cd694),_0x402a6d;}),_0x2e3a1f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x317b4a=this['editor'],_0x2007c7=_0x317b4a['locale'],_0x1875fc=new _0x1070d5(_0x2007c7),_0x3617ec=new _0x3c6fa4(_0x2007c7);_0x1875fc['buttonView']['set']({'icon':_0x298223['history'],'label':m(_0x2007c7,'Revision\x20history')});const _0x6d1625=new _0x461fde(_0x2007c7,_0x1875fc),_0x4bfb64=new _0x578c8b(_0x2007c7);_0x4bfb64['set']({'label':m(_0x2007c7,'Save\x20current\x20revision')}),_0x4bfb64['delegate']('execute')['to'](_0x1875fc),_0x4bfb64['on']('execute',()=>{this['_showDialog']();}),_0x6d1625['children']['add'](_0x4bfb64),_0x3617ec['items']['add'](_0x6d1625);const _0x173943=new _0x461fde(_0x2007c7,_0x1875fc),_0x16adf6=new _0x578c8b(_0x2007c7);return _0x16adf6['set']({'label':m(_0x2007c7,'Open\x20revision\x20history')}),_0x16adf6['delegate']('execute')['to'](_0x1875fc),_0x16adf6['on']('execute',()=>{_0x317b4a['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x173943['children']['add'](_0x16adf6),_0x3617ec['items']['add'](_0x173943),_0x1875fc['panelView']['children']['add'](_0x3617ec),_0x1875fc;}['_showDialog'](){const _0x470bfb=this['editor'],_0x4b983a=_0x470bfb['locale'],_0x216301=_0x470bfb['plugins']['get']('Dialog'),_0x517057=_0x470bfb['plugins']['get']('RevisionTracker');function _0x4b15f3(_0xd95f23){_0x470bfb['config']['get']('revisionHistory.requireRevisionName')&&''===_0xd95f23['revisionName']?_0xd95f23['revisionNameInputView']['errorText']=m(_0x4b983a,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x470bfb['plugins']['get'](l)['saveRevision']({'name':_0xd95f23['revisionName']}),_0x216301['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4b15f3(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x216301['show']({'id':'revisionSave','title':m(_0x4b983a,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x470bfb['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x216301['hide']()},{'label':m(_0x470bfb['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x1a9ed4){_0x1a9ed4['bind']('isEnabled')['to'](_0x517057,'isReady',_0x517057,'isEnabled',_0x470bfb,'isReadOnly',(_0x2086b6,_0x40dd2a,_0x298edf)=>_0x2086b6&&_0x40dd2a&&!_0x298edf);},'onExecute':()=>_0x4b15f3(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x476616=this['editor'],_0x153a38=_0x476616['locale'];this['_saveRevisionFormView']=new ns(_0x153a38,_0x476616['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x4baf58{['changeId'];['_model'];constructor(_0x5ace09,_0x54f27d){super(_0x5ace09),this['_model']=_0x54f27d,this['changeId']=_0x54f27d['id'];const _0x5cc500=this['bindTemplate'],_0x429003=m(_0x5ace09,_0x54f27d['data']['isSuggestion']?'Suggested\x20by':'add'==_0x54f27d['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x54f27d['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5cc500['to']('type',_0x272cd0=>'ck-revision-change__'+_0x272cd0)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x429003}]},{'text':'\x20'+_0x54f27d['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4fadb4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x28d8b7){super(),this['id']=_0x28d8b7['id']||_0x1dea48(),this['author']=_0x28d8b7['author'],this['type']=_0x28d8b7['type'],this['data']=_0x28d8b7['data']||{},this['rootName']=_0x28d8b7['rootName'],this['set']('createdAt',_0x28d8b7['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x40ac79,_0x280ba2){this['newRevisionId']=_0x40ac79,this['oldRevisionId']=_0x280ba2,this['changes']=new _0x51fd93();}['_setChanges'](_0xf2dfcd){for(const _0x3161f5 of _0xf2dfcd)this['changes']['add'](_0x3161f5);}}const Y={'c':_0x268163,'a':_0x109915,'e':_0x4d5e80,'r':_0x59e6eb,'u':_0xbedaeb};class d extends _0x31843e{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x51111e,_0x57f8c8,j];}constructor(_0x1a950b){super(_0x1a950b),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),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',(_0x362969,_0x419e38,_0x5616b9)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x34debc=>{for(const _0x447953 of this['editor']['editing']['view']['document']['roots'])_0x5616b9?_0x34debc['removeClass']('ck-editor__editable__overlay',_0x447953):_0x34debc['addClass']('ck-editor__editable__overlay',_0x447953);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4066b1=>null!==_0x4066b1),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1eeb3b,_0x23c19f,_0x360c4b)=>_0x1eeb3b&&_0x360c4b?_0x23c19f['changes']['getIndex'](_0x360c4b):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xbe159c,_0x55b81c)=>_0xbe159c?_0x55b81c['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x57f8c8);}['init'](){const _0x34f883=this['editor'],_0x366438=new yt(_0x34f883,{'direction':'backward'}),_0x37ac56=new yt(_0x34f883,{'direction':'forward'});(_0x34f883['commands']['add']('showPreviousChange',_0x366438),_0x34f883['commands']['add']('showNextChange',_0x37ac56),_0x34f883['commands']['add']('restoreRevision',new _t(_0x34f883)),this['on']('change:numberOfChanges',()=>{_0x366438['refresh'](),_0x37ac56['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x34f883['enableReadOnlyMode']('revision-viewer'),_0x34f883['plugins']['has']('WidgetToolbarRepository'))&&_0x34f883['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x4f9e90){await this['loadRevisionData'](_0x4f9e90);const _0x1edd1d={};for(const _0x38792a in _0x4f9e90['diffData']){if(_0x4f9e90['diffData'][_0x38792a]['attachChange']&&!_0x4f9e90['diffData'][_0x38792a]['attachChange']['isAttached'])continue;const _0x31d0ef=this['_removeRevisionMarkers'](JSON['parse'](_0x4f9e90['diffData'][_0x38792a]['insertions'])),_0x47505c=this['editor']['editing']['view']['document'],_0x55753e=new _0x257c91(_0x47505c,_0x31d0ef['map'](_0x1b16d1=>this['_getViewObj'](_0x1b16d1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1edd1d[_0x38792a]=this['editor']['data']['processor']['toData'](_0x55753e),this['editor']['data']['processor']['useFillerType']('default');}return _0x1edd1d;}async['getRevisionRootsAttributes'](_0x1be204){await this['loadRevisionData'](_0x1be204);const _0x188b2a={};for(const _0x12c507 in _0x1be204['diffData'])_0x1be204['diffData'][_0x12c507]['attachChange']&&!_0x1be204['diffData'][_0x12c507]['attachChange']['isAttached']||(_0x188b2a[_0x12c507]=_0x1be204['diffData'][_0x12c507]['attributesAfter']||{});return _0x188b2a;}['_removeRevisionMarkers'](_0x197217){return(_0x197217=_0x197217['filter'](_0x2fad85=>!_0x2fad85['name']||'revision-start'!==_0x2fad85['name']&&'revision-end'!==_0x2fad85['name']))['forEach'](_0x5815a9=>{'string'!=typeof _0x5815a9&&(_0x5815a9['children']=this['_removeRevisionMarkers'](_0x5815a9['children']),_0x5815a9['attributes']=_0x5815a9['attributes']['filter'](_0x3d308e=>!_0x3d308e[0x0]['startsWith']('data-revision-')));}),_0x197217;}async['compare'](_0x413301,_0x622dea,_0x79868b=!0x1){if(!this['isEnabled'])return;const _0x3a383e=this['diff'],_0x354c36=this['repository'],_0x232db6='string'==typeof _0x413301?_0x354c36['getRevision'](_0x413301):_0x413301,_0xa6d5c6='string'==typeof _0x622dea?_0x354c36['getRevision'](_0x622dea):_0x622dea,_0x556bad=_0x232db6['id'],_0x146ef1=_0xa6d5c6?_0xa6d5c6['id']:null;if(!_0x79868b&&this['diff']&&this['diff']['newRevisionId']===_0x556bad&&this['diff']['oldRevisionId']===_0x146ef1)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x556bad,_0x146ef1);const _0x184480=this['_getRevisionsRange'](_0x232db6,_0xa6d5c6,!0x0)['map'](_0x38594e=>this['loadRevisionData'](_0x38594e));return _0x184480['push'](new Promise(_0x344c30=>{setTimeout(_0x344c30,0x14);})),Promise['all'](_0x184480)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x20d87e=this['_getDiff'](_0x556bad,_0x146ef1);for(const _0x2c75de of _0x20d87e['changes'])this['_changeIdToChange']['set'](_0x2c75de['id'],_0x2c75de);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1c3c44=>{for(const _0x41a736 of this['editor']['model']['document']['getRootNames']())_0x1c3c44['detachRoot'](_0x41a736);for(const _0x4b6110 of Object['keys'](_0x20d87e['model'])){const _0xd978a7=_0x1c3c44['addRoot'](_0x4b6110);for(const _0x51afc9 of Object['keys'](_0x20d87e['attributes'][_0x4b6110]))_0x1c3c44['setAttribute'](_0x51afc9,_0x20d87e['attributes'][_0x4b6110][_0x51afc9],_0xd978a7);_0x1c3c44['insert'](_0x20d87e['model'][_0x4b6110],_0xd978a7,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x20d87e['changes'])),this['isReady']=!0x0;})['catch'](_0x1d8580=>{console['error'](_0x1d8580),this['_cleanUp'](),_0x3a383e&&(this['diff']=_0x3a383e),this['isReady']=!0x0;});}['addRevisionData'](_0x3544b0,_0x116239){const _0x3f67a6=this['repository']['createRevision'](_0x3544b0);return _0x3f67a6['on']('_update',(_0x3fb3ec,_0x267936,_0x184380)=>_0x116239(_0x267936,_0x184380,_0x3f67a6)),this['repository']['addRevision'](_0x3f67a6),_0x3f67a6;}['loadRevisionData'](_0xac8451){if(!_0xac8451||_0xac8451['diffData'])return Promise['resolve']();{const _0x6a2333=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x6a2333,'revisionId':_0xac8451['id']})['then'](_0xd81034=>{_0xac8451['_update']({'diffData':_0xd81034['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x448c79=>{for(const _0x15e6bf of this['editor']['model']['document']['getRootNames']())_0x448c79['detachRoot'](_0x15e6bf);});}['_sortAndFilterDiffChanges'](_0x26d179){const _0xd14ce3=[],_0x1e1548=new Map();for(const _0x38591a of this['editor']['model']['document']['getRootNames']()){const _0x8a04cc=this['editor']['editing']['view']['getDomRoot'](_0x38591a);if(!_0x8a04cc)continue;const _0x51518a=_0x8a04cc['getClientRects']()['item'](0x0);_0x51518a&&(_0xd14ce3['push'](_0x38591a),_0x1e1548['set'](_0x38591a,_0x51518a));}return _0xd14ce3['sort']((_0x7b0515,_0xecd54c)=>{const _0x5b9be7=_0x1e1548['get'](_0x7b0515),_0x49f0f2=_0x1e1548['get'](_0xecd54c);return _0x5b9be7['y']-_0x49f0f2['y']||_0x5b9be7['x']-_0x49f0f2['x'];}),(_0x26d179=_0x26d179['filter'](_0x47531a=>_0xd14ce3['includes'](_0x47531a['rootName'])))['sort']((_0x367e37,_0x41769b)=>_0xd14ce3['indexOf'](_0x367e37['rootName'])-_0xd14ce3['indexOf'](_0x41769b['rootName'])),_0x26d179;}['_makeTape'](_0x25cc4d){const _0x3e6463=Array['from'](_0x25cc4d['markers'])['filter'](([_0xef2580,_0x21c697])=>_0xef2580['startsWith']('revision:')&&!_0x21c697['isCollapsed']),_0x3dc01d=Array['from'](this['editor']['model']['createRangeIn'](_0x25cc4d)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3e6463['length'])for(const _0x5e1552 of _0x3dc01d){const [_0x7d7832,_0x2fc2d2]=_0x3e6463[0x0],[,_0x189339,_0x35994c]=_0x7d7832['split'](':');if(_0x2fc2d2['end']['isEqual'](_0x5e1552['nextPosition'])&&_0x3e6463['shift'](),(_0x5e1552['previousPosition']['isEqual'](_0x2fc2d2['start'])||_0x5e1552['previousPosition']['isAfter'](_0x2fc2d2['start']))&&('insertion'==_0x189339?_0x5e1552['isAdded']={'userId':_0x35994c}:'deletion'==_0x189339&&(_0x5e1552['isRemoved']={'userId':_0x35994c})),0x0==_0x3e6463['length'])break;}return _0x3dc01d;}['_refreshStartEndIndex'](_0x40ed6b){const _0x598f68=new Map();for(let _0x24d5c2=0x0;_0x24d5c2<_0x40ed6b['length'];_0x24d5c2++)'text'===_0x40ed6b[_0x24d5c2]['type']?(_0x40ed6b[_0x24d5c2]['item']['startIndex']=_0x24d5c2,_0x40ed6b[_0x24d5c2]['item']['endIndex']=_0x24d5c2):('elementStart'===_0x40ed6b[_0x24d5c2]['type']?_0x40ed6b[_0x24d5c2]['item']['startIndex']=_0x24d5c2:'elementEnd'===_0x40ed6b[_0x24d5c2]['type']&&(_0x40ed6b[_0x24d5c2]['item']['endIndex']=_0x24d5c2),_0x598f68['set'](_0x40ed6b[_0x24d5c2]['id'],_0x24d5c2));for(const _0x48af79 of _0x598f68['values']())'elementStart'===_0x40ed6b[_0x48af79]['type']?_0x40ed6b[_0x48af79]['item']['endIndex']=_0x598f68['get'](_0x40ed6b[_0x48af79]['pairId']):'elementEnd'===_0x40ed6b[_0x48af79]['type']&&(_0x40ed6b[_0x48af79]['item']['startIndex']=_0x598f68['get'](_0x40ed6b[_0x48af79]['pairId']));}['_processTape'](_0x4ecffe){for(let _0x458a65=0x0;_0x458a65<_0x4ecffe['length'];_0x458a65++){if('elementStart'===_0x4ecffe[_0x458a65]['type'])_0x4ecffe[_0x458a65]['item']['startIndex']=_0x458a65;else{if('elementEnd'===_0x4ecffe[_0x458a65]['type']){_0x4ecffe[_0x458a65]['item']['endIndex']=_0x458a65;const _0xdacc1a=_0x4ecffe[_0x458a65]['item']['startIndex'];_0x4ecffe[_0xdacc1a]['pairId']=_0x4ecffe[_0x458a65]['id'],_0x4ecffe[_0x458a65]['pairId']=_0x4ecffe[_0xdacc1a]['id'];}else _0x4ecffe[_0x458a65]['item']['startIndex']=_0x458a65,_0x4ecffe[_0x458a65]['item']['endIndex']=_0x458a65,_0x4ecffe[_0x458a65]['pairId']=null;}_0x4ecffe[_0x458a65]['markersStart']||(_0x4ecffe[_0x458a65]['markersStart']=[],_0x4ecffe[_0x458a65]['markersEnd']=[]);}}['_markInsertions'](_0x228226,_0x28aabb){const _0x13eab8=_0x228226['filter'](_0x455bd6=>!_0x455bd6['isAdded']);for(let _0x794a11=0x0;_0x794a11<_0x28aabb['length'];_0x794a11++)_0x28aabb[_0x794a11]['isAdded']&&(_0x13eab8[_0x794a11]['isAdded']=_0x28aabb[_0x794a11]['isAdded']);}['_makeModelFromViewString'](_0xfc52ce){const _0x899602=JSON['parse'](_0xfc52ce),_0x376ea6=this['editor']['editing']['view']['document'],_0xf996fb=new _0x257c91(_0x376ea6,_0x899602['map'](_0x41ceb8=>this['_getViewObj'](_0x41ceb8)));return this['editor']['data']['toModel'](_0xf996fb);}['_getViewObj'](_0x1d477f){const _0x30ae1b=this['editor']['editing']['view']['document'];if('string'==typeof _0x1d477f)return new _0x14b1c0(_0x30ae1b,_0x1d477f);{const _0x359870=_0x1d477f['children']['map'](_0x18a35b=>this['_getViewObj'](_0x18a35b));return new(Y[_0x1d477f['type']]||_0x1818ed)(_0x30ae1b,_0x1d477f['name'],_0x1d477f['attributes'],_0x359870);}}['_getDiff'](_0x244cf8,_0x4d7cb7=null){const _0x392192=this['repository']['getRevision'](_0x244cf8),_0x3a819c=_0x4d7cb7?this['repository']['getRevision'](_0x4d7cb7):null,_0xcd1333=this['_getRevisionsRange'](_0x392192,_0x3a819c),_0x20c148=_0xcd1333[_0xcd1333['length']-0x1],_0x913031=new Map(),_0x530a68={'model':{},'attributes':{},'changes':[]},_0x26cd39=new Set(),_0x3ecf2b=new Map();for(let _0x49ca9d=_0xcd1333['length']-0x1;_0x49ca9d>=0x0;_0x49ca9d--){const _0x1bc65b=_0xcd1333[_0x49ca9d];for(const _0x49283c of Object['keys'](_0x1bc65b['diffData']))if(_0x1bc65b['diffData'][_0x49283c]['attachChange']){const _0x45f926=_0x1bc65b['diffData'][_0x49283c]['attachChange'];_0x45f926['isAttached']?(_0x26cd39['add'](_0x49283c),_0x3ecf2b['has'](_0x49283c)&&_0x3ecf2b['get'](_0x49283c)['userId']==_0x45f926['userId']?_0x3ecf2b['delete'](_0x49283c):_0x3ecf2b['set'](_0x49283c,_0x45f926)):_0x3ecf2b['has'](_0x49283c)?(_0x26cd39['delete'](_0x49283c),_0x3ecf2b['delete'](_0x49283c)):(_0x26cd39['add'](_0x49283c),_0x3ecf2b['set'](_0x49283c,_0x45f926));}else _0x26cd39['add'](_0x49283c);}for(const _0x1d916f of _0x26cd39){const _0xf44891=_0x3ecf2b['has'](_0x1d916f)&&!_0x3ecf2b['get'](_0x1d916f)['isAttached'];let _0x425df2=_0xf44891?_0xcd1333['length']-0x1:0x0;const _0x15b090=_0xf44891?-0x1:0x1;for(;_0xcd1333[_0x425df2];){const _0x23481b=_0xcd1333[_0x425df2];if(_0x23481b['diffData'][_0x1d916f]){const _0x5c7c64=_0xf44891?_0x23481b['diffData'][_0x1d916f]['attributesBefore']:_0x23481b['diffData'][_0x1d916f]['attributesAfter'];_0x530a68['attributes'][_0x1d916f]=_0x5c7c64?_0xfcbe04(_0x5c7c64):{};break;}_0x425df2+=_0x15b090;}}for(const _0x373011 of _0xcd1333){_0x373011['model']={};for(const _0x2ea96d of _0x373011['authors'])_0x913031['set'](_0x2ea96d['id'],_0x2ea96d);for(const _0xc008bd of _0x26cd39){const _0x345a18=_0x373011['diffData'][_0xc008bd]?_0x373011['diffData'][_0xc008bd]['insertions']:'[]',_0x538ad3=_0x373011['diffData'][_0xc008bd]?_0x373011['diffData'][_0xc008bd]['deletions']:'[]';_0x373011['model'][_0xc008bd]={'insertions':this['_makeModelFromViewString'](_0x345a18),'deletions':this['_makeModelFromViewString'](_0x538ad3)};}}for(const _0xeb351a of _0x26cd39){let _0x189c06=null,_0x4c40cc=0x0;const _0x3c555e=new Map(Array['from'](_0x392192['model'][_0xeb351a]['insertions']['markers'])['filter'](([_0x402521])=>!_0x402521['startsWith']('revision:')));let _0xaa7d09=0x0;for(const _0x519940 of _0xcd1333){const _0x23a190=this['_makeTape'](_0x519940['model'][_0xeb351a]['insertions']);_0x519940==_0x392192?(_0x189c06=_0x23a190,_0x4c40cc=_0x189c06['length'],_0x189c06['forEach'](_0x201cef=>{_0x201cef['id']=_0xaa7d09++;}),this['_processTape'](_0x189c06)):this['_markInsertions'](_0x189c06,_0x23a190);const _0x1c7a1b=_0x189c06['filter'](_0x484bae=>!_0x484bae['isAdded'])['map'](_0x50b95e=>_0x50b95e['id']);let _0x3673a7=0x0;const _0x5ebf31=this['_makeTape'](_0x519940['model'][_0xeb351a]['deletions']);_0x5ebf31['forEach'](_0x5d5f51=>{_0x5d5f51['isRemoved']?_0x5d5f51['id']=_0x4c40cc++:_0x5d5f51['id']=_0x1c7a1b[_0x3673a7++];}),this['_processTape'](_0x5ebf31),this['_setDistance'](_0x189c06,'isAdded'),this['_setDistance'](_0x5ebf31,'isRemoved'),_0x519940==_0x392192&&this['_markMarkers'](_0x189c06,_0x3c555e),_0x189c06=this['_joinTapes'](_0x189c06,_0x5ebf31),this['_refreshStartEndIndex'](_0x189c06),this['_setDistance'](_0x189c06,'isRemoved');}_0x189c06=_0x189c06['filter'](_0x39353c=>!(_0x39353c['isAdded']&&_0x39353c['isRemoved']));const _0x54b63c=new Map(_0x20c148['model'][_0xeb351a]['deletions']['markers']),_0x261c6a=new Set(_0x3c555e['keys']());for(const _0xb563a1 of _0x54b63c['keys']())_0x261c6a['delete'](_0xb563a1);this['_markSuggestions'](_0x189c06,_0x261c6a),this['_fixObsoleteTags'](_0x189c06),_0x189c06=this['_removeMissingPairs'](_0x189c06),_0x189c06=this['_markMismatchedRemovedTags'](_0x189c06),_0x189c06=this['_removeUnsupportedChanges'](_0x189c06);const {root:_0x18feb1,changes:_0x52cacb}=this['_makeModelFromTape'](_0x189c06,_0x913031,_0xeb351a);_0x530a68['model'][_0xeb351a]=_0x18feb1;const _0x2cfd7a=_0x3ecf2b['get'](_0xeb351a);if(_0x2cfd7a){const _0x14b9b4=_0x913031['get'](_0x2cfd7a['userId']),_0x522a3b=new r({'author':_0x14b9b4,'type':_0x2cfd7a['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0xeb351a});_0x52cacb['unshift'](_0x522a3b),_0x530a68['attributes'][_0xeb351a]['revisionHistoryAttachChange']=_0x522a3b['id'];}_0x530a68['changes']=_0x530a68['changes']['concat'](_0x52cacb);}return _0x530a68;}['_markMarkers'](_0x72f7f,_0x4057fb){for(let _0x140244=0x0;_0x140244<_0x72f7f['length'];_0x140244++)for(const [_0x268b34,_0x306313]of _0x4057fb)_0x306313['start']['isEqual'](_0x72f7f[_0x140244]['previousPosition'])&&_0x72f7f[_0x140244]['markersStart']['push'](_0x268b34),_0x306313['end']['isEqual'](_0x72f7f[_0x140244]['nextPosition'])&&_0x72f7f[_0x140244]['markersEnd']['push'](_0x268b34);}['_joinTapes'](_0x4f447e,_0x394893){let _0x234324=[],_0x178e78=0x0,_0x122f71=0x0;for(;_0x178e78<_0x4f447e['length']||_0x122f71<_0x394893['length'];){const _0x5cf701=_0x4f447e[_0x178e78]||{},_0x27c37b=_0x394893[_0x122f71]||{};if(_0x5cf701['id']==_0x27c37b['id'])_0x178e78++,_0x122f71++,_0x234324['push'](_0x5cf701);else{if(_0x27c37b['isRemoved']&&_0x5cf701['isAdded']){const {commonTape:_0x353eda,iEnd:_0x5338be,jEnd:_0x4e15ba}=this['_threeWayMerge'](_0x4f447e,_0x178e78,_0x394893,_0x122f71);_0x234324=_0x234324['concat'](_0x353eda),_0x178e78=_0x5338be,_0x122f71=_0x4e15ba;}else _0x27c37b['isRemoved']?(_0x122f71++,_0x234324['push'](_0x27c37b)):(_0x178e78++,_0x234324['push'](_0x5cf701));}}return _0x234324;}['_markSuggestions'](_0x5c1040,_0xde7418){const _0x3a85a2=[];for(let _0x5801dd=0x0;_0x5801dd<_0x5c1040['length'];_0x5801dd++){for(let _0x419b3a=0x0;_0x419b3a<_0x5c1040[_0x5801dd]['markersStart']['length'];_0x419b3a++){const _0x4f267b=_0x5c1040[_0x5801dd]['markersStart'][_0x419b3a];if(!_0xde7418['has'](_0x4f267b))continue;const {group:_0x24f882,type:_0x1b8495,authorId:_0x25189a}=_0x52d987(_0x4f267b);'revision-suggestion'!=_0x24f882||'insertion'!=_0x1b8495&&'deletion'!=_0x1b8495||(_0x3a85a2['unshift']({'type':_0x1b8495,'name':_0x4f267b,'userId':_0x25189a}),_0x5c1040[_0x5801dd]['markersStart']['splice'](_0x419b3a,0x1),_0x419b3a--);}_0x292c9d(_0x5c1040[_0x5801dd]);for(let _0x210168=0x0;_0x210168<_0x5c1040[_0x5801dd]['markersEnd']['length'];_0x210168++){const _0x2c812d=_0x5c1040[_0x5801dd]['markersEnd'][_0x210168];if(!_0xde7418['has'](_0x2c812d))continue;const {group:_0x38a158,type:_0x32cdb3}=_0x52d987(_0x2c812d);if('revision-suggestion'!=_0x38a158||'insertion'!=_0x32cdb3&&'deletion'!=_0x32cdb3)continue;_0x5c1040[_0x5801dd]['markersEnd']['splice'](_0x210168,0x1),_0x210168--;const _0x4fcc76=_0x3a85a2['findIndex'](_0x1da603=>_0x1da603['name']==_0x2c812d);_0x4fcc76>-0x1&&_0x3a85a2['splice'](_0x4fcc76,0x1);}}function _0x52d987(_0x315a17){const _0x2f3dfa=_0x315a17['split'](':');return{'group':_0x2f3dfa[0x0],'type':_0x2f3dfa[0x1],'subType':_0x2f3dfa['length']>=0x5?_0x2f3dfa[0x2]:null,'id':_0x2f3dfa['length']<0x5?_0x2f3dfa[0x2]:_0x2f3dfa[0x3],'authorId':_0x2f3dfa['length']<0x5?_0x2f3dfa[0x3]:_0x2f3dfa[0x4],'markerCount':0x6==_0x2f3dfa['length']?_0x2f3dfa[0x5]:null};}function _0x292c9d(_0x976a49){for(let _0x1ef8b1=0x0;_0x1ef8b1<_0x3a85a2['length'];_0x1ef8b1++){if(_0x976a49['isAdded']&&'insertion'==_0x3a85a2[_0x1ef8b1]['type'])return _0x976a49['isAddSuggestion']=_0x3a85a2[_0x1ef8b1],void delete _0x976a49['isAdded'];if(!_0x976a49['isAdded']&&!_0x976a49['isRemoved']&&'deletion'==_0x3a85a2[_0x1ef8b1]['type'])return void(_0x976a49['isRemoveSuggestion']=_0x3a85a2[_0x1ef8b1]);}}}['_setDistance'](_0x2e9293,_0x59d8c5){let _0x3ec34e=0x0,_0x44b138=!0x1;const _0x5ce7b0=new Map();for(const _0x288f8a of _0x2e9293)_0x288f8a[_0x59d8c5]?_0x44b138&&(_0x3ec34e++,_0x44b138=!0x1):(_0x3ec34e++,_0x44b138=!0x0),_0x5ce7b0['set'](_0x288f8a['id'],_0x3ec34e);for(let _0x493c1c=0x0;_0x493c1c<_0x2e9293['length'];_0x493c1c++){if('isRemoved'==_0x59d8c5&&_0x2e9293[_0x493c1c]['isAdded']||'isAdded'==_0x59d8c5&&_0x2e9293[_0x493c1c]['isRemoved'])continue;if('text'==_0x2e9293[_0x493c1c]['type']){_0x2e9293[_0x493c1c]['distance']=0x0;continue;}const _0x397ec2=_0x5ce7b0['get'](_0x2e9293[_0x493c1c]['pairId']),_0x2018c7=_0x5ce7b0['get'](_0x2e9293[_0x493c1c]['id']);_0x2e9293[_0x493c1c]['distance']=_0x397ec2-_0x2018c7;}}['_getRevisionsRange'](_0x2703f5,_0x1c51bb,_0x49814a=!0x1){const _0x39c783=[];let _0xc578ad=this['repository']['getIndex'](_0x2703f5),_0xe02c15=this['repository']['getIndex'](_0x1c51bb);for(-0x1==_0xe02c15&&(_0xe02c15=this['repository']['_revisions']['length'],_0x49814a=!0x1);_0xc578ad<_0xe02c15;)_0x39c783['push'](this['repository']['getRevision'](_0xc578ad)),_0xc578ad++;return _0x49814a&&_0x39c783['push'](this['repository']['getRevision'](_0xc578ad)),_0x39c783;}['_threeWayMerge'](_0x11da4c,_0x220e68,_0x21f30f,_0xb18f23){const _0x37ec90=this['editor']['model']['schema'];let _0x53a284=_0x220e68;for(;_0x11da4c[_0x53a284]&&_0x11da4c[_0x53a284]['isAdded'];)_0x53a284++;let _0x55f4a8=_0xb18f23;for(;_0x21f30f[_0x55f4a8]&&_0x21f30f[_0x55f4a8]['isRemoved'];)_0x55f4a8++;_0x1c8c63(_0x11da4c,_0x220e68,_0x53a284),_0x1c8c63(_0x21f30f,_0xb18f23,_0x55f4a8);const _0x548c43=_0x21f30f['slice'](_0xb18f23,_0x55f4a8)['concat'](_0x11da4c['slice'](_0x220e68,_0x53a284));return _0x548c43['sort']((_0x410163,_0x55ea9a)=>_0x410163['side']!=_0x55ea9a['side']?_0x410163['side']-_0x55ea9a['side']:_0x410163['level']!=_0x55ea9a['level']?_0x410163['level']-_0x55ea9a['level']:_0x410163['distance']!=_0x55ea9a['distance']?_0x55ea9a['distance']-_0x410163['distance']:!!_0x410163['isAdded']!=!!_0x55ea9a['isAdded']?-0x1==_0x410163['side']||0x0==_0x410163['side']?_0x410163['isAdded']?-0x1:0x1:_0x410163['isAdded']?0x1:-0x1:_0x410163['index']-_0x55ea9a['index']),{'commonTape':_0x548c43,'iEnd':_0x53a284,'jEnd':_0x55f4a8};function _0x1c8c63(_0x59e832,_0x4ace66,_0x17b09b){let _0x1c7dba=-0x1,_0x1f1cdc=Number['POSITIVE_INFINITY'],_0xca3305=!0x0;for(let _0x67da70=_0x4ace66;_0x67da70<_0x17b09b;_0x67da70++)if(_0x37ec90['isInline'](_0x59e832[_0x67da70]['item'])||(_0xca3305=!0x1),_0x59e832[_0x67da70]['item']['startIndex']<_0x4ace66&&(_0x1c7dba=_0x67da70),_0x59e832[_0x67da70]['item']['endIndex']>=_0x17b09b){_0x1f1cdc=_0x67da70;break;}_0xca3305&&(_0x1c7dba=_0x17b09b-0x1);for(let _0xc961b=_0x4ace66;_0xc961b<_0x17b09b;_0xc961b++)_0x59e832[_0xc961b]['side']=_0xc961b<=_0x1c7dba?-0x1:_0xc961b<_0x1f1cdc?0x0:0x1,_0x59e832[_0xc961b]['index']=_0xc961b;let _0x5254f7=0x0;for(let _0x275395=_0x4ace66;_0x275395<=_0x1c7dba;_0x275395++)0x0==_0x59e832[_0x275395]['distance']?_0x59e832[_0x275395]['level']=_0x5254f7:(_0x5254f7++,_0x59e832[_0x275395]['level']=_0x5254f7,_0x5254f7++);for(let _0x239f69=_0x4ace66;_0x239f69<_0x17b09b;_0x239f69++)0x0==_0x59e832[_0x239f69]['side']&&(_0x59e832[_0x239f69]['level']=_0x5254f7);_0x5254f7=0x0;for(let _0x46d031=_0x17b09b-0x1;_0x46d031>=_0x1f1cdc;_0x46d031--)0x0==_0x59e832[_0x46d031]['distance']?_0x59e832[_0x46d031]['level']=_0x5254f7:(_0x5254f7--,_0x59e832[_0x46d031]['level']=_0x5254f7,_0x5254f7--);}}['_fixObsoleteTags'](_0x3dcdd3){const _0x3e228e=new Map(),_0x50b8d4=this['editor']['model']['schema'];for(let _0x1704c4=0x1;_0x1704c4<_0x3dcdd3['length'];_0x1704c4++){let _0x445af1,_0x12260b,_0x86084;const _0x5d3281=_0x3dcdd3[_0x1704c4],_0x1bba94=_0x3dcdd3[_0x1704c4-0x1];if('text'==_0x5d3281['type'])continue;if(_0x5d3281['type']!=_0x1bba94['type'])continue;if(!_0x50b8d4['isBlock'](_0x1bba94['item'])||_0x50b8d4['isLimit'](_0x1bba94['item']))continue;if(!_0x50b8d4['isBlock'](_0x5d3281['item'])||_0x50b8d4['isLimit'](_0x5d3281['item']))continue;if((_0x3dcdd3[_0x1704c4]['isAdded']||_0x3dcdd3[_0x1704c4]['isAddSuggestion'])&&_0x3dcdd3[_0x1704c4-0x1]['isRemoved'])_0x445af1=_0x3dcdd3[_0x1704c4],_0x12260b=_0x3dcdd3[_0x1704c4-0x1],_0x86084=_0x1704c4-0x1;else{if(!_0x3dcdd3[_0x1704c4]['isRemoved']||!_0x3dcdd3[_0x1704c4-0x1]['isAdded']&&!_0x3dcdd3[_0x1704c4-0x1]['isAddSuggestion'])continue;_0x445af1=_0x3dcdd3[_0x1704c4-0x1],_0x12260b=_0x3dcdd3[_0x1704c4],_0x86084=_0x1704c4;}const _0x437dc2=_0x445af1['level']==_0x12260b['level'],_0x4a471d=Math['abs'](_0x445af1['level'])<Math['abs'](_0x12260b['level'])&&0x0==_0x12260b['distance'];(_0x437dc2||_0x4a471d)&&(_0x3e228e['set'](_0x12260b['id'],_0x445af1['id']),_0x3dcdd3['splice'](_0x86084,0x1),_0x1704c4--,_0x445af1['isAdded']=!0x1);}for(let _0x328acf=0x0;_0x328acf<_0x3dcdd3['length'];_0x328acf++)_0x3e228e['has'](_0x3dcdd3[_0x328acf]['pairId'])&&(_0x3dcdd3[_0x328acf]['pairId']=_0x3e228e['get'](_0x3dcdd3[_0x328acf]['pairId']));}['_removeMissingPairs'](_0x2745c9){const _0x1b9ece=new Set(_0x2745c9['map'](_0x54689a=>_0x54689a['id']));for(let _0x18231d=0x0;_0x18231d<_0x2745c9['length'];_0x18231d++)_0x1b9ece['has'](_0x2745c9[_0x18231d]['pairId'])||0x0==_0x2745c9[_0x18231d]['distance']||(_0x2745c9[_0x18231d]['isIncorrect']=!0x0);return _0x2745c9['filter'](_0x4f962e=>!_0x4f962e['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5ee6d9){const _0x5b0ae0=new Set();for(let _0x5ec6eb=0x0;_0x5ec6eb<_0x5ee6d9['length'];_0x5ec6eb++){if(_0x5b0ae0['has'](_0x5ee6d9[_0x5ec6eb]['id'])&&_0x5ee6d9[_0x5ec6eb]['isRemoved']&&(_0x5ee6d9[_0x5ec6eb]['isIncorrect']=!0x0),_0x5ee6d9[_0x5ec6eb]['isIncorrect'])continue;if(0x0==_0x5ee6d9[_0x5ec6eb]['distance'])continue;if('elementStart'!=_0x5ee6d9[_0x5ec6eb]['type'])continue;if(null==_0x5ee6d9[_0x5ec6eb]['pairId'])continue;let _0x19f9b6=_0x5ec6eb+0x1,_0x156982=0x0;for(;_0x5ee6d9[_0x19f9b6]['id']!=_0x5ee6d9[_0x5ec6eb]['pairId'];)'elementStart'==_0x5ee6d9[_0x19f9b6]['type']?_0x156982++:'elementEnd'==_0x5ee6d9[_0x19f9b6]['type']&&_0x156982--,_0x19f9b6++;if(0x0!=_0x156982){if(_0x5ee6d9[_0x5ec6eb]['isRemoved'])_0x5ee6d9[_0x5ec6eb]['isIncorrect']=!0x0;else{for(;_0x19f9b6!=_0x5ec6eb;)_0x5ee6d9[_0x19f9b6]['isRemoved']&&0x0!=_0x5ee6d9[_0x19f9b6]['distance']&&(_0x5ee6d9[_0x19f9b6]['isIncorrect']=!0x0,_0x5b0ae0['add'](_0x5ee6d9[_0x19f9b6]['pairId'])),_0x19f9b6--;}}}return _0x5ee6d9['filter'](_0x149292=>!_0x149292['isIncorrect']);}['_removeUnsupportedChanges'](_0x50f04c){const _0x18a8dc=this['editor']['model']['schema'];for(let _0xf1a422=0x0;_0xf1a422<_0x50f04c['length'];_0xf1a422++){if(!(_0x50f04c[_0xf1a422]['isAdded']||_0x50f04c[_0xf1a422]['isAddSuggestion']||_0x50f04c[_0xf1a422]['isRemoved']||_0x50f04c[_0xf1a422]['isRemoveSuggestion']))continue;if(0x0==_0x50f04c[_0xf1a422]['distance'])continue;const _0x43a8fd=_0x50f04c[_0xf1a422]['item'];_0x18a8dc['isBlock'](_0x43a8fd)||_0x18a8dc['isLimit'](_0x43a8fd)||(_0x50f04c[_0xf1a422]['isAdded']&&delete _0x50f04c[_0xf1a422]['isAdded'],_0x50f04c[_0xf1a422]['isAddSuggestion']&&delete _0x50f04c[_0xf1a422]['isAddSuggestion'],_0x50f04c[_0xf1a422]['isRemoveSuggestion']&&delete _0x50f04c[_0xf1a422]['isRemoveSuggestion'],_0x50f04c[_0xf1a422]['isRemoved']&&(_0x50f04c[_0xf1a422]['isIncorrect']=!0x0));}return _0x50f04c['filter'](_0x5dae4f=>!_0x5dae4f['isIncorrect']);}['_makeModelFromTape'](_0x370866,_0x1be07d,_0x4d5cf6){const _0xd894ac=new mt(),_0x3c9350=[],_0x2f96c1=new Map(),_0x8b49f=this['editor']['model'],_0x42bff5=_0x8b49f['schema'],_0x5ca820=[_0xd894ac],_0xed0383={},_0x1f4ec4={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4760a2=null;const _0x308b2f=[0x0];for(let _0x3c998d=0x0;_0x3c998d<_0x370866['length'];_0x3c998d++)if('elementStart'===_0x370866[_0x3c998d]['type']){_0x370866[_0x3c998d]['previousPosition']=_0x8b49f['createPositionFromPath'](_0xd894ac,_0x308b2f);const _0x2869fe=new ft(_0x370866[_0x3c998d]['item']['name'],_0x370866[_0x3c998d]['item']['getAttributes']());_0x5ca820[0x0]['_appendChild'](_0x2869fe),_0x308b2f['push'](0x0),_0x5ca820['unshift'](_0x2869fe),_0x370866[_0x3c998d]['nextPosition']=_0x8b49f['createPositionFromPath'](_0xd894ac,_0x308b2f);}else'elementEnd'===_0x370866[_0x3c998d]['type']?(_0x5ca820['shift'](),_0x370866[_0x3c998d]['previousPosition']=_0x8b49f['createPositionFromPath'](_0xd894ac,_0x308b2f),_0x308b2f['pop'](),_0x308b2f[_0x308b2f['length']-0x1]++,_0x370866[_0x3c998d]['nextPosition']=_0x8b49f['createPositionFromPath'](_0xd894ac,_0x308b2f)):(_0x370866[_0x3c998d]['previousPosition']=_0x8b49f['createPositionFromPath'](_0xd894ac,_0x308b2f),_0x4760a2?_0x4760a2['_data']+=_0x370866[_0x3c998d]['item']['data']:_0x4760a2=new wt(_0x370866[_0x3c998d]['item']['data'],_0x370866[_0x3c998d]['item']['getAttributes']()),_0x370866[_0x3c998d+0x1]&&'text'===_0x370866[_0x3c998d+0x1]['type']&&_0x288551(_0x4760a2,_0x370866[_0x3c998d+0x1]['item'])||(_0x5ca820[0x0]['_appendChild'](_0x4760a2),_0x4760a2=null),_0x308b2f[_0x308b2f['length']-0x1]+=_0x370866[_0x3c998d]['item']['offsetSize'],_0x370866[_0x3c998d]['nextPosition']=_0x8b49f['createPositionFromPath'](_0xd894ac,_0x308b2f));for(let _0x53db4c=0x0;_0x53db4c<_0x370866['length'];_0x53db4c++){const _0x166ea9=_0x370866[_0x53db4c]['previousPosition'],_0x298ab3=_0x370866[_0x53db4c]['nextPosition'];for(const _0x2595fd of _0x370866[_0x53db4c]['markersStart'])_0x2f96c1['set'](_0x2595fd,{'start':_0x166ea9,'end':null});_0x17011e('isRemoveSuggestion',_0x53db4c,_0x166ea9,_0x298ab3),_0x17011e('isAddSuggestion',_0x53db4c,_0x166ea9,_0x298ab3),_0x17011e('isRemoved',_0x53db4c,_0x166ea9,_0x298ab3),_0x17011e('isAdded',_0x53db4c,_0x166ea9,_0x298ab3);for(const _0x3d83b7 of _0x370866[_0x53db4c]['markersEnd']){_0x2f96c1['get'](_0x3d83b7)['end']=_0x298ab3;}}for(const [_0x43a262,_0x50f352]of _0x2f96c1){const _0x4482ff=this['editor']['model']['createRange'](_0x50f352['start'],_0x50f352['end']);_0xd894ac['markers']['set'](_0x43a262,_0x4482ff);}return _0x3c9350['sort']((_0x398557,_0x57a263)=>{const _0x48a18e=_0xd894ac['markers']['get']('revision:'+_0x398557['id']),_0x5d9fa5=_0xd894ac['markers']['get']('revision:'+_0x57a263['id']);return _0x48a18e['start']['isBefore'](_0x5d9fa5['start'])?-0x1:_0x48a18e['start']['isAfter'](_0x5d9fa5['start'])?0x1:_0x48a18e['end']['isBefore'](_0x5d9fa5['end'])?-0x1:_0x48a18e['end']['isAfter'](_0x5d9fa5['end'])?0x1:'add'===_0x398557['type']?-0x1:0x1;}),{'root':_0xd894ac,'changes':_0x3c9350};function _0x17011e(_0x2b26aa,_0x3ce359,_0x271a91,_0x528d0d){const _0x36da18=!!_0x370866[_0x3ce359][_0x2b26aa],_0xc6032e=_0x36da18?_0x370866[_0x3ce359][_0x2b26aa]['userId']:null,_0x23936d=_0x3ce359===_0x370866['length']-0x1,_0x3886d1=_0x1f4ec4[_0x2b26aa][0x0],_0x2e025e=_0x42bff5['isObject'](_0x370866[_0x3ce359]['item']);!_0xed0383[_0x2b26aa]&&_0x36da18?_0xed0383[_0x2b26aa]={'start':_0x271a91,'tapeItem':_0x370866[_0x3ce359],'userId':_0xc6032e,'type':_0x2b26aa}:_0xed0383[_0x2b26aa]&&!_0x36da18?(_0xed0383[_0x2b26aa]['end']=_0x271a91,_0x481700(_0xed0383[_0x2b26aa]),_0xed0383[_0x2b26aa]=null):_0xed0383[_0x2b26aa]&&_0x36da18&&_0xed0383[_0x2b26aa]['userId']!==_0xc6032e&&(_0xed0383[_0x2b26aa]['end']=_0x271a91,_0x3886d1&&_0x3886d1['userId']===_0xed0383[_0x2b26aa]['userId']||_0x481700(_0xed0383[_0x2b26aa]),_0xed0383[_0x2b26aa]={'start':_0x271a91,'tapeItem':_0x370866[_0x3ce359],'userId':_0xc6032e,'type':_0x2b26aa}),_0xed0383[_0x2b26aa]&&_0x2e025e&&('elementStart'!==_0x370866[_0x3ce359]['type']||_0x3886d1&&_0x3886d1['userId']===_0xc6032e||_0x1f4ec4[_0x2b26aa]['unshift']({'userId':_0xc6032e,'object':_0x370866[_0x3ce359]['item'],'change':_0xed0383[_0x2b26aa]}),'elementEnd'===_0x370866[_0x3ce359]['type']&&_0x3886d1&&_0x3886d1['object']===_0x370866[_0x3ce359]['item']&&(_0x1f4ec4[_0x2b26aa]['shift'](),_0xed0383[_0x2b26aa]=_0x3886d1['change'])),_0xed0383[_0x2b26aa]&&_0x23936d&&(_0xed0383[_0x2b26aa]['end']=_0x528d0d,_0x481700(_0xed0383[_0x2b26aa]),_0xed0383[_0x2b26aa]=null);}function _0x481700({start:_0x23b4a3,end:_0x143002,tapeItem:_0x20d3c6,userId:_0x1f7704,type:_0x14a922}){const _0x3eebaa=_0x20d3c6['item'],_0x376dc7=_0x8b49f['schema']['isBlock'](_0x3eebaa)&&!_0x8b49f['schema']['isLimit'](_0x3eebaa),_0x44d510=_0x23b4a3['nodeAfter']==_0x143002['parent']&&_0x143002['isAtStart'];if(_0x376dc7&&_0x44d510)return;const _0x2b2e9f=_0x8b49f['createRange'](_0x23b4a3,_0x143002),_0x502a16=_0x1be07d['get'](_0x1f7704),_0x129d2d=new r({'author':_0x502a16,'type':'isAdded'==_0x14a922||'isAddSuggestion'==_0x14a922?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x14a922||'isRemoveSuggestion'==_0x14a922},'createdAt':new Date(),'rootName':_0x4d5cf6});_0x3c9350['push'](_0x129d2d),_0xd894ac['markers']['set']('revision:'+_0x129d2d['id'],_0x2b2e9f);}function _0x288551(_0x9b9b66,_0x53deb3){const _0xf42815=_0x9b9b66['getAttributes'](),_0x263ca4=_0x53deb3['getAttributes']();for(const _0x17b3a7 of _0xf42815){if(_0x17b3a7[0x1]!==_0x53deb3['getAttribute'](_0x17b3a7[0x0]))return!0x1;_0x263ca4['next']();}return _0x263ca4['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x28fb97=>{const _0x217ba5=_0x28fb97['markerName']['split'](':')[0x1],_0x3c1539=this['_getChangeFromId'](_0x217ba5);if(!_0x3c1539)return null;const _0x48f408='add'==_0x3c1539['type']?'insertion':'deletion',_0x371ceb=['ck-suggestion-marker','ck-suggestion-marker-'+_0x48f408];return _0x3c1539['data']['isSuggestion']&&_0x371ceb['push']('ck-suggestion-marker-'+_0x48f408+'-new'),this['activeChange']==_0x3c1539&&_0x371ceb['push']('ck-suggestion-marker--active'),{'classes':_0x371ceb,'attributes':{'data-change-id':_0x217ba5}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x51f6c1=>{_0x51f6c1['on']('element:pre',(_0x1963da,_0x324505,_0x43d968)=>{const _0x28ed9b=_0x324505['viewItem']['getChild'](0x0);if(!_0x28ed9b||!_0x28ed9b['is']('element','code'))return;if(!_0x43d968['consumable']['consume'](_0x28ed9b,{'attributes':['vid_start','vid_end']}))return;const _0x57e479=_0x324505['modelRange']['start']['nodeAfter'];_0x43d968['writer']['setAttribute']('vid_start',_0x28ed9b['getAttribute']('vid_start'),_0x57e479),_0x43d968['writer']['setAttribute']('vid_end',_0x28ed9b['getAttribute']('vid_end'),_0x57e479);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x277100=>{_0x277100['on']('element',(_0x1c7be8,_0x89edec,_0x2bef3e)=>{if(!_0x2bef3e['consumable']['consume'](_0x89edec['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x89edec['modelRange']['isCollapsed'])return;const _0x512abd=_0x89edec['modelRange']['start']['nodeAfter'];_0x512abd['hasAttribute']('vid_start')||_0x512abd['hasAttribute']('vid')||(_0x2bef3e['writer']['setAttribute']('vid_start',_0x89edec['viewItem']['getAttribute']('vid_start'),_0x512abd),_0x2bef3e['writer']['setAttribute']('vid_end',_0x89edec['viewItem']['getAttribute']('vid_end'),_0x512abd));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xa13486=>_0xa13486['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x26d8b3,[,_0x154131])=>{['vid_start','vid_end','vid']['includes'](_0x154131)&&(_0x26d8b3['return']=!0x0,_0x26d8b3['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4d9fe1=>{_0x4d9fe1['on']('attribute:vid',(_0x435dd2,_0x5dcb2c,_0x19e65c)=>{if('\x20'!=_0x5dcb2c['item']['data']||_0x5dcb2c['item']['parent']['maxOffset']>0x1)return;if(!_0x19e65c['consumable']['consume'](_0x5dcb2c['item'],_0x435dd2['name']))return;const _0x183800=_0x19e65c['writer'],_0x5234ea=_0x19e65c['mapper']['toViewRange'](_0x5dcb2c['range']);_0x183800['wrap'](_0x5234ea,_0x183800['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x18177f){const _0x5b94c6=_0x18177f['plugins']['get']('RevisionViewer');return(_0x242e52,_0x517b0e,_0x4d31ac)=>{const _0x2e63af=_0x517b0e['markerName']['split'](':')[0x1],_0x5c1511=_0x5b94c6['_getChangeFromId'](_0x2e63af);if(!_0x5c1511)return null;const _0x64e25='add'==_0x5c1511['type']?'split':'merge';if(!_0x4d31ac['consumable']['test'](_0x517b0e['markerRange'],_0x242e52['name']))return;const _0x2c6f86=_0x517b0e['markerRange']['getWalker'](),_0x10dac2=_0x517b0e['markerRange']['start'],_0x252169=_0x18177f['model']['schema'];let _0x3e1e4d=null,_0x2dc0a8=null,_0x192f27=!0x1,_0xd285a=!0x1;for(const _0x25f045 of _0x2c6f86){const _0xd0893=_0x25f045['item'];_0x192f27=_0x192f27||_0x252169['isContent'](_0xd0893);const _0x24f594=_0x4d31ac['mapper']['toViewElement'](_0xd0893);if(_0x24f594&&_0x24f594['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x25f045['type']&&(_0x252169['isBlock'](_0xd0893)&&!_0x252169['isLimit'](_0xd0893)&&(_0xd0893['nextSibling']||_0x10dac2['isAtEnd']?_0x3e1e4d&&_0x3e1e4d['parent']==_0xd0893||(_0x3e1e4d=_0xd0893,_0x122bb0(_0x25f045['previousPosition']),_0xd285a=!0x0):_0x2dc0a8=_0x2dc0a8||_0x25f045['previousPosition']));}function _0x122bb0(_0xdcba9a){const _0x544d5d=_0x4d31ac['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x64e25}),_0x1ba957=_0x4d31ac['mapper']['toViewPosition'](_0xdcba9a);_0x5c1511['data']['isSuggestion']&&_0x4d31ac['writer']['addClass']('ck-suggestion-marker-'+_0x64e25+'-new',_0x544d5d),_0x5b94c6['activeChange']==_0x5c1511&&_0x4d31ac['writer']['addClass']('ck-suggestion-marker--active',_0x544d5d),_0x4d31ac['writer']['insert'](_0x1ba957,_0x544d5d),_0x4d31ac['mapper']['bindElementToMarker'](_0x544d5d,_0x517b0e['markerName']);}_0x192f27||_0xd285a||!_0x2dc0a8||_0x122bb0(_0x2dc0a8);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2fdc80,_0x522e0f,_0x5a82b3)=>{const _0x24b559=_0x5a82b3['mapper']['markerNameToElements'](_0x522e0f['markerName']);if(_0x24b559){for(const _0x29c084 of _0x24b559)(_0x29c084['hasClass']('ck-suggestion-marker-split')||_0x29c084['hasClass']('ck-suggestion-marker-merge'))&&(_0x5a82b3['mapper']['unbindElementFromMarkerName'](_0x29c084,_0x522e0f['markerName']),_0x5a82b3['writer']['remove'](_0x29c084));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x26695a,_0x221613,_0x3b2786)=>{const _0x1c47a7=_0x221613['markerName']['split'](':')[0x1],_0x105099=this['_getChangeFromId'](_0x1c47a7);if(!_0x105099)return null;const _0x25c79c='add'==_0x105099['type']?'split':'merge';if(_0x3b2786['consumable']['test'](_0x221613['markerRange'],_0x26695a['name']))for(const _0x4bdd43 of _0x221613['markerRange']['getItems']()){if(!_0x4bdd43['is']('element','softBreak'))continue;const _0x3652c7=_0x3b2786['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x25c79c}),_0x245498=_0x3b2786['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4bdd43));_0x105099['data']['isSuggestion']&&_0x3b2786['writer']['addClass']('ck-suggestion-marker-'+_0x25c79c+'-new',_0x3652c7),this['activeChange']==_0x105099&&_0x3b2786['writer']['addClass']('ck-suggestion-marker--active',_0x3652c7),_0x3b2786['writer']['insert'](_0x245498,_0x3652c7),_0x3b2786['mapper']['bindElementToMarker'](_0x3652c7,_0x221613['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x442a4b=>{for(const _0x2bc1a5 of this['editor']['model']['document']['getRootNames']()){const _0x56632e=this['editor']['model']['document']['getRoot'](_0x2bc1a5),_0x31707d=this['editor']['editing']['view']['document']['getRoot'](_0x2bc1a5);if(_0x31707d){const _0xf2a0a0=_0x56632e['getAttribute']('revisionHistoryAttachChange');if(_0x442a4b['removeAttribute']('data-change-id',_0x31707d),_0x442a4b['removeClass']('ck-revision-history-root-add',_0x31707d),_0x442a4b['removeClass']('ck-revision-history-root-remove',_0x31707d),_0x442a4b['removeClass']('ck-revision-history-root--active',_0x31707d),_0xf2a0a0){const _0x3fe25b=this['_getChangeFromId'](_0xf2a0a0);if(!_0x3fe25b)return null;_0x442a4b['setAttribute']('data-change-id',_0xf2a0a0,_0x31707d),_0x442a4b['addClass']('ck-revision-history-root-'+_0x3fe25b['type'],_0x31707d),this['activeChange']==_0x3fe25b&&_0x442a4b['addClass']('ck-revision-history-root--active',_0x31707d);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x54bec4=>'revision-comment:'+_0x54bec4,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x4ae1ea=>'revision-suggestion:'+_0x4ae1ea,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1d263e=>({'name':'suggestion:'+_0x1d263e,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x51a009=>{const _0x58fa81=_0x51a009['markerName']['split'](':')[0x1];return'insertion'!=_0x58fa81&&'deletion'!=_0x58fa81?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x58fa81]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1e2c96,_0x330327,_0xa459e6)=>{const _0x50c4ad=_0xa459e6['mapper']['markerNameToElements'](_0x330327['markerName']);if(_0x50c4ad){for(const _0x3debdd of _0x50c4ad)_0x3debdd['is']('uiElement')&&(_0xa459e6['mapper']['unbindElementFromMarkerName'](_0x3debdd,_0x330327['markerName']),_0xa459e6['writer']['remove'](_0x3debdd));}},{'priority':'high'});}['_getChangeFromId'](_0x5c7d49){return this['_changeIdToChange']['get'](_0x5c7d49);}['_getViewForChange'](_0xba1418){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0xba1418),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x19aa54,_0x5501cf,_0x1a7fc1,_0x568220)=>{_0x568220&&this['_balloon']['remove'](_0x568220),_0x1a7fc1&&(this['_balloon']['add']({'view':_0x1a7fc1,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x35267a=this['editor']['editing'],_0x3f6311=this['_getChangeFromId'](_0x1a7fc1['changeId']);let _0x9fca94;if(_0x3f6311['data']['isOnRoot']){const _0x59a215=_0x35267a['view']['getDomRoot'](_0x3f6311['rootName']);_0x9fca94=Array['from'](_0x59a215['getClientRects']());}else{const _0xf9bb5c=this['editor']['model']['markers']['get']('revision:'+_0x1a7fc1['changeId']);_0x9fca94=Array['from'](_0x35267a['mapper']['markerNameToElements'](_0xf9bb5c['name']))['map'](_0x35d034=>_0x35267a['view']['domConverter']['mapViewToDom'](_0x35d034))['map'](_0x145c73=>Array['from'](_0x145c73['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x9fca94[0x0];return _0x9fca94['find'](_0x469fe5=>_0x469fe5['top']-0x3<=this['_activeViewTarget']['y']&&_0x469fe5['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x469fe5['left']-0x3<=this['_activeViewTarget']['x']&&_0x469fe5['right']+0x3>=this['_activeViewTarget']['x'])||_0x9fca94[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x193409,_0x46380a,_0x2b6272,_0x2d5ce2)=>{this['activeView']=_0x2b6272?this['_getViewForChange'](_0x2b6272):null,this['editor']['model']['change'](()=>{const _0x75af93=this['editor']['editing'];_0x2d5ce2&&(_0x2d5ce2['data']['isOnRoot']?_0x75af93['view']['change'](_0x59e106=>{_0x59e106['removeClass']('ck-revision-history-root--active',_0x75af93['view']['document']['getRoot'](_0x2d5ce2['rootName']));}):_0x75af93['reconvertMarker']('revision:'+_0x2d5ce2['id'])),_0x2b6272&&(_0x2b6272['data']['isOnRoot']?_0x75af93['view']['change'](_0x591392=>{_0x591392['addClass']('ck-revision-history-root--active',_0x75af93['view']['document']['getRoot'](_0x2b6272['rootName']));}):_0x75af93['reconvertMarker']('revision:'+_0x2b6272['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x42587d,_0x472ee1)=>{if(this['activeChange'])return;const _0x570098=this['_findChangeIdFromDomTarget'](_0x472ee1['target']),_0x29fa2c=this['_changeIdToChange']['get'](_0x570098);_0x29fa2c?(this['_activeViewTarget']={'x':_0x472ee1['domEvent']['x'],'y':_0x472ee1['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x29fa2c)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x1d710a,_0xe8eb81)=>{const _0x355786=this['_findChangeIdFromDomTarget'](_0xe8eb81['target']),_0x339fe2=this['_changeIdToChange']['get'](_0x355786);_0x339fe2?(this['_activeViewTarget']={'x':_0xe8eb81['domEvent']['x'],'y':_0xe8eb81['domEvent']['y']},_0x339fe2===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x339fe2):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x1f4bab){do{const _0x218320=_0x1f4bab['getAttribute']('data-change-id');if(_0x218320)return _0x218320;_0x1f4bab=_0x1f4bab['parent'];}while(_0x1f4bab);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x267f59=>{for(const _0x1641af of this['editor']['model']['markers'])_0x267f59['removeMarker'](_0x1641af);});}}function Z(_0x3b0be2,_0x5343d9){return(_0x198ec0,_0x4f9faf,_0x5ee3fc)=>{if(!_0x5ee3fc['consumable']['test'](_0x4f9faf['markerRange'],_0x198ec0['name']))return;const _0x10d369=_0x4f9faf['markerRange']['getWalker'](),_0x1a5d9b=_0x4f9faf['markerRange']['start'],_0x3ba82a=_0x3b0be2['model']['schema'];let _0x5af66e=null,_0x25cbba=null,_0x407337=!0x1,_0xc0a013=!0x1;for(const _0x5e1246 of _0x10d369){const _0xb109e2=_0x5e1246['item'];_0x407337=_0x407337||_0x3ba82a['isContent'](_0xb109e2);const _0xffb59f=_0x5ee3fc['mapper']['toViewElement'](_0xb109e2);if(_0xffb59f&&_0xffb59f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5e1246['type']&&(_0x3ba82a['isBlock'](_0xb109e2)&&!_0x3ba82a['isLimit'](_0xb109e2)&&(_0xb109e2['nextSibling']||_0x1a5d9b['isAtEnd']?_0x5af66e&&_0x5af66e['parent']==_0xb109e2||(_0x5af66e=_0xb109e2,_0x1591c5(_0x5e1246['previousPosition']),_0xc0a013=!0x0):_0x25cbba=_0x25cbba||_0x5e1246['previousPosition']));}function _0x1591c5(_0x54d01c){const _0x5bff03=_0x5ee3fc['mapper']['toViewPosition'](_0x54d01c),_0x25c991=_0x5ee3fc['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5343d9});_0x5ee3fc['writer']['insert'](_0x5bff03,_0x25c991),_0x5ee3fc['mapper']['bindElementToMarker'](_0x25c991,_0x4f9faf['markerName']);}_0x407337||_0xc0a013||!_0x25cbba||_0x1591c5(_0x25cbba);};}class _t extends _0x108b4a{constructor(_0x599768){super(_0x599768);const _0x49fa59=_0x599768['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x49fa59,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x49fa59,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x7367be=this['editor'],_0x2c13cc=_0x7367be['plugins']['get'](d),_0x4f0b9c=_0x2c13cc['isReady']?_0x2c13cc['diff']['newRevisionId']:null;_0x7367be['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4f0b9c);}['refresh'](){const {isReady:_0x207af4,isEnabled:_0x10248b,repository:_0x3ce9e1,diff:_0x2b38fc}=this['editor']['plugins']['get'](d),_0x5363c9=_0x2b38fc&&_0x3ce9e1['getLaterVisibleRevision'](_0x2b38fc['newRevisionId']);this['isEnabled']=_0x207af4&&_0x10248b&&Boolean(_0x5363c9);}}class yt extends _0x108b4a{['_step'];constructor(_0x2819fb,{direction:_0xaba2a7}){super(_0x2819fb);const _0x39f845=_0x2819fb['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0xaba2a7?0x1:-0x1,this['listenTo'](_0x39f845,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x39f845,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x39f845,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1f573f=this['editor'],_0x1d6962=_0x1f573f['plugins']['get'](d),{isNavigationMode:_0x567436,currentChangeNumber:_0x29b48f}=_0x1d6962;let _0x479864;if(_0x1d6962['activeChange']=_0x567436?_0x1d6962['diff']['changes']['get'](_0x29b48f+this['_step']):_0x1d6962['diff']['changes']['first'],_0x1d6962['activeChange']['data']['isOnRoot'])_0x479864=_0x1f573f['editing']['view']['getDomRoot'](_0x1d6962['activeChange']['rootName']);else{const _0x953e53=_0x1f573f['model']['markers']['get']('revision:'+_0x1d6962['activeChange']['id']);_0x479864=_0x434e89(_0x1f573f['editing'],_0x953e53);}_0x41c46c({'target':_0x479864,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x8f1333,currentChangeNumber:_0x255e67,numberOfChanges:_0x43f6e1,isReady:_0x37f7d4,isEnabled:_0x20389f}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x20389f&&_0x37f7d4&&_0x43f6e1)&&(!_0x8f1333||(0x1===this['_step']?_0x255e67<_0x43f6e1-0x1:_0x255e67>0x0));}}class _i extends _0x4baf58{constructor(_0x29ac13){super(_0x29ac13);const _0x478b1d=this['bindTemplate'],_0x2a833b=new _0xc6db79(_0x29ac13),_0x593b43=new _0xc6db79(_0x29ac13);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',(_0x93586,_0x14ad12)=>_0x93586&&_0x14ad12>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x526eb4,_0x3d415d,_0x57da0a,_0x5d6856)=>{if(!_0x526eb4)return m(_0x29ac13,'Loading...');if(!_0x57da0a)return m(_0x29ac13,'No\x20changes');const _0x1dfe7b=m(_0x29ac13,'NUMBER_OF_CHANGES',_0x57da0a);return _0x5d6856?m(_0x29ac13,'X_OF_Y_CHANGES',[_0x3d415d+0x1,_0x57da0a]):_0x1dfe7b;}),_0x2a833b['set']({'label':m(_0x29ac13,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x593b43['set']({'label':m(_0x29ac13,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x2a833b['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x593b43['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2a833b['on']('execute',()=>this['fire']('execute','backward')),_0x593b43['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',_0x478b1d['if']('_isStatusLabelVisible','ck-hidden',_0x131a1f=>!_0x131a1f)]},'children':[{'text':_0x478b1d['to']('isNavigationMode',_0x55b980=>_0x55b980?m(_0x29ac13,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x29ac13,'Total')+':\x20')}]},{'text':_0x478b1d['to']('_statusText')}]},new _0x435bd2(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2a833b,_0x593b43]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x31843e{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x216867=this['editor']['editing']['view'];_0x216867['change'](_0xeef354=>{for(const _0x40f2e1 of _0x216867['document']['roots'])_0xeef354['addClass'](ce,_0x40f2e1);});}['hide'](){const _0x14032c=this['editor']['editing']['view'];_0x14032c['change'](_0x2c8733=>{for(const _0x3d3c3e of _0x14032c['document']['roots'])_0x2c8733['removeClass'](ce,_0x3d3c3e);});}}class g extends _0x31843e{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x3a4b43=this['editor'],_0x3d9053=_0x3a4b43['plugins']['get'](d),_0x3f4eaa=_0x3a4b43['plugins']['get'](le);_0x3a4b43['ui']['componentFactory']['add']('exitToEditing',_0x56140e=>{const _0xe29f67=new _0xc6db79(_0x56140e);return _0xe29f67['set']({'label':m(_0x56140e,'Back\x20to\x20editing'),'icon':_0x298223['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xe29f67,'execute',()=>{_0x3a4b43['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xe29f67;}),_0x3a4b43['ui']['componentFactory']['add']('restoreRevision',_0x31f44f=>{const _0x58f0b3=new _0xc6db79(_0x31f44f);return _0x58f0b3['set']({'label':m(_0x31f44f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x58f0b3['bind']('isEnabled')['to'](_0x3a4b43['commands']['get']('restoreRevision')),this['listenTo'](_0x58f0b3,'execute',()=>_0x3a4b43['execute']('restoreRevision')),_0x58f0b3;}),_0x3a4b43['ui']['componentFactory']['add']('changesNavigation',_0x58e2ed=>{const _0x16c6e6=new _i(_0x58e2ed),_0x6ad929=_0x3a4b43['commands']['get']('showPreviousChange'),_0x5d3a57=_0x3a4b43['commands']['get']('showNextChange');return _0x16c6e6['bind']('isBackwardNavigationEnabled')['to'](_0x6ad929,'isEnabled'),_0x16c6e6['bind']('isForwardNavigationEnabled')['to'](_0x5d3a57,'isEnabled'),_0x16c6e6['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3d9053),this['listenTo'](_0x16c6e6,'execute',(_0x1d1f1e,_0xeafba4)=>{_0x3a4b43['execute']('forward'===_0xeafba4?'showNextChange':'showPreviousChange');}),_0x16c6e6;}),_0x3f4eaa['show'](),_0x3d9053['on']('change:isReady',(_0x4c0a62,_0x23a90c,_0x18d90f)=>{_0x18d90f?_0x3f4eaa['hide']():_0x3f4eaa['show']();});}}class pt extends nt{['_resizeObserver']=null;constructor(_0xa6ab03,_0x356d7c){super(_0xa6ab03,_0x356d7c);const _0x5db7e0=this['bindTemplate'];this['set']({'label':m(_0xa6ab03,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0xa6ab03,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5db7e0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x36667b=this['fieldView']['element'];this['_tooltipString']=_0x36667b['scrollWidth']>_0x36667b['clientWidth']&&_0x36667b['value']||'';}}class ti extends _0x4baf58{constructor(_0x1aeac7,_0x2ea3a4,_0x555239){super(_0x1aeac7);const _0x2daec6=new _0x4fddcf();_0x2daec6['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x2ed337=['ck','ck-revision-history-sidebar__revision-author'];_0x555239&&_0x2ed337['push']('ck-revision-history-sidebar__revision-author_creator');const _0x448321=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x1aeac7,_0x555239?'Revision\x20creator':'Revision\x20author')},'children':[_0x2daec6,_0x2ea3a4['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2ed337},'children':_0x448321});}}function ni(_0x209971,_0x589104){const _0x514e44=_0x209971['bindTemplate'],_0x3173b6=_0x209971['locale'],_0x2bfefc=_0x30f2d2(_0x3173b6);_0x2bfefc['panelPosition']='sw';const _0x330d20=function(_0x5138b6,_0x39bedf){const _0x3c0ab4=function(_0x4a63c4,_0x1fc8d4){const _0x142ff6=_0x4a63c4['locale'],_0xd9a417={'Compare\x20against\x20selected':m(_0x142ff6,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x142ff6,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x142ff6,'Restore\x20this\x20revision')};return _0x1fc8d4['map'](_0x263c61=>{const _0x1c4d10=_0xd9a417[_0x263c61['name']];return _0x1c4d10&&_0x1c4d10!==_0x263c61['name']&&(_0x263c61['name']=_0x1c4d10),_0x263c61;});}(_0x5138b6,_0x39bedf),_0x11a0ad=new _0x51fd93();for(const _0x1b3414 of _0x3c0ab4){const _0x27cf49={'type':'button','model':new to({'label':_0x1b3414['name'],'class':_0x1b3414['class'],'withText':!0x0,'role':'menuitem','_action':_0x1b3414['action']})};_0x27cf49['model']['bind']('isEnabled')['to'](_0x5138b6,'isActionsDropdownOpen',_0x32019a=>'function'!=typeof _0x1b3414['isEnabled']||(!_0x32019a||_0x1b3414['isEnabled'](_0x5138b6))),_0x11a0ad['add'](_0x27cf49);}return _0x11a0ad;}(_0x209971,_0x589104);return _0x209971['bind']('isActionsDropdownOpen')['to'](_0x2bfefc,'isOpen'),_0x2bfefc['buttonView']['set']({'label':m(_0x3173b6,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x298223['threeVerticalDots']}),_0x2bfefc['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x514e44['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x514e44['to'](_0x2ed2ce=>_0x2ed2ce['stopPropagation']())}}),_0x2bfefc['on']('execute',_0x737d16=>{_0x209971['isReady']&&'function'==typeof _0x737d16['source']['_action']&&_0x737d16['source']['_action'](_0x209971);}),_0x1b0e10(_0x2bfefc,_0x330d20,{'role':'menu'}),_0x2bfefc['listenTo'](_0x209971,'change:isActionsDropdownOpen',(_0x3776ff,_0x24507e,_0x20035b)=>{if(_0x20035b)for(const _0x4cce62 of _0x2bfefc['listView']['items']){const _0x154b1e=_0x4cce62['children']['first'],_0xe37aae=_0x589104['find'](_0x388e28=>_0x388e28['action']===_0x154b1e['_action'])['isVisible'];_0x4cce62['isVisible']=void 0x0===_0xe37aae||_0xe37aae(_0x209971);}}),_0x2bfefc;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x5d4ea8(_0x4baf58){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x432b4b,_0x37a00b,_0x275943,_0xa119be){super(_0x432b4b);const _0x52c10b=this['bindTemplate'],_0x57b40e=function(_0x528d42,_0x13c30c){const _0x5475f5=Array['from'](_0x13c30c['authors'])['filter'](_0x1fc32e=>_0x1fc32e!=_0x13c30c['creator']);return _0x13c30c['creator']&&_0x5475f5['unshift'](_0x13c30c['creator']),_0x5475f5['map'](_0x578de6=>new ti(_0x528d42,_0x578de6,_0x578de6==_0x13c30c['creator']));}(_0x432b4b,_0x37a00b);this['id']=_0x37a00b['id'],this['_revision']=_0x37a00b,this['_requireRevisionName']=_0xa119be,this['bind']('name','createdAt')['to'](_0x37a00b),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x324575=>{return _0x22fff2=_0x432b4b['uiLanguage'],(_0x244b06=_0x324575)['toLocaleDateString'](_0x22fff2,{'month':'long','day':'numeric'})+',\x20'+_0x244b06['toLocaleTimeString'](_0x22fff2,{'hour':'numeric','minute':'numeric'});var _0x22fff2,_0x244b06;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new pt(_0x432b4b,_0x1ac3e9),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3ff69e=>_0x3ff69e||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0xa5bdb4,_0x11eaf4)=>_0xa5bdb4&&_0x11eaf4),this['revisionActionsView']=_0x275943&&_0x275943['length']?ni(this,_0x275943):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x52c10b['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x52c10b['if']('isEnabled','ck-disabled',_0x2ffe02=>!_0x2ffe02),_0x52c10b['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x52c10b['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x52c10b['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':_0x52c10b['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':_0x57b40e}]},this['revisionActionsView']],'on':{'click':_0x52c10b['to'](_0x308a63=>{_0x308a63['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x41b5ce=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x41b5ce,'change',()=>{this['_requireRevisionName']&&!_0x41b5ce['value']||this['fire']('setName',{'id':this['id'],'name':_0x41b5ce['value']}),_0x41b5ce['value']||(_0x41b5ce['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x4616e5,_0x1ef8cf){const _0x31922c=_0x3808df['fromJSDate'](_0x4616e5)['setLocale'](_0x1ef8cf),_0x268fa1=_0x3808df['local'](),_0x1e7a02=_0x268fa1['minus']({'days':0x1})['startOf']('day');let _0x5626ec,_0x1925ae;return _0x31922c['hasSame'](_0x268fa1,'day')?(_0x5626ec=_0x31922c['startOf']('day')['toJSDate'](),_0x1925ae=_0x31922c['toRelativeCalendar']()):_0x31922c['hasSame'](_0x1e7a02,'day')?(_0x5626ec=_0x1e7a02['toJSDate'](),_0x1925ae=_0x31922c['toRelativeCalendar']()):_0x31922c['hasSame'](_0x268fa1,'week')?(_0x5626ec=_0x31922c['startOf']('week')['toJSDate'](),_0x1925ae=_0x31922c['weekdayLong']||''):_0x31922c['hasSame'](_0x268fa1,'year')?(_0x5626ec=_0x31922c['startOf']('month')['toJSDate'](),_0x1925ae=_0x31922c['monthLong']||''):(_0x5626ec=_0x31922c['startOf']('year')['toJSDate'](),_0x1925ae=String(_0x31922c['year'])),{'startDate':_0x5626ec,'localizedPeriodName':_0x1925ae};}class mi extends _0x4baf58{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2ef01d,_0x5094fd,_0x5b8403,_0x97e489){super(_0x2ef01d);const _0x36e150=di(_0x5094fd,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x5094fd,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x5b8403,this['_requireRevisionName']=_0x97e489,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':_0x36e150}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2d6946){const _0x2f488a=new ai(this['locale'],_0x2d6946,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2f488a);}['removeRevision'](_0xf5b2a2){const _0x132af1=this['revisionViews']['find'](_0x552883=>_0x552883['id']===_0xf5b2a2['id']);this['revisionViews']['remove'](_0x132af1);}}class as extends _0x4baf58{constructor(_0x18a03b){super(_0x18a03b);const _0x53d31e=new _0x4fddcf();_0x53d31e['content']=_0x298223['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x53d31e,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x18a03b,'Revision\x20history')]}]});}}class ci extends _0x4baf58{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x516eec,_0x48e7c1,_0x35d674,_0x884222){super(_0x516eec);const _0xd85352=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x48e7c1,this['_revisionActions']=_0x35d674,this['_requireRevisionName']=_0x884222,this['on']('select',(_0x2e87a7,_0x2dc9b7)=>{this['fire']('revisionSelected',_0x2dc9b7);}),this['on']('setName',(_0x1b3bcf,_0x2f3a95)=>{this['fire']('revisionSetName',_0x2f3a95);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x516eec),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0xd85352['if']('isEnabled','ck-disabled',_0x42b060=>!_0x42b060)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x65c5cd of this['_revisions'])this['_addRevision'](_0x65c5cd);this['_revisions']['on']('add',(_0x119455,_0x5a5ef6)=>{this['_addRevision'](_0x5a5ef6);}),this['_revisions']['on']('remove',(_0x2a9f9b,_0x78aad4)=>{this['_removeRevision'](_0x78aad4);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x226fb9=>_0x226fb9['revisionViews']['map'](_0xc95f26=>_0xc95f26))['flat']();}['selectRevision'](_0xb962e1){for(const _0x4a9d29 of this['revisionViews'])_0xb962e1&&_0xb962e1['id']===_0x4a9d29['id']?_0x4a9d29['select']():_0x4a9d29['deselect']();}['highlightRevisions'](_0x972276){for(const _0x532774 of this['revisionViews'])_0x972276['some'](({id:_0x28c599})=>_0x28c599===_0x532774['id'])?_0x532774['highlight']():_0x532774['unhighlight']();}['_addRevision'](_0x106ec6){const _0x340470=di(_0x106ec6['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1393ea=this['timePeriodViews']['get'](0x0);_0x1393ea&&_0x1393ea['startDate']['getTime']()===_0x340470['getTime']()||(_0x1393ea=new mi(this['locale'],_0x340470,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x1393ea)),_0x1393ea['addRevision'](_0x106ec6);}['_removeRevision'](_0x45d994){const _0x1a6e7f=di(_0x45d994['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1a6e7f)['removeRevision'](_0x45d994);}['_getTimePeriodViewByStartDate'](_0x5680a5){return this['timePeriodViews']['find'](_0x4f3cba=>_0x4f3cba['startDate']['getTime']()===_0x5680a5['getTime']());}}class w extends _0x31843e{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(
|
|
29
|
-
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5739ab,_0x20464e){super(_0x20464e),this['sourceElement']=_0x5739ab,this['model']['document']['createRoot']();const _0x2971a6=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x2971a6);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x53d6c0,_0x5ca453){const _0x32273e=new this(_0x53d6c0,_0x5ca453);return await _0x32273e['initPlugins'](),await _0x32273e['ui']['init'](_0x53d6c0),await _0x32273e['data']['init'](_0x32273e['config']['get']('initialData')||''),_0x32273e['fire']('ready'),_0x32273e;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x19eb44{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x506271){function _0x2740f3(_0x770a7b){return _0x770a7b['map'](_0x332f33=>String['fromCharCode'](_0x332f33))['join']('');}super(_0x506271),this['result']='end',_0x506271[_0x2740f3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2740f3([0x76,0x69,0x65,0x77])][_0x2740f3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2740f3([0x61,0x75,0x74,0x6f]),_0x506271[_0x2740f3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2740f3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2740f3([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2740f3([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2740f3([0x6f,0x6b])});}}class k extends _0x19eb44{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x38750b){if(super(_0x38750b),!this['editor']['config']['get']('revisionHistory'))throw new _0x2e3aef('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3df48d=>this['_showRevisionViewer']({..._0x3df48d,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x23ea9e=>this['_closeRevisionViewer'](_0x23ea9e)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1d6971=>this['_restoreRevision'](_0x1d6971)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x207bdc){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x207bdc;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x56e1fb){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x56e1fb);}['getRevision'](_0x421382){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x421382);}['getRevisions'](_0x1dfa90){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1dfa90||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x180210=this['editor'],_0x1381df=_0x388719(_0x180210,p),_0x4ce8b7=_0x180210['plugins']['get']('RevisionTracker'),_0x1adaf4=_0x180210['plugins']['get']('Users')['users'];return _0x1381df['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1381df['lazyRoots'],(_0x1381df['plugins']['push'](Rt,d,w,class extends _0x19eb44{static get['requires'](){return[d,'Users'];}['init'](){const _0x2ebf12=this['editor']['plugins']['get']('Users');for(const _0x11b112 of _0x1adaf4)_0x11b112['isAnonymous']||_0x2ebf12['getUser'](_0x11b112['id'])||_0x2ebf12['addUser'](_0x11b112);const _0x5c48f8=_0x4ce8b7['repository']['getRevisions']();let _0xfd9a8d=null;const _0x441727=this['editor']['plugins']['get']('RevisionViewer');_0x441727['adapter']=_0x4ce8b7['adapter'],_0x441727['bind']('isEnabled')['to'](_0x4ce8b7),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x180210,'isReadOnly',_0x4de9c9=>!_0x4de9c9);for(const _0x2eede7 of _0x5c48f8){const _0x1f6a81=null===_0x2eede7['creator'];if(_0x1f6a81&&_0x2eede7['toVersion']===_0x2eede7['fromVersion'])continue;const _0x21b71a=_0x2eede7['toJSON']();_0x441727['addRevisionData'](_0x21b71a,(_0x49e93d,_0x330be9,_0x55f82e)=>{if(_0x1f6a81){if(_0xfd9a8d)_0xfd9a8d['_update'](_0x49e93d,_0x330be9);else{if(!_0x330be9){const _0xbcc0d9=_0x55f82e['toJSON']();_0xbcc0d9['id']=_0x2d3c1e(),_0x4ce8b7['saveRevision'](_0xbcc0d9,_0x55f82e['toVersion'])['then'](_0x2554c9=>{_0xfd9a8d=_0x2554c9;});}}}else _0x2eede7['_update'](_0x49e93d,_0x330be9);});}}},g),_0x1381df);}['_enhanceShowRevisionViewerCallback'](){const _0xb62280=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x21f3b3=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x90ba35=this['editor']['plugins']['get']('Autosave');await _0x90ba35['save']();}else await _0x21f3b3['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5e09ae=this['editor']['plugins']['get']('Dialog');_0x5e09ae['isOpen']&&_0x5e09ae['hide']();}const _0x4c65e7=this['_getRevisionViewerEditorConfig']();return _0xb62280(_0x4c65e7)['then'](_0x2c9f78=>{return(this['_viewerEditor']=_0x2c9f78,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x2c9f78;})['catch'](_0x59266d=>(console['error'](_0x59266d),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x4e0571=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x4e0571(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x5daee3=this['editor']['plugins']['get']('Annotations');_0x5daee3['refreshVisibility'](),_0x5daee3['refreshPositioning']();}})));}['_showRevisionViewer'](_0x1ad7d5){const _0x4bca6d=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x9e7c30=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1f1e30=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x1f1e30,_0x1ad7d5)['then'](_0x5420d9=>(_0x9e7c30['style']['display']='block',_0x4bca6d['style']['display']='none',_0x5420d9));}['_closeRevisionViewer'](_0x2db724){const _0x571c23=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x571c23['style']['display']='',_0x2db724['destroy']();}async['_restoreRevision'](_0x4374a5){const _0x3258b0=this['editor'],_0x20f50f=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x469aa8=_0x3258b0['plugins']['get']('RevisionTracker'),_0x214364=_0x20f50f['repository']['getRevision'](_0x4374a5);let _0x477871,_0x2b7739,_0x36eea9;try{_0x477871=await _0x20f50f['getRevisionData'](_0x214364),_0x2b7739=await _0x20f50f['getRevisionRootsAttributes'](_0x214364);}catch(_0x4b0b20){return void console['error'](_0x4b0b20);}_0x3258b0['model']['change'](_0x2d63e5=>{for(const _0x3ffd43 of Array['from'](_0x3258b0['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2d63e5['removeMarker'](_0x3ffd43);}),_0x20f50f['isReady']=!0x1,_0x3258b0['model']['enqueueChange'](_0xd171b6=>{_0xd171b6['setSelection'](null),_0xd171b6['removeSelectionAttribute'](_0x3258b0['model']['document']['selection']['getAttributeKeys']());const _0x42f623=Object['keys'](_0x477871);for(const _0x835ea8 of _0x3258b0['model']['document']['roots'])'$graveyard'!=_0x835ea8['rootName']&&_0x835ea8['isAttached']()&&!_0x42f623['includes'](_0x835ea8['rootName'])&&_0xd171b6['detachRoot'](_0x835ea8);for(const _0x2bf2be of _0x42f623){let _0x44e305=_0x3258b0['model']['document']['getRoot'](_0x2bf2be);_0x44e305&&_0x44e305['isAttached']()||(_0x44e305=_0xd171b6['addRoot'](_0x2bf2be));const _0x3f3a5=_0x2b7739[_0x2bf2be],_0x4c88f1=Object['keys'](_0x3f3a5),_0x4b53eb=_0x477871[_0x2bf2be];for(const _0x4ac727 of _0x44e305['getAttributeKeys']())_0x4c88f1['includes'](_0x4ac727)||_0xd171b6['removeAttribute'](_0x4ac727,_0x44e305);for(const _0x2655b2 of _0x4c88f1)_0xd171b6['setAttribute'](_0x2655b2,_0x2b7739[_0x2bf2be][_0x2655b2],_0x44e305);_0xd171b6['remove'](_0xd171b6['createRangeIn'](_0x44e305)),_0xd171b6['insert'](_0x3258b0['data']['parse'](_0x4b53eb,_0x44e305),_0x44e305,0x0);}});const _0x5d5c08=m(_0x3258b0['locale'],'Restored');if(_0x214364['name'])_0x36eea9=-0x1==_0x214364['name']['indexOf'](_0x5d5c08)?_0x5d5c08+':\x20'+_0x214364['name']:_0x214364['name'];else _0x36eea9=_0x5d5c08+':\x20'+(_0x214364['createdAt']['toLocaleDateString'](_0x3258b0['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x214364['createdAt']['toLocaleTimeString'](_0x3258b0['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x469aa8['saveRevision']({'name':_0x36eea9}),_0x20f50f['isReady']=!0x0,_0x3258b0['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
|
|
28
|
+
bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x1bc36f){super(_0x1bc36f),this['_revisionViewer']=_0x1bc36f['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x953f1c=this['_revisionsRepository']['_revisions'],_0x2eb600=this['_createRevisionActions'](),_0x2c113d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ci(this['editor']['locale'],_0x953f1c,_0x2eb600,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',(_0x57291a,_0x44a3ad)=>{_0x44a3ad['revisionViews']['on']('add',(_0x572900,_0x367150)=>{_0x367150['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)),_0x2c113d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x399fa1=this['_revisionsRepository']['getRevision'](0x0);if(_0x399fa1){const _0x18b263=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x399fa1['id']);this['_revisionViewer']['compare'](_0x399fa1,_0x18b263);}}['_handleRevisionSelected'](_0x1a59c8,_0x330066){const _0x5e3e85=this['_revisionsRepository']['getRevision'](_0x330066['id']),_0x39184e=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5e3e85['id']);this['_revisionViewer']['compare'](_0x5e3e85,_0x39184e);}['_handleRevisionSetName'](_0x369aa4,_0x5a765b){this['_revisionsRepository']['getRevision'](_0x5a765b['id'])['setName'](_0x5a765b['name']);}['_handleDiffChange'](_0x58d15a,_0x546fa2,_0x4fdbf3){const _0x250a52=this['_revisionsRepository']['getRevisionsInDiff'](_0x4fdbf3);_0x250a52['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x250a52),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x250a52[0x0]));}['_createRevisionActions'](){const _0x44bcc3=this['editor'],_0x2552d8=w['availableRevisionActions'],_0x59b1c0=_0x44bcc3['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x59b1c0['length'])return _0x59b1c0['map'](_0x1f697b=>{const _0x5cac06='string'==typeof _0x1f697b?Object['assign']({},_0x2552d8[_0x1f697b]):_0x1f697b;return _0x5cac06['action']=_0x5cac06['action']['bind'](this,_0x44bcc3),_0x5cac06['isVisible']&&(_0x5cac06['isVisible']=_0x5cac06['isVisible']['bind'](this,_0x44bcc3)),_0x5cac06;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x32228e},_0x558866)=>{const _0x123c08=_0x32228e['get'](d),_0x342c0f=_0x123c08['repository'];let _0x285a95=_0x123c08['diff']['newRevisionId'],_0x293720=_0x558866['id'];_0x342c0f['getIndex'](_0x285a95)>_0x342c0f['getIndex'](_0x293720)&&([_0x285a95,_0x293720]=[_0x293720,_0x285a95]),_0x123c08['compare'](_0x285a95,_0x293720);},'isVisible':({plugins:_0x1c051b},_0xb60ef9)=>{const _0x2b0293=_0x1c051b['get'](d);return!(_0x2b0293['repository']['getRevisionsInDiff'](_0x2b0293['diff'])['length']>0x2)&&!_0xb60ef9['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4052ba,{id:_0x663a7e})=>{_0x4052ba['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x663a7e);},'isVisible':({plugins:_0x4a8686},_0x18d5d1)=>!!_0x4a8686['get'](d)['repository']['getLaterVisibleRevision'](_0x18d5d1['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x186461},{id:_0x233411,revisionNameView:_0x305397})=>{const _0x3e019f=_0x186461['get'](d),_0xfdf560=_0x3e019f['repository']['getEarlierVisibleRevision'](_0x233411);_0x3e019f['compare'](_0x233411,_0xfdf560),_0x305397['focus'](),_0x305397['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x5ca8af,_0x2107ff){super(_0x5ca8af),this['_view']=_0x2107ff,this['_toolbarConfig']=ot(_0x5ca8af['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x15afe4){const _0x221cbd=this['editor'],_0x3ad63a=this['view'],_0x175c8b=_0x221cbd['editing']['view'],_0x54a025=_0x3ad63a['editable'],_0x504b15=_0x175c8b['document']['getRoot']();_0x54a025['name']=_0x504b15['rootName'],_0x3ad63a['render']();const _0x159ecb=_0x54a025['element'];this['setEditableElement'](_0x54a025['name'],_0x159ecb),_0x3ad63a['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x175c8b['attachDomRoot'](_0x159ecb),this['_elementReplacer']['replace'](_0x15afe4,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5e02c0=this['view'],_0x4bbdbb=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4bbdbb['detachDomRoot'](_0x5e02c0['editable']['name']),_0x5e02c0['destroy']();}['_initToolbar'](){const _0x268f81=this['view'];_0x268f81['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x268f81['stickyPanel']['limiterElement']=_0x268f81['element'],_0x268f81['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x45cefe})=>_0x45cefe),_0x268f81['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x268f81['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3a8fce,_0x1754c5,_0xf84c70={}){super(_0x3a8fce),this['stickyPanel']=new ut(_0x3a8fce),this['toolbar']=new lt(_0x3a8fce,{'shouldGroupWhenFull':_0xf84c70['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x3a8fce,_0x1754c5);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
|
|
29
|
+
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2646a7,_0x927f48){super(_0x927f48),this['sourceElement']=_0x2646a7,this['model']['document']['createRoot']();const _0x23771d=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x23771d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x32fd53,_0x134f9c){const _0x8d12e4=new this(_0x32fd53,_0x134f9c);return await _0x8d12e4['initPlugins'](),await _0x8d12e4['ui']['init'](_0x32fd53),await _0x8d12e4['data']['init'](_0x8d12e4['config']['get']('initialData')||''),_0x8d12e4['fire']('ready'),_0x8d12e4;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x31843e{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a030b){function _0x2ebca7(_0x450cc1){return _0x450cc1['map'](_0x372e59=>String['fromCharCode'](_0x372e59))['join']('');}super(_0x5a030b),this['result']='end',_0x5a030b[_0x2ebca7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2ebca7([0x76,0x69,0x65,0x77])][_0x2ebca7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2ebca7([0x61,0x75,0x74,0x6f]),_0x5a030b[_0x2ebca7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2ebca7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2ebca7([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2ebca7([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2ebca7([0x6f,0x6b])});}}class k extends _0x31843e{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x3c6cf7){if(super(_0x3c6cf7),!this['editor']['config']['get']('revisionHistory'))throw new _0x404937('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x471f92=>this['_showRevisionViewer']({..._0x471f92,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1b9f8c=>this['_closeRevisionViewer'](_0x1b9f8c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x37194a=>this['_restoreRevision'](_0x37194a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x52b49b){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x52b49b;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1b136f){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1b136f);}['getRevision'](_0x2db117){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x2db117);}['getRevisions'](_0x290775){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x290775||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x422406=this['editor'],_0x432284=_0x381ab5(_0x422406,p),_0x45b360=_0x422406['plugins']['get']('RevisionTracker'),_0x3d290d=_0x422406['plugins']['get']('Users')['users'];return _0x432284['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x432284['lazyRoots'],(_0x432284['plugins']['push'](Rt,d,g,class extends _0x31843e{static get['requires'](){return[d,'Users'];}['init'](){const _0x3695a3=this['editor']['plugins']['get']('Users');for(const _0x57d9ba of _0x3d290d)_0x57d9ba['isAnonymous']||_0x3695a3['getUser'](_0x57d9ba['id'])||_0x3695a3['addUser'](_0x57d9ba);const _0xbd3c5b=_0x45b360['repository']['getRevisions']();let _0x3b3e89=null;const _0x3a2226=this['editor']['plugins']['get']('RevisionViewer');_0x3a2226['adapter']=_0x45b360['adapter'],_0x3a2226['bind']('isEnabled')['to'](_0x45b360),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x422406,'isReadOnly',_0x424b01=>!_0x424b01);for(const _0x46b3eb of _0xbd3c5b){const _0x5d403f=null===_0x46b3eb['creator'];if(_0x5d403f&&_0x46b3eb['toVersion']===_0x46b3eb['fromVersion'])continue;const _0x31ade6=_0x46b3eb['toJSON']();_0x3a2226['addRevisionData'](_0x31ade6,(_0x3fb14a,_0x415d7c,_0x9b41a2)=>{if(_0x5d403f){if(_0x3b3e89)_0x3b3e89['_update'](_0x3fb14a,_0x415d7c);else{if(!_0x415d7c){const _0x5630ac=_0x9b41a2['toJSON']();_0x5630ac['id']=_0x1dea48(),_0x45b360['saveRevision'](_0x5630ac,_0x9b41a2['toVersion'])['then'](_0x132a32=>{_0x3b3e89=_0x132a32;});}}}else _0x46b3eb['_update'](_0x3fb14a,_0x415d7c);});}}},w),_0x432284);}['_enhanceShowRevisionViewerCallback'](){const _0x5b43f1=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x370ddd=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x20997a=this['editor']['plugins']['get']('Autosave');await _0x20997a['save']();}else await _0x370ddd['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x226a04=this['editor']['plugins']['get']('Dialog');_0x226a04['isOpen']&&_0x226a04['hide']();}const _0x54fc20=this['_getRevisionViewerEditorConfig']();return _0x5b43f1(_0x54fc20)['then'](_0x364fe4=>{return(this['_viewerEditor']=_0x364fe4,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x364fe4;})['catch'](_0x16dbb7=>(console['error'](_0x16dbb7),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x2edfc7=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x2edfc7(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x329325=this['editor']['plugins']['get']('Annotations');_0x329325['refreshVisibility'](),_0x329325['refreshPositioning']();}})));}['_showRevisionViewer'](_0x3335b9){const _0x452e91=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4f21bf=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xa028a9=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0xa028a9,_0x3335b9)['then'](_0xd1ed52=>(_0x4f21bf['style']['display']='block',_0x452e91['style']['display']='none',_0xd1ed52));}['_closeRevisionViewer'](_0x5c1601){const _0x5553eb=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5553eb['style']['display']='',_0x5c1601['destroy']();}async['_restoreRevision'](_0x4182d6){const _0xca66f2=this['editor'],_0x37e777=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x22f9e4=_0xca66f2['plugins']['get']('RevisionTracker'),_0x2afe4c=_0x37e777['repository']['getRevision'](_0x4182d6);let _0x57429c,_0x9bae7b,_0x572e87;try{_0x57429c=await _0x37e777['getRevisionData'](_0x2afe4c),_0x9bae7b=await _0x37e777['getRevisionRootsAttributes'](_0x2afe4c);}catch(_0x1ca377){return void console['error'](_0x1ca377);}_0xca66f2['model']['change'](_0x4a7b36=>{for(const _0x2f112b of Array['from'](_0xca66f2['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4a7b36['removeMarker'](_0x2f112b);}),_0x37e777['isReady']=!0x1,_0xca66f2['model']['enqueueChange'](_0x45639b=>{_0x45639b['setSelection'](null),_0x45639b['removeSelectionAttribute'](_0xca66f2['model']['document']['selection']['getAttributeKeys']());const _0x1291c6=Object['keys'](_0x57429c);for(const _0x35cd80 of _0xca66f2['model']['document']['roots'])'$graveyard'!=_0x35cd80['rootName']&&_0x35cd80['isAttached']()&&!_0x1291c6['includes'](_0x35cd80['rootName'])&&_0x45639b['detachRoot'](_0x35cd80);for(const _0x205226 of _0x1291c6){let _0x550c62=_0xca66f2['model']['document']['getRoot'](_0x205226);_0x550c62&&_0x550c62['isAttached']()||(_0x550c62=_0x45639b['addRoot'](_0x205226));const _0x5f5349=_0x9bae7b[_0x205226],_0x544392=Object['keys'](_0x5f5349),_0x291e5b=_0x57429c[_0x205226];for(const _0x105cae of _0x550c62['getAttributeKeys']())_0x544392['includes'](_0x105cae)||_0x45639b['removeAttribute'](_0x105cae,_0x550c62);for(const _0x30edc9 of _0x544392)_0x45639b['setAttribute'](_0x30edc9,_0x9bae7b[_0x205226][_0x30edc9],_0x550c62);_0x45639b['remove'](_0x45639b['createRangeIn'](_0x550c62)),_0x45639b['insert'](_0xca66f2['data']['parse'](_0x291e5b,_0x550c62),_0x550c62,0x0);}});const _0xa191e8=m(_0xca66f2['locale'],'Restored');if(_0x2afe4c['name'])_0x572e87=-0x1==_0x2afe4c['name']['indexOf'](_0xa191e8)?_0xa191e8+':\x20'+_0x2afe4c['name']:_0x2afe4c['name'];else _0x572e87=_0xa191e8+':\x20'+(_0x2afe4c['createdAt']['toLocaleDateString'](_0xca66f2['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2afe4c['createdAt']['toLocaleTimeString'](_0xca66f2['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x22f9e4['saveRevision']({'name':_0x572e87}),_0x37e777['isReady']=!0x0,_0xca66f2['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
|