@ckeditor/ckeditor5-revision-history 48.3.0-alpha.2 → 48.3.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0xb54c22();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x27582c){super(),this['id']=_0x27582c['id']||_0x51cc90(),this['creator']=_0x27582c['creator']||null,this['authors']=_0x27582c['authors']||[],this['diffData']=_0x27582c['diffData']||null,this['toVersion']=_0x27582c['toVersion']||0x0,this['fromVersion']=_0x27582c['fromVersion']||0x0,this['set']('name',_0x27582c['name']||''),this['set']('createdAt',_0x27582c['createdAt']||new Date()),this['set']('attributes',_0x27582c['attributes']||{});}['setName'](_0x4035c5){this['_update']({'name':_0x4035c5});}['setAttribute'](_0x37e10d,_0x2e0445){const _0x5a2ceb=_0x1bdc24(this['attributes']);_0x37791d(_0x5a2ceb,_0x37e10d,_0x2e0445),this['_update']({'attributes':_0x5a2ceb});}['removeAttribute'](_0xa82986){const _0x51c2b9=_0x1bdc24(this['attributes']);_0x385712(_0x51c2b9,_0xa82986),this['_update']({'attributes':_0x51c2b9});}['_update'](_0x30920b,_0x82f919=!0x1){let _0x161e2f=!0x1;const _0x233f75={'id':this['id']};for(const _0x2358f5 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x248947=_0x30920b[_0x2358f5];void 0x0!==_0x248947&&_0x248947!==this[_0x2358f5]&&(this[_0x2358f5]=_0x248947,_0x233f75[_0x2358f5]=_0x248947,_0x161e2f=!0x0);}_0x161e2f&&(_0x233f75['authors']&&(_0x233f75['authorsIds']=_0x233f75['authors']['map'](_0x34d591=>_0x34d591['id']),delete _0x233f75['authors']),this['fire']('_update',_0x233f75,_0x82f919));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x24e02b=>_0x24e02b['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x2aa7ef{['_revisions'];static get['requires'](){return[_0xa4ad8];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5cac83){super(_0x5cac83),this['_revisions']=new _0x8df329();}['afterInit'](){!async function(_0x4f0970){const _0x5dc8de='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x43c1b2=0xeb829,_0x16184a=0x78e10,_0x8f22ef=window['Date']['now'](),_0x3ec827=_0x4f0970['editor'],_0x388418=new window['Promise'](_0xb5597e=>{_0x3ec827['once']('ready',_0xb5597e);}),_0x375bc6={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x29fc6c=_0x3ec827['config']['get']('licenseKey');async function _0x29a9ed(){let _0x1fc845,_0x43625b=null,_0x7b8b77=null;try{return'GPL'==_0x29fc6c?'NotAllowed':(_0x1fc845=_0x596829(),_0x1fc845?(_0x1fc845['usageEndpoint']&&(_0x7b8b77=_0xf731e6(_0x1fc845['usageEndpoint'],_0x1fc845['jti'])),await _0x50d9ed()?_0x45c375()?_0x5decef()?'Expired':_0xf5bc4()?('evaluation'==_0x1fc845['licenseType']&&(_0x43625b=_0xb73560('EvaluationLimit')),await _0x239405()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5decef(){const _0x2c44d9=['evaluation','trial']['includes'](_0x1fc845['licenseType'])?_0x8f22ef/0x3e8:0xe10*_0x16184a;return _0x1fc845['exp']<_0x2c44d9;}function _0x45c375(){const _0x45131e=_0x1fc845['features'];if(!_0x45131e)return!0x1;if(_0x45131e['includes']('*'))return!0x0;if(_0x45131e['includes']('RH'))return!0x0;if(_0x45131e['includes']('RRH')){if(_0x591161())return!0x0;if(_0x4e3a43()||_0x3b00d3())return!0x0;}return!0x1;}function _0xf5bc4(){const _0xaa0d1=_0x1fc845['licensedHosts'];if(!_0xaa0d1||0x0==_0xaa0d1['length'])return!0x0;const {hostname:_0xc21d2e}=new URL(window['location']['href']);if(_0xaa0d1['includes'](_0xc21d2e))return!0x0;const _0x5632ce=_0xc21d2e['split']('.');return _0xaa0d1['filter'](_0x4f73f0=>_0x4f73f0['includes']('*'))['map'](_0x5edd41=>_0x5edd41['split']('.'))['filter'](_0x55b03c=>_0x55b03c['length']<=_0x5632ce['length'])['map'](_0x5e5d2f=>Array(_0x5632ce['length']-_0x5e5d2f['length'])['fill']('*'===_0x5e5d2f[0x0]?'*':'')['concat'](_0x5e5d2f))['some'](_0xa3477f=>_0x5632ce['every']((_0x4eeec9,_0xd3f0b3)=>_0xa3477f[_0xd3f0b3]===_0x4eeec9||'*'===_0xa3477f[_0xd3f0b3]));}function _0x239405(){return _0x43625b&&_0x7b8b77?new window['Promise']((_0x6ecc5d,_0xf3cfa5)=>{_0x43625b['then'](_0x6ecc5d,_0xf3cfa5),_0x7b8b77['then'](_0x4bac19=>{'Valid'!=_0x4bac19&&_0x6ecc5d(_0x4bac19);},_0xf3cfa5);}):_0x43625b||_0x7b8b77||'Valid';}}function _0xf731e6(_0x4413e2,_0xcc90e7){return new window['Promise'](_0x1fae34=>{if(_0x3ed7c1())return _0x1fae34('Valid');_0x1de237(),_0x3ec827['decorate']('_sendUsageRequest');let _0x577dfc=!0x1;const _0x520fef=_0x51cc90();function _0x36d465(_0x28875d){return!!_0x28875d&&('object'==typeof _0x28875d||'function'==typeof _0x28875d)&&'function'==typeof _0x28875d['then']&&'function'==typeof _0x28875d['catch'];}function _0x41dc67(_0x3a32af){_0x15a5e4(_0x3a32af)['then'](_0x3b8ed1=>_0x3b8ed1&&'ok'==_0x3b8ed1['status']?_0x21017b(_0x2df7a4(_0x520fef+_0xcc90e7))!=_0x3b8ed1['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x242cd1=>(_0x10202f(),_0x242cd1),()=>{const _0x56756e=_0x54341d();return null==_0x56756e?(_0x10202f(),'Valid'):_0x8f22ef-_0x56756e>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1fae34)['catch'](()=>{_0x1fae34('UsageLimit');});const _0x2989a=0x36ee80;function _0x10202f(){const _0x4fe3c2='llct-'+_0x21017b(_0x2df7a4(_0x4413e2)),_0x35f37a=_0x2fbffb(_0x21017b(window['Math']['ceil'](_0x8f22ef/_0x2989a)));window['localStorage']['setItem'](_0x4fe3c2,_0x35f37a);}function _0x54341d(){const _0x1bdc98='llct-'+_0x21017b(_0x2df7a4(_0x4413e2)),_0x292216=window['localStorage']['getItem'](_0x1bdc98);return _0x292216?window['parseInt'](_0x2fbffb(_0x292216),0x10)*_0x2989a:null;}function _0x15a5e4(_0x430c17){return new window['Promise']((_0x277740,_0x25ec66)=>{_0x430c17['then'](_0x277740,_0x25ec66),window['setTimeout'](_0x25ec66,0x1d4c0);});}}_0x3ec827['on']('_sendUsageRequest',(_0x341528,_0x1cbdf5)=>{if(_0x1cbdf5[0x0]!=_0x4413e2)return _0x1fae34('UsageLimit');_0x1cbdf5[0x1]={..._0x1cbdf5[0x1],'requestId':_0x520fef};},{'priority':'high'}),_0x3ec827['on']('_sendUsageRequest',_0x17532d=>{_0x36d465(_0x17532d['return'])&&(_0x577dfc=!0x0,_0x41dc67(_0x17532d['return']));},{'priority':'low'}),_0x388418['then'](()=>{_0x577dfc||_0x1fae34('UsageLimit');});});function _0x3ed7c1(){return'auto'==_0x3ec827['editing']['view']['_overlayModeHint'];}function _0x1de237(){_0x3ec827['editing']['view']['_overlayModeHint']='auto';}}function _0xb73560(_0x2f5752){const _0x4e8002=[new window['Promise'](_0x1a2425=>setTimeout(_0x1a2425,0x93ecc)),_0x388418['then'](()=>new window['Promise'](_0x38cd4e=>{const _0xdbb160=0x7,_0x3d489c=_0x4f0970['_revisions'];function _0x54e465(){_0x3d489c['length']>=_0xdbb160&&_0x38cd4e();}_0x54e465(),_0x3d489c['on']('add',_0x54e465);})),new window['Promise'](_0x194672=>{function _0x41ed97(){for(const _0x5a9777 in window)if(window['Number']['isNaN'](window['Number'](_0x5a9777))&&window[_0x5a9777]==_0x43c1b2)return _0x194672();'destroyed'!=_0x3ec827['state']&&window['setTimeout'](_0x41ed97,0x1388);}_0x167ce0('RevisionViewer')&&_0x41ed97();})];return window['Promise']['race'](_0x4e8002)['then'](()=>_0x2f5752);}async function _0x1f9f15(){if(await _0x388418,_0x167ce0('RevisionViewer')){const _0x4847bc=_0x4f0970['getRevision'](0x0),_0x484389=_0x4f0970['getEarlierVisibleRevision'](_0x4847bc['id']),_0x4cf011=_0x31aaa9('RevisionViewer');return await _0x4cf011['compare'](_0x4847bc['id'],_0x484389?_0x484389['id']:null,!0x0),_0x4cf011['unbind']('isEnabled'),_0x4cf011['isEnabled']=!0x1,_0x4cf011['compare']=_0x18e040,void(_0x4cf011['_getDiff']=_0x18e040);}if(_0x167ce0('RevisionTracker')){const _0x511497=_0x31aaa9('RevisionTracker');_0x511497['unbind']('isEnabled'),_0x511497['isEnabled']=!0x1,_0x511497['update']=_0x18e040,_0x511497['saveRevision']=_0x18e040;}_0x3ec827['model']['change']=_0x18e040,_0x3ec827['model']['enqueueChange']=_0x18e040,_0x3ec827['enableReadOnlyMode']('model');}function _0x591161(){return _0x167ce0('WebSocketGateway')&&'connected'==_0x31aaa9('WebSocketGateway')['state'];}function _0x4e3a43(){return _0x167ce0('RevisionViewerIntegration');}function _0x3b00d3(){return _0x167ce0('TrackChangesDataGetter');}function _0x122916(_0x319a7b){const _0x525227=_0x4604a0();_0x3ec827[_0x525227]='revisionHistoryLicenseKey'+_0x319a7b,_0x319a7b['endsWith']('Limit')&&(window[_0x4604a0()]=_0x43c1b2),'Valid'!=_0x319a7b&&_0x1f9f15();}function _0x4604a0(){const _0x308f2f=window['String'](window['performance']['now']())['replace']('.','');let _0x3de1b7='v';for(let _0x5b9b12=0x0;_0x5b9b12<_0x308f2f['length'];_0x5b9b12+=0x2){let _0x42db33=window['parseInt'](_0x308f2f['substring'](_0x5b9b12,_0x5b9b12+0x2));_0x42db33>=0x3e&&(_0x42db33-=0x3e),_0x3de1b7+=_0x5dc8de[_0x42db33];}return _0x3de1b7;}function _0x596829(){const _0x5015bf=_0x29fc6c['split']('.');if(0x3!=_0x5015bf['length'])return null;return _0x4a97ec(_0x5015bf[0x1]);function _0x4a97ec(_0x4fb3a5){const _0x2331ee=_0x4b50f2(_0x4fb3a5);return _0x2331ee&&_0x153270()?_0x2331ee:null;function _0x153270(){const _0x323a0c=_0x2331ee['jti'],_0x33d413=window['parseInt'](_0x323a0c['substring'](_0x323a0c['length']-0x8),0x10),_0x579a77={..._0x2331ee,'jti':_0x323a0c['substring'](0x0,_0x323a0c['length']-0x8)};return delete _0x579a77['vc'],_0x2df7a4(_0x579a77)==_0x33d413;}}}async function _0x50d9ed(){let _0x52fbba=!0x0;try{const [_0x4c2d8c,_0x3ed56b,_0x3dc261]=_0x29fc6c['split']('.');return _0x46f7b9(_0x4c2d8c),await _0x3d052e(_0x4c2d8c,_0x3ed56b,_0x3dc261),_0x52fbba;}catch{return!0x1;}function _0x46f7b9(_0x544d80){const _0x23d7b9=_0x4b50f2(_0x544d80);_0x23d7b9&&'ES256'==_0x23d7b9['alg']||(_0x52fbba=!0x1);}async function _0x3d052e(_0x33f6cd,_0x5765f4,_0x4f2c50){const _0x4f6a84=window['Uint8Array']['from'](_0x159417(_0x4f2c50),_0x1464f9=>_0x1464f9['charCodeAt'](0x0)),_0x4f22fe=new window['TextEncoder']()['encode'](_0x33f6cd+'.'+_0x5765f4),_0x34c72a=window['crypto']['subtle'];if(!_0x34c72a)return;const _0x4a16dc=await _0x34c72a['importKey']('jwk',_0x375bc6,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x34c72a['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4a16dc,_0x4f6a84,_0x4f22fe)||(_0x52fbba=!0x1);}}function _0x4b50f2(_0x3a9d97){return _0x3a9d97['startsWith']('ey')?JSON['parse'](_0x159417(_0x3a9d97)):null;}function _0x159417(_0x5adbd3){return window['atob'](_0x5adbd3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2df7a4(_0x14e74e){let _0x13fc4d=0x1505;function _0x27683e(_0x50b55b){for(let _0x42d21d=0x0;_0x42d21d<_0x50b55b['length'];_0x42d21d++){const _0x29041b=_0x50b55b['charCodeAt'](_0x42d21d);_0x13fc4d=(_0x13fc4d<<0x5)+_0x13fc4d+_0x29041b,_0x13fc4d&=_0x13fc4d;}}function _0x2b5850(_0xbe8eee){Array['isArray'](_0xbe8eee)?_0xbe8eee['forEach'](_0x2b5850):_0xbe8eee&&'object'==typeof _0xbe8eee?Object['entries'](_0xbe8eee)['sort']()['forEach'](([_0x46bd2d,_0x532527])=>{_0x27683e(_0x46bd2d),_0x2b5850(_0x532527);}):_0x27683e(window['String'](_0xbe8eee));}return _0x2b5850(_0x14e74e),_0x13fc4d>>>0x0;}function _0x21017b(_0x5da931){return _0x5da931['toString'](0x10)['padStart'](0x8,'0');}function _0x2fbffb(_0x3b3885){return _0x3b3885['split']('')['reverse']()['join']('');}function _0x167ce0(_0x4c0eec){return _0x3ec827['plugins']['has'](_0x4c0eec);}function _0x31aaa9(_0x1f585f){return _0x3ec827['plugins']['get'](_0x1f585f);}function _0x18e040(){}_0x122916(await _0x29a9ed());}(this);}['createRevision'](_0x3f75d2){const _0x51f8ba=this['editor']['plugins']['get']('Users');return new gt({'id':_0x3f75d2['id'],'name':_0x3f75d2['name'],'creator':_0x3f75d2['creatorId']?_0x51f8ba['getUser'](_0x3f75d2['creatorId']):null,'diffData':_0x3f75d2['diffData']||_0x3f75d2['data'],'authors':_0x3f75d2['authorsIds']['map'](_0x45593a=>_0x51f8ba['getUser'](_0x45593a)),'createdAt':new Date(_0x3f75d2['createdAt']),'attributes':_0x3f75d2['attributes'],'fromVersion':_0x3f75d2['fromVersion'],'toVersion':_0x3f75d2['toVersion']});}['addRevision'](_0x340d5b,_0x1b0e7d=0x0){this['_revisions']['add'](_0x340d5b,_0x1b0e7d);}['getRevision'](_0x49a5e8){return this['_revisions']['get'](_0x49a5e8);}['getRevisions'](_0x63a8a7={'toJSON':!0x1}){const _0x2251ea=Array['from'](this['_revisions']);return _0x2251ea['reverse'](),_0x63a8a7['toJSON']?_0x2251ea['map'](_0x5f5045=>_0x5f5045['toJSON']()):_0x2251ea;}['getIndex'](_0x3d06e8){return this['_revisions']['getIndex'](_0x3d06e8);}['getEarlierVisibleRevision'](_0x1c5f40){const [,_0x3f9eea]=this['getRevisionsIterator'](_0x1c5f40,{'direction':'earlier'});return _0x3f9eea;}['getLaterVisibleRevision'](_0x5c9985){const [,_0x4e145e]=this['getRevisionsIterator'](_0x5c9985,{'direction':'later'});return _0x4e145e;}['getRevisionsInDiff'](_0x33d8d1){const _0x15be1c=[];for(const _0x24c2d9 of this['getRevisionsIterator'](_0x33d8d1['newRevisionId']))if(_0x15be1c['push'](_0x24c2d9),_0x24c2d9['id']===_0x33d8d1['oldRevisionId'])break;return _0x15be1c;}*['getRevisionsIterator'](_0x5f14e1,{direction:_0x3bec73='earlier',filter:_0x28bfa7=()=>!0x0}={}){const _0x221bdb='earlier'===_0x3bec73?0x1:-0x1;let _0x289d87=this['_revisions']['get'](_0x5f14e1),_0x3a80d2=this['getIndex'](_0x289d87);for(yield _0x289d87;_0x289d87;){if(_0x3a80d2+=_0x221bdb,_0x289d87=this['getRevision'](_0x3a80d2),!_0x289d87)return;_0x28bfa7(_0x289d87)&&(yield _0x289d87);}}},wt=class extends _0x2aa7ef{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2be154,'c'],[_0xeb1e2a,'a'],[_0x85f666,'e'],[_0x4208b5,'r'],[_0x1a6033,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2be154],['a',_0xeb1e2a],['e',_0x85f666],['r',_0x4208b5],['u',_0x1a6033]]);async['loadRevisionData'](_0x1fb4cf,_0x5cdb90){if(_0x1fb4cf['diffData']||!_0x5cdb90)return;const _0x2856b9=this['editor']['config']['get']('collaboration.channelId');_0x1fb4cf['diffData']=(await _0x5cdb90['getRevision']({'channelId':_0x2856b9,'revisionId':_0x1fb4cf['id']}))['diffData'];}['getRevisionDocumentData'](_0x10f1d4){const _0x47dc33={};for(const _0x50cc0f in _0x10f1d4['diffData']){if(_0x10f1d4['diffData'][_0x50cc0f]['attachChange']&&!_0x10f1d4['diffData'][_0x50cc0f]['attachChange']['isAttached'])continue;const _0x11c6c1=this['_removeRevisionMarkers'](JSON['parse'](_0x10f1d4['diffData'][_0x50cc0f]['insertions'])),_0x5cf6f8=this['editor']['editing']['view']['document'],_0x453c9a=new _0x7a086d(_0x5cf6f8,_0x11c6c1['map'](_0x4a3292=>this['_getViewFromDiffObj'](_0x4a3292,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x47dc33[_0x50cc0f]=this['editor']['data']['processor']['toData'](_0x453c9a),this['editor']['data']['processor']['useFillerType']('default');}return _0x47dc33;}['getRevisionRootsAttributes'](_0x396fd8){const _0x14de23={};for(const _0x4e2d7f in _0x396fd8['diffData'])_0x396fd8['diffData'][_0x4e2d7f]['attachChange']&&!_0x396fd8['diffData'][_0x4e2d7f]['attachChange']['isAttached']||(_0x14de23[_0x4e2d7f]=_0x396fd8['diffData'][_0x4e2d7f]['attributesAfter']||{});return _0x14de23;}['getRevisionRootsModelElements'](_0x81a03b){const _0x36f7c2={};for(const _0x4f47e7 in _0x81a03b['diffData']){if(_0x81a03b['diffData'][_0x4f47e7]['attachChange']&&!_0x81a03b['diffData'][_0x4f47e7]['attachChange']['isAttached'])continue;const _0x5a5713=_0x81a03b['diffData'][_0x4f47e7]['rootElementName'];_0x5a5713&&(_0x36f7c2[_0x4f47e7]=_0x5a5713);}return _0x36f7c2;}['_getTypeCharForViewElement'](_0x560ff0){return this['_viewClassToTypeChar']['get'](_0x560ff0['constructor']);}['_getViewFromDiffObj'](_0x364af6,_0x39cfb7){const _0x44e05d=this['editor']['editing']['view']['document'];if('string'==typeof _0x364af6)return new _0x1e4b43(_0x44e05d,_0x364af6);{let _0x117361,_0x31a23e;_0x31a23e='u'==_0x364af6['type']||'r'==_0x364af6['type']?[]:_0x364af6['children']['map'](_0xee593=>this['_getViewFromDiffObj'](_0xee593,_0x39cfb7));const _0x2082d2=this['_typeCharToViewClass']['get'](_0x364af6['type'])||_0x286a2b,_0x3e3d6c=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x117361=new _0x2082d2(_0x44e05d,_0x364af6['name'],_0x364af6['attributes'],_0x31a23e),'u'==_0x364af6['type']&&_0x364af6['children'][0x0]){const _0x14ef7a=_0x364af6['children'][0x0];if(_0x117361['render']=function(_0x29fc10){const _0xb61367=_0x29fc10['createElement']('div');return _0xb61367['innerHTML']=_0x14ef7a,_0xb61367['childNodes'][0x0];},_0x39cfb7){const _0x5a8107=new _0x7a086d(_0x44e05d);_0x5a8107['_appendChild'](_0x117361);const _0x183659=Array['from'](_0x3e3d6c['viewChildrenToDom'](_0x5a8107,{'bind':!0x1})),_0x288c05=_0x3e3d6c['domDocument']['createElement']('div');_0x288c05['append'](..._0x183659),_0x117361=Array['from'](_0x3e3d6c['domChildrenToView'](_0x288c05))[0x0];}}else{if('r'==_0x364af6['type']&&_0x364af6['children'][0x0]){const _0x517b01=_0x364af6['children'][0x0];if(_0x117361['render']=function(_0x295716){_0x295716['innerHTML']=_0x517b01;},_0x39cfb7){const _0x596a48=new _0x7a086d(_0x44e05d);_0x596a48['_appendChild'](_0x117361);const _0x3b5b77=Array['from'](_0x3e3d6c['viewChildrenToDom'](_0x596a48,{'bind':!0x1})),_0x594df9=_0x3e3d6c['domDocument']['createElement']('div');_0x594df9['append'](..._0x3b5b77);const _0x102c90=Array['from'](_0x3e3d6c['domChildrenToView'](_0x594df9));_0x102c90['length']>0x1?_0x117361['_appendChild'](_0x102c90):_0x117361=_0x102c90[0x0];}}}if(_0x364af6['customProperties']){for(const [_0x24ef61,_0x1f93a0]of _0x364af6['customProperties'])_0x117361['_setCustomProperty'](_0x24ef61,_0x1f93a0);}const _0x3ae9ef=void 0x0===_0x364af6['fillerOffset']?null:_0x364af6['fillerOffset'];return null!==_0x3ae9ef&&(_0x117361['getFillerOffset']=()=>_0x3ae9ef),_0x117361;}}['_makeModelFromViewString'](_0x1ba3f1,_0x15dcfb){const _0x399d00=JSON['parse'](_0x1ba3f1),_0x10d794=this['editor']['editing']['view']['document'],_0x2c9dd1=new _0x7a086d(_0x10d794,_0x399d00['map'](_0x1ce7b7=>this['_getViewFromDiffObj'](_0x1ce7b7,!0x0))),_0x1f825c=this['editor']['data']['toModel'](_0x2c9dd1,_0x15dcfb);return _0x1f825c['name']=_0x15dcfb,_0x1f825c;}['_removeRevisionMarkers'](_0x460995){return(_0x460995=_0x460995['filter'](_0x2a9ff7=>!_0x2a9ff7['name']||'revision-start'!==_0x2a9ff7['name']&&'revision-end'!==_0x2a9ff7['name']))['forEach'](_0x19b0bf=>{'string'!=typeof _0x19b0bf&&(_0x19b0bf['children']=this['_removeRevisionMarkers'](_0x19b0bf['children']),_0x19b0bf['attributes']=_0x19b0bf['attributes']['filter'](_0x52a216=>!_0x52a216[0x0]['startsWith']('data-revision-')));}),_0x460995;}};function pt(_0x4de37d,_0x137b78,_0x175c82){const t=_0x4de37d['t'];switch(_0x137b78){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'},_0x175c82);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x175c82);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'';}}var _t=class extends _0x2aa7ef{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xa4ad8,mt,wt,_0x52c163];}constructor(_0xfc8c00){super(_0xfc8c00),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x370cab=_0x51cc90();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x370cab},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x722656=this['repository']['getRevision'](0x0),_0x577f6c=_0x722656&&null===_0x722656['creator']?_0x722656:null;if(this['_continueCurrentRevision']=!!_0x577f6c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x242601=this['_source']['getCurrentRevisionId'](),_0x3e88ff=this['repository']['getRevision'](_0x242601);if(_0x3e88ff)this['_startingVersion']=_0x3e88ff['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x42147f=this['_source']['history']['_operations']['find'](_0x155dbd=>!_0x155dbd['_isInit']),_0x2a0914=_0x42147f?_0x42147f['baseVersion']:this['_source']['history']['version'];_0x722656?(_0x722656['toVersion']<_0x2a0914&&_0x722656['_update']({'toVersion':_0x2a0914}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x577f6c['id'],this['_startingVersion']=_0x577f6c['fromVersion']):(this['_startingVersion']=_0x722656['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2a0914,this['_continueCurrentRevision']=!0x1);}}else _0x577f6c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x577f6c['toVersion'],this['editor']['model']['document']['history']['version']),_0x577f6c['fromVersion']===_0x577f6c['toVersion']?(0x0!==_0x577f6c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x577f6c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x577f6c['id'],this['_startingVersion']=_0x577f6c['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',_0x3e5ddc=>!_0x3e5ddc),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x257722=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2046aa;for(const _0x2e3a7c in _0x257722){const _0x399efe=_0x2e3a7c,_0x2a1566=_0x257722[_0x399efe];if('revisionHistoryLicenseKeyValid'==_0x2a1566||'revisionHistoryLicenseKeyInvalid'==_0x2a1566||'revisionHistoryLicenseKeyExpired'==_0x2a1566||'revisionHistoryLicenseKeyDomainLimit'==_0x2a1566||'revisionHistoryLicenseKeyNotAllowed'==_0x2a1566||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2a1566||'revisionHistoryLicenseKeyUsageLimit'==_0x2a1566){delete _0x257722[_0x399efe],_0x2046aa=_0x2a1566,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2046aa&&_0x257722['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2046aa&&_0x257722['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2046aa&&_0x257722['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2046aa&&_0x257722['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2046aa&&_0x257722['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2046aa&&_0x257722['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x30c9d0=this['repository']['getRevision'](0x0),_0x5952f8=await this['getRevisionDocumentData'](_0x30c9d0),_0x4802e5=await this['getRevisionRootsAttributes'](_0x30c9d0),_0x545e23=this['_utils']['getRevisionRootsModelElements'](_0x30c9d0);this['_replaceEditorDataWithRevisionData'](_0x5952f8,_0x4802e5,_0x545e23);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x44f745){this['_source']=_0x44f745;}async['update'](){const _0x3375f6=await this['_source']['getLatestVersion']();if(_0x3375f6>this['currentRevision']['toVersion']){await this['_loadState']();const _0x16c7bd=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3375f6});_0x16c7bd['authors']=_0x16c7bd['authorsIds']['map'](_0x190f41=>this['editor']['plugins']['get']('Users')['getUser'](_0x190f41)),this['currentRevision']['_update'](_0x16c7bd);}}async['saveRevision'](_0x5398ea={},_0x2f78c3=null){const _0x37adda=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2f78c3>this['currentRevision']['toVersion']&&(_0x2f78c3=null),null===_0x2f78c3&&(_0x2f78c3=await this['_source']['getLatestVersion']());const _0x19fb4b=this['_getFromVersion'](_0x2f78c3),_0x2bcc76=this['buildRevisionData']({'from':_0x19fb4b,'to':_0x2f78c3});if(this['currentRevision']['toVersion']<_0x2f78c3){const _0x1f42a1=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2f78c3,'to':_0x2f78c3});_0x1f42a1['authors']=[],_0x1f42a1['authorsIds']=[],_0x1f42a1['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1f42a1,!0x0),delete _0x1f42a1['authors'],_0x37adda['push'](_0x1f42a1);}_0x5398ea['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5398ea['name']=_0x5398ea['name']||null,_0x5398ea['id']=_0x5398ea['id']||_0x51cc90(),_0x5398ea={..._0x5398ea,..._0x2bcc76};const _0x15e138=this['addRevisionData'](_0x5398ea);_0x37adda['push'](_0x5398ea);const _0x2faddc=this['repository']['getIndex'](_0x15e138);if(0x0!==_0x2faddc){const _0x52893c=this['repository']['getRevision'](_0x2faddc-0x1);if(_0x52893c['fromVersion']!==_0x2f78c3){const _0x3e7d83=this['_revisionDataBuilder']['getData'](_0x2f78c3,_0x52893c['toVersion']),_0x3db717={'id':_0x52893c['id'],'diffData':_0x3e7d83['diffData'],'authorsIds':_0x3e7d83['authorsIds'],'authors':_0x3e7d83['authorsIds']['map'](_0x38686b=>this['editor']['plugins']['get']('Users')['getUser'](_0x38686b)),'fromVersion':_0x2f78c3};_0x52893c===this['currentRevision']&&(_0x3db717['createdAt']=new Date(_0x5398ea['createdAt']['getTime']()+0xa)),_0x52893c['_update'](_0x3db717,!0x0),delete _0x3db717['authors'],_0x37adda['push'](_0x3db717);}}if(this['adapter']){for(const _0x78f561 of _0x37adda)this['_bufferUpdate'](_0x78f561['id'],_0x78f561,!0x0);this['sendBufferedUpdates']();}return _0x15e138;}['addRevisionData'](_0x2170cb){const _0xba793b=this['repository']['createRevision'](_0x2170cb);return this['adapter']&&_0xba793b['on']('_update',(_0x5b3456,_0x14c792,_0x501de3)=>{_0x501de3||(this['_bufferUpdate'](_0x14c792['id'],_0x14c792,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xba793b,this['_findInsertionIndex'](_0xba793b)),_0xba793b;}async['getRevisionDocumentData'](_0x41a158){return await this['_utils']['loadRevisionData'](_0x41a158,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x41a158);}async['getRevisionRootsAttributes'](_0x5cc813){return await this['_utils']['loadRevisionData'](_0x5cc813,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5cc813);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5beed8=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x52d974=0x0;_0x52d974<_0x5beed8['length'];_0x52d974++){const _0x124097=_0x5beed8[_0x52d974];let _0xd6267f=!0x1;for(const _0x5ce3e1 of Object['keys'](_0x124097))void 0x0===_0x124097[_0x5ce3e1]?delete _0x124097[_0x5ce3e1]:'id'!==_0x5ce3e1&&(_0xd6267f=!0x0);_0xd6267f||(_0x5beed8[_0x52d974]=null);}if(_0x5beed8=_0x5beed8['filter'](_0x5a5363=>null!==_0x5a5363),!_0x5beed8['length'])return;for(let _0x43aefc=0x0;_0x43aefc<_0x5beed8['length'];_0x43aefc++){const _0xc72934=_0x5beed8[_0x43aefc];void 0x0!==_0xc72934['fromVersion']&&void 0x0===_0xc72934['toVersion']&&(_0xc72934['toVersion']=this['repository']['getRevision'](_0xc72934['id'])['toVersion']),void 0x0!==_0xc72934['toVersion']&&void 0x0===_0xc72934['fromVersion']&&(_0xc72934['fromVersion']=this['repository']['getRevision'](_0xc72934['id'])['fromVersion']);}const _0xb1f022=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5beed8,_0xb1f022)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1c2b19=>{if(_0x1c2b19){for(const _0x266379 of _0x1c2b19)this['setRevisionData']({'id':_0x266379['id'],'createdAt':_0x266379['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x1b2c8a=null,from:_0x181049=null,to:_0x3a45e0=null}){_0x181049=null!==_0x181049?_0x181049:_0x1b2c8a['fromVersion'],_0x3a45e0=null!==_0x3a45e0?_0x3a45e0:_0x1b2c8a['toVersion'];const _0xd586f4=this['_revisionDataBuilder']['getData'](_0x181049,_0x3a45e0),_0x5e6598={'diffData':_0xd586f4['diffData'],'authorsIds':_0xd586f4['authorsIds'],'fromVersion':_0x181049,'toVersion':_0x3a45e0};if(!_0x1b2c8a||_0x3a45e0!==_0x1b2c8a['toVersion']){const _0x157f92=_0x3a45e0-0x1,_0x33e3a1=this['_source']['history']['getOperation'](_0x157f92);_0x5e6598['createdAt']=_0x33e3a1&&_0x33e3a1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x181049===this['_loadedStateData']['fromVersion']){for(const _0x48f50b of this['_loadedStateData']['authors'])_0x5e6598['authorsIds']['includes'](_0x48f50b['id'])||_0x5e6598['authorsIds']['push'](_0x48f50b['id']);}return _0x5e6598;}['_bufferUpdate'](_0x18d14c,_0x595b7f,_0x4031fe){if(this['_bufferedUpdates']['has'](_0x18d14c)){const _0x9829df=this['_bufferedUpdates']['get'](_0x18d14c);_0x595b7f=_0x4031fe?{..._0x9829df,..._0x595b7f}:{..._0x595b7f,..._0x9829df};}this['_bufferedUpdates']['set'](_0x18d14c,_0x595b7f);}['setRevisionData'](_0x4b8237){const _0x713efe=this['repository']['getRevision'](_0x4b8237['id']);if(_0x4b8237['createdAt']&&(_0x4b8237['createdAt']=new Date(_0x4b8237['createdAt'])),_0x4b8237['authorsIds']){const _0x46410b=this['editor']['plugins']['get']('Users');_0x4b8237['authors']=_0x4b8237['authorsIds']['map'](_0x247cea=>_0x46410b['getUser'](_0x247cea));}_0x713efe['_update'](_0x4b8237,!0x0);}['_createInitialRevision'](_0x64032){const _0x1352f7=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1352f7)this['_initialRevisionId']=_0x1352f7['id'];else{const _0x50a1a9=!this['editor']['model']['document']['roots']['find'](_0x3b58f2=>this['editor']['model']['hasContent'](_0x3b58f2)),_0x5adc6d=this['editor']['plugins']['get']('Users')['me']['id'],_0x29ac87=pt(this['editor']['locale'],_0x50a1a9?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x64032,'to':_0x64032,'id':this['_initialRevisionId'],'name':_0x29ac87,'creatorId':_0x5adc6d});}}['_createCurrentRevision'](_0x465099){const _0x319d7a=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x319d7a),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x465099,'to':_0x465099,'id':_0x319d7a,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x59604e,_0x4397ac,_0x3d462c){const _0x88256={},_0x33da14={},_0x3c556e={},_0x37c734=this['editor']['config']['get']('roots')||{};for(const [_0x1324d4,_0x3d94fa]of Object['entries'](_0x37c734))_0x3d94fa['lazyLoad']||(_0x88256[_0x1324d4]=_0x3d94fa['initialData']??'',_0x33da14[_0x1324d4]=_0x3d94fa['modelAttributes']||{},_0x3d94fa['modelElement']&&(_0x3c556e[_0x1324d4]=_0x3d94fa['modelElement']));for(const _0x616aa1 of this['editor']['model']['document']['getRootNames']())_0x88256[_0x616aa1]??='',_0x33da14[_0x616aa1]??={};let _0x40219a=!0x1;const _0x914a01=Object['keys'](_0x88256),_0x8ad8f6=Object['keys'](_0x59604e);for(const _0x19b548 of _0x914a01){if(_0x88256[_0x19b548]!==_0x59604e[_0x19b548]&&''!==_0x88256[_0x19b548]['trim']()){_0x40219a=!0x0;break;}if(!_0x363c2d(_0x33da14[_0x19b548],_0x4397ac[_0x19b548])&&Object['keys'](_0x33da14[_0x19b548])['length']>0x0){_0x40219a=!0x0;break;}const _0x3f97cb=_0x3c556e[_0x19b548],_0xc409c0=_0x3d462c[_0x19b548];if(_0x3f97cb&&_0xc409c0&&_0x3f97cb!==_0xc409c0){_0x40219a=!0x0;break;}}_0x40219a||(_0x40219a=_0x8ad8f6['some'](_0x2120a0=>!this['editor']['model']['document']['getRoot'](_0x2120a0))),_0x40219a&&_0x45b696('editor-initial-data-replaced-with-revision-data',{'editorData':_0x88256,'editorRootsAttributes':_0x33da14,'editorRootsModelElements':_0x3c556e,'revisionData':_0x59604e,'revisionRootsAttributes':_0x4397ac,'revisionRootsModelElements':_0x3d462c});for(const [_0xf452b2,_0x3d4675]of Object['entries'](_0x59604e))this['editor']['config']['set']('roots.'+_0xf452b2+'.initialData',_0x3d4675);for(const [_0x5b667f,_0x1f123a]of Object['entries'](_0x4397ac))this['editor']['config']['set']('roots.'+_0x5b667f+'.modelAttributes',_0x1f123a);const _0x214724=this['editor']['model']['document'];for(const [_0x18a999,_0x5bf8fe]of Object['entries'](_0x3d462c)){this['editor']['config']['set']('roots.'+_0x18a999+'.modelElement',_0x5bf8fe);const _0x46a557=_0x214724['getRoot'](_0x18a999);_0x46a557&&_0x46a557['name']!==_0x5bf8fe&&(_0x214724['roots']['remove'](_0x18a999),_0x214724['createRoot'](_0x5bf8fe,_0x18a999));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x290481=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x290481['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x3c5d41){const _0x2aab1b=this['repository']['getRevisions']();_0x2aab1b['reverse']();let _0x6a6261=0x0;for(;_0x6a6261<_0x2aab1b['length'];){const _0x2858c9=_0x2aab1b[_0x6a6261];if(_0x2858c9===this['currentRevision']){_0x6a6261++;continue;}if(_0x2858c9['id']===this['_initialRevisionId'])break;const _0x31a5dd=_0x3c5d41['toVersion']-_0x2858c9['toVersion']||_0x3c5d41['fromVersion']-_0x2858c9['fromVersion'];if(_0x31a5dd>0x0)break;if(_0x31a5dd<0x0)_0x6a6261++;else{if(!_0x3c5d41['creator']&&_0x2858c9['creator'])break;if(_0x2858c9['creator']||!_0x3c5d41['creator']){if(_0x3c5d41['createdAt']>_0x2858c9['createdAt'])break;_0x6a6261++;}else _0x6a6261++;}}return _0x6a6261;}['_getFromVersion'](_0x1d02df){const _0x44ba41=this['repository']['getRevisions']();_0x44ba41['reverse'](),_0x44ba41['shift']();const _0x4b7515=_0x44ba41['find'](_0xf0d774=>_0xf0d774['toVersion']<=_0x1d02df)['toVersion'];return _0x4b7515<this['_startingVersion']?this['_startingVersion']:_0x4b7515;}['_makeRevision']({name:_0x3a07e8,from:_0x484d56,to:_0x44be62,creatorId:_0x52cabd,id:_0x5ece3f}){const _0x108605=this['buildRevisionData']({'from':_0x484d56,'to':_0x44be62});_0x108605['name']=_0x3a07e8,_0x108605['creatorId']=_0x52cabd,_0x108605['id']=_0x5ece3f;const _0x3d877a=this['addRevisionData'](_0x108605);return this['adapter']&&this['_bufferUpdate'](_0x108605['id'],_0x108605,!0x0),_0x3d877a;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x15ba64){this['editor']=_0x15ba64,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'](_0x28cbf3){this['source']=_0x28cbf3;const _0xadaf26=new Map(),_0x59637a=new Map(),_0x46380c=this['editor']['model']['document']['roots']['map'](_0x2121af=>_0x2121af['rootName']);for(const _0x3f3779 of _0x46380c){const _0x5a428e=this['editor']['model']['document']['getRoot'](_0x3f3779),_0x4f043d=bt(_0x5a428e);_0xadaf26['set'](_0x3f3779,_0x4f043d),_0x59637a['set'](_0x3f3779,Object['fromEntries'](_0x5a428e['getAttributes']()));}const _0x469e63=Array['from'](this['editor']['model']['markers'])['map'](_0xab1148=>[_0xab1148['name'],_0xab1148['getRange']()]),_0x1a6178=this['source']['version'];this['_saveMetaData'](_0x1a6178,_0xadaf26,_0x469e63,_0x59637a),this['_startingRevisionId']=this['_revisionId'];const _0x37b1b0=new Map(),_0x1e68fd=new Map();for(const _0x5dc2ae of _0x46380c){const _0x51e475=Rt(_0x5dc2ae,this['editor']['model']['document']['getRoot'](_0x5dc2ae)['name']);_0x37b1b0['set'](_0x5dc2ae,_0x51e475),_0x1e68fd['set'](_0x5dc2ae,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x37b1b0,[],_0x1e68fd);}['getData'](_0xbedfc5,_0x2c5da9){if(this['_lastFrom']===_0xbedfc5&&this['_lastTo']<=_0x2c5da9)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2c5da9,!0x0);else{if(!this['_savedMetaData']['has'](_0xbedfc5)){const _0x36ddf5=this['_getPreviousFrom'](_0xbedfc5);this['_calculateMetaData'](_0x36ddf5,_0xbedfc5,!0x1);}this['_calculateMetaData'](_0xbedfc5,_0x2c5da9,!0x0);}return this['_lastFrom']=_0xbedfc5,this['_lastTo']=_0x2c5da9,this['_getState']();}['loadState'](_0x4bd737){if(!this['_savedMetaData']['has'](_0x4bd737['fromVersion'])){const _0x185531=this['_getPreviousFrom'](_0x4bd737['fromVersion']);this['_calculateMetaData'](_0x185531,_0x4bd737['fromVersion'],!0x1);}this['_calculateMetaData'](_0x4bd737['fromVersion'],_0x4bd737['toVersion'],!0x1);const _0xa774fa=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x4bd737['fromVersion'],this['_lastTo']=_0x4bd737['toVersion'];for(const _0x1d77a9 in _0x4bd737['diffData']){const _0x17968b=_0x4bd737['diffData'][_0x1d77a9]['attachChange'],_0x1a4f04=_0x1bdc24(_0x4bd737['diffData'][_0x1d77a9]['attributesBefore'])||{},_0x20d2bd=_0x4bd737['diffData'][_0x1d77a9],_0x185227=_0xa774fa['_makeModelFromViewString'](_0x20d2bd['deletions'],_0x20d2bd['rootElementName']||'$root');_0x185227['rootName']=_0x1d77a9,_0x185227['_isAttached']=!_0x17968b||!_0x17968b['isAttached'],_0x185227['isAttached']=()=>_0x185227['_isAttached'],this['_baseRoots']['set'](_0x1d77a9,_0x185227),this['_baseRootsAttributes']['set'](_0x1d77a9,_0x1a4f04),_0x17968b&&this['_touchedRoots']['set'](_0x1d77a9,_0x17968b);const _0x256170=this['_makeIdsRoot'](_0x185227);this['_baseIdsRoots']['set'](_0x1d77a9,_0x256170);for(const [_0x270a4e,_0x5a5006]of _0x185227['markers']){if(!_0x270a4e['startsWith']('revision:'))continue;const _0x5c8cf9=_0x270a4e['split'](':')[0x2];for(const _0x56b62f of _0x5a5006['getWalker']({'singleCharacters':!0x0})){const _0x4a2ad5=this['_getVidAttributeName'](_0x56b62f),_0x4b9176='elementEnd'==_0x56b62f['type']?_0x56b62f['previousPosition']['path']['slice'](0x0,-0x1):_0x56b62f['previousPosition']['path'],_0x307940=_0x256170['getNodeByPath'](_0x4b9176)['getAttribute'](_0x4a2ad5);this['_touched']['set'](_0x307940,{'userId':_0x5c8cf9});}_0x185227['markers']['delete'](_0x270a4e);}}this['_startingRevisionId']=this['_revisionId'];const _0x11b931=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x44107b=>!this['_touched']['has'](_0x44107b));let _0x17eac1=0x0;const _0x39d05d=new Map();for(const _0xa425b1 in _0x4bd737['diffData']){const _0x2070d5=_0x4bd737['diffData'][_0xa425b1]['attachChange'],_0x25e67a=_0x1bdc24(_0x4bd737['diffData'][_0xa425b1]['attributesAfter'])||{},_0x256003=_0x4bd737['diffData'][_0xa425b1],_0x2f2f1d=_0xa774fa['_makeModelFromViewString'](_0x256003['insertions'],_0x256003['rootElementName']||'$root');_0x2f2f1d['rootName']=_0xa425b1,_0x2f2f1d['_isAttached']=!_0x2070d5||_0x2070d5['isAttached'],_0x2f2f1d['isAttached']=()=>_0x2f2f1d['_isAttached'],this['_diffRoots']['set'](_0xa425b1,_0x2f2f1d),this['_diffRootsAttributes']['set'](_0xa425b1,_0x25e67a);const _0x5ba8bd=this['_makeIdsRoot'](_0x2f2f1d,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xa425b1,_0x5ba8bd),_0x39d05d['set'](_0xa425b1,_0x2f2f1d['isAttached']()?_0x25e67a:{});for(const [_0x18861e,_0x533b7c]of _0x2f2f1d['markers']){if(!_0x18861e['startsWith']('revision:'))continue;const _0x208d02=_0x18861e['split'](':')[0x2];for(const _0x4d7a4b of _0x533b7c['getWalker']({'singleCharacters':!0x0})){const _0x1d47d7=this['_getVidAttributeName'](_0x4d7a4b),_0x4d647=this['_revisionId']++,_0x494752='elementEnd'==_0x4d7a4b['type']?_0x4d7a4b['previousPosition']['path']['slice'](0x0,-0x1):_0x4d7a4b['previousPosition']['path'];_0x5ba8bd['getNodeByPath'](_0x494752)['_setAttribute'](_0x1d47d7,_0x4d647),this['_touched']['set'](_0x4d647,{'userId':_0x208d02});}_0x2f2f1d['markers']['delete'](_0x18861e);}for(const _0x1ef857 of this['editor']['model']['createRangeIn'](_0x2f2f1d)['getWalker']({'singleCharacters':!0x0})){const _0x5312db=this['_getVidAttributeName'](_0x1ef857),_0x3777b3='elementEnd'==_0x1ef857['type']?_0x1ef857['previousPosition']['path']['slice'](0x0,-0x1):_0x1ef857['previousPosition']['path'],_0x117d4a=_0x5ba8bd['getNodeByPath'](_0x3777b3);_0x117d4a['getAttribute'](_0x5312db)>0x0||_0x117d4a['_setAttribute'](_0x5312db,_0x11b931[_0x17eac1++]);}for(const [_0x2de323,_0xcb11a6]of _0x2f2f1d['markers'])_0x2de323['startsWith']('revision:')||this['_markers']['set'](_0x2de323,_0xcb11a6);}const {roots:_0x1fb67a}=this['_savedMetaData']['get'](_0x4bd737['fromVersion']),{roots:_0x28d72d}=this['_savedMetaData']['get'](_0x4bd737['toVersion']),_0xdea4a6=bt(_0x1fb67a['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0xdea4a6),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xdea4a6,Number['NEGATIVE_INFINITY']));const _0x37c970=bt(_0x28d72d['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x37c970),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x37c970));const _0x539304=Array['from'](this['_diffRoots'])['map'](([_0x5234d2,_0x58f121])=>[_0x5234d2,bt(_0x58f121)]);this['_saveMetaData'](this['_lastTo'],_0x539304,this['_markers'],_0x39d05d);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x4a3575,_0x4517dc,_0x404916,_0x250357){const _0x335894=new Map(_0x4517dc),_0x4bb235=new Map(_0x1bdc24(_0x250357)),_0x17571d=new Map();for(const [_0x36fb61,_0x2752ee]of _0x404916)_0x17571d['set'](_0x36fb61,{'start':_0x2752ee['start']['clone'](),'end':_0x2752ee['end']['clone'](),'rootName':_0x2752ee['root']['rootName']});this['_savedMetaData']['set'](_0x4a3575,{'roots':_0x335894,'markers':_0x17571d,'rootsAttributes':_0x4bb235});}['_removeMetaData'](_0x211247){this['_savedMetaData']['delete'](_0x211247);}['_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'](_0x296694,_0x5ec1ff=null){let _0x1f9fe9=null;_0x296694['is']('documentFragment')||(_0x1f9fe9=new _0x4d8095(_0x296694['name'],{'vid_start':null===_0x5ec1ff?this['_revisionId']++:_0x5ec1ff++}));const _0x176ba6=[];for(const _0x179807 of _0x296694['getChildren']())if(_0x179807['is']('element')){_0x176ba6['push'](this['_makeIdsRoot'](_0x179807,_0x5ec1ff));const _0x51e213=_0x176ba6[_0x176ba6['length']-0x1];null!==_0x5ec1ff&&(_0x5ec1ff=_0x51e213['is']('element','$text')?_0x51e213['getAttribute']('vid')+0x1:_0x51e213['getAttribute']('vid_end')+0x1);}else{for(let _0x1c79f3=0x0;_0x1c79f3<_0x179807['offsetSize'];_0x1c79f3++)_0x176ba6['push'](new _0x4d8095('$text',{'vid':null===_0x5ec1ff?this['_revisionId']++:_0x5ec1ff++}));}if(_0x296694['is']('documentFragment')){const _0x1f2c81=Rt(_0x296694['rootName'],_0x296694['name']);return _0x1f2c81['_insertChild'](0x0,_0x176ba6),_0x1f2c81;}return _0x1f9fe9['_setAttribute']('vid_end',null===_0x5ec1ff?this['_revisionId']++:_0x5ec1ff++),_0x1f9fe9['_insertChild'](0x0,_0x176ba6),_0x1f9fe9;}['_calculateMetaData'](_0x483e38,_0x4d6a7e,_0x1c9441){this['_reset']();const {roots:_0x3d0af4,markers:_0x5a2a2d,rootsAttributes:_0x5fea5e}=this['_savedMetaData']['get'](_0x483e38);this['_baseRoots']=new Map(_0x3d0af4),this['_baseRootsAttributes']=new Map(_0x1bdc24(_0x5fea5e));for(const [_0x29d936,_0x400343]of this['_baseRoots'])if('$graveyard'!==_0x29d936&&(this['_diffRoots']['set'](_0x29d936,bt(_0x400343)),this['_diffRootsAttributes']=new Map(_0x1bdc24(_0x5fea5e)),_0x1c9441)){const _0x43b0b6=this['_revisionId'];this['_idsRoots']['set'](_0x29d936,this['_makeIdsRoot'](_0x400343)),this['_baseIdsRoots']['set'](_0x29d936,this['_makeIdsRoot'](_0x400343,_0x43b0b6));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x1c9441&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x8bd187,_0x1e331a]of _0x5a2a2d){const _0x466f7f=this['_baseRoots']['get'](_0x1e331a['rootName']),_0x2c6635=this['_diffRoots']['get'](_0x1e331a['rootName']),_0x174bf4=new _0x330949(this['_fixPosition'](_0x1e331a['start'],_0x466f7f),this['_fixPosition'](_0x1e331a['end'],_0x466f7f)),_0x514076=this['_fixRange'](_0x174bf4,_0x2c6635);_0x466f7f['markers']['set'](_0x8bd187,_0x174bf4),this['_markers']['set'](_0x8bd187,_0x514076);}this['_applyOperations'](_0x483e38,_0x4d6a7e,_0x1c9441);}['_applyOperations'](_0x16e208,_0x173f24,_0x581d88){for(const _0x37f0e7 of this['source']['getOperations'](_0x16e208,_0x173f24))this['_handleOperation'](_0x37f0e7,_0x581d88);for(const _0x2d2f6a of this['_diffRoots']['values']())_0x2d2f6a['markers']['clear']();for(const [_0x3c1bb8,_0x3ed5bd]of this['_markers'])this['_diffRoots']['get'](_0x3ed5bd['root']['rootName'])['markers']['set'](_0x3c1bb8,_0x3ed5bd['clone']());const _0x21264c=new Map(),_0x1f97a1=new Map();for(const [_0x14e53a,_0x4925eb]of this['_diffRoots'])_0x21264c['set'](_0x14e53a,bt(_0x4925eb)),_0x1f97a1['set'](_0x14e53a,this['_diffRootsAttributes']['get'](_0x14e53a));this['_saveMetaData'](_0x173f24,_0x21264c,this['_markers'],_0x1f97a1);}['_getPreviousFrom'](_0xe65389){const _0x3a2315=Array['from'](this['_savedMetaData']['keys']());_0x3a2315['sort']((_0x5ac76e,_0x21d416)=>_0x5ac76e-_0x21d416),_0x3a2315['reverse']();for(const _0x153a06 of _0x3a2315)if(_0x153a06<_0xe65389)return _0x153a06;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x148897,_0x1f00fa){const _0x7a6421=Array['from'](_0x1f00fa['markers'])['map'](([_0x3ac045,_0x2ae7ef])=>[_0x3ac045,this['_fixRange'](_0x2ae7ef,_0x148897)]);_0x148897['markers']=new Map(_0x7a6421);}['_transformMarkers'](_0x561b05){for(const _0x4dad60 of this['_markers']['values']()){const _0x366497=_0x4dad60['getTransformedByOperation'](_0x561b05),_0x30c0f9=_0x330949['_createFromRanges'](_0x366497);_0x4dad60['start']=_0x30c0f9['start'],_0x4dad60['end']=_0x30c0f9['end'];}}['_handleOperation'](_0x5bdb77,_0x1edd93){if('addRoot'!=_0x5bdb77['type']&&'detachRoot'!=_0x5bdb77['type']){if('insert'==_0x5bdb77['type']){const _0x31695b=_0x5bdb77['position']['root'],_0x2e7525=_0x31695b['rootName'],_0x7f6995=_0x31695b['name'];this['_diffRoots']['has'](_0x2e7525)||(this['_diffRoots']['set'](_0x2e7525,Rt(_0x2e7525,_0x7f6995,!0x0)),this['_diffRootsAttributes']['set'](_0x2e7525,{}),_0x1edd93&&this['_idsRoots']['set'](_0x2e7525,Rt(_0x2e7525,_0x7f6995,!0x0)));}else{if('addRootAttribute'==_0x5bdb77['type']||'removeRootAttribute'==_0x5bdb77['type']||'changeRootAttribute'==_0x5bdb77['type'])return void this['_handleRootAttributeOperation'](_0x5bdb77);'marker'==_0x5bdb77['type']&&this['_handleMarkerOperation'](_0x5bdb77);}if('marker'!==_0x5bdb77['type']){const _0x35ee13=this['_cloneOperation'](_0x5bdb77,this['_diffRoots']);_0x35ee13['_execute'](),this['_transformMarkers'](_0x35ee13);}if(_0x1edd93)switch(_0x5bdb77['type']){case'insert':this['_handleInsertOperation'](_0x5bdb77);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5bdb77);break;case'merge':this['_handleMergeOperation'](_0x5bdb77);break;case'split':this['_handleSplitOperation'](_0x5bdb77);}}else this['_handleRootOperation'](_0x5bdb77,_0x1edd93);}['_cloneOperation'](_0x1709d8,_0x590a65){const _0x8cbd18=_0x1709d8['clone']();return _0x8cbd18['_authorId']=_0x1709d8['_authorId'],this['_fixOperation'](_0x8cbd18,_0x590a65),_0x8cbd18;}['_getBaseVids'](_0x7b056e){return _0x7b056e['map'](_0x15a601=>{const _0x18888c=this['_getVidAttributeName'](_0x15a601);return Number(_0x15a601['item']['getAttribute'](_0x18888c));});}['_generateTape'](_0x5f2ebc,_0x5ad991){if(_0x5f2ebc['is']('element','$text'))_0x5ad991['push']({'item':_0x5f2ebc,'type':'text'});else{_0x5f2ebc['is']('element')&&_0x5ad991['push']({'item':_0x5f2ebc,'type':'elementStart'});for(const _0x5c6ffc of _0x5f2ebc['getChildren']())this['_generateTape'](_0x5c6ffc,_0x5ad991);_0x5f2ebc['is']('element')&&_0x5ad991['push']({'item':_0x5f2ebc,'type':'elementEnd'});}return _0x5ad991;}['_getState'](){const _0x6b7497=new Map(this['_touched']),_0x2a99c9=new Map(_0x6b7497),_0xb57958=new Map(),_0x1dcad9={'insertions':{},'deletions':{}},_0x2621f8={'insertions':{},'deletions':{}},_0x440cc9=new Map(),_0x8731fb=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x2e4348=new Map();_0x8731fb['delete']('$graveyard');for(const _0x431255 of _0x8731fb){const _0x3618d4=(this['_diffRoots']['get'](_0x431255)??this['_baseRoots']['get'](_0x431255))['name'],_0x47cae4=this['_diffRoots']['get'](_0x431255)||Rt(_0x431255,_0x3618d4,!0x1),_0x2f53e2=this['_baseRoots']['get'](_0x431255)||Rt(_0x431255,_0x3618d4,!0x1);_0x47cae4['isAttached']()||_0x2f53e2['isAttached']()?(_0x2e4348['set'](_0x431255,_0x3618d4),_0x1dcad9['insertions'][_0x431255]=bt(_0x47cae4),_0x1dcad9['deletions'][_0x431255]=bt(_0x2f53e2),this['_copyMarkers'](_0x1dcad9['deletions'][_0x431255],_0x2f53e2),this['_copyMarkers'](_0x1dcad9['insertions'][_0x431255],_0x47cae4),_0x2621f8['insertions'][_0x431255]=this['_generateTape'](this['_idsRoots']['get'](_0x431255),[]),_0x2621f8['deletions'][_0x431255]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x431255)||Rt(_0x431255,_0x3618d4,!0x1),[])):_0x8731fb['delete'](_0x431255);}for(const _0x734292 of _0x8731fb){const _0x431f6d=_0x2621f8['insertions'][_0x734292];for(const _0x46d563 of _0x431f6d){const _0x172aa2=this['_getVidAttributeName'](_0x46d563),_0x245b22=_0x46d563['item']['getAttribute'](_0x172aa2);_0x2a99c9['delete'](_0x245b22),_0x245b22>=this['_startingRevisionId']&&_0xb57958['set'](_0x245b22,_0x6b7497['get'](_0x245b22));}}for(const _0x3bdc5c of _0x8731fb){const _0x427c88=_0x2621f8['insertions'][_0x3bdc5c],_0x4db520=this['_getBaseVids'](_0x2621f8['deletions'][_0x3bdc5c]);let _0x13047b=0x0;for(const _0x20b785 of _0x427c88){const _0x29b90b=this['_getVidAttributeName'](_0x20b785),_0x400e16=_0x20b785['item']['getAttribute'](_0x29b90b);if(!_0xb57958['has'](_0x400e16)&&!_0x440cc9['has'](_0x400e16)){if(_0x2a99c9['has'](_0x400e16))_0x13047b++;else{if(_0x400e16!=_0x4db520[_0x13047b]){const _0x522ad2=_0x6b7497['get'](_0x400e16)||_0x6b7497['get'](_0x4db520[_0x13047b]);for(;_0x400e16!=_0x4db520[_0x13047b];)_0x2a99c9['has'](_0x4db520[_0x13047b])||(_0x440cc9['set'](_0x4db520[_0x13047b],_0x522ad2),_0x6b7497['set'](_0x4db520[_0x13047b],_0x522ad2)),_0x13047b++;}_0x13047b++;}}}}for(const _0x4cbfc9 of _0x8731fb){const _0x1de0ea=_0x2621f8['insertions'][_0x4cbfc9];for(const _0x755687 of _0x1de0ea){const _0x5381e6=this['_getVidAttributeName'](_0x755687),_0x130ba5=_0x755687['item']['getAttribute'](_0x5381e6);if(_0x440cc9['has'](_0x130ba5)){const _0x5e7571=_0x440cc9['get'](_0x130ba5);_0x2a99c9['has'](_0x130ba5)||_0x2a99c9['set'](_0x130ba5,{..._0x5e7571}),_0xb57958['set'](_0x130ba5,{..._0x5e7571});}}}for(const _0x372ebb of _0x2a99c9['keys']())_0x372ebb>=this['_startingRevisionId']&&_0x2a99c9['delete'](_0x372ebb);const _0x4b42ba=new Map();for(const _0x8a7cb4 of _0x8731fb){let _0x1b1d4d=_0x2621f8['insertions'][_0x8a7cb4];for(const _0x8a40fb of _0x1b1d4d)if(_0x8a40fb['item']['is']('element','tableCell')){const _0x25095d=this['_getVidAttributeName'](_0x8a40fb),_0x117fb7=_0x8a40fb['item']['getAttribute'](_0x25095d);if(_0xb57958['has'](_0x117fb7)){const _0x18e4bb=_0x8a40fb['item']['parent']['parent']['getAttribute']('vid_start'),_0x2e4e8c=_0x4b42ba['get'](_0x18e4bb)||new Set();_0x2e4e8c['add'](_0xb57958['get'](_0x117fb7)['userId']),_0x4b42ba['set'](_0x18e4bb,_0x2e4e8c);}}_0x1b1d4d=_0x2621f8['deletions'][_0x8a7cb4];for(const _0x5797b3 of _0x1b1d4d)if(_0x5797b3['item']['is']('element','tableCell')){const _0xac523d=this['_getVidAttributeName'](_0x5797b3),_0x3e16e2=_0x5797b3['item']['getAttribute'](_0xac523d);if(_0x2a99c9['has'](_0x3e16e2)){const _0x322c59=_0x5797b3['item']['parent']['parent']['getAttribute']('vid_start'),_0x402e97=_0x4b42ba['get'](_0x322c59)||new Set();_0x402e97['add'](_0x2a99c9['get'](_0x3e16e2)['userId']),_0x4b42ba['set'](_0x322c59,_0x402e97);}}for(const _0xe60215 of _0x4b42ba['keys']())(_0xb57958['has'](_0xe60215)||_0x2a99c9['has'](_0xe60215))&&_0x4b42ba['delete'](_0xe60215);}for(const _0x2c2abc of _0x8731fb){const _0x3bce6f=_0x2621f8['insertions'][_0x2c2abc];let _0x35bea2=null,_0x388dfa=null;for(const _0x32eb3e of _0x3bce6f){const _0x3cfdbe=this['_getVidAttributeName'](_0x32eb3e),_0x376d3e=_0x32eb3e['item']['getAttribute'](_0x3cfdbe),_0x126ff8=_0x4b42ba['get'](_0x376d3e);_0x126ff8&&'elementStart'==_0x32eb3e['type']&&(_0x35bea2=Array['from'](_0x126ff8)[0x0],_0x388dfa=_0x32eb3e['item']['getAttribute']('vid_end')),_0x35bea2&&(_0x2a99c9['set'](_0x376d3e,{'userId':_0x35bea2}),_0xb57958['set'](_0x376d3e,{'userId':_0x35bea2})),_0x376d3e==_0x388dfa&&(_0x35bea2=null,_0x388dfa=null);}}const _0x241c1c={},_0x46059f=new Set();for(const _0x3597b9 of _0x8731fb){const _0x26e674=_0x1dcad9['deletions'][_0x3597b9],_0x5404d5=_0x1dcad9['insertions'][_0x3597b9];for(const {userId:_0x197f33}of this['_touchedMarkers']['values']())null!==_0x197f33&&_0x46059f['add'](_0x197f33);for(const {userId:_0x4a85c6}of this['_touchedRoots']['values']())null!==_0x4a85c6&&_0x46059f['add'](_0x4a85c6);this['_markChanges'](_0x5404d5,_0x2621f8['insertions'][_0x3597b9],_0xb57958,'insertion',_0x46059f),this['_markChanges'](_0x26e674,_0x2621f8['deletions'][_0x3597b9],_0x2a99c9,'deletion',_0x46059f),_0x241c1c[_0x3597b9]={'insertions':this['_prepareViewToSave'](_0x5404d5),'deletions':this['_prepareViewToSave'](_0x26e674),'attachChange':this['_touchedRoots']['get'](_0x3597b9)||null,'attributesBefore':_0x1bdc24(this['_baseRootsAttributes']['get'](_0x3597b9))||{},'attributesAfter':_0x1bdc24(this['_diffRootsAttributes']['get'](_0x3597b9)),'rootElementName':_0x2e4348['get'](_0x3597b9)};}return{'diffData':_0x241c1c,'authorsIds':Array['from'](_0x46059f)};}['_processRootBeforeSave'](_0x2bbde8){for(const [,_0x2a4851]of _0x2bbde8['markers']){const _0x1b562f=_0x2a4851['start']['getAncestors']()['filter'](_0x2a3cb5=>'tableCell'==_0x2a3cb5['name']);for(const _0x4eb33c of _0x1b562f)0x1==_0x4eb33c['childCount']&&_0x4eb33c['getChild'](0x0)['is']('element','paragraph')&&_0x4eb33c['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x370c30){this['_processRootBeforeSave'](_0x370c30);const _0x219f47=this['editor']['data']['toView'](_0x370c30,{}),_0x378d71=Array['from'](_0x219f47['getChildren']())['map'](_0x5352ae=>this['_getViewJson'](_0x5352ae));return JSON['stringify'](_0x378d71);}['_getViewJson'](_0x866f41){if(_0x866f41['is']('$text'))return _0x866f41['data'];{const _0x516cf0=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x373dd9=_0x866f41,_0x17db8a=this['editor']['data']['htmlProcessor']['domConverter'],_0x30a98f={'type':_0x516cf0['_getTypeCharForViewElement'](_0x373dd9),'name':_0x373dd9['name'],'attributes':Array['from'](_0x373dd9['getAttributes']()),'children':Array['from'](_0x373dd9['getChildren']())['map'](_0x1ff5d6=>this['_getViewJson'](_0x1ff5d6))};if(_0x866f41['is']('uiElement')&&'$comment'!=_0x866f41['name']){const _0x45d3ae=_0x866f41['render'](_0x17db8a['domDocument'],_0x17db8a);_0x30a98f['children']['push'](_0x45d3ae['outerHTML']);}else{if(_0x866f41['is']('rawElement')){const _0x24a8ad=_0x17db8a['domDocument']['createElement'](_0x373dd9['name']);_0x866f41['render'](_0x24a8ad,_0x17db8a),_0x30a98f['children']['push'](_0x24a8ad['innerHTML']);}}const _0x559549=Array['from'](_0x373dd9['getCustomProperties']());_0x559549['length']>0x0&&(_0x30a98f['customProperties']=_0x559549);const _0x52400b=_0x373dd9['getFillerOffset']();return null!==_0x52400b&&(_0x30a98f['fillerOffset']=_0x52400b),_0x30a98f;}}['_markChanges'](_0x3f7e53,_0x264462,_0x2df55c,_0x26f254,_0x1573df){let _0x480d4e=null,_0x4db2cf=null,_0x26fa5c=0x0;const _0x444f97=this['editor']['model'];for(let _0x53bff3=0x0;_0x53bff3<_0x264462['length'];_0x53bff3++){const _0xb4308c=this['_getVidAttributeName'](_0x264462[_0x53bff3]),_0x4870d4=_0x264462[_0x53bff3]['item']['getAttribute'](_0xb4308c),_0x425409=_0x2df55c['get'](_0x4870d4),_0x3d90b9=_0x53bff3==_0x264462['length']-0x1;!_0x480d4e&&_0x425409&&(_0x480d4e=_0x425409,_0x4db2cf=_0x264462[_0x53bff3]),!_0x480d4e||_0x425409&&_0x425409['userId']==_0x480d4e['userId']||(_0x36ae59(_0x425409,kt(_0x4db2cf,_0x3f7e53,_0x444f97),kt(_0x264462[_0x53bff3],_0x3f7e53,_0x444f97)),_0x480d4e=_0x425409||null,_0x4db2cf=_0x425409?_0x264462[_0x53bff3]:null),_0x480d4e&&_0x3d90b9&&_0x36ae59(_0x425409,kt(_0x4db2cf,_0x3f7e53,_0x444f97),At(_0x264462[_0x53bff3],_0x3f7e53,_0x444f97));}function _0x36ae59(_0x26c21f,_0xdbc1fe,_0x1b287f){const _0x4d41a2=_0x480d4e['userId'],_0x460c9a='revision:'+_0x26f254+':'+_0x4d41a2+':'+_0x26fa5c++,_0x56ac3f=_0x444f97['createRange'](_0xdbc1fe,_0x1b287f);_0x3f7e53['markers']['set'](_0x460c9a,_0x56ac3f),null!==_0x4d41a2&&_0x1573df['add'](_0x4d41a2);}}['_getVidAttributeName'](_0x4c7b05){switch(_0x4c7b05['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x50ae65,_0x3d3bff){_0x50ae65['baseVersion']=null;for(const _0x509e15 in _0x50ae65){const _0x187d6f=_0x50ae65[_0x509e15];if(_0x187d6f instanceof _0x4edbcc){const _0x5ca497=_0x3d3bff['get'](_0x187d6f['root']['rootName']);_0x50ae65[_0x509e15]=this['_fixPosition'](_0x187d6f,_0x5ca497);}if(_0x187d6f instanceof _0x330949){const _0x2a0ba0=_0x3d3bff['get'](_0x187d6f['root']['rootName']);_0x50ae65[_0x509e15]=this['_fixRange'](_0x187d6f,_0x2a0ba0);}'root'===_0x509e15&&(_0x50ae65['root']=_0x3d3bff['get'](_0x50ae65['root']['rootName']));}}['_fixRange'](_0x153ab6,_0x3aa42a){return this['editor']['model']['createRange'](this['_fixPosition'](_0x153ab6['start'],_0x3aa42a),this['_fixPosition'](_0x153ab6['end'],_0x3aa42a));}['_fixPosition'](_0xb4c88e,_0x5ec466){return this['editor']['model']['createPositionFromPath'](_0x5ec466,_0xb4c88e['path'],_0xb4c88e['stickiness']);}['_handleInsertOperation'](_0x51e7c1){const _0x246da1=this['_idsRoots']['get'](_0x51e7c1['position']['root']['rootName']),_0x3ed2cf=this['_fixPosition'](_0x51e7c1['position'],_0x246da1),_0x458a52=null===_0x51e7c1['_authorId']?null:_0x51e7c1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53b004=_0x3ed2cf['parent'],_0xf1268e=this['_revisionId'],_0x26af21=[];for(const _0x5b819d of _0x51e7c1['nodes'])if(_0x5b819d['is']('element'))_0x26af21['push'](this['_makeIdsRoot'](_0x5b819d));else{for(let _0x48d043=0x0;_0x48d043<_0x5b819d['offsetSize'];_0x48d043++)_0x26af21['push'](new _0x4d8095('$text',{'vid':this['_revisionId']++}));}const _0x5036f1=this['_revisionId'];for(let _0x68064b=_0xf1268e;_0x68064b<_0x5036f1;_0x68064b++)this['_touched']['set'](_0x68064b,{'userId':_0x458a52});_0x53b004['_insertChild'](_0x3ed2cf['offset'],_0x26af21);}['_handleMoveOperation'](_0x5939ff){(_0x5939ff=this['_cloneOperation'](_0x5939ff,this['_idsRoots']))['_execute']();const _0x491ada=null===_0x5939ff['_authorId']?null:_0x5939ff['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x578407=_0x5939ff['getMovedRangeStart'](),_0x36ad2b=_0x578407['parent'],_0x93befb=_0x578407['offset'];!function _0x392f86(_0x2862b2,_0x531e6d,_0x57b89d,_0x3a4862){for(let _0x317f8c=_0x57b89d;_0x317f8c<_0x3a4862;_0x317f8c++){const _0x50bfca=_0x531e6d['getChild'](_0x317f8c);_0x50bfca['is']('element','$text')?_0x2862b2['set'](_0x50bfca['getAttribute']('vid'),{'userId':_0x491ada}):(_0x2862b2['set'](_0x50bfca['getAttribute']('vid_start'),{'userId':_0x491ada}),_0x392f86(_0x2862b2,_0x50bfca,0x0,_0x50bfca['childCount']),_0x2862b2['set'](_0x50bfca['getAttribute']('vid_end'),{'userId':_0x491ada}));}}(this['_touched'],_0x36ad2b,_0x93befb,_0x93befb+_0x5939ff['howMany']);}['_handleMergeOperation'](_0x42bb50){const _0x5b264e=null===(_0x42bb50=this['_cloneOperation'](_0x42bb50,this['_idsRoots']))['_authorId']?null:_0x42bb50['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x260189=_0x42bb50['targetPosition']['parent'],_0x527644=_0x42bb50['sourcePosition']['parent'],_0x16c828=_0x260189['getAttribute']('vid_end'),_0x2cbbb3=_0x527644['getAttribute']('vid_start');_0x260189['_setAttribute']('vid_end',_0x527644['getAttribute']('vid_end')),_0x527644['_setAttribute']('vid_end',_0x16c828),this['_touched']['set'](_0x2cbbb3,{'userId':_0x5b264e}),this['_touched']['set'](_0x16c828,{'userId':_0x5b264e}),_0x42bb50['_execute']();}['_handleSplitOperation'](_0x2590aa){const _0x19120e=null===(_0x2590aa=this['_cloneOperation'](_0x2590aa,this['_idsRoots']))['_authorId']?null:_0x2590aa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x467131=_0x2590aa['graveyardPosition'],_0x3a4af0=_0x2590aa['splitPosition']['parent'];_0x2590aa['_execute']();const _0x535bc8=_0x3a4af0['getAttribute']('vid_end'),_0xd8a3bb=_0x2590aa['insertionPosition']['nodeAfter'];if(_0x467131){const _0x209b5d=_0xd8a3bb['getAttribute']('vid_end'),_0x42e41d=_0x3a4af0['getAttribute']('vid_end');_0x3a4af0['_setAttribute']('vid_end',_0x209b5d),_0xd8a3bb['_setAttribute']('vid_end',_0x42e41d),this['_touched']['set'](_0x3a4af0['getAttribute']('vid_end'),{'userId':_0x19120e}),this['_touched']['set'](_0xd8a3bb['getAttribute']('vid_start'),{'userId':_0x19120e});}else{const _0x119fda=this['_revisionId']++,_0x3eaeaa=this['_revisionId']++;_0x3a4af0['_setAttribute']('vid_end',_0x119fda),_0xd8a3bb['_setAttribute']('vid_start',_0x3eaeaa),_0xd8a3bb['_setAttribute']('vid_end',_0x535bc8),this['_touched']['set'](_0x119fda,{'userId':_0x19120e}),this['_touched']['set'](_0x3eaeaa,{'userId':_0x19120e});}}['_handleMarkerOperation'](_0x55ca41){if(!_0x55ca41['affectsData'])return;const _0x46c74f=(_0x55ca41=this['_cloneOperation'](_0x55ca41,this['_diffRoots']))['oldRange']?_0x55ca41['oldRange']['root']:null,_0x4e33d4=_0x55ca41['newRange']?_0x55ca41['newRange']['root']:null;_0x46c74f&&this['_markers']['delete'](_0x55ca41['name']),_0x4e33d4&&this['_markers']['set'](_0x55ca41['name'],_0x55ca41['newRange']['clone']());const _0xc3f0cb=null===_0x55ca41['_authorId']?null:_0x55ca41['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x11638f=_0x55ca41['name'];if(!this['_touchedMarkers']['has'](_0x11638f))return void this['_touchedMarkers']['set'](_0x11638f,{'range':_0x55ca41['oldRange'],'userId':_0xc3f0cb});const _0x3b2a72=this['_touchedMarkers']['get'](_0x11638f),_0x413740=_0x3b2a72['range'],_0x5e5e85=_0x55ca41['newRange'];null==_0x413740&&null==_0x5e5e85||_0x413740&&_0x5e5e85&&_0x413740['isEqual'](_0x5e5e85)?this['_touchedMarkers']['delete'](_0x55ca41['name']):_0x3b2a72['userId']=_0xc3f0cb;}['_handleRootOperation'](_0xe7e127,_0x1978c2){this['_diffRoots']['has'](_0xe7e127['rootName'])?this['_diffRoots']['get'](_0xe7e127['rootName'])['_isAttached']=_0xe7e127['isAdd']:(this['_diffRoots']['set'](_0xe7e127['rootName'],Rt(_0xe7e127['rootName'],_0xe7e127['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0xe7e127['rootName'],{}),_0x1978c2&&this['_idsRoots']['set'](_0xe7e127['rootName'],Rt(_0xe7e127['rootName'],_0xe7e127['elementName'],!0x0)));const _0x17e431=null===_0xe7e127['_authorId']?null:_0xe7e127['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x36c9bd=this['_touchedRoots']['get'](_0xe7e127['rootName']);_0x36c9bd&&_0x36c9bd['userId']===_0x17e431?this['_touchedRoots']['delete'](_0xe7e127['rootName']):this['_touchedRoots']['set'](_0xe7e127['rootName'],{'userId':_0x17e431,'isAttached':_0xe7e127['isAdd']});}['_handleRootAttributeOperation'](_0x437d68){const _0x173871=this['_diffRootsAttributes']['get'](_0x437d68['root']['rootName']);null===_0x437d68['newValue']?delete _0x173871[_0x437d68['key']]:_0x173871[_0x437d68['key']]=_0x437d68['newValue'];}};function bt(_0x3d4167){const _0x4dac22=Rt(_0x3d4167['rootName'],_0x3d4167['name'],_0x3d4167['isAttached']());for(const _0x15be9c of _0x3d4167['getChildren']()){const _0x54a0f1=_0x15be9c['_clone'](!0x0);_0x4dac22['_appendChild'](_0x54a0f1);}return _0x4dac22;}function Rt(_0x5f3399,_0x263796,_0x5b4378=!0x0){const _0x3b253d=new _0x37046f();return _0x3b253d['rootName']=_0x5f3399,_0x3b253d['name']=_0x263796,_0x3b253d['_isAttached']=_0x5b4378,_0x3b253d['isAttached']=()=>_0x3b253d['_isAttached'],_0x3b253d;}function kt(_0x3e21f7,_0x521104,_0x1eca36){const _0x2f3bff='elementEnd'==_0x3e21f7['type']?_0x1eca36['createPositionAt'](_0x3e21f7['item'],'end'):_0x1eca36['createPositionBefore'](_0x3e21f7['item']);return _0x1eca36['createPositionFromPath'](_0x521104,_0x2f3bff['path'],_0x2f3bff['stickiness']);}function At(_0x25f174,_0x3a48ce,_0x1629ee){const _0x126b84='elementStart'==_0x25f174['type']?_0x1629ee['createPositionAt'](_0x25f174['item'],0x0):_0x1629ee['createPositionAfter'](_0x25f174['item']);return _0x1629ee['createPositionFromPath'](_0x3a48ce,_0x126b84['path'],_0x126b84['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0xb54c22();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x562ac2){super(),this['id']=_0x562ac2['id']||_0x51cc90(),this['author']=_0x562ac2['author'],this['type']=_0x562ac2['type'],this['data']=_0x562ac2['data']||{},this['rootName']=_0x562ac2['rootName'],this['set']('createdAt',_0x562ac2['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x45c86d,_0x157175){this['newRevisionId']=_0x45c86d,this['oldRevisionId']=_0x157175,this['changes']=new _0x8df329();}['_setChanges'](_0x47bb78){for(const _0x2e667d of _0x47bb78)this['changes']['add'](_0x2e667d);}},Mt=class extends _0x2aa7ef{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xa4ad8,_0x5dd2d7,mt,wt];}constructor(_0x15c442){super(_0x15c442),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x37cd49,_0x3b2092,_0x55f8f3)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2d38f1=>{for(const _0x1939b7 of this['editor']['editing']['view']['document']['roots'])_0x55f8f3?_0x2d38f1['removeClass']('ck-editor__editable__overlay',_0x1939b7):_0x2d38f1['addClass']('ck-editor__editable__overlay',_0x1939b7);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3205bb=>null!==_0x3205bb),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x155c95,_0x184100,_0x5f17f7)=>_0x155c95&&_0x5f17f7?_0x184100['changes']['getIndex'](_0x5f17f7):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x21ba28,_0x44a0d3)=>_0x21ba28?_0x44a0d3['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5dd2d7);}['init'](){const _0x4bfa41=this['editor'],_0x118e3a=new Tt(_0x4bfa41,{'direction':'backward'}),_0x338893=new Tt(_0x4bfa41,{'direction':'forward'});_0x4bfa41['commands']['add']('showPreviousChange',_0x118e3a),_0x4bfa41['commands']['add']('showNextChange',_0x338893),_0x4bfa41['commands']['add']('restoreRevision',new Dt(_0x4bfa41)),this['on']('change:numberOfChanges',()=>{_0x118e3a['refresh'](),_0x338893['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4bfa41['enableReadOnlyMode']('revision-viewer'),_0x4bfa41['plugins']['has']('WidgetToolbarRepository')&&_0x4bfa41['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x453d3e){return await this['_utils']['loadRevisionData'](_0x453d3e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x453d3e);}async['getRevisionRootsAttributes'](_0x20e3c0){return await this['_utils']['loadRevisionData'](_0x20e3c0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x20e3c0);}async['compare'](_0x501b9c,_0x2c655b,_0x1e64e7=!0x1){if(!this['isEnabled'])return;const _0x84043d=this['diff'],_0x58e4fe=this['repository'],_0x40e625='string'==typeof _0x501b9c?_0x58e4fe['getRevision'](_0x501b9c):_0x501b9c,_0x4de1f6='string'==typeof _0x2c655b?_0x58e4fe['getRevision'](_0x2c655b):_0x2c655b,_0xd81c8d=_0x40e625['id'],_0x1e83cb=_0x4de1f6?_0x4de1f6['id']:null;if(!_0x1e64e7&&this['diff']&&this['diff']['newRevisionId']===_0xd81c8d&&this['diff']['oldRevisionId']===_0x1e83cb)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0xd81c8d,_0x1e83cb);const _0x65a3ce=this['_getRevisionsRange'](_0x40e625,_0x4de1f6,!0x0)['map'](_0x1df38e=>this['_utils']['loadRevisionData'](_0x1df38e,this['adapter']));return _0x65a3ce['push'](new Promise(_0xf4c00e=>{setTimeout(_0xf4c00e,0x14);})),Promise['all'](_0x65a3ce)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x123b6c=this['_getDiff'](_0xd81c8d,_0x1e83cb);for(const _0x53fa0d of _0x123b6c['changes'])this['_changeIdToChange']['set'](_0x53fa0d['id'],_0x53fa0d);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2520bc=>{for(const _0x55792b of this['editor']['model']['document']['getRootNames']())_0x2520bc['detachRoot'](_0x55792b);for(const _0xb7e4b4 of Object['keys'](_0x123b6c['model'])){const _0x5593b6=_0x123b6c['model'][_0xb7e4b4]['name'],_0x485f7e=_0x2520bc['addRoot'](_0xb7e4b4,_0x5593b6);for(const _0x14254a of Object['keys'](_0x123b6c['attributes'][_0xb7e4b4]))_0x2520bc['setAttribute'](_0x14254a,_0x123b6c['attributes'][_0xb7e4b4][_0x14254a],_0x485f7e);_0x2520bc['insert'](_0x123b6c['model'][_0xb7e4b4],_0x485f7e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x123b6c['changes'])),this['isReady']=!0x0;})['catch'](_0x5bc212=>{console['error'](_0x5bc212),this['_cleanUp'](),_0x84043d&&(this['diff']=_0x84043d),this['isReady']=!0x0;});}['addRevisionData'](_0x494028,_0x3bfb7c){const _0x5bca7c=this['repository']['createRevision'](_0x494028);return _0x5bca7c['on']('_update',(_0x56719e,_0x52e176,_0x57f842)=>_0x3bfb7c(_0x52e176,_0x57f842,_0x5bca7c)),this['repository']['addRevision'](_0x5bca7c),_0x5bca7c;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x51edd3=>{for(const _0xe30b26 of this['editor']['model']['document']['getRootNames']())_0x51edd3['detachRoot'](_0xe30b26);});}['_sortAndFilterDiffChanges'](_0x30abfc){const _0x50da37=[],_0x239a2b=new Map();for(const _0x295e87 of this['editor']['model']['document']['getRootNames']()){const _0x8b3a16=this['editor']['editing']['view']['getDomRoot'](_0x295e87);if(!_0x8b3a16)continue;const _0x38ef79=_0x8b3a16['getClientRects']()['item'](0x0);_0x38ef79&&(_0x50da37['push'](_0x295e87),_0x239a2b['set'](_0x295e87,_0x38ef79));}return _0x50da37['sort']((_0x3410b2,_0x36586e)=>{const _0x55cd3b=_0x239a2b['get'](_0x3410b2),_0x19903c=_0x239a2b['get'](_0x36586e);return _0x55cd3b['y']-_0x19903c['y']||_0x55cd3b['x']-_0x19903c['x'];}),(_0x30abfc=_0x30abfc['filter'](_0x333ea0=>_0x50da37['includes'](_0x333ea0['rootName'])))['sort']((_0x3718fd,_0x44337f)=>_0x50da37['indexOf'](_0x3718fd['rootName'])-_0x50da37['indexOf'](_0x44337f['rootName'])),_0x30abfc;}['_makeTape'](_0x531cc7){const _0x20810d=Array['from'](_0x531cc7['markers'])['filter'](([_0x2926a7,_0x31ddc7])=>_0x2926a7['startsWith']('revision:')&&!_0x31ddc7['isCollapsed']),_0x238d9b=Array['from'](this['editor']['model']['createRangeIn'](_0x531cc7)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x20810d['length'])for(const _0x173ee9 of _0x238d9b){const [_0x3e723d,_0x5f30d7]=_0x20810d[0x0],[,_0x42fee9,_0x557697]=_0x3e723d['split'](':');if(_0x5f30d7['end']['isEqual'](_0x173ee9['nextPosition'])&&_0x20810d['shift'](),(_0x173ee9['previousPosition']['isEqual'](_0x5f30d7['start'])||_0x173ee9['previousPosition']['isAfter'](_0x5f30d7['start']))&&('insertion'==_0x42fee9?_0x173ee9['isAdded']={'userId':_0x557697}:'deletion'==_0x42fee9&&(_0x173ee9['isRemoved']={'userId':_0x557697})),0x0==_0x20810d['length'])break;}return _0x238d9b;}['_refreshStartEndIndex'](_0x55c7bf){const _0x246c52=new Map();for(let _0x396928=0x0;_0x396928<_0x55c7bf['length'];_0x396928++)'text'===_0x55c7bf[_0x396928]['type']?(_0x55c7bf[_0x396928]['item']['startIndex']=_0x396928,_0x55c7bf[_0x396928]['item']['endIndex']=_0x396928):('elementStart'===_0x55c7bf[_0x396928]['type']?_0x55c7bf[_0x396928]['item']['startIndex']=_0x396928:'elementEnd'===_0x55c7bf[_0x396928]['type']&&(_0x55c7bf[_0x396928]['item']['endIndex']=_0x396928),_0x246c52['set'](_0x55c7bf[_0x396928]['id'],_0x396928));for(const _0x1cf5ec of _0x246c52['values']())'elementStart'===_0x55c7bf[_0x1cf5ec]['type']?_0x55c7bf[_0x1cf5ec]['item']['endIndex']=_0x246c52['get'](_0x55c7bf[_0x1cf5ec]['pairId']):'elementEnd'===_0x55c7bf[_0x1cf5ec]['type']&&(_0x55c7bf[_0x1cf5ec]['item']['startIndex']=_0x246c52['get'](_0x55c7bf[_0x1cf5ec]['pairId']));}['_processTape'](_0x2c3dc7){for(let _0x5732de=0x0;_0x5732de<_0x2c3dc7['length'];_0x5732de++){if('elementStart'===_0x2c3dc7[_0x5732de]['type'])_0x2c3dc7[_0x5732de]['item']['startIndex']=_0x5732de;else{if('elementEnd'===_0x2c3dc7[_0x5732de]['type']){_0x2c3dc7[_0x5732de]['item']['endIndex']=_0x5732de;const _0x2a2cd8=_0x2c3dc7[_0x5732de]['item']['startIndex'];_0x2c3dc7[_0x2a2cd8]['pairId']=_0x2c3dc7[_0x5732de]['id'],_0x2c3dc7[_0x5732de]['pairId']=_0x2c3dc7[_0x2a2cd8]['id'];}else _0x2c3dc7[_0x5732de]['item']['startIndex']=_0x5732de,_0x2c3dc7[_0x5732de]['item']['endIndex']=_0x5732de,_0x2c3dc7[_0x5732de]['pairId']=null;}_0x2c3dc7[_0x5732de]['markersStart']||(_0x2c3dc7[_0x5732de]['markersStart']=[],_0x2c3dc7[_0x5732de]['markersEnd']=[]);}}['_markInsertions'](_0x401ae4,_0x41c1ec){const _0x1f3ee4=_0x401ae4['filter'](_0x2b1bf6=>!_0x2b1bf6['isAdded']);for(let _0x727cd3=0x0;_0x727cd3<_0x41c1ec['length'];_0x727cd3++)_0x41c1ec[_0x727cd3]['isAdded']&&(_0x1f3ee4[_0x727cd3]['isAdded']=_0x41c1ec[_0x727cd3]['isAdded']);}['_getDiff'](_0xa7364f,_0x229df7=null){const _0x166f05=this['repository']['getRevision'](_0xa7364f),_0x33f799=_0x229df7?this['repository']['getRevision'](_0x229df7):null,_0x5e73d0=this['_getRevisionsRange'](_0x166f05,_0x33f799),_0x15f70e=_0x5e73d0[_0x5e73d0['length']-0x1],_0x460df8=new Map(),_0x36d8ea={'model':{},'attributes':{},'changes':[]},_0x20b2fa=new Set(),_0x3d4af4=new Map();for(let _0x5ae0a1=_0x5e73d0['length']-0x1;_0x5ae0a1>=0x0;_0x5ae0a1--){const _0x22e683=_0x5e73d0[_0x5ae0a1];for(const _0x40ccf3 of Object['keys'](_0x22e683['diffData']))if(_0x22e683['diffData'][_0x40ccf3]['attachChange']){const _0x42148d=_0x22e683['diffData'][_0x40ccf3]['attachChange'];_0x42148d['isAttached']?(_0x20b2fa['add'](_0x40ccf3),_0x3d4af4['has'](_0x40ccf3)&&_0x3d4af4['get'](_0x40ccf3)['userId']==_0x42148d['userId']?_0x3d4af4['delete'](_0x40ccf3):_0x3d4af4['set'](_0x40ccf3,_0x42148d)):_0x3d4af4['has'](_0x40ccf3)?(_0x20b2fa['delete'](_0x40ccf3),_0x3d4af4['delete'](_0x40ccf3)):(_0x20b2fa['add'](_0x40ccf3),_0x3d4af4['set'](_0x40ccf3,_0x42148d));}else _0x20b2fa['add'](_0x40ccf3);}for(const _0x7a4cbb of _0x20b2fa){const _0x36f10a=_0x3d4af4['has'](_0x7a4cbb)&&!_0x3d4af4['get'](_0x7a4cbb)['isAttached'];let _0x469045=_0x36f10a?_0x5e73d0['length']-0x1:0x0;const _0x312525=_0x36f10a?-0x1:0x1;for(;_0x5e73d0[_0x469045];){const _0x2c7132=_0x5e73d0[_0x469045];if(_0x2c7132['diffData'][_0x7a4cbb]){const _0x4f8d32=_0x36f10a?_0x2c7132['diffData'][_0x7a4cbb]['attributesBefore']:_0x2c7132['diffData'][_0x7a4cbb]['attributesAfter'];_0x36d8ea['attributes'][_0x7a4cbb]=_0x4f8d32?_0x1bdc24(_0x4f8d32):{};break;}_0x469045+=_0x312525;}}for(const _0x3edbfe of _0x5e73d0){_0x3edbfe['model']={};for(const _0x1c3706 of _0x3edbfe['authors'])_0x460df8['set'](_0x1c3706['id'],_0x1c3706);for(const _0xff27f4 of _0x20b2fa){const _0x5c2144=_0x3edbfe['diffData'][_0xff27f4]?_0x3edbfe['diffData'][_0xff27f4]['insertions']:'[]',_0x113d5f=_0x3edbfe['diffData'][_0xff27f4]?_0x3edbfe['diffData'][_0xff27f4]['deletions']:'[]',_0x1ebe3e=_0x3edbfe['diffData'][_0xff27f4]?.['rootElementName']||'$root';_0x3edbfe['model'][_0xff27f4]={'insertions':this['_utils']['_makeModelFromViewString'](_0x5c2144,_0x1ebe3e),'deletions':this['_utils']['_makeModelFromViewString'](_0x113d5f,_0x1ebe3e)};}}for(const _0x1f0a3c of _0x20b2fa){let _0x321754=null,_0x306942=0x0;const _0x2cfe75=_0x5e73d0['map'](_0x1359c5=>_0x1359c5['diffData'][_0x1f0a3c]?.['rootElementName'])['find'](_0x5db859=>void 0x0!==_0x5db859)||'$root',_0x5b1e85=new Map(Array['from'](_0x166f05['model'][_0x1f0a3c]['insertions']['markers'])['filter'](([_0x5b3ceb])=>!_0x5b3ceb['startsWith']('revision:')));let _0x53237d=0x0;for(const _0x463516 of _0x5e73d0){const _0x425293=this['_makeTape'](_0x463516['model'][_0x1f0a3c]['insertions']);_0x463516==_0x166f05?(_0x321754=_0x425293,_0x306942=_0x321754['length'],_0x321754['forEach'](_0x6c598b=>{_0x6c598b['id']=_0x53237d++;}),this['_processTape'](_0x321754)):this['_markInsertions'](_0x321754,_0x425293);const _0x558cd7=_0x321754['filter'](_0x53b9cd=>!_0x53b9cd['isAdded'])['map'](_0x2ea3e9=>_0x2ea3e9['id']);let _0x382274=0x0;const _0x2ece81=this['_makeTape'](_0x463516['model'][_0x1f0a3c]['deletions']);_0x2ece81['forEach'](_0x564892=>{_0x564892['isRemoved']?_0x564892['id']=_0x306942++:_0x564892['id']=_0x558cd7[_0x382274++];}),this['_processTape'](_0x2ece81),this['_setDistance'](_0x321754,'isAdded'),this['_setDistance'](_0x2ece81,'isRemoved'),_0x463516==_0x166f05&&this['_markMarkers'](_0x321754,_0x5b1e85),_0x321754=this['_joinTapes'](_0x321754,_0x2ece81),this['_refreshStartEndIndex'](_0x321754),this['_setDistance'](_0x321754,'isRemoved');}_0x321754=_0x321754['filter'](_0x4df40c=>!(_0x4df40c['isAdded']&&_0x4df40c['isRemoved']));const _0x198a20=new Map(_0x15f70e['model'][_0x1f0a3c]['deletions']['markers']),_0xe73e94=new Set(_0x5b1e85['keys']());for(const _0xe78353 of _0x198a20['keys']())_0xe73e94['delete'](_0xe78353);this['_markSuggestions'](_0x321754,_0xe73e94),this['_fixObsoleteTags'](_0x321754),_0x321754=this['_removeMissingPairs'](_0x321754),_0x321754=this['_markMismatchedRemovedTags'](_0x321754),_0x321754=this['_removeUnsupportedChanges'](_0x321754);const {root:_0x212caa,changes:_0x2f22de}=this['_makeModelFromTape'](_0x321754,_0x460df8,_0x1f0a3c,_0x2cfe75);_0x36d8ea['model'][_0x1f0a3c]=_0x212caa;const _0x4097e1=_0x3d4af4['get'](_0x1f0a3c);if(_0x4097e1){const _0x36a84e=new Ot({'author':_0x460df8['get'](_0x4097e1['userId']),'type':_0x4097e1['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x1f0a3c});_0x2f22de['unshift'](_0x36a84e),_0x36d8ea['attributes'][_0x1f0a3c]['revisionHistoryAttachChange']=_0x36a84e['id'];}_0x36d8ea['changes']=_0x36d8ea['changes']['concat'](_0x2f22de);}return _0x36d8ea;}['_markMarkers'](_0x3b8e30,_0x117847){for(let _0x13708a=0x0;_0x13708a<_0x3b8e30['length'];_0x13708a++)for(const [_0x2a11e5,_0x1f13c9]of _0x117847)!_0x1f13c9['isCollapsed']&&_0x1f13c9['start']['isEqual'](_0x3b8e30[_0x13708a]['previousPosition'])&&_0x3b8e30[_0x13708a]['markersStart']['push'](_0x2a11e5),_0x1f13c9['end']['isEqual'](_0x3b8e30[_0x13708a]['nextPosition'])&&_0x3b8e30[_0x13708a]['markersEnd']['push'](_0x2a11e5);}['_joinTapes'](_0x2bcb1e,_0x195935){let _0x5a6db5=[],_0x4665f8=0x0,_0x3d0187=0x0;for(;_0x4665f8<_0x2bcb1e['length']||_0x3d0187<_0x195935['length'];){const _0x28ec76=_0x2bcb1e[_0x4665f8]||{},_0x12b175=_0x195935[_0x3d0187]||{};if(_0x28ec76['id']==_0x12b175['id'])_0x4665f8++,_0x3d0187++,_0x5a6db5['push'](_0x28ec76);else{if(_0x12b175['isRemoved']&&_0x28ec76['isAdded']){const {commonTape:_0x5adab8,iEnd:_0x4de979,jEnd:_0x19570e}=this['_threeWayMerge'](_0x2bcb1e,_0x4665f8,_0x195935,_0x3d0187);_0x5a6db5=_0x5a6db5['concat'](_0x5adab8),_0x4665f8=_0x4de979,_0x3d0187=_0x19570e;}else _0x12b175['isRemoved']?(_0x3d0187++,_0x5a6db5['push'](_0x12b175)):(_0x4665f8++,_0x5a6db5['push'](_0x28ec76));}}return _0x5a6db5;}['_markSuggestions'](_0xb05637,_0xcaed5c){const _0xa4d7c8=[];for(let _0x1e4030=0x0;_0x1e4030<_0xb05637['length'];_0x1e4030++){for(let _0x3ea138=0x0;_0x3ea138<_0xb05637[_0x1e4030]['markersStart']['length'];_0x3ea138++){const _0x5d5729=_0xb05637[_0x1e4030]['markersStart'][_0x3ea138];if(!_0xcaed5c['has'](_0x5d5729))continue;const {group:_0x44e1d4,type:_0x539f3e,authorId:_0x2a595b}=_0x29bc92(_0x5d5729);'revision-suggestion'!=_0x44e1d4||'insertion'!=_0x539f3e&&'deletion'!=_0x539f3e||(_0xa4d7c8['unshift']({'type':_0x539f3e,'name':_0x5d5729,'userId':_0x2a595b}),_0xb05637[_0x1e4030]['markersStart']['splice'](_0x3ea138,0x1),_0x3ea138--);}_0x2b3bc9(_0xb05637[_0x1e4030]);for(let _0x459172=0x0;_0x459172<_0xb05637[_0x1e4030]['markersEnd']['length'];_0x459172++){const _0x1d0cd4=_0xb05637[_0x1e4030]['markersEnd'][_0x459172];if(!_0xcaed5c['has'](_0x1d0cd4))continue;const {group:_0x9a6872,type:_0xbf2bd1}=_0x29bc92(_0x1d0cd4);if('revision-suggestion'!=_0x9a6872||'insertion'!=_0xbf2bd1&&'deletion'!=_0xbf2bd1)continue;_0xb05637[_0x1e4030]['markersEnd']['splice'](_0x459172,0x1),_0x459172--;const _0x1c8c38=_0xa4d7c8['findIndex'](_0x54beac=>_0x54beac['name']==_0x1d0cd4);_0x1c8c38>-0x1&&_0xa4d7c8['splice'](_0x1c8c38,0x1);}}function _0x29bc92(_0x118c38){const _0x3733ec=_0x118c38['split'](':');return{'group':_0x3733ec[0x0],'type':_0x3733ec[0x1],'subType':_0x3733ec['length']>=0x5?_0x3733ec[0x2]:null,'id':_0x3733ec['length']<0x5?_0x3733ec[0x2]:_0x3733ec[0x3],'authorId':_0x3733ec['length']<0x5?_0x3733ec[0x3]:_0x3733ec[0x4],'markerCount':0x6==_0x3733ec['length']?_0x3733ec[0x5]:null};}function _0x2b3bc9(_0x2269b4){for(let _0x15bd92=0x0;_0x15bd92<_0xa4d7c8['length'];_0x15bd92++){if(_0x2269b4['isAdded']&&'insertion'==_0xa4d7c8[_0x15bd92]['type']&&_0x2269b4['isAdded']['userId']==_0xa4d7c8[_0x15bd92]['userId'])return _0x2269b4['isAddSuggestion']=_0xa4d7c8[_0x15bd92],void delete _0x2269b4['isAdded'];if(!_0x2269b4['isAdded']&&!_0x2269b4['isRemoved']&&'deletion'==_0xa4d7c8[_0x15bd92]['type'])return void(_0x2269b4['isRemoveSuggestion']=_0xa4d7c8[_0x15bd92]);}}}['_setDistance'](_0x16f55a,_0x2ccd78){let _0x6b6634=0x0,_0x78debb=!0x1;const _0x3e6e3=new Map();for(const _0x190737 of _0x16f55a)_0x190737[_0x2ccd78]?_0x78debb&&(_0x6b6634++,_0x78debb=!0x1):(_0x6b6634++,_0x78debb=!0x0),_0x3e6e3['set'](_0x190737['id'],_0x6b6634);for(let _0x8873ea=0x0;_0x8873ea<_0x16f55a['length'];_0x8873ea++){if('isRemoved'==_0x2ccd78&&_0x16f55a[_0x8873ea]['isAdded']||'isAdded'==_0x2ccd78&&_0x16f55a[_0x8873ea]['isRemoved'])continue;if('text'==_0x16f55a[_0x8873ea]['type']){_0x16f55a[_0x8873ea]['distance']=0x0;continue;}const _0x11b24e=_0x3e6e3['get'](_0x16f55a[_0x8873ea]['pairId']),_0x41abc6=_0x3e6e3['get'](_0x16f55a[_0x8873ea]['id']);_0x16f55a[_0x8873ea]['distance']=_0x11b24e-_0x41abc6;}}['_getRevisionsRange'](_0x1e12b9,_0x46507f,_0x1f76b6=!0x1){const _0x338936=[];let _0x4aba69=this['repository']['getIndex'](_0x1e12b9),_0x4ef422=this['repository']['getIndex'](_0x46507f);for(-0x1==_0x4ef422&&(_0x4ef422=this['repository']['_revisions']['length'],_0x1f76b6=!0x1);_0x4aba69<_0x4ef422;)_0x338936['push'](this['repository']['getRevision'](_0x4aba69)),_0x4aba69++;return _0x1f76b6&&_0x338936['push'](this['repository']['getRevision'](_0x4aba69)),_0x338936;}['_threeWayMerge'](_0x59749b,_0x5bfbab,_0x7afaf8,_0x5f4ba4){const _0x35476a=this['editor']['model']['schema'];let _0x41b99e=_0x5bfbab;for(;_0x59749b[_0x41b99e]&&_0x59749b[_0x41b99e]['isAdded'];)_0x41b99e++;let _0x5b196e=_0x5f4ba4;for(;_0x7afaf8[_0x5b196e]&&_0x7afaf8[_0x5b196e]['isRemoved'];)_0x5b196e++;_0x31ed01(_0x59749b,_0x5bfbab,_0x41b99e),_0x31ed01(_0x7afaf8,_0x5f4ba4,_0x5b196e);const _0x40e281=_0x7afaf8['slice'](_0x5f4ba4,_0x5b196e)['concat'](_0x59749b['slice'](_0x5bfbab,_0x41b99e));return _0x40e281['sort']((_0x2453e4,_0x34c3c4)=>_0x2453e4['side']!=_0x34c3c4['side']?_0x2453e4['side']-_0x34c3c4['side']:_0x2453e4['level']!=_0x34c3c4['level']?_0x2453e4['level']-_0x34c3c4['level']:_0x2453e4['distance']!=_0x34c3c4['distance']?_0x34c3c4['distance']-_0x2453e4['distance']:!!_0x2453e4['isAdded']!=!!_0x34c3c4['isAdded']?-0x1==_0x2453e4['side']||0x0==_0x2453e4['side']?_0x2453e4['isAdded']?-0x1:0x1:_0x2453e4['isAdded']?0x1:-0x1:_0x2453e4['index']-_0x34c3c4['index']),{'commonTape':_0x40e281,'iEnd':_0x41b99e,'jEnd':_0x5b196e};function _0x31ed01(_0x3e824c,_0x45c061,_0x57cd98){let _0x11d418=-0x1,_0x32c56b=Number['POSITIVE_INFINITY'],_0x49afc6=!0x0;for(let _0x1d7938=_0x45c061;_0x1d7938<_0x57cd98;_0x1d7938++)if(_0x35476a['isInline'](_0x3e824c[_0x1d7938]['item'])||(_0x49afc6=!0x1),_0x3e824c[_0x1d7938]['item']['startIndex']<_0x45c061&&(_0x11d418=_0x1d7938),_0x3e824c[_0x1d7938]['item']['endIndex']>=_0x57cd98){_0x32c56b=_0x1d7938;break;}_0x49afc6&&(_0x11d418=_0x57cd98-0x1);for(let _0x55994c=_0x45c061;_0x55994c<_0x57cd98;_0x55994c++)_0x3e824c[_0x55994c]['side']=_0x55994c<=_0x11d418?-0x1:_0x55994c<_0x32c56b?0x0:0x1,_0x3e824c[_0x55994c]['index']=_0x55994c;let _0x3f2e0e=0x0;for(let _0x201d93=_0x45c061;_0x201d93<=_0x11d418;_0x201d93++)0x0==_0x3e824c[_0x201d93]['distance']?_0x3e824c[_0x201d93]['level']=_0x3f2e0e:(_0x3f2e0e++,_0x3e824c[_0x201d93]['level']=_0x3f2e0e,_0x3f2e0e++);for(let _0x2f5de1=_0x45c061;_0x2f5de1<_0x57cd98;_0x2f5de1++)0x0==_0x3e824c[_0x2f5de1]['side']&&(_0x3e824c[_0x2f5de1]['level']=_0x3f2e0e);_0x3f2e0e=0x0;for(let _0x3b73f3=_0x57cd98-0x1;_0x3b73f3>=_0x32c56b;_0x3b73f3--)0x0==_0x3e824c[_0x3b73f3]['distance']?_0x3e824c[_0x3b73f3]['level']=_0x3f2e0e:(_0x3f2e0e--,_0x3e824c[_0x3b73f3]['level']=_0x3f2e0e,_0x3f2e0e--);}}['_fixObsoleteTags'](_0x172dc6){const _0x14e050=new Map(),_0x4b8394=this['editor']['model']['schema'];for(let _0x2d935a=0x1;_0x2d935a<_0x172dc6['length'];_0x2d935a++){let _0x5d4839,_0x46c3c7,_0x4b6517;const _0x583e9f=_0x172dc6[_0x2d935a],_0x281da8=_0x172dc6[_0x2d935a-0x1];if('text'==_0x583e9f['type'])continue;if(_0x583e9f['type']!=_0x281da8['type'])continue;if(!_0x4b8394['isBlock'](_0x281da8['item'])||_0x4b8394['isLimit'](_0x281da8['item']))continue;if(!_0x4b8394['isBlock'](_0x583e9f['item'])||_0x4b8394['isLimit'](_0x583e9f['item']))continue;if((_0x172dc6[_0x2d935a]['isAdded']||_0x172dc6[_0x2d935a]['isAddSuggestion'])&&_0x172dc6[_0x2d935a-0x1]['isRemoved'])_0x5d4839=_0x172dc6[_0x2d935a],_0x46c3c7=_0x172dc6[_0x2d935a-0x1],_0x4b6517=_0x2d935a-0x1;else{if(!_0x172dc6[_0x2d935a]['isRemoved']||!_0x172dc6[_0x2d935a-0x1]['isAdded']&&!_0x172dc6[_0x2d935a-0x1]['isAddSuggestion'])continue;_0x5d4839=_0x172dc6[_0x2d935a-0x1],_0x46c3c7=_0x172dc6[_0x2d935a],_0x4b6517=_0x2d935a;}const _0x513da4=_0x5d4839['level']==_0x46c3c7['level'],_0x38bba3=Math['abs'](_0x5d4839['level'])<Math['abs'](_0x46c3c7['level'])&&0x0==_0x46c3c7['distance'];(_0x513da4||_0x38bba3)&&(_0x14e050['set'](_0x46c3c7['id'],_0x5d4839['id']),_0x172dc6['splice'](_0x4b6517,0x1),_0x2d935a--,_0x5d4839['isAdded']=!0x1);}for(let _0x43f67f=0x0;_0x43f67f<_0x172dc6['length'];_0x43f67f++)_0x14e050['has'](_0x172dc6[_0x43f67f]['pairId'])&&(_0x172dc6[_0x43f67f]['pairId']=_0x14e050['get'](_0x172dc6[_0x43f67f]['pairId']));}['_removeMissingPairs'](_0x337a14){const _0x2e35f1=new Set(_0x337a14['map'](_0x1b1e05=>_0x1b1e05['id']));for(let _0x27f421=0x0;_0x27f421<_0x337a14['length'];_0x27f421++)_0x2e35f1['has'](_0x337a14[_0x27f421]['pairId'])||0x0==_0x337a14[_0x27f421]['distance']||(_0x337a14[_0x27f421]['isIncorrect']=!0x0);return _0x337a14['filter'](_0x3a408b=>!_0x3a408b['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1de260){const _0x4772ba=new Set();for(let _0x1ca504=0x0;_0x1ca504<_0x1de260['length'];_0x1ca504++){if(_0x4772ba['has'](_0x1de260[_0x1ca504]['id'])&&_0x1de260[_0x1ca504]['isRemoved']&&(_0x1de260[_0x1ca504]['isIncorrect']=!0x0),_0x1de260[_0x1ca504]['isIncorrect'])continue;if(0x0==_0x1de260[_0x1ca504]['distance'])continue;if('elementStart'!=_0x1de260[_0x1ca504]['type'])continue;if(null==_0x1de260[_0x1ca504]['pairId'])continue;let _0x378525=_0x1ca504+0x1,_0x367660=0x0;for(;_0x1de260[_0x378525]['id']!=_0x1de260[_0x1ca504]['pairId'];)'elementStart'==_0x1de260[_0x378525]['type']?_0x367660++:'elementEnd'==_0x1de260[_0x378525]['type']&&_0x367660--,_0x378525++;if(0x0!=_0x367660){if(_0x1de260[_0x1ca504]['isRemoved'])_0x1de260[_0x1ca504]['isIncorrect']=!0x0;else{for(;_0x378525!=_0x1ca504;)_0x1de260[_0x378525]['isRemoved']&&0x0!=_0x1de260[_0x378525]['distance']&&(_0x1de260[_0x378525]['isIncorrect']=!0x0,_0x4772ba['add'](_0x1de260[_0x378525]['pairId'])),_0x378525--;}}}return _0x1de260['filter'](_0x317831=>!_0x317831['isIncorrect']);}['_removeUnsupportedChanges'](_0x326b25){const _0x5f1c7c=this['editor']['model']['schema'];for(let _0x52cc16=0x0;_0x52cc16<_0x326b25['length'];_0x52cc16++){if(!(_0x326b25[_0x52cc16]['isAdded']||_0x326b25[_0x52cc16]['isAddSuggestion']||_0x326b25[_0x52cc16]['isRemoved']||_0x326b25[_0x52cc16]['isRemoveSuggestion']))continue;if(0x0==_0x326b25[_0x52cc16]['distance'])continue;const _0x3600b0=_0x326b25[_0x52cc16]['item'];_0x5f1c7c['isBlock'](_0x3600b0)||_0x5f1c7c['isLimit'](_0x3600b0)||(_0x326b25[_0x52cc16]['isAdded']&&delete _0x326b25[_0x52cc16]['isAdded'],_0x326b25[_0x52cc16]['isAddSuggestion']&&delete _0x326b25[_0x52cc16]['isAddSuggestion'],_0x326b25[_0x52cc16]['isRemoveSuggestion']&&delete _0x326b25[_0x52cc16]['isRemoveSuggestion'],_0x326b25[_0x52cc16]['isRemoved']&&(_0x326b25[_0x52cc16]['isIncorrect']=!0x0));}return _0x326b25['filter'](_0x50b94e=>!_0x50b94e['isIncorrect']);}['_makeModelFromTape'](_0x3e43c0,_0x5da16f,_0x1b65b5,_0x1fb371){const _0x4f8ad8=new _0x37046f(),_0x2adf0f=[],_0x3742f6=new Map(),_0x530708=this['editor']['model'],_0x18f148=_0x530708['schema'],_0x4fd3c1=[_0x4f8ad8],_0x5f1926={},_0x2f5232={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x4f8ad8['name']=_0x1fb371;let _0x5cacbb=null;const _0x446231=[0x0];for(let _0x5a54f3=0x0;_0x5a54f3<_0x3e43c0['length'];_0x5a54f3++)if('elementStart'===_0x3e43c0[_0x5a54f3]['type']){_0x3e43c0[_0x5a54f3]['previousPosition']=_0x530708['createPositionFromPath'](_0x4f8ad8,_0x446231);const _0x11ccd0=new _0x4d8095(_0x3e43c0[_0x5a54f3]['item']['name'],_0x3e43c0[_0x5a54f3]['item']['getAttributes']());_0x4fd3c1[0x0]['_appendChild'](_0x11ccd0),_0x446231['push'](0x0),_0x4fd3c1['unshift'](_0x11ccd0),_0x3e43c0[_0x5a54f3]['nextPosition']=_0x530708['createPositionFromPath'](_0x4f8ad8,_0x446231);}else'elementEnd'===_0x3e43c0[_0x5a54f3]['type']?(_0x4fd3c1['shift'](),_0x3e43c0[_0x5a54f3]['previousPosition']=_0x530708['createPositionFromPath'](_0x4f8ad8,_0x446231),_0x446231['pop'](),_0x446231[_0x446231['length']-0x1]++,_0x3e43c0[_0x5a54f3]['nextPosition']=_0x530708['createPositionFromPath'](_0x4f8ad8,_0x446231)):(_0x3e43c0[_0x5a54f3]['previousPosition']=_0x530708['createPositionFromPath'](_0x4f8ad8,_0x446231),_0x5cacbb?_0x5cacbb['_data']+=_0x3e43c0[_0x5a54f3]['item']['data']:_0x5cacbb=new _0x4c4549(_0x3e43c0[_0x5a54f3]['item']['data'],_0x3e43c0[_0x5a54f3]['item']['getAttributes']()),_0x3e43c0[_0x5a54f3+0x1]&&'text'===_0x3e43c0[_0x5a54f3+0x1]['type']&&_0x39f87e(_0x5cacbb,_0x3e43c0[_0x5a54f3+0x1]['item'])||(_0x4fd3c1[0x0]['_appendChild'](_0x5cacbb),_0x5cacbb=null),_0x446231[_0x446231['length']-0x1]+=_0x3e43c0[_0x5a54f3]['item']['offsetSize'],_0x3e43c0[_0x5a54f3]['nextPosition']=_0x530708['createPositionFromPath'](_0x4f8ad8,_0x446231));for(let _0x1dad76=0x0;_0x1dad76<_0x3e43c0['length'];_0x1dad76++){const _0x484236=_0x3e43c0[_0x1dad76]['previousPosition'],_0x3ea8bc=_0x3e43c0[_0x1dad76]['nextPosition'];for(const _0x4f0d64 of _0x3e43c0[_0x1dad76]['markersStart'])_0x3742f6['set'](_0x4f0d64,{'start':_0x484236,'end':null});_0x4c59a2('isRemoveSuggestion',_0x1dad76,_0x484236,_0x3ea8bc),_0x4c59a2('isAddSuggestion',_0x1dad76,_0x484236,_0x3ea8bc),_0x4c59a2('isRemoved',_0x1dad76,_0x484236,_0x3ea8bc),_0x4c59a2('isAdded',_0x1dad76,_0x484236,_0x3ea8bc);for(const _0x3dbb57 of _0x3e43c0[_0x1dad76]['markersEnd']){const _0x282d77=_0x3742f6['get'](_0x3dbb57);_0x282d77?_0x282d77['end']=_0x3ea8bc:_0x3742f6['set'](_0x3dbb57,{'start':_0x3ea8bc,'end':_0x3ea8bc});}}for(const [_0x54c6c1,_0x58f0fc]of _0x3742f6){const _0x35b334=this['editor']['model']['createRange'](_0x58f0fc['start'],_0x58f0fc['end']);_0x4f8ad8['markers']['set'](_0x54c6c1,_0x35b334);}return _0x2adf0f['sort']((_0x3c69ec,_0x37a2cd)=>{const _0x37fa5d=_0x4f8ad8['markers']['get']('revision:'+_0x3c69ec['id']),_0x30a5c4=_0x4f8ad8['markers']['get']('revision:'+_0x37a2cd['id']);return _0x37fa5d['start']['isBefore'](_0x30a5c4['start'])?-0x1:_0x37fa5d['start']['isAfter'](_0x30a5c4['start'])?0x1:_0x37fa5d['end']['isBefore'](_0x30a5c4['end'])?-0x1:_0x37fa5d['end']['isAfter'](_0x30a5c4['end'])?0x1:'add'===_0x3c69ec['type']?-0x1:0x1;}),{'root':_0x4f8ad8,'changes':_0x2adf0f};function _0x4c59a2(_0x2ba7a0,_0x469901,_0x586c24,_0x50d5b0){const _0x294989=!!_0x3e43c0[_0x469901][_0x2ba7a0],_0x44589a=_0x294989?_0x3e43c0[_0x469901][_0x2ba7a0]['userId']:null,_0x3a1bde=_0x469901===_0x3e43c0['length']-0x1,_0x3280e1=_0x2f5232[_0x2ba7a0][0x0],_0x5feec0=_0x18f148['isObject'](_0x3e43c0[_0x469901]['item']);!_0x5f1926[_0x2ba7a0]&&_0x294989?_0x5f1926[_0x2ba7a0]={'start':_0x586c24,'tapeItem':_0x3e43c0[_0x469901],'userId':_0x44589a,'type':_0x2ba7a0}:_0x5f1926[_0x2ba7a0]&&!_0x294989?(_0x5f1926[_0x2ba7a0]['end']=_0x586c24,_0x3ea444(_0x5f1926[_0x2ba7a0]),_0x5f1926[_0x2ba7a0]=null):_0x5f1926[_0x2ba7a0]&&_0x294989&&_0x5f1926[_0x2ba7a0]['userId']!==_0x44589a&&(_0x5f1926[_0x2ba7a0]['end']=_0x586c24,_0x3280e1&&_0x3280e1['userId']===_0x5f1926[_0x2ba7a0]['userId']||_0x3ea444(_0x5f1926[_0x2ba7a0]),_0x5f1926[_0x2ba7a0]={'start':_0x586c24,'tapeItem':_0x3e43c0[_0x469901],'userId':_0x44589a,'type':_0x2ba7a0}),_0x5f1926[_0x2ba7a0]&&_0x5feec0&&('elementStart'!==_0x3e43c0[_0x469901]['type']||_0x3280e1&&_0x3280e1['userId']===_0x44589a||_0x2f5232[_0x2ba7a0]['unshift']({'userId':_0x44589a,'object':_0x3e43c0[_0x469901]['item'],'change':_0x5f1926[_0x2ba7a0]}),'elementEnd'===_0x3e43c0[_0x469901]['type']&&_0x3280e1&&_0x3280e1['object']===_0x3e43c0[_0x469901]['item']&&(_0x2f5232[_0x2ba7a0]['shift'](),_0x5f1926[_0x2ba7a0]=_0x3280e1['change'])),_0x5f1926[_0x2ba7a0]&&_0x3a1bde&&(_0x5f1926[_0x2ba7a0]['end']=_0x50d5b0,_0x3ea444(_0x5f1926[_0x2ba7a0]),_0x5f1926[_0x2ba7a0]=null);}function _0x3ea444({start:_0x98d5d,end:_0x1e23b7,tapeItem:_0xc38cfb,userId:_0x17b896,type:_0x797ee1}){const _0x39908d=_0xc38cfb['item'],_0x27eda7=_0x530708['schema']['isBlock'](_0x39908d)&&!_0x530708['schema']['isLimit'](_0x39908d),_0x3d3049=_0x98d5d['nodeAfter']==_0x1e23b7['parent']&&_0x1e23b7['isAtStart'];if(_0x27eda7&&_0x3d3049)return;const _0x5c7a30=_0x530708['createRange'](_0x98d5d,_0x1e23b7),_0x44aad7=new Ot({'author':_0x5da16f['get'](_0x17b896),'type':'isAdded'==_0x797ee1||'isAddSuggestion'==_0x797ee1?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x797ee1||'isRemoveSuggestion'==_0x797ee1},'createdAt':new Date(),'rootName':_0x1b65b5});_0x2adf0f['push'](_0x44aad7),_0x4f8ad8['markers']['set']('revision:'+_0x44aad7['id'],_0x5c7a30);}function _0x39f87e(_0xa00a86,_0x5d3367){const _0x218792=_0xa00a86['getAttributes'](),_0x31fd44=_0x5d3367['getAttributes']();for(const _0x301e66 of _0x218792){if(_0x301e66[0x1]!==_0x5d3367['getAttribute'](_0x301e66[0x0]))return!0x1;_0x31fd44['next']();}return _0x31fd44['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x2fc7e4=>{const _0x44e55a=_0x2fc7e4['markerName']['split'](':')[0x1],_0x5d8095=this['_getChangeFromId'](_0x44e55a);if(!_0x5d8095)return null;const _0x38d84c='add'==_0x5d8095['type']?'insertion':'deletion',_0x3c6eca=['ck-suggestion-marker','ck-suggestion-marker-'+_0x38d84c];return _0x5d8095['data']['isSuggestion']&&_0x3c6eca['push']('ck-suggestion-marker-'+_0x38d84c+'-new'),this['activeChange']==_0x5d8095&&_0x3c6eca['push']('ck-suggestion-marker--active'),{'classes':_0x3c6eca,'attributes':{'data-change-id':_0x44e55a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x355596=>{_0x355596['on']('element:pre',(_0x5415a5,_0x12efb1,_0x268230)=>{const _0x1c3662=_0x12efb1['viewItem']['getChild'](0x0);if(!_0x1c3662||!_0x1c3662['is']('element','code'))return;if(!_0x268230['consumable']['consume'](_0x1c3662,{'attributes':['vid_start','vid_end']}))return;const _0x3588b9=_0x12efb1['modelRange']['start']['nodeAfter'];_0x268230['writer']['setAttribute']('vid_start',_0x1c3662['getAttribute']('vid_start'),_0x3588b9),_0x268230['writer']['setAttribute']('vid_end',_0x1c3662['getAttribute']('vid_end'),_0x3588b9);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1a39c7=>{_0x1a39c7['on']('element',(_0x34b8e7,_0x3caf13,_0x4a1778)=>{if(!_0x4a1778['consumable']['consume'](_0x3caf13['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3caf13['modelRange']['isCollapsed'])return;const _0x414cd8=_0x3caf13['modelRange']['start']['nodeAfter'];_0x414cd8['hasAttribute']('vid_start')||_0x414cd8['hasAttribute']('vid')||(_0x4a1778['writer']['setAttribute']('vid_start',_0x3caf13['viewItem']['getAttribute']('vid_start'),_0x414cd8),_0x4a1778['writer']['setAttribute']('vid_end',_0x3caf13['viewItem']['getAttribute']('vid_end'),_0x414cd8));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x16aefb=>_0x16aefb['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x5af16f,[,_0x528ff3])=>{['vid_start','vid_end','vid']['includes'](_0x528ff3)&&(_0x5af16f['return']=!0x0,_0x5af16f['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4a187b=>{_0x4a187b['on']('attribute:vid',(_0x574be3,_0x4918ff,_0x49fe59)=>{if('\x20'!=_0x4918ff['item']['data']||_0x4918ff['item']['parent']['maxOffset']>0x1)return;if(!_0x49fe59['consumable']['consume'](_0x4918ff['item'],_0x574be3['name']))return;const _0x7a7413=_0x49fe59['writer'],_0xe3459=_0x49fe59['mapper']['toViewRange'](_0x4918ff['range']);_0x7a7413['wrap'](_0xe3459,_0x7a7413['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xbc7ee6){const _0x1eb2a0=_0xbc7ee6['plugins']['get']('RevisionViewer');return(_0x3ae8f2,_0x5b2e56,_0x3b809e)=>{const _0x4219ea=_0x5b2e56['markerName']['split'](':')[0x1],_0x302e15=_0x1eb2a0['_getChangeFromId'](_0x4219ea);if(!_0x302e15)return null;const _0x43d223='add'==_0x302e15['type']?'split':'merge';if(!_0x3b809e['consumable']['test'](_0x5b2e56['markerRange'],_0x3ae8f2['name']))return;const _0x515e03=_0x5b2e56['markerRange']['getWalker'](),_0x1ef052=_0x5b2e56['markerRange']['start'],_0x345063=_0xbc7ee6['model']['schema'];let _0x2ede63=null,_0x4d5cb6=null,_0x59a1fb=!0x1,_0x3ad647=!0x1;for(const _0x48d1a7 of _0x515e03){const _0x5c71d9=_0x48d1a7['item'];_0x59a1fb=_0x59a1fb||_0x345063['isContent'](_0x5c71d9);const _0x315b58=_0x3b809e['mapper']['toViewElement'](_0x5c71d9);if(_0x315b58&&_0x315b58['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x48d1a7['type']&&(_0x345063['isBlock'](_0x5c71d9)&&!_0x345063['isLimit'](_0x5c71d9)&&(_0x5c71d9['nextSibling']||_0x1ef052['isAtEnd']?_0x2ede63&&_0x2ede63['parent']==_0x5c71d9||(_0x2ede63=_0x5c71d9,_0x4d48f5(_0x48d1a7['previousPosition']),_0x3ad647=!0x0):_0x4d5cb6=_0x4d5cb6||_0x48d1a7['previousPosition']));}function _0x4d48f5(_0x30b6a5){const _0x2e619f=_0x3b809e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x43d223}),_0x370290=_0x3b809e['mapper']['toViewPosition'](_0x30b6a5);_0x302e15['data']['isSuggestion']&&_0x3b809e['writer']['addClass']('ck-suggestion-marker-'+_0x43d223+'-new',_0x2e619f),_0x1eb2a0['activeChange']==_0x302e15&&_0x3b809e['writer']['addClass']('ck-suggestion-marker--active',_0x2e619f),_0x3b809e['writer']['insert'](_0x370290,_0x2e619f),_0x3b809e['mapper']['bindElementToMarker'](_0x2e619f,_0x5b2e56['markerName']);}_0x59a1fb||_0x3ad647||!_0x4d5cb6||_0x4d48f5(_0x4d5cb6);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x826567,_0x490acb,_0x33bcf0)=>{const _0x2e9352=_0x33bcf0['mapper']['markerNameToElements'](_0x490acb['markerName']);if(_0x2e9352){for(const _0x10732e of _0x2e9352)(_0x10732e['hasClass']('ck-suggestion-marker-split')||_0x10732e['hasClass']('ck-suggestion-marker-merge'))&&(_0x33bcf0['mapper']['unbindElementFromMarkerName'](_0x10732e,_0x490acb['markerName']),_0x33bcf0['writer']['remove'](_0x10732e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x214bbd,_0x58cf97,_0x465d35)=>{const _0x10bed6=_0x58cf97['markerName']['split'](':')[0x1],_0x5c79e1=this['_getChangeFromId'](_0x10bed6);if(!_0x5c79e1)return null;const _0x281898='add'==_0x5c79e1['type']?'split':'merge';if(_0x465d35['consumable']['test'](_0x58cf97['markerRange'],_0x214bbd['name']))for(const _0x1e5d55 of _0x58cf97['markerRange']['getItems']()){if(!_0x1e5d55['is']('element','softBreak'))continue;const _0x3ea756=_0x465d35['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x281898}),_0x44e3dc=_0x465d35['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1e5d55));_0x5c79e1['data']['isSuggestion']&&_0x465d35['writer']['addClass']('ck-suggestion-marker-'+_0x281898+'-new',_0x3ea756),this['activeChange']==_0x5c79e1&&_0x465d35['writer']['addClass']('ck-suggestion-marker--active',_0x3ea756),_0x465d35['writer']['insert'](_0x44e3dc,_0x3ea756),_0x465d35['mapper']['bindElementToMarker'](_0x3ea756,_0x58cf97['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3d47bf=>{for(const _0x6cd3f9 of this['editor']['model']['document']['getRootNames']()){const _0x5b7ca4=this['editor']['model']['document']['getRoot'](_0x6cd3f9),_0xf36f57=this['editor']['editing']['view']['document']['getRoot'](_0x6cd3f9);if(_0xf36f57){const _0x22545e=_0x5b7ca4['getAttribute']('revisionHistoryAttachChange');if(_0x3d47bf['removeAttribute']('data-change-id',_0xf36f57),_0x3d47bf['removeClass']('ck-revision-history-root-add',_0xf36f57),_0x3d47bf['removeClass']('ck-revision-history-root-remove',_0xf36f57),_0x3d47bf['removeClass']('ck-revision-history-root--active',_0xf36f57),_0x22545e){const _0x123190=this['_getChangeFromId'](_0x22545e);if(!_0x123190)return null;_0x3d47bf['setAttribute']('data-change-id',_0x22545e,_0xf36f57),_0x3d47bf['addClass']('ck-revision-history-root-'+_0x123190['type'],_0xf36f57),this['activeChange']==_0x123190&&_0x3d47bf['addClass']('ck-revision-history-root--active',_0xf36f57);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x18ba5c=>'revision-comment:'+_0x18ba5c,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x55b01b=>'revision-suggestion:'+_0x55b01b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x35ce36=>({'name':'suggestion:'+_0x35ce36,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x543fbc=>{const _0x129739=_0x543fbc['markerName']['split'](':')[0x1];return'insertion'!=_0x129739&&'deletion'!=_0x129739?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x129739]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x4ece0a,_0xbd0ff1,_0xc38ae5)=>{const _0x57425d=_0xc38ae5['mapper']['markerNameToElements'](_0xbd0ff1['markerName']);if(_0x57425d){for(const _0x27056a of _0x57425d)_0x27056a['is']('uiElement')&&(_0xc38ae5['mapper']['unbindElementFromMarkerName'](_0x27056a,_0xbd0ff1['markerName']),_0xc38ae5['writer']['remove'](_0x27056a));}},{'priority':'high'});}['_getChangeFromId'](_0x3aa28a){return this['_changeIdToChange']['get'](_0x3aa28a);}['_getViewForChange'](_0xfb3270){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0xfb3270),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x488119,_0x510430,_0x317235,_0x24fbfe)=>{_0x24fbfe&&this['_balloon']['remove'](_0x24fbfe),_0x317235&&(this['_balloon']['add']({'view':_0x317235,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1dbcff=this['editor']['editing'],_0x45abee=this['_getChangeFromId'](_0x317235['changeId']);let _0x2b85c4;if(_0x45abee['data']['isOnRoot']){const _0x2beadf=_0x1dbcff['view']['getDomRoot'](_0x45abee['rootName']);_0x2b85c4=Array['from'](_0x2beadf['getClientRects']());}else{const _0x4ce484=this['editor']['model']['markers']['get']('revision:'+_0x317235['changeId']);_0x2b85c4=Array['from'](_0x1dbcff['mapper']['markerNameToElements'](_0x4ce484['name']))['map'](_0x5b8da5=>_0x1dbcff['view']['domConverter']['mapViewToDom'](_0x5b8da5))['map'](_0x2f0bcd=>Array['from'](_0x2f0bcd['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x2b85c4['find'](_0x48af62=>_0x48af62['top']-0x3<=this['_activeViewTarget']['y']&&_0x48af62['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x48af62['left']-0x3<=this['_activeViewTarget']['x']&&_0x48af62['right']+0x3>=this['_activeViewTarget']['x'])||_0x2b85c4[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x315699,_0x3a406f,_0x113bc6,_0x329790)=>{this['activeView']=_0x113bc6?this['_getViewForChange'](_0x113bc6):null,this['editor']['model']['change'](()=>{const _0x22e716=this['editor']['editing'];_0x329790&&(_0x329790['data']['isOnRoot']?_0x22e716['view']['change'](_0x29eb53=>{_0x29eb53['removeClass']('ck-revision-history-root--active',_0x22e716['view']['document']['getRoot'](_0x329790['rootName']));}):_0x22e716['reconvertMarker']('revision:'+_0x329790['id'])),_0x113bc6&&(_0x113bc6['data']['isOnRoot']?_0x22e716['view']['change'](_0x17fdd5=>{_0x17fdd5['addClass']('ck-revision-history-root--active',_0x22e716['view']['document']['getRoot'](_0x113bc6['rootName']));}):_0x22e716['reconvertMarker']('revision:'+_0x113bc6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x203caf,_0xef5e6a)=>{if(this['activeChange'])return;const _0x335226=this['_findChangeIdFromDomTarget'](_0xef5e6a['target']),_0x2ab4a5=this['_changeIdToChange']['get'](_0x335226);_0x2ab4a5?(this['_activeViewTarget']={'x':_0xef5e6a['domEvent']['x'],'y':_0xef5e6a['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2ab4a5)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x275be9,_0x2ed180)=>{const _0x4a40e7=this['_findChangeIdFromDomTarget'](_0x2ed180['target']),_0x35f206=this['_changeIdToChange']['get'](_0x4a40e7);_0x35f206?(this['_activeViewTarget']={'x':_0x2ed180['domEvent']['x'],'y':_0x2ed180['domEvent']['y']},_0x35f206===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x35f206):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4bb9bb){do{const _0x240dd9=_0x4bb9bb['getAttribute']('data-change-id');if(_0x240dd9)return _0x240dd9;_0x4bb9bb=_0x4bb9bb['parent'];}while(_0x4bb9bb);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x28fe3b=>{for(const _0x475ae1 of this['editor']['model']['markers'])_0x28fe3b['removeMarker'](_0x475ae1);});}};function Vt(_0x2b2246,_0x5af28d){return(_0x119dc,_0x657f93,_0x3498d2)=>{if(!_0x3498d2['consumable']['test'](_0x657f93['markerRange'],_0x119dc['name']))return;const _0x58721d=_0x657f93['markerRange']['getWalker'](),_0x4d13b0=_0x657f93['markerRange']['start'],_0x3a1980=_0x2b2246['model']['schema'];let _0x9f6dea=null,_0xc44258=null,_0x32e2ae=!0x1,_0x5afd78=!0x1;for(const _0x50d9fa of _0x58721d){const _0x392b9b=_0x50d9fa['item'];_0x32e2ae=_0x32e2ae||_0x3a1980['isContent'](_0x392b9b);const _0x55fac8=_0x3498d2['mapper']['toViewElement'](_0x392b9b);if(_0x55fac8&&_0x55fac8['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x50d9fa['type']&&(_0x3a1980['isBlock'](_0x392b9b)&&!_0x3a1980['isLimit'](_0x392b9b)&&(_0x392b9b['nextSibling']||_0x4d13b0['isAtEnd']?_0x9f6dea&&_0x9f6dea['parent']==_0x392b9b||(_0x9f6dea=_0x392b9b,_0x3e64a6(_0x50d9fa['previousPosition']),_0x5afd78=!0x0):_0xc44258=_0xc44258||_0x50d9fa['previousPosition']));}function _0x3e64a6(_0x4b520c){const _0x418486=_0x3498d2['mapper']['toViewPosition'](_0x4b520c),_0x11e315=_0x3498d2['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5af28d});_0x3498d2['writer']['insert'](_0x418486,_0x11e315),_0x3498d2['mapper']['bindElementToMarker'](_0x11e315,_0x657f93['markerName']);}_0x32e2ae||_0x5afd78||!_0xc44258||_0x3e64a6(_0xc44258);};}var Dt=class extends _0xac11b2{constructor(_0x1d605d){super(_0x1d605d);const _0x3e9e64=_0x1d605d['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x3e9e64,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3e9e64,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5d82fb=this['editor'],_0x4847a4=_0x5d82fb['plugins']['get'](Mt),_0x49d8cc=_0x4847a4['isReady']?_0x4847a4['diff']['newRevisionId']:null;_0x5d82fb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x49d8cc);}['refresh'](){const {isReady:_0xa3bd3,isEnabled:_0x38d210,repository:_0x383773,diff:_0x260ba6}=this['editor']['plugins']['get'](Mt),_0xb0a0b2=_0x260ba6&&_0x383773['getLaterVisibleRevision'](_0x260ba6['newRevisionId']);this['isEnabled']=_0xa3bd3&&_0x38d210&&Boolean(_0xb0a0b2);}},Tt=class extends _0xac11b2{['_step'];constructor(_0x563c1f,{direction:_0x505d76}){super(_0x563c1f);const _0x388410=_0x563c1f['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x505d76?0x1:-0x1,this['listenTo'](_0x388410,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x388410,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x388410,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4cf4bf=this['editor'],_0xd96cc=_0x4cf4bf['plugins']['get'](Mt),{isNavigationMode:_0x1c8cd9,currentChangeNumber:_0x484e66}=_0xd96cc;let _0xbcbcba;if(_0xd96cc['activeChange']=_0x1c8cd9?_0xd96cc['diff']['changes']['get'](_0x484e66+this['_step']):_0xd96cc['diff']['changes']['first'],_0xd96cc['activeChange']['data']['isOnRoot'])_0xbcbcba=_0x4cf4bf['editing']['view']['getDomRoot'](_0xd96cc['activeChange']['rootName']);else{const _0x51419f=_0x4cf4bf['model']['markers']['get']('revision:'+_0xd96cc['activeChange']['id']);_0xbcbcba=_0x1cab98(_0x4cf4bf['editing'],_0x51419f);}_0x33f2c6({'target':_0xbcbcba,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2dc15d,currentChangeNumber:_0x5732d2,numberOfChanges:_0x48cfbb,isReady:_0x1789c7,isEnabled:_0x1ac952}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x1ac952&&_0x1789c7&&_0x48cfbb)&&(!_0x2dc15d||(0x1===this['_step']?_0x5732d2<_0x48cfbb-0x1:_0x5732d2>0x0));}},Ht=class extends at{constructor(_0x516406){super(_0x516406);const _0x38c393=this['bindTemplate'],_0x599c47=new _0x38c932(_0x516406),_0x58d01a=new _0x38c932(_0x516406);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',(_0x524c50,_0x219d92)=>_0x524c50&&_0x219d92>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x10e9f9,_0x2ede34,_0x18e6c2,_0x1af52e)=>{if(!_0x10e9f9)return pt(_0x516406,'Loading...');if(!_0x18e6c2)return pt(_0x516406,'No\x20changes');const _0x272fb5=pt(_0x516406,'NUMBER_OF_CHANGES',_0x18e6c2);return _0x1af52e?pt(_0x516406,'X_OF_Y_CHANGES',[_0x2ede34+0x1,_0x18e6c2]):_0x272fb5;}),_0x599c47['set']({'label':pt(_0x516406,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x37592a}),_0x58d01a['set']({'label':pt(_0x516406,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x693226}),_0x599c47['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x58d01a['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x599c47['on']('execute',()=>this['fire']('execute','backward')),_0x58d01a['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',_0x38c393['if']('_isStatusLabelVisible','ck-hidden',_0x16e543=>!_0x16e543)]},'children':[{'text':_0x38c393['to']('isNavigationMode',_0x2101cd=>_0x2101cd?pt(_0x516406,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x516406,'Total')+':\x20')}]},{'text':_0x38c393['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x599c47,_0x58d01a]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x2aa7ef{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x20b642=this['editor']['editing']['view'];_0x20b642['change'](_0x32e622=>{for(const _0xdfe91a of _0x20b642['document']['roots'])_0x32e622['addClass'](Pt,_0xdfe91a);});}['hide'](){const _0x5dfecf=this['editor']['editing']['view'];_0x5dfecf['change'](_0x400a98=>{for(const _0x13fc00 of _0x5dfecf['document']['roots'])_0x400a98['removeClass'](Pt,_0x13fc00);});}},Lt=class extends _0x2aa7ef{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x38550f=this['editor'],_0x6f4892=_0x38550f['plugins']['get'](Mt),_0x4e5436=_0x38550f['plugins']['get'](Ut);_0x38550f['ui']['componentFactory']['add']('exitToEditing',_0x4df962=>{const _0x2aa4f9=new _0x38c932(_0x4df962);return _0x2aa4f9['set']({'label':pt(_0x4df962,'Back\x20to\x20editing'),'icon':_0x3594c1,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2aa4f9,'execute',()=>{_0x38550f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2aa4f9;}),_0x38550f['ui']['componentFactory']['add']('restoreRevision',_0xaef726=>{const _0x48a2bb=new _0x38c932(_0xaef726);return _0x48a2bb['set']({'label':pt(_0xaef726,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x48a2bb['bind']('isEnabled')['to'](_0x38550f['commands']['get']('restoreRevision')),this['listenTo'](_0x48a2bb,'execute',()=>_0x38550f['execute']('restoreRevision')),_0x48a2bb;}),_0x38550f['ui']['componentFactory']['add']('changesNavigation',_0x45207a=>{const _0x3c5367=new Ht(_0x45207a),_0x50cc87=_0x38550f['commands']['get']('showPreviousChange'),_0x29242e=_0x38550f['commands']['get']('showNextChange');return _0x3c5367['bind']('isBackwardNavigationEnabled')['to'](_0x50cc87,'isEnabled'),_0x3c5367['bind']('isForwardNavigationEnabled')['to'](_0x29242e,'isEnabled'),_0x3c5367['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x6f4892),this['listenTo'](_0x3c5367,'execute',(_0x316dc5,_0x17cb6e)=>{_0x38550f['execute']('forward'===_0x17cb6e?'showNextChange':'showPreviousChange');}),_0x3c5367;}),_0x4e5436['show'](),_0x6f4892['on']('change:isReady',(_0xd1035e,_0xa21639,_0x42b223)=>{_0x42b223?_0x4e5436['hide']():_0x4e5436['show']();});}},Ft=class extends _0xce187e{['_resizeObserver']=null;constructor(_0x13beb5,_0x26f125){super(_0x13beb5,_0x26f125);const _0x409859=this['bindTemplate'];this['set']({'label':pt(_0x13beb5,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x13beb5,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x409859['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x476a3b(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x39e863=this['fieldView']['element'];this['_tooltipString']=_0x39e863['scrollWidth']>_0x39e863['clientWidth']&&_0x39e863['value']||'';}},$t=class extends at{constructor(_0x6972ba,_0x3e1bfa,_0x27c89c){super(_0x6972ba);const _0x483023=new _0x3738c3();_0x483023['set']({'content':_0x593e0a,'viewBox':'0\x200\x2011\x2010'});const _0x49fe9d=['ck','ck-revision-history-sidebar__revision-author'];_0x27c89c&&_0x49fe9d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x92a63=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x6972ba,_0x27c89c?'Revision\x20creator':'Revision\x20author')},'children':[_0x483023,_0x3e1bfa['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x49fe9d},'children':_0x92a63});}};function jt(_0x5d1688,_0x4eefd6){const _0x55e856=_0x5d1688['bindTemplate'],_0x91064a=_0x5d1688['locale'],_0x7931e3=ct(_0x91064a);_0x7931e3['panelPosition']='sw';const _0x16ed23=function(_0x551393,_0x265e2a){const _0x2ad7bd=function(_0x3e03d1,_0xd6d458){const _0x176d4d=_0x3e03d1['locale'],_0x3e9e3b={'Compare\x20against\x20selected':pt(_0x176d4d,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x176d4d,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x176d4d,'Restore\x20this\x20revision')};return _0xd6d458['map'](_0x5bab52=>{const _0x2a24c5=_0x3e9e3b[_0x5bab52['name']];return _0x2a24c5&&_0x2a24c5!==_0x5bab52['name']&&(_0x5bab52['name']=_0x2a24c5),_0x5bab52;});}(_0x551393,_0x265e2a),_0x508507=new _0x8df329();for(const _0x1bec05 of _0x2ad7bd){const _0x2d6130={'type':'button','model':new rt({'label':_0x1bec05['name'],'class':_0x1bec05['class'],'withText':!0x0,'role':'menuitem','_action':_0x1bec05['action']})};_0x2d6130['model']['bind']('isEnabled')['to'](_0x551393,'isActionsDropdownOpen',_0x238f80=>'function'!=typeof _0x1bec05['isEnabled']||(!_0x238f80||_0x1bec05['isEnabled'](_0x551393))),_0x508507['add'](_0x2d6130);}return _0x508507;}(_0x5d1688,_0x4eefd6);return _0x5d1688['bind']('isActionsDropdownOpen')['to'](_0x7931e3,'isOpen'),_0x7931e3['buttonView']['set']({'label':pt(_0x91064a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x31c029}),_0x7931e3['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x55e856['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x55e856['to'](_0xad6f96=>_0xad6f96['stopPropagation']())}}),_0x7931e3['on']('execute',_0x38f11b=>{_0x5d1688['isReady']&&'function'==typeof _0x38f11b['source']['_action']&&_0x38f11b['source']['_action'](_0x5d1688);}),ht(_0x7931e3,_0x16ed23,{'role':'menu'}),_0x7931e3['listenTo'](_0x5d1688,'change:isActionsDropdownOpen',(_0x3513f2,_0x20c9d2,_0x415e6b)=>{if(_0x415e6b)for(const _0x3dc4d7 of _0x7931e3['listView']['items']){const _0x41d4d9=_0x3dc4d7['children']['first'],_0x1197d9=_0x4eefd6['find'](_0x25ba08=>_0x25ba08['action']===_0x41d4d9['_action'])['isVisible'];_0x3dc4d7['isVisible']=void 0x0===_0x1197d9||_0x1197d9(_0x5d1688);}}),_0x7931e3;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x551dda,Collection as _0x31e5a4,ElementReplacer as _0x3b14fe,FocusTracker as _0xcf3bc4,KeystrokeHandler as _0x388137,ObservableMixin as _0x42ddc5,ResizeObserver as _0x2ddfce,logWarning as _0x21743e,scrollViewportToShowTarget as _0x4f8357,uid as _0x1e8bcb}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x523aea,isEqual as _0x5a3c2a,set as _0x3697d9,unset as _0x2e6f33}from'es-toolkit/compat';import{Command as _0x4a68a5,Editor as _0x5418e2,ElementApiMixin as _0x47298,PendingActions as _0xcc9a28,Plugin as _0x3551b1}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x5f5cfa,Users as _0x2238bc,getMarkerDomElement as _0x1d05ed,sanitizeEditorConfig as _0x18e9a1}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x50f2d5,ModelElement as _0x2f872d,ModelPosition as _0x45d50f,ModelRange as _0x9684f,ModelText as _0x2bf109,ViewAttributeElement as _0x3e604b,ViewContainerElement as _0x51527c,ViewDocumentFragment as _0x6db7d6,ViewElement as _0xe00657,ViewEmptyElement as _0x24ca9e,ViewRawElement as _0x4ead6e,ViewText as _0xb59c96,ViewUIElement as _0x4c723b}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x1a6d41,IconChevronUp as _0x27f11a,IconHistory as _0x3bdd34,IconThreeVerticalDots as _0x180e7a,IconUndo as _0x5aa572,IconUser as _0x55924c}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x91fade,ButtonView as _0x4451f8,ContextualBalloon as _0x564877,CssTransitionDisablerMixin as _0x18839e,EditorUI as _0x28c692,IconView as _0x202a0b,InlineEditableUIView as _0x5b48fd,LabeledFieldView as _0xfdb4f,ListItemView as _0x49aa75,ListView as _0x3734ad,MenuBarMenuListItemButtonView as _0x33789a,MenuBarMenuListItemView as tt,MenuBarMenuListView as it,MenuBarMenuView as et,StickyPanelView as st,ToolbarSeparatorView as nt,ToolbarView as ot,UIModel as rt,View as at,addListToDropdown as ht,createDropdown as ct,createLabeledInputText as lt,normalizeToolbarConfig as ut,submitHandler as dt}from'@ckeditor/ckeditor5-ui';import{DateTime as ft}from'luxon';const vt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x42ddc5();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x35244c){super(),this['id']=_0x35244c['id']||_0x1e8bcb(),this['creator']=_0x35244c['creator']||null,this['authors']=_0x35244c['authors']||[],this['diffData']=_0x35244c['diffData']||null,this['toVersion']=_0x35244c['toVersion']||0x0,this['fromVersion']=_0x35244c['fromVersion']||0x0,this['set']('name',_0x35244c['name']||''),this['set']('createdAt',_0x35244c['createdAt']||new Date()),this['set']('attributes',_0x35244c['attributes']||{});}['setName'](_0xcc2bb5){this['_update']({'name':_0xcc2bb5});}['setAttribute'](_0x4e6133,_0x5b5718){const _0x556462=_0x523aea(this['attributes']);_0x3697d9(_0x556462,_0x4e6133,_0x5b5718),this['_update']({'attributes':_0x556462});}['removeAttribute'](_0x263f8b){const _0x2d1fab=_0x523aea(this['attributes']);_0x2e6f33(_0x2d1fab,_0x263f8b),this['_update']({'attributes':_0x2d1fab});}['_update'](_0x141d2c,_0x9703ef=!0x1){let _0x6bd3c1=!0x1;const _0x265b79={'id':this['id']};for(const _0x5effe1 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x5d8950=_0x141d2c[_0x5effe1];void 0x0!==_0x5d8950&&_0x5d8950!==this[_0x5effe1]&&(this[_0x5effe1]=_0x5d8950,_0x265b79[_0x5effe1]=_0x5d8950,_0x6bd3c1=!0x0);}_0x6bd3c1&&(_0x265b79['authors']&&(_0x265b79['authorsIds']=_0x265b79['authors']['map'](_0x1c28dc=>_0x1c28dc['id']),delete _0x265b79['authors']),this['fire']('_update',_0x265b79,_0x9703ef));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x20a87a=>_0x20a87a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x3551b1{['_revisions'];static get['requires'](){return[_0x2238bc];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x3ab02e){super(_0x3ab02e),this['_revisions']=new _0x31e5a4();}['afterInit'](){!async function(_0xdcdca2){const _0x3ad52a='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x2b5df3=0xeb829,_0x14d196=0x78e10,_0x471282=window['Date']['now'](),_0x465469=_0xdcdca2['editor'],_0x1c04f7=new window['Promise'](_0x2cea48=>{_0x465469['once']('ready',_0x2cea48);}),_0x2e8d72={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x340996=_0x465469['config']['get']('licenseKey');async function _0x50721d(){let _0x5b350e,_0x2c8cc0=null,_0x45fdb7=null;try{return'GPL'==_0x340996?'NotAllowed':(_0x5b350e=_0x53ceac(),_0x5b350e?(_0x5b350e['usageEndpoint']&&(_0x45fdb7=_0x2b5ef9(_0x5b350e['usageEndpoint'],_0x5b350e['jti'])),await _0x3e20fe()?_0x4db7e2()?_0x27ce22()?'Expired':_0xeb4029()?('evaluation'==_0x5b350e['licenseType']&&(_0x2c8cc0=_0x418d92('EvaluationLimit')),await _0x199187()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x27ce22(){const _0x3b0d96=['evaluation','trial']['includes'](_0x5b350e['licenseType'])?_0x471282/0x3e8:0xe10*_0x14d196;return _0x5b350e['exp']<_0x3b0d96;}function _0x4db7e2(){const _0xdda6f0=_0x5b350e['features'];if(!_0xdda6f0)return!0x1;if(_0xdda6f0['includes']('*'))return!0x0;if(_0xdda6f0['includes']('RH'))return!0x0;if(_0xdda6f0['includes']('RRH')){if(_0x55fde6())return!0x0;if(_0x5136de()||_0x55212f())return!0x0;}return!0x1;}function _0xeb4029(){const _0x2ba914=_0x5b350e['licensedHosts'];if(!_0x2ba914||0x0==_0x2ba914['length'])return!0x0;const {hostname:_0x5765e8}=new URL(window['location']['href']);if(_0x2ba914['includes'](_0x5765e8))return!0x0;const _0xfd9027=_0x5765e8['split']('.');return _0x2ba914['filter'](_0x3d3577=>_0x3d3577['includes']('*'))['map'](_0xf12e40=>_0xf12e40['split']('.'))['filter'](_0x3c04a9=>_0x3c04a9['length']<=_0xfd9027['length'])['map'](_0x1525b6=>Array(_0xfd9027['length']-_0x1525b6['length'])['fill']('*'===_0x1525b6[0x0]?'*':'')['concat'](_0x1525b6))['some'](_0x240a55=>_0xfd9027['every']((_0x19ec11,_0x325fec)=>_0x240a55[_0x325fec]===_0x19ec11||'*'===_0x240a55[_0x325fec]));}function _0x199187(){return _0x2c8cc0&&_0x45fdb7?new window['Promise']((_0x347fc7,_0x4e665f)=>{_0x2c8cc0['then'](_0x347fc7,_0x4e665f),_0x45fdb7['then'](_0x591fe5=>{'Valid'!=_0x591fe5&&_0x347fc7(_0x591fe5);},_0x4e665f);}):_0x2c8cc0||_0x45fdb7||'Valid';}}function _0x2b5ef9(_0x28864b,_0x1e9052){return new window['Promise'](_0x3f389b=>{if(_0x3923dd())return _0x3f389b('Valid');_0x27500d(),_0x465469['decorate']('_sendUsageRequest');let _0x5a0faa=!0x1;const _0x34de0b=_0x1e8bcb();function _0x303c0d(_0x1d73cc){return!!_0x1d73cc&&('object'==typeof _0x1d73cc||'function'==typeof _0x1d73cc)&&'function'==typeof _0x1d73cc['then']&&'function'==typeof _0x1d73cc['catch'];}function _0xb3d7d0(_0x26eaaa){_0x5f02e1(_0x26eaaa)['then'](_0x3e7eb8=>_0x3e7eb8&&'ok'==_0x3e7eb8['status']?_0x548a26(_0x1bd0c2(_0x34de0b+_0x1e9052))!=_0x3e7eb8['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5990e9=>(_0x16e2b8(),_0x5990e9),()=>{const _0x82f0c3=_0x9393fe();return null==_0x82f0c3?(_0x16e2b8(),'Valid'):_0x471282-_0x82f0c3>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3f389b)['catch'](()=>{_0x3f389b('UsageLimit');});const _0x48f9a0=0x36ee80;function _0x16e2b8(){const _0x2c3061='llct-'+_0x548a26(_0x1bd0c2(_0x28864b)),_0x5bfd41=_0xc808de(_0x548a26(window['Math']['ceil'](_0x471282/_0x48f9a0)));window['localStorage']['setItem'](_0x2c3061,_0x5bfd41);}function _0x9393fe(){const _0x219795='llct-'+_0x548a26(_0x1bd0c2(_0x28864b)),_0x383ad1=window['localStorage']['getItem'](_0x219795);return _0x383ad1?window['parseInt'](_0xc808de(_0x383ad1),0x10)*_0x48f9a0:null;}function _0x5f02e1(_0x3747bb){return new window['Promise']((_0x2848df,_0x14e931)=>{_0x3747bb['then'](_0x2848df,_0x14e931),window['setTimeout'](_0x14e931,0x1d4c0);});}}_0x465469['on']('_sendUsageRequest',(_0x184291,_0x5b0e48)=>{if(_0x5b0e48[0x0]!=_0x28864b)return _0x3f389b('UsageLimit');_0x5b0e48[0x1]={..._0x5b0e48[0x1],'requestId':_0x34de0b};},{'priority':'high'}),_0x465469['on']('_sendUsageRequest',_0x52e310=>{_0x303c0d(_0x52e310['return'])&&(_0x5a0faa=!0x0,_0xb3d7d0(_0x52e310['return']));},{'priority':'low'}),_0x1c04f7['then'](()=>{_0x5a0faa||_0x3f389b('UsageLimit');});});function _0x3923dd(){return'auto'==_0x465469['editing']['view']['_overlayModeHint'];}function _0x27500d(){_0x465469['editing']['view']['_overlayModeHint']='auto';}}function _0x418d92(_0x80a683){const _0x322a4d=[new window['Promise'](_0x39bcd8=>setTimeout(_0x39bcd8,0x93ecc)),_0x1c04f7['then'](()=>new window['Promise'](_0x5c562d=>{const _0x3e45ff=0x7,_0x1c66fa=_0xdcdca2['_revisions'];function _0x1921e0(){_0x1c66fa['length']>=_0x3e45ff&&_0x5c562d();}_0x1921e0(),_0x1c66fa['on']('add',_0x1921e0);})),new window['Promise'](_0x5346c5=>{function _0x26bfd2(){for(const _0x5b9eaa in window)if(window['Number']['isNaN'](window['Number'](_0x5b9eaa))&&window[_0x5b9eaa]==_0x2b5df3)return _0x5346c5();'destroyed'!=_0x465469['state']&&window['setTimeout'](_0x26bfd2,0x1388);}_0x108429('RevisionViewer')&&_0x26bfd2();})];return window['Promise']['race'](_0x322a4d)['then'](()=>_0x80a683);}async function _0x47deb3(){if(await _0x1c04f7,_0x108429('RevisionViewer')){const _0x518fe2=_0xdcdca2['getRevision'](0x0),_0x2b47a7=_0xdcdca2['getEarlierVisibleRevision'](_0x518fe2['id']),_0x33322a=_0x1f2ef6('RevisionViewer');return await _0x33322a['compare'](_0x518fe2['id'],_0x2b47a7?_0x2b47a7['id']:null,!0x0),_0x33322a['unbind']('isEnabled'),_0x33322a['isEnabled']=!0x1,_0x33322a['compare']=_0x5ad1cb,void(_0x33322a['_getDiff']=_0x5ad1cb);}if(_0x108429('RevisionTracker')){const _0x45f105=_0x1f2ef6('RevisionTracker');_0x45f105['unbind']('isEnabled'),_0x45f105['isEnabled']=!0x1,_0x45f105['update']=_0x5ad1cb,_0x45f105['saveRevision']=_0x5ad1cb;}_0x465469['model']['change']=_0x5ad1cb,_0x465469['model']['enqueueChange']=_0x5ad1cb,_0x465469['enableReadOnlyMode']('model');}function _0x55fde6(){return _0x108429('WebSocketGateway')&&'connected'==_0x1f2ef6('WebSocketGateway')['state'];}function _0x5136de(){return _0x108429('RevisionViewerIntegration');}function _0x55212f(){return _0x108429('TrackChangesDataGetter');}function _0x7fed25(_0x4f430e){const _0x1b2c99=_0x37aa7a();_0x465469[_0x1b2c99]='revisionHistoryLicenseKey'+_0x4f430e,_0x4f430e['endsWith']('Limit')&&(window[_0x37aa7a()]=_0x2b5df3),'Valid'!=_0x4f430e&&_0x47deb3();}function _0x37aa7a(){const _0x51f222=window['String'](window['performance']['now']())['replace']('.','');let _0x46734e='v';for(let _0xeca49=0x0;_0xeca49<_0x51f222['length'];_0xeca49+=0x2){let _0x2e995f=window['parseInt'](_0x51f222['substring'](_0xeca49,_0xeca49+0x2));_0x2e995f>=0x3e&&(_0x2e995f-=0x3e),_0x46734e+=_0x3ad52a[_0x2e995f];}return _0x46734e;}function _0x53ceac(){const _0x5f40a0=_0x340996['split']('.');if(0x3!=_0x5f40a0['length'])return null;return _0xfe7d17(_0x5f40a0[0x1]);function _0xfe7d17(_0x45050d){const _0x1d3f76=_0xd9b710(_0x45050d);return _0x1d3f76&&_0x4389f8()?_0x1d3f76:null;function _0x4389f8(){const _0x182c4c=_0x1d3f76['jti'],_0x254181=window['parseInt'](_0x182c4c['substring'](_0x182c4c['length']-0x8),0x10),_0x3e7400={..._0x1d3f76,'jti':_0x182c4c['substring'](0x0,_0x182c4c['length']-0x8)};return delete _0x3e7400['vc'],_0x1bd0c2(_0x3e7400)==_0x254181;}}}async function _0x3e20fe(){let _0x259beb=!0x0;try{const [_0x5a39fa,_0x84f28d,_0x34608f]=_0x340996['split']('.');return _0x32ad7a(_0x5a39fa),await _0xb81a20(_0x5a39fa,_0x84f28d,_0x34608f),_0x259beb;}catch{return!0x1;}function _0x32ad7a(_0x499fe9){const _0x128020=_0xd9b710(_0x499fe9);_0x128020&&'ES256'==_0x128020['alg']||(_0x259beb=!0x1);}async function _0xb81a20(_0x128c41,_0x736820,_0x1f9324){const _0x4abefd=window['Uint8Array']['from'](_0x54d47d(_0x1f9324),_0x324aea=>_0x324aea['charCodeAt'](0x0)),_0x5a9078=new window['TextEncoder']()['encode'](_0x128c41+'.'+_0x736820),_0x15f9c5=window['crypto']['subtle'];if(!_0x15f9c5)return;const _0xe3f60=await _0x15f9c5['importKey']('jwk',_0x2e8d72,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x15f9c5['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xe3f60,_0x4abefd,_0x5a9078)||(_0x259beb=!0x1);}}function _0xd9b710(_0xc29b30){return _0xc29b30['startsWith']('ey')?JSON['parse'](_0x54d47d(_0xc29b30)):null;}function _0x54d47d(_0x5530ef){return window['atob'](_0x5530ef['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1bd0c2(_0x5da2a5){let _0x439418=0x1505;function _0x134405(_0xb2d314){for(let _0x47b601=0x0;_0x47b601<_0xb2d314['length'];_0x47b601++){const _0x24d1ed=_0xb2d314['charCodeAt'](_0x47b601);_0x439418=(_0x439418<<0x5)+_0x439418+_0x24d1ed,_0x439418&=_0x439418;}}function _0x1ae202(_0x21d9d7){Array['isArray'](_0x21d9d7)?_0x21d9d7['forEach'](_0x1ae202):_0x21d9d7&&'object'==typeof _0x21d9d7?Object['entries'](_0x21d9d7)['sort']()['forEach'](([_0x4b573e,_0x1cf73a])=>{_0x134405(_0x4b573e),_0x1ae202(_0x1cf73a);}):_0x134405(window['String'](_0x21d9d7));}return _0x1ae202(_0x5da2a5),_0x439418>>>0x0;}function _0x548a26(_0x4896cb){return _0x4896cb['toString'](0x10)['padStart'](0x8,'0');}function _0xc808de(_0x485f4b){return _0x485f4b['split']('')['reverse']()['join']('');}function _0x108429(_0x2d5795){return _0x465469['plugins']['has'](_0x2d5795);}function _0x1f2ef6(_0xa05cc0){return _0x465469['plugins']['get'](_0xa05cc0);}function _0x5ad1cb(){}_0x7fed25(await _0x50721d());}(this);}['createRevision'](_0x4e7b8a){const _0x2005c4=this['editor']['plugins']['get']('Users');return new gt({'id':_0x4e7b8a['id'],'name':_0x4e7b8a['name'],'creator':_0x4e7b8a['creatorId']?_0x2005c4['getUser'](_0x4e7b8a['creatorId']):null,'diffData':_0x4e7b8a['diffData']||_0x4e7b8a['data'],'authors':_0x4e7b8a['authorsIds']['map'](_0x5078ed=>_0x2005c4['getUser'](_0x5078ed)),'createdAt':new Date(_0x4e7b8a['createdAt']),'attributes':_0x4e7b8a['attributes'],'fromVersion':_0x4e7b8a['fromVersion'],'toVersion':_0x4e7b8a['toVersion']});}['addRevision'](_0x184a79,_0x1b7693=0x0){this['_revisions']['add'](_0x184a79,_0x1b7693);}['getRevision'](_0xe1ccbc){return this['_revisions']['get'](_0xe1ccbc);}['getRevisions'](_0x36a80b={'toJSON':!0x1}){const _0xc866cb=Array['from'](this['_revisions']);return _0xc866cb['reverse'](),_0x36a80b['toJSON']?_0xc866cb['map'](_0x4d37a1=>_0x4d37a1['toJSON']()):_0xc866cb;}['getIndex'](_0x3fa255){return this['_revisions']['getIndex'](_0x3fa255);}['getEarlierVisibleRevision'](_0x32d04c){const [,_0x3abc9f]=this['getRevisionsIterator'](_0x32d04c,{'direction':'earlier'});return _0x3abc9f;}['getLaterVisibleRevision'](_0x64b017){const [,_0x97c8ae]=this['getRevisionsIterator'](_0x64b017,{'direction':'later'});return _0x97c8ae;}['getRevisionsInDiff'](_0x529313){const _0x5cddf3=[];for(const _0x2f269c of this['getRevisionsIterator'](_0x529313['newRevisionId']))if(_0x5cddf3['push'](_0x2f269c),_0x2f269c['id']===_0x529313['oldRevisionId'])break;return _0x5cddf3;}*['getRevisionsIterator'](_0x58a9b5,{direction:_0x21d8f0='earlier',filter:_0x3b28dd=()=>!0x0}={}){const _0x27bab3='earlier'===_0x21d8f0?0x1:-0x1;let _0x535010=this['_revisions']['get'](_0x58a9b5),_0x278854=this['getIndex'](_0x535010);for(yield _0x535010;_0x535010;){if(_0x278854+=_0x27bab3,_0x535010=this['getRevision'](_0x278854),!_0x535010)return;_0x3b28dd(_0x535010)&&(yield _0x535010);}}},wt=class extends _0x3551b1{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x51527c,'c'],[_0x3e604b,'a'],[_0x24ca9e,'e'],[_0x4ead6e,'r'],[_0x4c723b,'u']]);['_typeCharToViewClass']=new Map([['c',_0x51527c],['a',_0x3e604b],['e',_0x24ca9e],['r',_0x4ead6e],['u',_0x4c723b]]);async['loadRevisionData'](_0x26a9ac,_0x236dd1){if(_0x26a9ac['diffData']||!_0x236dd1)return;const _0x13efcc=this['editor']['config']['get']('collaboration.channelId');_0x26a9ac['diffData']=(await _0x236dd1['getRevision']({'channelId':_0x13efcc,'revisionId':_0x26a9ac['id']}))['diffData'];}['getRevisionDocumentData'](_0x51ce7d){const _0x253582={};for(const _0x3a286f in _0x51ce7d['diffData']){if(_0x51ce7d['diffData'][_0x3a286f]['attachChange']&&!_0x51ce7d['diffData'][_0x3a286f]['attachChange']['isAttached'])continue;const _0x4686a6=this['_removeRevisionMarkers'](JSON['parse'](_0x51ce7d['diffData'][_0x3a286f]['insertions'])),_0x164467=this['editor']['editing']['view']['document'],_0x37bd2d=new _0x6db7d6(_0x164467,_0x4686a6['map'](_0x2a59c3=>this['_getViewFromDiffObj'](_0x2a59c3,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x253582[_0x3a286f]=this['editor']['data']['processor']['toData'](_0x37bd2d),this['editor']['data']['processor']['useFillerType']('default');}return _0x253582;}['getRevisionRootsAttributes'](_0x22c4a9){const _0x335d46={};for(const _0x1e735e in _0x22c4a9['diffData'])_0x22c4a9['diffData'][_0x1e735e]['attachChange']&&!_0x22c4a9['diffData'][_0x1e735e]['attachChange']['isAttached']||(_0x335d46[_0x1e735e]=_0x22c4a9['diffData'][_0x1e735e]['attributesAfter']||{});return _0x335d46;}['getRevisionRootsModelElements'](_0x15c444){const _0x4c5ef5={};for(const _0x3fa21f in _0x15c444['diffData']){if(_0x15c444['diffData'][_0x3fa21f]['attachChange']&&!_0x15c444['diffData'][_0x3fa21f]['attachChange']['isAttached'])continue;const _0x2b22ba=_0x15c444['diffData'][_0x3fa21f]['rootElementName'];_0x2b22ba&&(_0x4c5ef5[_0x3fa21f]=_0x2b22ba);}return _0x4c5ef5;}['_getTypeCharForViewElement'](_0x19382c){return this['_viewClassToTypeChar']['get'](_0x19382c['constructor']);}['_getViewFromDiffObj'](_0x414370,_0x51325){const _0x23cd6e=this['editor']['editing']['view']['document'];if('string'==typeof _0x414370)return new _0xb59c96(_0x23cd6e,_0x414370);{let _0x3b50ef,_0x1cae83;_0x1cae83='u'==_0x414370['type']||'r'==_0x414370['type']?[]:_0x414370['children']['map'](_0x346202=>this['_getViewFromDiffObj'](_0x346202,_0x51325));const _0x2ff26b=this['_typeCharToViewClass']['get'](_0x414370['type'])||_0xe00657,_0xa8e92c=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3b50ef=new _0x2ff26b(_0x23cd6e,_0x414370['name'],_0x414370['attributes'],_0x1cae83),'u'==_0x414370['type']&&_0x414370['children'][0x0]){const _0x12bf00=_0x414370['children'][0x0];if(_0x3b50ef['render']=function(_0x31dadc){const _0x4ece25=_0x31dadc['createElement']('div');return _0x4ece25['innerHTML']=_0x12bf00,_0x4ece25['childNodes'][0x0];},_0x51325){const _0x5f35d5=new _0x6db7d6(_0x23cd6e);_0x5f35d5['_appendChild'](_0x3b50ef);const _0x5a2abf=Array['from'](_0xa8e92c['viewChildrenToDom'](_0x5f35d5,{'bind':!0x1})),_0xfab103=_0xa8e92c['domDocument']['createElement']('div');_0xfab103['append'](..._0x5a2abf),_0x3b50ef=Array['from'](_0xa8e92c['domChildrenToView'](_0xfab103))[0x0];}}else{if('r'==_0x414370['type']&&_0x414370['children'][0x0]){const _0x23ca52=_0x414370['children'][0x0];if(_0x3b50ef['render']=function(_0x59dc0a){_0x59dc0a['innerHTML']=_0x23ca52;},_0x51325){const _0x53948d=new _0x6db7d6(_0x23cd6e);_0x53948d['_appendChild'](_0x3b50ef);const _0x105419=Array['from'](_0xa8e92c['viewChildrenToDom'](_0x53948d,{'bind':!0x1})),_0x23a796=_0xa8e92c['domDocument']['createElement']('div');_0x23a796['append'](..._0x105419);const _0x32fb23=Array['from'](_0xa8e92c['domChildrenToView'](_0x23a796));_0x32fb23['length']>0x1?_0x3b50ef['_appendChild'](_0x32fb23):_0x3b50ef=_0x32fb23[0x0];}}}if(_0x414370['customProperties']){for(const [_0x1f0320,_0x43fb32]of _0x414370['customProperties'])_0x3b50ef['_setCustomProperty'](_0x1f0320,_0x43fb32);}const _0x5b0fc5=void 0x0===_0x414370['fillerOffset']?null:_0x414370['fillerOffset'];return null!==_0x5b0fc5&&(_0x3b50ef['getFillerOffset']=()=>_0x5b0fc5),_0x3b50ef;}}['_makeModelFromViewString'](_0x29797b,_0x2ebc34){const _0x48bb3e=JSON['parse'](_0x29797b),_0x203227=this['editor']['editing']['view']['document'],_0x425a40=new _0x6db7d6(_0x203227,_0x48bb3e['map'](_0x1a4e66=>this['_getViewFromDiffObj'](_0x1a4e66,!0x0))),_0x6d99e1=this['editor']['data']['toModel'](_0x425a40,_0x2ebc34);return _0x6d99e1['name']=_0x2ebc34,_0x6d99e1;}['_removeRevisionMarkers'](_0xa1a11d){return(_0xa1a11d=_0xa1a11d['filter'](_0x4ff3d7=>!_0x4ff3d7['name']||'revision-start'!==_0x4ff3d7['name']&&'revision-end'!==_0x4ff3d7['name']))['forEach'](_0x50d09d=>{'string'!=typeof _0x50d09d&&(_0x50d09d['children']=this['_removeRevisionMarkers'](_0x50d09d['children']),_0x50d09d['attributes']=_0x50d09d['attributes']['filter'](_0x31ed65=>!_0x31ed65[0x0]['startsWith']('data-revision-')));}),_0xa1a11d;}};function pt(_0x3a2950,_0x15703e,_0x6f7083){const t=_0x3a2950['t'];switch(_0x15703e){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'},_0x6f7083);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x6f7083);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'';}}var _t=class extends _0x3551b1{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x2238bc,mt,wt,_0xcc9a28];}constructor(_0x4f910d){super(_0x4f910d),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new yt(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x36cd7a=_0x1e8bcb();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x36cd7a},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x58ddf7=this['repository']['getRevision'](0x0),_0x3a810a=_0x58ddf7&&null===_0x58ddf7['creator']?_0x58ddf7:null;if(this['_continueCurrentRevision']=!!_0x3a810a&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x2ba4c8=this['_source']['getCurrentRevisionId'](),_0x191e4d=this['repository']['getRevision'](_0x2ba4c8);if(_0x191e4d)this['_startingVersion']=_0x191e4d['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x871dd6=this['_source']['history']['_operations']['find'](_0x302397=>!_0x302397['_isInit']),_0x23fab4=_0x871dd6?_0x871dd6['baseVersion']:this['_source']['history']['version'];_0x58ddf7?(_0x58ddf7['toVersion']<_0x23fab4&&_0x58ddf7['_update']({'toVersion':_0x23fab4}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3a810a['id'],this['_startingVersion']=_0x3a810a['fromVersion']):(this['_startingVersion']=_0x58ddf7['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x23fab4,this['_continueCurrentRevision']=!0x1);}}else _0x3a810a&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3a810a['toVersion'],this['editor']['model']['document']['history']['version']),_0x3a810a['fromVersion']===_0x3a810a['toVersion']?(0x0!==_0x3a810a['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3a810a['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3a810a['id'],this['_startingVersion']=_0x3a810a['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',_0x5935b0=>!_0x5935b0),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3f1a41=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x190da8;for(const _0xff6800 in _0x3f1a41){const _0xd2a4d1=_0xff6800,_0x46a08f=_0x3f1a41[_0xd2a4d1];if('revisionHistoryLicenseKeyValid'==_0x46a08f||'revisionHistoryLicenseKeyInvalid'==_0x46a08f||'revisionHistoryLicenseKeyExpired'==_0x46a08f||'revisionHistoryLicenseKeyDomainLimit'==_0x46a08f||'revisionHistoryLicenseKeyNotAllowed'==_0x46a08f||'revisionHistoryLicenseKeyEvaluationLimit'==_0x46a08f||'revisionHistoryLicenseKeyUsageLimit'==_0x46a08f){delete _0x3f1a41[_0xd2a4d1],_0x190da8=_0x46a08f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x190da8&&_0x3f1a41['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x190da8&&_0x3f1a41['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x190da8&&_0x3f1a41['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x190da8&&_0x3f1a41['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x190da8&&_0x3f1a41['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x190da8&&_0x3f1a41['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x306dd7=this['repository']['getRevision'](0x0),_0x850328=await this['getRevisionDocumentData'](_0x306dd7),_0x1160e8=await this['getRevisionRootsAttributes'](_0x306dd7),_0x3babcf=this['_utils']['getRevisionRootsModelElements'](_0x306dd7);this['_replaceEditorDataWithRevisionData'](_0x850328,_0x1160e8,_0x3babcf);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x511fa5){this['_source']=_0x511fa5;}async['update'](){const _0x232d5a=await this['_source']['getLatestVersion']();if(_0x232d5a>this['currentRevision']['toVersion']){await this['_loadState']();const _0x18f40e=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x232d5a});_0x18f40e['authors']=_0x18f40e['authorsIds']['map'](_0x10748c=>this['editor']['plugins']['get']('Users')['getUser'](_0x10748c)),this['currentRevision']['_update'](_0x18f40e);}}async['saveRevision'](_0x1c16a7={},_0x1e82ef=null){const _0x5079f3=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x1e82ef>this['currentRevision']['toVersion']&&(_0x1e82ef=null),null===_0x1e82ef&&(_0x1e82ef=await this['_source']['getLatestVersion']());const _0xdcece2=this['_getFromVersion'](_0x1e82ef),_0x41830e=this['buildRevisionData']({'from':_0xdcece2,'to':_0x1e82ef});if(this['currentRevision']['toVersion']<_0x1e82ef){const _0x5eb7df=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x1e82ef,'to':_0x1e82ef});_0x5eb7df['authors']=[],_0x5eb7df['authorsIds']=[],_0x5eb7df['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x5eb7df,!0x0),delete _0x5eb7df['authors'],_0x5079f3['push'](_0x5eb7df);}_0x1c16a7['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1c16a7['name']=_0x1c16a7['name']||null,_0x1c16a7['id']=_0x1c16a7['id']||_0x1e8bcb(),_0x1c16a7={..._0x1c16a7,..._0x41830e};const _0x458916=this['addRevisionData'](_0x1c16a7);_0x5079f3['push'](_0x1c16a7);const _0x1870d8=this['repository']['getIndex'](_0x458916);if(0x0!==_0x1870d8){const _0x3b1b5e=this['repository']['getRevision'](_0x1870d8-0x1);if(_0x3b1b5e['fromVersion']!==_0x1e82ef){const _0x352489=this['_revisionDataBuilder']['getData'](_0x1e82ef,_0x3b1b5e['toVersion']),_0x489b9a={'id':_0x3b1b5e['id'],'diffData':_0x352489['diffData'],'authorsIds':_0x352489['authorsIds'],'authors':_0x352489['authorsIds']['map'](_0x295f18=>this['editor']['plugins']['get']('Users')['getUser'](_0x295f18)),'fromVersion':_0x1e82ef};_0x3b1b5e===this['currentRevision']&&(_0x489b9a['createdAt']=new Date(_0x1c16a7['createdAt']['getTime']()+0xa)),_0x3b1b5e['_update'](_0x489b9a,!0x0),delete _0x489b9a['authors'],_0x5079f3['push'](_0x489b9a);}}if(this['adapter']){for(const _0x165c2d of _0x5079f3)this['_bufferUpdate'](_0x165c2d['id'],_0x165c2d,!0x0);this['sendBufferedUpdates']();}return _0x458916;}['addRevisionData'](_0x4efbad){const _0x291792=this['repository']['createRevision'](_0x4efbad);return this['adapter']&&_0x291792['on']('_update',(_0x4519e4,_0x43aa10,_0x19b72d)=>{_0x19b72d||(this['_bufferUpdate'](_0x43aa10['id'],_0x43aa10,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x291792,this['_findInsertionIndex'](_0x291792)),_0x291792;}async['getRevisionDocumentData'](_0x46b402){return await this['_utils']['loadRevisionData'](_0x46b402,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x46b402);}async['getRevisionRootsAttributes'](_0x3a9b28){return await this['_utils']['loadRevisionData'](_0x3a9b28,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3a9b28);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x267fe0=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x30aa52=0x0;_0x30aa52<_0x267fe0['length'];_0x30aa52++){const _0x579e78=_0x267fe0[_0x30aa52];let _0x263a65=!0x1;for(const _0x54dee1 of Object['keys'](_0x579e78))void 0x0===_0x579e78[_0x54dee1]?delete _0x579e78[_0x54dee1]:'id'!==_0x54dee1&&(_0x263a65=!0x0);_0x263a65||(_0x267fe0[_0x30aa52]=null);}if(_0x267fe0=_0x267fe0['filter'](_0x226780=>null!==_0x226780),!_0x267fe0['length'])return;for(let _0x1f96dd=0x0;_0x1f96dd<_0x267fe0['length'];_0x1f96dd++){const _0x2cd497=_0x267fe0[_0x1f96dd];void 0x0!==_0x2cd497['fromVersion']&&void 0x0===_0x2cd497['toVersion']&&(_0x2cd497['toVersion']=this['repository']['getRevision'](_0x2cd497['id'])['toVersion']),void 0x0!==_0x2cd497['toVersion']&&void 0x0===_0x2cd497['fromVersion']&&(_0x2cd497['fromVersion']=this['repository']['getRevision'](_0x2cd497['id'])['fromVersion']);}const _0x4dd09d=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x267fe0,_0x4dd09d)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x318a52=>{if(_0x318a52){for(const _0x229fce of _0x318a52)this['setRevisionData']({'id':_0x229fce['id'],'createdAt':_0x229fce['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x51dbde=null,from:_0x4a1140=null,to:_0x210d57=null}){_0x4a1140=null!==_0x4a1140?_0x4a1140:_0x51dbde['fromVersion'],_0x210d57=null!==_0x210d57?_0x210d57:_0x51dbde['toVersion'];const _0x242a77=this['_revisionDataBuilder']['getData'](_0x4a1140,_0x210d57),_0x3de017={'diffData':_0x242a77['diffData'],'authorsIds':_0x242a77['authorsIds'],'fromVersion':_0x4a1140,'toVersion':_0x210d57};if(!_0x51dbde||_0x210d57!==_0x51dbde['toVersion']){const _0x994225=_0x210d57-0x1,_0x5d7fe4=this['_source']['history']['getOperation'](_0x994225);_0x3de017['createdAt']=_0x5d7fe4&&_0x5d7fe4['createdAt']||new Date();}if(this['_loadedStateData']&&_0x4a1140===this['_loadedStateData']['fromVersion']){for(const _0x28ffe8 of this['_loadedStateData']['authors'])_0x3de017['authorsIds']['includes'](_0x28ffe8['id'])||_0x3de017['authorsIds']['push'](_0x28ffe8['id']);}return _0x3de017;}['_bufferUpdate'](_0x20986b,_0x44ee72,_0x47279f){if(this['_bufferedUpdates']['has'](_0x20986b)){const _0x2cdb56=this['_bufferedUpdates']['get'](_0x20986b);_0x44ee72=_0x47279f?{..._0x2cdb56,..._0x44ee72}:{..._0x44ee72,..._0x2cdb56};}this['_bufferedUpdates']['set'](_0x20986b,_0x44ee72);}['setRevisionData'](_0x3f59b5){const _0x42aea1=this['repository']['getRevision'](_0x3f59b5['id']);if(_0x3f59b5['createdAt']&&(_0x3f59b5['createdAt']=new Date(_0x3f59b5['createdAt'])),_0x3f59b5['authorsIds']){const _0x42bd16=this['editor']['plugins']['get']('Users');_0x3f59b5['authors']=_0x3f59b5['authorsIds']['map'](_0x4c8e1a=>_0x42bd16['getUser'](_0x4c8e1a));}_0x42aea1['_update'](_0x3f59b5,!0x0);}['_createInitialRevision'](_0x24e192){const _0x30a5b9=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x30a5b9)this['_initialRevisionId']=_0x30a5b9['id'];else{const _0xd90320=!this['editor']['model']['document']['roots']['find'](_0x19681c=>this['editor']['model']['hasContent'](_0x19681c)),_0x392bad=this['editor']['plugins']['get']('Users')['me']['id'],_0x573d6a=pt(this['editor']['locale'],_0xd90320?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x24e192,'to':_0x24e192,'id':this['_initialRevisionId'],'name':_0x573d6a,'creatorId':_0x392bad});}}['_createCurrentRevision'](_0x1be804){const _0x492aee=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x492aee),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1be804,'to':_0x1be804,'id':_0x492aee,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x599a1d,_0x2520b0,_0x17725f){const _0x3486f4={},_0x44e2f9={},_0x4a8de8={},_0x30536b=this['editor']['config']['get']('roots')||{};for(const [_0x42ad8a,_0x3dfbaf]of Object['entries'](_0x30536b))_0x3dfbaf['lazyLoad']||(_0x3486f4[_0x42ad8a]=_0x3dfbaf['initialData']??'',_0x44e2f9[_0x42ad8a]=_0x3dfbaf['modelAttributes']||{},_0x3dfbaf['modelElement']&&(_0x4a8de8[_0x42ad8a]=_0x3dfbaf['modelElement']));for(const _0x3e5275 of this['editor']['model']['document']['getRootNames']())_0x3486f4[_0x3e5275]??='',_0x44e2f9[_0x3e5275]??={};let _0x21127e=!0x1;const _0x34557b=Object['keys'](_0x3486f4),_0x44bd1c=Object['keys'](_0x599a1d);for(const _0xdfef94 of _0x34557b){if(_0x3486f4[_0xdfef94]!==_0x599a1d[_0xdfef94]&&''!==_0x3486f4[_0xdfef94]['trim']()){_0x21127e=!0x0;break;}if(!_0x5a3c2a(_0x44e2f9[_0xdfef94],_0x2520b0[_0xdfef94])&&Object['keys'](_0x44e2f9[_0xdfef94])['length']>0x0){_0x21127e=!0x0;break;}const _0x2eb55e=_0x4a8de8[_0xdfef94],_0x31f5b2=_0x17725f[_0xdfef94];if(_0x2eb55e&&_0x31f5b2&&_0x2eb55e!==_0x31f5b2){_0x21127e=!0x0;break;}}_0x21127e||(_0x21127e=_0x44bd1c['some'](_0x1c5719=>!this['editor']['model']['document']['getRoot'](_0x1c5719))),_0x21127e&&_0x21743e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3486f4,'editorRootsAttributes':_0x44e2f9,'editorRootsModelElements':_0x4a8de8,'revisionData':_0x599a1d,'revisionRootsAttributes':_0x2520b0,'revisionRootsModelElements':_0x17725f});for(const [_0x398a79,_0x4b73ce]of Object['entries'](_0x599a1d))this['editor']['config']['set']('roots.'+_0x398a79+'.initialData',_0x4b73ce);for(const [_0x5b05d5,_0xe241e5]of Object['entries'](_0x2520b0))this['editor']['config']['set']('roots.'+_0x5b05d5+'.modelAttributes',_0xe241e5);const _0x36af19=this['editor']['model']['document'];for(const [_0x50b7e5,_0x2fd059]of Object['entries'](_0x17725f)){this['editor']['config']['set']('roots.'+_0x50b7e5+'.modelElement',_0x2fd059);const _0x544e8c=_0x36af19['getRoot'](_0x50b7e5);_0x544e8c&&_0x544e8c['name']!==_0x2fd059&&(_0x36af19['roots']['remove'](_0x50b7e5),_0x36af19['createRoot'](_0x2fd059,_0x50b7e5));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x49d2e8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x49d2e8['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x56de77){const _0x32f481=this['repository']['getRevisions']();_0x32f481['reverse']();let _0x2f7d0b=0x0;for(;_0x2f7d0b<_0x32f481['length'];){const _0xfdcb2c=_0x32f481[_0x2f7d0b];if(_0xfdcb2c===this['currentRevision']){_0x2f7d0b++;continue;}if(_0xfdcb2c['id']===this['_initialRevisionId'])break;const _0x37514d=_0x56de77['toVersion']-_0xfdcb2c['toVersion']||_0x56de77['fromVersion']-_0xfdcb2c['fromVersion'];if(_0x37514d>0x0)break;if(_0x37514d<0x0)_0x2f7d0b++;else{if(!_0x56de77['creator']&&_0xfdcb2c['creator'])break;if(_0xfdcb2c['creator']||!_0x56de77['creator']){if(_0x56de77['createdAt']>_0xfdcb2c['createdAt'])break;_0x2f7d0b++;}else _0x2f7d0b++;}}return _0x2f7d0b;}['_getFromVersion'](_0x52ab02){const _0x24e0b2=this['repository']['getRevisions']();_0x24e0b2['reverse'](),_0x24e0b2['shift']();const _0x52cc68=_0x24e0b2['find'](_0x5153f3=>_0x5153f3['toVersion']<=_0x52ab02)['toVersion'];return _0x52cc68<this['_startingVersion']?this['_startingVersion']:_0x52cc68;}['_makeRevision']({name:_0x48ce88,from:_0xe5748a,to:_0x30456d,creatorId:_0x4d0eae,id:_0x2f2e64}){const _0x5f50e0=this['buildRevisionData']({'from':_0xe5748a,'to':_0x30456d});_0x5f50e0['name']=_0x48ce88,_0x5f50e0['creatorId']=_0x4d0eae,_0x5f50e0['id']=_0x2f2e64;const _0x25ef03=this['addRevisionData'](_0x5f50e0);return this['adapter']&&this['_bufferUpdate'](_0x5f50e0['id'],_0x5f50e0,!0x0),_0x25ef03;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},yt=class{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x593712){this['editor']=_0x593712,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'](_0xaed508){this['source']=_0xaed508;const _0x1448c8=new Map(),_0x36d448=new Map(),_0x2f4730=this['editor']['model']['document']['roots']['map'](_0x1c0531=>_0x1c0531['rootName']);for(const _0x1f4cc8 of _0x2f4730){const _0x5a6ce1=this['editor']['model']['document']['getRoot'](_0x1f4cc8),_0x1ab6c0=bt(_0x5a6ce1);_0x1448c8['set'](_0x1f4cc8,_0x1ab6c0),_0x36d448['set'](_0x1f4cc8,Object['fromEntries'](_0x5a6ce1['getAttributes']()));}const _0x16b6d3=Array['from'](this['editor']['model']['markers'])['map'](_0x55f61d=>[_0x55f61d['name'],_0x55f61d['getRange']()]),_0x473127=this['source']['version'];this['_saveMetaData'](_0x473127,_0x1448c8,_0x16b6d3,_0x36d448),this['_startingRevisionId']=this['_revisionId'];const _0xfba9a9=new Map(),_0x8174fa=new Map();for(const _0x11f595 of _0x2f4730){const _0xcd8610=Rt(_0x11f595,this['editor']['model']['document']['getRoot'](_0x11f595)['name']);_0xfba9a9['set'](_0x11f595,_0xcd8610),_0x8174fa['set'](_0x11f595,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0xfba9a9,[],_0x8174fa);}['getData'](_0x4594a8,_0x53a2b3){if(this['_lastFrom']===_0x4594a8&&this['_lastTo']<=_0x53a2b3)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x53a2b3,!0x0);else{if(!this['_savedMetaData']['has'](_0x4594a8)){const _0x274a75=this['_getPreviousFrom'](_0x4594a8);this['_calculateMetaData'](_0x274a75,_0x4594a8,!0x1);}this['_calculateMetaData'](_0x4594a8,_0x53a2b3,!0x0);}return this['_lastFrom']=_0x4594a8,this['_lastTo']=_0x53a2b3,this['_getState']();}['loadState'](_0x53d7b1){if(!this['_savedMetaData']['has'](_0x53d7b1['fromVersion'])){const _0x5e6070=this['_getPreviousFrom'](_0x53d7b1['fromVersion']);this['_calculateMetaData'](_0x5e6070,_0x53d7b1['fromVersion'],!0x1);}this['_calculateMetaData'](_0x53d7b1['fromVersion'],_0x53d7b1['toVersion'],!0x1);const _0x4e3b17=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x53d7b1['fromVersion'],this['_lastTo']=_0x53d7b1['toVersion'];for(const _0x61b298 in _0x53d7b1['diffData']){const _0x42f317=_0x53d7b1['diffData'][_0x61b298]['attachChange'],_0x1c6847=_0x523aea(_0x53d7b1['diffData'][_0x61b298]['attributesBefore'])||{},_0x107e80=_0x53d7b1['diffData'][_0x61b298],_0x741671=_0x4e3b17['_makeModelFromViewString'](_0x107e80['deletions'],_0x107e80['rootElementName']||'$root');_0x741671['rootName']=_0x61b298,_0x741671['_isAttached']=!_0x42f317||!_0x42f317['isAttached'],_0x741671['isAttached']=()=>_0x741671['_isAttached'],this['_baseRoots']['set'](_0x61b298,_0x741671),this['_baseRootsAttributes']['set'](_0x61b298,_0x1c6847),_0x42f317&&this['_touchedRoots']['set'](_0x61b298,_0x42f317);const _0x221872=this['_makeIdsRoot'](_0x741671);this['_baseIdsRoots']['set'](_0x61b298,_0x221872);for(const [_0x26f17f,_0x568e6f]of _0x741671['markers']){if(!_0x26f17f['startsWith']('revision:'))continue;const _0x40920f=_0x26f17f['split'](':')[0x2];for(const _0x1d366f of _0x568e6f['getWalker']({'singleCharacters':!0x0})){const _0xb8e69f=this['_getVidAttributeName'](_0x1d366f),_0x5c1743='elementEnd'==_0x1d366f['type']?_0x1d366f['previousPosition']['path']['slice'](0x0,-0x1):_0x1d366f['previousPosition']['path'],_0x2945ef=_0x221872['getNodeByPath'](_0x5c1743)['getAttribute'](_0xb8e69f);this['_touched']['set'](_0x2945ef,{'userId':_0x40920f});}_0x741671['markers']['delete'](_0x26f17f);}}this['_startingRevisionId']=this['_revisionId'];const _0x55919f=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x8d8d95=>!this['_touched']['has'](_0x8d8d95));let _0x18417e=0x0;const _0x104267=new Map();for(const _0x4741ea in _0x53d7b1['diffData']){const _0x161ec2=_0x53d7b1['diffData'][_0x4741ea]['attachChange'],_0x4fd3b6=_0x523aea(_0x53d7b1['diffData'][_0x4741ea]['attributesAfter'])||{},_0x598d67=_0x53d7b1['diffData'][_0x4741ea],_0x42b5a4=_0x4e3b17['_makeModelFromViewString'](_0x598d67['insertions'],_0x598d67['rootElementName']||'$root');_0x42b5a4['rootName']=_0x4741ea,_0x42b5a4['_isAttached']=!_0x161ec2||_0x161ec2['isAttached'],_0x42b5a4['isAttached']=()=>_0x42b5a4['_isAttached'],this['_diffRoots']['set'](_0x4741ea,_0x42b5a4),this['_diffRootsAttributes']['set'](_0x4741ea,_0x4fd3b6);const _0x2774c9=this['_makeIdsRoot'](_0x42b5a4,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4741ea,_0x2774c9),_0x104267['set'](_0x4741ea,_0x42b5a4['isAttached']()?_0x4fd3b6:{});for(const [_0x5a8e73,_0x25c214]of _0x42b5a4['markers']){if(!_0x5a8e73['startsWith']('revision:'))continue;const _0x4b65c0=_0x5a8e73['split'](':')[0x2];for(const _0x1a768f of _0x25c214['getWalker']({'singleCharacters':!0x0})){const _0x4bcdf7=this['_getVidAttributeName'](_0x1a768f),_0x9a9407=this['_revisionId']++,_0x5cb5d2='elementEnd'==_0x1a768f['type']?_0x1a768f['previousPosition']['path']['slice'](0x0,-0x1):_0x1a768f['previousPosition']['path'];_0x2774c9['getNodeByPath'](_0x5cb5d2)['_setAttribute'](_0x4bcdf7,_0x9a9407),this['_touched']['set'](_0x9a9407,{'userId':_0x4b65c0});}_0x42b5a4['markers']['delete'](_0x5a8e73);}for(const _0x5592cf of this['editor']['model']['createRangeIn'](_0x42b5a4)['getWalker']({'singleCharacters':!0x0})){const _0x478917=this['_getVidAttributeName'](_0x5592cf),_0x20cd90='elementEnd'==_0x5592cf['type']?_0x5592cf['previousPosition']['path']['slice'](0x0,-0x1):_0x5592cf['previousPosition']['path'],_0x3a29a8=_0x2774c9['getNodeByPath'](_0x20cd90);_0x3a29a8['getAttribute'](_0x478917)>0x0||_0x3a29a8['_setAttribute'](_0x478917,_0x55919f[_0x18417e++]);}for(const [_0xf3d0fa,_0x2bdb8d]of _0x42b5a4['markers'])_0xf3d0fa['startsWith']('revision:')||this['_markers']['set'](_0xf3d0fa,_0x2bdb8d);}const {roots:_0x81d3a1}=this['_savedMetaData']['get'](_0x53d7b1['fromVersion']),{roots:_0x32ed03}=this['_savedMetaData']['get'](_0x53d7b1['toVersion']),_0x1ceb1d=bt(_0x81d3a1['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x1ceb1d),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1ceb1d,Number['NEGATIVE_INFINITY']));const _0x33a6b4=bt(_0x32ed03['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x33a6b4),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x33a6b4));const _0x2a5b21=Array['from'](this['_diffRoots'])['map'](([_0x45d765,_0x5b2df3])=>[_0x45d765,bt(_0x5b2df3)]);this['_saveMetaData'](this['_lastTo'],_0x2a5b21,this['_markers'],_0x104267);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x30a220,_0x3f80ac,_0x2aba30,_0x804cc4){const _0x247a9e=new Map(_0x3f80ac),_0x1060a1=new Map(_0x523aea(_0x804cc4)),_0x5b2688=new Map();for(const [_0x68c066,_0x8ed021]of _0x2aba30)_0x5b2688['set'](_0x68c066,{'start':_0x8ed021['start']['clone'](),'end':_0x8ed021['end']['clone'](),'rootName':_0x8ed021['root']['rootName']});this['_savedMetaData']['set'](_0x30a220,{'roots':_0x247a9e,'markers':_0x5b2688,'rootsAttributes':_0x1060a1});}['_removeMetaData'](_0x3561db){this['_savedMetaData']['delete'](_0x3561db);}['_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'](_0x2f8e2c,_0x5313ff=null){let _0xeb2106=null;_0x2f8e2c['is']('documentFragment')||(_0xeb2106=new _0x2f872d(_0x2f8e2c['name'],{'vid_start':null===_0x5313ff?this['_revisionId']++:_0x5313ff++}));const _0x350a92=[];for(const _0x21f6cc of _0x2f8e2c['getChildren']())if(_0x21f6cc['is']('element')){_0x350a92['push'](this['_makeIdsRoot'](_0x21f6cc,_0x5313ff));const _0x32f7f9=_0x350a92[_0x350a92['length']-0x1];null!==_0x5313ff&&(_0x5313ff=_0x32f7f9['is']('element','$text')?_0x32f7f9['getAttribute']('vid')+0x1:_0x32f7f9['getAttribute']('vid_end')+0x1);}else{for(let _0x76aef6=0x0;_0x76aef6<_0x21f6cc['offsetSize'];_0x76aef6++)_0x350a92['push'](new _0x2f872d('$text',{'vid':null===_0x5313ff?this['_revisionId']++:_0x5313ff++}));}if(_0x2f8e2c['is']('documentFragment')){const _0x364b95=Rt(_0x2f8e2c['rootName'],_0x2f8e2c['name']);return _0x364b95['_insertChild'](0x0,_0x350a92),_0x364b95;}return _0xeb2106['_setAttribute']('vid_end',null===_0x5313ff?this['_revisionId']++:_0x5313ff++),_0xeb2106['_insertChild'](0x0,_0x350a92),_0xeb2106;}['_calculateMetaData'](_0x78f9aa,_0x519418,_0x296d1a){this['_reset']();const {roots:_0x3bfbe2,markers:_0x2e7089,rootsAttributes:_0x3aa2fe}=this['_savedMetaData']['get'](_0x78f9aa);this['_baseRoots']=new Map(_0x3bfbe2),this['_baseRootsAttributes']=new Map(_0x523aea(_0x3aa2fe));for(const [_0x104d1c,_0xad34fc]of this['_baseRoots'])if('$graveyard'!==_0x104d1c&&(this['_diffRoots']['set'](_0x104d1c,bt(_0xad34fc)),this['_diffRootsAttributes']=new Map(_0x523aea(_0x3aa2fe)),_0x296d1a)){const _0x542dcb=this['_revisionId'];this['_idsRoots']['set'](_0x104d1c,this['_makeIdsRoot'](_0xad34fc)),this['_baseIdsRoots']['set'](_0x104d1c,this['_makeIdsRoot'](_0xad34fc,_0x542dcb));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x296d1a&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x58b381,_0x32cd7e]of _0x2e7089){const _0x4fb90a=this['_baseRoots']['get'](_0x32cd7e['rootName']),_0x2c0afc=this['_diffRoots']['get'](_0x32cd7e['rootName']),_0xc413c0=new _0x9684f(this['_fixPosition'](_0x32cd7e['start'],_0x4fb90a),this['_fixPosition'](_0x32cd7e['end'],_0x4fb90a)),_0x4d96dc=this['_fixRange'](_0xc413c0,_0x2c0afc);_0x4fb90a['markers']['set'](_0x58b381,_0xc413c0),this['_markers']['set'](_0x58b381,_0x4d96dc);}this['_applyOperations'](_0x78f9aa,_0x519418,_0x296d1a);}['_applyOperations'](_0x14c71f,_0x111f48,_0x42a162){for(const _0x2d11da of this['source']['getOperations'](_0x14c71f,_0x111f48))this['_handleOperation'](_0x2d11da,_0x42a162);for(const _0x12be76 of this['_diffRoots']['values']())_0x12be76['markers']['clear']();for(const [_0x1557c5,_0x30819f]of this['_markers'])this['_diffRoots']['get'](_0x30819f['root']['rootName'])['markers']['set'](_0x1557c5,_0x30819f['clone']());const _0x299f72=new Map(),_0x1ffbc6=new Map();for(const [_0x2185d3,_0x1e05fe]of this['_diffRoots'])_0x299f72['set'](_0x2185d3,bt(_0x1e05fe)),_0x1ffbc6['set'](_0x2185d3,this['_diffRootsAttributes']['get'](_0x2185d3));this['_saveMetaData'](_0x111f48,_0x299f72,this['_markers'],_0x1ffbc6);}['_getPreviousFrom'](_0x2a44d7){const _0xa226a6=Array['from'](this['_savedMetaData']['keys']());_0xa226a6['sort']((_0x63db5e,_0x45da53)=>_0x63db5e-_0x45da53),_0xa226a6['reverse']();for(const _0x266d72 of _0xa226a6)if(_0x266d72<_0x2a44d7)return _0x266d72;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x595fae,_0x1d709a){const _0x40fec4=Array['from'](_0x1d709a['markers'])['map'](([_0x192489,_0x27b686])=>[_0x192489,this['_fixRange'](_0x27b686,_0x595fae)]);_0x595fae['markers']=new Map(_0x40fec4);}['_transformMarkers'](_0x2d02da){for(const _0x1d859b of this['_markers']['values']()){const _0x25c8aa=_0x1d859b['getTransformedByOperation'](_0x2d02da),_0x38239c=_0x9684f['_createFromRanges'](_0x25c8aa);_0x1d859b['start']=_0x38239c['start'],_0x1d859b['end']=_0x38239c['end'];}}['_handleOperation'](_0x3c1882,_0x10922c){if('addRoot'!=_0x3c1882['type']&&'detachRoot'!=_0x3c1882['type']){if('insert'==_0x3c1882['type']){const _0x279cf5=_0x3c1882['position']['root'],_0x10fc7e=_0x279cf5['rootName'],_0x2b6723=_0x279cf5['name'];this['_diffRoots']['has'](_0x10fc7e)||(this['_diffRoots']['set'](_0x10fc7e,Rt(_0x10fc7e,_0x2b6723,!0x0)),this['_diffRootsAttributes']['set'](_0x10fc7e,{}),_0x10922c&&this['_idsRoots']['set'](_0x10fc7e,Rt(_0x10fc7e,_0x2b6723,!0x0)));}else{if('addRootAttribute'==_0x3c1882['type']||'removeRootAttribute'==_0x3c1882['type']||'changeRootAttribute'==_0x3c1882['type'])return void this['_handleRootAttributeOperation'](_0x3c1882);'marker'==_0x3c1882['type']&&this['_handleMarkerOperation'](_0x3c1882);}if('marker'!==_0x3c1882['type']){const _0x4e7ca0=this['_cloneOperation'](_0x3c1882,this['_diffRoots']);_0x4e7ca0['_execute'](),this['_transformMarkers'](_0x4e7ca0);}if(_0x10922c)switch(_0x3c1882['type']){case'insert':this['_handleInsertOperation'](_0x3c1882);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3c1882);break;case'merge':this['_handleMergeOperation'](_0x3c1882);break;case'split':this['_handleSplitOperation'](_0x3c1882);}}else this['_handleRootOperation'](_0x3c1882,_0x10922c);}['_cloneOperation'](_0x5d1985,_0x2a94b2){const _0x34eecc=_0x5d1985['clone']();return _0x34eecc['_authorId']=_0x5d1985['_authorId'],this['_fixOperation'](_0x34eecc,_0x2a94b2),_0x34eecc;}['_getBaseVids'](_0x5197e4){return _0x5197e4['map'](_0x86ca00=>{const _0x49968f=this['_getVidAttributeName'](_0x86ca00);return Number(_0x86ca00['item']['getAttribute'](_0x49968f));});}['_generateTape'](_0x5095e4,_0x54c20e){if(_0x5095e4['is']('element','$text'))_0x54c20e['push']({'item':_0x5095e4,'type':'text'});else{_0x5095e4['is']('element')&&_0x54c20e['push']({'item':_0x5095e4,'type':'elementStart'});for(const _0x28714f of _0x5095e4['getChildren']())this['_generateTape'](_0x28714f,_0x54c20e);_0x5095e4['is']('element')&&_0x54c20e['push']({'item':_0x5095e4,'type':'elementEnd'});}return _0x54c20e;}['_getState'](){const _0x8c18e8=new Map(this['_touched']),_0x3de2a6=new Map(_0x8c18e8),_0x3210a9=new Map(),_0xc27798={'insertions':{},'deletions':{}},_0x2ce87b={'insertions':{},'deletions':{}},_0xe320b0=new Map(),_0x9303ec=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x8aeba7=new Map();_0x9303ec['delete']('$graveyard');for(const _0x20640c of _0x9303ec){const _0x40e0b2=(this['_diffRoots']['get'](_0x20640c)??this['_baseRoots']['get'](_0x20640c))['name'],_0x2b5700=this['_diffRoots']['get'](_0x20640c)||Rt(_0x20640c,_0x40e0b2,!0x1),_0x5d2e1a=this['_baseRoots']['get'](_0x20640c)||Rt(_0x20640c,_0x40e0b2,!0x1);_0x2b5700['isAttached']()||_0x5d2e1a['isAttached']()?(_0x8aeba7['set'](_0x20640c,_0x40e0b2),_0xc27798['insertions'][_0x20640c]=bt(_0x2b5700),_0xc27798['deletions'][_0x20640c]=bt(_0x5d2e1a),this['_copyMarkers'](_0xc27798['deletions'][_0x20640c],_0x5d2e1a),this['_copyMarkers'](_0xc27798['insertions'][_0x20640c],_0x2b5700),_0x2ce87b['insertions'][_0x20640c]=this['_generateTape'](this['_idsRoots']['get'](_0x20640c),[]),_0x2ce87b['deletions'][_0x20640c]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x20640c)||Rt(_0x20640c,_0x40e0b2,!0x1),[])):_0x9303ec['delete'](_0x20640c);}for(const _0x3742b4 of _0x9303ec){const _0x4f1c51=_0x2ce87b['insertions'][_0x3742b4];for(const _0x3d3268 of _0x4f1c51){const _0x200cb3=this['_getVidAttributeName'](_0x3d3268),_0x4ab505=_0x3d3268['item']['getAttribute'](_0x200cb3);_0x3de2a6['delete'](_0x4ab505),_0x4ab505>=this['_startingRevisionId']&&_0x3210a9['set'](_0x4ab505,_0x8c18e8['get'](_0x4ab505));}}for(const _0x25112a of _0x9303ec){const _0x50b351=_0x2ce87b['insertions'][_0x25112a],_0x356d50=this['_getBaseVids'](_0x2ce87b['deletions'][_0x25112a]);let _0x512e97=0x0;for(const _0x56dd12 of _0x50b351){const _0x5989e3=this['_getVidAttributeName'](_0x56dd12),_0x435c4e=_0x56dd12['item']['getAttribute'](_0x5989e3);if(!_0x3210a9['has'](_0x435c4e)&&!_0xe320b0['has'](_0x435c4e)){if(_0x3de2a6['has'](_0x435c4e))_0x512e97++;else{if(_0x435c4e!=_0x356d50[_0x512e97]){const _0x5f51a9=_0x8c18e8['get'](_0x435c4e)||_0x8c18e8['get'](_0x356d50[_0x512e97]);for(;_0x435c4e!=_0x356d50[_0x512e97];)_0x3de2a6['has'](_0x356d50[_0x512e97])||(_0xe320b0['set'](_0x356d50[_0x512e97],_0x5f51a9),_0x8c18e8['set'](_0x356d50[_0x512e97],_0x5f51a9)),_0x512e97++;}_0x512e97++;}}}}for(const _0x57467d of _0x9303ec){const _0xd1e281=_0x2ce87b['insertions'][_0x57467d];for(const _0x4417d7 of _0xd1e281){const _0x34ce81=this['_getVidAttributeName'](_0x4417d7),_0x2f3298=_0x4417d7['item']['getAttribute'](_0x34ce81);if(_0xe320b0['has'](_0x2f3298)){const _0x2e6f92=_0xe320b0['get'](_0x2f3298);_0x3de2a6['has'](_0x2f3298)||_0x3de2a6['set'](_0x2f3298,{..._0x2e6f92}),_0x3210a9['set'](_0x2f3298,{..._0x2e6f92});}}}for(const _0x593c6e of _0x3de2a6['keys']())_0x593c6e>=this['_startingRevisionId']&&_0x3de2a6['delete'](_0x593c6e);const _0x1fefe3=new Map();for(const _0xe6800f of _0x9303ec){let _0x40ae02=_0x2ce87b['insertions'][_0xe6800f];for(const _0x957514 of _0x40ae02)if(_0x957514['item']['is']('element','tableCell')){const _0x31999f=this['_getVidAttributeName'](_0x957514),_0x589a60=_0x957514['item']['getAttribute'](_0x31999f);if(_0x3210a9['has'](_0x589a60)){const _0x1c6ec4=_0x957514['item']['parent']['parent']['getAttribute']('vid_start'),_0x4ceac8=_0x1fefe3['get'](_0x1c6ec4)||new Set();_0x4ceac8['add'](_0x3210a9['get'](_0x589a60)['userId']),_0x1fefe3['set'](_0x1c6ec4,_0x4ceac8);}}_0x40ae02=_0x2ce87b['deletions'][_0xe6800f];for(const _0xc62764 of _0x40ae02)if(_0xc62764['item']['is']('element','tableCell')){const _0x2367f4=this['_getVidAttributeName'](_0xc62764),_0xeddf09=_0xc62764['item']['getAttribute'](_0x2367f4);if(_0x3de2a6['has'](_0xeddf09)){const _0x5c9f45=_0xc62764['item']['parent']['parent']['getAttribute']('vid_start'),_0x41143a=_0x1fefe3['get'](_0x5c9f45)||new Set();_0x41143a['add'](_0x3de2a6['get'](_0xeddf09)['userId']),_0x1fefe3['set'](_0x5c9f45,_0x41143a);}}for(const _0x5b5f46 of _0x1fefe3['keys']())(_0x3210a9['has'](_0x5b5f46)||_0x3de2a6['has'](_0x5b5f46))&&_0x1fefe3['delete'](_0x5b5f46);}for(const _0x1e616a of _0x9303ec){const _0xd74133=_0x2ce87b['insertions'][_0x1e616a];let _0x5af00d=null,_0x5f0546=null;for(const _0xcaf524 of _0xd74133){const _0x5d04cc=this['_getVidAttributeName'](_0xcaf524),_0xeb6013=_0xcaf524['item']['getAttribute'](_0x5d04cc),_0x564d69=_0x1fefe3['get'](_0xeb6013);_0x564d69&&'elementStart'==_0xcaf524['type']&&(_0x5af00d=Array['from'](_0x564d69)[0x0],_0x5f0546=_0xcaf524['item']['getAttribute']('vid_end')),_0x5af00d&&(_0x3de2a6['set'](_0xeb6013,{'userId':_0x5af00d}),_0x3210a9['set'](_0xeb6013,{'userId':_0x5af00d})),_0xeb6013==_0x5f0546&&(_0x5af00d=null,_0x5f0546=null);}}const _0x14cb30={},_0x28e0a8=new Set();for(const _0x27c282 of _0x9303ec){const _0x48fa17=_0xc27798['deletions'][_0x27c282],_0x27494b=_0xc27798['insertions'][_0x27c282];for(const {userId:_0x40cddd}of this['_touchedMarkers']['values']())null!==_0x40cddd&&_0x28e0a8['add'](_0x40cddd);for(const {userId:_0x39930b}of this['_touchedRoots']['values']())null!==_0x39930b&&_0x28e0a8['add'](_0x39930b);this['_markChanges'](_0x27494b,_0x2ce87b['insertions'][_0x27c282],_0x3210a9,'insertion',_0x28e0a8),this['_markChanges'](_0x48fa17,_0x2ce87b['deletions'][_0x27c282],_0x3de2a6,'deletion',_0x28e0a8),_0x14cb30[_0x27c282]={'insertions':this['_prepareViewToSave'](_0x27494b),'deletions':this['_prepareViewToSave'](_0x48fa17),'attachChange':this['_touchedRoots']['get'](_0x27c282)||null,'attributesBefore':_0x523aea(this['_baseRootsAttributes']['get'](_0x27c282))||{},'attributesAfter':_0x523aea(this['_diffRootsAttributes']['get'](_0x27c282)),'rootElementName':_0x8aeba7['get'](_0x27c282)};}return{'diffData':_0x14cb30,'authorsIds':Array['from'](_0x28e0a8)};}['_processRootBeforeSave'](_0x3ce1bc){for(const [,_0x1e2186]of _0x3ce1bc['markers']){const _0x2cc7b9=_0x1e2186['start']['getAncestors']()['filter'](_0x7278e7=>'tableCell'==_0x7278e7['name']);for(const _0x33ae84 of _0x2cc7b9)0x1==_0x33ae84['childCount']&&_0x33ae84['getChild'](0x0)['is']('element','paragraph')&&_0x33ae84['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5bfab6){this['_processRootBeforeSave'](_0x5bfab6);const _0x5b920d=this['editor']['data']['toView'](_0x5bfab6,{}),_0x548773=Array['from'](_0x5b920d['getChildren']())['map'](_0xa569ef=>this['_getViewJson'](_0xa569ef));return JSON['stringify'](_0x548773);}['_getViewJson'](_0x202dea){if(_0x202dea['is']('$text'))return _0x202dea['data'];{const _0x12c141=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4dfc41=_0x202dea,_0x347c23=this['editor']['data']['htmlProcessor']['domConverter'],_0x50d001={'type':_0x12c141['_getTypeCharForViewElement'](_0x4dfc41),'name':_0x4dfc41['name'],'attributes':Array['from'](_0x4dfc41['getAttributes']()),'children':Array['from'](_0x4dfc41['getChildren']())['map'](_0x175d8d=>this['_getViewJson'](_0x175d8d))};if(_0x202dea['is']('uiElement')&&'$comment'!=_0x202dea['name']){const _0x53aa93=_0x202dea['render'](_0x347c23['domDocument'],_0x347c23);_0x50d001['children']['push'](_0x53aa93['outerHTML']);}else{if(_0x202dea['is']('rawElement')){const _0x163148=_0x347c23['domDocument']['createElement'](_0x4dfc41['name']);_0x202dea['render'](_0x163148,_0x347c23),_0x50d001['children']['push'](_0x163148['innerHTML']);}}const _0x3046a1=Array['from'](_0x4dfc41['getCustomProperties']());_0x3046a1['length']>0x0&&(_0x50d001['customProperties']=_0x3046a1);const _0x515bfc=_0x4dfc41['getFillerOffset']();return null!==_0x515bfc&&(_0x50d001['fillerOffset']=_0x515bfc),_0x50d001;}}['_markChanges'](_0x4ee2ed,_0x53500d,_0x39bbcd,_0x2f1535,_0x50d7a3){let _0x36e467=null,_0x2160e5=null,_0x25e50d=0x0;const _0x4b5d22=this['editor']['model'];for(let _0x1e880b=0x0;_0x1e880b<_0x53500d['length'];_0x1e880b++){const _0x509694=this['_getVidAttributeName'](_0x53500d[_0x1e880b]),_0x458497=_0x53500d[_0x1e880b]['item']['getAttribute'](_0x509694),_0x48cec4=_0x39bbcd['get'](_0x458497),_0xed5816=_0x1e880b==_0x53500d['length']-0x1;!_0x36e467&&_0x48cec4&&(_0x36e467=_0x48cec4,_0x2160e5=_0x53500d[_0x1e880b]),!_0x36e467||_0x48cec4&&_0x48cec4['userId']==_0x36e467['userId']||(_0x47c86e(_0x48cec4,kt(_0x2160e5,_0x4ee2ed,_0x4b5d22),kt(_0x53500d[_0x1e880b],_0x4ee2ed,_0x4b5d22)),_0x36e467=_0x48cec4||null,_0x2160e5=_0x48cec4?_0x53500d[_0x1e880b]:null),_0x36e467&&_0xed5816&&_0x47c86e(_0x48cec4,kt(_0x2160e5,_0x4ee2ed,_0x4b5d22),At(_0x53500d[_0x1e880b],_0x4ee2ed,_0x4b5d22));}function _0x47c86e(_0x4377b8,_0x2272dd,_0x32b99e){const _0x543c61=_0x36e467['userId'],_0x4a1580='revision:'+_0x2f1535+':'+_0x543c61+':'+_0x25e50d++,_0xd2e4b2=_0x4b5d22['createRange'](_0x2272dd,_0x32b99e);_0x4ee2ed['markers']['set'](_0x4a1580,_0xd2e4b2),null!==_0x543c61&&_0x50d7a3['add'](_0x543c61);}}['_getVidAttributeName'](_0x1abe61){switch(_0x1abe61['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3047b3,_0x188b01){_0x3047b3['baseVersion']=null;for(const _0x575995 in _0x3047b3){const _0x3a59c3=_0x3047b3[_0x575995];if(_0x3a59c3 instanceof _0x45d50f){const _0x3906a4=_0x188b01['get'](_0x3a59c3['root']['rootName']);_0x3047b3[_0x575995]=this['_fixPosition'](_0x3a59c3,_0x3906a4);}if(_0x3a59c3 instanceof _0x9684f){const _0x4ddf31=_0x188b01['get'](_0x3a59c3['root']['rootName']);_0x3047b3[_0x575995]=this['_fixRange'](_0x3a59c3,_0x4ddf31);}'root'===_0x575995&&(_0x3047b3['root']=_0x188b01['get'](_0x3047b3['root']['rootName']));}}['_fixRange'](_0x54c0ef,_0x761091){return this['editor']['model']['createRange'](this['_fixPosition'](_0x54c0ef['start'],_0x761091),this['_fixPosition'](_0x54c0ef['end'],_0x761091));}['_fixPosition'](_0x140999,_0x1b701b){return this['editor']['model']['createPositionFromPath'](_0x1b701b,_0x140999['path'],_0x140999['stickiness']);}['_handleInsertOperation'](_0x7b45ef){const _0x2fd23c=this['_idsRoots']['get'](_0x7b45ef['position']['root']['rootName']),_0x5de338=this['_fixPosition'](_0x7b45ef['position'],_0x2fd23c),_0x25d5e7=null===_0x7b45ef['_authorId']?null:_0x7b45ef['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x223f89=_0x5de338['parent'],_0x263036=this['_revisionId'],_0x2b2622=[];for(const _0x4252e2 of _0x7b45ef['nodes'])if(_0x4252e2['is']('element'))_0x2b2622['push'](this['_makeIdsRoot'](_0x4252e2));else{for(let _0x405903=0x0;_0x405903<_0x4252e2['offsetSize'];_0x405903++)_0x2b2622['push'](new _0x2f872d('$text',{'vid':this['_revisionId']++}));}const _0x4a6c44=this['_revisionId'];for(let _0x50b11d=_0x263036;_0x50b11d<_0x4a6c44;_0x50b11d++)this['_touched']['set'](_0x50b11d,{'userId':_0x25d5e7});_0x223f89['_insertChild'](_0x5de338['offset'],_0x2b2622);}['_handleMoveOperation'](_0x55d40f){(_0x55d40f=this['_cloneOperation'](_0x55d40f,this['_idsRoots']))['_execute']();const _0x48cdcf=null===_0x55d40f['_authorId']?null:_0x55d40f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x489822=_0x55d40f['getMovedRangeStart'](),_0x408ac5=_0x489822['parent'],_0x2019ec=_0x489822['offset'];!function _0x57d7fc(_0x13c319,_0x5cf2ad,_0x46a959,_0xf3c66b){for(let _0x4e158a=_0x46a959;_0x4e158a<_0xf3c66b;_0x4e158a++){const _0x3f9da5=_0x5cf2ad['getChild'](_0x4e158a);_0x3f9da5['is']('element','$text')?_0x13c319['set'](_0x3f9da5['getAttribute']('vid'),{'userId':_0x48cdcf}):(_0x13c319['set'](_0x3f9da5['getAttribute']('vid_start'),{'userId':_0x48cdcf}),_0x57d7fc(_0x13c319,_0x3f9da5,0x0,_0x3f9da5['childCount']),_0x13c319['set'](_0x3f9da5['getAttribute']('vid_end'),{'userId':_0x48cdcf}));}}(this['_touched'],_0x408ac5,_0x2019ec,_0x2019ec+_0x55d40f['howMany']);}['_handleMergeOperation'](_0x263909){const _0x36aaf0=null===(_0x263909=this['_cloneOperation'](_0x263909,this['_idsRoots']))['_authorId']?null:_0x263909['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4577a2=_0x263909['targetPosition']['parent'],_0x20e61f=_0x263909['sourcePosition']['parent'],_0x397e67=_0x4577a2['getAttribute']('vid_end'),_0x45c563=_0x20e61f['getAttribute']('vid_start');_0x4577a2['_setAttribute']('vid_end',_0x20e61f['getAttribute']('vid_end')),_0x20e61f['_setAttribute']('vid_end',_0x397e67),this['_touched']['set'](_0x45c563,{'userId':_0x36aaf0}),this['_touched']['set'](_0x397e67,{'userId':_0x36aaf0}),_0x263909['_execute']();}['_handleSplitOperation'](_0x13a3cb){const _0x232cbd=null===(_0x13a3cb=this['_cloneOperation'](_0x13a3cb,this['_idsRoots']))['_authorId']?null:_0x13a3cb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3952a2=_0x13a3cb['graveyardPosition'],_0x398b5f=_0x13a3cb['splitPosition']['parent'];_0x13a3cb['_execute']();const _0x10db46=_0x398b5f['getAttribute']('vid_end'),_0x1f6235=_0x13a3cb['insertionPosition']['nodeAfter'];if(_0x3952a2){const _0x6f2a8b=_0x1f6235['getAttribute']('vid_end'),_0x515daa=_0x398b5f['getAttribute']('vid_end');_0x398b5f['_setAttribute']('vid_end',_0x6f2a8b),_0x1f6235['_setAttribute']('vid_end',_0x515daa),this['_touched']['set'](_0x398b5f['getAttribute']('vid_end'),{'userId':_0x232cbd}),this['_touched']['set'](_0x1f6235['getAttribute']('vid_start'),{'userId':_0x232cbd});}else{const _0x511a7a=this['_revisionId']++,_0x587223=this['_revisionId']++;_0x398b5f['_setAttribute']('vid_end',_0x511a7a),_0x1f6235['_setAttribute']('vid_start',_0x587223),_0x1f6235['_setAttribute']('vid_end',_0x10db46),this['_touched']['set'](_0x511a7a,{'userId':_0x232cbd}),this['_touched']['set'](_0x587223,{'userId':_0x232cbd});}}['_handleMarkerOperation'](_0x8ba5ab){if(!_0x8ba5ab['affectsData'])return;const _0x3ed922=(_0x8ba5ab=this['_cloneOperation'](_0x8ba5ab,this['_diffRoots']))['oldRange']?_0x8ba5ab['oldRange']['root']:null,_0x55348b=_0x8ba5ab['newRange']?_0x8ba5ab['newRange']['root']:null;_0x3ed922&&this['_markers']['delete'](_0x8ba5ab['name']),_0x55348b&&this['_markers']['set'](_0x8ba5ab['name'],_0x8ba5ab['newRange']['clone']());const _0x4a15a2=null===_0x8ba5ab['_authorId']?null:_0x8ba5ab['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2f5f1f=_0x8ba5ab['name'];if(!this['_touchedMarkers']['has'](_0x2f5f1f))return void this['_touchedMarkers']['set'](_0x2f5f1f,{'range':_0x8ba5ab['oldRange'],'userId':_0x4a15a2});const _0x38eaf5=this['_touchedMarkers']['get'](_0x2f5f1f),_0x3e105f=_0x38eaf5['range'],_0x42399c=_0x8ba5ab['newRange'];null==_0x3e105f&&null==_0x42399c||_0x3e105f&&_0x42399c&&_0x3e105f['isEqual'](_0x42399c)?this['_touchedMarkers']['delete'](_0x8ba5ab['name']):_0x38eaf5['userId']=_0x4a15a2;}['_handleRootOperation'](_0x42f06c,_0x2fb362){this['_diffRoots']['has'](_0x42f06c['rootName'])?this['_diffRoots']['get'](_0x42f06c['rootName'])['_isAttached']=_0x42f06c['isAdd']:(this['_diffRoots']['set'](_0x42f06c['rootName'],Rt(_0x42f06c['rootName'],_0x42f06c['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x42f06c['rootName'],{}),_0x2fb362&&this['_idsRoots']['set'](_0x42f06c['rootName'],Rt(_0x42f06c['rootName'],_0x42f06c['elementName'],!0x0)));const _0x420aee=null===_0x42f06c['_authorId']?null:_0x42f06c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x508030=this['_touchedRoots']['get'](_0x42f06c['rootName']);_0x508030&&_0x508030['userId']===_0x420aee?this['_touchedRoots']['delete'](_0x42f06c['rootName']):this['_touchedRoots']['set'](_0x42f06c['rootName'],{'userId':_0x420aee,'isAttached':_0x42f06c['isAdd']});}['_handleRootAttributeOperation'](_0x498402){const _0x579f31=this['_diffRootsAttributes']['get'](_0x498402['root']['rootName']);null===_0x498402['newValue']?delete _0x579f31[_0x498402['key']]:_0x579f31[_0x498402['key']]=_0x498402['newValue'];}};function bt(_0x185954){const _0x417ab1=Rt(_0x185954['rootName'],_0x185954['name'],_0x185954['isAttached']());for(const _0x3b7758 of _0x185954['getChildren']()){const _0x4e1b72=_0x3b7758['_clone'](!0x0);_0x417ab1['_appendChild'](_0x4e1b72);}return _0x417ab1;}function Rt(_0x568f1f,_0x5d2d8e,_0x5b7096=!0x0){const _0x4b7f65=new _0x50f2d5();return _0x4b7f65['rootName']=_0x568f1f,_0x4b7f65['name']=_0x5d2d8e,_0x4b7f65['_isAttached']=_0x5b7096,_0x4b7f65['isAttached']=()=>_0x4b7f65['_isAttached'],_0x4b7f65;}function kt(_0x35b122,_0x505477,_0x4730d1){const _0x5cdca6='elementEnd'==_0x35b122['type']?_0x4730d1['createPositionAt'](_0x35b122['item'],'end'):_0x4730d1['createPositionBefore'](_0x35b122['item']);return _0x4730d1['createPositionFromPath'](_0x505477,_0x5cdca6['path'],_0x5cdca6['stickiness']);}function At(_0x2f3052,_0x199af3,_0x3a0ba9){const _0x3b8714='elementStart'==_0x2f3052['type']?_0x3a0ba9['createPositionAt'](_0x2f3052['item'],0x0):_0x3a0ba9['createPositionAfter'](_0x2f3052['item']);return _0x3a0ba9['createPositionFromPath'](_0x199af3,_0x3b8714['path'],_0x3b8714['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x18839e(at);var Et=class extends It{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x11f9a1,_0x5031d6){super(_0x11f9a1),this['focusTracker']=new _0xcf3bc4(),this['keystrokes']=new _0x388137(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x5031d6),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),dt({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x199ceb=_0x3a0605=>_0x3a0605['stopPropagation']();this['keystrokes']['set']('arrowright',_0x199ceb),this['keystrokes']['set']('arrowleft',_0x199ceb),this['keystrokes']['set']('arrowup',_0x199ceb),this['keystrokes']['set']('arrowdown',_0x199ceb);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x11ab88){this['revisionNameInputView']['fieldView']['element']['value']=_0x11ab88['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x49453d){const _0xd9d74d=new _0xfdb4f(this['locale'],lt),_0x5add42=_0xd9d74d['fieldView'];_0x5add42['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x123e1b=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x49453d&&(_0x123e1b+='\x20('+pt(this['locale'],'optional')+')'),(_0xd9d74d['label']=_0x123e1b,_0x5add42['on']('input',()=>{this['revisionNameInputValue']=_0x5add42['element']['value']['trim']();}),_0xd9d74d);}},St=class extends _0x3551b1{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t];}['_saveRevisionFormView'];['init'](){const _0x3d1422=this['editor'],_0x310123=_0x3d1422['plugins']['get']('RevisionTracker');_0x3d1422['ui']['componentFactory']['add']('revisionHistory',_0x4d02aa=>{const _0x1fd02a=ct(_0x4d02aa),_0x575072=_0x1fd02a['panelView']['children'],_0x47a15d=new _0x3734ad(_0x4d02aa),_0x83a139=new _0x49aa75(_0x4d02aa),_0x323c4d=this['_createSaveRevisionButton'](_0x4451f8),_0x85dcee=new _0x49aa75(_0x4d02aa),_0x8684ed=this['_createOpenRevisionButton'](_0x4451f8);return _0x1fd02a['bind']('isEnabled')['to'](_0x310123,'isReady',_0x310123,'isEnabled',_0x3d1422,'isReadOnly',(_0x50e699,_0x416cb7,_0x2f2df9)=>_0x50e699&&_0x416cb7&&!_0x2f2df9),_0x1fd02a['buttonView']['set']({'icon':_0x3bdd34,'label':pt(_0x4d02aa,'Revision\x20history'),'tooltip':!0x0}),_0x323c4d['set']({'withText':!0x0,'role':'menuitem'}),_0x8684ed['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x8684ed,'execute',()=>{_0x1fd02a['isOpen']=!0x1,_0x3d1422['editing']['view']['focus']();},{'priority':'low'}),_0x83a139['children']['add'](_0x323c4d),_0x85dcee['children']['add'](_0x8684ed),_0x47a15d['role']='menu',_0x47a15d['items']['addMany']([_0x83a139,_0x85dcee]),_0x575072['add'](_0x47a15d),_0x1fd02a;}),_0x3d1422['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1a3111=this['editor'],_0xd86e22=_0x1a3111['locale'],_0x2395ff=_0x1a3111['plugins']['get']('RevisionTracker'),_0x3ee303=new et(_0xd86e22),_0x1271b8=new it(_0xd86e22);_0x3ee303['bind']('isEnabled')['to'](_0x2395ff,'isReady',_0x2395ff,'isEnabled',_0x1a3111,'isReadOnly',(_0x1dadf6,_0x47b112,_0x8dbd84)=>_0x1dadf6&&_0x47b112&&!_0x8dbd84),_0x3ee303['buttonView']['set']({'icon':_0x3bdd34,'label':pt(_0xd86e22,'Revision\x20history')});const _0x5d8806=new tt(_0xd86e22,_0x3ee303),_0x23dec9=this['_createSaveRevisionButton'](_0x33789a);_0x23dec9['delegate']('execute')['to'](_0x3ee303),_0x5d8806['children']['add'](_0x23dec9),_0x1271b8['items']['add'](_0x5d8806);const _0x3b7dba=new tt(_0xd86e22,_0x3ee303),_0x59863b=this['_createOpenRevisionButton'](_0x33789a);return _0x59863b['delegate']('execute')['to'](_0x3ee303),_0x3b7dba['children']['add'](_0x59863b),_0x1271b8['items']['add'](_0x3b7dba),_0x3ee303['panelView']['children']['add'](_0x1271b8),_0x3ee303;}['_createSaveRevisionButton'](_0x1fb7af){const _0x1e2cff=this['editor'],_0x3b6397=_0x1e2cff['plugins']['get']('RevisionTracker'),_0x44e6f7=new _0x1fb7af(_0x1e2cff['locale']);return _0x44e6f7['set']({'label':pt(_0x1e2cff['locale'],'Save\x20current\x20revision')}),_0x44e6f7['bind']('isEnabled')['to'](_0x3b6397,'isReady',_0x3b6397,'isEnabled',_0x1e2cff,'isReadOnly',(_0x34b114,_0x3eedf1,_0x4beec2)=>_0x34b114&&_0x3eedf1&&!_0x4beec2),this['listenTo'](_0x44e6f7,'execute',()=>{this['_showDialog']();}),_0x44e6f7;}['_createOpenRevisionButton'](_0x5488dc){const _0x763c6b=this['editor'],_0x1a5460=_0x763c6b['plugins']['get']('RevisionTracker'),_0x127ed9=new _0x5488dc(_0x763c6b['locale']);return _0x127ed9['set']({'label':pt(_0x763c6b['locale'],'Open\x20revision\x20history')}),_0x127ed9['bind']('isEnabled')['to'](_0x1a5460,'isReady',_0x763c6b,'isReadOnly',(_0x26d77f,_0x361096)=>_0x26d77f&&!_0x361096),this['listenTo'](_0x127ed9,'execute',()=>{_0x763c6b['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x127ed9;}['_showDialog'](){const _0x1442fd=this['editor'],_0x143940=_0x1442fd['locale'],_0x2a2b32=_0x1442fd['plugins']['get']('Dialog'),_0x5154fe=_0x1442fd['plugins']['get']('RevisionTracker');function _0x5888e4(_0x2ca5cd){_0x1442fd['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2ca5cd['revisionName']?_0x2ca5cd['revisionNameInputView']['errorText']=pt(_0x143940,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1442fd['plugins']['get'](_t)['saveRevision']({'name':_0x2ca5cd['revisionName']}),_0x2a2b32['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x5888e4(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x2a2b32['show']({'id':'revisionSave','title':pt(_0x143940,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x1442fd['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x2a2b32['hide']()},{'label':pt(_0x1442fd['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x49f585){_0x49f585['bind']('isEnabled')['to'](_0x5154fe,'isReady',_0x5154fe,'isEnabled',_0x1442fd,'isReadOnly',(_0x23208a,_0x47ead8,_0xcfec42)=>_0x23208a&&_0x47ead8&&!_0xcfec42);},'onExecute':()=>_0x5888e4(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x51ce86=this['editor'],_0x3a5320=_0x51ce86['locale'];this['_saveRevisionFormView']=new Et(_0x3a5320,_0x51ce86['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0x4bc2fa,_0x508e6c){super(_0x4bc2fa),this['_model']=_0x508e6c,this['changeId']=_0x508e6c['id'];const _0x52b727=this['bindTemplate'],_0x4f3f22=pt(_0x4bc2fa,_0x508e6c['data']['isSuggestion']?'Suggested\x20by':'add'==_0x508e6c['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x508e6c['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x52b727['to']('type',_0x516121=>'ck-revision-change__'+_0x516121)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x4f3f22}]},{'text':'\x20'+_0x508e6c['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x42ddc5();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x5aeae6){super(),this['id']=_0x5aeae6['id']||_0x1e8bcb(),this['author']=_0x5aeae6['author'],this['type']=_0x5aeae6['type'],this['data']=_0x5aeae6['data']||{},this['rootName']=_0x5aeae6['rootName'],this['set']('createdAt',_0x5aeae6['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ct=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1aa108,_0x592207){this['newRevisionId']=_0x1aa108,this['oldRevisionId']=_0x592207,this['changes']=new _0x31e5a4();}['_setChanges'](_0x246e7f){for(const _0x2fc3d8 of _0x246e7f)this['changes']['add'](_0x2fc3d8);}},Mt=class extends _0x3551b1{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x2238bc,_0x564877,mt,wt];}constructor(_0x3356ff){super(_0x3356ff),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x313c20,_0x114dec,_0x3400ca)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x274f86=>{for(const _0x550093 of this['editor']['editing']['view']['document']['roots'])_0x3400ca?_0x274f86['removeClass']('ck-editor__editable__overlay',_0x550093):_0x274f86['addClass']('ck-editor__editable__overlay',_0x550093);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1dc17b=>null!==_0x1dc17b),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x10cb1e,_0x2e15c7,_0x50e951)=>_0x10cb1e&&_0x50e951?_0x2e15c7['changes']['getIndex'](_0x50e951):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x40f50e,_0x1e40b5)=>_0x40f50e?_0x1e40b5['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x564877);}['init'](){const _0x4b9784=this['editor'],_0x62be00=new Tt(_0x4b9784,{'direction':'backward'}),_0x43bd74=new Tt(_0x4b9784,{'direction':'forward'});_0x4b9784['commands']['add']('showPreviousChange',_0x62be00),_0x4b9784['commands']['add']('showNextChange',_0x43bd74),_0x4b9784['commands']['add']('restoreRevision',new Dt(_0x4b9784)),this['on']('change:numberOfChanges',()=>{_0x62be00['refresh'](),_0x43bd74['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4b9784['enableReadOnlyMode']('revision-viewer'),_0x4b9784['plugins']['has']('WidgetToolbarRepository')&&_0x4b9784['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x2e91e2){return await this['_utils']['loadRevisionData'](_0x2e91e2,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2e91e2);}async['getRevisionRootsAttributes'](_0x412454){return await this['_utils']['loadRevisionData'](_0x412454,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x412454);}async['compare'](_0x3232df,_0x1103b9,_0xa52ae=!0x1){if(!this['isEnabled'])return;const _0x1b9dd8=this['diff'],_0xa2de88=this['repository'],_0x2eaa93='string'==typeof _0x3232df?_0xa2de88['getRevision'](_0x3232df):_0x3232df,_0x3aa3ae='string'==typeof _0x1103b9?_0xa2de88['getRevision'](_0x1103b9):_0x1103b9,_0x47ab72=_0x2eaa93['id'],_0x3c7c98=_0x3aa3ae?_0x3aa3ae['id']:null;if(!_0xa52ae&&this['diff']&&this['diff']['newRevisionId']===_0x47ab72&&this['diff']['oldRevisionId']===_0x3c7c98)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x47ab72,_0x3c7c98);const _0x23dd57=this['_getRevisionsRange'](_0x2eaa93,_0x3aa3ae,!0x0)['map'](_0xeb9b01=>this['_utils']['loadRevisionData'](_0xeb9b01,this['adapter']));return _0x23dd57['push'](new Promise(_0x3435cf=>{setTimeout(_0x3435cf,0x14);})),Promise['all'](_0x23dd57)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4b5694=this['_getDiff'](_0x47ab72,_0x3c7c98);for(const _0x406797 of _0x4b5694['changes'])this['_changeIdToChange']['set'](_0x406797['id'],_0x406797);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1e5567=>{for(const _0x4ed118 of this['editor']['model']['document']['getRootNames']())_0x1e5567['detachRoot'](_0x4ed118);for(const _0x178474 of Object['keys'](_0x4b5694['model'])){const _0x462ac6=_0x4b5694['model'][_0x178474]['name'],_0x45922b=_0x1e5567['addRoot'](_0x178474,_0x462ac6);for(const _0x57d094 of Object['keys'](_0x4b5694['attributes'][_0x178474]))_0x1e5567['setAttribute'](_0x57d094,_0x4b5694['attributes'][_0x178474][_0x57d094],_0x45922b);_0x1e5567['insert'](_0x4b5694['model'][_0x178474],_0x45922b,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4b5694['changes'])),this['isReady']=!0x0;})['catch'](_0x32d46f=>{console['error'](_0x32d46f),this['_cleanUp'](),_0x1b9dd8&&(this['diff']=_0x1b9dd8),this['isReady']=!0x0;});}['addRevisionData'](_0x5019b5,_0x2cf57c){const _0x42255a=this['repository']['createRevision'](_0x5019b5);return _0x42255a['on']('_update',(_0x21c5af,_0x4ebc09,_0x228948)=>_0x2cf57c(_0x4ebc09,_0x228948,_0x42255a)),this['repository']['addRevision'](_0x42255a),_0x42255a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1f02fa=>{for(const _0x5037f8 of this['editor']['model']['document']['getRootNames']())_0x1f02fa['detachRoot'](_0x5037f8);});}['_sortAndFilterDiffChanges'](_0x43ad8f){const _0x57e58b=[],_0x5095ad=new Map();for(const _0x2c51a4 of this['editor']['model']['document']['getRootNames']()){const _0x5a636e=this['editor']['editing']['view']['getDomRoot'](_0x2c51a4);if(!_0x5a636e)continue;const _0x50e545=_0x5a636e['getClientRects']()['item'](0x0);_0x50e545&&(_0x57e58b['push'](_0x2c51a4),_0x5095ad['set'](_0x2c51a4,_0x50e545));}return _0x57e58b['sort']((_0x496230,_0x1cd3ae)=>{const _0x400248=_0x5095ad['get'](_0x496230),_0x590f0c=_0x5095ad['get'](_0x1cd3ae);return _0x400248['y']-_0x590f0c['y']||_0x400248['x']-_0x590f0c['x'];}),(_0x43ad8f=_0x43ad8f['filter'](_0x25959c=>_0x57e58b['includes'](_0x25959c['rootName'])))['sort']((_0x1b2d31,_0x249bb0)=>_0x57e58b['indexOf'](_0x1b2d31['rootName'])-_0x57e58b['indexOf'](_0x249bb0['rootName'])),_0x43ad8f;}['_makeTape'](_0x3bcc6b){const _0x19f317=Array['from'](_0x3bcc6b['markers'])['filter'](([_0x1b8569,_0x45840a])=>_0x1b8569['startsWith']('revision:')&&!_0x45840a['isCollapsed']),_0x2fce91=Array['from'](this['editor']['model']['createRangeIn'](_0x3bcc6b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x19f317['length'])for(const _0x2e7fd6 of _0x2fce91){const [_0xb3d66d,_0x2a6ed2]=_0x19f317[0x0],[,_0x367794,_0x100690]=_0xb3d66d['split'](':');if(_0x2a6ed2['end']['isEqual'](_0x2e7fd6['nextPosition'])&&_0x19f317['shift'](),(_0x2e7fd6['previousPosition']['isEqual'](_0x2a6ed2['start'])||_0x2e7fd6['previousPosition']['isAfter'](_0x2a6ed2['start']))&&('insertion'==_0x367794?_0x2e7fd6['isAdded']={'userId':_0x100690}:'deletion'==_0x367794&&(_0x2e7fd6['isRemoved']={'userId':_0x100690})),0x0==_0x19f317['length'])break;}return _0x2fce91;}['_refreshStartEndIndex'](_0x11526f){const _0x449f9e=new Map();for(let _0x5a8653=0x0;_0x5a8653<_0x11526f['length'];_0x5a8653++)'text'===_0x11526f[_0x5a8653]['type']?(_0x11526f[_0x5a8653]['item']['startIndex']=_0x5a8653,_0x11526f[_0x5a8653]['item']['endIndex']=_0x5a8653):('elementStart'===_0x11526f[_0x5a8653]['type']?_0x11526f[_0x5a8653]['item']['startIndex']=_0x5a8653:'elementEnd'===_0x11526f[_0x5a8653]['type']&&(_0x11526f[_0x5a8653]['item']['endIndex']=_0x5a8653),_0x449f9e['set'](_0x11526f[_0x5a8653]['id'],_0x5a8653));for(const _0x53aa44 of _0x449f9e['values']())'elementStart'===_0x11526f[_0x53aa44]['type']?_0x11526f[_0x53aa44]['item']['endIndex']=_0x449f9e['get'](_0x11526f[_0x53aa44]['pairId']):'elementEnd'===_0x11526f[_0x53aa44]['type']&&(_0x11526f[_0x53aa44]['item']['startIndex']=_0x449f9e['get'](_0x11526f[_0x53aa44]['pairId']));}['_processTape'](_0x49333b){for(let _0x3b38f4=0x0;_0x3b38f4<_0x49333b['length'];_0x3b38f4++){if('elementStart'===_0x49333b[_0x3b38f4]['type'])_0x49333b[_0x3b38f4]['item']['startIndex']=_0x3b38f4;else{if('elementEnd'===_0x49333b[_0x3b38f4]['type']){_0x49333b[_0x3b38f4]['item']['endIndex']=_0x3b38f4;const _0x4756f2=_0x49333b[_0x3b38f4]['item']['startIndex'];_0x49333b[_0x4756f2]['pairId']=_0x49333b[_0x3b38f4]['id'],_0x49333b[_0x3b38f4]['pairId']=_0x49333b[_0x4756f2]['id'];}else _0x49333b[_0x3b38f4]['item']['startIndex']=_0x3b38f4,_0x49333b[_0x3b38f4]['item']['endIndex']=_0x3b38f4,_0x49333b[_0x3b38f4]['pairId']=null;}_0x49333b[_0x3b38f4]['markersStart']||(_0x49333b[_0x3b38f4]['markersStart']=[],_0x49333b[_0x3b38f4]['markersEnd']=[]);}}['_markInsertions'](_0x4568d4,_0x4cd04f){const _0x152b3d=_0x4568d4['filter'](_0x234834=>!_0x234834['isAdded']);for(let _0x53f525=0x0;_0x53f525<_0x4cd04f['length'];_0x53f525++)_0x4cd04f[_0x53f525]['isAdded']&&(_0x152b3d[_0x53f525]['isAdded']=_0x4cd04f[_0x53f525]['isAdded']);}['_getDiff'](_0x51536d,_0xb01bc5=null){const _0x198804=this['repository']['getRevision'](_0x51536d),_0x67fe98=_0xb01bc5?this['repository']['getRevision'](_0xb01bc5):null,_0x3e1d31=this['_getRevisionsRange'](_0x198804,_0x67fe98),_0x343b7e=_0x3e1d31[_0x3e1d31['length']-0x1],_0x103d40=new Map(),_0x3fddaf={'model':{},'attributes':{},'changes':[]},_0xc6846f=new Set(),_0xfa1d65=new Map();for(let _0x51f04d=_0x3e1d31['length']-0x1;_0x51f04d>=0x0;_0x51f04d--){const _0x3dfcf1=_0x3e1d31[_0x51f04d];for(const _0x404e3d of Object['keys'](_0x3dfcf1['diffData']))if(_0x3dfcf1['diffData'][_0x404e3d]['attachChange']){const _0x519e9c=_0x3dfcf1['diffData'][_0x404e3d]['attachChange'];_0x519e9c['isAttached']?(_0xc6846f['add'](_0x404e3d),_0xfa1d65['has'](_0x404e3d)&&_0xfa1d65['get'](_0x404e3d)['userId']==_0x519e9c['userId']?_0xfa1d65['delete'](_0x404e3d):_0xfa1d65['set'](_0x404e3d,_0x519e9c)):_0xfa1d65['has'](_0x404e3d)?(_0xc6846f['delete'](_0x404e3d),_0xfa1d65['delete'](_0x404e3d)):(_0xc6846f['add'](_0x404e3d),_0xfa1d65['set'](_0x404e3d,_0x519e9c));}else _0xc6846f['add'](_0x404e3d);}for(const _0x411e76 of _0xc6846f){const _0x1d487c=_0xfa1d65['has'](_0x411e76)&&!_0xfa1d65['get'](_0x411e76)['isAttached'];let _0x5389b8=_0x1d487c?_0x3e1d31['length']-0x1:0x0;const _0x3bb3a1=_0x1d487c?-0x1:0x1;for(;_0x3e1d31[_0x5389b8];){const _0x824695=_0x3e1d31[_0x5389b8];if(_0x824695['diffData'][_0x411e76]){const _0x35dcc1=_0x1d487c?_0x824695['diffData'][_0x411e76]['attributesBefore']:_0x824695['diffData'][_0x411e76]['attributesAfter'];_0x3fddaf['attributes'][_0x411e76]=_0x35dcc1?_0x523aea(_0x35dcc1):{};break;}_0x5389b8+=_0x3bb3a1;}}for(const _0x4ee7e3 of _0x3e1d31){_0x4ee7e3['model']={};for(const _0x2a7448 of _0x4ee7e3['authors'])_0x103d40['set'](_0x2a7448['id'],_0x2a7448);for(const _0x3c432f of _0xc6846f){const _0x57ab60=_0x4ee7e3['diffData'][_0x3c432f]?_0x4ee7e3['diffData'][_0x3c432f]['insertions']:'[]',_0x22c420=_0x4ee7e3['diffData'][_0x3c432f]?_0x4ee7e3['diffData'][_0x3c432f]['deletions']:'[]',_0x348273=_0x4ee7e3['diffData'][_0x3c432f]?.['rootElementName']||'$root';_0x4ee7e3['model'][_0x3c432f]={'insertions':this['_utils']['_makeModelFromViewString'](_0x57ab60,_0x348273),'deletions':this['_utils']['_makeModelFromViewString'](_0x22c420,_0x348273)};}}for(const _0x5ed2cd of _0xc6846f){let _0x20f3f4=null,_0x18bbbc=0x0;const _0x2ee66c=_0x3e1d31['map'](_0x4b01b8=>_0x4b01b8['diffData'][_0x5ed2cd]?.['rootElementName'])['find'](_0x51ac9a=>void 0x0!==_0x51ac9a)||'$root',_0x2e6b92=new Map(Array['from'](_0x198804['model'][_0x5ed2cd]['insertions']['markers'])['filter'](([_0x2de50e])=>!_0x2de50e['startsWith']('revision:')));let _0x26d294=0x0;for(const _0x487500 of _0x3e1d31){const _0xcccaff=this['_makeTape'](_0x487500['model'][_0x5ed2cd]['insertions']);_0x487500==_0x198804?(_0x20f3f4=_0xcccaff,_0x18bbbc=_0x20f3f4['length'],_0x20f3f4['forEach'](_0xe425f0=>{_0xe425f0['id']=_0x26d294++;}),this['_processTape'](_0x20f3f4)):this['_markInsertions'](_0x20f3f4,_0xcccaff);const _0x545d93=_0x20f3f4['filter'](_0x2adc34=>!_0x2adc34['isAdded'])['map'](_0x5ad45c=>_0x5ad45c['id']);let _0x22b590=0x0;const _0xd04fb1=this['_makeTape'](_0x487500['model'][_0x5ed2cd]['deletions']);_0xd04fb1['forEach'](_0x36e5c4=>{_0x36e5c4['isRemoved']?_0x36e5c4['id']=_0x18bbbc++:_0x36e5c4['id']=_0x545d93[_0x22b590++];}),this['_processTape'](_0xd04fb1),this['_setDistance'](_0x20f3f4,'isAdded'),this['_setDistance'](_0xd04fb1,'isRemoved'),_0x487500==_0x198804&&this['_markMarkers'](_0x20f3f4,_0x2e6b92),_0x20f3f4=this['_joinTapes'](_0x20f3f4,_0xd04fb1),this['_refreshStartEndIndex'](_0x20f3f4),this['_setDistance'](_0x20f3f4,'isRemoved');}_0x20f3f4=_0x20f3f4['filter'](_0x35d94e=>!(_0x35d94e['isAdded']&&_0x35d94e['isRemoved']));const _0x315c5f=new Map(_0x343b7e['model'][_0x5ed2cd]['deletions']['markers']),_0x41ebf0=new Set(_0x2e6b92['keys']());for(const _0x4876c8 of _0x315c5f['keys']())_0x41ebf0['delete'](_0x4876c8);this['_markSuggestions'](_0x20f3f4,_0x41ebf0),this['_fixObsoleteTags'](_0x20f3f4),_0x20f3f4=this['_removeMissingPairs'](_0x20f3f4),_0x20f3f4=this['_markMismatchedRemovedTags'](_0x20f3f4),_0x20f3f4=this['_removeUnsupportedChanges'](_0x20f3f4);const {root:_0x12c62c,changes:_0x67e282}=this['_makeModelFromTape'](_0x20f3f4,_0x103d40,_0x5ed2cd,_0x2ee66c);_0x3fddaf['model'][_0x5ed2cd]=_0x12c62c;const _0x3dad74=_0xfa1d65['get'](_0x5ed2cd);if(_0x3dad74){const _0x4b04ea=new Ot({'author':_0x103d40['get'](_0x3dad74['userId']),'type':_0x3dad74['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5ed2cd});_0x67e282['unshift'](_0x4b04ea),_0x3fddaf['attributes'][_0x5ed2cd]['revisionHistoryAttachChange']=_0x4b04ea['id'];}_0x3fddaf['changes']=_0x3fddaf['changes']['concat'](_0x67e282);}return _0x3fddaf;}['_markMarkers'](_0x4d543f,_0x4e2fba){for(let _0x57f571=0x0;_0x57f571<_0x4d543f['length'];_0x57f571++)for(const [_0x2e79b0,_0x4aa7d4]of _0x4e2fba)!_0x4aa7d4['isCollapsed']&&_0x4aa7d4['start']['isEqual'](_0x4d543f[_0x57f571]['previousPosition'])&&_0x4d543f[_0x57f571]['markersStart']['push'](_0x2e79b0),_0x4aa7d4['end']['isEqual'](_0x4d543f[_0x57f571]['nextPosition'])&&_0x4d543f[_0x57f571]['markersEnd']['push'](_0x2e79b0);}['_joinTapes'](_0x1040aa,_0x1769b2){let _0x4356a6=[],_0x5efa00=0x0,_0x15b421=0x0;for(;_0x5efa00<_0x1040aa['length']||_0x15b421<_0x1769b2['length'];){const _0x26f08a=_0x1040aa[_0x5efa00]||{},_0x45847d=_0x1769b2[_0x15b421]||{};if(_0x26f08a['id']==_0x45847d['id'])_0x5efa00++,_0x15b421++,_0x4356a6['push'](_0x26f08a);else{if(_0x45847d['isRemoved']&&_0x26f08a['isAdded']){const {commonTape:_0x5a1a5f,iEnd:_0x1140a1,jEnd:_0x54bb60}=this['_threeWayMerge'](_0x1040aa,_0x5efa00,_0x1769b2,_0x15b421);_0x4356a6=_0x4356a6['concat'](_0x5a1a5f),_0x5efa00=_0x1140a1,_0x15b421=_0x54bb60;}else _0x45847d['isRemoved']?(_0x15b421++,_0x4356a6['push'](_0x45847d)):(_0x5efa00++,_0x4356a6['push'](_0x26f08a));}}return _0x4356a6;}['_markSuggestions'](_0x2890aa,_0x4eb59f){const _0x274d0d=[];for(let _0x1f9c48=0x0;_0x1f9c48<_0x2890aa['length'];_0x1f9c48++){for(let _0x2c9591=0x0;_0x2c9591<_0x2890aa[_0x1f9c48]['markersStart']['length'];_0x2c9591++){const _0x413862=_0x2890aa[_0x1f9c48]['markersStart'][_0x2c9591];if(!_0x4eb59f['has'](_0x413862))continue;const {group:_0x478f43,type:_0x2bc45c,authorId:_0x4ac50b}=_0x3d2b5b(_0x413862);'revision-suggestion'!=_0x478f43||'insertion'!=_0x2bc45c&&'deletion'!=_0x2bc45c||(_0x274d0d['unshift']({'type':_0x2bc45c,'name':_0x413862,'userId':_0x4ac50b}),_0x2890aa[_0x1f9c48]['markersStart']['splice'](_0x2c9591,0x1),_0x2c9591--);}_0x420e6d(_0x2890aa[_0x1f9c48]);for(let _0x4a957f=0x0;_0x4a957f<_0x2890aa[_0x1f9c48]['markersEnd']['length'];_0x4a957f++){const _0x3afc3f=_0x2890aa[_0x1f9c48]['markersEnd'][_0x4a957f];if(!_0x4eb59f['has'](_0x3afc3f))continue;const {group:_0x416b2c,type:_0x22a95d}=_0x3d2b5b(_0x3afc3f);if('revision-suggestion'!=_0x416b2c||'insertion'!=_0x22a95d&&'deletion'!=_0x22a95d)continue;_0x2890aa[_0x1f9c48]['markersEnd']['splice'](_0x4a957f,0x1),_0x4a957f--;const _0x58894d=_0x274d0d['findIndex'](_0x30a730=>_0x30a730['name']==_0x3afc3f);_0x58894d>-0x1&&_0x274d0d['splice'](_0x58894d,0x1);}}function _0x3d2b5b(_0xc2801b){const _0x1eb92e=_0xc2801b['split'](':');return{'group':_0x1eb92e[0x0],'type':_0x1eb92e[0x1],'subType':_0x1eb92e['length']>=0x5?_0x1eb92e[0x2]:null,'id':_0x1eb92e['length']<0x5?_0x1eb92e[0x2]:_0x1eb92e[0x3],'authorId':_0x1eb92e['length']<0x5?_0x1eb92e[0x3]:_0x1eb92e[0x4],'markerCount':0x6==_0x1eb92e['length']?_0x1eb92e[0x5]:null};}function _0x420e6d(_0x470c66){for(let _0x125388=0x0;_0x125388<_0x274d0d['length'];_0x125388++){if(_0x470c66['isAdded']&&'insertion'==_0x274d0d[_0x125388]['type']&&_0x470c66['isAdded']['userId']==_0x274d0d[_0x125388]['userId'])return _0x470c66['isAddSuggestion']=_0x274d0d[_0x125388],void delete _0x470c66['isAdded'];if(!_0x470c66['isAdded']&&!_0x470c66['isRemoved']&&'deletion'==_0x274d0d[_0x125388]['type'])return void(_0x470c66['isRemoveSuggestion']=_0x274d0d[_0x125388]);}}}['_setDistance'](_0x2a9942,_0x3583fe){let _0x2cc0a3=0x0,_0x3a068d=!0x1;const _0x212420=new Map();for(const _0x90c16a of _0x2a9942)_0x90c16a[_0x3583fe]?_0x3a068d&&(_0x2cc0a3++,_0x3a068d=!0x1):(_0x2cc0a3++,_0x3a068d=!0x0),_0x212420['set'](_0x90c16a['id'],_0x2cc0a3);for(let _0x412e54=0x0;_0x412e54<_0x2a9942['length'];_0x412e54++){if('isRemoved'==_0x3583fe&&_0x2a9942[_0x412e54]['isAdded']||'isAdded'==_0x3583fe&&_0x2a9942[_0x412e54]['isRemoved'])continue;if('text'==_0x2a9942[_0x412e54]['type']){_0x2a9942[_0x412e54]['distance']=0x0;continue;}const _0x3ae945=_0x212420['get'](_0x2a9942[_0x412e54]['pairId']),_0x58ec20=_0x212420['get'](_0x2a9942[_0x412e54]['id']);_0x2a9942[_0x412e54]['distance']=_0x3ae945-_0x58ec20;}}['_getRevisionsRange'](_0x31e5d3,_0x4809eb,_0x3cd268=!0x1){const _0x4d3ec8=[];let _0x52743c=this['repository']['getIndex'](_0x31e5d3),_0x2363b0=this['repository']['getIndex'](_0x4809eb);for(-0x1==_0x2363b0&&(_0x2363b0=this['repository']['_revisions']['length'],_0x3cd268=!0x1);_0x52743c<_0x2363b0;)_0x4d3ec8['push'](this['repository']['getRevision'](_0x52743c)),_0x52743c++;return _0x3cd268&&_0x4d3ec8['push'](this['repository']['getRevision'](_0x52743c)),_0x4d3ec8;}['_threeWayMerge'](_0x89fabe,_0x19bf3f,_0x459a37,_0x15c0db){const _0x4d461f=this['editor']['model']['schema'];let _0x4a3e3e=_0x19bf3f;for(;_0x89fabe[_0x4a3e3e]&&_0x89fabe[_0x4a3e3e]['isAdded'];)_0x4a3e3e++;let _0x2fcfe8=_0x15c0db;for(;_0x459a37[_0x2fcfe8]&&_0x459a37[_0x2fcfe8]['isRemoved'];)_0x2fcfe8++;_0x35fb81(_0x89fabe,_0x19bf3f,_0x4a3e3e),_0x35fb81(_0x459a37,_0x15c0db,_0x2fcfe8);const _0xb33ff7=_0x459a37['slice'](_0x15c0db,_0x2fcfe8)['concat'](_0x89fabe['slice'](_0x19bf3f,_0x4a3e3e));return _0xb33ff7['sort']((_0x5e9636,_0x206233)=>_0x5e9636['side']!=_0x206233['side']?_0x5e9636['side']-_0x206233['side']:_0x5e9636['level']!=_0x206233['level']?_0x5e9636['level']-_0x206233['level']:_0x5e9636['distance']!=_0x206233['distance']?_0x206233['distance']-_0x5e9636['distance']:!!_0x5e9636['isAdded']!=!!_0x206233['isAdded']?-0x1==_0x5e9636['side']||0x0==_0x5e9636['side']?_0x5e9636['isAdded']?-0x1:0x1:_0x5e9636['isAdded']?0x1:-0x1:_0x5e9636['index']-_0x206233['index']),{'commonTape':_0xb33ff7,'iEnd':_0x4a3e3e,'jEnd':_0x2fcfe8};function _0x35fb81(_0x4f8cf4,_0x32d820,_0x5f1bc3){let _0x568488=-0x1,_0xbea2f3=Number['POSITIVE_INFINITY'],_0x3dee06=!0x0;for(let _0x243fe7=_0x32d820;_0x243fe7<_0x5f1bc3;_0x243fe7++)if(_0x4d461f['isInline'](_0x4f8cf4[_0x243fe7]['item'])||(_0x3dee06=!0x1),_0x4f8cf4[_0x243fe7]['item']['startIndex']<_0x32d820&&(_0x568488=_0x243fe7),_0x4f8cf4[_0x243fe7]['item']['endIndex']>=_0x5f1bc3){_0xbea2f3=_0x243fe7;break;}_0x3dee06&&(_0x568488=_0x5f1bc3-0x1);for(let _0x2b28e7=_0x32d820;_0x2b28e7<_0x5f1bc3;_0x2b28e7++)_0x4f8cf4[_0x2b28e7]['side']=_0x2b28e7<=_0x568488?-0x1:_0x2b28e7<_0xbea2f3?0x0:0x1,_0x4f8cf4[_0x2b28e7]['index']=_0x2b28e7;let _0x328d44=0x0;for(let _0xa1e84f=_0x32d820;_0xa1e84f<=_0x568488;_0xa1e84f++)0x0==_0x4f8cf4[_0xa1e84f]['distance']?_0x4f8cf4[_0xa1e84f]['level']=_0x328d44:(_0x328d44++,_0x4f8cf4[_0xa1e84f]['level']=_0x328d44,_0x328d44++);for(let _0x555d16=_0x32d820;_0x555d16<_0x5f1bc3;_0x555d16++)0x0==_0x4f8cf4[_0x555d16]['side']&&(_0x4f8cf4[_0x555d16]['level']=_0x328d44);_0x328d44=0x0;for(let _0x1bf631=_0x5f1bc3-0x1;_0x1bf631>=_0xbea2f3;_0x1bf631--)0x0==_0x4f8cf4[_0x1bf631]['distance']?_0x4f8cf4[_0x1bf631]['level']=_0x328d44:(_0x328d44--,_0x4f8cf4[_0x1bf631]['level']=_0x328d44,_0x328d44--);}}['_fixObsoleteTags'](_0x24856f){const _0x3ba852=new Map(),_0x48a983=this['editor']['model']['schema'];for(let _0x3bd456=0x1;_0x3bd456<_0x24856f['length'];_0x3bd456++){let _0x1a4e27,_0x4b06f0,_0x2f16f1;const _0x2286e6=_0x24856f[_0x3bd456],_0x5c46ce=_0x24856f[_0x3bd456-0x1];if('text'==_0x2286e6['type'])continue;if(_0x2286e6['type']!=_0x5c46ce['type'])continue;if(!_0x48a983['isBlock'](_0x5c46ce['item'])||_0x48a983['isLimit'](_0x5c46ce['item']))continue;if(!_0x48a983['isBlock'](_0x2286e6['item'])||_0x48a983['isLimit'](_0x2286e6['item']))continue;if((_0x24856f[_0x3bd456]['isAdded']||_0x24856f[_0x3bd456]['isAddSuggestion'])&&_0x24856f[_0x3bd456-0x1]['isRemoved'])_0x1a4e27=_0x24856f[_0x3bd456],_0x4b06f0=_0x24856f[_0x3bd456-0x1],_0x2f16f1=_0x3bd456-0x1;else{if(!_0x24856f[_0x3bd456]['isRemoved']||!_0x24856f[_0x3bd456-0x1]['isAdded']&&!_0x24856f[_0x3bd456-0x1]['isAddSuggestion'])continue;_0x1a4e27=_0x24856f[_0x3bd456-0x1],_0x4b06f0=_0x24856f[_0x3bd456],_0x2f16f1=_0x3bd456;}const _0x3e6dc7=_0x1a4e27['level']==_0x4b06f0['level'],_0x1f8676=Math['abs'](_0x1a4e27['level'])<Math['abs'](_0x4b06f0['level'])&&0x0==_0x4b06f0['distance'];(_0x3e6dc7||_0x1f8676)&&(_0x3ba852['set'](_0x4b06f0['id'],_0x1a4e27['id']),_0x24856f['splice'](_0x2f16f1,0x1),_0x3bd456--,_0x1a4e27['isAdded']=!0x1);}for(let _0x4b8702=0x0;_0x4b8702<_0x24856f['length'];_0x4b8702++)_0x3ba852['has'](_0x24856f[_0x4b8702]['pairId'])&&(_0x24856f[_0x4b8702]['pairId']=_0x3ba852['get'](_0x24856f[_0x4b8702]['pairId']));}['_removeMissingPairs'](_0x2f5a98){const _0x4f4feb=new Set(_0x2f5a98['map'](_0x244a80=>_0x244a80['id']));for(let _0x552f29=0x0;_0x552f29<_0x2f5a98['length'];_0x552f29++)_0x4f4feb['has'](_0x2f5a98[_0x552f29]['pairId'])||0x0==_0x2f5a98[_0x552f29]['distance']||(_0x2f5a98[_0x552f29]['isIncorrect']=!0x0);return _0x2f5a98['filter'](_0x2ab15d=>!_0x2ab15d['isIncorrect']);}['_markMismatchedRemovedTags'](_0xea6544){const _0x11aeef=new Set();for(let _0x4578b7=0x0;_0x4578b7<_0xea6544['length'];_0x4578b7++){if(_0x11aeef['has'](_0xea6544[_0x4578b7]['id'])&&_0xea6544[_0x4578b7]['isRemoved']&&(_0xea6544[_0x4578b7]['isIncorrect']=!0x0),_0xea6544[_0x4578b7]['isIncorrect'])continue;if(0x0==_0xea6544[_0x4578b7]['distance'])continue;if('elementStart'!=_0xea6544[_0x4578b7]['type'])continue;if(null==_0xea6544[_0x4578b7]['pairId'])continue;let _0x390aee=_0x4578b7+0x1,_0x96f33c=0x0;for(;_0xea6544[_0x390aee]['id']!=_0xea6544[_0x4578b7]['pairId'];)'elementStart'==_0xea6544[_0x390aee]['type']?_0x96f33c++:'elementEnd'==_0xea6544[_0x390aee]['type']&&_0x96f33c--,_0x390aee++;if(0x0!=_0x96f33c){if(_0xea6544[_0x4578b7]['isRemoved'])_0xea6544[_0x4578b7]['isIncorrect']=!0x0;else{for(;_0x390aee!=_0x4578b7;)_0xea6544[_0x390aee]['isRemoved']&&0x0!=_0xea6544[_0x390aee]['distance']&&(_0xea6544[_0x390aee]['isIncorrect']=!0x0,_0x11aeef['add'](_0xea6544[_0x390aee]['pairId'])),_0x390aee--;}}}return _0xea6544['filter'](_0x5c1e84=>!_0x5c1e84['isIncorrect']);}['_removeUnsupportedChanges'](_0x3c8c20){const _0x4e4a04=this['editor']['model']['schema'];for(let _0x828127=0x0;_0x828127<_0x3c8c20['length'];_0x828127++){if(!(_0x3c8c20[_0x828127]['isAdded']||_0x3c8c20[_0x828127]['isAddSuggestion']||_0x3c8c20[_0x828127]['isRemoved']||_0x3c8c20[_0x828127]['isRemoveSuggestion']))continue;if(0x0==_0x3c8c20[_0x828127]['distance'])continue;const _0x379a10=_0x3c8c20[_0x828127]['item'];_0x4e4a04['isBlock'](_0x379a10)||_0x4e4a04['isLimit'](_0x379a10)||(_0x3c8c20[_0x828127]['isAdded']&&delete _0x3c8c20[_0x828127]['isAdded'],_0x3c8c20[_0x828127]['isAddSuggestion']&&delete _0x3c8c20[_0x828127]['isAddSuggestion'],_0x3c8c20[_0x828127]['isRemoveSuggestion']&&delete _0x3c8c20[_0x828127]['isRemoveSuggestion'],_0x3c8c20[_0x828127]['isRemoved']&&(_0x3c8c20[_0x828127]['isIncorrect']=!0x0));}return _0x3c8c20['filter'](_0x3c18a5=>!_0x3c18a5['isIncorrect']);}['_makeModelFromTape'](_0x2a0c8d,_0x2515fd,_0x2d1988,_0x3a0441){const _0x14bd91=new _0x50f2d5(),_0x2113a5=[],_0x52bd55=new Map(),_0x49afb3=this['editor']['model'],_0x837047=_0x49afb3['schema'],_0x50449e=[_0x14bd91],_0xc24d73={},_0x5cc50f={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x14bd91['name']=_0x3a0441;let _0x21cc11=null;const _0x1f9f8a=[0x0];for(let _0x184eca=0x0;_0x184eca<_0x2a0c8d['length'];_0x184eca++)if('elementStart'===_0x2a0c8d[_0x184eca]['type']){_0x2a0c8d[_0x184eca]['previousPosition']=_0x49afb3['createPositionFromPath'](_0x14bd91,_0x1f9f8a);const _0x3ef502=new _0x2f872d(_0x2a0c8d[_0x184eca]['item']['name'],_0x2a0c8d[_0x184eca]['item']['getAttributes']());_0x50449e[0x0]['_appendChild'](_0x3ef502),_0x1f9f8a['push'](0x0),_0x50449e['unshift'](_0x3ef502),_0x2a0c8d[_0x184eca]['nextPosition']=_0x49afb3['createPositionFromPath'](_0x14bd91,_0x1f9f8a);}else'elementEnd'===_0x2a0c8d[_0x184eca]['type']?(_0x50449e['shift'](),_0x2a0c8d[_0x184eca]['previousPosition']=_0x49afb3['createPositionFromPath'](_0x14bd91,_0x1f9f8a),_0x1f9f8a['pop'](),_0x1f9f8a[_0x1f9f8a['length']-0x1]++,_0x2a0c8d[_0x184eca]['nextPosition']=_0x49afb3['createPositionFromPath'](_0x14bd91,_0x1f9f8a)):(_0x2a0c8d[_0x184eca]['previousPosition']=_0x49afb3['createPositionFromPath'](_0x14bd91,_0x1f9f8a),_0x21cc11?_0x21cc11['_data']+=_0x2a0c8d[_0x184eca]['item']['data']:_0x21cc11=new _0x2bf109(_0x2a0c8d[_0x184eca]['item']['data'],_0x2a0c8d[_0x184eca]['item']['getAttributes']()),_0x2a0c8d[_0x184eca+0x1]&&'text'===_0x2a0c8d[_0x184eca+0x1]['type']&&_0x1d8945(_0x21cc11,_0x2a0c8d[_0x184eca+0x1]['item'])||(_0x50449e[0x0]['_appendChild'](_0x21cc11),_0x21cc11=null),_0x1f9f8a[_0x1f9f8a['length']-0x1]+=_0x2a0c8d[_0x184eca]['item']['offsetSize'],_0x2a0c8d[_0x184eca]['nextPosition']=_0x49afb3['createPositionFromPath'](_0x14bd91,_0x1f9f8a));for(let _0x467ffd=0x0;_0x467ffd<_0x2a0c8d['length'];_0x467ffd++){const _0x3411ea=_0x2a0c8d[_0x467ffd]['previousPosition'],_0x4862f8=_0x2a0c8d[_0x467ffd]['nextPosition'];for(const _0x193180 of _0x2a0c8d[_0x467ffd]['markersStart'])_0x52bd55['set'](_0x193180,{'start':_0x3411ea,'end':null});_0x4cb20e('isRemoveSuggestion',_0x467ffd,_0x3411ea,_0x4862f8),_0x4cb20e('isAddSuggestion',_0x467ffd,_0x3411ea,_0x4862f8),_0x4cb20e('isRemoved',_0x467ffd,_0x3411ea,_0x4862f8),_0x4cb20e('isAdded',_0x467ffd,_0x3411ea,_0x4862f8);for(const _0x1edc15 of _0x2a0c8d[_0x467ffd]['markersEnd']){const _0x4ad816=_0x52bd55['get'](_0x1edc15);_0x4ad816?_0x4ad816['end']=_0x4862f8:_0x52bd55['set'](_0x1edc15,{'start':_0x4862f8,'end':_0x4862f8});}}for(const [_0x4b8674,_0xad20c2]of _0x52bd55){const _0x5e6620=this['editor']['model']['createRange'](_0xad20c2['start'],_0xad20c2['end']);_0x14bd91['markers']['set'](_0x4b8674,_0x5e6620);}return _0x2113a5['sort']((_0x37fbef,_0x494cf0)=>{const _0x23ce0d=_0x14bd91['markers']['get']('revision:'+_0x37fbef['id']),_0x12bac5=_0x14bd91['markers']['get']('revision:'+_0x494cf0['id']);return _0x23ce0d['start']['isBefore'](_0x12bac5['start'])?-0x1:_0x23ce0d['start']['isAfter'](_0x12bac5['start'])?0x1:_0x23ce0d['end']['isBefore'](_0x12bac5['end'])?-0x1:_0x23ce0d['end']['isAfter'](_0x12bac5['end'])?0x1:'add'===_0x37fbef['type']?-0x1:0x1;}),{'root':_0x14bd91,'changes':_0x2113a5};function _0x4cb20e(_0x578818,_0x27682d,_0x346c56,_0x529d57){const _0x24e1d7=!!_0x2a0c8d[_0x27682d][_0x578818],_0x12884d=_0x24e1d7?_0x2a0c8d[_0x27682d][_0x578818]['userId']:null,_0x58f05a=_0x27682d===_0x2a0c8d['length']-0x1,_0x42e33d=_0x5cc50f[_0x578818][0x0],_0x796413=_0x837047['isObject'](_0x2a0c8d[_0x27682d]['item']);!_0xc24d73[_0x578818]&&_0x24e1d7?_0xc24d73[_0x578818]={'start':_0x346c56,'tapeItem':_0x2a0c8d[_0x27682d],'userId':_0x12884d,'type':_0x578818}:_0xc24d73[_0x578818]&&!_0x24e1d7?(_0xc24d73[_0x578818]['end']=_0x346c56,_0x5bb63f(_0xc24d73[_0x578818]),_0xc24d73[_0x578818]=null):_0xc24d73[_0x578818]&&_0x24e1d7&&_0xc24d73[_0x578818]['userId']!==_0x12884d&&(_0xc24d73[_0x578818]['end']=_0x346c56,_0x42e33d&&_0x42e33d['userId']===_0xc24d73[_0x578818]['userId']||_0x5bb63f(_0xc24d73[_0x578818]),_0xc24d73[_0x578818]={'start':_0x346c56,'tapeItem':_0x2a0c8d[_0x27682d],'userId':_0x12884d,'type':_0x578818}),_0xc24d73[_0x578818]&&_0x796413&&('elementStart'!==_0x2a0c8d[_0x27682d]['type']||_0x42e33d&&_0x42e33d['userId']===_0x12884d||_0x5cc50f[_0x578818]['unshift']({'userId':_0x12884d,'object':_0x2a0c8d[_0x27682d]['item'],'change':_0xc24d73[_0x578818]}),'elementEnd'===_0x2a0c8d[_0x27682d]['type']&&_0x42e33d&&_0x42e33d['object']===_0x2a0c8d[_0x27682d]['item']&&(_0x5cc50f[_0x578818]['shift'](),_0xc24d73[_0x578818]=_0x42e33d['change'])),_0xc24d73[_0x578818]&&_0x58f05a&&(_0xc24d73[_0x578818]['end']=_0x529d57,_0x5bb63f(_0xc24d73[_0x578818]),_0xc24d73[_0x578818]=null);}function _0x5bb63f({start:_0x5ae070,end:_0x331f25,tapeItem:_0x25cb67,userId:_0x4099d8,type:_0x2be04d}){const _0x45a06a=_0x25cb67['item'],_0x5f157b=_0x49afb3['schema']['isBlock'](_0x45a06a)&&!_0x49afb3['schema']['isLimit'](_0x45a06a),_0x802829=_0x5ae070['nodeAfter']==_0x331f25['parent']&&_0x331f25['isAtStart'];if(_0x5f157b&&_0x802829)return;const _0x5638a3=_0x49afb3['createRange'](_0x5ae070,_0x331f25),_0x33df51=new Ot({'author':_0x2515fd['get'](_0x4099d8),'type':'isAdded'==_0x2be04d||'isAddSuggestion'==_0x2be04d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2be04d||'isRemoveSuggestion'==_0x2be04d},'createdAt':new Date(),'rootName':_0x2d1988});_0x2113a5['push'](_0x33df51),_0x14bd91['markers']['set']('revision:'+_0x33df51['id'],_0x5638a3);}function _0x1d8945(_0x851196,_0x384d9d){const _0x82d12=_0x851196['getAttributes'](),_0x36b738=_0x384d9d['getAttributes']();for(const _0x51dbca of _0x82d12){if(_0x51dbca[0x1]!==_0x384d9d['getAttribute'](_0x51dbca[0x0]))return!0x1;_0x36b738['next']();}return _0x36b738['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x353be4=>{const _0xc2ebe1=_0x353be4['markerName']['split'](':')[0x1],_0x4b2752=this['_getChangeFromId'](_0xc2ebe1);if(!_0x4b2752)return null;const _0x235296='add'==_0x4b2752['type']?'insertion':'deletion',_0x50988e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x235296];return _0x4b2752['data']['isSuggestion']&&_0x50988e['push']('ck-suggestion-marker-'+_0x235296+'-new'),this['activeChange']==_0x4b2752&&_0x50988e['push']('ck-suggestion-marker--active'),{'classes':_0x50988e,'attributes':{'data-change-id':_0xc2ebe1}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x49bd5b=>{_0x49bd5b['on']('element:pre',(_0x988640,_0x37b135,_0x1856f1)=>{const _0xd79941=_0x37b135['viewItem']['getChild'](0x0);if(!_0xd79941||!_0xd79941['is']('element','code'))return;if(!_0x1856f1['consumable']['consume'](_0xd79941,{'attributes':['vid_start','vid_end']}))return;const _0x562e19=_0x37b135['modelRange']['start']['nodeAfter'];_0x1856f1['writer']['setAttribute']('vid_start',_0xd79941['getAttribute']('vid_start'),_0x562e19),_0x1856f1['writer']['setAttribute']('vid_end',_0xd79941['getAttribute']('vid_end'),_0x562e19);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xa9fe29=>{_0xa9fe29['on']('element',(_0x4e35ba,_0x3859ea,_0x166d66)=>{if(!_0x166d66['consumable']['consume'](_0x3859ea['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3859ea['modelRange']['isCollapsed'])return;const _0xa40e27=_0x3859ea['modelRange']['start']['nodeAfter'];_0xa40e27['hasAttribute']('vid_start')||_0xa40e27['hasAttribute']('vid')||(_0x166d66['writer']['setAttribute']('vid_start',_0x3859ea['viewItem']['getAttribute']('vid_start'),_0xa40e27),_0x166d66['writer']['setAttribute']('vid_end',_0x3859ea['viewItem']['getAttribute']('vid_end'),_0xa40e27));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1b33e3=>_0x1b33e3['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xda7b87,[,_0x48d889])=>{['vid_start','vid_end','vid']['includes'](_0x48d889)&&(_0xda7b87['return']=!0x0,_0xda7b87['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1745cd=>{_0x1745cd['on']('attribute:vid',(_0x531f2d,_0xb90d8b,_0xc62d6)=>{if('\x20'!=_0xb90d8b['item']['data']||_0xb90d8b['item']['parent']['maxOffset']>0x1)return;if(!_0xc62d6['consumable']['consume'](_0xb90d8b['item'],_0x531f2d['name']))return;const _0x5a95d1=_0xc62d6['writer'],_0x24e4a1=_0xc62d6['mapper']['toViewRange'](_0xb90d8b['range']);_0x5a95d1['wrap'](_0x24e4a1,_0x5a95d1['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x540f5a){const _0x162b5c=_0x540f5a['plugins']['get']('RevisionViewer');return(_0x3febbb,_0x216819,_0x2a85e7)=>{const _0x310f08=_0x216819['markerName']['split'](':')[0x1],_0x32de58=_0x162b5c['_getChangeFromId'](_0x310f08);if(!_0x32de58)return null;const _0x703bb5='add'==_0x32de58['type']?'split':'merge';if(!_0x2a85e7['consumable']['test'](_0x216819['markerRange'],_0x3febbb['name']))return;const _0x321b7a=_0x216819['markerRange']['getWalker'](),_0x1fa83d=_0x216819['markerRange']['start'],_0x4f0914=_0x540f5a['model']['schema'];let _0x415afb=null,_0x1bd198=null,_0x2cc48e=!0x1,_0x5bb8c0=!0x1;for(const _0x5e5107 of _0x321b7a){const _0x1be8c9=_0x5e5107['item'];_0x2cc48e=_0x2cc48e||_0x4f0914['isContent'](_0x1be8c9);const _0x2f6873=_0x2a85e7['mapper']['toViewElement'](_0x1be8c9);if(_0x2f6873&&_0x2f6873['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5e5107['type']&&(_0x4f0914['isBlock'](_0x1be8c9)&&!_0x4f0914['isLimit'](_0x1be8c9)&&(_0x1be8c9['nextSibling']||_0x1fa83d['isAtEnd']?_0x415afb&&_0x415afb['parent']==_0x1be8c9||(_0x415afb=_0x1be8c9,_0x8bb9a(_0x5e5107['previousPosition']),_0x5bb8c0=!0x0):_0x1bd198=_0x1bd198||_0x5e5107['previousPosition']));}function _0x8bb9a(_0x16e764){const _0x404098=_0x2a85e7['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x703bb5}),_0x5e7a0d=_0x2a85e7['mapper']['toViewPosition'](_0x16e764);_0x32de58['data']['isSuggestion']&&_0x2a85e7['writer']['addClass']('ck-suggestion-marker-'+_0x703bb5+'-new',_0x404098),_0x162b5c['activeChange']==_0x32de58&&_0x2a85e7['writer']['addClass']('ck-suggestion-marker--active',_0x404098),_0x2a85e7['writer']['insert'](_0x5e7a0d,_0x404098),_0x2a85e7['mapper']['bindElementToMarker'](_0x404098,_0x216819['markerName']);}_0x2cc48e||_0x5bb8c0||!_0x1bd198||_0x8bb9a(_0x1bd198);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2fc80f,_0x34661e,_0xda6239)=>{const _0x1c05fb=_0xda6239['mapper']['markerNameToElements'](_0x34661e['markerName']);if(_0x1c05fb){for(const _0x26678c of _0x1c05fb)(_0x26678c['hasClass']('ck-suggestion-marker-split')||_0x26678c['hasClass']('ck-suggestion-marker-merge'))&&(_0xda6239['mapper']['unbindElementFromMarkerName'](_0x26678c,_0x34661e['markerName']),_0xda6239['writer']['remove'](_0x26678c));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3aa4ec,_0x461bcd,_0x1a8783)=>{const _0x5dc2ec=_0x461bcd['markerName']['split'](':')[0x1],_0x138ef0=this['_getChangeFromId'](_0x5dc2ec);if(!_0x138ef0)return null;const _0xce7080='add'==_0x138ef0['type']?'split':'merge';if(_0x1a8783['consumable']['test'](_0x461bcd['markerRange'],_0x3aa4ec['name']))for(const _0x3afa0f of _0x461bcd['markerRange']['getItems']()){if(!_0x3afa0f['is']('element','softBreak'))continue;const _0x40f39a=_0x1a8783['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xce7080}),_0x564563=_0x1a8783['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3afa0f));_0x138ef0['data']['isSuggestion']&&_0x1a8783['writer']['addClass']('ck-suggestion-marker-'+_0xce7080+'-new',_0x40f39a),this['activeChange']==_0x138ef0&&_0x1a8783['writer']['addClass']('ck-suggestion-marker--active',_0x40f39a),_0x1a8783['writer']['insert'](_0x564563,_0x40f39a),_0x1a8783['mapper']['bindElementToMarker'](_0x40f39a,_0x461bcd['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x397b3c=>{for(const _0x8a9ab3 of this['editor']['model']['document']['getRootNames']()){const _0x7b6f7e=this['editor']['model']['document']['getRoot'](_0x8a9ab3),_0x4f8ab6=this['editor']['editing']['view']['document']['getRoot'](_0x8a9ab3);if(_0x4f8ab6){const _0x234e86=_0x7b6f7e['getAttribute']('revisionHistoryAttachChange');if(_0x397b3c['removeAttribute']('data-change-id',_0x4f8ab6),_0x397b3c['removeClass']('ck-revision-history-root-add',_0x4f8ab6),_0x397b3c['removeClass']('ck-revision-history-root-remove',_0x4f8ab6),_0x397b3c['removeClass']('ck-revision-history-root--active',_0x4f8ab6),_0x234e86){const _0x39e181=this['_getChangeFromId'](_0x234e86);if(!_0x39e181)return null;_0x397b3c['setAttribute']('data-change-id',_0x234e86,_0x4f8ab6),_0x397b3c['addClass']('ck-revision-history-root-'+_0x39e181['type'],_0x4f8ab6),this['activeChange']==_0x39e181&&_0x397b3c['addClass']('ck-revision-history-root--active',_0x4f8ab6);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4fff65=>'revision-comment:'+_0x4fff65,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x33a932=>'revision-suggestion:'+_0x33a932,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x458b33=>({'name':'suggestion:'+_0x458b33,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2ea1f8=>{const _0x2bc036=_0x2ea1f8['markerName']['split'](':')[0x1];return'insertion'!=_0x2bc036&&'deletion'!=_0x2bc036?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2bc036]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Vt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Vt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x11a24b,_0x3d4d4b,_0x5be150)=>{const _0x386f8a=_0x5be150['mapper']['markerNameToElements'](_0x3d4d4b['markerName']);if(_0x386f8a){for(const _0x467210 of _0x386f8a)_0x467210['is']('uiElement')&&(_0x5be150['mapper']['unbindElementFromMarkerName'](_0x467210,_0x3d4d4b['markerName']),_0x5be150['writer']['remove'](_0x467210));}},{'priority':'high'});}['_getChangeFromId'](_0x3ed757){return this['_changeIdToChange']['get'](_0x3ed757);}['_getViewForChange'](_0x45713a){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x45713a),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1c5528,_0x317e9e,_0x40ef4e,_0x214bb1)=>{_0x214bb1&&this['_balloon']['remove'](_0x214bb1),_0x40ef4e&&(this['_balloon']['add']({'view':_0x40ef4e,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5677d8=this['editor']['editing'],_0x50e0e9=this['_getChangeFromId'](_0x40ef4e['changeId']);let _0x6c88e0;if(_0x50e0e9['data']['isOnRoot']){const _0x48d7d9=_0x5677d8['view']['getDomRoot'](_0x50e0e9['rootName']);_0x6c88e0=Array['from'](_0x48d7d9['getClientRects']());}else{const _0x4d77d3=this['editor']['model']['markers']['get']('revision:'+_0x40ef4e['changeId']);_0x6c88e0=Array['from'](_0x5677d8['mapper']['markerNameToElements'](_0x4d77d3['name']))['map'](_0x2437b4=>_0x5677d8['view']['domConverter']['mapViewToDom'](_0x2437b4))['map'](_0x2653c3=>Array['from'](_0x2653c3['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x6c88e0['find'](_0x2625a8=>_0x2625a8['top']-0x3<=this['_activeViewTarget']['y']&&_0x2625a8['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2625a8['left']-0x3<=this['_activeViewTarget']['x']&&_0x2625a8['right']+0x3>=this['_activeViewTarget']['x'])||_0x6c88e0[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2b38bb,_0x3b14bf,_0x57698a,_0x3ebf45)=>{this['activeView']=_0x57698a?this['_getViewForChange'](_0x57698a):null,this['editor']['model']['change'](()=>{const _0x357a5e=this['editor']['editing'];_0x3ebf45&&(_0x3ebf45['data']['isOnRoot']?_0x357a5e['view']['change'](_0x452c8d=>{_0x452c8d['removeClass']('ck-revision-history-root--active',_0x357a5e['view']['document']['getRoot'](_0x3ebf45['rootName']));}):_0x357a5e['reconvertMarker']('revision:'+_0x3ebf45['id'])),_0x57698a&&(_0x57698a['data']['isOnRoot']?_0x357a5e['view']['change'](_0x3a7354=>{_0x3a7354['addClass']('ck-revision-history-root--active',_0x357a5e['view']['document']['getRoot'](_0x57698a['rootName']));}):_0x357a5e['reconvertMarker']('revision:'+_0x57698a['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x2f2ff8,_0x31b53d)=>{if(this['activeChange'])return;const _0x3803c1=this['_findChangeIdFromDomTarget'](_0x31b53d['target']),_0x3a45d5=this['_changeIdToChange']['get'](_0x3803c1);_0x3a45d5?(this['_activeViewTarget']={'x':_0x31b53d['domEvent']['x'],'y':_0x31b53d['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3a45d5)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x9bb875,_0x2d158e)=>{const _0x99baae=this['_findChangeIdFromDomTarget'](_0x2d158e['target']),_0x5e4310=this['_changeIdToChange']['get'](_0x99baae);_0x5e4310?(this['_activeViewTarget']={'x':_0x2d158e['domEvent']['x'],'y':_0x2d158e['domEvent']['y']},_0x5e4310===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5e4310):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x255fa4){do{const _0x44a5d9=_0x255fa4['getAttribute']('data-change-id');if(_0x44a5d9)return _0x44a5d9;_0x255fa4=_0x255fa4['parent'];}while(_0x255fa4);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x380a57=>{for(const _0x3148ee of this['editor']['model']['markers'])_0x380a57['removeMarker'](_0x3148ee);});}};function Vt(_0x4f5544,_0x19831d){return(_0x1fd56d,_0x2e3389,_0xb022d3)=>{if(!_0xb022d3['consumable']['test'](_0x2e3389['markerRange'],_0x1fd56d['name']))return;const _0xef8099=_0x2e3389['markerRange']['getWalker'](),_0x472d97=_0x2e3389['markerRange']['start'],_0x4a39f0=_0x4f5544['model']['schema'];let _0x318f4b=null,_0xeec6b8=null,_0x5dd588=!0x1,_0x29676d=!0x1;for(const _0x5462d1 of _0xef8099){const _0x2baded=_0x5462d1['item'];_0x5dd588=_0x5dd588||_0x4a39f0['isContent'](_0x2baded);const _0x5fd226=_0xb022d3['mapper']['toViewElement'](_0x2baded);if(_0x5fd226&&_0x5fd226['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5462d1['type']&&(_0x4a39f0['isBlock'](_0x2baded)&&!_0x4a39f0['isLimit'](_0x2baded)&&(_0x2baded['nextSibling']||_0x472d97['isAtEnd']?_0x318f4b&&_0x318f4b['parent']==_0x2baded||(_0x318f4b=_0x2baded,_0x5d1639(_0x5462d1['previousPosition']),_0x29676d=!0x0):_0xeec6b8=_0xeec6b8||_0x5462d1['previousPosition']));}function _0x5d1639(_0x41dc38){const _0x40e0cd=_0xb022d3['mapper']['toViewPosition'](_0x41dc38),_0xb63b1d=_0xb022d3['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x19831d});_0xb022d3['writer']['insert'](_0x40e0cd,_0xb63b1d),_0xb022d3['mapper']['bindElementToMarker'](_0xb63b1d,_0x2e3389['markerName']);}_0x5dd588||_0x29676d||!_0xeec6b8||_0x5d1639(_0xeec6b8);};}var Dt=class extends _0x4a68a5{constructor(_0x4a78ef){super(_0x4a78ef);const _0x3c9e33=_0x4a78ef['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x3c9e33,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3c9e33,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x282951=this['editor'],_0x528998=_0x282951['plugins']['get'](Mt),_0x4a7728=_0x528998['isReady']?_0x528998['diff']['newRevisionId']:null;_0x282951['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4a7728);}['refresh'](){const {isReady:_0x54573d,isEnabled:_0x23dbe7,repository:_0x4160da,diff:_0x209e81}=this['editor']['plugins']['get'](Mt),_0x463dcf=_0x209e81&&_0x4160da['getLaterVisibleRevision'](_0x209e81['newRevisionId']);this['isEnabled']=_0x54573d&&_0x23dbe7&&Boolean(_0x463dcf);}},Tt=class extends _0x4a68a5{['_step'];constructor(_0x3e0ca8,{direction:_0x2d70a6}){super(_0x3e0ca8);const _0x17e145=_0x3e0ca8['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x2d70a6?0x1:-0x1,this['listenTo'](_0x17e145,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x17e145,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x17e145,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x121454=this['editor'],_0x2a9758=_0x121454['plugins']['get'](Mt),{isNavigationMode:_0x92e94d,currentChangeNumber:_0x447cc8}=_0x2a9758;let _0x742e79;if(_0x2a9758['activeChange']=_0x92e94d?_0x2a9758['diff']['changes']['get'](_0x447cc8+this['_step']):_0x2a9758['diff']['changes']['first'],_0x2a9758['activeChange']['data']['isOnRoot'])_0x742e79=_0x121454['editing']['view']['getDomRoot'](_0x2a9758['activeChange']['rootName']);else{const _0x267977=_0x121454['model']['markers']['get']('revision:'+_0x2a9758['activeChange']['id']);_0x742e79=_0x1d05ed(_0x121454['editing'],_0x267977);}_0x4f8357({'target':_0x742e79,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x5257ce,currentChangeNumber:_0x4fd0a9,numberOfChanges:_0x5cd4d4,isReady:_0x52ddf8,isEnabled:_0x47b2a1}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x47b2a1&&_0x52ddf8&&_0x5cd4d4)&&(!_0x5257ce||(0x1===this['_step']?_0x4fd0a9<_0x5cd4d4-0x1:_0x4fd0a9>0x0));}},Ht=class extends at{constructor(_0x38fb8e){super(_0x38fb8e);const _0x4fd6ec=this['bindTemplate'],_0x2d8dd4=new _0x4451f8(_0x38fb8e),_0xb3dedd=new _0x4451f8(_0x38fb8e);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',(_0x36c091,_0x4f61d5)=>_0x36c091&&_0x4f61d5>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x13a43a,_0x313d37,_0x2c8700,_0x1a1be0)=>{if(!_0x13a43a)return pt(_0x38fb8e,'Loading...');if(!_0x2c8700)return pt(_0x38fb8e,'No\x20changes');const _0x4cd223=pt(_0x38fb8e,'NUMBER_OF_CHANGES',_0x2c8700);return _0x1a1be0?pt(_0x38fb8e,'X_OF_Y_CHANGES',[_0x313d37+0x1,_0x2c8700]):_0x4cd223;}),_0x2d8dd4['set']({'label':pt(_0x38fb8e,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x27f11a}),_0xb3dedd['set']({'label':pt(_0x38fb8e,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x1a6d41}),_0x2d8dd4['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0xb3dedd['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2d8dd4['on']('execute',()=>this['fire']('execute','backward')),_0xb3dedd['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',_0x4fd6ec['if']('_isStatusLabelVisible','ck-hidden',_0x3adaaf=>!_0x3adaaf)]},'children':[{'text':_0x4fd6ec['to']('isNavigationMode',_0x480ba0=>_0x480ba0?pt(_0x38fb8e,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x38fb8e,'Total')+':\x20')}]},{'text':_0x4fd6ec['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2d8dd4,_0xb3dedd]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x3551b1{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x3bec8a=this['editor']['editing']['view'];_0x3bec8a['change'](_0x5ad3e4=>{for(const _0x1dde55 of _0x3bec8a['document']['roots'])_0x5ad3e4['addClass'](Pt,_0x1dde55);});}['hide'](){const _0x5d4e12=this['editor']['editing']['view'];_0x5d4e12['change'](_0x1c85c4=>{for(const _0x273fd7 of _0x5d4e12['document']['roots'])_0x1c85c4['removeClass'](Pt,_0x273fd7);});}},Lt=class extends _0x3551b1{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x3b485e=this['editor'],_0x44405b=_0x3b485e['plugins']['get'](Mt),_0x31ea05=_0x3b485e['plugins']['get'](Ut);_0x3b485e['ui']['componentFactory']['add']('exitToEditing',_0x4680ce=>{const _0x89634d=new _0x4451f8(_0x4680ce);return _0x89634d['set']({'label':pt(_0x4680ce,'Back\x20to\x20editing'),'icon':_0x5aa572,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x89634d,'execute',()=>{_0x3b485e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x89634d;}),_0x3b485e['ui']['componentFactory']['add']('restoreRevision',_0x4ddef9=>{const _0x496764=new _0x4451f8(_0x4ddef9);return _0x496764['set']({'label':pt(_0x4ddef9,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x496764['bind']('isEnabled')['to'](_0x3b485e['commands']['get']('restoreRevision')),this['listenTo'](_0x496764,'execute',()=>_0x3b485e['execute']('restoreRevision')),_0x496764;}),_0x3b485e['ui']['componentFactory']['add']('changesNavigation',_0x41032b=>{const _0x15429=new Ht(_0x41032b),_0x20afa8=_0x3b485e['commands']['get']('showPreviousChange'),_0x383487=_0x3b485e['commands']['get']('showNextChange');return _0x15429['bind']('isBackwardNavigationEnabled')['to'](_0x20afa8,'isEnabled'),_0x15429['bind']('isForwardNavigationEnabled')['to'](_0x383487,'isEnabled'),_0x15429['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x44405b),this['listenTo'](_0x15429,'execute',(_0x118ab5,_0x2e9cde)=>{_0x3b485e['execute']('forward'===_0x2e9cde?'showNextChange':'showPreviousChange');}),_0x15429;}),_0x31ea05['show'](),_0x44405b['on']('change:isReady',(_0x3698d7,_0x277f7b,_0x584aeb)=>{_0x584aeb?_0x31ea05['hide']():_0x31ea05['show']();});}},Ft=class extends _0xfdb4f{['_resizeObserver']=null;constructor(_0x32875c,_0x14fcb4){super(_0x32875c,_0x14fcb4);const _0x19444e=this['bindTemplate'];this['set']({'label':pt(_0x32875c,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x32875c,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x19444e['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x2ddfce(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x37546e=this['fieldView']['element'];this['_tooltipString']=_0x37546e['scrollWidth']>_0x37546e['clientWidth']&&_0x37546e['value']||'';}},$t=class extends at{constructor(_0x53a08b,_0x2f9cdb,_0x3f6c4f){super(_0x53a08b);const _0x27fb53=new _0x202a0b();_0x27fb53['set']({'content':_0x55924c,'viewBox':'0\x200\x2011\x2010'});const _0x57048a=['ck','ck-revision-history-sidebar__revision-author'];_0x3f6c4f&&_0x57048a['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3474a5=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x53a08b,_0x3f6c4f?'Revision\x20creator':'Revision\x20author')},'children':[_0x27fb53,_0x2f9cdb['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x57048a},'children':_0x3474a5});}};function jt(_0x5338c1,_0x11766a){const _0x4fd53e=_0x5338c1['bindTemplate'],_0x4039f4=_0x5338c1['locale'],_0x2a77fd=ct(_0x4039f4);_0x2a77fd['panelPosition']='sw';const _0xf6dca=function(_0x2ecc5a,_0x59dc4c){const _0x1bf661=function(_0x4890c6,_0x39e92b){const _0x1643d8=_0x4890c6['locale'],_0x1dab1c={'Compare\x20against\x20selected':pt(_0x1643d8,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x1643d8,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x1643d8,'Restore\x20this\x20revision')};return _0x39e92b['map'](_0x4f4d6e=>{const _0x2d33e0=_0x1dab1c[_0x4f4d6e['name']];return _0x2d33e0&&_0x2d33e0!==_0x4f4d6e['name']&&(_0x4f4d6e['name']=_0x2d33e0),_0x4f4d6e;});}(_0x2ecc5a,_0x59dc4c),_0x65f95f=new _0x31e5a4();for(const _0x194b7e of _0x1bf661){const _0x5bdaaa={'type':'button','model':new rt({'label':_0x194b7e['name'],'class':_0x194b7e['class'],'withText':!0x0,'role':'menuitem','_action':_0x194b7e['action']})};_0x5bdaaa['model']['bind']('isEnabled')['to'](_0x2ecc5a,'isActionsDropdownOpen',_0x2c18e1=>'function'!=typeof _0x194b7e['isEnabled']||(!_0x2c18e1||_0x194b7e['isEnabled'](_0x2ecc5a))),_0x65f95f['add'](_0x5bdaaa);}return _0x65f95f;}(_0x5338c1,_0x11766a);return _0x5338c1['bind']('isActionsDropdownOpen')['to'](_0x2a77fd,'isOpen'),_0x2a77fd['buttonView']['set']({'label':pt(_0x4039f4,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x180e7a}),_0x2a77fd['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x4fd53e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x4fd53e['to'](_0x4f1b73=>_0x4f1b73['stopPropagation']())}}),_0x2a77fd['on']('execute',_0x2cde2c=>{_0x5338c1['isReady']&&'function'==typeof _0x2cde2c['source']['_action']&&_0x2cde2c['source']['_action'](_0x5338c1);}),ht(_0x2a77fd,_0xf6dca,{'role':'menu'}),_0x2a77fd['listenTo'](_0x5338c1,'change:isActionsDropdownOpen',(_0x5906a5,_0x8dcbee,_0x5c5111)=>{if(_0x5c5111)for(const _0x166605 of _0x2a77fd['listView']['items']){const _0x1676b7=_0x166605['children']['first'],_0x5a5a3b=_0x11766a['find'](_0x18ce8d=>_0x18ce8d['action']===_0x1676b7['_action'])['isVisible'];_0x166605['isVisible']=void 0x0===_0x5a5a3b||_0x5a5a3b(_0x5338c1);}}),_0x2a77fd;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x5f5cfa(at);var Kt=class extends Bt{['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x13c606,_0x3ed73e,_0x1ed274,_0x5d92c6){super(_0x13c606);const _0x5814ab=this['bindTemplate'],_0x30eedd=function(_0x18a159,_0x499b1b){const _0x2a715b=Array['from'](_0x499b1b['authors'])['filter'](_0x238aa4=>_0x238aa4!=_0x499b1b['creator']);return _0x499b1b['creator']&&_0x2a715b['unshift'](_0x499b1b['creator']),_0x2a715b['map'](_0x14c6df=>new $t(_0x18a159,_0x14c6df,_0x14c6df==_0x499b1b['creator']));}(_0x13c606,_0x3ed73e);this['id']=_0x3ed73e['id'],this['_revision']=_0x3ed73e,this['_requireRevisionName']=_0x5d92c6,this['bind']('name','createdAt')['to'](_0x3ed73e),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2ab2a1=>{return _0x57dc5f=_0x13c606['uiLanguage'],(_0x4c3694=_0x2ab2a1)['toLocaleDateString'](_0x57dc5f,{'month':'long','day':'numeric'})+',\x20'+_0x4c3694['toLocaleTimeString'](_0x57dc5f,{'hour':'numeric','minute':'numeric'});var _0x57dc5f,_0x4c3694;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x13c606,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0xd7de89=>_0xd7de89||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x4f721a,_0x8d439a)=>_0x4f721a&&_0x8d439a),this['revisionActionsView']=_0x1ed274&&_0x1ed274['length']?jt(this,_0x1ed274):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x5814ab['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x5814ab['if']('isEnabled','ck-disabled',_0x555929=>!_0x555929),_0x5814ab['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x5814ab['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x5814ab['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':_0x5814ab['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':_0x30eedd}]},this['revisionActionsView']],'on':{'click':_0x5814ab['to'](_0x293d76=>{_0x293d76['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x314e57=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x314e57,'change',()=>{this['_requireRevisionName']&&!_0x314e57['value']||this['fire']('setName',{'id':this['id'],'name':_0x314e57['value']}),_0x314e57['value']||(_0x314e57['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}};function qt(_0x22c908,_0x487bbe){const _0x101042=ft['fromJSDate'](_0x22c908)['setLocale'](_0x487bbe),_0x455b6d=ft['local'](),_0x59c40d=_0x455b6d['minus']({'days':0x1})['startOf']('day');let _0x56e8de,_0x2c50f3;return _0x101042['hasSame'](_0x455b6d,'day')?(_0x56e8de=_0x101042['startOf']('day')['toJSDate'](),_0x2c50f3=_0x101042['toRelativeCalendar']()):_0x101042['hasSame'](_0x59c40d,'day')?(_0x56e8de=_0x59c40d['toJSDate'](),_0x2c50f3=_0x101042['toRelativeCalendar']()):_0x101042['hasSame'](_0x455b6d,'week')?(_0x56e8de=_0x101042['startOf']('week')['toJSDate'](),_0x2c50f3=_0x101042['weekdayLong']||''):_0x101042['hasSame'](_0x455b6d,'year')?(_0x56e8de=_0x101042['startOf']('month')['toJSDate'](),_0x2c50f3=_0x101042['monthLong']||''):(_0x56e8de=_0x101042['startOf']('year')['toJSDate'](),_0x2c50f3=String(_0x101042['year'])),{'startDate':_0x56e8de,'localizedPeriodName':_0x2c50f3};}var Gt=class extends at{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x162282,_0x1d94e2,_0x911b23,_0x4112e1){super(_0x162282);const _0x66dc1f=qt(_0x1d94e2,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x1d94e2,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x911b23,this['_requireRevisionName']=_0x4112e1,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':_0x66dc1f}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x283b0e){const _0x12f275=new Kt(this['locale'],_0x283b0e,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x12f275);}['removeRevision'](_0x295334){const _0x48df23=this['revisionViews']['find'](_0x4c2617=>_0x4c2617['id']===_0x295334['id']);this['revisionViews']['remove'](_0x48df23);}},Jt=class extends at{constructor(_0x1a24a1){super(_0x1a24a1);const _0x249da9=new _0x202a0b();_0x249da9['content']=_0x3bdd34,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x249da9,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x1a24a1,'Revision\x20history')]}]});}},Wt=class extends at{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x190ce4,_0x13ea30,_0x3a2e82,_0x1035c9){super(_0x190ce4);const _0x26b12b=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x13ea30,this['_revisionActions']=_0x3a2e82,this['_requireRevisionName']=_0x1035c9,this['on']('select',(_0x19725f,_0x1d7302)=>{this['fire']('revisionSelected',_0x1d7302);}),this['on']('setName',(_0xce08ab,_0x3482bb)=>{this['fire']('revisionSetName',_0x3482bb);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x190ce4),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x26b12b['if']('isEnabled','ck-disabled',_0xe701de=>!_0xe701de)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x574c22 of this['_revisions'])this['_addRevision'](_0x574c22);this['_revisions']['on']('add',(_0x244e87,_0x3415d0)=>{this['_addRevision'](_0x3415d0);}),this['_revisions']['on']('remove',(_0x2ca0d2,_0x3c7b87)=>{this['_removeRevision'](_0x3c7b87);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x93e710=>_0x93e710['revisionViews']['map'](_0x263c5c=>_0x263c5c))['flat']();}['selectRevision'](_0x3d37b4){for(const _0x1197a5 of this['revisionViews'])_0x3d37b4&&_0x3d37b4['id']===_0x1197a5['id']?_0x1197a5['select']():_0x1197a5['deselect']();}['highlightRevisions'](_0x25825f){for(const _0x3529b9 of this['revisionViews'])_0x25825f['some'](({id:_0xe54653})=>_0xe54653===_0x3529b9['id'])?_0x3529b9['highlight']():_0x3529b9['unhighlight']();}['_addRevision'](_0x2ba1ab){const _0x57d25c=qt(_0x2ba1ab['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x1967f9=this['_getTimePeriodViewByStartDate'](_0x57d25c);_0x1967f9||(_0x1967f9=new Gt(this['locale'],_0x57d25c,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x1967f9)),_0x1967f9['addRevision'](_0x2ba1ab);}['_removeRevision'](_0x3af150){const _0x855af6=qt(_0x3af150['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x855af6)['removeRevision'](_0x3af150);}['_getTimePeriodViewByStartDate'](_0x296e45){return this['timePeriodViews']['find'](_0x55d86f=>_0x55d86f['startDate']['getTime']()===_0x296e45['getTime']());}},Yt=class RevisionsSidebar extends _0x3551b1{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(
|
|
30
|
-
_0x423c68(_0x356615);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x120814,_0x22bbb4){super(_0x22bbb4),this['sourceElement']=_0x120814,this['model']['document']['createRoot']();const _0x3819ef=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x3819ef);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x385626,_0x2e9ef8){const _0x31c512=new this(_0x385626,_0x2e9ef8);return await _0x31c512['initPlugins'](),await _0x31c512['ui']['init'](_0x385626),await _0x31c512['data']['init'](_0x31c512['config']['get']('initialData')||''),_0x31c512['fire']('ready'),_0x31c512;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x2aa7ef{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x161a70){super(_0x161a70),this['result']='end',_0x161a70['editing']['view']['_overlayModeHint']='auto',_0x161a70['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x2aa7ef{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x3488eb){if(super(_0x3488eb),!this['editor']['config']['get']('revisionHistory'))throw new _0xe8b109('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3932a3=>this['_showRevisionViewer']({..._0x3932a3,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x138d19=>this['_closeRevisionViewer'](_0x138d19)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3f658b=>this['_restoreRevision'](_0x3f658b)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x22a115){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x22a115;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x19f0b7){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x19f0b7);}['getRevision'](_0x5611f3){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x5611f3);}['getRevisions'](_0x10f722){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x10f722||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x31679e=this['editor'],_0x3833fb=_0x58adf4(_0x31679e,ii),_0x2bc254=_0x31679e['plugins']['get']('RevisionTracker'),_0x33e885=_0x31679e['plugins']['get'](_0xa4ad8)['users'];return _0x3833fb['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x3833fb['lazyRoots'],(_0x3833fb['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x2aa7ef{static get['requires'](){return[Mt,_0xa4ad8];}['init'](){const _0x1090fb=this['editor']['plugins']['get'](_0xa4ad8);for(const _0x2fce2d of _0x33e885)_0x2fce2d['isAnonymous']||_0x1090fb['getUser'](_0x2fce2d['id'])||_0x1090fb['addUser'](_0x2fce2d);const _0x64021f=_0x2bc254['repository']['getRevisions']();let _0x37a510=null;const _0x409e70=this['editor']['plugins']['get']('RevisionViewer');_0x409e70['adapter']=_0x2bc254['adapter'],_0x409e70['bind']('isEnabled')['to'](_0x2bc254),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x31679e,'isReadOnly',_0x3d0715=>!_0x3d0715);for(const _0x844703 of _0x64021f){const _0x120d27=null===_0x844703['creator'];if(_0x120d27&&_0x844703['toVersion']===_0x844703['fromVersion'])continue;const _0x5404ea=_0x844703['toJSON']();_0x409e70['addRevisionData'](_0x5404ea,(_0x3d551a,_0x5d4b55,_0xf0eada)=>{if(_0x120d27){if(_0x37a510)_0x37a510['_update'](_0x3d551a,_0x5d4b55);else{if(!_0x5d4b55){const _0x4ced63=_0xf0eada['toJSON']();_0x4ced63['id']=_0x51cc90(),_0x2bc254['saveRevision'](_0x4ced63,_0xf0eada['toVersion'])['then'](_0x30fa44=>{_0x37a510=_0x30fa44;});}}}else _0x844703['_update'](_0x3d551a,_0x5d4b55);});}}},Yt),_0x3833fb);}['_enhanceShowRevisionViewerCallback'](){const _0x20c7ba=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x15e25b=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x15e25b['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3ca402=this['editor']['plugins']['get']('Dialog');_0x3ca402['isOpen']&&_0x3ca402['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xa47cbc=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x91762 of _0xa47cbc)_0x91762['class']=_0x91762['class']?_0x91762['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x6d01d0=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x6d01d0&&_0x6d01d0['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4ae760=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4ae760&&_0x4ae760['setAttribute']('tabindex','-1');}}return _0x20c7ba(this['_getRevisionViewerEditorConfig']())['then'](_0x2d4774=>(this['_viewerEditor']=_0x2d4774,this['editor']['plugins']['has']('Annotations')&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x2d4774))['catch'](_0x34ef01=>(console['error'](_0x34ef01),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x57c591=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x171386=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x29252b of _0x171386)_0x29252b['class']='ck-tab-panel_disabled'===_0x29252b['class']?'':_0x29252b['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x3ed578=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3ed578&&_0x3ed578['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1c5323=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1c5323&&_0x1c5323['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x57c591(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x13e8d5=this['editor']['plugins']['get']('Annotations');_0x13e8d5['refreshVisibility'](),_0x13e8d5['refreshPositioning']();}});});}['_showRevisionViewer'](_0x4d66d4){const _0x1004e9=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x5e9cd4=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x7d1ede=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x7d1ede,_0x4d66d4)['then'](_0x41f492=>(_0x5e9cd4['style']['display']='block',_0x1004e9['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x41f492));}['_closeRevisionViewer'](_0x4545fe){const _0x1d9ded=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x1d9ded['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4545fe['destroy']();}async['_restoreRevision'](_0x396826){const _0x500e6a=this['editor'],_0x22b4dc=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x3e5473=_0x500e6a['plugins']['get']('RevisionTracker'),_0x4a9c71=_0x500e6a['plugins']['get']('RevisionHistoryUtils'),_0x17726b=_0x22b4dc['repository']['getRevision'](_0x396826);let _0x5b61ab,_0x1c8ea3,_0x19dc51;try{await _0x4a9c71['loadRevisionData'](_0x17726b,this['adapter']),_0x5b61ab=_0x4a9c71['getRevisionDocumentData'](_0x17726b),_0x1c8ea3=_0x4a9c71['getRevisionRootsAttributes'](_0x17726b);}catch(_0x214f80){return void console['error'](_0x214f80);}_0x500e6a['model']['change'](_0x6b9413=>{for(const _0x5f2608 of Array['from'](_0x500e6a['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x6b9413['removeMarker'](_0x5f2608);}),_0x22b4dc['isReady']=!0x1,_0x500e6a['model']['enqueueChange'](_0x20e59e=>{_0x20e59e['setSelection'](null),_0x20e59e['removeSelectionAttribute'](_0x500e6a['model']['document']['selection']['getAttributeKeys']());const _0x4fec88=Object['keys'](_0x5b61ab);for(const _0x1ebc88 of _0x500e6a['model']['document']['roots'])'$graveyard'!=_0x1ebc88['rootName']&&_0x1ebc88['isAttached']()&&!_0x4fec88['includes'](_0x1ebc88['rootName'])&&_0x20e59e['detachRoot'](_0x1ebc88);for(const _0xcda6d7 of _0x4fec88){let _0x9c54ab=_0x500e6a['model']['document']['getRoot'](_0xcda6d7);if(!_0x9c54ab||!_0x9c54ab['isAttached']()){const _0x1ca3ea=_0x17726b['diffData']?.[_0xcda6d7]?.['rootElementName']||'$root';_0x9c54ab=_0x20e59e['addRoot'](_0xcda6d7,_0x1ca3ea);}const _0x317cd8=_0x1c8ea3[_0xcda6d7],_0x4db9ad=Object['keys'](_0x317cd8),_0x16d248=_0x5b61ab[_0xcda6d7];for(const _0x45f771 of _0x9c54ab['getAttributeKeys']())_0x4db9ad['includes'](_0x45f771)||_0x20e59e['removeAttribute'](_0x45f771,_0x9c54ab);for(const _0x199626 of _0x4db9ad)_0x20e59e['setAttribute'](_0x199626,_0x1c8ea3[_0xcda6d7][_0x199626],_0x9c54ab);_0x20e59e['remove'](_0x20e59e['createRangeIn'](_0x9c54ab)),_0x20e59e['insert'](_0x500e6a['data']['parse'](_0x16d248,_0x9c54ab),_0x9c54ab,0x0);}});const _0x26802f=pt(_0x500e6a['locale'],'Restored');if(_0x17726b['name'])_0x19dc51=-0x1==_0x17726b['name']['indexOf'](_0x26802f)?_0x26802f+':\x20'+_0x17726b['name']:_0x17726b['name'];else _0x19dc51=_0x26802f+':\x20'+(_0x17726b['createdAt']['toLocaleDateString'](_0x500e6a['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x17726b['createdAt']['toLocaleTimeString'](_0x500e6a['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x3e5473['saveRevision']({'name':_0x19dc51}),_0x22b4dc['isReady']=!0x0,_0x500e6a['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|
|
29
|
+
Xt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt];}constructor(_0x1ed144){super(_0x1ed144),this['_revisionViewer']=_0x1ed144['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x56dde0=this['_revisionsRepository']['_revisions'],_0x572f63=this['_createRevisionActions'](),_0x56bfea=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x56dde0,_0x572f63,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',(_0x398f66,_0x6337e2)=>{_0x6337e2['revisionViews']['on']('add',(_0x5c56f8,_0x391742)=>{_0x391742['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)),_0x56bfea['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x5ae6eb=this['_revisionsRepository']['getRevision'](0x0);if(_0x5ae6eb){const _0x59e98b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5ae6eb['id']);this['_revisionViewer']['compare'](_0x5ae6eb,_0x59e98b);}}['_handleRevisionSelected'](_0x2c0173,_0x40c52e){const _0x1df5d8=this['_revisionsRepository']['getRevision'](_0x40c52e['id']),_0x482497=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1df5d8['id']);this['_revisionViewer']['compare'](_0x1df5d8,_0x482497);}['_handleRevisionSetName'](_0x576915,_0x188809){this['_revisionsRepository']['getRevision'](_0x188809['id'])['setName'](_0x188809['name']);}['_handleDiffChange'](_0x889ea7,_0x5883dd,_0x16236a){const _0x547ca4=this['_revisionsRepository']['getRevisionsInDiff'](_0x16236a);_0x547ca4['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x547ca4),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x547ca4[0x0]));}['_createRevisionActions'](){const _0x498710=this['editor'],_0x49ff92=RevisionsSidebar['availableRevisionActions'],_0x144885=_0x498710['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x144885['length'])return _0x144885['map'](_0x49ca49=>{const _0x1b19f9='string'==typeof _0x49ca49?Object['assign']({},_0x49ff92[_0x49ca49]):_0x49ca49;return _0x1b19f9['action']=_0x1b19f9['action']['bind'](this,_0x498710),_0x1b19f9['isVisible']&&(_0x1b19f9['isVisible']=_0x1b19f9['isVisible']['bind'](this,_0x498710)),_0x1b19f9;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3fab8d},_0x4a7330)=>{const _0x55fe1f=_0x3fab8d['get'](Mt),_0x2925f9=_0x55fe1f['repository'];let _0x53f716=_0x55fe1f['diff']['newRevisionId'],_0x157fc6=_0x4a7330['id'];_0x2925f9['getIndex'](_0x53f716)>_0x2925f9['getIndex'](_0x157fc6)&&([_0x53f716,_0x157fc6]=[_0x157fc6,_0x53f716]),_0x55fe1f['compare'](_0x53f716,_0x157fc6);},'isVisible':({plugins:_0x4706dc},_0x8fccd)=>{const _0x293f46=_0x4706dc['get'](Mt);return!(_0x293f46['repository']['getRevisionsInDiff'](_0x293f46['diff'])['length']>0x2)&&!_0x8fccd['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x3b994e,{id:_0x64e403})=>{_0x3b994e['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x64e403);},'isVisible':({plugins:_0x5836f1},_0x1361dc)=>!!_0x5836f1['get'](Mt)['repository']['getLaterVisibleRevision'](_0x1361dc['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5054f3},{id:_0x1ce5ce,revisionNameView:_0xc1510b})=>{const _0x271926=_0x5054f3['get'](Mt),_0x7d421e=_0x271926['repository']['getEarlierVisibleRevision'](_0x1ce5ce);_0x271926['compare'](_0x1ce5ce,_0x7d421e),_0xc1510b['focus'](),_0xc1510b['fieldView']['select']();}}};}var Qt=class extends _0x28c692{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x1c3d47,_0x364fec){super(_0x1c3d47),this['_view']=_0x364fec,this['_toolbarConfig']=ut(_0x1c3d47['config']['get']('toolbar')),this['_elementReplacer']=new _0x3b14fe();}get['element'](){return this['view']['element'];}['init'](_0x4f5139){const _0x576e53=this['editor'],_0x2ae1ec=this['view'],_0x4deab5=_0x576e53['editing']['view'],_0x37761f=_0x2ae1ec['editable'];_0x37761f['name']=_0x4deab5['document']['getRoot']()['rootName'],_0x2ae1ec['render']();const _0x323fcf=_0x37761f['element'];this['setEditableElement'](_0x37761f['name'],_0x323fcf),_0x2ae1ec['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4deab5['attachDomRoot'](_0x323fcf),this['_elementReplacer']['replace'](_0x4f5139,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x32fcd6=this['view'],_0xe997dd=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xe997dd['detachDomRoot'](_0x32fcd6['editable']['name']),_0x32fcd6['destroy']();}['_initToolbar'](){const _0xb97558=this['view'];_0xb97558['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0xb97558['stickyPanel']['limiterElement']=_0xb97558['element'],_0xb97558['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x27f231})=>_0x27f231),_0xb97558['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0xb97558['toolbar']);}},zt=class extends _0x91fade{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0xe25bc7,_0x2aa011,_0x9a912f={}){super(_0xe25bc7),this['stickyPanel']=new st(_0xe25bc7),this['toolbar']=new ot(_0xe25bc7,{'shouldGroupWhenFull':_0x9a912f['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x5b48fd(_0xe25bc7,_0x2aa011);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x47298(_0x5418e2);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x375df6,_0x25f72d){super(_0x25f72d),this['sourceElement']=_0x375df6,this['model']['document']['createRoot']();const _0xe45d2a=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0xe45d2a);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x519b45,_0xa9ce6){const _0x42489a=new this(_0x519b45,_0xa9ce6);return await _0x42489a['initPlugins'](),await _0x42489a['ui']['init'](_0x519b45),await _0x42489a['data']['init'](_0x42489a['config']['get']('initialData')||''),_0x42489a['fire']('ready'),_0x42489a;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x3551b1{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e6b20){super(_0x5e6b20),this['result']='end',_0x5e6b20['editing']['view']['_overlayModeHint']='auto',_0x5e6b20['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x3551b1{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x218376){if(super(_0x218376),!this['editor']['config']['get']('revisionHistory'))throw new _0x551dda('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x12077d=>this['_showRevisionViewer']({..._0x12077d,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x46046c=>this['_closeRevisionViewer'](_0x46046c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2b9990=>this['_restoreRevision'](_0x2b9990)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x493d8e){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x493d8e;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x42d805){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x42d805);}['getRevision'](_0x50c83b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x50c83b);}['getRevisions'](_0x2eef28){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x2eef28||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x40fb57=this['editor'],_0x3bc2ef=_0x18e9a1(_0x40fb57,ii),_0xb6224b=_0x40fb57['plugins']['get']('RevisionTracker'),_0x19b86d=_0x40fb57['plugins']['get'](_0x2238bc)['users'];return _0x3bc2ef['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x3bc2ef['lazyRoots'],(_0x3bc2ef['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x3551b1{static get['requires'](){return[Mt,_0x2238bc];}['init'](){const _0x285216=this['editor']['plugins']['get'](_0x2238bc);for(const _0x25d6eb of _0x19b86d)_0x25d6eb['isAnonymous']||_0x285216['getUser'](_0x25d6eb['id'])||_0x285216['addUser'](_0x25d6eb);const _0x16c6e4=_0xb6224b['repository']['getRevisions']();let _0x4f3603=null;const _0x4837aa=this['editor']['plugins']['get']('RevisionViewer');_0x4837aa['adapter']=_0xb6224b['adapter'],_0x4837aa['bind']('isEnabled')['to'](_0xb6224b),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x40fb57,'isReadOnly',_0x3c88a7=>!_0x3c88a7);for(const _0x37e50e of _0x16c6e4){const _0x58d219=null===_0x37e50e['creator'];if(_0x58d219&&_0x37e50e['toVersion']===_0x37e50e['fromVersion'])continue;const _0x54b40e=_0x37e50e['toJSON']();_0x4837aa['addRevisionData'](_0x54b40e,(_0x4ad8c7,_0x1e5547,_0xe17924)=>{if(_0x58d219){if(_0x4f3603)_0x4f3603['_update'](_0x4ad8c7,_0x1e5547);else{if(!_0x1e5547){const _0x412811=_0xe17924['toJSON']();_0x412811['id']=_0x1e8bcb(),_0xb6224b['saveRevision'](_0x412811,_0xe17924['toVersion'])['then'](_0x2fc7c0=>{_0x4f3603=_0x2fc7c0;});}}}else _0x37e50e['_update'](_0x4ad8c7,_0x1e5547);});}}},Yt),_0x3bc2ef);}['_enhanceShowRevisionViewerCallback'](){const _0xcee4c9=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x104610=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x104610['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3430e3=this['editor']['plugins']['get']('Dialog');_0x3430e3['isOpen']&&_0x3430e3['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x44b4d4=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x14384c of _0x44b4d4)_0x14384c['class']=_0x14384c['class']?_0x14384c['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x438a22=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x438a22&&_0x438a22['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3119f7=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3119f7&&_0x3119f7['setAttribute']('tabindex','-1');}}return _0xcee4c9(this['_getRevisionViewerEditorConfig']())['then'](_0x293e1a=>(this['_viewerEditor']=_0x293e1a,this['editor']['plugins']['has']('Annotations')&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x293e1a))['catch'](_0x1f0044=>(console['error'](_0x1f0044),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xf1457b=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x37c157=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x47341c of _0x37c157)_0x47341c['class']='ck-tab-panel_disabled'===_0x47341c['class']?'':_0x47341c['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x22114a=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x22114a&&_0x22114a['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x14aee8=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x14aee8&&_0x14aee8['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xf1457b(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xcb8924=this['editor']['plugins']['get']('Annotations');_0xcb8924['refreshVisibility'](),_0xcb8924['refreshPositioning']();}});});}['_showRevisionViewer'](_0x42f0ef){const _0x532863=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x47ebee=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x286f77=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x286f77,_0x42f0ef)['then'](_0x3da2ec=>(_0x47ebee['style']['display']='block',_0x532863['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x3da2ec));}['_closeRevisionViewer'](_0x34832f){const _0x82662d=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x82662d['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x34832f['destroy']();}async['_restoreRevision'](_0x48b29a){const _0x3d0938=this['editor'],_0x4a8d69=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1a260a=_0x3d0938['plugins']['get']('RevisionTracker'),_0x1a7684=_0x3d0938['plugins']['get']('RevisionHistoryUtils'),_0xbbcba1=_0x4a8d69['repository']['getRevision'](_0x48b29a);let _0x203d58,_0x40d53f,_0x383dc2;try{await _0x1a7684['loadRevisionData'](_0xbbcba1,this['adapter']),_0x203d58=_0x1a7684['getRevisionDocumentData'](_0xbbcba1),_0x40d53f=_0x1a7684['getRevisionRootsAttributes'](_0xbbcba1);}catch(_0x3a024a){return void console['error'](_0x3a024a);}_0x3d0938['model']['change'](_0x38b91f=>{for(const _0x51cbb3 of Array['from'](_0x3d0938['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x38b91f['removeMarker'](_0x51cbb3);}),_0x4a8d69['isReady']=!0x1,_0x3d0938['model']['enqueueChange'](_0x5e58ab=>{_0x5e58ab['setSelection'](null),_0x5e58ab['removeSelectionAttribute'](_0x3d0938['model']['document']['selection']['getAttributeKeys']());const _0x5b6b28=Object['keys'](_0x203d58);for(const _0x52e151 of _0x3d0938['model']['document']['roots'])'$graveyard'!=_0x52e151['rootName']&&_0x52e151['isAttached']()&&!_0x5b6b28['includes'](_0x52e151['rootName'])&&_0x5e58ab['detachRoot'](_0x52e151);for(const _0x15fac of _0x5b6b28){let _0x5242be=_0x3d0938['model']['document']['getRoot'](_0x15fac);if(!_0x5242be||!_0x5242be['isAttached']()){const _0x192d4c=_0xbbcba1['diffData']?.[_0x15fac]?.['rootElementName']||'$root';_0x5242be=_0x5e58ab['addRoot'](_0x15fac,_0x192d4c);}const _0x3491cd=_0x40d53f[_0x15fac],_0x53488b=Object['keys'](_0x3491cd),_0x3526aa=_0x203d58[_0x15fac];for(const _0x703ad of _0x5242be['getAttributeKeys']())_0x53488b['includes'](_0x703ad)||_0x5e58ab['removeAttribute'](_0x703ad,_0x5242be);for(const _0x36f724 of _0x53488b)_0x5e58ab['setAttribute'](_0x36f724,_0x40d53f[_0x15fac][_0x36f724],_0x5242be);_0x5e58ab['remove'](_0x5e58ab['createRangeIn'](_0x5242be)),_0x5e58ab['insert'](_0x3d0938['data']['parse'](_0x3526aa,_0x5242be),_0x5242be,0x0);}});const _0x44122d=pt(_0x3d0938['locale'],'Restored');if(_0xbbcba1['name'])_0x383dc2=-0x1==_0xbbcba1['name']['indexOf'](_0x44122d)?_0x44122d+':\x20'+_0xbbcba1['name']:_0xbbcba1['name'];else _0x383dc2=_0x44122d+':\x20'+(_0xbbcba1['createdAt']['toLocaleDateString'](_0x3d0938['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xbbcba1['createdAt']['toLocaleTimeString'](_0x3d0938['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1a260a['saveRevision']({'name':_0x383dc2}),_0x4a8d69['isReady']=!0x0,_0x3d0938['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Dt as RestoreRevisionCommand,gt as Revision,si as RevisionHistory,St as RevisionHistoryUI,wt as RevisionHistoryUtils,_t as RevisionTracker,Mt as RevisionViewer,ti as RevisionViewerEditor,ei as RevisionViewerIntegration,Ut as RevisionViewerLoadingOverlay,Lt as RevisionViewerUI,mt as RevisionsRepository,Yt as RevisionsSidebar,Tt as ShowChangeCommand};
|