@ckeditor/ckeditor5-revision-history 0.0.0-nightly-next-20250224.0 → 0.0.0-nightly-20250225.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/build/revision-history.js +1 -1
- package/ckeditor5-metadata.json +1 -1
- package/dist/index.js +6 -6
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +11 -12
- package/src/changeitem.js +2 -2
- package/src/editor/revisionviewereditor.js +2 -2
- package/src/editor/revisionviewereditorui.js +1 -1
- package/src/editor/revisionviewereditoruiview.js +1 -1
- package/src/index.js +1 -1
- package/src/revision.js +2 -2
- package/src/revisiondiff.js +1 -1
- package/src/revisionhistory.js +1 -1
- package/src/revisionsrepository.js +1 -1
- package/src/revisiontracker.js +1 -1
- package/src/revisionviewer.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revision/utils.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/theme/icons/arrow-down.svg +1 -0
- package/theme/icons/arrow-up.svg +1 -0
- package/theme/icons/revision-history.svg +1 -0
- package/theme/icons/user.svg +1 -0
package/dist/index.js
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x387491(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3b7f5c){super(),this['id']=_0x3b7f5c['id']||_0x15ad7c(),this['creator']=_0x3b7f5c['creator']||null,this['authors']=_0x3b7f5c['authors']||[],this['diffData']=_0x3b7f5c['diffData']||null,this['toVersion']=_0x3b7f5c['toVersion']||0x0,this['fromVersion']=_0x3b7f5c['fromVersion']||0x0,this['set']('name',_0x3b7f5c['name']||''),this['set']('createdAt',_0x3b7f5c['createdAt']||new Date()),this['set']('attributes',_0x3b7f5c['attributes']||{});}['setName'](_0x144fbc){this['_update']({'name':_0x144fbc});}['setAttribute'](_0x3ad7fe,_0x39ed29){const _0x181936=_0x522253(this['attributes']);_0x2a9a51(_0x181936,_0x3ad7fe,_0x39ed29),this['_update']({'attributes':_0x181936});}['removeAttribute'](_0xa2b41f){const _0x347f2b=_0x522253(this['attributes']);_0x2c5b24(_0x347f2b,_0xa2b41f),this['_update']({'attributes':_0x347f2b});}['_update'](_0x651348,_0x28d531=!0x1){let _0x4dd40b=!0x1;const _0x12e4e1={'id':this['id']},_0xa48b6c=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x5a3f5a of _0xa48b6c){const _0x9b7a53=_0x651348[_0x5a3f5a];void 0x0!==_0x9b7a53&&_0x9b7a53!==this[_0x5a3f5a]&&(this[_0x5a3f5a]=_0x9b7a53,_0x12e4e1[_0x5a3f5a]=_0x9b7a53,_0x4dd40b=!0x0);}_0x4dd40b&&(_0x12e4e1['authors']&&(_0x12e4e1['authorsIds']=_0x12e4e1['authors']['map'](_0xa3ad66=>_0xa3ad66['id']),delete _0x12e4e1['authors']),this['fire']('_update',_0x12e4e1,_0x28d531));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x5d79e8=>_0x5d79e8['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x455bed{['_revisions'];static get['requires'](){return[_0x560468];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x24fc64){super(_0x24fc64),this['_revisions']=new _0x1845c7();}['afterInit'](){!async function(_0x405d05){const _0x4b7f29=_0x2bff14([0x69,0x77,0x4d,0x64,0x52,0x73,0x7a,0x55,0x65,0x67,0x43,0x47,0x71,0x62,0x6f,0x30,0x61,0x35,0x63,0x6a,0x32,0x45,0x34,0x57,0x76,0x6d,0x6b,0x72,0x53,0x48,0x44,0x46,0x41,0x79,0x4c,0x4a,0x39,0x70,0x74,0x33,0x75,0x4b,0x49,0x36,0x68,0x37,0x66,0x4f,0x4e,0x51,0x54,0x56,0x6e,0x38,0x6c,0x50,0x42,0x5a,0x31,0x59,0x58,0x78]),_0x242aee=0xeb829,_0x423360=0x74daec92,_0x2e0877=0x74dd8cfa^_0x423360,_0x52fcf3=window[_0x2bff14([0x44,0x61,0x74,0x65])][_0x2bff14([0x6e,0x6f,0x77])](),_0x5d2e39=_0x405d05[_0x2bff14([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x55cd11=new window[(_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d4350=>{_0x5d2e39[_0x2bff14([0x6f,0x6e,0x63,0x65])](_0x2bff14([0x72,0x65,0x61,0x64,0x79]),_0x5d4350);}),_0x9bd0ae={[_0x2bff14([0x6b,0x74,0x79])]:_0x2bff14([0x45,0x43]),[_0x2bff14([0x75,0x73,0x65])]:_0x2bff14([0x73,0x69,0x67]),[_0x2bff14([0x63,0x72,0x76])]:_0x2bff14([0x50,0x2d,0x32,0x35,0x36]),[_0x2bff14([0x78])]:_0x2bff14([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]),[_0x2bff14([0x79])]:_0x2bff14([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]),[_0x2bff14([0x61,0x6c,0x67])]:_0x2bff14([0x45,0x53,0x32,0x35,0x36])},_0x3bc8b7=_0x5d2e39[_0x2bff14([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2bff14([0x67,0x65,0x74])](_0x2bff14([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x372fc6(){let _0x1ed83f,_0x53c94e=null,_0x13ee04=null;try{if(_0x3bc8b7==_0x2bff14([0x47,0x50,0x4c]))return _0x2bff14([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1ed83f=_0xf8141b(),!_0x1ed83f)return _0x2bff14([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1ed83f[_0x2bff14([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x13ee04=_0x420fdc(_0x1ed83f[_0x2bff14([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1ed83f[_0x2bff14([0x6a,0x74,0x69])])),await _0x3a57ac()?_0x39503b()?_0x552655()?_0x2bff14([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4a5043()?(_0x1ed83f[_0x2bff14([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2bff14([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x53c94e=_0x264d3c(_0x2bff14([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1ed83f[_0x2bff14([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2bff14([0x74,0x72,0x69,0x61,0x6c])&&(_0x53c94e=_0x264d3c(_0x2bff14([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3b90af()):_0x2bff14([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2bff14([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2bff14([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xba95bd){return _0x2bff14([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x552655(){const _0x2e269d=[_0x2bff14([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2bff14([0x74,0x72,0x69,0x61,0x6c])][_0x2bff14([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1ed83f[_0x2bff14([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x52fcf3/0x3e8:0xe10*_0x2e0877;return _0x1ed83f[_0x2bff14([0x65,0x78,0x70])]<_0x2e269d;}function _0x39503b(){const _0x3fb20e=_0x1ed83f[_0x2bff14([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3fb20e)return!0x1;if(_0x3fb20e[_0x2bff14([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bff14([0x2a])))return!0x0;if(_0x3fb20e[_0x2bff14([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bff14([0x52,0x48])))return!0x0;if(_0x3fb20e[_0x2bff14([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bff14([0x52,0x52,0x48]))){if(_0x19897f())return!0x0;if(_0xfd7333()||_0x413f0c())return!0x0;}return!0x1;}function _0x4a5043(){const _0x1d85b1=_0x1ed83f[_0x2bff14([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1d85b1||0x0==_0x1d85b1[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5ac06f}=new URL(window[_0x2bff14([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1d85b1[_0x2bff14([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ac06f))return!0x0;const _0x7a3a3f=_0x5ac06f[_0x2bff14([0x73,0x70,0x6c,0x69,0x74])](_0x2bff14([0x2e]));return _0x1d85b1[_0x2bff14([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x63c572=>_0x63c572[_0x2bff14([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bff14([0x2a])))[_0x2bff14([0x6d,0x61,0x70])](_0x5e301e=>_0x5e301e[_0x2bff14([0x73,0x70,0x6c,0x69,0x74])](_0x2bff14([0x2e])))[_0x2bff14([0x73,0x6f,0x6d,0x65])](_0x2e21ec=>_0x7a3a3f[_0x2bff14([0x65,0x76,0x65,0x72,0x79])]((_0x5492a5,_0x50d620)=>_0x2e21ec[_0x50d620]===_0x5492a5||_0x2e21ec[_0x50d620]===_0x2bff14([0x2a])));}function _0x3b90af(){return _0x53c94e&&_0x13ee04?new window[(_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1e76a8,_0x3cf288)=>{_0x53c94e[_0x2bff14([0x74,0x68,0x65,0x6e])](_0x1e76a8,_0x3cf288),_0x13ee04[_0x2bff14([0x74,0x68,0x65,0x6e])](_0x6ce4e0=>{_0x6ce4e0!=_0x2bff14([0x56,0x61,0x6c,0x69,0x64])&&_0x1e76a8(_0x6ce4e0);},_0x3cf288);}):_0x53c94e||_0x13ee04||_0x2bff14([0x56,0x61,0x6c,0x69,0x64]);}}function _0x420fdc(_0x345eb9,_0x63dd86){return new window[(_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56f263=>{if(_0x1ec67b())return _0x56f263(_0x2bff14([0x56,0x61,0x6c,0x69,0x64]));_0x462b0b(),_0x5d2e39[_0x2bff14([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2bff14([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x456889=!0x1;const _0xabf4fd=_0x15ad7c();function _0x36ad93(_0x56ad56){return!!_0x56ad56&&(typeof _0x56ad56===_0x2bff14([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x56ad56===_0x2bff14([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x56ad56[_0x2bff14([0x74,0x68,0x65,0x6e])]===_0x2bff14([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x56ad56[_0x2bff14([0x63,0x61,0x74,0x63,0x68])]===_0x2bff14([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4cbc8f(_0x3a4c51){_0x3d6f97(_0x3a4c51)[_0x2bff14([0x74,0x68,0x65,0x6e])](_0x43f107=>{if(!_0x43f107||_0x43f107[_0x2bff14([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2bff14([0x6f,0x6b]))return _0x2bff14([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x40b5c9(_0x479723(_0xabf4fd+_0x63dd86))!=_0x43f107[_0x2bff14([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2bff14([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2bff14([0x56,0x61,0x6c,0x69,0x64]);})[_0x2bff14([0x74,0x68,0x65,0x6e])](_0x54de6c=>(_0x5bb264(),_0x54de6c),()=>{const _0x4579b8=_0x165d2a();return null==_0x4579b8?(_0x5bb264(),_0x2bff14([0x56,0x61,0x6c,0x69,0x64])):_0x2bff14(_0x52fcf3-_0x4579b8>(0x50d66892^_0x423360)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2bff14([0x74,0x68,0x65,0x6e])](_0x56f263)[_0x2bff14([0x63,0x61,0x74,0x63,0x68])](()=>{_0x56f263(_0x2bff14([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xb17171=0x74ec0212^_0x423360;function _0x5bb264(){const _0x4754f4=_0x2bff14([0x6c,0x6c,0x63,0x74,0x2d])+_0x40b5c9(_0x479723(_0x345eb9)),_0x4c4a32=_0x31a0ac(_0x40b5c9(window[_0x2bff14([0x4d,0x61,0x74,0x68])][_0x2bff14([0x63,0x65,0x69,0x6c])](_0x52fcf3/_0xb17171)));window[_0x2bff14([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2bff14([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4754f4,_0x4c4a32);}function _0x165d2a(){const _0x131305=_0x2bff14([0x6c,0x6c,0x63,0x74,0x2d])+_0x40b5c9(_0x479723(_0x345eb9)),_0x15e3da=window[_0x2bff14([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2bff14([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x131305);return _0x15e3da?window[_0x2bff14([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31a0ac(_0x15e3da),0x10)*_0xb17171:null;}function _0x3d6f97(_0x38feb1){return new window[(_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2c8b45,_0x447ea3)=>{_0x38feb1[_0x2bff14([0x74,0x68,0x65,0x6e])](_0x2c8b45,_0x447ea3),window[_0x2bff14([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x447ea3,0x74db3852^_0x423360);});}}_0x5d2e39[_0x2bff14([0x6f,0x6e])](_0x2bff14([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1ab2dd,_0x129bf6)=>{if(_0x129bf6[0x0]!=_0x345eb9)return _0x56f263(_0x2bff14([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x129bf6[0x1]={..._0x129bf6[0x1],[_0x2bff14([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xabf4fd};},{[_0x2bff14([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2bff14([0x68,0x69,0x67,0x68])}),_0x5d2e39[_0x2bff14([0x6f,0x6e])](_0x2bff14([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x53cbb1=>{_0x36ad93(_0x53cbb1[_0x2bff14([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x456889=!0x0,_0x4cbc8f(_0x53cbb1[_0x2bff14([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2bff14([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2bff14([0x6c,0x6f,0x77])}),_0x55cd11[_0x2bff14([0x74,0x68,0x65,0x6e])](()=>{_0x456889||_0x56f263(_0x2bff14([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1ec67b(){return _0x5d2e39[_0x2bff14([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2bff14([0x76,0x69,0x65,0x77])][_0x2bff14([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2bff14([0x61,0x75,0x74,0x6f]);}function _0x462b0b(){_0x5d2e39[_0x2bff14([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2bff14([0x76,0x69,0x65,0x77])][_0x2bff14([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2bff14([0x61,0x75,0x74,0x6f]);}}function _0x264d3c(_0x28fb10){const _0x3a2770=[new window[(_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2325a4=>setTimeout(_0x2325a4,0x74d3d25e^_0x423360)),_0x55cd11[_0x2bff14([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x112201=>{const _0x3f5d92=0x74daec95^_0x423360,_0x13966f=_0x405d05[_0x2bff14([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x3d9af3(){_0x13966f[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x3f5d92&&_0x112201();}_0x3d9af3(),_0x13966f[_0x2bff14([0x6f,0x6e])](_0x2bff14([0x61,0x64,0x64]),_0x3d9af3);})),new window[(_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33ecb5=>{function _0x334532(){for(const _0x3b3c9b in window)if(window[_0x2bff14([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x2bff14([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3b3c9b))&&window[_0x3b3c9b]==_0x242aee)return _0x33ecb5();_0x5d2e39[_0x2bff14([0x73,0x74,0x61,0x74,0x65])]!=_0x2bff14([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x2bff14([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x334532,0x74daff1a^_0x423360);}_0x4f01ef(_0x2bff14([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x334532();})];return window[_0x2bff14([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2bff14([0x72,0x61,0x63,0x65])](_0x3a2770)[_0x2bff14([0x74,0x68,0x65,0x6e])](()=>_0x28fb10);}async function _0x5445d4(){if(await _0x55cd11,_0x4f01ef(_0x2bff14([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x186ed5=_0x405d05[_0x2bff14([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x3484a6=_0x405d05[_0x2bff14([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])](_0x186ed5[_0x2bff14([0x69,0x64])]),_0x4ea76e=_0x3ba270(_0x2bff14([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4ea76e[_0x2bff14([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x186ed5['id'],_0x3484a6?_0x3484a6['id']:null,!0x0),_0x4ea76e[_0x2bff14([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2bff14([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4ea76e[_0x2bff14([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4ea76e[_0x2bff14([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x4ed675,void(_0x4ea76e[_0x2bff14([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x4ed675);}if(_0x4f01ef(_0x2bff14([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4267d3=_0x3ba270(_0x2bff14([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4267d3[_0x2bff14([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2bff14([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4267d3[_0x2bff14([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4267d3[_0x2bff14([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x4ed675,_0x4267d3[_0x2bff14([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x4ed675;}_0x5d2e39[_0x2bff14([0x6d,0x6f,0x64,0x65,0x6c])][_0x2bff14([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4ed675,_0x5d2e39[_0x2bff14([0x6d,0x6f,0x64,0x65,0x6c])][_0x2bff14([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4ed675,_0x5d2e39[_0x2bff14([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2bff14([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x19897f(){return _0x4f01ef(_0x2bff14([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3ba270(_0x2bff14([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2bff14([0x73,0x74,0x61,0x74,0x65])]==_0x2bff14([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xfd7333(){return _0x4f01ef(_0x2bff14([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 _0x413f0c(){return _0x4f01ef(_0x2bff14([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1b74ab(_0x5d72dc){const _0x17e105=_0x5008a6();_0x5d2e39[_0x17e105]=_0x2bff14([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])+_0x5d72dc,_0x5d72dc[_0x2bff14([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x2bff14([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x5008a6()]=_0x242aee),_0x5d72dc!=_0x2bff14([0x56,0x61,0x6c,0x69,0x64])&&_0x5445d4();}function _0x5008a6(){const _0x34de4c=window[_0x2bff14([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2bff14([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2bff14([0x6e,0x6f,0x77])]())[_0x2bff14([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2bff14([0x2e]),'');let _0x5c1b79=_0x2bff14([0x69]);for(let _0x536826=0x0;_0x536826<_0x34de4c[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x536826+=0x2){let _0x3e184b=window[_0x2bff14([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34de4c[_0x2bff14([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x536826,_0x536826+0x2));_0x3e184b>=_0x4b7f29[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3e184b-=_0x4b7f29[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5c1b79+=_0x4b7f29[_0x3e184b];}return _0x5c1b79;}function _0xf8141b(){const _0x37980b=_0x3bc8b7[_0x2bff14([0x73,0x70,0x6c,0x69,0x74])](_0x2bff14([0x2e]));if(0x3!=_0x37980b[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x587e80(_0x37980b[0x1]);function _0x587e80(_0x521054){const _0x50f745=_0x37bf2d(_0x521054);return _0x50f745&&_0x387276()?_0x50f745:null;function _0x387276(){const _0x139e69=_0x50f745[_0x2bff14([0x6a,0x74,0x69])],_0xade5ea=window[_0x2bff14([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x139e69[_0x2bff14([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x139e69[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5ca51a={..._0x50f745,[_0x2bff14([0x6a,0x74,0x69])]:_0x139e69[_0x2bff14([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x139e69[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5ca51a[_0x2bff14([0x76,0x63])],_0x479723(_0x5ca51a)==_0xade5ea;}}}async function _0x3a57ac(){let _0x497590=!0x0;try{const _0x4507fa=_0x3bc8b7[_0x2bff14([0x73,0x70,0x6c,0x69,0x74])](_0x2bff14([0x2e])),[_0x11d5a1,_0x4cbba0,_0x17c7b0]=_0x4507fa;return _0x36e8aa(_0x11d5a1),await _0x5a7bcd(_0x11d5a1,_0x4cbba0,_0x17c7b0),_0x497590;}catch(_0x45999c){return!0x1;}function _0x36e8aa(_0xb325ca){const _0x217c36=_0x37bf2d(_0xb325ca);_0x217c36&&_0x217c36[_0x2bff14([0x61,0x6c,0x67])]==_0x2bff14([0x45,0x53,0x32,0x35,0x36])||(_0x497590=!0x1);}async function _0x5a7bcd(_0x4aa26e,_0x38f5ed,_0xc5d852){const _0x17300c=window[_0x2bff14([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2bff14([0x66,0x72,0x6f,0x6d])](_0x2e6f12(_0xc5d852),_0xe5b4ac=>_0xe5b4ac[_0x2bff14([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38af6a=new window[(_0x2bff14([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2bff14([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4aa26e+_0x2bff14([0x2e])+_0x38f5ed),_0x4f3ac2=window[_0x2bff14([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2bff14([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4f3ac2)return;const _0x5a513d=await _0x4f3ac2[_0x2bff14([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2bff14([0x6a,0x77,0x6b]),_0x9bd0ae,{[_0x2bff14([0x6e,0x61,0x6d,0x65])]:_0x2bff14([0x45,0x43,0x44,0x53,0x41]),[_0x2bff14([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2bff14([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2bff14([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4f3ac2[_0x2bff14([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2bff14([0x6e,0x61,0x6d,0x65])]:_0x2bff14([0x45,0x43,0x44,0x53,0x41]),[_0x2bff14([0x68,0x61,0x73,0x68])]:{[_0x2bff14([0x6e,0x61,0x6d,0x65])]:_0x2bff14([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5a513d,_0x17300c,_0x38af6a)||(_0x497590=!0x1);}}function _0x37bf2d(_0x3dd39e){return _0x3dd39e[_0x2bff14([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2bff14([0x65,0x79]))?JSON[_0x2bff14([0x70,0x61,0x72,0x73,0x65])](_0x2e6f12(_0x3dd39e)):null;}function _0x2e6f12(_0x18a6d1){return window[_0x2bff14([0x61,0x74,0x6f,0x62])](_0x18a6d1[_0x2bff14([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2bff14([0x2b]))[_0x2bff14([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2bff14([0x2f])));}function _0x479723(_0x3cd5e8){let _0x351861=0x1505;function _0x1e1b16(_0xd58fce){for(let _0x53811c=0x0;_0x53811c<_0xd58fce[_0x2bff14([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53811c++){const _0x16c492=_0xd58fce[_0x2bff14([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x53811c);_0x351861=(_0x351861<<0x5)+_0x351861+_0x16c492,_0x351861&=_0x351861;}}function _0x34eebc(_0x4f1016){Array[_0x2bff14([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f1016)?_0x4f1016[_0x2bff14([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x34eebc):_0x4f1016&&typeof _0x4f1016==_0x2bff14([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2bff14([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f1016)[_0x2bff14([0x73,0x6f,0x72,0x74])]()[_0x2bff14([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x46c9b9,_0x1327ce])=>{_0x1e1b16(_0x46c9b9),_0x34eebc(_0x1327ce);}):_0x1e1b16(window[_0x2bff14([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f1016));}return _0x34eebc(_0x3cd5e8),_0x351861>>>0x0;}function _0x40b5c9(_0x2d9d8f){return _0x2d9d8f[_0x2bff14([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2bff14([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2bff14([0x30]));}function _0x31a0ac(_0x1869fb){return _0x1869fb[_0x2bff14([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2bff14([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2bff14([0x6a,0x6f,0x69,0x6e])]('');}function _0x4f01ef(_0x20574f){return _0x5d2e39[_0x2bff14([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2bff14([0x68,0x61,0x73])](_0x20574f);}function _0x3ba270(_0x544fbd){return _0x5d2e39[_0x2bff14([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2bff14([0x67,0x65,0x74])](_0x544fbd);}function _0x4ed675(){}function _0x2bff14(_0x3e8726){return _0x3e8726['map'](_0x142eda=>String['fromCharCode'](_0x142eda))['join']('');}_0x1b74ab(await _0x372fc6());}(this);}['createRevision'](_0x23a3bc){const _0x4dcaf5=this['editor']['plugins']['get']('Users');return new h({'id':_0x23a3bc['id'],'name':_0x23a3bc['name'],'creator':_0x23a3bc['creatorId']?_0x4dcaf5['getUser'](_0x23a3bc['creatorId']):null,'diffData':_0x23a3bc['diffData']||_0x23a3bc['data'],'authors':_0x23a3bc['authorsIds']['map'](_0x282a19=>_0x4dcaf5['getUser'](_0x282a19)),'createdAt':new Date(_0x23a3bc['createdAt']),'attributes':_0x23a3bc['attributes'],'fromVersion':_0x23a3bc['fromVersion'],'toVersion':_0x23a3bc['toVersion']});}['addRevision'](_0x519854,_0x13ad65=0x0){this['_revisions']['add'](_0x519854,_0x13ad65);}['getRevision'](_0x1bd1f1){return this['_revisions']['get'](_0x1bd1f1);}['getRevisions'](_0x18dd11={'toJSON':!0x1}){const _0x42e2cb=Array['from'](this['_revisions']);return _0x42e2cb['reverse'](),_0x18dd11['toJSON']?_0x42e2cb['map'](_0x4fafa2=>_0x4fafa2['toJSON']()):_0x42e2cb;}['getIndex'](_0x568642){return this['_revisions']['getIndex'](_0x568642);}['getEarlierVisibleRevision'](_0x3f94e4){const [,_0x40585c]=this['getRevisionsIterator'](_0x3f94e4,{'direction':'earlier'});return _0x40585c;}['getLaterVisibleRevision'](_0xa0af00){const [,_0x554384]=this['getRevisionsIterator'](_0xa0af00,{'direction':'later'});return _0x554384;}['getRevisionsInDiff'](_0x3dc47d){const _0x49d10c=[];for(const _0x41aa39 of this['getRevisionsIterator'](_0x3dc47d['newRevisionId']))if(_0x49d10c['push'](_0x41aa39),_0x41aa39['id']===_0x3dc47d['oldRevisionId'])break;return _0x49d10c;}*['getRevisionsIterator'](_0x227a30,{direction:_0x44b1ac='earlier',filter:_0x9584aa=()=>!0x0}={}){const _0x3319a4='earlier'===_0x44b1ac?0x1:-0x1;let _0x18881c=this['_revisions']['get'](_0x227a30),_0x53e0cf=this['getIndex'](_0x18881c);for(yield _0x18881c;_0x18881c;){if(_0x53e0cf+=_0x3319a4,_0x18881c=this['getRevision'](_0x53e0cf),!_0x18881c)return;_0x9584aa(_0x18881c)&&(yield _0x18881c);}}}function m(_0xb8a581,_0x1fa33c,_0x6ddd3b){const t=_0xb8a581['t'];switch(_0x1fa33c){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'},_0x6ddd3b);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x6ddd3b);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const E={'c':_0x1e701c,'a':_0x5bcaae,'e':_0x42f373,'r':_0x37fd56,'u':_0x312f03};class u extends _0x455bed{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x560468,j,_0x56c0d1];}constructor(_0x2d9780){super(_0x2d9780),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1a9201=_0x15ad7c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1a9201},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x369e69=this['repository']['getRevision'](0x0),_0x646dc6=_0x369e69&&null===_0x369e69['creator']?_0x369e69:null;if(this['_continueCurrentRevision']=!!_0x646dc6&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x33350d=this['_source']['getCurrentRevisionId'](),_0x18b063=this['repository']['getRevision'](_0x33350d);if(_0x18b063)this['_startingVersion']=_0x18b063['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1d52af=this['_source']['history']['_operations']['find'](_0xc9fe72=>!_0xc9fe72['_isInit']),_0xd2ab95=_0x1d52af?_0x1d52af['baseVersion']:this['_source']['history']['version'];_0x369e69?(_0x369e69['toVersion']<_0xd2ab95&&_0x369e69['_update']({'toVersion':_0xd2ab95}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x646dc6['id'],this['_startingVersion']=_0x646dc6['fromVersion']):(this['_startingVersion']=_0x369e69['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xd2ab95,this['_continueCurrentRevision']=!0x1);}}else _0x646dc6&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x646dc6['toVersion'],this['editor']['model']['document']['history']['version']),_0x646dc6['fromVersion']===_0x646dc6['toVersion']?(0x0!==_0x646dc6['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x646dc6['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x646dc6['id'],this['_startingVersion']=_0x646dc6['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',_0x10de8f=>!_0x10de8f),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x434d6b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x26898f;for(const _0x5880bf in _0x434d6b){const _0x1ca2e7=_0x5880bf,_0x27f641=_0x434d6b[_0x1ca2e7];if('revisionHistoryLicenseKeyValid'==_0x27f641||'revisionHistoryLicenseKeyInvalid'==_0x27f641||'revisionHistoryLicenseKeyExpired'==_0x27f641||'revisionHistoryLicenseKeyDomainLimit'==_0x27f641||'revisionHistoryLicenseKeyNotAllowed'==_0x27f641||'revisionHistoryLicenseKeyEvaluationLimit'==_0x27f641||'revisionHistoryLicenseKeyTrialLimit'==_0x27f641||'revisionHistoryLicenseKeyUsageLimit'==_0x27f641){delete _0x434d6b[_0x1ca2e7],_0x26898f=_0x27f641,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x26898f&&_0x434d6b['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x26898f&&_0x434d6b['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x26898f&&_0x434d6b['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x26898f&&_0x434d6b['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x26898f&&_0x434d6b['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x26898f&&_0x434d6b['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x26898f&&_0x434d6b['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x48245c=this['repository']['getRevision'](0x0),_0x436068=await this['getRevisionDocumentData'](_0x48245c),_0x5e214d=await this['getRevisionRootsAttributes'](_0x48245c);this['_replaceEditorDataWithRevisionData'](_0x436068,_0x5e214d);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x227a67){this['_source']=_0x227a67;}async['update'](){const _0x3d82a4=await this['_source']['getLatestVersion']();if(_0x3d82a4>this['currentRevision']['toVersion']){await this['_loadState']();const _0x52d769=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3d82a4});_0x52d769['authors']=_0x52d769['authorsIds']['map'](_0x2af6d6=>this['editor']['plugins']['get']('Users')['getUser'](_0x2af6d6)),this['currentRevision']['_update'](_0x52d769);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x17c70f={},_0x16adea=null){const _0x1bd80f=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x16adea>this['currentRevision']['toVersion']&&(_0x16adea=null),null===_0x16adea&&(_0x16adea=await this['_source']['getLatestVersion']());const _0x508f08=this['_getFromVersion'](_0x16adea),_0x1efaee=this['buildRevisionData']({'from':_0x508f08,'to':_0x16adea});if(this['currentRevision']['toVersion']<_0x16adea){const _0xe63a60=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x16adea,'to':_0x16adea});_0xe63a60['authors']=[],_0xe63a60['authorsIds']=[],_0xe63a60['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xe63a60,!0x0),delete _0xe63a60['authors'],_0x1bd80f['push'](_0xe63a60);}_0x17c70f['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x17c70f['name']=_0x17c70f['name']||null,_0x17c70f['id']=_0x17c70f['id']||_0x15ad7c(),_0x17c70f={..._0x17c70f,..._0x1efaee};const _0x1069f5=this['addRevisionData'](_0x17c70f);_0x1bd80f['push'](_0x17c70f);const _0xa4f40d=this['repository']['getIndex'](_0x1069f5);if(0x0!==_0xa4f40d){const _0x143202=this['repository']['getRevision'](_0xa4f40d-0x1);if(_0x143202['fromVersion']!==_0x16adea){const _0x3c6cf0=this['_revisionDataBuilder']['getData'](_0x16adea,_0x143202['toVersion']),_0x3d72ef={'id':_0x143202['id'],'diffData':_0x3c6cf0['diffData'],'authorsIds':_0x3c6cf0['authorsIds'],'authors':_0x3c6cf0['authorsIds']['map'](_0x2a4c57=>this['editor']['plugins']['get']('Users')['getUser'](_0x2a4c57)),'fromVersion':_0x16adea};_0x143202===this['currentRevision']&&(_0x3d72ef['createdAt']=new Date(_0x17c70f['createdAt']['getTime']()+0xa)),_0x143202['_update'](_0x3d72ef,!0x0),delete _0x3d72ef['authors'],_0x1bd80f['push'](_0x3d72ef);}}if(this['adapter']){for(const _0x11cf7f of _0x1bd80f)this['_bufferUpdate'](_0x11cf7f['id'],_0x11cf7f,!0x0);this['sendBufferedUpdates']();}return _0x1069f5;}['addRevisionData'](_0x1650dd){const _0x4c857c=this['repository']['createRevision'](_0x1650dd);return this['adapter']&&_0x4c857c['on']('_update',(_0x367a7a,_0xd44a9e,_0x19ddb3)=>{_0x19ddb3||(this['_bufferUpdate'](_0xd44a9e['id'],_0xd44a9e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4c857c,this['_findInsertionIndex'](_0x4c857c)),_0x4c857c;}async['getRevisionDocumentData'](_0x4c8e14){await this['_loadRevisionData'](_0x4c8e14);const _0x138542={};for(const _0x51c414 in _0x4c8e14['diffData']){if(_0x4c8e14['diffData'][_0x51c414]['attachChange']&&!_0x4c8e14['diffData'][_0x51c414]['attachChange']['isAttached'])continue;const _0x580e88=this['_removeRevisionMarkers'](JSON['parse'](_0x4c8e14['diffData'][_0x51c414]['insertions'])),_0x403b9d=this['editor']['editing']['view']['document'],_0xb5005d=new _0x7a1ef9(_0x403b9d,_0x580e88['map'](_0x3f8787=>P(_0x3f8787,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x138542[_0x51c414]=this['editor']['data']['processor']['toData'](_0xb5005d),this['editor']['data']['processor']['useFillerType']('default');}return _0x138542;}async['getRevisionRootsAttributes'](_0x15c738){await this['_loadRevisionData'](_0x15c738);const _0x51f9f5={};for(const _0x48940e in _0x15c738['diffData'])_0x15c738['diffData'][_0x48940e]['attachChange']&&!_0x15c738['diffData'][_0x48940e]['attachChange']['isAttached']||(_0x51f9f5[_0x48940e]=_0x15c738['diffData'][_0x48940e]['attributesAfter']||{});return _0x51f9f5;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x359fdd=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x351e88=0x0;_0x351e88<_0x359fdd['length'];_0x351e88++){const _0x553f9e=_0x359fdd[_0x351e88];let _0x45c5ff=!0x1;for(const _0x4501a3 of Object['keys'](_0x553f9e))void 0x0===_0x553f9e[_0x4501a3]?delete _0x553f9e[_0x4501a3]:'id'!==_0x4501a3&&(_0x45c5ff=!0x0);_0x45c5ff||(_0x359fdd[_0x351e88]=null);}if(_0x359fdd=_0x359fdd['filter'](_0x1942fa=>null!==_0x1942fa),!_0x359fdd['length'])return;for(let _0xdd4104=0x0;_0xdd4104<_0x359fdd['length'];_0xdd4104++){const _0x318b9c=_0x359fdd[_0xdd4104];void 0x0!==_0x318b9c['fromVersion']&&void 0x0===_0x318b9c['toVersion']&&(_0x318b9c['toVersion']=this['repository']['getRevision'](_0x318b9c['id'])['toVersion']),void 0x0!==_0x318b9c['toVersion']&&void 0x0===_0x318b9c['fromVersion']&&(_0x318b9c['fromVersion']=this['repository']['getRevision'](_0x318b9c['id'])['fromVersion']);}const _0x33460d=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x359fdd,_0x33460d)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5b5a83=>{if(_0x5b5a83){for(const _0xd8f74d of _0x5b5a83)this['setRevisionData']({'id':_0xd8f74d['id'],'createdAt':_0xd8f74d['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x2a21d2,_0xf250f2){let _0x108360=this['editor']['config']['get']('initialData'),_0x3c40ec=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x108360){_0x108360={};for(const _0x450ed0 of this['editor']['model']['document']['getRootNames']())_0x108360[_0x450ed0]='';}if('string'==typeof _0x108360&&(_0x108360={'main':_0x108360}),void 0x0===_0x3c40ec){_0x3c40ec={};for(const _0x33fad0 of this['editor']['model']['document']['getRootNames']())_0x3c40ec[_0x33fad0]={};}let _0x4a8f3e=!0x1;const _0x1566ef=Object['keys'](_0x108360),_0x518ed7=Object['keys'](_0x2a21d2);for(const _0x3b9a92 of _0x1566ef){if(_0x108360[_0x3b9a92]!==_0x2a21d2[_0x3b9a92]&&''!==_0x108360[_0x3b9a92]['trim']()){_0x4a8f3e=!0x0;break;}if(!_0xa0a279(_0x3c40ec[_0x3b9a92],_0xf250f2[_0x3b9a92])&&Object['keys'](_0x3c40ec[_0x3b9a92])['length']>0x0){_0x4a8f3e=!0x0;break;}}_0x4a8f3e||(_0x4a8f3e=_0x518ed7['some'](_0x399af3=>!this['editor']['model']['document']['getRoot'](_0x399af3))),_0x4a8f3e&&_0x36d4e9('editor-initial-data-replaced-with-revision-data',{'editorData':_0x108360,'editorRootsAttributes':_0x3c40ec,'revisionData':_0x2a21d2,'revisionRootsAttributes':_0xf250f2}),this['editor']['config']['set']('initialData',_0x2a21d2),this['editor']['config']['set']('rootsAttributes',_0xf250f2);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4fa5d1=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4fa5d1['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2ee6ae){const _0x3b4967=this['repository']['getRevisions']();_0x3b4967['reverse']();let _0x543fd2=0x0;for(;_0x543fd2<_0x3b4967['length'];){const _0x1989f4=_0x3b4967[_0x543fd2];if(_0x1989f4===this['currentRevision']){_0x543fd2++;continue;}if(_0x1989f4['id']===this['_initialRevisionId'])break;const _0x15684c=_0x2ee6ae['toVersion']-_0x1989f4['toVersion']||_0x2ee6ae['fromVersion']-_0x1989f4['fromVersion'];if(_0x15684c>0x0)break;if(_0x15684c<0x0)_0x543fd2++;else{if(!_0x2ee6ae['creator']&&_0x1989f4['creator'])break;if(_0x1989f4['creator']||!_0x2ee6ae['creator']){if(_0x2ee6ae['createdAt']>_0x1989f4['createdAt'])break;_0x543fd2++;}else _0x543fd2++;}}return _0x543fd2;}['setRevisionData'](_0x156c42){const _0x3c7863=this['repository']['getRevision'](_0x156c42['id']);if(_0x156c42['createdAt']&&(_0x156c42['createdAt']=new Date(_0x156c42['createdAt'])),_0x156c42['authorsIds']){const _0x21687a=this['editor']['plugins']['get']('Users');_0x156c42['authors']=_0x156c42['authorsIds']['map'](_0x3ad424=>_0x21687a['getUser'](_0x3ad424));}_0x3c7863['_update'](_0x156c42,!0x0);}['buildRevisionData']({revision:_0x34cec6=null,from:_0x5164fc=null,to:_0x402364=null}){_0x5164fc=null!==_0x5164fc?_0x5164fc:_0x34cec6['fromVersion'],_0x402364=null!==_0x402364?_0x402364:_0x34cec6['toVersion'];const _0x1ac136=this['_revisionDataBuilder']['getData'](_0x5164fc,_0x402364),_0x242ff1={'diffData':_0x1ac136['diffData'],'authorsIds':_0x1ac136['authorsIds'],'fromVersion':_0x5164fc,'toVersion':_0x402364};if(!_0x34cec6||_0x402364!==_0x34cec6['toVersion']){const _0x3a4a88=_0x402364-0x1,_0x438169=this['_source']['history']['getOperation'](_0x3a4a88);_0x242ff1['createdAt']=_0x438169&&_0x438169['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5164fc===this['_loadedStateData']['fromVersion']){for(const _0x4b780a of this['_loadedStateData']['authors'])_0x242ff1['authorsIds']['includes'](_0x4b780a['id'])||_0x242ff1['authorsIds']['push'](_0x4b780a['id']);}return _0x242ff1;}['_loadRevisionData'](_0x5e1aae){if(!_0x5e1aae||_0x5e1aae['diffData'])return Promise['resolve']();{const _0x9693c4=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x9693c4,'revisionId':_0x5e1aae['id']})['then'](_0x5c3556=>{_0x5e1aae['diffData']=_0x5c3556['diffData'];});}}['_bufferUpdate'](_0x3c73c1,_0x2a0dc3,_0x4965b7){if(this['_bufferedUpdates']['has'](_0x3c73c1)){const _0x323d52=this['_bufferedUpdates']['get'](_0x3c73c1);_0x2a0dc3=_0x4965b7?{..._0x323d52,..._0x2a0dc3}:{..._0x2a0dc3,..._0x323d52};}this['_bufferedUpdates']['set'](_0x3c73c1,_0x2a0dc3);}['_getFromVersion'](_0x2ff1a5){const _0x12b428=this['repository']['getRevisions']();_0x12b428['reverse'](),_0x12b428['shift']();const _0x49afd0=_0x12b428['find'](_0x2a15aa=>_0x2a15aa['toVersion']<=_0x2ff1a5)['toVersion'];return _0x49afd0<this['_startingVersion']?this['_startingVersion']:_0x49afd0;}['_createInitialRevision'](_0x2742db){const _0x4b62b8=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4b62b8)this['_initialRevisionId']=_0x4b62b8['id'];else{const _0x34ec48=!this['editor']['model']['document']['roots']['find'](_0x5699f6=>this['editor']['model']['hasContent'](_0x5699f6)),_0x5e88f4=this['editor']['plugins']['get']('Users')['me']['id'],_0x3a52c0=m(this['editor']['locale'],_0x34ec48?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2742db,'to':_0x2742db,'id':this['_initialRevisionId'],'name':_0x3a52c0,'creatorId':_0x5e88f4});}}['_createCurrentRevision'](_0x21669d){const _0xd5f4d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xd5f4d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x21669d,'to':_0x21669d,'id':_0xd5f4d,'name':'','creatorId':null}));}['_makeRevision']({name:_0x3dad68,from:_0x2ec490,to:_0x67c45f,creatorId:_0x15e2f3,id:_0x57dae6}){const _0x56d546=this['buildRevisionData']({'from':_0x2ec490,'to':_0x67c45f});_0x56d546['name']=_0x3dad68,_0x56d546['creatorId']=_0x15e2f3,_0x56d546['id']=_0x57dae6;const _0x48ae54=this['addRevisionData'](_0x56d546);return this['adapter']&&this['_bufferUpdate'](_0x56d546['id'],_0x56d546,!0x0),_0x48ae54;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x1cb3a7){return(_0x1cb3a7=_0x1cb3a7['filter'](_0x10be2f=>!_0x10be2f['name']||'revision-start'!==_0x10be2f['name']&&'revision-end'!==_0x10be2f['name']))['forEach'](_0x3ce0c5=>{'string'!=typeof _0x3ce0c5&&(_0x3ce0c5['children']=this['_removeRevisionMarkers'](_0x3ce0c5['children']),_0x3ce0c5['attributes']=_0x3ce0c5['attributes']['filter'](_0x2433e7=>!_0x2433e7[0x0]['startsWith']('data-revision-')));}),_0x1cb3a7;}}function P(_0x16c5f6,_0x216217){const _0x536be0=_0x216217['editing']['view']['document'];if('string'==typeof _0x16c5f6)return new _0x3bf4d8(_0x536be0,_0x16c5f6);{const _0x466215=_0x16c5f6['children']['map'](_0x548018=>P(_0x548018,_0x216217));return new(E[_0x16c5f6['type']]||_0x493957)(_0x536be0,_0x16c5f6['name'],_0x16c5f6['attributes'],_0x466215);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1c8397){this['editor']=_0x1c8397,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'](_0x264f87){this['source']=_0x264f87;const _0x7ad1d=new Map(),_0x1a4d2b=new Map(),_0x5beecb=this['editor']['model']['document']['roots']['map'](_0x293de6=>_0x293de6['rootName']);for(const _0x571ffe of _0x5beecb){const _0x383eed=this['editor']['model']['document']['getRoot'](_0x571ffe),_0x549264=T(_0x383eed);_0x7ad1d['set'](_0x571ffe,_0x549264),_0x1a4d2b['set'](_0x571ffe,Object['fromEntries'](_0x383eed['getAttributes']()));}const _0x1ec631=Array['from'](this['editor']['model']['markers'])['map'](_0x456ed4=>[_0x456ed4['name'],_0x456ed4['getRange']()]),_0x4c3b99=this['source']['version'];this['_saveMetaData'](_0x4c3b99,_0x7ad1d,_0x1ec631,_0x1a4d2b),this['_startingRevisionId']=this['_revisionId'];const _0x502766=new Map(),_0x2688c1=new Map();for(const _0x25c62b of _0x5beecb){const _0x488146=F(_0x25c62b);_0x502766['set'](_0x25c62b,_0x488146),_0x2688c1['set'](_0x25c62b,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x502766,[],_0x2688c1);}['getData'](_0x523bc7,_0x727860){if(this['_lastFrom']===_0x523bc7&&this['_lastTo']<=_0x727860)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x727860,!0x0);else{if(!this['_savedMetaData']['has'](_0x523bc7)){const _0x368c1f=this['_getPreviousFrom'](_0x523bc7);this['_calculateMetaData'](_0x368c1f,_0x523bc7,!0x1);}this['_calculateMetaData'](_0x523bc7,_0x727860,!0x0);}return this['_lastFrom']=_0x523bc7,this['_lastTo']=_0x727860,this['_getState']();}['loadState'](_0x21bd02){this['_reset'](),this['_lastFrom']=_0x21bd02['fromVersion'],this['_lastTo']=_0x21bd02['toVersion'];for(const _0x2e0b7d in _0x21bd02['diffData']){const _0x270363=_0x21bd02['diffData'][_0x2e0b7d]['attachChange'],_0x2e1c28=_0x522253(_0x21bd02['diffData'][_0x2e0b7d]['attributesBefore'])||{},_0x3d8c62=this['_makeModelFromViewString'](_0x21bd02['diffData'][_0x2e0b7d]['deletions']);_0x3d8c62['rootName']=_0x2e0b7d,_0x3d8c62['_isAttached']=!_0x270363||!_0x270363['isAttached'],_0x3d8c62['isAttached']=()=>_0x3d8c62['_isAttached'],this['_baseRoots']['set'](_0x2e0b7d,_0x3d8c62),this['_baseRootsAttributes']['set'](_0x2e0b7d,_0x2e1c28),_0x270363&&this['_touchedRoots']['set'](_0x2e0b7d,_0x270363);const _0x53f88e=this['_makeIdsRoot'](_0x3d8c62);this['_baseIdsRoots']['set'](_0x2e0b7d,_0x53f88e);for(const [_0x4999df,_0x18cb6f]of _0x3d8c62['markers']){if(!_0x4999df['startsWith']('revision:'))continue;const _0x315854=_0x4999df['split'](':')[0x2];for(const _0x2bc4e4 of _0x18cb6f['getWalker']({'singleCharacters':!0x0})){const _0x3ddb47=this['_getVidAttributeName'](_0x2bc4e4),_0x2f67b9='elementEnd'==_0x2bc4e4['type']?_0x2bc4e4['previousPosition']['path']['slice'](0x0,-0x1):_0x2bc4e4['previousPosition']['path'],_0x3791ee=_0x53f88e['getNodeByPath'](_0x2f67b9)['getAttribute'](_0x3ddb47);this['_touched']['set'](_0x3791ee,{'userId':_0x315854});}}}this['_startingRevisionId']=this['_revisionId'];const _0x3d4084=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5e73bc=>!this['_touched']['has'](_0x5e73bc));let _0x31ed0b=0x0;const _0x1a9531=new Map();for(const _0x1e2df5 in _0x21bd02['diffData']){const _0x54c61e=_0x21bd02['diffData'][_0x1e2df5]['attachChange'],_0x2adbf1=_0x522253(_0x21bd02['diffData'][_0x1e2df5]['attributesAfter'])||{},_0x52fa75=this['_makeModelFromViewString'](_0x21bd02['diffData'][_0x1e2df5]['insertions']);_0x52fa75['rootName']=_0x1e2df5,_0x52fa75['_isAttached']=!_0x54c61e||_0x54c61e['isAttached'],_0x52fa75['isAttached']=()=>_0x52fa75['_isAttached'],this['_diffRoots']['set'](_0x1e2df5,_0x52fa75),this['_diffRootsAttributes']['set'](_0x1e2df5,_0x2adbf1);const _0x3501cf=this['_makeIdsRoot'](_0x52fa75,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1e2df5,_0x3501cf),_0x1a9531['set'](_0x1e2df5,_0x52fa75['isAttached']()?_0x2adbf1:{});for(const [_0x2c7820,_0x3e507b]of _0x52fa75['markers']){if(!_0x2c7820['startsWith']('revision:'))continue;const _0x558598=_0x2c7820['split'](':')[0x2];for(const _0x4c3f6a of _0x3e507b['getWalker']({'singleCharacters':!0x0})){const _0x42c275=this['_getVidAttributeName'](_0x4c3f6a),_0x1fceea=this['_revisionId']++,_0x2f7122='elementEnd'==_0x4c3f6a['type']?_0x4c3f6a['previousPosition']['path']['slice'](0x0,-0x1):_0x4c3f6a['previousPosition']['path'];_0x3501cf['getNodeByPath'](_0x2f7122)['_setAttribute'](_0x42c275,_0x1fceea),this['_touched']['set'](_0x1fceea,{'userId':_0x558598});}}for(const _0x3fada9 of this['editor']['model']['createRangeIn'](_0x52fa75)['getWalker']({'singleCharacters':!0x0})){const _0xa283ed=this['_getVidAttributeName'](_0x3fada9),_0x1f8825='elementEnd'==_0x3fada9['type']?_0x3fada9['previousPosition']['path']['slice'](0x0,-0x1):_0x3fada9['previousPosition']['path'],_0x44339c=_0x3501cf['getNodeByPath'](_0x1f8825);_0x44339c['getAttribute'](_0xa283ed)>0x0||_0x44339c['_setAttribute'](_0xa283ed,_0x3d4084[_0x31ed0b++]);}for(const [_0x135a58,_0x3e5be2]of _0x52fa75['markers'])_0x135a58['startsWith']('revision:')||this['_markers']['set'](_0x135a58,_0x3e5be2);}const _0x523475=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x523475),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x523475,0x1));const _0x14d749=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x14d749),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x14d749,0x1));const _0x4c4acb=Array['from'](this['_diffRoots'])['map'](([_0x459c86,_0x151fa2])=>[_0x459c86,T(_0x151fa2)]);this['_saveMetaData'](this['_lastTo'],_0x4c4acb,this['_markers'],_0x1a9531);}['_makeModelFromViewString'](_0x4dfaf1){const _0x40f57d=JSON['parse'](_0x4dfaf1),_0x219939=this['editor']['editing']['view']['document'],_0x47129d=new _0x7a1ef9(_0x219939,_0x40f57d['map'](_0x1f7143=>P(_0x1f7143,this['editor'])));return this['editor']['data']['toModel'](_0x47129d);}['_saveMetaData'](_0x1efdde,_0x3e5d20,_0x5569aa,_0x43a9f5){const _0x46def3=new Map(_0x3e5d20),_0x465e37=new Map(_0x522253(_0x43a9f5)),_0x12d486=new Map();for(const [_0x273de6,_0x281433]of _0x5569aa)_0x12d486['set'](_0x273de6,{'start':_0x281433['start']['clone'](),'end':_0x281433['end']['clone'](),'rootName':_0x281433['root']['rootName']});this['_savedMetaData']['set'](_0x1efdde,{'roots':_0x46def3,'markers':_0x12d486,'rootsAttributes':_0x465e37});}['_removeMetaData'](_0xcd7f71){this['_savedMetaData']['delete'](_0xcd7f71);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x2995f2,_0x13d8e1=null){let _0x28ac78=null;_0x2995f2['is']('documentFragment')||(_0x28ac78=new ut(_0x2995f2['name'],{'vid_start':null===_0x13d8e1?this['_revisionId']++:_0x13d8e1++}));const _0x37bbea=[];for(const _0x1de7cd of _0x2995f2['getChildren']())if(_0x1de7cd['is']('element')){_0x37bbea['push'](this['_makeIdsRoot'](_0x1de7cd,_0x13d8e1));const _0x415177=_0x37bbea[_0x37bbea['length']-0x1];null!==_0x13d8e1&&(_0x13d8e1=_0x415177['is']('element','$text')?_0x415177['getAttribute']('vid')+0x1:_0x415177['getAttribute']('vid_end')+0x1);}else{for(let _0x1c4368=0x0;_0x1c4368<_0x1de7cd['offsetSize'];_0x1c4368++)_0x37bbea['push'](new ut('$text',{'vid':null===_0x13d8e1?this['_revisionId']++:_0x13d8e1++}));}if(_0x2995f2['is']('documentFragment')){const _0x593518=F(_0x2995f2['rootName']);return _0x593518['_insertChild'](0x0,_0x37bbea),_0x593518;}return _0x28ac78['_setAttribute']('vid_end',null===_0x13d8e1?this['_revisionId']++:_0x13d8e1++),_0x28ac78['_insertChild'](0x0,_0x37bbea),_0x28ac78;}['_calculateMetaData'](_0x4a279f,_0xee3a12,_0x18cc71){this['_reset']();const {roots:_0x15ac06,markers:_0x26b99c,rootsAttributes:_0x286612}=this['_savedMetaData']['get'](_0x4a279f);this['_baseRoots']=new Map(_0x15ac06),this['_baseRootsAttributes']=new Map(_0x522253(_0x286612));for(const [_0x4acd9c,_0xd189e]of this['_baseRoots'])if('$graveyard'!==_0x4acd9c&&(this['_diffRoots']['set'](_0x4acd9c,T(_0xd189e)),this['_diffRootsAttributes']=new Map(_0x522253(_0x286612)),_0x18cc71)){const _0x2194fe=this['_revisionId'];this['_idsRoots']['set'](_0x4acd9c,this['_makeIdsRoot'](_0xd189e)),this['_baseIdsRoots']['set'](_0x4acd9c,this['_makeIdsRoot'](_0xd189e,_0x2194fe));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x18cc71&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x464c49,_0x829955]of _0x26b99c){const _0x260c7f=this['_baseRoots']['get'](_0x829955['rootName']),_0x47c1a7=this['_diffRoots']['get'](_0x829955['rootName']),_0x45a933=new ft(this['_fixPosition'](_0x829955['start'],_0x260c7f),this['_fixPosition'](_0x829955['end'],_0x260c7f)),_0x3cb575=this['_fixRange'](_0x45a933,_0x47c1a7);_0x260c7f['markers']['set'](_0x464c49,_0x45a933),this['_markers']['set'](_0x464c49,_0x3cb575);}this['_applyOperations'](_0x4a279f,_0xee3a12,_0x18cc71);}['_applyOperations'](_0x503358,_0x5a7ed2,_0x367e14){for(const _0x42a71a of this['source']['getOperations'](_0x503358,_0x5a7ed2))this['_handleOperation'](_0x42a71a,_0x367e14);for(const _0x2adce1 of this['_diffRoots']['values']())_0x2adce1['markers']['clear']();for(const [_0x295279,_0x24c2f7]of this['_markers']){this['_diffRoots']['get'](_0x24c2f7['root']['rootName'])['markers']['set'](_0x295279,_0x24c2f7['clone']());}const _0x33e416=new Map(),_0x2eac2d=new Map();for(const [_0x442b99,_0x4037c5]of this['_diffRoots'])_0x33e416['set'](_0x442b99,T(_0x4037c5)),_0x2eac2d['set'](_0x442b99,this['_diffRootsAttributes']['get'](_0x442b99));this['_saveMetaData'](_0x5a7ed2,_0x33e416,this['_markers'],_0x2eac2d);}['_getPreviousFrom'](_0x357c3a){const _0x272aa6=Array['from'](this['_savedMetaData']['keys']());_0x272aa6['sort']((_0x254429,_0x52b904)=>_0x254429-_0x52b904),_0x272aa6['reverse']();for(const _0x4a38d5 of _0x272aa6)if(_0x4a38d5<_0x357c3a)return _0x4a38d5;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xea46fe,_0xc6d3c3){const _0x28c499=Array['from'](_0xc6d3c3['markers'])['map'](([_0x2aae88,_0x22ba93])=>[_0x2aae88,this['_fixRange'](_0x22ba93,_0xea46fe)]);_0xea46fe['markers']=new Map(_0x28c499);}['_transformMarkers'](_0x4de481){for(const _0x423060 of this['_markers']['values']()){const _0x308d36=_0x423060['getTransformedByOperation'](_0x4de481),_0x23ec03=ft['_createFromRanges'](_0x308d36);_0x423060['start']=_0x23ec03['start'],_0x423060['end']=_0x23ec03['end'];}}['_handleOperation'](_0xb54b28,_0x5b8498){if('addRoot'!=_0xb54b28['type']&&'detachRoot'!=_0xb54b28['type']){if('insert'==_0xb54b28['type']){const _0x5505af=_0xb54b28['position']['root']['rootName'];this['_diffRoots']['has'](_0x5505af)||(this['_diffRoots']['set'](_0x5505af,F(_0x5505af,!0x0)),this['_diffRootsAttributes']['set'](_0x5505af,{}),_0x5b8498&&this['_idsRoots']['set'](_0x5505af,F(_0x5505af,!0x0)));}else{if('addRootAttribute'==_0xb54b28['type']||'removeRootAttribute'==_0xb54b28['type']||'changeRootAttribute'==_0xb54b28['type'])return void this['_handleRootAttributeOperation'](_0xb54b28);'marker'==_0xb54b28['type']&&this['_handleMarkerOperation'](_0xb54b28);}if('marker'!==_0xb54b28['type']){const _0x422bb8=this['_cloneOperation'](_0xb54b28,this['_diffRoots']);_0x422bb8['_execute'](),this['_transformMarkers'](_0x422bb8);}if(_0x5b8498)switch(_0xb54b28['type']){case'insert':this['_handleInsertOperation'](_0xb54b28);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xb54b28);break;case'merge':this['_handleMergeOperation'](_0xb54b28);break;case'split':this['_handleSplitOperation'](_0xb54b28);}}else this['_handleRootOperation'](_0xb54b28,_0x5b8498);}['_cloneOperation'](_0x1328cd,_0x2335b8){const _0x2e1b45=_0x1328cd['clone']();return _0x2e1b45['_authorId']=_0x1328cd['_authorId'],this['_fixOperation'](_0x2e1b45,_0x2335b8),_0x2e1b45;}['_getBaseVids'](_0x11192e){return _0x11192e['map'](_0x89d23c=>{const _0x5732a4=this['_getVidAttributeName'](_0x89d23c);return Number(_0x89d23c['item']['getAttribute'](_0x5732a4));});}['_generateTape'](_0x187a05,_0x7580e3){if(_0x187a05['is']('element','$text'))_0x7580e3['push']({'item':_0x187a05,'type':'text'});else{_0x187a05['is']('element')&&_0x7580e3['push']({'item':_0x187a05,'type':'elementStart'});for(const _0x1957b2 of _0x187a05['getChildren']())this['_generateTape'](_0x1957b2,_0x7580e3);_0x187a05['is']('element')&&_0x7580e3['push']({'item':_0x187a05,'type':'elementEnd'});}return _0x7580e3;}['_getState'](){const _0x7c63b9=new Map(this['_touched']),_0x10e08b=new Map(_0x7c63b9),_0x363b65=new Map(),_0x3c2893={'insertions':{},'deletions':{}},_0x259db8={'insertions':{},'deletions':{}},_0x4f0838=new Map(),_0x3fb57e=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3fb57e['delete']('$graveyard');for(const _0x222b2f of _0x3fb57e){const _0x693cb7=this['_diffRoots']['get'](_0x222b2f)||F(_0x222b2f,!0x1),_0x4290ce=this['_baseRoots']['get'](_0x222b2f)||F(_0x222b2f,!0x1);_0x693cb7['isAttached']()||_0x4290ce['isAttached']()?(_0x3c2893['insertions'][_0x222b2f]=T(_0x693cb7),_0x3c2893['deletions'][_0x222b2f]=T(_0x4290ce),this['_copyMarkers'](_0x3c2893['deletions'][_0x222b2f],_0x4290ce),this['_copyMarkers'](_0x3c2893['insertions'][_0x222b2f],_0x693cb7),_0x259db8['insertions'][_0x222b2f]=this['_generateTape'](this['_idsRoots']['get'](_0x222b2f),[]),_0x259db8['deletions'][_0x222b2f]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x222b2f)||F(_0x222b2f,!0x1),[])):_0x3fb57e['delete'](_0x222b2f);}for(const _0x18a97b of _0x3fb57e){const _0x5eee67=_0x259db8['insertions'][_0x18a97b];for(const _0x351bcf of _0x5eee67){const _0x3efd69=this['_getVidAttributeName'](_0x351bcf),_0x343933=_0x351bcf['item']['getAttribute'](_0x3efd69);_0x10e08b['delete'](_0x343933),_0x343933>=this['_startingRevisionId']&&_0x363b65['set'](_0x343933,_0x7c63b9['get'](_0x343933));}}for(const _0x1dfc89 of _0x3fb57e){const _0x225d5e=_0x259db8['insertions'][_0x1dfc89],_0x2f8a7f=this['_getBaseVids'](_0x259db8['deletions'][_0x1dfc89]);let _0x858dc8=0x0;for(const _0x3c9a00 of _0x225d5e){const _0x90615a=this['_getVidAttributeName'](_0x3c9a00),_0x5cbdfc=_0x3c9a00['item']['getAttribute'](_0x90615a);if(!_0x363b65['has'](_0x5cbdfc)&&!_0x4f0838['has'](_0x5cbdfc)){if(_0x10e08b['has'](_0x5cbdfc))_0x858dc8++;else{if(_0x5cbdfc!=_0x2f8a7f[_0x858dc8]){const _0x29b0fa=_0x7c63b9['get'](_0x5cbdfc)||_0x7c63b9['get'](_0x2f8a7f[_0x858dc8]);for(;_0x5cbdfc!=_0x2f8a7f[_0x858dc8];)_0x10e08b['has'](_0x2f8a7f[_0x858dc8])||(_0x4f0838['set'](_0x2f8a7f[_0x858dc8],_0x29b0fa),_0x7c63b9['set'](_0x2f8a7f[_0x858dc8],_0x29b0fa)),_0x858dc8++;}_0x858dc8++;}}}}for(const _0x2c3a89 of _0x3fb57e){const _0x1f6dfa=_0x259db8['insertions'][_0x2c3a89];for(const _0x4351f1 of _0x1f6dfa){const _0x234ec3=this['_getVidAttributeName'](_0x4351f1),_0x30c4c2=_0x4351f1['item']['getAttribute'](_0x234ec3);if(_0x4f0838['has'](_0x30c4c2)){const _0x1f51da=_0x4f0838['get'](_0x30c4c2);_0x10e08b['has'](_0x30c4c2)||_0x10e08b['set'](_0x30c4c2,{..._0x1f51da}),_0x363b65['set'](_0x30c4c2,{..._0x1f51da});}}}for(const _0x3e3eee of _0x10e08b['keys']())_0x3e3eee>=this['_startingRevisionId']&&_0x10e08b['delete'](_0x3e3eee);const _0x252b64=new Map();for(const _0x134a14 of _0x3fb57e){let _0x534feb=_0x259db8['insertions'][_0x134a14];for(const _0x4d9815 of _0x534feb)if(_0x4d9815['item']['is']('element','tableCell')){const _0x724963=this['_getVidAttributeName'](_0x4d9815),_0x5744b3=_0x4d9815['item']['getAttribute'](_0x724963);if(_0x363b65['has'](_0x5744b3)){const _0x2d5cf9=_0x4d9815['item']['parent']['parent']['getAttribute']('vid_start'),_0x45efb2=_0x252b64['get'](_0x2d5cf9)||new Set();_0x45efb2['add'](_0x363b65['get'](_0x5744b3)['userId']),_0x252b64['set'](_0x2d5cf9,_0x45efb2);}}_0x534feb=_0x259db8['deletions'][_0x134a14];for(const _0x191ab8 of _0x534feb)if(_0x191ab8['item']['is']('element','tableCell')){const _0x11c377=this['_getVidAttributeName'](_0x191ab8),_0x5f0259=_0x191ab8['item']['getAttribute'](_0x11c377);if(_0x10e08b['has'](_0x5f0259)){const _0x319c82=_0x191ab8['item']['parent']['parent']['getAttribute']('vid_start'),_0x24a909=_0x252b64['get'](_0x319c82)||new Set();_0x24a909['add'](_0x10e08b['get'](_0x5f0259)['userId']),_0x252b64['set'](_0x319c82,_0x24a909);}}for(const _0x53aec7 of _0x252b64['keys']())(_0x363b65['has'](_0x53aec7)||_0x10e08b['has'](_0x53aec7))&&_0x252b64['delete'](_0x53aec7);}for(const _0x512943 of _0x3fb57e){const _0x219751=_0x259db8['insertions'][_0x512943];let _0x521b1a=null,_0x2a28f4=null;for(const _0x10d7dc of _0x219751){const _0x37d091=this['_getVidAttributeName'](_0x10d7dc),_0x236fd7=_0x10d7dc['item']['getAttribute'](_0x37d091),_0x122f76=_0x252b64['get'](_0x236fd7);_0x122f76&&'elementStart'==_0x10d7dc['type']&&(_0x521b1a=Array['from'](_0x122f76)[0x0],_0x2a28f4=_0x10d7dc['item']['getAttribute']('vid_end')),_0x521b1a&&(_0x10e08b['set'](_0x236fd7,{'userId':_0x521b1a}),_0x363b65['set'](_0x236fd7,{'userId':_0x521b1a})),_0x236fd7==_0x2a28f4&&(_0x521b1a=null,_0x2a28f4=null);}}const _0x49a735={},_0x3cad1a=new Set();for(const _0x2943a2 of _0x3fb57e){const _0x57c453=_0x3c2893['deletions'][_0x2943a2],_0x3e21f=_0x3c2893['insertions'][_0x2943a2];for(const {userId:_0xccca5e}of this['_touchedMarkers']['values']())null!==_0xccca5e&&_0x3cad1a['add'](_0xccca5e);for(const {userId:_0x2f6d76}of this['_touchedRoots']['values']())null!==_0x2f6d76&&_0x3cad1a['add'](_0x2f6d76);this['_markChanges'](_0x3e21f,_0x259db8['insertions'][_0x2943a2],_0x363b65,'insertion',_0x3cad1a),this['_markChanges'](_0x57c453,_0x259db8['deletions'][_0x2943a2],_0x10e08b,'deletion',_0x3cad1a),_0x49a735[_0x2943a2]={'insertions':this['_prepareViewToSave'](_0x3e21f),'deletions':this['_prepareViewToSave'](_0x57c453),'attachChange':this['_touchedRoots']['get'](_0x2943a2)||null,'attributesBefore':_0x522253(this['_baseRootsAttributes']['get'](_0x2943a2))||{},'attributesAfter':_0x522253(this['_diffRootsAttributes']['get'](_0x2943a2))};}return{'diffData':_0x49a735,'authorsIds':Array['from'](_0x3cad1a)};}['_processRootBeforeSave'](_0x448828){for(const [,_0x1d62e8]of _0x448828['markers']){const _0x561e4c=_0x1d62e8['start']['getAncestors']()['filter'](_0x50d4de=>'tableCell'==_0x50d4de['name']);for(const _0x504401 of _0x561e4c)0x1==_0x504401['childCount']&&_0x504401['getChild'](0x0)['is']('element','paragraph')&&_0x504401['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x7b66ac){this['_processRootBeforeSave'](_0x7b66ac);const _0x104b12=this['editor']['data']['toView'](_0x7b66ac,{}),_0x1897ea=Array['from'](_0x104b12['getChildren']())['map'](_0x5d603c=>this['_getViewJson'](_0x5d603c));return JSON['stringify'](_0x1897ea);}['_getViewJson'](_0x75cf1f){if(_0x75cf1f['is']('$text'))return _0x75cf1f['data'];{const _0x435cc5=_0x75cf1f;return{'type':Object['keys'](E)['find'](_0x277132=>_0x75cf1f instanceof E[_0x277132]),'name':_0x435cc5['name'],'attributes':Array['from'](_0x435cc5['getAttributes']()),'children':Array['from'](_0x435cc5['getChildren']())['map'](_0x926d46=>this['_getViewJson'](_0x926d46))};}}['_markChanges'](_0x3e257c,_0x2decc5,_0x312848,_0x1f14b9,_0x142589){let _0x32caa2=null,_0x17ac1e=null,_0x2a45da=0x0;const _0x49efbc=this['editor']['model'];for(let _0x4e08c7=0x0;_0x4e08c7<_0x2decc5['length'];_0x4e08c7++){const _0x2d141f=this['_getVidAttributeName'](_0x2decc5[_0x4e08c7]),_0x5570d4=_0x2decc5[_0x4e08c7]['item']['getAttribute'](_0x2d141f),_0x2e3ca5=_0x312848['get'](_0x5570d4),_0xa37f14=_0x4e08c7==_0x2decc5['length']-0x1;(!_0x32caa2&&_0x2e3ca5&&(_0x32caa2=_0x2e3ca5,_0x17ac1e=_0x2decc5[_0x4e08c7]),_0x32caa2&&(!_0x2e3ca5||_0x2e3ca5['userId']!=_0x32caa2['userId']))&&(_0x22cc3e(_0x2e3ca5,B(_0x17ac1e,_0x3e257c,_0x49efbc),B(_0x2decc5[_0x4e08c7],_0x3e257c,_0x49efbc)),_0x32caa2=_0x2e3ca5||null,_0x17ac1e=_0x2e3ca5?_0x2decc5[_0x4e08c7]:null),_0x32caa2&&_0xa37f14&&_0x22cc3e(_0x2e3ca5,B(_0x17ac1e,_0x3e257c,_0x49efbc),J(_0x2decc5[_0x4e08c7],_0x3e257c,_0x49efbc));}function _0x22cc3e(_0x5d94c2,_0x5d1183,_0x42b8d1){const _0x3801dc=_0x32caa2['userId'],_0x2f91ad='revision:'+_0x1f14b9+':'+_0x3801dc+':'+_0x2a45da++,_0x50e52b=_0x49efbc['createRange'](_0x5d1183,_0x42b8d1);_0x3e257c['markers']['set'](_0x2f91ad,_0x50e52b),null!==_0x3801dc&&_0x142589['add'](_0x3801dc);}}['_getVidAttributeName'](_0x133b96){switch(_0x133b96['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x46d07d,_0x129069){_0x46d07d['baseVersion']=null;for(const _0x3accea in _0x46d07d){const _0x41a60e=_0x46d07d[_0x3accea];if(_0x41a60e instanceof vt){const _0x527a53=_0x129069['get'](_0x41a60e['root']['rootName']);_0x46d07d[_0x3accea]=this['_fixPosition'](_0x41a60e,_0x527a53);}if(_0x41a60e instanceof ft){const _0x5c4b50=_0x129069['get'](_0x41a60e['root']['rootName']);_0x46d07d[_0x3accea]=this['_fixRange'](_0x41a60e,_0x5c4b50);}'root'===_0x3accea&&(_0x46d07d['root']=_0x129069['get'](_0x46d07d['root']['rootName']));}}['_fixRange'](_0x2a4d37,_0x4ed43a){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2a4d37['start'],_0x4ed43a),this['_fixPosition'](_0x2a4d37['end'],_0x4ed43a));}['_fixPosition'](_0x2d30f3,_0x946b84){return this['editor']['model']['createPositionFromPath'](_0x946b84,_0x2d30f3['path'],_0x2d30f3['stickiness']);}['_handleInsertOperation'](_0x1b82cd){const _0x1b7c41=this['_idsRoots']['get'](_0x1b82cd['position']['root']['rootName']),_0x11bf40=this['_fixPosition'](_0x1b82cd['position'],_0x1b7c41),_0x159e7b=null===_0x1b82cd['_authorId']?null:_0x1b82cd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x20096d=_0x11bf40['parent'],_0x1f8da2=this['_revisionId'],_0x57b090=[];for(const _0x1043c0 of _0x1b82cd['nodes'])if(_0x1043c0['is']('element'))_0x57b090['push'](this['_makeIdsRoot'](_0x1043c0));else{for(let _0x325531=0x0;_0x325531<_0x1043c0['offsetSize'];_0x325531++)_0x57b090['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x348951=this['_revisionId'];for(let _0x439eb3=_0x1f8da2;_0x439eb3<_0x348951;_0x439eb3++)this['_touched']['set'](_0x439eb3,{'userId':_0x159e7b});_0x20096d['_insertChild'](_0x11bf40['offset'],_0x57b090);}['_handleMoveOperation'](_0x1f6106){(_0x1f6106=this['_cloneOperation'](_0x1f6106,this['_idsRoots']))['_execute']();const _0xdecb50=null===_0x1f6106['_authorId']?null:_0x1f6106['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3de219=_0x1f6106['getMovedRangeStart'](),_0x26ef76=_0x3de219['parent'],_0x5b6730=_0x3de219['offset'];!function _0x2d5ccf(_0x1a63de,_0x1126da,_0x404a01,_0x4b72a7){for(let _0xe4ba6c=_0x404a01;_0xe4ba6c<_0x4b72a7;_0xe4ba6c++){const _0x45b99e=_0x1126da['getChild'](_0xe4ba6c);_0x45b99e['is']('element','$text')?_0x1a63de['set'](_0x45b99e['getAttribute']('vid'),{'userId':_0xdecb50}):(_0x1a63de['set'](_0x45b99e['getAttribute']('vid_start'),{'userId':_0xdecb50}),_0x2d5ccf(_0x1a63de,_0x45b99e,0x0,_0x45b99e['childCount']),_0x1a63de['set'](_0x45b99e['getAttribute']('vid_end'),{'userId':_0xdecb50}));}}(this['_touched'],_0x26ef76,_0x5b6730,_0x5b6730+_0x1f6106['howMany']);}['_handleMergeOperation'](_0x5b244a){const _0x27b6c6=null===(_0x5b244a=this['_cloneOperation'](_0x5b244a,this['_idsRoots']))['_authorId']?null:_0x5b244a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3b5993=_0x5b244a['targetPosition']['parent'],_0x34fb85=_0x5b244a['sourcePosition']['parent'],_0x545c62=_0x3b5993['getAttribute']('vid_end'),_0x2f6979=_0x34fb85['getAttribute']('vid_start');_0x3b5993['_setAttribute']('vid_end',_0x34fb85['getAttribute']('vid_end')),_0x34fb85['_setAttribute']('vid_end',_0x545c62),this['_touched']['set'](_0x2f6979,{'userId':_0x27b6c6}),this['_touched']['set'](_0x545c62,{'userId':_0x27b6c6}),_0x5b244a['_execute']();}['_handleSplitOperation'](_0x293b74){const _0x540ab2=null===(_0x293b74=this['_cloneOperation'](_0x293b74,this['_idsRoots']))['_authorId']?null:_0x293b74['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x509ab2=_0x293b74['graveyardPosition'],_0xad0d5=_0x293b74['splitPosition']['parent'];_0x293b74['_execute']();const _0x5d95b5=_0xad0d5['getAttribute']('vid_end'),_0x5e2e4a=_0x293b74['insertionPosition']['nodeAfter'];if(_0x509ab2){const _0x395674=_0x5e2e4a['getAttribute']('vid_end'),_0xa111fd=_0xad0d5['getAttribute']('vid_end');_0xad0d5['_setAttribute']('vid_end',_0x395674),_0x5e2e4a['_setAttribute']('vid_end',_0xa111fd),this['_touched']['set'](_0xad0d5['getAttribute']('vid_end'),{'userId':_0x540ab2}),this['_touched']['set'](_0x5e2e4a['getAttribute']('vid_start'),{'userId':_0x540ab2});}else{const _0xb3bf3b=this['_revisionId']++,_0x115862=this['_revisionId']++;_0xad0d5['_setAttribute']('vid_end',_0xb3bf3b),_0x5e2e4a['_setAttribute']('vid_start',_0x115862),_0x5e2e4a['_setAttribute']('vid_end',_0x5d95b5),this['_touched']['set'](_0xb3bf3b,{'userId':_0x540ab2}),this['_touched']['set'](_0x115862,{'userId':_0x540ab2});}}['_handleMarkerOperation'](_0x2e9834){if(!_0x2e9834['affectsData'])return;const _0x210653=(_0x2e9834=this['_cloneOperation'](_0x2e9834,this['_diffRoots']))['oldRange']?_0x2e9834['oldRange']['root']:null,_0x1f9fae=_0x2e9834['newRange']?_0x2e9834['newRange']['root']:null;_0x210653&&this['_markers']['delete'](_0x2e9834['name']),_0x1f9fae&&this['_markers']['set'](_0x2e9834['name'],_0x2e9834['newRange']['clone']());const _0x3e5550=null===_0x2e9834['_authorId']?null:_0x2e9834['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x301171=_0x2e9834['name'];if(!this['_touchedMarkers']['has'](_0x301171))return void this['_touchedMarkers']['set'](_0x301171,{'range':_0x2e9834['oldRange'],'userId':_0x3e5550});const _0x2e1d2d=this['_touchedMarkers']['get'](_0x301171),_0x3ea047=_0x2e1d2d['range'],_0x36094e=_0x2e9834['newRange'];null==_0x3ea047&&null==_0x36094e||_0x3ea047&&_0x36094e&&_0x3ea047['isEqual'](_0x36094e)?this['_touchedMarkers']['delete'](_0x2e9834['name']):_0x2e1d2d['userId']=_0x3e5550;}['_handleRootOperation'](_0x1f1a47,_0x400304){this['_diffRoots']['has'](_0x1f1a47['rootName'])?this['_diffRoots']['get'](_0x1f1a47['rootName'])['_isAttached']=_0x1f1a47['isAdd']:(this['_diffRoots']['set'](_0x1f1a47['rootName'],F(_0x1f1a47['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1f1a47['rootName'],{}),_0x400304&&this['_idsRoots']['set'](_0x1f1a47['rootName'],F(_0x1f1a47['rootName'],!0x0)));const _0x198b66=null===_0x1f1a47['_authorId']?null:_0x1f1a47['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xf794db=this['_touchedRoots']['get'](_0x1f1a47['rootName']);_0xf794db&&_0xf794db['userId']===_0x198b66?this['_touchedRoots']['delete'](_0x1f1a47['rootName']):this['_touchedRoots']['set'](_0x1f1a47['rootName'],{'userId':_0x198b66,'isAttached':_0x1f1a47['isAdd']});}['_handleRootAttributeOperation'](_0x5254ee){const _0x4cc204=this['_diffRootsAttributes']['get'](_0x5254ee['root']['rootName']);null===_0x5254ee['newValue']?delete _0x4cc204[_0x5254ee['key']]:_0x4cc204[_0x5254ee['key']]=_0x5254ee['newValue'];}}function T(_0x28c0ee){const _0x3252fc=F(_0x28c0ee['rootName'],_0x28c0ee['isAttached']());for(const _0x5b0815 of _0x28c0ee['getChildren']()){const _0x4fe5e7=_0x5b0815['_clone'](!0x0);_0x3252fc['_appendChild'](_0x4fe5e7);}return _0x3252fc;}function F(_0x163691,_0x4ba562=!0x0){const _0x50db73=new gt();return _0x50db73['rootName']=_0x163691,_0x50db73['_isAttached']=_0x4ba562,_0x50db73['isAttached']=()=>_0x50db73['_isAttached'],_0x50db73;}function B(_0x332308,_0x89c18,_0x33a351){const _0x5e5539='elementEnd'==_0x332308['type']?_0x33a351['createPositionAt'](_0x332308['item'],'end'):_0x33a351['createPositionBefore'](_0x332308['item']);return _0x33a351['createPositionFromPath'](_0x89c18,_0x5e5539['path'],_0x5e5539['stickiness']);}function J(_0x352c20,_0x27f946,_0x43a453){const _0x1d3599='elementStart'==_0x352c20['type']?_0x43a453['createPositionAt'](_0x352c20['item'],0x0):_0x43a453['createPositionAfter'](_0x352c20['item']);return _0x43a453['createPositionFromPath'](_0x27f946,_0x1d3599['path'],_0x1d3599['stickiness']);}class os extends _0x4bd208{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x194a47,_0x5ec9ee){super(_0x194a47),this['focusTracker']=new _0x3cab42(),this['keystrokes']=new _0x5c15b4(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5ec9ee),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0xfc84b7({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0xf928ef=_0x567a15=>_0x567a15['stopPropagation']();this['keystrokes']['set']('arrowright',_0xf928ef),this['keystrokes']['set']('arrowleft',_0xf928ef),this['keystrokes']['set']('arrowup',_0xf928ef),this['keystrokes']['set']('arrowdown',_0xf928ef);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x10799f){this['revisionNameInputView']['fieldView']['element']['value']=_0x10799f['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x448fe9){const _0xb0ce42=new at(this['locale'],ti),_0x246975=_0xb0ce42['fieldView'];_0x246975['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2a7d26=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x448fe9&&(_0x2a7d26+='\x20('+m(this['locale'],'optional')+')'),(_0xb0ce42['label']=_0x2a7d26,_0x246975['on']('input',()=>{this['revisionNameInputValue']=_0x246975['element']['value']['trim']();}),_0xb0ce42);}}class f extends _0x455bed{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x59c2e5=this['editor'],_0x202fc3=_0x59c2e5['plugins']['get']('RevisionTracker');_0x59c2e5['ui']['componentFactory']['add']('revisionHistory',_0x243fba=>{const _0x16ebe2=_0x39ef07(_0x243fba),_0x3dc0b6=_0x16ebe2['panelView']['children'],_0x28dea1=new _0x3585c8(_0x243fba),_0x34c181=new te(_0x243fba),_0x50b987=new _0x4d3e68(_0x243fba),_0x3b0717=new te(_0x243fba),_0x15eb80=new _0x4d3e68(_0x243fba);return _0x16ebe2['bind']('isEnabled')['to'](_0x202fc3,'isReady',_0x202fc3,'isEnabled',_0x59c2e5,'isReadOnly',(_0x2e1d11,_0x23d1d1,_0x516da4)=>_0x2e1d11&&_0x23d1d1&&!_0x516da4),_0x16ebe2['buttonView']['set']({'icon':_0x290bc0,'label':m(_0x243fba,'Revision\x20history'),'tooltip':!0x0}),_0x50b987['set']({'label':m(_0x243fba,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x50b987['bind']('isEnabled')['to'](_0x202fc3,'isReady',_0x202fc3,'isEnabled',_0x59c2e5,'isReadOnly',(_0x12e40f,_0x335ea5,_0x4c2b1a)=>_0x12e40f&&_0x335ea5&&!_0x4c2b1a),_0x50b987['on']('execute',()=>this['_showDialog']()),_0x15eb80['set']({'label':m(_0x243fba,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x15eb80['bind']('isEnabled')['to'](_0x202fc3,'isReady',_0x59c2e5,'isReadOnly',(_0x31f552,_0x20aa6c)=>_0x31f552&&!_0x20aa6c),_0x15eb80['on']('execute',()=>{_0x59c2e5['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x16ebe2['isOpen']=!0x1,_0x59c2e5['editing']['view']['focus']();}),_0x34c181['children']['add'](_0x50b987),_0x3b0717['children']['add'](_0x15eb80),_0x28dea1['role']='menu',_0x28dea1['items']['addMany']([_0x34c181,_0x3b0717]),_0x3dc0b6['add'](_0x28dea1),_0x16ebe2;}),_0x59c2e5['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x239db1=this['editor'],_0x52f87a=_0x239db1['locale'],_0x2f16a5=new _0x5a67cd(_0x52f87a),_0x3c0b3e=new _0x10751a(_0x52f87a);_0x2f16a5['buttonView']['set']({'icon':_0x290bc0,'label':m(_0x52f87a,'Revision\x20history')});const _0x796ef1=new _0x3cae0c(_0x52f87a,_0x2f16a5),_0x52ae2e=new _0x2f0fb8(_0x52f87a);_0x52ae2e['set']({'label':m(_0x52f87a,'Save\x20current\x20revision')}),_0x52ae2e['delegate']('execute')['to'](_0x2f16a5),_0x52ae2e['on']('execute',()=>{this['_showDialog']();}),_0x796ef1['children']['add'](_0x52ae2e),_0x3c0b3e['items']['add'](_0x796ef1);const _0x140d82=new _0x3cae0c(_0x52f87a,_0x2f16a5),_0x480200=new _0x2f0fb8(_0x52f87a);return _0x480200['set']({'label':m(_0x52f87a,'Open\x20revision\x20history')}),_0x480200['delegate']('execute')['to'](_0x2f16a5),_0x480200['on']('execute',()=>{_0x239db1['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x140d82['children']['add'](_0x480200),_0x3c0b3e['items']['add'](_0x140d82),_0x2f16a5['panelView']['children']['add'](_0x3c0b3e),_0x2f16a5;}['_showDialog'](){const _0x17d48b=this['editor'],_0x4ed5fc=_0x17d48b['locale'],_0x4c0f29=_0x17d48b['plugins']['get']('Dialog'),_0x2afb05=_0x17d48b['plugins']['get']('RevisionTracker');function _0x496620(_0x11d79e){_0x17d48b['config']['get']('revisionHistory.requireRevisionName')&&''===_0x11d79e['revisionName']?_0x11d79e['revisionNameInputView']['errorText']=m(_0x4ed5fc,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x17d48b['plugins']['get'](u)['saveRevision']({'name':_0x11d79e['revisionName']}),_0x4c0f29['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x496620(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x4c0f29['show']({'id':'revisionSave','title':m(_0x4ed5fc,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x17d48b['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x4c0f29['hide']()},{'label':m(_0x17d48b['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x22deaa){_0x22deaa['bind']('isEnabled')['to'](_0x2afb05,'isReady',_0x2afb05,'isEnabled',_0x17d48b,'isReadOnly',(_0x5eb138,_0x3a16ae,_0x3ba6b1)=>_0x5eb138&&_0x3a16ae&&!_0x3ba6b1);},'onExecute':()=>_0x496620(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x509cf2=this['editor'],_0x1dcc14=_0x509cf2['locale'];this['_saveRevisionFormView']=new os(_0x1dcc14,_0x509cf2['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x4bd208{['changeId'];['_model'];constructor(_0x2a1235,_0x369a65){super(_0x2a1235),this['_model']=_0x369a65,this['changeId']=_0x369a65['id'];const _0x1095b8=this['bindTemplate'],_0x5e4e5e=m(_0x2a1235,_0x369a65['data']['isSuggestion']?'Suggested\x20by':'add'==_0x369a65['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x369a65['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1095b8['to']('type',_0x5544bc=>'ck-revision-change__'+_0x5544bc)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5e4e5e}]},{'text':'\x20'+_0x369a65['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x387491(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x1faf20){super(),this['id']=_0x1faf20['id']||_0x15ad7c(),this['author']=_0x1faf20['author'],this['type']=_0x1faf20['type'],this['data']=_0x1faf20['data']||{},this['rootName']=_0x1faf20['rootName'],this['set']('createdAt',_0x1faf20['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xfbd3b,_0x5f37f8){this['newRevisionId']=_0xfbd3b,this['oldRevisionId']=_0x5f37f8,this['changes']=new _0x1845c7();}['_setChanges'](_0x308db2){for(const _0x26298a of _0x308db2)this['changes']['add'](_0x26298a);}}const Y={'c':_0x1e701c,'a':_0x5bcaae,'e':_0x42f373,'r':_0x37fd56,'u':_0x312f03};class d extends _0x455bed{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x560468,_0x159717,j];}constructor(_0x8b21fe){super(_0x8b21fe),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0xdf7d4,_0x35574a,_0x53c50b)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4023fa=>{for(const _0x2304ec of this['editor']['editing']['view']['document']['roots'])_0x53c50b?_0x4023fa['removeClass']('ck-editor__editable__overlay',_0x2304ec):_0x4023fa['addClass']('ck-editor__editable__overlay',_0x2304ec);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3980f2=>null!==_0x3980f2),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x103b9c,_0x156d99,_0x540c2b)=>_0x103b9c&&_0x540c2b?_0x156d99['changes']['getIndex'](_0x540c2b):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x44cab9,_0x31a6f8)=>_0x44cab9?_0x31a6f8['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x159717);}['init'](){const _0x12c7f5=this['editor'],_0x5395f5=new yt(_0x12c7f5,{'direction':'backward'}),_0x1ee338=new yt(_0x12c7f5,{'direction':'forward'});(_0x12c7f5['commands']['add']('showPreviousChange',_0x5395f5),_0x12c7f5['commands']['add']('showNextChange',_0x1ee338),_0x12c7f5['commands']['add']('restoreRevision',new _t(_0x12c7f5)),this['on']('change:numberOfChanges',()=>{_0x5395f5['refresh'](),_0x1ee338['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x12c7f5['enableReadOnlyMode']('revision-viewer'),_0x12c7f5['plugins']['has']('WidgetToolbarRepository'))&&_0x12c7f5['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x239991){await this['loadRevisionData'](_0x239991);const _0x939e63={};for(const _0x59e66b in _0x239991['diffData']){if(_0x239991['diffData'][_0x59e66b]['attachChange']&&!_0x239991['diffData'][_0x59e66b]['attachChange']['isAttached'])continue;const _0x1e668e=this['_removeRevisionMarkers'](JSON['parse'](_0x239991['diffData'][_0x59e66b]['insertions'])),_0x3d20e2=this['editor']['editing']['view']['document'],_0x25bfef=new _0x7a1ef9(_0x3d20e2,_0x1e668e['map'](_0x34bbf1=>this['_getViewObj'](_0x34bbf1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x939e63[_0x59e66b]=this['editor']['data']['processor']['toData'](_0x25bfef),this['editor']['data']['processor']['useFillerType']('default');}return _0x939e63;}async['getRevisionRootsAttributes'](_0x45f1d1){await this['loadRevisionData'](_0x45f1d1);const _0x2116d3={};for(const _0x2dc406 in _0x45f1d1['diffData'])_0x45f1d1['diffData'][_0x2dc406]['attachChange']&&!_0x45f1d1['diffData'][_0x2dc406]['attachChange']['isAttached']||(_0x2116d3[_0x2dc406]=_0x45f1d1['diffData'][_0x2dc406]['attributesAfter']||{});return _0x2116d3;}['_removeRevisionMarkers'](_0x550b2a){return(_0x550b2a=_0x550b2a['filter'](_0x200e1a=>!_0x200e1a['name']||'revision-start'!==_0x200e1a['name']&&'revision-end'!==_0x200e1a['name']))['forEach'](_0x5c1e16=>{'string'!=typeof _0x5c1e16&&(_0x5c1e16['children']=this['_removeRevisionMarkers'](_0x5c1e16['children']),_0x5c1e16['attributes']=_0x5c1e16['attributes']['filter'](_0x1bf83f=>!_0x1bf83f[0x0]['startsWith']('data-revision-')));}),_0x550b2a;}async['compare'](_0x28a2d0,_0x34be70,_0x3a0eb5=!0x1){if(!this['isEnabled'])return;const _0x5228bf=this['diff'],_0x151b62=this['repository'],_0x330425='string'==typeof _0x28a2d0?_0x151b62['getRevision'](_0x28a2d0):_0x28a2d0,_0x2bd782='string'==typeof _0x34be70?_0x151b62['getRevision'](_0x34be70):_0x34be70,_0x5db495=_0x330425['id'],_0xa0569e=_0x2bd782?_0x2bd782['id']:null;if(!_0x3a0eb5&&this['diff']&&this['diff']['newRevisionId']===_0x5db495&&this['diff']['oldRevisionId']===_0xa0569e)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x5db495,_0xa0569e);const _0x1a3b00=this['_getRevisionsRange'](_0x330425,_0x2bd782,!0x0)['map'](_0x2dddf3=>this['loadRevisionData'](_0x2dddf3));return _0x1a3b00['push'](new Promise(_0x53885f=>{setTimeout(_0x53885f,0x14);})),Promise['all'](_0x1a3b00)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4072b3=this['_getDiff'](_0x5db495,_0xa0569e);for(const _0x2a9d49 of _0x4072b3['changes'])this['_changeIdToChange']['set'](_0x2a9d49['id'],_0x2a9d49);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x475826=>{for(const _0x573069 of this['editor']['model']['document']['getRootNames']())_0x475826['detachRoot'](_0x573069);for(const _0x472f64 of Object['keys'](_0x4072b3['model'])){const _0x14a86b=_0x475826['addRoot'](_0x472f64);for(const _0x1680c8 of Object['keys'](_0x4072b3['attributes'][_0x472f64]))_0x475826['setAttribute'](_0x1680c8,_0x4072b3['attributes'][_0x472f64][_0x1680c8],_0x14a86b);_0x475826['insert'](_0x4072b3['model'][_0x472f64],_0x14a86b,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4072b3['changes'])),this['isReady']=!0x0;})['catch'](_0x3f5c9a=>{console['error'](_0x3f5c9a),this['_cleanUp'](),_0x5228bf&&(this['diff']=_0x5228bf),this['isReady']=!0x0;});}['addRevisionData'](_0x30e526,_0x1dcef3){const _0x4213b2=this['repository']['createRevision'](_0x30e526);return _0x4213b2['on']('_update',(_0x468335,_0x546ae2,_0x42c207)=>_0x1dcef3(_0x546ae2,_0x42c207,_0x4213b2)),this['repository']['addRevision'](_0x4213b2),_0x4213b2;}['loadRevisionData'](_0x52e8bf){if(!_0x52e8bf||_0x52e8bf['diffData'])return Promise['resolve']();{const _0x3d4330=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x3d4330,'revisionId':_0x52e8bf['id']})['then'](_0x1cba7e=>{_0x52e8bf['_update']({'diffData':_0x1cba7e['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x493c40=>{for(const _0x348294 of this['editor']['model']['document']['getRootNames']())_0x493c40['detachRoot'](_0x348294);});}['_sortAndFilterDiffChanges'](_0x5de92e){const _0x27389c=[],_0x344d7a=new Map();for(const _0x2d7a1e of this['editor']['model']['document']['getRootNames']()){const _0xf76d6e=this['editor']['editing']['view']['getDomRoot'](_0x2d7a1e);if(!_0xf76d6e)continue;const _0x34594e=_0xf76d6e['getClientRects']()['item'](0x0);_0x34594e&&(_0x27389c['push'](_0x2d7a1e),_0x344d7a['set'](_0x2d7a1e,_0x34594e));}return _0x27389c['sort']((_0x1b00ae,_0x560032)=>{const _0x16ea19=_0x344d7a['get'](_0x1b00ae),_0x1ba83a=_0x344d7a['get'](_0x560032);return _0x16ea19['y']-_0x1ba83a['y']||_0x16ea19['x']-_0x1ba83a['x'];}),(_0x5de92e=_0x5de92e['filter'](_0x288e4a=>_0x27389c['includes'](_0x288e4a['rootName'])))['sort']((_0xcec34b,_0x139fb2)=>_0x27389c['indexOf'](_0xcec34b['rootName'])-_0x27389c['indexOf'](_0x139fb2['rootName'])),_0x5de92e;}['_makeTape'](_0xbfb6c2){const _0x490bbc=Array['from'](_0xbfb6c2['markers'])['filter'](([_0x2dc3b2,_0x562dae])=>_0x2dc3b2['startsWith']('revision:')&&!_0x562dae['isCollapsed']),_0x4c4089=Array['from'](this['editor']['model']['createRangeIn'](_0xbfb6c2)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x490bbc['length'])for(const _0x4c7a32 of _0x4c4089){const [_0x457219,_0x27eeba]=_0x490bbc[0x0],[,_0xf47dd9,_0x4047d3]=_0x457219['split'](':');if(_0x27eeba['end']['isEqual'](_0x4c7a32['nextPosition'])&&_0x490bbc['shift'](),(_0x4c7a32['previousPosition']['isEqual'](_0x27eeba['start'])||_0x4c7a32['previousPosition']['isAfter'](_0x27eeba['start']))&&('insertion'==_0xf47dd9?_0x4c7a32['isAdded']={'userId':_0x4047d3}:'deletion'==_0xf47dd9&&(_0x4c7a32['isRemoved']={'userId':_0x4047d3})),0x0==_0x490bbc['length'])break;}return _0x4c4089;}['_refreshStartEndIndex'](_0x35a510){const _0x22bda8=new Map();for(let _0xc34d9b=0x0;_0xc34d9b<_0x35a510['length'];_0xc34d9b++)'text'===_0x35a510[_0xc34d9b]['type']?(_0x35a510[_0xc34d9b]['item']['startIndex']=_0xc34d9b,_0x35a510[_0xc34d9b]['item']['endIndex']=_0xc34d9b):('elementStart'===_0x35a510[_0xc34d9b]['type']?_0x35a510[_0xc34d9b]['item']['startIndex']=_0xc34d9b:'elementEnd'===_0x35a510[_0xc34d9b]['type']&&(_0x35a510[_0xc34d9b]['item']['endIndex']=_0xc34d9b),_0x22bda8['set'](_0x35a510[_0xc34d9b]['id'],_0xc34d9b));for(const _0xaec8c4 of _0x22bda8['values']())'elementStart'===_0x35a510[_0xaec8c4]['type']?_0x35a510[_0xaec8c4]['item']['endIndex']=_0x22bda8['get'](_0x35a510[_0xaec8c4]['pairId']):'elementEnd'===_0x35a510[_0xaec8c4]['type']&&(_0x35a510[_0xaec8c4]['item']['startIndex']=_0x22bda8['get'](_0x35a510[_0xaec8c4]['pairId']));}['_processTape'](_0x2a0e70){for(let _0x386527=0x0;_0x386527<_0x2a0e70['length'];_0x386527++){if('elementStart'===_0x2a0e70[_0x386527]['type'])_0x2a0e70[_0x386527]['item']['startIndex']=_0x386527;else{if('elementEnd'===_0x2a0e70[_0x386527]['type']){_0x2a0e70[_0x386527]['item']['endIndex']=_0x386527;const _0x22f3b1=_0x2a0e70[_0x386527]['item']['startIndex'];_0x2a0e70[_0x22f3b1]['pairId']=_0x2a0e70[_0x386527]['id'],_0x2a0e70[_0x386527]['pairId']=_0x2a0e70[_0x22f3b1]['id'];}else _0x2a0e70[_0x386527]['item']['startIndex']=_0x386527,_0x2a0e70[_0x386527]['item']['endIndex']=_0x386527,_0x2a0e70[_0x386527]['pairId']=null;}_0x2a0e70[_0x386527]['markersStart']||(_0x2a0e70[_0x386527]['markersStart']=[],_0x2a0e70[_0x386527]['markersEnd']=[]);}}['_markInsertions'](_0x525d2b,_0x1de24b){const _0x6d756f=_0x525d2b['filter'](_0x37dbc0=>!_0x37dbc0['isAdded']);for(let _0x4b3632=0x0;_0x4b3632<_0x1de24b['length'];_0x4b3632++)_0x1de24b[_0x4b3632]['isAdded']&&(_0x6d756f[_0x4b3632]['isAdded']=_0x1de24b[_0x4b3632]['isAdded']);}['_makeModelFromViewString'](_0xb1eb17){const _0x1bc987=JSON['parse'](_0xb1eb17),_0x4ef823=this['editor']['editing']['view']['document'],_0x560615=new _0x7a1ef9(_0x4ef823,_0x1bc987['map'](_0x2bab5c=>this['_getViewObj'](_0x2bab5c)));return this['editor']['data']['toModel'](_0x560615);}['_getViewObj'](_0x28fe9d){const _0x59bf7a=this['editor']['editing']['view']['document'];if('string'==typeof _0x28fe9d)return new _0x3bf4d8(_0x59bf7a,_0x28fe9d);{const _0x1ed77d=_0x28fe9d['children']['map'](_0xe5ec35=>this['_getViewObj'](_0xe5ec35));return new(Y[_0x28fe9d['type']]||_0x493957)(_0x59bf7a,_0x28fe9d['name'],_0x28fe9d['attributes'],_0x1ed77d);}}['_getDiff'](_0x20a0af,_0xdfe918=null){const _0x4935ea=this['repository']['getRevision'](_0x20a0af),_0x4c83c5=_0xdfe918?this['repository']['getRevision'](_0xdfe918):null,_0x13db22=this['_getRevisionsRange'](_0x4935ea,_0x4c83c5),_0x456759=_0x13db22[_0x13db22['length']-0x1],_0x1fd4d8=new Map(),_0xbe4f24={'model':{},'attributes':{},'changes':[]},_0x5e7775=new Set(),_0x239159=new Map();for(let _0x4ebba8=_0x13db22['length']-0x1;_0x4ebba8>=0x0;_0x4ebba8--){const _0x47d395=_0x13db22[_0x4ebba8];for(const _0x253137 of Object['keys'](_0x47d395['diffData']))if(_0x47d395['diffData'][_0x253137]['attachChange']){const _0x16a8d4=_0x47d395['diffData'][_0x253137]['attachChange'];_0x16a8d4['isAttached']?(_0x5e7775['add'](_0x253137),_0x239159['has'](_0x253137)&&_0x239159['get'](_0x253137)['userId']==_0x16a8d4['userId']?_0x239159['delete'](_0x253137):_0x239159['set'](_0x253137,_0x16a8d4)):_0x239159['has'](_0x253137)?(_0x5e7775['delete'](_0x253137),_0x239159['delete'](_0x253137)):(_0x5e7775['add'](_0x253137),_0x239159['set'](_0x253137,_0x16a8d4));}else _0x5e7775['add'](_0x253137);}for(const _0x1b3f49 of _0x5e7775){const _0x478f7e=_0x239159['has'](_0x1b3f49)&&!_0x239159['get'](_0x1b3f49)['isAttached'];let _0x1b7b15=_0x478f7e?_0x13db22['length']-0x1:0x0;const _0x5511a5=_0x478f7e?-0x1:0x1;for(;_0x13db22[_0x1b7b15];){const _0xb25115=_0x13db22[_0x1b7b15];if(_0xb25115['diffData'][_0x1b3f49]){const _0x50a382=_0x478f7e?_0xb25115['diffData'][_0x1b3f49]['attributesBefore']:_0xb25115['diffData'][_0x1b3f49]['attributesAfter'];_0xbe4f24['attributes'][_0x1b3f49]=_0x50a382?_0x522253(_0x50a382):{};break;}_0x1b7b15+=_0x5511a5;}}for(const _0x572ca4 of _0x13db22){_0x572ca4['model']={};for(const _0x104e2d of _0x572ca4['authors'])_0x1fd4d8['set'](_0x104e2d['id'],_0x104e2d);for(const _0x5314a4 of _0x5e7775){const _0x202402=_0x572ca4['diffData'][_0x5314a4]?_0x572ca4['diffData'][_0x5314a4]['insertions']:'[]',_0x5761f4=_0x572ca4['diffData'][_0x5314a4]?_0x572ca4['diffData'][_0x5314a4]['deletions']:'[]';_0x572ca4['model'][_0x5314a4]={'insertions':this['_makeModelFromViewString'](_0x202402),'deletions':this['_makeModelFromViewString'](_0x5761f4)};}}for(const _0x223825 of _0x5e7775){let _0x56e716=null,_0x45a625=0x0;const _0x1133be=new Map(Array['from'](_0x4935ea['model'][_0x223825]['insertions']['markers'])['filter'](([_0x5a6da8])=>!_0x5a6da8['startsWith']('revision:')));let _0x447a22=0x0;for(const _0x3f26a9 of _0x13db22){const _0x4348bd=this['_makeTape'](_0x3f26a9['model'][_0x223825]['insertions']);_0x3f26a9==_0x4935ea?(_0x56e716=_0x4348bd,_0x45a625=_0x56e716['length'],_0x56e716['forEach'](_0x2b2fcd=>{_0x2b2fcd['id']=_0x447a22++;}),this['_processTape'](_0x56e716)):this['_markInsertions'](_0x56e716,_0x4348bd);const _0x43c4a8=_0x56e716['filter'](_0x3cb3a7=>!_0x3cb3a7['isAdded'])['map'](_0x4af5bf=>_0x4af5bf['id']);let _0x1bb5c2=0x0;const _0x34c125=this['_makeTape'](_0x3f26a9['model'][_0x223825]['deletions']);_0x34c125['forEach'](_0x1b023a=>{_0x1b023a['isRemoved']?_0x1b023a['id']=_0x45a625++:_0x1b023a['id']=_0x43c4a8[_0x1bb5c2++];}),this['_processTape'](_0x34c125),this['_setDistance'](_0x56e716,'isAdded'),this['_setDistance'](_0x34c125,'isRemoved'),_0x3f26a9==_0x4935ea&&this['_markMarkers'](_0x56e716,_0x1133be),_0x56e716=this['_joinTapes'](_0x56e716,_0x34c125),this['_refreshStartEndIndex'](_0x56e716),this['_setDistance'](_0x56e716,'isRemoved');}_0x56e716=_0x56e716['filter'](_0x3358eb=>!(_0x3358eb['isAdded']&&_0x3358eb['isRemoved']));const _0x5d79dd=new Map(_0x456759['model'][_0x223825]['deletions']['markers']),_0x57856d=new Set(_0x1133be['keys']());for(const _0x1e10fb of _0x5d79dd['keys']())_0x57856d['delete'](_0x1e10fb);this['_markSuggestions'](_0x56e716,_0x57856d),this['_fixObsoleteTags'](_0x56e716),_0x56e716=this['_removeMissingPairs'](_0x56e716),_0x56e716=this['_markMismatchedRemovedTags'](_0x56e716),_0x56e716=this['_removeUnsupportedChanges'](_0x56e716);const {root:_0x314ab1,changes:_0x266a31}=this['_makeModelFromTape'](_0x56e716,_0x1fd4d8,_0x223825);_0xbe4f24['model'][_0x223825]=_0x314ab1;const _0x358e69=_0x239159['get'](_0x223825);if(_0x358e69){const _0x4ff183=_0x1fd4d8['get'](_0x358e69['userId']),_0x2c924e=new r({'author':_0x4ff183,'type':_0x358e69['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x223825});_0x266a31['unshift'](_0x2c924e),_0xbe4f24['attributes'][_0x223825]['revisionHistoryAttachChange']=_0x2c924e['id'];}_0xbe4f24['changes']=_0xbe4f24['changes']['concat'](_0x266a31);}return _0xbe4f24;}['_markMarkers'](_0x4e0fb8,_0x4eafda){for(let _0x16f9a3=0x0;_0x16f9a3<_0x4e0fb8['length'];_0x16f9a3++)for(const [_0x4cf526,_0x126e92]of _0x4eafda)_0x126e92['start']['isEqual'](_0x4e0fb8[_0x16f9a3]['previousPosition'])&&_0x4e0fb8[_0x16f9a3]['markersStart']['push'](_0x4cf526),_0x126e92['end']['isEqual'](_0x4e0fb8[_0x16f9a3]['nextPosition'])&&_0x4e0fb8[_0x16f9a3]['markersEnd']['push'](_0x4cf526);}['_joinTapes'](_0x583a4b,_0x194ea7){let _0x390a00=[],_0x6398ed=0x0,_0xc335c2=0x0;for(;_0x6398ed<_0x583a4b['length']||_0xc335c2<_0x194ea7['length'];){const _0xa3cc5=_0x583a4b[_0x6398ed]||{},_0x4205f6=_0x194ea7[_0xc335c2]||{};if(_0xa3cc5['id']==_0x4205f6['id'])_0x6398ed++,_0xc335c2++,_0x390a00['push'](_0xa3cc5);else{if(_0x4205f6['isRemoved']&&_0xa3cc5['isAdded']){const {commonTape:_0x2918d2,iEnd:_0x29471d,jEnd:_0x56ae90}=this['_threeWayMerge'](_0x583a4b,_0x6398ed,_0x194ea7,_0xc335c2);_0x390a00=_0x390a00['concat'](_0x2918d2),_0x6398ed=_0x29471d,_0xc335c2=_0x56ae90;}else _0x4205f6['isRemoved']?(_0xc335c2++,_0x390a00['push'](_0x4205f6)):(_0x6398ed++,_0x390a00['push'](_0xa3cc5));}}return _0x390a00;}['_markSuggestions'](_0x5066cb,_0x411ce1){const _0x4bc998=[];for(let _0x3214fe=0x0;_0x3214fe<_0x5066cb['length'];_0x3214fe++){for(let _0x1ef165=0x0;_0x1ef165<_0x5066cb[_0x3214fe]['markersStart']['length'];_0x1ef165++){const _0x6cc9ea=_0x5066cb[_0x3214fe]['markersStart'][_0x1ef165];if(!_0x411ce1['has'](_0x6cc9ea))continue;const {group:_0x5c3b80,type:_0x45498a,authorId:_0x5b96d5}=_0x37cbcb(_0x6cc9ea);'revision-suggestion'!=_0x5c3b80||'insertion'!=_0x45498a&&'deletion'!=_0x45498a||(_0x4bc998['unshift']({'type':_0x45498a,'name':_0x6cc9ea,'userId':_0x5b96d5}),_0x5066cb[_0x3214fe]['markersStart']['splice'](_0x1ef165,0x1),_0x1ef165--);}_0x5ae532(_0x5066cb[_0x3214fe]);for(let _0x29c4c7=0x0;_0x29c4c7<_0x5066cb[_0x3214fe]['markersEnd']['length'];_0x29c4c7++){const _0x8bc9b0=_0x5066cb[_0x3214fe]['markersEnd'][_0x29c4c7];if(!_0x411ce1['has'](_0x8bc9b0))continue;const {group:_0x23ffa4,type:_0x5c31bc}=_0x37cbcb(_0x8bc9b0);if('revision-suggestion'!=_0x23ffa4||'insertion'!=_0x5c31bc&&'deletion'!=_0x5c31bc)continue;_0x5066cb[_0x3214fe]['markersEnd']['splice'](_0x29c4c7,0x1),_0x29c4c7--;const _0x1c1395=_0x4bc998['findIndex'](_0x359184=>_0x359184['name']==_0x8bc9b0);_0x1c1395>-0x1&&_0x4bc998['splice'](_0x1c1395,0x1);}}function _0x37cbcb(_0x1986fa){const _0xdc610d=_0x1986fa['split'](':');return{'group':_0xdc610d[0x0],'type':_0xdc610d[0x1],'subType':_0xdc610d['length']>=0x5?_0xdc610d[0x2]:null,'id':_0xdc610d['length']<0x5?_0xdc610d[0x2]:_0xdc610d[0x3],'authorId':_0xdc610d['length']<0x5?_0xdc610d[0x3]:_0xdc610d[0x4],'markerCount':0x6==_0xdc610d['length']?_0xdc610d[0x5]:null};}function _0x5ae532(_0x26cd3f){for(let _0x5de5b5=0x0;_0x5de5b5<_0x4bc998['length'];_0x5de5b5++){if(_0x26cd3f['isAdded']&&'insertion'==_0x4bc998[_0x5de5b5]['type'])return _0x26cd3f['isAddSuggestion']=_0x4bc998[_0x5de5b5],void delete _0x26cd3f['isAdded'];if(!_0x26cd3f['isAdded']&&!_0x26cd3f['isRemoved']&&'deletion'==_0x4bc998[_0x5de5b5]['type'])return void(_0x26cd3f['isRemoveSuggestion']=_0x4bc998[_0x5de5b5]);}}}['_setDistance'](_0x29249e,_0x1fe77f){let _0x5f2c1f=0x0,_0x17cf10=!0x1;const _0x171ca6=new Map();for(const _0x20efb1 of _0x29249e)_0x20efb1[_0x1fe77f]?_0x17cf10&&(_0x5f2c1f++,_0x17cf10=!0x1):(_0x5f2c1f++,_0x17cf10=!0x0),_0x171ca6['set'](_0x20efb1['id'],_0x5f2c1f);for(let _0x5f0028=0x0;_0x5f0028<_0x29249e['length'];_0x5f0028++){if('isRemoved'==_0x1fe77f&&_0x29249e[_0x5f0028]['isAdded']||'isAdded'==_0x1fe77f&&_0x29249e[_0x5f0028]['isRemoved'])continue;if('text'==_0x29249e[_0x5f0028]['type']){_0x29249e[_0x5f0028]['distance']=0x0;continue;}const _0x4cc96c=_0x171ca6['get'](_0x29249e[_0x5f0028]['pairId']),_0x577f2a=_0x171ca6['get'](_0x29249e[_0x5f0028]['id']);_0x29249e[_0x5f0028]['distance']=_0x4cc96c-_0x577f2a;}}['_getRevisionsRange'](_0x2c6e9e,_0x494704,_0x2fa500=!0x1){const _0x456fd4=[];let _0x1a2703=this['repository']['getIndex'](_0x2c6e9e),_0x15a464=this['repository']['getIndex'](_0x494704);for(-0x1==_0x15a464&&(_0x15a464=this['repository']['_revisions']['length'],_0x2fa500=!0x1);_0x1a2703<_0x15a464;)_0x456fd4['push'](this['repository']['getRevision'](_0x1a2703)),_0x1a2703++;return _0x2fa500&&_0x456fd4['push'](this['repository']['getRevision'](_0x1a2703)),_0x456fd4;}['_threeWayMerge'](_0x5178f7,_0x3a1697,_0x9fc6f7,_0x5914b3){const _0x45cac2=this['editor']['model']['schema'];let _0x541191=_0x3a1697;for(;_0x5178f7[_0x541191]&&_0x5178f7[_0x541191]['isAdded'];)_0x541191++;let _0x1a2da2=_0x5914b3;for(;_0x9fc6f7[_0x1a2da2]&&_0x9fc6f7[_0x1a2da2]['isRemoved'];)_0x1a2da2++;_0x20834d(_0x5178f7,_0x3a1697,_0x541191),_0x20834d(_0x9fc6f7,_0x5914b3,_0x1a2da2);const _0x197131=_0x9fc6f7['slice'](_0x5914b3,_0x1a2da2)['concat'](_0x5178f7['slice'](_0x3a1697,_0x541191));return _0x197131['sort']((_0x5a1343,_0x2a0a3f)=>_0x5a1343['side']!=_0x2a0a3f['side']?_0x5a1343['side']-_0x2a0a3f['side']:_0x5a1343['level']!=_0x2a0a3f['level']?_0x5a1343['level']-_0x2a0a3f['level']:_0x5a1343['distance']!=_0x2a0a3f['distance']?_0x2a0a3f['distance']-_0x5a1343['distance']:!!_0x5a1343['isAdded']!=!!_0x2a0a3f['isAdded']?-0x1==_0x5a1343['side']||0x0==_0x5a1343['side']?_0x5a1343['isAdded']?-0x1:0x1:_0x5a1343['isAdded']?0x1:-0x1:_0x5a1343['index']-_0x2a0a3f['index']),{'commonTape':_0x197131,'iEnd':_0x541191,'jEnd':_0x1a2da2};function _0x20834d(_0x69196d,_0x3beaf1,_0x1def52){let _0x1df34a=-0x1,_0x1b2934=Number['POSITIVE_INFINITY'],_0x369dff=!0x0;for(let _0x42eecd=_0x3beaf1;_0x42eecd<_0x1def52;_0x42eecd++)if(_0x45cac2['isInline'](_0x69196d[_0x42eecd]['item'])||(_0x369dff=!0x1),_0x69196d[_0x42eecd]['item']['startIndex']<_0x3beaf1&&(_0x1df34a=_0x42eecd),_0x69196d[_0x42eecd]['item']['endIndex']>=_0x1def52){_0x1b2934=_0x42eecd;break;}_0x369dff&&(_0x1df34a=_0x1def52-0x1);for(let _0x8c2bf6=_0x3beaf1;_0x8c2bf6<_0x1def52;_0x8c2bf6++)_0x69196d[_0x8c2bf6]['side']=_0x8c2bf6<=_0x1df34a?-0x1:_0x8c2bf6<_0x1b2934?0x0:0x1,_0x69196d[_0x8c2bf6]['index']=_0x8c2bf6;let _0x238844=0x0;for(let _0x322753=_0x3beaf1;_0x322753<=_0x1df34a;_0x322753++)0x0==_0x69196d[_0x322753]['distance']?_0x69196d[_0x322753]['level']=_0x238844:(_0x238844++,_0x69196d[_0x322753]['level']=_0x238844,_0x238844++);for(let _0x253fe2=_0x3beaf1;_0x253fe2<_0x1def52;_0x253fe2++)0x0==_0x69196d[_0x253fe2]['side']&&(_0x69196d[_0x253fe2]['level']=_0x238844);_0x238844=0x0;for(let _0x19a70e=_0x1def52-0x1;_0x19a70e>=_0x1b2934;_0x19a70e--)0x0==_0x69196d[_0x19a70e]['distance']?_0x69196d[_0x19a70e]['level']=_0x238844:(_0x238844--,_0x69196d[_0x19a70e]['level']=_0x238844,_0x238844--);}}['_fixObsoleteTags'](_0x3e1702){const _0x19eadb=new Map(),_0x33df43=this['editor']['model']['schema'];for(let _0x77d15d=0x1;_0x77d15d<_0x3e1702['length'];_0x77d15d++){let _0x4b66b8,_0x56bf15,_0xa044ea;const _0x25530d=_0x3e1702[_0x77d15d],_0x969ef4=_0x3e1702[_0x77d15d-0x1];if('text'==_0x25530d['type'])continue;if(_0x25530d['type']!=_0x969ef4['type'])continue;if(!_0x33df43['isBlock'](_0x969ef4['item'])||_0x33df43['isLimit'](_0x969ef4['item']))continue;if(!_0x33df43['isBlock'](_0x25530d['item'])||_0x33df43['isLimit'](_0x25530d['item']))continue;if((_0x3e1702[_0x77d15d]['isAdded']||_0x3e1702[_0x77d15d]['isAddSuggestion'])&&_0x3e1702[_0x77d15d-0x1]['isRemoved'])_0x4b66b8=_0x3e1702[_0x77d15d],_0x56bf15=_0x3e1702[_0x77d15d-0x1],_0xa044ea=_0x77d15d-0x1;else{if(!_0x3e1702[_0x77d15d]['isRemoved']||!_0x3e1702[_0x77d15d-0x1]['isAdded']&&!_0x3e1702[_0x77d15d-0x1]['isAddSuggestion'])continue;_0x4b66b8=_0x3e1702[_0x77d15d-0x1],_0x56bf15=_0x3e1702[_0x77d15d],_0xa044ea=_0x77d15d;}const _0x536264=_0x4b66b8['level']==_0x56bf15['level'],_0x8bb158=Math['abs'](_0x4b66b8['level'])<Math['abs'](_0x56bf15['level'])&&0x0==_0x56bf15['distance'];(_0x536264||_0x8bb158)&&(_0x19eadb['set'](_0x56bf15['id'],_0x4b66b8['id']),_0x3e1702['splice'](_0xa044ea,0x1),_0x77d15d--,_0x4b66b8['isAdded']=!0x1);}for(let _0x3ded9e=0x0;_0x3ded9e<_0x3e1702['length'];_0x3ded9e++)_0x19eadb['has'](_0x3e1702[_0x3ded9e]['pairId'])&&(_0x3e1702[_0x3ded9e]['pairId']=_0x19eadb['get'](_0x3e1702[_0x3ded9e]['pairId']));}['_removeMissingPairs'](_0x294e63){const _0x962a2=new Set(_0x294e63['map'](_0x4db991=>_0x4db991['id']));for(let _0x1fc88d=0x0;_0x1fc88d<_0x294e63['length'];_0x1fc88d++)_0x962a2['has'](_0x294e63[_0x1fc88d]['pairId'])||0x0==_0x294e63[_0x1fc88d]['distance']||(_0x294e63[_0x1fc88d]['isIncorrect']=!0x0);return _0x294e63['filter'](_0x57ff31=>!_0x57ff31['isIncorrect']);}['_markMismatchedRemovedTags'](_0x42acf0){const _0x554062=new Set();for(let _0x58b8e2=0x0;_0x58b8e2<_0x42acf0['length'];_0x58b8e2++){if(_0x554062['has'](_0x42acf0[_0x58b8e2]['id'])&&_0x42acf0[_0x58b8e2]['isRemoved']&&(_0x42acf0[_0x58b8e2]['isIncorrect']=!0x0),_0x42acf0[_0x58b8e2]['isIncorrect'])continue;if(0x0==_0x42acf0[_0x58b8e2]['distance'])continue;if('elementStart'!=_0x42acf0[_0x58b8e2]['type'])continue;if(null==_0x42acf0[_0x58b8e2]['pairId'])continue;let _0x2621b1=_0x58b8e2+0x1,_0x3a7259=0x0;for(;_0x42acf0[_0x2621b1]['id']!=_0x42acf0[_0x58b8e2]['pairId'];)'elementStart'==_0x42acf0[_0x2621b1]['type']?_0x3a7259++:'elementEnd'==_0x42acf0[_0x2621b1]['type']&&_0x3a7259--,_0x2621b1++;if(0x0!=_0x3a7259){if(_0x42acf0[_0x58b8e2]['isRemoved'])_0x42acf0[_0x58b8e2]['isIncorrect']=!0x0;else{for(;_0x2621b1!=_0x58b8e2;)_0x42acf0[_0x2621b1]['isRemoved']&&0x0!=_0x42acf0[_0x2621b1]['distance']&&(_0x42acf0[_0x2621b1]['isIncorrect']=!0x0,_0x554062['add'](_0x42acf0[_0x2621b1]['pairId'])),_0x2621b1--;}}}return _0x42acf0['filter'](_0x33365d=>!_0x33365d['isIncorrect']);}['_removeUnsupportedChanges'](_0x486363){const _0x531b99=this['editor']['model']['schema'];for(let _0x1ce454=0x0;_0x1ce454<_0x486363['length'];_0x1ce454++){if(!(_0x486363[_0x1ce454]['isAdded']||_0x486363[_0x1ce454]['isAddSuggestion']||_0x486363[_0x1ce454]['isRemoved']||_0x486363[_0x1ce454]['isRemoveSuggestion']))continue;if(0x0==_0x486363[_0x1ce454]['distance'])continue;const _0x27937d=_0x486363[_0x1ce454]['item'];_0x531b99['isBlock'](_0x27937d)||_0x531b99['isLimit'](_0x27937d)||(_0x486363[_0x1ce454]['isAdded']&&delete _0x486363[_0x1ce454]['isAdded'],_0x486363[_0x1ce454]['isAddSuggestion']&&delete _0x486363[_0x1ce454]['isAddSuggestion'],_0x486363[_0x1ce454]['isRemoveSuggestion']&&delete _0x486363[_0x1ce454]['isRemoveSuggestion'],_0x486363[_0x1ce454]['isRemoved']&&(_0x486363[_0x1ce454]['isIncorrect']=!0x0));}return _0x486363['filter'](_0x39f7ca=>!_0x39f7ca['isIncorrect']);}['_makeModelFromTape'](_0x5a3d97,_0x59e94d,_0x347e96){const _0x1da9fb=new gt(),_0x3623ed=[],_0x1c429d=new Map(),_0x28790b=this['editor']['model'],_0x37b444=_0x28790b['schema'],_0x39b634=[_0x1da9fb],_0x5f3e3d={},_0x319439={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4a6b4d=null;const _0x35d290=[0x0];for(let _0x4f632e=0x0;_0x4f632e<_0x5a3d97['length'];_0x4f632e++)if('elementStart'===_0x5a3d97[_0x4f632e]['type']){_0x5a3d97[_0x4f632e]['previousPosition']=_0x28790b['createPositionFromPath'](_0x1da9fb,_0x35d290);const _0x1999ad=new ut(_0x5a3d97[_0x4f632e]['item']['name'],_0x5a3d97[_0x4f632e]['item']['getAttributes']());_0x39b634[0x0]['_appendChild'](_0x1999ad),_0x35d290['push'](0x0),_0x39b634['unshift'](_0x1999ad),_0x5a3d97[_0x4f632e]['nextPosition']=_0x28790b['createPositionFromPath'](_0x1da9fb,_0x35d290);}else'elementEnd'===_0x5a3d97[_0x4f632e]['type']?(_0x39b634['shift'](),_0x5a3d97[_0x4f632e]['previousPosition']=_0x28790b['createPositionFromPath'](_0x1da9fb,_0x35d290),_0x35d290['pop'](),_0x35d290[_0x35d290['length']-0x1]++,_0x5a3d97[_0x4f632e]['nextPosition']=_0x28790b['createPositionFromPath'](_0x1da9fb,_0x35d290)):(_0x5a3d97[_0x4f632e]['previousPosition']=_0x28790b['createPositionFromPath'](_0x1da9fb,_0x35d290),_0x4a6b4d?_0x4a6b4d['_data']+=_0x5a3d97[_0x4f632e]['item']['data']:_0x4a6b4d=new wt(_0x5a3d97[_0x4f632e]['item']['data'],_0x5a3d97[_0x4f632e]['item']['getAttributes']()),_0x5a3d97[_0x4f632e+0x1]&&'text'===_0x5a3d97[_0x4f632e+0x1]['type']&&_0x5a709d(_0x4a6b4d,_0x5a3d97[_0x4f632e+0x1]['item'])||(_0x39b634[0x0]['_appendChild'](_0x4a6b4d),_0x4a6b4d=null),_0x35d290[_0x35d290['length']-0x1]+=_0x5a3d97[_0x4f632e]['item']['offsetSize'],_0x5a3d97[_0x4f632e]['nextPosition']=_0x28790b['createPositionFromPath'](_0x1da9fb,_0x35d290));for(let _0x444b03=0x0;_0x444b03<_0x5a3d97['length'];_0x444b03++){const _0x187598=_0x5a3d97[_0x444b03]['previousPosition'],_0x1e2aa5=_0x5a3d97[_0x444b03]['nextPosition'];for(const _0x25034b of _0x5a3d97[_0x444b03]['markersStart'])_0x1c429d['set'](_0x25034b,{'start':_0x187598,'end':null});_0x17c8f1('isRemoveSuggestion',_0x444b03,_0x187598,_0x1e2aa5),_0x17c8f1('isAddSuggestion',_0x444b03,_0x187598,_0x1e2aa5),_0x17c8f1('isRemoved',_0x444b03,_0x187598,_0x1e2aa5),_0x17c8f1('isAdded',_0x444b03,_0x187598,_0x1e2aa5);for(const _0x11f9db of _0x5a3d97[_0x444b03]['markersEnd']){_0x1c429d['get'](_0x11f9db)['end']=_0x1e2aa5;}}for(const [_0x22ef74,_0x2ab3ee]of _0x1c429d){const _0x3201e7=this['editor']['model']['createRange'](_0x2ab3ee['start'],_0x2ab3ee['end']);_0x1da9fb['markers']['set'](_0x22ef74,_0x3201e7);}return _0x3623ed['sort']((_0x3170dd,_0x289f4a)=>{const _0x149583=_0x1da9fb['markers']['get']('revision:'+_0x3170dd['id']),_0x1af651=_0x1da9fb['markers']['get']('revision:'+_0x289f4a['id']);return _0x149583['start']['isBefore'](_0x1af651['start'])?-0x1:_0x149583['start']['isAfter'](_0x1af651['start'])?0x1:_0x149583['end']['isBefore'](_0x1af651['end'])?-0x1:_0x149583['end']['isAfter'](_0x1af651['end'])?0x1:'add'===_0x3170dd['type']?-0x1:0x1;}),{'root':_0x1da9fb,'changes':_0x3623ed};function _0x17c8f1(_0x2e294e,_0x29f93e,_0x727e57,_0x2d2086){const _0x50d7b0=!!_0x5a3d97[_0x29f93e][_0x2e294e],_0x44bf08=_0x50d7b0?_0x5a3d97[_0x29f93e][_0x2e294e]['userId']:null,_0x5bc826=_0x29f93e===_0x5a3d97['length']-0x1,_0x389930=_0x319439[_0x2e294e][0x0],_0x2c924a=_0x37b444['isObject'](_0x5a3d97[_0x29f93e]['item']);!_0x5f3e3d[_0x2e294e]&&_0x50d7b0?_0x5f3e3d[_0x2e294e]={'start':_0x727e57,'tapeItem':_0x5a3d97[_0x29f93e],'userId':_0x44bf08,'type':_0x2e294e}:_0x5f3e3d[_0x2e294e]&&!_0x50d7b0?(_0x5f3e3d[_0x2e294e]['end']=_0x727e57,_0x392be4(_0x5f3e3d[_0x2e294e]),_0x5f3e3d[_0x2e294e]=null):_0x5f3e3d[_0x2e294e]&&_0x50d7b0&&_0x5f3e3d[_0x2e294e]['userId']!==_0x44bf08&&(_0x5f3e3d[_0x2e294e]['end']=_0x727e57,_0x389930&&_0x389930['userId']===_0x5f3e3d[_0x2e294e]['userId']||_0x392be4(_0x5f3e3d[_0x2e294e]),_0x5f3e3d[_0x2e294e]={'start':_0x727e57,'tapeItem':_0x5a3d97[_0x29f93e],'userId':_0x44bf08,'type':_0x2e294e}),_0x5f3e3d[_0x2e294e]&&_0x2c924a&&('elementStart'!==_0x5a3d97[_0x29f93e]['type']||_0x389930&&_0x389930['userId']===_0x44bf08||_0x319439[_0x2e294e]['unshift']({'userId':_0x44bf08,'object':_0x5a3d97[_0x29f93e]['item'],'change':_0x5f3e3d[_0x2e294e]}),'elementEnd'===_0x5a3d97[_0x29f93e]['type']&&_0x389930&&_0x389930['object']===_0x5a3d97[_0x29f93e]['item']&&(_0x319439[_0x2e294e]['shift'](),_0x5f3e3d[_0x2e294e]=_0x389930['change'])),_0x5f3e3d[_0x2e294e]&&_0x5bc826&&(_0x5f3e3d[_0x2e294e]['end']=_0x2d2086,_0x392be4(_0x5f3e3d[_0x2e294e]),_0x5f3e3d[_0x2e294e]=null);}function _0x392be4({start:_0x545412,end:_0x55d8c5,tapeItem:_0x2f58a8,userId:_0x5088e1,type:_0x429db0}){const _0x37e468=_0x2f58a8['item'],_0x43d67c=_0x28790b['schema']['isBlock'](_0x37e468)&&!_0x28790b['schema']['isLimit'](_0x37e468),_0x342353=_0x545412['nodeAfter']==_0x55d8c5['parent']&&_0x55d8c5['isAtStart'];if(_0x43d67c&&_0x342353)return;const _0x523dab=_0x28790b['createRange'](_0x545412,_0x55d8c5),_0x237a26=_0x59e94d['get'](_0x5088e1),_0x55cae4=new r({'author':_0x237a26,'type':'isAdded'==_0x429db0||'isAddSuggestion'==_0x429db0?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x429db0||'isRemoveSuggestion'==_0x429db0},'createdAt':new Date(),'rootName':_0x347e96});_0x3623ed['push'](_0x55cae4),_0x1da9fb['markers']['set']('revision:'+_0x55cae4['id'],_0x523dab);}function _0x5a709d(_0x1e74f4,_0x55f0dd){const _0x5e8d92=_0x1e74f4['getAttributes'](),_0x29dce0=_0x55f0dd['getAttributes']();for(const _0x50f77b of _0x5e8d92){if(_0x50f77b[0x1]!==_0x55f0dd['getAttribute'](_0x50f77b[0x0]))return!0x1;_0x29dce0['next']();}return _0x29dce0['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x40922e=>{const _0x35a771=_0x40922e['markerName']['split'](':')[0x1],_0x2f8984=this['_getChangeFromId'](_0x35a771);if(!_0x2f8984)return null;const _0x447034='add'==_0x2f8984['type']?'insertion':'deletion',_0x530fa=['ck-suggestion-marker','ck-suggestion-marker-'+_0x447034];return _0x2f8984['data']['isSuggestion']&&_0x530fa['push']('ck-suggestion-marker-'+_0x447034+'-new'),this['activeChange']==_0x2f8984&&_0x530fa['push']('ck-suggestion-marker--active'),{'classes':_0x530fa,'attributes':{'data-change-id':_0x35a771}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4fbfb6=>{_0x4fbfb6['on']('element:pre',(_0x56ec65,_0x45e8a3,_0x1906a5)=>{const _0x98938=_0x45e8a3['viewItem']['getChild'](0x0);if(!_0x98938||!_0x98938['is']('element','code'))return;if(!_0x1906a5['consumable']['consume'](_0x98938,{'attributes':['vid_start','vid_end']}))return;const _0x112474=_0x45e8a3['modelRange']['start']['nodeAfter'];_0x1906a5['writer']['setAttribute']('vid_start',_0x98938['getAttribute']('vid_start'),_0x112474),_0x1906a5['writer']['setAttribute']('vid_end',_0x98938['getAttribute']('vid_end'),_0x112474);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2c7272=>{_0x2c7272['on']('element',(_0x43a1f8,_0x60bc61,_0x309810)=>{if(!_0x309810['consumable']['consume'](_0x60bc61['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x60bc61['modelRange']['isCollapsed'])return;const _0x54e867=_0x60bc61['modelRange']['start']['nodeAfter'];_0x54e867['hasAttribute']('vid_start')||_0x54e867['hasAttribute']('vid')||(_0x309810['writer']['setAttribute']('vid_start',_0x60bc61['viewItem']['getAttribute']('vid_start'),_0x54e867),_0x309810['writer']['setAttribute']('vid_end',_0x60bc61['viewItem']['getAttribute']('vid_end'),_0x54e867));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x492a35=>_0x492a35['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x203d3e,[,_0x52cea6])=>{['vid_start','vid_end','vid']['includes'](_0x52cea6)&&(_0x203d3e['return']=!0x0,_0x203d3e['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x550064=>{_0x550064['on']('attribute:vid',(_0x24a157,_0x591542,_0x2d519e)=>{if('\x20'!=_0x591542['item']['data']||_0x591542['item']['parent']['maxOffset']>0x1)return;if(!_0x2d519e['consumable']['consume'](_0x591542['item'],_0x24a157['name']))return;const _0x2474ff=_0x2d519e['writer'],_0x32402e=_0x2d519e['mapper']['toViewRange'](_0x591542['range']);_0x2474ff['wrap'](_0x32402e,_0x2474ff['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x402bff){const _0xc99250=_0x402bff['plugins']['get']('RevisionViewer');return(_0xd0f92b,_0x2ebaa4,_0x4c7747)=>{const _0x3b9fb5=_0x2ebaa4['markerName']['split'](':')[0x1],_0x36e57a=_0xc99250['_getChangeFromId'](_0x3b9fb5);if(!_0x36e57a)return null;const _0x5b69f6='add'==_0x36e57a['type']?'split':'merge';if(!_0x4c7747['consumable']['test'](_0x2ebaa4['markerRange'],_0xd0f92b['name']))return;const _0x1f063b=_0x2ebaa4['markerRange']['getWalker'](),_0xdce417=_0x2ebaa4['markerRange']['start'],_0x41238c=_0x402bff['model']['schema'];let _0x44d4b5=null,_0x4ca791=null,_0x3e0cb4=!0x1,_0x5a40b0=!0x1;for(const _0x1a2b74 of _0x1f063b){const _0x1c6d4b=_0x1a2b74['item'];_0x3e0cb4=_0x3e0cb4||_0x41238c['isContent'](_0x1c6d4b);const _0x4cd448=_0x4c7747['mapper']['toViewElement'](_0x1c6d4b);if(_0x4cd448&&_0x4cd448['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1a2b74['type']&&(_0x41238c['isBlock'](_0x1c6d4b)&&!_0x41238c['isLimit'](_0x1c6d4b)&&(_0x1c6d4b['nextSibling']||_0xdce417['isAtEnd']?_0x44d4b5&&_0x44d4b5['parent']==_0x1c6d4b||(_0x44d4b5=_0x1c6d4b,_0x470ddb(_0x1a2b74['previousPosition']),_0x5a40b0=!0x0):_0x4ca791=_0x4ca791||_0x1a2b74['previousPosition']));}function _0x470ddb(_0xd6b05a){const _0x47fc4f=_0x4c7747['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5b69f6}),_0x439568=_0x4c7747['mapper']['toViewPosition'](_0xd6b05a);_0x36e57a['data']['isSuggestion']&&_0x4c7747['writer']['addClass']('ck-suggestion-marker-'+_0x5b69f6+'-new',_0x47fc4f),_0xc99250['activeChange']==_0x36e57a&&_0x4c7747['writer']['addClass']('ck-suggestion-marker--active',_0x47fc4f),_0x4c7747['writer']['insert'](_0x439568,_0x47fc4f),_0x4c7747['mapper']['bindElementToMarker'](_0x47fc4f,_0x2ebaa4['markerName']);}_0x3e0cb4||_0x5a40b0||!_0x4ca791||_0x470ddb(_0x4ca791);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x59436c,_0x3dac78,_0x512882)=>{const _0x40caec=_0x512882['mapper']['markerNameToElements'](_0x3dac78['markerName']);if(_0x40caec){for(const _0x27ea16 of _0x40caec)(_0x27ea16['hasClass']('ck-suggestion-marker-split')||_0x27ea16['hasClass']('ck-suggestion-marker-merge'))&&(_0x512882['mapper']['unbindElementFromMarkerName'](_0x27ea16,_0x3dac78['markerName']),_0x512882['writer']['remove'](_0x27ea16));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3fbaeb,_0x220c7d,_0x4e9f0f)=>{const _0x5601c7=_0x220c7d['markerName']['split'](':')[0x1],_0x25acd2=this['_getChangeFromId'](_0x5601c7);if(!_0x25acd2)return null;const _0x2a1341='add'==_0x25acd2['type']?'split':'merge';if(_0x4e9f0f['consumable']['test'](_0x220c7d['markerRange'],_0x3fbaeb['name']))for(const _0x3874e6 of _0x220c7d['markerRange']['getItems']()){if(!_0x3874e6['is']('element','softBreak'))continue;const _0x3c3991=_0x4e9f0f['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2a1341}),_0x2df884=_0x4e9f0f['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3874e6));_0x25acd2['data']['isSuggestion']&&_0x4e9f0f['writer']['addClass']('ck-suggestion-marker-'+_0x2a1341+'-new',_0x3c3991),this['activeChange']==_0x25acd2&&_0x4e9f0f['writer']['addClass']('ck-suggestion-marker--active',_0x3c3991),_0x4e9f0f['writer']['insert'](_0x2df884,_0x3c3991),_0x4e9f0f['mapper']['bindElementToMarker'](_0x3c3991,_0x220c7d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x428da=>{for(const _0x551566 of this['editor']['model']['document']['getRootNames']()){const _0xca6901=this['editor']['model']['document']['getRoot'](_0x551566),_0xd00c3b=this['editor']['editing']['view']['document']['getRoot'](_0x551566);if(_0xd00c3b){const _0x39799d=_0xca6901['getAttribute']('revisionHistoryAttachChange');if(_0x428da['removeAttribute']('data-change-id',_0xd00c3b),_0x428da['removeClass']('ck-revision-history-root-add',_0xd00c3b),_0x428da['removeClass']('ck-revision-history-root-remove',_0xd00c3b),_0x428da['removeClass']('ck-revision-history-root--active',_0xd00c3b),_0x39799d){const _0x2d0ede=this['_getChangeFromId'](_0x39799d);if(!_0x2d0ede)return null;_0x428da['setAttribute']('data-change-id',_0x39799d,_0xd00c3b),_0x428da['addClass']('ck-revision-history-root-'+_0x2d0ede['type'],_0xd00c3b),this['activeChange']==_0x2d0ede&&_0x428da['addClass']('ck-revision-history-root--active',_0xd00c3b);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x27c7b6=>'revision-comment:'+_0x27c7b6,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x586db3=>'revision-suggestion:'+_0x586db3,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x40aafa=>({'name':'suggestion:'+_0x40aafa,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3cbf6c=>{const _0x2e1068=_0x3cbf6c['markerName']['split'](':')[0x1];return'insertion'!=_0x2e1068&&'deletion'!=_0x2e1068?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2e1068]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x15b567,_0x4ab241,_0x2ef379)=>{const _0xbe4d20=_0x2ef379['mapper']['markerNameToElements'](_0x4ab241['markerName']);if(_0xbe4d20){for(const _0x1a89f6 of _0xbe4d20)_0x1a89f6['is']('uiElement')&&(_0x2ef379['mapper']['unbindElementFromMarkerName'](_0x1a89f6,_0x4ab241['markerName']),_0x2ef379['writer']['remove'](_0x1a89f6));}},{'priority':'high'});}['_getChangeFromId'](_0x569f17){return this['_changeIdToChange']['get'](_0x569f17);}['_getViewForChange'](_0x320ae7){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x320ae7),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5bb598,_0x3c58bf,_0x1c7a6b,_0x4a04d5)=>{_0x4a04d5&&this['_balloon']['remove'](_0x4a04d5),_0x1c7a6b&&(this['_balloon']['add']({'view':_0x1c7a6b,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x45edbb=this['editor']['editing'],_0x18732e=this['_getChangeFromId'](_0x1c7a6b['changeId']);let _0x40a937;if(_0x18732e['data']['isOnRoot']){const _0x2d4651=_0x45edbb['view']['getDomRoot'](_0x18732e['rootName']);_0x40a937=Array['from'](_0x2d4651['getClientRects']());}else{const _0x40d112=this['editor']['model']['markers']['get']('revision:'+_0x1c7a6b['changeId']);_0x40a937=Array['from'](_0x45edbb['mapper']['markerNameToElements'](_0x40d112['name']))['map'](_0x255a3d=>_0x45edbb['view']['domConverter']['mapViewToDom'](_0x255a3d))['map'](_0x5cf191=>Array['from'](_0x5cf191['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x40a937[0x0];return _0x40a937['find'](_0x5aa7c3=>_0x5aa7c3['top']-0x3<=this['_activeViewTarget']['y']&&_0x5aa7c3['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x5aa7c3['left']-0x3<=this['_activeViewTarget']['x']&&_0x5aa7c3['right']+0x3>=this['_activeViewTarget']['x'])||_0x40a937[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x498ca9,_0x35b355,_0x4c12f5,_0xfdd0d6)=>{this['activeView']=_0x4c12f5?this['_getViewForChange'](_0x4c12f5):null,this['editor']['model']['change'](()=>{const _0x449153=this['editor']['editing'];_0xfdd0d6&&(_0xfdd0d6['data']['isOnRoot']?_0x449153['view']['change'](_0x53c0d0=>{_0x53c0d0['removeClass']('ck-revision-history-root--active',_0x449153['view']['document']['getRoot'](_0xfdd0d6['rootName']));}):_0x449153['reconvertMarker']('revision:'+_0xfdd0d6['id'])),_0x4c12f5&&(_0x4c12f5['data']['isOnRoot']?_0x449153['view']['change'](_0x757584=>{_0x757584['addClass']('ck-revision-history-root--active',_0x449153['view']['document']['getRoot'](_0x4c12f5['rootName']));}):_0x449153['reconvertMarker']('revision:'+_0x4c12f5['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x3383a1,_0xf0a201)=>{if(this['activeChange'])return;const _0x242daf=this['_findChangeIdFromDomTarget'](_0xf0a201['target']),_0x38b60d=this['_changeIdToChange']['get'](_0x242daf);_0x38b60d?(this['_activeViewTarget']={'x':_0xf0a201['domEvent']['x'],'y':_0xf0a201['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x38b60d)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x181b7f,_0x50dcbf)=>{const _0x329c6b=this['_findChangeIdFromDomTarget'](_0x50dcbf['target']),_0x330895=this['_changeIdToChange']['get'](_0x329c6b);_0x330895?(this['_activeViewTarget']={'x':_0x50dcbf['domEvent']['x'],'y':_0x50dcbf['domEvent']['y']},_0x330895===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x330895):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3f4dc7){do{const _0x13fb71=_0x3f4dc7['getAttribute']('data-change-id');if(_0x13fb71)return _0x13fb71;_0x3f4dc7=_0x3f4dc7['parent'];}while(_0x3f4dc7);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0xf813f1=>{for(const _0x5e3fa5 of this['editor']['model']['markers'])_0xf813f1['removeMarker'](_0x5e3fa5);});}}function Z(_0x139e86,_0x44b9f3){return(_0x924356,_0x4a38c5,_0x49884e)=>{if(!_0x49884e['consumable']['test'](_0x4a38c5['markerRange'],_0x924356['name']))return;const _0x499949=_0x4a38c5['markerRange']['getWalker'](),_0x3bae0f=_0x4a38c5['markerRange']['start'],_0x3d8c09=_0x139e86['model']['schema'];let _0x801ec8=null,_0x53c1aa=null,_0x29f010=!0x1,_0x46dc2e=!0x1;for(const _0x11e6b2 of _0x499949){const _0x46a024=_0x11e6b2['item'];_0x29f010=_0x29f010||_0x3d8c09['isContent'](_0x46a024);const _0x374a70=_0x49884e['mapper']['toViewElement'](_0x46a024);if(_0x374a70&&_0x374a70['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x11e6b2['type']&&(_0x3d8c09['isBlock'](_0x46a024)&&!_0x3d8c09['isLimit'](_0x46a024)&&(_0x46a024['nextSibling']||_0x3bae0f['isAtEnd']?_0x801ec8&&_0x801ec8['parent']==_0x46a024||(_0x801ec8=_0x46a024,_0x3721b2(_0x11e6b2['previousPosition']),_0x46dc2e=!0x0):_0x53c1aa=_0x53c1aa||_0x11e6b2['previousPosition']));}function _0x3721b2(_0x46de11){const _0x13fb09=_0x49884e['mapper']['toViewPosition'](_0x46de11),_0x116fea=_0x49884e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x44b9f3});_0x49884e['writer']['insert'](_0x13fb09,_0x116fea),_0x49884e['mapper']['bindElementToMarker'](_0x116fea,_0x4a38c5['markerName']);}_0x29f010||_0x46dc2e||!_0x53c1aa||_0x3721b2(_0x53c1aa);};}class _t extends _0x2f1f16{constructor(_0x10b352){super(_0x10b352);const _0x4033fd=_0x10b352['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x4033fd,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4033fd,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x49bc7b=this['editor'],_0x530e30=_0x49bc7b['plugins']['get'](d),_0x32690f=_0x530e30['isReady']?_0x530e30['diff']['newRevisionId']:null;_0x49bc7b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x32690f);}['refresh'](){const {isReady:_0x1ae4d8,isEnabled:_0x31065f,repository:_0x2d61d7,diff:_0x337d8}=this['editor']['plugins']['get'](d),_0x27d213=_0x337d8&&_0x2d61d7['getLaterVisibleRevision'](_0x337d8['newRevisionId']);this['isEnabled']=_0x1ae4d8&&_0x31065f&&Boolean(_0x27d213);}}class yt extends _0x2f1f16{['_step'];constructor(_0x118bf9,{direction:_0x1ec95f}){super(_0x118bf9);const _0x42f33e=_0x118bf9['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x1ec95f?0x1:-0x1,this['listenTo'](_0x42f33e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x42f33e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x42f33e,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1b0f8f=this['editor'],_0x485c2a=_0x1b0f8f['plugins']['get'](d),{isNavigationMode:_0x553af5,currentChangeNumber:_0x1030cd}=_0x485c2a;let _0x5a8e7d;if(_0x485c2a['activeChange']=_0x553af5?_0x485c2a['diff']['changes']['get'](_0x1030cd+this['_step']):_0x485c2a['diff']['changes']['first'],_0x485c2a['activeChange']['data']['isOnRoot'])_0x5a8e7d=_0x1b0f8f['editing']['view']['getDomRoot'](_0x485c2a['activeChange']['rootName']);else{const _0x473956=_0x1b0f8f['model']['markers']['get']('revision:'+_0x485c2a['activeChange']['id']);_0x5a8e7d=_0x3e104d(_0x1b0f8f['editing'],_0x473956);}_0x9fa4ef({'target':_0x5a8e7d,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x18b963,currentChangeNumber:_0x3c759b,numberOfChanges:_0x20cddf,isReady:_0x36547e,isEnabled:_0xd23838}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0xd23838&&_0x36547e&&_0x20cddf)&&(!_0x18b963||(0x1===this['_step']?_0x3c759b<_0x20cddf-0x1:_0x3c759b>0x0));}}class _i extends _0x4bd208{constructor(_0x5adee8){super(_0x5adee8);const _0x3039da=this['bindTemplate'],_0x310d20=new _0x4d3e68(_0x5adee8),_0x22e8f5=new _0x4d3e68(_0x5adee8);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',(_0x5a39ab,_0x5bc203)=>_0x5a39ab&&_0x5bc203>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x4fc045,_0x933388,_0x461cad,_0x4c4c67)=>{if(!_0x4fc045)return m(_0x5adee8,'Loading...');if(!_0x461cad)return m(_0x5adee8,'No\x20changes');const _0x2bc885=m(_0x5adee8,'NUMBER_OF_CHANGES',_0x461cad);return _0x4c4c67?m(_0x5adee8,'X_OF_Y_CHANGES',[_0x933388+0x1,_0x461cad]):_0x2bc885;}),_0x310d20['set']({'label':m(_0x5adee8,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1b4901}),_0x22e8f5['set']({'label':m(_0x5adee8,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xadbe55}),_0x310d20['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x22e8f5['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x310d20['on']('execute',()=>this['fire']('execute','backward')),_0x22e8f5['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',_0x3039da['if']('_isStatusLabelVisible','ck-hidden',_0x299efd=>!_0x299efd)]},'children':[{'text':_0x3039da['to']('isNavigationMode',_0x13017e=>_0x13017e?m(_0x5adee8,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x5adee8,'Total')+':\x20')}]},{'text':_0x3039da['to']('_statusText')}]},new _0x2769e2(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x310d20,_0x22e8f5]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x455bed{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5e17fb=this['editor']['editing']['view'];_0x5e17fb['change'](_0x1de793=>{for(const _0x49abc5 of _0x5e17fb['document']['roots'])_0x1de793['addClass'](ce,_0x49abc5);});}['hide'](){const _0x36159c=this['editor']['editing']['view'];_0x36159c['change'](_0x2f6985=>{for(const _0x2f9508 of _0x36159c['document']['roots'])_0x2f6985['removeClass'](ce,_0x2f9508);});}}class w extends _0x455bed{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x31bbb3=this['editor'],_0xd33db5=_0x31bbb3['plugins']['get'](d),_0x2215c3=_0x31bbb3['plugins']['get'](le);_0x31bbb3['ui']['componentFactory']['add']('exitToEditing',_0x33a468=>{const _0x4f3099=new _0x4d3e68(_0x33a468);return _0x4f3099['set']({'label':m(_0x33a468,'Back\x20to\x20editing'),'icon':_0x52ab0d,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4f3099,'execute',()=>{_0x31bbb3['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4f3099;}),_0x31bbb3['ui']['componentFactory']['add']('restoreRevision',_0x19ffe6=>{const _0x506129=new _0x4d3e68(_0x19ffe6);return _0x506129['set']({'label':m(_0x19ffe6,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x506129['bind']('isEnabled')['to'](_0x31bbb3['commands']['get']('restoreRevision')),this['listenTo'](_0x506129,'execute',()=>_0x31bbb3['execute']('restoreRevision')),_0x506129;}),_0x31bbb3['ui']['componentFactory']['add']('changesNavigation',_0x31045c=>{const _0x1b16b1=new _i(_0x31045c),_0x2d89c4=_0x31bbb3['commands']['get']('showPreviousChange'),_0x5108df=_0x31bbb3['commands']['get']('showNextChange');return _0x1b16b1['bind']('isBackwardNavigationEnabled')['to'](_0x2d89c4,'isEnabled'),_0x1b16b1['bind']('isForwardNavigationEnabled')['to'](_0x5108df,'isEnabled'),_0x1b16b1['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xd33db5),this['listenTo'](_0x1b16b1,'execute',(_0x569043,_0x3cd64d)=>{_0x31bbb3['execute']('forward'===_0x3cd64d?'showNextChange':'showPreviousChange');}),_0x1b16b1;}),_0x2215c3['show'](),_0xd33db5['on']('change:isReady',(_0xf56bce,_0x3f168d,_0x288e56)=>{_0x288e56?_0x2215c3['hide']():_0x2215c3['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x4208c3,_0x166ce6){super(_0x4208c3,_0x166ce6);const _0x434a8b=this['bindTemplate'];this['set']({'label':m(_0x4208c3,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x4208c3,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x434a8b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5539d9=this['fieldView']['element'];this['_tooltipString']=_0x5539d9['scrollWidth']>_0x5539d9['clientWidth']&&_0x5539d9['value']||'';}}class oi extends _0x4bd208{constructor(_0x292e39,_0x4c0d84,_0x48eb13){super(_0x292e39);const _0x2e6623=new _0x452f74();_0x2e6623['set']({'content':_0x39ddd0,'viewBox':'0\x200\x2011\x2010'});const _0x15a458=['ck','ck-revision-history-sidebar__revision-author'];_0x48eb13&&_0x15a458['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1e4bad=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x292e39,_0x48eb13?'Revision\x20creator':'Revision\x20author')},'children':[_0x2e6623,_0x4c0d84['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x15a458},'children':_0x1e4bad});}}function ni(_0x25778a,_0xdb6bb5){const _0x37cbf1=_0x25778a['bindTemplate'],_0x28a954=_0x25778a['locale'],_0x3f277c=_0x39ef07(_0x28a954);_0x3f277c['panelPosition']='sw';const _0x36e384=function(_0x5bc79a,_0x11b17b){const _0x455ac3=function(_0x31f7c1,_0x4b6b55){const _0x2d7cde=_0x31f7c1['locale'],_0x2c84c4={'Compare\x20against\x20selected':m(_0x2d7cde,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x2d7cde,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x2d7cde,'Restore\x20this\x20revision')};return _0x4b6b55['map'](_0x3c5f7a=>{const _0x415e07=_0x2c84c4[_0x3c5f7a['name']];return _0x415e07&&_0x415e07!==_0x3c5f7a['name']&&(_0x3c5f7a['name']=_0x415e07),_0x3c5f7a;});}(_0x5bc79a,_0x11b17b),_0xc3d02d=new _0x1845c7();for(const _0x2e7ee6 of _0x455ac3){const _0x192923={'type':'button','model':new to({'label':_0x2e7ee6['name'],'class':_0x2e7ee6['class'],'withText':!0x0,'role':'menuitem','_action':_0x2e7ee6['action']})};_0x192923['model']['bind']('isEnabled')['to'](_0x5bc79a,'isActionsDropdownOpen',_0x5983a0=>'function'!=typeof _0x2e7ee6['isEnabled']||(!_0x5983a0||_0x2e7ee6['isEnabled'](_0x5bc79a))),_0xc3d02d['add'](_0x192923);}return _0xc3d02d;}(_0x25778a,_0xdb6bb5);return _0x25778a['bind']('isActionsDropdownOpen')['to'](_0x3f277c,'isOpen'),_0x3f277c['buttonView']['set']({'label':m(_0x28a954,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x45238e}),_0x3f277c['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x37cbf1['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x37cbf1['to'](_0x4a831c=>_0x4a831c['stopPropagation']())}}),_0x3f277c['on']('execute',_0x133e91=>{_0x25778a['isReady']&&'function'==typeof _0x133e91['source']['_action']&&_0x133e91['source']['_action'](_0x25778a);}),_0x212302(_0x3f277c,_0x36e384,{'role':'menu'}),_0x3f277c['listenTo'](_0x25778a,'change:isActionsDropdownOpen',(_0x3d528b,_0x205bd2,_0x2dc8ba)=>{if(_0x2dc8ba)for(const _0x2f3518 of _0x3f277c['listView']['items']){const _0xa58972=_0x2f3518['children']['first'],_0x52b98d=_0xdb6bb5['find'](_0x30bab8=>_0x30bab8['action']===_0xa58972['_action'])['isVisible'];_0x2f3518['isVisible']=void 0x0===_0x52b98d||_0x52b98d(_0x25778a);}}),_0x3f277c;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
-
|
|
23
|
+
import{ObservableMixin as _0x3df942,uid as _0x1f968a,Collection as _0x45da80,logWarning as _0x339b97,FocusTracker as _0x1f39a3,KeystrokeHandler as _0x11ba63,scrollViewportToShowTarget as _0x44e10f,ResizeObserver as at,ElementReplacer as ht,CKEditorError as _0x2eb646}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3d1bef,set as _0x4c6a22,unset as _0x597acb,isEqual as _0x171344}from'lodash-es';import{Plugin as _0x314a0a,PendingActions as _0x4b2458,icons as _0x42aafe,Command as _0x33fccf,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x7a2999,getMarkerDomElement as _0x4c436f,ConfirmMixin as _0x3f46a5,sanitizeEditorConfig as _0x292d07}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x1ebfbf,Element as ft,Range as vt,ViewUIElement as _0xd4e326,ViewRawElement as _0x27d44b,ViewEmptyElement as _0x597b98,ViewAttributeElement as _0x10d9e1,ViewContainerElement as _0xe6e3ea,Position as gt,ViewText as _0x166355,ViewElement as _0x2b1c67,DocumentFragment as mt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as _0x571e95,injectCssTransitionDisabler as ts,submitHandler as _0x2af42e,LabeledFieldView as nt,createLabeledInputText as _0x1d2e0c,createDropdown as _0x480339,ListView as te,ListItemView as _0x5f552b,ButtonView as _0x59b23e,MenuBarMenuView as _0x8dd679,MenuBarMenuListView as _0x4ac257,MenuBarMenuListItemView as _0x5053a2,MenuBarMenuListItemButtonView as _0x1b3f57,ContextualBalloon as _0x10aeb9,ToolbarSeparatorView as _0x488774,IconView as _0xc17691,addListToDropdown as _0x581d40,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x2e0acd}from'luxon';class a extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3df942(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1d94b0){super(),this['id']=_0x1d94b0['id']||_0x1f968a(),this['creator']=_0x1d94b0['creator']||null,this['authors']=_0x1d94b0['authors']||[],this['diffData']=_0x1d94b0['diffData']||null,this['toVersion']=_0x1d94b0['toVersion']||0x0,this['fromVersion']=_0x1d94b0['fromVersion']||0x0,this['set']('name',_0x1d94b0['name']||''),this['set']('createdAt',_0x1d94b0['createdAt']||new Date()),this['set']('attributes',_0x1d94b0['attributes']||{});}['setName'](_0x1f9964){this['_update']({'name':_0x1f9964});}['setAttribute'](_0x43556a,_0x3b3fb3){const _0xc2765b=_0x3d1bef(this['attributes']);_0x4c6a22(_0xc2765b,_0x43556a,_0x3b3fb3),this['_update']({'attributes':_0xc2765b});}['removeAttribute'](_0x36d598){const _0x3aed92=_0x3d1bef(this['attributes']);_0x597acb(_0x3aed92,_0x36d598),this['_update']({'attributes':_0x3aed92});}['_update'](_0xdcaf5,_0x96cf9e=!0x1){let _0x2988bf=!0x1;const _0x37169e={'id':this['id']},_0x3388f7=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x352815 of _0x3388f7){const _0x386ed3=_0xdcaf5[_0x352815];void 0x0!==_0x386ed3&&_0x386ed3!==this[_0x352815]&&(this[_0x352815]=_0x386ed3,_0x37169e[_0x352815]=_0x386ed3,_0x2988bf=!0x0);}_0x2988bf&&(_0x37169e['authors']&&(_0x37169e['authorsIds']=_0x37169e['authors']['map'](_0x10158a=>_0x10158a['id']),delete _0x37169e['authors']),this['fire']('_update',_0x37169e,_0x96cf9e));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3cebdc=>_0x3cebdc['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x314a0a{['_revisions'];static get['requires'](){return[_0x7a2999];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x59a36b){super(_0x59a36b),this['_revisions']=new _0x45da80();}['afterInit'](){!async function(_0xced79b){const _0x2a9c4c=_0x14b621([0x79,0x54,0x6d,0x30,0x32,0x35,0x6e,0x31,0x76,0x37,0x56,0x70,0x52,0x46,0x38,0x64,0x55,0x45,0x4a,0x53,0x62,0x58,0x4d,0x71,0x7a,0x50,0x65,0x72,0x6c,0x77,0x4b,0x36,0x4e,0x6f,0x42,0x67,0x34,0x33,0x43,0x49,0x6b,0x41,0x5a,0x6a,0x74,0x39,0x63,0x57,0x59,0x66,0x51,0x4c,0x61,0x78,0x47,0x4f,0x68,0x75,0x69,0x48,0x44,0x73]),_0xceb2b9=0xeb829,_0x59ac37=0x5c87b0f8,_0x591beb=0x5c80d078^_0x59ac37,_0x447471=window[_0x14b621([0x44,0x61,0x74,0x65])][_0x14b621([0x6e,0x6f,0x77])](),_0x308828=_0xced79b[_0x14b621([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3d4655=new window[(_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ab45d=>{_0x308828[_0x14b621([0x6f,0x6e,0x63,0x65])](_0x14b621([0x72,0x65,0x61,0x64,0x79]),_0x2ab45d);}),_0x9a09fd={[_0x14b621([0x6b,0x74,0x79])]:_0x14b621([0x45,0x43]),[_0x14b621([0x75,0x73,0x65])]:_0x14b621([0x73,0x69,0x67]),[_0x14b621([0x63,0x72,0x76])]:_0x14b621([0x50,0x2d,0x32,0x35,0x36]),[_0x14b621([0x78])]:_0x14b621([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]),[_0x14b621([0x79])]:_0x14b621([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]),[_0x14b621([0x61,0x6c,0x67])]:_0x14b621([0x45,0x53,0x32,0x35,0x36])},_0x400904=_0x308828[_0x14b621([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x14b621([0x67,0x65,0x74])](_0x14b621([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xea2942(){let _0x4d495e,_0x5c9027=null,_0x562be6=null;try{if(_0x400904==_0x14b621([0x47,0x50,0x4c]))return _0x14b621([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4d495e=_0x53694a(),!_0x4d495e)return _0x14b621([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4d495e[_0x14b621([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x562be6=_0x582e5f(_0x4d495e[_0x14b621([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4d495e[_0x14b621([0x6a,0x74,0x69])])),await _0x2d83e7()?_0xf6fb8b()?_0x52c29d()?_0x14b621([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x40e317()?(_0x4d495e[_0x14b621([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x14b621([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5c9027=_0xdf9aff(_0x14b621([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4d495e[_0x14b621([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x14b621([0x74,0x72,0x69,0x61,0x6c])&&(_0x5c9027=_0xdf9aff(_0x14b621([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4b409f()):_0x14b621([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x14b621([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x14b621([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x201b7e){return _0x14b621([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x52c29d(){const _0x29df70=[_0x14b621([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x14b621([0x74,0x72,0x69,0x61,0x6c])][_0x14b621([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d495e[_0x14b621([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x447471/0x3e8:0xe10*_0x591beb;return _0x4d495e[_0x14b621([0x65,0x78,0x70])]<_0x29df70;}function _0xf6fb8b(){const _0x13b91a=_0x4d495e[_0x14b621([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x13b91a)return!0x1;if(_0x13b91a[_0x14b621([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14b621([0x2a])))return!0x0;if(_0x13b91a[_0x14b621([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14b621([0x52,0x48])))return!0x0;if(_0x13b91a[_0x14b621([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14b621([0x52,0x52,0x48]))){if(_0x24bf3b())return!0x0;if(_0x3e1979()||_0x286398())return!0x0;}return!0x1;}function _0x40e317(){const _0x139620=_0x4d495e[_0x14b621([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x139620||0x0==_0x139620[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5bcde0}=new URL(window[_0x14b621([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x139620[_0x14b621([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bcde0))return!0x0;const _0x5a6bf8=_0x5bcde0[_0x14b621([0x73,0x70,0x6c,0x69,0x74])](_0x14b621([0x2e]));return _0x139620[_0x14b621([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x52c80c=>_0x52c80c[_0x14b621([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14b621([0x2a])))[_0x14b621([0x6d,0x61,0x70])](_0x3134da=>_0x3134da[_0x14b621([0x73,0x70,0x6c,0x69,0x74])](_0x14b621([0x2e])))[_0x14b621([0x73,0x6f,0x6d,0x65])](_0x538076=>_0x5a6bf8[_0x14b621([0x65,0x76,0x65,0x72,0x79])]((_0x3273ac,_0x51f19d)=>_0x538076[_0x51f19d]===_0x3273ac||_0x538076[_0x51f19d]===_0x14b621([0x2a])));}function _0x4b409f(){return _0x5c9027&&_0x562be6?new window[(_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x619109,_0x2a1f40)=>{_0x5c9027[_0x14b621([0x74,0x68,0x65,0x6e])](_0x619109,_0x2a1f40),_0x562be6[_0x14b621([0x74,0x68,0x65,0x6e])](_0x45b014=>{_0x45b014!=_0x14b621([0x56,0x61,0x6c,0x69,0x64])&&_0x619109(_0x45b014);},_0x2a1f40);}):_0x5c9027||_0x562be6||_0x14b621([0x56,0x61,0x6c,0x69,0x64]);}}function _0x582e5f(_0x4b6925,_0x4d9d2f){return new window[(_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f820b=>{if(_0x392e55())return _0x2f820b(_0x14b621([0x56,0x61,0x6c,0x69,0x64]));_0x508412(),_0x308828[_0x14b621([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x14b621([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x199782=!0x1;const _0x639339=_0x1f968a();function _0x55d287(_0x42b0fa){return!!_0x42b0fa&&(typeof _0x42b0fa===_0x14b621([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x42b0fa===_0x14b621([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x42b0fa[_0x14b621([0x74,0x68,0x65,0x6e])]===_0x14b621([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x42b0fa[_0x14b621([0x63,0x61,0x74,0x63,0x68])]===_0x14b621([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1bc47b(_0x4e7a06){_0xc4e980(_0x4e7a06)[_0x14b621([0x74,0x68,0x65,0x6e])](_0x239eb5=>{if(!_0x239eb5||_0x239eb5[_0x14b621([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x14b621([0x6f,0x6b]))return _0x14b621([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x280173(_0x3b6d5c(_0x639339+_0x4d9d2f))!=_0x239eb5[_0x14b621([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x14b621([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x14b621([0x56,0x61,0x6c,0x69,0x64]);})[_0x14b621([0x74,0x68,0x65,0x6e])](_0x511488=>(_0x5e4558(),_0x511488),()=>{const _0x1947ae=_0x1a4fbb();return null==_0x1947ae?(_0x5e4558(),_0x14b621([0x56,0x61,0x6c,0x69,0x64])):_0x14b621(_0x447471-_0x1947ae>(0x788b34f8^_0x59ac37)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x14b621([0x74,0x68,0x65,0x6e])](_0x2f820b)[_0x14b621([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2f820b(_0x14b621([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2a8d3b=0x5cb15e78^_0x59ac37;function _0x5e4558(){const _0x7463b=_0x14b621([0x6c,0x6c,0x63,0x74,0x2d])+_0x280173(_0x3b6d5c(_0x4b6925)),_0x56a14c=_0x36be7f(_0x280173(window[_0x14b621([0x4d,0x61,0x74,0x68])][_0x14b621([0x63,0x65,0x69,0x6c])](_0x447471/_0x2a8d3b)));window[_0x14b621([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x14b621([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7463b,_0x56a14c);}function _0x1a4fbb(){const _0x129f1b=_0x14b621([0x6c,0x6c,0x63,0x74,0x2d])+_0x280173(_0x3b6d5c(_0x4b6925)),_0x12ff20=window[_0x14b621([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x14b621([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x129f1b);return _0x12ff20?window[_0x14b621([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36be7f(_0x12ff20),0x10)*_0x2a8d3b:null;}function _0xc4e980(_0x1c9add){return new window[(_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x16bd69,_0x1b025f)=>{_0x1c9add[_0x14b621([0x74,0x68,0x65,0x6e])](_0x16bd69,_0x1b025f),window[_0x14b621([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1b025f,0x5c866438^_0x59ac37);});}}_0x308828[_0x14b621([0x6f,0x6e])](_0x14b621([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xace790,_0x10667f)=>{if(_0x10667f[0x0]!=_0x4b6925)return _0x2f820b(_0x14b621([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x10667f[0x1]={..._0x10667f[0x1],[_0x14b621([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x639339};},{[_0x14b621([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x14b621([0x68,0x69,0x67,0x68])}),_0x308828[_0x14b621([0x6f,0x6e])](_0x14b621([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x231b3b=>{_0x55d287(_0x231b3b[_0x14b621([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x199782=!0x0,_0x1bc47b(_0x231b3b[_0x14b621([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x14b621([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x14b621([0x6c,0x6f,0x77])}),_0x3d4655[_0x14b621([0x74,0x68,0x65,0x6e])](()=>{_0x199782||_0x2f820b(_0x14b621([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x392e55(){return _0x308828[_0x14b621([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x14b621([0x76,0x69,0x65,0x77])][_0x14b621([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x14b621([0x61,0x75,0x74,0x6f]);}function _0x508412(){_0x308828[_0x14b621([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x14b621([0x76,0x69,0x65,0x77])][_0x14b621([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x14b621([0x61,0x75,0x74,0x6f]);}}function _0xdf9aff(_0x283b07){const _0x1590a4=[new window[(_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c87f0=>setTimeout(_0x4c87f0,0x5c8e8e34^_0x59ac37)),_0x3d4655[_0x14b621([0x74,0x68,0x65,0x6e])](()=>new window[(_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13a23c=>{const _0x24633b=0x5c87b0ff^_0x59ac37,_0x3026f5=_0xced79b[_0x14b621([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x24b795(){_0x3026f5[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x24633b&&_0x13a23c();}_0x24b795(),_0x3026f5[_0x14b621([0x6f,0x6e])](_0x14b621([0x61,0x64,0x64]),_0x24b795);})),new window[(_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e0b66=>{function _0x2c8549(){for(const _0x18858c in window)if(window[_0x14b621([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x14b621([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x18858c))&&window[_0x18858c]==_0xceb2b9)return _0x2e0b66();_0x308828[_0x14b621([0x73,0x74,0x61,0x74,0x65])]!=_0x14b621([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x14b621([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c8549,0x5c87a370^_0x59ac37);}_0x226888(_0x14b621([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2c8549();})];return window[_0x14b621([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x14b621([0x72,0x61,0x63,0x65])](_0x1590a4)[_0x14b621([0x74,0x68,0x65,0x6e])](()=>_0x283b07);}async function _0xfb44a5(){if(await _0x3d4655,_0x226888(_0x14b621([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x5e5e90=_0xced79b[_0x14b621([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x24b5f5=_0xced79b[_0x14b621([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])](_0x5e5e90[_0x14b621([0x69,0x64])]),_0x180c51=_0x4d6ca4(_0x14b621([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x180c51[_0x14b621([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x5e5e90['id'],_0x24b5f5?_0x24b5f5['id']:null,!0x0),_0x180c51[_0x14b621([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x14b621([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x180c51[_0x14b621([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x180c51[_0x14b621([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x38c732,void(_0x180c51[_0x14b621([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x38c732);}if(_0x226888(_0x14b621([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x45db0b=_0x4d6ca4(_0x14b621([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x45db0b[_0x14b621([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x14b621([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x45db0b[_0x14b621([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x45db0b[_0x14b621([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x38c732,_0x45db0b[_0x14b621([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x38c732;}_0x308828[_0x14b621([0x6d,0x6f,0x64,0x65,0x6c])][_0x14b621([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x38c732,_0x308828[_0x14b621([0x6d,0x6f,0x64,0x65,0x6c])][_0x14b621([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x38c732,_0x308828[_0x14b621([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x14b621([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x24bf3b(){return _0x226888(_0x14b621([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4d6ca4(_0x14b621([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x14b621([0x73,0x74,0x61,0x74,0x65])]==_0x14b621([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3e1979(){return _0x226888(_0x14b621([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 _0x286398(){return _0x226888(_0x14b621([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4ce0d0(_0x1ac392){const _0x2e88bd=_0x54ee4f();_0x308828[_0x2e88bd]=_0x14b621([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])+_0x1ac392,_0x1ac392[_0x14b621([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x14b621([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x54ee4f()]=_0xceb2b9),_0x1ac392!=_0x14b621([0x56,0x61,0x6c,0x69,0x64])&&_0xfb44a5();}function _0x54ee4f(){const _0x2158d9=window[_0x14b621([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x14b621([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x14b621([0x6e,0x6f,0x77])]())[_0x14b621([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x14b621([0x2e]),'');let _0x329130=_0x14b621([0x79]);for(let _0x17231f=0x0;_0x17231f<_0x2158d9[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x17231f+=0x2){let _0x5362f9=window[_0x14b621([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2158d9[_0x14b621([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x17231f,_0x17231f+0x2));_0x5362f9>=_0x2a9c4c[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5362f9-=_0x2a9c4c[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x329130+=_0x2a9c4c[_0x5362f9];}return _0x329130;}function _0x53694a(){const _0x8668c0=_0x400904[_0x14b621([0x73,0x70,0x6c,0x69,0x74])](_0x14b621([0x2e]));if(0x3!=_0x8668c0[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4900ad(_0x8668c0[0x1]);function _0x4900ad(_0x66d169){const _0x4091f2=_0x1bfaa0(_0x66d169);return _0x4091f2&&_0x5e4d3f()?_0x4091f2:null;function _0x5e4d3f(){const _0x3fe3dd=_0x4091f2[_0x14b621([0x6a,0x74,0x69])],_0x1edc49=window[_0x14b621([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3fe3dd[_0x14b621([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3fe3dd[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x504532={..._0x4091f2,[_0x14b621([0x6a,0x74,0x69])]:_0x3fe3dd[_0x14b621([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3fe3dd[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x504532[_0x14b621([0x76,0x63])],_0x3b6d5c(_0x504532)==_0x1edc49;}}}async function _0x2d83e7(){let _0x14a801=!0x0;try{const _0x50b36c=_0x400904[_0x14b621([0x73,0x70,0x6c,0x69,0x74])](_0x14b621([0x2e])),[_0xa6b8d0,_0x31b922,_0x519a41]=_0x50b36c;return _0x2ab846(_0xa6b8d0),await _0x51a0e8(_0xa6b8d0,_0x31b922,_0x519a41),_0x14a801;}catch(_0x2f0d1){return!0x1;}function _0x2ab846(_0x44e1b1){const _0x300e9b=_0x1bfaa0(_0x44e1b1);_0x300e9b&&_0x300e9b[_0x14b621([0x61,0x6c,0x67])]==_0x14b621([0x45,0x53,0x32,0x35,0x36])||(_0x14a801=!0x1);}async function _0x51a0e8(_0xcf8236,_0x2e589c,_0x2fb8ff){const _0x4abd5e=window[_0x14b621([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x14b621([0x66,0x72,0x6f,0x6d])](_0xea760e(_0x2fb8ff),_0xbffabb=>_0xbffabb[_0x14b621([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2d2e4c=new window[(_0x14b621([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x14b621([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xcf8236+_0x14b621([0x2e])+_0x2e589c),_0xae4422=window[_0x14b621([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x14b621([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xae4422)return;const _0x19fac6=await _0xae4422[_0x14b621([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x14b621([0x6a,0x77,0x6b]),_0x9a09fd,{[_0x14b621([0x6e,0x61,0x6d,0x65])]:_0x14b621([0x45,0x43,0x44,0x53,0x41]),[_0x14b621([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x14b621([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x14b621([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xae4422[_0x14b621([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x14b621([0x6e,0x61,0x6d,0x65])]:_0x14b621([0x45,0x43,0x44,0x53,0x41]),[_0x14b621([0x68,0x61,0x73,0x68])]:{[_0x14b621([0x6e,0x61,0x6d,0x65])]:_0x14b621([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x19fac6,_0x4abd5e,_0x2d2e4c)||(_0x14a801=!0x1);}}function _0x1bfaa0(_0x321f46){return _0x321f46[_0x14b621([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x14b621([0x65,0x79]))?JSON[_0x14b621([0x70,0x61,0x72,0x73,0x65])](_0xea760e(_0x321f46)):null;}function _0xea760e(_0x257e64){return window[_0x14b621([0x61,0x74,0x6f,0x62])](_0x257e64[_0x14b621([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x14b621([0x2b]))[_0x14b621([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x14b621([0x2f])));}function _0x3b6d5c(_0x128037){let _0x5d4803=0x1505;function _0x5a322c(_0x12ce8d){for(let _0x33edff=0x0;_0x33edff<_0x12ce8d[_0x14b621([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33edff++){const _0x54f07f=_0x12ce8d[_0x14b621([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x33edff);_0x5d4803=(_0x5d4803<<0x5)+_0x5d4803+_0x54f07f,_0x5d4803&=_0x5d4803;}}function _0xbed42(_0x1798a4){Array[_0x14b621([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1798a4)?_0x1798a4[_0x14b621([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xbed42):_0x1798a4&&typeof _0x1798a4==_0x14b621([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x14b621([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1798a4)[_0x14b621([0x73,0x6f,0x72,0x74])]()[_0x14b621([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x10e658,_0x2ad5cb])=>{_0x5a322c(_0x10e658),_0xbed42(_0x2ad5cb);}):_0x5a322c(window[_0x14b621([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1798a4));}return _0xbed42(_0x128037),_0x5d4803>>>0x0;}function _0x280173(_0x48c9b9){return _0x48c9b9[_0x14b621([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x14b621([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x14b621([0x30]));}function _0x36be7f(_0x44cda7){return _0x44cda7[_0x14b621([0x73,0x70,0x6c,0x69,0x74])]('')[_0x14b621([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x14b621([0x6a,0x6f,0x69,0x6e])]('');}function _0x226888(_0x2f48b5){return _0x308828[_0x14b621([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x14b621([0x68,0x61,0x73])](_0x2f48b5);}function _0x4d6ca4(_0x3f15fb){return _0x308828[_0x14b621([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x14b621([0x67,0x65,0x74])](_0x3f15fb);}function _0x38c732(){}function _0x14b621(_0x29cea7){return _0x29cea7['map'](_0x47289b=>String['fromCharCode'](_0x47289b))['join']('');}_0x4ce0d0(await _0xea2942());}(this);}['createRevision'](_0x8e856){const _0x34ee40=this['editor']['plugins']['get']('Users');return new a({'id':_0x8e856['id'],'name':_0x8e856['name'],'creator':_0x8e856['creatorId']?_0x34ee40['getUser'](_0x8e856['creatorId']):null,'diffData':_0x8e856['diffData']||_0x8e856['data'],'authors':_0x8e856['authorsIds']['map'](_0x3bd56c=>_0x34ee40['getUser'](_0x3bd56c)),'createdAt':new Date(_0x8e856['createdAt']),'attributes':_0x8e856['attributes'],'fromVersion':_0x8e856['fromVersion'],'toVersion':_0x8e856['toVersion']});}['addRevision'](_0x40faf3,_0x43bf8e=0x0){this['_revisions']['add'](_0x40faf3,_0x43bf8e);}['getRevision'](_0x8388df){return this['_revisions']['get'](_0x8388df);}['getRevisions'](_0x275b3d={'toJSON':!0x1}){const _0x199058=Array['from'](this['_revisions']);return _0x199058['reverse'](),_0x275b3d['toJSON']?_0x199058['map'](_0x4db1f5=>_0x4db1f5['toJSON']()):_0x199058;}['getIndex'](_0x2b496f){return this['_revisions']['getIndex'](_0x2b496f);}['getEarlierVisibleRevision'](_0x214782){const [,_0x1ca0bd]=this['getRevisionsIterator'](_0x214782,{'direction':'earlier'});return _0x1ca0bd;}['getLaterVisibleRevision'](_0x365197){const [,_0x3daaa3]=this['getRevisionsIterator'](_0x365197,{'direction':'later'});return _0x3daaa3;}['getRevisionsInDiff'](_0x10bc22){const _0x1382bd=[];for(const _0x3526dd of this['getRevisionsIterator'](_0x10bc22['newRevisionId']))if(_0x1382bd['push'](_0x3526dd),_0x3526dd['id']===_0x10bc22['oldRevisionId'])break;return _0x1382bd;}*['getRevisionsIterator'](_0x5f1878,{direction:_0x2244c6='earlier',filter:_0x1f6284=()=>!0x0}={}){const _0x393b57='earlier'===_0x2244c6?0x1:-0x1;let _0x31a8e8=this['_revisions']['get'](_0x5f1878),_0x13c9ce=this['getIndex'](_0x31a8e8);for(yield _0x31a8e8;_0x31a8e8;){if(_0x13c9ce+=_0x393b57,_0x31a8e8=this['getRevision'](_0x13c9ce),!_0x31a8e8)return;_0x1f6284(_0x31a8e8)&&(yield _0x31a8e8);}}}function m(_0x1ba0c1,_0x135308,_0x441533){const t=_0x1ba0c1['t'];switch(_0x135308){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'},_0x441533);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x441533);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const P={'c':_0xe6e3ea,'a':_0x10d9e1,'e':_0x597b98,'r':_0x27d44b,'u':_0xd4e326};class l extends _0x314a0a{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x7a2999,j,_0x4b2458];}constructor(_0x21943d){super(_0x21943d),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2b2ba9=_0x1f968a();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2b2ba9},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x288642=this['repository']['getRevision'](0x0),_0x5cc797=_0x288642&&null===_0x288642['creator']?_0x288642:null;if(this['_continueCurrentRevision']=!!_0x5cc797&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x338f25=this['_source']['getCurrentRevisionId'](),_0x26fe00=this['repository']['getRevision'](_0x338f25);if(_0x26fe00)this['_startingVersion']=_0x26fe00['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0xec1f5b=this['_source']['history']['_operations']['find'](_0x36fc55=>!_0x36fc55['_isInit']),_0x2ad352=_0xec1f5b?_0xec1f5b['baseVersion']:this['_source']['history']['version'];_0x288642?(_0x288642['toVersion']<_0x2ad352&&_0x288642['_update']({'toVersion':_0x2ad352}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5cc797['id'],this['_startingVersion']=_0x5cc797['fromVersion']):(this['_startingVersion']=_0x288642['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2ad352,this['_continueCurrentRevision']=!0x1);}}else _0x5cc797&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5cc797['toVersion'],this['editor']['model']['document']['history']['version']),_0x5cc797['fromVersion']===_0x5cc797['toVersion']?(0x0!==_0x5cc797['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5cc797['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5cc797['id'],this['_startingVersion']=_0x5cc797['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',_0xdbe285=>!_0xdbe285),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x223495=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3be0bf;for(const _0xe8fbce in _0x223495){const _0x48ca95=_0xe8fbce,_0x326949=_0x223495[_0x48ca95];if('revisionHistoryLicenseKeyValid'==_0x326949||'revisionHistoryLicenseKeyInvalid'==_0x326949||'revisionHistoryLicenseKeyExpired'==_0x326949||'revisionHistoryLicenseKeyDomainLimit'==_0x326949||'revisionHistoryLicenseKeyNotAllowed'==_0x326949||'revisionHistoryLicenseKeyEvaluationLimit'==_0x326949||'revisionHistoryLicenseKeyTrialLimit'==_0x326949||'revisionHistoryLicenseKeyUsageLimit'==_0x326949){delete _0x223495[_0x48ca95],_0x3be0bf=_0x326949,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x3be0bf&&_0x223495['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x3be0bf&&_0x223495['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x3be0bf&&_0x223495['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x3be0bf&&_0x223495['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x3be0bf&&_0x223495['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x3be0bf&&_0x223495['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x3be0bf&&_0x223495['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x531386=this['repository']['getRevision'](0x0),_0x146a50=await this['getRevisionDocumentData'](_0x531386),_0x4d1432=await this['getRevisionRootsAttributes'](_0x531386);this['_replaceEditorDataWithRevisionData'](_0x146a50,_0x4d1432);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2416b2){this['_source']=_0x2416b2;}async['update'](){const _0xedeab6=await this['_source']['getLatestVersion']();if(_0xedeab6>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3b3b3b=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0xedeab6});_0x3b3b3b['authors']=_0x3b3b3b['authorsIds']['map'](_0xa99643=>this['editor']['plugins']['get']('Users')['getUser'](_0xa99643)),this['currentRevision']['_update'](_0x3b3b3b);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x30f531={},_0x226aa9=null){const _0x5411a9=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x226aa9>this['currentRevision']['toVersion']&&(_0x226aa9=null),null===_0x226aa9&&(_0x226aa9=await this['_source']['getLatestVersion']());const _0x393388=this['_getFromVersion'](_0x226aa9),_0x4d89b3=this['buildRevisionData']({'from':_0x393388,'to':_0x226aa9});if(this['currentRevision']['toVersion']<_0x226aa9){const _0x1a253c=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x226aa9,'to':_0x226aa9});_0x1a253c['authors']=[],_0x1a253c['authorsIds']=[],_0x1a253c['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1a253c,!0x0),delete _0x1a253c['authors'],_0x5411a9['push'](_0x1a253c);}_0x30f531['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x30f531['name']=_0x30f531['name']||null,_0x30f531['id']=_0x30f531['id']||_0x1f968a(),_0x30f531={..._0x30f531,..._0x4d89b3};const _0x95ee99=this['addRevisionData'](_0x30f531);_0x5411a9['push'](_0x30f531);const _0x14a9d1=this['repository']['getIndex'](_0x95ee99);if(0x0!==_0x14a9d1){const _0x33a2c1=this['repository']['getRevision'](_0x14a9d1-0x1);if(_0x33a2c1['fromVersion']!==_0x226aa9){const _0x306bd3=this['_revisionDataBuilder']['getData'](_0x226aa9,_0x33a2c1['toVersion']),_0x10357d={'id':_0x33a2c1['id'],'diffData':_0x306bd3['diffData'],'authorsIds':_0x306bd3['authorsIds'],'authors':_0x306bd3['authorsIds']['map'](_0x400b73=>this['editor']['plugins']['get']('Users')['getUser'](_0x400b73)),'fromVersion':_0x226aa9};_0x33a2c1===this['currentRevision']&&(_0x10357d['createdAt']=new Date(_0x30f531['createdAt']['getTime']()+0xa)),_0x33a2c1['_update'](_0x10357d,!0x0),delete _0x10357d['authors'],_0x5411a9['push'](_0x10357d);}}if(this['adapter']){for(const _0x305882 of _0x5411a9)this['_bufferUpdate'](_0x305882['id'],_0x305882,!0x0);this['sendBufferedUpdates']();}return _0x95ee99;}['addRevisionData'](_0x29a172){const _0x4c0e5d=this['repository']['createRevision'](_0x29a172);return this['adapter']&&_0x4c0e5d['on']('_update',(_0x437941,_0x1e7899,_0x237b9c)=>{_0x237b9c||(this['_bufferUpdate'](_0x1e7899['id'],_0x1e7899,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4c0e5d,this['_findInsertionIndex'](_0x4c0e5d)),_0x4c0e5d;}async['getRevisionDocumentData'](_0x53c659){await this['_loadRevisionData'](_0x53c659);const _0x3d1ddc={};for(const _0x4660ba in _0x53c659['diffData']){if(_0x53c659['diffData'][_0x4660ba]['attachChange']&&!_0x53c659['diffData'][_0x4660ba]['attachChange']['isAttached'])continue;const _0x151da3=this['_removeRevisionMarkers'](JSON['parse'](_0x53c659['diffData'][_0x4660ba]['insertions'])),_0x15da8d=this['editor']['editing']['view']['document'],_0x55863e=new _0x1ebfbf(_0x15da8d,_0x151da3['map'](_0x5693d7=>C(_0x5693d7,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x3d1ddc[_0x4660ba]=this['editor']['data']['processor']['toData'](_0x55863e),this['editor']['data']['processor']['useFillerType']('default');}return _0x3d1ddc;}async['getRevisionRootsAttributes'](_0x1de987){await this['_loadRevisionData'](_0x1de987);const _0x56f9fa={};for(const _0x129cda in _0x1de987['diffData'])_0x1de987['diffData'][_0x129cda]['attachChange']&&!_0x1de987['diffData'][_0x129cda]['attachChange']['isAttached']||(_0x56f9fa[_0x129cda]=_0x1de987['diffData'][_0x129cda]['attributesAfter']||{});return _0x56f9fa;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x920144=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x790af5=0x0;_0x790af5<_0x920144['length'];_0x790af5++){const _0x9cc803=_0x920144[_0x790af5];let _0x3c3a61=!0x1;for(const _0x1603dc of Object['keys'](_0x9cc803))void 0x0===_0x9cc803[_0x1603dc]?delete _0x9cc803[_0x1603dc]:'id'!==_0x1603dc&&(_0x3c3a61=!0x0);_0x3c3a61||(_0x920144[_0x790af5]=null);}if(_0x920144=_0x920144['filter'](_0x554899=>null!==_0x554899),!_0x920144['length'])return;for(let _0x590bf0=0x0;_0x590bf0<_0x920144['length'];_0x590bf0++){const _0x1e2ef4=_0x920144[_0x590bf0];void 0x0!==_0x1e2ef4['fromVersion']&&void 0x0===_0x1e2ef4['toVersion']&&(_0x1e2ef4['toVersion']=this['repository']['getRevision'](_0x1e2ef4['id'])['toVersion']),void 0x0!==_0x1e2ef4['toVersion']&&void 0x0===_0x1e2ef4['fromVersion']&&(_0x1e2ef4['fromVersion']=this['repository']['getRevision'](_0x1e2ef4['id'])['fromVersion']);}const _0x217124=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x920144,_0x217124)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x14d7c2=>{if(_0x14d7c2){for(const _0x3e2efc of _0x14d7c2)this['setRevisionData']({'id':_0x3e2efc['id'],'createdAt':_0x3e2efc['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x33872e,_0x372d4e){let _0x1718b1=this['editor']['config']['get']('initialData'),_0x14ee9f=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x1718b1){_0x1718b1={};for(const _0x13948c of this['editor']['model']['document']['getRootNames']())_0x1718b1[_0x13948c]='';}if('string'==typeof _0x1718b1&&(_0x1718b1={'main':_0x1718b1}),void 0x0===_0x14ee9f){_0x14ee9f={};for(const _0x25f53e of this['editor']['model']['document']['getRootNames']())_0x14ee9f[_0x25f53e]={};}let _0x21a56d=!0x1;const _0x45548e=Object['keys'](_0x1718b1),_0xdb3563=Object['keys'](_0x33872e);for(const _0x1ccb3f of _0x45548e){if(_0x1718b1[_0x1ccb3f]!==_0x33872e[_0x1ccb3f]&&''!==_0x1718b1[_0x1ccb3f]['trim']()){_0x21a56d=!0x0;break;}if(!_0x171344(_0x14ee9f[_0x1ccb3f],_0x372d4e[_0x1ccb3f])&&Object['keys'](_0x14ee9f[_0x1ccb3f])['length']>0x0){_0x21a56d=!0x0;break;}}_0x21a56d||(_0x21a56d=_0xdb3563['some'](_0x5b9ab9=>!this['editor']['model']['document']['getRoot'](_0x5b9ab9))),_0x21a56d&&_0x339b97('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1718b1,'editorRootsAttributes':_0x14ee9f,'revisionData':_0x33872e,'revisionRootsAttributes':_0x372d4e}),this['editor']['config']['set']('initialData',_0x33872e),this['editor']['config']['set']('rootsAttributes',_0x372d4e);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x5b4919=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x5b4919['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x57db57){const _0x5c3ff6=this['repository']['getRevisions']();_0x5c3ff6['reverse']();let _0x441909=0x0;for(;_0x441909<_0x5c3ff6['length'];){const _0x219222=_0x5c3ff6[_0x441909];if(_0x219222===this['currentRevision']){_0x441909++;continue;}if(_0x219222['id']===this['_initialRevisionId'])break;const _0x1a060c=_0x57db57['toVersion']-_0x219222['toVersion']||_0x57db57['fromVersion']-_0x219222['fromVersion'];if(_0x1a060c>0x0)break;if(_0x1a060c<0x0)_0x441909++;else{if(!_0x57db57['creator']&&_0x219222['creator'])break;if(_0x219222['creator']||!_0x57db57['creator']){if(_0x57db57['createdAt']>_0x219222['createdAt'])break;_0x441909++;}else _0x441909++;}}return _0x441909;}['setRevisionData'](_0x3113f4){const _0x17d158=this['repository']['getRevision'](_0x3113f4['id']);if(_0x3113f4['createdAt']&&(_0x3113f4['createdAt']=new Date(_0x3113f4['createdAt'])),_0x3113f4['authorsIds']){const _0x4af19b=this['editor']['plugins']['get']('Users');_0x3113f4['authors']=_0x3113f4['authorsIds']['map'](_0x4d16e0=>_0x4af19b['getUser'](_0x4d16e0));}_0x17d158['_update'](_0x3113f4,!0x0);}['buildRevisionData']({revision:_0x3989ed=null,from:_0x3f5544=null,to:_0x5df0f9=null}){_0x3f5544=null!==_0x3f5544?_0x3f5544:_0x3989ed['fromVersion'],_0x5df0f9=null!==_0x5df0f9?_0x5df0f9:_0x3989ed['toVersion'];const _0x19a69f=this['_revisionDataBuilder']['getData'](_0x3f5544,_0x5df0f9),_0x4b40e5={'diffData':_0x19a69f['diffData'],'authorsIds':_0x19a69f['authorsIds'],'fromVersion':_0x3f5544,'toVersion':_0x5df0f9};if(!_0x3989ed||_0x5df0f9!==_0x3989ed['toVersion']){const _0x100096=_0x5df0f9-0x1,_0x5aed16=this['_source']['history']['getOperation'](_0x100096);_0x4b40e5['createdAt']=_0x5aed16&&_0x5aed16['createdAt']||new Date();}if(this['_loadedStateData']&&_0x3f5544===this['_loadedStateData']['fromVersion']){for(const _0x3c7a38 of this['_loadedStateData']['authors'])_0x4b40e5['authorsIds']['includes'](_0x3c7a38['id'])||_0x4b40e5['authorsIds']['push'](_0x3c7a38['id']);}return _0x4b40e5;}['_loadRevisionData'](_0x4ff883){if(!_0x4ff883||_0x4ff883['diffData'])return Promise['resolve']();{const _0x1dc686=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x1dc686,'revisionId':_0x4ff883['id']})['then'](_0x1e03fa=>{_0x4ff883['diffData']=_0x1e03fa['diffData'];});}}['_bufferUpdate'](_0x28f284,_0x551c20,_0x2933b7){if(this['_bufferedUpdates']['has'](_0x28f284)){const _0x350bef=this['_bufferedUpdates']['get'](_0x28f284);_0x551c20=_0x2933b7?{..._0x350bef,..._0x551c20}:{..._0x551c20,..._0x350bef};}this['_bufferedUpdates']['set'](_0x28f284,_0x551c20);}['_getFromVersion'](_0x343373){const _0x4f3b53=this['repository']['getRevisions']();_0x4f3b53['reverse'](),_0x4f3b53['shift']();const _0x386d7b=_0x4f3b53['find'](_0x2ea2c8=>_0x2ea2c8['toVersion']<=_0x343373)['toVersion'];return _0x386d7b<this['_startingVersion']?this['_startingVersion']:_0x386d7b;}['_createInitialRevision'](_0x7921bb){const _0x26c6e2=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x26c6e2)this['_initialRevisionId']=_0x26c6e2['id'];else{const _0x4e1c31=!this['editor']['model']['document']['roots']['find'](_0x1354eb=>this['editor']['model']['hasContent'](_0x1354eb)),_0x20cf0f=this['editor']['plugins']['get']('Users')['me']['id'],_0x2fdbd5=m(this['editor']['locale'],_0x4e1c31?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x7921bb,'to':_0x7921bb,'id':this['_initialRevisionId'],'name':_0x2fdbd5,'creatorId':_0x20cf0f});}}['_createCurrentRevision'](_0x5a1129){const _0xf4c398=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xf4c398),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5a1129,'to':_0x5a1129,'id':_0xf4c398,'name':'','creatorId':null}));}['_makeRevision']({name:_0x5a4f52,from:_0x1ef828,to:_0x519dbf,creatorId:_0x283440,id:_0x2865ff}){const _0x322ff4=this['buildRevisionData']({'from':_0x1ef828,'to':_0x519dbf});_0x322ff4['name']=_0x5a4f52,_0x322ff4['creatorId']=_0x283440,_0x322ff4['id']=_0x2865ff;const _0x5d9f8b=this['addRevisionData'](_0x322ff4);return this['adapter']&&this['_bufferUpdate'](_0x322ff4['id'],_0x322ff4,!0x0),_0x5d9f8b;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x5015c7){return(_0x5015c7=_0x5015c7['filter'](_0x1c53a3=>!_0x1c53a3['name']||'revision-start'!==_0x1c53a3['name']&&'revision-end'!==_0x1c53a3['name']))['forEach'](_0x3b70d8=>{'string'!=typeof _0x3b70d8&&(_0x3b70d8['children']=this['_removeRevisionMarkers'](_0x3b70d8['children']),_0x3b70d8['attributes']=_0x3b70d8['attributes']['filter'](_0x8acdcf=>!_0x8acdcf[0x0]['startsWith']('data-revision-')));}),_0x5015c7;}}function C(_0x8534f6,_0x279612){const _0x41e6d3=_0x279612['editing']['view']['document'];if('string'==typeof _0x8534f6)return new _0x166355(_0x41e6d3,_0x8534f6);{const _0x389689=_0x8534f6['children']['map'](_0x27b914=>C(_0x27b914,_0x279612));return new(P[_0x8534f6['type']]||_0x2b1c67)(_0x41e6d3,_0x8534f6['name'],_0x8534f6['attributes'],_0x389689);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x619c26){this['editor']=_0x619c26,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'](_0x50f570){this['source']=_0x50f570;const _0x351e21=new Map(),_0x49e1b4=new Map(),_0x4bd1b7=this['editor']['model']['document']['roots']['map'](_0x46b9a5=>_0x46b9a5['rootName']);for(const _0x4397b1 of _0x4bd1b7){const _0x7933c7=this['editor']['model']['document']['getRoot'](_0x4397b1),_0x482266=T(_0x7933c7);_0x351e21['set'](_0x4397b1,_0x482266),_0x49e1b4['set'](_0x4397b1,Object['fromEntries'](_0x7933c7['getAttributes']()));}const _0x3933c8=Array['from'](this['editor']['model']['markers'])['map'](_0x142de9=>[_0x142de9['name'],_0x142de9['getRange']()]),_0x55de4c=this['source']['version'];this['_saveMetaData'](_0x55de4c,_0x351e21,_0x3933c8,_0x49e1b4),this['_startingRevisionId']=this['_revisionId'];const _0x3d3d9c=new Map(),_0x3f7c7a=new Map();for(const _0x4c9b03 of _0x4bd1b7){const _0x24dfad=F(_0x4c9b03);_0x3d3d9c['set'](_0x4c9b03,_0x24dfad),_0x3f7c7a['set'](_0x4c9b03,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3d3d9c,[],_0x3f7c7a);}['getData'](_0x155a2a,_0x36331e){if(this['_lastFrom']===_0x155a2a&&this['_lastTo']<=_0x36331e)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x36331e,!0x0);else{if(!this['_savedMetaData']['has'](_0x155a2a)){const _0x1b305c=this['_getPreviousFrom'](_0x155a2a);this['_calculateMetaData'](_0x1b305c,_0x155a2a,!0x1);}this['_calculateMetaData'](_0x155a2a,_0x36331e,!0x0);}return this['_lastFrom']=_0x155a2a,this['_lastTo']=_0x36331e,this['_getState']();}['loadState'](_0x5e1ee4){this['_reset'](),this['_lastFrom']=_0x5e1ee4['fromVersion'],this['_lastTo']=_0x5e1ee4['toVersion'];for(const _0x1a6f64 in _0x5e1ee4['diffData']){const _0x512103=_0x5e1ee4['diffData'][_0x1a6f64]['attachChange'],_0x400994=_0x3d1bef(_0x5e1ee4['diffData'][_0x1a6f64]['attributesBefore'])||{},_0x32d7e8=this['_makeModelFromViewString'](_0x5e1ee4['diffData'][_0x1a6f64]['deletions']);_0x32d7e8['rootName']=_0x1a6f64,_0x32d7e8['_isAttached']=!_0x512103||!_0x512103['isAttached'],_0x32d7e8['isAttached']=()=>_0x32d7e8['_isAttached'],this['_baseRoots']['set'](_0x1a6f64,_0x32d7e8),this['_baseRootsAttributes']['set'](_0x1a6f64,_0x400994),_0x512103&&this['_touchedRoots']['set'](_0x1a6f64,_0x512103);const _0x59de29=this['_makeIdsRoot'](_0x32d7e8);this['_baseIdsRoots']['set'](_0x1a6f64,_0x59de29);for(const [_0x342111,_0xcec0dc]of _0x32d7e8['markers']){if(!_0x342111['startsWith']('revision:'))continue;const _0x5dbab9=_0x342111['split'](':')[0x2];for(const _0xa9318e of _0xcec0dc['getWalker']({'singleCharacters':!0x0})){const _0x559bf5=this['_getVidAttributeName'](_0xa9318e),_0xcfa546='elementEnd'==_0xa9318e['type']?_0xa9318e['previousPosition']['path']['slice'](0x0,-0x1):_0xa9318e['previousPosition']['path'],_0x2ae32d=_0x59de29['getNodeByPath'](_0xcfa546)['getAttribute'](_0x559bf5);this['_touched']['set'](_0x2ae32d,{'userId':_0x5dbab9});}}}this['_startingRevisionId']=this['_revisionId'];const _0x5466c1=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5cd99c=>!this['_touched']['has'](_0x5cd99c));let _0x25d2f9=0x0;const _0x1688b9=new Map();for(const _0x5e458b in _0x5e1ee4['diffData']){const _0x347f3e=_0x5e1ee4['diffData'][_0x5e458b]['attachChange'],_0xab0f98=_0x3d1bef(_0x5e1ee4['diffData'][_0x5e458b]['attributesAfter'])||{},_0x4c142c=this['_makeModelFromViewString'](_0x5e1ee4['diffData'][_0x5e458b]['insertions']);_0x4c142c['rootName']=_0x5e458b,_0x4c142c['_isAttached']=!_0x347f3e||_0x347f3e['isAttached'],_0x4c142c['isAttached']=()=>_0x4c142c['_isAttached'],this['_diffRoots']['set'](_0x5e458b,_0x4c142c),this['_diffRootsAttributes']['set'](_0x5e458b,_0xab0f98);const _0x3fbcbb=this['_makeIdsRoot'](_0x4c142c,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5e458b,_0x3fbcbb),_0x1688b9['set'](_0x5e458b,_0x4c142c['isAttached']()?_0xab0f98:{});for(const [_0x3ec202,_0x46e10b]of _0x4c142c['markers']){if(!_0x3ec202['startsWith']('revision:'))continue;const _0x325ff8=_0x3ec202['split'](':')[0x2];for(const _0x1ec359 of _0x46e10b['getWalker']({'singleCharacters':!0x0})){const _0x369b52=this['_getVidAttributeName'](_0x1ec359),_0x3959c3=this['_revisionId']++,_0x4f781f='elementEnd'==_0x1ec359['type']?_0x1ec359['previousPosition']['path']['slice'](0x0,-0x1):_0x1ec359['previousPosition']['path'];_0x3fbcbb['getNodeByPath'](_0x4f781f)['_setAttribute'](_0x369b52,_0x3959c3),this['_touched']['set'](_0x3959c3,{'userId':_0x325ff8});}}for(const _0x500523 of this['editor']['model']['createRangeIn'](_0x4c142c)['getWalker']({'singleCharacters':!0x0})){const _0x259520=this['_getVidAttributeName'](_0x500523),_0x106773='elementEnd'==_0x500523['type']?_0x500523['previousPosition']['path']['slice'](0x0,-0x1):_0x500523['previousPosition']['path'],_0x2e4158=_0x3fbcbb['getNodeByPath'](_0x106773);_0x2e4158['getAttribute'](_0x259520)>0x0||_0x2e4158['_setAttribute'](_0x259520,_0x5466c1[_0x25d2f9++]);}for(const [_0xceebfb,_0x2a11f0]of _0x4c142c['markers'])_0xceebfb['startsWith']('revision:')||this['_markers']['set'](_0xceebfb,_0x2a11f0);}const _0x155e85=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x155e85),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x155e85,0x1));const _0x238272=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x238272),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x238272,0x1));const _0x18a6e6=Array['from'](this['_diffRoots'])['map'](([_0x2ccd3d,_0x1f6d28])=>[_0x2ccd3d,T(_0x1f6d28)]);this['_saveMetaData'](this['_lastTo'],_0x18a6e6,this['_markers'],_0x1688b9);}['_makeModelFromViewString'](_0x4acba7){const _0x25c157=JSON['parse'](_0x4acba7),_0x5b9424=this['editor']['editing']['view']['document'],_0x8d3fa3=new _0x1ebfbf(_0x5b9424,_0x25c157['map'](_0x45b069=>C(_0x45b069,this['editor'])));return this['editor']['data']['toModel'](_0x8d3fa3);}['_saveMetaData'](_0x4516dd,_0x349782,_0x3979c0,_0x4274fb){const _0x3045c5=new Map(_0x349782),_0x4c30bb=new Map(_0x3d1bef(_0x4274fb)),_0x395a88=new Map();for(const [_0x1b25dc,_0x47f7a1]of _0x3979c0)_0x395a88['set'](_0x1b25dc,{'start':_0x47f7a1['start']['clone'](),'end':_0x47f7a1['end']['clone'](),'rootName':_0x47f7a1['root']['rootName']});this['_savedMetaData']['set'](_0x4516dd,{'roots':_0x3045c5,'markers':_0x395a88,'rootsAttributes':_0x4c30bb});}['_removeMetaData'](_0x86ea26){this['_savedMetaData']['delete'](_0x86ea26);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x4bdcb5,_0x194041=null){let _0x4acd4a=null;_0x4bdcb5['is']('documentFragment')||(_0x4acd4a=new ft(_0x4bdcb5['name'],{'vid_start':null===_0x194041?this['_revisionId']++:_0x194041++}));const _0x2f6c3e=[];for(const _0x4a05ad of _0x4bdcb5['getChildren']())if(_0x4a05ad['is']('element')){_0x2f6c3e['push'](this['_makeIdsRoot'](_0x4a05ad,_0x194041));const _0x577ec9=_0x2f6c3e[_0x2f6c3e['length']-0x1];null!==_0x194041&&(_0x194041=_0x577ec9['is']('element','$text')?_0x577ec9['getAttribute']('vid')+0x1:_0x577ec9['getAttribute']('vid_end')+0x1);}else{for(let _0x43c757=0x0;_0x43c757<_0x4a05ad['offsetSize'];_0x43c757++)_0x2f6c3e['push'](new ft('$text',{'vid':null===_0x194041?this['_revisionId']++:_0x194041++}));}if(_0x4bdcb5['is']('documentFragment')){const _0x25dd01=F(_0x4bdcb5['rootName']);return _0x25dd01['_insertChild'](0x0,_0x2f6c3e),_0x25dd01;}return _0x4acd4a['_setAttribute']('vid_end',null===_0x194041?this['_revisionId']++:_0x194041++),_0x4acd4a['_insertChild'](0x0,_0x2f6c3e),_0x4acd4a;}['_calculateMetaData'](_0x227e3d,_0x4c6aa9,_0xa9a97c){this['_reset']();const {roots:_0x1e4e11,markers:_0x3d801f,rootsAttributes:_0x3fccdd}=this['_savedMetaData']['get'](_0x227e3d);this['_baseRoots']=new Map(_0x1e4e11),this['_baseRootsAttributes']=new Map(_0x3d1bef(_0x3fccdd));for(const [_0x2e2696,_0x509667]of this['_baseRoots'])if('$graveyard'!==_0x2e2696&&(this['_diffRoots']['set'](_0x2e2696,T(_0x509667)),this['_diffRootsAttributes']=new Map(_0x3d1bef(_0x3fccdd)),_0xa9a97c)){const _0x26e746=this['_revisionId'];this['_idsRoots']['set'](_0x2e2696,this['_makeIdsRoot'](_0x509667)),this['_baseIdsRoots']['set'](_0x2e2696,this['_makeIdsRoot'](_0x509667,_0x26e746));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0xa9a97c&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x199373,_0x18de5d]of _0x3d801f){const _0x5e1d2c=this['_baseRoots']['get'](_0x18de5d['rootName']),_0x508886=this['_diffRoots']['get'](_0x18de5d['rootName']),_0x1bddd1=new vt(this['_fixPosition'](_0x18de5d['start'],_0x5e1d2c),this['_fixPosition'](_0x18de5d['end'],_0x5e1d2c)),_0x27d8c0=this['_fixRange'](_0x1bddd1,_0x508886);_0x5e1d2c['markers']['set'](_0x199373,_0x1bddd1),this['_markers']['set'](_0x199373,_0x27d8c0);}this['_applyOperations'](_0x227e3d,_0x4c6aa9,_0xa9a97c);}['_applyOperations'](_0x190738,_0x49e932,_0x422571){for(const _0x1336b7 of this['source']['getOperations'](_0x190738,_0x49e932))this['_handleOperation'](_0x1336b7,_0x422571);for(const _0x5aee3a of this['_diffRoots']['values']())_0x5aee3a['markers']['clear']();for(const [_0x2d4af8,_0x5c87fd]of this['_markers']){this['_diffRoots']['get'](_0x5c87fd['root']['rootName'])['markers']['set'](_0x2d4af8,_0x5c87fd['clone']());}const _0x53620a=new Map(),_0x3dfeaa=new Map();for(const [_0x16731c,_0x2190e9]of this['_diffRoots'])_0x53620a['set'](_0x16731c,T(_0x2190e9)),_0x3dfeaa['set'](_0x16731c,this['_diffRootsAttributes']['get'](_0x16731c));this['_saveMetaData'](_0x49e932,_0x53620a,this['_markers'],_0x3dfeaa);}['_getPreviousFrom'](_0x6d80b3){const _0x26e58c=Array['from'](this['_savedMetaData']['keys']());_0x26e58c['sort']((_0xc12018,_0x3608e1)=>_0xc12018-_0x3608e1),_0x26e58c['reverse']();for(const _0x1b0916 of _0x26e58c)if(_0x1b0916<_0x6d80b3)return _0x1b0916;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5cb572,_0x4d4d68){const _0x5d9602=Array['from'](_0x4d4d68['markers'])['map'](([_0x59c9fa,_0x15f618])=>[_0x59c9fa,this['_fixRange'](_0x15f618,_0x5cb572)]);_0x5cb572['markers']=new Map(_0x5d9602);}['_transformMarkers'](_0x20b91a){for(const _0x5a574a of this['_markers']['values']()){const _0x57c4a9=_0x5a574a['getTransformedByOperation'](_0x20b91a),_0x34977f=vt['_createFromRanges'](_0x57c4a9);_0x5a574a['start']=_0x34977f['start'],_0x5a574a['end']=_0x34977f['end'];}}['_handleOperation'](_0x26edb1,_0x50e79e){if('addRoot'!=_0x26edb1['type']&&'detachRoot'!=_0x26edb1['type']){if('insert'==_0x26edb1['type']){const _0x360bdf=_0x26edb1['position']['root']['rootName'];this['_diffRoots']['has'](_0x360bdf)||(this['_diffRoots']['set'](_0x360bdf,F(_0x360bdf,!0x0)),this['_diffRootsAttributes']['set'](_0x360bdf,{}),_0x50e79e&&this['_idsRoots']['set'](_0x360bdf,F(_0x360bdf,!0x0)));}else{if('addRootAttribute'==_0x26edb1['type']||'removeRootAttribute'==_0x26edb1['type']||'changeRootAttribute'==_0x26edb1['type'])return void this['_handleRootAttributeOperation'](_0x26edb1);'marker'==_0x26edb1['type']&&this['_handleMarkerOperation'](_0x26edb1);}if('marker'!==_0x26edb1['type']){const _0x42d358=this['_cloneOperation'](_0x26edb1,this['_diffRoots']);_0x42d358['_execute'](),this['_transformMarkers'](_0x42d358);}if(_0x50e79e)switch(_0x26edb1['type']){case'insert':this['_handleInsertOperation'](_0x26edb1);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x26edb1);break;case'merge':this['_handleMergeOperation'](_0x26edb1);break;case'split':this['_handleSplitOperation'](_0x26edb1);}}else this['_handleRootOperation'](_0x26edb1,_0x50e79e);}['_cloneOperation'](_0x5df9e0,_0x529e06){const _0x5415a7=_0x5df9e0['clone']();return _0x5415a7['_authorId']=_0x5df9e0['_authorId'],this['_fixOperation'](_0x5415a7,_0x529e06),_0x5415a7;}['_getBaseVids'](_0x3a05f9){return _0x3a05f9['map'](_0x392378=>{const _0x5371d0=this['_getVidAttributeName'](_0x392378);return Number(_0x392378['item']['getAttribute'](_0x5371d0));});}['_generateTape'](_0x2f3785,_0x49ad61){if(_0x2f3785['is']('element','$text'))_0x49ad61['push']({'item':_0x2f3785,'type':'text'});else{_0x2f3785['is']('element')&&_0x49ad61['push']({'item':_0x2f3785,'type':'elementStart'});for(const _0x2e0ffd of _0x2f3785['getChildren']())this['_generateTape'](_0x2e0ffd,_0x49ad61);_0x2f3785['is']('element')&&_0x49ad61['push']({'item':_0x2f3785,'type':'elementEnd'});}return _0x49ad61;}['_getState'](){const _0x5c3a7d=new Map(this['_touched']),_0x3e1820=new Map(_0x5c3a7d),_0x958a1a=new Map(),_0xda2bb8={'insertions':{},'deletions':{}},_0x350f22={'insertions':{},'deletions':{}},_0x16d101=new Map(),_0x4a744d=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4a744d['delete']('$graveyard');for(const _0x320248 of _0x4a744d){const _0x2103ff=this['_diffRoots']['get'](_0x320248)||F(_0x320248,!0x1),_0x4b0422=this['_baseRoots']['get'](_0x320248)||F(_0x320248,!0x1);_0x2103ff['isAttached']()||_0x4b0422['isAttached']()?(_0xda2bb8['insertions'][_0x320248]=T(_0x2103ff),_0xda2bb8['deletions'][_0x320248]=T(_0x4b0422),this['_copyMarkers'](_0xda2bb8['deletions'][_0x320248],_0x4b0422),this['_copyMarkers'](_0xda2bb8['insertions'][_0x320248],_0x2103ff),_0x350f22['insertions'][_0x320248]=this['_generateTape'](this['_idsRoots']['get'](_0x320248),[]),_0x350f22['deletions'][_0x320248]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x320248)||F(_0x320248,!0x1),[])):_0x4a744d['delete'](_0x320248);}for(const _0x5ab202 of _0x4a744d){const _0x388500=_0x350f22['insertions'][_0x5ab202];for(const _0x13ba47 of _0x388500){const _0x37d932=this['_getVidAttributeName'](_0x13ba47),_0x2294dd=_0x13ba47['item']['getAttribute'](_0x37d932);_0x3e1820['delete'](_0x2294dd),_0x2294dd>=this['_startingRevisionId']&&_0x958a1a['set'](_0x2294dd,_0x5c3a7d['get'](_0x2294dd));}}for(const _0x67b05f of _0x4a744d){const _0x412bae=_0x350f22['insertions'][_0x67b05f],_0x4781c4=this['_getBaseVids'](_0x350f22['deletions'][_0x67b05f]);let _0x13ee81=0x0;for(const _0x41697e of _0x412bae){const _0x39008a=this['_getVidAttributeName'](_0x41697e),_0x599203=_0x41697e['item']['getAttribute'](_0x39008a);if(!_0x958a1a['has'](_0x599203)&&!_0x16d101['has'](_0x599203)){if(_0x3e1820['has'](_0x599203))_0x13ee81++;else{if(_0x599203!=_0x4781c4[_0x13ee81]){const _0x5122c9=_0x5c3a7d['get'](_0x599203)||_0x5c3a7d['get'](_0x4781c4[_0x13ee81]);for(;_0x599203!=_0x4781c4[_0x13ee81];)_0x3e1820['has'](_0x4781c4[_0x13ee81])||(_0x16d101['set'](_0x4781c4[_0x13ee81],_0x5122c9),_0x5c3a7d['set'](_0x4781c4[_0x13ee81],_0x5122c9)),_0x13ee81++;}_0x13ee81++;}}}}for(const _0x568197 of _0x4a744d){const _0x35973d=_0x350f22['insertions'][_0x568197];for(const _0x3665f1 of _0x35973d){const _0x141ebf=this['_getVidAttributeName'](_0x3665f1),_0x435f5d=_0x3665f1['item']['getAttribute'](_0x141ebf);if(_0x16d101['has'](_0x435f5d)){const _0x4e7446=_0x16d101['get'](_0x435f5d);_0x3e1820['has'](_0x435f5d)||_0x3e1820['set'](_0x435f5d,{..._0x4e7446}),_0x958a1a['set'](_0x435f5d,{..._0x4e7446});}}}for(const _0x29296b of _0x3e1820['keys']())_0x29296b>=this['_startingRevisionId']&&_0x3e1820['delete'](_0x29296b);const _0x2b79dd=new Map();for(const _0x1d972f of _0x4a744d){let _0x1ca833=_0x350f22['insertions'][_0x1d972f];for(const _0xbf207a of _0x1ca833)if(_0xbf207a['item']['is']('element','tableCell')){const _0x2287dd=this['_getVidAttributeName'](_0xbf207a),_0x54863c=_0xbf207a['item']['getAttribute'](_0x2287dd);if(_0x958a1a['has'](_0x54863c)){const _0x102d26=_0xbf207a['item']['parent']['parent']['getAttribute']('vid_start'),_0x1c4238=_0x2b79dd['get'](_0x102d26)||new Set();_0x1c4238['add'](_0x958a1a['get'](_0x54863c)['userId']),_0x2b79dd['set'](_0x102d26,_0x1c4238);}}_0x1ca833=_0x350f22['deletions'][_0x1d972f];for(const _0x40c173 of _0x1ca833)if(_0x40c173['item']['is']('element','tableCell')){const _0x52e1b6=this['_getVidAttributeName'](_0x40c173),_0x4a0a28=_0x40c173['item']['getAttribute'](_0x52e1b6);if(_0x3e1820['has'](_0x4a0a28)){const _0x15511c=_0x40c173['item']['parent']['parent']['getAttribute']('vid_start'),_0xcbb986=_0x2b79dd['get'](_0x15511c)||new Set();_0xcbb986['add'](_0x3e1820['get'](_0x4a0a28)['userId']),_0x2b79dd['set'](_0x15511c,_0xcbb986);}}for(const _0x25eefa of _0x2b79dd['keys']())(_0x958a1a['has'](_0x25eefa)||_0x3e1820['has'](_0x25eefa))&&_0x2b79dd['delete'](_0x25eefa);}for(const _0x3f2a91 of _0x4a744d){const _0x56f6eb=_0x350f22['insertions'][_0x3f2a91];let _0x3a6880=null,_0x4d1074=null;for(const _0x4c9a11 of _0x56f6eb){const _0x5f4249=this['_getVidAttributeName'](_0x4c9a11),_0x53354d=_0x4c9a11['item']['getAttribute'](_0x5f4249),_0x47e17a=_0x2b79dd['get'](_0x53354d);_0x47e17a&&'elementStart'==_0x4c9a11['type']&&(_0x3a6880=Array['from'](_0x47e17a)[0x0],_0x4d1074=_0x4c9a11['item']['getAttribute']('vid_end')),_0x3a6880&&(_0x3e1820['set'](_0x53354d,{'userId':_0x3a6880}),_0x958a1a['set'](_0x53354d,{'userId':_0x3a6880})),_0x53354d==_0x4d1074&&(_0x3a6880=null,_0x4d1074=null);}}const _0x352b5e={},_0x31d8b3=new Set();for(const _0xd32281 of _0x4a744d){const _0x3b55e4=_0xda2bb8['deletions'][_0xd32281],_0x3a3fa6=_0xda2bb8['insertions'][_0xd32281];for(const {userId:_0x30e427}of this['_touchedMarkers']['values']())null!==_0x30e427&&_0x31d8b3['add'](_0x30e427);for(const {userId:_0x4a5041}of this['_touchedRoots']['values']())null!==_0x4a5041&&_0x31d8b3['add'](_0x4a5041);this['_markChanges'](_0x3a3fa6,_0x350f22['insertions'][_0xd32281],_0x958a1a,'insertion',_0x31d8b3),this['_markChanges'](_0x3b55e4,_0x350f22['deletions'][_0xd32281],_0x3e1820,'deletion',_0x31d8b3),_0x352b5e[_0xd32281]={'insertions':this['_prepareViewToSave'](_0x3a3fa6),'deletions':this['_prepareViewToSave'](_0x3b55e4),'attachChange':this['_touchedRoots']['get'](_0xd32281)||null,'attributesBefore':_0x3d1bef(this['_baseRootsAttributes']['get'](_0xd32281))||{},'attributesAfter':_0x3d1bef(this['_diffRootsAttributes']['get'](_0xd32281))};}return{'diffData':_0x352b5e,'authorsIds':Array['from'](_0x31d8b3)};}['_processRootBeforeSave'](_0x4fda04){for(const [,_0x1755f2]of _0x4fda04['markers']){const _0x47e2db=_0x1755f2['start']['getAncestors']()['filter'](_0x414536=>'tableCell'==_0x414536['name']);for(const _0x411132 of _0x47e2db)0x1==_0x411132['childCount']&&_0x411132['getChild'](0x0)['is']('element','paragraph')&&_0x411132['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x117984){this['_processRootBeforeSave'](_0x117984);const _0xd6ef11=this['editor']['data']['toView'](_0x117984,{}),_0x5554dd=Array['from'](_0xd6ef11['getChildren']())['map'](_0x29ba76=>this['_getViewJson'](_0x29ba76));return JSON['stringify'](_0x5554dd);}['_getViewJson'](_0x2c98be){if(_0x2c98be['is']('$text'))return _0x2c98be['data'];{const _0x497b60=_0x2c98be;return{'type':Object['keys'](P)['find'](_0x516d99=>_0x2c98be instanceof P[_0x516d99]),'name':_0x497b60['name'],'attributes':Array['from'](_0x497b60['getAttributes']()),'children':Array['from'](_0x497b60['getChildren']())['map'](_0x130af6=>this['_getViewJson'](_0x130af6))};}}['_markChanges'](_0x581284,_0x1a96c0,_0x41fe01,_0x133fee,_0x496c89){let _0x3cb50d=null,_0x407add=null,_0x2b2e79=0x0;const _0x56da5e=this['editor']['model'];for(let _0x1071ac=0x0;_0x1071ac<_0x1a96c0['length'];_0x1071ac++){const _0x3803c2=this['_getVidAttributeName'](_0x1a96c0[_0x1071ac]),_0x4b027f=_0x1a96c0[_0x1071ac]['item']['getAttribute'](_0x3803c2),_0x5e6ffe=_0x41fe01['get'](_0x4b027f),_0x4352a8=_0x1071ac==_0x1a96c0['length']-0x1;(!_0x3cb50d&&_0x5e6ffe&&(_0x3cb50d=_0x5e6ffe,_0x407add=_0x1a96c0[_0x1071ac]),_0x3cb50d&&(!_0x5e6ffe||_0x5e6ffe['userId']!=_0x3cb50d['userId']))&&(_0x5667ae(_0x5e6ffe,B(_0x407add,_0x581284,_0x56da5e),B(_0x1a96c0[_0x1071ac],_0x581284,_0x56da5e)),_0x3cb50d=_0x5e6ffe||null,_0x407add=_0x5e6ffe?_0x1a96c0[_0x1071ac]:null),_0x3cb50d&&_0x4352a8&&_0x5667ae(_0x5e6ffe,B(_0x407add,_0x581284,_0x56da5e),J(_0x1a96c0[_0x1071ac],_0x581284,_0x56da5e));}function _0x5667ae(_0x235222,_0x2bb55e,_0x1cfbc7){const _0x2c171b=_0x3cb50d['userId'],_0x39f91c='revision:'+_0x133fee+':'+_0x2c171b+':'+_0x2b2e79++,_0x5afe59=_0x56da5e['createRange'](_0x2bb55e,_0x1cfbc7);_0x581284['markers']['set'](_0x39f91c,_0x5afe59),null!==_0x2c171b&&_0x496c89['add'](_0x2c171b);}}['_getVidAttributeName'](_0x6a10af){switch(_0x6a10af['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x2c6137,_0x84b2e3){_0x2c6137['baseVersion']=null;for(const _0x12b8ca in _0x2c6137){const _0x3f286c=_0x2c6137[_0x12b8ca];if(_0x3f286c instanceof gt){const _0x190efe=_0x84b2e3['get'](_0x3f286c['root']['rootName']);_0x2c6137[_0x12b8ca]=this['_fixPosition'](_0x3f286c,_0x190efe);}if(_0x3f286c instanceof vt){const _0x79903b=_0x84b2e3['get'](_0x3f286c['root']['rootName']);_0x2c6137[_0x12b8ca]=this['_fixRange'](_0x3f286c,_0x79903b);}'root'===_0x12b8ca&&(_0x2c6137['root']=_0x84b2e3['get'](_0x2c6137['root']['rootName']));}}['_fixRange'](_0x1702c5,_0xf06d38){return this['editor']['model']['createRange'](this['_fixPosition'](_0x1702c5['start'],_0xf06d38),this['_fixPosition'](_0x1702c5['end'],_0xf06d38));}['_fixPosition'](_0x6baba2,_0x149ead){return this['editor']['model']['createPositionFromPath'](_0x149ead,_0x6baba2['path'],_0x6baba2['stickiness']);}['_handleInsertOperation'](_0x384370){const _0xc8143b=this['_idsRoots']['get'](_0x384370['position']['root']['rootName']),_0x3cc150=this['_fixPosition'](_0x384370['position'],_0xc8143b),_0x2a17b4=null===_0x384370['_authorId']?null:_0x384370['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4fa6c4=_0x3cc150['parent'],_0x4c11f6=this['_revisionId'],_0x218039=[];for(const _0x5723bd of _0x384370['nodes'])if(_0x5723bd['is']('element'))_0x218039['push'](this['_makeIdsRoot'](_0x5723bd));else{for(let _0x1e15ac=0x0;_0x1e15ac<_0x5723bd['offsetSize'];_0x1e15ac++)_0x218039['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x2c2467=this['_revisionId'];for(let _0x4f55f2=_0x4c11f6;_0x4f55f2<_0x2c2467;_0x4f55f2++)this['_touched']['set'](_0x4f55f2,{'userId':_0x2a17b4});_0x4fa6c4['_insertChild'](_0x3cc150['offset'],_0x218039);}['_handleMoveOperation'](_0x2dde4f){(_0x2dde4f=this['_cloneOperation'](_0x2dde4f,this['_idsRoots']))['_execute']();const _0x53c4f6=null===_0x2dde4f['_authorId']?null:_0x2dde4f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x594ad2=_0x2dde4f['getMovedRangeStart'](),_0x3e642a=_0x594ad2['parent'],_0x5edc9a=_0x594ad2['offset'];!function _0x445783(_0x2150cc,_0x2fd40e,_0x572496,_0x7e006c){for(let _0x2487c4=_0x572496;_0x2487c4<_0x7e006c;_0x2487c4++){const _0x2dfdc1=_0x2fd40e['getChild'](_0x2487c4);_0x2dfdc1['is']('element','$text')?_0x2150cc['set'](_0x2dfdc1['getAttribute']('vid'),{'userId':_0x53c4f6}):(_0x2150cc['set'](_0x2dfdc1['getAttribute']('vid_start'),{'userId':_0x53c4f6}),_0x445783(_0x2150cc,_0x2dfdc1,0x0,_0x2dfdc1['childCount']),_0x2150cc['set'](_0x2dfdc1['getAttribute']('vid_end'),{'userId':_0x53c4f6}));}}(this['_touched'],_0x3e642a,_0x5edc9a,_0x5edc9a+_0x2dde4f['howMany']);}['_handleMergeOperation'](_0xa9a54){const _0x13fbfb=null===(_0xa9a54=this['_cloneOperation'](_0xa9a54,this['_idsRoots']))['_authorId']?null:_0xa9a54['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x414c24=_0xa9a54['targetPosition']['parent'],_0x307280=_0xa9a54['sourcePosition']['parent'],_0x17460f=_0x414c24['getAttribute']('vid_end'),_0x1f050b=_0x307280['getAttribute']('vid_start');_0x414c24['_setAttribute']('vid_end',_0x307280['getAttribute']('vid_end')),_0x307280['_setAttribute']('vid_end',_0x17460f),this['_touched']['set'](_0x1f050b,{'userId':_0x13fbfb}),this['_touched']['set'](_0x17460f,{'userId':_0x13fbfb}),_0xa9a54['_execute']();}['_handleSplitOperation'](_0x2df568){const _0x314c41=null===(_0x2df568=this['_cloneOperation'](_0x2df568,this['_idsRoots']))['_authorId']?null:_0x2df568['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2820d0=_0x2df568['graveyardPosition'],_0x59d88d=_0x2df568['splitPosition']['parent'];_0x2df568['_execute']();const _0x505af4=_0x59d88d['getAttribute']('vid_end'),_0x3c1467=_0x2df568['insertionPosition']['nodeAfter'];if(_0x2820d0){const _0x41231b=_0x3c1467['getAttribute']('vid_end'),_0x232c4e=_0x59d88d['getAttribute']('vid_end');_0x59d88d['_setAttribute']('vid_end',_0x41231b),_0x3c1467['_setAttribute']('vid_end',_0x232c4e),this['_touched']['set'](_0x59d88d['getAttribute']('vid_end'),{'userId':_0x314c41}),this['_touched']['set'](_0x3c1467['getAttribute']('vid_start'),{'userId':_0x314c41});}else{const _0x924f85=this['_revisionId']++,_0x2b120a=this['_revisionId']++;_0x59d88d['_setAttribute']('vid_end',_0x924f85),_0x3c1467['_setAttribute']('vid_start',_0x2b120a),_0x3c1467['_setAttribute']('vid_end',_0x505af4),this['_touched']['set'](_0x924f85,{'userId':_0x314c41}),this['_touched']['set'](_0x2b120a,{'userId':_0x314c41});}}['_handleMarkerOperation'](_0x5d11bc){if(!_0x5d11bc['affectsData'])return;const _0x4f1ce6=(_0x5d11bc=this['_cloneOperation'](_0x5d11bc,this['_diffRoots']))['oldRange']?_0x5d11bc['oldRange']['root']:null,_0x2c20dc=_0x5d11bc['newRange']?_0x5d11bc['newRange']['root']:null;_0x4f1ce6&&this['_markers']['delete'](_0x5d11bc['name']),_0x2c20dc&&this['_markers']['set'](_0x5d11bc['name'],_0x5d11bc['newRange']['clone']());const _0x2682b9=null===_0x5d11bc['_authorId']?null:_0x5d11bc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1b3abb=_0x5d11bc['name'];if(!this['_touchedMarkers']['has'](_0x1b3abb))return void this['_touchedMarkers']['set'](_0x1b3abb,{'range':_0x5d11bc['oldRange'],'userId':_0x2682b9});const _0x2df066=this['_touchedMarkers']['get'](_0x1b3abb),_0x5cc844=_0x2df066['range'],_0x224090=_0x5d11bc['newRange'];null==_0x5cc844&&null==_0x224090||_0x5cc844&&_0x224090&&_0x5cc844['isEqual'](_0x224090)?this['_touchedMarkers']['delete'](_0x5d11bc['name']):_0x2df066['userId']=_0x2682b9;}['_handleRootOperation'](_0x57af68,_0xbfe616){this['_diffRoots']['has'](_0x57af68['rootName'])?this['_diffRoots']['get'](_0x57af68['rootName'])['_isAttached']=_0x57af68['isAdd']:(this['_diffRoots']['set'](_0x57af68['rootName'],F(_0x57af68['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x57af68['rootName'],{}),_0xbfe616&&this['_idsRoots']['set'](_0x57af68['rootName'],F(_0x57af68['rootName'],!0x0)));const _0xb471ab=null===_0x57af68['_authorId']?null:_0x57af68['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x576027=this['_touchedRoots']['get'](_0x57af68['rootName']);_0x576027&&_0x576027['userId']===_0xb471ab?this['_touchedRoots']['delete'](_0x57af68['rootName']):this['_touchedRoots']['set'](_0x57af68['rootName'],{'userId':_0xb471ab,'isAttached':_0x57af68['isAdd']});}['_handleRootAttributeOperation'](_0x16476d){const _0xba1c88=this['_diffRootsAttributes']['get'](_0x16476d['root']['rootName']);null===_0x16476d['newValue']?delete _0xba1c88[_0x16476d['key']]:_0xba1c88[_0x16476d['key']]=_0x16476d['newValue'];}}function T(_0x21c566){const _0x4b1aaa=F(_0x21c566['rootName'],_0x21c566['isAttached']());for(const _0x2d06aa of _0x21c566['getChildren']()){const _0x14f4c2=_0x2d06aa['_clone'](!0x0);_0x4b1aaa['_appendChild'](_0x14f4c2);}return _0x4b1aaa;}function F(_0xf5844b,_0x962f4e=!0x0){const _0x2bec04=new mt();return _0x2bec04['rootName']=_0xf5844b,_0x2bec04['_isAttached']=_0x962f4e,_0x2bec04['isAttached']=()=>_0x2bec04['_isAttached'],_0x2bec04;}function B(_0x435d2f,_0x229206,_0x499ce1){const _0xd653c2='elementEnd'==_0x435d2f['type']?_0x499ce1['createPositionAt'](_0x435d2f['item'],'end'):_0x499ce1['createPositionBefore'](_0x435d2f['item']);return _0x499ce1['createPositionFromPath'](_0x229206,_0xd653c2['path'],_0xd653c2['stickiness']);}function J(_0x201764,_0x3f5b61,_0x54418a){const _0x366ae8='elementStart'==_0x201764['type']?_0x54418a['createPositionAt'](_0x201764['item'],0x0):_0x54418a['createPositionAfter'](_0x201764['item']);return _0x54418a['createPositionFromPath'](_0x3f5b61,_0x366ae8['path'],_0x366ae8['stickiness']);}class ns extends _0x571e95{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x13b5fd,_0x8c9a0c){super(_0x13b5fd),this['focusTracker']=new _0x1f39a3(),this['keystrokes']=new _0x11ba63(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x8c9a0c),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x2af42e({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2e5eb9=_0xebb81d=>_0xebb81d['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2e5eb9),this['keystrokes']['set']('arrowleft',_0x2e5eb9),this['keystrokes']['set']('arrowup',_0x2e5eb9),this['keystrokes']['set']('arrowdown',_0x2e5eb9);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2d0cfc){this['revisionNameInputView']['fieldView']['element']['value']=_0x2d0cfc['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x4bb4cd){const _0x134f46=new nt(this['locale'],_0x1d2e0c),_0xcdf827=_0x134f46['fieldView'];_0xcdf827['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x307c29=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x4bb4cd&&(_0x307c29+='\x20('+m(this['locale'],'optional')+')'),(_0x134f46['label']=_0x307c29,_0xcdf827['on']('input',()=>{this['revisionNameInputValue']=_0xcdf827['element']['value']['trim']();}),_0x134f46);}}class u extends _0x314a0a{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x2e5373=this['editor'],_0x4ef7d0=_0x2e5373['plugins']['get']('RevisionTracker');_0x2e5373['ui']['componentFactory']['add']('revisionHistory',_0x5c8aac=>{const _0x3a1d8a=_0x480339(_0x5c8aac),_0x21a6d5=_0x3a1d8a['panelView']['children'],_0x93c60f=new te(_0x5c8aac),_0xbb188f=new _0x5f552b(_0x5c8aac),_0x1dcf5b=new _0x59b23e(_0x5c8aac),_0x4a5bdd=new _0x5f552b(_0x5c8aac),_0x44a55e=new _0x59b23e(_0x5c8aac);return _0x3a1d8a['bind']('isEnabled')['to'](_0x4ef7d0,'isReady',_0x4ef7d0,'isEnabled',_0x2e5373,'isReadOnly',(_0x2bbe87,_0x1240dc,_0x4080a6)=>_0x2bbe87&&_0x1240dc&&!_0x4080a6),_0x3a1d8a['buttonView']['set']({'icon':_0x42aafe['history'],'label':m(_0x5c8aac,'Revision\x20history'),'tooltip':!0x0}),_0x1dcf5b['set']({'label':m(_0x5c8aac,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1dcf5b['bind']('isEnabled')['to'](_0x4ef7d0,'isReady',_0x4ef7d0,'isEnabled',_0x2e5373,'isReadOnly',(_0x346b35,_0x3cde31,_0xca5aff)=>_0x346b35&&_0x3cde31&&!_0xca5aff),_0x1dcf5b['on']('execute',()=>this['_showDialog']()),_0x44a55e['set']({'label':m(_0x5c8aac,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x44a55e['bind']('isEnabled')['to'](_0x4ef7d0,'isReady',_0x2e5373,'isReadOnly',(_0x42f00d,_0x1812d7)=>_0x42f00d&&!_0x1812d7),_0x44a55e['on']('execute',()=>{_0x2e5373['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x3a1d8a['isOpen']=!0x1,_0x2e5373['editing']['view']['focus']();}),_0xbb188f['children']['add'](_0x1dcf5b),_0x4a5bdd['children']['add'](_0x44a55e),_0x93c60f['role']='menu',_0x93c60f['items']['addMany']([_0xbb188f,_0x4a5bdd]),_0x21a6d5['add'](_0x93c60f),_0x3a1d8a;}),_0x2e5373['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x25686c=this['editor'],_0xa3165c=_0x25686c['locale'],_0x5aeb93=new _0x8dd679(_0xa3165c),_0x32042e=new _0x4ac257(_0xa3165c);_0x5aeb93['buttonView']['set']({'icon':_0x42aafe['history'],'label':m(_0xa3165c,'Revision\x20history')});const _0x32e648=new _0x5053a2(_0xa3165c,_0x5aeb93),_0x21b934=new _0x1b3f57(_0xa3165c);_0x21b934['set']({'label':m(_0xa3165c,'Save\x20current\x20revision')}),_0x21b934['delegate']('execute')['to'](_0x5aeb93),_0x21b934['on']('execute',()=>{this['_showDialog']();}),_0x32e648['children']['add'](_0x21b934),_0x32042e['items']['add'](_0x32e648);const _0x38f8fb=new _0x5053a2(_0xa3165c,_0x5aeb93),_0x4cb7db=new _0x1b3f57(_0xa3165c);return _0x4cb7db['set']({'label':m(_0xa3165c,'Open\x20revision\x20history')}),_0x4cb7db['delegate']('execute')['to'](_0x5aeb93),_0x4cb7db['on']('execute',()=>{_0x25686c['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x38f8fb['children']['add'](_0x4cb7db),_0x32042e['items']['add'](_0x38f8fb),_0x5aeb93['panelView']['children']['add'](_0x32042e),_0x5aeb93;}['_showDialog'](){const _0x251fc1=this['editor'],_0x966f81=_0x251fc1['locale'],_0x9ebae5=_0x251fc1['plugins']['get']('Dialog'),_0x5bb5f4=_0x251fc1['plugins']['get']('RevisionTracker');function _0x1ffdde(_0x404bae){_0x251fc1['config']['get']('revisionHistory.requireRevisionName')&&''===_0x404bae['revisionName']?_0x404bae['revisionNameInputView']['errorText']=m(_0x966f81,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x251fc1['plugins']['get'](l)['saveRevision']({'name':_0x404bae['revisionName']}),_0x9ebae5['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1ffdde(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x9ebae5['show']({'id':'revisionSave','title':m(_0x966f81,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x251fc1['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x9ebae5['hide']()},{'label':m(_0x251fc1['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x1d2905){_0x1d2905['bind']('isEnabled')['to'](_0x5bb5f4,'isReady',_0x5bb5f4,'isEnabled',_0x251fc1,'isReadOnly',(_0x53225e,_0x1d44ab,_0x5a99cb)=>_0x53225e&&_0x1d44ab&&!_0x5a99cb);},'onExecute':()=>_0x1ffdde(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x40a21f=this['editor'],_0x2daed1=_0x40a21f['locale'];this['_saveRevisionFormView']=new ns(_0x2daed1,_0x40a21f['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x571e95{['changeId'];['_model'];constructor(_0x176d66,_0x27015d){super(_0x176d66),this['_model']=_0x27015d,this['changeId']=_0x27015d['id'];const _0x4db1de=this['bindTemplate'],_0x21ac29=m(_0x176d66,_0x27015d['data']['isSuggestion']?'Suggested\x20by':'add'==_0x27015d['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x27015d['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4db1de['to']('type',_0x2d89f6=>'ck-revision-change__'+_0x2d89f6)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x21ac29}]},{'text':'\x20'+_0x27015d['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3df942(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x408863){super(),this['id']=_0x408863['id']||_0x1f968a(),this['author']=_0x408863['author'],this['type']=_0x408863['type'],this['data']=_0x408863['data']||{},this['rootName']=_0x408863['rootName'],this['set']('createdAt',_0x408863['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x3f44eb,_0x2b0276){this['newRevisionId']=_0x3f44eb,this['oldRevisionId']=_0x2b0276,this['changes']=new _0x45da80();}['_setChanges'](_0x47dd7d){for(const _0x49a39e of _0x47dd7d)this['changes']['add'](_0x49a39e);}}const Y={'c':_0xe6e3ea,'a':_0x10d9e1,'e':_0x597b98,'r':_0x27d44b,'u':_0xd4e326};class d extends _0x314a0a{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x7a2999,_0x10aeb9,j];}constructor(_0x477dfe){super(_0x477dfe),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x49cb6c,_0x4b3328,_0x826e24)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x1d27b4=>{for(const _0x1bd30e of this['editor']['editing']['view']['document']['roots'])_0x826e24?_0x1d27b4['removeClass']('ck-editor__editable__overlay',_0x1bd30e):_0x1d27b4['addClass']('ck-editor__editable__overlay',_0x1bd30e);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xda300=>null!==_0xda300),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x27c582,_0x3d141f,_0x28fcf2)=>_0x27c582&&_0x28fcf2?_0x3d141f['changes']['getIndex'](_0x28fcf2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xc77459,_0x1f16d6)=>_0xc77459?_0x1f16d6['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x10aeb9);}['init'](){const _0x1352a5=this['editor'],_0x3d0e9b=new yt(_0x1352a5,{'direction':'backward'}),_0x39a3e0=new yt(_0x1352a5,{'direction':'forward'});(_0x1352a5['commands']['add']('showPreviousChange',_0x3d0e9b),_0x1352a5['commands']['add']('showNextChange',_0x39a3e0),_0x1352a5['commands']['add']('restoreRevision',new _t(_0x1352a5)),this['on']('change:numberOfChanges',()=>{_0x3d0e9b['refresh'](),_0x39a3e0['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1352a5['enableReadOnlyMode']('revision-viewer'),_0x1352a5['plugins']['has']('WidgetToolbarRepository'))&&_0x1352a5['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x141011){await this['loadRevisionData'](_0x141011);const _0x18b712={};for(const _0x4c44c6 in _0x141011['diffData']){if(_0x141011['diffData'][_0x4c44c6]['attachChange']&&!_0x141011['diffData'][_0x4c44c6]['attachChange']['isAttached'])continue;const _0x2bfedc=this['_removeRevisionMarkers'](JSON['parse'](_0x141011['diffData'][_0x4c44c6]['insertions'])),_0x4a795d=this['editor']['editing']['view']['document'],_0x4fc94c=new _0x1ebfbf(_0x4a795d,_0x2bfedc['map'](_0x991413=>this['_getViewObj'](_0x991413)));this['editor']['data']['processor']['useFillerType']('marked'),_0x18b712[_0x4c44c6]=this['editor']['data']['processor']['toData'](_0x4fc94c),this['editor']['data']['processor']['useFillerType']('default');}return _0x18b712;}async['getRevisionRootsAttributes'](_0x58c88b){await this['loadRevisionData'](_0x58c88b);const _0x4c4952={};for(const _0x1cd808 in _0x58c88b['diffData'])_0x58c88b['diffData'][_0x1cd808]['attachChange']&&!_0x58c88b['diffData'][_0x1cd808]['attachChange']['isAttached']||(_0x4c4952[_0x1cd808]=_0x58c88b['diffData'][_0x1cd808]['attributesAfter']||{});return _0x4c4952;}['_removeRevisionMarkers'](_0x112e00){return(_0x112e00=_0x112e00['filter'](_0x13cbf6=>!_0x13cbf6['name']||'revision-start'!==_0x13cbf6['name']&&'revision-end'!==_0x13cbf6['name']))['forEach'](_0x52aad9=>{'string'!=typeof _0x52aad9&&(_0x52aad9['children']=this['_removeRevisionMarkers'](_0x52aad9['children']),_0x52aad9['attributes']=_0x52aad9['attributes']['filter'](_0x68531d=>!_0x68531d[0x0]['startsWith']('data-revision-')));}),_0x112e00;}async['compare'](_0x4cd475,_0x1931a1,_0x2c7893=!0x1){if(!this['isEnabled'])return;const _0x54bbe7=this['diff'],_0x5943a2=this['repository'],_0x1a3645='string'==typeof _0x4cd475?_0x5943a2['getRevision'](_0x4cd475):_0x4cd475,_0x2c911c='string'==typeof _0x1931a1?_0x5943a2['getRevision'](_0x1931a1):_0x1931a1,_0x315592=_0x1a3645['id'],_0x3e56d5=_0x2c911c?_0x2c911c['id']:null;if(!_0x2c7893&&this['diff']&&this['diff']['newRevisionId']===_0x315592&&this['diff']['oldRevisionId']===_0x3e56d5)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x315592,_0x3e56d5);const _0xc8cd9a=this['_getRevisionsRange'](_0x1a3645,_0x2c911c,!0x0)['map'](_0x3180f=>this['loadRevisionData'](_0x3180f));return _0xc8cd9a['push'](new Promise(_0x5b87fb=>{setTimeout(_0x5b87fb,0x14);})),Promise['all'](_0xc8cd9a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x256935=this['_getDiff'](_0x315592,_0x3e56d5);for(const _0x4bdf52 of _0x256935['changes'])this['_changeIdToChange']['set'](_0x4bdf52['id'],_0x4bdf52);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x325c96=>{for(const _0x37d204 of this['editor']['model']['document']['getRootNames']())_0x325c96['detachRoot'](_0x37d204);for(const _0x51dc39 of Object['keys'](_0x256935['model'])){const _0xe82c0=_0x325c96['addRoot'](_0x51dc39);for(const _0x389af9 of Object['keys'](_0x256935['attributes'][_0x51dc39]))_0x325c96['setAttribute'](_0x389af9,_0x256935['attributes'][_0x51dc39][_0x389af9],_0xe82c0);_0x325c96['insert'](_0x256935['model'][_0x51dc39],_0xe82c0,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x256935['changes'])),this['isReady']=!0x0;})['catch'](_0x529e74=>{console['error'](_0x529e74),this['_cleanUp'](),_0x54bbe7&&(this['diff']=_0x54bbe7),this['isReady']=!0x0;});}['addRevisionData'](_0x231adb,_0x3f88e6){const _0x22ea2c=this['repository']['createRevision'](_0x231adb);return _0x22ea2c['on']('_update',(_0x5ac148,_0x4f4d83,_0x555ef0)=>_0x3f88e6(_0x4f4d83,_0x555ef0,_0x22ea2c)),this['repository']['addRevision'](_0x22ea2c),_0x22ea2c;}['loadRevisionData'](_0xd11d47){if(!_0xd11d47||_0xd11d47['diffData'])return Promise['resolve']();{const _0x41f853=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x41f853,'revisionId':_0xd11d47['id']})['then'](_0x13a7d3=>{_0xd11d47['_update']({'diffData':_0x13a7d3['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x20dcc0=>{for(const _0x22fc71 of this['editor']['model']['document']['getRootNames']())_0x20dcc0['detachRoot'](_0x22fc71);});}['_sortAndFilterDiffChanges'](_0x621b73){const _0x52cc3f=[],_0x163649=new Map();for(const _0x5cd761 of this['editor']['model']['document']['getRootNames']()){const _0x222963=this['editor']['editing']['view']['getDomRoot'](_0x5cd761);if(!_0x222963)continue;const _0x2b87f6=_0x222963['getClientRects']()['item'](0x0);_0x2b87f6&&(_0x52cc3f['push'](_0x5cd761),_0x163649['set'](_0x5cd761,_0x2b87f6));}return _0x52cc3f['sort']((_0x15eaca,_0x1d7ad4)=>{const _0x3dcc9d=_0x163649['get'](_0x15eaca),_0x24a188=_0x163649['get'](_0x1d7ad4);return _0x3dcc9d['y']-_0x24a188['y']||_0x3dcc9d['x']-_0x24a188['x'];}),(_0x621b73=_0x621b73['filter'](_0x575dd6=>_0x52cc3f['includes'](_0x575dd6['rootName'])))['sort']((_0x51c39c,_0x5871cb)=>_0x52cc3f['indexOf'](_0x51c39c['rootName'])-_0x52cc3f['indexOf'](_0x5871cb['rootName'])),_0x621b73;}['_makeTape'](_0x19c657){const _0x1ac10c=Array['from'](_0x19c657['markers'])['filter'](([_0x13cccb,_0x183aa9])=>_0x13cccb['startsWith']('revision:')&&!_0x183aa9['isCollapsed']),_0x447594=Array['from'](this['editor']['model']['createRangeIn'](_0x19c657)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1ac10c['length'])for(const _0x3d5a3 of _0x447594){const [_0x4430e4,_0x44c6ba]=_0x1ac10c[0x0],[,_0x314cee,_0x4d5d0a]=_0x4430e4['split'](':');if(_0x44c6ba['end']['isEqual'](_0x3d5a3['nextPosition'])&&_0x1ac10c['shift'](),(_0x3d5a3['previousPosition']['isEqual'](_0x44c6ba['start'])||_0x3d5a3['previousPosition']['isAfter'](_0x44c6ba['start']))&&('insertion'==_0x314cee?_0x3d5a3['isAdded']={'userId':_0x4d5d0a}:'deletion'==_0x314cee&&(_0x3d5a3['isRemoved']={'userId':_0x4d5d0a})),0x0==_0x1ac10c['length'])break;}return _0x447594;}['_refreshStartEndIndex'](_0xeb4958){const _0x5d05a9=new Map();for(let _0x4b2780=0x0;_0x4b2780<_0xeb4958['length'];_0x4b2780++)'text'===_0xeb4958[_0x4b2780]['type']?(_0xeb4958[_0x4b2780]['item']['startIndex']=_0x4b2780,_0xeb4958[_0x4b2780]['item']['endIndex']=_0x4b2780):('elementStart'===_0xeb4958[_0x4b2780]['type']?_0xeb4958[_0x4b2780]['item']['startIndex']=_0x4b2780:'elementEnd'===_0xeb4958[_0x4b2780]['type']&&(_0xeb4958[_0x4b2780]['item']['endIndex']=_0x4b2780),_0x5d05a9['set'](_0xeb4958[_0x4b2780]['id'],_0x4b2780));for(const _0x495aa1 of _0x5d05a9['values']())'elementStart'===_0xeb4958[_0x495aa1]['type']?_0xeb4958[_0x495aa1]['item']['endIndex']=_0x5d05a9['get'](_0xeb4958[_0x495aa1]['pairId']):'elementEnd'===_0xeb4958[_0x495aa1]['type']&&(_0xeb4958[_0x495aa1]['item']['startIndex']=_0x5d05a9['get'](_0xeb4958[_0x495aa1]['pairId']));}['_processTape'](_0x33384e){for(let _0x49171a=0x0;_0x49171a<_0x33384e['length'];_0x49171a++){if('elementStart'===_0x33384e[_0x49171a]['type'])_0x33384e[_0x49171a]['item']['startIndex']=_0x49171a;else{if('elementEnd'===_0x33384e[_0x49171a]['type']){_0x33384e[_0x49171a]['item']['endIndex']=_0x49171a;const _0x37bff3=_0x33384e[_0x49171a]['item']['startIndex'];_0x33384e[_0x37bff3]['pairId']=_0x33384e[_0x49171a]['id'],_0x33384e[_0x49171a]['pairId']=_0x33384e[_0x37bff3]['id'];}else _0x33384e[_0x49171a]['item']['startIndex']=_0x49171a,_0x33384e[_0x49171a]['item']['endIndex']=_0x49171a,_0x33384e[_0x49171a]['pairId']=null;}_0x33384e[_0x49171a]['markersStart']||(_0x33384e[_0x49171a]['markersStart']=[],_0x33384e[_0x49171a]['markersEnd']=[]);}}['_markInsertions'](_0x104343,_0x146ba8){const _0x4a7a5d=_0x104343['filter'](_0x582119=>!_0x582119['isAdded']);for(let _0x45abc9=0x0;_0x45abc9<_0x146ba8['length'];_0x45abc9++)_0x146ba8[_0x45abc9]['isAdded']&&(_0x4a7a5d[_0x45abc9]['isAdded']=_0x146ba8[_0x45abc9]['isAdded']);}['_makeModelFromViewString'](_0x4b541c){const _0x374760=JSON['parse'](_0x4b541c),_0xa4d095=this['editor']['editing']['view']['document'],_0x47a6ce=new _0x1ebfbf(_0xa4d095,_0x374760['map'](_0x5b7d6e=>this['_getViewObj'](_0x5b7d6e)));return this['editor']['data']['toModel'](_0x47a6ce);}['_getViewObj'](_0x431692){const _0x551adc=this['editor']['editing']['view']['document'];if('string'==typeof _0x431692)return new _0x166355(_0x551adc,_0x431692);{const _0x2d89e3=_0x431692['children']['map'](_0x33c1a7=>this['_getViewObj'](_0x33c1a7));return new(Y[_0x431692['type']]||_0x2b1c67)(_0x551adc,_0x431692['name'],_0x431692['attributes'],_0x2d89e3);}}['_getDiff'](_0x43444a,_0x1234e5=null){const _0x29b57e=this['repository']['getRevision'](_0x43444a),_0xccab47=_0x1234e5?this['repository']['getRevision'](_0x1234e5):null,_0x1d553e=this['_getRevisionsRange'](_0x29b57e,_0xccab47),_0x432a21=_0x1d553e[_0x1d553e['length']-0x1],_0x4afb93=new Map(),_0x3440dc={'model':{},'attributes':{},'changes':[]},_0x4353aa=new Set(),_0x10a9f4=new Map();for(let _0x53cbb7=_0x1d553e['length']-0x1;_0x53cbb7>=0x0;_0x53cbb7--){const _0x528616=_0x1d553e[_0x53cbb7];for(const _0xacee59 of Object['keys'](_0x528616['diffData']))if(_0x528616['diffData'][_0xacee59]['attachChange']){const _0x185d4a=_0x528616['diffData'][_0xacee59]['attachChange'];_0x185d4a['isAttached']?(_0x4353aa['add'](_0xacee59),_0x10a9f4['has'](_0xacee59)&&_0x10a9f4['get'](_0xacee59)['userId']==_0x185d4a['userId']?_0x10a9f4['delete'](_0xacee59):_0x10a9f4['set'](_0xacee59,_0x185d4a)):_0x10a9f4['has'](_0xacee59)?(_0x4353aa['delete'](_0xacee59),_0x10a9f4['delete'](_0xacee59)):(_0x4353aa['add'](_0xacee59),_0x10a9f4['set'](_0xacee59,_0x185d4a));}else _0x4353aa['add'](_0xacee59);}for(const _0x24ae5f of _0x4353aa){const _0x8d7027=_0x10a9f4['has'](_0x24ae5f)&&!_0x10a9f4['get'](_0x24ae5f)['isAttached'];let _0xf210b7=_0x8d7027?_0x1d553e['length']-0x1:0x0;const _0x49ff17=_0x8d7027?-0x1:0x1;for(;_0x1d553e[_0xf210b7];){const _0x2bc472=_0x1d553e[_0xf210b7];if(_0x2bc472['diffData'][_0x24ae5f]){const _0x4b5866=_0x8d7027?_0x2bc472['diffData'][_0x24ae5f]['attributesBefore']:_0x2bc472['diffData'][_0x24ae5f]['attributesAfter'];_0x3440dc['attributes'][_0x24ae5f]=_0x4b5866?_0x3d1bef(_0x4b5866):{};break;}_0xf210b7+=_0x49ff17;}}for(const _0x3ac146 of _0x1d553e){_0x3ac146['model']={};for(const _0x1b616c of _0x3ac146['authors'])_0x4afb93['set'](_0x1b616c['id'],_0x1b616c);for(const _0x18849e of _0x4353aa){const _0xfd52aa=_0x3ac146['diffData'][_0x18849e]?_0x3ac146['diffData'][_0x18849e]['insertions']:'[]',_0x6e1694=_0x3ac146['diffData'][_0x18849e]?_0x3ac146['diffData'][_0x18849e]['deletions']:'[]';_0x3ac146['model'][_0x18849e]={'insertions':this['_makeModelFromViewString'](_0xfd52aa),'deletions':this['_makeModelFromViewString'](_0x6e1694)};}}for(const _0x38e873 of _0x4353aa){let _0x123943=null,_0x546545=0x0;const _0x2c2449=new Map(Array['from'](_0x29b57e['model'][_0x38e873]['insertions']['markers'])['filter'](([_0x5e5286])=>!_0x5e5286['startsWith']('revision:')));let _0x4533f3=0x0;for(const _0x302513 of _0x1d553e){const _0x49931d=this['_makeTape'](_0x302513['model'][_0x38e873]['insertions']);_0x302513==_0x29b57e?(_0x123943=_0x49931d,_0x546545=_0x123943['length'],_0x123943['forEach'](_0x1fe36b=>{_0x1fe36b['id']=_0x4533f3++;}),this['_processTape'](_0x123943)):this['_markInsertions'](_0x123943,_0x49931d);const _0x1271f1=_0x123943['filter'](_0x2561a1=>!_0x2561a1['isAdded'])['map'](_0x5076ba=>_0x5076ba['id']);let _0x4ae48b=0x0;const _0x315929=this['_makeTape'](_0x302513['model'][_0x38e873]['deletions']);_0x315929['forEach'](_0x3cbba2=>{_0x3cbba2['isRemoved']?_0x3cbba2['id']=_0x546545++:_0x3cbba2['id']=_0x1271f1[_0x4ae48b++];}),this['_processTape'](_0x315929),this['_setDistance'](_0x123943,'isAdded'),this['_setDistance'](_0x315929,'isRemoved'),_0x302513==_0x29b57e&&this['_markMarkers'](_0x123943,_0x2c2449),_0x123943=this['_joinTapes'](_0x123943,_0x315929),this['_refreshStartEndIndex'](_0x123943),this['_setDistance'](_0x123943,'isRemoved');}_0x123943=_0x123943['filter'](_0x191709=>!(_0x191709['isAdded']&&_0x191709['isRemoved']));const _0x573ed0=new Map(_0x432a21['model'][_0x38e873]['deletions']['markers']),_0x3619da=new Set(_0x2c2449['keys']());for(const _0x160ad0 of _0x573ed0['keys']())_0x3619da['delete'](_0x160ad0);this['_markSuggestions'](_0x123943,_0x3619da),this['_fixObsoleteTags'](_0x123943),_0x123943=this['_removeMissingPairs'](_0x123943),_0x123943=this['_markMismatchedRemovedTags'](_0x123943),_0x123943=this['_removeUnsupportedChanges'](_0x123943);const {root:_0x2341a0,changes:_0x297a9b}=this['_makeModelFromTape'](_0x123943,_0x4afb93,_0x38e873);_0x3440dc['model'][_0x38e873]=_0x2341a0;const _0x45c8e6=_0x10a9f4['get'](_0x38e873);if(_0x45c8e6){const _0x1291b6=_0x4afb93['get'](_0x45c8e6['userId']),_0x5c4430=new r({'author':_0x1291b6,'type':_0x45c8e6['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x38e873});_0x297a9b['unshift'](_0x5c4430),_0x3440dc['attributes'][_0x38e873]['revisionHistoryAttachChange']=_0x5c4430['id'];}_0x3440dc['changes']=_0x3440dc['changes']['concat'](_0x297a9b);}return _0x3440dc;}['_markMarkers'](_0x1528eb,_0x70a327){for(let _0x558729=0x0;_0x558729<_0x1528eb['length'];_0x558729++)for(const [_0xbe752f,_0x179b37]of _0x70a327)_0x179b37['start']['isEqual'](_0x1528eb[_0x558729]['previousPosition'])&&_0x1528eb[_0x558729]['markersStart']['push'](_0xbe752f),_0x179b37['end']['isEqual'](_0x1528eb[_0x558729]['nextPosition'])&&_0x1528eb[_0x558729]['markersEnd']['push'](_0xbe752f);}['_joinTapes'](_0x432b5a,_0x1e699f){let _0x25fc44=[],_0x58da10=0x0,_0x2c69a5=0x0;for(;_0x58da10<_0x432b5a['length']||_0x2c69a5<_0x1e699f['length'];){const _0x15621a=_0x432b5a[_0x58da10]||{},_0x51d501=_0x1e699f[_0x2c69a5]||{};if(_0x15621a['id']==_0x51d501['id'])_0x58da10++,_0x2c69a5++,_0x25fc44['push'](_0x15621a);else{if(_0x51d501['isRemoved']&&_0x15621a['isAdded']){const {commonTape:_0x3fc19f,iEnd:_0x4e2fbc,jEnd:_0x5b339b}=this['_threeWayMerge'](_0x432b5a,_0x58da10,_0x1e699f,_0x2c69a5);_0x25fc44=_0x25fc44['concat'](_0x3fc19f),_0x58da10=_0x4e2fbc,_0x2c69a5=_0x5b339b;}else _0x51d501['isRemoved']?(_0x2c69a5++,_0x25fc44['push'](_0x51d501)):(_0x58da10++,_0x25fc44['push'](_0x15621a));}}return _0x25fc44;}['_markSuggestions'](_0xdc6f50,_0x13951c){const _0x5d1735=[];for(let _0x5bdc6c=0x0;_0x5bdc6c<_0xdc6f50['length'];_0x5bdc6c++){for(let _0x2ea73d=0x0;_0x2ea73d<_0xdc6f50[_0x5bdc6c]['markersStart']['length'];_0x2ea73d++){const _0x5742c4=_0xdc6f50[_0x5bdc6c]['markersStart'][_0x2ea73d];if(!_0x13951c['has'](_0x5742c4))continue;const {group:_0x592551,type:_0x5e7d5d,authorId:_0x26f303}=_0x34bd0e(_0x5742c4);'revision-suggestion'!=_0x592551||'insertion'!=_0x5e7d5d&&'deletion'!=_0x5e7d5d||(_0x5d1735['unshift']({'type':_0x5e7d5d,'name':_0x5742c4,'userId':_0x26f303}),_0xdc6f50[_0x5bdc6c]['markersStart']['splice'](_0x2ea73d,0x1),_0x2ea73d--);}_0x55a9c1(_0xdc6f50[_0x5bdc6c]);for(let _0x7ea977=0x0;_0x7ea977<_0xdc6f50[_0x5bdc6c]['markersEnd']['length'];_0x7ea977++){const _0x5f9ee2=_0xdc6f50[_0x5bdc6c]['markersEnd'][_0x7ea977];if(!_0x13951c['has'](_0x5f9ee2))continue;const {group:_0x410980,type:_0x96ded4}=_0x34bd0e(_0x5f9ee2);if('revision-suggestion'!=_0x410980||'insertion'!=_0x96ded4&&'deletion'!=_0x96ded4)continue;_0xdc6f50[_0x5bdc6c]['markersEnd']['splice'](_0x7ea977,0x1),_0x7ea977--;const _0x5496cd=_0x5d1735['findIndex'](_0x3cc39b=>_0x3cc39b['name']==_0x5f9ee2);_0x5496cd>-0x1&&_0x5d1735['splice'](_0x5496cd,0x1);}}function _0x34bd0e(_0x17e4a1){const _0x44b832=_0x17e4a1['split'](':');return{'group':_0x44b832[0x0],'type':_0x44b832[0x1],'subType':_0x44b832['length']>=0x5?_0x44b832[0x2]:null,'id':_0x44b832['length']<0x5?_0x44b832[0x2]:_0x44b832[0x3],'authorId':_0x44b832['length']<0x5?_0x44b832[0x3]:_0x44b832[0x4],'markerCount':0x6==_0x44b832['length']?_0x44b832[0x5]:null};}function _0x55a9c1(_0x19b1f4){for(let _0x20ceeb=0x0;_0x20ceeb<_0x5d1735['length'];_0x20ceeb++){if(_0x19b1f4['isAdded']&&'insertion'==_0x5d1735[_0x20ceeb]['type'])return _0x19b1f4['isAddSuggestion']=_0x5d1735[_0x20ceeb],void delete _0x19b1f4['isAdded'];if(!_0x19b1f4['isAdded']&&!_0x19b1f4['isRemoved']&&'deletion'==_0x5d1735[_0x20ceeb]['type'])return void(_0x19b1f4['isRemoveSuggestion']=_0x5d1735[_0x20ceeb]);}}}['_setDistance'](_0x421824,_0x1eb785){let _0x270061=0x0,_0x273b24=!0x1;const _0x2ace2b=new Map();for(const _0x6f9289 of _0x421824)_0x6f9289[_0x1eb785]?_0x273b24&&(_0x270061++,_0x273b24=!0x1):(_0x270061++,_0x273b24=!0x0),_0x2ace2b['set'](_0x6f9289['id'],_0x270061);for(let _0x1ffbf1=0x0;_0x1ffbf1<_0x421824['length'];_0x1ffbf1++){if('isRemoved'==_0x1eb785&&_0x421824[_0x1ffbf1]['isAdded']||'isAdded'==_0x1eb785&&_0x421824[_0x1ffbf1]['isRemoved'])continue;if('text'==_0x421824[_0x1ffbf1]['type']){_0x421824[_0x1ffbf1]['distance']=0x0;continue;}const _0x255556=_0x2ace2b['get'](_0x421824[_0x1ffbf1]['pairId']),_0xdde606=_0x2ace2b['get'](_0x421824[_0x1ffbf1]['id']);_0x421824[_0x1ffbf1]['distance']=_0x255556-_0xdde606;}}['_getRevisionsRange'](_0x2fb2c2,_0x2cea96,_0x345992=!0x1){const _0x8aff2d=[];let _0x2ba582=this['repository']['getIndex'](_0x2fb2c2),_0x3f1185=this['repository']['getIndex'](_0x2cea96);for(-0x1==_0x3f1185&&(_0x3f1185=this['repository']['_revisions']['length'],_0x345992=!0x1);_0x2ba582<_0x3f1185;)_0x8aff2d['push'](this['repository']['getRevision'](_0x2ba582)),_0x2ba582++;return _0x345992&&_0x8aff2d['push'](this['repository']['getRevision'](_0x2ba582)),_0x8aff2d;}['_threeWayMerge'](_0x39bd37,_0x45767f,_0x4d918d,_0x581ca8){const _0x32012c=this['editor']['model']['schema'];let _0x5a30c8=_0x45767f;for(;_0x39bd37[_0x5a30c8]&&_0x39bd37[_0x5a30c8]['isAdded'];)_0x5a30c8++;let _0x904a32=_0x581ca8;for(;_0x4d918d[_0x904a32]&&_0x4d918d[_0x904a32]['isRemoved'];)_0x904a32++;_0x3d2308(_0x39bd37,_0x45767f,_0x5a30c8),_0x3d2308(_0x4d918d,_0x581ca8,_0x904a32);const _0xf10653=_0x4d918d['slice'](_0x581ca8,_0x904a32)['concat'](_0x39bd37['slice'](_0x45767f,_0x5a30c8));return _0xf10653['sort']((_0x31bb77,_0x535142)=>_0x31bb77['side']!=_0x535142['side']?_0x31bb77['side']-_0x535142['side']:_0x31bb77['level']!=_0x535142['level']?_0x31bb77['level']-_0x535142['level']:_0x31bb77['distance']!=_0x535142['distance']?_0x535142['distance']-_0x31bb77['distance']:!!_0x31bb77['isAdded']!=!!_0x535142['isAdded']?-0x1==_0x31bb77['side']||0x0==_0x31bb77['side']?_0x31bb77['isAdded']?-0x1:0x1:_0x31bb77['isAdded']?0x1:-0x1:_0x31bb77['index']-_0x535142['index']),{'commonTape':_0xf10653,'iEnd':_0x5a30c8,'jEnd':_0x904a32};function _0x3d2308(_0x2fcff5,_0x58b942,_0x117029){let _0x15ced8=-0x1,_0x4962d0=Number['POSITIVE_INFINITY'],_0x562d8f=!0x0;for(let _0x35eff4=_0x58b942;_0x35eff4<_0x117029;_0x35eff4++)if(_0x32012c['isInline'](_0x2fcff5[_0x35eff4]['item'])||(_0x562d8f=!0x1),_0x2fcff5[_0x35eff4]['item']['startIndex']<_0x58b942&&(_0x15ced8=_0x35eff4),_0x2fcff5[_0x35eff4]['item']['endIndex']>=_0x117029){_0x4962d0=_0x35eff4;break;}_0x562d8f&&(_0x15ced8=_0x117029-0x1);for(let _0x123f2c=_0x58b942;_0x123f2c<_0x117029;_0x123f2c++)_0x2fcff5[_0x123f2c]['side']=_0x123f2c<=_0x15ced8?-0x1:_0x123f2c<_0x4962d0?0x0:0x1,_0x2fcff5[_0x123f2c]['index']=_0x123f2c;let _0x2a0989=0x0;for(let _0x19d026=_0x58b942;_0x19d026<=_0x15ced8;_0x19d026++)0x0==_0x2fcff5[_0x19d026]['distance']?_0x2fcff5[_0x19d026]['level']=_0x2a0989:(_0x2a0989++,_0x2fcff5[_0x19d026]['level']=_0x2a0989,_0x2a0989++);for(let _0xf20eae=_0x58b942;_0xf20eae<_0x117029;_0xf20eae++)0x0==_0x2fcff5[_0xf20eae]['side']&&(_0x2fcff5[_0xf20eae]['level']=_0x2a0989);_0x2a0989=0x0;for(let _0x10f059=_0x117029-0x1;_0x10f059>=_0x4962d0;_0x10f059--)0x0==_0x2fcff5[_0x10f059]['distance']?_0x2fcff5[_0x10f059]['level']=_0x2a0989:(_0x2a0989--,_0x2fcff5[_0x10f059]['level']=_0x2a0989,_0x2a0989--);}}['_fixObsoleteTags'](_0xe8c0b5){const _0x22ecaf=new Map(),_0x448db0=this['editor']['model']['schema'];for(let _0x51a7a6=0x1;_0x51a7a6<_0xe8c0b5['length'];_0x51a7a6++){let _0x469e49,_0x35b901,_0x4d916a;const _0x2c7115=_0xe8c0b5[_0x51a7a6],_0x1a89b9=_0xe8c0b5[_0x51a7a6-0x1];if('text'==_0x2c7115['type'])continue;if(_0x2c7115['type']!=_0x1a89b9['type'])continue;if(!_0x448db0['isBlock'](_0x1a89b9['item'])||_0x448db0['isLimit'](_0x1a89b9['item']))continue;if(!_0x448db0['isBlock'](_0x2c7115['item'])||_0x448db0['isLimit'](_0x2c7115['item']))continue;if((_0xe8c0b5[_0x51a7a6]['isAdded']||_0xe8c0b5[_0x51a7a6]['isAddSuggestion'])&&_0xe8c0b5[_0x51a7a6-0x1]['isRemoved'])_0x469e49=_0xe8c0b5[_0x51a7a6],_0x35b901=_0xe8c0b5[_0x51a7a6-0x1],_0x4d916a=_0x51a7a6-0x1;else{if(!_0xe8c0b5[_0x51a7a6]['isRemoved']||!_0xe8c0b5[_0x51a7a6-0x1]['isAdded']&&!_0xe8c0b5[_0x51a7a6-0x1]['isAddSuggestion'])continue;_0x469e49=_0xe8c0b5[_0x51a7a6-0x1],_0x35b901=_0xe8c0b5[_0x51a7a6],_0x4d916a=_0x51a7a6;}const _0x1e6aa1=_0x469e49['level']==_0x35b901['level'],_0x3aa877=Math['abs'](_0x469e49['level'])<Math['abs'](_0x35b901['level'])&&0x0==_0x35b901['distance'];(_0x1e6aa1||_0x3aa877)&&(_0x22ecaf['set'](_0x35b901['id'],_0x469e49['id']),_0xe8c0b5['splice'](_0x4d916a,0x1),_0x51a7a6--,_0x469e49['isAdded']=!0x1);}for(let _0xf8aad1=0x0;_0xf8aad1<_0xe8c0b5['length'];_0xf8aad1++)_0x22ecaf['has'](_0xe8c0b5[_0xf8aad1]['pairId'])&&(_0xe8c0b5[_0xf8aad1]['pairId']=_0x22ecaf['get'](_0xe8c0b5[_0xf8aad1]['pairId']));}['_removeMissingPairs'](_0x597e90){const _0x867724=new Set(_0x597e90['map'](_0x14776a=>_0x14776a['id']));for(let _0x22b10e=0x0;_0x22b10e<_0x597e90['length'];_0x22b10e++)_0x867724['has'](_0x597e90[_0x22b10e]['pairId'])||0x0==_0x597e90[_0x22b10e]['distance']||(_0x597e90[_0x22b10e]['isIncorrect']=!0x0);return _0x597e90['filter'](_0x43cd0a=>!_0x43cd0a['isIncorrect']);}['_markMismatchedRemovedTags'](_0x336cb7){const _0x69b211=new Set();for(let _0x4d9910=0x0;_0x4d9910<_0x336cb7['length'];_0x4d9910++){if(_0x69b211['has'](_0x336cb7[_0x4d9910]['id'])&&_0x336cb7[_0x4d9910]['isRemoved']&&(_0x336cb7[_0x4d9910]['isIncorrect']=!0x0),_0x336cb7[_0x4d9910]['isIncorrect'])continue;if(0x0==_0x336cb7[_0x4d9910]['distance'])continue;if('elementStart'!=_0x336cb7[_0x4d9910]['type'])continue;if(null==_0x336cb7[_0x4d9910]['pairId'])continue;let _0x37dae1=_0x4d9910+0x1,_0x314fe6=0x0;for(;_0x336cb7[_0x37dae1]['id']!=_0x336cb7[_0x4d9910]['pairId'];)'elementStart'==_0x336cb7[_0x37dae1]['type']?_0x314fe6++:'elementEnd'==_0x336cb7[_0x37dae1]['type']&&_0x314fe6--,_0x37dae1++;if(0x0!=_0x314fe6){if(_0x336cb7[_0x4d9910]['isRemoved'])_0x336cb7[_0x4d9910]['isIncorrect']=!0x0;else{for(;_0x37dae1!=_0x4d9910;)_0x336cb7[_0x37dae1]['isRemoved']&&0x0!=_0x336cb7[_0x37dae1]['distance']&&(_0x336cb7[_0x37dae1]['isIncorrect']=!0x0,_0x69b211['add'](_0x336cb7[_0x37dae1]['pairId'])),_0x37dae1--;}}}return _0x336cb7['filter'](_0x280743=>!_0x280743['isIncorrect']);}['_removeUnsupportedChanges'](_0x4b4e14){const _0x437d46=this['editor']['model']['schema'];for(let _0x2add56=0x0;_0x2add56<_0x4b4e14['length'];_0x2add56++){if(!(_0x4b4e14[_0x2add56]['isAdded']||_0x4b4e14[_0x2add56]['isAddSuggestion']||_0x4b4e14[_0x2add56]['isRemoved']||_0x4b4e14[_0x2add56]['isRemoveSuggestion']))continue;if(0x0==_0x4b4e14[_0x2add56]['distance'])continue;const _0x110499=_0x4b4e14[_0x2add56]['item'];_0x437d46['isBlock'](_0x110499)||_0x437d46['isLimit'](_0x110499)||(_0x4b4e14[_0x2add56]['isAdded']&&delete _0x4b4e14[_0x2add56]['isAdded'],_0x4b4e14[_0x2add56]['isAddSuggestion']&&delete _0x4b4e14[_0x2add56]['isAddSuggestion'],_0x4b4e14[_0x2add56]['isRemoveSuggestion']&&delete _0x4b4e14[_0x2add56]['isRemoveSuggestion'],_0x4b4e14[_0x2add56]['isRemoved']&&(_0x4b4e14[_0x2add56]['isIncorrect']=!0x0));}return _0x4b4e14['filter'](_0x1bfaea=>!_0x1bfaea['isIncorrect']);}['_makeModelFromTape'](_0xb6e232,_0x14cefc,_0x20cf9f){const _0x52d700=new mt(),_0x325388=[],_0x5ae094=new Map(),_0x5511d7=this['editor']['model'],_0x11b375=_0x5511d7['schema'],_0x515cff=[_0x52d700],_0x5763d0={},_0x23f42a={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x3f56bf=null;const _0xf451dd=[0x0];for(let _0x26d1ba=0x0;_0x26d1ba<_0xb6e232['length'];_0x26d1ba++)if('elementStart'===_0xb6e232[_0x26d1ba]['type']){_0xb6e232[_0x26d1ba]['previousPosition']=_0x5511d7['createPositionFromPath'](_0x52d700,_0xf451dd);const _0x496a62=new ft(_0xb6e232[_0x26d1ba]['item']['name'],_0xb6e232[_0x26d1ba]['item']['getAttributes']());_0x515cff[0x0]['_appendChild'](_0x496a62),_0xf451dd['push'](0x0),_0x515cff['unshift'](_0x496a62),_0xb6e232[_0x26d1ba]['nextPosition']=_0x5511d7['createPositionFromPath'](_0x52d700,_0xf451dd);}else'elementEnd'===_0xb6e232[_0x26d1ba]['type']?(_0x515cff['shift'](),_0xb6e232[_0x26d1ba]['previousPosition']=_0x5511d7['createPositionFromPath'](_0x52d700,_0xf451dd),_0xf451dd['pop'](),_0xf451dd[_0xf451dd['length']-0x1]++,_0xb6e232[_0x26d1ba]['nextPosition']=_0x5511d7['createPositionFromPath'](_0x52d700,_0xf451dd)):(_0xb6e232[_0x26d1ba]['previousPosition']=_0x5511d7['createPositionFromPath'](_0x52d700,_0xf451dd),_0x3f56bf?_0x3f56bf['_data']+=_0xb6e232[_0x26d1ba]['item']['data']:_0x3f56bf=new wt(_0xb6e232[_0x26d1ba]['item']['data'],_0xb6e232[_0x26d1ba]['item']['getAttributes']()),_0xb6e232[_0x26d1ba+0x1]&&'text'===_0xb6e232[_0x26d1ba+0x1]['type']&&_0x13bed1(_0x3f56bf,_0xb6e232[_0x26d1ba+0x1]['item'])||(_0x515cff[0x0]['_appendChild'](_0x3f56bf),_0x3f56bf=null),_0xf451dd[_0xf451dd['length']-0x1]+=_0xb6e232[_0x26d1ba]['item']['offsetSize'],_0xb6e232[_0x26d1ba]['nextPosition']=_0x5511d7['createPositionFromPath'](_0x52d700,_0xf451dd));for(let _0x55e250=0x0;_0x55e250<_0xb6e232['length'];_0x55e250++){const _0x348959=_0xb6e232[_0x55e250]['previousPosition'],_0x4b1034=_0xb6e232[_0x55e250]['nextPosition'];for(const _0x5d96cf of _0xb6e232[_0x55e250]['markersStart'])_0x5ae094['set'](_0x5d96cf,{'start':_0x348959,'end':null});_0x199615('isRemoveSuggestion',_0x55e250,_0x348959,_0x4b1034),_0x199615('isAddSuggestion',_0x55e250,_0x348959,_0x4b1034),_0x199615('isRemoved',_0x55e250,_0x348959,_0x4b1034),_0x199615('isAdded',_0x55e250,_0x348959,_0x4b1034);for(const _0x1cea7d of _0xb6e232[_0x55e250]['markersEnd']){_0x5ae094['get'](_0x1cea7d)['end']=_0x4b1034;}}for(const [_0xbd1581,_0x4bb7c6]of _0x5ae094){const _0x386212=this['editor']['model']['createRange'](_0x4bb7c6['start'],_0x4bb7c6['end']);_0x52d700['markers']['set'](_0xbd1581,_0x386212);}return _0x325388['sort']((_0x4f0b9e,_0x2f0503)=>{const _0x2df97a=_0x52d700['markers']['get']('revision:'+_0x4f0b9e['id']),_0x3cc04c=_0x52d700['markers']['get']('revision:'+_0x2f0503['id']);return _0x2df97a['start']['isBefore'](_0x3cc04c['start'])?-0x1:_0x2df97a['start']['isAfter'](_0x3cc04c['start'])?0x1:_0x2df97a['end']['isBefore'](_0x3cc04c['end'])?-0x1:_0x2df97a['end']['isAfter'](_0x3cc04c['end'])?0x1:'add'===_0x4f0b9e['type']?-0x1:0x1;}),{'root':_0x52d700,'changes':_0x325388};function _0x199615(_0x53515d,_0x3d9b01,_0xd12724,_0x79f6df){const _0x5c1ca0=!!_0xb6e232[_0x3d9b01][_0x53515d],_0x16d037=_0x5c1ca0?_0xb6e232[_0x3d9b01][_0x53515d]['userId']:null,_0x5905bd=_0x3d9b01===_0xb6e232['length']-0x1,_0x4ec27b=_0x23f42a[_0x53515d][0x0],_0x5ed382=_0x11b375['isObject'](_0xb6e232[_0x3d9b01]['item']);!_0x5763d0[_0x53515d]&&_0x5c1ca0?_0x5763d0[_0x53515d]={'start':_0xd12724,'tapeItem':_0xb6e232[_0x3d9b01],'userId':_0x16d037,'type':_0x53515d}:_0x5763d0[_0x53515d]&&!_0x5c1ca0?(_0x5763d0[_0x53515d]['end']=_0xd12724,_0x4d3b32(_0x5763d0[_0x53515d]),_0x5763d0[_0x53515d]=null):_0x5763d0[_0x53515d]&&_0x5c1ca0&&_0x5763d0[_0x53515d]['userId']!==_0x16d037&&(_0x5763d0[_0x53515d]['end']=_0xd12724,_0x4ec27b&&_0x4ec27b['userId']===_0x5763d0[_0x53515d]['userId']||_0x4d3b32(_0x5763d0[_0x53515d]),_0x5763d0[_0x53515d]={'start':_0xd12724,'tapeItem':_0xb6e232[_0x3d9b01],'userId':_0x16d037,'type':_0x53515d}),_0x5763d0[_0x53515d]&&_0x5ed382&&('elementStart'!==_0xb6e232[_0x3d9b01]['type']||_0x4ec27b&&_0x4ec27b['userId']===_0x16d037||_0x23f42a[_0x53515d]['unshift']({'userId':_0x16d037,'object':_0xb6e232[_0x3d9b01]['item'],'change':_0x5763d0[_0x53515d]}),'elementEnd'===_0xb6e232[_0x3d9b01]['type']&&_0x4ec27b&&_0x4ec27b['object']===_0xb6e232[_0x3d9b01]['item']&&(_0x23f42a[_0x53515d]['shift'](),_0x5763d0[_0x53515d]=_0x4ec27b['change'])),_0x5763d0[_0x53515d]&&_0x5905bd&&(_0x5763d0[_0x53515d]['end']=_0x79f6df,_0x4d3b32(_0x5763d0[_0x53515d]),_0x5763d0[_0x53515d]=null);}function _0x4d3b32({start:_0x39472e,end:_0x2e67fc,tapeItem:_0x3337ec,userId:_0x5154db,type:_0x1a3c91}){const _0x5bd1ba=_0x3337ec['item'],_0x5c7775=_0x5511d7['schema']['isBlock'](_0x5bd1ba)&&!_0x5511d7['schema']['isLimit'](_0x5bd1ba),_0x2abb29=_0x39472e['nodeAfter']==_0x2e67fc['parent']&&_0x2e67fc['isAtStart'];if(_0x5c7775&&_0x2abb29)return;const _0x11ba11=_0x5511d7['createRange'](_0x39472e,_0x2e67fc),_0x418c71=_0x14cefc['get'](_0x5154db),_0x1e1cb7=new r({'author':_0x418c71,'type':'isAdded'==_0x1a3c91||'isAddSuggestion'==_0x1a3c91?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1a3c91||'isRemoveSuggestion'==_0x1a3c91},'createdAt':new Date(),'rootName':_0x20cf9f});_0x325388['push'](_0x1e1cb7),_0x52d700['markers']['set']('revision:'+_0x1e1cb7['id'],_0x11ba11);}function _0x13bed1(_0xcb6ff4,_0x3b5cb3){const _0x191532=_0xcb6ff4['getAttributes'](),_0x29c85b=_0x3b5cb3['getAttributes']();for(const _0x1b3584 of _0x191532){if(_0x1b3584[0x1]!==_0x3b5cb3['getAttribute'](_0x1b3584[0x0]))return!0x1;_0x29c85b['next']();}return _0x29c85b['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x39961a=>{const _0x3cb291=_0x39961a['markerName']['split'](':')[0x1],_0x32024c=this['_getChangeFromId'](_0x3cb291);if(!_0x32024c)return null;const _0x43dcb4='add'==_0x32024c['type']?'insertion':'deletion',_0x1fec07=['ck-suggestion-marker','ck-suggestion-marker-'+_0x43dcb4];return _0x32024c['data']['isSuggestion']&&_0x1fec07['push']('ck-suggestion-marker-'+_0x43dcb4+'-new'),this['activeChange']==_0x32024c&&_0x1fec07['push']('ck-suggestion-marker--active'),{'classes':_0x1fec07,'attributes':{'data-change-id':_0x3cb291}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3f5da3=>{_0x3f5da3['on']('element:pre',(_0x49a34a,_0x4a9de4,_0x98ed55)=>{const _0x18a1a5=_0x4a9de4['viewItem']['getChild'](0x0);if(!_0x18a1a5||!_0x18a1a5['is']('element','code'))return;if(!_0x98ed55['consumable']['consume'](_0x18a1a5,{'attributes':['vid_start','vid_end']}))return;const _0xa190ef=_0x4a9de4['modelRange']['start']['nodeAfter'];_0x98ed55['writer']['setAttribute']('vid_start',_0x18a1a5['getAttribute']('vid_start'),_0xa190ef),_0x98ed55['writer']['setAttribute']('vid_end',_0x18a1a5['getAttribute']('vid_end'),_0xa190ef);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x30c192=>{_0x30c192['on']('element',(_0x34b596,_0x6770f3,_0x5cabc7)=>{if(!_0x5cabc7['consumable']['consume'](_0x6770f3['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x6770f3['modelRange']['isCollapsed'])return;const _0x2216c0=_0x6770f3['modelRange']['start']['nodeAfter'];_0x2216c0['hasAttribute']('vid_start')||_0x2216c0['hasAttribute']('vid')||(_0x5cabc7['writer']['setAttribute']('vid_start',_0x6770f3['viewItem']['getAttribute']('vid_start'),_0x2216c0),_0x5cabc7['writer']['setAttribute']('vid_end',_0x6770f3['viewItem']['getAttribute']('vid_end'),_0x2216c0));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x51854a=>_0x51854a['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x53df3f,[,_0x5911cc])=>{['vid_start','vid_end','vid']['includes'](_0x5911cc)&&(_0x53df3f['return']=!0x0,_0x53df3f['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4f1adc=>{_0x4f1adc['on']('attribute:vid',(_0x42bad8,_0x59c18a,_0x50b9b0)=>{if('\x20'!=_0x59c18a['item']['data']||_0x59c18a['item']['parent']['maxOffset']>0x1)return;if(!_0x50b9b0['consumable']['consume'](_0x59c18a['item'],_0x42bad8['name']))return;const _0x93df2c=_0x50b9b0['writer'],_0x56bcbb=_0x50b9b0['mapper']['toViewRange'](_0x59c18a['range']);_0x93df2c['wrap'](_0x56bcbb,_0x93df2c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x397c7d){const _0x44ffd2=_0x397c7d['plugins']['get']('RevisionViewer');return(_0x3783b9,_0x3ffc12,_0x4c12c7)=>{const _0x3b374a=_0x3ffc12['markerName']['split'](':')[0x1],_0x9a0433=_0x44ffd2['_getChangeFromId'](_0x3b374a);if(!_0x9a0433)return null;const _0x3676f7='add'==_0x9a0433['type']?'split':'merge';if(!_0x4c12c7['consumable']['test'](_0x3ffc12['markerRange'],_0x3783b9['name']))return;const _0x1b5790=_0x3ffc12['markerRange']['getWalker'](),_0x1cd090=_0x3ffc12['markerRange']['start'],_0x26c27b=_0x397c7d['model']['schema'];let _0x699026=null,_0x4fea67=null,_0x17b310=!0x1,_0x20cb45=!0x1;for(const _0x502e68 of _0x1b5790){const _0x18b327=_0x502e68['item'];_0x17b310=_0x17b310||_0x26c27b['isContent'](_0x18b327);const _0x4f769f=_0x4c12c7['mapper']['toViewElement'](_0x18b327);if(_0x4f769f&&_0x4f769f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x502e68['type']&&(_0x26c27b['isBlock'](_0x18b327)&&!_0x26c27b['isLimit'](_0x18b327)&&(_0x18b327['nextSibling']||_0x1cd090['isAtEnd']?_0x699026&&_0x699026['parent']==_0x18b327||(_0x699026=_0x18b327,_0x54ed0b(_0x502e68['previousPosition']),_0x20cb45=!0x0):_0x4fea67=_0x4fea67||_0x502e68['previousPosition']));}function _0x54ed0b(_0xe9febc){const _0x1d49bd=_0x4c12c7['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3676f7}),_0x3c26d9=_0x4c12c7['mapper']['toViewPosition'](_0xe9febc);_0x9a0433['data']['isSuggestion']&&_0x4c12c7['writer']['addClass']('ck-suggestion-marker-'+_0x3676f7+'-new',_0x1d49bd),_0x44ffd2['activeChange']==_0x9a0433&&_0x4c12c7['writer']['addClass']('ck-suggestion-marker--active',_0x1d49bd),_0x4c12c7['writer']['insert'](_0x3c26d9,_0x1d49bd),_0x4c12c7['mapper']['bindElementToMarker'](_0x1d49bd,_0x3ffc12['markerName']);}_0x17b310||_0x20cb45||!_0x4fea67||_0x54ed0b(_0x4fea67);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x536594,_0x5cec99,_0x327cf7)=>{const _0x32269d=_0x327cf7['mapper']['markerNameToElements'](_0x5cec99['markerName']);if(_0x32269d){for(const _0x2049c2 of _0x32269d)(_0x2049c2['hasClass']('ck-suggestion-marker-split')||_0x2049c2['hasClass']('ck-suggestion-marker-merge'))&&(_0x327cf7['mapper']['unbindElementFromMarkerName'](_0x2049c2,_0x5cec99['markerName']),_0x327cf7['writer']['remove'](_0x2049c2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3bacc1,_0xdfb4cc,_0x29c867)=>{const _0x43ddb7=_0xdfb4cc['markerName']['split'](':')[0x1],_0x255fc7=this['_getChangeFromId'](_0x43ddb7);if(!_0x255fc7)return null;const _0x38f25c='add'==_0x255fc7['type']?'split':'merge';if(_0x29c867['consumable']['test'](_0xdfb4cc['markerRange'],_0x3bacc1['name']))for(const _0x474263 of _0xdfb4cc['markerRange']['getItems']()){if(!_0x474263['is']('element','softBreak'))continue;const _0x3d44d7=_0x29c867['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x38f25c}),_0x20da42=_0x29c867['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x474263));_0x255fc7['data']['isSuggestion']&&_0x29c867['writer']['addClass']('ck-suggestion-marker-'+_0x38f25c+'-new',_0x3d44d7),this['activeChange']==_0x255fc7&&_0x29c867['writer']['addClass']('ck-suggestion-marker--active',_0x3d44d7),_0x29c867['writer']['insert'](_0x20da42,_0x3d44d7),_0x29c867['mapper']['bindElementToMarker'](_0x3d44d7,_0xdfb4cc['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x264b4f=>{for(const _0x31bb78 of this['editor']['model']['document']['getRootNames']()){const _0x1e9a4a=this['editor']['model']['document']['getRoot'](_0x31bb78),_0x46033e=this['editor']['editing']['view']['document']['getRoot'](_0x31bb78);if(_0x46033e){const _0x347a49=_0x1e9a4a['getAttribute']('revisionHistoryAttachChange');if(_0x264b4f['removeAttribute']('data-change-id',_0x46033e),_0x264b4f['removeClass']('ck-revision-history-root-add',_0x46033e),_0x264b4f['removeClass']('ck-revision-history-root-remove',_0x46033e),_0x264b4f['removeClass']('ck-revision-history-root--active',_0x46033e),_0x347a49){const _0x2e8875=this['_getChangeFromId'](_0x347a49);if(!_0x2e8875)return null;_0x264b4f['setAttribute']('data-change-id',_0x347a49,_0x46033e),_0x264b4f['addClass']('ck-revision-history-root-'+_0x2e8875['type'],_0x46033e),this['activeChange']==_0x2e8875&&_0x264b4f['addClass']('ck-revision-history-root--active',_0x46033e);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2669c7=>'revision-comment:'+_0x2669c7,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5d2eb7=>'revision-suggestion:'+_0x5d2eb7,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2cfd9f=>({'name':'suggestion:'+_0x2cfd9f,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x15a808=>{const _0x13d8c5=_0x15a808['markerName']['split'](':')[0x1];return'insertion'!=_0x13d8c5&&'deletion'!=_0x13d8c5?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x13d8c5]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x4161ad,_0xa1a48f,_0x173cc5)=>{const _0x7b5ab2=_0x173cc5['mapper']['markerNameToElements'](_0xa1a48f['markerName']);if(_0x7b5ab2){for(const _0x449d9c of _0x7b5ab2)_0x449d9c['is']('uiElement')&&(_0x173cc5['mapper']['unbindElementFromMarkerName'](_0x449d9c,_0xa1a48f['markerName']),_0x173cc5['writer']['remove'](_0x449d9c));}},{'priority':'high'});}['_getChangeFromId'](_0x3e10f5){return this['_changeIdToChange']['get'](_0x3e10f5);}['_getViewForChange'](_0x104e75){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x104e75),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4a6bb2,_0x45c7f0,_0x819c0f,_0x11c75b)=>{_0x11c75b&&this['_balloon']['remove'](_0x11c75b),_0x819c0f&&(this['_balloon']['add']({'view':_0x819c0f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5b5e5c=this['editor']['editing'],_0x2339c1=this['_getChangeFromId'](_0x819c0f['changeId']);let _0x176380;if(_0x2339c1['data']['isOnRoot']){const _0x6532ef=_0x5b5e5c['view']['getDomRoot'](_0x2339c1['rootName']);_0x176380=Array['from'](_0x6532ef['getClientRects']());}else{const _0x3e6b5f=this['editor']['model']['markers']['get']('revision:'+_0x819c0f['changeId']);_0x176380=Array['from'](_0x5b5e5c['mapper']['markerNameToElements'](_0x3e6b5f['name']))['map'](_0x2f0382=>_0x5b5e5c['view']['domConverter']['mapViewToDom'](_0x2f0382))['map'](_0x1ffeda=>Array['from'](_0x1ffeda['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x176380[0x0];return _0x176380['find'](_0x1d0485=>_0x1d0485['top']-0x3<=this['_activeViewTarget']['y']&&_0x1d0485['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1d0485['left']-0x3<=this['_activeViewTarget']['x']&&_0x1d0485['right']+0x3>=this['_activeViewTarget']['x'])||_0x176380[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x313fbd,_0x1167df,_0x2776f6,_0x22c6e0)=>{this['activeView']=_0x2776f6?this['_getViewForChange'](_0x2776f6):null,this['editor']['model']['change'](()=>{const _0x2ca90c=this['editor']['editing'];_0x22c6e0&&(_0x22c6e0['data']['isOnRoot']?_0x2ca90c['view']['change'](_0x4a63c4=>{_0x4a63c4['removeClass']('ck-revision-history-root--active',_0x2ca90c['view']['document']['getRoot'](_0x22c6e0['rootName']));}):_0x2ca90c['reconvertMarker']('revision:'+_0x22c6e0['id'])),_0x2776f6&&(_0x2776f6['data']['isOnRoot']?_0x2ca90c['view']['change'](_0x50310a=>{_0x50310a['addClass']('ck-revision-history-root--active',_0x2ca90c['view']['document']['getRoot'](_0x2776f6['rootName']));}):_0x2ca90c['reconvertMarker']('revision:'+_0x2776f6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0xd7d6be,_0x3183c9)=>{if(this['activeChange'])return;const _0xd19b86=this['_findChangeIdFromDomTarget'](_0x3183c9['target']),_0x32ef32=this['_changeIdToChange']['get'](_0xd19b86);_0x32ef32?(this['_activeViewTarget']={'x':_0x3183c9['domEvent']['x'],'y':_0x3183c9['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x32ef32)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x430658,_0x43451f)=>{const _0x501938=this['_findChangeIdFromDomTarget'](_0x43451f['target']),_0x447671=this['_changeIdToChange']['get'](_0x501938);_0x447671?(this['_activeViewTarget']={'x':_0x43451f['domEvent']['x'],'y':_0x43451f['domEvent']['y']},_0x447671===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x447671):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2ab4d5){do{const _0x311faf=_0x2ab4d5['getAttribute']('data-change-id');if(_0x311faf)return _0x311faf;_0x2ab4d5=_0x2ab4d5['parent'];}while(_0x2ab4d5);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x49bbcc=>{for(const _0x17880c of this['editor']['model']['markers'])_0x49bbcc['removeMarker'](_0x17880c);});}}function Z(_0x30e40f,_0x10f402){return(_0xc57c0d,_0x5f1592,_0x51214b)=>{if(!_0x51214b['consumable']['test'](_0x5f1592['markerRange'],_0xc57c0d['name']))return;const _0x3c739d=_0x5f1592['markerRange']['getWalker'](),_0x26aa70=_0x5f1592['markerRange']['start'],_0x543a07=_0x30e40f['model']['schema'];let _0x5e5760=null,_0x1e56d5=null,_0x548e97=!0x1,_0x5400c2=!0x1;for(const _0x2f7150 of _0x3c739d){const _0x189db7=_0x2f7150['item'];_0x548e97=_0x548e97||_0x543a07['isContent'](_0x189db7);const _0x29e78d=_0x51214b['mapper']['toViewElement'](_0x189db7);if(_0x29e78d&&_0x29e78d['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2f7150['type']&&(_0x543a07['isBlock'](_0x189db7)&&!_0x543a07['isLimit'](_0x189db7)&&(_0x189db7['nextSibling']||_0x26aa70['isAtEnd']?_0x5e5760&&_0x5e5760['parent']==_0x189db7||(_0x5e5760=_0x189db7,_0x53685b(_0x2f7150['previousPosition']),_0x5400c2=!0x0):_0x1e56d5=_0x1e56d5||_0x2f7150['previousPosition']));}function _0x53685b(_0x2d496a){const _0x2ca58b=_0x51214b['mapper']['toViewPosition'](_0x2d496a),_0x482850=_0x51214b['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x10f402});_0x51214b['writer']['insert'](_0x2ca58b,_0x482850),_0x51214b['mapper']['bindElementToMarker'](_0x482850,_0x5f1592['markerName']);}_0x548e97||_0x5400c2||!_0x1e56d5||_0x53685b(_0x1e56d5);};}class _t extends _0x33fccf{constructor(_0x3b33b5){super(_0x3b33b5);const _0x13197f=_0x3b33b5['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x13197f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x13197f,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x252d2f=this['editor'],_0x5d73c9=_0x252d2f['plugins']['get'](d),_0xec4c1d=_0x5d73c9['isReady']?_0x5d73c9['diff']['newRevisionId']:null;_0x252d2f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xec4c1d);}['refresh'](){const {isReady:_0x1b5885,isEnabled:_0xb6c653,repository:_0x3e0073,diff:_0x15cbf5}=this['editor']['plugins']['get'](d),_0x11855f=_0x15cbf5&&_0x3e0073['getLaterVisibleRevision'](_0x15cbf5['newRevisionId']);this['isEnabled']=_0x1b5885&&_0xb6c653&&Boolean(_0x11855f);}}class yt extends _0x33fccf{['_step'];constructor(_0x4f8957,{direction:_0x335168}){super(_0x4f8957);const _0x4d2dbb=_0x4f8957['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x335168?0x1:-0x1,this['listenTo'](_0x4d2dbb,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4d2dbb,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4d2dbb,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x43f33a=this['editor'],_0x36323e=_0x43f33a['plugins']['get'](d),{isNavigationMode:_0x177368,currentChangeNumber:_0x5ba8d3}=_0x36323e;let _0x2faba8;if(_0x36323e['activeChange']=_0x177368?_0x36323e['diff']['changes']['get'](_0x5ba8d3+this['_step']):_0x36323e['diff']['changes']['first'],_0x36323e['activeChange']['data']['isOnRoot'])_0x2faba8=_0x43f33a['editing']['view']['getDomRoot'](_0x36323e['activeChange']['rootName']);else{const _0x2c765d=_0x43f33a['model']['markers']['get']('revision:'+_0x36323e['activeChange']['id']);_0x2faba8=_0x4c436f(_0x43f33a['editing'],_0x2c765d);}_0x44e10f({'target':_0x2faba8,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xc10b20,currentChangeNumber:_0x12902a,numberOfChanges:_0x3b2bd9,isReady:_0x4a612a,isEnabled:_0x342dbf}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x342dbf&&_0x4a612a&&_0x3b2bd9)&&(!_0xc10b20||(0x1===this['_step']?_0x12902a<_0x3b2bd9-0x1:_0x12902a>0x0));}}class _i extends _0x571e95{constructor(_0xf1b066){super(_0xf1b066);const _0x27c43a=this['bindTemplate'],_0x10c4ea=new _0x59b23e(_0xf1b066),_0x1e6f70=new _0x59b23e(_0xf1b066);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',(_0x36535f,_0x339c52)=>_0x36535f&&_0x339c52>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x222976,_0x587033,_0x958324,_0x352037)=>{if(!_0x222976)return m(_0xf1b066,'Loading...');if(!_0x958324)return m(_0xf1b066,'No\x20changes');const _0x5659ea=m(_0xf1b066,'NUMBER_OF_CHANGES',_0x958324);return _0x352037?m(_0xf1b066,'X_OF_Y_CHANGES',[_0x587033+0x1,_0x958324]):_0x5659ea;}),_0x10c4ea['set']({'label':m(_0xf1b066,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x1e6f70['set']({'label':m(_0xf1b066,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0x10c4ea['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1e6f70['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x10c4ea['on']('execute',()=>this['fire']('execute','backward')),_0x1e6f70['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',_0x27c43a['if']('_isStatusLabelVisible','ck-hidden',_0x244052=>!_0x244052)]},'children':[{'text':_0x27c43a['to']('isNavigationMode',_0x819b72=>_0x819b72?m(_0xf1b066,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0xf1b066,'Total')+':\x20')}]},{'text':_0x27c43a['to']('_statusText')}]},new _0x488774(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x10c4ea,_0x1e6f70]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x314a0a{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1d9426=this['editor']['editing']['view'];_0x1d9426['change'](_0x115b21=>{for(const _0x3396ce of _0x1d9426['document']['roots'])_0x115b21['addClass'](ce,_0x3396ce);});}['hide'](){const _0x256241=this['editor']['editing']['view'];_0x256241['change'](_0x561195=>{for(const _0x2cee9c of _0x256241['document']['roots'])_0x561195['removeClass'](ce,_0x2cee9c);});}}class g extends _0x314a0a{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x21fa54=this['editor'],_0x568b76=_0x21fa54['plugins']['get'](d),_0x4869a7=_0x21fa54['plugins']['get'](le);_0x21fa54['ui']['componentFactory']['add']('exitToEditing',_0x45d1ac=>{const _0x48dbe7=new _0x59b23e(_0x45d1ac);return _0x48dbe7['set']({'label':m(_0x45d1ac,'Back\x20to\x20editing'),'icon':_0x42aafe['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x48dbe7,'execute',()=>{_0x21fa54['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x48dbe7;}),_0x21fa54['ui']['componentFactory']['add']('restoreRevision',_0x4973eb=>{const _0x43c3b4=new _0x59b23e(_0x4973eb);return _0x43c3b4['set']({'label':m(_0x4973eb,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x43c3b4['bind']('isEnabled')['to'](_0x21fa54['commands']['get']('restoreRevision')),this['listenTo'](_0x43c3b4,'execute',()=>_0x21fa54['execute']('restoreRevision')),_0x43c3b4;}),_0x21fa54['ui']['componentFactory']['add']('changesNavigation',_0x5148e4=>{const _0xd17881=new _i(_0x5148e4),_0x1c9dee=_0x21fa54['commands']['get']('showPreviousChange'),_0x428060=_0x21fa54['commands']['get']('showNextChange');return _0xd17881['bind']('isBackwardNavigationEnabled')['to'](_0x1c9dee,'isEnabled'),_0xd17881['bind']('isForwardNavigationEnabled')['to'](_0x428060,'isEnabled'),_0xd17881['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x568b76),this['listenTo'](_0xd17881,'execute',(_0x231058,_0x486ed1)=>{_0x21fa54['execute']('forward'===_0x486ed1?'showNextChange':'showPreviousChange');}),_0xd17881;}),_0x4869a7['show'](),_0x568b76['on']('change:isReady',(_0x9e11ff,_0x33898f,_0x20f4a7)=>{_0x20f4a7?_0x4869a7['hide']():_0x4869a7['show']();});}}class pt extends nt{['_resizeObserver']=null;constructor(_0x174f37,_0x51bdf1){super(_0x174f37,_0x51bdf1);const _0x15fcab=this['bindTemplate'];this['set']({'label':m(_0x174f37,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x174f37,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x15fcab['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0xae285d=this['fieldView']['element'];this['_tooltipString']=_0xae285d['scrollWidth']>_0xae285d['clientWidth']&&_0xae285d['value']||'';}}class ti extends _0x571e95{constructor(_0x4b1766,_0x3f61b0,_0x525d9a){super(_0x4b1766);const _0x2012d4=new _0xc17691();_0x2012d4['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x2099d8=['ck','ck-revision-history-sidebar__revision-author'];_0x525d9a&&_0x2099d8['push']('ck-revision-history-sidebar__revision-author_creator');const _0x209d55=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x4b1766,_0x525d9a?'Revision\x20creator':'Revision\x20author')},'children':[_0x2012d4,_0x3f61b0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2099d8},'children':_0x209d55});}}function ni(_0x51b41b,_0x5076ce){const _0x124463=_0x51b41b['bindTemplate'],_0xc4250e=_0x51b41b['locale'],_0x1bb08e=_0x480339(_0xc4250e);_0x1bb08e['panelPosition']='sw';const _0x408b88=function(_0x2f553c,_0x5ad194){const _0x462b12=function(_0x34cdb9,_0x55edb3){const _0x192b5a=_0x34cdb9['locale'],_0x41760f={'Compare\x20against\x20selected':m(_0x192b5a,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x192b5a,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x192b5a,'Restore\x20this\x20revision')};return _0x55edb3['map'](_0x3dee1e=>{const _0x39426b=_0x41760f[_0x3dee1e['name']];return _0x39426b&&_0x39426b!==_0x3dee1e['name']&&(_0x3dee1e['name']=_0x39426b),_0x3dee1e;});}(_0x2f553c,_0x5ad194),_0x3973a6=new _0x45da80();for(const _0x239d28 of _0x462b12){const _0x317890={'type':'button','model':new to({'label':_0x239d28['name'],'class':_0x239d28['class'],'withText':!0x0,'role':'menuitem','_action':_0x239d28['action']})};_0x317890['model']['bind']('isEnabled')['to'](_0x2f553c,'isActionsDropdownOpen',_0x3b214d=>'function'!=typeof _0x239d28['isEnabled']||(!_0x3b214d||_0x239d28['isEnabled'](_0x2f553c))),_0x3973a6['add'](_0x317890);}return _0x3973a6;}(_0x51b41b,_0x5076ce);return _0x51b41b['bind']('isActionsDropdownOpen')['to'](_0x1bb08e,'isOpen'),_0x1bb08e['buttonView']['set']({'label':m(_0xc4250e,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x42aafe['threeVerticalDots']}),_0x1bb08e['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x124463['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x124463['to'](_0x3dc83d=>_0x3dc83d['stopPropagation']())}}),_0x1bb08e['on']('execute',_0x2c86fe=>{_0x51b41b['isReady']&&'function'==typeof _0x2c86fe['source']['_action']&&_0x2c86fe['source']['_action'](_0x51b41b);}),_0x581d40(_0x1bb08e,_0x408b88,{'role':'menu'}),_0x1bb08e['listenTo'](_0x51b41b,'change:isActionsDropdownOpen',(_0xe1d9e3,_0xdf0dcb,_0x367da0)=>{if(_0x367da0)for(const _0x362e53 of _0x1bb08e['listView']['items']){const _0x59ddf6=_0x362e53['children']['first'],_0x265e50=_0x5076ce['find'](_0x20610f=>_0x20610f['action']===_0x59ddf6['_action'])['isVisible'];_0x362e53['isVisible']=void 0x0===_0x265e50||_0x265e50(_0x51b41b);}}),_0x1bb08e;}class ai extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x3f46a5(_0x571e95){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x818596,_0x3b5b70,_0x2b078c,_0xbd46da){super(_0x818596);const _0x46d3b8=this['bindTemplate'],_0x444cc2=function(_0x21df11,_0x13894d){const _0x597ef2=Array['from'](_0x13894d['authors'])['filter'](_0x36336d=>_0x36336d!=_0x13894d['creator']);return _0x13894d['creator']&&_0x597ef2['unshift'](_0x13894d['creator']),_0x597ef2['map'](_0x3f91cb=>new ti(_0x21df11,_0x3f91cb,_0x3f91cb==_0x13894d['creator']));}(_0x818596,_0x3b5b70);this['id']=_0x3b5b70['id'],this['_revision']=_0x3b5b70,this['_requireRevisionName']=_0xbd46da,this['bind']('name','createdAt')['to'](_0x3b5b70),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x1b46b0=>{return _0x59798c=_0x818596['uiLanguage'],(_0x295c37=_0x1b46b0)['toLocaleDateString'](_0x59798c,{'month':'long','day':'numeric'})+',\x20'+_0x295c37['toLocaleTimeString'](_0x59798c,{'hour':'numeric','minute':'numeric'});var _0x59798c,_0x295c37;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new pt(_0x818596,_0x1d2e0c),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4f29c6=>_0x4f29c6||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0xa0e71d,_0x5ea566)=>_0xa0e71d&&_0x5ea566),this['revisionActionsView']=_0x2b078c&&_0x2b078c['length']?ni(this,_0x2b078c):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x46d3b8['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x46d3b8['if']('isEnabled','ck-disabled',_0x287fd9=>!_0x287fd9),_0x46d3b8['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x46d3b8['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x46d3b8['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':_0x46d3b8['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':_0x444cc2}]},this['revisionActionsView']],'on':{'click':_0x46d3b8['to'](_0x3c835c=>{_0x3c835c['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x11835e=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x11835e,'change',()=>{this['_requireRevisionName']&&!_0x11835e['value']||this['fire']('setName',{'id':this['id'],'name':_0x11835e['value']}),_0x11835e['value']||(_0x11835e['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(_0x5df90e,_0x28ec56){const _0x10aa43=_0x2e0acd['fromJSDate'](_0x5df90e)['setLocale'](_0x28ec56),_0x47e8a9=_0x2e0acd['local'](),_0x351040=_0x47e8a9['minus']({'days':0x1})['startOf']('day');let _0x151f04,_0x564cdc;return _0x10aa43['hasSame'](_0x47e8a9,'day')?(_0x151f04=_0x10aa43['startOf']('day')['toJSDate'](),_0x564cdc=_0x10aa43['toRelativeCalendar']()):_0x10aa43['hasSame'](_0x351040,'day')?(_0x151f04=_0x351040['toJSDate'](),_0x564cdc=_0x10aa43['toRelativeCalendar']()):_0x10aa43['hasSame'](_0x47e8a9,'week')?(_0x151f04=_0x10aa43['startOf']('week')['toJSDate'](),_0x564cdc=_0x10aa43['weekdayLong']||''):_0x10aa43['hasSame'](_0x47e8a9,'year')?(_0x151f04=_0x10aa43['startOf']('month')['toJSDate'](),_0x564cdc=_0x10aa43['monthLong']||''):(_0x151f04=_0x10aa43['startOf']('year')['toJSDate'](),_0x564cdc=String(_0x10aa43['year'])),{'startDate':_0x151f04,'localizedPeriodName':_0x564cdc};}class mi extends _0x571e95{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x806d26,_0x1fc0ea,_0x428951,_0x3a44f8){super(_0x806d26);const _0x1771b1=di(_0x1fc0ea,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1fc0ea,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x428951,this['_requireRevisionName']=_0x3a44f8,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':_0x1771b1}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x50cdab){const _0x5024d9=new ai(this['locale'],_0x50cdab,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x5024d9);}['removeRevision'](_0x4817d7){const _0xfd6242=this['revisionViews']['find'](_0x28cb65=>_0x28cb65['id']===_0x4817d7['id']);this['revisionViews']['remove'](_0xfd6242);}}class as extends _0x571e95{constructor(_0x361094){super(_0x361094);const _0x2b6fc0=new _0xc17691();_0x2b6fc0['content']=_0x42aafe['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x2b6fc0,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x361094,'Revision\x20history')]}]});}}class ci extends _0x571e95{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x382135,_0x32d476,_0x8eb3c4,_0x31a901){super(_0x382135);const _0x5043be=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x32d476,this['_revisionActions']=_0x8eb3c4,this['_requireRevisionName']=_0x31a901,this['on']('select',(_0x167a54,_0x1b5650)=>{this['fire']('revisionSelected',_0x1b5650);}),this['on']('setName',(_0x46615e,_0x3603f5)=>{this['fire']('revisionSetName',_0x3603f5);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x382135),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x5043be['if']('isEnabled','ck-disabled',_0x2d555a=>!_0x2d555a)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x57c379 of this['_revisions'])this['_addRevision'](_0x57c379);this['_revisions']['on']('add',(_0x549671,_0x35e223)=>{this['_addRevision'](_0x35e223);}),this['_revisions']['on']('remove',(_0x32eb8e,_0x2c4cc3)=>{this['_removeRevision'](_0x2c4cc3);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x549a14=>_0x549a14['revisionViews']['map'](_0x2cd0b0=>_0x2cd0b0))['flat']();}['selectRevision'](_0x575359){for(const _0x3e0128 of this['revisionViews'])_0x575359&&_0x575359['id']===_0x3e0128['id']?_0x3e0128['select']():_0x3e0128['deselect']();}['highlightRevisions'](_0x4cdcdf){for(const _0x3e422c of this['revisionViews'])_0x4cdcdf['some'](({id:_0x1a69a1})=>_0x1a69a1===_0x3e422c['id'])?_0x3e422c['highlight']():_0x3e422c['unhighlight']();}['_addRevision'](_0x332202){const _0xed39f5=di(_0x332202['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x19509a=this['timePeriodViews']['get'](0x0);_0x19509a&&_0x19509a['startDate']['getTime']()===_0xed39f5['getTime']()||(_0x19509a=new mi(this['locale'],_0xed39f5,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x19509a)),_0x19509a['addRevision'](_0x332202);}['_removeRevision'](_0x585528){const _0x39bc58=di(_0x585528['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x39bc58)['removeRevision'](_0x585528);}['_getTimePeriodViewByStartDate'](_0xd8a47c){return this['timePeriodViews']['find'](_0x53581a=>_0x53581a['startDate']['getTime']()===_0xd8a47c['getTime']());}}class w extends _0x314a0a{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
27
27
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
|
-
bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(
|
|
29
|
-
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1cafbb,_0x2343a4){super(_0x2343a4),this['sourceElement']=_0x1cafbb,this['model']['document']['createRoot']();const _0x206799=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x206799);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x47da60,_0x35e99b){const _0x23999f=new this(_0x47da60,_0x35e99b);return await _0x23999f['initPlugins'](),await _0x23999f['ui']['init'](_0x47da60),await _0x23999f['data']['init'](_0x23999f['config']['get']('initialData')||''),_0x23999f['fire']('ready'),_0x23999f;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x455bed{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x270231){function _0x2f443d(_0x184fc4){return _0x184fc4['map'](_0xf5aa92=>String['fromCharCode'](_0xf5aa92))['join']('');}super(_0x270231),this['result']='end',_0x270231[_0x2f443d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f443d([0x76,0x69,0x65,0x77])][_0x2f443d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2f443d([0x61,0x75,0x74,0x6f]),_0x270231[_0x2f443d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2f443d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2f443d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2f443d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2f443d([0x6f,0x6b])});}}class k extends _0x455bed{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x20f374){if(super(_0x20f374),!this['editor']['config']['get']('revisionHistory'))throw new _0x2bb305('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x1303ef=>this['_showRevisionViewer']({..._0x1303ef,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x486e9b=>this['_closeRevisionViewer'](_0x486e9b)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x592f1a=>this['_restoreRevision'](_0x592f1a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0xb2469c){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xb2469c;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3bddc6){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3bddc6);}['getRevision'](_0x57636b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x57636b);}['getRevisions'](_0x47efdf){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x47efdf||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x23a0ef=this['editor'],_0x5147f7=_0x92243b(_0x23a0ef,p),_0x24cab1=_0x23a0ef['plugins']['get']('RevisionTracker'),_0x3746e4=_0x23a0ef['plugins']['get']('Users')['users'];return _0x5147f7['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5147f7['lazyRoots'],(_0x5147f7['plugins']['push'](Rt,d,w,class extends _0x455bed{static get['requires'](){return[d,'Users'];}['init'](){const _0x5e7ea6=this['editor']['plugins']['get']('Users');for(const _0x4255e5 of _0x3746e4)_0x4255e5['isAnonymous']||_0x5e7ea6['getUser'](_0x4255e5['id'])||_0x5e7ea6['addUser'](_0x4255e5);const _0x1c5d76=_0x24cab1['repository']['getRevisions']();let _0x4b16c2=null;const _0x1eefc5=this['editor']['plugins']['get']('RevisionViewer');_0x1eefc5['adapter']=_0x24cab1['adapter'],_0x1eefc5['bind']('isEnabled')['to'](_0x24cab1),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x23a0ef,'isReadOnly',_0x182e77=>!_0x182e77);for(const _0x622f4b of _0x1c5d76){const _0x3b6961=null===_0x622f4b['creator'];if(_0x3b6961&&_0x622f4b['toVersion']===_0x622f4b['fromVersion'])continue;const _0x55bfed=_0x622f4b['toJSON']();_0x1eefc5['addRevisionData'](_0x55bfed,(_0x21c2f2,_0x54fd26,_0x3584dc)=>{if(_0x3b6961){if(_0x4b16c2)_0x4b16c2['_update'](_0x21c2f2,_0x54fd26);else{if(!_0x54fd26){const _0x340bb2=_0x3584dc['toJSON']();_0x340bb2['id']=_0x15ad7c(),_0x24cab1['saveRevision'](_0x340bb2,_0x3584dc['toVersion'])['then'](_0x44e7bb=>{_0x4b16c2=_0x44e7bb;});}}}else _0x622f4b['_update'](_0x21c2f2,_0x54fd26);});}}},g),_0x5147f7);}['_enhanceShowRevisionViewerCallback'](){const _0x175641=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x24053d=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x54db6e=this['editor']['plugins']['get']('Autosave');await _0x54db6e['save']();}else await _0x24053d['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1e7915=this['editor']['plugins']['get']('Dialog');_0x1e7915['isOpen']&&_0x1e7915['hide']();}const _0xbdf7c7=this['_getRevisionViewerEditorConfig']();return _0x175641(_0xbdf7c7)['then'](_0x21ef2f=>{return(this['_viewerEditor']=_0x21ef2f,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x21ef2f;})['catch'](_0x429ed4=>(console['error'](_0x429ed4),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xda5fee=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xda5fee(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x422a43=this['editor']['plugins']['get']('Annotations');_0x422a43['refreshVisibility'](),_0x422a43['refreshPositioning']();}})));}['_showRevisionViewer'](_0xa831c){const _0x512b57=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4633fe=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xfc2ef2=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0xfc2ef2,_0xa831c)['then'](_0x1f5c6e=>(_0x4633fe['style']['display']='block',_0x512b57['style']['display']='none',_0x1f5c6e));}['_closeRevisionViewer'](_0x5a1c0a){const _0x56f731=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x56f731['style']['display']='',_0x5a1c0a['destroy']();}async['_restoreRevision'](_0x2acf00){const _0x308277=this['editor'],_0x4ea5f7=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x564f76=_0x308277['plugins']['get']('RevisionTracker'),_0x4e7252=_0x4ea5f7['repository']['getRevision'](_0x2acf00);let _0xcb246a,_0x23286a,_0x3e84b3;try{_0xcb246a=await _0x4ea5f7['getRevisionData'](_0x4e7252),_0x23286a=await _0x4ea5f7['getRevisionRootsAttributes'](_0x4e7252);}catch(_0xff5de4){return void console['error'](_0xff5de4);}_0x308277['model']['change'](_0x297854=>{for(const _0x879f9c of Array['from'](_0x308277['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x297854['removeMarker'](_0x879f9c);}),_0x4ea5f7['isReady']=!0x1,_0x308277['model']['enqueueChange'](_0x54a419=>{_0x54a419['setSelection'](null),_0x54a419['removeSelectionAttribute'](_0x308277['model']['document']['selection']['getAttributeKeys']());const _0xd86673=Object['keys'](_0xcb246a);for(const _0x5c6ed7 of _0x308277['model']['document']['roots'])'$graveyard'!=_0x5c6ed7['rootName']&&_0x5c6ed7['isAttached']()&&!_0xd86673['includes'](_0x5c6ed7['rootName'])&&_0x54a419['detachRoot'](_0x5c6ed7);for(const _0x1d2dbe of _0xd86673){let _0x5c6470=_0x308277['model']['document']['getRoot'](_0x1d2dbe);_0x5c6470&&_0x5c6470['isAttached']()||(_0x5c6470=_0x54a419['addRoot'](_0x1d2dbe));const _0x134634=_0x23286a[_0x1d2dbe],_0x2f6e02=Object['keys'](_0x134634),_0x123a3d=_0xcb246a[_0x1d2dbe];for(const _0xdb0bb4 of _0x5c6470['getAttributeKeys']())_0x2f6e02['includes'](_0xdb0bb4)||_0x54a419['removeAttribute'](_0xdb0bb4,_0x5c6470);for(const _0x13d4ea of _0x2f6e02)_0x54a419['setAttribute'](_0x13d4ea,_0x23286a[_0x1d2dbe][_0x13d4ea],_0x5c6470);_0x54a419['remove'](_0x54a419['createRangeIn'](_0x5c6470)),_0x54a419['insert'](_0x308277['data']['parse'](_0x123a3d,_0x5c6470),_0x5c6470,0x0);}});const _0x138be9=m(_0x308277['locale'],'Restored');if(_0x4e7252['name'])_0x3e84b3=-0x1==_0x4e7252['name']['indexOf'](_0x138be9)?_0x138be9+':\x20'+_0x4e7252['name']:_0x4e7252['name'];else _0x3e84b3=_0x138be9+':\x20'+(_0x4e7252['createdAt']['toLocaleDateString'](_0x308277['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4e7252['createdAt']['toLocaleTimeString'](_0x308277['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x564f76['saveRevision']({'name':_0x3e84b3}),_0x4ea5f7['isReady']=!0x0,_0x308277['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
|
|
28
|
+
bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x47eaa1){super(_0x47eaa1),this['_revisionViewer']=_0x47eaa1['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x43710b=this['_revisionsRepository']['_revisions'],_0x16e9d4=this['_createRevisionActions'](),_0x13d233=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ci(this['editor']['locale'],_0x43710b,_0x16e9d4,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',(_0x30be55,_0x18b090)=>{_0x18b090['revisionViews']['on']('add',(_0x4cac34,_0x1412dd)=>{_0x1412dd['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)),_0x13d233['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x4bcc82=this['_revisionsRepository']['getRevision'](0x0);if(_0x4bcc82){const _0x15b275=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4bcc82['id']);this['_revisionViewer']['compare'](_0x4bcc82,_0x15b275);}}['_handleRevisionSelected'](_0x5dd5db,_0x4e7435){const _0x59a873=this['_revisionsRepository']['getRevision'](_0x4e7435['id']),_0x1bfa5b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x59a873['id']);this['_revisionViewer']['compare'](_0x59a873,_0x1bfa5b);}['_handleRevisionSetName'](_0x52038c,_0x180ce0){this['_revisionsRepository']['getRevision'](_0x180ce0['id'])['setName'](_0x180ce0['name']);}['_handleDiffChange'](_0x5d508b,_0x18aa61,_0x181e82){const _0xb17c9=this['_revisionsRepository']['getRevisionsInDiff'](_0x181e82);_0xb17c9['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xb17c9),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xb17c9[0x0]));}['_createRevisionActions'](){const _0x4ce62b=this['editor'],_0xec289d=w['availableRevisionActions'],_0x29664d=_0x4ce62b['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x29664d['length'])return _0x29664d['map'](_0x4da58b=>{const _0x196db0='string'==typeof _0x4da58b?Object['assign']({},_0xec289d[_0x4da58b]):_0x4da58b;return _0x196db0['action']=_0x196db0['action']['bind'](this,_0x4ce62b),_0x196db0['isVisible']&&(_0x196db0['isVisible']=_0x196db0['isVisible']['bind'](this,_0x4ce62b)),_0x196db0;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x57b388},_0x5e6c14)=>{const _0x46eb8c=_0x57b388['get'](d),_0xc56f1a=_0x46eb8c['repository'];let _0x459a81=_0x46eb8c['diff']['newRevisionId'],_0x2ffdae=_0x5e6c14['id'];_0xc56f1a['getIndex'](_0x459a81)>_0xc56f1a['getIndex'](_0x2ffdae)&&([_0x459a81,_0x2ffdae]=[_0x2ffdae,_0x459a81]),_0x46eb8c['compare'](_0x459a81,_0x2ffdae);},'isVisible':({plugins:_0x17952d},_0xbda241)=>{const _0x3fc7f7=_0x17952d['get'](d);return!(_0x3fc7f7['repository']['getRevisionsInDiff'](_0x3fc7f7['diff'])['length']>0x2)&&!_0xbda241['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x2d4e68,{id:_0x46189a})=>{_0x2d4e68['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x46189a);},'isVisible':({plugins:_0x5d1c77},_0x3ba378)=>!!_0x5d1c77['get'](d)['repository']['getLaterVisibleRevision'](_0x3ba378['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3bca66},{id:_0x339d4f,revisionNameView:_0xe4aa03})=>{const _0x1513b0=_0x3bca66['get'](d),_0x17913f=_0x1513b0['repository']['getEarlierVisibleRevision'](_0x339d4f);_0x1513b0['compare'](_0x339d4f,_0x17913f),_0xe4aa03['focus'](),_0xe4aa03['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x239d13,_0xe4f7f6){super(_0x239d13),this['_view']=_0xe4f7f6,this['_toolbarConfig']=ot(_0x239d13['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x38b96b){const _0x309f6d=this['editor'],_0xeb47fb=this['view'],_0x412343=_0x309f6d['editing']['view'],_0x220640=_0xeb47fb['editable'],_0xf7b3fe=_0x412343['document']['getRoot']();_0x220640['name']=_0xf7b3fe['rootName'],_0xeb47fb['render']();const _0x2881d2=_0x220640['element'];this['setEditableElement'](_0x220640['name'],_0x2881d2),_0xeb47fb['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x412343['attachDomRoot'](_0x2881d2),this['_elementReplacer']['replace'](_0x38b96b,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x347706=this['view'],_0x5dc007=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x5dc007['detachDomRoot'](_0x347706['editable']['name']),_0x347706['destroy']();}['_initToolbar'](){const _0x322533=this['view'];_0x322533['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x322533['stickyPanel']['limiterElement']=_0x322533['element'],_0x322533['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1d87ec})=>_0x1d87ec),_0x322533['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x322533['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x360a0c,_0x141115,_0x45815d={}){super(_0x360a0c),this['stickyPanel']=new ut(_0x360a0c),this['toolbar']=new lt(_0x360a0c,{'shouldGroupWhenFull':_0x45815d['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x360a0c,_0x141115);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
|
|
29
|
+
it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5782e2,_0x1082ce){super(_0x1082ce),this['sourceElement']=_0x5782e2,this['model']['document']['createRoot']();const _0x5dba3f=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x5dba3f);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0xfaad6e,_0x25da75){const _0x310a8b=new this(_0xfaad6e,_0x25da75);return await _0x310a8b['initPlugins'](),await _0x310a8b['ui']['init'](_0xfaad6e),await _0x310a8b['data']['init'](_0x310a8b['config']['get']('initialData')||''),_0x310a8b['fire']('ready'),_0x310a8b;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x314a0a{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbe2552){function _0x36f806(_0x3d1309){return _0x3d1309['map'](_0x39e3b7=>String['fromCharCode'](_0x39e3b7))['join']('');}super(_0xbe2552),this['result']='end',_0xbe2552[_0x36f806([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36f806([0x76,0x69,0x65,0x77])][_0x36f806([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36f806([0x61,0x75,0x74,0x6f]),_0xbe2552[_0x36f806([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x36f806([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36f806([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x36f806([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x36f806([0x6f,0x6b])});}}class k extends _0x314a0a{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x358b13){if(super(_0x358b13),!this['editor']['config']['get']('revisionHistory'))throw new _0x2eb646('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x47cfe0=>this['_showRevisionViewer']({..._0x47cfe0,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1214f=>this['_closeRevisionViewer'](_0x1214f)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x140b17=>this['_restoreRevision'](_0x140b17)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x46484e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x46484e;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x292c70){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x292c70);}['getRevision'](_0x3c9b9b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3c9b9b);}['getRevisions'](_0x102f03){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x102f03||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x3e22f6=this['editor'],_0x2b3525=_0x292d07(_0x3e22f6,p),_0x58d315=_0x3e22f6['plugins']['get']('RevisionTracker'),_0x47e2b8=_0x3e22f6['plugins']['get']('Users')['users'];return _0x2b3525['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x2b3525['lazyRoots'],(_0x2b3525['plugins']['push'](Rt,d,g,class extends _0x314a0a{static get['requires'](){return[d,'Users'];}['init'](){const _0x78f6dc=this['editor']['plugins']['get']('Users');for(const _0xb6499b of _0x47e2b8)_0xb6499b['isAnonymous']||_0x78f6dc['getUser'](_0xb6499b['id'])||_0x78f6dc['addUser'](_0xb6499b);const _0x42aef3=_0x58d315['repository']['getRevisions']();let _0x51eb36=null;const _0xb7f3b=this['editor']['plugins']['get']('RevisionViewer');_0xb7f3b['adapter']=_0x58d315['adapter'],_0xb7f3b['bind']('isEnabled')['to'](_0x58d315),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x3e22f6,'isReadOnly',_0x51b711=>!_0x51b711);for(const _0x20bd7e of _0x42aef3){const _0x48a2ad=null===_0x20bd7e['creator'];if(_0x48a2ad&&_0x20bd7e['toVersion']===_0x20bd7e['fromVersion'])continue;const _0x430d66=_0x20bd7e['toJSON']();_0xb7f3b['addRevisionData'](_0x430d66,(_0x1c9489,_0x36b752,_0x5bbb99)=>{if(_0x48a2ad){if(_0x51eb36)_0x51eb36['_update'](_0x1c9489,_0x36b752);else{if(!_0x36b752){const _0x42af20=_0x5bbb99['toJSON']();_0x42af20['id']=_0x1f968a(),_0x58d315['saveRevision'](_0x42af20,_0x5bbb99['toVersion'])['then'](_0x4b442c=>{_0x51eb36=_0x4b442c;});}}}else _0x20bd7e['_update'](_0x1c9489,_0x36b752);});}}},w),_0x2b3525);}['_enhanceShowRevisionViewerCallback'](){const _0x336e1a=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x17d5a6=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4a19bf=this['editor']['plugins']['get']('Autosave');await _0x4a19bf['save']();}else await _0x17d5a6['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x247a03=this['editor']['plugins']['get']('Dialog');_0x247a03['isOpen']&&_0x247a03['hide']();}const _0x49f534=this['_getRevisionViewerEditorConfig']();return _0x336e1a(_0x49f534)['then'](_0x3e9321=>{return(this['_viewerEditor']=_0x3e9321,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x3e9321;})['catch'](_0x3a5390=>(console['error'](_0x3a5390),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x40e029=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x40e029(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x51c788=this['editor']['plugins']['get']('Annotations');_0x51c788['refreshVisibility'](),_0x51c788['refreshPositioning']();}})));}['_showRevisionViewer'](_0x5df809){const _0x33f43e=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x38c8d5=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2fc98e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x2fc98e,_0x5df809)['then'](_0x4b3a5d=>(_0x38c8d5['style']['display']='block',_0x33f43e['style']['display']='none',_0x4b3a5d));}['_closeRevisionViewer'](_0x5725b5){const _0x2d3ebf=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2d3ebf['style']['display']='',_0x5725b5['destroy']();}async['_restoreRevision'](_0x22362e){const _0x1681e1=this['editor'],_0x2fbf00=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3ac4a4=_0x1681e1['plugins']['get']('RevisionTracker'),_0x52975c=_0x2fbf00['repository']['getRevision'](_0x22362e);let _0x5c3c4a,_0x10fa21,_0x308307;try{_0x5c3c4a=await _0x2fbf00['getRevisionData'](_0x52975c),_0x10fa21=await _0x2fbf00['getRevisionRootsAttributes'](_0x52975c);}catch(_0x3a4d3f){return void console['error'](_0x3a4d3f);}_0x1681e1['model']['change'](_0x564354=>{for(const _0x26d34d of Array['from'](_0x1681e1['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x564354['removeMarker'](_0x26d34d);}),_0x2fbf00['isReady']=!0x1,_0x1681e1['model']['enqueueChange'](_0x3091a9=>{_0x3091a9['setSelection'](null),_0x3091a9['removeSelectionAttribute'](_0x1681e1['model']['document']['selection']['getAttributeKeys']());const _0xf68cff=Object['keys'](_0x5c3c4a);for(const _0x2921fe of _0x1681e1['model']['document']['roots'])'$graveyard'!=_0x2921fe['rootName']&&_0x2921fe['isAttached']()&&!_0xf68cff['includes'](_0x2921fe['rootName'])&&_0x3091a9['detachRoot'](_0x2921fe);for(const _0x4a8228 of _0xf68cff){let _0x503b30=_0x1681e1['model']['document']['getRoot'](_0x4a8228);_0x503b30&&_0x503b30['isAttached']()||(_0x503b30=_0x3091a9['addRoot'](_0x4a8228));const _0x3b0b1f=_0x10fa21[_0x4a8228],_0x200661=Object['keys'](_0x3b0b1f),_0x15b634=_0x5c3c4a[_0x4a8228];for(const _0xd5502 of _0x503b30['getAttributeKeys']())_0x200661['includes'](_0xd5502)||_0x3091a9['removeAttribute'](_0xd5502,_0x503b30);for(const _0x23792f of _0x200661)_0x3091a9['setAttribute'](_0x23792f,_0x10fa21[_0x4a8228][_0x23792f],_0x503b30);_0x3091a9['remove'](_0x3091a9['createRangeIn'](_0x503b30)),_0x3091a9['insert'](_0x1681e1['data']['parse'](_0x15b634,_0x503b30),_0x503b30,0x0);}});const _0x3c9880=m(_0x1681e1['locale'],'Restored');if(_0x52975c['name'])_0x308307=-0x1==_0x52975c['name']['indexOf'](_0x3c9880)?_0x3c9880+':\x20'+_0x52975c['name']:_0x52975c['name'];else _0x308307=_0x3c9880+':\x20'+(_0x52975c['createdAt']['toLocaleDateString'](_0x1681e1['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x52975c['createdAt']['toLocaleTimeString'](_0x1681e1['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3ac4a4['saveRevision']({'name':_0x308307}),_0x2fbf00['isReady']=!0x0,_0x1681e1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};
|