@ckeditor/ckeditor5-revision-history 48.3.0-alpha.4 → 48.3.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- 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
|
-
_0xa9f628();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3a6c15){super(),this['id']=_0x3a6c15['id']||_0x5cb97f(),this['creator']=_0x3a6c15['creator']||null,this['authors']=_0x3a6c15['authors']||[],this['diffData']=_0x3a6c15['diffData']||null,this['toVersion']=_0x3a6c15['toVersion']||0x0,this['fromVersion']=_0x3a6c15['fromVersion']||0x0,this['set']('name',_0x3a6c15['name']||''),this['set']('createdAt',_0x3a6c15['createdAt']||new Date()),this['set']('attributes',_0x3a6c15['attributes']||{});}['setName'](_0x59ddff){this['_update']({'name':_0x59ddff});}['setAttribute'](_0x4adaf7,_0x3883fc){const _0x557da4=_0x243a88(this['attributes']);_0x441ac8(_0x557da4,_0x4adaf7,_0x3883fc),this['_update']({'attributes':_0x557da4});}['removeAttribute'](_0x4586a0){const _0x24dff8=_0x243a88(this['attributes']);_0x326cbb(_0x24dff8,_0x4586a0),this['_update']({'attributes':_0x24dff8});}['_update'](_0x53dd50,_0x5ecdd6=!0x1){let _0xf95ca1=!0x1;const _0x43914c={'id':this['id']};for(const _0x198590 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1837bc=_0x53dd50[_0x198590];void 0x0!==_0x1837bc&&_0x1837bc!==this[_0x198590]&&(this[_0x198590]=_0x1837bc,_0x43914c[_0x198590]=_0x1837bc,_0xf95ca1=!0x0);}_0xf95ca1&&(_0x43914c['authors']&&(_0x43914c['authorsIds']=_0x43914c['authors']['map'](_0x4870ec=>_0x4870ec['id']),delete _0x43914c['authors']),this['fire']('_update',_0x43914c,_0x5ecdd6));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x6aea2c=>_0x6aea2c['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0xb465bf{['_revisions'];static get['requires'](){return[_0x5d6be6];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5b3a12){super(_0x5b3a12),this['_revisions']=new _0x3011cf();}['afterInit'](){!async function(_0x5e61ec){const _0x4fb0e='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x34b1d8=0xeb829,_0x772f28=0x78e28,_0x2effb3=window['Date']['now'](),_0x36cc33=_0x5e61ec['editor'],_0x19d541=new window['Promise'](_0x346067=>{_0x36cc33['once']('ready',_0x346067);}),_0x3b1afe={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0xd004f7=_0x36cc33['config']['get']('licenseKey');async function _0x409bb4(){let _0x9edaa5,_0x4fd4ba=null,_0x3552fe=null;try{return'GPL'==_0xd004f7?'NotAllowed':(_0x9edaa5=_0x448052(),_0x9edaa5?(_0x9edaa5['usageEndpoint']&&(_0x3552fe=_0x209c89(_0x9edaa5['usageEndpoint'],_0x9edaa5['jti'])),await _0x2d9ab1()?_0x3e7a06()?_0x5a9a09()?'Expired':_0xd9368b()?('evaluation'==_0x9edaa5['licenseType']&&(_0x4fd4ba=_0x17ca79('EvaluationLimit')),await _0x27824e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5a9a09(){const _0x46050d=['evaluation','trial']['includes'](_0x9edaa5['licenseType'])?_0x2effb3/0x3e8:0xe10*_0x772f28;return _0x9edaa5['exp']<_0x46050d;}function _0x3e7a06(){const _0x2d64b2=_0x9edaa5['features'];if(!_0x2d64b2)return!0x1;if(_0x2d64b2['includes']('*'))return!0x0;if(_0x2d64b2['includes']('RH'))return!0x0;if(_0x2d64b2['includes']('RRH')){if(_0x1d2006())return!0x0;if(_0x291853()||_0x1cf0cf())return!0x0;}return!0x1;}function _0xd9368b(){const _0x25b572=_0x9edaa5['licensedHosts'];if(!_0x25b572||0x0==_0x25b572['length'])return!0x0;const {hostname:_0x48f1c3}=new URL(window['location']['href']);if(_0x25b572['includes'](_0x48f1c3))return!0x0;const _0x5a9876=_0x48f1c3['split']('.');return _0x25b572['filter'](_0xf22194=>_0xf22194['includes']('*'))['map'](_0x323efa=>_0x323efa['split']('.'))['filter'](_0x566b0c=>_0x566b0c['length']<=_0x5a9876['length'])['map'](_0x1675dd=>Array(_0x5a9876['length']-_0x1675dd['length'])['fill']('*'===_0x1675dd[0x0]?'*':'')['concat'](_0x1675dd))['some'](_0x3dfb94=>_0x5a9876['every']((_0x584808,_0x364ead)=>_0x3dfb94[_0x364ead]===_0x584808||'*'===_0x3dfb94[_0x364ead]));}function _0x27824e(){return _0x4fd4ba&&_0x3552fe?new window['Promise']((_0x56be80,_0x5cc1f3)=>{_0x4fd4ba['then'](_0x56be80,_0x5cc1f3),_0x3552fe['then'](_0x58be6d=>{'Valid'!=_0x58be6d&&_0x56be80(_0x58be6d);},_0x5cc1f3);}):_0x4fd4ba||_0x3552fe||'Valid';}}function _0x209c89(_0xb1618c,_0x217ee6){return new window['Promise'](_0x5b048e=>{if(_0x57d96b())return _0x5b048e('Valid');_0x40ebf9(),_0x36cc33['decorate']('_sendUsageRequest');let _0x2ffce4=!0x1;const _0x4f6996=_0x5cb97f();function _0x28db15(_0x3c8126){return!!_0x3c8126&&('object'==typeof _0x3c8126||'function'==typeof _0x3c8126)&&'function'==typeof _0x3c8126['then']&&'function'==typeof _0x3c8126['catch'];}function _0x192849(_0x580de8){_0x1f8e62(_0x580de8)['then'](_0x1129cb=>_0x1129cb&&'ok'==_0x1129cb['status']?_0x4dde0f(_0x2ac47f(_0x4f6996+_0x217ee6))!=_0x1129cb['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4368f0=>(_0x308e67(),_0x4368f0),()=>{const _0x6d1e2=_0x46bc4c();return null==_0x6d1e2?(_0x308e67(),'Valid'):_0x2effb3-_0x6d1e2>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5b048e)['catch'](()=>{_0x5b048e('UsageLimit');});const _0x16fe34=0x36ee80;function _0x308e67(){const _0x7da7d='llct-'+_0x4dde0f(_0x2ac47f(_0xb1618c)),_0x5a71b9=_0x340cf3(_0x4dde0f(window['Math']['ceil'](_0x2effb3/_0x16fe34)));window['localStorage']['setItem'](_0x7da7d,_0x5a71b9);}function _0x46bc4c(){const _0x1a422d='llct-'+_0x4dde0f(_0x2ac47f(_0xb1618c)),_0x739c03=window['localStorage']['getItem'](_0x1a422d);return _0x739c03?window['parseInt'](_0x340cf3(_0x739c03),0x10)*_0x16fe34:null;}function _0x1f8e62(_0x57c83c){return new window['Promise']((_0x55673f,_0x592308)=>{_0x57c83c['then'](_0x55673f,_0x592308),window['setTimeout'](_0x592308,0x1d4c0);});}}_0x36cc33['on']('_sendUsageRequest',(_0x2cac3a,_0x16bd25)=>{if(_0x16bd25[0x0]!=_0xb1618c)return _0x5b048e('UsageLimit');_0x16bd25[0x1]={..._0x16bd25[0x1],'requestId':_0x4f6996};},{'priority':'high'}),_0x36cc33['on']('_sendUsageRequest',_0x269ba3=>{_0x28db15(_0x269ba3['return'])&&(_0x2ffce4=!0x0,_0x192849(_0x269ba3['return']));},{'priority':'low'}),_0x19d541['then'](()=>{_0x2ffce4||_0x5b048e('UsageLimit');});});function _0x57d96b(){return'auto'==_0x36cc33['editing']['view']['_overlayModeHint'];}function _0x40ebf9(){_0x36cc33['editing']['view']['_overlayModeHint']='auto';}}function _0x17ca79(_0x313922){const _0x2e38ff=[new window['Promise'](_0x3a7354=>setTimeout(_0x3a7354,0x93ecc)),_0x19d541['then'](()=>new window['Promise'](_0x238b96=>{const _0x4cd718=0x7,_0x40355c=_0x5e61ec['_revisions'];function _0x433c3e(){_0x40355c['length']>=_0x4cd718&&_0x238b96();}_0x433c3e(),_0x40355c['on']('add',_0x433c3e);})),new window['Promise'](_0x4d7e5c=>{function _0x346091(){for(const _0x29b7d5 in window)if(window['Number']['isNaN'](window['Number'](_0x29b7d5))&&window[_0x29b7d5]==_0x34b1d8)return _0x4d7e5c();'destroyed'!=_0x36cc33['state']&&window['setTimeout'](_0x346091,0x1388);}_0x10dd4c('RevisionViewer')&&_0x346091();})];return window['Promise']['race'](_0x2e38ff)['then'](()=>_0x313922);}async function _0x544362(){if(await _0x19d541,_0x10dd4c('RevisionViewer')){const _0x1aa253=_0x5e61ec['getRevision'](0x0),_0x5e0c9f=_0x5e61ec['getEarlierVisibleRevision'](_0x1aa253['id']),_0x45901e=_0x445339('RevisionViewer');return await _0x45901e['compare'](_0x1aa253['id'],_0x5e0c9f?_0x5e0c9f['id']:null,!0x0),_0x45901e['unbind']('isEnabled'),_0x45901e['isEnabled']=!0x1,_0x45901e['compare']=_0x11b8f3,void(_0x45901e['_getDiff']=_0x11b8f3);}if(_0x10dd4c('RevisionTracker')){const _0x3a596a=_0x445339('RevisionTracker');_0x3a596a['unbind']('isEnabled'),_0x3a596a['isEnabled']=!0x1,_0x3a596a['update']=_0x11b8f3,_0x3a596a['saveRevision']=_0x11b8f3;}_0x36cc33['model']['change']=_0x11b8f3,_0x36cc33['model']['enqueueChange']=_0x11b8f3,_0x36cc33['enableReadOnlyMode']('model');}function _0x1d2006(){return _0x10dd4c('WebSocketGateway')&&'connected'==_0x445339('WebSocketGateway')['state'];}function _0x291853(){return _0x10dd4c('RevisionViewerIntegration');}function _0x1cf0cf(){return _0x10dd4c('TrackChangesDataGetter');}function _0x4f291b(_0xe9028a){const _0x4644c6=_0x3369cd();_0x36cc33[_0x4644c6]='revisionHistoryLicenseKey'+_0xe9028a,_0xe9028a['endsWith']('Limit')&&(window[_0x3369cd()]=_0x34b1d8),'Valid'!=_0xe9028a&&_0x544362();}function _0x3369cd(){const _0x13e343=window['String'](window['performance']['now']())['replace']('.','');let _0xaab626='v';for(let _0x1a0dcb=0x0;_0x1a0dcb<_0x13e343['length'];_0x1a0dcb+=0x2){let _0x262b3e=window['parseInt'](_0x13e343['substring'](_0x1a0dcb,_0x1a0dcb+0x2));_0x262b3e>=0x3e&&(_0x262b3e-=0x3e),_0xaab626+=_0x4fb0e[_0x262b3e];}return _0xaab626;}function _0x448052(){const _0x11b0fe=_0xd004f7['split']('.');if(0x3!=_0x11b0fe['length'])return null;return _0x2ac770(_0x11b0fe[0x1]);function _0x2ac770(_0x39b9c0){const _0x5bc61e=_0x5bb1ce(_0x39b9c0);return _0x5bc61e&&_0x213a10()?_0x5bc61e:null;function _0x213a10(){const _0x120216=_0x5bc61e['jti'],_0x17d2af=window['parseInt'](_0x120216['substring'](_0x120216['length']-0x8),0x10),_0x22d3b4={..._0x5bc61e,'jti':_0x120216['substring'](0x0,_0x120216['length']-0x8)};return delete _0x22d3b4['vc'],_0x2ac47f(_0x22d3b4)==_0x17d2af;}}}async function _0x2d9ab1(){let _0x24d1c9=!0x0;try{const [_0x30e294,_0x3b8a87,_0x1517b2]=_0xd004f7['split']('.');return _0x281398(_0x30e294),await _0x5ac90e(_0x30e294,_0x3b8a87,_0x1517b2),_0x24d1c9;}catch{return!0x1;}function _0x281398(_0x1e68e6){const _0x5da906=_0x5bb1ce(_0x1e68e6);_0x5da906&&'ES256'==_0x5da906['alg']||(_0x24d1c9=!0x1);}async function _0x5ac90e(_0x46fdfb,_0x52b6be,_0x1ddb48){const _0x582930=window['Uint8Array']['from'](_0x51a03f(_0x1ddb48),_0x11d4c6=>_0x11d4c6['charCodeAt'](0x0)),_0x4d80a9=new window['TextEncoder']()['encode'](_0x46fdfb+'.'+_0x52b6be),_0x9f5bd4=window['crypto']['subtle'];if(!_0x9f5bd4)return;const _0x25230a=await _0x9f5bd4['importKey']('jwk',_0x3b1afe,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x9f5bd4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x25230a,_0x582930,_0x4d80a9)||(_0x24d1c9=!0x1);}}function _0x5bb1ce(_0x773a73){return _0x773a73['startsWith']('ey')?JSON['parse'](_0x51a03f(_0x773a73)):null;}function _0x51a03f(_0x1efe19){return window['atob'](_0x1efe19['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2ac47f(_0x5089df){let _0x2ccb0e=0x1505;function _0x22ce2b(_0x5b7a26){for(let _0x3f5aba=0x0;_0x3f5aba<_0x5b7a26['length'];_0x3f5aba++){const _0x8cb096=_0x5b7a26['charCodeAt'](_0x3f5aba);_0x2ccb0e=(_0x2ccb0e<<0x5)+_0x2ccb0e+_0x8cb096,_0x2ccb0e&=_0x2ccb0e;}}function _0x433291(_0x27a3e6){Array['isArray'](_0x27a3e6)?_0x27a3e6['forEach'](_0x433291):_0x27a3e6&&'object'==typeof _0x27a3e6?Object['entries'](_0x27a3e6)['sort']()['forEach'](([_0x6d7e06,_0x40823b])=>{_0x22ce2b(_0x6d7e06),_0x433291(_0x40823b);}):_0x22ce2b(window['String'](_0x27a3e6));}return _0x433291(_0x5089df),_0x2ccb0e>>>0x0;}function _0x4dde0f(_0x59e638){return _0x59e638['toString'](0x10)['padStart'](0x8,'0');}function _0x340cf3(_0x45e236){return _0x45e236['split']('')['reverse']()['join']('');}function _0x10dd4c(_0x723598){return _0x36cc33['plugins']['has'](_0x723598);}function _0x445339(_0x60e0c8){return _0x36cc33['plugins']['get'](_0x60e0c8);}function _0x11b8f3(){}_0x4f291b(await _0x409bb4());}(this);}['createRevision'](_0x296ba7){const _0x188819=this['editor']['plugins']['get']('Users');return new gt({'id':_0x296ba7['id'],'name':_0x296ba7['name'],'creator':_0x296ba7['creatorId']?_0x188819['getUser'](_0x296ba7['creatorId']):null,'diffData':_0x296ba7['diffData']||_0x296ba7['data'],'authors':_0x296ba7['authorsIds']['map'](_0x41a1ff=>_0x188819['getUser'](_0x41a1ff)),'createdAt':new Date(_0x296ba7['createdAt']),'attributes':_0x296ba7['attributes'],'fromVersion':_0x296ba7['fromVersion'],'toVersion':_0x296ba7['toVersion']});}['addRevision'](_0x7b5279,_0x513a1a=0x0){this['_revisions']['add'](_0x7b5279,_0x513a1a);}['getRevision'](_0x3a4532){return this['_revisions']['get'](_0x3a4532);}['getRevisions'](_0x2f54bb={'toJSON':!0x1}){const _0x1be01c=Array['from'](this['_revisions']);return _0x1be01c['reverse'](),_0x2f54bb['toJSON']?_0x1be01c['map'](_0x1c7a27=>_0x1c7a27['toJSON']()):_0x1be01c;}['getIndex'](_0xda52df){return this['_revisions']['getIndex'](_0xda52df);}['getEarlierVisibleRevision'](_0x4715ec){const [,_0x55e439]=this['getRevisionsIterator'](_0x4715ec,{'direction':'earlier'});return _0x55e439;}['getLaterVisibleRevision'](_0x30963b){const [,_0x4ab80d]=this['getRevisionsIterator'](_0x30963b,{'direction':'later'});return _0x4ab80d;}['getRevisionsInDiff'](_0x11effd){const _0x3c86b8=[];for(const _0x1f10d2 of this['getRevisionsIterator'](_0x11effd['newRevisionId']))if(_0x3c86b8['push'](_0x1f10d2),_0x1f10d2['id']===_0x11effd['oldRevisionId'])break;return _0x3c86b8;}*['getRevisionsIterator'](_0x3342ea,{direction:_0x4161f4='earlier',filter:_0x1f8d08=()=>!0x0}={}){const _0x55a807='earlier'===_0x4161f4?0x1:-0x1;let _0x963411=this['_revisions']['get'](_0x3342ea),_0x16a215=this['getIndex'](_0x963411);for(yield _0x963411;_0x963411;){if(_0x16a215+=_0x55a807,_0x963411=this['getRevision'](_0x16a215),!_0x963411)return;_0x1f8d08(_0x963411)&&(yield _0x963411);}}},wt=class extends _0xb465bf{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x5ae6e3,'c'],[_0x345ba1,'a'],[_0x4b4193,'e'],[_0x28fe30,'r'],[_0x55dadf,'u']]);['_typeCharToViewClass']=new Map([['c',_0x5ae6e3],['a',_0x345ba1],['e',_0x4b4193],['r',_0x28fe30],['u',_0x55dadf]]);async['loadRevisionData'](_0x1acd5d,_0x24b542){if(_0x1acd5d['diffData']||!_0x24b542)return;const _0x23b6bd=this['editor']['config']['get']('collaboration.channelId');_0x1acd5d['diffData']=(await _0x24b542['getRevision']({'channelId':_0x23b6bd,'revisionId':_0x1acd5d['id']}))['diffData'];}['getRevisionDocumentData'](_0x4dc70a){const _0x553360={};for(const _0x3bf9b6 in _0x4dc70a['diffData']){if(_0x4dc70a['diffData'][_0x3bf9b6]['attachChange']&&!_0x4dc70a['diffData'][_0x3bf9b6]['attachChange']['isAttached'])continue;const _0xbfecc8=this['_removeRevisionMarkers'](JSON['parse'](_0x4dc70a['diffData'][_0x3bf9b6]['insertions'])),_0x5cd786=this['editor']['editing']['view']['document'],_0x53ca98=new _0x4d5adb(_0x5cd786,_0xbfecc8['map'](_0x2f280c=>this['_getViewFromDiffObj'](_0x2f280c,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x553360[_0x3bf9b6]=this['editor']['data']['processor']['toData'](_0x53ca98),this['editor']['data']['processor']['useFillerType']('default');}return _0x553360;}['getRevisionRootsAttributes'](_0x5b3b24){const _0x25b9ef={};for(const _0x31bda5 in _0x5b3b24['diffData'])_0x5b3b24['diffData'][_0x31bda5]['attachChange']&&!_0x5b3b24['diffData'][_0x31bda5]['attachChange']['isAttached']||(_0x25b9ef[_0x31bda5]=_0x5b3b24['diffData'][_0x31bda5]['attributesAfter']||{});return _0x25b9ef;}['getRevisionRootsModelElements'](_0x6bab66){const _0x355cca={};for(const _0x5bd48b in _0x6bab66['diffData']){if(_0x6bab66['diffData'][_0x5bd48b]['attachChange']&&!_0x6bab66['diffData'][_0x5bd48b]['attachChange']['isAttached'])continue;const _0x4b4afc=_0x6bab66['diffData'][_0x5bd48b]['rootElementName'];_0x4b4afc&&(_0x355cca[_0x5bd48b]=_0x4b4afc);}return _0x355cca;}['_getTypeCharForViewElement'](_0x2041b5){return this['_viewClassToTypeChar']['get'](_0x2041b5['constructor']);}['_getViewFromDiffObj'](_0x2ba445,_0x3fd33f){const _0xe69eac=this['editor']['editing']['view']['document'];if('string'==typeof _0x2ba445)return new _0x51901b(_0xe69eac,_0x2ba445);{let _0x53b61b,_0x36e38e;_0x36e38e='u'==_0x2ba445['type']||'r'==_0x2ba445['type']?[]:_0x2ba445['children']['map'](_0x14b940=>this['_getViewFromDiffObj'](_0x14b940,_0x3fd33f));const _0x8fa119=this['_typeCharToViewClass']['get'](_0x2ba445['type'])||_0x4a8a2f,_0x5a961c=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x53b61b=new _0x8fa119(_0xe69eac,_0x2ba445['name'],_0x2ba445['attributes'],_0x36e38e),'u'==_0x2ba445['type']&&_0x2ba445['children'][0x0]){const _0x3d1590=_0x2ba445['children'][0x0];if(_0x53b61b['render']=function(_0x13c8da){const _0x52ec22=_0x13c8da['createElement']('div');return _0x52ec22['innerHTML']=_0x3d1590,_0x52ec22['childNodes'][0x0];},_0x3fd33f){const _0xf5b8fa=new _0x4d5adb(_0xe69eac);_0xf5b8fa['_appendChild'](_0x53b61b);const _0x12926c=Array['from'](_0x5a961c['viewChildrenToDom'](_0xf5b8fa,{'bind':!0x1})),_0x3d2cac=_0x5a961c['domDocument']['createElement']('div');_0x3d2cac['append'](..._0x12926c),_0x53b61b=Array['from'](_0x5a961c['domChildrenToView'](_0x3d2cac))[0x0];}}else{if('r'==_0x2ba445['type']&&_0x2ba445['children'][0x0]){const _0x2c686f=_0x2ba445['children'][0x0];if(_0x53b61b['render']=function(_0xb47b42){_0xb47b42['innerHTML']=_0x2c686f;},_0x3fd33f){const _0x34935c=new _0x4d5adb(_0xe69eac);_0x34935c['_appendChild'](_0x53b61b);const _0x2205b7=Array['from'](_0x5a961c['viewChildrenToDom'](_0x34935c,{'bind':!0x1})),_0x38da9e=_0x5a961c['domDocument']['createElement']('div');_0x38da9e['append'](..._0x2205b7);const _0x28f715=Array['from'](_0x5a961c['domChildrenToView'](_0x38da9e));_0x28f715['length']>0x1?_0x53b61b['_appendChild'](_0x28f715):_0x53b61b=_0x28f715[0x0];}}}if(_0x2ba445['customProperties']){for(const [_0x2197fb,_0x505846]of _0x2ba445['customProperties'])_0x53b61b['_setCustomProperty'](_0x2197fb,_0x505846);}const _0x9b35f7=void 0x0===_0x2ba445['fillerOffset']?null:_0x2ba445['fillerOffset'];return null!==_0x9b35f7&&(_0x53b61b['getFillerOffset']=()=>_0x9b35f7),_0x53b61b;}}['_makeModelFromViewString'](_0x4f8784,_0x1dc3b7){const _0x5d551f=JSON['parse'](_0x4f8784),_0x4e85e8=this['editor']['editing']['view']['document'],_0x37cd86=new _0x4d5adb(_0x4e85e8,_0x5d551f['map'](_0x3ff6a4=>this['_getViewFromDiffObj'](_0x3ff6a4,!0x0))),_0x171227=this['editor']['data']['toModel'](_0x37cd86,_0x1dc3b7);return _0x171227['name']=_0x1dc3b7,_0x171227;}['_removeRevisionMarkers'](_0x28f230){return(_0x28f230=_0x28f230['filter'](_0x5a31b9=>!_0x5a31b9['name']||'revision-start'!==_0x5a31b9['name']&&'revision-end'!==_0x5a31b9['name']))['forEach'](_0x22f831=>{'string'!=typeof _0x22f831&&(_0x22f831['children']=this['_removeRevisionMarkers'](_0x22f831['children']),_0x22f831['attributes']=_0x22f831['attributes']['filter'](_0x3d3ff9=>!_0x3d3ff9[0x0]['startsWith']('data-revision-')));}),_0x28f230;}};function pt(_0x50cb77,_0x41414d,_0xe1c26f){const t=_0x50cb77['t'];switch(_0x41414d){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'},_0xe1c26f);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xe1c26f);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 _0xb465bf{['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[_0x5d6be6,mt,wt,_0x2a06cd];}constructor(_0x3aab1e){super(_0x3aab1e),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 _0x560e11=_0x5cb97f();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x560e11},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 _0x25e04e=this['repository']['getRevision'](0x0),_0x3a5c6c=_0x25e04e&&null===_0x25e04e['creator']?_0x25e04e:null;if(this['_continueCurrentRevision']=!!_0x3a5c6c&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3681ed=this['_source']['getCurrentRevisionId'](),_0x3cc780=this['repository']['getRevision'](_0x3681ed);if(_0x3cc780)this['_startingVersion']=_0x3cc780['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0xe6eaa0=this['_source']['history']['_operations']['find'](_0x3e848f=>!_0x3e848f['_isInit']),_0x44d3e2=_0xe6eaa0?_0xe6eaa0['baseVersion']:this['_source']['history']['version'];_0x25e04e?(_0x25e04e['toVersion']<_0x44d3e2&&_0x25e04e['_update']({'toVersion':_0x44d3e2}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3a5c6c['id'],this['_startingVersion']=_0x3a5c6c['fromVersion']):(this['_startingVersion']=_0x25e04e['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x44d3e2,this['_continueCurrentRevision']=!0x1);}}else _0x3a5c6c&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3a5c6c['toVersion'],this['editor']['model']['document']['history']['version']),_0x3a5c6c['fromVersion']===_0x3a5c6c['toVersion']?(0x0!==_0x3a5c6c['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3a5c6c['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3a5c6c['id'],this['_startingVersion']=_0x3a5c6c['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',_0x834a71=>!_0x834a71),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x915b73=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xde812f;for(const _0x5b3ea8 in _0x915b73){const _0x533799=_0x5b3ea8,_0xf4b88a=_0x915b73[_0x533799];if('revisionHistoryLicenseKeyValid'==_0xf4b88a||'revisionHistoryLicenseKeyInvalid'==_0xf4b88a||'revisionHistoryLicenseKeyExpired'==_0xf4b88a||'revisionHistoryLicenseKeyDomainLimit'==_0xf4b88a||'revisionHistoryLicenseKeyNotAllowed'==_0xf4b88a||'revisionHistoryLicenseKeyEvaluationLimit'==_0xf4b88a||'revisionHistoryLicenseKeyUsageLimit'==_0xf4b88a){delete _0x915b73[_0x533799],_0xde812f=_0xf4b88a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xde812f&&_0x915b73['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xde812f&&_0x915b73['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xde812f&&_0x915b73['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xde812f&&_0x915b73['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xde812f&&_0x915b73['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xde812f&&_0x915b73['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x5bd640=this['repository']['getRevision'](0x0),_0x5070d1=await this['getRevisionDocumentData'](_0x5bd640),_0x2f7a1b=await this['getRevisionRootsAttributes'](_0x5bd640),_0x3564a9=this['_utils']['getRevisionRootsModelElements'](_0x5bd640);this['_replaceEditorDataWithRevisionData'](_0x5070d1,_0x2f7a1b,_0x3564a9);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x7b5c6f){this['_source']=_0x7b5c6f;}async['update'](){const _0x3f9263=await this['_source']['getLatestVersion']();if(_0x3f9263>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4ef42d=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3f9263});_0x4ef42d['authors']=_0x4ef42d['authorsIds']['map'](_0x1c4dfd=>this['editor']['plugins']['get']('Users')['getUser'](_0x1c4dfd)),this['currentRevision']['_update'](_0x4ef42d);}}async['saveRevision'](_0x1431dd={},_0x944bf7=null){const _0x322a9f=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x944bf7>this['currentRevision']['toVersion']&&(_0x944bf7=null),null===_0x944bf7&&(_0x944bf7=await this['_source']['getLatestVersion']());const _0x5607b5=this['_getFromVersion'](_0x944bf7),_0x176b4f=this['buildRevisionData']({'from':_0x5607b5,'to':_0x944bf7});if(this['currentRevision']['toVersion']<_0x944bf7){const _0x397223=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x944bf7,'to':_0x944bf7});_0x397223['authors']=[],_0x397223['authorsIds']=[],_0x397223['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x397223,!0x0),delete _0x397223['authors'],_0x322a9f['push'](_0x397223);}_0x1431dd['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1431dd['name']=_0x1431dd['name']||null,_0x1431dd['id']=_0x1431dd['id']||_0x5cb97f(),_0x1431dd={..._0x1431dd,..._0x176b4f};const _0x412e82=this['addRevisionData'](_0x1431dd);_0x322a9f['push'](_0x1431dd);const _0x392cea=this['repository']['getIndex'](_0x412e82);if(0x0!==_0x392cea){const _0x33a921=this['repository']['getRevision'](_0x392cea-0x1);if(_0x33a921['fromVersion']!==_0x944bf7){const _0x259d86=this['_revisionDataBuilder']['getData'](_0x944bf7,_0x33a921['toVersion']),_0xe97ba5={'id':_0x33a921['id'],'diffData':_0x259d86['diffData'],'authorsIds':_0x259d86['authorsIds'],'authors':_0x259d86['authorsIds']['map'](_0x227107=>this['editor']['plugins']['get']('Users')['getUser'](_0x227107)),'fromVersion':_0x944bf7};_0x33a921===this['currentRevision']&&(_0xe97ba5['createdAt']=new Date(_0x1431dd['createdAt']['getTime']()+0xa)),_0x33a921['_update'](_0xe97ba5,!0x0),delete _0xe97ba5['authors'],_0x322a9f['push'](_0xe97ba5);}}if(this['adapter']){for(const _0x36ce09 of _0x322a9f)this['_bufferUpdate'](_0x36ce09['id'],_0x36ce09,!0x0);this['sendBufferedUpdates']();}return _0x412e82;}['addRevisionData'](_0x1d2220){const _0x3047e1=this['repository']['createRevision'](_0x1d2220);return this['adapter']&&_0x3047e1['on']('_update',(_0x100c4c,_0x3aa507,_0x59188b)=>{_0x59188b||(this['_bufferUpdate'](_0x3aa507['id'],_0x3aa507,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3047e1,this['_findInsertionIndex'](_0x3047e1)),_0x3047e1;}async['getRevisionDocumentData'](_0x1829ee){return await this['_utils']['loadRevisionData'](_0x1829ee,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1829ee);}async['getRevisionRootsAttributes'](_0x479e80){return await this['_utils']['loadRevisionData'](_0x479e80,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x479e80);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x37ffbe=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x56b47c=0x0;_0x56b47c<_0x37ffbe['length'];_0x56b47c++){const _0x18d170=_0x37ffbe[_0x56b47c];let _0x17c4ce=!0x1;for(const _0x288212 of Object['keys'](_0x18d170))void 0x0===_0x18d170[_0x288212]?delete _0x18d170[_0x288212]:'id'!==_0x288212&&(_0x17c4ce=!0x0);_0x17c4ce||(_0x37ffbe[_0x56b47c]=null);}if(_0x37ffbe=_0x37ffbe['filter'](_0x555c22=>null!==_0x555c22),!_0x37ffbe['length'])return;for(let _0x3c2a4c=0x0;_0x3c2a4c<_0x37ffbe['length'];_0x3c2a4c++){const _0x36c3bf=_0x37ffbe[_0x3c2a4c];void 0x0!==_0x36c3bf['fromVersion']&&void 0x0===_0x36c3bf['toVersion']&&(_0x36c3bf['toVersion']=this['repository']['getRevision'](_0x36c3bf['id'])['toVersion']),void 0x0!==_0x36c3bf['toVersion']&&void 0x0===_0x36c3bf['fromVersion']&&(_0x36c3bf['fromVersion']=this['repository']['getRevision'](_0x36c3bf['id'])['fromVersion']);}const _0x4ccd94=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x37ffbe,_0x4ccd94)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x3cdb1c=>{if(_0x3cdb1c){for(const _0x393d3d of _0x3cdb1c)this['setRevisionData']({'id':_0x393d3d['id'],'createdAt':_0x393d3d['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x38e202=null,from:_0x2290e3=null,to:_0x458fd4=null}){_0x2290e3=null!==_0x2290e3?_0x2290e3:_0x38e202['fromVersion'],_0x458fd4=null!==_0x458fd4?_0x458fd4:_0x38e202['toVersion'];const _0x2f5f20=this['_revisionDataBuilder']['getData'](_0x2290e3,_0x458fd4),_0x2d30aa={'diffData':_0x2f5f20['diffData'],'authorsIds':_0x2f5f20['authorsIds'],'fromVersion':_0x2290e3,'toVersion':_0x458fd4};if(!_0x38e202||_0x458fd4!==_0x38e202['toVersion']){const _0x2b20a0=_0x458fd4-0x1,_0x5bd9a1=this['_source']['history']['getOperation'](_0x2b20a0);_0x2d30aa['createdAt']=_0x5bd9a1&&_0x5bd9a1['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2290e3===this['_loadedStateData']['fromVersion']){for(const _0x5ef759 of this['_loadedStateData']['authors'])_0x2d30aa['authorsIds']['includes'](_0x5ef759['id'])||_0x2d30aa['authorsIds']['push'](_0x5ef759['id']);}return _0x2d30aa;}['_bufferUpdate'](_0x3fc3eb,_0x2244d5,_0x44c055){if(this['_bufferedUpdates']['has'](_0x3fc3eb)){const _0xa00fd4=this['_bufferedUpdates']['get'](_0x3fc3eb);_0x2244d5=_0x44c055?{..._0xa00fd4,..._0x2244d5}:{..._0x2244d5,..._0xa00fd4};}this['_bufferedUpdates']['set'](_0x3fc3eb,_0x2244d5);}['setRevisionData'](_0x44628f){const _0x498761=this['repository']['getRevision'](_0x44628f['id']);if(_0x44628f['createdAt']&&(_0x44628f['createdAt']=new Date(_0x44628f['createdAt'])),_0x44628f['authorsIds']){const _0x914694=this['editor']['plugins']['get']('Users');_0x44628f['authors']=_0x44628f['authorsIds']['map'](_0x38b78b=>_0x914694['getUser'](_0x38b78b));}_0x498761['_update'](_0x44628f,!0x0);}['_createInitialRevision'](_0x33c252){const _0xac24fa=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xac24fa)this['_initialRevisionId']=_0xac24fa['id'];else{const _0x5e0b22=!this['editor']['model']['document']['roots']['find'](_0x3ab319=>this['editor']['model']['hasContent'](_0x3ab319)),_0xb5e319=this['editor']['plugins']['get']('Users')['me']['id'],_0x2996b3=pt(this['editor']['locale'],_0x5e0b22?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x33c252,'to':_0x33c252,'id':this['_initialRevisionId'],'name':_0x2996b3,'creatorId':_0xb5e319});}}['_createCurrentRevision'](_0x54e224){const _0x64fafe=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x64fafe),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x54e224,'to':_0x54e224,'id':_0x64fafe,'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'](_0x13c117,_0x2ca76c,_0xf93f69){const _0x3b7247={},_0x1e802e={},_0x475044={},_0x58c933=this['editor']['config']['get']('roots')||{};for(const [_0x5e9ed1,_0x34c273]of Object['entries'](_0x58c933))_0x34c273['lazyLoad']||(_0x3b7247[_0x5e9ed1]=_0x34c273['initialData']??'',_0x1e802e[_0x5e9ed1]=_0x34c273['modelAttributes']||{},_0x34c273['modelElement']&&(_0x475044[_0x5e9ed1]=_0x34c273['modelElement']));for(const _0x5949c9 of this['editor']['model']['document']['getRootNames']())_0x3b7247[_0x5949c9]??='',_0x1e802e[_0x5949c9]??={};let _0x4dd6da=!0x1;const _0x90b4a2=Object['keys'](_0x3b7247),_0x59cef7=Object['keys'](_0x13c117);for(const _0x523f1f of _0x90b4a2){if(_0x3b7247[_0x523f1f]!==_0x13c117[_0x523f1f]&&''!==_0x3b7247[_0x523f1f]['trim']()){_0x4dd6da=!0x0;break;}if(!_0x30d5eb(_0x1e802e[_0x523f1f],_0x2ca76c[_0x523f1f])&&Object['keys'](_0x1e802e[_0x523f1f])['length']>0x0){_0x4dd6da=!0x0;break;}const _0x506c78=_0x475044[_0x523f1f],_0x277183=_0xf93f69[_0x523f1f];if(_0x506c78&&_0x277183&&_0x506c78!==_0x277183){_0x4dd6da=!0x0;break;}}_0x4dd6da||(_0x4dd6da=_0x59cef7['some'](_0x436950=>!this['editor']['model']['document']['getRoot'](_0x436950))),_0x4dd6da&&_0x65c201('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3b7247,'editorRootsAttributes':_0x1e802e,'editorRootsModelElements':_0x475044,'revisionData':_0x13c117,'revisionRootsAttributes':_0x2ca76c,'revisionRootsModelElements':_0xf93f69});for(const [_0x5cf9c5,_0x1c1332]of Object['entries'](_0x13c117))this['editor']['config']['set']('roots.'+_0x5cf9c5+'.initialData',_0x1c1332);for(const [_0x4a67fc,_0x1b94de]of Object['entries'](_0x2ca76c))this['editor']['config']['set']('roots.'+_0x4a67fc+'.modelAttributes',_0x1b94de);const _0xa9998d=this['editor']['model']['document'];for(const [_0x324ab5,_0x58738c]of Object['entries'](_0xf93f69)){this['editor']['config']['set']('roots.'+_0x324ab5+'.modelElement',_0x58738c);const _0x1fc8c8=_0xa9998d['getRoot'](_0x324ab5);_0x1fc8c8&&_0x1fc8c8['name']!==_0x58738c&&(_0xa9998d['roots']['remove'](_0x324ab5),_0xa9998d['createRoot'](_0x58738c,_0x324ab5));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3e342f=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3e342f['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1d22fe){const _0x5a61b9=this['repository']['getRevisions']();_0x5a61b9['reverse']();let _0x2849ac=0x0;for(;_0x2849ac<_0x5a61b9['length'];){const _0x6f1a00=_0x5a61b9[_0x2849ac];if(_0x6f1a00===this['currentRevision']){_0x2849ac++;continue;}if(_0x6f1a00['id']===this['_initialRevisionId'])break;const _0x59cd29=_0x1d22fe['toVersion']-_0x6f1a00['toVersion']||_0x1d22fe['fromVersion']-_0x6f1a00['fromVersion'];if(_0x59cd29>0x0)break;if(_0x59cd29<0x0)_0x2849ac++;else{if(!_0x1d22fe['creator']&&_0x6f1a00['creator'])break;if(_0x6f1a00['creator']||!_0x1d22fe['creator']){if(_0x1d22fe['createdAt']>_0x6f1a00['createdAt'])break;_0x2849ac++;}else _0x2849ac++;}}return _0x2849ac;}['_getFromVersion'](_0x1e0d99){const _0x28aa3b=this['repository']['getRevisions']();_0x28aa3b['reverse'](),_0x28aa3b['shift']();const _0x4c1781=_0x28aa3b['find'](_0x72f497=>_0x72f497['toVersion']<=_0x1e0d99)['toVersion'];return _0x4c1781<this['_startingVersion']?this['_startingVersion']:_0x4c1781;}['_makeRevision']({name:_0x16df30,from:_0xd4068a,to:_0x1c4d08,creatorId:_0x3d97a9,id:_0x5856f6}){const _0x53efa5=this['buildRevisionData']({'from':_0xd4068a,'to':_0x1c4d08});_0x53efa5['name']=_0x16df30,_0x53efa5['creatorId']=_0x3d97a9,_0x53efa5['id']=_0x5856f6;const _0x4e1cac=this['addRevisionData'](_0x53efa5);return this['adapter']&&this['_bufferUpdate'](_0x53efa5['id'],_0x53efa5,!0x0),_0x4e1cac;}['_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(_0x14e0dc){this['editor']=_0x14e0dc,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'](_0x2577db){this['source']=_0x2577db;const _0x136412=new Map(),_0x1a6c4f=new Map(),_0x2030f7=this['editor']['model']['document']['roots']['map'](_0x57b308=>_0x57b308['rootName']);for(const _0x3cbbdd of _0x2030f7){const _0x357159=this['editor']['model']['document']['getRoot'](_0x3cbbdd),_0x42413b=bt(_0x357159);_0x136412['set'](_0x3cbbdd,_0x42413b),_0x1a6c4f['set'](_0x3cbbdd,Object['fromEntries'](_0x357159['getAttributes']()));}const _0x5f10ee=Array['from'](this['editor']['model']['markers'])['map'](_0x368b7a=>[_0x368b7a['name'],_0x368b7a['getRange']()]),_0x9ad663=this['source']['version'];this['_saveMetaData'](_0x9ad663,_0x136412,_0x5f10ee,_0x1a6c4f),this['_startingRevisionId']=this['_revisionId'];const _0xd94177=new Map(),_0x8cd3aa=new Map();for(const _0x3cc124 of _0x2030f7){const _0x51ba64=Rt(_0x3cc124,this['editor']['model']['document']['getRoot'](_0x3cc124)['name']);_0xd94177['set'](_0x3cc124,_0x51ba64),_0x8cd3aa['set'](_0x3cc124,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0xd94177,[],_0x8cd3aa);}['getData'](_0x49061f,_0x36d539){if(this['_lastFrom']===_0x49061f&&this['_lastTo']<=_0x36d539)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x36d539,!0x0);else{if(!this['_savedMetaData']['has'](_0x49061f)){const _0x131ea2=this['_getPreviousFrom'](_0x49061f);this['_calculateMetaData'](_0x131ea2,_0x49061f,!0x1);}this['_calculateMetaData'](_0x49061f,_0x36d539,!0x0);}return this['_lastFrom']=_0x49061f,this['_lastTo']=_0x36d539,this['_getState']();}['loadState'](_0x412b3e){if(!this['_savedMetaData']['has'](_0x412b3e['fromVersion'])){const _0x2b8938=this['_getPreviousFrom'](_0x412b3e['fromVersion']);this['_calculateMetaData'](_0x2b8938,_0x412b3e['fromVersion'],!0x1);}this['_calculateMetaData'](_0x412b3e['fromVersion'],_0x412b3e['toVersion'],!0x1);const _0x353372=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x412b3e['fromVersion'],this['_lastTo']=_0x412b3e['toVersion'];for(const _0x213113 in _0x412b3e['diffData']){const _0x295763=_0x412b3e['diffData'][_0x213113]['attachChange'],_0x4305cc=_0x243a88(_0x412b3e['diffData'][_0x213113]['attributesBefore'])||{},_0x604b54=_0x412b3e['diffData'][_0x213113],_0x44710e=_0x353372['_makeModelFromViewString'](_0x604b54['deletions'],_0x604b54['rootElementName']||'$root');_0x44710e['rootName']=_0x213113,_0x44710e['_isAttached']=!_0x295763||!_0x295763['isAttached'],_0x44710e['isAttached']=()=>_0x44710e['_isAttached'],this['_baseRoots']['set'](_0x213113,_0x44710e),this['_baseRootsAttributes']['set'](_0x213113,_0x4305cc),_0x295763&&this['_touchedRoots']['set'](_0x213113,_0x295763);const _0x524491=this['_makeIdsRoot'](_0x44710e);this['_baseIdsRoots']['set'](_0x213113,_0x524491);for(const [_0x21a1f7,_0x3b9ed0]of _0x44710e['markers']){if(!_0x21a1f7['startsWith']('revision:'))continue;const _0x2ac4bd=_0x21a1f7['split'](':')[0x2];for(const _0x3dd2ff of _0x3b9ed0['getWalker']({'singleCharacters':!0x0})){const _0x2d83c4=this['_getVidAttributeName'](_0x3dd2ff),_0x1f965a='elementEnd'==_0x3dd2ff['type']?_0x3dd2ff['previousPosition']['path']['slice'](0x0,-0x1):_0x3dd2ff['previousPosition']['path'],_0x2410e5=_0x524491['getNodeByPath'](_0x1f965a)['getAttribute'](_0x2d83c4);this['_touched']['set'](_0x2410e5,{'userId':_0x2ac4bd});}_0x44710e['markers']['delete'](_0x21a1f7);}}this['_startingRevisionId']=this['_revisionId'];const _0x47c007=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1eddab=>!this['_touched']['has'](_0x1eddab));let _0x11578a=0x0;const _0x284c1a=new Map();for(const _0x3532f3 in _0x412b3e['diffData']){const _0x234dff=_0x412b3e['diffData'][_0x3532f3]['attachChange'],_0x2de2d6=_0x243a88(_0x412b3e['diffData'][_0x3532f3]['attributesAfter'])||{},_0xdd8f59=_0x412b3e['diffData'][_0x3532f3],_0x26a8cf=_0x353372['_makeModelFromViewString'](_0xdd8f59['insertions'],_0xdd8f59['rootElementName']||'$root');_0x26a8cf['rootName']=_0x3532f3,_0x26a8cf['_isAttached']=!_0x234dff||_0x234dff['isAttached'],_0x26a8cf['isAttached']=()=>_0x26a8cf['_isAttached'],this['_diffRoots']['set'](_0x3532f3,_0x26a8cf),this['_diffRootsAttributes']['set'](_0x3532f3,_0x2de2d6);const _0x766008=this['_makeIdsRoot'](_0x26a8cf,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x3532f3,_0x766008),_0x284c1a['set'](_0x3532f3,_0x26a8cf['isAttached']()?_0x2de2d6:{});for(const [_0x171e35,_0x3b7eee]of _0x26a8cf['markers']){if(!_0x171e35['startsWith']('revision:'))continue;const _0x5caadd=_0x171e35['split'](':')[0x2];for(const _0x35ec75 of _0x3b7eee['getWalker']({'singleCharacters':!0x0})){const _0x33b43c=this['_getVidAttributeName'](_0x35ec75),_0x1f9915=this['_revisionId']++,_0x385bdb='elementEnd'==_0x35ec75['type']?_0x35ec75['previousPosition']['path']['slice'](0x0,-0x1):_0x35ec75['previousPosition']['path'];_0x766008['getNodeByPath'](_0x385bdb)['_setAttribute'](_0x33b43c,_0x1f9915),this['_touched']['set'](_0x1f9915,{'userId':_0x5caadd});}_0x26a8cf['markers']['delete'](_0x171e35);}for(const _0x4d02e5 of this['editor']['model']['createRangeIn'](_0x26a8cf)['getWalker']({'singleCharacters':!0x0})){const _0x145117=this['_getVidAttributeName'](_0x4d02e5),_0x32fbf1='elementEnd'==_0x4d02e5['type']?_0x4d02e5['previousPosition']['path']['slice'](0x0,-0x1):_0x4d02e5['previousPosition']['path'],_0x1328a9=_0x766008['getNodeByPath'](_0x32fbf1);_0x1328a9['getAttribute'](_0x145117)>0x0||_0x1328a9['_setAttribute'](_0x145117,_0x47c007[_0x11578a++]);}for(const [_0x1ebe6b,_0x47acac]of _0x26a8cf['markers'])_0x1ebe6b['startsWith']('revision:')||this['_markers']['set'](_0x1ebe6b,_0x47acac);}const {roots:_0x18d8f1}=this['_savedMetaData']['get'](_0x412b3e['fromVersion']),{roots:_0x468cb5}=this['_savedMetaData']['get'](_0x412b3e['toVersion']),_0x11d6dc=bt(_0x18d8f1['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x11d6dc),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x11d6dc,Number['NEGATIVE_INFINITY']));const _0x971acc=bt(_0x468cb5['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x971acc),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x971acc));const _0x5469a4=Array['from'](this['_diffRoots'])['map'](([_0x44d070,_0x2f9379])=>[_0x44d070,bt(_0x2f9379)]);this['_saveMetaData'](this['_lastTo'],_0x5469a4,this['_markers'],_0x284c1a);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x121c8e,_0x2478ac,_0x13bbfe,_0x40fe89){const _0x4767db=new Map(_0x2478ac),_0x2d81b3=new Map(_0x243a88(_0x40fe89)),_0xf35c06=new Map();for(const [_0x4cac61,_0x3fa9c5]of _0x13bbfe)_0xf35c06['set'](_0x4cac61,{'start':_0x3fa9c5['start']['clone'](),'end':_0x3fa9c5['end']['clone'](),'rootName':_0x3fa9c5['root']['rootName']});this['_savedMetaData']['set'](_0x121c8e,{'roots':_0x4767db,'markers':_0xf35c06,'rootsAttributes':_0x2d81b3});}['_removeMetaData'](_0x4074de){this['_savedMetaData']['delete'](_0x4074de);}['_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'](_0x2eb0a3,_0x5637a3=null){let _0x20d64b=null;_0x2eb0a3['is']('documentFragment')||(_0x20d64b=new _0x5acf78(_0x2eb0a3['name'],{'vid_start':null===_0x5637a3?this['_revisionId']++:_0x5637a3++}));const _0x2f42b4=[];for(const _0x43c919 of _0x2eb0a3['getChildren']())if(_0x43c919['is']('element')){_0x2f42b4['push'](this['_makeIdsRoot'](_0x43c919,_0x5637a3));const _0x28e7ea=_0x2f42b4[_0x2f42b4['length']-0x1];null!==_0x5637a3&&(_0x5637a3=_0x28e7ea['is']('element','$text')?_0x28e7ea['getAttribute']('vid')+0x1:_0x28e7ea['getAttribute']('vid_end')+0x1);}else{for(let _0x25ed91=0x0;_0x25ed91<_0x43c919['offsetSize'];_0x25ed91++)_0x2f42b4['push'](new _0x5acf78('$text',{'vid':null===_0x5637a3?this['_revisionId']++:_0x5637a3++}));}if(_0x2eb0a3['is']('documentFragment')){const _0x47fa94=Rt(_0x2eb0a3['rootName'],_0x2eb0a3['name']);return _0x47fa94['_insertChild'](0x0,_0x2f42b4),_0x47fa94;}return _0x20d64b['_setAttribute']('vid_end',null===_0x5637a3?this['_revisionId']++:_0x5637a3++),_0x20d64b['_insertChild'](0x0,_0x2f42b4),_0x20d64b;}['_calculateMetaData'](_0x5bc19c,_0x23b2f2,_0x25c65b){this['_reset']();const {roots:_0x1d1a84,markers:_0x3cfd99,rootsAttributes:_0x1a2d37}=this['_savedMetaData']['get'](_0x5bc19c);this['_baseRoots']=new Map(_0x1d1a84),this['_baseRootsAttributes']=new Map(_0x243a88(_0x1a2d37));for(const [_0x4ec39b,_0xbb03c8]of this['_baseRoots'])if('$graveyard'!==_0x4ec39b&&(this['_diffRoots']['set'](_0x4ec39b,bt(_0xbb03c8)),this['_diffRootsAttributes']=new Map(_0x243a88(_0x1a2d37)),_0x25c65b)){const _0x29bbb0=this['_revisionId'];this['_idsRoots']['set'](_0x4ec39b,this['_makeIdsRoot'](_0xbb03c8)),this['_baseIdsRoots']['set'](_0x4ec39b,this['_makeIdsRoot'](_0xbb03c8,_0x29bbb0));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x25c65b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x33b887,_0x37306b]of _0x3cfd99){const _0x1ba8fe=this['_baseRoots']['get'](_0x37306b['rootName']),_0x5a7cb9=this['_diffRoots']['get'](_0x37306b['rootName']),_0x37f943=new _0x4d5be0(this['_fixPosition'](_0x37306b['start'],_0x1ba8fe),this['_fixPosition'](_0x37306b['end'],_0x1ba8fe)),_0x13f772=this['_fixRange'](_0x37f943,_0x5a7cb9);_0x1ba8fe['markers']['set'](_0x33b887,_0x37f943),this['_markers']['set'](_0x33b887,_0x13f772);}this['_applyOperations'](_0x5bc19c,_0x23b2f2,_0x25c65b);}['_applyOperations'](_0x374455,_0x444ba4,_0x37288b){for(const _0x4334df of this['source']['getOperations'](_0x374455,_0x444ba4))this['_handleOperation'](_0x4334df,_0x37288b);for(const _0x96ac2f of this['_diffRoots']['values']())_0x96ac2f['markers']['clear']();for(const [_0x3ec2e4,_0xb3f1bd]of this['_markers'])this['_diffRoots']['get'](_0xb3f1bd['root']['rootName'])['markers']['set'](_0x3ec2e4,_0xb3f1bd['clone']());const _0x1a262a=new Map(),_0x26233a=new Map();for(const [_0x7c7b2f,_0x4c0c17]of this['_diffRoots'])_0x1a262a['set'](_0x7c7b2f,bt(_0x4c0c17)),_0x26233a['set'](_0x7c7b2f,this['_diffRootsAttributes']['get'](_0x7c7b2f));this['_saveMetaData'](_0x444ba4,_0x1a262a,this['_markers'],_0x26233a);}['_getPreviousFrom'](_0x31ca15){const _0x3ffe75=Array['from'](this['_savedMetaData']['keys']());_0x3ffe75['sort']((_0x5b1fe5,_0x29a241)=>_0x5b1fe5-_0x29a241),_0x3ffe75['reverse']();for(const _0x11a48c of _0x3ffe75)if(_0x11a48c<_0x31ca15)return _0x11a48c;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1c6b2f,_0x543b98){const _0x35d30f=Array['from'](_0x543b98['markers'])['map'](([_0x413ead,_0x52ed6a])=>[_0x413ead,this['_fixRange'](_0x52ed6a,_0x1c6b2f)]);_0x1c6b2f['markers']=new Map(_0x35d30f);}['_transformMarkers'](_0x6f3ac7){for(const _0x320cd4 of this['_markers']['values']()){const _0x3aba62=_0x320cd4['getTransformedByOperation'](_0x6f3ac7),_0x5974f6=_0x4d5be0['_createFromRanges'](_0x3aba62);_0x320cd4['start']=_0x5974f6['start'],_0x320cd4['end']=_0x5974f6['end'];}}['_handleOperation'](_0x80a5c0,_0x227828){if('addRoot'!=_0x80a5c0['type']&&'detachRoot'!=_0x80a5c0['type']){if('insert'==_0x80a5c0['type']){const _0x58dfc2=_0x80a5c0['position']['root'],_0x48402f=_0x58dfc2['rootName'],_0x1bc5ac=_0x58dfc2['name'];this['_diffRoots']['has'](_0x48402f)||(this['_diffRoots']['set'](_0x48402f,Rt(_0x48402f,_0x1bc5ac,!0x0)),this['_diffRootsAttributes']['set'](_0x48402f,{}),_0x227828&&this['_idsRoots']['set'](_0x48402f,Rt(_0x48402f,_0x1bc5ac,!0x0)));}else{if('addRootAttribute'==_0x80a5c0['type']||'removeRootAttribute'==_0x80a5c0['type']||'changeRootAttribute'==_0x80a5c0['type'])return void this['_handleRootAttributeOperation'](_0x80a5c0);'marker'==_0x80a5c0['type']&&this['_handleMarkerOperation'](_0x80a5c0);}if('marker'!==_0x80a5c0['type']){const _0x15b15b=this['_cloneOperation'](_0x80a5c0,this['_diffRoots']);_0x15b15b['_execute'](),this['_transformMarkers'](_0x15b15b);}if(_0x227828)switch(_0x80a5c0['type']){case'insert':this['_handleInsertOperation'](_0x80a5c0);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x80a5c0);break;case'merge':this['_handleMergeOperation'](_0x80a5c0);break;case'split':this['_handleSplitOperation'](_0x80a5c0);}}else this['_handleRootOperation'](_0x80a5c0,_0x227828);}['_cloneOperation'](_0x4ba014,_0x35d677){const _0x2ae5e3=_0x4ba014['clone']();return _0x2ae5e3['_authorId']=_0x4ba014['_authorId'],this['_fixOperation'](_0x2ae5e3,_0x35d677),_0x2ae5e3;}['_getBaseVids'](_0x3d7f77){return _0x3d7f77['map'](_0x47b48b=>{const _0x39d25d=this['_getVidAttributeName'](_0x47b48b);return Number(_0x47b48b['item']['getAttribute'](_0x39d25d));});}['_generateTape'](_0x42ce34,_0x1037d7){if(_0x42ce34['is']('element','$text'))_0x1037d7['push']({'item':_0x42ce34,'type':'text'});else{_0x42ce34['is']('element')&&_0x1037d7['push']({'item':_0x42ce34,'type':'elementStart'});for(const _0x4309c3 of _0x42ce34['getChildren']())this['_generateTape'](_0x4309c3,_0x1037d7);_0x42ce34['is']('element')&&_0x1037d7['push']({'item':_0x42ce34,'type':'elementEnd'});}return _0x1037d7;}['_getState'](){const _0x48fb13=new Map(this['_touched']),_0x1dd53b=new Map(_0x48fb13),_0x546250=new Map(),_0x1c2344={'insertions':{},'deletions':{}},_0x5d53a9={'insertions':{},'deletions':{}},_0x4a4c11=new Map(),_0x57d7e0=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x3855b6=new Map();_0x57d7e0['delete']('$graveyard');for(const _0x5f5cfb of _0x57d7e0){const _0x6465bc=(this['_diffRoots']['get'](_0x5f5cfb)??this['_baseRoots']['get'](_0x5f5cfb))['name'],_0x49affa=this['_diffRoots']['get'](_0x5f5cfb)||Rt(_0x5f5cfb,_0x6465bc,!0x1),_0x1a62d2=this['_baseRoots']['get'](_0x5f5cfb)||Rt(_0x5f5cfb,_0x6465bc,!0x1);_0x49affa['isAttached']()||_0x1a62d2['isAttached']()?(_0x3855b6['set'](_0x5f5cfb,_0x6465bc),_0x1c2344['insertions'][_0x5f5cfb]=bt(_0x49affa),_0x1c2344['deletions'][_0x5f5cfb]=bt(_0x1a62d2),this['_copyMarkers'](_0x1c2344['deletions'][_0x5f5cfb],_0x1a62d2),this['_copyMarkers'](_0x1c2344['insertions'][_0x5f5cfb],_0x49affa),_0x5d53a9['insertions'][_0x5f5cfb]=this['_generateTape'](this['_idsRoots']['get'](_0x5f5cfb),[]),_0x5d53a9['deletions'][_0x5f5cfb]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x5f5cfb)||Rt(_0x5f5cfb,_0x6465bc,!0x1),[])):_0x57d7e0['delete'](_0x5f5cfb);}for(const _0x5d84fa of _0x57d7e0){const _0x3698cb=_0x5d53a9['insertions'][_0x5d84fa];for(const _0x513548 of _0x3698cb){const _0x4e5617=this['_getVidAttributeName'](_0x513548),_0x1d35a0=_0x513548['item']['getAttribute'](_0x4e5617);_0x1dd53b['delete'](_0x1d35a0),_0x1d35a0>=this['_startingRevisionId']&&_0x546250['set'](_0x1d35a0,_0x48fb13['get'](_0x1d35a0));}}for(const _0x9fc860 of _0x57d7e0){const _0x37139b=_0x5d53a9['insertions'][_0x9fc860],_0x49a69a=this['_getBaseVids'](_0x5d53a9['deletions'][_0x9fc860]);let _0x18cb42=0x0;for(const _0x2db12d of _0x37139b){const _0x23e58c=this['_getVidAttributeName'](_0x2db12d),_0x47a9ae=_0x2db12d['item']['getAttribute'](_0x23e58c);if(!_0x546250['has'](_0x47a9ae)&&!_0x4a4c11['has'](_0x47a9ae)){if(_0x1dd53b['has'](_0x47a9ae))_0x18cb42++;else{if(_0x47a9ae!=_0x49a69a[_0x18cb42]){const _0x48e836=_0x48fb13['get'](_0x47a9ae)||_0x48fb13['get'](_0x49a69a[_0x18cb42]);for(;_0x47a9ae!=_0x49a69a[_0x18cb42];)_0x1dd53b['has'](_0x49a69a[_0x18cb42])||(_0x4a4c11['set'](_0x49a69a[_0x18cb42],_0x48e836),_0x48fb13['set'](_0x49a69a[_0x18cb42],_0x48e836)),_0x18cb42++;}_0x18cb42++;}}}}for(const _0x4f377b of _0x57d7e0){const _0x258d01=_0x5d53a9['insertions'][_0x4f377b];for(const _0x4ea1d5 of _0x258d01){const _0x260810=this['_getVidAttributeName'](_0x4ea1d5),_0x2288c0=_0x4ea1d5['item']['getAttribute'](_0x260810);if(_0x4a4c11['has'](_0x2288c0)){const _0x49d828=_0x4a4c11['get'](_0x2288c0);_0x1dd53b['has'](_0x2288c0)||_0x1dd53b['set'](_0x2288c0,{..._0x49d828}),_0x546250['set'](_0x2288c0,{..._0x49d828});}}}for(const _0x28242c of _0x1dd53b['keys']())_0x28242c>=this['_startingRevisionId']&&_0x1dd53b['delete'](_0x28242c);const _0x3ad708=new Map();for(const _0x343e40 of _0x57d7e0){let _0x194405=_0x5d53a9['insertions'][_0x343e40];for(const _0x59c17a of _0x194405)if(_0x59c17a['item']['is']('element','tableCell')){const _0x55012c=this['_getVidAttributeName'](_0x59c17a),_0x1b0637=_0x59c17a['item']['getAttribute'](_0x55012c);if(_0x546250['has'](_0x1b0637)){const _0x429ee5=_0x59c17a['item']['parent']['parent']['getAttribute']('vid_start'),_0x31f912=_0x3ad708['get'](_0x429ee5)||new Set();_0x31f912['add'](_0x546250['get'](_0x1b0637)['userId']),_0x3ad708['set'](_0x429ee5,_0x31f912);}}_0x194405=_0x5d53a9['deletions'][_0x343e40];for(const _0x22ca0d of _0x194405)if(_0x22ca0d['item']['is']('element','tableCell')){const _0x11a11a=this['_getVidAttributeName'](_0x22ca0d),_0x453b03=_0x22ca0d['item']['getAttribute'](_0x11a11a);if(_0x1dd53b['has'](_0x453b03)){const _0xfb1221=_0x22ca0d['item']['parent']['parent']['getAttribute']('vid_start'),_0x233c25=_0x3ad708['get'](_0xfb1221)||new Set();_0x233c25['add'](_0x1dd53b['get'](_0x453b03)['userId']),_0x3ad708['set'](_0xfb1221,_0x233c25);}}for(const _0x142a7a of _0x3ad708['keys']())(_0x546250['has'](_0x142a7a)||_0x1dd53b['has'](_0x142a7a))&&_0x3ad708['delete'](_0x142a7a);}for(const _0x3fec71 of _0x57d7e0){const _0x4ab4a3=_0x5d53a9['insertions'][_0x3fec71];let _0x3508f7=null,_0x369fc2=null;for(const _0x28bb9 of _0x4ab4a3){const _0x260a34=this['_getVidAttributeName'](_0x28bb9),_0x2afaf9=_0x28bb9['item']['getAttribute'](_0x260a34),_0xdc9b12=_0x3ad708['get'](_0x2afaf9);_0xdc9b12&&'elementStart'==_0x28bb9['type']&&(_0x3508f7=Array['from'](_0xdc9b12)[0x0],_0x369fc2=_0x28bb9['item']['getAttribute']('vid_end')),_0x3508f7&&(_0x1dd53b['set'](_0x2afaf9,{'userId':_0x3508f7}),_0x546250['set'](_0x2afaf9,{'userId':_0x3508f7})),_0x2afaf9==_0x369fc2&&(_0x3508f7=null,_0x369fc2=null);}}const _0xdf7f54={},_0x5d7729=new Set();for(const _0x39e398 of _0x57d7e0){const _0x16c44d=_0x1c2344['deletions'][_0x39e398],_0x452b45=_0x1c2344['insertions'][_0x39e398];for(const {userId:_0x3f8238}of this['_touchedMarkers']['values']())null!==_0x3f8238&&_0x5d7729['add'](_0x3f8238);for(const {userId:_0x3e91c7}of this['_touchedRoots']['values']())null!==_0x3e91c7&&_0x5d7729['add'](_0x3e91c7);this['_markChanges'](_0x452b45,_0x5d53a9['insertions'][_0x39e398],_0x546250,'insertion',_0x5d7729),this['_markChanges'](_0x16c44d,_0x5d53a9['deletions'][_0x39e398],_0x1dd53b,'deletion',_0x5d7729),_0xdf7f54[_0x39e398]={'insertions':this['_prepareViewToSave'](_0x452b45),'deletions':this['_prepareViewToSave'](_0x16c44d),'attachChange':this['_touchedRoots']['get'](_0x39e398)||null,'attributesBefore':_0x243a88(this['_baseRootsAttributes']['get'](_0x39e398))||{},'attributesAfter':_0x243a88(this['_diffRootsAttributes']['get'](_0x39e398)),'rootElementName':_0x3855b6['get'](_0x39e398)};}return{'diffData':_0xdf7f54,'authorsIds':Array['from'](_0x5d7729)};}['_processRootBeforeSave'](_0x4aff){for(const [,_0x2db2eb]of _0x4aff['markers']){const _0x350e60=_0x2db2eb['start']['getAncestors']()['filter'](_0x2e4cc6=>'tableCell'==_0x2e4cc6['name']);for(const _0x243ed8 of _0x350e60)0x1==_0x243ed8['childCount']&&_0x243ed8['getChild'](0x0)['is']('element','paragraph')&&_0x243ed8['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x330c97){this['_processRootBeforeSave'](_0x330c97);const _0x25facb=this['editor']['data']['toView'](_0x330c97,{}),_0x4051fd=Array['from'](_0x25facb['getChildren']())['map'](_0xfc56=>this['_getViewJson'](_0xfc56));return JSON['stringify'](_0x4051fd);}['_getViewJson'](_0x5c006a){if(_0x5c006a['is']('$text'))return _0x5c006a['data'];{const _0x2784e6=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1b696d=_0x5c006a,_0x127ee7=this['editor']['data']['htmlProcessor']['domConverter'],_0xc0f998={'type':_0x2784e6['_getTypeCharForViewElement'](_0x1b696d),'name':_0x1b696d['name'],'attributes':Array['from'](_0x1b696d['getAttributes']()),'children':Array['from'](_0x1b696d['getChildren']())['map'](_0x3d0812=>this['_getViewJson'](_0x3d0812))};if(_0x5c006a['is']('uiElement')&&'$comment'!=_0x5c006a['name']){const _0x3710d0=_0x5c006a['render'](_0x127ee7['domDocument'],_0x127ee7);_0xc0f998['children']['push'](_0x3710d0['outerHTML']);}else{if(_0x5c006a['is']('rawElement')){const _0xf547b9=_0x127ee7['domDocument']['createElement'](_0x1b696d['name']);_0x5c006a['render'](_0xf547b9,_0x127ee7),_0xc0f998['children']['push'](_0xf547b9['innerHTML']);}}const _0x298c3c=Array['from'](_0x1b696d['getCustomProperties']());_0x298c3c['length']>0x0&&(_0xc0f998['customProperties']=_0x298c3c);const _0x4f2643=_0x1b696d['getFillerOffset']();return null!==_0x4f2643&&(_0xc0f998['fillerOffset']=_0x4f2643),_0xc0f998;}}['_markChanges'](_0x8e9252,_0x135ca8,_0x31ec5d,_0x37bf9d,_0x10c354){let _0x4c5c82=null,_0x947631=null,_0x3d9309=0x0;const _0x2189a7=this['editor']['model'];for(let _0x30d6c=0x0;_0x30d6c<_0x135ca8['length'];_0x30d6c++){const _0x2ab221=this['_getVidAttributeName'](_0x135ca8[_0x30d6c]),_0x494bba=_0x135ca8[_0x30d6c]['item']['getAttribute'](_0x2ab221),_0x421430=_0x31ec5d['get'](_0x494bba),_0x4f6bc9=_0x30d6c==_0x135ca8['length']-0x1;!_0x4c5c82&&_0x421430&&(_0x4c5c82=_0x421430,_0x947631=_0x135ca8[_0x30d6c]),!_0x4c5c82||_0x421430&&_0x421430['userId']==_0x4c5c82['userId']||(_0x15f2e3(_0x421430,kt(_0x947631,_0x8e9252,_0x2189a7),kt(_0x135ca8[_0x30d6c],_0x8e9252,_0x2189a7)),_0x4c5c82=_0x421430||null,_0x947631=_0x421430?_0x135ca8[_0x30d6c]:null),_0x4c5c82&&_0x4f6bc9&&_0x15f2e3(_0x421430,kt(_0x947631,_0x8e9252,_0x2189a7),At(_0x135ca8[_0x30d6c],_0x8e9252,_0x2189a7));}function _0x15f2e3(_0x33b5e1,_0x25cc7d,_0x1b5e49){const _0x3a813c=_0x4c5c82['userId'],_0x1b7b6a='revision:'+_0x37bf9d+':'+_0x3a813c+':'+_0x3d9309++,_0x2681be=_0x2189a7['createRange'](_0x25cc7d,_0x1b5e49);_0x8e9252['markers']['set'](_0x1b7b6a,_0x2681be),null!==_0x3a813c&&_0x10c354['add'](_0x3a813c);}}['_getVidAttributeName'](_0xf002f3){switch(_0xf002f3['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x11c966,_0x274035){_0x11c966['baseVersion']=null;for(const _0x265f8c in _0x11c966){const _0x1f066a=_0x11c966[_0x265f8c];if(_0x1f066a instanceof _0x17ed03){const _0x338083=_0x274035['get'](_0x1f066a['root']['rootName']);_0x11c966[_0x265f8c]=this['_fixPosition'](_0x1f066a,_0x338083);}if(_0x1f066a instanceof _0x4d5be0){const _0x770b0a=_0x274035['get'](_0x1f066a['root']['rootName']);_0x11c966[_0x265f8c]=this['_fixRange'](_0x1f066a,_0x770b0a);}'root'===_0x265f8c&&(_0x11c966['root']=_0x274035['get'](_0x11c966['root']['rootName']));}}['_fixRange'](_0x4986fe,_0x5b4c1e){return this['editor']['model']['createRange'](this['_fixPosition'](_0x4986fe['start'],_0x5b4c1e),this['_fixPosition'](_0x4986fe['end'],_0x5b4c1e));}['_fixPosition'](_0x5566cb,_0x21f1f9){return this['editor']['model']['createPositionFromPath'](_0x21f1f9,_0x5566cb['path'],_0x5566cb['stickiness']);}['_handleInsertOperation'](_0x22d068){const _0x54824a=this['_idsRoots']['get'](_0x22d068['position']['root']['rootName']),_0x5d6d26=this['_fixPosition'](_0x22d068['position'],_0x54824a),_0x19881e=null===_0x22d068['_authorId']?null:_0x22d068['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4786a8=_0x5d6d26['parent'],_0x2b152e=this['_revisionId'],_0x199c62=[];for(const _0xf85d34 of _0x22d068['nodes'])if(_0xf85d34['is']('element'))_0x199c62['push'](this['_makeIdsRoot'](_0xf85d34));else{for(let _0x205463=0x0;_0x205463<_0xf85d34['offsetSize'];_0x205463++)_0x199c62['push'](new _0x5acf78('$text',{'vid':this['_revisionId']++}));}const _0x113fc2=this['_revisionId'];for(let _0x1d5250=_0x2b152e;_0x1d5250<_0x113fc2;_0x1d5250++)this['_touched']['set'](_0x1d5250,{'userId':_0x19881e});_0x4786a8['_insertChild'](_0x5d6d26['offset'],_0x199c62);}['_handleMoveOperation'](_0x1c18d8){(_0x1c18d8=this['_cloneOperation'](_0x1c18d8,this['_idsRoots']))['_execute']();const _0x212347=null===_0x1c18d8['_authorId']?null:_0x1c18d8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x409630=_0x1c18d8['getMovedRangeStart'](),_0x6b1a9b=_0x409630['parent'],_0x4af3fe=_0x409630['offset'];!function _0x3fd10a(_0xa8453b,_0x44ae76,_0x487ef0,_0x2ee50c){for(let _0x2a5329=_0x487ef0;_0x2a5329<_0x2ee50c;_0x2a5329++){const _0x7760f0=_0x44ae76['getChild'](_0x2a5329);_0x7760f0['is']('element','$text')?_0xa8453b['set'](_0x7760f0['getAttribute']('vid'),{'userId':_0x212347}):(_0xa8453b['set'](_0x7760f0['getAttribute']('vid_start'),{'userId':_0x212347}),_0x3fd10a(_0xa8453b,_0x7760f0,0x0,_0x7760f0['childCount']),_0xa8453b['set'](_0x7760f0['getAttribute']('vid_end'),{'userId':_0x212347}));}}(this['_touched'],_0x6b1a9b,_0x4af3fe,_0x4af3fe+_0x1c18d8['howMany']);}['_handleMergeOperation'](_0x27ef50){const _0x5562f7=null===(_0x27ef50=this['_cloneOperation'](_0x27ef50,this['_idsRoots']))['_authorId']?null:_0x27ef50['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40107f=_0x27ef50['targetPosition']['parent'],_0x11b403=_0x27ef50['sourcePosition']['parent'],_0x1437e7=_0x40107f['getAttribute']('vid_end'),_0x2443e3=_0x11b403['getAttribute']('vid_start');_0x40107f['_setAttribute']('vid_end',_0x11b403['getAttribute']('vid_end')),_0x11b403['_setAttribute']('vid_end',_0x1437e7),this['_touched']['set'](_0x2443e3,{'userId':_0x5562f7}),this['_touched']['set'](_0x1437e7,{'userId':_0x5562f7}),_0x27ef50['_execute']();}['_handleSplitOperation'](_0x949d07){const _0x2ba3ee=null===(_0x949d07=this['_cloneOperation'](_0x949d07,this['_idsRoots']))['_authorId']?null:_0x949d07['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3e65ca=_0x949d07['graveyardPosition'],_0xfdf608=_0x949d07['splitPosition']['parent'];_0x949d07['_execute']();const _0x5c1d37=_0xfdf608['getAttribute']('vid_end'),_0x46ebe0=_0x949d07['insertionPosition']['nodeAfter'];if(_0x3e65ca){const _0x5938e3=_0x46ebe0['getAttribute']('vid_end'),_0x4de984=_0xfdf608['getAttribute']('vid_end');_0xfdf608['_setAttribute']('vid_end',_0x5938e3),_0x46ebe0['_setAttribute']('vid_end',_0x4de984),this['_touched']['set'](_0xfdf608['getAttribute']('vid_end'),{'userId':_0x2ba3ee}),this['_touched']['set'](_0x46ebe0['getAttribute']('vid_start'),{'userId':_0x2ba3ee});}else{const _0x40a202=this['_revisionId']++,_0x437a2e=this['_revisionId']++;_0xfdf608['_setAttribute']('vid_end',_0x40a202),_0x46ebe0['_setAttribute']('vid_start',_0x437a2e),_0x46ebe0['_setAttribute']('vid_end',_0x5c1d37),this['_touched']['set'](_0x40a202,{'userId':_0x2ba3ee}),this['_touched']['set'](_0x437a2e,{'userId':_0x2ba3ee});}}['_handleMarkerOperation'](_0x2a0a12){if(!_0x2a0a12['affectsData'])return;const _0x1ac568=(_0x2a0a12=this['_cloneOperation'](_0x2a0a12,this['_diffRoots']))['oldRange']?_0x2a0a12['oldRange']['root']:null,_0x4b4127=_0x2a0a12['newRange']?_0x2a0a12['newRange']['root']:null;_0x1ac568&&this['_markers']['delete'](_0x2a0a12['name']),_0x4b4127&&this['_markers']['set'](_0x2a0a12['name'],_0x2a0a12['newRange']['clone']());const _0x16db9d=null===_0x2a0a12['_authorId']?null:_0x2a0a12['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x279b5a=_0x2a0a12['name'];if(!this['_touchedMarkers']['has'](_0x279b5a))return void this['_touchedMarkers']['set'](_0x279b5a,{'range':_0x2a0a12['oldRange'],'userId':_0x16db9d});const _0x9ce445=this['_touchedMarkers']['get'](_0x279b5a),_0x320b7f=_0x9ce445['range'],_0x3cf1e2=_0x2a0a12['newRange'];null==_0x320b7f&&null==_0x3cf1e2||_0x320b7f&&_0x3cf1e2&&_0x320b7f['isEqual'](_0x3cf1e2)?this['_touchedMarkers']['delete'](_0x2a0a12['name']):_0x9ce445['userId']=_0x16db9d;}['_handleRootOperation'](_0x2eff08,_0xf7c379){this['_diffRoots']['has'](_0x2eff08['rootName'])?this['_diffRoots']['get'](_0x2eff08['rootName'])['_isAttached']=_0x2eff08['isAdd']:(this['_diffRoots']['set'](_0x2eff08['rootName'],Rt(_0x2eff08['rootName'],_0x2eff08['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x2eff08['rootName'],{}),_0xf7c379&&this['_idsRoots']['set'](_0x2eff08['rootName'],Rt(_0x2eff08['rootName'],_0x2eff08['elementName'],!0x0)));const _0x1c49a4=null===_0x2eff08['_authorId']?null:_0x2eff08['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43bd88=this['_touchedRoots']['get'](_0x2eff08['rootName']);_0x43bd88&&_0x43bd88['userId']===_0x1c49a4?this['_touchedRoots']['delete'](_0x2eff08['rootName']):this['_touchedRoots']['set'](_0x2eff08['rootName'],{'userId':_0x1c49a4,'isAttached':_0x2eff08['isAdd']});}['_handleRootAttributeOperation'](_0x22c588){const _0x326824=this['_diffRootsAttributes']['get'](_0x22c588['root']['rootName']);null===_0x22c588['newValue']?delete _0x326824[_0x22c588['key']]:_0x326824[_0x22c588['key']]=_0x22c588['newValue'];}};function bt(_0x4d6f56){const _0x191f9f=Rt(_0x4d6f56['rootName'],_0x4d6f56['name'],_0x4d6f56['isAttached']());for(const _0x432f10 of _0x4d6f56['getChildren']()){const _0x32119a=_0x432f10['_clone'](!0x0);_0x191f9f['_appendChild'](_0x32119a);}return _0x191f9f;}function Rt(_0x3779fa,_0x288e03,_0x6411d3=!0x0){const _0x40f400=new _0x5bd9c1();return _0x40f400['rootName']=_0x3779fa,_0x40f400['name']=_0x288e03,_0x40f400['_isAttached']=_0x6411d3,_0x40f400['isAttached']=()=>_0x40f400['_isAttached'],_0x40f400;}function kt(_0x2f0a31,_0x5d3c74,_0x5c6e03){const _0xf4151a='elementEnd'==_0x2f0a31['type']?_0x5c6e03['createPositionAt'](_0x2f0a31['item'],'end'):_0x5c6e03['createPositionBefore'](_0x2f0a31['item']);return _0x5c6e03['createPositionFromPath'](_0x5d3c74,_0xf4151a['path'],_0xf4151a['stickiness']);}function At(_0x426b2a,_0x1931d3,_0x1f3744){const _0x5a9412='elementStart'==_0x426b2a['type']?_0x1f3744['createPositionAt'](_0x426b2a['item'],0x0):_0x1f3744['createPositionAfter'](_0x426b2a['item']);return _0x1f3744['createPositionFromPath'](_0x1931d3,_0x5a9412['path'],_0x5a9412['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0xa9f628();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0xb1f4b4){super(),this['id']=_0xb1f4b4['id']||_0x5cb97f(),this['author']=_0xb1f4b4['author'],this['type']=_0xb1f4b4['type'],this['data']=_0xb1f4b4['data']||{},this['rootName']=_0xb1f4b4['rootName'],this['set']('createdAt',_0xb1f4b4['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(_0x237d88,_0x6823e6){this['newRevisionId']=_0x237d88,this['oldRevisionId']=_0x6823e6,this['changes']=new _0x3011cf();}['_setChanges'](_0x24144e){for(const _0x6b16b0 of _0x24144e)this['changes']['add'](_0x6b16b0);}},Mt=class extends _0xb465bf{['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[_0x5d6be6,_0x4e575f,mt,wt];}constructor(_0x5b8e1a){super(_0x5b8e1a),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',(_0x3054d7,_0x40a132,_0x3c490f)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2c62c1=>{for(const _0x2226ec of this['editor']['editing']['view']['document']['roots'])_0x3c490f?_0x2c62c1['removeClass']('ck-editor__editable__overlay',_0x2226ec):_0x2c62c1['addClass']('ck-editor__editable__overlay',_0x2226ec);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x17de8d=>null!==_0x17de8d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xc6d5fd,_0x1d23e1,_0x48c153)=>_0xc6d5fd&&_0x48c153?_0x1d23e1['changes']['getIndex'](_0x48c153):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x245d79,_0x3280e1)=>_0x245d79?_0x3280e1['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x4e575f);}['init'](){const _0x337642=this['editor'],_0x2c1b42=new Tt(_0x337642,{'direction':'backward'}),_0x29cb9=new Tt(_0x337642,{'direction':'forward'});_0x337642['commands']['add']('showPreviousChange',_0x2c1b42),_0x337642['commands']['add']('showNextChange',_0x29cb9),_0x337642['commands']['add']('restoreRevision',new Dt(_0x337642)),this['on']('change:numberOfChanges',()=>{_0x2c1b42['refresh'](),_0x29cb9['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x337642['enableReadOnlyMode']('revision-viewer'),_0x337642['plugins']['has']('WidgetToolbarRepository')&&_0x337642['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x5a2932){return await this['_utils']['loadRevisionData'](_0x5a2932,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5a2932);}async['getRevisionRootsAttributes'](_0x753e32){return await this['_utils']['loadRevisionData'](_0x753e32,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x753e32);}async['compare'](_0x3a053c,_0x5ea28e,_0x283c21=!0x1){if(!this['isEnabled'])return;const _0x865309=this['diff'],_0x141ff9=this['repository'],_0x3d7ab3='string'==typeof _0x3a053c?_0x141ff9['getRevision'](_0x3a053c):_0x3a053c,_0xc86bd8='string'==typeof _0x5ea28e?_0x141ff9['getRevision'](_0x5ea28e):_0x5ea28e,_0x487ee4=_0x3d7ab3['id'],_0x2339e3=_0xc86bd8?_0xc86bd8['id']:null;if(!_0x283c21&&this['diff']&&this['diff']['newRevisionId']===_0x487ee4&&this['diff']['oldRevisionId']===_0x2339e3)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x487ee4,_0x2339e3);const _0x225f9b=this['_getRevisionsRange'](_0x3d7ab3,_0xc86bd8,!0x0)['map'](_0x111cfe=>this['_utils']['loadRevisionData'](_0x111cfe,this['adapter']));return _0x225f9b['push'](new Promise(_0x198da2=>{setTimeout(_0x198da2,0x14);})),Promise['all'](_0x225f9b)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x28a948=this['_getDiff'](_0x487ee4,_0x2339e3);for(const _0xf2acea of _0x28a948['changes'])this['_changeIdToChange']['set'](_0xf2acea['id'],_0xf2acea);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x863f71=>{for(const _0x5de88a of this['editor']['model']['document']['getRootNames']())_0x863f71['detachRoot'](_0x5de88a);for(const _0x5413b9 of Object['keys'](_0x28a948['model'])){const _0x2b5468=_0x28a948['model'][_0x5413b9]['name'],_0x2c83f0=_0x863f71['addRoot'](_0x5413b9,_0x2b5468);for(const _0x110121 of Object['keys'](_0x28a948['attributes'][_0x5413b9]))_0x863f71['setAttribute'](_0x110121,_0x28a948['attributes'][_0x5413b9][_0x110121],_0x2c83f0);_0x863f71['insert'](_0x28a948['model'][_0x5413b9],_0x2c83f0,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x28a948['changes'])),this['isReady']=!0x0;})['catch'](_0x46227a=>{console['error'](_0x46227a),this['_cleanUp'](),_0x865309&&(this['diff']=_0x865309),this['isReady']=!0x0;});}['addRevisionData'](_0x4c4eb5,_0x391823){const _0x14247c=this['repository']['createRevision'](_0x4c4eb5);return _0x14247c['on']('_update',(_0x20dac4,_0x636845,_0x3c05b1)=>_0x391823(_0x636845,_0x3c05b1,_0x14247c)),this['repository']['addRevision'](_0x14247c),_0x14247c;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x26d05e=>{for(const _0x59978f of this['editor']['model']['document']['getRootNames']())_0x26d05e['detachRoot'](_0x59978f);});}['_sortAndFilterDiffChanges'](_0x4967fa){const _0x43bbfb=[],_0x7437e3=new Map();for(const _0x38f389 of this['editor']['model']['document']['getRootNames']()){const _0x1def08=this['editor']['editing']['view']['getDomRoot'](_0x38f389);if(!_0x1def08)continue;const _0x13297d=_0x1def08['getClientRects']()['item'](0x0);_0x13297d&&(_0x43bbfb['push'](_0x38f389),_0x7437e3['set'](_0x38f389,_0x13297d));}return _0x43bbfb['sort']((_0x34dfbd,_0x37bd33)=>{const _0x3afa53=_0x7437e3['get'](_0x34dfbd),_0x5d59f9=_0x7437e3['get'](_0x37bd33);return _0x3afa53['y']-_0x5d59f9['y']||_0x3afa53['x']-_0x5d59f9['x'];}),(_0x4967fa=_0x4967fa['filter'](_0x1d34b6=>_0x43bbfb['includes'](_0x1d34b6['rootName'])))['sort']((_0x2e8bf0,_0x458e76)=>_0x43bbfb['indexOf'](_0x2e8bf0['rootName'])-_0x43bbfb['indexOf'](_0x458e76['rootName'])),_0x4967fa;}['_makeTape'](_0x3aae54){const _0x370628=Array['from'](_0x3aae54['markers'])['filter'](([_0x504996,_0x4051de])=>_0x504996['startsWith']('revision:')&&!_0x4051de['isCollapsed']),_0xe4d848=Array['from'](this['editor']['model']['createRangeIn'](_0x3aae54)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x370628['length'])for(const _0x161d20 of _0xe4d848){const [_0x4bb594,_0x1c7e81]=_0x370628[0x0],[,_0x37d2d5,_0x2e7219]=_0x4bb594['split'](':');if(_0x1c7e81['end']['isEqual'](_0x161d20['nextPosition'])&&_0x370628['shift'](),(_0x161d20['previousPosition']['isEqual'](_0x1c7e81['start'])||_0x161d20['previousPosition']['isAfter'](_0x1c7e81['start']))&&('insertion'==_0x37d2d5?_0x161d20['isAdded']={'userId':_0x2e7219}:'deletion'==_0x37d2d5&&(_0x161d20['isRemoved']={'userId':_0x2e7219})),0x0==_0x370628['length'])break;}return _0xe4d848;}['_refreshStartEndIndex'](_0x2c0ff7){const _0x383311=new Map();for(let _0x487d87=0x0;_0x487d87<_0x2c0ff7['length'];_0x487d87++)'text'===_0x2c0ff7[_0x487d87]['type']?(_0x2c0ff7[_0x487d87]['item']['startIndex']=_0x487d87,_0x2c0ff7[_0x487d87]['item']['endIndex']=_0x487d87):('elementStart'===_0x2c0ff7[_0x487d87]['type']?_0x2c0ff7[_0x487d87]['item']['startIndex']=_0x487d87:'elementEnd'===_0x2c0ff7[_0x487d87]['type']&&(_0x2c0ff7[_0x487d87]['item']['endIndex']=_0x487d87),_0x383311['set'](_0x2c0ff7[_0x487d87]['id'],_0x487d87));for(const _0x402dfd of _0x383311['values']())'elementStart'===_0x2c0ff7[_0x402dfd]['type']?_0x2c0ff7[_0x402dfd]['item']['endIndex']=_0x383311['get'](_0x2c0ff7[_0x402dfd]['pairId']):'elementEnd'===_0x2c0ff7[_0x402dfd]['type']&&(_0x2c0ff7[_0x402dfd]['item']['startIndex']=_0x383311['get'](_0x2c0ff7[_0x402dfd]['pairId']));}['_processTape'](_0x219a00){for(let _0x5ee089=0x0;_0x5ee089<_0x219a00['length'];_0x5ee089++){if('elementStart'===_0x219a00[_0x5ee089]['type'])_0x219a00[_0x5ee089]['item']['startIndex']=_0x5ee089;else{if('elementEnd'===_0x219a00[_0x5ee089]['type']){_0x219a00[_0x5ee089]['item']['endIndex']=_0x5ee089;const _0xde9aaa=_0x219a00[_0x5ee089]['item']['startIndex'];_0x219a00[_0xde9aaa]['pairId']=_0x219a00[_0x5ee089]['id'],_0x219a00[_0x5ee089]['pairId']=_0x219a00[_0xde9aaa]['id'];}else _0x219a00[_0x5ee089]['item']['startIndex']=_0x5ee089,_0x219a00[_0x5ee089]['item']['endIndex']=_0x5ee089,_0x219a00[_0x5ee089]['pairId']=null;}_0x219a00[_0x5ee089]['markersStart']||(_0x219a00[_0x5ee089]['markersStart']=[],_0x219a00[_0x5ee089]['markersEnd']=[]);}}['_markInsertions'](_0x175a8a,_0x1128ac){const _0x5c9279=_0x175a8a['filter'](_0x4fb241=>!_0x4fb241['isAdded']);for(let _0x485d7e=0x0;_0x485d7e<_0x1128ac['length'];_0x485d7e++)_0x1128ac[_0x485d7e]['isAdded']&&(_0x5c9279[_0x485d7e]['isAdded']=_0x1128ac[_0x485d7e]['isAdded']);}['_getDiff'](_0x40eb9d,_0x220b6f=null){const _0x30633c=this['repository']['getRevision'](_0x40eb9d),_0xd72818=_0x220b6f?this['repository']['getRevision'](_0x220b6f):null,_0x487f1b=this['_getRevisionsRange'](_0x30633c,_0xd72818),_0x2a9969=_0x487f1b[_0x487f1b['length']-0x1],_0x30bc2a=new Map(),_0x3788fc={'model':{},'attributes':{},'changes':[]},_0x72e979=new Set(),_0x395d8d=new Map();for(let _0x35145c=_0x487f1b['length']-0x1;_0x35145c>=0x0;_0x35145c--){const _0x27ac03=_0x487f1b[_0x35145c];for(const _0x1cab9c of Object['keys'](_0x27ac03['diffData']))if(_0x27ac03['diffData'][_0x1cab9c]['attachChange']){const _0x3e6c33=_0x27ac03['diffData'][_0x1cab9c]['attachChange'];_0x3e6c33['isAttached']?(_0x72e979['add'](_0x1cab9c),_0x395d8d['has'](_0x1cab9c)&&_0x395d8d['get'](_0x1cab9c)['userId']==_0x3e6c33['userId']?_0x395d8d['delete'](_0x1cab9c):_0x395d8d['set'](_0x1cab9c,_0x3e6c33)):_0x395d8d['has'](_0x1cab9c)?(_0x72e979['delete'](_0x1cab9c),_0x395d8d['delete'](_0x1cab9c)):(_0x72e979['add'](_0x1cab9c),_0x395d8d['set'](_0x1cab9c,_0x3e6c33));}else _0x72e979['add'](_0x1cab9c);}for(const _0x52c278 of _0x72e979){const _0x363583=_0x395d8d['has'](_0x52c278)&&!_0x395d8d['get'](_0x52c278)['isAttached'];let _0x25339c=_0x363583?_0x487f1b['length']-0x1:0x0;const _0x5973bb=_0x363583?-0x1:0x1;for(;_0x487f1b[_0x25339c];){const _0x21aece=_0x487f1b[_0x25339c];if(_0x21aece['diffData'][_0x52c278]){const _0x3dd411=_0x363583?_0x21aece['diffData'][_0x52c278]['attributesBefore']:_0x21aece['diffData'][_0x52c278]['attributesAfter'];_0x3788fc['attributes'][_0x52c278]=_0x3dd411?_0x243a88(_0x3dd411):{};break;}_0x25339c+=_0x5973bb;}}for(const _0x327f8b of _0x487f1b){_0x327f8b['model']={};for(const _0x36db78 of _0x327f8b['authors'])_0x30bc2a['set'](_0x36db78['id'],_0x36db78);for(const _0x2d6a28 of _0x72e979){const _0x2ce0e1=_0x327f8b['diffData'][_0x2d6a28]?_0x327f8b['diffData'][_0x2d6a28]['insertions']:'[]',_0x463fd4=_0x327f8b['diffData'][_0x2d6a28]?_0x327f8b['diffData'][_0x2d6a28]['deletions']:'[]',_0x2a4636=_0x327f8b['diffData'][_0x2d6a28]?.['rootElementName']||'$root';_0x327f8b['model'][_0x2d6a28]={'insertions':this['_utils']['_makeModelFromViewString'](_0x2ce0e1,_0x2a4636),'deletions':this['_utils']['_makeModelFromViewString'](_0x463fd4,_0x2a4636)};}}for(const _0x33dc2d of _0x72e979){let _0x566cc5=null,_0x219829=0x0;const _0x38a1a9=_0x487f1b['map'](_0x35269f=>_0x35269f['diffData'][_0x33dc2d]?.['rootElementName'])['find'](_0x36ab76=>void 0x0!==_0x36ab76)||'$root',_0x55beec=new Map(Array['from'](_0x30633c['model'][_0x33dc2d]['insertions']['markers'])['filter'](([_0x3668bd])=>!_0x3668bd['startsWith']('revision:')));let _0x251d31=0x0;for(const _0x511124 of _0x487f1b){const _0x3b140a=this['_makeTape'](_0x511124['model'][_0x33dc2d]['insertions']);_0x511124==_0x30633c?(_0x566cc5=_0x3b140a,_0x219829=_0x566cc5['length'],_0x566cc5['forEach'](_0x4883f8=>{_0x4883f8['id']=_0x251d31++;}),this['_processTape'](_0x566cc5)):this['_markInsertions'](_0x566cc5,_0x3b140a);const _0x4842f8=_0x566cc5['filter'](_0x57b81d=>!_0x57b81d['isAdded'])['map'](_0x56729f=>_0x56729f['id']);let _0xc984ec=0x0;const _0x431ce6=this['_makeTape'](_0x511124['model'][_0x33dc2d]['deletions']);_0x431ce6['forEach'](_0x530e29=>{_0x530e29['isRemoved']?_0x530e29['id']=_0x219829++:_0x530e29['id']=_0x4842f8[_0xc984ec++];}),this['_processTape'](_0x431ce6),this['_setDistance'](_0x566cc5,'isAdded'),this['_setDistance'](_0x431ce6,'isRemoved'),_0x511124==_0x30633c&&this['_markMarkers'](_0x566cc5,_0x55beec),_0x566cc5=this['_joinTapes'](_0x566cc5,_0x431ce6),this['_refreshStartEndIndex'](_0x566cc5),this['_setDistance'](_0x566cc5,'isRemoved');}_0x566cc5=_0x566cc5['filter'](_0x22efd2=>!(_0x22efd2['isAdded']&&_0x22efd2['isRemoved']));const _0x3d1455=new Map(_0x2a9969['model'][_0x33dc2d]['deletions']['markers']),_0x3e416d=new Set(_0x55beec['keys']());for(const _0x3dc05a of _0x3d1455['keys']())_0x3e416d['delete'](_0x3dc05a);this['_markSuggestions'](_0x566cc5,_0x3e416d),this['_fixObsoleteTags'](_0x566cc5),_0x566cc5=this['_removeMissingPairs'](_0x566cc5),_0x566cc5=this['_markMismatchedRemovedTags'](_0x566cc5),_0x566cc5=this['_removeUnsupportedChanges'](_0x566cc5);const {root:_0x4bcd84,changes:_0x41e676}=this['_makeModelFromTape'](_0x566cc5,_0x30bc2a,_0x33dc2d,_0x38a1a9);_0x3788fc['model'][_0x33dc2d]=_0x4bcd84;const _0x2b0f5b=_0x395d8d['get'](_0x33dc2d);if(_0x2b0f5b){const _0x300f42=new Ot({'author':_0x30bc2a['get'](_0x2b0f5b['userId']),'type':_0x2b0f5b['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x33dc2d});_0x41e676['unshift'](_0x300f42),_0x3788fc['attributes'][_0x33dc2d]['revisionHistoryAttachChange']=_0x300f42['id'];}_0x3788fc['changes']=_0x3788fc['changes']['concat'](_0x41e676);}return _0x3788fc;}['_markMarkers'](_0x24d43e,_0x25740b){for(let _0x411483=0x0;_0x411483<_0x24d43e['length'];_0x411483++)for(const [_0x6981fc,_0x3cc6de]of _0x25740b)!_0x3cc6de['isCollapsed']&&_0x3cc6de['start']['isEqual'](_0x24d43e[_0x411483]['previousPosition'])&&_0x24d43e[_0x411483]['markersStart']['push'](_0x6981fc),_0x3cc6de['end']['isEqual'](_0x24d43e[_0x411483]['nextPosition'])&&_0x24d43e[_0x411483]['markersEnd']['push'](_0x6981fc);}['_joinTapes'](_0x1f21ff,_0x29b5ac){let _0x801ecb=[],_0x28fb91=0x0,_0x3ce5c6=0x0;for(;_0x28fb91<_0x1f21ff['length']||_0x3ce5c6<_0x29b5ac['length'];){const _0x91dfa0=_0x1f21ff[_0x28fb91]||{},_0x41dc75=_0x29b5ac[_0x3ce5c6]||{};if(_0x91dfa0['id']==_0x41dc75['id'])_0x28fb91++,_0x3ce5c6++,_0x801ecb['push'](_0x91dfa0);else{if(_0x41dc75['isRemoved']&&_0x91dfa0['isAdded']){const {commonTape:_0x50cdf5,iEnd:_0x3e509c,jEnd:_0x74929e}=this['_threeWayMerge'](_0x1f21ff,_0x28fb91,_0x29b5ac,_0x3ce5c6);_0x801ecb=_0x801ecb['concat'](_0x50cdf5),_0x28fb91=_0x3e509c,_0x3ce5c6=_0x74929e;}else _0x41dc75['isRemoved']?(_0x3ce5c6++,_0x801ecb['push'](_0x41dc75)):(_0x28fb91++,_0x801ecb['push'](_0x91dfa0));}}return _0x801ecb;}['_markSuggestions'](_0x4e8ea3,_0x33501d){const _0x19dd53=[];for(let _0x23537e=0x0;_0x23537e<_0x4e8ea3['length'];_0x23537e++){for(let _0x56c8db=0x0;_0x56c8db<_0x4e8ea3[_0x23537e]['markersStart']['length'];_0x56c8db++){const _0x1427ad=_0x4e8ea3[_0x23537e]['markersStart'][_0x56c8db];if(!_0x33501d['has'](_0x1427ad))continue;const {group:_0xf5486a,type:_0x439f9a,authorId:_0x4cf112}=_0x1544fa(_0x1427ad);'revision-suggestion'!=_0xf5486a||'insertion'!=_0x439f9a&&'deletion'!=_0x439f9a||(_0x19dd53['unshift']({'type':_0x439f9a,'name':_0x1427ad,'userId':_0x4cf112}),_0x4e8ea3[_0x23537e]['markersStart']['splice'](_0x56c8db,0x1),_0x56c8db--);}_0x2e6f99(_0x4e8ea3[_0x23537e]);for(let _0x9c24fb=0x0;_0x9c24fb<_0x4e8ea3[_0x23537e]['markersEnd']['length'];_0x9c24fb++){const _0x190a0e=_0x4e8ea3[_0x23537e]['markersEnd'][_0x9c24fb];if(!_0x33501d['has'](_0x190a0e))continue;const {group:_0x59ea43,type:_0x530328}=_0x1544fa(_0x190a0e);if('revision-suggestion'!=_0x59ea43||'insertion'!=_0x530328&&'deletion'!=_0x530328)continue;_0x4e8ea3[_0x23537e]['markersEnd']['splice'](_0x9c24fb,0x1),_0x9c24fb--;const _0x5f37cd=_0x19dd53['findIndex'](_0xd2c62b=>_0xd2c62b['name']==_0x190a0e);_0x5f37cd>-0x1&&_0x19dd53['splice'](_0x5f37cd,0x1);}}function _0x1544fa(_0x3b2b7b){const _0xc297a6=_0x3b2b7b['split'](':');return{'group':_0xc297a6[0x0],'type':_0xc297a6[0x1],'subType':_0xc297a6['length']>=0x5?_0xc297a6[0x2]:null,'id':_0xc297a6['length']<0x5?_0xc297a6[0x2]:_0xc297a6[0x3],'authorId':_0xc297a6['length']<0x5?_0xc297a6[0x3]:_0xc297a6[0x4],'markerCount':0x6==_0xc297a6['length']?_0xc297a6[0x5]:null};}function _0x2e6f99(_0x55c12b){for(let _0x1da16b=0x0;_0x1da16b<_0x19dd53['length'];_0x1da16b++){if(_0x55c12b['isAdded']&&'insertion'==_0x19dd53[_0x1da16b]['type']&&_0x55c12b['isAdded']['userId']==_0x19dd53[_0x1da16b]['userId'])return _0x55c12b['isAddSuggestion']=_0x19dd53[_0x1da16b],void delete _0x55c12b['isAdded'];if(!_0x55c12b['isAdded']&&!_0x55c12b['isRemoved']&&'deletion'==_0x19dd53[_0x1da16b]['type'])return void(_0x55c12b['isRemoveSuggestion']=_0x19dd53[_0x1da16b]);}}}['_setDistance'](_0x589d84,_0x457c35){let _0x4923e6=0x0,_0x490a53=!0x1;const _0x13de79=new Map();for(const _0x22a5f9 of _0x589d84)_0x22a5f9[_0x457c35]?_0x490a53&&(_0x4923e6++,_0x490a53=!0x1):(_0x4923e6++,_0x490a53=!0x0),_0x13de79['set'](_0x22a5f9['id'],_0x4923e6);for(let _0x2e6af0=0x0;_0x2e6af0<_0x589d84['length'];_0x2e6af0++){if('isRemoved'==_0x457c35&&_0x589d84[_0x2e6af0]['isAdded']||'isAdded'==_0x457c35&&_0x589d84[_0x2e6af0]['isRemoved'])continue;if('text'==_0x589d84[_0x2e6af0]['type']){_0x589d84[_0x2e6af0]['distance']=0x0;continue;}const _0x3b59ec=_0x13de79['get'](_0x589d84[_0x2e6af0]['pairId']),_0x4ab6ae=_0x13de79['get'](_0x589d84[_0x2e6af0]['id']);_0x589d84[_0x2e6af0]['distance']=_0x3b59ec-_0x4ab6ae;}}['_getRevisionsRange'](_0x16fc69,_0x27b596,_0x509ba0=!0x1){const _0x3a7a0e=[];let _0x3a7594=this['repository']['getIndex'](_0x16fc69),_0x4c7a9a=this['repository']['getIndex'](_0x27b596);for(-0x1==_0x4c7a9a&&(_0x4c7a9a=this['repository']['_revisions']['length'],_0x509ba0=!0x1);_0x3a7594<_0x4c7a9a;)_0x3a7a0e['push'](this['repository']['getRevision'](_0x3a7594)),_0x3a7594++;return _0x509ba0&&_0x3a7a0e['push'](this['repository']['getRevision'](_0x3a7594)),_0x3a7a0e;}['_threeWayMerge'](_0x1a1cae,_0x50eccc,_0x38c0b9,_0x1f2dff){const _0x516952=this['editor']['model']['schema'];let _0xb16c73=_0x50eccc;for(;_0x1a1cae[_0xb16c73]&&_0x1a1cae[_0xb16c73]['isAdded'];)_0xb16c73++;let _0x50920a=_0x1f2dff;for(;_0x38c0b9[_0x50920a]&&_0x38c0b9[_0x50920a]['isRemoved'];)_0x50920a++;_0x2ede72(_0x1a1cae,_0x50eccc,_0xb16c73),_0x2ede72(_0x38c0b9,_0x1f2dff,_0x50920a);const _0x29a1b0=_0x38c0b9['slice'](_0x1f2dff,_0x50920a)['concat'](_0x1a1cae['slice'](_0x50eccc,_0xb16c73));return _0x29a1b0['sort']((_0x396153,_0x1ec0a2)=>_0x396153['side']!=_0x1ec0a2['side']?_0x396153['side']-_0x1ec0a2['side']:_0x396153['level']!=_0x1ec0a2['level']?_0x396153['level']-_0x1ec0a2['level']:_0x396153['distance']!=_0x1ec0a2['distance']?_0x1ec0a2['distance']-_0x396153['distance']:!!_0x396153['isAdded']!=!!_0x1ec0a2['isAdded']?-0x1==_0x396153['side']||0x0==_0x396153['side']?_0x396153['isAdded']?-0x1:0x1:_0x396153['isAdded']?0x1:-0x1:_0x396153['index']-_0x1ec0a2['index']),{'commonTape':_0x29a1b0,'iEnd':_0xb16c73,'jEnd':_0x50920a};function _0x2ede72(_0x13ae8b,_0x50ed94,_0x50eb7b){let _0x39ccc7=-0x1,_0x3289d7=Number['POSITIVE_INFINITY'],_0x540b6f=!0x0;for(let _0x135650=_0x50ed94;_0x135650<_0x50eb7b;_0x135650++)if(_0x516952['isInline'](_0x13ae8b[_0x135650]['item'])||(_0x540b6f=!0x1),_0x13ae8b[_0x135650]['item']['startIndex']<_0x50ed94&&(_0x39ccc7=_0x135650),_0x13ae8b[_0x135650]['item']['endIndex']>=_0x50eb7b){_0x3289d7=_0x135650;break;}_0x540b6f&&(_0x39ccc7=_0x50eb7b-0x1);for(let _0x3498f2=_0x50ed94;_0x3498f2<_0x50eb7b;_0x3498f2++)_0x13ae8b[_0x3498f2]['side']=_0x3498f2<=_0x39ccc7?-0x1:_0x3498f2<_0x3289d7?0x0:0x1,_0x13ae8b[_0x3498f2]['index']=_0x3498f2;let _0x2889b2=0x0;for(let _0x1272fa=_0x50ed94;_0x1272fa<=_0x39ccc7;_0x1272fa++)0x0==_0x13ae8b[_0x1272fa]['distance']?_0x13ae8b[_0x1272fa]['level']=_0x2889b2:(_0x2889b2++,_0x13ae8b[_0x1272fa]['level']=_0x2889b2,_0x2889b2++);for(let _0x1833e6=_0x50ed94;_0x1833e6<_0x50eb7b;_0x1833e6++)0x0==_0x13ae8b[_0x1833e6]['side']&&(_0x13ae8b[_0x1833e6]['level']=_0x2889b2);_0x2889b2=0x0;for(let _0x41d9f0=_0x50eb7b-0x1;_0x41d9f0>=_0x3289d7;_0x41d9f0--)0x0==_0x13ae8b[_0x41d9f0]['distance']?_0x13ae8b[_0x41d9f0]['level']=_0x2889b2:(_0x2889b2--,_0x13ae8b[_0x41d9f0]['level']=_0x2889b2,_0x2889b2--);}}['_fixObsoleteTags'](_0x38d7d7){const _0x4083db=new Map(),_0x221f71=this['editor']['model']['schema'];for(let _0x1a1703=0x1;_0x1a1703<_0x38d7d7['length'];_0x1a1703++){let _0x4a918c,_0x20eaa7,_0x481160;const _0x1c1cf6=_0x38d7d7[_0x1a1703],_0x326e0f=_0x38d7d7[_0x1a1703-0x1];if('text'==_0x1c1cf6['type'])continue;if(_0x1c1cf6['type']!=_0x326e0f['type'])continue;if(!_0x221f71['isBlock'](_0x326e0f['item'])||_0x221f71['isLimit'](_0x326e0f['item']))continue;if(!_0x221f71['isBlock'](_0x1c1cf6['item'])||_0x221f71['isLimit'](_0x1c1cf6['item']))continue;if((_0x38d7d7[_0x1a1703]['isAdded']||_0x38d7d7[_0x1a1703]['isAddSuggestion'])&&_0x38d7d7[_0x1a1703-0x1]['isRemoved'])_0x4a918c=_0x38d7d7[_0x1a1703],_0x20eaa7=_0x38d7d7[_0x1a1703-0x1],_0x481160=_0x1a1703-0x1;else{if(!_0x38d7d7[_0x1a1703]['isRemoved']||!_0x38d7d7[_0x1a1703-0x1]['isAdded']&&!_0x38d7d7[_0x1a1703-0x1]['isAddSuggestion'])continue;_0x4a918c=_0x38d7d7[_0x1a1703-0x1],_0x20eaa7=_0x38d7d7[_0x1a1703],_0x481160=_0x1a1703;}const _0x3f8875=_0x4a918c['level']==_0x20eaa7['level'],_0x275fb3=Math['abs'](_0x4a918c['level'])<Math['abs'](_0x20eaa7['level'])&&0x0==_0x20eaa7['distance'];(_0x3f8875||_0x275fb3)&&(_0x4083db['set'](_0x20eaa7['id'],_0x4a918c['id']),_0x38d7d7['splice'](_0x481160,0x1),_0x1a1703--,_0x4a918c['isAdded']=!0x1);}for(let _0x2b132d=0x0;_0x2b132d<_0x38d7d7['length'];_0x2b132d++)_0x4083db['has'](_0x38d7d7[_0x2b132d]['pairId'])&&(_0x38d7d7[_0x2b132d]['pairId']=_0x4083db['get'](_0x38d7d7[_0x2b132d]['pairId']));}['_removeMissingPairs'](_0x115690){const _0x1ad89d=new Set(_0x115690['map'](_0x290e1a=>_0x290e1a['id']));for(let _0x20aef0=0x0;_0x20aef0<_0x115690['length'];_0x20aef0++)_0x1ad89d['has'](_0x115690[_0x20aef0]['pairId'])||0x0==_0x115690[_0x20aef0]['distance']||(_0x115690[_0x20aef0]['isIncorrect']=!0x0);return _0x115690['filter'](_0x22a7ba=>!_0x22a7ba['isIncorrect']);}['_markMismatchedRemovedTags'](_0x482ecc){const _0x9f38fb=new Set();for(let _0x193804=0x0;_0x193804<_0x482ecc['length'];_0x193804++){if(_0x9f38fb['has'](_0x482ecc[_0x193804]['id'])&&_0x482ecc[_0x193804]['isRemoved']&&(_0x482ecc[_0x193804]['isIncorrect']=!0x0),_0x482ecc[_0x193804]['isIncorrect'])continue;if(0x0==_0x482ecc[_0x193804]['distance'])continue;if('elementStart'!=_0x482ecc[_0x193804]['type'])continue;if(null==_0x482ecc[_0x193804]['pairId'])continue;let _0xae019e=_0x193804+0x1,_0x3af768=0x0;for(;_0x482ecc[_0xae019e]['id']!=_0x482ecc[_0x193804]['pairId'];)'elementStart'==_0x482ecc[_0xae019e]['type']?_0x3af768++:'elementEnd'==_0x482ecc[_0xae019e]['type']&&_0x3af768--,_0xae019e++;if(0x0!=_0x3af768){if(_0x482ecc[_0x193804]['isRemoved'])_0x482ecc[_0x193804]['isIncorrect']=!0x0;else{for(;_0xae019e!=_0x193804;)_0x482ecc[_0xae019e]['isRemoved']&&0x0!=_0x482ecc[_0xae019e]['distance']&&(_0x482ecc[_0xae019e]['isIncorrect']=!0x0,_0x9f38fb['add'](_0x482ecc[_0xae019e]['pairId'])),_0xae019e--;}}}return _0x482ecc['filter'](_0x4f5aa5=>!_0x4f5aa5['isIncorrect']);}['_removeUnsupportedChanges'](_0x54500e){const _0x397e85=this['editor']['model']['schema'];for(let _0x5a9b13=0x0;_0x5a9b13<_0x54500e['length'];_0x5a9b13++){if(!(_0x54500e[_0x5a9b13]['isAdded']||_0x54500e[_0x5a9b13]['isAddSuggestion']||_0x54500e[_0x5a9b13]['isRemoved']||_0x54500e[_0x5a9b13]['isRemoveSuggestion']))continue;if(0x0==_0x54500e[_0x5a9b13]['distance'])continue;const _0x7756e0=_0x54500e[_0x5a9b13]['item'];_0x397e85['isBlock'](_0x7756e0)||_0x397e85['isLimit'](_0x7756e0)||(_0x54500e[_0x5a9b13]['isAdded']&&delete _0x54500e[_0x5a9b13]['isAdded'],_0x54500e[_0x5a9b13]['isAddSuggestion']&&delete _0x54500e[_0x5a9b13]['isAddSuggestion'],_0x54500e[_0x5a9b13]['isRemoveSuggestion']&&delete _0x54500e[_0x5a9b13]['isRemoveSuggestion'],_0x54500e[_0x5a9b13]['isRemoved']&&(_0x54500e[_0x5a9b13]['isIncorrect']=!0x0));}return _0x54500e['filter'](_0x4dc88c=>!_0x4dc88c['isIncorrect']);}['_makeModelFromTape'](_0x47e3a4,_0x5e4bee,_0x13d4a0,_0x1e469a){const _0xceeadf=new _0x5bd9c1(),_0x44526a=[],_0x15a3a0=new Map(),_0x1ea5a6=this['editor']['model'],_0x20316d=_0x1ea5a6['schema'],_0x456f4d=[_0xceeadf],_0x41ba65={},_0x50d2c8={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0xceeadf['name']=_0x1e469a;let _0x973b86=null;const _0x4e1f62=[0x0];for(let _0x48611f=0x0;_0x48611f<_0x47e3a4['length'];_0x48611f++)if('elementStart'===_0x47e3a4[_0x48611f]['type']){_0x47e3a4[_0x48611f]['previousPosition']=_0x1ea5a6['createPositionFromPath'](_0xceeadf,_0x4e1f62);const _0x51bd68=new _0x5acf78(_0x47e3a4[_0x48611f]['item']['name'],_0x47e3a4[_0x48611f]['item']['getAttributes']());_0x456f4d[0x0]['_appendChild'](_0x51bd68),_0x4e1f62['push'](0x0),_0x456f4d['unshift'](_0x51bd68),_0x47e3a4[_0x48611f]['nextPosition']=_0x1ea5a6['createPositionFromPath'](_0xceeadf,_0x4e1f62);}else'elementEnd'===_0x47e3a4[_0x48611f]['type']?(_0x456f4d['shift'](),_0x47e3a4[_0x48611f]['previousPosition']=_0x1ea5a6['createPositionFromPath'](_0xceeadf,_0x4e1f62),_0x4e1f62['pop'](),_0x4e1f62[_0x4e1f62['length']-0x1]++,_0x47e3a4[_0x48611f]['nextPosition']=_0x1ea5a6['createPositionFromPath'](_0xceeadf,_0x4e1f62)):(_0x47e3a4[_0x48611f]['previousPosition']=_0x1ea5a6['createPositionFromPath'](_0xceeadf,_0x4e1f62),_0x973b86?_0x973b86['_data']+=_0x47e3a4[_0x48611f]['item']['data']:_0x973b86=new _0x3deac0(_0x47e3a4[_0x48611f]['item']['data'],_0x47e3a4[_0x48611f]['item']['getAttributes']()),_0x47e3a4[_0x48611f+0x1]&&'text'===_0x47e3a4[_0x48611f+0x1]['type']&&_0x1607d7(_0x973b86,_0x47e3a4[_0x48611f+0x1]['item'])||(_0x456f4d[0x0]['_appendChild'](_0x973b86),_0x973b86=null),_0x4e1f62[_0x4e1f62['length']-0x1]+=_0x47e3a4[_0x48611f]['item']['offsetSize'],_0x47e3a4[_0x48611f]['nextPosition']=_0x1ea5a6['createPositionFromPath'](_0xceeadf,_0x4e1f62));for(let _0xa9a1c6=0x0;_0xa9a1c6<_0x47e3a4['length'];_0xa9a1c6++){const _0x1ab0df=_0x47e3a4[_0xa9a1c6]['previousPosition'],_0x3c1a88=_0x47e3a4[_0xa9a1c6]['nextPosition'];for(const _0x1f00d4 of _0x47e3a4[_0xa9a1c6]['markersStart'])_0x15a3a0['set'](_0x1f00d4,{'start':_0x1ab0df,'end':null});_0x2223ef('isRemoveSuggestion',_0xa9a1c6,_0x1ab0df,_0x3c1a88),_0x2223ef('isAddSuggestion',_0xa9a1c6,_0x1ab0df,_0x3c1a88),_0x2223ef('isRemoved',_0xa9a1c6,_0x1ab0df,_0x3c1a88),_0x2223ef('isAdded',_0xa9a1c6,_0x1ab0df,_0x3c1a88);for(const _0x3bafee of _0x47e3a4[_0xa9a1c6]['markersEnd']){const _0x4b020c=_0x15a3a0['get'](_0x3bafee);_0x4b020c?_0x4b020c['end']=_0x3c1a88:_0x15a3a0['set'](_0x3bafee,{'start':_0x3c1a88,'end':_0x3c1a88});}}for(const [_0x300ca4,_0x5afc83]of _0x15a3a0){const _0x2a375c=this['editor']['model']['createRange'](_0x5afc83['start'],_0x5afc83['end']);_0xceeadf['markers']['set'](_0x300ca4,_0x2a375c);}return _0x44526a['sort']((_0x5a055f,_0x3a9f1d)=>{const _0x41114f=_0xceeadf['markers']['get']('revision:'+_0x5a055f['id']),_0xd12f1f=_0xceeadf['markers']['get']('revision:'+_0x3a9f1d['id']);return _0x41114f['start']['isBefore'](_0xd12f1f['start'])?-0x1:_0x41114f['start']['isAfter'](_0xd12f1f['start'])?0x1:_0x41114f['end']['isBefore'](_0xd12f1f['end'])?-0x1:_0x41114f['end']['isAfter'](_0xd12f1f['end'])?0x1:'add'===_0x5a055f['type']?-0x1:0x1;}),{'root':_0xceeadf,'changes':_0x44526a};function _0x2223ef(_0x244d3b,_0x59c09e,_0x10dff3,_0x1313a1){const _0x5e29cc=!!_0x47e3a4[_0x59c09e][_0x244d3b],_0x313032=_0x5e29cc?_0x47e3a4[_0x59c09e][_0x244d3b]['userId']:null,_0x482172=_0x59c09e===_0x47e3a4['length']-0x1,_0x5b2a33=_0x50d2c8[_0x244d3b][0x0],_0x4126a4=_0x20316d['isObject'](_0x47e3a4[_0x59c09e]['item']);!_0x41ba65[_0x244d3b]&&_0x5e29cc?_0x41ba65[_0x244d3b]={'start':_0x10dff3,'tapeItem':_0x47e3a4[_0x59c09e],'userId':_0x313032,'type':_0x244d3b}:_0x41ba65[_0x244d3b]&&!_0x5e29cc?(_0x41ba65[_0x244d3b]['end']=_0x10dff3,_0x4993cd(_0x41ba65[_0x244d3b]),_0x41ba65[_0x244d3b]=null):_0x41ba65[_0x244d3b]&&_0x5e29cc&&_0x41ba65[_0x244d3b]['userId']!==_0x313032&&(_0x41ba65[_0x244d3b]['end']=_0x10dff3,_0x5b2a33&&_0x5b2a33['userId']===_0x41ba65[_0x244d3b]['userId']||_0x4993cd(_0x41ba65[_0x244d3b]),_0x41ba65[_0x244d3b]={'start':_0x10dff3,'tapeItem':_0x47e3a4[_0x59c09e],'userId':_0x313032,'type':_0x244d3b}),_0x41ba65[_0x244d3b]&&_0x4126a4&&('elementStart'!==_0x47e3a4[_0x59c09e]['type']||_0x5b2a33&&_0x5b2a33['userId']===_0x313032||_0x50d2c8[_0x244d3b]['unshift']({'userId':_0x313032,'object':_0x47e3a4[_0x59c09e]['item'],'change':_0x41ba65[_0x244d3b]}),'elementEnd'===_0x47e3a4[_0x59c09e]['type']&&_0x5b2a33&&_0x5b2a33['object']===_0x47e3a4[_0x59c09e]['item']&&(_0x50d2c8[_0x244d3b]['shift'](),_0x41ba65[_0x244d3b]=_0x5b2a33['change'])),_0x41ba65[_0x244d3b]&&_0x482172&&(_0x41ba65[_0x244d3b]['end']=_0x1313a1,_0x4993cd(_0x41ba65[_0x244d3b]),_0x41ba65[_0x244d3b]=null);}function _0x4993cd({start:_0x418fd3,end:_0x25903b,tapeItem:_0x40e4f7,userId:_0x32b37f,type:_0x1fd27d}){const _0x5962d8=_0x40e4f7['item'],_0x1c5696=_0x1ea5a6['schema']['isBlock'](_0x5962d8)&&!_0x1ea5a6['schema']['isLimit'](_0x5962d8),_0x255408=_0x418fd3['nodeAfter']==_0x25903b['parent']&&_0x25903b['isAtStart'];if(_0x1c5696&&_0x255408)return;const _0x542281=_0x1ea5a6['createRange'](_0x418fd3,_0x25903b),_0x1b0b9e=new Ot({'author':_0x5e4bee['get'](_0x32b37f),'type':'isAdded'==_0x1fd27d||'isAddSuggestion'==_0x1fd27d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x1fd27d||'isRemoveSuggestion'==_0x1fd27d},'createdAt':new Date(),'rootName':_0x13d4a0});_0x44526a['push'](_0x1b0b9e),_0xceeadf['markers']['set']('revision:'+_0x1b0b9e['id'],_0x542281);}function _0x1607d7(_0x37cfd0,_0x518f7e){const _0xc2d9bc=_0x37cfd0['getAttributes'](),_0x2cd73c=_0x518f7e['getAttributes']();for(const _0x415c89 of _0xc2d9bc){if(_0x415c89[0x1]!==_0x518f7e['getAttribute'](_0x415c89[0x0]))return!0x1;_0x2cd73c['next']();}return _0x2cd73c['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x53b06d=>{const _0x58acf1=_0x53b06d['markerName']['split'](':')[0x1],_0x10f57b=this['_getChangeFromId'](_0x58acf1);if(!_0x10f57b)return null;const _0x16e0ab='add'==_0x10f57b['type']?'insertion':'deletion',_0xf71090=['ck-suggestion-marker','ck-suggestion-marker-'+_0x16e0ab];return _0x10f57b['data']['isSuggestion']&&_0xf71090['push']('ck-suggestion-marker-'+_0x16e0ab+'-new'),this['activeChange']==_0x10f57b&&_0xf71090['push']('ck-suggestion-marker--active'),{'classes':_0xf71090,'attributes':{'data-change-id':_0x58acf1}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xda5bba=>{_0xda5bba['on']('element:pre',(_0x38e4d0,_0x38ba3f,_0x11faae)=>{const _0x41e769=_0x38ba3f['viewItem']['getChild'](0x0);if(!_0x41e769||!_0x41e769['is']('element','code'))return;if(!_0x11faae['consumable']['consume'](_0x41e769,{'attributes':['vid_start','vid_end']}))return;const _0x16771d=_0x38ba3f['modelRange']['start']['nodeAfter'];_0x11faae['writer']['setAttribute']('vid_start',_0x41e769['getAttribute']('vid_start'),_0x16771d),_0x11faae['writer']['setAttribute']('vid_end',_0x41e769['getAttribute']('vid_end'),_0x16771d);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x48b37f=>{_0x48b37f['on']('element',(_0x2439be,_0x26e8fe,_0x47a5e8)=>{if(!_0x47a5e8['consumable']['consume'](_0x26e8fe['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x26e8fe['modelRange']['isCollapsed'])return;const _0x10c768=_0x26e8fe['modelRange']['start']['nodeAfter'];_0x10c768['hasAttribute']('vid_start')||_0x10c768['hasAttribute']('vid')||(_0x47a5e8['writer']['setAttribute']('vid_start',_0x26e8fe['viewItem']['getAttribute']('vid_start'),_0x10c768),_0x47a5e8['writer']['setAttribute']('vid_end',_0x26e8fe['viewItem']['getAttribute']('vid_end'),_0x10c768));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3aae55=>_0x3aae55['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4920aa,[,_0x5dc4de])=>{['vid_start','vid_end','vid']['includes'](_0x5dc4de)&&(_0x4920aa['return']=!0x0,_0x4920aa['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x23dbb2=>{_0x23dbb2['on']('attribute:vid',(_0x2da6ff,_0x527486,_0xbb4688)=>{if('\x20'!=_0x527486['item']['data']||_0x527486['item']['parent']['maxOffset']>0x1)return;if(!_0xbb4688['consumable']['consume'](_0x527486['item'],_0x2da6ff['name']))return;const _0x57703c=_0xbb4688['writer'],_0x4ddb22=_0xbb4688['mapper']['toViewRange'](_0x527486['range']);_0x57703c['wrap'](_0x4ddb22,_0x57703c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x414d24){const _0x209ef4=_0x414d24['plugins']['get']('RevisionViewer');return(_0x44622a,_0x510b1a,_0x51462c)=>{const _0x216cdf=_0x510b1a['markerName']['split'](':')[0x1],_0x6ee46=_0x209ef4['_getChangeFromId'](_0x216cdf);if(!_0x6ee46)return null;const _0x1dc70b='add'==_0x6ee46['type']?'split':'merge';if(!_0x51462c['consumable']['test'](_0x510b1a['markerRange'],_0x44622a['name']))return;const _0x34a6e2=_0x510b1a['markerRange']['getWalker'](),_0x374787=_0x510b1a['markerRange']['start'],_0x485e23=_0x414d24['model']['schema'];let _0x34864b=null,_0x363f6e=null,_0x8303ff=!0x1,_0x528025=!0x1;for(const _0x3c294e of _0x34a6e2){const _0x481425=_0x3c294e['item'];_0x8303ff=_0x8303ff||_0x485e23['isContent'](_0x481425);const _0x2efc07=_0x51462c['mapper']['toViewElement'](_0x481425);if(_0x2efc07&&_0x2efc07['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3c294e['type']&&(_0x485e23['isBlock'](_0x481425)&&!_0x485e23['isLimit'](_0x481425)&&(_0x481425['nextSibling']||_0x374787['isAtEnd']?_0x34864b&&_0x34864b['parent']==_0x481425||(_0x34864b=_0x481425,_0x1d93cf(_0x3c294e['previousPosition']),_0x528025=!0x0):_0x363f6e=_0x363f6e||_0x3c294e['previousPosition']));}function _0x1d93cf(_0x3492c2){const _0x13495b=_0x51462c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1dc70b}),_0x22b8c4=_0x51462c['mapper']['toViewPosition'](_0x3492c2);_0x6ee46['data']['isSuggestion']&&_0x51462c['writer']['addClass']('ck-suggestion-marker-'+_0x1dc70b+'-new',_0x13495b),_0x209ef4['activeChange']==_0x6ee46&&_0x51462c['writer']['addClass']('ck-suggestion-marker--active',_0x13495b),_0x51462c['writer']['insert'](_0x22b8c4,_0x13495b),_0x51462c['mapper']['bindElementToMarker'](_0x13495b,_0x510b1a['markerName']);}_0x8303ff||_0x528025||!_0x363f6e||_0x1d93cf(_0x363f6e);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2dc811,_0x3d8a0b,_0x304f35)=>{const _0x48dbb8=_0x304f35['mapper']['markerNameToElements'](_0x3d8a0b['markerName']);if(_0x48dbb8){for(const _0x369841 of _0x48dbb8)(_0x369841['hasClass']('ck-suggestion-marker-split')||_0x369841['hasClass']('ck-suggestion-marker-merge'))&&(_0x304f35['mapper']['unbindElementFromMarkerName'](_0x369841,_0x3d8a0b['markerName']),_0x304f35['writer']['remove'](_0x369841));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3af599,_0x1a78a1,_0xe1b401)=>{const _0x25c28b=_0x1a78a1['markerName']['split'](':')[0x1],_0x4c42ab=this['_getChangeFromId'](_0x25c28b);if(!_0x4c42ab)return null;const _0x549cc9='add'==_0x4c42ab['type']?'split':'merge';if(_0xe1b401['consumable']['test'](_0x1a78a1['markerRange'],_0x3af599['name']))for(const _0x266ee1 of _0x1a78a1['markerRange']['getItems']()){if(!_0x266ee1['is']('element','softBreak'))continue;const _0x11e69a=_0xe1b401['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x549cc9}),_0x3cc80c=_0xe1b401['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x266ee1));_0x4c42ab['data']['isSuggestion']&&_0xe1b401['writer']['addClass']('ck-suggestion-marker-'+_0x549cc9+'-new',_0x11e69a),this['activeChange']==_0x4c42ab&&_0xe1b401['writer']['addClass']('ck-suggestion-marker--active',_0x11e69a),_0xe1b401['writer']['insert'](_0x3cc80c,_0x11e69a),_0xe1b401['mapper']['bindElementToMarker'](_0x11e69a,_0x1a78a1['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x28bf0e=>{for(const _0x392920 of this['editor']['model']['document']['getRootNames']()){const _0xb54c50=this['editor']['model']['document']['getRoot'](_0x392920),_0x27a1c2=this['editor']['editing']['view']['document']['getRoot'](_0x392920);if(_0x27a1c2){const _0xd3f0c=_0xb54c50['getAttribute']('revisionHistoryAttachChange');if(_0x28bf0e['removeAttribute']('data-change-id',_0x27a1c2),_0x28bf0e['removeClass']('ck-revision-history-root-add',_0x27a1c2),_0x28bf0e['removeClass']('ck-revision-history-root-remove',_0x27a1c2),_0x28bf0e['removeClass']('ck-revision-history-root--active',_0x27a1c2),_0xd3f0c){const _0x176044=this['_getChangeFromId'](_0xd3f0c);if(!_0x176044)return null;_0x28bf0e['setAttribute']('data-change-id',_0xd3f0c,_0x27a1c2),_0x28bf0e['addClass']('ck-revision-history-root-'+_0x176044['type'],_0x27a1c2),this['activeChange']==_0x176044&&_0x28bf0e['addClass']('ck-revision-history-root--active',_0x27a1c2);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x484850=>'revision-comment:'+_0x484850,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x135d9e=>'revision-suggestion:'+_0x135d9e,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2dc983=>({'name':'suggestion:'+_0x2dc983,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x2a3a90=>{const _0x1f9de7=_0x2a3a90['markerName']['split'](':')[0x1];return'insertion'!=_0x1f9de7&&'deletion'!=_0x1f9de7?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1f9de7]};}}),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',(_0x37212a,_0x21be96,_0x10365c)=>{const _0x13ccfd=_0x10365c['mapper']['markerNameToElements'](_0x21be96['markerName']);if(_0x13ccfd){for(const _0x25e09a of _0x13ccfd)_0x25e09a['is']('uiElement')&&(_0x10365c['mapper']['unbindElementFromMarkerName'](_0x25e09a,_0x21be96['markerName']),_0x10365c['writer']['remove'](_0x25e09a));}},{'priority':'high'});}['_getChangeFromId'](_0x5e9242){return this['_changeIdToChange']['get'](_0x5e9242);}['_getViewForChange'](_0x443a36){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x443a36),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0xa8396c,_0x4da6c4,_0x456c04,_0x6a6187)=>{_0x6a6187&&this['_balloon']['remove'](_0x6a6187),_0x456c04&&(this['_balloon']['add']({'view':_0x456c04,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4932cd=this['editor']['editing'],_0x50f20f=this['_getChangeFromId'](_0x456c04['changeId']);let _0x4fa80c;if(_0x50f20f['data']['isOnRoot']){const _0x343c50=_0x4932cd['view']['getDomRoot'](_0x50f20f['rootName']);_0x4fa80c=Array['from'](_0x343c50['getClientRects']());}else{const _0x37c72a=this['editor']['model']['markers']['get']('revision:'+_0x456c04['changeId']);_0x4fa80c=Array['from'](_0x4932cd['mapper']['markerNameToElements'](_0x37c72a['name']))['map'](_0x5872dd=>_0x4932cd['view']['domConverter']['mapViewToDom'](_0x5872dd))['map'](_0x56383f=>Array['from'](_0x56383f['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x4fa80c['find'](_0x436ac9=>_0x436ac9['top']-0x3<=this['_activeViewTarget']['y']&&_0x436ac9['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x436ac9['left']-0x3<=this['_activeViewTarget']['x']&&_0x436ac9['right']+0x3>=this['_activeViewTarget']['x'])||_0x4fa80c[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x270366,_0x352a84,_0x560f0a,_0x190c93)=>{this['activeView']=_0x560f0a?this['_getViewForChange'](_0x560f0a):null,this['editor']['model']['change'](()=>{const _0x9a7c61=this['editor']['editing'];_0x190c93&&(_0x190c93['data']['isOnRoot']?_0x9a7c61['view']['change'](_0x2c29ba=>{_0x2c29ba['removeClass']('ck-revision-history-root--active',_0x9a7c61['view']['document']['getRoot'](_0x190c93['rootName']));}):_0x9a7c61['reconvertMarker']('revision:'+_0x190c93['id'])),_0x560f0a&&(_0x560f0a['data']['isOnRoot']?_0x9a7c61['view']['change'](_0x438ddb=>{_0x438ddb['addClass']('ck-revision-history-root--active',_0x9a7c61['view']['document']['getRoot'](_0x560f0a['rootName']));}):_0x9a7c61['reconvertMarker']('revision:'+_0x560f0a['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x2711ef,_0x3880b3)=>{if(this['activeChange'])return;const _0x3685df=this['_findChangeIdFromDomTarget'](_0x3880b3['target']),_0x29c6e5=this['_changeIdToChange']['get'](_0x3685df);_0x29c6e5?(this['_activeViewTarget']={'x':_0x3880b3['domEvent']['x'],'y':_0x3880b3['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x29c6e5)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3a18dc,_0x18f425)=>{const _0x4edb90=this['_findChangeIdFromDomTarget'](_0x18f425['target']),_0x2f0125=this['_changeIdToChange']['get'](_0x4edb90);_0x2f0125?(this['_activeViewTarget']={'x':_0x18f425['domEvent']['x'],'y':_0x18f425['domEvent']['y']},_0x2f0125===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2f0125):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5c9ac8){do{const _0x22133f=_0x5c9ac8['getAttribute']('data-change-id');if(_0x22133f)return _0x22133f;_0x5c9ac8=_0x5c9ac8['parent'];}while(_0x5c9ac8);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x37c02d=>{for(const _0x4295a9 of this['editor']['model']['markers'])_0x37c02d['removeMarker'](_0x4295a9);});}};function Vt(_0x272e64,_0x105e96){return(_0x231c1f,_0x4885f0,_0x1c650e)=>{if(!_0x1c650e['consumable']['test'](_0x4885f0['markerRange'],_0x231c1f['name']))return;const _0x405069=_0x4885f0['markerRange']['getWalker'](),_0x3dd650=_0x4885f0['markerRange']['start'],_0x1bcd58=_0x272e64['model']['schema'];let _0x59c405=null,_0x505a13=null,_0x9aca4f=!0x1,_0x3903aa=!0x1;for(const _0x5b8e03 of _0x405069){const _0x325739=_0x5b8e03['item'];_0x9aca4f=_0x9aca4f||_0x1bcd58['isContent'](_0x325739);const _0x53b6de=_0x1c650e['mapper']['toViewElement'](_0x325739);if(_0x53b6de&&_0x53b6de['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5b8e03['type']&&(_0x1bcd58['isBlock'](_0x325739)&&!_0x1bcd58['isLimit'](_0x325739)&&(_0x325739['nextSibling']||_0x3dd650['isAtEnd']?_0x59c405&&_0x59c405['parent']==_0x325739||(_0x59c405=_0x325739,_0x38cd6a(_0x5b8e03['previousPosition']),_0x3903aa=!0x0):_0x505a13=_0x505a13||_0x5b8e03['previousPosition']));}function _0x38cd6a(_0x2b41bd){const _0x2e71d0=_0x1c650e['mapper']['toViewPosition'](_0x2b41bd),_0x572057=_0x1c650e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x105e96});_0x1c650e['writer']['insert'](_0x2e71d0,_0x572057),_0x1c650e['mapper']['bindElementToMarker'](_0x572057,_0x4885f0['markerName']);}_0x9aca4f||_0x3903aa||!_0x505a13||_0x38cd6a(_0x505a13);};}var Dt=class extends _0x4a36b2{constructor(_0x3d343c){super(_0x3d343c);const _0x14f2a9=_0x3d343c['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x14f2a9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x14f2a9,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x210600=this['editor'],_0x411396=_0x210600['plugins']['get'](Mt),_0x1e6937=_0x411396['isReady']?_0x411396['diff']['newRevisionId']:null;_0x210600['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1e6937);}['refresh'](){const {isReady:_0xd1931c,isEnabled:_0x54b60b,repository:_0x5046ad,diff:_0x3a8c61}=this['editor']['plugins']['get'](Mt),_0x594623=_0x3a8c61&&_0x5046ad['getLaterVisibleRevision'](_0x3a8c61['newRevisionId']);this['isEnabled']=_0xd1931c&&_0x54b60b&&Boolean(_0x594623);}},Tt=class extends _0x4a36b2{['_step'];constructor(_0x2887d6,{direction:_0x180e3b}){super(_0x2887d6);const _0x4b4222=_0x2887d6['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x180e3b?0x1:-0x1,this['listenTo'](_0x4b4222,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4b4222,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4b4222,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x247685=this['editor'],_0x4e8260=_0x247685['plugins']['get'](Mt),{isNavigationMode:_0x357804,currentChangeNumber:_0x3a4c0e}=_0x4e8260;let _0x34ab5c;if(_0x4e8260['activeChange']=_0x357804?_0x4e8260['diff']['changes']['get'](_0x3a4c0e+this['_step']):_0x4e8260['diff']['changes']['first'],_0x4e8260['activeChange']['data']['isOnRoot'])_0x34ab5c=_0x247685['editing']['view']['getDomRoot'](_0x4e8260['activeChange']['rootName']);else{const _0x15a229=_0x247685['model']['markers']['get']('revision:'+_0x4e8260['activeChange']['id']);_0x34ab5c=_0x22f82f(_0x247685['editing'],_0x15a229);}_0x106489({'target':_0x34ab5c,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x35a99b,currentChangeNumber:_0x285026,numberOfChanges:_0x3ca0c6,isReady:_0x46f49f,isEnabled:_0x69cb07}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0x69cb07&&_0x46f49f&&_0x3ca0c6)&&(!_0x35a99b||(0x1===this['_step']?_0x285026<_0x3ca0c6-0x1:_0x285026>0x0));}},Ht=class extends at{constructor(_0x21271e){super(_0x21271e);const _0x46ee89=this['bindTemplate'],_0x30c78b=new _0x96399d(_0x21271e),_0x5df423=new _0x96399d(_0x21271e);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',(_0x334d44,_0x2abbba)=>_0x334d44&&_0x2abbba>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x13f452,_0x154cfa,_0x1309fc,_0x1a1bbe)=>{if(!_0x13f452)return pt(_0x21271e,'Loading...');if(!_0x1309fc)return pt(_0x21271e,'No\x20changes');const _0x5cfc3c=pt(_0x21271e,'NUMBER_OF_CHANGES',_0x1309fc);return _0x1a1bbe?pt(_0x21271e,'X_OF_Y_CHANGES',[_0x154cfa+0x1,_0x1309fc]):_0x5cfc3c;}),_0x30c78b['set']({'label':pt(_0x21271e,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x43c1bf}),_0x5df423['set']({'label':pt(_0x21271e,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4cb9a9}),_0x30c78b['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5df423['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x30c78b['on']('execute',()=>this['fire']('execute','backward')),_0x5df423['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',_0x46ee89['if']('_isStatusLabelVisible','ck-hidden',_0x54c93a=>!_0x54c93a)]},'children':[{'text':_0x46ee89['to']('isNavigationMode',_0x5bf664=>_0x5bf664?pt(_0x21271e,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0x21271e,'Total')+':\x20')}]},{'text':_0x46ee89['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x30c78b,_0x5df423]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0xb465bf{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2b1106=this['editor']['editing']['view'];_0x2b1106['change'](_0x1f8b23=>{for(const _0x3f6f48 of _0x2b1106['document']['roots'])_0x1f8b23['addClass'](Pt,_0x3f6f48);});}['hide'](){const _0x59153a=this['editor']['editing']['view'];_0x59153a['change'](_0x3243a2=>{for(const _0x13543f of _0x59153a['document']['roots'])_0x3243a2['removeClass'](Pt,_0x13543f);});}},Lt=class extends _0xb465bf{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x159b3f=this['editor'],_0x21622d=_0x159b3f['plugins']['get'](Mt),_0x1ade07=_0x159b3f['plugins']['get'](Ut);_0x159b3f['ui']['componentFactory']['add']('exitToEditing',_0x2d2cb0=>{const _0xdedb6c=new _0x96399d(_0x2d2cb0);return _0xdedb6c['set']({'label':pt(_0x2d2cb0,'Back\x20to\x20editing'),'icon':_0x1d36a4,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xdedb6c,'execute',()=>{_0x159b3f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xdedb6c;}),_0x159b3f['ui']['componentFactory']['add']('restoreRevision',_0x42f27c=>{const _0x4cccf7=new _0x96399d(_0x42f27c);return _0x4cccf7['set']({'label':pt(_0x42f27c,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4cccf7['bind']('isEnabled')['to'](_0x159b3f['commands']['get']('restoreRevision')),this['listenTo'](_0x4cccf7,'execute',()=>_0x159b3f['execute']('restoreRevision')),_0x4cccf7;}),_0x159b3f['ui']['componentFactory']['add']('changesNavigation',_0x555fbb=>{const _0x54f970=new Ht(_0x555fbb),_0x769e66=_0x159b3f['commands']['get']('showPreviousChange'),_0x559b76=_0x159b3f['commands']['get']('showNextChange');return _0x54f970['bind']('isBackwardNavigationEnabled')['to'](_0x769e66,'isEnabled'),_0x54f970['bind']('isForwardNavigationEnabled')['to'](_0x559b76,'isEnabled'),_0x54f970['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x21622d),this['listenTo'](_0x54f970,'execute',(_0x5ea3c8,_0x234e62)=>{_0x159b3f['execute']('forward'===_0x234e62?'showNextChange':'showPreviousChange');}),_0x54f970;}),_0x1ade07['show'](),_0x21622d['on']('change:isReady',(_0x2c7570,_0x47a86e,_0x493bc2)=>{_0x493bc2?_0x1ade07['hide']():_0x1ade07['show']();});}},Ft=class extends _0x233d40{['_resizeObserver']=null;constructor(_0x20f314,_0x2c8f4d){super(_0x20f314,_0x2c8f4d);const _0x523079=this['bindTemplate'];this['set']({'label':pt(_0x20f314,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x20f314,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x523079['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x390a4f(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x2f4ab8=this['fieldView']['element'];this['_tooltipString']=_0x2f4ab8['scrollWidth']>_0x2f4ab8['clientWidth']&&_0x2f4ab8['value']||'';}},$t=class extends at{constructor(_0x30a6ba,_0x1a0d64,_0xe6b945){super(_0x30a6ba);const _0x28f79c=new _0x4015ce();_0x28f79c['set']({'content':_0x5c9861,'viewBox':'0\x200\x2011\x2010'});const _0x4bd8ed=['ck','ck-revision-history-sidebar__revision-author'];_0xe6b945&&_0x4bd8ed['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5a9f22=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x30a6ba,_0xe6b945?'Revision\x20creator':'Revision\x20author')},'children':[_0x28f79c,_0x1a0d64['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4bd8ed},'children':_0x5a9f22});}};function jt(_0x250b97,_0x46a5ae){const _0x237366=_0x250b97['bindTemplate'],_0x2026b6=_0x250b97['locale'],_0x3ea86b=ct(_0x2026b6);_0x3ea86b['panelPosition']='sw';const _0x5679e2=function(_0x82f011,_0x48cc67){const _0x5d394c=function(_0x2a1fb0,_0x31a324){const _0x1555f5=_0x2a1fb0['locale'],_0x573d12={'Compare\x20against\x20selected':pt(_0x1555f5,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x1555f5,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x1555f5,'Restore\x20this\x20revision')};return _0x31a324['map'](_0x258edf=>{const _0x4dfe47=_0x573d12[_0x258edf['name']];return _0x4dfe47&&_0x4dfe47!==_0x258edf['name']&&(_0x258edf['name']=_0x4dfe47),_0x258edf;});}(_0x82f011,_0x48cc67),_0x3f1e6a=new _0x3011cf();for(const _0x31434e of _0x5d394c){const _0x339fd5={'type':'button','model':new rt({'label':_0x31434e['name'],'class':_0x31434e['class'],'withText':!0x0,'role':'menuitem','_action':_0x31434e['action']})};_0x339fd5['model']['bind']('isEnabled')['to'](_0x82f011,'isActionsDropdownOpen',_0x490af8=>'function'!=typeof _0x31434e['isEnabled']||(!_0x490af8||_0x31434e['isEnabled'](_0x82f011))),_0x3f1e6a['add'](_0x339fd5);}return _0x3f1e6a;}(_0x250b97,_0x46a5ae);return _0x250b97['bind']('isActionsDropdownOpen')['to'](_0x3ea86b,'isOpen'),_0x3ea86b['buttonView']['set']({'label':pt(_0x2026b6,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x207de1}),_0x3ea86b['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x237366['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x237366['to'](_0x13a4a9=>_0x13a4a9['stopPropagation']())}}),_0x3ea86b['on']('execute',_0x180843=>{_0x250b97['isReady']&&'function'==typeof _0x180843['source']['_action']&&_0x180843['source']['_action'](_0x250b97);}),ht(_0x3ea86b,_0x5679e2,{'role':'menu'}),_0x3ea86b['listenTo'](_0x250b97,'change:isActionsDropdownOpen',(_0x5656d1,_0x2a91e8,_0x4e1293)=>{if(_0x4e1293)for(const _0x550d30 of _0x3ea86b['listView']['items']){const _0x8a021=_0x550d30['children']['first'],_0x42bde0=_0x46a5ae['find'](_0x28d29d=>_0x28d29d['action']===_0x8a021['_action'])['isVisible'];_0x550d30['isVisible']=void 0x0===_0x42bde0||_0x42bde0(_0x250b97);}}),_0x3ea86b;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x5ae7f6,Collection as _0x1bc318,ElementReplacer as _0x5ddb6f,FocusTracker as _0x4ea326,KeystrokeHandler as _0xe17f54,ObservableMixin as _0x1a221f,ResizeObserver as _0x52219c,logWarning as _0x16390e,scrollViewportToShowTarget as _0x297f0e,uid as _0x590d2c}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x256f14,isEqual as _0x54227e,set as _0x48bd87,unset as _0x393825}from'es-toolkit/compat';import{Command as _0x538c7d,Editor as _0xb14c4b,ElementApiMixin as _0x2f6c25,PendingActions as _0x896a6e,Plugin as _0x2d350d}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x1e283c,Users as _0x2eba5e,getMarkerDomElement as _0x29d53f,sanitizeEditorConfig as _0x4d7af6}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x189def,ModelElement as _0x1dc29d,ModelPosition as _0x1c748a,ModelRange as _0x5e4bda,ModelText as _0x16d047,ViewAttributeElement as _0x1cacdd,ViewContainerElement as _0x51ebcc,ViewDocumentFragment as _0x71e8dc,ViewElement as _0x5132da,ViewEmptyElement as _0x2b926a,ViewRawElement as _0x2d47fe,ViewText as _0x1a4097,ViewUIElement as _0x390130}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x235108,IconChevronUp as _0x5b586a,IconHistory as _0x4f6ef9,IconThreeVerticalDots as _0x1a868b,IconUndo as _0x87fc34,IconUser as _0x479fa4}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x1c056f,ButtonView as _0x2c621a,ContextualBalloon as _0x3db3fd,CssTransitionDisablerMixin as _0x379629,EditorUI as _0x57e397,IconView as _0x3e155f,InlineEditableUIView as _0x132cfb,LabeledFieldView as _0x2db147,ListItemView as _0x48d14e,ListView as _0x9f82ac,MenuBarMenuListItemButtonView as _0x27d3f5,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
|
+
_0x1a221f();var gt=class extends vt{['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x14e8a){super(),this['id']=_0x14e8a['id']||_0x590d2c(),this['creator']=_0x14e8a['creator']||null,this['authors']=_0x14e8a['authors']||[],this['diffData']=_0x14e8a['diffData']||null,this['toVersion']=_0x14e8a['toVersion']||0x0,this['fromVersion']=_0x14e8a['fromVersion']||0x0,this['set']('name',_0x14e8a['name']||''),this['set']('createdAt',_0x14e8a['createdAt']||new Date()),this['set']('attributes',_0x14e8a['attributes']||{});}['setName'](_0x23d3bc){this['_update']({'name':_0x23d3bc});}['setAttribute'](_0x1f5af6,_0x33171f){const _0x4c2da7=_0x256f14(this['attributes']);_0x48bd87(_0x4c2da7,_0x1f5af6,_0x33171f),this['_update']({'attributes':_0x4c2da7});}['removeAttribute'](_0x330a9e){const _0x1af736=_0x256f14(this['attributes']);_0x393825(_0x1af736,_0x330a9e),this['_update']({'attributes':_0x1af736});}['_update'](_0x2b9407,_0x10300a=!0x1){let _0x2b93e3=!0x1;const _0x255055={'id':this['id']};for(const _0x14ffd7 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x3cc6ef=_0x2b9407[_0x14ffd7];void 0x0!==_0x3cc6ef&&_0x3cc6ef!==this[_0x14ffd7]&&(this[_0x14ffd7]=_0x3cc6ef,_0x255055[_0x14ffd7]=_0x3cc6ef,_0x2b93e3=!0x0);}_0x2b93e3&&(_0x255055['authors']&&(_0x255055['authorsIds']=_0x255055['authors']['map'](_0x27e619=>_0x27e619['id']),delete _0x255055['authors']),this['fire']('_update',_0x255055,_0x10300a));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x6846ab=>_0x6846ab['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},mt=class extends _0x2d350d{['_revisions'];static get['requires'](){return[_0x2eba5e];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x10bfc5){super(_0x10bfc5),this['_revisions']=new _0x1bc318();}['afterInit'](){!async function(_0x1cb4ca){const _0x5385b2='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x2d3ba3=0xeb829,_0x51b63d=0x78e40,_0x354331=window['Date']['now'](),_0x47a973=_0x1cb4ca['editor'],_0x1aebbc=new window['Promise'](_0xb9a5dd=>{_0x47a973['once']('ready',_0xb9a5dd);}),_0x4fa812={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x1fc2ea=_0x47a973['config']['get']('licenseKey');async function _0x1b0604(){let _0x567bc0,_0x23d723=null,_0x58a3a2=null;try{return'GPL'==_0x1fc2ea?'NotAllowed':(_0x567bc0=_0x7685cf(),_0x567bc0?(_0x567bc0['usageEndpoint']&&(_0x58a3a2=_0x4da8db(_0x567bc0['usageEndpoint'],_0x567bc0['jti'])),await _0x332f49()?_0x1a6e79()?_0x45fa43()?'Expired':_0x454226()?('evaluation'==_0x567bc0['licenseType']&&(_0x23d723=_0x46ca49('EvaluationLimit')),await _0x2aef43()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x45fa43(){const _0x1d60eb=['evaluation','trial']['includes'](_0x567bc0['licenseType'])?_0x354331/0x3e8:0xe10*_0x51b63d;return _0x567bc0['exp']<_0x1d60eb;}function _0x1a6e79(){const _0x5a2725=_0x567bc0['features'];if(!_0x5a2725)return!0x1;if(_0x5a2725['includes']('*'))return!0x0;if(_0x5a2725['includes']('RH'))return!0x0;if(_0x5a2725['includes']('RRH')){if(_0x250afa())return!0x0;if(_0xabbba3()||_0x521cf0())return!0x0;}return!0x1;}function _0x454226(){const _0x3b47b5=_0x567bc0['licensedHosts'];if(!_0x3b47b5||0x0==_0x3b47b5['length'])return!0x0;const {hostname:_0x2cccee}=new URL(window['location']['href']);if(_0x3b47b5['includes'](_0x2cccee))return!0x0;const _0x3ff561=_0x2cccee['split']('.');return _0x3b47b5['filter'](_0x489207=>_0x489207['includes']('*'))['map'](_0x4a57ac=>_0x4a57ac['split']('.'))['filter'](_0x1cd71b=>_0x1cd71b['length']<=_0x3ff561['length'])['map'](_0x3f62ab=>Array(_0x3ff561['length']-_0x3f62ab['length'])['fill']('*'===_0x3f62ab[0x0]?'*':'')['concat'](_0x3f62ab))['some'](_0x3f10f1=>_0x3ff561['every']((_0x47f0ce,_0x396963)=>_0x3f10f1[_0x396963]===_0x47f0ce||'*'===_0x3f10f1[_0x396963]));}function _0x2aef43(){return _0x23d723&&_0x58a3a2?new window['Promise']((_0x3e19f4,_0x3c0a46)=>{_0x23d723['then'](_0x3e19f4,_0x3c0a46),_0x58a3a2['then'](_0x164d70=>{'Valid'!=_0x164d70&&_0x3e19f4(_0x164d70);},_0x3c0a46);}):_0x23d723||_0x58a3a2||'Valid';}}function _0x4da8db(_0x3a479c,_0x218517){return new window['Promise'](_0xc0d13f=>{if(_0x193114())return _0xc0d13f('Valid');_0x5b6403(),_0x47a973['decorate']('_sendUsageRequest');let _0x4d51c5=!0x1;const _0x3a4e3c=_0x590d2c();function _0x367bd7(_0x58d37d){return!!_0x58d37d&&('object'==typeof _0x58d37d||'function'==typeof _0x58d37d)&&'function'==typeof _0x58d37d['then']&&'function'==typeof _0x58d37d['catch'];}function _0xf7ba8d(_0x339e46){_0x1c6727(_0x339e46)['then'](_0x548a70=>_0x548a70&&'ok'==_0x548a70['status']?_0x4ab095(_0x27d256(_0x3a4e3c+_0x218517))!=_0x548a70['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x50955b=>(_0x14208d(),_0x50955b),()=>{const _0x495fe1=_0x54f18b();return null==_0x495fe1?(_0x14208d(),'Valid'):_0x354331-_0x495fe1>0x240c8400?'UsageLimit':'Valid';})['then'](_0xc0d13f)['catch'](()=>{_0xc0d13f('UsageLimit');});const _0x20720c=0x36ee80;function _0x14208d(){const _0x239d0a='llct-'+_0x4ab095(_0x27d256(_0x3a479c)),_0x548aa0=_0x2eb4e1(_0x4ab095(window['Math']['ceil'](_0x354331/_0x20720c)));window['localStorage']['setItem'](_0x239d0a,_0x548aa0);}function _0x54f18b(){const _0xdd0ccc='llct-'+_0x4ab095(_0x27d256(_0x3a479c)),_0x1c8380=window['localStorage']['getItem'](_0xdd0ccc);return _0x1c8380?window['parseInt'](_0x2eb4e1(_0x1c8380),0x10)*_0x20720c:null;}function _0x1c6727(_0x6139ce){return new window['Promise']((_0x5ad6be,_0x46048c)=>{_0x6139ce['then'](_0x5ad6be,_0x46048c),window['setTimeout'](_0x46048c,0x1d4c0);});}}_0x47a973['on']('_sendUsageRequest',(_0x1a4e03,_0x30a020)=>{if(_0x30a020[0x0]!=_0x3a479c)return _0xc0d13f('UsageLimit');_0x30a020[0x1]={..._0x30a020[0x1],'requestId':_0x3a4e3c};},{'priority':'high'}),_0x47a973['on']('_sendUsageRequest',_0x221bb3=>{_0x367bd7(_0x221bb3['return'])&&(_0x4d51c5=!0x0,_0xf7ba8d(_0x221bb3['return']));},{'priority':'low'}),_0x1aebbc['then'](()=>{_0x4d51c5||_0xc0d13f('UsageLimit');});});function _0x193114(){return'auto'==_0x47a973['editing']['view']['_overlayModeHint'];}function _0x5b6403(){_0x47a973['editing']['view']['_overlayModeHint']='auto';}}function _0x46ca49(_0xad9893){const _0x1f9037=[new window['Promise'](_0x2b715d=>setTimeout(_0x2b715d,0x93ecc)),_0x1aebbc['then'](()=>new window['Promise'](_0x25d108=>{const _0x35f6cd=0x7,_0x3050a4=_0x1cb4ca['_revisions'];function _0x1229c5(){_0x3050a4['length']>=_0x35f6cd&&_0x25d108();}_0x1229c5(),_0x3050a4['on']('add',_0x1229c5);})),new window['Promise'](_0x17634a=>{function _0x56359d(){for(const _0x1019d4 in window)if(window['Number']['isNaN'](window['Number'](_0x1019d4))&&window[_0x1019d4]==_0x2d3ba3)return _0x17634a();'destroyed'!=_0x47a973['state']&&window['setTimeout'](_0x56359d,0x1388);}_0x39e574('RevisionViewer')&&_0x56359d();})];return window['Promise']['race'](_0x1f9037)['then'](()=>_0xad9893);}async function _0x181c9e(){if(await _0x1aebbc,_0x39e574('RevisionViewer')){const _0x384572=_0x1cb4ca['getRevision'](0x0),_0x2ef44e=_0x1cb4ca['getEarlierVisibleRevision'](_0x384572['id']),_0x99a87e=_0x431581('RevisionViewer');return await _0x99a87e['compare'](_0x384572['id'],_0x2ef44e?_0x2ef44e['id']:null,!0x0),_0x99a87e['unbind']('isEnabled'),_0x99a87e['isEnabled']=!0x1,_0x99a87e['compare']=_0x37dd0f,void(_0x99a87e['_getDiff']=_0x37dd0f);}if(_0x39e574('RevisionTracker')){const _0x43cdc3=_0x431581('RevisionTracker');_0x43cdc3['unbind']('isEnabled'),_0x43cdc3['isEnabled']=!0x1,_0x43cdc3['update']=_0x37dd0f,_0x43cdc3['saveRevision']=_0x37dd0f;}_0x47a973['model']['change']=_0x37dd0f,_0x47a973['model']['enqueueChange']=_0x37dd0f,_0x47a973['enableReadOnlyMode']('model');}function _0x250afa(){return _0x39e574('WebSocketGateway')&&'connected'==_0x431581('WebSocketGateway')['state'];}function _0xabbba3(){return _0x39e574('RevisionViewerIntegration');}function _0x521cf0(){return _0x39e574('TrackChangesDataGetter');}function _0x51a16f(_0x52eb91){const _0x5b7e2a=_0x33c274();_0x47a973[_0x5b7e2a]='revisionHistoryLicenseKey'+_0x52eb91,_0x52eb91['endsWith']('Limit')&&(window[_0x33c274()]=_0x2d3ba3),'Valid'!=_0x52eb91&&_0x181c9e();}function _0x33c274(){const _0xd5491f=window['String'](window['performance']['now']())['replace']('.','');let _0x21175f='v';for(let _0x1801ab=0x0;_0x1801ab<_0xd5491f['length'];_0x1801ab+=0x2){let _0x7fa3b2=window['parseInt'](_0xd5491f['substring'](_0x1801ab,_0x1801ab+0x2));_0x7fa3b2>=0x3e&&(_0x7fa3b2-=0x3e),_0x21175f+=_0x5385b2[_0x7fa3b2];}return _0x21175f;}function _0x7685cf(){const _0x30c92a=_0x1fc2ea['split']('.');if(0x3!=_0x30c92a['length'])return null;return _0xbd5f22(_0x30c92a[0x1]);function _0xbd5f22(_0xb7602e){const _0x599ff0=_0x4d79f7(_0xb7602e);return _0x599ff0&&_0x130199()?_0x599ff0:null;function _0x130199(){const _0x48c3ea=_0x599ff0['jti'],_0x5627a8=window['parseInt'](_0x48c3ea['substring'](_0x48c3ea['length']-0x8),0x10),_0x194be7={..._0x599ff0,'jti':_0x48c3ea['substring'](0x0,_0x48c3ea['length']-0x8)};return delete _0x194be7['vc'],_0x27d256(_0x194be7)==_0x5627a8;}}}async function _0x332f49(){let _0x2873f1=!0x0;try{const [_0x15c37f,_0x713a28,_0x539fe8]=_0x1fc2ea['split']('.');return _0x179b4e(_0x15c37f),await _0x15a396(_0x15c37f,_0x713a28,_0x539fe8),_0x2873f1;}catch{return!0x1;}function _0x179b4e(_0x431d28){const _0x529c37=_0x4d79f7(_0x431d28);_0x529c37&&'ES256'==_0x529c37['alg']||(_0x2873f1=!0x1);}async function _0x15a396(_0x26631f,_0x34c23c,_0x557a91){const _0x3aeee7=window['Uint8Array']['from'](_0x3b07f8(_0x557a91),_0x1a8c2b=>_0x1a8c2b['charCodeAt'](0x0)),_0x18b5a1=new window['TextEncoder']()['encode'](_0x26631f+'.'+_0x34c23c),_0x6b62b4=window['crypto']['subtle'];if(!_0x6b62b4)return;const _0x532d22=await _0x6b62b4['importKey']('jwk',_0x4fa812,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x6b62b4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x532d22,_0x3aeee7,_0x18b5a1)||(_0x2873f1=!0x1);}}function _0x4d79f7(_0x5cd0a6){return _0x5cd0a6['startsWith']('ey')?JSON['parse'](_0x3b07f8(_0x5cd0a6)):null;}function _0x3b07f8(_0x223814){return window['atob'](_0x223814['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x27d256(_0x15efb6){let _0x1117a9=0x1505;function _0x2b5e9b(_0x2df5a6){for(let _0x36f539=0x0;_0x36f539<_0x2df5a6['length'];_0x36f539++){const _0x4d8158=_0x2df5a6['charCodeAt'](_0x36f539);_0x1117a9=(_0x1117a9<<0x5)+_0x1117a9+_0x4d8158,_0x1117a9&=_0x1117a9;}}function _0x24b33c(_0xbb1a47){Array['isArray'](_0xbb1a47)?_0xbb1a47['forEach'](_0x24b33c):_0xbb1a47&&'object'==typeof _0xbb1a47?Object['entries'](_0xbb1a47)['sort']()['forEach'](([_0xb5939,_0x56d15b])=>{_0x2b5e9b(_0xb5939),_0x24b33c(_0x56d15b);}):_0x2b5e9b(window['String'](_0xbb1a47));}return _0x24b33c(_0x15efb6),_0x1117a9>>>0x0;}function _0x4ab095(_0x1afd06){return _0x1afd06['toString'](0x10)['padStart'](0x8,'0');}function _0x2eb4e1(_0x24a949){return _0x24a949['split']('')['reverse']()['join']('');}function _0x39e574(_0x31a9cc){return _0x47a973['plugins']['has'](_0x31a9cc);}function _0x431581(_0x3fe7c9){return _0x47a973['plugins']['get'](_0x3fe7c9);}function _0x37dd0f(){}_0x51a16f(await _0x1b0604());}(this);}['createRevision'](_0x4c398f){const _0x574474=this['editor']['plugins']['get']('Users');return new gt({'id':_0x4c398f['id'],'name':_0x4c398f['name'],'creator':_0x4c398f['creatorId']?_0x574474['getUser'](_0x4c398f['creatorId']):null,'diffData':_0x4c398f['diffData']||_0x4c398f['data'],'authors':_0x4c398f['authorsIds']['map'](_0x1c8aca=>_0x574474['getUser'](_0x1c8aca)),'createdAt':new Date(_0x4c398f['createdAt']),'attributes':_0x4c398f['attributes'],'fromVersion':_0x4c398f['fromVersion'],'toVersion':_0x4c398f['toVersion']});}['addRevision'](_0x1a7274,_0x2a2ffc=0x0){this['_revisions']['add'](_0x1a7274,_0x2a2ffc);}['getRevision'](_0x58682e){return this['_revisions']['get'](_0x58682e);}['getRevisions'](_0x41e0aa={'toJSON':!0x1}){const _0x41e02c=Array['from'](this['_revisions']);return _0x41e02c['reverse'](),_0x41e0aa['toJSON']?_0x41e02c['map'](_0x519872=>_0x519872['toJSON']()):_0x41e02c;}['getIndex'](_0x167909){return this['_revisions']['getIndex'](_0x167909);}['getEarlierVisibleRevision'](_0x360c0e){const [,_0x516d8e]=this['getRevisionsIterator'](_0x360c0e,{'direction':'earlier'});return _0x516d8e;}['getLaterVisibleRevision'](_0x29505c){const [,_0x77c0ea]=this['getRevisionsIterator'](_0x29505c,{'direction':'later'});return _0x77c0ea;}['getRevisionsInDiff'](_0x5d7c35){const _0x56cbe4=[];for(const _0x2910b0 of this['getRevisionsIterator'](_0x5d7c35['newRevisionId']))if(_0x56cbe4['push'](_0x2910b0),_0x2910b0['id']===_0x5d7c35['oldRevisionId'])break;return _0x56cbe4;}*['getRevisionsIterator'](_0x3153f2,{direction:_0x20b3f4='earlier',filter:_0x577b52=()=>!0x0}={}){const _0x1d9fc2='earlier'===_0x20b3f4?0x1:-0x1;let _0x22cacc=this['_revisions']['get'](_0x3153f2),_0x5d3018=this['getIndex'](_0x22cacc);for(yield _0x22cacc;_0x22cacc;){if(_0x5d3018+=_0x1d9fc2,_0x22cacc=this['getRevision'](_0x5d3018),!_0x22cacc)return;_0x577b52(_0x22cacc)&&(yield _0x22cacc);}}},wt=class extends _0x2d350d{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x51ebcc,'c'],[_0x1cacdd,'a'],[_0x2b926a,'e'],[_0x2d47fe,'r'],[_0x390130,'u']]);['_typeCharToViewClass']=new Map([['c',_0x51ebcc],['a',_0x1cacdd],['e',_0x2b926a],['r',_0x2d47fe],['u',_0x390130]]);async['loadRevisionData'](_0x340903,_0x2e5cbe){if(_0x340903['diffData']||!_0x2e5cbe)return;const _0x5da7e0=this['editor']['config']['get']('collaboration.channelId');_0x340903['diffData']=(await _0x2e5cbe['getRevision']({'channelId':_0x5da7e0,'revisionId':_0x340903['id']}))['diffData'];}['getRevisionDocumentData'](_0xc2254f){const _0x1f3063={};for(const _0x497c3b in _0xc2254f['diffData']){if(_0xc2254f['diffData'][_0x497c3b]['attachChange']&&!_0xc2254f['diffData'][_0x497c3b]['attachChange']['isAttached'])continue;const _0x15b8de=this['_removeRevisionMarkers'](JSON['parse'](_0xc2254f['diffData'][_0x497c3b]['insertions'])),_0x1f85a5=this['editor']['editing']['view']['document'],_0x22dfa4=new _0x71e8dc(_0x1f85a5,_0x15b8de['map'](_0x5af0ed=>this['_getViewFromDiffObj'](_0x5af0ed,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1f3063[_0x497c3b]=this['editor']['data']['processor']['toData'](_0x22dfa4),this['editor']['data']['processor']['useFillerType']('default');}return _0x1f3063;}['getRevisionRootsAttributes'](_0x18a83d){const _0xbd4848={};for(const _0x3ff95b in _0x18a83d['diffData'])_0x18a83d['diffData'][_0x3ff95b]['attachChange']&&!_0x18a83d['diffData'][_0x3ff95b]['attachChange']['isAttached']||(_0xbd4848[_0x3ff95b]=_0x18a83d['diffData'][_0x3ff95b]['attributesAfter']||{});return _0xbd4848;}['getRevisionRootsModelElements'](_0x5a99d){const _0x5a7b9b={};for(const _0x1d4666 in _0x5a99d['diffData']){if(_0x5a99d['diffData'][_0x1d4666]['attachChange']&&!_0x5a99d['diffData'][_0x1d4666]['attachChange']['isAttached'])continue;const _0x21a0cc=_0x5a99d['diffData'][_0x1d4666]['rootElementName'];_0x21a0cc&&(_0x5a7b9b[_0x1d4666]=_0x21a0cc);}return _0x5a7b9b;}['_getTypeCharForViewElement'](_0x271d74){return this['_viewClassToTypeChar']['get'](_0x271d74['constructor']);}['_getViewFromDiffObj'](_0x562c57,_0x1cc731){const _0x47c04f=this['editor']['editing']['view']['document'];if('string'==typeof _0x562c57)return new _0x1a4097(_0x47c04f,_0x562c57);{let _0x3bf7ac,_0x2d86f5;_0x2d86f5='u'==_0x562c57['type']||'r'==_0x562c57['type']?[]:_0x562c57['children']['map'](_0x265f62=>this['_getViewFromDiffObj'](_0x265f62,_0x1cc731));const _0x318fe2=this['_typeCharToViewClass']['get'](_0x562c57['type'])||_0x5132da,_0x88e01b=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3bf7ac=new _0x318fe2(_0x47c04f,_0x562c57['name'],_0x562c57['attributes'],_0x2d86f5),'u'==_0x562c57['type']&&_0x562c57['children'][0x0]){const _0x356967=_0x562c57['children'][0x0];if(_0x3bf7ac['render']=function(_0x6a21ce){const _0x2fcc0a=_0x6a21ce['createElement']('div');return _0x2fcc0a['innerHTML']=_0x356967,_0x2fcc0a['childNodes'][0x0];},_0x1cc731){const _0x36092c=new _0x71e8dc(_0x47c04f);_0x36092c['_appendChild'](_0x3bf7ac);const _0x400b67=Array['from'](_0x88e01b['viewChildrenToDom'](_0x36092c,{'bind':!0x1})),_0x5d78fd=_0x88e01b['domDocument']['createElement']('div');_0x5d78fd['append'](..._0x400b67),_0x3bf7ac=Array['from'](_0x88e01b['domChildrenToView'](_0x5d78fd))[0x0];}}else{if('r'==_0x562c57['type']&&_0x562c57['children'][0x0]){const _0xd436b6=_0x562c57['children'][0x0];if(_0x3bf7ac['render']=function(_0x48d1ee){_0x48d1ee['innerHTML']=_0xd436b6;},_0x1cc731){const _0x2b791f=new _0x71e8dc(_0x47c04f);_0x2b791f['_appendChild'](_0x3bf7ac);const _0x24b994=Array['from'](_0x88e01b['viewChildrenToDom'](_0x2b791f,{'bind':!0x1})),_0x110419=_0x88e01b['domDocument']['createElement']('div');_0x110419['append'](..._0x24b994);const _0xc57df5=Array['from'](_0x88e01b['domChildrenToView'](_0x110419));_0xc57df5['length']>0x1?_0x3bf7ac['_appendChild'](_0xc57df5):_0x3bf7ac=_0xc57df5[0x0];}}}if(_0x562c57['customProperties']){for(const [_0x59b066,_0x35b6df]of _0x562c57['customProperties'])_0x3bf7ac['_setCustomProperty'](_0x59b066,_0x35b6df);}const _0x380778=void 0x0===_0x562c57['fillerOffset']?null:_0x562c57['fillerOffset'];return null!==_0x380778&&(_0x3bf7ac['getFillerOffset']=()=>_0x380778),_0x3bf7ac;}}['_makeModelFromViewString'](_0x2b4c6a,_0x46fb63){const _0x2fc55b=JSON['parse'](_0x2b4c6a),_0x53d048=this['editor']['editing']['view']['document'],_0x37fdce=new _0x71e8dc(_0x53d048,_0x2fc55b['map'](_0x47ed86=>this['_getViewFromDiffObj'](_0x47ed86,!0x0))),_0x4d957f=this['editor']['data']['toModel'](_0x37fdce,_0x46fb63);return _0x4d957f['name']=_0x46fb63,_0x4d957f;}['_removeRevisionMarkers'](_0xfbe78b){return(_0xfbe78b=_0xfbe78b['filter'](_0x26265f=>!_0x26265f['name']||'revision-start'!==_0x26265f['name']&&'revision-end'!==_0x26265f['name']))['forEach'](_0x140519=>{'string'!=typeof _0x140519&&(_0x140519['children']=this['_removeRevisionMarkers'](_0x140519['children']),_0x140519['attributes']=_0x140519['attributes']['filter'](_0x295f2d=>!_0x295f2d[0x0]['startsWith']('data-revision-')));}),_0xfbe78b;}};function pt(_0x87fbc4,_0x2b34dc,_0x54d81c){const t=_0x87fbc4['t'];switch(_0x2b34dc){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'},_0x54d81c);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x54d81c);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 _0x2d350d{['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[_0x2eba5e,mt,wt,_0x896a6e];}constructor(_0x16e6f0){super(_0x16e6f0),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 _0x3a7a14=_0x590d2c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3a7a14},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 _0xf55b15=this['repository']['getRevision'](0x0),_0x262ab5=_0xf55b15&&null===_0xf55b15['creator']?_0xf55b15:null;if(this['_continueCurrentRevision']=!!_0x262ab5&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x2eb7ac=this['_source']['getCurrentRevisionId'](),_0x4eda10=this['repository']['getRevision'](_0x2eb7ac);if(_0x4eda10)this['_startingVersion']=_0x4eda10['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x2bb308=this['_source']['history']['_operations']['find'](_0x3d98e1=>!_0x3d98e1['_isInit']),_0x322be5=_0x2bb308?_0x2bb308['baseVersion']:this['_source']['history']['version'];_0xf55b15?(_0xf55b15['toVersion']<_0x322be5&&_0xf55b15['_update']({'toVersion':_0x322be5}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x262ab5['id'],this['_startingVersion']=_0x262ab5['fromVersion']):(this['_startingVersion']=_0xf55b15['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x322be5,this['_continueCurrentRevision']=!0x1);}}else _0x262ab5&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x262ab5['toVersion'],this['editor']['model']['document']['history']['version']),_0x262ab5['fromVersion']===_0x262ab5['toVersion']?(0x0!==_0x262ab5['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x262ab5['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x262ab5['id'],this['_startingVersion']=_0x262ab5['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',_0x13bf38=>!_0x13bf38),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x349360=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x50587c;for(const _0x1b40b8 in _0x349360){const _0x2ac938=_0x1b40b8,_0x516586=_0x349360[_0x2ac938];if('revisionHistoryLicenseKeyValid'==_0x516586||'revisionHistoryLicenseKeyInvalid'==_0x516586||'revisionHistoryLicenseKeyExpired'==_0x516586||'revisionHistoryLicenseKeyDomainLimit'==_0x516586||'revisionHistoryLicenseKeyNotAllowed'==_0x516586||'revisionHistoryLicenseKeyEvaluationLimit'==_0x516586||'revisionHistoryLicenseKeyUsageLimit'==_0x516586){delete _0x349360[_0x2ac938],_0x50587c=_0x516586,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x50587c&&_0x349360['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x50587c&&_0x349360['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x50587c&&_0x349360['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x50587c&&_0x349360['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x50587c&&_0x349360['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x50587c&&_0x349360['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x2aa332=this['repository']['getRevision'](0x0),_0x2d3c33=await this['getRevisionDocumentData'](_0x2aa332),_0x346717=await this['getRevisionRootsAttributes'](_0x2aa332),_0x4f657b=this['_utils']['getRevisionRootsModelElements'](_0x2aa332);this['_replaceEditorDataWithRevisionData'](_0x2d3c33,_0x346717,_0x4f657b);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3b1e4){this['_source']=_0x3b1e4;}async['update'](){const _0x11592c=await this['_source']['getLatestVersion']();if(_0x11592c>this['currentRevision']['toVersion']){await this['_loadState']();const _0xb87a4b=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x11592c});_0xb87a4b['authors']=_0xb87a4b['authorsIds']['map'](_0x68ba14=>this['editor']['plugins']['get']('Users')['getUser'](_0x68ba14)),this['currentRevision']['_update'](_0xb87a4b);}}async['saveRevision'](_0x1009ae={},_0x131f02=null){const _0x26d95a=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x131f02>this['currentRevision']['toVersion']&&(_0x131f02=null),null===_0x131f02&&(_0x131f02=await this['_source']['getLatestVersion']());const _0x48d52d=this['_getFromVersion'](_0x131f02),_0x36c06a=this['buildRevisionData']({'from':_0x48d52d,'to':_0x131f02});if(this['currentRevision']['toVersion']<_0x131f02){const _0x249144=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x131f02,'to':_0x131f02});_0x249144['authors']=[],_0x249144['authorsIds']=[],_0x249144['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x249144,!0x0),delete _0x249144['authors'],_0x26d95a['push'](_0x249144);}_0x1009ae['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1009ae['name']=_0x1009ae['name']||null,_0x1009ae['id']=_0x1009ae['id']||_0x590d2c(),_0x1009ae={..._0x1009ae,..._0x36c06a};const _0x1617ff=this['addRevisionData'](_0x1009ae);_0x26d95a['push'](_0x1009ae);const _0x3f2138=this['repository']['getIndex'](_0x1617ff);if(0x0!==_0x3f2138){const _0x23cbee=this['repository']['getRevision'](_0x3f2138-0x1);if(_0x23cbee['fromVersion']!==_0x131f02){const _0x3d8a9c=this['_revisionDataBuilder']['getData'](_0x131f02,_0x23cbee['toVersion']),_0x1c6771={'id':_0x23cbee['id'],'diffData':_0x3d8a9c['diffData'],'authorsIds':_0x3d8a9c['authorsIds'],'authors':_0x3d8a9c['authorsIds']['map'](_0x1ae488=>this['editor']['plugins']['get']('Users')['getUser'](_0x1ae488)),'fromVersion':_0x131f02};_0x23cbee===this['currentRevision']&&(_0x1c6771['createdAt']=new Date(_0x1009ae['createdAt']['getTime']()+0xa)),_0x23cbee['_update'](_0x1c6771,!0x0),delete _0x1c6771['authors'],_0x26d95a['push'](_0x1c6771);}}if(this['adapter']){for(const _0xf76154 of _0x26d95a)this['_bufferUpdate'](_0xf76154['id'],_0xf76154,!0x0);this['sendBufferedUpdates']();}return _0x1617ff;}['addRevisionData'](_0xb37ed1){const _0x7a10a6=this['repository']['createRevision'](_0xb37ed1);return this['adapter']&&_0x7a10a6['on']('_update',(_0x279cd6,_0x3b8d59,_0x330bc2)=>{_0x330bc2||(this['_bufferUpdate'](_0x3b8d59['id'],_0x3b8d59,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x7a10a6,this['_findInsertionIndex'](_0x7a10a6)),_0x7a10a6;}async['getRevisionDocumentData'](_0x347334){return await this['_utils']['loadRevisionData'](_0x347334,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x347334);}async['getRevisionRootsAttributes'](_0x515844){return await this['_utils']['loadRevisionData'](_0x515844,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x515844);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1547a6=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x594717=0x0;_0x594717<_0x1547a6['length'];_0x594717++){const _0x548ef0=_0x1547a6[_0x594717];let _0x2df3c6=!0x1;for(const _0x59876d of Object['keys'](_0x548ef0))void 0x0===_0x548ef0[_0x59876d]?delete _0x548ef0[_0x59876d]:'id'!==_0x59876d&&(_0x2df3c6=!0x0);_0x2df3c6||(_0x1547a6[_0x594717]=null);}if(_0x1547a6=_0x1547a6['filter'](_0x443d67=>null!==_0x443d67),!_0x1547a6['length'])return;for(let _0x3fc926=0x0;_0x3fc926<_0x1547a6['length'];_0x3fc926++){const _0x3b63cc=_0x1547a6[_0x3fc926];void 0x0!==_0x3b63cc['fromVersion']&&void 0x0===_0x3b63cc['toVersion']&&(_0x3b63cc['toVersion']=this['repository']['getRevision'](_0x3b63cc['id'])['toVersion']),void 0x0!==_0x3b63cc['toVersion']&&void 0x0===_0x3b63cc['fromVersion']&&(_0x3b63cc['fromVersion']=this['repository']['getRevision'](_0x3b63cc['id'])['fromVersion']);}const _0x48a579=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1547a6,_0x48a579)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1906bc=>{if(_0x1906bc){for(const _0x1fb49e of _0x1906bc)this['setRevisionData']({'id':_0x1fb49e['id'],'createdAt':_0x1fb49e['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x5d64da=null,from:_0x2b92c7=null,to:_0x424acf=null}){_0x2b92c7=null!==_0x2b92c7?_0x2b92c7:_0x5d64da['fromVersion'],_0x424acf=null!==_0x424acf?_0x424acf:_0x5d64da['toVersion'];const _0x1a0b75=this['_revisionDataBuilder']['getData'](_0x2b92c7,_0x424acf),_0x3b6b66={'diffData':_0x1a0b75['diffData'],'authorsIds':_0x1a0b75['authorsIds'],'fromVersion':_0x2b92c7,'toVersion':_0x424acf};if(!_0x5d64da||_0x424acf!==_0x5d64da['toVersion']){const _0x27f052=_0x424acf-0x1,_0x3b42be=this['_source']['history']['getOperation'](_0x27f052);_0x3b6b66['createdAt']=_0x3b42be&&_0x3b42be['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2b92c7===this['_loadedStateData']['fromVersion']){for(const _0x368381 of this['_loadedStateData']['authors'])_0x3b6b66['authorsIds']['includes'](_0x368381['id'])||_0x3b6b66['authorsIds']['push'](_0x368381['id']);}return _0x3b6b66;}['_bufferUpdate'](_0x19ffae,_0x1ec216,_0x4cf7ab){if(this['_bufferedUpdates']['has'](_0x19ffae)){const _0xebcb31=this['_bufferedUpdates']['get'](_0x19ffae);_0x1ec216=_0x4cf7ab?{..._0xebcb31,..._0x1ec216}:{..._0x1ec216,..._0xebcb31};}this['_bufferedUpdates']['set'](_0x19ffae,_0x1ec216);}['setRevisionData'](_0x1aa182){const _0x16998f=this['repository']['getRevision'](_0x1aa182['id']);if(_0x1aa182['createdAt']&&(_0x1aa182['createdAt']=new Date(_0x1aa182['createdAt'])),_0x1aa182['authorsIds']){const _0x5ca795=this['editor']['plugins']['get']('Users');_0x1aa182['authors']=_0x1aa182['authorsIds']['map'](_0x31c523=>_0x5ca795['getUser'](_0x31c523));}_0x16998f['_update'](_0x1aa182,!0x0);}['_createInitialRevision'](_0x4a4419){const _0xc43172=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0xc43172)this['_initialRevisionId']=_0xc43172['id'];else{const _0x3620cc=!this['editor']['model']['document']['roots']['find'](_0x3de72b=>this['editor']['model']['hasContent'](_0x3de72b)),_0x3219ef=this['editor']['plugins']['get']('Users')['me']['id'],_0x139250=pt(this['editor']['locale'],_0x3620cc?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4a4419,'to':_0x4a4419,'id':this['_initialRevisionId'],'name':_0x139250,'creatorId':_0x3219ef});}}['_createCurrentRevision'](_0x2cd94f){const _0x10031d=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x10031d),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2cd94f,'to':_0x2cd94f,'id':_0x10031d,'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'](_0x57f275,_0x4b2ee1,_0x131fcc){const _0x54cee6={},_0x26501a={},_0x30a27b={},_0x281fd6=this['editor']['config']['get']('roots')||{};for(const [_0x1017f8,_0x388942]of Object['entries'](_0x281fd6))_0x388942['lazyLoad']||(_0x54cee6[_0x1017f8]=_0x388942['initialData']??'',_0x26501a[_0x1017f8]=_0x388942['modelAttributes']||{},_0x388942['modelElement']&&(_0x30a27b[_0x1017f8]=_0x388942['modelElement']));for(const _0x2203c2 of this['editor']['model']['document']['getRootNames']())_0x54cee6[_0x2203c2]??='',_0x26501a[_0x2203c2]??={};let _0x4951ae=!0x1;const _0x57fe92=Object['keys'](_0x54cee6),_0x240e41=Object['keys'](_0x57f275);for(const _0x36b68a of _0x57fe92){if(_0x54cee6[_0x36b68a]!==_0x57f275[_0x36b68a]&&''!==_0x54cee6[_0x36b68a]['trim']()){_0x4951ae=!0x0;break;}if(!_0x54227e(_0x26501a[_0x36b68a],_0x4b2ee1[_0x36b68a])&&Object['keys'](_0x26501a[_0x36b68a])['length']>0x0){_0x4951ae=!0x0;break;}const _0x5bc648=_0x30a27b[_0x36b68a],_0x24b2ec=_0x131fcc[_0x36b68a];if(_0x5bc648&&_0x24b2ec&&_0x5bc648!==_0x24b2ec){_0x4951ae=!0x0;break;}}_0x4951ae||(_0x4951ae=_0x240e41['some'](_0x3e2652=>!this['editor']['model']['document']['getRoot'](_0x3e2652))),_0x4951ae&&_0x16390e('editor-initial-data-replaced-with-revision-data',{'editorData':_0x54cee6,'editorRootsAttributes':_0x26501a,'editorRootsModelElements':_0x30a27b,'revisionData':_0x57f275,'revisionRootsAttributes':_0x4b2ee1,'revisionRootsModelElements':_0x131fcc});for(const [_0x4c92be,_0x10984d]of Object['entries'](_0x57f275))this['editor']['config']['set']('roots.'+_0x4c92be+'.initialData',_0x10984d);for(const [_0x40d67a,_0x5ae754]of Object['entries'](_0x4b2ee1))this['editor']['config']['set']('roots.'+_0x40d67a+'.modelAttributes',_0x5ae754);const _0x1d0e83=this['editor']['model']['document'];for(const [_0x4f94df,_0x574caf]of Object['entries'](_0x131fcc)){this['editor']['config']['set']('roots.'+_0x4f94df+'.modelElement',_0x574caf);const _0x1fe21c=_0x1d0e83['getRoot'](_0x4f94df);_0x1fe21c&&_0x1fe21c['name']!==_0x574caf&&(_0x1d0e83['roots']['remove'](_0x4f94df),_0x1d0e83['createRoot'](_0x574caf,_0x4f94df));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x46ad1b=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x46ad1b['add'](pt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2d23c8){const _0x32b677=this['repository']['getRevisions']();_0x32b677['reverse']();let _0x23909c=0x0;for(;_0x23909c<_0x32b677['length'];){const _0x40f743=_0x32b677[_0x23909c];if(_0x40f743===this['currentRevision']){_0x23909c++;continue;}if(_0x40f743['id']===this['_initialRevisionId'])break;const _0x40155a=_0x2d23c8['toVersion']-_0x40f743['toVersion']||_0x2d23c8['fromVersion']-_0x40f743['fromVersion'];if(_0x40155a>0x0)break;if(_0x40155a<0x0)_0x23909c++;else{if(!_0x2d23c8['creator']&&_0x40f743['creator'])break;if(_0x40f743['creator']||!_0x2d23c8['creator']){if(_0x2d23c8['createdAt']>_0x40f743['createdAt'])break;_0x23909c++;}else _0x23909c++;}}return _0x23909c;}['_getFromVersion'](_0x21ebc1){const _0x7c90dd=this['repository']['getRevisions']();_0x7c90dd['reverse'](),_0x7c90dd['shift']();const _0x5cf6fd=_0x7c90dd['find'](_0xbb0f4f=>_0xbb0f4f['toVersion']<=_0x21ebc1)['toVersion'];return _0x5cf6fd<this['_startingVersion']?this['_startingVersion']:_0x5cf6fd;}['_makeRevision']({name:_0x31ebae,from:_0x15588b,to:_0x2c2010,creatorId:_0x31096f,id:_0x33f134}){const _0x499a27=this['buildRevisionData']({'from':_0x15588b,'to':_0x2c2010});_0x499a27['name']=_0x31ebae,_0x499a27['creatorId']=_0x31096f,_0x499a27['id']=_0x33f134;const _0x37a060=this['addRevisionData'](_0x499a27);return this['adapter']&&this['_bufferUpdate'](_0x499a27['id'],_0x499a27,!0x0),_0x37a060;}['_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(_0xf6eeda){this['editor']=_0xf6eeda,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'](_0x42b968){this['source']=_0x42b968;const _0x9b4a71=new Map(),_0x1ec4e0=new Map(),_0x102092=this['editor']['model']['document']['roots']['map'](_0x1224f6=>_0x1224f6['rootName']);for(const _0x257e36 of _0x102092){const _0x24ed00=this['editor']['model']['document']['getRoot'](_0x257e36),_0x5c9260=bt(_0x24ed00);_0x9b4a71['set'](_0x257e36,_0x5c9260),_0x1ec4e0['set'](_0x257e36,Object['fromEntries'](_0x24ed00['getAttributes']()));}const _0x1e6b3e=Array['from'](this['editor']['model']['markers'])['map'](_0x234a7b=>[_0x234a7b['name'],_0x234a7b['getRange']()]),_0x4a050a=this['source']['version'];this['_saveMetaData'](_0x4a050a,_0x9b4a71,_0x1e6b3e,_0x1ec4e0),this['_startingRevisionId']=this['_revisionId'];const _0x2f8891=new Map(),_0x531d17=new Map();for(const _0x15cb64 of _0x102092){const _0x4de04f=Rt(_0x15cb64,this['editor']['model']['document']['getRoot'](_0x15cb64)['name']);_0x2f8891['set'](_0x15cb64,_0x4de04f),_0x531d17['set'](_0x15cb64,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2f8891,[],_0x531d17);}['getData'](_0x29f543,_0x49e2b8){if(this['_lastFrom']===_0x29f543&&this['_lastTo']<=_0x49e2b8)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x49e2b8,!0x0);else{if(!this['_savedMetaData']['has'](_0x29f543)){const _0xd47516=this['_getPreviousFrom'](_0x29f543);this['_calculateMetaData'](_0xd47516,_0x29f543,!0x1);}this['_calculateMetaData'](_0x29f543,_0x49e2b8,!0x0);}return this['_lastFrom']=_0x29f543,this['_lastTo']=_0x49e2b8,this['_getState']();}['loadState'](_0xb1947b){if(!this['_savedMetaData']['has'](_0xb1947b['fromVersion'])){const _0x5f5319=this['_getPreviousFrom'](_0xb1947b['fromVersion']);this['_calculateMetaData'](_0x5f5319,_0xb1947b['fromVersion'],!0x1);}this['_calculateMetaData'](_0xb1947b['fromVersion'],_0xb1947b['toVersion'],!0x1);const _0x26b75f=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0xb1947b['fromVersion'],this['_lastTo']=_0xb1947b['toVersion'];for(const _0x48e431 in _0xb1947b['diffData']){const _0x3ae3c5=_0xb1947b['diffData'][_0x48e431]['attachChange'],_0x1a2549=_0x256f14(_0xb1947b['diffData'][_0x48e431]['attributesBefore'])||{},_0x5e9cbc=_0xb1947b['diffData'][_0x48e431],_0x5218d1=_0x26b75f['_makeModelFromViewString'](_0x5e9cbc['deletions'],_0x5e9cbc['rootElementName']||'$root');_0x5218d1['rootName']=_0x48e431,_0x5218d1['_isAttached']=!_0x3ae3c5||!_0x3ae3c5['isAttached'],_0x5218d1['isAttached']=()=>_0x5218d1['_isAttached'],this['_baseRoots']['set'](_0x48e431,_0x5218d1),this['_baseRootsAttributes']['set'](_0x48e431,_0x1a2549),_0x3ae3c5&&this['_touchedRoots']['set'](_0x48e431,_0x3ae3c5);const _0x5326bd=this['_makeIdsRoot'](_0x5218d1);this['_baseIdsRoots']['set'](_0x48e431,_0x5326bd);for(const [_0x580a1e,_0x5ae463]of _0x5218d1['markers']){if(!_0x580a1e['startsWith']('revision:'))continue;const _0xbdbd8b=_0x580a1e['split'](':')[0x2];for(const _0x55fd20 of _0x5ae463['getWalker']({'singleCharacters':!0x0})){const _0x46b97c=this['_getVidAttributeName'](_0x55fd20),_0x527e3f='elementEnd'==_0x55fd20['type']?_0x55fd20['previousPosition']['path']['slice'](0x0,-0x1):_0x55fd20['previousPosition']['path'],_0xf084ba=_0x5326bd['getNodeByPath'](_0x527e3f)['getAttribute'](_0x46b97c);this['_touched']['set'](_0xf084ba,{'userId':_0xbdbd8b});}_0x5218d1['markers']['delete'](_0x580a1e);}}this['_startingRevisionId']=this['_revisionId'];const _0x461d7b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4f527a=>!this['_touched']['has'](_0x4f527a));let _0x2f0212=0x0;const _0x29557f=new Map();for(const _0x3068cc in _0xb1947b['diffData']){const _0x19eced=_0xb1947b['diffData'][_0x3068cc]['attachChange'],_0x25e5ba=_0x256f14(_0xb1947b['diffData'][_0x3068cc]['attributesAfter'])||{},_0x539f6e=_0xb1947b['diffData'][_0x3068cc],_0x233c44=_0x26b75f['_makeModelFromViewString'](_0x539f6e['insertions'],_0x539f6e['rootElementName']||'$root');_0x233c44['rootName']=_0x3068cc,_0x233c44['_isAttached']=!_0x19eced||_0x19eced['isAttached'],_0x233c44['isAttached']=()=>_0x233c44['_isAttached'],this['_diffRoots']['set'](_0x3068cc,_0x233c44),this['_diffRootsAttributes']['set'](_0x3068cc,_0x25e5ba);const _0x19f9bf=this['_makeIdsRoot'](_0x233c44,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x3068cc,_0x19f9bf),_0x29557f['set'](_0x3068cc,_0x233c44['isAttached']()?_0x25e5ba:{});for(const [_0x18d62b,_0x39ea40]of _0x233c44['markers']){if(!_0x18d62b['startsWith']('revision:'))continue;const _0x1df0be=_0x18d62b['split'](':')[0x2];for(const _0x36e3b1 of _0x39ea40['getWalker']({'singleCharacters':!0x0})){const _0x321644=this['_getVidAttributeName'](_0x36e3b1),_0x2345f2=this['_revisionId']++,_0x1c6698='elementEnd'==_0x36e3b1['type']?_0x36e3b1['previousPosition']['path']['slice'](0x0,-0x1):_0x36e3b1['previousPosition']['path'];_0x19f9bf['getNodeByPath'](_0x1c6698)['_setAttribute'](_0x321644,_0x2345f2),this['_touched']['set'](_0x2345f2,{'userId':_0x1df0be});}_0x233c44['markers']['delete'](_0x18d62b);}for(const _0x287768 of this['editor']['model']['createRangeIn'](_0x233c44)['getWalker']({'singleCharacters':!0x0})){const _0x7177b9=this['_getVidAttributeName'](_0x287768),_0x201847='elementEnd'==_0x287768['type']?_0x287768['previousPosition']['path']['slice'](0x0,-0x1):_0x287768['previousPosition']['path'],_0x5245c5=_0x19f9bf['getNodeByPath'](_0x201847);_0x5245c5['getAttribute'](_0x7177b9)>0x0||_0x5245c5['_setAttribute'](_0x7177b9,_0x461d7b[_0x2f0212++]);}for(const [_0x1a88ba,_0x22cd22]of _0x233c44['markers'])_0x1a88ba['startsWith']('revision:')||this['_markers']['set'](_0x1a88ba,_0x22cd22);}const {roots:_0x2dac90}=this['_savedMetaData']['get'](_0xb1947b['fromVersion']),{roots:_0x1bdee4}=this['_savedMetaData']['get'](_0xb1947b['toVersion']),_0x4845bc=bt(_0x2dac90['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4845bc),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4845bc,Number['NEGATIVE_INFINITY']));const _0x1a7d4d=bt(_0x1bdee4['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x1a7d4d),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1a7d4d));const _0x1004cf=Array['from'](this['_diffRoots'])['map'](([_0x59452a,_0x2a2504])=>[_0x59452a,bt(_0x2a2504)]);this['_saveMetaData'](this['_lastTo'],_0x1004cf,this['_markers'],_0x29557f);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1c5f4e,_0x12d913,_0x5cf3d4,_0x53f954){const _0x57a431=new Map(_0x12d913),_0x1b37ba=new Map(_0x256f14(_0x53f954)),_0x3952f5=new Map();for(const [_0x525ff1,_0x400848]of _0x5cf3d4)_0x3952f5['set'](_0x525ff1,{'start':_0x400848['start']['clone'](),'end':_0x400848['end']['clone'](),'rootName':_0x400848['root']['rootName']});this['_savedMetaData']['set'](_0x1c5f4e,{'roots':_0x57a431,'markers':_0x3952f5,'rootsAttributes':_0x1b37ba});}['_removeMetaData'](_0x35a93f){this['_savedMetaData']['delete'](_0x35a93f);}['_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'](_0x4109af,_0x2270ef=null){let _0x286b28=null;_0x4109af['is']('documentFragment')||(_0x286b28=new _0x1dc29d(_0x4109af['name'],{'vid_start':null===_0x2270ef?this['_revisionId']++:_0x2270ef++}));const _0x5437e8=[];for(const _0x544e8b of _0x4109af['getChildren']())if(_0x544e8b['is']('element')){_0x5437e8['push'](this['_makeIdsRoot'](_0x544e8b,_0x2270ef));const _0xeefcc1=_0x5437e8[_0x5437e8['length']-0x1];null!==_0x2270ef&&(_0x2270ef=_0xeefcc1['is']('element','$text')?_0xeefcc1['getAttribute']('vid')+0x1:_0xeefcc1['getAttribute']('vid_end')+0x1);}else{for(let _0x480262=0x0;_0x480262<_0x544e8b['offsetSize'];_0x480262++)_0x5437e8['push'](new _0x1dc29d('$text',{'vid':null===_0x2270ef?this['_revisionId']++:_0x2270ef++}));}if(_0x4109af['is']('documentFragment')){const _0x56aebf=Rt(_0x4109af['rootName'],_0x4109af['name']);return _0x56aebf['_insertChild'](0x0,_0x5437e8),_0x56aebf;}return _0x286b28['_setAttribute']('vid_end',null===_0x2270ef?this['_revisionId']++:_0x2270ef++),_0x286b28['_insertChild'](0x0,_0x5437e8),_0x286b28;}['_calculateMetaData'](_0x57ee1e,_0xfe7998,_0x2ecf60){this['_reset']();const {roots:_0x2d0861,markers:_0x2709ab,rootsAttributes:_0x399661}=this['_savedMetaData']['get'](_0x57ee1e);this['_baseRoots']=new Map(_0x2d0861),this['_baseRootsAttributes']=new Map(_0x256f14(_0x399661));for(const [_0x2aad4b,_0x58ca92]of this['_baseRoots'])if('$graveyard'!==_0x2aad4b&&(this['_diffRoots']['set'](_0x2aad4b,bt(_0x58ca92)),this['_diffRootsAttributes']=new Map(_0x256f14(_0x399661)),_0x2ecf60)){const _0x196424=this['_revisionId'];this['_idsRoots']['set'](_0x2aad4b,this['_makeIdsRoot'](_0x58ca92)),this['_baseIdsRoots']['set'](_0x2aad4b,this['_makeIdsRoot'](_0x58ca92,_0x196424));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',bt(this['_baseRoots']['get']('$graveyard'))),_0x2ecf60&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5130d7,_0x17536c]of _0x2709ab){const _0x386061=this['_baseRoots']['get'](_0x17536c['rootName']),_0x32ed01=this['_diffRoots']['get'](_0x17536c['rootName']),_0x361e40=new _0x5e4bda(this['_fixPosition'](_0x17536c['start'],_0x386061),this['_fixPosition'](_0x17536c['end'],_0x386061)),_0x3ca7f8=this['_fixRange'](_0x361e40,_0x32ed01);_0x386061['markers']['set'](_0x5130d7,_0x361e40),this['_markers']['set'](_0x5130d7,_0x3ca7f8);}this['_applyOperations'](_0x57ee1e,_0xfe7998,_0x2ecf60);}['_applyOperations'](_0x1247da,_0xccdd4f,_0x442809){for(const _0xb50bd3 of this['source']['getOperations'](_0x1247da,_0xccdd4f))this['_handleOperation'](_0xb50bd3,_0x442809);for(const _0x42a028 of this['_diffRoots']['values']())_0x42a028['markers']['clear']();for(const [_0x57e31b,_0x221015]of this['_markers'])this['_diffRoots']['get'](_0x221015['root']['rootName'])['markers']['set'](_0x57e31b,_0x221015['clone']());const _0x2d90a4=new Map(),_0x2b8448=new Map();for(const [_0x1c153e,_0x29017e]of this['_diffRoots'])_0x2d90a4['set'](_0x1c153e,bt(_0x29017e)),_0x2b8448['set'](_0x1c153e,this['_diffRootsAttributes']['get'](_0x1c153e));this['_saveMetaData'](_0xccdd4f,_0x2d90a4,this['_markers'],_0x2b8448);}['_getPreviousFrom'](_0x4a4968){const _0x35df27=Array['from'](this['_savedMetaData']['keys']());_0x35df27['sort']((_0x51f6b1,_0x3c983c)=>_0x51f6b1-_0x3c983c),_0x35df27['reverse']();for(const _0x5644d8 of _0x35df27)if(_0x5644d8<_0x4a4968)return _0x5644d8;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x45f6e0,_0x46322e){const _0x213578=Array['from'](_0x46322e['markers'])['map'](([_0x42252b,_0x21a71a])=>[_0x42252b,this['_fixRange'](_0x21a71a,_0x45f6e0)]);_0x45f6e0['markers']=new Map(_0x213578);}['_transformMarkers'](_0x2e15be){for(const _0x460ed1 of this['_markers']['values']()){const _0x1e0d25=_0x460ed1['getTransformedByOperation'](_0x2e15be),_0x414cc7=_0x5e4bda['_createFromRanges'](_0x1e0d25);_0x460ed1['start']=_0x414cc7['start'],_0x460ed1['end']=_0x414cc7['end'];}}['_handleOperation'](_0x421dd4,_0x18596f){if('addRoot'!=_0x421dd4['type']&&'detachRoot'!=_0x421dd4['type']){if('insert'==_0x421dd4['type']){const _0x4d5f43=_0x421dd4['position']['root'],_0x559edf=_0x4d5f43['rootName'],_0x5f57d1=_0x4d5f43['name'];this['_diffRoots']['has'](_0x559edf)||(this['_diffRoots']['set'](_0x559edf,Rt(_0x559edf,_0x5f57d1,!0x0)),this['_diffRootsAttributes']['set'](_0x559edf,{}),_0x18596f&&this['_idsRoots']['set'](_0x559edf,Rt(_0x559edf,_0x5f57d1,!0x0)));}else{if('addRootAttribute'==_0x421dd4['type']||'removeRootAttribute'==_0x421dd4['type']||'changeRootAttribute'==_0x421dd4['type'])return void this['_handleRootAttributeOperation'](_0x421dd4);'marker'==_0x421dd4['type']&&this['_handleMarkerOperation'](_0x421dd4);}if('marker'!==_0x421dd4['type']){const _0x190349=this['_cloneOperation'](_0x421dd4,this['_diffRoots']);_0x190349['_execute'](),this['_transformMarkers'](_0x190349);}if(_0x18596f)switch(_0x421dd4['type']){case'insert':this['_handleInsertOperation'](_0x421dd4);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x421dd4);break;case'merge':this['_handleMergeOperation'](_0x421dd4);break;case'split':this['_handleSplitOperation'](_0x421dd4);}}else this['_handleRootOperation'](_0x421dd4,_0x18596f);}['_cloneOperation'](_0x2238f8,_0x1e3455){const _0x1124b4=_0x2238f8['clone']();return _0x1124b4['_authorId']=_0x2238f8['_authorId'],this['_fixOperation'](_0x1124b4,_0x1e3455),_0x1124b4;}['_getBaseVids'](_0x270578){return _0x270578['map'](_0x2b88b4=>{const _0x128e3c=this['_getVidAttributeName'](_0x2b88b4);return Number(_0x2b88b4['item']['getAttribute'](_0x128e3c));});}['_generateTape'](_0x31cc75,_0x5c217d){if(_0x31cc75['is']('element','$text'))_0x5c217d['push']({'item':_0x31cc75,'type':'text'});else{_0x31cc75['is']('element')&&_0x5c217d['push']({'item':_0x31cc75,'type':'elementStart'});for(const _0x4c2b69 of _0x31cc75['getChildren']())this['_generateTape'](_0x4c2b69,_0x5c217d);_0x31cc75['is']('element')&&_0x5c217d['push']({'item':_0x31cc75,'type':'elementEnd'});}return _0x5c217d;}['_getState'](){const _0x2b4f10=new Map(this['_touched']),_0x434f6d=new Map(_0x2b4f10),_0x2dfc7e=new Map(),_0x3b5b1d={'insertions':{},'deletions':{}},_0x16aadb={'insertions':{},'deletions':{}},_0x3d8f52=new Map(),_0x59b99d=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x68f623=new Map();_0x59b99d['delete']('$graveyard');for(const _0x2dea66 of _0x59b99d){const _0x3d37e2=(this['_diffRoots']['get'](_0x2dea66)??this['_baseRoots']['get'](_0x2dea66))['name'],_0xf942f0=this['_diffRoots']['get'](_0x2dea66)||Rt(_0x2dea66,_0x3d37e2,!0x1),_0x395d02=this['_baseRoots']['get'](_0x2dea66)||Rt(_0x2dea66,_0x3d37e2,!0x1);_0xf942f0['isAttached']()||_0x395d02['isAttached']()?(_0x68f623['set'](_0x2dea66,_0x3d37e2),_0x3b5b1d['insertions'][_0x2dea66]=bt(_0xf942f0),_0x3b5b1d['deletions'][_0x2dea66]=bt(_0x395d02),this['_copyMarkers'](_0x3b5b1d['deletions'][_0x2dea66],_0x395d02),this['_copyMarkers'](_0x3b5b1d['insertions'][_0x2dea66],_0xf942f0),_0x16aadb['insertions'][_0x2dea66]=this['_generateTape'](this['_idsRoots']['get'](_0x2dea66),[]),_0x16aadb['deletions'][_0x2dea66]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x2dea66)||Rt(_0x2dea66,_0x3d37e2,!0x1),[])):_0x59b99d['delete'](_0x2dea66);}for(const _0x464728 of _0x59b99d){const _0x2a8ed4=_0x16aadb['insertions'][_0x464728];for(const _0xb58fa8 of _0x2a8ed4){const _0x37dc87=this['_getVidAttributeName'](_0xb58fa8),_0x24ae39=_0xb58fa8['item']['getAttribute'](_0x37dc87);_0x434f6d['delete'](_0x24ae39),_0x24ae39>=this['_startingRevisionId']&&_0x2dfc7e['set'](_0x24ae39,_0x2b4f10['get'](_0x24ae39));}}for(const _0x5b0c2e of _0x59b99d){const _0x2a4364=_0x16aadb['insertions'][_0x5b0c2e],_0x36392b=this['_getBaseVids'](_0x16aadb['deletions'][_0x5b0c2e]);let _0x5d135a=0x0;for(const _0x516e64 of _0x2a4364){const _0x30cd1d=this['_getVidAttributeName'](_0x516e64),_0x2ba8bc=_0x516e64['item']['getAttribute'](_0x30cd1d);if(!_0x2dfc7e['has'](_0x2ba8bc)&&!_0x3d8f52['has'](_0x2ba8bc)){if(_0x434f6d['has'](_0x2ba8bc))_0x5d135a++;else{if(_0x2ba8bc!=_0x36392b[_0x5d135a]){const _0x2a2f81=_0x2b4f10['get'](_0x2ba8bc)||_0x2b4f10['get'](_0x36392b[_0x5d135a]);for(;_0x2ba8bc!=_0x36392b[_0x5d135a];)_0x434f6d['has'](_0x36392b[_0x5d135a])||(_0x3d8f52['set'](_0x36392b[_0x5d135a],_0x2a2f81),_0x2b4f10['set'](_0x36392b[_0x5d135a],_0x2a2f81)),_0x5d135a++;}_0x5d135a++;}}}}for(const _0x10c5eb of _0x59b99d){const _0x326e16=_0x16aadb['insertions'][_0x10c5eb];for(const _0x48a469 of _0x326e16){const _0x1bcb4d=this['_getVidAttributeName'](_0x48a469),_0x5b6b0f=_0x48a469['item']['getAttribute'](_0x1bcb4d);if(_0x3d8f52['has'](_0x5b6b0f)){const _0x4fbb03=_0x3d8f52['get'](_0x5b6b0f);_0x434f6d['has'](_0x5b6b0f)||_0x434f6d['set'](_0x5b6b0f,{..._0x4fbb03}),_0x2dfc7e['set'](_0x5b6b0f,{..._0x4fbb03});}}}for(const _0x284d17 of _0x434f6d['keys']())_0x284d17>=this['_startingRevisionId']&&_0x434f6d['delete'](_0x284d17);const _0x28e04f=new Map();for(const _0x44780e of _0x59b99d){let _0x2bd55a=_0x16aadb['insertions'][_0x44780e];for(const _0x510ff9 of _0x2bd55a)if(_0x510ff9['item']['is']('element','tableCell')){const _0x557d8b=this['_getVidAttributeName'](_0x510ff9),_0x383bd4=_0x510ff9['item']['getAttribute'](_0x557d8b);if(_0x2dfc7e['has'](_0x383bd4)){const _0x8c7539=_0x510ff9['item']['parent']['parent']['getAttribute']('vid_start'),_0x566ba3=_0x28e04f['get'](_0x8c7539)||new Set();_0x566ba3['add'](_0x2dfc7e['get'](_0x383bd4)['userId']),_0x28e04f['set'](_0x8c7539,_0x566ba3);}}_0x2bd55a=_0x16aadb['deletions'][_0x44780e];for(const _0x562d7c of _0x2bd55a)if(_0x562d7c['item']['is']('element','tableCell')){const _0x4187fa=this['_getVidAttributeName'](_0x562d7c),_0x4d5c44=_0x562d7c['item']['getAttribute'](_0x4187fa);if(_0x434f6d['has'](_0x4d5c44)){const _0x424e8e=_0x562d7c['item']['parent']['parent']['getAttribute']('vid_start'),_0x403464=_0x28e04f['get'](_0x424e8e)||new Set();_0x403464['add'](_0x434f6d['get'](_0x4d5c44)['userId']),_0x28e04f['set'](_0x424e8e,_0x403464);}}for(const _0x58f501 of _0x28e04f['keys']())(_0x2dfc7e['has'](_0x58f501)||_0x434f6d['has'](_0x58f501))&&_0x28e04f['delete'](_0x58f501);}for(const _0x3b43c7 of _0x59b99d){const _0x40a6fa=_0x16aadb['insertions'][_0x3b43c7];let _0x553514=null,_0x5077ff=null;for(const _0x470fb1 of _0x40a6fa){const _0x285805=this['_getVidAttributeName'](_0x470fb1),_0x3e4e81=_0x470fb1['item']['getAttribute'](_0x285805),_0x45d782=_0x28e04f['get'](_0x3e4e81);_0x45d782&&'elementStart'==_0x470fb1['type']&&(_0x553514=Array['from'](_0x45d782)[0x0],_0x5077ff=_0x470fb1['item']['getAttribute']('vid_end')),_0x553514&&(_0x434f6d['set'](_0x3e4e81,{'userId':_0x553514}),_0x2dfc7e['set'](_0x3e4e81,{'userId':_0x553514})),_0x3e4e81==_0x5077ff&&(_0x553514=null,_0x5077ff=null);}}const _0x5f4822={},_0x3114e7=new Set();for(const _0x568420 of _0x59b99d){const _0x406cf1=_0x3b5b1d['deletions'][_0x568420],_0x59d903=_0x3b5b1d['insertions'][_0x568420];for(const {userId:_0x1a7467}of this['_touchedMarkers']['values']())null!==_0x1a7467&&_0x3114e7['add'](_0x1a7467);for(const {userId:_0x196bed}of this['_touchedRoots']['values']())null!==_0x196bed&&_0x3114e7['add'](_0x196bed);this['_markChanges'](_0x59d903,_0x16aadb['insertions'][_0x568420],_0x2dfc7e,'insertion',_0x3114e7),this['_markChanges'](_0x406cf1,_0x16aadb['deletions'][_0x568420],_0x434f6d,'deletion',_0x3114e7),_0x5f4822[_0x568420]={'insertions':this['_prepareViewToSave'](_0x59d903),'deletions':this['_prepareViewToSave'](_0x406cf1),'attachChange':this['_touchedRoots']['get'](_0x568420)||null,'attributesBefore':_0x256f14(this['_baseRootsAttributes']['get'](_0x568420))||{},'attributesAfter':_0x256f14(this['_diffRootsAttributes']['get'](_0x568420)),'rootElementName':_0x68f623['get'](_0x568420)};}return{'diffData':_0x5f4822,'authorsIds':Array['from'](_0x3114e7)};}['_processRootBeforeSave'](_0x401cbc){for(const [,_0x3d5bb0]of _0x401cbc['markers']){const _0xdd1f12=_0x3d5bb0['start']['getAncestors']()['filter'](_0x1edc11=>'tableCell'==_0x1edc11['name']);for(const _0x36dd61 of _0xdd1f12)0x1==_0x36dd61['childCount']&&_0x36dd61['getChild'](0x0)['is']('element','paragraph')&&_0x36dd61['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x55a246){this['_processRootBeforeSave'](_0x55a246);const _0x3128de=this['editor']['data']['toView'](_0x55a246,{}),_0x6be665=Array['from'](_0x3128de['getChildren']())['map'](_0x5490c2=>this['_getViewJson'](_0x5490c2));return JSON['stringify'](_0x6be665);}['_getViewJson'](_0x5add81){if(_0x5add81['is']('$text'))return _0x5add81['data'];{const _0x4d0ade=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x2fbc84=_0x5add81,_0x16444e=this['editor']['data']['htmlProcessor']['domConverter'],_0x5a2659={'type':_0x4d0ade['_getTypeCharForViewElement'](_0x2fbc84),'name':_0x2fbc84['name'],'attributes':Array['from'](_0x2fbc84['getAttributes']()),'children':Array['from'](_0x2fbc84['getChildren']())['map'](_0x2ea3a6=>this['_getViewJson'](_0x2ea3a6))};if(_0x5add81['is']('uiElement')&&'$comment'!=_0x5add81['name']){const _0x1f77e4=_0x5add81['render'](_0x16444e['domDocument'],_0x16444e);_0x5a2659['children']['push'](_0x1f77e4['outerHTML']);}else{if(_0x5add81['is']('rawElement')){const _0xdabb53=_0x16444e['domDocument']['createElement'](_0x2fbc84['name']);_0x5add81['render'](_0xdabb53,_0x16444e),_0x5a2659['children']['push'](_0xdabb53['innerHTML']);}}const _0x463ed0=Array['from'](_0x2fbc84['getCustomProperties']());_0x463ed0['length']>0x0&&(_0x5a2659['customProperties']=_0x463ed0);const _0x4b5742=_0x2fbc84['getFillerOffset']();return null!==_0x4b5742&&(_0x5a2659['fillerOffset']=_0x4b5742),_0x5a2659;}}['_markChanges'](_0x268f83,_0xe8fd6f,_0x46cfd7,_0x5acd05,_0x515b3f){let _0x493f6e=null,_0xe5b691=null,_0x2478b8=0x0;const _0x203970=this['editor']['model'];for(let _0x53c00b=0x0;_0x53c00b<_0xe8fd6f['length'];_0x53c00b++){const _0x3775a5=this['_getVidAttributeName'](_0xe8fd6f[_0x53c00b]),_0x55f55e=_0xe8fd6f[_0x53c00b]['item']['getAttribute'](_0x3775a5),_0x87f3f6=_0x46cfd7['get'](_0x55f55e),_0x478c4d=_0x53c00b==_0xe8fd6f['length']-0x1;!_0x493f6e&&_0x87f3f6&&(_0x493f6e=_0x87f3f6,_0xe5b691=_0xe8fd6f[_0x53c00b]),!_0x493f6e||_0x87f3f6&&_0x87f3f6['userId']==_0x493f6e['userId']||(_0xc3a972(_0x87f3f6,kt(_0xe5b691,_0x268f83,_0x203970),kt(_0xe8fd6f[_0x53c00b],_0x268f83,_0x203970)),_0x493f6e=_0x87f3f6||null,_0xe5b691=_0x87f3f6?_0xe8fd6f[_0x53c00b]:null),_0x493f6e&&_0x478c4d&&_0xc3a972(_0x87f3f6,kt(_0xe5b691,_0x268f83,_0x203970),At(_0xe8fd6f[_0x53c00b],_0x268f83,_0x203970));}function _0xc3a972(_0x4e610e,_0x49cd89,_0x4d2e67){const _0xcdcbf6=_0x493f6e['userId'],_0x4dd2dc='revision:'+_0x5acd05+':'+_0xcdcbf6+':'+_0x2478b8++,_0x5ebc70=_0x203970['createRange'](_0x49cd89,_0x4d2e67);_0x268f83['markers']['set'](_0x4dd2dc,_0x5ebc70),null!==_0xcdcbf6&&_0x515b3f['add'](_0xcdcbf6);}}['_getVidAttributeName'](_0x36d28c){switch(_0x36d28c['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x2a0492,_0x22eae3){_0x2a0492['baseVersion']=null;for(const _0x5eedd4 in _0x2a0492){const _0x2165be=_0x2a0492[_0x5eedd4];if(_0x2165be instanceof _0x1c748a){const _0x4e3202=_0x22eae3['get'](_0x2165be['root']['rootName']);_0x2a0492[_0x5eedd4]=this['_fixPosition'](_0x2165be,_0x4e3202);}if(_0x2165be instanceof _0x5e4bda){const _0x57fcb8=_0x22eae3['get'](_0x2165be['root']['rootName']);_0x2a0492[_0x5eedd4]=this['_fixRange'](_0x2165be,_0x57fcb8);}'root'===_0x5eedd4&&(_0x2a0492['root']=_0x22eae3['get'](_0x2a0492['root']['rootName']));}}['_fixRange'](_0x486864,_0x54bdaa){return this['editor']['model']['createRange'](this['_fixPosition'](_0x486864['start'],_0x54bdaa),this['_fixPosition'](_0x486864['end'],_0x54bdaa));}['_fixPosition'](_0x2fc292,_0x26a261){return this['editor']['model']['createPositionFromPath'](_0x26a261,_0x2fc292['path'],_0x2fc292['stickiness']);}['_handleInsertOperation'](_0xd351dd){const _0x5ab7a6=this['_idsRoots']['get'](_0xd351dd['position']['root']['rootName']),_0x25ab72=this['_fixPosition'](_0xd351dd['position'],_0x5ab7a6),_0x299971=null===_0xd351dd['_authorId']?null:_0xd351dd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x249b1e=_0x25ab72['parent'],_0x5bcc00=this['_revisionId'],_0x2a6be4=[];for(const _0x45be78 of _0xd351dd['nodes'])if(_0x45be78['is']('element'))_0x2a6be4['push'](this['_makeIdsRoot'](_0x45be78));else{for(let _0x42ff62=0x0;_0x42ff62<_0x45be78['offsetSize'];_0x42ff62++)_0x2a6be4['push'](new _0x1dc29d('$text',{'vid':this['_revisionId']++}));}const _0x13a85b=this['_revisionId'];for(let _0x363be1=_0x5bcc00;_0x363be1<_0x13a85b;_0x363be1++)this['_touched']['set'](_0x363be1,{'userId':_0x299971});_0x249b1e['_insertChild'](_0x25ab72['offset'],_0x2a6be4);}['_handleMoveOperation'](_0x49b2dc){(_0x49b2dc=this['_cloneOperation'](_0x49b2dc,this['_idsRoots']))['_execute']();const _0x272bb3=null===_0x49b2dc['_authorId']?null:_0x49b2dc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x20307d=_0x49b2dc['getMovedRangeStart'](),_0x5149b2=_0x20307d['parent'],_0x535f62=_0x20307d['offset'];!function _0xf94c00(_0x8dbdc4,_0x3024a4,_0x708f47,_0x2c50ed){for(let _0x387b7f=_0x708f47;_0x387b7f<_0x2c50ed;_0x387b7f++){const _0x3b9903=_0x3024a4['getChild'](_0x387b7f);_0x3b9903['is']('element','$text')?_0x8dbdc4['set'](_0x3b9903['getAttribute']('vid'),{'userId':_0x272bb3}):(_0x8dbdc4['set'](_0x3b9903['getAttribute']('vid_start'),{'userId':_0x272bb3}),_0xf94c00(_0x8dbdc4,_0x3b9903,0x0,_0x3b9903['childCount']),_0x8dbdc4['set'](_0x3b9903['getAttribute']('vid_end'),{'userId':_0x272bb3}));}}(this['_touched'],_0x5149b2,_0x535f62,_0x535f62+_0x49b2dc['howMany']);}['_handleMergeOperation'](_0x1b7af1){const _0x36d084=null===(_0x1b7af1=this['_cloneOperation'](_0x1b7af1,this['_idsRoots']))['_authorId']?null:_0x1b7af1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x84191f=_0x1b7af1['targetPosition']['parent'],_0x29c676=_0x1b7af1['sourcePosition']['parent'],_0x3292b8=_0x84191f['getAttribute']('vid_end'),_0x115922=_0x29c676['getAttribute']('vid_start');_0x84191f['_setAttribute']('vid_end',_0x29c676['getAttribute']('vid_end')),_0x29c676['_setAttribute']('vid_end',_0x3292b8),this['_touched']['set'](_0x115922,{'userId':_0x36d084}),this['_touched']['set'](_0x3292b8,{'userId':_0x36d084}),_0x1b7af1['_execute']();}['_handleSplitOperation'](_0x1bb61f){const _0x73036f=null===(_0x1bb61f=this['_cloneOperation'](_0x1bb61f,this['_idsRoots']))['_authorId']?null:_0x1bb61f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x540157=_0x1bb61f['graveyardPosition'],_0x50ba3d=_0x1bb61f['splitPosition']['parent'];_0x1bb61f['_execute']();const _0x323e0d=_0x50ba3d['getAttribute']('vid_end'),_0x501fa0=_0x1bb61f['insertionPosition']['nodeAfter'];if(_0x540157){const _0x4a807b=_0x501fa0['getAttribute']('vid_end'),_0x57492e=_0x50ba3d['getAttribute']('vid_end');_0x50ba3d['_setAttribute']('vid_end',_0x4a807b),_0x501fa0['_setAttribute']('vid_end',_0x57492e),this['_touched']['set'](_0x50ba3d['getAttribute']('vid_end'),{'userId':_0x73036f}),this['_touched']['set'](_0x501fa0['getAttribute']('vid_start'),{'userId':_0x73036f});}else{const _0x474e73=this['_revisionId']++,_0x19ba8c=this['_revisionId']++;_0x50ba3d['_setAttribute']('vid_end',_0x474e73),_0x501fa0['_setAttribute']('vid_start',_0x19ba8c),_0x501fa0['_setAttribute']('vid_end',_0x323e0d),this['_touched']['set'](_0x474e73,{'userId':_0x73036f}),this['_touched']['set'](_0x19ba8c,{'userId':_0x73036f});}}['_handleMarkerOperation'](_0x42309b){if(!_0x42309b['affectsData'])return;const _0x5c5a43=(_0x42309b=this['_cloneOperation'](_0x42309b,this['_diffRoots']))['oldRange']?_0x42309b['oldRange']['root']:null,_0x23a0d0=_0x42309b['newRange']?_0x42309b['newRange']['root']:null;_0x5c5a43&&this['_markers']['delete'](_0x42309b['name']),_0x23a0d0&&this['_markers']['set'](_0x42309b['name'],_0x42309b['newRange']['clone']());const _0x51982a=null===_0x42309b['_authorId']?null:_0x42309b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x19dad7=_0x42309b['name'];if(!this['_touchedMarkers']['has'](_0x19dad7))return void this['_touchedMarkers']['set'](_0x19dad7,{'range':_0x42309b['oldRange'],'userId':_0x51982a});const _0x5525c1=this['_touchedMarkers']['get'](_0x19dad7),_0x166710=_0x5525c1['range'],_0x193f3c=_0x42309b['newRange'];null==_0x166710&&null==_0x193f3c||_0x166710&&_0x193f3c&&_0x166710['isEqual'](_0x193f3c)?this['_touchedMarkers']['delete'](_0x42309b['name']):_0x5525c1['userId']=_0x51982a;}['_handleRootOperation'](_0x4cd051,_0x18e745){this['_diffRoots']['has'](_0x4cd051['rootName'])?this['_diffRoots']['get'](_0x4cd051['rootName'])['_isAttached']=_0x4cd051['isAdd']:(this['_diffRoots']['set'](_0x4cd051['rootName'],Rt(_0x4cd051['rootName'],_0x4cd051['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4cd051['rootName'],{}),_0x18e745&&this['_idsRoots']['set'](_0x4cd051['rootName'],Rt(_0x4cd051['rootName'],_0x4cd051['elementName'],!0x0)));const _0x5a7d8b=null===_0x4cd051['_authorId']?null:_0x4cd051['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2698cc=this['_touchedRoots']['get'](_0x4cd051['rootName']);_0x2698cc&&_0x2698cc['userId']===_0x5a7d8b?this['_touchedRoots']['delete'](_0x4cd051['rootName']):this['_touchedRoots']['set'](_0x4cd051['rootName'],{'userId':_0x5a7d8b,'isAttached':_0x4cd051['isAdd']});}['_handleRootAttributeOperation'](_0x332e6c){const _0xc71a5b=this['_diffRootsAttributes']['get'](_0x332e6c['root']['rootName']);null===_0x332e6c['newValue']?delete _0xc71a5b[_0x332e6c['key']]:_0xc71a5b[_0x332e6c['key']]=_0x332e6c['newValue'];}};function bt(_0x556571){const _0x29998a=Rt(_0x556571['rootName'],_0x556571['name'],_0x556571['isAttached']());for(const _0x3d0cbb of _0x556571['getChildren']()){const _0x17c3ec=_0x3d0cbb['_clone'](!0x0);_0x29998a['_appendChild'](_0x17c3ec);}return _0x29998a;}function Rt(_0x95eb58,_0x13f36b,_0x43620c=!0x0){const _0x3cd38e=new _0x189def();return _0x3cd38e['rootName']=_0x95eb58,_0x3cd38e['name']=_0x13f36b,_0x3cd38e['_isAttached']=_0x43620c,_0x3cd38e['isAttached']=()=>_0x3cd38e['_isAttached'],_0x3cd38e;}function kt(_0x59d6fa,_0x34150e,_0x950eba){const _0x45504b='elementEnd'==_0x59d6fa['type']?_0x950eba['createPositionAt'](_0x59d6fa['item'],'end'):_0x950eba['createPositionBefore'](_0x59d6fa['item']);return _0x950eba['createPositionFromPath'](_0x34150e,_0x45504b['path'],_0x45504b['stickiness']);}function At(_0x33b9f6,_0x21ea77,_0x32f5b1){const _0x5e2a03='elementStart'==_0x33b9f6['type']?_0x32f5b1['createPositionAt'](_0x33b9f6['item'],0x0):_0x32f5b1['createPositionAfter'](_0x33b9f6['item']);return _0x32f5b1['createPositionFromPath'](_0x21ea77,_0x5e2a03['path'],_0x5e2a03['stickiness']);}const It=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x379629(at);var Et=class extends It{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x2c8601,_0x3f8f1f){super(_0x2c8601),this['focusTracker']=new _0x4ea326(),this['keystrokes']=new _0xe17f54(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3f8f1f),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 _0x107954=_0x4e98ea=>_0x4e98ea['stopPropagation']();this['keystrokes']['set']('arrowright',_0x107954),this['keystrokes']['set']('arrowleft',_0x107954),this['keystrokes']['set']('arrowup',_0x107954),this['keystrokes']['set']('arrowdown',_0x107954);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x127b56){this['revisionNameInputView']['fieldView']['element']['value']=_0x127b56['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x2889c8){const _0x37ac83=new _0x2db147(this['locale'],lt),_0x30cc0a=_0x37ac83['fieldView'];_0x30cc0a['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2d4f5b=pt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x2889c8&&(_0x2d4f5b+='\x20('+pt(this['locale'],'optional')+')'),(_0x37ac83['label']=_0x2d4f5b,_0x30cc0a['on']('input',()=>{this['revisionNameInputValue']=_0x30cc0a['element']['value']['trim']();}),_0x37ac83);}},St=class extends _0x2d350d{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t];}['_saveRevisionFormView'];['init'](){const _0x53a28a=this['editor'],_0x5154ca=_0x53a28a['plugins']['get']('RevisionTracker');_0x53a28a['ui']['componentFactory']['add']('revisionHistory',_0x34b3cd=>{const _0x4e7a17=ct(_0x34b3cd),_0x57f5dc=_0x4e7a17['panelView']['children'],_0x8a0d84=new _0x9f82ac(_0x34b3cd),_0x91a77e=new _0x48d14e(_0x34b3cd),_0x5834f5=this['_createSaveRevisionButton'](_0x2c621a),_0x8b1e8d=new _0x48d14e(_0x34b3cd),_0x59baed=this['_createOpenRevisionButton'](_0x2c621a);return _0x4e7a17['bind']('isEnabled')['to'](_0x5154ca,'isReady',_0x5154ca,'isEnabled',_0x53a28a,'isReadOnly',(_0x283da3,_0x21b44a,_0x471ee1)=>_0x283da3&&_0x21b44a&&!_0x471ee1),_0x4e7a17['buttonView']['set']({'icon':_0x4f6ef9,'label':pt(_0x34b3cd,'Revision\x20history'),'tooltip':!0x0}),_0x5834f5['set']({'withText':!0x0,'role':'menuitem'}),_0x59baed['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x59baed,'execute',()=>{_0x4e7a17['isOpen']=!0x1,_0x53a28a['editing']['view']['focus']();},{'priority':'low'}),_0x91a77e['children']['add'](_0x5834f5),_0x8b1e8d['children']['add'](_0x59baed),_0x8a0d84['role']='menu',_0x8a0d84['items']['addMany']([_0x91a77e,_0x8b1e8d]),_0x57f5dc['add'](_0x8a0d84),_0x4e7a17;}),_0x53a28a['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2a8ccb=this['editor'],_0x26c8cb=_0x2a8ccb['locale'],_0x192eb0=_0x2a8ccb['plugins']['get']('RevisionTracker'),_0x135d02=new et(_0x26c8cb),_0x1eaaf4=new it(_0x26c8cb);_0x135d02['bind']('isEnabled')['to'](_0x192eb0,'isReady',_0x192eb0,'isEnabled',_0x2a8ccb,'isReadOnly',(_0x1b0f59,_0x118162,_0x23a1f3)=>_0x1b0f59&&_0x118162&&!_0x23a1f3),_0x135d02['buttonView']['set']({'icon':_0x4f6ef9,'label':pt(_0x26c8cb,'Revision\x20history')});const _0x460023=new tt(_0x26c8cb,_0x135d02),_0x3c0679=this['_createSaveRevisionButton'](_0x27d3f5);_0x3c0679['delegate']('execute')['to'](_0x135d02),_0x460023['children']['add'](_0x3c0679),_0x1eaaf4['items']['add'](_0x460023);const _0x26ff36=new tt(_0x26c8cb,_0x135d02),_0x3d46b3=this['_createOpenRevisionButton'](_0x27d3f5);return _0x3d46b3['delegate']('execute')['to'](_0x135d02),_0x26ff36['children']['add'](_0x3d46b3),_0x1eaaf4['items']['add'](_0x26ff36),_0x135d02['panelView']['children']['add'](_0x1eaaf4),_0x135d02;}['_createSaveRevisionButton'](_0x5c049b){const _0x1ccd25=this['editor'],_0x5364c=_0x1ccd25['plugins']['get']('RevisionTracker'),_0x30552f=new _0x5c049b(_0x1ccd25['locale']);return _0x30552f['set']({'label':pt(_0x1ccd25['locale'],'Save\x20current\x20revision')}),_0x30552f['bind']('isEnabled')['to'](_0x5364c,'isReady',_0x5364c,'isEnabled',_0x1ccd25,'isReadOnly',(_0x4d93af,_0x31a44c,_0x4653fc)=>_0x4d93af&&_0x31a44c&&!_0x4653fc),this['listenTo'](_0x30552f,'execute',()=>{this['_showDialog']();}),_0x30552f;}['_createOpenRevisionButton'](_0x2688bc){const _0x29e9bb=this['editor'],_0x1af1d6=_0x29e9bb['plugins']['get']('RevisionTracker'),_0x5e5a9e=new _0x2688bc(_0x29e9bb['locale']);return _0x5e5a9e['set']({'label':pt(_0x29e9bb['locale'],'Open\x20revision\x20history')}),_0x5e5a9e['bind']('isEnabled')['to'](_0x1af1d6,'isReady',_0x29e9bb,'isReadOnly',(_0x33ad8e,_0x2e308e)=>_0x33ad8e&&!_0x2e308e),this['listenTo'](_0x5e5a9e,'execute',()=>{_0x29e9bb['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x5e5a9e;}['_showDialog'](){const _0x5ee8a4=this['editor'],_0x379c91=_0x5ee8a4['locale'],_0x1b3950=_0x5ee8a4['plugins']['get']('Dialog'),_0x148f36=_0x5ee8a4['plugins']['get']('RevisionTracker');function _0x4b7323(_0x3aa1ee){_0x5ee8a4['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3aa1ee['revisionName']?_0x3aa1ee['revisionNameInputView']['errorText']=pt(_0x379c91,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x5ee8a4['plugins']['get'](_t)['saveRevision']({'name':_0x3aa1ee['revisionName']}),_0x1b3950['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4b7323(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x1b3950['show']({'id':'revisionSave','title':pt(_0x379c91,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':pt(_0x5ee8a4['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x1b3950['hide']()},{'label':pt(_0x5ee8a4['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4e5b1b){_0x4e5b1b['bind']('isEnabled')['to'](_0x148f36,'isReady',_0x148f36,'isEnabled',_0x5ee8a4,'isReadOnly',(_0x2c1362,_0x4a3880,_0x5bacfe)=>_0x2c1362&&_0x4a3880&&!_0x5bacfe);},'onExecute':()=>_0x4b7323(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x576dde=this['editor'],_0x2b94b6=_0x576dde['locale'];this['_saveRevisionFormView']=new Et(_0x2b94b6,_0x576dde['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Nt=class extends at{['changeId'];['_model'];constructor(_0xd4be74,_0x33b987){super(_0xd4be74),this['_model']=_0x33b987,this['changeId']=_0x33b987['id'];const _0x1fa844=this['bindTemplate'],_0x31dff2=pt(_0xd4be74,_0x33b987['data']['isSuggestion']?'Suggested\x20by':'add'==_0x33b987['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x33b987['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1fa844['to']('type',_0x1c488e=>'ck-revision-change__'+_0x1c488e)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x31dff2}]},{'text':'\x20'+_0x33b987['author']['name']}]}]});}['focus'](){this['element']['focus']();}};const xt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x1a221f();var Ot=class extends xt{['id'];['author'];['type'];['data'];['rootName'];constructor(_0x5bbb9e){super(),this['id']=_0x5bbb9e['id']||_0x590d2c(),this['author']=_0x5bbb9e['author'],this['type']=_0x5bbb9e['type'],this['data']=_0x5bbb9e['data']||{},this['rootName']=_0x5bbb9e['rootName'],this['set']('createdAt',_0x5bbb9e['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(_0x3cc941,_0xc03005){this['newRevisionId']=_0x3cc941,this['oldRevisionId']=_0xc03005,this['changes']=new _0x1bc318();}['_setChanges'](_0x3a034d){for(const _0x2d2aff of _0x3a034d)this['changes']['add'](_0x2d2aff);}},Mt=class extends _0x2d350d{['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[_0x2eba5e,_0x3db3fd,mt,wt];}constructor(_0x35c770){super(_0x35c770),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',(_0x2474fb,_0x235dd6,_0x51856b)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4e705a=>{for(const _0x5e9f82 of this['editor']['editing']['view']['document']['roots'])_0x51856b?_0x4e705a['removeClass']('ck-editor__editable__overlay',_0x5e9f82):_0x4e705a['addClass']('ck-editor__editable__overlay',_0x5e9f82);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x585660=>null!==_0x585660),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5645ca,_0x590c7f,_0x500986)=>_0x5645ca&&_0x500986?_0x590c7f['changes']['getIndex'](_0x500986):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5eb15e,_0x38821e)=>_0x5eb15e?_0x38821e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x3db3fd);}['init'](){const _0x4bcd28=this['editor'],_0xbb3096=new Tt(_0x4bcd28,{'direction':'backward'}),_0x3971d2=new Tt(_0x4bcd28,{'direction':'forward'});_0x4bcd28['commands']['add']('showPreviousChange',_0xbb3096),_0x4bcd28['commands']['add']('showNextChange',_0x3971d2),_0x4bcd28['commands']['add']('restoreRevision',new Dt(_0x4bcd28)),this['on']('change:numberOfChanges',()=>{_0xbb3096['refresh'](),_0x3971d2['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4bcd28['enableReadOnlyMode']('revision-viewer'),_0x4bcd28['plugins']['has']('WidgetToolbarRepository')&&_0x4bcd28['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x34f2f0){return await this['_utils']['loadRevisionData'](_0x34f2f0,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x34f2f0);}async['getRevisionRootsAttributes'](_0x11402b){return await this['_utils']['loadRevisionData'](_0x11402b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x11402b);}async['compare'](_0x57e9e0,_0x13282e,_0x5351cd=!0x1){if(!this['isEnabled'])return;const _0x15afa5=this['diff'],_0x580200=this['repository'],_0xc3135a='string'==typeof _0x57e9e0?_0x580200['getRevision'](_0x57e9e0):_0x57e9e0,_0x25cb93='string'==typeof _0x13282e?_0x580200['getRevision'](_0x13282e):_0x13282e,_0x53ad77=_0xc3135a['id'],_0x22f297=_0x25cb93?_0x25cb93['id']:null;if(!_0x5351cd&&this['diff']&&this['diff']['newRevisionId']===_0x53ad77&&this['diff']['oldRevisionId']===_0x22f297)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ct(_0x53ad77,_0x22f297);const _0x2d6c96=this['_getRevisionsRange'](_0xc3135a,_0x25cb93,!0x0)['map'](_0x4e841a=>this['_utils']['loadRevisionData'](_0x4e841a,this['adapter']));return _0x2d6c96['push'](new Promise(_0x49c25c=>{setTimeout(_0x49c25c,0x14);})),Promise['all'](_0x2d6c96)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x3ef90c=this['_getDiff'](_0x53ad77,_0x22f297);for(const _0x314f36 of _0x3ef90c['changes'])this['_changeIdToChange']['set'](_0x314f36['id'],_0x314f36);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4800d5=>{for(const _0x555642 of this['editor']['model']['document']['getRootNames']())_0x4800d5['detachRoot'](_0x555642);for(const _0x437d58 of Object['keys'](_0x3ef90c['model'])){const _0x1cfc1f=_0x3ef90c['model'][_0x437d58]['name'],_0x3c0c9b=_0x4800d5['addRoot'](_0x437d58,_0x1cfc1f);for(const _0x3a914a of Object['keys'](_0x3ef90c['attributes'][_0x437d58]))_0x4800d5['setAttribute'](_0x3a914a,_0x3ef90c['attributes'][_0x437d58][_0x3a914a],_0x3c0c9b);_0x4800d5['insert'](_0x3ef90c['model'][_0x437d58],_0x3c0c9b,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x3ef90c['changes'])),this['isReady']=!0x0;})['catch'](_0x27704a=>{console['error'](_0x27704a),this['_cleanUp'](),_0x15afa5&&(this['diff']=_0x15afa5),this['isReady']=!0x0;});}['addRevisionData'](_0x5e8390,_0x19cd6c){const _0x295d69=this['repository']['createRevision'](_0x5e8390);return _0x295d69['on']('_update',(_0x51cddb,_0x52d1ff,_0x2e27cc)=>_0x19cd6c(_0x52d1ff,_0x2e27cc,_0x295d69)),this['repository']['addRevision'](_0x295d69),_0x295d69;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2d3654=>{for(const _0x1a7026 of this['editor']['model']['document']['getRootNames']())_0x2d3654['detachRoot'](_0x1a7026);});}['_sortAndFilterDiffChanges'](_0x50988f){const _0x42fa9b=[],_0x5c0f10=new Map();for(const _0x444f18 of this['editor']['model']['document']['getRootNames']()){const _0x330a4b=this['editor']['editing']['view']['getDomRoot'](_0x444f18);if(!_0x330a4b)continue;const _0x4d8fbf=_0x330a4b['getClientRects']()['item'](0x0);_0x4d8fbf&&(_0x42fa9b['push'](_0x444f18),_0x5c0f10['set'](_0x444f18,_0x4d8fbf));}return _0x42fa9b['sort']((_0x34a442,_0x12b5b5)=>{const _0x33fa82=_0x5c0f10['get'](_0x34a442),_0x291f3b=_0x5c0f10['get'](_0x12b5b5);return _0x33fa82['y']-_0x291f3b['y']||_0x33fa82['x']-_0x291f3b['x'];}),(_0x50988f=_0x50988f['filter'](_0xf2d8ed=>_0x42fa9b['includes'](_0xf2d8ed['rootName'])))['sort']((_0x37024,_0x594003)=>_0x42fa9b['indexOf'](_0x37024['rootName'])-_0x42fa9b['indexOf'](_0x594003['rootName'])),_0x50988f;}['_makeTape'](_0x17b835){const _0x183d16=Array['from'](_0x17b835['markers'])['filter'](([_0x1d15fe,_0x1c98bd])=>_0x1d15fe['startsWith']('revision:')&&!_0x1c98bd['isCollapsed']),_0x145e62=Array['from'](this['editor']['model']['createRangeIn'](_0x17b835)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x183d16['length'])for(const _0x14722d of _0x145e62){const [_0x3fcba4,_0x56ecbe]=_0x183d16[0x0],[,_0x54662c,_0x2b338d]=_0x3fcba4['split'](':');if(_0x56ecbe['end']['isEqual'](_0x14722d['nextPosition'])&&_0x183d16['shift'](),(_0x14722d['previousPosition']['isEqual'](_0x56ecbe['start'])||_0x14722d['previousPosition']['isAfter'](_0x56ecbe['start']))&&('insertion'==_0x54662c?_0x14722d['isAdded']={'userId':_0x2b338d}:'deletion'==_0x54662c&&(_0x14722d['isRemoved']={'userId':_0x2b338d})),0x0==_0x183d16['length'])break;}return _0x145e62;}['_refreshStartEndIndex'](_0x2dc4f0){const _0x55f225=new Map();for(let _0x270a77=0x0;_0x270a77<_0x2dc4f0['length'];_0x270a77++)'text'===_0x2dc4f0[_0x270a77]['type']?(_0x2dc4f0[_0x270a77]['item']['startIndex']=_0x270a77,_0x2dc4f0[_0x270a77]['item']['endIndex']=_0x270a77):('elementStart'===_0x2dc4f0[_0x270a77]['type']?_0x2dc4f0[_0x270a77]['item']['startIndex']=_0x270a77:'elementEnd'===_0x2dc4f0[_0x270a77]['type']&&(_0x2dc4f0[_0x270a77]['item']['endIndex']=_0x270a77),_0x55f225['set'](_0x2dc4f0[_0x270a77]['id'],_0x270a77));for(const _0x45290b of _0x55f225['values']())'elementStart'===_0x2dc4f0[_0x45290b]['type']?_0x2dc4f0[_0x45290b]['item']['endIndex']=_0x55f225['get'](_0x2dc4f0[_0x45290b]['pairId']):'elementEnd'===_0x2dc4f0[_0x45290b]['type']&&(_0x2dc4f0[_0x45290b]['item']['startIndex']=_0x55f225['get'](_0x2dc4f0[_0x45290b]['pairId']));}['_processTape'](_0x11ec62){for(let _0x48a669=0x0;_0x48a669<_0x11ec62['length'];_0x48a669++){if('elementStart'===_0x11ec62[_0x48a669]['type'])_0x11ec62[_0x48a669]['item']['startIndex']=_0x48a669;else{if('elementEnd'===_0x11ec62[_0x48a669]['type']){_0x11ec62[_0x48a669]['item']['endIndex']=_0x48a669;const _0x276c66=_0x11ec62[_0x48a669]['item']['startIndex'];_0x11ec62[_0x276c66]['pairId']=_0x11ec62[_0x48a669]['id'],_0x11ec62[_0x48a669]['pairId']=_0x11ec62[_0x276c66]['id'];}else _0x11ec62[_0x48a669]['item']['startIndex']=_0x48a669,_0x11ec62[_0x48a669]['item']['endIndex']=_0x48a669,_0x11ec62[_0x48a669]['pairId']=null;}_0x11ec62[_0x48a669]['markersStart']||(_0x11ec62[_0x48a669]['markersStart']=[],_0x11ec62[_0x48a669]['markersEnd']=[]);}}['_markInsertions'](_0x1b25c5,_0x414f72){const _0x1c7bfe=_0x1b25c5['filter'](_0x28f0c4=>!_0x28f0c4['isAdded']);for(let _0xb64d64=0x0;_0xb64d64<_0x414f72['length'];_0xb64d64++)_0x414f72[_0xb64d64]['isAdded']&&(_0x1c7bfe[_0xb64d64]['isAdded']=_0x414f72[_0xb64d64]['isAdded']);}['_getDiff'](_0x41bbfb,_0x369613=null){const _0x82ac6c=this['repository']['getRevision'](_0x41bbfb),_0x3779d4=_0x369613?this['repository']['getRevision'](_0x369613):null,_0x3066f4=this['_getRevisionsRange'](_0x82ac6c,_0x3779d4),_0x323dd9=_0x3066f4[_0x3066f4['length']-0x1],_0x53ab98=new Map(),_0x12bca3={'model':{},'attributes':{},'changes':[]},_0x25afa1=new Set(),_0x1328a3=new Map();for(let _0x1051e4=_0x3066f4['length']-0x1;_0x1051e4>=0x0;_0x1051e4--){const _0x2e6edb=_0x3066f4[_0x1051e4];for(const _0x3e04bd of Object['keys'](_0x2e6edb['diffData']))if(_0x2e6edb['diffData'][_0x3e04bd]['attachChange']){const _0x203dd0=_0x2e6edb['diffData'][_0x3e04bd]['attachChange'];_0x203dd0['isAttached']?(_0x25afa1['add'](_0x3e04bd),_0x1328a3['has'](_0x3e04bd)&&_0x1328a3['get'](_0x3e04bd)['userId']==_0x203dd0['userId']?_0x1328a3['delete'](_0x3e04bd):_0x1328a3['set'](_0x3e04bd,_0x203dd0)):_0x1328a3['has'](_0x3e04bd)?(_0x25afa1['delete'](_0x3e04bd),_0x1328a3['delete'](_0x3e04bd)):(_0x25afa1['add'](_0x3e04bd),_0x1328a3['set'](_0x3e04bd,_0x203dd0));}else _0x25afa1['add'](_0x3e04bd);}for(const _0x4126cc of _0x25afa1){const _0x2a3bdd=_0x1328a3['has'](_0x4126cc)&&!_0x1328a3['get'](_0x4126cc)['isAttached'];let _0x5a7c37=_0x2a3bdd?_0x3066f4['length']-0x1:0x0;const _0x4c1c94=_0x2a3bdd?-0x1:0x1;for(;_0x3066f4[_0x5a7c37];){const _0x27996b=_0x3066f4[_0x5a7c37];if(_0x27996b['diffData'][_0x4126cc]){const _0x5d9e0a=_0x2a3bdd?_0x27996b['diffData'][_0x4126cc]['attributesBefore']:_0x27996b['diffData'][_0x4126cc]['attributesAfter'];_0x12bca3['attributes'][_0x4126cc]=_0x5d9e0a?_0x256f14(_0x5d9e0a):{};break;}_0x5a7c37+=_0x4c1c94;}}for(const _0x207d57 of _0x3066f4){_0x207d57['model']={};for(const _0x1c2246 of _0x207d57['authors'])_0x53ab98['set'](_0x1c2246['id'],_0x1c2246);for(const _0x26cecd of _0x25afa1){const _0x2f768c=_0x207d57['diffData'][_0x26cecd]?_0x207d57['diffData'][_0x26cecd]['insertions']:'[]',_0x6b568=_0x207d57['diffData'][_0x26cecd]?_0x207d57['diffData'][_0x26cecd]['deletions']:'[]',_0x4a1d07=_0x207d57['diffData'][_0x26cecd]?.['rootElementName']||'$root';_0x207d57['model'][_0x26cecd]={'insertions':this['_utils']['_makeModelFromViewString'](_0x2f768c,_0x4a1d07),'deletions':this['_utils']['_makeModelFromViewString'](_0x6b568,_0x4a1d07)};}}for(const _0x350efc of _0x25afa1){let _0x154ef3=null,_0x4bbcd5=0x0;const _0xd95f3f=_0x3066f4['map'](_0x4cea92=>_0x4cea92['diffData'][_0x350efc]?.['rootElementName'])['find'](_0x23150d=>void 0x0!==_0x23150d)||'$root',_0x3af5f0=new Map(Array['from'](_0x82ac6c['model'][_0x350efc]['insertions']['markers'])['filter'](([_0x1a26b8])=>!_0x1a26b8['startsWith']('revision:')));let _0x4fdffe=0x0;for(const _0x194a75 of _0x3066f4){const _0x44371e=this['_makeTape'](_0x194a75['model'][_0x350efc]['insertions']);_0x194a75==_0x82ac6c?(_0x154ef3=_0x44371e,_0x4bbcd5=_0x154ef3['length'],_0x154ef3['forEach'](_0x5f3de0=>{_0x5f3de0['id']=_0x4fdffe++;}),this['_processTape'](_0x154ef3)):this['_markInsertions'](_0x154ef3,_0x44371e);const _0x5c89b3=_0x154ef3['filter'](_0x44ef05=>!_0x44ef05['isAdded'])['map'](_0x953449=>_0x953449['id']);let _0x49ecad=0x0;const _0x5ca8af=this['_makeTape'](_0x194a75['model'][_0x350efc]['deletions']);_0x5ca8af['forEach'](_0x4a37e2=>{_0x4a37e2['isRemoved']?_0x4a37e2['id']=_0x4bbcd5++:_0x4a37e2['id']=_0x5c89b3[_0x49ecad++];}),this['_processTape'](_0x5ca8af),this['_setDistance'](_0x154ef3,'isAdded'),this['_setDistance'](_0x5ca8af,'isRemoved'),_0x194a75==_0x82ac6c&&this['_markMarkers'](_0x154ef3,_0x3af5f0),_0x154ef3=this['_joinTapes'](_0x154ef3,_0x5ca8af),this['_refreshStartEndIndex'](_0x154ef3),this['_setDistance'](_0x154ef3,'isRemoved');}_0x154ef3=_0x154ef3['filter'](_0x5aaff4=>!(_0x5aaff4['isAdded']&&_0x5aaff4['isRemoved']));const _0x370af5=new Map(_0x323dd9['model'][_0x350efc]['deletions']['markers']),_0x5f013f=new Set(_0x3af5f0['keys']());for(const _0x37d42a of _0x370af5['keys']())_0x5f013f['delete'](_0x37d42a);this['_markSuggestions'](_0x154ef3,_0x5f013f),this['_fixObsoleteTags'](_0x154ef3),_0x154ef3=this['_removeMissingPairs'](_0x154ef3),_0x154ef3=this['_markMismatchedRemovedTags'](_0x154ef3),_0x154ef3=this['_removeUnsupportedChanges'](_0x154ef3);const {root:_0x26c277,changes:_0x4ead5f}=this['_makeModelFromTape'](_0x154ef3,_0x53ab98,_0x350efc,_0xd95f3f);_0x12bca3['model'][_0x350efc]=_0x26c277;const _0x47a871=_0x1328a3['get'](_0x350efc);if(_0x47a871){const _0xffd81e=new Ot({'author':_0x53ab98['get'](_0x47a871['userId']),'type':_0x47a871['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x350efc});_0x4ead5f['unshift'](_0xffd81e),_0x12bca3['attributes'][_0x350efc]['revisionHistoryAttachChange']=_0xffd81e['id'];}_0x12bca3['changes']=_0x12bca3['changes']['concat'](_0x4ead5f);}return _0x12bca3;}['_markMarkers'](_0x894535,_0x440fc6){for(let _0x3f4ae4=0x0;_0x3f4ae4<_0x894535['length'];_0x3f4ae4++)for(const [_0x5f020e,_0x1d5803]of _0x440fc6)!_0x1d5803['isCollapsed']&&_0x1d5803['start']['isEqual'](_0x894535[_0x3f4ae4]['previousPosition'])&&_0x894535[_0x3f4ae4]['markersStart']['push'](_0x5f020e),_0x1d5803['end']['isEqual'](_0x894535[_0x3f4ae4]['nextPosition'])&&_0x894535[_0x3f4ae4]['markersEnd']['push'](_0x5f020e);}['_joinTapes'](_0x5b3ad7,_0x6d7a3){let _0x4aada3=[],_0x5bd263=0x0,_0x2cdc3d=0x0;for(;_0x5bd263<_0x5b3ad7['length']||_0x2cdc3d<_0x6d7a3['length'];){const _0x534564=_0x5b3ad7[_0x5bd263]||{},_0x209523=_0x6d7a3[_0x2cdc3d]||{};if(_0x534564['id']==_0x209523['id'])_0x5bd263++,_0x2cdc3d++,_0x4aada3['push'](_0x534564);else{if(_0x209523['isRemoved']&&_0x534564['isAdded']){const {commonTape:_0x4f853e,iEnd:_0x480c1e,jEnd:_0x54f47b}=this['_threeWayMerge'](_0x5b3ad7,_0x5bd263,_0x6d7a3,_0x2cdc3d);_0x4aada3=_0x4aada3['concat'](_0x4f853e),_0x5bd263=_0x480c1e,_0x2cdc3d=_0x54f47b;}else _0x209523['isRemoved']?(_0x2cdc3d++,_0x4aada3['push'](_0x209523)):(_0x5bd263++,_0x4aada3['push'](_0x534564));}}return _0x4aada3;}['_markSuggestions'](_0x5279f8,_0x1c3641){const _0x3eb0bc=[];for(let _0x194479=0x0;_0x194479<_0x5279f8['length'];_0x194479++){for(let _0x58acb4=0x0;_0x58acb4<_0x5279f8[_0x194479]['markersStart']['length'];_0x58acb4++){const _0x2334e8=_0x5279f8[_0x194479]['markersStart'][_0x58acb4];if(!_0x1c3641['has'](_0x2334e8))continue;const {group:_0x2f0134,type:_0xcc7a4e,authorId:_0x279afe}=_0x5d9504(_0x2334e8);'revision-suggestion'!=_0x2f0134||'insertion'!=_0xcc7a4e&&'deletion'!=_0xcc7a4e||(_0x3eb0bc['unshift']({'type':_0xcc7a4e,'name':_0x2334e8,'userId':_0x279afe}),_0x5279f8[_0x194479]['markersStart']['splice'](_0x58acb4,0x1),_0x58acb4--);}_0x5a121a(_0x5279f8[_0x194479]);for(let _0x5181bd=0x0;_0x5181bd<_0x5279f8[_0x194479]['markersEnd']['length'];_0x5181bd++){const _0x53ce1e=_0x5279f8[_0x194479]['markersEnd'][_0x5181bd];if(!_0x1c3641['has'](_0x53ce1e))continue;const {group:_0x27b59e,type:_0x5057dc}=_0x5d9504(_0x53ce1e);if('revision-suggestion'!=_0x27b59e||'insertion'!=_0x5057dc&&'deletion'!=_0x5057dc)continue;_0x5279f8[_0x194479]['markersEnd']['splice'](_0x5181bd,0x1),_0x5181bd--;const _0xf5da01=_0x3eb0bc['findIndex'](_0x2f2f22=>_0x2f2f22['name']==_0x53ce1e);_0xf5da01>-0x1&&_0x3eb0bc['splice'](_0xf5da01,0x1);}}function _0x5d9504(_0x2a312a){const _0x2736c4=_0x2a312a['split'](':');return{'group':_0x2736c4[0x0],'type':_0x2736c4[0x1],'subType':_0x2736c4['length']>=0x5?_0x2736c4[0x2]:null,'id':_0x2736c4['length']<0x5?_0x2736c4[0x2]:_0x2736c4[0x3],'authorId':_0x2736c4['length']<0x5?_0x2736c4[0x3]:_0x2736c4[0x4],'markerCount':0x6==_0x2736c4['length']?_0x2736c4[0x5]:null};}function _0x5a121a(_0x52ffa7){for(let _0x512722=0x0;_0x512722<_0x3eb0bc['length'];_0x512722++){if(_0x52ffa7['isAdded']&&'insertion'==_0x3eb0bc[_0x512722]['type']&&_0x52ffa7['isAdded']['userId']==_0x3eb0bc[_0x512722]['userId'])return _0x52ffa7['isAddSuggestion']=_0x3eb0bc[_0x512722],void delete _0x52ffa7['isAdded'];if(!_0x52ffa7['isAdded']&&!_0x52ffa7['isRemoved']&&'deletion'==_0x3eb0bc[_0x512722]['type'])return void(_0x52ffa7['isRemoveSuggestion']=_0x3eb0bc[_0x512722]);}}}['_setDistance'](_0x2fdfe,_0x137249){let _0x377ba8=0x0,_0x29aa03=!0x1;const _0x53b7f9=new Map();for(const _0x482ddc of _0x2fdfe)_0x482ddc[_0x137249]?_0x29aa03&&(_0x377ba8++,_0x29aa03=!0x1):(_0x377ba8++,_0x29aa03=!0x0),_0x53b7f9['set'](_0x482ddc['id'],_0x377ba8);for(let _0x2eaf7e=0x0;_0x2eaf7e<_0x2fdfe['length'];_0x2eaf7e++){if('isRemoved'==_0x137249&&_0x2fdfe[_0x2eaf7e]['isAdded']||'isAdded'==_0x137249&&_0x2fdfe[_0x2eaf7e]['isRemoved'])continue;if('text'==_0x2fdfe[_0x2eaf7e]['type']){_0x2fdfe[_0x2eaf7e]['distance']=0x0;continue;}const _0x53cfad=_0x53b7f9['get'](_0x2fdfe[_0x2eaf7e]['pairId']),_0x1722d9=_0x53b7f9['get'](_0x2fdfe[_0x2eaf7e]['id']);_0x2fdfe[_0x2eaf7e]['distance']=_0x53cfad-_0x1722d9;}}['_getRevisionsRange'](_0xf63f0d,_0x15d235,_0x359d1e=!0x1){const _0x2e8201=[];let _0x4e73f6=this['repository']['getIndex'](_0xf63f0d),_0xbbea11=this['repository']['getIndex'](_0x15d235);for(-0x1==_0xbbea11&&(_0xbbea11=this['repository']['_revisions']['length'],_0x359d1e=!0x1);_0x4e73f6<_0xbbea11;)_0x2e8201['push'](this['repository']['getRevision'](_0x4e73f6)),_0x4e73f6++;return _0x359d1e&&_0x2e8201['push'](this['repository']['getRevision'](_0x4e73f6)),_0x2e8201;}['_threeWayMerge'](_0xe681b9,_0x2fa933,_0xfa3196,_0x11762c){const _0x12894a=this['editor']['model']['schema'];let _0x355226=_0x2fa933;for(;_0xe681b9[_0x355226]&&_0xe681b9[_0x355226]['isAdded'];)_0x355226++;let _0x271793=_0x11762c;for(;_0xfa3196[_0x271793]&&_0xfa3196[_0x271793]['isRemoved'];)_0x271793++;_0x263c85(_0xe681b9,_0x2fa933,_0x355226),_0x263c85(_0xfa3196,_0x11762c,_0x271793);const _0x1714dd=_0xfa3196['slice'](_0x11762c,_0x271793)['concat'](_0xe681b9['slice'](_0x2fa933,_0x355226));return _0x1714dd['sort']((_0x31fe75,_0x357693)=>_0x31fe75['side']!=_0x357693['side']?_0x31fe75['side']-_0x357693['side']:_0x31fe75['level']!=_0x357693['level']?_0x31fe75['level']-_0x357693['level']:_0x31fe75['distance']!=_0x357693['distance']?_0x357693['distance']-_0x31fe75['distance']:!!_0x31fe75['isAdded']!=!!_0x357693['isAdded']?-0x1==_0x31fe75['side']||0x0==_0x31fe75['side']?_0x31fe75['isAdded']?-0x1:0x1:_0x31fe75['isAdded']?0x1:-0x1:_0x31fe75['index']-_0x357693['index']),{'commonTape':_0x1714dd,'iEnd':_0x355226,'jEnd':_0x271793};function _0x263c85(_0x28b204,_0x3541a0,_0x3e1208){let _0x31403c=-0x1,_0x1fb9c9=Number['POSITIVE_INFINITY'],_0x2d1cc2=!0x0;for(let _0x58e188=_0x3541a0;_0x58e188<_0x3e1208;_0x58e188++)if(_0x12894a['isInline'](_0x28b204[_0x58e188]['item'])||(_0x2d1cc2=!0x1),_0x28b204[_0x58e188]['item']['startIndex']<_0x3541a0&&(_0x31403c=_0x58e188),_0x28b204[_0x58e188]['item']['endIndex']>=_0x3e1208){_0x1fb9c9=_0x58e188;break;}_0x2d1cc2&&(_0x31403c=_0x3e1208-0x1);for(let _0x5d1f2f=_0x3541a0;_0x5d1f2f<_0x3e1208;_0x5d1f2f++)_0x28b204[_0x5d1f2f]['side']=_0x5d1f2f<=_0x31403c?-0x1:_0x5d1f2f<_0x1fb9c9?0x0:0x1,_0x28b204[_0x5d1f2f]['index']=_0x5d1f2f;let _0x2cd0f8=0x0;for(let _0x5c1bec=_0x3541a0;_0x5c1bec<=_0x31403c;_0x5c1bec++)0x0==_0x28b204[_0x5c1bec]['distance']?_0x28b204[_0x5c1bec]['level']=_0x2cd0f8:(_0x2cd0f8++,_0x28b204[_0x5c1bec]['level']=_0x2cd0f8,_0x2cd0f8++);for(let _0x27d12d=_0x3541a0;_0x27d12d<_0x3e1208;_0x27d12d++)0x0==_0x28b204[_0x27d12d]['side']&&(_0x28b204[_0x27d12d]['level']=_0x2cd0f8);_0x2cd0f8=0x0;for(let _0x5c40db=_0x3e1208-0x1;_0x5c40db>=_0x1fb9c9;_0x5c40db--)0x0==_0x28b204[_0x5c40db]['distance']?_0x28b204[_0x5c40db]['level']=_0x2cd0f8:(_0x2cd0f8--,_0x28b204[_0x5c40db]['level']=_0x2cd0f8,_0x2cd0f8--);}}['_fixObsoleteTags'](_0x2437c6){const _0x290842=new Map(),_0x165997=this['editor']['model']['schema'];for(let _0x3cc2ac=0x1;_0x3cc2ac<_0x2437c6['length'];_0x3cc2ac++){let _0x20a1b0,_0x5e96d9,_0x25e1ae;const _0x2b964e=_0x2437c6[_0x3cc2ac],_0x146c36=_0x2437c6[_0x3cc2ac-0x1];if('text'==_0x2b964e['type'])continue;if(_0x2b964e['type']!=_0x146c36['type'])continue;if(!_0x165997['isBlock'](_0x146c36['item'])||_0x165997['isLimit'](_0x146c36['item']))continue;if(!_0x165997['isBlock'](_0x2b964e['item'])||_0x165997['isLimit'](_0x2b964e['item']))continue;if((_0x2437c6[_0x3cc2ac]['isAdded']||_0x2437c6[_0x3cc2ac]['isAddSuggestion'])&&_0x2437c6[_0x3cc2ac-0x1]['isRemoved'])_0x20a1b0=_0x2437c6[_0x3cc2ac],_0x5e96d9=_0x2437c6[_0x3cc2ac-0x1],_0x25e1ae=_0x3cc2ac-0x1;else{if(!_0x2437c6[_0x3cc2ac]['isRemoved']||!_0x2437c6[_0x3cc2ac-0x1]['isAdded']&&!_0x2437c6[_0x3cc2ac-0x1]['isAddSuggestion'])continue;_0x20a1b0=_0x2437c6[_0x3cc2ac-0x1],_0x5e96d9=_0x2437c6[_0x3cc2ac],_0x25e1ae=_0x3cc2ac;}const _0x42ad11=_0x20a1b0['level']==_0x5e96d9['level'],_0x1ad05b=Math['abs'](_0x20a1b0['level'])<Math['abs'](_0x5e96d9['level'])&&0x0==_0x5e96d9['distance'];(_0x42ad11||_0x1ad05b)&&(_0x290842['set'](_0x5e96d9['id'],_0x20a1b0['id']),_0x2437c6['splice'](_0x25e1ae,0x1),_0x3cc2ac--,_0x20a1b0['isAdded']=!0x1);}for(let _0x524559=0x0;_0x524559<_0x2437c6['length'];_0x524559++)_0x290842['has'](_0x2437c6[_0x524559]['pairId'])&&(_0x2437c6[_0x524559]['pairId']=_0x290842['get'](_0x2437c6[_0x524559]['pairId']));}['_removeMissingPairs'](_0x4ebe81){const _0x3fd920=new Set(_0x4ebe81['map'](_0x150829=>_0x150829['id']));for(let _0x37e462=0x0;_0x37e462<_0x4ebe81['length'];_0x37e462++)_0x3fd920['has'](_0x4ebe81[_0x37e462]['pairId'])||0x0==_0x4ebe81[_0x37e462]['distance']||(_0x4ebe81[_0x37e462]['isIncorrect']=!0x0);return _0x4ebe81['filter'](_0xa31b7d=>!_0xa31b7d['isIncorrect']);}['_markMismatchedRemovedTags'](_0x33b180){const _0x2fdc6e=new Set();for(let _0x21c3d6=0x0;_0x21c3d6<_0x33b180['length'];_0x21c3d6++){if(_0x2fdc6e['has'](_0x33b180[_0x21c3d6]['id'])&&_0x33b180[_0x21c3d6]['isRemoved']&&(_0x33b180[_0x21c3d6]['isIncorrect']=!0x0),_0x33b180[_0x21c3d6]['isIncorrect'])continue;if(0x0==_0x33b180[_0x21c3d6]['distance'])continue;if('elementStart'!=_0x33b180[_0x21c3d6]['type'])continue;if(null==_0x33b180[_0x21c3d6]['pairId'])continue;let _0x588349=_0x21c3d6+0x1,_0x4124ae=0x0;for(;_0x33b180[_0x588349]['id']!=_0x33b180[_0x21c3d6]['pairId'];)'elementStart'==_0x33b180[_0x588349]['type']?_0x4124ae++:'elementEnd'==_0x33b180[_0x588349]['type']&&_0x4124ae--,_0x588349++;if(0x0!=_0x4124ae){if(_0x33b180[_0x21c3d6]['isRemoved'])_0x33b180[_0x21c3d6]['isIncorrect']=!0x0;else{for(;_0x588349!=_0x21c3d6;)_0x33b180[_0x588349]['isRemoved']&&0x0!=_0x33b180[_0x588349]['distance']&&(_0x33b180[_0x588349]['isIncorrect']=!0x0,_0x2fdc6e['add'](_0x33b180[_0x588349]['pairId'])),_0x588349--;}}}return _0x33b180['filter'](_0x35e600=>!_0x35e600['isIncorrect']);}['_removeUnsupportedChanges'](_0x4de2f4){const _0x5738d4=this['editor']['model']['schema'];for(let _0x2e898b=0x0;_0x2e898b<_0x4de2f4['length'];_0x2e898b++){if(!(_0x4de2f4[_0x2e898b]['isAdded']||_0x4de2f4[_0x2e898b]['isAddSuggestion']||_0x4de2f4[_0x2e898b]['isRemoved']||_0x4de2f4[_0x2e898b]['isRemoveSuggestion']))continue;if(0x0==_0x4de2f4[_0x2e898b]['distance'])continue;const _0x4bfc08=_0x4de2f4[_0x2e898b]['item'];_0x5738d4['isBlock'](_0x4bfc08)||_0x5738d4['isLimit'](_0x4bfc08)||(_0x4de2f4[_0x2e898b]['isAdded']&&delete _0x4de2f4[_0x2e898b]['isAdded'],_0x4de2f4[_0x2e898b]['isAddSuggestion']&&delete _0x4de2f4[_0x2e898b]['isAddSuggestion'],_0x4de2f4[_0x2e898b]['isRemoveSuggestion']&&delete _0x4de2f4[_0x2e898b]['isRemoveSuggestion'],_0x4de2f4[_0x2e898b]['isRemoved']&&(_0x4de2f4[_0x2e898b]['isIncorrect']=!0x0));}return _0x4de2f4['filter'](_0x388011=>!_0x388011['isIncorrect']);}['_makeModelFromTape'](_0x49841d,_0x2d93aa,_0x1f66f9,_0x514d85){const _0x28234c=new _0x189def(),_0x2b7e1f=[],_0x3511e4=new Map(),_0x45fca5=this['editor']['model'],_0x9288a=_0x45fca5['schema'],_0x28e446=[_0x28234c],_0x591b73={},_0x597b92={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x28234c['name']=_0x514d85;let _0x17e35a=null;const _0x148d5e=[0x0];for(let _0x225852=0x0;_0x225852<_0x49841d['length'];_0x225852++)if('elementStart'===_0x49841d[_0x225852]['type']){_0x49841d[_0x225852]['previousPosition']=_0x45fca5['createPositionFromPath'](_0x28234c,_0x148d5e);const _0x1859ef=new _0x1dc29d(_0x49841d[_0x225852]['item']['name'],_0x49841d[_0x225852]['item']['getAttributes']());_0x28e446[0x0]['_appendChild'](_0x1859ef),_0x148d5e['push'](0x0),_0x28e446['unshift'](_0x1859ef),_0x49841d[_0x225852]['nextPosition']=_0x45fca5['createPositionFromPath'](_0x28234c,_0x148d5e);}else'elementEnd'===_0x49841d[_0x225852]['type']?(_0x28e446['shift'](),_0x49841d[_0x225852]['previousPosition']=_0x45fca5['createPositionFromPath'](_0x28234c,_0x148d5e),_0x148d5e['pop'](),_0x148d5e[_0x148d5e['length']-0x1]++,_0x49841d[_0x225852]['nextPosition']=_0x45fca5['createPositionFromPath'](_0x28234c,_0x148d5e)):(_0x49841d[_0x225852]['previousPosition']=_0x45fca5['createPositionFromPath'](_0x28234c,_0x148d5e),_0x17e35a?_0x17e35a['_data']+=_0x49841d[_0x225852]['item']['data']:_0x17e35a=new _0x16d047(_0x49841d[_0x225852]['item']['data'],_0x49841d[_0x225852]['item']['getAttributes']()),_0x49841d[_0x225852+0x1]&&'text'===_0x49841d[_0x225852+0x1]['type']&&_0x3e7a61(_0x17e35a,_0x49841d[_0x225852+0x1]['item'])||(_0x28e446[0x0]['_appendChild'](_0x17e35a),_0x17e35a=null),_0x148d5e[_0x148d5e['length']-0x1]+=_0x49841d[_0x225852]['item']['offsetSize'],_0x49841d[_0x225852]['nextPosition']=_0x45fca5['createPositionFromPath'](_0x28234c,_0x148d5e));for(let _0x2514b5=0x0;_0x2514b5<_0x49841d['length'];_0x2514b5++){const _0x287190=_0x49841d[_0x2514b5]['previousPosition'],_0xdc8b1d=_0x49841d[_0x2514b5]['nextPosition'];for(const _0x5ca8c4 of _0x49841d[_0x2514b5]['markersStart'])_0x3511e4['set'](_0x5ca8c4,{'start':_0x287190,'end':null});_0x21d82('isRemoveSuggestion',_0x2514b5,_0x287190,_0xdc8b1d),_0x21d82('isAddSuggestion',_0x2514b5,_0x287190,_0xdc8b1d),_0x21d82('isRemoved',_0x2514b5,_0x287190,_0xdc8b1d),_0x21d82('isAdded',_0x2514b5,_0x287190,_0xdc8b1d);for(const _0x593095 of _0x49841d[_0x2514b5]['markersEnd']){const _0x56f70e=_0x3511e4['get'](_0x593095);_0x56f70e?_0x56f70e['end']=_0xdc8b1d:_0x3511e4['set'](_0x593095,{'start':_0xdc8b1d,'end':_0xdc8b1d});}}for(const [_0x17976d,_0x316d8d]of _0x3511e4){const _0xbb930c=this['editor']['model']['createRange'](_0x316d8d['start'],_0x316d8d['end']);_0x28234c['markers']['set'](_0x17976d,_0xbb930c);}return _0x2b7e1f['sort']((_0x4ebfc8,_0xaf5608)=>{const _0x510f33=_0x28234c['markers']['get']('revision:'+_0x4ebfc8['id']),_0x617982=_0x28234c['markers']['get']('revision:'+_0xaf5608['id']);return _0x510f33['start']['isBefore'](_0x617982['start'])?-0x1:_0x510f33['start']['isAfter'](_0x617982['start'])?0x1:_0x510f33['end']['isBefore'](_0x617982['end'])?-0x1:_0x510f33['end']['isAfter'](_0x617982['end'])?0x1:'add'===_0x4ebfc8['type']?-0x1:0x1;}),{'root':_0x28234c,'changes':_0x2b7e1f};function _0x21d82(_0x7287b5,_0x5b5af9,_0x117848,_0x575c04){const _0x528d06=!!_0x49841d[_0x5b5af9][_0x7287b5],_0x33379e=_0x528d06?_0x49841d[_0x5b5af9][_0x7287b5]['userId']:null,_0x5783d0=_0x5b5af9===_0x49841d['length']-0x1,_0x47ab2c=_0x597b92[_0x7287b5][0x0],_0x1ca420=_0x9288a['isObject'](_0x49841d[_0x5b5af9]['item']);!_0x591b73[_0x7287b5]&&_0x528d06?_0x591b73[_0x7287b5]={'start':_0x117848,'tapeItem':_0x49841d[_0x5b5af9],'userId':_0x33379e,'type':_0x7287b5}:_0x591b73[_0x7287b5]&&!_0x528d06?(_0x591b73[_0x7287b5]['end']=_0x117848,_0xb2980b(_0x591b73[_0x7287b5]),_0x591b73[_0x7287b5]=null):_0x591b73[_0x7287b5]&&_0x528d06&&_0x591b73[_0x7287b5]['userId']!==_0x33379e&&(_0x591b73[_0x7287b5]['end']=_0x117848,_0x47ab2c&&_0x47ab2c['userId']===_0x591b73[_0x7287b5]['userId']||_0xb2980b(_0x591b73[_0x7287b5]),_0x591b73[_0x7287b5]={'start':_0x117848,'tapeItem':_0x49841d[_0x5b5af9],'userId':_0x33379e,'type':_0x7287b5}),_0x591b73[_0x7287b5]&&_0x1ca420&&('elementStart'!==_0x49841d[_0x5b5af9]['type']||_0x47ab2c&&_0x47ab2c['userId']===_0x33379e||_0x597b92[_0x7287b5]['unshift']({'userId':_0x33379e,'object':_0x49841d[_0x5b5af9]['item'],'change':_0x591b73[_0x7287b5]}),'elementEnd'===_0x49841d[_0x5b5af9]['type']&&_0x47ab2c&&_0x47ab2c['object']===_0x49841d[_0x5b5af9]['item']&&(_0x597b92[_0x7287b5]['shift'](),_0x591b73[_0x7287b5]=_0x47ab2c['change'])),_0x591b73[_0x7287b5]&&_0x5783d0&&(_0x591b73[_0x7287b5]['end']=_0x575c04,_0xb2980b(_0x591b73[_0x7287b5]),_0x591b73[_0x7287b5]=null);}function _0xb2980b({start:_0x96a78f,end:_0x5d606a,tapeItem:_0x46858b,userId:_0x5d101f,type:_0x2071d6}){const _0xf2c0a2=_0x46858b['item'],_0x2282fa=_0x45fca5['schema']['isBlock'](_0xf2c0a2)&&!_0x45fca5['schema']['isLimit'](_0xf2c0a2),_0x4e6ba3=_0x96a78f['nodeAfter']==_0x5d606a['parent']&&_0x5d606a['isAtStart'];if(_0x2282fa&&_0x4e6ba3)return;const _0x2af570=_0x45fca5['createRange'](_0x96a78f,_0x5d606a),_0xc21b91=new Ot({'author':_0x2d93aa['get'](_0x5d101f),'type':'isAdded'==_0x2071d6||'isAddSuggestion'==_0x2071d6?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2071d6||'isRemoveSuggestion'==_0x2071d6},'createdAt':new Date(),'rootName':_0x1f66f9});_0x2b7e1f['push'](_0xc21b91),_0x28234c['markers']['set']('revision:'+_0xc21b91['id'],_0x2af570);}function _0x3e7a61(_0x4cddea,_0x13b99f){const _0x763da3=_0x4cddea['getAttributes'](),_0x51b91a=_0x13b99f['getAttributes']();for(const _0x81bee9 of _0x763da3){if(_0x81bee9[0x1]!==_0x13b99f['getAttribute'](_0x81bee9[0x0]))return!0x1;_0x51b91a['next']();}return _0x51b91a['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3cb675=>{const _0x661792=_0x3cb675['markerName']['split'](':')[0x1],_0x3ed00b=this['_getChangeFromId'](_0x661792);if(!_0x3ed00b)return null;const _0x19bdbc='add'==_0x3ed00b['type']?'insertion':'deletion',_0xb93403=['ck-suggestion-marker','ck-suggestion-marker-'+_0x19bdbc];return _0x3ed00b['data']['isSuggestion']&&_0xb93403['push']('ck-suggestion-marker-'+_0x19bdbc+'-new'),this['activeChange']==_0x3ed00b&&_0xb93403['push']('ck-suggestion-marker--active'),{'classes':_0xb93403,'attributes':{'data-change-id':_0x661792}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x56e769=>{_0x56e769['on']('element:pre',(_0x334356,_0x2a3239,_0x5cec04)=>{const _0x382455=_0x2a3239['viewItem']['getChild'](0x0);if(!_0x382455||!_0x382455['is']('element','code'))return;if(!_0x5cec04['consumable']['consume'](_0x382455,{'attributes':['vid_start','vid_end']}))return;const _0x2f8d3f=_0x2a3239['modelRange']['start']['nodeAfter'];_0x5cec04['writer']['setAttribute']('vid_start',_0x382455['getAttribute']('vid_start'),_0x2f8d3f),_0x5cec04['writer']['setAttribute']('vid_end',_0x382455['getAttribute']('vid_end'),_0x2f8d3f);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x176c67=>{_0x176c67['on']('element',(_0x4a8686,_0x2cf0db,_0x1b60e0)=>{if(!_0x1b60e0['consumable']['consume'](_0x2cf0db['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2cf0db['modelRange']['isCollapsed'])return;const _0x2d112d=_0x2cf0db['modelRange']['start']['nodeAfter'];_0x2d112d['hasAttribute']('vid_start')||_0x2d112d['hasAttribute']('vid')||(_0x1b60e0['writer']['setAttribute']('vid_start',_0x2cf0db['viewItem']['getAttribute']('vid_start'),_0x2d112d),_0x1b60e0['writer']['setAttribute']('vid_end',_0x2cf0db['viewItem']['getAttribute']('vid_end'),_0x2d112d));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4a61af=>_0x4a61af['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x272810,[,_0x4a7547])=>{['vid_start','vid_end','vid']['includes'](_0x4a7547)&&(_0x272810['return']=!0x0,_0x272810['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x543f5c=>{_0x543f5c['on']('attribute:vid',(_0x42e305,_0x387878,_0x3ddce2)=>{if('\x20'!=_0x387878['item']['data']||_0x387878['item']['parent']['maxOffset']>0x1)return;if(!_0x3ddce2['consumable']['consume'](_0x387878['item'],_0x42e305['name']))return;const _0x2304be=_0x3ddce2['writer'],_0x1356b4=_0x3ddce2['mapper']['toViewRange'](_0x387878['range']);_0x2304be['wrap'](_0x1356b4,_0x2304be['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x55c5d9){const _0x36b42c=_0x55c5d9['plugins']['get']('RevisionViewer');return(_0x538cbc,_0x1f5aa8,_0x4857e9)=>{const _0x4fbfaf=_0x1f5aa8['markerName']['split'](':')[0x1],_0x282bd1=_0x36b42c['_getChangeFromId'](_0x4fbfaf);if(!_0x282bd1)return null;const _0x9eb748='add'==_0x282bd1['type']?'split':'merge';if(!_0x4857e9['consumable']['test'](_0x1f5aa8['markerRange'],_0x538cbc['name']))return;const _0x22e15a=_0x1f5aa8['markerRange']['getWalker'](),_0x37c24e=_0x1f5aa8['markerRange']['start'],_0x37bf67=_0x55c5d9['model']['schema'];let _0x4dd93f=null,_0x1002b2=null,_0x2c5741=!0x1,_0x1c0351=!0x1;for(const _0x5087a4 of _0x22e15a){const _0x1fa6d0=_0x5087a4['item'];_0x2c5741=_0x2c5741||_0x37bf67['isContent'](_0x1fa6d0);const _0x108db5=_0x4857e9['mapper']['toViewElement'](_0x1fa6d0);if(_0x108db5&&_0x108db5['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5087a4['type']&&(_0x37bf67['isBlock'](_0x1fa6d0)&&!_0x37bf67['isLimit'](_0x1fa6d0)&&(_0x1fa6d0['nextSibling']||_0x37c24e['isAtEnd']?_0x4dd93f&&_0x4dd93f['parent']==_0x1fa6d0||(_0x4dd93f=_0x1fa6d0,_0x2cb7a8(_0x5087a4['previousPosition']),_0x1c0351=!0x0):_0x1002b2=_0x1002b2||_0x5087a4['previousPosition']));}function _0x2cb7a8(_0x429f94){const _0x4fbe50=_0x4857e9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x9eb748}),_0x57860d=_0x4857e9['mapper']['toViewPosition'](_0x429f94);_0x282bd1['data']['isSuggestion']&&_0x4857e9['writer']['addClass']('ck-suggestion-marker-'+_0x9eb748+'-new',_0x4fbe50),_0x36b42c['activeChange']==_0x282bd1&&_0x4857e9['writer']['addClass']('ck-suggestion-marker--active',_0x4fbe50),_0x4857e9['writer']['insert'](_0x57860d,_0x4fbe50),_0x4857e9['mapper']['bindElementToMarker'](_0x4fbe50,_0x1f5aa8['markerName']);}_0x2c5741||_0x1c0351||!_0x1002b2||_0x2cb7a8(_0x1002b2);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xbe6a1d,_0x39bb2d,_0x151514)=>{const _0x490c9a=_0x151514['mapper']['markerNameToElements'](_0x39bb2d['markerName']);if(_0x490c9a){for(const _0x5463ca of _0x490c9a)(_0x5463ca['hasClass']('ck-suggestion-marker-split')||_0x5463ca['hasClass']('ck-suggestion-marker-merge'))&&(_0x151514['mapper']['unbindElementFromMarkerName'](_0x5463ca,_0x39bb2d['markerName']),_0x151514['writer']['remove'](_0x5463ca));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x22c5d6,_0x3ae754,_0x339538)=>{const _0x372b28=_0x3ae754['markerName']['split'](':')[0x1],_0x4c5c64=this['_getChangeFromId'](_0x372b28);if(!_0x4c5c64)return null;const _0x457295='add'==_0x4c5c64['type']?'split':'merge';if(_0x339538['consumable']['test'](_0x3ae754['markerRange'],_0x22c5d6['name']))for(const _0x4cb050 of _0x3ae754['markerRange']['getItems']()){if(!_0x4cb050['is']('element','softBreak'))continue;const _0x16f232=_0x339538['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x457295}),_0x4dcb40=_0x339538['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4cb050));_0x4c5c64['data']['isSuggestion']&&_0x339538['writer']['addClass']('ck-suggestion-marker-'+_0x457295+'-new',_0x16f232),this['activeChange']==_0x4c5c64&&_0x339538['writer']['addClass']('ck-suggestion-marker--active',_0x16f232),_0x339538['writer']['insert'](_0x4dcb40,_0x16f232),_0x339538['mapper']['bindElementToMarker'](_0x16f232,_0x3ae754['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x50bea7=>{for(const _0x2515ae of this['editor']['model']['document']['getRootNames']()){const _0x1e86bd=this['editor']['model']['document']['getRoot'](_0x2515ae),_0x4199d8=this['editor']['editing']['view']['document']['getRoot'](_0x2515ae);if(_0x4199d8){const _0x35c8ac=_0x1e86bd['getAttribute']('revisionHistoryAttachChange');if(_0x50bea7['removeAttribute']('data-change-id',_0x4199d8),_0x50bea7['removeClass']('ck-revision-history-root-add',_0x4199d8),_0x50bea7['removeClass']('ck-revision-history-root-remove',_0x4199d8),_0x50bea7['removeClass']('ck-revision-history-root--active',_0x4199d8),_0x35c8ac){const _0x2f199b=this['_getChangeFromId'](_0x35c8ac);if(!_0x2f199b)return null;_0x50bea7['setAttribute']('data-change-id',_0x35c8ac,_0x4199d8),_0x50bea7['addClass']('ck-revision-history-root-'+_0x2f199b['type'],_0x4199d8),this['activeChange']==_0x2f199b&&_0x50bea7['addClass']('ck-revision-history-root--active',_0x4199d8);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1c8dfe=>'revision-comment:'+_0x1c8dfe,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5e3067=>'revision-suggestion:'+_0x5e3067,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x45daf5=>({'name':'suggestion:'+_0x45daf5,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x580de1=>{const _0x45cef4=_0x580de1['markerName']['split'](':')[0x1];return'insertion'!=_0x45cef4&&'deletion'!=_0x45cef4?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x45cef4]};}}),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',(_0x22e93e,_0x3a7e7f,_0x4d07c5)=>{const _0x28663b=_0x4d07c5['mapper']['markerNameToElements'](_0x3a7e7f['markerName']);if(_0x28663b){for(const _0x3cd5df of _0x28663b)_0x3cd5df['is']('uiElement')&&(_0x4d07c5['mapper']['unbindElementFromMarkerName'](_0x3cd5df,_0x3a7e7f['markerName']),_0x4d07c5['writer']['remove'](_0x3cd5df));}},{'priority':'high'});}['_getChangeFromId'](_0x30d7b3){return this['_changeIdToChange']['get'](_0x30d7b3);}['_getViewForChange'](_0x577826){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Nt(this['editor']['locale'],_0x577826),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5b5b0d,_0x390ba1,_0x64223c,_0x408847)=>{_0x408847&&this['_balloon']['remove'](_0x408847),_0x64223c&&(this['_balloon']['add']({'view':_0x64223c,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4a3720=this['editor']['editing'],_0x44c790=this['_getChangeFromId'](_0x64223c['changeId']);let _0x20e149;if(_0x44c790['data']['isOnRoot']){const _0x838850=_0x4a3720['view']['getDomRoot'](_0x44c790['rootName']);_0x20e149=Array['from'](_0x838850['getClientRects']());}else{const _0x14582d=this['editor']['model']['markers']['get']('revision:'+_0x64223c['changeId']);_0x20e149=Array['from'](_0x4a3720['mapper']['markerNameToElements'](_0x14582d['name']))['map'](_0x31596d=>_0x4a3720['view']['domConverter']['mapViewToDom'](_0x31596d))['map'](_0x2b2842=>Array['from'](_0x2b2842['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x20e149['find'](_0x57e22f=>_0x57e22f['top']-0x3<=this['_activeViewTarget']['y']&&_0x57e22f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x57e22f['left']-0x3<=this['_activeViewTarget']['x']&&_0x57e22f['right']+0x3>=this['_activeViewTarget']['x'])||_0x20e149[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1c48c9,_0x592cca,_0x5eaab0,_0x42d424)=>{this['activeView']=_0x5eaab0?this['_getViewForChange'](_0x5eaab0):null,this['editor']['model']['change'](()=>{const _0x2cb1c8=this['editor']['editing'];_0x42d424&&(_0x42d424['data']['isOnRoot']?_0x2cb1c8['view']['change'](_0x5b9f97=>{_0x5b9f97['removeClass']('ck-revision-history-root--active',_0x2cb1c8['view']['document']['getRoot'](_0x42d424['rootName']));}):_0x2cb1c8['reconvertMarker']('revision:'+_0x42d424['id'])),_0x5eaab0&&(_0x5eaab0['data']['isOnRoot']?_0x2cb1c8['view']['change'](_0x5686ed=>{_0x5686ed['addClass']('ck-revision-history-root--active',_0x2cb1c8['view']['document']['getRoot'](_0x5eaab0['rootName']));}):_0x2cb1c8['reconvertMarker']('revision:'+_0x5eaab0['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x43734b,_0x51e148)=>{if(this['activeChange'])return;const _0x1469d7=this['_findChangeIdFromDomTarget'](_0x51e148['target']),_0x5f6c44=this['_changeIdToChange']['get'](_0x1469d7);_0x5f6c44?(this['_activeViewTarget']={'x':_0x51e148['domEvent']['x'],'y':_0x51e148['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5f6c44)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x349270,_0x2530e7)=>{const _0x341f72=this['_findChangeIdFromDomTarget'](_0x2530e7['target']),_0x1bfcbb=this['_changeIdToChange']['get'](_0x341f72);_0x1bfcbb?(this['_activeViewTarget']={'x':_0x2530e7['domEvent']['x'],'y':_0x2530e7['domEvent']['y']},_0x1bfcbb===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1bfcbb):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2ff2d6){do{const _0x690d77=_0x2ff2d6['getAttribute']('data-change-id');if(_0x690d77)return _0x690d77;_0x2ff2d6=_0x2ff2d6['parent'];}while(_0x2ff2d6);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5bd9a8=>{for(const _0x372f9e of this['editor']['model']['markers'])_0x5bd9a8['removeMarker'](_0x372f9e);});}};function Vt(_0x1f57bf,_0x37858d){return(_0x324b57,_0x396905,_0x981a5d)=>{if(!_0x981a5d['consumable']['test'](_0x396905['markerRange'],_0x324b57['name']))return;const _0x5b987d=_0x396905['markerRange']['getWalker'](),_0x38b91e=_0x396905['markerRange']['start'],_0x2f1855=_0x1f57bf['model']['schema'];let _0x5ec50e=null,_0x3821a5=null,_0x2e8155=!0x1,_0x14ba82=!0x1;for(const _0x49382f of _0x5b987d){const _0x552883=_0x49382f['item'];_0x2e8155=_0x2e8155||_0x2f1855['isContent'](_0x552883);const _0x5344ab=_0x981a5d['mapper']['toViewElement'](_0x552883);if(_0x5344ab&&_0x5344ab['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x49382f['type']&&(_0x2f1855['isBlock'](_0x552883)&&!_0x2f1855['isLimit'](_0x552883)&&(_0x552883['nextSibling']||_0x38b91e['isAtEnd']?_0x5ec50e&&_0x5ec50e['parent']==_0x552883||(_0x5ec50e=_0x552883,_0x775c72(_0x49382f['previousPosition']),_0x14ba82=!0x0):_0x3821a5=_0x3821a5||_0x49382f['previousPosition']));}function _0x775c72(_0x279774){const _0x4ceeae=_0x981a5d['mapper']['toViewPosition'](_0x279774),_0x4ecd5a=_0x981a5d['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x37858d});_0x981a5d['writer']['insert'](_0x4ceeae,_0x4ecd5a),_0x981a5d['mapper']['bindElementToMarker'](_0x4ecd5a,_0x396905['markerName']);}_0x2e8155||_0x14ba82||!_0x3821a5||_0x775c72(_0x3821a5);};}var Dt=class extends _0x538c7d{constructor(_0x45435b){super(_0x45435b);const _0x3fee9b=_0x45435b['plugins']['get'](Mt);this['affectsData']=!0x1,this['listenTo'](_0x3fee9b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3fee9b,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5e7f30=this['editor'],_0x52cf7e=_0x5e7f30['plugins']['get'](Mt),_0x7e9c87=_0x52cf7e['isReady']?_0x52cf7e['diff']['newRevisionId']:null;_0x5e7f30['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x7e9c87);}['refresh'](){const {isReady:_0x16dc6b,isEnabled:_0x43e233,repository:_0x16066e,diff:_0x49a62f}=this['editor']['plugins']['get'](Mt),_0x1a3ff8=_0x49a62f&&_0x16066e['getLaterVisibleRevision'](_0x49a62f['newRevisionId']);this['isEnabled']=_0x16dc6b&&_0x43e233&&Boolean(_0x1a3ff8);}},Tt=class extends _0x538c7d{['_step'];constructor(_0x29ea53,{direction:_0x1a0a4a}){super(_0x29ea53);const _0x2e3971=_0x29ea53['plugins']['get'](Mt);this['affectsData']=!0x1,this['_step']='forward'===_0x1a0a4a?0x1:-0x1,this['listenTo'](_0x2e3971,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2e3971,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x2e3971,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4c01b9=this['editor'],_0x34a3e5=_0x4c01b9['plugins']['get'](Mt),{isNavigationMode:_0x309aca,currentChangeNumber:_0x4b3615}=_0x34a3e5;let _0x2d53ad;if(_0x34a3e5['activeChange']=_0x309aca?_0x34a3e5['diff']['changes']['get'](_0x4b3615+this['_step']):_0x34a3e5['diff']['changes']['first'],_0x34a3e5['activeChange']['data']['isOnRoot'])_0x2d53ad=_0x4c01b9['editing']['view']['getDomRoot'](_0x34a3e5['activeChange']['rootName']);else{const _0x219b4c=_0x4c01b9['model']['markers']['get']('revision:'+_0x34a3e5['activeChange']['id']);_0x2d53ad=_0x29d53f(_0x4c01b9['editing'],_0x219b4c);}_0x297f0e({'target':_0x2d53ad,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x286378,currentChangeNumber:_0x2e5f5c,numberOfChanges:_0x23222f,isReady:_0x15d04f,isEnabled:_0xfefb3d}=this['editor']['plugins']['get'](Mt);this['isEnabled']=!!(_0xfefb3d&&_0x15d04f&&_0x23222f)&&(!_0x286378||(0x1===this['_step']?_0x2e5f5c<_0x23222f-0x1:_0x2e5f5c>0x0));}},Ht=class extends at{constructor(_0xbf2686){super(_0xbf2686);const _0x381b5d=this['bindTemplate'],_0x4a6597=new _0x2c621a(_0xbf2686),_0x2e4578=new _0x2c621a(_0xbf2686);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',(_0x35e3f2,_0x580e09)=>_0x35e3f2&&_0x580e09>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3b8ed4,_0x3b148b,_0x5940fa,_0x2b4334)=>{if(!_0x3b8ed4)return pt(_0xbf2686,'Loading...');if(!_0x5940fa)return pt(_0xbf2686,'No\x20changes');const _0x3f1d08=pt(_0xbf2686,'NUMBER_OF_CHANGES',_0x5940fa);return _0x2b4334?pt(_0xbf2686,'X_OF_Y_CHANGES',[_0x3b148b+0x1,_0x5940fa]):_0x3f1d08;}),_0x4a6597['set']({'label':pt(_0xbf2686,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5b586a}),_0x2e4578['set']({'label':pt(_0xbf2686,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x235108}),_0x4a6597['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2e4578['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4a6597['on']('execute',()=>this['fire']('execute','backward')),_0x2e4578['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',_0x381b5d['if']('_isStatusLabelVisible','ck-hidden',_0x39f9e3=>!_0x39f9e3)]},'children':[{'text':_0x381b5d['to']('isNavigationMode',_0x2043fe=>_0x2043fe?pt(_0xbf2686,'EDIT_X_OF_Y_REVISIONS')+':\x20':pt(_0xbf2686,'Total')+':\x20')}]},{'text':_0x381b5d['to']('_statusText')}]},new nt(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4a6597,_0x2e4578]}]});}};const Pt='ck-editor__editable__loading-overlay';var Ut=class extends _0x2d350d{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2b9a93=this['editor']['editing']['view'];_0x2b9a93['change'](_0x1600dc=>{for(const _0x39500d of _0x2b9a93['document']['roots'])_0x1600dc['addClass'](Pt,_0x39500d);});}['hide'](){const _0x29e2e9=this['editor']['editing']['view'];_0x29e2e9['change'](_0xe93254=>{for(const _0x4e0e84 of _0x29e2e9['document']['roots'])_0xe93254['removeClass'](Pt,_0x4e0e84);});}},Lt=class extends _0x2d350d{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Mt,Ut];}['init'](){const _0x44bf40=this['editor'],_0x8eba02=_0x44bf40['plugins']['get'](Mt),_0x53ac12=_0x44bf40['plugins']['get'](Ut);_0x44bf40['ui']['componentFactory']['add']('exitToEditing',_0x42607e=>{const _0x3731c7=new _0x2c621a(_0x42607e);return _0x3731c7['set']({'label':pt(_0x42607e,'Back\x20to\x20editing'),'icon':_0x87fc34,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3731c7,'execute',()=>{_0x44bf40['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3731c7;}),_0x44bf40['ui']['componentFactory']['add']('restoreRevision',_0x5e3c38=>{const _0x37af3a=new _0x2c621a(_0x5e3c38);return _0x37af3a['set']({'label':pt(_0x5e3c38,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x37af3a['bind']('isEnabled')['to'](_0x44bf40['commands']['get']('restoreRevision')),this['listenTo'](_0x37af3a,'execute',()=>_0x44bf40['execute']('restoreRevision')),_0x37af3a;}),_0x44bf40['ui']['componentFactory']['add']('changesNavigation',_0x226bda=>{const _0x42a231=new Ht(_0x226bda),_0x4883b0=_0x44bf40['commands']['get']('showPreviousChange'),_0x2d5de9=_0x44bf40['commands']['get']('showNextChange');return _0x42a231['bind']('isBackwardNavigationEnabled')['to'](_0x4883b0,'isEnabled'),_0x42a231['bind']('isForwardNavigationEnabled')['to'](_0x2d5de9,'isEnabled'),_0x42a231['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x8eba02),this['listenTo'](_0x42a231,'execute',(_0x1c115e,_0x2353d9)=>{_0x44bf40['execute']('forward'===_0x2353d9?'showNextChange':'showPreviousChange');}),_0x42a231;}),_0x53ac12['show'](),_0x8eba02['on']('change:isReady',(_0x3e1326,_0x569100,_0x47d166)=>{_0x47d166?_0x53ac12['hide']():_0x53ac12['show']();});}},Ft=class extends _0x2db147{['_resizeObserver']=null;constructor(_0x146d57,_0x1aa1a4){super(_0x146d57,_0x1aa1a4);const _0x60868a=this['bindTemplate'];this['set']({'label':pt(_0x146d57,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=pt(_0x146d57,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x60868a['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x52219c(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x388257=this['fieldView']['element'];this['_tooltipString']=_0x388257['scrollWidth']>_0x388257['clientWidth']&&_0x388257['value']||'';}},$t=class extends at{constructor(_0x125af5,_0x307f08,_0x14bf40){super(_0x125af5);const _0xc634e4=new _0x3e155f();_0xc634e4['set']({'content':_0x479fa4,'viewBox':'0\x200\x2011\x2010'});const _0x34ca39=['ck','ck-revision-history-sidebar__revision-author'];_0x14bf40&&_0x34ca39['push']('ck-revision-history-sidebar__revision-author_creator');const _0x129bc0=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':pt(_0x125af5,_0x14bf40?'Revision\x20creator':'Revision\x20author')},'children':[_0xc634e4,_0x307f08['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x34ca39},'children':_0x129bc0});}};function jt(_0x217c53,_0x407118){const _0x4371d7=_0x217c53['bindTemplate'],_0x544bcf=_0x217c53['locale'],_0x56b65b=ct(_0x544bcf);_0x56b65b['panelPosition']='sw';const _0x409a16=function(_0x403054,_0x3ecdeb){const _0x20f51a=function(_0x706a0,_0x40c9b6){const _0x4be2e1=_0x706a0['locale'],_0x5db10e={'Compare\x20against\x20selected':pt(_0x4be2e1,'Compare\x20against\x20selected'),'Name\x20this\x20revision':pt(_0x4be2e1,'Name\x20this\x20revision'),'Restore\x20this\x20revision':pt(_0x4be2e1,'Restore\x20this\x20revision')};return _0x40c9b6['map'](_0x4ad551=>{const _0x491d3a=_0x5db10e[_0x4ad551['name']];return _0x491d3a&&_0x491d3a!==_0x4ad551['name']&&(_0x4ad551['name']=_0x491d3a),_0x4ad551;});}(_0x403054,_0x3ecdeb),_0x5146f9=new _0x1bc318();for(const _0x3ef4e4 of _0x20f51a){const _0x2f4789={'type':'button','model':new rt({'label':_0x3ef4e4['name'],'class':_0x3ef4e4['class'],'withText':!0x0,'role':'menuitem','_action':_0x3ef4e4['action']})};_0x2f4789['model']['bind']('isEnabled')['to'](_0x403054,'isActionsDropdownOpen',_0x4cb4e1=>'function'!=typeof _0x3ef4e4['isEnabled']||(!_0x4cb4e1||_0x3ef4e4['isEnabled'](_0x403054))),_0x5146f9['add'](_0x2f4789);}return _0x5146f9;}(_0x217c53,_0x407118);return _0x217c53['bind']('isActionsDropdownOpen')['to'](_0x56b65b,'isOpen'),_0x56b65b['buttonView']['set']({'label':pt(_0x544bcf,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1a868b}),_0x56b65b['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x4371d7['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x4371d7['to'](_0x4e7d4f=>_0x4e7d4f['stopPropagation']())}}),_0x56b65b['on']('execute',_0x3bcdcc=>{_0x217c53['isReady']&&'function'==typeof _0x3bcdcc['source']['_action']&&_0x3bcdcc['source']['_action'](_0x217c53);}),ht(_0x56b65b,_0x409a16,{'role':'menu'}),_0x56b65b['listenTo'](_0x217c53,'change:isActionsDropdownOpen',(_0x514d46,_0x35dfab,_0x460010)=>{if(_0x460010)for(const _0x1e47d1 of _0x56b65b['listView']['items']){const _0x596e85=_0x1e47d1['children']['first'],_0x13b26a=_0x407118['find'](_0x193eff=>_0x193eff['action']===_0x596e85['_action'])['isVisible'];_0x1e47d1['isVisible']=void 0x0===_0x13b26a||_0x13b26a(_0x217c53);}}),_0x56b65b;}const Bt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x1e283c(at);var Kt=class extends Bt{['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1bdc63,_0x108f5a,_0x407c54,_0x6f3e0){super(_0x1bdc63);const _0x52adae=this['bindTemplate'],_0x322d7f=function(_0x1b3add,_0x5198fe){const _0x1ed093=Array['from'](_0x5198fe['authors'])['filter'](_0x123e39=>_0x123e39!=_0x5198fe['creator']);return _0x5198fe['creator']&&_0x1ed093['unshift'](_0x5198fe['creator']),_0x1ed093['map'](_0xe8580f=>new $t(_0x1b3add,_0xe8580f,_0xe8580f==_0x5198fe['creator']));}(_0x1bdc63,_0x108f5a);this['id']=_0x108f5a['id'],this['_revision']=_0x108f5a,this['_requireRevisionName']=_0x6f3e0,this['bind']('name','createdAt')['to'](_0x108f5a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x21b372=>{return _0x45093c=_0x1bdc63['uiLanguage'],(_0x5f4343=_0x21b372)['toLocaleDateString'](_0x45093c,{'month':'long','day':'numeric'})+',\x20'+_0x5f4343['toLocaleTimeString'](_0x45093c,{'hour':'numeric','minute':'numeric'});var _0x45093c,_0x5f4343;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new Ft(_0x1bdc63,lt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x1e8e7c=>_0x1e8e7c||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x39eb82,_0x1e9ab8)=>_0x39eb82&&_0x1e9ab8),this['revisionActionsView']=_0x407c54&&_0x407c54['length']?jt(this,_0x407c54):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x52adae['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x52adae['if']('isEnabled','ck-disabled',_0x3c9b35=>!_0x3c9b35),_0x52adae['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x52adae['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x52adae['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':_0x52adae['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':_0x322d7f}]},this['revisionActionsView']],'on':{'click':_0x52adae['to'](_0x559295=>{_0x559295['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x535776=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x535776,'change',()=>{this['_requireRevisionName']&&!_0x535776['value']||this['fire']('setName',{'id':this['id'],'name':_0x535776['value']}),_0x535776['value']||(_0x535776['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(_0x1dca45,_0x1b6d43){const _0x140d9b=ft['fromJSDate'](_0x1dca45)['setLocale'](_0x1b6d43),_0x4d3c8f=ft['local'](),_0x2fc6f6=_0x4d3c8f['minus']({'days':0x1})['startOf']('day');let _0x258968,_0x3338c3;return _0x140d9b['hasSame'](_0x4d3c8f,'day')?(_0x258968=_0x140d9b['startOf']('day')['toJSDate'](),_0x3338c3=_0x140d9b['toRelativeCalendar']()):_0x140d9b['hasSame'](_0x2fc6f6,'day')?(_0x258968=_0x2fc6f6['toJSDate'](),_0x3338c3=_0x140d9b['toRelativeCalendar']()):_0x140d9b['hasSame'](_0x4d3c8f,'week')?(_0x258968=_0x140d9b['startOf']('week')['toJSDate'](),_0x3338c3=_0x140d9b['weekdayLong']||''):_0x140d9b['hasSame'](_0x4d3c8f,'year')?(_0x258968=_0x140d9b['startOf']('month')['toJSDate'](),_0x3338c3=_0x140d9b['monthLong']||''):(_0x258968=_0x140d9b['startOf']('year')['toJSDate'](),_0x3338c3=String(_0x140d9b['year'])),{'startDate':_0x258968,'localizedPeriodName':_0x3338c3};}var Gt=class extends at{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x21e16f,_0x111bc7,_0x4716ee,_0xdc9bbf){super(_0x21e16f);const _0x1ea772=qt(_0x111bc7,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x111bc7,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4716ee,this['_requireRevisionName']=_0xdc9bbf,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':_0x1ea772}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x5b03a9){const _0x4ce924=new Kt(this['locale'],_0x5b03a9,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4ce924);}['removeRevision'](_0x3b4b48){const _0x5c5ac7=this['revisionViews']['find'](_0x57ccde=>_0x57ccde['id']===_0x3b4b48['id']);this['revisionViews']['remove'](_0x5c5ac7);}},Jt=class extends at{constructor(_0x35e699){super(_0x35e699);const _0x302421=new _0x3e155f();_0x302421['content']=_0x4f6ef9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x302421,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[pt(_0x35e699,'Revision\x20history')]}]});}},Wt=class extends at{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1a119a,_0x1c9fa8,_0x3216c6,_0x3ecc91){super(_0x1a119a);const _0x37eac6=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1c9fa8,this['_revisionActions']=_0x3216c6,this['_requireRevisionName']=_0x3ecc91,this['on']('select',(_0x33fb8e,_0x5e8019)=>{this['fire']('revisionSelected',_0x5e8019);}),this['on']('setName',(_0x408505,_0x1a4aaa)=>{this['fire']('revisionSetName',_0x1a4aaa);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Jt(_0x1a119a),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x37eac6['if']('isEnabled','ck-disabled',_0x4396de=>!_0x4396de)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2e6d85 of this['_revisions'])this['_addRevision'](_0x2e6d85);this['_revisions']['on']('add',(_0x475c73,_0x5c04b6)=>{this['_addRevision'](_0x5c04b6);}),this['_revisions']['on']('remove',(_0x1fa341,_0x276fc2)=>{this['_removeRevision'](_0x276fc2);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x23253=>_0x23253['revisionViews']['map'](_0x47d3a8=>_0x47d3a8))['flat']();}['selectRevision'](_0x501310){for(const _0xcf0d1c of this['revisionViews'])_0x501310&&_0x501310['id']===_0xcf0d1c['id']?_0xcf0d1c['select']():_0xcf0d1c['deselect']();}['highlightRevisions'](_0x381e76){for(const _0x5b6423 of this['revisionViews'])_0x381e76['some'](({id:_0x5f0c0c})=>_0x5f0c0c===_0x5b6423['id'])?_0x5b6423['highlight']():_0x5b6423['unhighlight']();}['_addRevision'](_0x48003b){const _0x3e25f3=qt(_0x48003b['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5e98d1=this['_getTimePeriodViewByStartDate'](_0x3e25f3);_0x5e98d1||(_0x5e98d1=new Gt(this['locale'],_0x3e25f3,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5e98d1)),_0x5e98d1['addRevision'](_0x48003b);}['_removeRevision'](_0x338e91){const _0xa8c9b2=qt(_0x338e91['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xa8c9b2)['removeRevision'](_0x338e91);}['_getTimePeriodViewByStartDate'](_0x31264d){return this['timePeriodViews']['find'](_0x2cf499=>_0x2cf499['startDate']['getTime']()===_0x31264d['getTime']());}},Yt=class RevisionsSidebar extends _0x2d350d{['_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
|
-
_0x5dc236(_0x2e7c06);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4f53d0,_0x1441ac){super(_0x1441ac),this['sourceElement']=_0x4f53d0,this['model']['document']['createRoot']();const _0x41d388=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x41d388);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x100b8a,_0x518988){const _0x19c574=new this(_0x100b8a,_0x518988);return await _0x19c574['initPlugins'](),await _0x19c574['ui']['init'](_0x100b8a),await _0x19c574['data']['init'](_0x19c574['config']['get']('initialData')||''),_0x19c574['fire']('ready'),_0x19c574;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0xb465bf{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ada94){super(_0x3ada94),this['result']='end',_0x3ada94['editing']['view']['_overlayModeHint']='auto',_0x3ada94['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0xb465bf{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x4b2d64){if(super(_0x4b2d64),!this['editor']['config']['get']('revisionHistory'))throw new _0x9ddf1f('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x221049=>this['_showRevisionViewer']({..._0x221049,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x5ba3e0=>this['_closeRevisionViewer'](_0x5ba3e0)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x52331a=>this['_restoreRevision'](_0x52331a)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x552669){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x552669;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x564c4b){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x564c4b);}['getRevision'](_0x1e3956){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1e3956);}['getRevisions'](_0x44e902){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x44e902||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x1c287c=this['editor'],_0x30a6aa=_0x54ce03(_0x1c287c,ii),_0x406b0b=_0x1c287c['plugins']['get']('RevisionTracker'),_0x40ff60=_0x1c287c['plugins']['get'](_0x5d6be6)['users'];return _0x30a6aa['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x30a6aa['lazyRoots'],(_0x30a6aa['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0xb465bf{static get['requires'](){return[Mt,_0x5d6be6];}['init'](){const _0x200d53=this['editor']['plugins']['get'](_0x5d6be6);for(const _0x3a6bb6 of _0x40ff60)_0x3a6bb6['isAnonymous']||_0x200d53['getUser'](_0x3a6bb6['id'])||_0x200d53['addUser'](_0x3a6bb6);const _0x2dc2d9=_0x406b0b['repository']['getRevisions']();let _0x4b0511=null;const _0x224bdd=this['editor']['plugins']['get']('RevisionViewer');_0x224bdd['adapter']=_0x406b0b['adapter'],_0x224bdd['bind']('isEnabled')['to'](_0x406b0b),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x1c287c,'isReadOnly',_0x3c56e6=>!_0x3c56e6);for(const _0x51e410 of _0x2dc2d9){const _0x4d8b64=null===_0x51e410['creator'];if(_0x4d8b64&&_0x51e410['toVersion']===_0x51e410['fromVersion'])continue;const _0x3ba8a4=_0x51e410['toJSON']();_0x224bdd['addRevisionData'](_0x3ba8a4,(_0x2df48f,_0x5ac9fe,_0x2f63ca)=>{if(_0x4d8b64){if(_0x4b0511)_0x4b0511['_update'](_0x2df48f,_0x5ac9fe);else{if(!_0x5ac9fe){const _0x11820a=_0x2f63ca['toJSON']();_0x11820a['id']=_0x5cb97f(),_0x406b0b['saveRevision'](_0x11820a,_0x2f63ca['toVersion'])['then'](_0x458104=>{_0x4b0511=_0x458104;});}}}else _0x51e410['_update'](_0x2df48f,_0x5ac9fe);});}}},Yt),_0x30a6aa);}['_enhanceShowRevisionViewerCallback'](){const _0x1f63c0=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x151ff2=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x151ff2['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2fe814=this['editor']['plugins']['get']('Dialog');_0x2fe814['isOpen']&&_0x2fe814['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x494571=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x54ea9b of _0x494571)_0x54ea9b['class']=_0x54ea9b['class']?_0x54ea9b['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x1dd9c5=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1dd9c5&&_0x1dd9c5['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x11a164=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x11a164&&_0x11a164['setAttribute']('tabindex','-1');}}return _0x1f63c0(this['_getRevisionViewerEditorConfig']())['then'](_0x503e16=>(this['_viewerEditor']=_0x503e16,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'),_0x503e16))['catch'](_0xa18f6=>(console['error'](_0xa18f6),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x398214=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 _0x3d9b51=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4b6bfa of _0x3d9b51)_0x4b6bfa['class']='ck-tab-panel_disabled'===_0x4b6bfa['class']?'':_0x4b6bfa['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x28d94a=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x28d94a&&_0x28d94a['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5bfb34=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5bfb34&&_0x5bfb34['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x398214(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x43fffb=this['editor']['plugins']['get']('Annotations');_0x43fffb['refreshVisibility'](),_0x43fffb['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2fd442){const _0x43807c=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x140fde=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x20c46e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x20c46e,_0x2fd442)['then'](_0x8075cd=>(_0x140fde['style']['display']='block',_0x43807c['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x8075cd));}['_closeRevisionViewer'](_0x1bcbbb){const _0x183abc=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x183abc['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x1bcbbb['destroy']();}async['_restoreRevision'](_0x507137){const _0x19ba06=this['editor'],_0x3d8771=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x4413f4=_0x19ba06['plugins']['get']('RevisionTracker'),_0x1b2459=_0x19ba06['plugins']['get']('RevisionHistoryUtils'),_0x4196a9=_0x3d8771['repository']['getRevision'](_0x507137);let _0x534271,_0xff7109,_0x53ea75;try{await _0x1b2459['loadRevisionData'](_0x4196a9,this['adapter']),_0x534271=_0x1b2459['getRevisionDocumentData'](_0x4196a9),_0xff7109=_0x1b2459['getRevisionRootsAttributes'](_0x4196a9);}catch(_0x5a0c34){return void console['error'](_0x5a0c34);}_0x19ba06['model']['change'](_0x49732f=>{for(const _0x1b52e5 of Array['from'](_0x19ba06['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x49732f['removeMarker'](_0x1b52e5);}),_0x3d8771['isReady']=!0x1,_0x19ba06['model']['enqueueChange'](_0x3d6fd6=>{_0x3d6fd6['setSelection'](null),_0x3d6fd6['removeSelectionAttribute'](_0x19ba06['model']['document']['selection']['getAttributeKeys']());const _0x3aac43=Object['keys'](_0x534271);for(const _0x56f29b of _0x19ba06['model']['document']['roots'])'$graveyard'!=_0x56f29b['rootName']&&_0x56f29b['isAttached']()&&!_0x3aac43['includes'](_0x56f29b['rootName'])&&_0x3d6fd6['detachRoot'](_0x56f29b);for(const _0x461292 of _0x3aac43){let _0xef1a73=_0x19ba06['model']['document']['getRoot'](_0x461292);if(!_0xef1a73||!_0xef1a73['isAttached']()){const _0x7ddd1e=_0x4196a9['diffData']?.[_0x461292]?.['rootElementName']||'$root';_0xef1a73=_0x3d6fd6['addRoot'](_0x461292,_0x7ddd1e);}const _0xc01af=_0xff7109[_0x461292],_0x310396=Object['keys'](_0xc01af),_0x117856=_0x534271[_0x461292];for(const _0x2a6ceb of _0xef1a73['getAttributeKeys']())_0x310396['includes'](_0x2a6ceb)||_0x3d6fd6['removeAttribute'](_0x2a6ceb,_0xef1a73);for(const _0x3d5e31 of _0x310396)_0x3d6fd6['setAttribute'](_0x3d5e31,_0xff7109[_0x461292][_0x3d5e31],_0xef1a73);_0x3d6fd6['remove'](_0x3d6fd6['createRangeIn'](_0xef1a73)),_0x3d6fd6['insert'](_0x19ba06['data']['parse'](_0x117856,_0xef1a73),_0xef1a73,0x0);}});const _0x472282=pt(_0x19ba06['locale'],'Restored');if(_0x4196a9['name'])_0x53ea75=-0x1==_0x4196a9['name']['indexOf'](_0x472282)?_0x472282+':\x20'+_0x4196a9['name']:_0x4196a9['name'];else _0x53ea75=_0x472282+':\x20'+(_0x4196a9['createdAt']['toLocaleDateString'](_0x19ba06['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4196a9['createdAt']['toLocaleTimeString'](_0x19ba06['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x4413f4['saveRevision']({'name':_0x53ea75}),_0x3d8771['isReady']=!0x0,_0x19ba06['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(_0x2d663c){super(_0x2d663c),this['_revisionViewer']=_0x2d663c['plugins']['get'](Mt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x3f50d8=this['_revisionsRepository']['_revisions'],_0x250baa=this['_createRevisionActions'](),_0x1f0e96=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Wt(this['editor']['locale'],_0x3f50d8,_0x250baa,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',(_0x89e13f,_0xfee5ce)=>{_0xfee5ce['revisionViews']['on']('add',(_0x583c74,_0x2fab19)=>{_0x2fab19['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)),_0x1f0e96['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x46b201=this['_revisionsRepository']['getRevision'](0x0);if(_0x46b201){const _0x57d667=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x46b201['id']);this['_revisionViewer']['compare'](_0x46b201,_0x57d667);}}['_handleRevisionSelected'](_0x504a13,_0x4d3c5e){const _0x207e88=this['_revisionsRepository']['getRevision'](_0x4d3c5e['id']),_0x495795=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x207e88['id']);this['_revisionViewer']['compare'](_0x207e88,_0x495795);}['_handleRevisionSetName'](_0x5921d6,_0x1fc49c){this['_revisionsRepository']['getRevision'](_0x1fc49c['id'])['setName'](_0x1fc49c['name']);}['_handleDiffChange'](_0x4355b4,_0x55d139,_0xa54d5d){const _0x240667=this['_revisionsRepository']['getRevisionsInDiff'](_0xa54d5d);_0x240667['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x240667),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x240667[0x0]));}['_createRevisionActions'](){const _0x5df184=this['editor'],_0x1556db=RevisionsSidebar['availableRevisionActions'],_0x153f6c=_0x5df184['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x153f6c['length'])return _0x153f6c['map'](_0x42a886=>{const _0x11547e='string'==typeof _0x42a886?Object['assign']({},_0x1556db[_0x42a886]):_0x42a886;return _0x11547e['action']=_0x11547e['action']['bind'](this,_0x5df184),_0x11547e['isVisible']&&(_0x11547e['isVisible']=_0x11547e['isVisible']['bind'](this,_0x5df184)),_0x11547e;});}};function Xt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1b5dfb},_0x257464)=>{const _0x3520ce=_0x1b5dfb['get'](Mt),_0xc9f73d=_0x3520ce['repository'];let _0x26ec2f=_0x3520ce['diff']['newRevisionId'],_0x27e1b6=_0x257464['id'];_0xc9f73d['getIndex'](_0x26ec2f)>_0xc9f73d['getIndex'](_0x27e1b6)&&([_0x26ec2f,_0x27e1b6]=[_0x27e1b6,_0x26ec2f]),_0x3520ce['compare'](_0x26ec2f,_0x27e1b6);},'isVisible':({plugins:_0x1d7828},_0x8abc51)=>{const _0x3750d3=_0x1d7828['get'](Mt);return!(_0x3750d3['repository']['getRevisionsInDiff'](_0x3750d3['diff'])['length']>0x2)&&!_0x8abc51['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1b0933,{id:_0x39a6b2})=>{_0x1b0933['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x39a6b2);},'isVisible':({plugins:_0x50e394},_0x45b769)=>!!_0x50e394['get'](Mt)['repository']['getLaterVisibleRevision'](_0x45b769['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x5c7a33},{id:_0x11e0ac,revisionNameView:_0x29e74f})=>{const _0x3574e4=_0x5c7a33['get'](Mt),_0x4ff674=_0x3574e4['repository']['getEarlierVisibleRevision'](_0x11e0ac);_0x3574e4['compare'](_0x11e0ac,_0x4ff674),_0x29e74f['focus'](),_0x29e74f['fieldView']['select']();}}};}var Qt=class extends _0x57e397{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4ab081,_0x1dff47){super(_0x4ab081),this['_view']=_0x1dff47,this['_toolbarConfig']=ut(_0x4ab081['config']['get']('toolbar')),this['_elementReplacer']=new _0x5ddb6f();}get['element'](){return this['view']['element'];}['init'](_0xa6dc91){const _0x52ef05=this['editor'],_0x558f0b=this['view'],_0x48a982=_0x52ef05['editing']['view'],_0x5939e3=_0x558f0b['editable'];_0x5939e3['name']=_0x48a982['document']['getRoot']()['rootName'],_0x558f0b['render']();const _0x32bbcf=_0x5939e3['element'];this['setEditableElement'](_0x5939e3['name'],_0x32bbcf),_0x558f0b['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x48a982['attachDomRoot'](_0x32bbcf),this['_elementReplacer']['replace'](_0xa6dc91,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x343789=this['view'],_0x18c1a7=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x18c1a7['detachDomRoot'](_0x343789['editable']['name']),_0x343789['destroy']();}['_initToolbar'](){const _0x593855=this['view'];_0x593855['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x593855['stickyPanel']['limiterElement']=_0x593855['element'],_0x593855['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1f57b5})=>_0x1f57b5),_0x593855['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x593855['toolbar']);}},zt=class extends _0x1c056f{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x540612,_0x59e44f,_0x3b7c28={}){super(_0x540612),this['stickyPanel']=new st(_0x540612),this['toolbar']=new ot(_0x540612,{'shouldGroupWhenFull':_0x3b7c28['shouldToolbarGroupWhenFull']}),this['_editable']=new _0x132cfb(_0x540612,_0x59e44f);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const Zt=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x2f6c25(_0xb14c4b);var ti=class extends Zt{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4c9ba9,_0x4d7650){super(_0x4d7650),this['sourceElement']=_0x4c9ba9,this['model']['document']['createRoot']();const _0x45a40d=new zt(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Qt(this,_0x45a40d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x218987,_0x167d83){const _0x4517d9=new this(_0x218987,_0x167d83);return await _0x4517d9['initPlugins'](),await _0x4517d9['ui']['init'](_0x218987),await _0x4517d9['data']['init'](_0x4517d9['config']['get']('initialData')||''),_0x4517d9['fire']('ready'),_0x4517d9;}};const ii=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];var ei=class extends _0x2d350d{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20f2db){super(_0x20f2db),this['result']='end',_0x20f2db['editing']['view']['_overlayModeHint']='auto',_0x20f2db['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},si=class extends _0x2d350d{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_t,St];}constructor(_0x46d096){if(super(_0x46d096),!this['editor']['config']['get']('revisionHistory'))throw new _0x5ae7f6('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x228691=>this['_showRevisionViewer']({..._0x228691,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x318863=>this['_closeRevisionViewer'](_0x318863)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4dd5f4=>this['_restoreRevision'](_0x4dd5f4)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x534850){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x534850;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x350339){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x350339);}['getRevision'](_0x40768f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x40768f);}['getRevisions'](_0x54931a){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x54931a||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x262b3f=this['editor'],_0x5396d7=_0x4d7af6(_0x262b3f,ii),_0x383f32=_0x262b3f['plugins']['get']('RevisionTracker'),_0x353391=_0x262b3f['plugins']['get'](_0x2eba5e)['users'];return _0x5396d7['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5396d7['lazyRoots'],(_0x5396d7['plugins']['push'](ei,Mt,Lt,class RevisionViewerInit extends _0x2d350d{static get['requires'](){return[Mt,_0x2eba5e];}['init'](){const _0x46926d=this['editor']['plugins']['get'](_0x2eba5e);for(const _0x154680 of _0x353391)_0x154680['isAnonymous']||_0x46926d['getUser'](_0x154680['id'])||_0x46926d['addUser'](_0x154680);const _0x378ad3=_0x383f32['repository']['getRevisions']();let _0x374c87=null;const _0x541aa4=this['editor']['plugins']['get']('RevisionViewer');_0x541aa4['adapter']=_0x383f32['adapter'],_0x541aa4['bind']('isEnabled')['to'](_0x383f32),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x262b3f,'isReadOnly',_0x408607=>!_0x408607);for(const _0x3a2629 of _0x378ad3){const _0x227572=null===_0x3a2629['creator'];if(_0x227572&&_0x3a2629['toVersion']===_0x3a2629['fromVersion'])continue;const _0x3dd4b3=_0x3a2629['toJSON']();_0x541aa4['addRevisionData'](_0x3dd4b3,(_0x1f0624,_0x423228,_0x57d116)=>{if(_0x227572){if(_0x374c87)_0x374c87['_update'](_0x1f0624,_0x423228);else{if(!_0x423228){const _0x3c512b=_0x57d116['toJSON']();_0x3c512b['id']=_0x590d2c(),_0x383f32['saveRevision'](_0x3c512b,_0x57d116['toVersion'])['then'](_0x22994f=>{_0x374c87=_0x22994f;});}}}else _0x3a2629['_update'](_0x1f0624,_0x423228);});}}},Yt),_0x5396d7);}['_enhanceShowRevisionViewerCallback'](){const _0x473326=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2341a4=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x2341a4['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x139122=this['editor']['plugins']['get']('Dialog');_0x139122['isOpen']&&_0x139122['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x435559=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x2befab of _0x435559)_0x2befab['class']=_0x2befab['class']?_0x2befab['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x4529ce=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4529ce&&_0x4529ce['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4b3cef=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4b3cef&&_0x4b3cef['setAttribute']('tabindex','-1');}}return _0x473326(this['_getRevisionViewerEditorConfig']())['then'](_0x4c7783=>(this['_viewerEditor']=_0x4c7783,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'),_0x4c7783))['catch'](_0x46df86=>(console['error'](_0x46df86),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5b6a4c=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 _0x208d5e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4b1a01 of _0x208d5e)_0x4b1a01['class']='ck-tab-panel_disabled'===_0x4b1a01['class']?'':_0x4b1a01['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x262986=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x262986&&_0x262986['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x268a19=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x268a19&&_0x268a19['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5b6a4c(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x5e2617=this['editor']['plugins']['get']('Annotations');_0x5e2617['refreshVisibility'](),_0x5e2617['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2248a3){const _0x33f9ab=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x7da0af=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4ceb1f=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ti['create'](_0x4ceb1f,_0x2248a3)['then'](_0x13a0d4=>(_0x7da0af['style']['display']='block',_0x33f9ab['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x13a0d4));}['_closeRevisionViewer'](_0x10ec76){const _0x2101b4=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2101b4['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x10ec76['destroy']();}async['_restoreRevision'](_0x41cf40){const _0x2f62b1=this['editor'],_0x2af286=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5b8a0c=_0x2f62b1['plugins']['get']('RevisionTracker'),_0x2a29b6=_0x2f62b1['plugins']['get']('RevisionHistoryUtils'),_0xcf9099=_0x2af286['repository']['getRevision'](_0x41cf40);let _0x3d15ea,_0x26d88e,_0x586eb5;try{await _0x2a29b6['loadRevisionData'](_0xcf9099,this['adapter']),_0x3d15ea=_0x2a29b6['getRevisionDocumentData'](_0xcf9099),_0x26d88e=_0x2a29b6['getRevisionRootsAttributes'](_0xcf9099);}catch(_0x5adb56){return void console['error'](_0x5adb56);}_0x2f62b1['model']['change'](_0x21c9c7=>{for(const _0x13539d of Array['from'](_0x2f62b1['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x21c9c7['removeMarker'](_0x13539d);}),_0x2af286['isReady']=!0x1,_0x2f62b1['model']['enqueueChange'](_0x44fe85=>{_0x44fe85['setSelection'](null),_0x44fe85['removeSelectionAttribute'](_0x2f62b1['model']['document']['selection']['getAttributeKeys']());const _0x4cf1ae=Object['keys'](_0x3d15ea);for(const _0x4405f7 of _0x2f62b1['model']['document']['roots'])'$graveyard'!=_0x4405f7['rootName']&&_0x4405f7['isAttached']()&&!_0x4cf1ae['includes'](_0x4405f7['rootName'])&&_0x44fe85['detachRoot'](_0x4405f7);for(const _0x4160d4 of _0x4cf1ae){let _0xeaa3d5=_0x2f62b1['model']['document']['getRoot'](_0x4160d4);if(!_0xeaa3d5||!_0xeaa3d5['isAttached']()){const _0x503ba4=_0xcf9099['diffData']?.[_0x4160d4]?.['rootElementName']||'$root';_0xeaa3d5=_0x44fe85['addRoot'](_0x4160d4,_0x503ba4);}const _0x17f6ce=_0x26d88e[_0x4160d4],_0x4c9217=Object['keys'](_0x17f6ce),_0x264e55=_0x3d15ea[_0x4160d4];for(const _0xa18b3c of _0xeaa3d5['getAttributeKeys']())_0x4c9217['includes'](_0xa18b3c)||_0x44fe85['removeAttribute'](_0xa18b3c,_0xeaa3d5);for(const _0x3d1ed4 of _0x4c9217)_0x44fe85['setAttribute'](_0x3d1ed4,_0x26d88e[_0x4160d4][_0x3d1ed4],_0xeaa3d5);_0x44fe85['remove'](_0x44fe85['createRangeIn'](_0xeaa3d5)),_0x44fe85['insert'](_0x2f62b1['data']['parse'](_0x264e55,_0xeaa3d5),_0xeaa3d5,0x0);}});const _0x54e22e=pt(_0x2f62b1['locale'],'Restored');if(_0xcf9099['name'])_0x586eb5=-0x1==_0xcf9099['name']['indexOf'](_0x54e22e)?_0x54e22e+':\x20'+_0xcf9099['name']:_0xcf9099['name'];else _0x586eb5=_0x54e22e+':\x20'+(_0xcf9099['createdAt']['toLocaleDateString'](_0x2f62b1['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xcf9099['createdAt']['toLocaleTimeString'](_0x2f62b1['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5b8a0c['saveRevision']({'name':_0x586eb5}),_0x2af286['isReady']=!0x0,_0x2f62b1['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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-revision-history",
|
|
3
|
-
"version": "48.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.5",
|
|
4
4
|
"description": "Document revision history feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-autosave": "48.3.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-collaboration-core": "48.3.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-comments": "48.3.0-alpha.
|
|
40
|
-
"@ckeditor/ckeditor5-core": "48.3.0-alpha.
|
|
41
|
-
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.
|
|
42
|
-
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.
|
|
43
|
-
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.
|
|
44
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
45
|
-
"@ckeditor/ckeditor5-widget": "48.3.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-autosave": "48.3.0-alpha.5",
|
|
38
|
+
"@ckeditor/ckeditor5-collaboration-core": "48.3.0-alpha.5",
|
|
39
|
+
"@ckeditor/ckeditor5-comments": "48.3.0-alpha.5",
|
|
40
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.5",
|
|
41
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.5",
|
|
42
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.5",
|
|
43
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.5",
|
|
44
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.5",
|
|
45
|
+
"@ckeditor/ckeditor5-widget": "48.3.0-alpha.5",
|
|
46
46
|
"@types/luxon": "3.6.2",
|
|
47
47
|
"es-toolkit": "1.45.1",
|
|
48
48
|
"luxon": "3.6.1"
|