@ckeditor/ckeditor5-revision-history 47.4.0-alpha.1 → 47.4.0-alpha.2
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/build/revision-history.js +1 -1
- package/dist/index.js +7 -7
- 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/be.js +1 -1
- package/dist/translations/be.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 +12 -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/revisionhistoryutils.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 +2 -2
- 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/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0xb6d8a(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x5b5ae1){super(),this['id']=_0x5b5ae1['id']||_0x391c61(),this['creator']=_0x5b5ae1['creator']||null,this['authors']=_0x5b5ae1['authors']||[],this['diffData']=_0x5b5ae1['diffData']||null,this['toVersion']=_0x5b5ae1['toVersion']||0x0,this['fromVersion']=_0x5b5ae1['fromVersion']||0x0,this['set']('name',_0x5b5ae1['name']||''),this['set']('createdAt',_0x5b5ae1['createdAt']||new Date()),this['set']('attributes',_0x5b5ae1['attributes']||{});}['setName'](_0x4249c3){this['_update']({'name':_0x4249c3});}['setAttribute'](_0x2b4335,_0x2b6b41){const _0x30b201=_0x115d90(this['attributes']);_0x38753d(_0x30b201,_0x2b4335,_0x2b6b41),this['_update']({'attributes':_0x30b201});}['removeAttribute'](_0x3f444a){const _0x474a70=_0x115d90(this['attributes']);_0x2b39b2(_0x474a70,_0x3f444a),this['_update']({'attributes':_0x474a70});}['_update'](_0x42743f,_0x362a7d=!0x1){let _0x2592ca=!0x1;const _0x2ba90e={'id':this['id']},_0x239524=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x1c8aa0 of _0x239524){const _0x29f24a=_0x42743f[_0x1c8aa0];void 0x0!==_0x29f24a&&_0x29f24a!==this[_0x1c8aa0]&&(this[_0x1c8aa0]=_0x29f24a,_0x2ba90e[_0x1c8aa0]=_0x29f24a,_0x2592ca=!0x0);}_0x2592ca&&(_0x2ba90e['authors']&&(_0x2ba90e['authorsIds']=_0x2ba90e['authors']['map'](_0x4401b6=>_0x4401b6['id']),delete _0x2ba90e['authors']),this['fire']('_update',_0x2ba90e,_0x362a7d));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1b013a=>_0x1b013a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x439397{['_revisions'];static get['requires'](){return[_0x153f01];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x10567f){super(_0x10567f),this['_revisions']=new _0x480dd0();}['afterInit'](){!async function(_0x216252){const _0x4621c9=_0x12cff5([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x214e94=0xeb829,_0x152855=0x359e09b0,_0x28838b=0x359977e0^_0x152855,_0x3341c4=window[_0x12cff5([0x44,0x61,0x74,0x65])][_0x12cff5([0x6e,0x6f,0x77])](),_0x2627af=_0x216252[_0x12cff5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x495c99=new window[(_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfed79e=>{_0x2627af[_0x12cff5([0x6f,0x6e,0x63,0x65])](_0x12cff5([0x72,0x65,0x61,0x64,0x79]),_0xfed79e);}),_0x22de97={[_0x12cff5([0x6b,0x74,0x79])]:_0x12cff5([0x45,0x43]),[_0x12cff5([0x75,0x73,0x65])]:_0x12cff5([0x73,0x69,0x67]),[_0x12cff5([0x63,0x72,0x76])]:_0x12cff5([0x50,0x2d,0x32,0x35,0x36]),[_0x12cff5([0x78])]:_0x12cff5([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]),[_0x12cff5([0x79])]:_0x12cff5([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]),[_0x12cff5([0x61,0x6c,0x67])]:_0x12cff5([0x45,0x53,0x32,0x35,0x36])},_0x72289c=_0x2627af[_0x12cff5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x12cff5([0x67,0x65,0x74])](_0x12cff5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x31bc8b(){let _0x3e12dc,_0x379e5f=null,_0x13d3cc=null;try{if(_0x72289c==_0x12cff5([0x47,0x50,0x4c]))return _0x12cff5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3e12dc=_0x1d312c(),!_0x3e12dc)return _0x12cff5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3e12dc[_0x12cff5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x13d3cc=_0x374b43(_0x3e12dc[_0x12cff5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3e12dc[_0x12cff5([0x6a,0x74,0x69])])),await _0x2f3e0f()?_0xebe958()?_0x10cdc2()?_0x12cff5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1ba14c()?(_0x3e12dc[_0x12cff5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x12cff5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x379e5f=_0x1094d0(_0x12cff5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4c292b()):_0x12cff5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x12cff5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x12cff5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x12cff5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10cdc2(){const _0x41c438=[_0x12cff5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x12cff5([0x74,0x72,0x69,0x61,0x6c])][_0x12cff5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e12dc[_0x12cff5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3341c4/0x3e8:0xe10*_0x28838b;return _0x3e12dc[_0x12cff5([0x65,0x78,0x70])]<_0x41c438;}function _0xebe958(){const _0x44f31a=_0x3e12dc[_0x12cff5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x44f31a)return!0x1;if(_0x44f31a[_0x12cff5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cff5([0x2a])))return!0x0;if(_0x44f31a[_0x12cff5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cff5([0x52,0x48])))return!0x0;if(_0x44f31a[_0x12cff5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cff5([0x52,0x52,0x48]))){if(_0x46a195())return!0x0;if(_0x2aa256()||_0x3325b4())return!0x0;}return!0x1;}function _0x1ba14c(){const _0x456ad6=_0x3e12dc[_0x12cff5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x456ad6||0x0==_0x456ad6[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5a58d0}=new URL(window[_0x12cff5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x456ad6[_0x12cff5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a58d0))return!0x0;const _0x57fbe1=_0x5a58d0[_0x12cff5([0x73,0x70,0x6c,0x69,0x74])](_0x12cff5([0x2e]));return _0x456ad6[_0x12cff5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x45b619=>_0x45b619[_0x12cff5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x12cff5([0x2a])))[_0x12cff5([0x6d,0x61,0x70])](_0xa07847=>_0xa07847[_0x12cff5([0x73,0x70,0x6c,0x69,0x74])](_0x12cff5([0x2e])))[_0x12cff5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4672a9=>_0x4672a9[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x57fbe1[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x12cff5([0x6d,0x61,0x70])](_0x59d2f7=>Array(_0x57fbe1[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x59d2f7[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x12cff5([0x66,0x69,0x6c,0x6c])](_0x59d2f7[0x0]===_0x12cff5([0x2a])?_0x12cff5([0x2a]):'')[_0x12cff5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x59d2f7))[_0x12cff5([0x73,0x6f,0x6d,0x65])](_0x151ebf=>_0x57fbe1[_0x12cff5([0x65,0x76,0x65,0x72,0x79])]((_0x233d3e,_0xe405ec)=>_0x151ebf[_0xe405ec]===_0x233d3e||_0x151ebf[_0xe405ec]===_0x12cff5([0x2a])));}function _0x4c292b(){return _0x379e5f&&_0x13d3cc?new window[(_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c2561,_0xb6fc1a)=>{_0x379e5f[_0x12cff5([0x74,0x68,0x65,0x6e])](_0x5c2561,_0xb6fc1a),_0x13d3cc[_0x12cff5([0x74,0x68,0x65,0x6e])](_0x133f83=>{_0x133f83!=_0x12cff5([0x56,0x61,0x6c,0x69,0x64])&&_0x5c2561(_0x133f83);},_0xb6fc1a);}):_0x379e5f||_0x13d3cc||_0x12cff5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x374b43(_0x5e49f4,_0x5dea05){return new window[(_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c797=>{if(_0x459b01())return _0x4c797(_0x12cff5([0x56,0x61,0x6c,0x69,0x64]));_0x399997(),_0x2627af[_0x12cff5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x12cff5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5b5e07=!0x1;const _0x18799a=_0x391c61();function _0x3de778(_0x189fb1){return!!_0x189fb1&&(typeof _0x189fb1===_0x12cff5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x189fb1===_0x12cff5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x189fb1[_0x12cff5([0x74,0x68,0x65,0x6e])]===_0x12cff5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x189fb1[_0x12cff5([0x63,0x61,0x74,0x63,0x68])]===_0x12cff5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x312858(_0x492df2){_0x2116cb(_0x492df2)[_0x12cff5([0x74,0x68,0x65,0x6e])](_0x1f332f=>{if(!_0x1f332f||_0x1f332f[_0x12cff5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x12cff5([0x6f,0x6b]))return _0x12cff5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3fa4fa(_0x43e355(_0x18799a+_0x5dea05))!=_0x1f332f[_0x12cff5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x12cff5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x12cff5([0x56,0x61,0x6c,0x69,0x64]);})[_0x12cff5([0x74,0x68,0x65,0x6e])](_0x21c628=>(_0x64977b(),_0x21c628),()=>{const _0xc1a718=_0x5be6ee();return null==_0xc1a718?(_0x64977b(),_0x12cff5([0x56,0x61,0x6c,0x69,0x64])):_0x12cff5(_0x3341c4-_0xc1a718>(0x11928db0^_0x152855)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x12cff5([0x74,0x68,0x65,0x6e])](_0x4c797)[_0x12cff5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4c797(_0x12cff5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x23a190=0x35a8e730^_0x152855;function _0x64977b(){const _0x486545=_0x12cff5([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fa4fa(_0x43e355(_0x5e49f4)),_0x5bae66=_0x455485(_0x3fa4fa(window[_0x12cff5([0x4d,0x61,0x74,0x68])][_0x12cff5([0x63,0x65,0x69,0x6c])](_0x3341c4/_0x23a190)));window[_0x12cff5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12cff5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x486545,_0x5bae66);}function _0x5be6ee(){const _0x31d4f5=_0x12cff5([0x6c,0x6c,0x63,0x74,0x2d])+_0x3fa4fa(_0x43e355(_0x5e49f4)),_0x4df187=window[_0x12cff5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x12cff5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31d4f5);return _0x4df187?window[_0x12cff5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x455485(_0x4df187),0x10)*_0x23a190:null;}function _0x2116cb(_0x117edf){return new window[(_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5b371c,_0x3aeed0)=>{_0x117edf[_0x12cff5([0x74,0x68,0x65,0x6e])](_0x5b371c,_0x3aeed0),window[_0x12cff5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3aeed0,0x359fdd70^_0x152855);});}}_0x2627af[_0x12cff5([0x6f,0x6e])](_0x12cff5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2b16c7,_0x92b29e)=>{if(_0x92b29e[0x0]!=_0x5e49f4)return _0x4c797(_0x12cff5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x92b29e[0x1]={..._0x92b29e[0x1],[_0x12cff5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x18799a};},{[_0x12cff5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12cff5([0x68,0x69,0x67,0x68])}),_0x2627af[_0x12cff5([0x6f,0x6e])](_0x12cff5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58baa0=>{_0x3de778(_0x58baa0[_0x12cff5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5b5e07=!0x0,_0x312858(_0x58baa0[_0x12cff5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x12cff5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x12cff5([0x6c,0x6f,0x77])}),_0x495c99[_0x12cff5([0x74,0x68,0x65,0x6e])](()=>{_0x5b5e07||_0x4c797(_0x12cff5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x459b01(){return _0x2627af[_0x12cff5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12cff5([0x76,0x69,0x65,0x77])][_0x12cff5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x12cff5([0x61,0x75,0x74,0x6f]);}function _0x399997(){_0x2627af[_0x12cff5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x12cff5([0x76,0x69,0x65,0x77])][_0x12cff5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x12cff5([0x61,0x75,0x74,0x6f]);}}function _0x1094d0(_0x203b41){const _0x210512=[new window[(_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x329851=>setTimeout(_0x329851,0x3597377c^_0x152855)),_0x495c99[_0x12cff5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x437ffb=>{const _0x453da7=0x359e09b7^_0x152855,_0x1fdc3=_0x216252[_0x12cff5([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x399483(){_0x1fdc3[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x453da7&&_0x437ffb();}_0x399483(),_0x1fdc3[_0x12cff5([0x6f,0x6e])](_0x12cff5([0x61,0x64,0x64]),_0x399483);})),new window[(_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b870a=>{function _0x3abecc(){for(const _0x33f3d9 in window)if(window[_0x12cff5([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x12cff5([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x33f3d9))&&window[_0x33f3d9]==_0x214e94)return _0x3b870a();_0x2627af[_0x12cff5([0x73,0x74,0x61,0x74,0x65])]!=_0x12cff5([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x12cff5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3abecc,0x359e1a38^_0x152855);}_0xe573be(_0x12cff5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3abecc();})];return window[_0x12cff5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x12cff5([0x72,0x61,0x63,0x65])](_0x210512)[_0x12cff5([0x74,0x68,0x65,0x6e])](()=>_0x203b41);}async function _0x421b34(){if(await _0x495c99,_0xe573be(_0x12cff5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x524402=_0x216252[_0x12cff5([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x27090e=_0x216252[_0x12cff5([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])](_0x524402[_0x12cff5([0x69,0x64])]),_0x2b2679=_0x5501d7(_0x12cff5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x2b2679[_0x12cff5([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x524402['id'],_0x27090e?_0x27090e['id']:null,!0x0),_0x2b2679[_0x12cff5([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x12cff5([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2b2679[_0x12cff5([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2b2679[_0x12cff5([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x2a266a,void(_0x2b2679[_0x12cff5([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x2a266a);}if(_0xe573be(_0x12cff5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x10d372=_0x5501d7(_0x12cff5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x10d372[_0x12cff5([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x12cff5([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x10d372[_0x12cff5([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x10d372[_0x12cff5([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x2a266a,_0x10d372[_0x12cff5([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x2a266a;}_0x2627af[_0x12cff5([0x6d,0x6f,0x64,0x65,0x6c])][_0x12cff5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2a266a,_0x2627af[_0x12cff5([0x6d,0x6f,0x64,0x65,0x6c])][_0x12cff5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2a266a,_0x2627af[_0x12cff5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x12cff5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x46a195(){return _0xe573be(_0x12cff5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5501d7(_0x12cff5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x12cff5([0x73,0x74,0x61,0x74,0x65])]==_0x12cff5([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2aa256(){return _0xe573be(_0x12cff5([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 _0x3325b4(){return _0xe573be(_0x12cff5([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4885ee(_0xdf4dff){const _0x5ee72c=_0xa46b06();_0x2627af[_0x5ee72c]=_0x12cff5([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])+_0xdf4dff,_0xdf4dff[_0x12cff5([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x12cff5([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0xa46b06()]=_0x214e94),_0xdf4dff!=_0x12cff5([0x56,0x61,0x6c,0x69,0x64])&&_0x421b34();}function _0xa46b06(){const _0x32c66d=window[_0x12cff5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x12cff5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x12cff5([0x6e,0x6f,0x77])]())[_0x12cff5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x12cff5([0x2e]),'');let _0x2954b8=_0x12cff5([0x76]);for(let _0x3753d9=0x0;_0x3753d9<_0x32c66d[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3753d9+=0x2){let _0x577f6c=window[_0x12cff5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32c66d[_0x12cff5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3753d9,_0x3753d9+0x2));_0x577f6c>=_0x4621c9[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x577f6c-=_0x4621c9[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2954b8+=_0x4621c9[_0x577f6c];}return _0x2954b8;}function _0x1d312c(){const _0x1b6f58=_0x72289c[_0x12cff5([0x73,0x70,0x6c,0x69,0x74])](_0x12cff5([0x2e]));if(0x3!=_0x1b6f58[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x52b395(_0x1b6f58[0x1]);function _0x52b395(_0x10c844){const _0x25262b=_0x46b71e(_0x10c844);return _0x25262b&&_0x27959c()?_0x25262b:null;function _0x27959c(){const _0x51eab8=_0x25262b[_0x12cff5([0x6a,0x74,0x69])],_0xb25d5a=window[_0x12cff5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x51eab8[_0x12cff5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x51eab8[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4a8e93={..._0x25262b,[_0x12cff5([0x6a,0x74,0x69])]:_0x51eab8[_0x12cff5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x51eab8[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4a8e93[_0x12cff5([0x76,0x63])],_0x43e355(_0x4a8e93)==_0xb25d5a;}}}async function _0x2f3e0f(){let _0x44e84a=!0x0;try{const _0x365b09=_0x72289c[_0x12cff5([0x73,0x70,0x6c,0x69,0x74])](_0x12cff5([0x2e])),[_0x1d30f3,_0x395423,_0x3945d9]=_0x365b09;return _0x769a43(_0x1d30f3),await _0x38b510(_0x1d30f3,_0x395423,_0x3945d9),_0x44e84a;}catch{return!0x1;}function _0x769a43(_0x4df963){const _0x254583=_0x46b71e(_0x4df963);_0x254583&&_0x254583[_0x12cff5([0x61,0x6c,0x67])]==_0x12cff5([0x45,0x53,0x32,0x35,0x36])||(_0x44e84a=!0x1);}async function _0x38b510(_0x4951b6,_0x489bfd,_0x30d05b){const _0x226912=window[_0x12cff5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x12cff5([0x66,0x72,0x6f,0x6d])](_0x1b5b5c(_0x30d05b),_0x1b475c=>_0x1b475c[_0x12cff5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x265c7d=new window[(_0x12cff5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x12cff5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4951b6+_0x12cff5([0x2e])+_0x489bfd),_0x5e4a4c=window[_0x12cff5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x12cff5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5e4a4c)return;const _0xd3a0eb=await _0x5e4a4c[_0x12cff5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x12cff5([0x6a,0x77,0x6b]),_0x22de97,{[_0x12cff5([0x6e,0x61,0x6d,0x65])]:_0x12cff5([0x45,0x43,0x44,0x53,0x41]),[_0x12cff5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x12cff5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x12cff5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5e4a4c[_0x12cff5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x12cff5([0x6e,0x61,0x6d,0x65])]:_0x12cff5([0x45,0x43,0x44,0x53,0x41]),[_0x12cff5([0x68,0x61,0x73,0x68])]:{[_0x12cff5([0x6e,0x61,0x6d,0x65])]:_0x12cff5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xd3a0eb,_0x226912,_0x265c7d)||(_0x44e84a=!0x1);}}function _0x46b71e(_0x27b8d8){return _0x27b8d8[_0x12cff5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x12cff5([0x65,0x79]))?JSON[_0x12cff5([0x70,0x61,0x72,0x73,0x65])](_0x1b5b5c(_0x27b8d8)):null;}function _0x1b5b5c(_0x1a833e){return window[_0x12cff5([0x61,0x74,0x6f,0x62])](_0x1a833e[_0x12cff5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x12cff5([0x2b]))[_0x12cff5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x12cff5([0x2f])));}function _0x43e355(_0x2073d3){let _0x2950b2=0x1505;function _0x2db645(_0x78fea3){for(let _0x24d22f=0x0;_0x24d22f<_0x78fea3[_0x12cff5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24d22f++){const _0x55fc68=_0x78fea3[_0x12cff5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x24d22f);_0x2950b2=(_0x2950b2<<0x5)+_0x2950b2+_0x55fc68,_0x2950b2&=_0x2950b2;}}function _0x1cf543(_0x419e8b){Array[_0x12cff5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x419e8b)?_0x419e8b[_0x12cff5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1cf543):_0x419e8b&&typeof _0x419e8b==_0x12cff5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x12cff5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x419e8b)[_0x12cff5([0x73,0x6f,0x72,0x74])]()[_0x12cff5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x46c351,_0x282dcd])=>{_0x2db645(_0x46c351),_0x1cf543(_0x282dcd);}):_0x2db645(window[_0x12cff5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x419e8b));}return _0x1cf543(_0x2073d3),_0x2950b2>>>0x0;}function _0x3fa4fa(_0x18bcf4){return _0x18bcf4[_0x12cff5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x12cff5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x12cff5([0x30]));}function _0x455485(_0xb97540){return _0xb97540[_0x12cff5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x12cff5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x12cff5([0x6a,0x6f,0x69,0x6e])]('');}function _0xe573be(_0xbd413e){return _0x2627af[_0x12cff5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12cff5([0x68,0x61,0x73])](_0xbd413e);}function _0x5501d7(_0x447724){return _0x2627af[_0x12cff5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x12cff5([0x67,0x65,0x74])](_0x447724);}function _0x2a266a(){}function _0x12cff5(_0x469795){return _0x469795['map'](_0x51c409=>String['fromCharCode'](_0x51c409))['join']('');}_0x4885ee(await _0x31bc8b());}(this);}['createRevision'](_0x3a2815){const _0x4e0da6=this['editor']['plugins']['get']('Users');return new I({'id':_0x3a2815['id'],'name':_0x3a2815['name'],'creator':_0x3a2815['creatorId']?_0x4e0da6['getUser'](_0x3a2815['creatorId']):null,'diffData':_0x3a2815['diffData']||_0x3a2815['data'],'authors':_0x3a2815['authorsIds']['map'](_0x3f1df1=>_0x4e0da6['getUser'](_0x3f1df1)),'createdAt':new Date(_0x3a2815['createdAt']),'attributes':_0x3a2815['attributes'],'fromVersion':_0x3a2815['fromVersion'],'toVersion':_0x3a2815['toVersion']});}['addRevision'](_0x191ba3,_0x2a49dc=0x0){this['_revisions']['add'](_0x191ba3,_0x2a49dc);}['getRevision'](_0x50e68e){return this['_revisions']['get'](_0x50e68e);}['getRevisions'](_0x18e63c={'toJSON':!0x1}){const _0x3d495d=Array['from'](this['_revisions']);return _0x3d495d['reverse'](),_0x18e63c['toJSON']?_0x3d495d['map'](_0x3de661=>_0x3de661['toJSON']()):_0x3d495d;}['getIndex'](_0x4f6aba){return this['_revisions']['getIndex'](_0x4f6aba);}['getEarlierVisibleRevision'](_0x5822fb){const [,_0x504ddd]=this['getRevisionsIterator'](_0x5822fb,{'direction':'earlier'});return _0x504ddd;}['getLaterVisibleRevision'](_0x38aa97){const [,_0x4ab346]=this['getRevisionsIterator'](_0x38aa97,{'direction':'later'});return _0x4ab346;}['getRevisionsInDiff'](_0x5a9a58){const _0x48dc5f=[];for(const _0x498b8f of this['getRevisionsIterator'](_0x5a9a58['newRevisionId']))if(_0x48dc5f['push'](_0x498b8f),_0x498b8f['id']===_0x5a9a58['oldRevisionId'])break;return _0x48dc5f;}*['getRevisionsIterator'](_0x2d826b,{direction:_0x19634d='earlier',filter:_0x289d31=()=>!0x0}={}){const _0x5c343b='earlier'===_0x19634d?0x1:-0x1;let _0x290137=this['_revisions']['get'](_0x2d826b),_0x498967=this['getIndex'](_0x290137);for(yield _0x290137;_0x290137;){if(_0x498967+=_0x5c343b,_0x290137=this['getRevision'](_0x498967),!_0x290137)return;_0x289d31(_0x290137)&&(yield _0x290137);}}}class $ extends _0x439397{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0xc04067,'c'],[_0x27f1be,'a'],[_0x18bbe4,'e'],[_0x362490,'r'],[_0xf8962f,'u']]);['_typeCharToViewClass']=new Map([['c',_0xc04067],['a',_0x27f1be],['e',_0x18bbe4],['r',_0x362490],['u',_0xf8962f]]);async['loadRevisionData'](_0x8f27f7,_0xcfcc62){if(_0x8f27f7['diffData']||!_0xcfcc62)return;const _0x2e7d4a=this['editor']['config']['get']('collaboration.channelId'),_0x236422=await _0xcfcc62['getRevision']({'channelId':_0x2e7d4a,'revisionId':_0x8f27f7['id']});_0x8f27f7['diffData']=_0x236422['diffData'];}['getRevisionDocumentData'](_0x227053){const _0x5ce4f6={};for(const _0x322b69 in _0x227053['diffData']){if(_0x227053['diffData'][_0x322b69]['attachChange']&&!_0x227053['diffData'][_0x322b69]['attachChange']['isAttached'])continue;const _0x454ae3=this['_removeRevisionMarkers'](JSON['parse'](_0x227053['diffData'][_0x322b69]['insertions'])),_0x5aa4e5=this['editor']['editing']['view']['document'],_0x6722c4=new _0x3581a6(_0x5aa4e5,_0x454ae3['map'](_0x52d324=>this['_getViewFromDiffObj'](_0x52d324,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5ce4f6[_0x322b69]=this['editor']['data']['processor']['toData'](_0x6722c4),this['editor']['data']['processor']['useFillerType']('default');}return _0x5ce4f6;}['getRevisionRootsAttributes'](_0x159df3){const _0x460a4a={};for(const _0x5719b9 in _0x159df3['diffData'])_0x159df3['diffData'][_0x5719b9]['attachChange']&&!_0x159df3['diffData'][_0x5719b9]['attachChange']['isAttached']||(_0x460a4a[_0x5719b9]=_0x159df3['diffData'][_0x5719b9]['attributesAfter']||{});return _0x460a4a;}['_getTypeCharForViewElement'](_0x417e6c){return this['_viewClassToTypeChar']['get'](_0x417e6c['constructor']);}['_getViewFromDiffObj'](_0x185616,_0x55b5a7){const _0x2cabaf=this['editor']['editing']['view']['document'];if('string'==typeof _0x185616)return new _0x398fcf(_0x2cabaf,_0x185616);{let _0x53363a,_0x522c21;_0x522c21='u'==_0x185616['type']||'r'==_0x185616['type']?[]:_0x185616['children']['map'](_0xb7c90=>this['_getViewFromDiffObj'](_0xb7c90,_0x55b5a7));const _0x8d84a7=this['_typeCharToViewClass']['get'](_0x185616['type'])||_0x12e4e5,_0x580e88=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x53363a=new _0x8d84a7(_0x2cabaf,_0x185616['name'],_0x185616['attributes'],_0x522c21),'u'==_0x185616['type']&&_0x185616['children'][0x0]){const _0x286cc8=_0x185616['children'][0x0];if(_0x53363a['render']=function(_0x262ab0){const _0x1d439a=_0x262ab0['createElement']('div');return _0x1d439a['innerHTML']=_0x286cc8,_0x1d439a['childNodes'][0x0];},_0x55b5a7){const _0x148336=new _0x3581a6(_0x2cabaf);_0x148336['_appendChild'](_0x53363a);const _0x33dd87=Array['from'](_0x580e88['viewChildrenToDom'](_0x148336,{'bind':!0x1})),_0x26b815=_0x580e88['domDocument']['createElement']('div');_0x26b815['append'](..._0x33dd87),_0x53363a=Array['from'](_0x580e88['domChildrenToView'](_0x26b815))[0x0];}}else{if('r'==_0x185616['type']&&_0x185616['children'][0x0]){const _0x2df719=_0x185616['children'][0x0];if(_0x53363a['render']=function(_0x52a68a){_0x52a68a['innerHTML']=_0x2df719;},_0x55b5a7){const _0x51e7a6=new _0x3581a6(_0x2cabaf);_0x51e7a6['_appendChild'](_0x53363a);const _0x2e2eab=Array['from'](_0x580e88['viewChildrenToDom'](_0x51e7a6,{'bind':!0x1})),_0x5992e1=_0x580e88['domDocument']['createElement']('div');_0x5992e1['append'](..._0x2e2eab);const _0x1a983a=Array['from'](_0x580e88['domChildrenToView'](_0x5992e1));_0x1a983a['length']>0x1?_0x53363a['_appendChild'](_0x1a983a):_0x53363a=_0x1a983a[0x0];}}}if(_0x185616['customProperties']){for(const [_0x3ebd6c,_0x418203]of _0x185616['customProperties'])_0x53363a['_setCustomProperty'](_0x3ebd6c,_0x418203);}const _0x4121d9=void 0x0===_0x185616['fillerOffset']?null:_0x185616['fillerOffset'];return null!==_0x4121d9&&(_0x53363a['getFillerOffset']=()=>_0x4121d9),_0x53363a;}}['_makeModelFromViewString'](_0x1042e5){const _0x1ffa21=JSON['parse'](_0x1042e5),_0x1f503f=this['editor']['editing']['view']['document'],_0x36fbc6=new _0x3581a6(_0x1f503f,_0x1ffa21['map'](_0x565d89=>this['_getViewFromDiffObj'](_0x565d89,!0x0)));return this['editor']['data']['toModel'](_0x36fbc6);}['_removeRevisionMarkers'](_0x1960f4){return(_0x1960f4=_0x1960f4['filter'](_0x3ba39a=>!_0x3ba39a['name']||'revision-start'!==_0x3ba39a['name']&&'revision-end'!==_0x3ba39a['name']))['forEach'](_0x3974b4=>{'string'!=typeof _0x3974b4&&(_0x3974b4['children']=this['_removeRevisionMarkers'](_0x3974b4['children']),_0x3974b4['attributes']=_0x3974b4['attributes']['filter'](_0x55a6f6=>!_0x55a6f6[0x0]['startsWith']('data-revision-')));}),_0x1960f4;}}function m(_0x382954,_0x771302,_0xc4c565){const t=_0x382954['t'];switch(_0x771302){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'},_0xc4c565);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xc4c565);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x439397{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x153f01,S,$,_0x3a0f3e];}constructor(_0x485b2e){super(_0x485b2e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x35214b=_0x391c61();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x35214b},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x1d065b=this['repository']['getRevision'](0x0),_0x5f1e03=_0x1d065b&&null===_0x1d065b['creator']?_0x1d065b:null;if(this['_continueCurrentRevision']=!!_0x5f1e03&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1a1551=this['_source']['getCurrentRevisionId'](),_0x30931f=this['repository']['getRevision'](_0x1a1551);if(_0x30931f)this['_startingVersion']=_0x30931f['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1926d0=this['_source']['history']['_operations']['find'](_0x1ba9c7=>!_0x1ba9c7['_isInit']),_0x245633=_0x1926d0?_0x1926d0['baseVersion']:this['_source']['history']['version'];_0x1d065b?(_0x1d065b['toVersion']<_0x245633&&_0x1d065b['_update']({'toVersion':_0x245633}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5f1e03['id'],this['_startingVersion']=_0x5f1e03['fromVersion']):(this['_startingVersion']=_0x1d065b['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x245633,this['_continueCurrentRevision']=!0x1);}}else _0x5f1e03&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5f1e03['toVersion'],this['editor']['model']['document']['history']['version']),_0x5f1e03['fromVersion']===_0x5f1e03['toVersion']?(0x0!==_0x5f1e03['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5f1e03['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5f1e03['id'],this['_startingVersion']=_0x5f1e03['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',_0x162953=>!_0x162953),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4ef85d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x34bbd7;for(const _0x128eda in _0x4ef85d){const _0x2494c7=_0x128eda,_0x3bc04b=_0x4ef85d[_0x2494c7];if('revisionHistoryLicenseKeyValid'==_0x3bc04b||'revisionHistoryLicenseKeyInvalid'==_0x3bc04b||'revisionHistoryLicenseKeyExpired'==_0x3bc04b||'revisionHistoryLicenseKeyDomainLimit'==_0x3bc04b||'revisionHistoryLicenseKeyNotAllowed'==_0x3bc04b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3bc04b||'revisionHistoryLicenseKeyUsageLimit'==_0x3bc04b){delete _0x4ef85d[_0x2494c7],_0x34bbd7=_0x3bc04b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x34bbd7&&_0x4ef85d['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x34bbd7&&_0x4ef85d['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x34bbd7&&_0x4ef85d['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x34bbd7&&_0x4ef85d['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x34bbd7&&_0x4ef85d['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x34bbd7&&_0x4ef85d['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x39a679=this['repository']['getRevision'](0x0),_0xcdfe7a=await this['getRevisionDocumentData'](_0x39a679),_0x33675d=await this['getRevisionRootsAttributes'](_0x39a679);this['_replaceEditorDataWithRevisionData'](_0xcdfe7a,_0x33675d);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x34ad17){this['_source']=_0x34ad17;}async['update'](){const _0x985765=await this['_source']['getLatestVersion']();if(_0x985765>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1c1e62=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x985765});_0x1c1e62['authors']=_0x1c1e62['authorsIds']['map'](_0x3d1d2d=>this['editor']['plugins']['get']('Users')['getUser'](_0x3d1d2d)),this['currentRevision']['_update'](_0x1c1e62);}}async['saveRevision'](_0x9056aa={},_0x52c283=null){const _0x3eea76=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x52c283>this['currentRevision']['toVersion']&&(_0x52c283=null),null===_0x52c283&&(_0x52c283=await this['_source']['getLatestVersion']());const _0x2352f8=this['_getFromVersion'](_0x52c283),_0x90bb22=this['buildRevisionData']({'from':_0x2352f8,'to':_0x52c283});if(this['currentRevision']['toVersion']<_0x52c283){const _0x1ae1fe=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x52c283,'to':_0x52c283});_0x1ae1fe['authors']=[],_0x1ae1fe['authorsIds']=[],_0x1ae1fe['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1ae1fe,!0x0),delete _0x1ae1fe['authors'],_0x3eea76['push'](_0x1ae1fe);}_0x9056aa['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x9056aa['name']=_0x9056aa['name']||null,_0x9056aa['id']=_0x9056aa['id']||_0x391c61(),_0x9056aa={..._0x9056aa,..._0x90bb22};const _0x5951f3=this['addRevisionData'](_0x9056aa);_0x3eea76['push'](_0x9056aa);const _0xbd060b=this['repository']['getIndex'](_0x5951f3);if(0x0!==_0xbd060b){const _0x2edcf2=this['repository']['getRevision'](_0xbd060b-0x1);if(_0x2edcf2['fromVersion']!==_0x52c283){const _0x1f4040=this['_revisionDataBuilder']['getData'](_0x52c283,_0x2edcf2['toVersion']),_0x2c18a5={'id':_0x2edcf2['id'],'diffData':_0x1f4040['diffData'],'authorsIds':_0x1f4040['authorsIds'],'authors':_0x1f4040['authorsIds']['map'](_0x4cf634=>this['editor']['plugins']['get']('Users')['getUser'](_0x4cf634)),'fromVersion':_0x52c283};_0x2edcf2===this['currentRevision']&&(_0x2c18a5['createdAt']=new Date(_0x9056aa['createdAt']['getTime']()+0xa)),_0x2edcf2['_update'](_0x2c18a5,!0x0),delete _0x2c18a5['authors'],_0x3eea76['push'](_0x2c18a5);}}if(this['adapter']){for(const _0x282522 of _0x3eea76)this['_bufferUpdate'](_0x282522['id'],_0x282522,!0x0);this['sendBufferedUpdates']();}return _0x5951f3;}['addRevisionData'](_0xbb9aa){const _0xaee615=this['repository']['createRevision'](_0xbb9aa);return this['adapter']&&_0xaee615['on']('_update',(_0x3a07a2,_0xb2bbf3,_0x2025a9)=>{_0x2025a9||(this['_bufferUpdate'](_0xb2bbf3['id'],_0xb2bbf3,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xaee615,this['_findInsertionIndex'](_0xaee615)),_0xaee615;}async['getRevisionDocumentData'](_0x4cd6c1){return await this['_utils']['loadRevisionData'](_0x4cd6c1,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4cd6c1);}async['getRevisionRootsAttributes'](_0x104d37){return await this['_utils']['loadRevisionData'](_0x104d37,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x104d37);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x43696a=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5778a6=0x0;_0x5778a6<_0x43696a['length'];_0x5778a6++){const _0xb75c8c=_0x43696a[_0x5778a6];let _0x4c7bce=!0x1;for(const _0x5b7b7f of Object['keys'](_0xb75c8c))void 0x0===_0xb75c8c[_0x5b7b7f]?delete _0xb75c8c[_0x5b7b7f]:'id'!==_0x5b7b7f&&(_0x4c7bce=!0x0);_0x4c7bce||(_0x43696a[_0x5778a6]=null);}if(_0x43696a=_0x43696a['filter'](_0x4e90cb=>null!==_0x4e90cb),!_0x43696a['length'])return;for(let _0x4a5301=0x0;_0x4a5301<_0x43696a['length'];_0x4a5301++){const _0x34e232=_0x43696a[_0x4a5301];void 0x0!==_0x34e232['fromVersion']&&void 0x0===_0x34e232['toVersion']&&(_0x34e232['toVersion']=this['repository']['getRevision'](_0x34e232['id'])['toVersion']),void 0x0!==_0x34e232['toVersion']&&void 0x0===_0x34e232['fromVersion']&&(_0x34e232['fromVersion']=this['repository']['getRevision'](_0x34e232['id'])['fromVersion']);}const _0x1e4dfc=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x43696a,_0x1e4dfc)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x51f4dd=>{if(_0x51f4dd){for(const _0x4beb2d of _0x51f4dd)this['setRevisionData']({'id':_0x4beb2d['id'],'createdAt':_0x4beb2d['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x47f14a=null,from:_0x3960f6=null,to:_0x406c08=null}){_0x3960f6=null!==_0x3960f6?_0x3960f6:_0x47f14a['fromVersion'],_0x406c08=null!==_0x406c08?_0x406c08:_0x47f14a['toVersion'];const _0x4b4f9e=this['_revisionDataBuilder']['getData'](_0x3960f6,_0x406c08),_0x477ec4={'diffData':_0x4b4f9e['diffData'],'authorsIds':_0x4b4f9e['authorsIds'],'fromVersion':_0x3960f6,'toVersion':_0x406c08};if(!_0x47f14a||_0x406c08!==_0x47f14a['toVersion']){const _0x25d206=_0x406c08-0x1,_0x285c9b=this['_source']['history']['getOperation'](_0x25d206);_0x477ec4['createdAt']=_0x285c9b&&_0x285c9b['createdAt']||new Date();}if(this['_loadedStateData']&&_0x3960f6===this['_loadedStateData']['fromVersion']){for(const _0x3c4e0d of this['_loadedStateData']['authors'])_0x477ec4['authorsIds']['includes'](_0x3c4e0d['id'])||_0x477ec4['authorsIds']['push'](_0x3c4e0d['id']);}return _0x477ec4;}['_bufferUpdate'](_0x3c5a1a,_0xd6f2fd,_0x105537){if(this['_bufferedUpdates']['has'](_0x3c5a1a)){const _0xeede0c=this['_bufferedUpdates']['get'](_0x3c5a1a);_0xd6f2fd=_0x105537?{..._0xeede0c,..._0xd6f2fd}:{..._0xd6f2fd,..._0xeede0c};}this['_bufferedUpdates']['set'](_0x3c5a1a,_0xd6f2fd);}['setRevisionData'](_0xd35d5d){const _0x2cc8ac=this['repository']['getRevision'](_0xd35d5d['id']);if(_0xd35d5d['createdAt']&&(_0xd35d5d['createdAt']=new Date(_0xd35d5d['createdAt'])),_0xd35d5d['authorsIds']){const _0x3bc6af=this['editor']['plugins']['get']('Users');_0xd35d5d['authors']=_0xd35d5d['authorsIds']['map'](_0x4c65cf=>_0x3bc6af['getUser'](_0x4c65cf));}_0x2cc8ac['_update'](_0xd35d5d,!0x0);}['_createInitialRevision'](_0x308d75){const _0x5b7e37=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5b7e37)this['_initialRevisionId']=_0x5b7e37['id'];else{const _0x34d8f5=!this['editor']['model']['document']['roots']['find'](_0x3de80a=>this['editor']['model']['hasContent'](_0x3de80a)),_0x5dce7a=this['editor']['plugins']['get']('Users')['me']['id'],_0x5bef6d=m(this['editor']['locale'],_0x34d8f5?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x308d75,'to':_0x308d75,'id':this['_initialRevisionId'],'name':_0x5bef6d,'creatorId':_0x5dce7a});}}['_createCurrentRevision'](_0x1aa252){const _0xf5d135=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xf5d135),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1aa252,'to':_0x1aa252,'id':_0xf5d135,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x1af819,_0x36129b){let _0x17ab9e=this['editor']['config']['get']('initialData'),_0x376289=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x17ab9e){_0x17ab9e={};for(const _0x1f32f5 of this['editor']['model']['document']['getRootNames']())_0x17ab9e[_0x1f32f5]='';}if('string'==typeof _0x17ab9e&&(_0x17ab9e={'main':_0x17ab9e}),void 0x0===_0x376289){_0x376289={};for(const _0x3d83b7 of this['editor']['model']['document']['getRootNames']())_0x376289[_0x3d83b7]={};}let _0x44eb44=!0x1;const _0x45a7fa=Object['keys'](_0x17ab9e),_0x1e33ad=Object['keys'](_0x1af819);for(const _0x5c9e11 of _0x45a7fa){if(_0x17ab9e[_0x5c9e11]!==_0x1af819[_0x5c9e11]&&''!==_0x17ab9e[_0x5c9e11]['trim']()){_0x44eb44=!0x0;break;}if(!_0x3c1091(_0x376289[_0x5c9e11],_0x36129b[_0x5c9e11])&&Object['keys'](_0x376289[_0x5c9e11])['length']>0x0){_0x44eb44=!0x0;break;}}_0x44eb44||(_0x44eb44=_0x1e33ad['some'](_0x1cb3b6=>!this['editor']['model']['document']['getRoot'](_0x1cb3b6))),_0x44eb44&&_0x598afb('editor-initial-data-replaced-with-revision-data',{'editorData':_0x17ab9e,'editorRootsAttributes':_0x376289,'revisionData':_0x1af819,'revisionRootsAttributes':_0x36129b}),this['editor']['config']['set']('initialData',_0x1af819),this['editor']['config']['set']('rootsAttributes',_0x36129b);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4466f7=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4466f7['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x42ab01){const _0x28655=this['repository']['getRevisions']();_0x28655['reverse']();let _0x5e8912=0x0;for(;_0x5e8912<_0x28655['length'];){const _0xf2e4e1=_0x28655[_0x5e8912];if(_0xf2e4e1===this['currentRevision']){_0x5e8912++;continue;}if(_0xf2e4e1['id']===this['_initialRevisionId'])break;const _0xff69e7=_0x42ab01['toVersion']-_0xf2e4e1['toVersion']||_0x42ab01['fromVersion']-_0xf2e4e1['fromVersion'];if(_0xff69e7>0x0)break;if(_0xff69e7<0x0)_0x5e8912++;else{if(!_0x42ab01['creator']&&_0xf2e4e1['creator'])break;if(_0xf2e4e1['creator']||!_0x42ab01['creator']){if(_0x42ab01['createdAt']>_0xf2e4e1['createdAt'])break;_0x5e8912++;}else _0x5e8912++;}}return _0x5e8912;}['_getFromVersion'](_0x4f7d15){const _0x4f0966=this['repository']['getRevisions']();_0x4f0966['reverse'](),_0x4f0966['shift']();const _0x267071=_0x4f0966['find'](_0x187671=>_0x187671['toVersion']<=_0x4f7d15)['toVersion'];return _0x267071<this['_startingVersion']?this['_startingVersion']:_0x267071;}['_makeRevision']({name:_0x14bb2d,from:_0x1a8ecc,to:_0x9d578b,creatorId:_0x312368,id:_0x3dac81}){const _0x25ebac=this['buildRevisionData']({'from':_0x1a8ecc,'to':_0x9d578b});_0x25ebac['name']=_0x14bb2d,_0x25ebac['creatorId']=_0x312368,_0x25ebac['id']=_0x3dac81;const _0x3485b8=this['addRevisionData'](_0x25ebac);return this['adapter']&&this['_bufferUpdate'](_0x25ebac['id'],_0x25ebac,!0x0),_0x3485b8;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x2a3efe){this['editor']=_0x2a3efe,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'](_0x5839db){this['source']=_0x5839db;const _0x1b7042=new Map(),_0x26b468=new Map(),_0x5ced28=this['editor']['model']['document']['roots']['map'](_0x519be7=>_0x519be7['rootName']);for(const _0x6d3174 of _0x5ced28){const _0x50d64f=this['editor']['model']['document']['getRoot'](_0x6d3174),_0x6be1f6=K(_0x50d64f);_0x1b7042['set'](_0x6d3174,_0x6be1f6),_0x26b468['set'](_0x6d3174,Object['fromEntries'](_0x50d64f['getAttributes']()));}const _0x5771a5=Array['from'](this['editor']['model']['markers'])['map'](_0x396bcf=>[_0x396bcf['name'],_0x396bcf['getRange']()]),_0xd2f09b=this['source']['version'];this['_saveMetaData'](_0xd2f09b,_0x1b7042,_0x5771a5,_0x26b468),this['_startingRevisionId']=this['_revisionId'];const _0x460a7f=new Map(),_0x14df30=new Map();for(const _0x35ea17 of _0x5ced28){const _0x381bef=N(_0x35ea17);_0x460a7f['set'](_0x35ea17,_0x381bef),_0x14df30['set'](_0x35ea17,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x460a7f,[],_0x14df30);}['getData'](_0x23d015,_0x5dc334){if(this['_lastFrom']===_0x23d015&&this['_lastTo']<=_0x5dc334)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5dc334,!0x0);else{if(!this['_savedMetaData']['has'](_0x23d015)){const _0x2dac90=this['_getPreviousFrom'](_0x23d015);this['_calculateMetaData'](_0x2dac90,_0x23d015,!0x1);}this['_calculateMetaData'](_0x23d015,_0x5dc334,!0x0);}return this['_lastFrom']=_0x23d015,this['_lastTo']=_0x5dc334,this['_getState']();}['loadState'](_0x536418){if(!this['_savedMetaData']['has'](_0x536418['fromVersion'])){const _0x5085ab=this['_getPreviousFrom'](_0x536418['fromVersion']);this['_calculateMetaData'](_0x5085ab,_0x536418['fromVersion'],!0x1);}this['_calculateMetaData'](_0x536418['fromVersion'],_0x536418['toVersion'],!0x1);const _0x3e676b=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x536418['fromVersion'],this['_lastTo']=_0x536418['toVersion'];for(const _0x2cb078 in _0x536418['diffData']){const _0x19e832=_0x536418['diffData'][_0x2cb078]['attachChange'],_0x325375=_0x115d90(_0x536418['diffData'][_0x2cb078]['attributesBefore'])||{},_0x6b313e=_0x3e676b['_makeModelFromViewString'](_0x536418['diffData'][_0x2cb078]['deletions']);_0x6b313e['rootName']=_0x2cb078,_0x6b313e['_isAttached']=!_0x19e832||!_0x19e832['isAttached'],_0x6b313e['isAttached']=()=>_0x6b313e['_isAttached'],this['_baseRoots']['set'](_0x2cb078,_0x6b313e),this['_baseRootsAttributes']['set'](_0x2cb078,_0x325375),_0x19e832&&this['_touchedRoots']['set'](_0x2cb078,_0x19e832);const _0x2a1ba3=this['_makeIdsRoot'](_0x6b313e);this['_baseIdsRoots']['set'](_0x2cb078,_0x2a1ba3);for(const [_0x3513c6,_0x9ca794]of _0x6b313e['markers']){if(!_0x3513c6['startsWith']('revision:'))continue;const _0x5431a4=_0x3513c6['split'](':')[0x2];for(const _0x4cb936 of _0x9ca794['getWalker']({'singleCharacters':!0x0})){const _0x4c84a4=this['_getVidAttributeName'](_0x4cb936),_0xcd4d24='elementEnd'==_0x4cb936['type']?_0x4cb936['previousPosition']['path']['slice'](0x0,-0x1):_0x4cb936['previousPosition']['path'],_0x402f50=_0x2a1ba3['getNodeByPath'](_0xcd4d24)['getAttribute'](_0x4c84a4);this['_touched']['set'](_0x402f50,{'userId':_0x5431a4});}_0x6b313e['markers']['delete'](_0x3513c6);}}this['_startingRevisionId']=this['_revisionId'];const _0x2719e4=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1ec2d1=>!this['_touched']['has'](_0x1ec2d1));let _0x29b743=0x0;const _0x3e7a34=new Map();for(const _0x519253 in _0x536418['diffData']){const _0x23e1b6=_0x536418['diffData'][_0x519253]['attachChange'],_0x23cc85=_0x115d90(_0x536418['diffData'][_0x519253]['attributesAfter'])||{},_0x52eabe=_0x3e676b['_makeModelFromViewString'](_0x536418['diffData'][_0x519253]['insertions']);_0x52eabe['rootName']=_0x519253,_0x52eabe['_isAttached']=!_0x23e1b6||_0x23e1b6['isAttached'],_0x52eabe['isAttached']=()=>_0x52eabe['_isAttached'],this['_diffRoots']['set'](_0x519253,_0x52eabe),this['_diffRootsAttributes']['set'](_0x519253,_0x23cc85);const _0x45ebc9=this['_makeIdsRoot'](_0x52eabe,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x519253,_0x45ebc9),_0x3e7a34['set'](_0x519253,_0x52eabe['isAttached']()?_0x23cc85:{});for(const [_0x365ba4,_0x28856a]of _0x52eabe['markers']){if(!_0x365ba4['startsWith']('revision:'))continue;const _0x5ef38a=_0x365ba4['split'](':')[0x2];for(const _0x8abb6c of _0x28856a['getWalker']({'singleCharacters':!0x0})){const _0xc56669=this['_getVidAttributeName'](_0x8abb6c),_0x337b4c=this['_revisionId']++,_0x1915ba='elementEnd'==_0x8abb6c['type']?_0x8abb6c['previousPosition']['path']['slice'](0x0,-0x1):_0x8abb6c['previousPosition']['path'];_0x45ebc9['getNodeByPath'](_0x1915ba)['_setAttribute'](_0xc56669,_0x337b4c),this['_touched']['set'](_0x337b4c,{'userId':_0x5ef38a});}_0x52eabe['markers']['delete'](_0x365ba4);}for(const _0x4a0982 of this['editor']['model']['createRangeIn'](_0x52eabe)['getWalker']({'singleCharacters':!0x0})){const _0x3a8c2f=this['_getVidAttributeName'](_0x4a0982),_0x205439='elementEnd'==_0x4a0982['type']?_0x4a0982['previousPosition']['path']['slice'](0x0,-0x1):_0x4a0982['previousPosition']['path'],_0x5c55c8=_0x45ebc9['getNodeByPath'](_0x205439);_0x5c55c8['getAttribute'](_0x3a8c2f)>0x0||_0x5c55c8['_setAttribute'](_0x3a8c2f,_0x2719e4[_0x29b743++]);}for(const [_0x4ddf52,_0x9b8b55]of _0x52eabe['markers'])_0x4ddf52['startsWith']('revision:')||this['_markers']['set'](_0x4ddf52,_0x9b8b55);}const {roots:_0x18d152}=this['_savedMetaData']['get'](_0x536418['fromVersion']),{roots:_0x632752}=this['_savedMetaData']['get'](_0x536418['toVersion']),_0x591d27=K(_0x18d152['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x591d27),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x591d27,Number['NEGATIVE_INFINITY']));const _0x2d9844=K(_0x632752['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2d9844),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2d9844));const _0x37a2e6=Array['from'](this['_diffRoots'])['map'](([_0x2789f1,_0x1d587b])=>[_0x2789f1,K(_0x1d587b)]);this['_saveMetaData'](this['_lastTo'],_0x37a2e6,this['_markers'],_0x3e7a34);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0xa9e323,_0x23e6f2,_0xb76c7f,_0xd0f07a){const _0x49c039=new Map(_0x23e6f2),_0x1414bc=new Map(_0x115d90(_0xd0f07a)),_0x232013=new Map();for(const [_0x20f938,_0xa67b84]of _0xb76c7f)_0x232013['set'](_0x20f938,{'start':_0xa67b84['start']['clone'](),'end':_0xa67b84['end']['clone'](),'rootName':_0xa67b84['root']['rootName']});this['_savedMetaData']['set'](_0xa9e323,{'roots':_0x49c039,'markers':_0x232013,'rootsAttributes':_0x1414bc});}['_removeMetaData'](_0x1bf2bc){this['_savedMetaData']['delete'](_0x1bf2bc);}['_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'](_0x34f887,_0x3b8964=null){let _0x321acd=null;_0x34f887['is']('documentFragment')||(_0x321acd=new _0x14fd90(_0x34f887['name'],{'vid_start':null===_0x3b8964?this['_revisionId']++:_0x3b8964++}));const _0xb80a33=[];for(const _0x589a8b of _0x34f887['getChildren']())if(_0x589a8b['is']('element')){_0xb80a33['push'](this['_makeIdsRoot'](_0x589a8b,_0x3b8964));const _0x3144f6=_0xb80a33[_0xb80a33['length']-0x1];null!==_0x3b8964&&(_0x3b8964=_0x3144f6['is']('element','$text')?_0x3144f6['getAttribute']('vid')+0x1:_0x3144f6['getAttribute']('vid_end')+0x1);}else{for(let _0x1c71d6=0x0;_0x1c71d6<_0x589a8b['offsetSize'];_0x1c71d6++)_0xb80a33['push'](new _0x14fd90('$text',{'vid':null===_0x3b8964?this['_revisionId']++:_0x3b8964++}));}if(_0x34f887['is']('documentFragment')){const _0x4a7bc2=N(_0x34f887['rootName']);return _0x4a7bc2['_insertChild'](0x0,_0xb80a33),_0x4a7bc2;}return _0x321acd['_setAttribute']('vid_end',null===_0x3b8964?this['_revisionId']++:_0x3b8964++),_0x321acd['_insertChild'](0x0,_0xb80a33),_0x321acd;}['_calculateMetaData'](_0x4e3296,_0x3f773d,_0x5ad445){this['_reset']();const {roots:_0x28c1e6,markers:_0x1a7b98,rootsAttributes:_0x519dd3}=this['_savedMetaData']['get'](_0x4e3296);this['_baseRoots']=new Map(_0x28c1e6),this['_baseRootsAttributes']=new Map(_0x115d90(_0x519dd3));for(const [_0xa4007b,_0x33560d]of this['_baseRoots'])if('$graveyard'!==_0xa4007b&&(this['_diffRoots']['set'](_0xa4007b,K(_0x33560d)),this['_diffRootsAttributes']=new Map(_0x115d90(_0x519dd3)),_0x5ad445)){const _0x5803c7=this['_revisionId'];this['_idsRoots']['set'](_0xa4007b,this['_makeIdsRoot'](_0x33560d)),this['_baseIdsRoots']['set'](_0xa4007b,this['_makeIdsRoot'](_0x33560d,_0x5803c7));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',K(this['_baseRoots']['get']('$graveyard'))),_0x5ad445&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x22fd67,_0x3098fa]of _0x1a7b98){const _0x27bcdd=this['_baseRoots']['get'](_0x3098fa['rootName']),_0x1494f7=this['_diffRoots']['get'](_0x3098fa['rootName']),_0x5b1d79=new _0x23adf7(this['_fixPosition'](_0x3098fa['start'],_0x27bcdd),this['_fixPosition'](_0x3098fa['end'],_0x27bcdd)),_0x193a13=this['_fixRange'](_0x5b1d79,_0x1494f7);_0x27bcdd['markers']['set'](_0x22fd67,_0x5b1d79),this['_markers']['set'](_0x22fd67,_0x193a13);}this['_applyOperations'](_0x4e3296,_0x3f773d,_0x5ad445);}['_applyOperations'](_0x31b7b4,_0x24015e,_0x2f4b1c){for(const _0x36c4ff of this['source']['getOperations'](_0x31b7b4,_0x24015e))this['_handleOperation'](_0x36c4ff,_0x2f4b1c);for(const _0x20d972 of this['_diffRoots']['values']())_0x20d972['markers']['clear']();for(const [_0x486c0a,_0x12e097]of this['_markers']){this['_diffRoots']['get'](_0x12e097['root']['rootName'])['markers']['set'](_0x486c0a,_0x12e097['clone']());}const _0x519ef3=new Map(),_0xbfcecd=new Map();for(const [_0x57c9db,_0x5d702f]of this['_diffRoots'])_0x519ef3['set'](_0x57c9db,K(_0x5d702f)),_0xbfcecd['set'](_0x57c9db,this['_diffRootsAttributes']['get'](_0x57c9db));this['_saveMetaData'](_0x24015e,_0x519ef3,this['_markers'],_0xbfcecd);}['_getPreviousFrom'](_0x35819b){const _0x361fea=Array['from'](this['_savedMetaData']['keys']());_0x361fea['sort']((_0x2b04ac,_0x4d0d6f)=>_0x2b04ac-_0x4d0d6f),_0x361fea['reverse']();for(const _0x152620 of _0x361fea)if(_0x152620<_0x35819b)return _0x152620;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xf802f0,_0xadd66d){const _0x4c25b1=Array['from'](_0xadd66d['markers'])['map'](([_0x198609,_0x250abd])=>[_0x198609,this['_fixRange'](_0x250abd,_0xf802f0)]);_0xf802f0['markers']=new Map(_0x4c25b1);}['_transformMarkers'](_0x477f0e){for(const _0x1aa6af of this['_markers']['values']()){const _0x1464fe=_0x1aa6af['getTransformedByOperation'](_0x477f0e),_0x5c31b2=_0x23adf7['_createFromRanges'](_0x1464fe);_0x1aa6af['start']=_0x5c31b2['start'],_0x1aa6af['end']=_0x5c31b2['end'];}}['_handleOperation'](_0xe507f7,_0x45e267){if('addRoot'!=_0xe507f7['type']&&'detachRoot'!=_0xe507f7['type']){if('insert'==_0xe507f7['type']){const _0x37db18=_0xe507f7['position']['root']['rootName'];this['_diffRoots']['has'](_0x37db18)||(this['_diffRoots']['set'](_0x37db18,N(_0x37db18,!0x0)),this['_diffRootsAttributes']['set'](_0x37db18,{}),_0x45e267&&this['_idsRoots']['set'](_0x37db18,N(_0x37db18,!0x0)));}else{if('addRootAttribute'==_0xe507f7['type']||'removeRootAttribute'==_0xe507f7['type']||'changeRootAttribute'==_0xe507f7['type'])return void this['_handleRootAttributeOperation'](_0xe507f7);'marker'==_0xe507f7['type']&&this['_handleMarkerOperation'](_0xe507f7);}if('marker'!==_0xe507f7['type']){const _0x261f16=this['_cloneOperation'](_0xe507f7,this['_diffRoots']);_0x261f16['_execute'](),this['_transformMarkers'](_0x261f16);}if(_0x45e267)switch(_0xe507f7['type']){case'insert':this['_handleInsertOperation'](_0xe507f7);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xe507f7);break;case'merge':this['_handleMergeOperation'](_0xe507f7);break;case'split':this['_handleSplitOperation'](_0xe507f7);}}else this['_handleRootOperation'](_0xe507f7,_0x45e267);}['_cloneOperation'](_0x3f45cd,_0x3fd0fc){const _0x33318f=_0x3f45cd['clone']();return _0x33318f['_authorId']=_0x3f45cd['_authorId'],this['_fixOperation'](_0x33318f,_0x3fd0fc),_0x33318f;}['_getBaseVids'](_0x4e8aed){return _0x4e8aed['map'](_0x1cabd2=>{const _0x10a17d=this['_getVidAttributeName'](_0x1cabd2);return Number(_0x1cabd2['item']['getAttribute'](_0x10a17d));});}['_generateTape'](_0x28ceb6,_0x4ec0ef){if(_0x28ceb6['is']('element','$text'))_0x4ec0ef['push']({'item':_0x28ceb6,'type':'text'});else{_0x28ceb6['is']('element')&&_0x4ec0ef['push']({'item':_0x28ceb6,'type':'elementStart'});for(const _0x57b3ea of _0x28ceb6['getChildren']())this['_generateTape'](_0x57b3ea,_0x4ec0ef);_0x28ceb6['is']('element')&&_0x4ec0ef['push']({'item':_0x28ceb6,'type':'elementEnd'});}return _0x4ec0ef;}['_getState'](){const _0x432a33=new Map(this['_touched']),_0x5c7515=new Map(_0x432a33),_0x8e5d67=new Map(),_0x1b2e91={'insertions':{},'deletions':{}},_0x1e3d42={'insertions':{},'deletions':{}},_0x3a0bdd=new Map(),_0x4ca651=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4ca651['delete']('$graveyard');for(const _0xd77c7a of _0x4ca651){const _0x1b3f89=this['_diffRoots']['get'](_0xd77c7a)||N(_0xd77c7a,!0x1),_0x4b0345=this['_baseRoots']['get'](_0xd77c7a)||N(_0xd77c7a,!0x1);_0x1b3f89['isAttached']()||_0x4b0345['isAttached']()?(_0x1b2e91['insertions'][_0xd77c7a]=K(_0x1b3f89),_0x1b2e91['deletions'][_0xd77c7a]=K(_0x4b0345),this['_copyMarkers'](_0x1b2e91['deletions'][_0xd77c7a],_0x4b0345),this['_copyMarkers'](_0x1b2e91['insertions'][_0xd77c7a],_0x1b3f89),_0x1e3d42['insertions'][_0xd77c7a]=this['_generateTape'](this['_idsRoots']['get'](_0xd77c7a),[]),_0x1e3d42['deletions'][_0xd77c7a]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xd77c7a)||N(_0xd77c7a,!0x1),[])):_0x4ca651['delete'](_0xd77c7a);}for(const _0xd7cf8b of _0x4ca651){const _0x19fb34=_0x1e3d42['insertions'][_0xd7cf8b];for(const _0x21fc8a of _0x19fb34){const _0x43f2d1=this['_getVidAttributeName'](_0x21fc8a),_0x139d93=_0x21fc8a['item']['getAttribute'](_0x43f2d1);_0x5c7515['delete'](_0x139d93),_0x139d93>=this['_startingRevisionId']&&_0x8e5d67['set'](_0x139d93,_0x432a33['get'](_0x139d93));}}for(const _0x518004 of _0x4ca651){const _0x44abbb=_0x1e3d42['insertions'][_0x518004],_0x22a494=this['_getBaseVids'](_0x1e3d42['deletions'][_0x518004]);let _0x324c11=0x0;for(const _0x2f1432 of _0x44abbb){const _0x2e2021=this['_getVidAttributeName'](_0x2f1432),_0x1fe7c9=_0x2f1432['item']['getAttribute'](_0x2e2021);if(!_0x8e5d67['has'](_0x1fe7c9)&&!_0x3a0bdd['has'](_0x1fe7c9)){if(_0x5c7515['has'](_0x1fe7c9))_0x324c11++;else{if(_0x1fe7c9!=_0x22a494[_0x324c11]){const _0x78f7ed=_0x432a33['get'](_0x1fe7c9)||_0x432a33['get'](_0x22a494[_0x324c11]);for(;_0x1fe7c9!=_0x22a494[_0x324c11];)_0x5c7515['has'](_0x22a494[_0x324c11])||(_0x3a0bdd['set'](_0x22a494[_0x324c11],_0x78f7ed),_0x432a33['set'](_0x22a494[_0x324c11],_0x78f7ed)),_0x324c11++;}_0x324c11++;}}}}for(const _0x2c8764 of _0x4ca651){const _0x5b8df7=_0x1e3d42['insertions'][_0x2c8764];for(const _0x491e9d of _0x5b8df7){const _0x247072=this['_getVidAttributeName'](_0x491e9d),_0x185b11=_0x491e9d['item']['getAttribute'](_0x247072);if(_0x3a0bdd['has'](_0x185b11)){const _0x329d04=_0x3a0bdd['get'](_0x185b11);_0x5c7515['has'](_0x185b11)||_0x5c7515['set'](_0x185b11,{..._0x329d04}),_0x8e5d67['set'](_0x185b11,{..._0x329d04});}}}for(const _0x28d944 of _0x5c7515['keys']())_0x28d944>=this['_startingRevisionId']&&_0x5c7515['delete'](_0x28d944);const _0x4788b6=new Map();for(const _0x1b6099 of _0x4ca651){let _0x50826f=_0x1e3d42['insertions'][_0x1b6099];for(const _0x56b81e of _0x50826f)if(_0x56b81e['item']['is']('element','tableCell')){const _0x2c768b=this['_getVidAttributeName'](_0x56b81e),_0x5e384a=_0x56b81e['item']['getAttribute'](_0x2c768b);if(_0x8e5d67['has'](_0x5e384a)){const _0x399d40=_0x56b81e['item']['parent']['parent']['getAttribute']('vid_start'),_0x5c6feb=_0x4788b6['get'](_0x399d40)||new Set();_0x5c6feb['add'](_0x8e5d67['get'](_0x5e384a)['userId']),_0x4788b6['set'](_0x399d40,_0x5c6feb);}}_0x50826f=_0x1e3d42['deletions'][_0x1b6099];for(const _0x460039 of _0x50826f)if(_0x460039['item']['is']('element','tableCell')){const _0x34b52d=this['_getVidAttributeName'](_0x460039),_0x3c09a5=_0x460039['item']['getAttribute'](_0x34b52d);if(_0x5c7515['has'](_0x3c09a5)){const _0xbfbb35=_0x460039['item']['parent']['parent']['getAttribute']('vid_start'),_0x78dd32=_0x4788b6['get'](_0xbfbb35)||new Set();_0x78dd32['add'](_0x5c7515['get'](_0x3c09a5)['userId']),_0x4788b6['set'](_0xbfbb35,_0x78dd32);}}for(const _0xeaed5b of _0x4788b6['keys']())(_0x8e5d67['has'](_0xeaed5b)||_0x5c7515['has'](_0xeaed5b))&&_0x4788b6['delete'](_0xeaed5b);}for(const _0x54dd0e of _0x4ca651){const _0x5cd540=_0x1e3d42['insertions'][_0x54dd0e];let _0x152312=null,_0x22d934=null;for(const _0x3c60ad of _0x5cd540){const _0x56d463=this['_getVidAttributeName'](_0x3c60ad),_0x5a0c94=_0x3c60ad['item']['getAttribute'](_0x56d463),_0x33e267=_0x4788b6['get'](_0x5a0c94);_0x33e267&&'elementStart'==_0x3c60ad['type']&&(_0x152312=Array['from'](_0x33e267)[0x0],_0x22d934=_0x3c60ad['item']['getAttribute']('vid_end')),_0x152312&&(_0x5c7515['set'](_0x5a0c94,{'userId':_0x152312}),_0x8e5d67['set'](_0x5a0c94,{'userId':_0x152312})),_0x5a0c94==_0x22d934&&(_0x152312=null,_0x22d934=null);}}const _0x57f015={},_0x2143f3=new Set();for(const _0x4e619c of _0x4ca651){const _0x27a692=_0x1b2e91['deletions'][_0x4e619c],_0xdfc591=_0x1b2e91['insertions'][_0x4e619c];for(const {userId:_0x9bd184}of this['_touchedMarkers']['values']())null!==_0x9bd184&&_0x2143f3['add'](_0x9bd184);for(const {userId:_0x335cf5}of this['_touchedRoots']['values']())null!==_0x335cf5&&_0x2143f3['add'](_0x335cf5);this['_markChanges'](_0xdfc591,_0x1e3d42['insertions'][_0x4e619c],_0x8e5d67,'insertion',_0x2143f3),this['_markChanges'](_0x27a692,_0x1e3d42['deletions'][_0x4e619c],_0x5c7515,'deletion',_0x2143f3),_0x57f015[_0x4e619c]={'insertions':this['_prepareViewToSave'](_0xdfc591),'deletions':this['_prepareViewToSave'](_0x27a692),'attachChange':this['_touchedRoots']['get'](_0x4e619c)||null,'attributesBefore':_0x115d90(this['_baseRootsAttributes']['get'](_0x4e619c))||{},'attributesAfter':_0x115d90(this['_diffRootsAttributes']['get'](_0x4e619c))};}return{'diffData':_0x57f015,'authorsIds':Array['from'](_0x2143f3)};}['_processRootBeforeSave'](_0x5c03c5){for(const [,_0x1bba4b]of _0x5c03c5['markers']){const _0x28bc8b=_0x1bba4b['start']['getAncestors']()['filter'](_0x508c6a=>'tableCell'==_0x508c6a['name']);for(const _0x135fa4 of _0x28bc8b)0x1==_0x135fa4['childCount']&&_0x135fa4['getChild'](0x0)['is']('element','paragraph')&&_0x135fa4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x55e39c){this['_processRootBeforeSave'](_0x55e39c);const _0x4f513b=this['editor']['data']['toView'](_0x55e39c,{}),_0x2f6955=Array['from'](_0x4f513b['getChildren']())['map'](_0x1f9855=>this['_getViewJson'](_0x1f9855));return JSON['stringify'](_0x2f6955);}['_getViewJson'](_0x359629){if(_0x359629['is']('$text'))return _0x359629['data'];{const _0xfa0624=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x44ceec=_0x359629,_0x39f754=this['editor']['data']['htmlProcessor']['domConverter'],_0x1944f7={'type':_0xfa0624['_getTypeCharForViewElement'](_0x44ceec),'name':_0x44ceec['name'],'attributes':Array['from'](_0x44ceec['getAttributes']()),'children':Array['from'](_0x44ceec['getChildren']())['map'](_0x19462c=>this['_getViewJson'](_0x19462c))};if(_0x359629['is']('uiElement')&&'$comment'!=_0x359629['name']){const _0x3152bb=_0x359629['render'](_0x39f754['domDocument'],_0x39f754);_0x1944f7['children']['push'](_0x3152bb['outerHTML']);}else{if(_0x359629['is']('rawElement')){const _0xa4222b=_0x39f754['domDocument']['createElement'](_0x44ceec['name']);_0x359629['render'](_0xa4222b,_0x39f754),_0x1944f7['children']['push'](_0xa4222b['innerHTML']);}}const _0x268174=Array['from'](_0x44ceec['getCustomProperties']());_0x268174['length']>0x0&&(_0x1944f7['customProperties']=_0x268174);const _0x50c2ab=_0x44ceec['getFillerOffset']();return null!==_0x50c2ab&&(_0x1944f7['fillerOffset']=_0x50c2ab),_0x1944f7;}}['_markChanges'](_0x240eff,_0x2ac969,_0x50a245,_0x273079,_0x327d14){let _0x35ad93=null,_0x32bcca=null,_0x3a48ca=0x0;const _0xef4946=this['editor']['model'];for(let _0x2b2305=0x0;_0x2b2305<_0x2ac969['length'];_0x2b2305++){const _0xbce2b3=this['_getVidAttributeName'](_0x2ac969[_0x2b2305]),_0x401f6f=_0x2ac969[_0x2b2305]['item']['getAttribute'](_0xbce2b3),_0x3dca3f=_0x50a245['get'](_0x401f6f),_0x4c6c5f=_0x2b2305==_0x2ac969['length']-0x1;(!_0x35ad93&&_0x3dca3f&&(_0x35ad93=_0x3dca3f,_0x32bcca=_0x2ac969[_0x2b2305]),_0x35ad93&&(!_0x3dca3f||_0x3dca3f['userId']!=_0x35ad93['userId']))&&(_0x34bf84(_0x3dca3f,P(_0x32bcca,_0x240eff,_0xef4946),P(_0x2ac969[_0x2b2305],_0x240eff,_0xef4946)),_0x35ad93=_0x3dca3f||null,_0x32bcca=_0x3dca3f?_0x2ac969[_0x2b2305]:null),_0x35ad93&&_0x4c6c5f&&_0x34bf84(_0x3dca3f,P(_0x32bcca,_0x240eff,_0xef4946),V(_0x2ac969[_0x2b2305],_0x240eff,_0xef4946));}function _0x34bf84(_0x21d8fb,_0x1d0cba,_0x4b5cd8){const _0x3b7fd4=_0x35ad93['userId'],_0x4c87e7='revision:'+_0x273079+':'+_0x3b7fd4+':'+_0x3a48ca++,_0x3966b1=_0xef4946['createRange'](_0x1d0cba,_0x4b5cd8);_0x240eff['markers']['set'](_0x4c87e7,_0x3966b1),null!==_0x3b7fd4&&_0x327d14['add'](_0x3b7fd4);}}['_getVidAttributeName'](_0x739673){switch(_0x739673['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x430c31,_0x14fac9){_0x430c31['baseVersion']=null;for(const _0x1df86d in _0x430c31){const _0x51a33e=_0x430c31[_0x1df86d];if(_0x51a33e instanceof _0x3ee28f){const _0x45dc76=_0x14fac9['get'](_0x51a33e['root']['rootName']);_0x430c31[_0x1df86d]=this['_fixPosition'](_0x51a33e,_0x45dc76);}if(_0x51a33e instanceof _0x23adf7){const _0x5333a5=_0x14fac9['get'](_0x51a33e['root']['rootName']);_0x430c31[_0x1df86d]=this['_fixRange'](_0x51a33e,_0x5333a5);}'root'===_0x1df86d&&(_0x430c31['root']=_0x14fac9['get'](_0x430c31['root']['rootName']));}}['_fixRange'](_0x2f0253,_0x31d100){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2f0253['start'],_0x31d100),this['_fixPosition'](_0x2f0253['end'],_0x31d100));}['_fixPosition'](_0x1f5408,_0x417f58){return this['editor']['model']['createPositionFromPath'](_0x417f58,_0x1f5408['path'],_0x1f5408['stickiness']);}['_handleInsertOperation'](_0x1c7ad8){const _0x1ea10c=this['_idsRoots']['get'](_0x1c7ad8['position']['root']['rootName']),_0x36a8dd=this['_fixPosition'](_0x1c7ad8['position'],_0x1ea10c),_0x415c4a=null===_0x1c7ad8['_authorId']?null:_0x1c7ad8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x393822=_0x36a8dd['parent'],_0x239288=this['_revisionId'],_0x20835a=[];for(const _0x4741a1 of _0x1c7ad8['nodes'])if(_0x4741a1['is']('element'))_0x20835a['push'](this['_makeIdsRoot'](_0x4741a1));else{for(let _0x5db889=0x0;_0x5db889<_0x4741a1['offsetSize'];_0x5db889++)_0x20835a['push'](new _0x14fd90('$text',{'vid':this['_revisionId']++}));}const _0x1d6a01=this['_revisionId'];for(let _0x1d998c=_0x239288;_0x1d998c<_0x1d6a01;_0x1d998c++)this['_touched']['set'](_0x1d998c,{'userId':_0x415c4a});_0x393822['_insertChild'](_0x36a8dd['offset'],_0x20835a);}['_handleMoveOperation'](_0x1ab0cb){(_0x1ab0cb=this['_cloneOperation'](_0x1ab0cb,this['_idsRoots']))['_execute']();const _0x4e91f5=null===_0x1ab0cb['_authorId']?null:_0x1ab0cb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x12f587=_0x1ab0cb['getMovedRangeStart'](),_0x40babc=_0x12f587['parent'],_0xf003ca=_0x12f587['offset'];!function _0x382f27(_0x196021,_0x5541b2,_0x3a43c2,_0x277af3){for(let _0x532dd1=_0x3a43c2;_0x532dd1<_0x277af3;_0x532dd1++){const _0x27b745=_0x5541b2['getChild'](_0x532dd1);_0x27b745['is']('element','$text')?_0x196021['set'](_0x27b745['getAttribute']('vid'),{'userId':_0x4e91f5}):(_0x196021['set'](_0x27b745['getAttribute']('vid_start'),{'userId':_0x4e91f5}),_0x382f27(_0x196021,_0x27b745,0x0,_0x27b745['childCount']),_0x196021['set'](_0x27b745['getAttribute']('vid_end'),{'userId':_0x4e91f5}));}}(this['_touched'],_0x40babc,_0xf003ca,_0xf003ca+_0x1ab0cb['howMany']);}['_handleMergeOperation'](_0x343ec0){const _0x87f49a=null===(_0x343ec0=this['_cloneOperation'](_0x343ec0,this['_idsRoots']))['_authorId']?null:_0x343ec0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x348170=_0x343ec0['targetPosition']['parent'],_0x121406=_0x343ec0['sourcePosition']['parent'],_0x400185=_0x348170['getAttribute']('vid_end'),_0x5d3c84=_0x121406['getAttribute']('vid_start');_0x348170['_setAttribute']('vid_end',_0x121406['getAttribute']('vid_end')),_0x121406['_setAttribute']('vid_end',_0x400185),this['_touched']['set'](_0x5d3c84,{'userId':_0x87f49a}),this['_touched']['set'](_0x400185,{'userId':_0x87f49a}),_0x343ec0['_execute']();}['_handleSplitOperation'](_0x50b693){const _0x11e465=null===(_0x50b693=this['_cloneOperation'](_0x50b693,this['_idsRoots']))['_authorId']?null:_0x50b693['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x14fded=_0x50b693['graveyardPosition'],_0x2395e8=_0x50b693['splitPosition']['parent'];_0x50b693['_execute']();const _0x1c0872=_0x2395e8['getAttribute']('vid_end'),_0x4fc6e4=_0x50b693['insertionPosition']['nodeAfter'];if(_0x14fded){const _0x38bf27=_0x4fc6e4['getAttribute']('vid_end'),_0x72316e=_0x2395e8['getAttribute']('vid_end');_0x2395e8['_setAttribute']('vid_end',_0x38bf27),_0x4fc6e4['_setAttribute']('vid_end',_0x72316e),this['_touched']['set'](_0x2395e8['getAttribute']('vid_end'),{'userId':_0x11e465}),this['_touched']['set'](_0x4fc6e4['getAttribute']('vid_start'),{'userId':_0x11e465});}else{const _0x332970=this['_revisionId']++,_0x52d56b=this['_revisionId']++;_0x2395e8['_setAttribute']('vid_end',_0x332970),_0x4fc6e4['_setAttribute']('vid_start',_0x52d56b),_0x4fc6e4['_setAttribute']('vid_end',_0x1c0872),this['_touched']['set'](_0x332970,{'userId':_0x11e465}),this['_touched']['set'](_0x52d56b,{'userId':_0x11e465});}}['_handleMarkerOperation'](_0x2def22){if(!_0x2def22['affectsData'])return;const _0x431cc8=(_0x2def22=this['_cloneOperation'](_0x2def22,this['_diffRoots']))['oldRange']?_0x2def22['oldRange']['root']:null,_0x3d01f0=_0x2def22['newRange']?_0x2def22['newRange']['root']:null;_0x431cc8&&this['_markers']['delete'](_0x2def22['name']),_0x3d01f0&&this['_markers']['set'](_0x2def22['name'],_0x2def22['newRange']['clone']());const _0xdbc407=null===_0x2def22['_authorId']?null:_0x2def22['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5c5d92=_0x2def22['name'];if(!this['_touchedMarkers']['has'](_0x5c5d92))return void this['_touchedMarkers']['set'](_0x5c5d92,{'range':_0x2def22['oldRange'],'userId':_0xdbc407});const _0x256864=this['_touchedMarkers']['get'](_0x5c5d92),_0x5bb95b=_0x256864['range'],_0x4c2278=_0x2def22['newRange'];null==_0x5bb95b&&null==_0x4c2278||_0x5bb95b&&_0x4c2278&&_0x5bb95b['isEqual'](_0x4c2278)?this['_touchedMarkers']['delete'](_0x2def22['name']):_0x256864['userId']=_0xdbc407;}['_handleRootOperation'](_0x12dcec,_0x5134e9){this['_diffRoots']['has'](_0x12dcec['rootName'])?this['_diffRoots']['get'](_0x12dcec['rootName'])['_isAttached']=_0x12dcec['isAdd']:(this['_diffRoots']['set'](_0x12dcec['rootName'],N(_0x12dcec['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x12dcec['rootName'],{}),_0x5134e9&&this['_idsRoots']['set'](_0x12dcec['rootName'],N(_0x12dcec['rootName'],!0x0)));const _0x3ace48=null===_0x12dcec['_authorId']?null:_0x12dcec['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x18b7ec=this['_touchedRoots']['get'](_0x12dcec['rootName']);_0x18b7ec&&_0x18b7ec['userId']===_0x3ace48?this['_touchedRoots']['delete'](_0x12dcec['rootName']):this['_touchedRoots']['set'](_0x12dcec['rootName'],{'userId':_0x3ace48,'isAttached':_0x12dcec['isAdd']});}['_handleRootAttributeOperation'](_0x4349ed){const _0x336586=this['_diffRootsAttributes']['get'](_0x4349ed['root']['rootName']);null===_0x4349ed['newValue']?delete _0x336586[_0x4349ed['key']]:_0x336586[_0x4349ed['key']]=_0x4349ed['newValue'];}}function K(_0x48f95a){const _0xad40b1=N(_0x48f95a['rootName'],_0x48f95a['isAttached']());for(const _0x3a5ce8 of _0x48f95a['getChildren']()){const _0x25b523=_0x3a5ce8['_clone'](!0x0);_0xad40b1['_appendChild'](_0x25b523);}return _0xad40b1;}function N(_0x1b684e,_0x270af3=!0x0){const _0x5c7c00=new _0xf3d172();return _0x5c7c00['rootName']=_0x1b684e,_0x5c7c00['_isAttached']=_0x270af3,_0x5c7c00['isAttached']=()=>_0x5c7c00['_isAttached'],_0x5c7c00;}function P(_0x2ae5d7,_0x3a0172,_0x3db48b){const _0x59c1ce='elementEnd'==_0x2ae5d7['type']?_0x3db48b['createPositionAt'](_0x2ae5d7['item'],'end'):_0x3db48b['createPositionBefore'](_0x2ae5d7['item']);return _0x3db48b['createPositionFromPath'](_0x3a0172,_0x59c1ce['path'],_0x59c1ce['stickiness']);}function V(_0x1b9a07,_0x4b90c7,_0x176ed9){const _0x1bf080='elementStart'==_0x1b9a07['type']?_0x176ed9['createPositionAt'](_0x1b9a07['item'],0x0):_0x176ed9['createPositionAfter'](_0x1b9a07['item']);return _0x176ed9['createPositionFromPath'](_0x4b90c7,_0x1bf080['path'],_0x1bf080['stickiness']);}class he extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0xb6d8a(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x12ebac){super(),this['id']=_0x12ebac['id']||_0x391c61(),this['author']=_0x12ebac['author'],this['type']=_0x12ebac['type'],this['data']=_0x12ebac['data']||{},this['rootName']=_0x12ebac['rootName'],this['set']('createdAt',_0x12ebac['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1812b2,_0xc6f041){this['newRevisionId']=_0x1812b2,this['oldRevisionId']=_0xc6f041,this['changes']=new _0x480dd0();}['_setChanges'](_0x48b181){for(const _0x15df86 of _0x48b181)this['changes']['add'](_0x15df86);}}class u extends _0x439397{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x153f01,_0x9a6d6b,S,$];}constructor(_0x3e284e){super(_0x3e284e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x4a4134,_0x2831fe,_0x37a712)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x158040=>{for(const _0x1d7fcf of this['editor']['editing']['view']['document']['roots'])_0x37a712?_0x158040['removeClass']('ck-editor__editable__overlay',_0x1d7fcf):_0x158040['addClass']('ck-editor__editable__overlay',_0x1d7fcf);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5989c7=>null!==_0x5989c7),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x2792b1,_0x4d60d8,_0x5d9c2e)=>_0x2792b1&&_0x5d9c2e?_0x4d60d8['changes']['getIndex'](_0x5d9c2e):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x42120f,_0xb4afba)=>_0x42120f?_0xb4afba['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x9a6d6b);}['init'](){const _0x12e484=this['editor'],_0x115b6e=new rt(_0x12e484,{'direction':'backward'}),_0x26d8fd=new rt(_0x12e484,{'direction':'forward'});(_0x12e484['commands']['add']('showPreviousChange',_0x115b6e),_0x12e484['commands']['add']('showNextChange',_0x26d8fd),_0x12e484['commands']['add']('restoreRevision',new nt(_0x12e484)),this['on']('change:numberOfChanges',()=>{_0x115b6e['refresh'](),_0x26d8fd['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x12e484['enableReadOnlyMode']('revision-viewer'),_0x12e484['plugins']['has']('WidgetToolbarRepository'))&&_0x12e484['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x16ec8f){return await this['_utils']['loadRevisionData'](_0x16ec8f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x16ec8f);}async['getRevisionRootsAttributes'](_0xdcdcfe){return await this['_utils']['loadRevisionData'](_0xdcdcfe,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xdcdcfe);}async['compare'](_0x414a71,_0x5791de,_0x54aca1=!0x1){if(!this['isEnabled'])return;const _0x5b3355=this['diff'],_0x4f7209=this['repository'],_0x351d46='string'==typeof _0x414a71?_0x4f7209['getRevision'](_0x414a71):_0x414a71,_0x2695f6='string'==typeof _0x5791de?_0x4f7209['getRevision'](_0x5791de):_0x5791de,_0x14aaaa=_0x351d46['id'],_0xde599f=_0x2695f6?_0x2695f6['id']:null;if(!_0x54aca1&&this['diff']&&this['diff']['newRevisionId']===_0x14aaaa&&this['diff']['oldRevisionId']===_0xde599f)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x14aaaa,_0xde599f);const _0x1c3b37=this['_getRevisionsRange'](_0x351d46,_0x2695f6,!0x0)['map'](_0xcab67e=>this['_utils']['loadRevisionData'](_0xcab67e,this['adapter']));return _0x1c3b37['push'](new Promise(_0x58400e=>{setTimeout(_0x58400e,0x14);})),Promise['all'](_0x1c3b37)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x36db24=this['_getDiff'](_0x14aaaa,_0xde599f);for(const _0x30762a of _0x36db24['changes'])this['_changeIdToChange']['set'](_0x30762a['id'],_0x30762a);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4ea83d=>{for(const _0x4e6b16 of this['editor']['model']['document']['getRootNames']())_0x4ea83d['detachRoot'](_0x4e6b16);for(const _0x41175f of Object['keys'](_0x36db24['model'])){const _0x4734f9=_0x4ea83d['addRoot'](_0x41175f);for(const _0x1977b9 of Object['keys'](_0x36db24['attributes'][_0x41175f]))_0x4ea83d['setAttribute'](_0x1977b9,_0x36db24['attributes'][_0x41175f][_0x1977b9],_0x4734f9);_0x4ea83d['insert'](_0x36db24['model'][_0x41175f],_0x4734f9,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x36db24['changes'])),this['isReady']=!0x0;})['catch'](_0x2aa1bf=>{console['error'](_0x2aa1bf),this['_cleanUp'](),_0x5b3355&&(this['diff']=_0x5b3355),this['isReady']=!0x0;});}['addRevisionData'](_0x138dcc,_0xb2178a){const _0x58c593=this['repository']['createRevision'](_0x138dcc);return _0x58c593['on']('_update',(_0x4c35eb,_0x842bd7,_0x148aed)=>_0xb2178a(_0x842bd7,_0x148aed,_0x58c593)),this['repository']['addRevision'](_0x58c593),_0x58c593;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x37e957=>{for(const _0x357961 of this['editor']['model']['document']['getRootNames']())_0x37e957['detachRoot'](_0x357961);});}['_sortAndFilterDiffChanges'](_0x5623c1){const _0x3cd1e2=[],_0x3661f6=new Map();for(const _0x368d88 of this['editor']['model']['document']['getRootNames']()){const _0x3524f2=this['editor']['editing']['view']['getDomRoot'](_0x368d88);if(!_0x3524f2)continue;const _0xad7215=_0x3524f2['getClientRects']()['item'](0x0);_0xad7215&&(_0x3cd1e2['push'](_0x368d88),_0x3661f6['set'](_0x368d88,_0xad7215));}return _0x3cd1e2['sort']((_0x1b6974,_0x2b76cc)=>{const _0xd13f7d=_0x3661f6['get'](_0x1b6974),_0x30efce=_0x3661f6['get'](_0x2b76cc);return _0xd13f7d['y']-_0x30efce['y']||_0xd13f7d['x']-_0x30efce['x'];}),(_0x5623c1=_0x5623c1['filter'](_0x69bda3=>_0x3cd1e2['includes'](_0x69bda3['rootName'])))['sort']((_0xa42988,_0x35ed62)=>_0x3cd1e2['indexOf'](_0xa42988['rootName'])-_0x3cd1e2['indexOf'](_0x35ed62['rootName'])),_0x5623c1;}['_makeTape'](_0xfa55f0){const _0x3effe8=Array['from'](_0xfa55f0['markers'])['filter'](([_0x57c76e,_0x5c7fa2])=>_0x57c76e['startsWith']('revision:')&&!_0x5c7fa2['isCollapsed']),_0x4d2bda=Array['from'](this['editor']['model']['createRangeIn'](_0xfa55f0)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3effe8['length'])for(const _0x5d0b0 of _0x4d2bda){const [_0x93876c,_0x242d14]=_0x3effe8[0x0],[,_0x168d50,_0x10243a]=_0x93876c['split'](':');if(_0x242d14['end']['isEqual'](_0x5d0b0['nextPosition'])&&_0x3effe8['shift'](),(_0x5d0b0['previousPosition']['isEqual'](_0x242d14['start'])||_0x5d0b0['previousPosition']['isAfter'](_0x242d14['start']))&&('insertion'==_0x168d50?_0x5d0b0['isAdded']={'userId':_0x10243a}:'deletion'==_0x168d50&&(_0x5d0b0['isRemoved']={'userId':_0x10243a})),0x0==_0x3effe8['length'])break;}return _0x4d2bda;}['_refreshStartEndIndex'](_0x5cbc3a){const _0x5c0a55=new Map();for(let _0x1db88b=0x0;_0x1db88b<_0x5cbc3a['length'];_0x1db88b++)'text'===_0x5cbc3a[_0x1db88b]['type']?(_0x5cbc3a[_0x1db88b]['item']['startIndex']=_0x1db88b,_0x5cbc3a[_0x1db88b]['item']['endIndex']=_0x1db88b):('elementStart'===_0x5cbc3a[_0x1db88b]['type']?_0x5cbc3a[_0x1db88b]['item']['startIndex']=_0x1db88b:'elementEnd'===_0x5cbc3a[_0x1db88b]['type']&&(_0x5cbc3a[_0x1db88b]['item']['endIndex']=_0x1db88b),_0x5c0a55['set'](_0x5cbc3a[_0x1db88b]['id'],_0x1db88b));for(const _0x4d804d of _0x5c0a55['values']())'elementStart'===_0x5cbc3a[_0x4d804d]['type']?_0x5cbc3a[_0x4d804d]['item']['endIndex']=_0x5c0a55['get'](_0x5cbc3a[_0x4d804d]['pairId']):'elementEnd'===_0x5cbc3a[_0x4d804d]['type']&&(_0x5cbc3a[_0x4d804d]['item']['startIndex']=_0x5c0a55['get'](_0x5cbc3a[_0x4d804d]['pairId']));}['_processTape'](_0x2dd897){for(let _0x21a77e=0x0;_0x21a77e<_0x2dd897['length'];_0x21a77e++){if('elementStart'===_0x2dd897[_0x21a77e]['type'])_0x2dd897[_0x21a77e]['item']['startIndex']=_0x21a77e;else{if('elementEnd'===_0x2dd897[_0x21a77e]['type']){_0x2dd897[_0x21a77e]['item']['endIndex']=_0x21a77e;const _0x124acf=_0x2dd897[_0x21a77e]['item']['startIndex'];_0x2dd897[_0x124acf]['pairId']=_0x2dd897[_0x21a77e]['id'],_0x2dd897[_0x21a77e]['pairId']=_0x2dd897[_0x124acf]['id'];}else _0x2dd897[_0x21a77e]['item']['startIndex']=_0x21a77e,_0x2dd897[_0x21a77e]['item']['endIndex']=_0x21a77e,_0x2dd897[_0x21a77e]['pairId']=null;}_0x2dd897[_0x21a77e]['markersStart']||(_0x2dd897[_0x21a77e]['markersStart']=[],_0x2dd897[_0x21a77e]['markersEnd']=[]);}}['_markInsertions'](_0x3a1b79,_0x2e7d9b){const _0x4f028f=_0x3a1b79['filter'](_0x54ea42=>!_0x54ea42['isAdded']);for(let _0xe20d47=0x0;_0xe20d47<_0x2e7d9b['length'];_0xe20d47++)_0x2e7d9b[_0xe20d47]['isAdded']&&(_0x4f028f[_0xe20d47]['isAdded']=_0x2e7d9b[_0xe20d47]['isAdded']);}['_getDiff'](_0x1672b2,_0x279708=null){const _0x30f725=this['repository']['getRevision'](_0x1672b2),_0x3a0d0a=_0x279708?this['repository']['getRevision'](_0x279708):null,_0x5c3c9c=this['_getRevisionsRange'](_0x30f725,_0x3a0d0a),_0x1c30da=_0x5c3c9c[_0x5c3c9c['length']-0x1],_0x247f0c=new Map(),_0x56e443={'model':{},'attributes':{},'changes':[]},_0x135fe3=new Set(),_0x5891a2=new Map();for(let _0x4bded0=_0x5c3c9c['length']-0x1;_0x4bded0>=0x0;_0x4bded0--){const _0x104a85=_0x5c3c9c[_0x4bded0];for(const _0x506bca of Object['keys'](_0x104a85['diffData']))if(_0x104a85['diffData'][_0x506bca]['attachChange']){const _0x27b787=_0x104a85['diffData'][_0x506bca]['attachChange'];_0x27b787['isAttached']?(_0x135fe3['add'](_0x506bca),_0x5891a2['has'](_0x506bca)&&_0x5891a2['get'](_0x506bca)['userId']==_0x27b787['userId']?_0x5891a2['delete'](_0x506bca):_0x5891a2['set'](_0x506bca,_0x27b787)):_0x5891a2['has'](_0x506bca)?(_0x135fe3['delete'](_0x506bca),_0x5891a2['delete'](_0x506bca)):(_0x135fe3['add'](_0x506bca),_0x5891a2['set'](_0x506bca,_0x27b787));}else _0x135fe3['add'](_0x506bca);}for(const _0x4c45c6 of _0x135fe3){const _0x459d4d=_0x5891a2['has'](_0x4c45c6)&&!_0x5891a2['get'](_0x4c45c6)['isAttached'];let _0x1507df=_0x459d4d?_0x5c3c9c['length']-0x1:0x0;const _0x2cbb84=_0x459d4d?-0x1:0x1;for(;_0x5c3c9c[_0x1507df];){const _0x1c211a=_0x5c3c9c[_0x1507df];if(_0x1c211a['diffData'][_0x4c45c6]){const _0x246237=_0x459d4d?_0x1c211a['diffData'][_0x4c45c6]['attributesBefore']:_0x1c211a['diffData'][_0x4c45c6]['attributesAfter'];_0x56e443['attributes'][_0x4c45c6]=_0x246237?_0x115d90(_0x246237):{};break;}_0x1507df+=_0x2cbb84;}}for(const _0x2ba182 of _0x5c3c9c){_0x2ba182['model']={};for(const _0x1ff6c0 of _0x2ba182['authors'])_0x247f0c['set'](_0x1ff6c0['id'],_0x1ff6c0);for(const _0x1193f3 of _0x135fe3){const _0x343953=_0x2ba182['diffData'][_0x1193f3]?_0x2ba182['diffData'][_0x1193f3]['insertions']:'[]',_0x526c1a=_0x2ba182['diffData'][_0x1193f3]?_0x2ba182['diffData'][_0x1193f3]['deletions']:'[]';_0x2ba182['model'][_0x1193f3]={'insertions':this['_utils']['_makeModelFromViewString'](_0x343953),'deletions':this['_utils']['_makeModelFromViewString'](_0x526c1a)};}}for(const _0x3998ea of _0x135fe3){let _0x1790fa=null,_0x35c0a5=0x0;const _0x118040=new Map(Array['from'](_0x30f725['model'][_0x3998ea]['insertions']['markers'])['filter'](([_0x2ae8b8])=>!_0x2ae8b8['startsWith']('revision:')));let _0x106113=0x0;for(const _0x8aa9c5 of _0x5c3c9c){const _0x1c4000=this['_makeTape'](_0x8aa9c5['model'][_0x3998ea]['insertions']);_0x8aa9c5==_0x30f725?(_0x1790fa=_0x1c4000,_0x35c0a5=_0x1790fa['length'],_0x1790fa['forEach'](_0x1a9a6a=>{_0x1a9a6a['id']=_0x106113++;}),this['_processTape'](_0x1790fa)):this['_markInsertions'](_0x1790fa,_0x1c4000);const _0x3baacd=_0x1790fa['filter'](_0x4cdbd1=>!_0x4cdbd1['isAdded'])['map'](_0x3c9271=>_0x3c9271['id']);let _0x2ec438=0x0;const _0x499b3f=this['_makeTape'](_0x8aa9c5['model'][_0x3998ea]['deletions']);_0x499b3f['forEach'](_0x648eac=>{_0x648eac['isRemoved']?_0x648eac['id']=_0x35c0a5++:_0x648eac['id']=_0x3baacd[_0x2ec438++];}),this['_processTape'](_0x499b3f),this['_setDistance'](_0x1790fa,'isAdded'),this['_setDistance'](_0x499b3f,'isRemoved'),_0x8aa9c5==_0x30f725&&this['_markMarkers'](_0x1790fa,_0x118040),_0x1790fa=this['_joinTapes'](_0x1790fa,_0x499b3f),this['_refreshStartEndIndex'](_0x1790fa),this['_setDistance'](_0x1790fa,'isRemoved');}_0x1790fa=_0x1790fa['filter'](_0x25bcd7=>!(_0x25bcd7['isAdded']&&_0x25bcd7['isRemoved']));const _0x18124b=new Map(_0x1c30da['model'][_0x3998ea]['deletions']['markers']),_0x5a53e7=new Set(_0x118040['keys']());for(const _0x3440cc of _0x18124b['keys']())_0x5a53e7['delete'](_0x3440cc);this['_markSuggestions'](_0x1790fa,_0x5a53e7),this['_fixObsoleteTags'](_0x1790fa),_0x1790fa=this['_removeMissingPairs'](_0x1790fa),_0x1790fa=this['_markMismatchedRemovedTags'](_0x1790fa),_0x1790fa=this['_removeUnsupportedChanges'](_0x1790fa);const {root:_0x369f70,changes:_0x158efd}=this['_makeModelFromTape'](_0x1790fa,_0x247f0c,_0x3998ea);_0x56e443['model'][_0x3998ea]=_0x369f70;const _0x292874=_0x5891a2['get'](_0x3998ea);if(_0x292874){const _0x158fa1=_0x247f0c['get'](_0x292874['userId']),_0x2300e5=new G({'author':_0x158fa1,'type':_0x292874['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3998ea});_0x158efd['unshift'](_0x2300e5),_0x56e443['attributes'][_0x3998ea]['revisionHistoryAttachChange']=_0x2300e5['id'];}_0x56e443['changes']=_0x56e443['changes']['concat'](_0x158efd);}return _0x56e443;}['_markMarkers'](_0x57f736,_0x33e836){for(let _0x5c2eed=0x0;_0x5c2eed<_0x57f736['length'];_0x5c2eed++)for(const [_0x1642a4,_0x4e2c49]of _0x33e836)!_0x4e2c49['isCollapsed']&&_0x4e2c49['start']['isEqual'](_0x57f736[_0x5c2eed]['previousPosition'])&&_0x57f736[_0x5c2eed]['markersStart']['push'](_0x1642a4),_0x4e2c49['end']['isEqual'](_0x57f736[_0x5c2eed]['nextPosition'])&&_0x57f736[_0x5c2eed]['markersEnd']['push'](_0x1642a4);}['_joinTapes'](_0x66d8c3,_0x4b6713){let _0x221eea=[],_0x317ffa=0x0,_0x42badb=0x0;for(;_0x317ffa<_0x66d8c3['length']||_0x42badb<_0x4b6713['length'];){const _0x2f75de=_0x66d8c3[_0x317ffa]||{},_0x1540af=_0x4b6713[_0x42badb]||{};if(_0x2f75de['id']==_0x1540af['id'])_0x317ffa++,_0x42badb++,_0x221eea['push'](_0x2f75de);else{if(_0x1540af['isRemoved']&&_0x2f75de['isAdded']){const {commonTape:_0x30d1e9,iEnd:_0x19fa1e,jEnd:_0x5b54fc}=this['_threeWayMerge'](_0x66d8c3,_0x317ffa,_0x4b6713,_0x42badb);_0x221eea=_0x221eea['concat'](_0x30d1e9),_0x317ffa=_0x19fa1e,_0x42badb=_0x5b54fc;}else _0x1540af['isRemoved']?(_0x42badb++,_0x221eea['push'](_0x1540af)):(_0x317ffa++,_0x221eea['push'](_0x2f75de));}}return _0x221eea;}['_markSuggestions'](_0x44d158,_0x5b4fc9){const _0x52e5f7=[];for(let _0x5c7b83=0x0;_0x5c7b83<_0x44d158['length'];_0x5c7b83++){for(let _0x5dc3f2=0x0;_0x5dc3f2<_0x44d158[_0x5c7b83]['markersStart']['length'];_0x5dc3f2++){const _0x27c5d5=_0x44d158[_0x5c7b83]['markersStart'][_0x5dc3f2];if(!_0x5b4fc9['has'](_0x27c5d5))continue;const {group:_0x590cb7,type:_0x1f2ba1,authorId:_0x106024}=_0x214458(_0x27c5d5);'revision-suggestion'!=_0x590cb7||'insertion'!=_0x1f2ba1&&'deletion'!=_0x1f2ba1||(_0x52e5f7['unshift']({'type':_0x1f2ba1,'name':_0x27c5d5,'userId':_0x106024}),_0x44d158[_0x5c7b83]['markersStart']['splice'](_0x5dc3f2,0x1),_0x5dc3f2--);}_0x1e536e(_0x44d158[_0x5c7b83]);for(let _0x20e381=0x0;_0x20e381<_0x44d158[_0x5c7b83]['markersEnd']['length'];_0x20e381++){const _0x3e423d=_0x44d158[_0x5c7b83]['markersEnd'][_0x20e381];if(!_0x5b4fc9['has'](_0x3e423d))continue;const {group:_0x44cedb,type:_0x2caf07}=_0x214458(_0x3e423d);if('revision-suggestion'!=_0x44cedb||'insertion'!=_0x2caf07&&'deletion'!=_0x2caf07)continue;_0x44d158[_0x5c7b83]['markersEnd']['splice'](_0x20e381,0x1),_0x20e381--;const _0x4ab327=_0x52e5f7['findIndex'](_0xbc4e57=>_0xbc4e57['name']==_0x3e423d);_0x4ab327>-0x1&&_0x52e5f7['splice'](_0x4ab327,0x1);}}function _0x214458(_0x226d4a){const _0x335869=_0x226d4a['split'](':');return{'group':_0x335869[0x0],'type':_0x335869[0x1],'subType':_0x335869['length']>=0x5?_0x335869[0x2]:null,'id':_0x335869['length']<0x5?_0x335869[0x2]:_0x335869[0x3],'authorId':_0x335869['length']<0x5?_0x335869[0x3]:_0x335869[0x4],'markerCount':0x6==_0x335869['length']?_0x335869[0x5]:null};}function _0x1e536e(_0xa770d8){for(let _0x4c8e36=0x0;_0x4c8e36<_0x52e5f7['length'];_0x4c8e36++){if(_0xa770d8['isAdded']&&'insertion'==_0x52e5f7[_0x4c8e36]['type']&&_0xa770d8['isAdded']['userId']==_0x52e5f7[_0x4c8e36]['userId'])return _0xa770d8['isAddSuggestion']=_0x52e5f7[_0x4c8e36],void delete _0xa770d8['isAdded'];if(!_0xa770d8['isAdded']&&!_0xa770d8['isRemoved']&&'deletion'==_0x52e5f7[_0x4c8e36]['type'])return void(_0xa770d8['isRemoveSuggestion']=_0x52e5f7[_0x4c8e36]);}}}['_setDistance'](_0x4b6542,_0x16f006){let _0x3daa5a=0x0,_0x2992c8=!0x1;const _0x39b31a=new Map();for(const _0x561f09 of _0x4b6542)_0x561f09[_0x16f006]?_0x2992c8&&(_0x3daa5a++,_0x2992c8=!0x1):(_0x3daa5a++,_0x2992c8=!0x0),_0x39b31a['set'](_0x561f09['id'],_0x3daa5a);for(let _0x175bbf=0x0;_0x175bbf<_0x4b6542['length'];_0x175bbf++){if('isRemoved'==_0x16f006&&_0x4b6542[_0x175bbf]['isAdded']||'isAdded'==_0x16f006&&_0x4b6542[_0x175bbf]['isRemoved'])continue;if('text'==_0x4b6542[_0x175bbf]['type']){_0x4b6542[_0x175bbf]['distance']=0x0;continue;}const _0x1396e8=_0x39b31a['get'](_0x4b6542[_0x175bbf]['pairId']),_0x2e293f=_0x39b31a['get'](_0x4b6542[_0x175bbf]['id']);_0x4b6542[_0x175bbf]['distance']=_0x1396e8-_0x2e293f;}}['_getRevisionsRange'](_0x3d625f,_0x5656c9,_0x262765=!0x1){const _0x250232=[];let _0x13030c=this['repository']['getIndex'](_0x3d625f),_0x50ee2d=this['repository']['getIndex'](_0x5656c9);for(-0x1==_0x50ee2d&&(_0x50ee2d=this['repository']['_revisions']['length'],_0x262765=!0x1);_0x13030c<_0x50ee2d;)_0x250232['push'](this['repository']['getRevision'](_0x13030c)),_0x13030c++;return _0x262765&&_0x250232['push'](this['repository']['getRevision'](_0x13030c)),_0x250232;}['_threeWayMerge'](_0x5eb0e2,_0x906f5d,_0x1f62bb,_0xfb10ad){const _0x26416f=this['editor']['model']['schema'];let _0x1f1d1e=_0x906f5d;for(;_0x5eb0e2[_0x1f1d1e]&&_0x5eb0e2[_0x1f1d1e]['isAdded'];)_0x1f1d1e++;let _0xb295c1=_0xfb10ad;for(;_0x1f62bb[_0xb295c1]&&_0x1f62bb[_0xb295c1]['isRemoved'];)_0xb295c1++;_0x551e00(_0x5eb0e2,_0x906f5d,_0x1f1d1e),_0x551e00(_0x1f62bb,_0xfb10ad,_0xb295c1);const _0x5ccfb7=_0x1f62bb['slice'](_0xfb10ad,_0xb295c1)['concat'](_0x5eb0e2['slice'](_0x906f5d,_0x1f1d1e));return _0x5ccfb7['sort']((_0x8f0ec4,_0x3e41fb)=>_0x8f0ec4['side']!=_0x3e41fb['side']?_0x8f0ec4['side']-_0x3e41fb['side']:_0x8f0ec4['level']!=_0x3e41fb['level']?_0x8f0ec4['level']-_0x3e41fb['level']:_0x8f0ec4['distance']!=_0x3e41fb['distance']?_0x3e41fb['distance']-_0x8f0ec4['distance']:!!_0x8f0ec4['isAdded']!=!!_0x3e41fb['isAdded']?-0x1==_0x8f0ec4['side']||0x0==_0x8f0ec4['side']?_0x8f0ec4['isAdded']?-0x1:0x1:_0x8f0ec4['isAdded']?0x1:-0x1:_0x8f0ec4['index']-_0x3e41fb['index']),{'commonTape':_0x5ccfb7,'iEnd':_0x1f1d1e,'jEnd':_0xb295c1};function _0x551e00(_0x67cfe9,_0x183b0f,_0x3f8332){let _0x4b256d=-0x1,_0x25f681=Number['POSITIVE_INFINITY'],_0x4e83c5=!0x0;for(let _0x3f8bd4=_0x183b0f;_0x3f8bd4<_0x3f8332;_0x3f8bd4++)if(_0x26416f['isInline'](_0x67cfe9[_0x3f8bd4]['item'])||(_0x4e83c5=!0x1),_0x67cfe9[_0x3f8bd4]['item']['startIndex']<_0x183b0f&&(_0x4b256d=_0x3f8bd4),_0x67cfe9[_0x3f8bd4]['item']['endIndex']>=_0x3f8332){_0x25f681=_0x3f8bd4;break;}_0x4e83c5&&(_0x4b256d=_0x3f8332-0x1);for(let _0x450554=_0x183b0f;_0x450554<_0x3f8332;_0x450554++)_0x67cfe9[_0x450554]['side']=_0x450554<=_0x4b256d?-0x1:_0x450554<_0x25f681?0x0:0x1,_0x67cfe9[_0x450554]['index']=_0x450554;let _0x33e7a2=0x0;for(let _0x3dd2b2=_0x183b0f;_0x3dd2b2<=_0x4b256d;_0x3dd2b2++)0x0==_0x67cfe9[_0x3dd2b2]['distance']?_0x67cfe9[_0x3dd2b2]['level']=_0x33e7a2:(_0x33e7a2++,_0x67cfe9[_0x3dd2b2]['level']=_0x33e7a2,_0x33e7a2++);for(let _0x1b8eb2=_0x183b0f;_0x1b8eb2<_0x3f8332;_0x1b8eb2++)0x0==_0x67cfe9[_0x1b8eb2]['side']&&(_0x67cfe9[_0x1b8eb2]['level']=_0x33e7a2);_0x33e7a2=0x0;for(let _0xd1d586=_0x3f8332-0x1;_0xd1d586>=_0x25f681;_0xd1d586--)0x0==_0x67cfe9[_0xd1d586]['distance']?_0x67cfe9[_0xd1d586]['level']=_0x33e7a2:(_0x33e7a2--,_0x67cfe9[_0xd1d586]['level']=_0x33e7a2,_0x33e7a2--);}}['_fixObsoleteTags'](_0xa36916){const _0x3a9924=new Map(),_0x431042=this['editor']['model']['schema'];for(let _0x19af11=0x1;_0x19af11<_0xa36916['length'];_0x19af11++){let _0x58f86f,_0x5d6f45,_0x55bc25;const _0x25a3e0=_0xa36916[_0x19af11],_0x58234b=_0xa36916[_0x19af11-0x1];if('text'==_0x25a3e0['type'])continue;if(_0x25a3e0['type']!=_0x58234b['type'])continue;if(!_0x431042['isBlock'](_0x58234b['item'])||_0x431042['isLimit'](_0x58234b['item']))continue;if(!_0x431042['isBlock'](_0x25a3e0['item'])||_0x431042['isLimit'](_0x25a3e0['item']))continue;if((_0xa36916[_0x19af11]['isAdded']||_0xa36916[_0x19af11]['isAddSuggestion'])&&_0xa36916[_0x19af11-0x1]['isRemoved'])_0x58f86f=_0xa36916[_0x19af11],_0x5d6f45=_0xa36916[_0x19af11-0x1],_0x55bc25=_0x19af11-0x1;else{if(!_0xa36916[_0x19af11]['isRemoved']||!_0xa36916[_0x19af11-0x1]['isAdded']&&!_0xa36916[_0x19af11-0x1]['isAddSuggestion'])continue;_0x58f86f=_0xa36916[_0x19af11-0x1],_0x5d6f45=_0xa36916[_0x19af11],_0x55bc25=_0x19af11;}const _0x3b6769=_0x58f86f['level']==_0x5d6f45['level'],_0x4948a7=Math['abs'](_0x58f86f['level'])<Math['abs'](_0x5d6f45['level'])&&0x0==_0x5d6f45['distance'];(_0x3b6769||_0x4948a7)&&(_0x3a9924['set'](_0x5d6f45['id'],_0x58f86f['id']),_0xa36916['splice'](_0x55bc25,0x1),_0x19af11--,_0x58f86f['isAdded']=!0x1);}for(let _0x151d9e=0x0;_0x151d9e<_0xa36916['length'];_0x151d9e++)_0x3a9924['has'](_0xa36916[_0x151d9e]['pairId'])&&(_0xa36916[_0x151d9e]['pairId']=_0x3a9924['get'](_0xa36916[_0x151d9e]['pairId']));}['_removeMissingPairs'](_0x50444c){const _0x83707b=new Set(_0x50444c['map'](_0x14cd51=>_0x14cd51['id']));for(let _0x5f3475=0x0;_0x5f3475<_0x50444c['length'];_0x5f3475++)_0x83707b['has'](_0x50444c[_0x5f3475]['pairId'])||0x0==_0x50444c[_0x5f3475]['distance']||(_0x50444c[_0x5f3475]['isIncorrect']=!0x0);return _0x50444c['filter'](_0x37245f=>!_0x37245f['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1e6948){const _0xbbb041=new Set();for(let _0x5277f0=0x0;_0x5277f0<_0x1e6948['length'];_0x5277f0++){if(_0xbbb041['has'](_0x1e6948[_0x5277f0]['id'])&&_0x1e6948[_0x5277f0]['isRemoved']&&(_0x1e6948[_0x5277f0]['isIncorrect']=!0x0),_0x1e6948[_0x5277f0]['isIncorrect'])continue;if(0x0==_0x1e6948[_0x5277f0]['distance'])continue;if('elementStart'!=_0x1e6948[_0x5277f0]['type'])continue;if(null==_0x1e6948[_0x5277f0]['pairId'])continue;let _0x23f294=_0x5277f0+0x1,_0x9aefc4=0x0;for(;_0x1e6948[_0x23f294]['id']!=_0x1e6948[_0x5277f0]['pairId'];)'elementStart'==_0x1e6948[_0x23f294]['type']?_0x9aefc4++:'elementEnd'==_0x1e6948[_0x23f294]['type']&&_0x9aefc4--,_0x23f294++;if(0x0!=_0x9aefc4){if(_0x1e6948[_0x5277f0]['isRemoved'])_0x1e6948[_0x5277f0]['isIncorrect']=!0x0;else{for(;_0x23f294!=_0x5277f0;)_0x1e6948[_0x23f294]['isRemoved']&&0x0!=_0x1e6948[_0x23f294]['distance']&&(_0x1e6948[_0x23f294]['isIncorrect']=!0x0,_0xbbb041['add'](_0x1e6948[_0x23f294]['pairId'])),_0x23f294--;}}}return _0x1e6948['filter'](_0x56b320=>!_0x56b320['isIncorrect']);}['_removeUnsupportedChanges'](_0x222410){const _0x3e5b36=this['editor']['model']['schema'];for(let _0x426fe7=0x0;_0x426fe7<_0x222410['length'];_0x426fe7++){if(!(_0x222410[_0x426fe7]['isAdded']||_0x222410[_0x426fe7]['isAddSuggestion']||_0x222410[_0x426fe7]['isRemoved']||_0x222410[_0x426fe7]['isRemoveSuggestion']))continue;if(0x0==_0x222410[_0x426fe7]['distance'])continue;const _0x5ca451=_0x222410[_0x426fe7]['item'];_0x3e5b36['isBlock'](_0x5ca451)||_0x3e5b36['isLimit'](_0x5ca451)||(_0x222410[_0x426fe7]['isAdded']&&delete _0x222410[_0x426fe7]['isAdded'],_0x222410[_0x426fe7]['isAddSuggestion']&&delete _0x222410[_0x426fe7]['isAddSuggestion'],_0x222410[_0x426fe7]['isRemoveSuggestion']&&delete _0x222410[_0x426fe7]['isRemoveSuggestion'],_0x222410[_0x426fe7]['isRemoved']&&(_0x222410[_0x426fe7]['isIncorrect']=!0x0));}return _0x222410['filter'](_0x241d51=>!_0x241d51['isIncorrect']);}['_makeModelFromTape'](_0x3b2003,_0x413c8a,_0xa64d85){const _0x2b3ffe=new _0xf3d172(),_0x43a908=[],_0x5e9411=new Map(),_0x1e9a9e=this['editor']['model'],_0x3e4efc=_0x1e9a9e['schema'],_0x512fd3=[_0x2b3ffe],_0x2951f9={},_0x2ab641={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x3171be=null;const _0x2a4569=[0x0];for(let _0x392161=0x0;_0x392161<_0x3b2003['length'];_0x392161++)if('elementStart'===_0x3b2003[_0x392161]['type']){_0x3b2003[_0x392161]['previousPosition']=_0x1e9a9e['createPositionFromPath'](_0x2b3ffe,_0x2a4569);const _0x5c34d7=new _0x14fd90(_0x3b2003[_0x392161]['item']['name'],_0x3b2003[_0x392161]['item']['getAttributes']());_0x512fd3[0x0]['_appendChild'](_0x5c34d7),_0x2a4569['push'](0x0),_0x512fd3['unshift'](_0x5c34d7),_0x3b2003[_0x392161]['nextPosition']=_0x1e9a9e['createPositionFromPath'](_0x2b3ffe,_0x2a4569);}else'elementEnd'===_0x3b2003[_0x392161]['type']?(_0x512fd3['shift'](),_0x3b2003[_0x392161]['previousPosition']=_0x1e9a9e['createPositionFromPath'](_0x2b3ffe,_0x2a4569),_0x2a4569['pop'](),_0x2a4569[_0x2a4569['length']-0x1]++,_0x3b2003[_0x392161]['nextPosition']=_0x1e9a9e['createPositionFromPath'](_0x2b3ffe,_0x2a4569)):(_0x3b2003[_0x392161]['previousPosition']=_0x1e9a9e['createPositionFromPath'](_0x2b3ffe,_0x2a4569),_0x3171be?_0x3171be['_data']+=_0x3b2003[_0x392161]['item']['data']:_0x3171be=new _0xe3cd6f(_0x3b2003[_0x392161]['item']['data'],_0x3b2003[_0x392161]['item']['getAttributes']()),_0x3b2003[_0x392161+0x1]&&'text'===_0x3b2003[_0x392161+0x1]['type']&&_0x1effd8(_0x3171be,_0x3b2003[_0x392161+0x1]['item'])||(_0x512fd3[0x0]['_appendChild'](_0x3171be),_0x3171be=null),_0x2a4569[_0x2a4569['length']-0x1]+=_0x3b2003[_0x392161]['item']['offsetSize'],_0x3b2003[_0x392161]['nextPosition']=_0x1e9a9e['createPositionFromPath'](_0x2b3ffe,_0x2a4569));for(let _0x4c2581=0x0;_0x4c2581<_0x3b2003['length'];_0x4c2581++){const _0x2ce0bf=_0x3b2003[_0x4c2581]['previousPosition'],_0x227939=_0x3b2003[_0x4c2581]['nextPosition'];for(const _0x55679c of _0x3b2003[_0x4c2581]['markersStart'])_0x5e9411['set'](_0x55679c,{'start':_0x2ce0bf,'end':null});_0x305e18('isRemoveSuggestion',_0x4c2581,_0x2ce0bf,_0x227939),_0x305e18('isAddSuggestion',_0x4c2581,_0x2ce0bf,_0x227939),_0x305e18('isRemoved',_0x4c2581,_0x2ce0bf,_0x227939),_0x305e18('isAdded',_0x4c2581,_0x2ce0bf,_0x227939);for(const _0x23a257 of _0x3b2003[_0x4c2581]['markersEnd']){const _0x34a800=_0x5e9411['get'](_0x23a257);_0x34a800?_0x34a800['end']=_0x227939:_0x5e9411['set'](_0x23a257,{'start':_0x227939,'end':_0x227939});}}for(const [_0x8b83a8,_0x453f72]of _0x5e9411){const _0x236e7c=this['editor']['model']['createRange'](_0x453f72['start'],_0x453f72['end']);_0x2b3ffe['markers']['set'](_0x8b83a8,_0x236e7c);}return _0x43a908['sort']((_0x1cdef4,_0x3b2cd1)=>{const _0x1f433e=_0x2b3ffe['markers']['get']('revision:'+_0x1cdef4['id']),_0x5ae86c=_0x2b3ffe['markers']['get']('revision:'+_0x3b2cd1['id']);return _0x1f433e['start']['isBefore'](_0x5ae86c['start'])?-0x1:_0x1f433e['start']['isAfter'](_0x5ae86c['start'])?0x1:_0x1f433e['end']['isBefore'](_0x5ae86c['end'])?-0x1:_0x1f433e['end']['isAfter'](_0x5ae86c['end'])?0x1:'add'===_0x1cdef4['type']?-0x1:0x1;}),{'root':_0x2b3ffe,'changes':_0x43a908};function _0x305e18(_0x48ed19,_0x483a97,_0x61b641,_0x1fca36){const _0xf568c8=!!_0x3b2003[_0x483a97][_0x48ed19],_0x5c1783=_0xf568c8?_0x3b2003[_0x483a97][_0x48ed19]['userId']:null,_0x4b4918=_0x483a97===_0x3b2003['length']-0x1,_0x3145ea=_0x2ab641[_0x48ed19][0x0],_0x4d059f=_0x3e4efc['isObject'](_0x3b2003[_0x483a97]['item']);!_0x2951f9[_0x48ed19]&&_0xf568c8?_0x2951f9[_0x48ed19]={'start':_0x61b641,'tapeItem':_0x3b2003[_0x483a97],'userId':_0x5c1783,'type':_0x48ed19}:_0x2951f9[_0x48ed19]&&!_0xf568c8?(_0x2951f9[_0x48ed19]['end']=_0x61b641,_0x556bf7(_0x2951f9[_0x48ed19]),_0x2951f9[_0x48ed19]=null):_0x2951f9[_0x48ed19]&&_0xf568c8&&_0x2951f9[_0x48ed19]['userId']!==_0x5c1783&&(_0x2951f9[_0x48ed19]['end']=_0x61b641,_0x3145ea&&_0x3145ea['userId']===_0x2951f9[_0x48ed19]['userId']||_0x556bf7(_0x2951f9[_0x48ed19]),_0x2951f9[_0x48ed19]={'start':_0x61b641,'tapeItem':_0x3b2003[_0x483a97],'userId':_0x5c1783,'type':_0x48ed19}),_0x2951f9[_0x48ed19]&&_0x4d059f&&('elementStart'!==_0x3b2003[_0x483a97]['type']||_0x3145ea&&_0x3145ea['userId']===_0x5c1783||_0x2ab641[_0x48ed19]['unshift']({'userId':_0x5c1783,'object':_0x3b2003[_0x483a97]['item'],'change':_0x2951f9[_0x48ed19]}),'elementEnd'===_0x3b2003[_0x483a97]['type']&&_0x3145ea&&_0x3145ea['object']===_0x3b2003[_0x483a97]['item']&&(_0x2ab641[_0x48ed19]['shift'](),_0x2951f9[_0x48ed19]=_0x3145ea['change'])),_0x2951f9[_0x48ed19]&&_0x4b4918&&(_0x2951f9[_0x48ed19]['end']=_0x1fca36,_0x556bf7(_0x2951f9[_0x48ed19]),_0x2951f9[_0x48ed19]=null);}function _0x556bf7({start:_0x1c6c86,end:_0x42d763,tapeItem:_0x36ce57,userId:_0x25ebbe,type:_0xc15fa9}){const _0x1c7d10=_0x36ce57['item'],_0x554264=_0x1e9a9e['schema']['isBlock'](_0x1c7d10)&&!_0x1e9a9e['schema']['isLimit'](_0x1c7d10),_0x3ae7fd=_0x1c6c86['nodeAfter']==_0x42d763['parent']&&_0x42d763['isAtStart'];if(_0x554264&&_0x3ae7fd)return;const _0x291aca=_0x1e9a9e['createRange'](_0x1c6c86,_0x42d763),_0x20726b=_0x413c8a['get'](_0x25ebbe),_0x293c44=new G({'author':_0x20726b,'type':'isAdded'==_0xc15fa9||'isAddSuggestion'==_0xc15fa9?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xc15fa9||'isRemoveSuggestion'==_0xc15fa9},'createdAt':new Date(),'rootName':_0xa64d85});_0x43a908['push'](_0x293c44),_0x2b3ffe['markers']['set']('revision:'+_0x293c44['id'],_0x291aca);}function _0x1effd8(_0xde1510,_0x2392ce){const _0x5d1f71=_0xde1510['getAttributes'](),_0x37534c=_0x2392ce['getAttributes']();for(const _0x32af2d of _0x5d1f71){if(_0x32af2d[0x1]!==_0x2392ce['getAttribute'](_0x32af2d[0x0]))return!0x1;_0x37534c['next']();}return _0x37534c['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x4c2361=>{const _0x4a1f3b=_0x4c2361['markerName']['split'](':')[0x1],_0x30f974=this['_getChangeFromId'](_0x4a1f3b);if(!_0x30f974)return null;const _0x5ab9a2='add'==_0x30f974['type']?'insertion':'deletion',_0x26a829=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5ab9a2];return _0x30f974['data']['isSuggestion']&&_0x26a829['push']('ck-suggestion-marker-'+_0x5ab9a2+'-new'),this['activeChange']==_0x30f974&&_0x26a829['push']('ck-suggestion-marker--active'),{'classes':_0x26a829,'attributes':{'data-change-id':_0x4a1f3b}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x36325a=>{_0x36325a['on']('element:pre',(_0x1102c8,_0x1aa5fd,_0x132a08)=>{const _0x1fe88b=_0x1aa5fd['viewItem']['getChild'](0x0);if(!_0x1fe88b||!_0x1fe88b['is']('element','code'))return;if(!_0x132a08['consumable']['consume'](_0x1fe88b,{'attributes':['vid_start','vid_end']}))return;const _0x5cb20a=_0x1aa5fd['modelRange']['start']['nodeAfter'];_0x132a08['writer']['setAttribute']('vid_start',_0x1fe88b['getAttribute']('vid_start'),_0x5cb20a),_0x132a08['writer']['setAttribute']('vid_end',_0x1fe88b['getAttribute']('vid_end'),_0x5cb20a);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x190aa4=>{_0x190aa4['on']('element',(_0x3ea1b4,_0x1e7c3f,_0x1b1dae)=>{if(!_0x1b1dae['consumable']['consume'](_0x1e7c3f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1e7c3f['modelRange']['isCollapsed'])return;const _0x265160=_0x1e7c3f['modelRange']['start']['nodeAfter'];_0x265160['hasAttribute']('vid_start')||_0x265160['hasAttribute']('vid')||(_0x1b1dae['writer']['setAttribute']('vid_start',_0x1e7c3f['viewItem']['getAttribute']('vid_start'),_0x265160),_0x1b1dae['writer']['setAttribute']('vid_end',_0x1e7c3f['viewItem']['getAttribute']('vid_end'),_0x265160));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xe08050=>_0xe08050['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3e845b,[,_0x413e0c])=>{['vid_start','vid_end','vid']['includes'](_0x413e0c)&&(_0x3e845b['return']=!0x0,_0x3e845b['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x124197=>{_0x124197['on']('attribute:vid',(_0x3d75c3,_0x54e4e0,_0x4579ac)=>{if('\x20'!=_0x54e4e0['item']['data']||_0x54e4e0['item']['parent']['maxOffset']>0x1)return;if(!_0x4579ac['consumable']['consume'](_0x54e4e0['item'],_0x3d75c3['name']))return;const _0x279faa=_0x4579ac['writer'],_0x3d58b2=_0x4579ac['mapper']['toViewRange'](_0x54e4e0['range']);_0x279faa['wrap'](_0x3d58b2,_0x279faa['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x511e65){const _0x4f270c=_0x511e65['plugins']['get']('RevisionViewer');return(_0x9c8d17,_0x247104,_0x1e5dc5)=>{const _0x5be0f2=_0x247104['markerName']['split'](':')[0x1],_0x1230e7=_0x4f270c['_getChangeFromId'](_0x5be0f2);if(!_0x1230e7)return null;const _0x324350='add'==_0x1230e7['type']?'split':'merge';if(!_0x1e5dc5['consumable']['test'](_0x247104['markerRange'],_0x9c8d17['name']))return;const _0xd3e2d7=_0x247104['markerRange']['getWalker'](),_0x12d9f0=_0x247104['markerRange']['start'],_0x3189ce=_0x511e65['model']['schema'];let _0x4bbbf6=null,_0x50b813=null,_0x3a88cb=!0x1,_0x56a61b=!0x1;for(const _0x87e39e of _0xd3e2d7){const _0x4847cc=_0x87e39e['item'];_0x3a88cb=_0x3a88cb||_0x3189ce['isContent'](_0x4847cc);const _0x2d1088=_0x1e5dc5['mapper']['toViewElement'](_0x4847cc);if(_0x2d1088&&_0x2d1088['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x87e39e['type']&&(_0x3189ce['isBlock'](_0x4847cc)&&!_0x3189ce['isLimit'](_0x4847cc)&&(_0x4847cc['nextSibling']||_0x12d9f0['isAtEnd']?_0x4bbbf6&&_0x4bbbf6['parent']==_0x4847cc||(_0x4bbbf6=_0x4847cc,_0xe757e1(_0x87e39e['previousPosition']),_0x56a61b=!0x0):_0x50b813=_0x50b813||_0x87e39e['previousPosition']));}function _0xe757e1(_0x2ccbed){const _0x2c2d70=_0x1e5dc5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x324350}),_0x5cb422=_0x1e5dc5['mapper']['toViewPosition'](_0x2ccbed);_0x1230e7['data']['isSuggestion']&&_0x1e5dc5['writer']['addClass']('ck-suggestion-marker-'+_0x324350+'-new',_0x2c2d70),_0x4f270c['activeChange']==_0x1230e7&&_0x1e5dc5['writer']['addClass']('ck-suggestion-marker--active',_0x2c2d70),_0x1e5dc5['writer']['insert'](_0x5cb422,_0x2c2d70),_0x1e5dc5['mapper']['bindElementToMarker'](_0x2c2d70,_0x247104['markerName']);}_0x3a88cb||_0x56a61b||!_0x50b813||_0xe757e1(_0x50b813);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xaf129c,_0x5b371d,_0x4ca572)=>{const _0x2925ae=_0x4ca572['mapper']['markerNameToElements'](_0x5b371d['markerName']);if(_0x2925ae){for(const _0x47d371 of _0x2925ae)(_0x47d371['hasClass']('ck-suggestion-marker-split')||_0x47d371['hasClass']('ck-suggestion-marker-merge'))&&(_0x4ca572['mapper']['unbindElementFromMarkerName'](_0x47d371,_0x5b371d['markerName']),_0x4ca572['writer']['remove'](_0x47d371));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x399dc5,_0x3a1f04,_0x10936f)=>{const _0x46167e=_0x3a1f04['markerName']['split'](':')[0x1],_0x59c051=this['_getChangeFromId'](_0x46167e);if(!_0x59c051)return null;const _0x2a1e29='add'==_0x59c051['type']?'split':'merge';if(_0x10936f['consumable']['test'](_0x3a1f04['markerRange'],_0x399dc5['name']))for(const _0x133628 of _0x3a1f04['markerRange']['getItems']()){if(!_0x133628['is']('element','softBreak'))continue;const _0x5206e1=_0x10936f['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2a1e29}),_0x22fabc=_0x10936f['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x133628));_0x59c051['data']['isSuggestion']&&_0x10936f['writer']['addClass']('ck-suggestion-marker-'+_0x2a1e29+'-new',_0x5206e1),this['activeChange']==_0x59c051&&_0x10936f['writer']['addClass']('ck-suggestion-marker--active',_0x5206e1),_0x10936f['writer']['insert'](_0x22fabc,_0x5206e1),_0x10936f['mapper']['bindElementToMarker'](_0x5206e1,_0x3a1f04['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x432d92=>{for(const _0x20e622 of this['editor']['model']['document']['getRootNames']()){const _0x1a0d8d=this['editor']['model']['document']['getRoot'](_0x20e622),_0x7061f6=this['editor']['editing']['view']['document']['getRoot'](_0x20e622);if(_0x7061f6){const _0x21b2dd=_0x1a0d8d['getAttribute']('revisionHistoryAttachChange');if(_0x432d92['removeAttribute']('data-change-id',_0x7061f6),_0x432d92['removeClass']('ck-revision-history-root-add',_0x7061f6),_0x432d92['removeClass']('ck-revision-history-root-remove',_0x7061f6),_0x432d92['removeClass']('ck-revision-history-root--active',_0x7061f6),_0x21b2dd){const _0x4f29ac=this['_getChangeFromId'](_0x21b2dd);if(!_0x4f29ac)return null;_0x432d92['setAttribute']('data-change-id',_0x21b2dd,_0x7061f6),_0x432d92['addClass']('ck-revision-history-root-'+_0x4f29ac['type'],_0x7061f6),this['activeChange']==_0x4f29ac&&_0x432d92['addClass']('ck-revision-history-root--active',_0x7061f6);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3ac67e=>'revision-comment:'+_0x3ac67e,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xb8e05e=>'revision-suggestion:'+_0xb8e05e,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x913603=>({'name':'suggestion:'+_0x913603,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x312133=>{const _0x2d55ee=_0x312133['markerName']['split'](':')[0x1];return'insertion'!=_0x2d55ee&&'deletion'!=_0x2d55ee?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2d55ee]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x303b7c,_0x1bc1fa,_0x7b79fc)=>{const _0x38af62=_0x7b79fc['mapper']['markerNameToElements'](_0x1bc1fa['markerName']);if(_0x38af62){for(const _0xb41c07 of _0x38af62)_0xb41c07['is']('uiElement')&&(_0x7b79fc['mapper']['unbindElementFromMarkerName'](_0xb41c07,_0x1bc1fa['markerName']),_0x7b79fc['writer']['remove'](_0xb41c07));}},{'priority':'high'});}['_getChangeFromId'](_0x456642){return this['_changeIdToChange']['get'](_0x456642);}['_getViewForChange'](_0x1ace83){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x1ace83),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xa743a4,_0x368694,_0x30b176,_0x53fd60)=>{_0x53fd60&&this['_balloon']['remove'](_0x53fd60),_0x30b176&&(this['_balloon']['add']({'view':_0x30b176,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x242cb9=this['editor']['editing'],_0x11015d=this['_getChangeFromId'](_0x30b176['changeId']);let _0x29a324;if(_0x11015d['data']['isOnRoot']){const _0x44ab7b=_0x242cb9['view']['getDomRoot'](_0x11015d['rootName']);_0x29a324=Array['from'](_0x44ab7b['getClientRects']());}else{const _0xb59782=this['editor']['model']['markers']['get']('revision:'+_0x30b176['changeId']);_0x29a324=Array['from'](_0x242cb9['mapper']['markerNameToElements'](_0xb59782['name']))['map'](_0x402b65=>_0x242cb9['view']['domConverter']['mapViewToDom'](_0x402b65))['map'](_0x48387b=>Array['from'](_0x48387b['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x29a324[0x0];return _0x29a324['find'](_0x260c85=>_0x260c85['top']-0x3<=this['_activeViewTarget']['y']&&_0x260c85['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x260c85['left']-0x3<=this['_activeViewTarget']['x']&&_0x260c85['right']+0x3>=this['_activeViewTarget']['x'])||_0x29a324[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0xf281fd,_0x48a76a,_0x2698b3,_0x2ce6d4)=>{this['activeView']=_0x2698b3?this['_getViewForChange'](_0x2698b3):null,this['editor']['model']['change'](()=>{const _0x309ed8=this['editor']['editing'];_0x2ce6d4&&(_0x2ce6d4['data']['isOnRoot']?_0x309ed8['view']['change'](_0x67d60a=>{_0x67d60a['removeClass']('ck-revision-history-root--active',_0x309ed8['view']['document']['getRoot'](_0x2ce6d4['rootName']));}):_0x309ed8['reconvertMarker']('revision:'+_0x2ce6d4['id'])),_0x2698b3&&(_0x2698b3['data']['isOnRoot']?_0x309ed8['view']['change'](_0x4d93ee=>{_0x4d93ee['addClass']('ck-revision-history-root--active',_0x309ed8['view']['document']['getRoot'](_0x2698b3['rootName']));}):_0x309ed8['reconvertMarker']('revision:'+_0x2698b3['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x477090,_0x1c3c8f)=>{if(this['activeChange'])return;const _0x59c121=this['_findChangeIdFromDomTarget'](_0x1c3c8f['target']),_0x9439b0=this['_changeIdToChange']['get'](_0x59c121);_0x9439b0?(this['_activeViewTarget']={'x':_0x1c3c8f['domEvent']['x'],'y':_0x1c3c8f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x9439b0)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x169684,_0x5515ee)=>{const _0x5719c1=this['_findChangeIdFromDomTarget'](_0x5515ee['target']),_0x2a16c8=this['_changeIdToChange']['get'](_0x5719c1);_0x2a16c8?(this['_activeViewTarget']={'x':_0x5515ee['domEvent']['x'],'y':_0x5515ee['domEvent']['y']},_0x2a16c8===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2a16c8):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x351b32){do{const _0x4cbd32=_0x351b32['getAttribute']('data-change-id');if(_0x4cbd32)return _0x4cbd32;_0x351b32=_0x351b32['parent'];}while(_0x351b32);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x35e31c=>{for(const _0x1bd807 of this['editor']['model']['markers'])_0x35e31c['removeMarker'](_0x1bd807);});}}function Q(_0x8cc761,_0x51858d){return(_0x2c02ae,_0x52832c,_0x41760b)=>{if(!_0x41760b['consumable']['test'](_0x52832c['markerRange'],_0x2c02ae['name']))return;const _0x35d578=_0x52832c['markerRange']['getWalker'](),_0x6bf622=_0x52832c['markerRange']['start'],_0x3fd574=_0x8cc761['model']['schema'];let _0x3ccd29=null,_0xee8518=null,_0xf8804e=!0x1,_0x54e929=!0x1;for(const _0x40665f of _0x35d578){const _0x45c161=_0x40665f['item'];_0xf8804e=_0xf8804e||_0x3fd574['isContent'](_0x45c161);const _0x8c419d=_0x41760b['mapper']['toViewElement'](_0x45c161);if(_0x8c419d&&_0x8c419d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x40665f['type']&&(_0x3fd574['isBlock'](_0x45c161)&&!_0x3fd574['isLimit'](_0x45c161)&&(_0x45c161['nextSibling']||_0x6bf622['isAtEnd']?_0x3ccd29&&_0x3ccd29['parent']==_0x45c161||(_0x3ccd29=_0x45c161,_0x1c83cf(_0x40665f['previousPosition']),_0x54e929=!0x0):_0xee8518=_0xee8518||_0x40665f['previousPosition']));}function _0x1c83cf(_0x8029a9){const _0x340317=_0x41760b['mapper']['toViewPosition'](_0x8029a9),_0x180fd3=_0x41760b['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x51858d});_0x41760b['writer']['insert'](_0x340317,_0x180fd3),_0x41760b['mapper']['bindElementToMarker'](_0x180fd3,_0x52832c['markerName']);}_0xf8804e||_0x54e929||!_0xee8518||_0x1c83cf(_0xee8518);};}class nt extends _0x3687d4{constructor(_0x437224){super(_0x437224);const _0x21f91c=_0x437224['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x21f91c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x21f91c,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x44a737=this['editor'],_0x562cb9=_0x44a737['plugins']['get'](u),_0x181025=_0x562cb9['isReady']?_0x562cb9['diff']['newRevisionId']:null;_0x44a737['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x181025);}['refresh'](){const {isReady:_0x2bfc16,isEnabled:_0x5a9d38,repository:_0x3e8ca1,diff:_0x1f4b64}=this['editor']['plugins']['get'](u),_0x176d46=_0x1f4b64&&_0x3e8ca1['getLaterVisibleRevision'](_0x1f4b64['newRevisionId']);this['isEnabled']=_0x2bfc16&&_0x5a9d38&&Boolean(_0x176d46);}}class rt extends _0x3687d4{['_step'];constructor(_0x36f290,{direction:_0x569451}){super(_0x36f290);const _0x5846dd=_0x36f290['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x569451?0x1:-0x1,this['listenTo'](_0x5846dd,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5846dd,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5846dd,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x434649=this['editor'],_0x570733=_0x434649['plugins']['get'](u),{isNavigationMode:_0x51a5b8,currentChangeNumber:_0x2c0336}=_0x570733;let _0xdd603e;if(_0x570733['activeChange']=_0x51a5b8?_0x570733['diff']['changes']['get'](_0x2c0336+this['_step']):_0x570733['diff']['changes']['first'],_0x570733['activeChange']['data']['isOnRoot'])_0xdd603e=_0x434649['editing']['view']['getDomRoot'](_0x570733['activeChange']['rootName']);else{const _0x470fd6=_0x434649['model']['markers']['get']('revision:'+_0x570733['activeChange']['id']);_0xdd603e=_0x37341c(_0x434649['editing'],_0x470fd6);}_0x57502f({'target':_0xdd603e,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x26dccd,currentChangeNumber:_0x1839e5,numberOfChanges:_0x1c5ec4,isReady:_0x24cf91,isEnabled:_0x336776}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x336776&&_0x24cf91&&_0x1c5ec4)&&(!_0x26dccd||(0x1===this['_step']?_0x1839e5<_0x1c5ec4-0x1:_0x1839e5>0x0));}}class Ri extends _0x5f53a2{constructor(_0x5a6c83){super(_0x5a6c83);const _0x2b1351=this['bindTemplate'],_0x3ce004=new _0x5108a7(_0x5a6c83),_0x17797f=new _0x5108a7(_0x5a6c83);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',(_0x3a3c50,_0x3ef14a)=>_0x3a3c50&&_0x3ef14a>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x14e9b0,_0x2d0b77,_0x1263b5,_0x437974)=>{if(!_0x14e9b0)return m(_0x5a6c83,'Loading...');if(!_0x1263b5)return m(_0x5a6c83,'No\x20changes');const _0x4ab1fc=m(_0x5a6c83,'NUMBER_OF_CHANGES',_0x1263b5);return _0x437974?m(_0x5a6c83,'X_OF_Y_CHANGES',[_0x2d0b77+0x1,_0x1263b5]):_0x4ab1fc;}),_0x3ce004['set']({'label':m(_0x5a6c83,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x592aca}),_0x17797f['set']({'label':m(_0x5a6c83,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x31f17d}),_0x3ce004['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x17797f['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3ce004['on']('execute',()=>this['fire']('execute','backward')),_0x17797f['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',_0x2b1351['if']('_isStatusLabelVisible','ck-hidden',_0x255f1f=>!_0x255f1f)]},'children':[{'text':_0x2b1351['to']('isNavigationMode',_0x21b1ab=>_0x21b1ab?m(_0x5a6c83,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x5a6c83,'Total')+':\x20')}]},{'text':_0x2b1351['to']('_statusText')}]},new _0x3f3ce6(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3ce004,_0x17797f]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x439397{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x58fec0=this['editor']['editing']['view'];_0x58fec0['change'](_0x5e366d=>{for(const _0x29b228 of _0x58fec0['document']['roots'])_0x5e366d['addClass'](ge,_0x29b228);});}['hide'](){const _0x4c0a8c=this['editor']['editing']['view'];_0x4c0a8c['change'](_0xb6ecb0=>{for(const _0x115afc of _0x4c0a8c['document']['roots'])_0xb6ecb0['removeClass'](ge,_0x115afc);});}}class v extends _0x439397{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,ji];}['init'](){const _0x52ce24=this['editor'],_0x77aff3=_0x52ce24['plugins']['get'](u),_0x42db88=_0x52ce24['plugins']['get'](ji);_0x52ce24['ui']['componentFactory']['add']('exitToEditing',_0x2bdc7f=>{const _0x3d4cc0=new _0x5108a7(_0x2bdc7f);return _0x3d4cc0['set']({'label':m(_0x2bdc7f,'Back\x20to\x20editing'),'icon':_0x4f5970,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3d4cc0,'execute',()=>{_0x52ce24['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3d4cc0;}),_0x52ce24['ui']['componentFactory']['add']('restoreRevision',_0x4b05a7=>{const _0x140563=new _0x5108a7(_0x4b05a7);return _0x140563['set']({'label':m(_0x4b05a7,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x140563['bind']('isEnabled')['to'](_0x52ce24['commands']['get']('restoreRevision')),this['listenTo'](_0x140563,'execute',()=>_0x52ce24['execute']('restoreRevision')),_0x140563;}),_0x52ce24['ui']['componentFactory']['add']('changesNavigation',_0x43e096=>{const _0x361444=new Ri(_0x43e096),_0xcc2cdd=_0x52ce24['commands']['get']('showPreviousChange'),_0x2006ce=_0x52ce24['commands']['get']('showNextChange');return _0x361444['bind']('isBackwardNavigationEnabled')['to'](_0xcc2cdd,'isEnabled'),_0x361444['bind']('isForwardNavigationEnabled')['to'](_0x2006ce,'isEnabled'),_0x361444['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x77aff3),this['listenTo'](_0x361444,'execute',(_0x3f1ef1,_0x5ef24d)=>{_0x52ce24['execute']('forward'===_0x5ef24d?'showNextChange':'showPreviousChange');}),_0x361444;}),_0x42db88['show'](),_0x77aff3['on']('change:isReady',(_0x2dee9f,_0x64f9c5,_0xb83149)=>{_0xb83149?_0x42db88['hide']():_0x42db88['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x45074a,_0x5516a4){super(_0x45074a,_0x5516a4);const _0x4c44ae=this['bindTemplate'];this['set']({'label':m(_0x45074a,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x45074a,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x4c44ae['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x16b933=this['fieldView']['element'];this['_tooltipString']=_0x16b933['scrollWidth']>_0x16b933['clientWidth']&&_0x16b933['value']||'';}}class ni extends _0x5f53a2{constructor(_0x4d69f2,_0x20e821,_0x5a9d4d){super(_0x4d69f2);const _0x21e0bb=new _0x243002();_0x21e0bb['set']({'content':_0x24ea6a,'viewBox':'0\x200\x2011\x2010'});const _0x122f95=['ck','ck-revision-history-sidebar__revision-author'];_0x5a9d4d&&_0x122f95['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1582b5=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x4d69f2,_0x5a9d4d?'Revision\x20creator':'Revision\x20author')},'children':[_0x21e0bb,_0x20e821['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x122f95},'children':_0x1582b5});}}function ai(_0xe8a835,_0x4ee62b){const _0x4cd15f=_0xe8a835['bindTemplate'],_0x3f0005=_0xe8a835['locale'],_0x402f9b=_0x488b40(_0x3f0005);_0x402f9b['panelPosition']='sw';const _0x3425c5=function(_0x11c4b4,_0x117dcd){const _0x1eb95b=function(_0x2ce67b,_0xc69ce1){const _0xb4a546=_0x2ce67b['locale'],_0x49131f={'Compare\x20against\x20selected':m(_0xb4a546,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0xb4a546,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0xb4a546,'Restore\x20this\x20revision')};return _0xc69ce1['map'](_0x15bfed=>{const _0xc020dc=_0x49131f[_0x15bfed['name']];return _0xc020dc&&_0xc020dc!==_0x15bfed['name']&&(_0x15bfed['name']=_0xc020dc),_0x15bfed;});}(_0x11c4b4,_0x117dcd),_0x50d36a=new _0x480dd0();for(const _0x28b062 of _0x1eb95b){const _0x41e2eb={'type':'button','model':new to({'label':_0x28b062['name'],'class':_0x28b062['class'],'withText':!0x0,'role':'menuitem','_action':_0x28b062['action']})};_0x41e2eb['model']['bind']('isEnabled')['to'](_0x11c4b4,'isActionsDropdownOpen',_0x4540d1=>'function'!=typeof _0x28b062['isEnabled']||(!_0x4540d1||_0x28b062['isEnabled'](_0x11c4b4))),_0x50d36a['add'](_0x41e2eb);}return _0x50d36a;}(_0xe8a835,_0x4ee62b);return _0xe8a835['bind']('isActionsDropdownOpen')['to'](_0x402f9b,'isOpen'),_0x402f9b['buttonView']['set']({'label':m(_0x3f0005,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2761e7}),_0x402f9b['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x4cd15f['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x4cd15f['to'](_0x4abc2e=>_0x4abc2e['stopPropagation']())}}),_0x402f9b['on']('execute',_0xdc5279=>{_0xe8a835['isReady']&&'function'==typeof _0xdc5279['source']['_action']&&_0xdc5279['source']['_action'](_0xe8a835);}),_0x150c07(_0x402f9b,_0x3425c5,{'role':'menu'}),_0x402f9b['listenTo'](_0xe8a835,'change:isActionsDropdownOpen',(_0x3a9b38,_0x1dcb1e,_0x237a00)=>{if(_0x237a00)for(const _0x12e62f of _0x402f9b['listView']['items']){const _0xe3bf4c=_0x12e62f['children']['first'],_0x3a84fb=_0x4ee62b['find'](_0x372719=>_0x372719['action']===_0xe3bf4c['_action'])['isVisible'];_0x12e62f['isVisible']=void 0x0===_0x3a84fb||_0x3a84fb(_0xe8a835);}}),_0x402f9b;}class _i extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x1f5b0f,uid as _0x51ba1f,Collection as _0x2cee73,logWarning as _0xeeb11e,FocusTracker as _0xf1c08a,KeystrokeHandler as _0x275c98,scrollViewportToShowTarget as _0xbbd326,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x70053c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3a4dea,set as _0x5292cb,unset as _0x1821a3,isEqual as _0x29b1c8}from'es-toolkit/compat';import{Plugin as _0xcfa495,PendingActions as _0x5e2122,Command as _0x3a00a7,ElementApiMixin as _0x5c8f5e,Editor as _0x264d8c}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0xf69155,getMarkerDomElement as _0x4a511e,ConfirmMixin as _0x572ee6,sanitizeEditorConfig as _0x315b3d}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x3618bd,ViewAttributeElement as _0x2338d9,ViewEmptyElement as _0x3c91a7,ViewRawElement as _0x2916a1,ViewUIElement as _0x5965f9,ViewDocumentFragment as _0x1472d0,ViewText as _0x2c0582,ViewElement as _0x15a57d,ModelElement as _0x3d9a08,ModelRange as _0x8b622d,ModelPosition as _0x150022,ModelDocumentFragment as _0x4a21a9,ModelText as _0x2994a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x1bc09b,IconChevronUp as _0x1f58d8,IconChevronDown as _0x3731cc,IconUndo as _0x3e339e,IconUser as _0x55d462,IconThreeVerticalDots as _0x3daa3a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x197115,View as _0x212fb1,submitHandler as _0x3f12e2,LabeledFieldView as ti,createLabeledInputText as _0x1cdcaa,createDropdown as _0x57ae92,ListView as _0x188876,ListItemView as _0x56e998,ButtonView as _0x28948f,MenuBarMenuView as _0x40b207,MenuBarMenuListView as _0x4565c8,MenuBarMenuListItemView as _0x3336bb,MenuBarMenuListItemButtonView as _0x3e055a,ContextualBalloon as _0x595ef8,ToolbarSeparatorView as _0x348f81,IconView as _0x5111d3,addListToDropdown as _0x7d9e09,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x36dce6,StickyPanelView as _0x4cd550,ToolbarView as _0x41e7e1,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x16779c}from'luxon';class I extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1f5b0f(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x53aab7){super(),this['id']=_0x53aab7['id']||_0x51ba1f(),this['creator']=_0x53aab7['creator']||null,this['authors']=_0x53aab7['authors']||[],this['diffData']=_0x53aab7['diffData']||null,this['toVersion']=_0x53aab7['toVersion']||0x0,this['fromVersion']=_0x53aab7['fromVersion']||0x0,this['set']('name',_0x53aab7['name']||''),this['set']('createdAt',_0x53aab7['createdAt']||new Date()),this['set']('attributes',_0x53aab7['attributes']||{});}['setName'](_0x592b77){this['_update']({'name':_0x592b77});}['setAttribute'](_0x5487cf,_0x2b43d4){const _0x5d2833=_0x3a4dea(this['attributes']);_0x5292cb(_0x5d2833,_0x5487cf,_0x2b43d4),this['_update']({'attributes':_0x5d2833});}['removeAttribute'](_0x5e77c1){const _0x53abdb=_0x3a4dea(this['attributes']);_0x1821a3(_0x53abdb,_0x5e77c1),this['_update']({'attributes':_0x53abdb});}['_update'](_0x5f4185,_0x5a9c58=!0x1){let _0x2f4e55=!0x1;const _0x51661b={'id':this['id']},_0x316ec1=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x1bd237 of _0x316ec1){const _0x31b050=_0x5f4185[_0x1bd237];void 0x0!==_0x31b050&&_0x31b050!==this[_0x1bd237]&&(this[_0x1bd237]=_0x31b050,_0x51661b[_0x1bd237]=_0x31b050,_0x2f4e55=!0x0);}_0x2f4e55&&(_0x51661b['authors']&&(_0x51661b['authorsIds']=_0x51661b['authors']['map'](_0x361fd5=>_0x361fd5['id']),delete _0x51661b['authors']),this['fire']('_update',_0x51661b,_0x5a9c58));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x481ff8=>_0x481ff8['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0xcfa495{['_revisions'];static get['requires'](){return[_0xf69155];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x8ccd52){super(_0x8ccd52),this['_revisions']=new _0x2cee73();}['afterInit'](){!async function(_0x34fbfb){const _0x9fe288=_0x46bcd4([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x317feb=0xeb829,_0x4340c9=0x359e09b0,_0x4a74fb=0x359977d8^_0x4340c9,_0x5ebddc=window[_0x46bcd4([0x44,0x61,0x74,0x65])][_0x46bcd4([0x6e,0x6f,0x77])](),_0x3b9fa2=_0x34fbfb[_0x46bcd4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x38f4dc=new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x335312=>{_0x3b9fa2[_0x46bcd4([0x6f,0x6e,0x63,0x65])](_0x46bcd4([0x72,0x65,0x61,0x64,0x79]),_0x335312);}),_0x4310c6={[_0x46bcd4([0x6b,0x74,0x79])]:_0x46bcd4([0x45,0x43]),[_0x46bcd4([0x75,0x73,0x65])]:_0x46bcd4([0x73,0x69,0x67]),[_0x46bcd4([0x63,0x72,0x76])]:_0x46bcd4([0x50,0x2d,0x32,0x35,0x36]),[_0x46bcd4([0x78])]:_0x46bcd4([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]),[_0x46bcd4([0x79])]:_0x46bcd4([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]),[_0x46bcd4([0x61,0x6c,0x67])]:_0x46bcd4([0x45,0x53,0x32,0x35,0x36])},_0x5d8997=_0x3b9fa2[_0x46bcd4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x46bcd4([0x67,0x65,0x74])](_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4ff141(){let _0x59d578,_0x2ef777=null,_0x469e15=null;try{if(_0x5d8997==_0x46bcd4([0x47,0x50,0x4c]))return _0x46bcd4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x59d578=_0x274b5b(),!_0x59d578)return _0x46bcd4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x59d578[_0x46bcd4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x469e15=_0x122d6b(_0x59d578[_0x46bcd4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x59d578[_0x46bcd4([0x6a,0x74,0x69])])),await _0x294a6c()?_0x5a3f43()?_0x31cd87()?_0x46bcd4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x20f9fe()?(_0x59d578[_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x46bcd4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2ef777=_0x245f73(_0x46bcd4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x45673a()):_0x46bcd4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x46bcd4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x46bcd4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x46bcd4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x31cd87(){const _0x4ffc69=[_0x46bcd4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x46bcd4([0x74,0x72,0x69,0x61,0x6c])][_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59d578[_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5ebddc/0x3e8:0xe10*_0x4a74fb;return _0x59d578[_0x46bcd4([0x65,0x78,0x70])]<_0x4ffc69;}function _0x5a3f43(){const _0x478305=_0x59d578[_0x46bcd4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x478305)return!0x1;if(_0x478305[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x2a])))return!0x0;if(_0x478305[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x52,0x48])))return!0x0;if(_0x478305[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x52,0x52,0x48]))){if(_0x39bd82())return!0x0;if(_0x7991fd()||_0x3ef16a())return!0x0;}return!0x1;}function _0x20f9fe(){const _0x4bafe6=_0x59d578[_0x46bcd4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bafe6||0x0==_0x4bafe6[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x402ff1}=new URL(window[_0x46bcd4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bafe6[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x402ff1))return!0x0;const _0x31b53e=_0x402ff1[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e]));return _0x4bafe6[_0x46bcd4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4ece4a=>_0x4ece4a[_0x46bcd4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46bcd4([0x2a])))[_0x46bcd4([0x6d,0x61,0x70])](_0xff1ae5=>_0xff1ae5[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e])))[_0x46bcd4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x531c25=>_0x531c25[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x31b53e[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46bcd4([0x6d,0x61,0x70])](_0x36c081=>Array(_0x31b53e[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x36c081[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46bcd4([0x66,0x69,0x6c,0x6c])](_0x36c081[0x0]===_0x46bcd4([0x2a])?_0x46bcd4([0x2a]):'')[_0x46bcd4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x36c081))[_0x46bcd4([0x73,0x6f,0x6d,0x65])](_0x49f7d7=>_0x31b53e[_0x46bcd4([0x65,0x76,0x65,0x72,0x79])]((_0x9b9e4,_0xf4ac8b)=>_0x49f7d7[_0xf4ac8b]===_0x9b9e4||_0x49f7d7[_0xf4ac8b]===_0x46bcd4([0x2a])));}function _0x45673a(){return _0x2ef777&&_0x469e15?new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc956,_0x4182fe)=>{_0x2ef777[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0xc956,_0x4182fe),_0x469e15[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x51b0d7=>{_0x51b0d7!=_0x46bcd4([0x56,0x61,0x6c,0x69,0x64])&&_0xc956(_0x51b0d7);},_0x4182fe);}):_0x2ef777||_0x469e15||_0x46bcd4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x122d6b(_0x1cccc5,_0xb38fa6){return new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x254532=>{if(_0x2e911b())return _0x254532(_0x46bcd4([0x56,0x61,0x6c,0x69,0x64]));_0x3c9e91(),_0x3b9fa2[_0x46bcd4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x46bcd4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5d46fe=!0x1;const _0x1570c9=_0x51ba1f();function _0x382607(_0x4c588e){return!!_0x4c588e&&(typeof _0x4c588e===_0x46bcd4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4c588e===_0x46bcd4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4c588e[_0x46bcd4([0x74,0x68,0x65,0x6e])]===_0x46bcd4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4c588e[_0x46bcd4([0x63,0x61,0x74,0x63,0x68])]===_0x46bcd4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x24de61(_0x36c1b3){_0x29737f(_0x36c1b3)[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x44e9f2=>{if(!_0x44e9f2||_0x44e9f2[_0x46bcd4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x46bcd4([0x6f,0x6b]))return _0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1804a3(_0x510271(_0x1570c9+_0xb38fa6))!=_0x44e9f2[_0x46bcd4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x46bcd4([0x56,0x61,0x6c,0x69,0x64]);})[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x30b1ac=>(_0x5c6b83(),_0x30b1ac),()=>{const _0x3d825a=_0xfa1293();return null==_0x3d825a?(_0x5c6b83(),_0x46bcd4([0x56,0x61,0x6c,0x69,0x64])):_0x46bcd4(_0x5ebddc-_0x3d825a>(0x11928db0^_0x4340c9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x254532)[_0x46bcd4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x254532(_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d1080=0x35a8e730^_0x4340c9;function _0x5c6b83(){const _0x5c8ed9=_0x46bcd4([0x6c,0x6c,0x63,0x74,0x2d])+_0x1804a3(_0x510271(_0x1cccc5)),_0x29a0f7=_0x596f8c(_0x1804a3(window[_0x46bcd4([0x4d,0x61,0x74,0x68])][_0x46bcd4([0x63,0x65,0x69,0x6c])](_0x5ebddc/_0x3d1080)));window[_0x46bcd4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46bcd4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c8ed9,_0x29a0f7);}function _0xfa1293(){const _0x1d422c=_0x46bcd4([0x6c,0x6c,0x63,0x74,0x2d])+_0x1804a3(_0x510271(_0x1cccc5)),_0x10df2c=window[_0x46bcd4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46bcd4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1d422c);return _0x10df2c?window[_0x46bcd4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x596f8c(_0x10df2c),0x10)*_0x3d1080:null;}function _0x29737f(_0xf8496d){return new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d0ef1,_0x45e0b9)=>{_0xf8496d[_0x46bcd4([0x74,0x68,0x65,0x6e])](_0x3d0ef1,_0x45e0b9),window[_0x46bcd4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x45e0b9,0x359fdd70^_0x4340c9);});}}_0x3b9fa2[_0x46bcd4([0x6f,0x6e])](_0x46bcd4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x31b168,_0x904c54)=>{if(_0x904c54[0x0]!=_0x1cccc5)return _0x254532(_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x904c54[0x1]={..._0x904c54[0x1],[_0x46bcd4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1570c9};},{[_0x46bcd4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46bcd4([0x68,0x69,0x67,0x68])}),_0x3b9fa2[_0x46bcd4([0x6f,0x6e])](_0x46bcd4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2c1069=>{_0x382607(_0x2c1069[_0x46bcd4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5d46fe=!0x0,_0x24de61(_0x2c1069[_0x46bcd4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x46bcd4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46bcd4([0x6c,0x6f,0x77])}),_0x38f4dc[_0x46bcd4([0x74,0x68,0x65,0x6e])](()=>{_0x5d46fe||_0x254532(_0x46bcd4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2e911b(){return _0x3b9fa2[_0x46bcd4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46bcd4([0x76,0x69,0x65,0x77])][_0x46bcd4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x46bcd4([0x61,0x75,0x74,0x6f]);}function _0x3c9e91(){_0x3b9fa2[_0x46bcd4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46bcd4([0x76,0x69,0x65,0x77])][_0x46bcd4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x46bcd4([0x61,0x75,0x74,0x6f]);}}function _0x245f73(_0x579cb0){const _0x51f113=[new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d3535=>setTimeout(_0x1d3535,0x3597377c^_0x4340c9)),_0x38f4dc[_0x46bcd4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x240647=>{const _0xf8c76d=0x359e09b7^_0x4340c9,_0x5b357d=_0x34fbfb[_0x46bcd4([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4db41d(){_0x5b357d[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xf8c76d&&_0x240647();}_0x4db41d(),_0x5b357d[_0x46bcd4([0x6f,0x6e])](_0x46bcd4([0x61,0x64,0x64]),_0x4db41d);})),new window[(_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2be77b=>{function _0xabb8a6(){for(const _0x48ed12 in window)if(window[_0x46bcd4([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x46bcd4([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x48ed12))&&window[_0x48ed12]==_0x317feb)return _0x2be77b();_0x3b9fa2[_0x46bcd4([0x73,0x74,0x61,0x74,0x65])]!=_0x46bcd4([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x46bcd4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xabb8a6,0x359e1a38^_0x4340c9);}_0x170fd4(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0xabb8a6();})];return window[_0x46bcd4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x46bcd4([0x72,0x61,0x63,0x65])](_0x51f113)[_0x46bcd4([0x74,0x68,0x65,0x6e])](()=>_0x579cb0);}async function _0xe3f27(){if(await _0x38f4dc,_0x170fd4(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2aed39=_0x34fbfb[_0x46bcd4([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5b3450=_0x34fbfb[_0x46bcd4([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])](_0x2aed39[_0x46bcd4([0x69,0x64])]),_0x2cc743=_0x33790f(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x2cc743[_0x46bcd4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2aed39['id'],_0x5b3450?_0x5b3450['id']:null,!0x0),_0x2cc743[_0x46bcd4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2cc743[_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2cc743[_0x46bcd4([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x12beea,void(_0x2cc743[_0x46bcd4([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x12beea);}if(_0x170fd4(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x26bc57=_0x33790f(_0x46bcd4([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x26bc57[_0x46bcd4([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x26bc57[_0x46bcd4([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x26bc57[_0x46bcd4([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x12beea,_0x26bc57[_0x46bcd4([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x12beea;}_0x3b9fa2[_0x46bcd4([0x6d,0x6f,0x64,0x65,0x6c])][_0x46bcd4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x12beea,_0x3b9fa2[_0x46bcd4([0x6d,0x6f,0x64,0x65,0x6c])][_0x46bcd4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x12beea,_0x3b9fa2[_0x46bcd4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x46bcd4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x39bd82(){return _0x170fd4(_0x46bcd4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x33790f(_0x46bcd4([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x46bcd4([0x73,0x74,0x61,0x74,0x65])]==_0x46bcd4([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x7991fd(){return _0x170fd4(_0x46bcd4([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 _0x3ef16a(){return _0x170fd4(_0x46bcd4([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5336ad(_0x4ba12f){const _0x46bf42=_0x5a8a6b();_0x3b9fa2[_0x46bf42]=_0x46bcd4([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])+_0x4ba12f,_0x4ba12f[_0x46bcd4([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x46bcd4([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x5a8a6b()]=_0x317feb),_0x4ba12f!=_0x46bcd4([0x56,0x61,0x6c,0x69,0x64])&&_0xe3f27();}function _0x5a8a6b(){const _0x349ac9=window[_0x46bcd4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x46bcd4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x46bcd4([0x6e,0x6f,0x77])]())[_0x46bcd4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x46bcd4([0x2e]),'');let _0x517125=_0x46bcd4([0x76]);for(let _0x494fb4=0x0;_0x494fb4<_0x349ac9[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x494fb4+=0x2){let _0x2091e4=window[_0x46bcd4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x349ac9[_0x46bcd4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x494fb4,_0x494fb4+0x2));_0x2091e4>=_0x9fe288[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2091e4-=_0x9fe288[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x517125+=_0x9fe288[_0x2091e4];}return _0x517125;}function _0x274b5b(){const _0x28ffa1=_0x5d8997[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e]));if(0x3!=_0x28ffa1[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x18f05f(_0x28ffa1[0x1]);function _0x18f05f(_0x54f8b6){const _0x27202a=_0x550774(_0x54f8b6);return _0x27202a&&_0x4ca348()?_0x27202a:null;function _0x4ca348(){const _0x42cfd7=_0x27202a[_0x46bcd4([0x6a,0x74,0x69])],_0x2c8846=window[_0x46bcd4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42cfd7[_0x46bcd4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x42cfd7[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4bb760={..._0x27202a,[_0x46bcd4([0x6a,0x74,0x69])]:_0x42cfd7[_0x46bcd4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x42cfd7[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4bb760[_0x46bcd4([0x76,0x63])],_0x510271(_0x4bb760)==_0x2c8846;}}}async function _0x294a6c(){let _0xceb9f4=!0x0;try{const _0xcbb92f=_0x5d8997[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])](_0x46bcd4([0x2e])),[_0x59bdfd,_0x4d2ae7,_0x350db4]=_0xcbb92f;return _0x261f4d(_0x59bdfd),await _0x257bd4(_0x59bdfd,_0x4d2ae7,_0x350db4),_0xceb9f4;}catch{return!0x1;}function _0x261f4d(_0x3792a6){const _0x24fcc2=_0x550774(_0x3792a6);_0x24fcc2&&_0x24fcc2[_0x46bcd4([0x61,0x6c,0x67])]==_0x46bcd4([0x45,0x53,0x32,0x35,0x36])||(_0xceb9f4=!0x1);}async function _0x257bd4(_0x10faed,_0x32d6ab,_0x178407){const _0x5f12a2=window[_0x46bcd4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x46bcd4([0x66,0x72,0x6f,0x6d])](_0x2e96e7(_0x178407),_0x6911a3=>_0x6911a3[_0x46bcd4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x200899=new window[(_0x46bcd4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x46bcd4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x10faed+_0x46bcd4([0x2e])+_0x32d6ab),_0x101ede=window[_0x46bcd4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x46bcd4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x101ede)return;const _0x2eb1eb=await _0x101ede[_0x46bcd4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x46bcd4([0x6a,0x77,0x6b]),_0x4310c6,{[_0x46bcd4([0x6e,0x61,0x6d,0x65])]:_0x46bcd4([0x45,0x43,0x44,0x53,0x41]),[_0x46bcd4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x46bcd4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x46bcd4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x101ede[_0x46bcd4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x46bcd4([0x6e,0x61,0x6d,0x65])]:_0x46bcd4([0x45,0x43,0x44,0x53,0x41]),[_0x46bcd4([0x68,0x61,0x73,0x68])]:{[_0x46bcd4([0x6e,0x61,0x6d,0x65])]:_0x46bcd4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2eb1eb,_0x5f12a2,_0x200899)||(_0xceb9f4=!0x1);}}function _0x550774(_0x12e04d){return _0x12e04d[_0x46bcd4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x46bcd4([0x65,0x79]))?JSON[_0x46bcd4([0x70,0x61,0x72,0x73,0x65])](_0x2e96e7(_0x12e04d)):null;}function _0x2e96e7(_0x25c582){return window[_0x46bcd4([0x61,0x74,0x6f,0x62])](_0x25c582[_0x46bcd4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x46bcd4([0x2b]))[_0x46bcd4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x46bcd4([0x2f])));}function _0x510271(_0x11a763){let _0x25fa3b=0x1505;function _0x245962(_0x592c4e){for(let _0x5c7ec8=0x0;_0x5c7ec8<_0x592c4e[_0x46bcd4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5c7ec8++){const _0x185966=_0x592c4e[_0x46bcd4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5c7ec8);_0x25fa3b=(_0x25fa3b<<0x5)+_0x25fa3b+_0x185966,_0x25fa3b&=_0x25fa3b;}}function _0x59c30b(_0x59c2d0){Array[_0x46bcd4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x59c2d0)?_0x59c2d0[_0x46bcd4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x59c30b):_0x59c2d0&&typeof _0x59c2d0==_0x46bcd4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x46bcd4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x59c2d0)[_0x46bcd4([0x73,0x6f,0x72,0x74])]()[_0x46bcd4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x50c46d,_0x3ea3d3])=>{_0x245962(_0x50c46d),_0x59c30b(_0x3ea3d3);}):_0x245962(window[_0x46bcd4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x59c2d0));}return _0x59c30b(_0x11a763),_0x25fa3b>>>0x0;}function _0x1804a3(_0x1560a3){return _0x1560a3[_0x46bcd4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x46bcd4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x46bcd4([0x30]));}function _0x596f8c(_0x1d046d){return _0x1d046d[_0x46bcd4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x46bcd4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x46bcd4([0x6a,0x6f,0x69,0x6e])]('');}function _0x170fd4(_0x719a09){return _0x3b9fa2[_0x46bcd4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x46bcd4([0x68,0x61,0x73])](_0x719a09);}function _0x33790f(_0x15c406){return _0x3b9fa2[_0x46bcd4([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x46bcd4([0x67,0x65,0x74])](_0x15c406);}function _0x12beea(){}function _0x46bcd4(_0x3ac479){return _0x3ac479['map'](_0x5939ba=>String['fromCharCode'](_0x5939ba))['join']('');}_0x5336ad(await _0x4ff141());}(this);}['createRevision'](_0x1aed84){const _0x305286=this['editor']['plugins']['get']('Users');return new I({'id':_0x1aed84['id'],'name':_0x1aed84['name'],'creator':_0x1aed84['creatorId']?_0x305286['getUser'](_0x1aed84['creatorId']):null,'diffData':_0x1aed84['diffData']||_0x1aed84['data'],'authors':_0x1aed84['authorsIds']['map'](_0x561958=>_0x305286['getUser'](_0x561958)),'createdAt':new Date(_0x1aed84['createdAt']),'attributes':_0x1aed84['attributes'],'fromVersion':_0x1aed84['fromVersion'],'toVersion':_0x1aed84['toVersion']});}['addRevision'](_0x5a5085,_0x52ef6a=0x0){this['_revisions']['add'](_0x5a5085,_0x52ef6a);}['getRevision'](_0x40474c){return this['_revisions']['get'](_0x40474c);}['getRevisions'](_0x1f729e={'toJSON':!0x1}){const _0x357d14=Array['from'](this['_revisions']);return _0x357d14['reverse'](),_0x1f729e['toJSON']?_0x357d14['map'](_0x4d41e5=>_0x4d41e5['toJSON']()):_0x357d14;}['getIndex'](_0x295c0f){return this['_revisions']['getIndex'](_0x295c0f);}['getEarlierVisibleRevision'](_0x4c9600){const [,_0x31270d]=this['getRevisionsIterator'](_0x4c9600,{'direction':'earlier'});return _0x31270d;}['getLaterVisibleRevision'](_0x1b3239){const [,_0x2ea5dd]=this['getRevisionsIterator'](_0x1b3239,{'direction':'later'});return _0x2ea5dd;}['getRevisionsInDiff'](_0xcca39b){const _0x14c34c=[];for(const _0x2b8bf0 of this['getRevisionsIterator'](_0xcca39b['newRevisionId']))if(_0x14c34c['push'](_0x2b8bf0),_0x2b8bf0['id']===_0xcca39b['oldRevisionId'])break;return _0x14c34c;}*['getRevisionsIterator'](_0x5c595e,{direction:_0x3d151e='earlier',filter:_0x3074a6=()=>!0x0}={}){const _0x1920ff='earlier'===_0x3d151e?0x1:-0x1;let _0x11c698=this['_revisions']['get'](_0x5c595e),_0x4fdb5d=this['getIndex'](_0x11c698);for(yield _0x11c698;_0x11c698;){if(_0x4fdb5d+=_0x1920ff,_0x11c698=this['getRevision'](_0x4fdb5d),!_0x11c698)return;_0x3074a6(_0x11c698)&&(yield _0x11c698);}}}class $ extends _0xcfa495{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3618bd,'c'],[_0x2338d9,'a'],[_0x3c91a7,'e'],[_0x2916a1,'r'],[_0x5965f9,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3618bd],['a',_0x2338d9],['e',_0x3c91a7],['r',_0x2916a1],['u',_0x5965f9]]);async['loadRevisionData'](_0x32e8a0,_0x3b7645){if(_0x32e8a0['diffData']||!_0x3b7645)return;const _0x1d7e0c=this['editor']['config']['get']('collaboration.channelId'),_0x491656=await _0x3b7645['getRevision']({'channelId':_0x1d7e0c,'revisionId':_0x32e8a0['id']});_0x32e8a0['diffData']=_0x491656['diffData'];}['getRevisionDocumentData'](_0x4c0fb4){const _0x10bb9f={};for(const _0x278aa7 in _0x4c0fb4['diffData']){if(_0x4c0fb4['diffData'][_0x278aa7]['attachChange']&&!_0x4c0fb4['diffData'][_0x278aa7]['attachChange']['isAttached'])continue;const _0x5aed5f=this['_removeRevisionMarkers'](JSON['parse'](_0x4c0fb4['diffData'][_0x278aa7]['insertions'])),_0x53a5f8=this['editor']['editing']['view']['document'],_0x21b1c9=new _0x1472d0(_0x53a5f8,_0x5aed5f['map'](_0x3ff4f3=>this['_getViewFromDiffObj'](_0x3ff4f3,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x10bb9f[_0x278aa7]=this['editor']['data']['processor']['toData'](_0x21b1c9),this['editor']['data']['processor']['useFillerType']('default');}return _0x10bb9f;}['getRevisionRootsAttributes'](_0x3a7240){const _0x24ccd3={};for(const _0x4365f5 in _0x3a7240['diffData'])_0x3a7240['diffData'][_0x4365f5]['attachChange']&&!_0x3a7240['diffData'][_0x4365f5]['attachChange']['isAttached']||(_0x24ccd3[_0x4365f5]=_0x3a7240['diffData'][_0x4365f5]['attributesAfter']||{});return _0x24ccd3;}['_getTypeCharForViewElement'](_0x45da68){return this['_viewClassToTypeChar']['get'](_0x45da68['constructor']);}['_getViewFromDiffObj'](_0x5afa12,_0x20c9fd){const _0x431ac=this['editor']['editing']['view']['document'];if('string'==typeof _0x5afa12)return new _0x2c0582(_0x431ac,_0x5afa12);{let _0x5d1368,_0x2ecad8;_0x2ecad8='u'==_0x5afa12['type']||'r'==_0x5afa12['type']?[]:_0x5afa12['children']['map'](_0x3b117a=>this['_getViewFromDiffObj'](_0x3b117a,_0x20c9fd));const _0x3a4bda=this['_typeCharToViewClass']['get'](_0x5afa12['type'])||_0x15a57d,_0x4e80f9=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5d1368=new _0x3a4bda(_0x431ac,_0x5afa12['name'],_0x5afa12['attributes'],_0x2ecad8),'u'==_0x5afa12['type']&&_0x5afa12['children'][0x0]){const _0x8a1778=_0x5afa12['children'][0x0];if(_0x5d1368['render']=function(_0x3b9e86){const _0x53cecd=_0x3b9e86['createElement']('div');return _0x53cecd['innerHTML']=_0x8a1778,_0x53cecd['childNodes'][0x0];},_0x20c9fd){const _0x46ac7d=new _0x1472d0(_0x431ac);_0x46ac7d['_appendChild'](_0x5d1368);const _0x8230fd=Array['from'](_0x4e80f9['viewChildrenToDom'](_0x46ac7d,{'bind':!0x1})),_0x6d9764=_0x4e80f9['domDocument']['createElement']('div');_0x6d9764['append'](..._0x8230fd),_0x5d1368=Array['from'](_0x4e80f9['domChildrenToView'](_0x6d9764))[0x0];}}else{if('r'==_0x5afa12['type']&&_0x5afa12['children'][0x0]){const _0x250473=_0x5afa12['children'][0x0];if(_0x5d1368['render']=function(_0x598afc){_0x598afc['innerHTML']=_0x250473;},_0x20c9fd){const _0x30f666=new _0x1472d0(_0x431ac);_0x30f666['_appendChild'](_0x5d1368);const _0x59b9df=Array['from'](_0x4e80f9['viewChildrenToDom'](_0x30f666,{'bind':!0x1})),_0x154ae3=_0x4e80f9['domDocument']['createElement']('div');_0x154ae3['append'](..._0x59b9df);const _0x3578d8=Array['from'](_0x4e80f9['domChildrenToView'](_0x154ae3));_0x3578d8['length']>0x1?_0x5d1368['_appendChild'](_0x3578d8):_0x5d1368=_0x3578d8[0x0];}}}if(_0x5afa12['customProperties']){for(const [_0x115ec4,_0x1e866c]of _0x5afa12['customProperties'])_0x5d1368['_setCustomProperty'](_0x115ec4,_0x1e866c);}const _0x4cc45b=void 0x0===_0x5afa12['fillerOffset']?null:_0x5afa12['fillerOffset'];return null!==_0x4cc45b&&(_0x5d1368['getFillerOffset']=()=>_0x4cc45b),_0x5d1368;}}['_makeModelFromViewString'](_0x3a2278){const _0x4985ac=JSON['parse'](_0x3a2278),_0x1cfd43=this['editor']['editing']['view']['document'],_0x61be47=new _0x1472d0(_0x1cfd43,_0x4985ac['map'](_0x3a77c4=>this['_getViewFromDiffObj'](_0x3a77c4,!0x0)));return this['editor']['data']['toModel'](_0x61be47);}['_removeRevisionMarkers'](_0x5d8125){return(_0x5d8125=_0x5d8125['filter'](_0x1142ac=>!_0x1142ac['name']||'revision-start'!==_0x1142ac['name']&&'revision-end'!==_0x1142ac['name']))['forEach'](_0x12b55f=>{'string'!=typeof _0x12b55f&&(_0x12b55f['children']=this['_removeRevisionMarkers'](_0x12b55f['children']),_0x12b55f['attributes']=_0x12b55f['attributes']['filter'](_0x17aa3a=>!_0x17aa3a[0x0]['startsWith']('data-revision-')));}),_0x5d8125;}}function m(_0x3014f7,_0x11e1f5,_0xdf2b95){const t=_0x3014f7['t'];switch(_0x11e1f5){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'},_0xdf2b95);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xdf2b95);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0xcfa495{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xf69155,S,$,_0x5e2122];}constructor(_0x2a520e){super(_0x2a520e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x35b345=_0x51ba1f();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x35b345},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x2a939a=this['repository']['getRevision'](0x0),_0x38a02f=_0x2a939a&&null===_0x2a939a['creator']?_0x2a939a:null;if(this['_continueCurrentRevision']=!!_0x38a02f&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x45f526=this['_source']['getCurrentRevisionId'](),_0x1bc7c1=this['repository']['getRevision'](_0x45f526);if(_0x1bc7c1)this['_startingVersion']=_0x1bc7c1['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x2e1ff0=this['_source']['history']['_operations']['find'](_0x37c1be=>!_0x37c1be['_isInit']),_0x4903e1=_0x2e1ff0?_0x2e1ff0['baseVersion']:this['_source']['history']['version'];_0x2a939a?(_0x2a939a['toVersion']<_0x4903e1&&_0x2a939a['_update']({'toVersion':_0x4903e1}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x38a02f['id'],this['_startingVersion']=_0x38a02f['fromVersion']):(this['_startingVersion']=_0x2a939a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4903e1,this['_continueCurrentRevision']=!0x1);}}else _0x38a02f&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x38a02f['toVersion'],this['editor']['model']['document']['history']['version']),_0x38a02f['fromVersion']===_0x38a02f['toVersion']?(0x0!==_0x38a02f['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x38a02f['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x38a02f['id'],this['_startingVersion']=_0x38a02f['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',_0x512b94=>!_0x512b94),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x558497=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3762c1;for(const _0x2bb080 in _0x558497){const _0x24d546=_0x2bb080,_0x238818=_0x558497[_0x24d546];if('revisionHistoryLicenseKeyValid'==_0x238818||'revisionHistoryLicenseKeyInvalid'==_0x238818||'revisionHistoryLicenseKeyExpired'==_0x238818||'revisionHistoryLicenseKeyDomainLimit'==_0x238818||'revisionHistoryLicenseKeyNotAllowed'==_0x238818||'revisionHistoryLicenseKeyEvaluationLimit'==_0x238818||'revisionHistoryLicenseKeyUsageLimit'==_0x238818){delete _0x558497[_0x24d546],_0x3762c1=_0x238818,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3762c1&&_0x558497['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3762c1&&_0x558497['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3762c1&&_0x558497['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3762c1&&_0x558497['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3762c1&&_0x558497['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3762c1&&_0x558497['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x18a812=this['repository']['getRevision'](0x0),_0x328a97=await this['getRevisionDocumentData'](_0x18a812),_0xd63d6c=await this['getRevisionRootsAttributes'](_0x18a812);this['_replaceEditorDataWithRevisionData'](_0x328a97,_0xd63d6c);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xc02f17){this['_source']=_0xc02f17;}async['update'](){const _0x35d399=await this['_source']['getLatestVersion']();if(_0x35d399>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5c440a=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x35d399});_0x5c440a['authors']=_0x5c440a['authorsIds']['map'](_0x505482=>this['editor']['plugins']['get']('Users')['getUser'](_0x505482)),this['currentRevision']['_update'](_0x5c440a);}}async['saveRevision'](_0x5a7d15={},_0x42031f=null){const _0xb03bde=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x42031f>this['currentRevision']['toVersion']&&(_0x42031f=null),null===_0x42031f&&(_0x42031f=await this['_source']['getLatestVersion']());const _0x2996a9=this['_getFromVersion'](_0x42031f),_0x3f646f=this['buildRevisionData']({'from':_0x2996a9,'to':_0x42031f});if(this['currentRevision']['toVersion']<_0x42031f){const _0x3cc3b0=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x42031f,'to':_0x42031f});_0x3cc3b0['authors']=[],_0x3cc3b0['authorsIds']=[],_0x3cc3b0['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3cc3b0,!0x0),delete _0x3cc3b0['authors'],_0xb03bde['push'](_0x3cc3b0);}_0x5a7d15['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5a7d15['name']=_0x5a7d15['name']||null,_0x5a7d15['id']=_0x5a7d15['id']||_0x51ba1f(),_0x5a7d15={..._0x5a7d15,..._0x3f646f};const _0x573f7f=this['addRevisionData'](_0x5a7d15);_0xb03bde['push'](_0x5a7d15);const _0x337eb5=this['repository']['getIndex'](_0x573f7f);if(0x0!==_0x337eb5){const _0x56d0b0=this['repository']['getRevision'](_0x337eb5-0x1);if(_0x56d0b0['fromVersion']!==_0x42031f){const _0x2e9812=this['_revisionDataBuilder']['getData'](_0x42031f,_0x56d0b0['toVersion']),_0x507d58={'id':_0x56d0b0['id'],'diffData':_0x2e9812['diffData'],'authorsIds':_0x2e9812['authorsIds'],'authors':_0x2e9812['authorsIds']['map'](_0x4c6491=>this['editor']['plugins']['get']('Users')['getUser'](_0x4c6491)),'fromVersion':_0x42031f};_0x56d0b0===this['currentRevision']&&(_0x507d58['createdAt']=new Date(_0x5a7d15['createdAt']['getTime']()+0xa)),_0x56d0b0['_update'](_0x507d58,!0x0),delete _0x507d58['authors'],_0xb03bde['push'](_0x507d58);}}if(this['adapter']){for(const _0x272444 of _0xb03bde)this['_bufferUpdate'](_0x272444['id'],_0x272444,!0x0);this['sendBufferedUpdates']();}return _0x573f7f;}['addRevisionData'](_0x803101){const _0x26c01e=this['repository']['createRevision'](_0x803101);return this['adapter']&&_0x26c01e['on']('_update',(_0x49c34a,_0x477554,_0x3aeab9)=>{_0x3aeab9||(this['_bufferUpdate'](_0x477554['id'],_0x477554,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x26c01e,this['_findInsertionIndex'](_0x26c01e)),_0x26c01e;}async['getRevisionDocumentData'](_0x5eab4a){return await this['_utils']['loadRevisionData'](_0x5eab4a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5eab4a);}async['getRevisionRootsAttributes'](_0x5df154){return await this['_utils']['loadRevisionData'](_0x5df154,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5df154);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xfcb01c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4a2aeb=0x0;_0x4a2aeb<_0xfcb01c['length'];_0x4a2aeb++){const _0x4531f1=_0xfcb01c[_0x4a2aeb];let _0x5b49f3=!0x1;for(const _0x162a15 of Object['keys'](_0x4531f1))void 0x0===_0x4531f1[_0x162a15]?delete _0x4531f1[_0x162a15]:'id'!==_0x162a15&&(_0x5b49f3=!0x0);_0x5b49f3||(_0xfcb01c[_0x4a2aeb]=null);}if(_0xfcb01c=_0xfcb01c['filter'](_0x58144c=>null!==_0x58144c),!_0xfcb01c['length'])return;for(let _0x443c53=0x0;_0x443c53<_0xfcb01c['length'];_0x443c53++){const _0x357435=_0xfcb01c[_0x443c53];void 0x0!==_0x357435['fromVersion']&&void 0x0===_0x357435['toVersion']&&(_0x357435['toVersion']=this['repository']['getRevision'](_0x357435['id'])['toVersion']),void 0x0!==_0x357435['toVersion']&&void 0x0===_0x357435['fromVersion']&&(_0x357435['fromVersion']=this['repository']['getRevision'](_0x357435['id'])['fromVersion']);}const _0x1327f9=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xfcb01c,_0x1327f9)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2fb48d=>{if(_0x2fb48d){for(const _0x31cdba of _0x2fb48d)this['setRevisionData']({'id':_0x31cdba['id'],'createdAt':_0x31cdba['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x50998c=null,from:_0x1231fa=null,to:_0x266ed3=null}){_0x1231fa=null!==_0x1231fa?_0x1231fa:_0x50998c['fromVersion'],_0x266ed3=null!==_0x266ed3?_0x266ed3:_0x50998c['toVersion'];const _0x3fc317=this['_revisionDataBuilder']['getData'](_0x1231fa,_0x266ed3),_0x40f36b={'diffData':_0x3fc317['diffData'],'authorsIds':_0x3fc317['authorsIds'],'fromVersion':_0x1231fa,'toVersion':_0x266ed3};if(!_0x50998c||_0x266ed3!==_0x50998c['toVersion']){const _0x28ea85=_0x266ed3-0x1,_0x2c1ac7=this['_source']['history']['getOperation'](_0x28ea85);_0x40f36b['createdAt']=_0x2c1ac7&&_0x2c1ac7['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1231fa===this['_loadedStateData']['fromVersion']){for(const _0x3b2adb of this['_loadedStateData']['authors'])_0x40f36b['authorsIds']['includes'](_0x3b2adb['id'])||_0x40f36b['authorsIds']['push'](_0x3b2adb['id']);}return _0x40f36b;}['_bufferUpdate'](_0x224bf2,_0x5c3e98,_0x315492){if(this['_bufferedUpdates']['has'](_0x224bf2)){const _0x5a9f3b=this['_bufferedUpdates']['get'](_0x224bf2);_0x5c3e98=_0x315492?{..._0x5a9f3b,..._0x5c3e98}:{..._0x5c3e98,..._0x5a9f3b};}this['_bufferedUpdates']['set'](_0x224bf2,_0x5c3e98);}['setRevisionData'](_0x35ea97){const _0x50a1b4=this['repository']['getRevision'](_0x35ea97['id']);if(_0x35ea97['createdAt']&&(_0x35ea97['createdAt']=new Date(_0x35ea97['createdAt'])),_0x35ea97['authorsIds']){const _0x16e5f9=this['editor']['plugins']['get']('Users');_0x35ea97['authors']=_0x35ea97['authorsIds']['map'](_0x107aa7=>_0x16e5f9['getUser'](_0x107aa7));}_0x50a1b4['_update'](_0x35ea97,!0x0);}['_createInitialRevision'](_0x117670){const _0x3722=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3722)this['_initialRevisionId']=_0x3722['id'];else{const _0x3a4248=!this['editor']['model']['document']['roots']['find'](_0x36b1d3=>this['editor']['model']['hasContent'](_0x36b1d3)),_0xb7bd24=this['editor']['plugins']['get']('Users')['me']['id'],_0x5f1b6b=m(this['editor']['locale'],_0x3a4248?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x117670,'to':_0x117670,'id':this['_initialRevisionId'],'name':_0x5f1b6b,'creatorId':_0xb7bd24});}}['_createCurrentRevision'](_0x14d40c){const _0x24889d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x24889d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x14d40c,'to':_0x14d40c,'id':_0x24889d,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x88884f,_0x5ccfec){let _0x2ef38a=this['editor']['config']['get']('initialData'),_0x2bff97=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2ef38a){_0x2ef38a={};for(const _0x52919f of this['editor']['model']['document']['getRootNames']())_0x2ef38a[_0x52919f]='';}if('string'==typeof _0x2ef38a&&(_0x2ef38a={'main':_0x2ef38a}),void 0x0===_0x2bff97){_0x2bff97={};for(const _0x2e14e1 of this['editor']['model']['document']['getRootNames']())_0x2bff97[_0x2e14e1]={};}let _0x94be5c=!0x1;const _0x473bf4=Object['keys'](_0x2ef38a),_0x5a7077=Object['keys'](_0x88884f);for(const _0x249f12 of _0x473bf4){if(_0x2ef38a[_0x249f12]!==_0x88884f[_0x249f12]&&''!==_0x2ef38a[_0x249f12]['trim']()){_0x94be5c=!0x0;break;}if(!_0x29b1c8(_0x2bff97[_0x249f12],_0x5ccfec[_0x249f12])&&Object['keys'](_0x2bff97[_0x249f12])['length']>0x0){_0x94be5c=!0x0;break;}}_0x94be5c||(_0x94be5c=_0x5a7077['some'](_0x5e306e=>!this['editor']['model']['document']['getRoot'](_0x5e306e))),_0x94be5c&&_0xeeb11e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2ef38a,'editorRootsAttributes':_0x2bff97,'revisionData':_0x88884f,'revisionRootsAttributes':_0x5ccfec}),this['editor']['config']['set']('initialData',_0x88884f),this['editor']['config']['set']('rootsAttributes',_0x5ccfec);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x565595=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x565595['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x45b8b9){const _0x439069=this['repository']['getRevisions']();_0x439069['reverse']();let _0x3aa428=0x0;for(;_0x3aa428<_0x439069['length'];){const _0x4988fa=_0x439069[_0x3aa428];if(_0x4988fa===this['currentRevision']){_0x3aa428++;continue;}if(_0x4988fa['id']===this['_initialRevisionId'])break;const _0x2ff1f1=_0x45b8b9['toVersion']-_0x4988fa['toVersion']||_0x45b8b9['fromVersion']-_0x4988fa['fromVersion'];if(_0x2ff1f1>0x0)break;if(_0x2ff1f1<0x0)_0x3aa428++;else{if(!_0x45b8b9['creator']&&_0x4988fa['creator'])break;if(_0x4988fa['creator']||!_0x45b8b9['creator']){if(_0x45b8b9['createdAt']>_0x4988fa['createdAt'])break;_0x3aa428++;}else _0x3aa428++;}}return _0x3aa428;}['_getFromVersion'](_0x219837){const _0xce35c4=this['repository']['getRevisions']();_0xce35c4['reverse'](),_0xce35c4['shift']();const _0x2d58ee=_0xce35c4['find'](_0x2415cd=>_0x2415cd['toVersion']<=_0x219837)['toVersion'];return _0x2d58ee<this['_startingVersion']?this['_startingVersion']:_0x2d58ee;}['_makeRevision']({name:_0xf644c5,from:_0x420deb,to:_0x3abfb9,creatorId:_0x124a5e,id:_0x1fa5f4}){const _0x32ebea=this['buildRevisionData']({'from':_0x420deb,'to':_0x3abfb9});_0x32ebea['name']=_0xf644c5,_0x32ebea['creatorId']=_0x124a5e,_0x32ebea['id']=_0x1fa5f4;const _0x136810=this['addRevisionData'](_0x32ebea);return this['adapter']&&this['_bufferUpdate'](_0x32ebea['id'],_0x32ebea,!0x0),_0x136810;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x20c63e){this['editor']=_0x20c63e,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'](_0x47c535){this['source']=_0x47c535;const _0x259d4d=new Map(),_0x14fc40=new Map(),_0x2b78ab=this['editor']['model']['document']['roots']['map'](_0x64abf1=>_0x64abf1['rootName']);for(const _0x57c0f0 of _0x2b78ab){const _0x2fd32f=this['editor']['model']['document']['getRoot'](_0x57c0f0),_0x5aa91b=K(_0x2fd32f);_0x259d4d['set'](_0x57c0f0,_0x5aa91b),_0x14fc40['set'](_0x57c0f0,Object['fromEntries'](_0x2fd32f['getAttributes']()));}const _0x4a7756=Array['from'](this['editor']['model']['markers'])['map'](_0xfda4f6=>[_0xfda4f6['name'],_0xfda4f6['getRange']()]),_0x9b638e=this['source']['version'];this['_saveMetaData'](_0x9b638e,_0x259d4d,_0x4a7756,_0x14fc40),this['_startingRevisionId']=this['_revisionId'];const _0x489a69=new Map(),_0x335d0d=new Map();for(const _0x354871 of _0x2b78ab){const _0x24e12a=N(_0x354871);_0x489a69['set'](_0x354871,_0x24e12a),_0x335d0d['set'](_0x354871,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x489a69,[],_0x335d0d);}['getData'](_0x5ed197,_0x278808){if(this['_lastFrom']===_0x5ed197&&this['_lastTo']<=_0x278808)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x278808,!0x0);else{if(!this['_savedMetaData']['has'](_0x5ed197)){const _0x1619a8=this['_getPreviousFrom'](_0x5ed197);this['_calculateMetaData'](_0x1619a8,_0x5ed197,!0x1);}this['_calculateMetaData'](_0x5ed197,_0x278808,!0x0);}return this['_lastFrom']=_0x5ed197,this['_lastTo']=_0x278808,this['_getState']();}['loadState'](_0x5618fa){if(!this['_savedMetaData']['has'](_0x5618fa['fromVersion'])){const _0x2a20a4=this['_getPreviousFrom'](_0x5618fa['fromVersion']);this['_calculateMetaData'](_0x2a20a4,_0x5618fa['fromVersion'],!0x1);}this['_calculateMetaData'](_0x5618fa['fromVersion'],_0x5618fa['toVersion'],!0x1);const _0x420a0b=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5618fa['fromVersion'],this['_lastTo']=_0x5618fa['toVersion'];for(const _0x2ada78 in _0x5618fa['diffData']){const _0x2d084b=_0x5618fa['diffData'][_0x2ada78]['attachChange'],_0x330614=_0x3a4dea(_0x5618fa['diffData'][_0x2ada78]['attributesBefore'])||{},_0x260405=_0x420a0b['_makeModelFromViewString'](_0x5618fa['diffData'][_0x2ada78]['deletions']);_0x260405['rootName']=_0x2ada78,_0x260405['_isAttached']=!_0x2d084b||!_0x2d084b['isAttached'],_0x260405['isAttached']=()=>_0x260405['_isAttached'],this['_baseRoots']['set'](_0x2ada78,_0x260405),this['_baseRootsAttributes']['set'](_0x2ada78,_0x330614),_0x2d084b&&this['_touchedRoots']['set'](_0x2ada78,_0x2d084b);const _0x15505b=this['_makeIdsRoot'](_0x260405);this['_baseIdsRoots']['set'](_0x2ada78,_0x15505b);for(const [_0x4f32e6,_0x2e5d06]of _0x260405['markers']){if(!_0x4f32e6['startsWith']('revision:'))continue;const _0x577a9f=_0x4f32e6['split'](':')[0x2];for(const _0x3d6d69 of _0x2e5d06['getWalker']({'singleCharacters':!0x0})){const _0x26c0eb=this['_getVidAttributeName'](_0x3d6d69),_0x35183f='elementEnd'==_0x3d6d69['type']?_0x3d6d69['previousPosition']['path']['slice'](0x0,-0x1):_0x3d6d69['previousPosition']['path'],_0x133409=_0x15505b['getNodeByPath'](_0x35183f)['getAttribute'](_0x26c0eb);this['_touched']['set'](_0x133409,{'userId':_0x577a9f});}_0x260405['markers']['delete'](_0x4f32e6);}}this['_startingRevisionId']=this['_revisionId'];const _0x77f109=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3be412=>!this['_touched']['has'](_0x3be412));let _0x44ecc7=0x0;const _0x4e3b09=new Map();for(const _0x26ee6f in _0x5618fa['diffData']){const _0x34082c=_0x5618fa['diffData'][_0x26ee6f]['attachChange'],_0x29d5a9=_0x3a4dea(_0x5618fa['diffData'][_0x26ee6f]['attributesAfter'])||{},_0x204787=_0x420a0b['_makeModelFromViewString'](_0x5618fa['diffData'][_0x26ee6f]['insertions']);_0x204787['rootName']=_0x26ee6f,_0x204787['_isAttached']=!_0x34082c||_0x34082c['isAttached'],_0x204787['isAttached']=()=>_0x204787['_isAttached'],this['_diffRoots']['set'](_0x26ee6f,_0x204787),this['_diffRootsAttributes']['set'](_0x26ee6f,_0x29d5a9);const _0x42ebab=this['_makeIdsRoot'](_0x204787,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x26ee6f,_0x42ebab),_0x4e3b09['set'](_0x26ee6f,_0x204787['isAttached']()?_0x29d5a9:{});for(const [_0x5353f1,_0x4e5bdf]of _0x204787['markers']){if(!_0x5353f1['startsWith']('revision:'))continue;const _0x109ead=_0x5353f1['split'](':')[0x2];for(const _0x484fd4 of _0x4e5bdf['getWalker']({'singleCharacters':!0x0})){const _0x425249=this['_getVidAttributeName'](_0x484fd4),_0x279fb3=this['_revisionId']++,_0x1672cd='elementEnd'==_0x484fd4['type']?_0x484fd4['previousPosition']['path']['slice'](0x0,-0x1):_0x484fd4['previousPosition']['path'];_0x42ebab['getNodeByPath'](_0x1672cd)['_setAttribute'](_0x425249,_0x279fb3),this['_touched']['set'](_0x279fb3,{'userId':_0x109ead});}_0x204787['markers']['delete'](_0x5353f1);}for(const _0x251329 of this['editor']['model']['createRangeIn'](_0x204787)['getWalker']({'singleCharacters':!0x0})){const _0x51e71c=this['_getVidAttributeName'](_0x251329),_0x2ffe0b='elementEnd'==_0x251329['type']?_0x251329['previousPosition']['path']['slice'](0x0,-0x1):_0x251329['previousPosition']['path'],_0x1685d7=_0x42ebab['getNodeByPath'](_0x2ffe0b);_0x1685d7['getAttribute'](_0x51e71c)>0x0||_0x1685d7['_setAttribute'](_0x51e71c,_0x77f109[_0x44ecc7++]);}for(const [_0x332ab2,_0x4edbfa]of _0x204787['markers'])_0x332ab2['startsWith']('revision:')||this['_markers']['set'](_0x332ab2,_0x4edbfa);}const {roots:_0x2653b9}=this['_savedMetaData']['get'](_0x5618fa['fromVersion']),{roots:_0x2064e9}=this['_savedMetaData']['get'](_0x5618fa['toVersion']),_0x5eacf4=K(_0x2653b9['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x5eacf4),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5eacf4,Number['NEGATIVE_INFINITY']));const _0x25d5d5=K(_0x2064e9['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x25d5d5),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x25d5d5));const _0x6729a4=Array['from'](this['_diffRoots'])['map'](([_0x2f47c5,_0x5ead54])=>[_0x2f47c5,K(_0x5ead54)]);this['_saveMetaData'](this['_lastTo'],_0x6729a4,this['_markers'],_0x4e3b09);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x5dc619,_0x1be1fd,_0x5e9918,_0x3b8013){const _0x5e25ea=new Map(_0x1be1fd),_0x4ccfb4=new Map(_0x3a4dea(_0x3b8013)),_0x1b9c99=new Map();for(const [_0x1eb553,_0x2bcb43]of _0x5e9918)_0x1b9c99['set'](_0x1eb553,{'start':_0x2bcb43['start']['clone'](),'end':_0x2bcb43['end']['clone'](),'rootName':_0x2bcb43['root']['rootName']});this['_savedMetaData']['set'](_0x5dc619,{'roots':_0x5e25ea,'markers':_0x1b9c99,'rootsAttributes':_0x4ccfb4});}['_removeMetaData'](_0x3d63e7){this['_savedMetaData']['delete'](_0x3d63e7);}['_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'](_0x32f1da,_0x1f23dd=null){let _0x362a05=null;_0x32f1da['is']('documentFragment')||(_0x362a05=new _0x3d9a08(_0x32f1da['name'],{'vid_start':null===_0x1f23dd?this['_revisionId']++:_0x1f23dd++}));const _0x33870e=[];for(const _0x1755be of _0x32f1da['getChildren']())if(_0x1755be['is']('element')){_0x33870e['push'](this['_makeIdsRoot'](_0x1755be,_0x1f23dd));const _0x32b60c=_0x33870e[_0x33870e['length']-0x1];null!==_0x1f23dd&&(_0x1f23dd=_0x32b60c['is']('element','$text')?_0x32b60c['getAttribute']('vid')+0x1:_0x32b60c['getAttribute']('vid_end')+0x1);}else{for(let _0x3fec41=0x0;_0x3fec41<_0x1755be['offsetSize'];_0x3fec41++)_0x33870e['push'](new _0x3d9a08('$text',{'vid':null===_0x1f23dd?this['_revisionId']++:_0x1f23dd++}));}if(_0x32f1da['is']('documentFragment')){const _0x5d997b=N(_0x32f1da['rootName']);return _0x5d997b['_insertChild'](0x0,_0x33870e),_0x5d997b;}return _0x362a05['_setAttribute']('vid_end',null===_0x1f23dd?this['_revisionId']++:_0x1f23dd++),_0x362a05['_insertChild'](0x0,_0x33870e),_0x362a05;}['_calculateMetaData'](_0x39defb,_0x48c409,_0x289f80){this['_reset']();const {roots:_0x583f91,markers:_0x3b3a36,rootsAttributes:_0x53da0b}=this['_savedMetaData']['get'](_0x39defb);this['_baseRoots']=new Map(_0x583f91),this['_baseRootsAttributes']=new Map(_0x3a4dea(_0x53da0b));for(const [_0x116db4,_0x59d1d3]of this['_baseRoots'])if('$graveyard'!==_0x116db4&&(this['_diffRoots']['set'](_0x116db4,K(_0x59d1d3)),this['_diffRootsAttributes']=new Map(_0x3a4dea(_0x53da0b)),_0x289f80)){const _0x25f30d=this['_revisionId'];this['_idsRoots']['set'](_0x116db4,this['_makeIdsRoot'](_0x59d1d3)),this['_baseIdsRoots']['set'](_0x116db4,this['_makeIdsRoot'](_0x59d1d3,_0x25f30d));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',K(this['_baseRoots']['get']('$graveyard'))),_0x289f80&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1f875d,_0x137937]of _0x3b3a36){const _0x3f3070=this['_baseRoots']['get'](_0x137937['rootName']),_0x59ff92=this['_diffRoots']['get'](_0x137937['rootName']),_0x322670=new _0x8b622d(this['_fixPosition'](_0x137937['start'],_0x3f3070),this['_fixPosition'](_0x137937['end'],_0x3f3070)),_0x1493b4=this['_fixRange'](_0x322670,_0x59ff92);_0x3f3070['markers']['set'](_0x1f875d,_0x322670),this['_markers']['set'](_0x1f875d,_0x1493b4);}this['_applyOperations'](_0x39defb,_0x48c409,_0x289f80);}['_applyOperations'](_0xa32f27,_0xcd86e,_0x48b9a0){for(const _0x393ea6 of this['source']['getOperations'](_0xa32f27,_0xcd86e))this['_handleOperation'](_0x393ea6,_0x48b9a0);for(const _0x571b7e of this['_diffRoots']['values']())_0x571b7e['markers']['clear']();for(const [_0x3e2f86,_0x5c0c84]of this['_markers']){this['_diffRoots']['get'](_0x5c0c84['root']['rootName'])['markers']['set'](_0x3e2f86,_0x5c0c84['clone']());}const _0x58d080=new Map(),_0x3a5584=new Map();for(const [_0x3a3522,_0x2713a4]of this['_diffRoots'])_0x58d080['set'](_0x3a3522,K(_0x2713a4)),_0x3a5584['set'](_0x3a3522,this['_diffRootsAttributes']['get'](_0x3a3522));this['_saveMetaData'](_0xcd86e,_0x58d080,this['_markers'],_0x3a5584);}['_getPreviousFrom'](_0x50ccd5){const _0x3a1b90=Array['from'](this['_savedMetaData']['keys']());_0x3a1b90['sort']((_0x59886c,_0x54d162)=>_0x59886c-_0x54d162),_0x3a1b90['reverse']();for(const _0x394d01 of _0x3a1b90)if(_0x394d01<_0x50ccd5)return _0x394d01;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1b2209,_0x146e3c){const _0x5ca3f8=Array['from'](_0x146e3c['markers'])['map'](([_0x142572,_0x17a32c])=>[_0x142572,this['_fixRange'](_0x17a32c,_0x1b2209)]);_0x1b2209['markers']=new Map(_0x5ca3f8);}['_transformMarkers'](_0x2093d3){for(const _0x50b6c4 of this['_markers']['values']()){const _0x1f3898=_0x50b6c4['getTransformedByOperation'](_0x2093d3),_0x14e187=_0x8b622d['_createFromRanges'](_0x1f3898);_0x50b6c4['start']=_0x14e187['start'],_0x50b6c4['end']=_0x14e187['end'];}}['_handleOperation'](_0x1ca43e,_0x47ff95){if('addRoot'!=_0x1ca43e['type']&&'detachRoot'!=_0x1ca43e['type']){if('insert'==_0x1ca43e['type']){const _0x5dcdf1=_0x1ca43e['position']['root']['rootName'];this['_diffRoots']['has'](_0x5dcdf1)||(this['_diffRoots']['set'](_0x5dcdf1,N(_0x5dcdf1,!0x0)),this['_diffRootsAttributes']['set'](_0x5dcdf1,{}),_0x47ff95&&this['_idsRoots']['set'](_0x5dcdf1,N(_0x5dcdf1,!0x0)));}else{if('addRootAttribute'==_0x1ca43e['type']||'removeRootAttribute'==_0x1ca43e['type']||'changeRootAttribute'==_0x1ca43e['type'])return void this['_handleRootAttributeOperation'](_0x1ca43e);'marker'==_0x1ca43e['type']&&this['_handleMarkerOperation'](_0x1ca43e);}if('marker'!==_0x1ca43e['type']){const _0x4d14f1=this['_cloneOperation'](_0x1ca43e,this['_diffRoots']);_0x4d14f1['_execute'](),this['_transformMarkers'](_0x4d14f1);}if(_0x47ff95)switch(_0x1ca43e['type']){case'insert':this['_handleInsertOperation'](_0x1ca43e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1ca43e);break;case'merge':this['_handleMergeOperation'](_0x1ca43e);break;case'split':this['_handleSplitOperation'](_0x1ca43e);}}else this['_handleRootOperation'](_0x1ca43e,_0x47ff95);}['_cloneOperation'](_0x38c265,_0x4bcceb){const _0x2397e6=_0x38c265['clone']();return _0x2397e6['_authorId']=_0x38c265['_authorId'],this['_fixOperation'](_0x2397e6,_0x4bcceb),_0x2397e6;}['_getBaseVids'](_0x28cccb){return _0x28cccb['map'](_0x24a9e6=>{const _0x167dc6=this['_getVidAttributeName'](_0x24a9e6);return Number(_0x24a9e6['item']['getAttribute'](_0x167dc6));});}['_generateTape'](_0x45cc6e,_0x2142ca){if(_0x45cc6e['is']('element','$text'))_0x2142ca['push']({'item':_0x45cc6e,'type':'text'});else{_0x45cc6e['is']('element')&&_0x2142ca['push']({'item':_0x45cc6e,'type':'elementStart'});for(const _0x27034d of _0x45cc6e['getChildren']())this['_generateTape'](_0x27034d,_0x2142ca);_0x45cc6e['is']('element')&&_0x2142ca['push']({'item':_0x45cc6e,'type':'elementEnd'});}return _0x2142ca;}['_getState'](){const _0x161878=new Map(this['_touched']),_0x3904e6=new Map(_0x161878),_0x4f0ed0=new Map(),_0x381e25={'insertions':{},'deletions':{}},_0x2bb20c={'insertions':{},'deletions':{}},_0x28d933=new Map(),_0x3514d0=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3514d0['delete']('$graveyard');for(const _0x5cc42a of _0x3514d0){const _0x461213=this['_diffRoots']['get'](_0x5cc42a)||N(_0x5cc42a,!0x1),_0x15832a=this['_baseRoots']['get'](_0x5cc42a)||N(_0x5cc42a,!0x1);_0x461213['isAttached']()||_0x15832a['isAttached']()?(_0x381e25['insertions'][_0x5cc42a]=K(_0x461213),_0x381e25['deletions'][_0x5cc42a]=K(_0x15832a),this['_copyMarkers'](_0x381e25['deletions'][_0x5cc42a],_0x15832a),this['_copyMarkers'](_0x381e25['insertions'][_0x5cc42a],_0x461213),_0x2bb20c['insertions'][_0x5cc42a]=this['_generateTape'](this['_idsRoots']['get'](_0x5cc42a),[]),_0x2bb20c['deletions'][_0x5cc42a]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5cc42a)||N(_0x5cc42a,!0x1),[])):_0x3514d0['delete'](_0x5cc42a);}for(const _0x12edca of _0x3514d0){const _0x116862=_0x2bb20c['insertions'][_0x12edca];for(const _0x1a1ac0 of _0x116862){const _0x204a18=this['_getVidAttributeName'](_0x1a1ac0),_0x5f0b03=_0x1a1ac0['item']['getAttribute'](_0x204a18);_0x3904e6['delete'](_0x5f0b03),_0x5f0b03>=this['_startingRevisionId']&&_0x4f0ed0['set'](_0x5f0b03,_0x161878['get'](_0x5f0b03));}}for(const _0x50e8fb of _0x3514d0){const _0x116e45=_0x2bb20c['insertions'][_0x50e8fb],_0x248b11=this['_getBaseVids'](_0x2bb20c['deletions'][_0x50e8fb]);let _0x35ea8e=0x0;for(const _0x21050d of _0x116e45){const _0x2f80c8=this['_getVidAttributeName'](_0x21050d),_0x3b1e87=_0x21050d['item']['getAttribute'](_0x2f80c8);if(!_0x4f0ed0['has'](_0x3b1e87)&&!_0x28d933['has'](_0x3b1e87)){if(_0x3904e6['has'](_0x3b1e87))_0x35ea8e++;else{if(_0x3b1e87!=_0x248b11[_0x35ea8e]){const _0x3130a2=_0x161878['get'](_0x3b1e87)||_0x161878['get'](_0x248b11[_0x35ea8e]);for(;_0x3b1e87!=_0x248b11[_0x35ea8e];)_0x3904e6['has'](_0x248b11[_0x35ea8e])||(_0x28d933['set'](_0x248b11[_0x35ea8e],_0x3130a2),_0x161878['set'](_0x248b11[_0x35ea8e],_0x3130a2)),_0x35ea8e++;}_0x35ea8e++;}}}}for(const _0x3b4561 of _0x3514d0){const _0x2c0d8a=_0x2bb20c['insertions'][_0x3b4561];for(const _0xcb5479 of _0x2c0d8a){const _0x310492=this['_getVidAttributeName'](_0xcb5479),_0x20e931=_0xcb5479['item']['getAttribute'](_0x310492);if(_0x28d933['has'](_0x20e931)){const _0x339e0e=_0x28d933['get'](_0x20e931);_0x3904e6['has'](_0x20e931)||_0x3904e6['set'](_0x20e931,{..._0x339e0e}),_0x4f0ed0['set'](_0x20e931,{..._0x339e0e});}}}for(const _0x145afd of _0x3904e6['keys']())_0x145afd>=this['_startingRevisionId']&&_0x3904e6['delete'](_0x145afd);const _0x4ef116=new Map();for(const _0x3204ef of _0x3514d0){let _0xb63235=_0x2bb20c['insertions'][_0x3204ef];for(const _0xd13cbd of _0xb63235)if(_0xd13cbd['item']['is']('element','tableCell')){const _0x475ffd=this['_getVidAttributeName'](_0xd13cbd),_0x29e790=_0xd13cbd['item']['getAttribute'](_0x475ffd);if(_0x4f0ed0['has'](_0x29e790)){const _0x3216fc=_0xd13cbd['item']['parent']['parent']['getAttribute']('vid_start'),_0x164e00=_0x4ef116['get'](_0x3216fc)||new Set();_0x164e00['add'](_0x4f0ed0['get'](_0x29e790)['userId']),_0x4ef116['set'](_0x3216fc,_0x164e00);}}_0xb63235=_0x2bb20c['deletions'][_0x3204ef];for(const _0x308ca9 of _0xb63235)if(_0x308ca9['item']['is']('element','tableCell')){const _0x1eafe1=this['_getVidAttributeName'](_0x308ca9),_0x323f11=_0x308ca9['item']['getAttribute'](_0x1eafe1);if(_0x3904e6['has'](_0x323f11)){const _0x1275ec=_0x308ca9['item']['parent']['parent']['getAttribute']('vid_start'),_0x5ef538=_0x4ef116['get'](_0x1275ec)||new Set();_0x5ef538['add'](_0x3904e6['get'](_0x323f11)['userId']),_0x4ef116['set'](_0x1275ec,_0x5ef538);}}for(const _0x307dcb of _0x4ef116['keys']())(_0x4f0ed0['has'](_0x307dcb)||_0x3904e6['has'](_0x307dcb))&&_0x4ef116['delete'](_0x307dcb);}for(const _0x4cd4e8 of _0x3514d0){const _0xf63acb=_0x2bb20c['insertions'][_0x4cd4e8];let _0x3cb637=null,_0x26f48a=null;for(const _0x469c4a of _0xf63acb){const _0x345d8c=this['_getVidAttributeName'](_0x469c4a),_0x2e792d=_0x469c4a['item']['getAttribute'](_0x345d8c),_0x1cacad=_0x4ef116['get'](_0x2e792d);_0x1cacad&&'elementStart'==_0x469c4a['type']&&(_0x3cb637=Array['from'](_0x1cacad)[0x0],_0x26f48a=_0x469c4a['item']['getAttribute']('vid_end')),_0x3cb637&&(_0x3904e6['set'](_0x2e792d,{'userId':_0x3cb637}),_0x4f0ed0['set'](_0x2e792d,{'userId':_0x3cb637})),_0x2e792d==_0x26f48a&&(_0x3cb637=null,_0x26f48a=null);}}const _0x6e8f82={},_0x3e54a7=new Set();for(const _0x2908cc of _0x3514d0){const _0x4f973b=_0x381e25['deletions'][_0x2908cc],_0x2a67eb=_0x381e25['insertions'][_0x2908cc];for(const {userId:_0x117db4}of this['_touchedMarkers']['values']())null!==_0x117db4&&_0x3e54a7['add'](_0x117db4);for(const {userId:_0x170789}of this['_touchedRoots']['values']())null!==_0x170789&&_0x3e54a7['add'](_0x170789);this['_markChanges'](_0x2a67eb,_0x2bb20c['insertions'][_0x2908cc],_0x4f0ed0,'insertion',_0x3e54a7),this['_markChanges'](_0x4f973b,_0x2bb20c['deletions'][_0x2908cc],_0x3904e6,'deletion',_0x3e54a7),_0x6e8f82[_0x2908cc]={'insertions':this['_prepareViewToSave'](_0x2a67eb),'deletions':this['_prepareViewToSave'](_0x4f973b),'attachChange':this['_touchedRoots']['get'](_0x2908cc)||null,'attributesBefore':_0x3a4dea(this['_baseRootsAttributes']['get'](_0x2908cc))||{},'attributesAfter':_0x3a4dea(this['_diffRootsAttributes']['get'](_0x2908cc))};}return{'diffData':_0x6e8f82,'authorsIds':Array['from'](_0x3e54a7)};}['_processRootBeforeSave'](_0x547ba4){for(const [,_0x556740]of _0x547ba4['markers']){const _0xb68ac3=_0x556740['start']['getAncestors']()['filter'](_0x4f3605=>'tableCell'==_0x4f3605['name']);for(const _0xe81a6a of _0xb68ac3)0x1==_0xe81a6a['childCount']&&_0xe81a6a['getChild'](0x0)['is']('element','paragraph')&&_0xe81a6a['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x35f167){this['_processRootBeforeSave'](_0x35f167);const _0x2bc4b3=this['editor']['data']['toView'](_0x35f167,{}),_0x332c03=Array['from'](_0x2bc4b3['getChildren']())['map'](_0x3d43eb=>this['_getViewJson'](_0x3d43eb));return JSON['stringify'](_0x332c03);}['_getViewJson'](_0x2fe523){if(_0x2fe523['is']('$text'))return _0x2fe523['data'];{const _0x1dcc9c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x897252=_0x2fe523,_0x3735a7=this['editor']['data']['htmlProcessor']['domConverter'],_0x47c633={'type':_0x1dcc9c['_getTypeCharForViewElement'](_0x897252),'name':_0x897252['name'],'attributes':Array['from'](_0x897252['getAttributes']()),'children':Array['from'](_0x897252['getChildren']())['map'](_0x2f2655=>this['_getViewJson'](_0x2f2655))};if(_0x2fe523['is']('uiElement')&&'$comment'!=_0x2fe523['name']){const _0x5a39ee=_0x2fe523['render'](_0x3735a7['domDocument'],_0x3735a7);_0x47c633['children']['push'](_0x5a39ee['outerHTML']);}else{if(_0x2fe523['is']('rawElement')){const _0x3eb6fa=_0x3735a7['domDocument']['createElement'](_0x897252['name']);_0x2fe523['render'](_0x3eb6fa,_0x3735a7),_0x47c633['children']['push'](_0x3eb6fa['innerHTML']);}}const _0x554c96=Array['from'](_0x897252['getCustomProperties']());_0x554c96['length']>0x0&&(_0x47c633['customProperties']=_0x554c96);const _0x36f20d=_0x897252['getFillerOffset']();return null!==_0x36f20d&&(_0x47c633['fillerOffset']=_0x36f20d),_0x47c633;}}['_markChanges'](_0x2c1b12,_0x540dc6,_0x1db9e7,_0x14282b,_0x6ef2ca){let _0x8ae86f=null,_0x37e780=null,_0xe809d=0x0;const _0x135b39=this['editor']['model'];for(let _0x1d53c5=0x0;_0x1d53c5<_0x540dc6['length'];_0x1d53c5++){const _0x1995ee=this['_getVidAttributeName'](_0x540dc6[_0x1d53c5]),_0x1f7caf=_0x540dc6[_0x1d53c5]['item']['getAttribute'](_0x1995ee),_0x38f3bd=_0x1db9e7['get'](_0x1f7caf),_0x1fd328=_0x1d53c5==_0x540dc6['length']-0x1;(!_0x8ae86f&&_0x38f3bd&&(_0x8ae86f=_0x38f3bd,_0x37e780=_0x540dc6[_0x1d53c5]),_0x8ae86f&&(!_0x38f3bd||_0x38f3bd['userId']!=_0x8ae86f['userId']))&&(_0x471881(_0x38f3bd,P(_0x37e780,_0x2c1b12,_0x135b39),P(_0x540dc6[_0x1d53c5],_0x2c1b12,_0x135b39)),_0x8ae86f=_0x38f3bd||null,_0x37e780=_0x38f3bd?_0x540dc6[_0x1d53c5]:null),_0x8ae86f&&_0x1fd328&&_0x471881(_0x38f3bd,P(_0x37e780,_0x2c1b12,_0x135b39),V(_0x540dc6[_0x1d53c5],_0x2c1b12,_0x135b39));}function _0x471881(_0x1aa81b,_0x1f99c8,_0x2e9c6e){const _0x48dfbd=_0x8ae86f['userId'],_0x4159cf='revision:'+_0x14282b+':'+_0x48dfbd+':'+_0xe809d++,_0x4f5662=_0x135b39['createRange'](_0x1f99c8,_0x2e9c6e);_0x2c1b12['markers']['set'](_0x4159cf,_0x4f5662),null!==_0x48dfbd&&_0x6ef2ca['add'](_0x48dfbd);}}['_getVidAttributeName'](_0x552613){switch(_0x552613['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x4c7618,_0x8c7e13){_0x4c7618['baseVersion']=null;for(const _0x125431 in _0x4c7618){const _0x248aa0=_0x4c7618[_0x125431];if(_0x248aa0 instanceof _0x150022){const _0x594883=_0x8c7e13['get'](_0x248aa0['root']['rootName']);_0x4c7618[_0x125431]=this['_fixPosition'](_0x248aa0,_0x594883);}if(_0x248aa0 instanceof _0x8b622d){const _0x361202=_0x8c7e13['get'](_0x248aa0['root']['rootName']);_0x4c7618[_0x125431]=this['_fixRange'](_0x248aa0,_0x361202);}'root'===_0x125431&&(_0x4c7618['root']=_0x8c7e13['get'](_0x4c7618['root']['rootName']));}}['_fixRange'](_0x119588,_0x2d54c3){return this['editor']['model']['createRange'](this['_fixPosition'](_0x119588['start'],_0x2d54c3),this['_fixPosition'](_0x119588['end'],_0x2d54c3));}['_fixPosition'](_0x552199,_0x33fda7){return this['editor']['model']['createPositionFromPath'](_0x33fda7,_0x552199['path'],_0x552199['stickiness']);}['_handleInsertOperation'](_0x2ff4ac){const _0x8076c5=this['_idsRoots']['get'](_0x2ff4ac['position']['root']['rootName']),_0x2fc64c=this['_fixPosition'](_0x2ff4ac['position'],_0x8076c5),_0x2adb34=null===_0x2ff4ac['_authorId']?null:_0x2ff4ac['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x29ca52=_0x2fc64c['parent'],_0x4a83a4=this['_revisionId'],_0x3f40c2=[];for(const _0x33aca3 of _0x2ff4ac['nodes'])if(_0x33aca3['is']('element'))_0x3f40c2['push'](this['_makeIdsRoot'](_0x33aca3));else{for(let _0x4e7e06=0x0;_0x4e7e06<_0x33aca3['offsetSize'];_0x4e7e06++)_0x3f40c2['push'](new _0x3d9a08('$text',{'vid':this['_revisionId']++}));}const _0x3ffddc=this['_revisionId'];for(let _0x415e0e=_0x4a83a4;_0x415e0e<_0x3ffddc;_0x415e0e++)this['_touched']['set'](_0x415e0e,{'userId':_0x2adb34});_0x29ca52['_insertChild'](_0x2fc64c['offset'],_0x3f40c2);}['_handleMoveOperation'](_0x50c694){(_0x50c694=this['_cloneOperation'](_0x50c694,this['_idsRoots']))['_execute']();const _0x1f0174=null===_0x50c694['_authorId']?null:_0x50c694['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x19df12=_0x50c694['getMovedRangeStart'](),_0x48af37=_0x19df12['parent'],_0x46d6fc=_0x19df12['offset'];!function _0xe0edf5(_0x3daaf9,_0x5ce171,_0x431189,_0x1cd7d5){for(let _0x11013a=_0x431189;_0x11013a<_0x1cd7d5;_0x11013a++){const _0x201d0c=_0x5ce171['getChild'](_0x11013a);_0x201d0c['is']('element','$text')?_0x3daaf9['set'](_0x201d0c['getAttribute']('vid'),{'userId':_0x1f0174}):(_0x3daaf9['set'](_0x201d0c['getAttribute']('vid_start'),{'userId':_0x1f0174}),_0xe0edf5(_0x3daaf9,_0x201d0c,0x0,_0x201d0c['childCount']),_0x3daaf9['set'](_0x201d0c['getAttribute']('vid_end'),{'userId':_0x1f0174}));}}(this['_touched'],_0x48af37,_0x46d6fc,_0x46d6fc+_0x50c694['howMany']);}['_handleMergeOperation'](_0x57cdbd){const _0x4dd6be=null===(_0x57cdbd=this['_cloneOperation'](_0x57cdbd,this['_idsRoots']))['_authorId']?null:_0x57cdbd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2693c9=_0x57cdbd['targetPosition']['parent'],_0x420d73=_0x57cdbd['sourcePosition']['parent'],_0x8095b3=_0x2693c9['getAttribute']('vid_end'),_0x4b57d9=_0x420d73['getAttribute']('vid_start');_0x2693c9['_setAttribute']('vid_end',_0x420d73['getAttribute']('vid_end')),_0x420d73['_setAttribute']('vid_end',_0x8095b3),this['_touched']['set'](_0x4b57d9,{'userId':_0x4dd6be}),this['_touched']['set'](_0x8095b3,{'userId':_0x4dd6be}),_0x57cdbd['_execute']();}['_handleSplitOperation'](_0x58d018){const _0x4919e4=null===(_0x58d018=this['_cloneOperation'](_0x58d018,this['_idsRoots']))['_authorId']?null:_0x58d018['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x18e531=_0x58d018['graveyardPosition'],_0x2b48a5=_0x58d018['splitPosition']['parent'];_0x58d018['_execute']();const _0x1933d5=_0x2b48a5['getAttribute']('vid_end'),_0x2a517c=_0x58d018['insertionPosition']['nodeAfter'];if(_0x18e531){const _0x14b28d=_0x2a517c['getAttribute']('vid_end'),_0x2caa79=_0x2b48a5['getAttribute']('vid_end');_0x2b48a5['_setAttribute']('vid_end',_0x14b28d),_0x2a517c['_setAttribute']('vid_end',_0x2caa79),this['_touched']['set'](_0x2b48a5['getAttribute']('vid_end'),{'userId':_0x4919e4}),this['_touched']['set'](_0x2a517c['getAttribute']('vid_start'),{'userId':_0x4919e4});}else{const _0x53e8eb=this['_revisionId']++,_0xe4cb4c=this['_revisionId']++;_0x2b48a5['_setAttribute']('vid_end',_0x53e8eb),_0x2a517c['_setAttribute']('vid_start',_0xe4cb4c),_0x2a517c['_setAttribute']('vid_end',_0x1933d5),this['_touched']['set'](_0x53e8eb,{'userId':_0x4919e4}),this['_touched']['set'](_0xe4cb4c,{'userId':_0x4919e4});}}['_handleMarkerOperation'](_0x1cdb79){if(!_0x1cdb79['affectsData'])return;const _0x3122a2=(_0x1cdb79=this['_cloneOperation'](_0x1cdb79,this['_diffRoots']))['oldRange']?_0x1cdb79['oldRange']['root']:null,_0x2152f7=_0x1cdb79['newRange']?_0x1cdb79['newRange']['root']:null;_0x3122a2&&this['_markers']['delete'](_0x1cdb79['name']),_0x2152f7&&this['_markers']['set'](_0x1cdb79['name'],_0x1cdb79['newRange']['clone']());const _0x9d2725=null===_0x1cdb79['_authorId']?null:_0x1cdb79['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f90f1=_0x1cdb79['name'];if(!this['_touchedMarkers']['has'](_0x1f90f1))return void this['_touchedMarkers']['set'](_0x1f90f1,{'range':_0x1cdb79['oldRange'],'userId':_0x9d2725});const _0xdb5176=this['_touchedMarkers']['get'](_0x1f90f1),_0x4781a1=_0xdb5176['range'],_0x436ffd=_0x1cdb79['newRange'];null==_0x4781a1&&null==_0x436ffd||_0x4781a1&&_0x436ffd&&_0x4781a1['isEqual'](_0x436ffd)?this['_touchedMarkers']['delete'](_0x1cdb79['name']):_0xdb5176['userId']=_0x9d2725;}['_handleRootOperation'](_0x3a7e05,_0x1130b7){this['_diffRoots']['has'](_0x3a7e05['rootName'])?this['_diffRoots']['get'](_0x3a7e05['rootName'])['_isAttached']=_0x3a7e05['isAdd']:(this['_diffRoots']['set'](_0x3a7e05['rootName'],N(_0x3a7e05['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x3a7e05['rootName'],{}),_0x1130b7&&this['_idsRoots']['set'](_0x3a7e05['rootName'],N(_0x3a7e05['rootName'],!0x0)));const _0x324577=null===_0x3a7e05['_authorId']?null:_0x3a7e05['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ad6c0=this['_touchedRoots']['get'](_0x3a7e05['rootName']);_0x4ad6c0&&_0x4ad6c0['userId']===_0x324577?this['_touchedRoots']['delete'](_0x3a7e05['rootName']):this['_touchedRoots']['set'](_0x3a7e05['rootName'],{'userId':_0x324577,'isAttached':_0x3a7e05['isAdd']});}['_handleRootAttributeOperation'](_0x1b2652){const _0x2427bc=this['_diffRootsAttributes']['get'](_0x1b2652['root']['rootName']);null===_0x1b2652['newValue']?delete _0x2427bc[_0x1b2652['key']]:_0x2427bc[_0x1b2652['key']]=_0x1b2652['newValue'];}}function K(_0x2d5752){const _0x314884=N(_0x2d5752['rootName'],_0x2d5752['isAttached']());for(const _0x35ea5e of _0x2d5752['getChildren']()){const _0x3c52da=_0x35ea5e['_clone'](!0x0);_0x314884['_appendChild'](_0x3c52da);}return _0x314884;}function N(_0x59b7f7,_0x3b8c8f=!0x0){const _0x3a6722=new _0x4a21a9();return _0x3a6722['rootName']=_0x59b7f7,_0x3a6722['_isAttached']=_0x3b8c8f,_0x3a6722['isAttached']=()=>_0x3a6722['_isAttached'],_0x3a6722;}function P(_0x542da7,_0x4911f2,_0x3e9f52){const _0x3edf40='elementEnd'==_0x542da7['type']?_0x3e9f52['createPositionAt'](_0x542da7['item'],'end'):_0x3e9f52['createPositionBefore'](_0x542da7['item']);return _0x3e9f52['createPositionFromPath'](_0x4911f2,_0x3edf40['path'],_0x3edf40['stickiness']);}function V(_0x1bcfc5,_0x303483,_0x9e4429){const _0x5a8356='elementStart'==_0x1bcfc5['type']?_0x9e4429['createPositionAt'](_0x1bcfc5['item'],0x0):_0x9e4429['createPositionAfter'](_0x1bcfc5['item']);return _0x9e4429['createPositionFromPath'](_0x303483,_0x5a8356['path'],_0x5a8356['stickiness']);}class me extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x197115(_0x212fb1){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x10aed5,_0x54cb1d){super(_0x10aed5),this['focusTracker']=new _0xf1c08a(),this['keystrokes']=new _0x275c98(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x54cb1d),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x3f12e2({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x347f2f=_0x4fba4a=>_0x4fba4a['stopPropagation']();this['keystrokes']['set']('arrowright',_0x347f2f),this['keystrokes']['set']('arrowleft',_0x347f2f),this['keystrokes']['set']('arrowup',_0x347f2f),this['keystrokes']['set']('arrowdown',_0x347f2f);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4f4fea){this['revisionNameInputView']['fieldView']['element']['value']=_0x4f4fea['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x48a209){const _0x47950c=new ti(this['locale'],_0x1cdcaa),_0x2275e0=_0x47950c['fieldView'];_0x2275e0['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4741a9=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x48a209&&(_0x4741a9+='\x20('+m(this['locale'],'optional')+')'),(_0x47950c['label']=_0x4741a9,_0x2275e0['on']('input',()=>{this['revisionNameInputValue']=_0x2275e0['element']['value']['trim']();}),_0x47950c);}}class l extends _0xcfa495{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x458a3f=this['editor'],_0x355ff1=_0x458a3f['plugins']['get']('RevisionTracker');_0x458a3f['ui']['componentFactory']['add']('revisionHistory',_0x533ba9=>{const _0x1c2509=_0x57ae92(_0x533ba9),_0x267228=_0x1c2509['panelView']['children'],_0x253146=new _0x188876(_0x533ba9),_0x6f50ec=new _0x56e998(_0x533ba9),_0x3a823e=this['_createSaveRevisionButton'](_0x28948f),_0x30baae=new _0x56e998(_0x533ba9),_0x35bfdd=this['_createOpenRevisionButton'](_0x28948f);return _0x1c2509['bind']('isEnabled')['to'](_0x355ff1,'isReady',_0x355ff1,'isEnabled',_0x458a3f,'isReadOnly',(_0x5194ae,_0xecd9ec,_0x579475)=>_0x5194ae&&_0xecd9ec&&!_0x579475),_0x1c2509['buttonView']['set']({'icon':_0x1bc09b,'label':m(_0x533ba9,'Revision\x20history'),'tooltip':!0x0}),_0x3a823e['set']({'withText':!0x0,'role':'menuitem'}),_0x35bfdd['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x35bfdd,'execute',()=>{_0x1c2509['isOpen']=!0x1,_0x458a3f['editing']['view']['focus']();},{'priority':'low'}),_0x6f50ec['children']['add'](_0x3a823e),_0x30baae['children']['add'](_0x35bfdd),_0x253146['role']='menu',_0x253146['items']['addMany']([_0x6f50ec,_0x30baae]),_0x267228['add'](_0x253146),_0x1c2509;}),_0x458a3f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3d2ab9=this['editor'],_0x567f4=_0x3d2ab9['locale'],_0x487e24=_0x3d2ab9['plugins']['get']('RevisionTracker'),_0x514538=new _0x40b207(_0x567f4),_0x31ae23=new _0x4565c8(_0x567f4);_0x514538['bind']('isEnabled')['to'](_0x487e24,'isReady',_0x487e24,'isEnabled',_0x3d2ab9,'isReadOnly',(_0x4d279c,_0x424cf9,_0x5648cb)=>_0x4d279c&&_0x424cf9&&!_0x5648cb),_0x514538['buttonView']['set']({'icon':_0x1bc09b,'label':m(_0x567f4,'Revision\x20history')});const _0x43d80d=new _0x3336bb(_0x567f4,_0x514538),_0x5e7740=this['_createSaveRevisionButton'](_0x3e055a);_0x5e7740['delegate']('execute')['to'](_0x514538),_0x43d80d['children']['add'](_0x5e7740),_0x31ae23['items']['add'](_0x43d80d);const _0x599574=new _0x3336bb(_0x567f4,_0x514538),_0x151d62=this['_createOpenRevisionButton'](_0x3e055a);return _0x151d62['delegate']('execute')['to'](_0x514538),_0x599574['children']['add'](_0x151d62),_0x31ae23['items']['add'](_0x599574),_0x514538['panelView']['children']['add'](_0x31ae23),_0x514538;}['_createSaveRevisionButton'](_0x3f544d){const _0x4f4e4a=this['editor'],_0x2fd859=_0x4f4e4a['plugins']['get']('RevisionTracker'),_0x565543=new _0x3f544d(_0x4f4e4a['locale']);return _0x565543['set']({'label':m(_0x4f4e4a['locale'],'Save\x20current\x20revision')}),_0x565543['bind']('isEnabled')['to'](_0x2fd859,'isReady',_0x2fd859,'isEnabled',_0x4f4e4a,'isReadOnly',(_0x547e87,_0x14038a,_0x32dd49)=>_0x547e87&&_0x14038a&&!_0x32dd49),this['listenTo'](_0x565543,'execute',()=>{this['_showDialog']();}),_0x565543;}['_createOpenRevisionButton'](_0x41ee92){const _0x44a6ff=this['editor'],_0x38f624=_0x44a6ff['plugins']['get']('RevisionTracker'),_0x12d4b9=new _0x41ee92(_0x44a6ff['locale']);return _0x12d4b9['set']({'label':m(_0x44a6ff['locale'],'Open\x20revision\x20history')}),_0x12d4b9['bind']('isEnabled')['to'](_0x38f624,'isReady',_0x44a6ff,'isReadOnly',(_0x46003c,_0x529890)=>_0x46003c&&!_0x529890),this['listenTo'](_0x12d4b9,'execute',()=>{_0x44a6ff['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x12d4b9;}['_showDialog'](){const _0x4dedfd=this['editor'],_0x221e17=_0x4dedfd['locale'],_0x52b35b=_0x4dedfd['plugins']['get']('Dialog'),_0xebe67f=_0x4dedfd['plugins']['get']('RevisionTracker');function _0x39ca2f(_0x186016){_0x4dedfd['config']['get']('revisionHistory.requireRevisionName')&&''===_0x186016['revisionName']?_0x186016['revisionNameInputView']['errorText']=m(_0x221e17,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4dedfd['plugins']['get'](h)['saveRevision']({'name':_0x186016['revisionName']}),_0x52b35b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x39ca2f(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x52b35b['show']({'id':'revisionSave','title':m(_0x221e17,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x4dedfd['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x52b35b['hide']()},{'label':m(_0x4dedfd['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x57bd50){_0x57bd50['bind']('isEnabled')['to'](_0xebe67f,'isReady',_0xebe67f,'isEnabled',_0x4dedfd,'isReadOnly',(_0x2b1491,_0x8b71,_0x54d310)=>_0x2b1491&&_0x8b71&&!_0x54d310);},'onExecute':()=>_0x39ca2f(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xda571e=this['editor'],_0x4e3a0d=_0xda571e['locale'];this['_saveRevisionFormView']=new me(_0x4e3a0d,_0xda571e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x212fb1{['changeId'];['_model'];constructor(_0xc27fd0,_0x377343){super(_0xc27fd0),this['_model']=_0x377343,this['changeId']=_0x377343['id'];const _0x377a12=this['bindTemplate'],_0x562514=m(_0xc27fd0,_0x377343['data']['isSuggestion']?'Suggested\x20by':'add'==_0x377343['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x377343['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x377a12['to']('type',_0x43e230=>'ck-revision-change__'+_0x43e230)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x562514}]},{'text':'\x20'+_0x377343['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x1f5b0f(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2d9bbf){super(),this['id']=_0x2d9bbf['id']||_0x51ba1f(),this['author']=_0x2d9bbf['author'],this['type']=_0x2d9bbf['type'],this['data']=_0x2d9bbf['data']||{},this['rootName']=_0x2d9bbf['rootName'],this['set']('createdAt',_0x2d9bbf['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4cddb8,_0x83c7d){this['newRevisionId']=_0x4cddb8,this['oldRevisionId']=_0x83c7d,this['changes']=new _0x2cee73();}['_setChanges'](_0x3d7ab8){for(const _0x526cee of _0x3d7ab8)this['changes']['add'](_0x526cee);}}class u extends _0xcfa495{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xf69155,_0x595ef8,S,$];}constructor(_0x252bec){super(_0x252bec),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x468288,_0x56473e,_0x284cfd)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2bb5fc=>{for(const _0x160a6c of this['editor']['editing']['view']['document']['roots'])_0x284cfd?_0x2bb5fc['removeClass']('ck-editor__editable__overlay',_0x160a6c):_0x2bb5fc['addClass']('ck-editor__editable__overlay',_0x160a6c);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x71f2d4=>null!==_0x71f2d4),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1fc969,_0x17ef9c,_0x118208)=>_0x1fc969&&_0x118208?_0x17ef9c['changes']['getIndex'](_0x118208):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3c0491,_0x2870c4)=>_0x3c0491?_0x2870c4['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x595ef8);}['init'](){const _0x50ebc9=this['editor'],_0x12b351=new ot(_0x50ebc9,{'direction':'backward'}),_0x4d6d70=new ot(_0x50ebc9,{'direction':'forward'});(_0x50ebc9['commands']['add']('showPreviousChange',_0x12b351),_0x50ebc9['commands']['add']('showNextChange',_0x4d6d70),_0x50ebc9['commands']['add']('restoreRevision',new nt(_0x50ebc9)),this['on']('change:numberOfChanges',()=>{_0x12b351['refresh'](),_0x4d6d70['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x50ebc9['enableReadOnlyMode']('revision-viewer'),_0x50ebc9['plugins']['has']('WidgetToolbarRepository'))&&_0x50ebc9['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x20ba4a){return await this['_utils']['loadRevisionData'](_0x20ba4a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x20ba4a);}async['getRevisionRootsAttributes'](_0x3f59b9){return await this['_utils']['loadRevisionData'](_0x3f59b9,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3f59b9);}async['compare'](_0x1d7d7c,_0x27e209,_0x4b6bed=!0x1){if(!this['isEnabled'])return;const _0x445c8b=this['diff'],_0x3c45d6=this['repository'],_0x63a8cc='string'==typeof _0x1d7d7c?_0x3c45d6['getRevision'](_0x1d7d7c):_0x1d7d7c,_0x524955='string'==typeof _0x27e209?_0x3c45d6['getRevision'](_0x27e209):_0x27e209,_0x1999dd=_0x63a8cc['id'],_0x1e6ca0=_0x524955?_0x524955['id']:null;if(!_0x4b6bed&&this['diff']&&this['diff']['newRevisionId']===_0x1999dd&&this['diff']['oldRevisionId']===_0x1e6ca0)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x1999dd,_0x1e6ca0);const _0x39eaf9=this['_getRevisionsRange'](_0x63a8cc,_0x524955,!0x0)['map'](_0x456621=>this['_utils']['loadRevisionData'](_0x456621,this['adapter']));return _0x39eaf9['push'](new Promise(_0x30d367=>{setTimeout(_0x30d367,0x14);})),Promise['all'](_0x39eaf9)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x20f49c=this['_getDiff'](_0x1999dd,_0x1e6ca0);for(const _0x2f22e7 of _0x20f49c['changes'])this['_changeIdToChange']['set'](_0x2f22e7['id'],_0x2f22e7);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x57c772=>{for(const _0x5cafd9 of this['editor']['model']['document']['getRootNames']())_0x57c772['detachRoot'](_0x5cafd9);for(const _0x333867 of Object['keys'](_0x20f49c['model'])){const _0x22a520=_0x57c772['addRoot'](_0x333867);for(const _0x37562f of Object['keys'](_0x20f49c['attributes'][_0x333867]))_0x57c772['setAttribute'](_0x37562f,_0x20f49c['attributes'][_0x333867][_0x37562f],_0x22a520);_0x57c772['insert'](_0x20f49c['model'][_0x333867],_0x22a520,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x20f49c['changes'])),this['isReady']=!0x0;})['catch'](_0x21dc41=>{console['error'](_0x21dc41),this['_cleanUp'](),_0x445c8b&&(this['diff']=_0x445c8b),this['isReady']=!0x0;});}['addRevisionData'](_0x30babf,_0x1f609c){const _0x2e137b=this['repository']['createRevision'](_0x30babf);return _0x2e137b['on']('_update',(_0x38de35,_0x13a2a3,_0x2fd2a2)=>_0x1f609c(_0x13a2a3,_0x2fd2a2,_0x2e137b)),this['repository']['addRevision'](_0x2e137b),_0x2e137b;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3cbf7f=>{for(const _0x1c47a2 of this['editor']['model']['document']['getRootNames']())_0x3cbf7f['detachRoot'](_0x1c47a2);});}['_sortAndFilterDiffChanges'](_0x276a34){const _0x3a793d=[],_0x1cef31=new Map();for(const _0x557683 of this['editor']['model']['document']['getRootNames']()){const _0x2d3cda=this['editor']['editing']['view']['getDomRoot'](_0x557683);if(!_0x2d3cda)continue;const _0x43dcef=_0x2d3cda['getClientRects']()['item'](0x0);_0x43dcef&&(_0x3a793d['push'](_0x557683),_0x1cef31['set'](_0x557683,_0x43dcef));}return _0x3a793d['sort']((_0x31c0fa,_0x137c97)=>{const _0x2cc4bd=_0x1cef31['get'](_0x31c0fa),_0x2453c5=_0x1cef31['get'](_0x137c97);return _0x2cc4bd['y']-_0x2453c5['y']||_0x2cc4bd['x']-_0x2453c5['x'];}),(_0x276a34=_0x276a34['filter'](_0x20b420=>_0x3a793d['includes'](_0x20b420['rootName'])))['sort']((_0x4bbd45,_0x41d2ed)=>_0x3a793d['indexOf'](_0x4bbd45['rootName'])-_0x3a793d['indexOf'](_0x41d2ed['rootName'])),_0x276a34;}['_makeTape'](_0x35a6b3){const _0x1edec1=Array['from'](_0x35a6b3['markers'])['filter'](([_0xc91d38,_0x277291])=>_0xc91d38['startsWith']('revision:')&&!_0x277291['isCollapsed']),_0x598a1b=Array['from'](this['editor']['model']['createRangeIn'](_0x35a6b3)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1edec1['length'])for(const _0xa3c5db of _0x598a1b){const [_0x4a1ee3,_0x2d8655]=_0x1edec1[0x0],[,_0x575368,_0x1a08be]=_0x4a1ee3['split'](':');if(_0x2d8655['end']['isEqual'](_0xa3c5db['nextPosition'])&&_0x1edec1['shift'](),(_0xa3c5db['previousPosition']['isEqual'](_0x2d8655['start'])||_0xa3c5db['previousPosition']['isAfter'](_0x2d8655['start']))&&('insertion'==_0x575368?_0xa3c5db['isAdded']={'userId':_0x1a08be}:'deletion'==_0x575368&&(_0xa3c5db['isRemoved']={'userId':_0x1a08be})),0x0==_0x1edec1['length'])break;}return _0x598a1b;}['_refreshStartEndIndex'](_0x4b5494){const _0x37f934=new Map();for(let _0x473848=0x0;_0x473848<_0x4b5494['length'];_0x473848++)'text'===_0x4b5494[_0x473848]['type']?(_0x4b5494[_0x473848]['item']['startIndex']=_0x473848,_0x4b5494[_0x473848]['item']['endIndex']=_0x473848):('elementStart'===_0x4b5494[_0x473848]['type']?_0x4b5494[_0x473848]['item']['startIndex']=_0x473848:'elementEnd'===_0x4b5494[_0x473848]['type']&&(_0x4b5494[_0x473848]['item']['endIndex']=_0x473848),_0x37f934['set'](_0x4b5494[_0x473848]['id'],_0x473848));for(const _0x55ce90 of _0x37f934['values']())'elementStart'===_0x4b5494[_0x55ce90]['type']?_0x4b5494[_0x55ce90]['item']['endIndex']=_0x37f934['get'](_0x4b5494[_0x55ce90]['pairId']):'elementEnd'===_0x4b5494[_0x55ce90]['type']&&(_0x4b5494[_0x55ce90]['item']['startIndex']=_0x37f934['get'](_0x4b5494[_0x55ce90]['pairId']));}['_processTape'](_0x127636){for(let _0x229c37=0x0;_0x229c37<_0x127636['length'];_0x229c37++){if('elementStart'===_0x127636[_0x229c37]['type'])_0x127636[_0x229c37]['item']['startIndex']=_0x229c37;else{if('elementEnd'===_0x127636[_0x229c37]['type']){_0x127636[_0x229c37]['item']['endIndex']=_0x229c37;const _0x117798=_0x127636[_0x229c37]['item']['startIndex'];_0x127636[_0x117798]['pairId']=_0x127636[_0x229c37]['id'],_0x127636[_0x229c37]['pairId']=_0x127636[_0x117798]['id'];}else _0x127636[_0x229c37]['item']['startIndex']=_0x229c37,_0x127636[_0x229c37]['item']['endIndex']=_0x229c37,_0x127636[_0x229c37]['pairId']=null;}_0x127636[_0x229c37]['markersStart']||(_0x127636[_0x229c37]['markersStart']=[],_0x127636[_0x229c37]['markersEnd']=[]);}}['_markInsertions'](_0x17998b,_0x408d52){const _0x36c553=_0x17998b['filter'](_0x5b1374=>!_0x5b1374['isAdded']);for(let _0x11c95e=0x0;_0x11c95e<_0x408d52['length'];_0x11c95e++)_0x408d52[_0x11c95e]['isAdded']&&(_0x36c553[_0x11c95e]['isAdded']=_0x408d52[_0x11c95e]['isAdded']);}['_getDiff'](_0x16c1a0,_0x76e3d3=null){const _0x528344=this['repository']['getRevision'](_0x16c1a0),_0x4654d3=_0x76e3d3?this['repository']['getRevision'](_0x76e3d3):null,_0x4827f1=this['_getRevisionsRange'](_0x528344,_0x4654d3),_0x46614d=_0x4827f1[_0x4827f1['length']-0x1],_0x2f4a13=new Map(),_0xd8326d={'model':{},'attributes':{},'changes':[]},_0x506f58=new Set(),_0x70798f=new Map();for(let _0x4f4449=_0x4827f1['length']-0x1;_0x4f4449>=0x0;_0x4f4449--){const _0x43e368=_0x4827f1[_0x4f4449];for(const _0x3415f3 of Object['keys'](_0x43e368['diffData']))if(_0x43e368['diffData'][_0x3415f3]['attachChange']){const _0xcf37ed=_0x43e368['diffData'][_0x3415f3]['attachChange'];_0xcf37ed['isAttached']?(_0x506f58['add'](_0x3415f3),_0x70798f['has'](_0x3415f3)&&_0x70798f['get'](_0x3415f3)['userId']==_0xcf37ed['userId']?_0x70798f['delete'](_0x3415f3):_0x70798f['set'](_0x3415f3,_0xcf37ed)):_0x70798f['has'](_0x3415f3)?(_0x506f58['delete'](_0x3415f3),_0x70798f['delete'](_0x3415f3)):(_0x506f58['add'](_0x3415f3),_0x70798f['set'](_0x3415f3,_0xcf37ed));}else _0x506f58['add'](_0x3415f3);}for(const _0x26192e of _0x506f58){const _0x3c6a47=_0x70798f['has'](_0x26192e)&&!_0x70798f['get'](_0x26192e)['isAttached'];let _0x36ad22=_0x3c6a47?_0x4827f1['length']-0x1:0x0;const _0x1f375d=_0x3c6a47?-0x1:0x1;for(;_0x4827f1[_0x36ad22];){const _0x4b8c48=_0x4827f1[_0x36ad22];if(_0x4b8c48['diffData'][_0x26192e]){const _0x386854=_0x3c6a47?_0x4b8c48['diffData'][_0x26192e]['attributesBefore']:_0x4b8c48['diffData'][_0x26192e]['attributesAfter'];_0xd8326d['attributes'][_0x26192e]=_0x386854?_0x3a4dea(_0x386854):{};break;}_0x36ad22+=_0x1f375d;}}for(const _0x37376b of _0x4827f1){_0x37376b['model']={};for(const _0x13953b of _0x37376b['authors'])_0x2f4a13['set'](_0x13953b['id'],_0x13953b);for(const _0x4bb205 of _0x506f58){const _0xa2b130=_0x37376b['diffData'][_0x4bb205]?_0x37376b['diffData'][_0x4bb205]['insertions']:'[]',_0xf9ac3a=_0x37376b['diffData'][_0x4bb205]?_0x37376b['diffData'][_0x4bb205]['deletions']:'[]';_0x37376b['model'][_0x4bb205]={'insertions':this['_utils']['_makeModelFromViewString'](_0xa2b130),'deletions':this['_utils']['_makeModelFromViewString'](_0xf9ac3a)};}}for(const _0x3423fb of _0x506f58){let _0x864f74=null,_0x28c06c=0x0;const _0x185bd3=new Map(Array['from'](_0x528344['model'][_0x3423fb]['insertions']['markers'])['filter'](([_0x3726fe])=>!_0x3726fe['startsWith']('revision:')));let _0x274158=0x0;for(const _0x49941f of _0x4827f1){const _0x17573b=this['_makeTape'](_0x49941f['model'][_0x3423fb]['insertions']);_0x49941f==_0x528344?(_0x864f74=_0x17573b,_0x28c06c=_0x864f74['length'],_0x864f74['forEach'](_0x1f7e4b=>{_0x1f7e4b['id']=_0x274158++;}),this['_processTape'](_0x864f74)):this['_markInsertions'](_0x864f74,_0x17573b);const _0x36b258=_0x864f74['filter'](_0x4114b3=>!_0x4114b3['isAdded'])['map'](_0x461e14=>_0x461e14['id']);let _0x4cfeb5=0x0;const _0xad47e3=this['_makeTape'](_0x49941f['model'][_0x3423fb]['deletions']);_0xad47e3['forEach'](_0x4be907=>{_0x4be907['isRemoved']?_0x4be907['id']=_0x28c06c++:_0x4be907['id']=_0x36b258[_0x4cfeb5++];}),this['_processTape'](_0xad47e3),this['_setDistance'](_0x864f74,'isAdded'),this['_setDistance'](_0xad47e3,'isRemoved'),_0x49941f==_0x528344&&this['_markMarkers'](_0x864f74,_0x185bd3),_0x864f74=this['_joinTapes'](_0x864f74,_0xad47e3),this['_refreshStartEndIndex'](_0x864f74),this['_setDistance'](_0x864f74,'isRemoved');}_0x864f74=_0x864f74['filter'](_0x471951=>!(_0x471951['isAdded']&&_0x471951['isRemoved']));const _0x525ec8=new Map(_0x46614d['model'][_0x3423fb]['deletions']['markers']),_0x9b502a=new Set(_0x185bd3['keys']());for(const _0x5d46d9 of _0x525ec8['keys']())_0x9b502a['delete'](_0x5d46d9);this['_markSuggestions'](_0x864f74,_0x9b502a),this['_fixObsoleteTags'](_0x864f74),_0x864f74=this['_removeMissingPairs'](_0x864f74),_0x864f74=this['_markMismatchedRemovedTags'](_0x864f74),_0x864f74=this['_removeUnsupportedChanges'](_0x864f74);const {root:_0x3c93e3,changes:_0x292bf2}=this['_makeModelFromTape'](_0x864f74,_0x2f4a13,_0x3423fb);_0xd8326d['model'][_0x3423fb]=_0x3c93e3;const _0x1f41ac=_0x70798f['get'](_0x3423fb);if(_0x1f41ac){const _0x3769bc=_0x2f4a13['get'](_0x1f41ac['userId']),_0x293054=new G({'author':_0x3769bc,'type':_0x1f41ac['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3423fb});_0x292bf2['unshift'](_0x293054),_0xd8326d['attributes'][_0x3423fb]['revisionHistoryAttachChange']=_0x293054['id'];}_0xd8326d['changes']=_0xd8326d['changes']['concat'](_0x292bf2);}return _0xd8326d;}['_markMarkers'](_0x22cba3,_0x32dea6){for(let _0x22d586=0x0;_0x22d586<_0x22cba3['length'];_0x22d586++)for(const [_0x4928aa,_0x156676]of _0x32dea6)!_0x156676['isCollapsed']&&_0x156676['start']['isEqual'](_0x22cba3[_0x22d586]['previousPosition'])&&_0x22cba3[_0x22d586]['markersStart']['push'](_0x4928aa),_0x156676['end']['isEqual'](_0x22cba3[_0x22d586]['nextPosition'])&&_0x22cba3[_0x22d586]['markersEnd']['push'](_0x4928aa);}['_joinTapes'](_0x35d423,_0x54c69a){let _0x5ba2f9=[],_0x3f4fff=0x0,_0x373172=0x0;for(;_0x3f4fff<_0x35d423['length']||_0x373172<_0x54c69a['length'];){const _0x119798=_0x35d423[_0x3f4fff]||{},_0x1f85d0=_0x54c69a[_0x373172]||{};if(_0x119798['id']==_0x1f85d0['id'])_0x3f4fff++,_0x373172++,_0x5ba2f9['push'](_0x119798);else{if(_0x1f85d0['isRemoved']&&_0x119798['isAdded']){const {commonTape:_0x2e1407,iEnd:_0x2c0e7e,jEnd:_0x130434}=this['_threeWayMerge'](_0x35d423,_0x3f4fff,_0x54c69a,_0x373172);_0x5ba2f9=_0x5ba2f9['concat'](_0x2e1407),_0x3f4fff=_0x2c0e7e,_0x373172=_0x130434;}else _0x1f85d0['isRemoved']?(_0x373172++,_0x5ba2f9['push'](_0x1f85d0)):(_0x3f4fff++,_0x5ba2f9['push'](_0x119798));}}return _0x5ba2f9;}['_markSuggestions'](_0x2a8300,_0x5a7fe8){const _0x59e64b=[];for(let _0x3ddffd=0x0;_0x3ddffd<_0x2a8300['length'];_0x3ddffd++){for(let _0x210bef=0x0;_0x210bef<_0x2a8300[_0x3ddffd]['markersStart']['length'];_0x210bef++){const _0x1529e1=_0x2a8300[_0x3ddffd]['markersStart'][_0x210bef];if(!_0x5a7fe8['has'](_0x1529e1))continue;const {group:_0x1ef300,type:_0x1c9fd9,authorId:_0x2628e6}=_0xef23fb(_0x1529e1);'revision-suggestion'!=_0x1ef300||'insertion'!=_0x1c9fd9&&'deletion'!=_0x1c9fd9||(_0x59e64b['unshift']({'type':_0x1c9fd9,'name':_0x1529e1,'userId':_0x2628e6}),_0x2a8300[_0x3ddffd]['markersStart']['splice'](_0x210bef,0x1),_0x210bef--);}_0x1ae9d6(_0x2a8300[_0x3ddffd]);for(let _0x2690f7=0x0;_0x2690f7<_0x2a8300[_0x3ddffd]['markersEnd']['length'];_0x2690f7++){const _0x316a7c=_0x2a8300[_0x3ddffd]['markersEnd'][_0x2690f7];if(!_0x5a7fe8['has'](_0x316a7c))continue;const {group:_0x1b39d0,type:_0x356eb5}=_0xef23fb(_0x316a7c);if('revision-suggestion'!=_0x1b39d0||'insertion'!=_0x356eb5&&'deletion'!=_0x356eb5)continue;_0x2a8300[_0x3ddffd]['markersEnd']['splice'](_0x2690f7,0x1),_0x2690f7--;const _0x5ccabc=_0x59e64b['findIndex'](_0x11261e=>_0x11261e['name']==_0x316a7c);_0x5ccabc>-0x1&&_0x59e64b['splice'](_0x5ccabc,0x1);}}function _0xef23fb(_0x1e5b1f){const _0x4c7694=_0x1e5b1f['split'](':');return{'group':_0x4c7694[0x0],'type':_0x4c7694[0x1],'subType':_0x4c7694['length']>=0x5?_0x4c7694[0x2]:null,'id':_0x4c7694['length']<0x5?_0x4c7694[0x2]:_0x4c7694[0x3],'authorId':_0x4c7694['length']<0x5?_0x4c7694[0x3]:_0x4c7694[0x4],'markerCount':0x6==_0x4c7694['length']?_0x4c7694[0x5]:null};}function _0x1ae9d6(_0x31276f){for(let _0x2a9b86=0x0;_0x2a9b86<_0x59e64b['length'];_0x2a9b86++){if(_0x31276f['isAdded']&&'insertion'==_0x59e64b[_0x2a9b86]['type']&&_0x31276f['isAdded']['userId']==_0x59e64b[_0x2a9b86]['userId'])return _0x31276f['isAddSuggestion']=_0x59e64b[_0x2a9b86],void delete _0x31276f['isAdded'];if(!_0x31276f['isAdded']&&!_0x31276f['isRemoved']&&'deletion'==_0x59e64b[_0x2a9b86]['type'])return void(_0x31276f['isRemoveSuggestion']=_0x59e64b[_0x2a9b86]);}}}['_setDistance'](_0x4444a1,_0x105431){let _0x27a94b=0x0,_0x5c04a7=!0x1;const _0x5cdef8=new Map();for(const _0x49a972 of _0x4444a1)_0x49a972[_0x105431]?_0x5c04a7&&(_0x27a94b++,_0x5c04a7=!0x1):(_0x27a94b++,_0x5c04a7=!0x0),_0x5cdef8['set'](_0x49a972['id'],_0x27a94b);for(let _0x2daccc=0x0;_0x2daccc<_0x4444a1['length'];_0x2daccc++){if('isRemoved'==_0x105431&&_0x4444a1[_0x2daccc]['isAdded']||'isAdded'==_0x105431&&_0x4444a1[_0x2daccc]['isRemoved'])continue;if('text'==_0x4444a1[_0x2daccc]['type']){_0x4444a1[_0x2daccc]['distance']=0x0;continue;}const _0xcd1e61=_0x5cdef8['get'](_0x4444a1[_0x2daccc]['pairId']),_0x324f58=_0x5cdef8['get'](_0x4444a1[_0x2daccc]['id']);_0x4444a1[_0x2daccc]['distance']=_0xcd1e61-_0x324f58;}}['_getRevisionsRange'](_0x4bb7e9,_0x4cf2ef,_0x23203a=!0x1){const _0x1f6342=[];let _0x21e8b5=this['repository']['getIndex'](_0x4bb7e9),_0x47405e=this['repository']['getIndex'](_0x4cf2ef);for(-0x1==_0x47405e&&(_0x47405e=this['repository']['_revisions']['length'],_0x23203a=!0x1);_0x21e8b5<_0x47405e;)_0x1f6342['push'](this['repository']['getRevision'](_0x21e8b5)),_0x21e8b5++;return _0x23203a&&_0x1f6342['push'](this['repository']['getRevision'](_0x21e8b5)),_0x1f6342;}['_threeWayMerge'](_0xb824a1,_0x4e2d6c,_0x518618,_0x43de80){const _0x65451b=this['editor']['model']['schema'];let _0x19a35f=_0x4e2d6c;for(;_0xb824a1[_0x19a35f]&&_0xb824a1[_0x19a35f]['isAdded'];)_0x19a35f++;let _0x4681fc=_0x43de80;for(;_0x518618[_0x4681fc]&&_0x518618[_0x4681fc]['isRemoved'];)_0x4681fc++;_0x3ee74c(_0xb824a1,_0x4e2d6c,_0x19a35f),_0x3ee74c(_0x518618,_0x43de80,_0x4681fc);const _0x5466d9=_0x518618['slice'](_0x43de80,_0x4681fc)['concat'](_0xb824a1['slice'](_0x4e2d6c,_0x19a35f));return _0x5466d9['sort']((_0x6e0676,_0x30a769)=>_0x6e0676['side']!=_0x30a769['side']?_0x6e0676['side']-_0x30a769['side']:_0x6e0676['level']!=_0x30a769['level']?_0x6e0676['level']-_0x30a769['level']:_0x6e0676['distance']!=_0x30a769['distance']?_0x30a769['distance']-_0x6e0676['distance']:!!_0x6e0676['isAdded']!=!!_0x30a769['isAdded']?-0x1==_0x6e0676['side']||0x0==_0x6e0676['side']?_0x6e0676['isAdded']?-0x1:0x1:_0x6e0676['isAdded']?0x1:-0x1:_0x6e0676['index']-_0x30a769['index']),{'commonTape':_0x5466d9,'iEnd':_0x19a35f,'jEnd':_0x4681fc};function _0x3ee74c(_0x5df729,_0x6b20c6,_0x3615fa){let _0x379bea=-0x1,_0x1d4bb5=Number['POSITIVE_INFINITY'],_0x244420=!0x0;for(let _0x1b36b7=_0x6b20c6;_0x1b36b7<_0x3615fa;_0x1b36b7++)if(_0x65451b['isInline'](_0x5df729[_0x1b36b7]['item'])||(_0x244420=!0x1),_0x5df729[_0x1b36b7]['item']['startIndex']<_0x6b20c6&&(_0x379bea=_0x1b36b7),_0x5df729[_0x1b36b7]['item']['endIndex']>=_0x3615fa){_0x1d4bb5=_0x1b36b7;break;}_0x244420&&(_0x379bea=_0x3615fa-0x1);for(let _0x56507c=_0x6b20c6;_0x56507c<_0x3615fa;_0x56507c++)_0x5df729[_0x56507c]['side']=_0x56507c<=_0x379bea?-0x1:_0x56507c<_0x1d4bb5?0x0:0x1,_0x5df729[_0x56507c]['index']=_0x56507c;let _0x15a43e=0x0;for(let _0x3e179f=_0x6b20c6;_0x3e179f<=_0x379bea;_0x3e179f++)0x0==_0x5df729[_0x3e179f]['distance']?_0x5df729[_0x3e179f]['level']=_0x15a43e:(_0x15a43e++,_0x5df729[_0x3e179f]['level']=_0x15a43e,_0x15a43e++);for(let _0x46c0bd=_0x6b20c6;_0x46c0bd<_0x3615fa;_0x46c0bd++)0x0==_0x5df729[_0x46c0bd]['side']&&(_0x5df729[_0x46c0bd]['level']=_0x15a43e);_0x15a43e=0x0;for(let _0x413804=_0x3615fa-0x1;_0x413804>=_0x1d4bb5;_0x413804--)0x0==_0x5df729[_0x413804]['distance']?_0x5df729[_0x413804]['level']=_0x15a43e:(_0x15a43e--,_0x5df729[_0x413804]['level']=_0x15a43e,_0x15a43e--);}}['_fixObsoleteTags'](_0x111a52){const _0x5d826a=new Map(),_0x8e3b0f=this['editor']['model']['schema'];for(let _0x3f9415=0x1;_0x3f9415<_0x111a52['length'];_0x3f9415++){let _0x54e138,_0x20de69,_0x22ec64;const _0x36e1d4=_0x111a52[_0x3f9415],_0x35bd99=_0x111a52[_0x3f9415-0x1];if('text'==_0x36e1d4['type'])continue;if(_0x36e1d4['type']!=_0x35bd99['type'])continue;if(!_0x8e3b0f['isBlock'](_0x35bd99['item'])||_0x8e3b0f['isLimit'](_0x35bd99['item']))continue;if(!_0x8e3b0f['isBlock'](_0x36e1d4['item'])||_0x8e3b0f['isLimit'](_0x36e1d4['item']))continue;if((_0x111a52[_0x3f9415]['isAdded']||_0x111a52[_0x3f9415]['isAddSuggestion'])&&_0x111a52[_0x3f9415-0x1]['isRemoved'])_0x54e138=_0x111a52[_0x3f9415],_0x20de69=_0x111a52[_0x3f9415-0x1],_0x22ec64=_0x3f9415-0x1;else{if(!_0x111a52[_0x3f9415]['isRemoved']||!_0x111a52[_0x3f9415-0x1]['isAdded']&&!_0x111a52[_0x3f9415-0x1]['isAddSuggestion'])continue;_0x54e138=_0x111a52[_0x3f9415-0x1],_0x20de69=_0x111a52[_0x3f9415],_0x22ec64=_0x3f9415;}const _0x1d1aba=_0x54e138['level']==_0x20de69['level'],_0x215091=Math['abs'](_0x54e138['level'])<Math['abs'](_0x20de69['level'])&&0x0==_0x20de69['distance'];(_0x1d1aba||_0x215091)&&(_0x5d826a['set'](_0x20de69['id'],_0x54e138['id']),_0x111a52['splice'](_0x22ec64,0x1),_0x3f9415--,_0x54e138['isAdded']=!0x1);}for(let _0xcdd4d8=0x0;_0xcdd4d8<_0x111a52['length'];_0xcdd4d8++)_0x5d826a['has'](_0x111a52[_0xcdd4d8]['pairId'])&&(_0x111a52[_0xcdd4d8]['pairId']=_0x5d826a['get'](_0x111a52[_0xcdd4d8]['pairId']));}['_removeMissingPairs'](_0xc4db65){const _0x302222=new Set(_0xc4db65['map'](_0x44f27e=>_0x44f27e['id']));for(let _0x289c05=0x0;_0x289c05<_0xc4db65['length'];_0x289c05++)_0x302222['has'](_0xc4db65[_0x289c05]['pairId'])||0x0==_0xc4db65[_0x289c05]['distance']||(_0xc4db65[_0x289c05]['isIncorrect']=!0x0);return _0xc4db65['filter'](_0x36d951=>!_0x36d951['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2078d0){const _0x4e9a95=new Set();for(let _0x3c3726=0x0;_0x3c3726<_0x2078d0['length'];_0x3c3726++){if(_0x4e9a95['has'](_0x2078d0[_0x3c3726]['id'])&&_0x2078d0[_0x3c3726]['isRemoved']&&(_0x2078d0[_0x3c3726]['isIncorrect']=!0x0),_0x2078d0[_0x3c3726]['isIncorrect'])continue;if(0x0==_0x2078d0[_0x3c3726]['distance'])continue;if('elementStart'!=_0x2078d0[_0x3c3726]['type'])continue;if(null==_0x2078d0[_0x3c3726]['pairId'])continue;let _0x3ac07e=_0x3c3726+0x1,_0xbd6904=0x0;for(;_0x2078d0[_0x3ac07e]['id']!=_0x2078d0[_0x3c3726]['pairId'];)'elementStart'==_0x2078d0[_0x3ac07e]['type']?_0xbd6904++:'elementEnd'==_0x2078d0[_0x3ac07e]['type']&&_0xbd6904--,_0x3ac07e++;if(0x0!=_0xbd6904){if(_0x2078d0[_0x3c3726]['isRemoved'])_0x2078d0[_0x3c3726]['isIncorrect']=!0x0;else{for(;_0x3ac07e!=_0x3c3726;)_0x2078d0[_0x3ac07e]['isRemoved']&&0x0!=_0x2078d0[_0x3ac07e]['distance']&&(_0x2078d0[_0x3ac07e]['isIncorrect']=!0x0,_0x4e9a95['add'](_0x2078d0[_0x3ac07e]['pairId'])),_0x3ac07e--;}}}return _0x2078d0['filter'](_0x262893=>!_0x262893['isIncorrect']);}['_removeUnsupportedChanges'](_0x59435f){const _0x4ecf5c=this['editor']['model']['schema'];for(let _0x5b6ab8=0x0;_0x5b6ab8<_0x59435f['length'];_0x5b6ab8++){if(!(_0x59435f[_0x5b6ab8]['isAdded']||_0x59435f[_0x5b6ab8]['isAddSuggestion']||_0x59435f[_0x5b6ab8]['isRemoved']||_0x59435f[_0x5b6ab8]['isRemoveSuggestion']))continue;if(0x0==_0x59435f[_0x5b6ab8]['distance'])continue;const _0x2e5e14=_0x59435f[_0x5b6ab8]['item'];_0x4ecf5c['isBlock'](_0x2e5e14)||_0x4ecf5c['isLimit'](_0x2e5e14)||(_0x59435f[_0x5b6ab8]['isAdded']&&delete _0x59435f[_0x5b6ab8]['isAdded'],_0x59435f[_0x5b6ab8]['isAddSuggestion']&&delete _0x59435f[_0x5b6ab8]['isAddSuggestion'],_0x59435f[_0x5b6ab8]['isRemoveSuggestion']&&delete _0x59435f[_0x5b6ab8]['isRemoveSuggestion'],_0x59435f[_0x5b6ab8]['isRemoved']&&(_0x59435f[_0x5b6ab8]['isIncorrect']=!0x0));}return _0x59435f['filter'](_0x120f6f=>!_0x120f6f['isIncorrect']);}['_makeModelFromTape'](_0x5367d7,_0x51629b,_0x3a5074){const _0x4aadca=new _0x4a21a9(),_0x51ec83=[],_0x5193be=new Map(),_0x2f090c=this['editor']['model'],_0x1695ca=_0x2f090c['schema'],_0x1e6912=[_0x4aadca],_0x2443ed={},_0x4c99d8={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x20e05f=null;const _0x3eb9b1=[0x0];for(let _0x3e81f6=0x0;_0x3e81f6<_0x5367d7['length'];_0x3e81f6++)if('elementStart'===_0x5367d7[_0x3e81f6]['type']){_0x5367d7[_0x3e81f6]['previousPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1);const _0x28bec4=new _0x3d9a08(_0x5367d7[_0x3e81f6]['item']['name'],_0x5367d7[_0x3e81f6]['item']['getAttributes']());_0x1e6912[0x0]['_appendChild'](_0x28bec4),_0x3eb9b1['push'](0x0),_0x1e6912['unshift'](_0x28bec4),_0x5367d7[_0x3e81f6]['nextPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1);}else'elementEnd'===_0x5367d7[_0x3e81f6]['type']?(_0x1e6912['shift'](),_0x5367d7[_0x3e81f6]['previousPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1),_0x3eb9b1['pop'](),_0x3eb9b1[_0x3eb9b1['length']-0x1]++,_0x5367d7[_0x3e81f6]['nextPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1)):(_0x5367d7[_0x3e81f6]['previousPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1),_0x20e05f?_0x20e05f['_data']+=_0x5367d7[_0x3e81f6]['item']['data']:_0x20e05f=new _0x2994a(_0x5367d7[_0x3e81f6]['item']['data'],_0x5367d7[_0x3e81f6]['item']['getAttributes']()),_0x5367d7[_0x3e81f6+0x1]&&'text'===_0x5367d7[_0x3e81f6+0x1]['type']&&_0x5ef834(_0x20e05f,_0x5367d7[_0x3e81f6+0x1]['item'])||(_0x1e6912[0x0]['_appendChild'](_0x20e05f),_0x20e05f=null),_0x3eb9b1[_0x3eb9b1['length']-0x1]+=_0x5367d7[_0x3e81f6]['item']['offsetSize'],_0x5367d7[_0x3e81f6]['nextPosition']=_0x2f090c['createPositionFromPath'](_0x4aadca,_0x3eb9b1));for(let _0x1f9437=0x0;_0x1f9437<_0x5367d7['length'];_0x1f9437++){const _0x2cd524=_0x5367d7[_0x1f9437]['previousPosition'],_0x2fc0d2=_0x5367d7[_0x1f9437]['nextPosition'];for(const _0x3ad6b1 of _0x5367d7[_0x1f9437]['markersStart'])_0x5193be['set'](_0x3ad6b1,{'start':_0x2cd524,'end':null});_0x48bb0a('isRemoveSuggestion',_0x1f9437,_0x2cd524,_0x2fc0d2),_0x48bb0a('isAddSuggestion',_0x1f9437,_0x2cd524,_0x2fc0d2),_0x48bb0a('isRemoved',_0x1f9437,_0x2cd524,_0x2fc0d2),_0x48bb0a('isAdded',_0x1f9437,_0x2cd524,_0x2fc0d2);for(const _0x3b6f03 of _0x5367d7[_0x1f9437]['markersEnd']){const _0x56dd15=_0x5193be['get'](_0x3b6f03);_0x56dd15?_0x56dd15['end']=_0x2fc0d2:_0x5193be['set'](_0x3b6f03,{'start':_0x2fc0d2,'end':_0x2fc0d2});}}for(const [_0xa333ac,_0x2309ee]of _0x5193be){const _0x234bfc=this['editor']['model']['createRange'](_0x2309ee['start'],_0x2309ee['end']);_0x4aadca['markers']['set'](_0xa333ac,_0x234bfc);}return _0x51ec83['sort']((_0xdb0404,_0x3bd5f5)=>{const _0x1bd2f3=_0x4aadca['markers']['get']('revision:'+_0xdb0404['id']),_0x1948ea=_0x4aadca['markers']['get']('revision:'+_0x3bd5f5['id']);return _0x1bd2f3['start']['isBefore'](_0x1948ea['start'])?-0x1:_0x1bd2f3['start']['isAfter'](_0x1948ea['start'])?0x1:_0x1bd2f3['end']['isBefore'](_0x1948ea['end'])?-0x1:_0x1bd2f3['end']['isAfter'](_0x1948ea['end'])?0x1:'add'===_0xdb0404['type']?-0x1:0x1;}),{'root':_0x4aadca,'changes':_0x51ec83};function _0x48bb0a(_0x36b854,_0x474e9c,_0x5bf705,_0x449413){const _0x12e7a4=!!_0x5367d7[_0x474e9c][_0x36b854],_0x9f1af1=_0x12e7a4?_0x5367d7[_0x474e9c][_0x36b854]['userId']:null,_0xda03ad=_0x474e9c===_0x5367d7['length']-0x1,_0x5970e5=_0x4c99d8[_0x36b854][0x0],_0xcb627e=_0x1695ca['isObject'](_0x5367d7[_0x474e9c]['item']);!_0x2443ed[_0x36b854]&&_0x12e7a4?_0x2443ed[_0x36b854]={'start':_0x5bf705,'tapeItem':_0x5367d7[_0x474e9c],'userId':_0x9f1af1,'type':_0x36b854}:_0x2443ed[_0x36b854]&&!_0x12e7a4?(_0x2443ed[_0x36b854]['end']=_0x5bf705,_0x160e06(_0x2443ed[_0x36b854]),_0x2443ed[_0x36b854]=null):_0x2443ed[_0x36b854]&&_0x12e7a4&&_0x2443ed[_0x36b854]['userId']!==_0x9f1af1&&(_0x2443ed[_0x36b854]['end']=_0x5bf705,_0x5970e5&&_0x5970e5['userId']===_0x2443ed[_0x36b854]['userId']||_0x160e06(_0x2443ed[_0x36b854]),_0x2443ed[_0x36b854]={'start':_0x5bf705,'tapeItem':_0x5367d7[_0x474e9c],'userId':_0x9f1af1,'type':_0x36b854}),_0x2443ed[_0x36b854]&&_0xcb627e&&('elementStart'!==_0x5367d7[_0x474e9c]['type']||_0x5970e5&&_0x5970e5['userId']===_0x9f1af1||_0x4c99d8[_0x36b854]['unshift']({'userId':_0x9f1af1,'object':_0x5367d7[_0x474e9c]['item'],'change':_0x2443ed[_0x36b854]}),'elementEnd'===_0x5367d7[_0x474e9c]['type']&&_0x5970e5&&_0x5970e5['object']===_0x5367d7[_0x474e9c]['item']&&(_0x4c99d8[_0x36b854]['shift'](),_0x2443ed[_0x36b854]=_0x5970e5['change'])),_0x2443ed[_0x36b854]&&_0xda03ad&&(_0x2443ed[_0x36b854]['end']=_0x449413,_0x160e06(_0x2443ed[_0x36b854]),_0x2443ed[_0x36b854]=null);}function _0x160e06({start:_0x4377c3,end:_0x1aa67b,tapeItem:_0x4ec69b,userId:_0x2d5e59,type:_0x53a41c}){const _0x582d80=_0x4ec69b['item'],_0x4330fd=_0x2f090c['schema']['isBlock'](_0x582d80)&&!_0x2f090c['schema']['isLimit'](_0x582d80),_0x1b00fc=_0x4377c3['nodeAfter']==_0x1aa67b['parent']&&_0x1aa67b['isAtStart'];if(_0x4330fd&&_0x1b00fc)return;const _0x2a25ef=_0x2f090c['createRange'](_0x4377c3,_0x1aa67b),_0x22aa6e=_0x51629b['get'](_0x2d5e59),_0x2b970a=new G({'author':_0x22aa6e,'type':'isAdded'==_0x53a41c||'isAddSuggestion'==_0x53a41c?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x53a41c||'isRemoveSuggestion'==_0x53a41c},'createdAt':new Date(),'rootName':_0x3a5074});_0x51ec83['push'](_0x2b970a),_0x4aadca['markers']['set']('revision:'+_0x2b970a['id'],_0x2a25ef);}function _0x5ef834(_0x324c52,_0x130043){const _0x4031b6=_0x324c52['getAttributes'](),_0x2933f4=_0x130043['getAttributes']();for(const _0x24e296 of _0x4031b6){if(_0x24e296[0x1]!==_0x130043['getAttribute'](_0x24e296[0x0]))return!0x1;_0x2933f4['next']();}return _0x2933f4['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x18f49e=>{const _0x520193=_0x18f49e['markerName']['split'](':')[0x1],_0x491603=this['_getChangeFromId'](_0x520193);if(!_0x491603)return null;const _0x478e45='add'==_0x491603['type']?'insertion':'deletion',_0xa9a179=['ck-suggestion-marker','ck-suggestion-marker-'+_0x478e45];return _0x491603['data']['isSuggestion']&&_0xa9a179['push']('ck-suggestion-marker-'+_0x478e45+'-new'),this['activeChange']==_0x491603&&_0xa9a179['push']('ck-suggestion-marker--active'),{'classes':_0xa9a179,'attributes':{'data-change-id':_0x520193}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x466d08=>{_0x466d08['on']('element:pre',(_0x4bfb49,_0x25f170,_0x59c0bc)=>{const _0x33257a=_0x25f170['viewItem']['getChild'](0x0);if(!_0x33257a||!_0x33257a['is']('element','code'))return;if(!_0x59c0bc['consumable']['consume'](_0x33257a,{'attributes':['vid_start','vid_end']}))return;const _0x25b7f7=_0x25f170['modelRange']['start']['nodeAfter'];_0x59c0bc['writer']['setAttribute']('vid_start',_0x33257a['getAttribute']('vid_start'),_0x25b7f7),_0x59c0bc['writer']['setAttribute']('vid_end',_0x33257a['getAttribute']('vid_end'),_0x25b7f7);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2ea4ce=>{_0x2ea4ce['on']('element',(_0x3af1ee,_0x586cbb,_0x2e63d2)=>{if(!_0x2e63d2['consumable']['consume'](_0x586cbb['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x586cbb['modelRange']['isCollapsed'])return;const _0x588f94=_0x586cbb['modelRange']['start']['nodeAfter'];_0x588f94['hasAttribute']('vid_start')||_0x588f94['hasAttribute']('vid')||(_0x2e63d2['writer']['setAttribute']('vid_start',_0x586cbb['viewItem']['getAttribute']('vid_start'),_0x588f94),_0x2e63d2['writer']['setAttribute']('vid_end',_0x586cbb['viewItem']['getAttribute']('vid_end'),_0x588f94));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1d79eb=>_0x1d79eb['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x2e76b4,[,_0x43dd99])=>{['vid_start','vid_end','vid']['includes'](_0x43dd99)&&(_0x2e76b4['return']=!0x0,_0x2e76b4['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x37c735=>{_0x37c735['on']('attribute:vid',(_0x25ad21,_0x5c963e,_0x2b077b)=>{if('\x20'!=_0x5c963e['item']['data']||_0x5c963e['item']['parent']['maxOffset']>0x1)return;if(!_0x2b077b['consumable']['consume'](_0x5c963e['item'],_0x25ad21['name']))return;const _0x1bca41=_0x2b077b['writer'],_0x112f9e=_0x2b077b['mapper']['toViewRange'](_0x5c963e['range']);_0x1bca41['wrap'](_0x112f9e,_0x1bca41['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x33c24d){const _0xdd30d1=_0x33c24d['plugins']['get']('RevisionViewer');return(_0x3ebe4a,_0x20e69f,_0x203cf3)=>{const _0x5b3989=_0x20e69f['markerName']['split'](':')[0x1],_0x38f19a=_0xdd30d1['_getChangeFromId'](_0x5b3989);if(!_0x38f19a)return null;const _0x8ab474='add'==_0x38f19a['type']?'split':'merge';if(!_0x203cf3['consumable']['test'](_0x20e69f['markerRange'],_0x3ebe4a['name']))return;const _0x1500eb=_0x20e69f['markerRange']['getWalker'](),_0x3f31d0=_0x20e69f['markerRange']['start'],_0x3d80ad=_0x33c24d['model']['schema'];let _0x3e349c=null,_0x3d0c9c=null,_0x25f351=!0x1,_0x3a9dbe=!0x1;for(const _0x4cd0bc of _0x1500eb){const _0xa15d8=_0x4cd0bc['item'];_0x25f351=_0x25f351||_0x3d80ad['isContent'](_0xa15d8);const _0x3f380c=_0x203cf3['mapper']['toViewElement'](_0xa15d8);if(_0x3f380c&&_0x3f380c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4cd0bc['type']&&(_0x3d80ad['isBlock'](_0xa15d8)&&!_0x3d80ad['isLimit'](_0xa15d8)&&(_0xa15d8['nextSibling']||_0x3f31d0['isAtEnd']?_0x3e349c&&_0x3e349c['parent']==_0xa15d8||(_0x3e349c=_0xa15d8,_0x54918f(_0x4cd0bc['previousPosition']),_0x3a9dbe=!0x0):_0x3d0c9c=_0x3d0c9c||_0x4cd0bc['previousPosition']));}function _0x54918f(_0x390697){const _0x2818ab=_0x203cf3['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x8ab474}),_0x1baa7f=_0x203cf3['mapper']['toViewPosition'](_0x390697);_0x38f19a['data']['isSuggestion']&&_0x203cf3['writer']['addClass']('ck-suggestion-marker-'+_0x8ab474+'-new',_0x2818ab),_0xdd30d1['activeChange']==_0x38f19a&&_0x203cf3['writer']['addClass']('ck-suggestion-marker--active',_0x2818ab),_0x203cf3['writer']['insert'](_0x1baa7f,_0x2818ab),_0x203cf3['mapper']['bindElementToMarker'](_0x2818ab,_0x20e69f['markerName']);}_0x25f351||_0x3a9dbe||!_0x3d0c9c||_0x54918f(_0x3d0c9c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5d2be0,_0x59a44e,_0x20ce18)=>{const _0x1016a1=_0x20ce18['mapper']['markerNameToElements'](_0x59a44e['markerName']);if(_0x1016a1){for(const _0x10b6c5 of _0x1016a1)(_0x10b6c5['hasClass']('ck-suggestion-marker-split')||_0x10b6c5['hasClass']('ck-suggestion-marker-merge'))&&(_0x20ce18['mapper']['unbindElementFromMarkerName'](_0x10b6c5,_0x59a44e['markerName']),_0x20ce18['writer']['remove'](_0x10b6c5));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1ee41a,_0x2fa819,_0x5b6ee5)=>{const _0x5e7566=_0x2fa819['markerName']['split'](':')[0x1],_0x104af6=this['_getChangeFromId'](_0x5e7566);if(!_0x104af6)return null;const _0x3aef18='add'==_0x104af6['type']?'split':'merge';if(_0x5b6ee5['consumable']['test'](_0x2fa819['markerRange'],_0x1ee41a['name']))for(const _0x13e23d of _0x2fa819['markerRange']['getItems']()){if(!_0x13e23d['is']('element','softBreak'))continue;const _0xecc052=_0x5b6ee5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3aef18}),_0x4ee739=_0x5b6ee5['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x13e23d));_0x104af6['data']['isSuggestion']&&_0x5b6ee5['writer']['addClass']('ck-suggestion-marker-'+_0x3aef18+'-new',_0xecc052),this['activeChange']==_0x104af6&&_0x5b6ee5['writer']['addClass']('ck-suggestion-marker--active',_0xecc052),_0x5b6ee5['writer']['insert'](_0x4ee739,_0xecc052),_0x5b6ee5['mapper']['bindElementToMarker'](_0xecc052,_0x2fa819['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x26042b=>{for(const _0x334082 of this['editor']['model']['document']['getRootNames']()){const _0x52e1fd=this['editor']['model']['document']['getRoot'](_0x334082),_0x1b5245=this['editor']['editing']['view']['document']['getRoot'](_0x334082);if(_0x1b5245){const _0x2e7883=_0x52e1fd['getAttribute']('revisionHistoryAttachChange');if(_0x26042b['removeAttribute']('data-change-id',_0x1b5245),_0x26042b['removeClass']('ck-revision-history-root-add',_0x1b5245),_0x26042b['removeClass']('ck-revision-history-root-remove',_0x1b5245),_0x26042b['removeClass']('ck-revision-history-root--active',_0x1b5245),_0x2e7883){const _0x1b7690=this['_getChangeFromId'](_0x2e7883);if(!_0x1b7690)return null;_0x26042b['setAttribute']('data-change-id',_0x2e7883,_0x1b5245),_0x26042b['addClass']('ck-revision-history-root-'+_0x1b7690['type'],_0x1b5245),this['activeChange']==_0x1b7690&&_0x26042b['addClass']('ck-revision-history-root--active',_0x1b5245);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xad2f7b=>'revision-comment:'+_0xad2f7b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5285da=>'revision-suggestion:'+_0x5285da,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1dbd40=>({'name':'suggestion:'+_0x1dbd40,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2d8463=>{const _0x33bd44=_0x2d8463['markerName']['split'](':')[0x1];return'insertion'!=_0x33bd44&&'deletion'!=_0x33bd44?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x33bd44]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x380da4,_0x1a1b59,_0x3c85e4)=>{const _0x1107d9=_0x3c85e4['mapper']['markerNameToElements'](_0x1a1b59['markerName']);if(_0x1107d9){for(const _0x3ee497 of _0x1107d9)_0x3ee497['is']('uiElement')&&(_0x3c85e4['mapper']['unbindElementFromMarkerName'](_0x3ee497,_0x1a1b59['markerName']),_0x3c85e4['writer']['remove'](_0x3ee497));}},{'priority':'high'});}['_getChangeFromId'](_0x2fa577){return this['_changeIdToChange']['get'](_0x2fa577);}['_getViewForChange'](_0xd675fd){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0xd675fd),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4e5166,_0x51af77,_0x307f1b,_0x4dde43)=>{_0x4dde43&&this['_balloon']['remove'](_0x4dde43),_0x307f1b&&(this['_balloon']['add']({'view':_0x307f1b,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1d3ee9=this['editor']['editing'],_0xe1874c=this['_getChangeFromId'](_0x307f1b['changeId']);let _0x46100a;if(_0xe1874c['data']['isOnRoot']){const _0x3e44d1=_0x1d3ee9['view']['getDomRoot'](_0xe1874c['rootName']);_0x46100a=Array['from'](_0x3e44d1['getClientRects']());}else{const _0x440805=this['editor']['model']['markers']['get']('revision:'+_0x307f1b['changeId']);_0x46100a=Array['from'](_0x1d3ee9['mapper']['markerNameToElements'](_0x440805['name']))['map'](_0x29273f=>_0x1d3ee9['view']['domConverter']['mapViewToDom'](_0x29273f))['map'](_0x559f30=>Array['from'](_0x559f30['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x46100a[0x0];return _0x46100a['find'](_0x216ad3=>_0x216ad3['top']-0x3<=this['_activeViewTarget']['y']&&_0x216ad3['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x216ad3['left']-0x3<=this['_activeViewTarget']['x']&&_0x216ad3['right']+0x3>=this['_activeViewTarget']['x'])||_0x46100a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x8556cd,_0x52bf18,_0x209dbc,_0x4c9d2e)=>{this['activeView']=_0x209dbc?this['_getViewForChange'](_0x209dbc):null,this['editor']['model']['change'](()=>{const _0x18e0d7=this['editor']['editing'];_0x4c9d2e&&(_0x4c9d2e['data']['isOnRoot']?_0x18e0d7['view']['change'](_0x81017f=>{_0x81017f['removeClass']('ck-revision-history-root--active',_0x18e0d7['view']['document']['getRoot'](_0x4c9d2e['rootName']));}):_0x18e0d7['reconvertMarker']('revision:'+_0x4c9d2e['id'])),_0x209dbc&&(_0x209dbc['data']['isOnRoot']?_0x18e0d7['view']['change'](_0x41b841=>{_0x41b841['addClass']('ck-revision-history-root--active',_0x18e0d7['view']['document']['getRoot'](_0x209dbc['rootName']));}):_0x18e0d7['reconvertMarker']('revision:'+_0x209dbc['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3f99c2,_0x1212f9)=>{if(this['activeChange'])return;const _0xbd3269=this['_findChangeIdFromDomTarget'](_0x1212f9['target']),_0x2b53c4=this['_changeIdToChange']['get'](_0xbd3269);_0x2b53c4?(this['_activeViewTarget']={'x':_0x1212f9['domEvent']['x'],'y':_0x1212f9['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2b53c4)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3e9f50,_0x19e402)=>{const _0xe821f7=this['_findChangeIdFromDomTarget'](_0x19e402['target']),_0x183910=this['_changeIdToChange']['get'](_0xe821f7);_0x183910?(this['_activeViewTarget']={'x':_0x19e402['domEvent']['x'],'y':_0x19e402['domEvent']['y']},_0x183910===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x183910):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x34c12b){do{const _0x42eb26=_0x34c12b['getAttribute']('data-change-id');if(_0x42eb26)return _0x42eb26;_0x34c12b=_0x34c12b['parent'];}while(_0x34c12b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5242ea=>{for(const _0x28c222 of this['editor']['model']['markers'])_0x5242ea['removeMarker'](_0x28c222);});}}function Q(_0x344a77,_0x580292){return(_0x363826,_0xb70248,_0x3af08f)=>{if(!_0x3af08f['consumable']['test'](_0xb70248['markerRange'],_0x363826['name']))return;const _0x4c095a=_0xb70248['markerRange']['getWalker'](),_0x22b2a4=_0xb70248['markerRange']['start'],_0x3aabce=_0x344a77['model']['schema'];let _0x3daa34=null,_0x3051f2=null,_0x2117ce=!0x1,_0x590b87=!0x1;for(const _0x4077ee of _0x4c095a){const _0x288985=_0x4077ee['item'];_0x2117ce=_0x2117ce||_0x3aabce['isContent'](_0x288985);const _0x3a0efc=_0x3af08f['mapper']['toViewElement'](_0x288985);if(_0x3a0efc&&_0x3a0efc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4077ee['type']&&(_0x3aabce['isBlock'](_0x288985)&&!_0x3aabce['isLimit'](_0x288985)&&(_0x288985['nextSibling']||_0x22b2a4['isAtEnd']?_0x3daa34&&_0x3daa34['parent']==_0x288985||(_0x3daa34=_0x288985,_0x28fad7(_0x4077ee['previousPosition']),_0x590b87=!0x0):_0x3051f2=_0x3051f2||_0x4077ee['previousPosition']));}function _0x28fad7(_0x398c12){const _0x5a8d5e=_0x3af08f['mapper']['toViewPosition'](_0x398c12),_0x384ad6=_0x3af08f['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x580292});_0x3af08f['writer']['insert'](_0x5a8d5e,_0x384ad6),_0x3af08f['mapper']['bindElementToMarker'](_0x384ad6,_0xb70248['markerName']);}_0x2117ce||_0x590b87||!_0x3051f2||_0x28fad7(_0x3051f2);};}class nt extends _0x3a00a7{constructor(_0x5d4ab2){super(_0x5d4ab2);const _0x2acd65=_0x5d4ab2['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x2acd65,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2acd65,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x2dc624=this['editor'],_0x7d4f21=_0x2dc624['plugins']['get'](u),_0x29d5d0=_0x7d4f21['isReady']?_0x7d4f21['diff']['newRevisionId']:null;_0x2dc624['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x29d5d0);}['refresh'](){const {isReady:_0x49ccfd,isEnabled:_0x444f5e,repository:_0x39ea13,diff:_0x39cf6e}=this['editor']['plugins']['get'](u),_0x2ab777=_0x39cf6e&&_0x39ea13['getLaterVisibleRevision'](_0x39cf6e['newRevisionId']);this['isEnabled']=_0x49ccfd&&_0x444f5e&&Boolean(_0x2ab777);}}class ot extends _0x3a00a7{['_step'];constructor(_0x182c97,{direction:_0x28b80c}){super(_0x182c97);const _0x550fa9=_0x182c97['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x28b80c?0x1:-0x1,this['listenTo'](_0x550fa9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x550fa9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x550fa9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2d9279=this['editor'],_0x42150c=_0x2d9279['plugins']['get'](u),{isNavigationMode:_0x25d312,currentChangeNumber:_0xe77d8b}=_0x42150c;let _0x41ac80;if(_0x42150c['activeChange']=_0x25d312?_0x42150c['diff']['changes']['get'](_0xe77d8b+this['_step']):_0x42150c['diff']['changes']['first'],_0x42150c['activeChange']['data']['isOnRoot'])_0x41ac80=_0x2d9279['editing']['view']['getDomRoot'](_0x42150c['activeChange']['rootName']);else{const _0x1e61aa=_0x2d9279['model']['markers']['get']('revision:'+_0x42150c['activeChange']['id']);_0x41ac80=_0x4a511e(_0x2d9279['editing'],_0x1e61aa);}_0xbbd326({'target':_0x41ac80,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2672c1,currentChangeNumber:_0x4ddc2f,numberOfChanges:_0x31d9bc,isReady:_0xc7e676,isEnabled:_0x36142b}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x36142b&&_0xc7e676&&_0x31d9bc)&&(!_0x2672c1||(0x1===this['_step']?_0x4ddc2f<_0x31d9bc-0x1:_0x4ddc2f>0x0));}}class xi extends _0x212fb1{constructor(_0x23cd43){super(_0x23cd43);const _0x116fa=this['bindTemplate'],_0x5eadea=new _0x28948f(_0x23cd43),_0x3a1f7d=new _0x28948f(_0x23cd43);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',(_0x5e3d13,_0xd85ce0)=>_0x5e3d13&&_0xd85ce0>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x44d904,_0x3f74f6,_0x591ba0,_0x722e77)=>{if(!_0x44d904)return m(_0x23cd43,'Loading...');if(!_0x591ba0)return m(_0x23cd43,'No\x20changes');const _0x381141=m(_0x23cd43,'NUMBER_OF_CHANGES',_0x591ba0);return _0x722e77?m(_0x23cd43,'X_OF_Y_CHANGES',[_0x3f74f6+0x1,_0x591ba0]):_0x381141;}),_0x5eadea['set']({'label':m(_0x23cd43,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1f58d8}),_0x3a1f7d['set']({'label':m(_0x23cd43,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3731cc}),_0x5eadea['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3a1f7d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5eadea['on']('execute',()=>this['fire']('execute','backward')),_0x3a1f7d['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',_0x116fa['if']('_isStatusLabelVisible','ck-hidden',_0x30d052=>!_0x30d052)]},'children':[{'text':_0x116fa['to']('isNavigationMode',_0x5aab97=>_0x5aab97?m(_0x23cd43,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x23cd43,'Total')+':\x20')}]},{'text':_0x116fa['to']('_statusText')}]},new _0x348f81(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5eadea,_0x3a1f7d]}]});}}const ge='ck-editor__editable__loading-overlay';class Ri extends _0xcfa495{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x41d88d=this['editor']['editing']['view'];_0x41d88d['change'](_0x246992=>{for(const _0x1424ba of _0x41d88d['document']['roots'])_0x246992['addClass'](ge,_0x1424ba);});}['hide'](){const _0x58a6b2=this['editor']['editing']['view'];_0x58a6b2['change'](_0x412317=>{for(const _0x1f19b3 of _0x58a6b2['document']['roots'])_0x412317['removeClass'](ge,_0x1f19b3);});}}class v extends _0xcfa495{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,Ri];}['init'](){const _0x167863=this['editor'],_0x423d46=_0x167863['plugins']['get'](u),_0x54927c=_0x167863['plugins']['get'](Ri);_0x167863['ui']['componentFactory']['add']('exitToEditing',_0x3b52f5=>{const _0x24f30c=new _0x28948f(_0x3b52f5);return _0x24f30c['set']({'label':m(_0x3b52f5,'Back\x20to\x20editing'),'icon':_0x3e339e,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x24f30c,'execute',()=>{_0x167863['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x24f30c;}),_0x167863['ui']['componentFactory']['add']('restoreRevision',_0x187680=>{const _0x30e5dc=new _0x28948f(_0x187680);return _0x30e5dc['set']({'label':m(_0x187680,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x30e5dc['bind']('isEnabled')['to'](_0x167863['commands']['get']('restoreRevision')),this['listenTo'](_0x30e5dc,'execute',()=>_0x167863['execute']('restoreRevision')),_0x30e5dc;}),_0x167863['ui']['componentFactory']['add']('changesNavigation',_0x3b3938=>{const _0xf2f322=new xi(_0x3b3938),_0x372e08=_0x167863['commands']['get']('showPreviousChange'),_0x3b9bd5=_0x167863['commands']['get']('showNextChange');return _0xf2f322['bind']('isBackwardNavigationEnabled')['to'](_0x372e08,'isEnabled'),_0xf2f322['bind']('isForwardNavigationEnabled')['to'](_0x3b9bd5,'isEnabled'),_0xf2f322['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x423d46),this['listenTo'](_0xf2f322,'execute',(_0x536106,_0x546686)=>{_0x167863['execute']('forward'===_0x546686?'showNextChange':'showPreviousChange');}),_0xf2f322;}),_0x54927c['show'](),_0x423d46['on']('change:isReady',(_0x2f6a14,_0x1fea47,_0x3bbe25)=>{_0x3bbe25?_0x54927c['hide']():_0x54927c['show']();});}}class _i extends ti{['_resizeObserver']=null;constructor(_0x26324a,_0x497aab){super(_0x26324a,_0x497aab);const _0x5f5074=this['bindTemplate'];this['set']({'label':m(_0x26324a,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x26324a,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5f5074['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x578aa1=this['fieldView']['element'];this['_tooltipString']=_0x578aa1['scrollWidth']>_0x578aa1['clientWidth']&&_0x578aa1['value']||'';}}class bi extends _0x212fb1{constructor(_0x5526d6,_0x12c674,_0x1fc537){super(_0x5526d6);const _0x357d15=new _0x5111d3();_0x357d15['set']({'content':_0x55d462,'viewBox':'0\x200\x2011\x2010'});const _0x338613=['ck','ck-revision-history-sidebar__revision-author'];_0x1fc537&&_0x338613['push']('ck-revision-history-sidebar__revision-author_creator');const _0x18a143=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5526d6,_0x1fc537?'Revision\x20creator':'Revision\x20author')},'children':[_0x357d15,_0x12c674['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x338613},'children':_0x18a143});}}function ki(_0x39104,_0x30fd2b){const _0x227aae=_0x39104['bindTemplate'],_0x4095a4=_0x39104['locale'],_0x8033c2=_0x57ae92(_0x4095a4);_0x8033c2['panelPosition']='sw';const _0x5c0691=function(_0xedbae5,_0x19c6a3){const _0x2b0389=function(_0xc998ca,_0x342b0d){const _0x1d2dc4=_0xc998ca['locale'],_0x9d9f8a={'Compare\x20against\x20selected':m(_0x1d2dc4,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x1d2dc4,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x1d2dc4,'Restore\x20this\x20revision')};return _0x342b0d['map'](_0x47f249=>{const _0x4d1ca2=_0x9d9f8a[_0x47f249['name']];return _0x4d1ca2&&_0x4d1ca2!==_0x47f249['name']&&(_0x47f249['name']=_0x4d1ca2),_0x47f249;});}(_0xedbae5,_0x19c6a3),_0x5efd34=new _0x2cee73();for(const _0x4e8dd9 of _0x2b0389){const _0x3ffbef={'type':'button','model':new to({'label':_0x4e8dd9['name'],'class':_0x4e8dd9['class'],'withText':!0x0,'role':'menuitem','_action':_0x4e8dd9['action']})};_0x3ffbef['model']['bind']('isEnabled')['to'](_0xedbae5,'isActionsDropdownOpen',_0x29aa64=>'function'!=typeof _0x4e8dd9['isEnabled']||(!_0x29aa64||_0x4e8dd9['isEnabled'](_0xedbae5))),_0x5efd34['add'](_0x3ffbef);}return _0x5efd34;}(_0x39104,_0x30fd2b);return _0x39104['bind']('isActionsDropdownOpen')['to'](_0x8033c2,'isOpen'),_0x8033c2['buttonView']['set']({'label':m(_0x4095a4,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3daa3a}),_0x8033c2['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x227aae['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x227aae['to'](_0x82467f=>_0x82467f['stopPropagation']())}}),_0x8033c2['on']('execute',_0x4a75f4=>{_0x39104['isReady']&&'function'==typeof _0x4a75f4['source']['_action']&&_0x4a75f4['source']['_action'](_0x39104);}),_0x7d9e09(_0x8033c2,_0x5c0691,{'role':'menu'}),_0x8033c2['listenTo'](_0x39104,'change:isActionsDropdownOpen',(_0x4b2f1a,_0x35c62f,_0x233751)=>{if(_0x233751)for(const _0x17e703 of _0x8033c2['listView']['items']){const _0x49966e=_0x17e703['children']['first'],_0x5252cd=_0x30fd2b['find'](_0x466bac=>_0x466bac['action']===_0x49966e['_action'])['isVisible'];_0x17e703['isVisible']=void 0x0===_0x5252cd||_0x5252cd(_0x39104);}}),_0x8033c2;}class ci extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x572ee6(_0x212fb1){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x5884af,_0x2133bd,_0x44d066,_0x5b5067){super(_0x5884af);const _0x28c161=this['bindTemplate'],_0x1929d3=function(_0x465932,_0x1ed0b1){const _0x3d77ea=Array['from'](_0x1ed0b1['authors'])['filter'](_0x54d05f=>_0x54d05f!=_0x1ed0b1['creator']);return _0x1ed0b1['creator']&&_0x3d77ea['unshift'](_0x1ed0b1['creator']),_0x3d77ea['map'](_0x3badf5=>new bi(_0x465932,_0x3badf5,_0x3badf5==_0x1ed0b1['creator']));}(_0x5884af,_0x2133bd);this['id']=_0x2133bd['id'],this['_revision']=_0x2133bd,this['_requireRevisionName']=_0x5b5067,this['bind']('name','createdAt')['to'](_0x2133bd),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x8c3731=>{return _0x3d35f6=_0x5884af['uiLanguage'],(_0x44f6e0=_0x8c3731)['toLocaleDateString'](_0x3d35f6,{'month':'long','day':'numeric'})+',\x20'+_0x44f6e0['toLocaleTimeString'](_0x3d35f6,{'hour':'numeric','minute':'numeric'});var _0x3d35f6,_0x44f6e0;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new _i(_0x5884af,_0x1cdcaa),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x786b66=>_0x786b66||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x207332,_0x3e4008)=>_0x207332&&_0x3e4008),this['revisionActionsView']=_0x44d066&&_0x44d066['length']?ki(this,_0x44d066):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x28c161['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x28c161['if']('isEnabled','ck-disabled',_0x197492=>!_0x197492),_0x28c161['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x28c161['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x28c161['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':_0x28c161['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':_0x1929d3}]},this['revisionActionsView']],'on':{'click':_0x28c161['to'](_0x14d893=>{_0x14d893['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x41dccd=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x41dccd,'change',()=>{this['_requireRevisionName']&&!_0x41dccd['value']||this['fire']('setName',{'id':this['id'],'name':_0x41dccd['value']}),_0x41dccd['value']||(_0x41dccd['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(_0x510c9b,_0x32d10e){const _0x362843=_0x16779c['fromJSDate'](_0x510c9b)['setLocale'](_0x32d10e),_0x5ed5bd=_0x16779c['local'](),_0x1a5b15=_0x5ed5bd['minus']({'days':0x1})['startOf']('day');let _0x4dc677,_0x31f684;return _0x362843['hasSame'](_0x5ed5bd,'day')?(_0x4dc677=_0x362843['startOf']('day')['toJSDate'](),_0x31f684=_0x362843['toRelativeCalendar']()):_0x362843['hasSame'](_0x1a5b15,'day')?(_0x4dc677=_0x1a5b15['toJSDate'](),_0x31f684=_0x362843['toRelativeCalendar']()):_0x362843['hasSame'](_0x5ed5bd,'week')?(_0x4dc677=_0x362843['startOf']('week')['toJSDate'](),_0x31f684=_0x362843['weekdayLong']||''):_0x362843['hasSame'](_0x5ed5bd,'year')?(_0x4dc677=_0x362843['startOf']('month')['toJSDate'](),_0x31f684=_0x362843['monthLong']||''):(_0x4dc677=_0x362843['startOf']('year')['toJSDate'](),_0x31f684=String(_0x362843['year'])),{'startDate':_0x4dc677,'localizedPeriodName':_0x31f684};}class vi extends _0x212fb1{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x478d81,_0x4cf374,_0x25772a,_0x5af14d){super(_0x478d81);const _0x485c82=di(_0x4cf374,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4cf374,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x25772a,this['_requireRevisionName']=_0x5af14d,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':_0x485c82}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1f3c55){const _0x41e70c=new ci(this['locale'],_0x1f3c55,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x41e70c);}['removeRevision'](_0x471b13){const _0x512309=this['revisionViews']['find'](_0x102cec=>_0x102cec['id']===_0x471b13['id']);this['revisionViews']['remove'](_0x512309);}}class mi extends _0x212fb1{constructor(_0x318f7b){super(_0x318f7b);const _0x2ac0be=new _0x5111d3();_0x2ac0be['content']=_0x1bc09b,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2ac0be,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x318f7b,'Revision\x20history')]}]});}}class ai extends _0x212fb1{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x311ac8,_0x5875a7,_0x47e7c1,_0x51d5e2){super(_0x311ac8);const _0x2a1247=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x5875a7,this['_revisionActions']=_0x47e7c1,this['_requireRevisionName']=_0x51d5e2,this['on']('select',(_0x47145d,_0x14e7cb)=>{this['fire']('revisionSelected',_0x14e7cb);}),this['on']('setName',(_0x8d54df,_0x4f6b11)=>{this['fire']('revisionSetName',_0x4f6b11);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new mi(_0x311ac8),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x2a1247['if']('isEnabled','ck-disabled',_0x1bbdba=>!_0x1bbdba)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x13c1b7 of this['_revisions'])this['_addRevision'](_0x13c1b7);this['_revisions']['on']('add',(_0x486455,_0x44957a)=>{this['_addRevision'](_0x44957a);}),this['_revisions']['on']('remove',(_0x593733,_0x29ff23)=>{this['_removeRevision'](_0x29ff23);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x38ed80=>_0x38ed80['revisionViews']['map'](_0x1e7ce7=>_0x1e7ce7))['flat']();}['selectRevision'](_0x4a73c9){for(const _0x25b79d of this['revisionViews'])_0x4a73c9&&_0x4a73c9['id']===_0x25b79d['id']?_0x25b79d['select']():_0x25b79d['deselect']();}['highlightRevisions'](_0x2e84f4){for(const _0x2a9dee of this['revisionViews'])_0x2e84f4['some'](({id:_0x4abe3e})=>_0x4abe3e===_0x2a9dee['id'])?_0x2a9dee['highlight']():_0x2a9dee['unhighlight']();}['_addRevision'](_0x3118d5){const _0x1249b7=di(_0x3118d5['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5d3b1d=this['timePeriodViews']['get'](0x0);_0x5d3b1d&&_0x5d3b1d['startDate']['getTime']()===_0x1249b7['getTime']()||(_0x5d3b1d=new vi(this['locale'],_0x1249b7,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5d3b1d)),_0x5d3b1d['addRevision'](_0x3118d5);}['_removeRevision'](_0x38e351){const _0x76f185=di(_0x38e351['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x76f185)['removeRevision'](_0x38e351);}['_getTimePeriodViewByStartDate'](_0x32fc1c){return this['timePeriodViews']['find'](_0x2a94c4=>_0x2a94c4['startDate']['getTime']()===_0x32fc1c['getTime']());}}class d extends _0xcfa495{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
|
|
30
|
-
_0x37a1b5(_0x28b480){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x52138a,_0x24cba1){super(_0x24cba1),this['sourceElement']=_0x52138a,this['model']['document']['createRoot']();const _0x527cdb=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x527cdb);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4fa567,_0x135486){const _0x440a77=new this(_0x4fa567,_0x135486);return await _0x440a77['initPlugins'](),await _0x440a77['ui']['init'](_0x4fa567),await _0x440a77['data']['init'](_0x440a77['config']['get']('initialData')||''),_0x440a77['fire']('ready'),_0x440a77;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0x439397{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f06dc){function _0xb4128(_0x48adf5){return _0x48adf5['map'](_0x18156f=>String['fromCharCode'](_0x18156f))['join']('');}super(_0x3f06dc),this['result']='end',_0x3f06dc[_0xb4128([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb4128([0x76,0x69,0x65,0x77])][_0xb4128([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xb4128([0x61,0x75,0x74,0x6f]),_0x3f06dc[_0xb4128([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xb4128([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xb4128([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xb4128([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xb4128([0x6f,0x6b])});}}class ct extends _0x439397{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x273bbd){if(super(_0x273bbd),!this['editor']['config']['get']('revisionHistory'))throw new _0x1b5dfa('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3fa517=>this['_showRevisionViewer']({..._0x3fa517,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x50b7bf=>this['_closeRevisionViewer'](_0x50b7bf)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xa954e1=>this['_restoreRevision'](_0xa954e1)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x6f1c3f){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x6f1c3f;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1bf92b){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1bf92b);}['getRevision'](_0x18b2eb){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x18b2eb);}['getRevisions'](_0x380459){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x380459||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x57fc4a=this['editor'],_0x2c65e7=_0x1dfe24(_0x57fc4a,p),_0x380da2=_0x57fc4a['plugins']['get']('RevisionTracker'),_0x141504=_0x57fc4a['plugins']['get']('Users')['users'];return _0x2c65e7['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2c65e7['lazyRoots'],(_0x2c65e7['plugins']['push'](ht,u,v,class extends _0x439397{static get['requires'](){return[u,'Users'];}['init'](){const _0xee8567=this['editor']['plugins']['get']('Users');for(const _0xaba6f7 of _0x141504)_0xaba6f7['isAnonymous']||_0xee8567['getUser'](_0xaba6f7['id'])||_0xee8567['addUser'](_0xaba6f7);const _0x351e93=_0x380da2['repository']['getRevisions']();let _0x13024e=null;const _0x42b82b=this['editor']['plugins']['get']('RevisionViewer');_0x42b82b['adapter']=_0x380da2['adapter'],_0x42b82b['bind']('isEnabled')['to'](_0x380da2),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x57fc4a,'isReadOnly',_0x49d17d=>!_0x49d17d);for(const _0x4c4a89 of _0x351e93){const _0x3edc86=null===_0x4c4a89['creator'];if(_0x3edc86&&_0x4c4a89['toVersion']===_0x4c4a89['fromVersion'])continue;const _0x24f3ff=_0x4c4a89['toJSON']();_0x42b82b['addRevisionData'](_0x24f3ff,(_0x43a597,_0x560199,_0x38eb04)=>{if(_0x3edc86){if(_0x13024e)_0x13024e['_update'](_0x43a597,_0x560199);else{if(!_0x560199){const _0x25b85d=_0x38eb04['toJSON']();_0x25b85d['id']=_0x391c61(),_0x380da2['saveRevision'](_0x25b85d,_0x38eb04['toVersion'])['then'](_0x41217b=>{_0x13024e=_0x41217b;});}}}else _0x4c4a89['_update'](_0x43a597,_0x560199);});}}},d),_0x2c65e7);}['_enhanceShowRevisionViewerCallback'](){const _0x271356=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1e53c4=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x56a0ec=this['editor']['plugins']['get']('Autosave');await _0x56a0ec['save']();}else await _0x1e53c4['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1cae3a=this['editor']['plugins']['get']('Dialog');_0x1cae3a['isOpen']&&_0x1cae3a['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x4edd48=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x48bea4 of _0x4edd48)_0x48bea4['class']=_0x48bea4['class']?_0x48bea4['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2a3a3d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2a3a3d&&_0x2a3a3d['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x6fdd22=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x6fdd22&&_0x6fdd22['setAttribute']('tabindex','-1');}}const _0x43ee6f=this['_getRevisionViewerEditorConfig']();return _0x271356(_0x43ee6f)['then'](_0x5d3acf=>{return(this['_viewerEditor']=_0x5d3acf,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x5d3acf);})['catch'](_0x39146c=>(console['error'](_0x39146c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x21c695=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x423440=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3f6a4e of _0x423440)_0x3f6a4e['class']='ck-tab-panel_disabled'===_0x3f6a4e['class']?'':_0x3f6a4e['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1cc9a0=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1cc9a0&&_0x1cc9a0['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x2764d2=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x2764d2&&_0x2764d2['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x21c695(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x50a895=this['editor']['plugins']['get']('Annotations');_0x50a895['refreshVisibility'](),_0x50a895['refreshPositioning']();}});});}['_showRevisionViewer'](_0x1c2398){const _0x3f14bd=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x126282=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4d5950=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x4d5950,_0x1c2398)['then'](_0x21e379=>(_0x126282['style']['display']='block',_0x3f14bd['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x21e379));}['_closeRevisionViewer'](_0x508b67){const _0x2803ca=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2803ca['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x508b67['destroy']();}async['_restoreRevision'](_0x51b53d){const _0x54ecf7=this['editor'],_0x3cc9fc=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2682fa=_0x54ecf7['plugins']['get']('RevisionTracker'),_0x49ca33=_0x54ecf7['plugins']['get']('RevisionHistoryUtils'),_0x2f5212=_0x3cc9fc['repository']['getRevision'](_0x51b53d);let _0x1615b8,_0x81eedc,_0x4c9e26;try{await _0x49ca33['loadRevisionData'](_0x2f5212,this['adapter']),_0x1615b8=_0x49ca33['getRevisionDocumentData'](_0x2f5212),_0x81eedc=_0x49ca33['getRevisionRootsAttributes'](_0x2f5212);}catch(_0x14c63d){return void console['error'](_0x14c63d);}_0x54ecf7['model']['change'](_0x54a335=>{for(const _0x1de57b of Array['from'](_0x54ecf7['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x54a335['removeMarker'](_0x1de57b);}),_0x3cc9fc['isReady']=!0x1,_0x54ecf7['model']['enqueueChange'](_0x3d9223=>{_0x3d9223['setSelection'](null),_0x3d9223['removeSelectionAttribute'](_0x54ecf7['model']['document']['selection']['getAttributeKeys']());const _0x2ba909=Object['keys'](_0x1615b8);for(const _0x1a10c3 of _0x54ecf7['model']['document']['roots'])'$graveyard'!=_0x1a10c3['rootName']&&_0x1a10c3['isAttached']()&&!_0x2ba909['includes'](_0x1a10c3['rootName'])&&_0x3d9223['detachRoot'](_0x1a10c3);for(const _0x5b7f3f of _0x2ba909){let _0x3ed3f5=_0x54ecf7['model']['document']['getRoot'](_0x5b7f3f);_0x3ed3f5&&_0x3ed3f5['isAttached']()||(_0x3ed3f5=_0x3d9223['addRoot'](_0x5b7f3f));const _0xdf3a11=_0x81eedc[_0x5b7f3f],_0x4cd688=Object['keys'](_0xdf3a11),_0x5a5e55=_0x1615b8[_0x5b7f3f];for(const _0x357ede of _0x3ed3f5['getAttributeKeys']())_0x4cd688['includes'](_0x357ede)||_0x3d9223['removeAttribute'](_0x357ede,_0x3ed3f5);for(const _0x1f003c of _0x4cd688)_0x3d9223['setAttribute'](_0x1f003c,_0x81eedc[_0x5b7f3f][_0x1f003c],_0x3ed3f5);_0x3d9223['remove'](_0x3d9223['createRangeIn'](_0x3ed3f5)),_0x3d9223['insert'](_0x54ecf7['data']['parse'](_0x5a5e55,_0x3ed3f5),_0x3ed3f5,0x0);}});const _0x4b9295=m(_0x54ecf7['locale'],'Restored');if(_0x2f5212['name'])_0x4c9e26=-0x1==_0x2f5212['name']['indexOf'](_0x4b9295)?_0x4b9295+':\x20'+_0x2f5212['name']:_0x2f5212['name'];else _0x4c9e26=_0x4b9295+':\x20'+(_0x2f5212['createdAt']['toLocaleDateString'](_0x54ecf7['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2f5212['createdAt']['toLocaleTimeString'](_0x54ecf7['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2682fa['saveRevision']({'name':_0x4c9e26}),_0x3cc9fc['isReady']=!0x0,_0x54ecf7['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};
|
|
29
|
+
rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x457af1){super(_0x457af1),this['_revisionViewer']=_0x457af1['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xb8c21e=this['_revisionsRepository']['_revisions'],_0x1fe34b=this['_createRevisionActions'](),_0x1fffbe=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ai(this['editor']['locale'],_0xb8c21e,_0x1fe34b,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',(_0x2e4f98,_0x3e8f5f)=>{_0x3e8f5f['revisionViews']['on']('add',(_0x2f5391,_0x3f7227)=>{_0x3f7227['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)),_0x1fffbe['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x40be3b=this['_revisionsRepository']['getRevision'](0x0);if(_0x40be3b){const _0x323dc2=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x40be3b['id']);this['_revisionViewer']['compare'](_0x40be3b,_0x323dc2);}}['_handleRevisionSelected'](_0x1f20d1,_0x2f0e09){const _0x207695=this['_revisionsRepository']['getRevision'](_0x2f0e09['id']),_0x2c6fd4=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x207695['id']);this['_revisionViewer']['compare'](_0x207695,_0x2c6fd4);}['_handleRevisionSetName'](_0x114bea,_0x6e514b){this['_revisionsRepository']['getRevision'](_0x6e514b['id'])['setName'](_0x6e514b['name']);}['_handleDiffChange'](_0x2dbabe,_0x583082,_0x16d7c9){const _0xae2c85=this['_revisionsRepository']['getRevisionsInDiff'](_0x16d7c9);_0xae2c85['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xae2c85),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xae2c85[0x0]));}['_createRevisionActions'](){const _0x10aeec=this['editor'],_0x4f0978=d['availableRevisionActions'],_0x566daf=_0x10aeec['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x566daf['length'])return _0x566daf['map'](_0x63d609=>{const _0x404ff9='string'==typeof _0x63d609?Object['assign']({},_0x4f0978[_0x63d609]):_0x63d609;return _0x404ff9['action']=_0x404ff9['action']['bind'](this,_0x10aeec),_0x404ff9['isVisible']&&(_0x404ff9['isVisible']=_0x404ff9['isVisible']['bind'](this,_0x10aeec)),_0x404ff9;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x41e82c},_0x272eda)=>{const _0x46fcdb=_0x41e82c['get'](u),_0x6163dd=_0x46fcdb['repository'];let _0x6005e9=_0x46fcdb['diff']['newRevisionId'],_0x35e904=_0x272eda['id'];_0x6163dd['getIndex'](_0x6005e9)>_0x6163dd['getIndex'](_0x35e904)&&([_0x6005e9,_0x35e904]=[_0x35e904,_0x6005e9]),_0x46fcdb['compare'](_0x6005e9,_0x35e904);},'isVisible':({plugins:_0x4596bb},_0x307797)=>{const _0x93528d=_0x4596bb['get'](u);return!(_0x93528d['repository']['getRevisionsInDiff'](_0x93528d['diff'])['length']>0x2)&&!_0x307797['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x96664a,{id:_0x161ef6})=>{_0x96664a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x161ef6);},'isVisible':({plugins:_0x3fa212},_0x5cfdff)=>!!_0x3fa212['get'](u)['repository']['getLaterVisibleRevision'](_0x5cfdff['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xb4f842},{id:_0x216e99,revisionNameView:_0x3b7dfa})=>{const _0x3cd260=_0xb4f842['get'](u),_0x39820e=_0x3cd260['repository']['getEarlierVisibleRevision'](_0x216e99);_0x3cd260['compare'](_0x216e99,_0x39820e),_0x3b7dfa['focus'](),_0x3b7dfa['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x3baaea,_0x8d095a){super(_0x3baaea),this['_view']=_0x8d095a,this['_toolbarConfig']=st(_0x3baaea['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x4180e2){const _0x333884=this['editor'],_0x33e5c6=this['view'],_0x5187a3=_0x333884['editing']['view'],_0x121255=_0x33e5c6['editable'],_0x35aa7e=_0x5187a3['document']['getRoot']();_0x121255['name']=_0x35aa7e['rootName'],_0x33e5c6['render']();const _0x1f48a6=_0x121255['element'];this['setEditableElement'](_0x121255['name'],_0x1f48a6),_0x33e5c6['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5187a3['attachDomRoot'](_0x1f48a6),this['_elementReplacer']['replace'](_0x4180e2,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x22d7fa=this['view'],_0x5565ea=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5565ea['detachDomRoot'](_0x22d7fa['editable']['name']),_0x22d7fa['destroy']();}['_initToolbar'](){const _0x3f6bc2=this['view'];_0x3f6bc2['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3f6bc2['stickyPanel']['limiterElement']=_0x3f6bc2['element'],_0x3f6bc2['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x2422dd})=>_0x2422dd),_0x3f6bc2['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3f6bc2['toolbar']);}}class ii extends _0x36dce6{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x3ecaae,_0x1f602c,_0x5749ba={}){super(_0x3ecaae),this['stickyPanel']=new _0x4cd550(_0x3ecaae),this['toolbar']=new _0x41e7e1(_0x3ecaae,{'shouldGroupWhenFull':_0x5749ba['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x3ecaae,_0x1f602c);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x5c8f5e(_0x264d8c){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x413e27,_0x1d01c9){super(_0x1d01c9),this['sourceElement']=_0x413e27,this['model']['document']['createRoot']();const _0x8679f7=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x8679f7);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0xa7ad79,_0xb2e1bc){const _0x47d321=new this(_0xa7ad79,_0xb2e1bc);return await _0x47d321['initPlugins'](),await _0x47d321['ui']['init'](_0xa7ad79),await _0x47d321['data']['init'](_0x47d321['config']['get']('initialData')||''),_0x47d321['fire']('ready'),_0x47d321;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0xcfa495{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x941c7){function _0x4d6626(_0x380ab4){return _0x380ab4['map'](_0x3ddf66=>String['fromCharCode'](_0x3ddf66))['join']('');}super(_0x941c7),this['result']='end',_0x941c7[_0x4d6626([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4d6626([0x76,0x69,0x65,0x77])][_0x4d6626([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4d6626([0x61,0x75,0x74,0x6f]),_0x941c7[_0x4d6626([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4d6626([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4d6626([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4d6626([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4d6626([0x6f,0x6b])});}}class ht extends _0xcfa495{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x5ebfb4){if(super(_0x5ebfb4),!this['editor']['config']['get']('revisionHistory'))throw new _0x70053c('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x211d1f=>this['_showRevisionViewer']({..._0x211d1f,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x3e6092=>this['_closeRevisionViewer'](_0x3e6092)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4c8ca0=>this['_restoreRevision'](_0x4c8ca0)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2d6dc1){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2d6dc1;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x249474){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x249474);}['getRevision'](_0x5d4e41){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5d4e41);}['getRevisions'](_0x4c1917){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4c1917||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x49bd88=this['editor'],_0x1b875b=_0x315b3d(_0x49bd88,p),_0x3609b6=_0x49bd88['plugins']['get']('RevisionTracker'),_0x401013=_0x49bd88['plugins']['get']('Users')['users'];return _0x1b875b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1b875b['lazyRoots'],(_0x1b875b['plugins']['push'](at,u,v,class extends _0xcfa495{static get['requires'](){return[u,'Users'];}['init'](){const _0x40b7cb=this['editor']['plugins']['get']('Users');for(const _0x5d5a01 of _0x401013)_0x5d5a01['isAnonymous']||_0x40b7cb['getUser'](_0x5d5a01['id'])||_0x40b7cb['addUser'](_0x5d5a01);const _0x19791b=_0x3609b6['repository']['getRevisions']();let _0x58eb08=null;const _0x504576=this['editor']['plugins']['get']('RevisionViewer');_0x504576['adapter']=_0x3609b6['adapter'],_0x504576['bind']('isEnabled')['to'](_0x3609b6),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x49bd88,'isReadOnly',_0x4c8917=>!_0x4c8917);for(const _0x3bce6a of _0x19791b){const _0x57626b=null===_0x3bce6a['creator'];if(_0x57626b&&_0x3bce6a['toVersion']===_0x3bce6a['fromVersion'])continue;const _0x250a01=_0x3bce6a['toJSON']();_0x504576['addRevisionData'](_0x250a01,(_0x946eec,_0x166d50,_0x1176f6)=>{if(_0x57626b){if(_0x58eb08)_0x58eb08['_update'](_0x946eec,_0x166d50);else{if(!_0x166d50){const _0x48f5d6=_0x1176f6['toJSON']();_0x48f5d6['id']=_0x51ba1f(),_0x3609b6['saveRevision'](_0x48f5d6,_0x1176f6['toVersion'])['then'](_0x2940d5=>{_0x58eb08=_0x2940d5;});}}}else _0x3bce6a['_update'](_0x946eec,_0x166d50);});}}},d),_0x1b875b);}['_enhanceShowRevisionViewerCallback'](){const _0x586138=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x5f3420=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x64cd2b=this['editor']['plugins']['get']('Autosave');await _0x64cd2b['save']();}else await _0x5f3420['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5a5f29=this['editor']['plugins']['get']('Dialog');_0x5a5f29['isOpen']&&_0x5a5f29['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x344504=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x162bc0 of _0x344504)_0x162bc0['class']=_0x162bc0['class']?_0x162bc0['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x537ee8=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x537ee8&&_0x537ee8['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xcd5ef7=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xcd5ef7&&_0xcd5ef7['setAttribute']('tabindex','-1');}}const _0x26b951=this['_getRevisionViewerEditorConfig']();return _0x586138(_0x26b951)['then'](_0xf0e76e=>{return(this['_viewerEditor']=_0xf0e76e,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0xf0e76e);})['catch'](_0x3f9e3a=>(console['error'](_0x3f9e3a),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x27989f=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x5a2ac0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x47f670 of _0x5a2ac0)_0x47f670['class']='ck-tab-panel_disabled'===_0x47f670['class']?'':_0x47f670['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x289ecf=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x289ecf&&_0x289ecf['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5a40a9=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5a40a9&&_0x5a40a9['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x27989f(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2a24ed=this['editor']['plugins']['get']('Annotations');_0x2a24ed['refreshVisibility'](),_0x2a24ed['refreshPositioning']();}});});}['_showRevisionViewer'](_0x4c6c71){const _0x29147d=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x41a6a0=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2381cd=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x2381cd,_0x4c6c71)['then'](_0x99822a=>(_0x41a6a0['style']['display']='block',_0x29147d['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x99822a));}['_closeRevisionViewer'](_0xf4d92d){const _0x34e7d7=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x34e7d7['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xf4d92d['destroy']();}async['_restoreRevision'](_0x1acd25){const _0x3cefe6=this['editor'],_0x2da3d7=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x780cb1=_0x3cefe6['plugins']['get']('RevisionTracker'),_0x47682d=_0x3cefe6['plugins']['get']('RevisionHistoryUtils'),_0x174d96=_0x2da3d7['repository']['getRevision'](_0x1acd25);let _0x2260c5,_0x5b9edc,_0xe508a0;try{await _0x47682d['loadRevisionData'](_0x174d96,this['adapter']),_0x2260c5=_0x47682d['getRevisionDocumentData'](_0x174d96),_0x5b9edc=_0x47682d['getRevisionRootsAttributes'](_0x174d96);}catch(_0x1a7e63){return void console['error'](_0x1a7e63);}_0x3cefe6['model']['change'](_0x431da7=>{for(const _0x1a377f of Array['from'](_0x3cefe6['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x431da7['removeMarker'](_0x1a377f);}),_0x2da3d7['isReady']=!0x1,_0x3cefe6['model']['enqueueChange'](_0xb47284=>{_0xb47284['setSelection'](null),_0xb47284['removeSelectionAttribute'](_0x3cefe6['model']['document']['selection']['getAttributeKeys']());const _0x37151f=Object['keys'](_0x2260c5);for(const _0x62ac3 of _0x3cefe6['model']['document']['roots'])'$graveyard'!=_0x62ac3['rootName']&&_0x62ac3['isAttached']()&&!_0x37151f['includes'](_0x62ac3['rootName'])&&_0xb47284['detachRoot'](_0x62ac3);for(const _0xe7862a of _0x37151f){let _0x3a90fc=_0x3cefe6['model']['document']['getRoot'](_0xe7862a);_0x3a90fc&&_0x3a90fc['isAttached']()||(_0x3a90fc=_0xb47284['addRoot'](_0xe7862a));const _0x3f75f3=_0x5b9edc[_0xe7862a],_0x4d70b0=Object['keys'](_0x3f75f3),_0x4be697=_0x2260c5[_0xe7862a];for(const _0xc01e6 of _0x3a90fc['getAttributeKeys']())_0x4d70b0['includes'](_0xc01e6)||_0xb47284['removeAttribute'](_0xc01e6,_0x3a90fc);for(const _0x92fa6 of _0x4d70b0)_0xb47284['setAttribute'](_0x92fa6,_0x5b9edc[_0xe7862a][_0x92fa6],_0x3a90fc);_0xb47284['remove'](_0xb47284['createRangeIn'](_0x3a90fc)),_0xb47284['insert'](_0x3cefe6['data']['parse'](_0x4be697,_0x3a90fc),_0x3a90fc,0x0);}});const _0x2c9489=m(_0x3cefe6['locale'],'Restored');if(_0x174d96['name'])_0xe508a0=-0x1==_0x174d96['name']['indexOf'](_0x2c9489)?_0x2c9489+':\x20'+_0x174d96['name']:_0x174d96['name'];else _0xe508a0=_0x2c9489+':\x20'+(_0x174d96['createdAt']['toLocaleDateString'](_0x3cefe6['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x174d96['createdAt']['toLocaleTimeString'](_0x3cefe6['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x780cb1['saveRevision']({'name':_0xe508a0}),_0x2da3d7['isReady']=!0x0,_0x3cefe6['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,at as RevisionViewerIntegration,Ri as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ot as ShowChangeCommand};
|