@ckeditor/ckeditor5-revision-history 49.0.0-alpha.9 → 49.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{CKEditorError as
|
|
24
|
-
_0x57c0bb();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x2d881c){super(),this['id']=_0x2d881c['id']||_0x5289a7(),this['creator']=_0x2d881c['creator']||null,this['authors']=_0x2d881c['authors']||[],this['diffData']=_0x2d881c['diffData']||null,this['toVersion']=_0x2d881c['toVersion']||0x0,this['fromVersion']=_0x2d881c['fromVersion']||0x0,this['set']('name',_0x2d881c['name']||''),this['set']('createdAt',_0x2d881c['createdAt']||new Date()),this['set']('attributes',_0x2d881c['attributes']||{});}setName(_0x2e7d63){this['_update']({'name':_0x2e7d63});}setAttribute(_0x536a23,_0x342934){const _0xf3bc6d=_0x144f08(this['attributes']);_0x4968aa(_0xf3bc6d,_0x536a23,_0x342934),this['_update']({'attributes':_0xf3bc6d});}removeAttribute(_0x59e59b){const _0x194d9f=_0x144f08(this['attributes']);_0xc0e3c(_0x194d9f,_0x59e59b),this['_update']({'attributes':_0x194d9f});}_update(_0x5c2d36,_0x5a95f3=!0x1){let _0x5812e7=!0x1;const _0x4795fa={'id':this['id']};for(const _0x1d16b4 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x1d7ecc=_0x5c2d36[_0x1d16b4];void 0x0!==_0x1d7ecc&&_0x1d7ecc!==this[_0x1d16b4]&&(this[_0x1d16b4]=_0x1d7ecc,_0x4795fa[_0x1d16b4]=_0x1d7ecc,_0x5812e7=!0x0);}_0x5812e7&&(_0x4795fa['authors']&&(_0x4795fa['authorsIds']=_0x4795fa['authors']['map'](_0x32fa42=>_0x32fa42['id']),delete _0x4795fa['authors']),this['fire']('_update',_0x4795fa,_0x5a95f3));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4f3c33=>_0x4f3c33['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x3ccb16{['_revisions'];static get requires(){return[_0x312567];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x405b1f){super(_0x405b1f),this['_revisions']=new _0x520f62();}afterInit(){!async function(_0x5d3103){const _0x44eba8='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x49574b=0xeb829,_0x3d9cb3=0x797b8,_0x23fdc4={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2fc968(_0x55c3da){const _0x5effa8=new window['Promise'](_0x4e2494=>{_0x55c3da['once']('ready',_0x4e2494);}),_0x46dead=window['Date']['now'](),_0x3e3791=_0x55c3da['config']['get']('licenseKey');async function _0x23d7b6(){let _0x205ac9,_0x340a20=null,_0x3e0dd1=null;try{return'GPL'==_0x3e3791?'NotAllowed':(_0x205ac9=_0x459193(),_0x205ac9?(_0x205ac9['usageEndpoint']&&(_0x3e0dd1=_0x4bc903(_0x205ac9['usageEndpoint'],_0x205ac9['jti'])),await _0x3cb8bd()?_0x5a3096()?_0x4648df()?'Expired':_0x1e202b()?('evaluation'==_0x205ac9['licenseType']&&(_0x340a20=_0x3fcae4('EvaluationLimit')),await _0x5c54a9()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4648df(){const _0x2f56f7=['evaluation','trial']['includes'](_0x205ac9['licenseType'])?_0x46dead/0x3e8:0xe10*_0x3d9cb3;return _0x205ac9['exp']<_0x2f56f7;}function _0x5a3096(){const _0x21a57=_0x205ac9['features'];if(!_0x21a57)return!0x1;if(_0x21a57['includes']('*'))return!0x0;if(_0x21a57['includes']('RH'))return!0x0;if(_0x21a57['includes']('RRH')){if(_0x188ec7())return!0x0;if(_0x20125b()||_0x17e957())return!0x0;}return!0x1;}function _0x1e202b(){const _0x570773=_0x205ac9['licensedHosts'];if(!_0x570773||0x0==_0x570773['length'])return!0x0;const {hostname:_0x306ddd}=new URL(window['location']['href']);if(_0x570773['includes'](_0x306ddd))return!0x0;const _0x111790=_0x306ddd['split']('.');return _0x570773['filter'](_0x4cf020=>_0x4cf020['includes']('*'))['map'](_0x3e7676=>_0x3e7676['split']('.'))['filter'](_0x301826=>_0x301826['length']<=_0x111790['length'])['map'](_0x36576a=>Array(_0x111790['length']-_0x36576a['length'])['fill']('*'===_0x36576a[0x0]?'*':'')['concat'](_0x36576a))['some'](_0x5ebccc=>_0x111790['every']((_0x32a90e,_0x922d0)=>_0x5ebccc[_0x922d0]===_0x32a90e||'*'===_0x5ebccc[_0x922d0]));}function _0x5c54a9(){return _0x340a20&&_0x3e0dd1?new window['Promise']((_0x49343f,_0x333cdd)=>{_0x340a20['then'](_0x49343f,_0x333cdd),_0x3e0dd1['then'](_0x498b66=>{'Valid'!=_0x498b66&&_0x49343f(_0x498b66);},_0x333cdd);}):_0x340a20||_0x3e0dd1||'Valid';}}function _0x4bc903(_0x5edd18,_0x320b15){return new window['Promise'](_0x426553=>{if(_0x22258a())return _0x426553('Valid');_0x16761d(),_0x55c3da['decorate']('_sendUsageRequest');let _0x22e731=!0x1;const _0x78fb9b=_0x5289a7();function _0x103109(_0x1637f3){return!!_0x1637f3&&('object'==typeof _0x1637f3||'function'==typeof _0x1637f3)&&'function'==typeof _0x1637f3['then']&&'function'==typeof _0x1637f3['catch'];}function _0x565a8c(_0x492f2c){_0x57c7f1(_0x492f2c)['then'](_0x1ef500=>_0x1ef500&&'ok'==_0x1ef500['status']?_0x36bac0(_0x411190(_0x78fb9b+_0x320b15))!=_0x1ef500['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4b8b96=>(_0x15db3b(),_0x4b8b96),()=>{const _0x353dd9=_0x1f81b5();return null==_0x353dd9?(_0x15db3b(),'Valid'):_0x46dead-_0x353dd9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x426553)['catch'](()=>{_0x426553('UsageLimit');});const _0xd5d92f=0x36ee80;function _0x15db3b(){const _0x141f70='llct-'+_0x36bac0(_0x411190(_0x5edd18)),_0x210bcf=_0x10d043(_0x36bac0(window['Math']['ceil'](_0x46dead/_0xd5d92f)));window['localStorage']['setItem'](_0x141f70,_0x210bcf);}function _0x1f81b5(){const _0x661d06='llct-'+_0x36bac0(_0x411190(_0x5edd18)),_0x1e44af=window['localStorage']['getItem'](_0x661d06);return _0x1e44af?window['parseInt'](_0x10d043(_0x1e44af),0x10)*_0xd5d92f:null;}function _0x57c7f1(_0x452e66){return new window['Promise']((_0x307b5f,_0x26cb78)=>{_0x452e66['then'](_0x307b5f,_0x26cb78),window['setTimeout'](_0x26cb78,0x1d4c0);});}}_0x55c3da['on']('_sendUsageRequest',(_0x2ec327,_0x4ca0c6)=>{if(_0x4ca0c6[0x0]!=_0x5edd18)return _0x426553('UsageLimit');_0x4ca0c6[0x1]={..._0x4ca0c6[0x1],'requestId':_0x78fb9b};},{'priority':'high'}),_0x55c3da['on']('_sendUsageRequest',_0x3c9c41=>{_0x103109(_0x3c9c41['return'])&&(_0x22e731=!0x0,_0x565a8c(_0x3c9c41['return']));},{'priority':'low'}),_0x5effa8['then'](()=>{_0x22e731||_0x426553('UsageLimit');});});function _0x22258a(){return'auto'==_0x55c3da['editing']['view']['_overlayModeHint'];}function _0x16761d(){_0x55c3da['editing']['view']['_overlayModeHint']='auto';}}function _0x3fcae4(_0xd17412){const _0x33c371=[new window['Promise'](_0x3e0cee=>setTimeout(_0x3e0cee,0x93ecc)),_0x5effa8['then'](()=>new window['Promise'](_0x35de56=>{const _0x4cb35e=0x7,_0x52b708=_0x5d3103['_revisions'];function _0x3d0d53(){_0x52b708['length']>=_0x4cb35e&&_0x35de56();}_0x3d0d53(),_0x52b708['on']('add',_0x3d0d53);})),new window['Promise'](_0x5854c3=>{function _0x5eab0b(){for(const _0x4a5bec in window)if(window['Number']['isNaN'](window['Number'](_0x4a5bec))&&window[_0x4a5bec]==_0x49574b)return _0x5854c3();'destroyed'!=_0x55c3da['state']&&window['setTimeout'](_0x5eab0b,0x1388);}_0x169a2a('RevisionViewer')&&_0x5eab0b();})];return window['Promise']['race'](_0x33c371)['then'](()=>_0xd17412);}async function _0x52d941(){if(await _0x5effa8,_0x169a2a('RevisionViewer')){const _0x13c7c2=_0x5d3103['getRevision'](0x0),_0x3a54f8=_0x5d3103['getEarlierVisibleRevision'](_0x13c7c2['id']),_0x4dcaa1=_0x3658c1('RevisionViewer');return await _0x4dcaa1['compare'](_0x13c7c2['id'],_0x3a54f8?_0x3a54f8['id']:null,!0x0),_0x4dcaa1['unbind']('isEnabled'),_0x4dcaa1['isEnabled']=!0x1,_0x4dcaa1['compare']=_0x21df41,void(_0x4dcaa1['_getDiff']=_0x21df41);}if(_0x169a2a('RevisionTracker')){const _0x24baf2=_0x3658c1('RevisionTracker');_0x24baf2['unbind']('isEnabled'),_0x24baf2['isEnabled']=!0x1,_0x24baf2['update']=_0x21df41,_0x24baf2['saveRevision']=_0x21df41;}_0x55c3da['model']['change']=_0x21df41,_0x55c3da['model']['enqueueChange']=_0x21df41,_0x55c3da['enableReadOnlyMode']('model');}function _0x188ec7(){return _0x169a2a('WebSocketGateway')&&'connected'==_0x3658c1('WebSocketGateway')['state'];}function _0x20125b(){return _0x169a2a('RevisionViewerIntegration');}function _0x17e957(){return _0x169a2a('TrackChangesDataGetter');}function _0x26bc3c(_0x142915){const _0x42918d=_0x5c6ceb();_0x55c3da[_0x42918d]='revisionHistoryLicenseKey'+_0x142915,_0x142915['endsWith']('Limit')&&(window[_0x5c6ceb()]=_0x49574b),'Valid'!=_0x142915&&_0x52d941();}function _0x5c6ceb(){const _0x4fdaab=window['String'](window['performance']['now']())['replace']('.','');let _0x47720b='N';for(let _0x9a7332=0x0;_0x9a7332<_0x4fdaab['length'];_0x9a7332+=0x2){let _0x13eaf6=window['parseInt'](_0x4fdaab['substring'](_0x9a7332,_0x9a7332+0x2));_0x13eaf6>=0x3e&&(_0x13eaf6-=0x3e),_0x47720b+=_0x44eba8[_0x13eaf6];}return _0x47720b;}function _0x459193(){const _0x194edf=_0x3e3791['split']('.');if(0x3!=_0x194edf['length'])return null;return _0x161df1(_0x194edf[0x1]);function _0x161df1(_0x1394ea){const _0x4765d2=_0x5e0779(_0x1394ea);return _0x4765d2&&_0x4e9675()?_0x4765d2:null;function _0x4e9675(){const _0xcf4676=_0x4765d2['jti'],_0x52c9eb=window['parseInt'](_0xcf4676['substring'](_0xcf4676['length']-0x8),0x10),_0x1a3d8e={..._0x4765d2,'jti':_0xcf4676['substring'](0x0,_0xcf4676['length']-0x8)};return delete _0x1a3d8e['vc'],_0x411190(_0x1a3d8e)==_0x52c9eb;}}}async function _0x3cb8bd(){let _0x5468f3=!0x0;try{const [_0x2821b6,_0x1cc77c,_0x5521ac]=_0x3e3791['split']('.');return _0x2c1693(_0x2821b6),await _0x22448c(_0x2821b6,_0x1cc77c,_0x5521ac),_0x5468f3;}catch{return!0x1;}function _0x2c1693(_0x39f86a){const _0x1e2304=_0x5e0779(_0x39f86a);_0x1e2304&&'ES256'==_0x1e2304['alg']||(_0x5468f3=!0x1);}async function _0x22448c(_0x5cb688,_0x1cab3c,_0x1121d2){const _0x1139a4=window['Uint8Array']['from'](_0x1b6d3c(_0x1121d2),_0x102006=>_0x102006['charCodeAt'](0x0)),_0x6dc372=new window['TextEncoder']()['encode'](_0x5cb688+'.'+_0x1cab3c),_0x24d049=window['crypto']['subtle'];if(!_0x24d049)return;const _0x50ec3e=await _0x24d049['importKey']('jwk',_0x23fdc4,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x24d049['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x50ec3e,_0x1139a4,_0x6dc372)||(_0x5468f3=!0x1);}}function _0x5e0779(_0x55157c){return _0x55157c['startsWith']('ey')?JSON['parse'](_0x1b6d3c(_0x55157c)):null;}function _0x1b6d3c(_0x526731){return window['atob'](_0x526731['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x411190(_0x4e1585){let _0x5462fc=0x1505;function _0x18ff81(_0x27ea9f){for(let _0x5724bc=0x0;_0x5724bc<_0x27ea9f['length'];_0x5724bc++){const _0x188268=_0x27ea9f['charCodeAt'](_0x5724bc);_0x5462fc=(_0x5462fc<<0x5)+_0x5462fc+_0x188268,_0x5462fc&=_0x5462fc;}}function _0x19c06f(_0x407db5){Array['isArray'](_0x407db5)?_0x407db5['forEach'](_0x19c06f):_0x407db5&&'object'==typeof _0x407db5?Object['entries'](_0x407db5)['sort']()['forEach'](([_0x5659ff,_0x569fd0])=>{_0x18ff81(_0x5659ff),_0x19c06f(_0x569fd0);}):_0x18ff81(window['String'](_0x407db5));}return _0x19c06f(_0x4e1585),_0x5462fc>>>0x0;}function _0x36bac0(_0x4471ed){return _0x4471ed['toString'](0x10)['padStart'](0x8,'0');}function _0x10d043(_0x1dadd6){return _0x1dadd6['split']('')['reverse']()['join']('');}function _0x169a2a(_0x26e35f){return _0x55c3da['plugins']['has'](_0x26e35f);}function _0x3658c1(_0x469e33){return _0x55c3da['plugins']['get'](_0x469e33);}function _0x21df41(){}_0x26bc3c(await _0x23d7b6());}_0x2fc968(_0x5d3103['editor']);}(this);}createRevision(_0x2a0f82){const _0x1ac7a7=this['editor']['plugins']['get']('Users');return new yt({'id':_0x2a0f82['id'],'name':_0x2a0f82['name'],'creator':_0x2a0f82['creatorId']?_0x1ac7a7['getUser'](_0x2a0f82['creatorId']):null,'diffData':_0x2a0f82['diffData']||_0x2a0f82['data'],'authors':_0x2a0f82['authorsIds']['map'](_0x902fac=>_0x1ac7a7['getUser'](_0x902fac)),'createdAt':new Date(_0x2a0f82['createdAt']),'attributes':_0x2a0f82['attributes'],'fromVersion':_0x2a0f82['fromVersion'],'toVersion':_0x2a0f82['toVersion']});}['addRevision'](_0x162eb2,_0x1090cf=0x0){this['_revisions']['add'](_0x162eb2,_0x1090cf);}getRevision(_0x4ae708){return this['_revisions']['get'](_0x4ae708);}getRevisions(_0x19f9d7={'toJSON':!0x1}){const _0x125b02=Array['from'](this['_revisions']);return _0x125b02['reverse'](),_0x19f9d7['toJSON']?_0x125b02['map'](_0x4ceef8=>_0x4ceef8['toJSON']()):_0x125b02;}getIndex(_0x1be798){return this['_revisions']['getIndex'](_0x1be798);}getEarlierVisibleRevision(_0x3d5fe7){const [,_0x1f7d3d]=this['getRevisionsIterator'](_0x3d5fe7,{'direction':'earlier'});return _0x1f7d3d;}getLaterVisibleRevision(_0x5be0cf){const [,_0x57a562]=this['getRevisionsIterator'](_0x5be0cf,{'direction':'later'});return _0x57a562;}getRevisionsInDiff(_0xf435d2){const _0x457ebf=[];for(const _0x5a1610 of this['getRevisionsIterator'](_0xf435d2['newRevisionId']))if(_0x457ebf['push'](_0x5a1610),_0x5a1610['id']===_0xf435d2['oldRevisionId'])break;return _0x457ebf;}*getRevisionsIterator(_0x48da3e,{direction:_0x50239d='earlier',filter:_0x51e20e=()=>!0x0}={}){const _0x50a11f='earlier'===_0x50239d?0x1:-0x1;let _0x43e68e=this['_revisions']['get'](_0x48da3e),_0x15b221=this['getIndex'](_0x43e68e);for(yield _0x43e68e;_0x43e68e;){if(_0x15b221+=_0x50a11f,_0x43e68e=this['getRevision'](_0x15b221),!_0x43e68e)return;_0x51e20e(_0x43e68e)&&(yield _0x43e68e);}}},Rt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x524a1a,'c'],[_0x28d884,'a'],[_0x5569aa,'e'],[_0x17020d,'r'],[_0x26f24c,'u']]);_typeCharToViewClass=new Map([['c',_0x524a1a],['a',_0x28d884],['e',_0x5569aa],['r',_0x17020d],['u',_0x26f24c]]);async loadRevisionData(_0x223a1d,_0x17dffa){if(_0x223a1d['diffData']||!_0x17dffa)return;const _0x599b43=this['editor']['config']['get']('collaboration.channelId');_0x223a1d['diffData']=(await _0x17dffa['getRevision']({'channelId':_0x599b43,'revisionId':_0x223a1d['id']}))['diffData'];}getRevisionDocumentData(_0x44fe6f){const _0x4af8d6={};for(const _0x990803 in _0x44fe6f['diffData']){if(_0x44fe6f['diffData'][_0x990803]['attachChange']&&!_0x44fe6f['diffData'][_0x990803]['attachChange']['isAttached'])continue;const _0x2eebce=this['_removeRevisionMarkers'](JSON['parse'](_0x44fe6f['diffData'][_0x990803]['insertions'])),_0x1a879a=this['editor']['editing']['view']['document'],_0x1e8274=new _0xabc291(_0x1a879a,_0x2eebce['map'](_0x145ac8=>this['_getViewFromDiffObj'](_0x145ac8,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4af8d6[_0x990803]=this['editor']['data']['processor']['toData'](_0x1e8274),this['editor']['data']['processor']['useFillerType']('default');}return _0x4af8d6;}getRevisionRootsAttributes(_0x279c42){const _0x4d0d82={};for(const _0x16282f in _0x279c42['diffData'])_0x279c42['diffData'][_0x16282f]['attachChange']&&!_0x279c42['diffData'][_0x16282f]['attachChange']['isAttached']||(_0x4d0d82[_0x16282f]=_0x279c42['diffData'][_0x16282f]['attributesAfter']||{});return _0x4d0d82;}getRevisionRootsModelElements(_0x4e2b1b){const _0x1481c0={};for(const _0x3a9c9c in _0x4e2b1b['diffData']){if(_0x4e2b1b['diffData'][_0x3a9c9c]['attachChange']&&!_0x4e2b1b['diffData'][_0x3a9c9c]['attachChange']['isAttached'])continue;const _0xa93616=_0x4e2b1b['diffData'][_0x3a9c9c]['rootElementName'];_0xa93616&&(_0x1481c0[_0x3a9c9c]=_0xa93616);}return _0x1481c0;}_getTypeCharForViewElement(_0x3ea5b6){return this['_viewClassToTypeChar']['get'](_0x3ea5b6['constructor']);}_getViewFromDiffObj(_0x539e0f,_0x52fca2){const _0x1b1e70=this['editor']['editing']['view']['document'];if('string'==typeof _0x539e0f)return new _0x383b5e(_0x1b1e70,_0x539e0f);{let _0x5f1837,_0x565bab;_0x565bab='u'==_0x539e0f['type']||'r'==_0x539e0f['type']?[]:_0x539e0f['children']['map'](_0x4c2e0b=>this['_getViewFromDiffObj'](_0x4c2e0b,_0x52fca2));const _0x364963=this['_typeCharToViewClass']['get'](_0x539e0f['type'])||_0x2d3953,_0x3e6808=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5f1837=new _0x364963(_0x1b1e70,_0x539e0f['name'],_0x539e0f['attributes'],_0x565bab),'u'==_0x539e0f['type']&&_0x539e0f['children'][0x0]){const _0x331e0b=_0x539e0f['children'][0x0];if(_0x5f1837['render']=function(_0xbb05e1){const _0x189dab=_0xbb05e1['createElement']('div');return _0x189dab['innerHTML']=_0xe4f10(_0x331e0b),_0x189dab['childNodes'][0x0];},_0x52fca2){const _0x2b5cca=new _0xabc291(_0x1b1e70);_0x2b5cca['_appendChild'](_0x5f1837);const _0x5e650d=Array['from'](_0x3e6808['viewChildrenToDom'](_0x2b5cca,{'bind':!0x1})),_0x1747d0=_0x3e6808['domDocument']['createElement']('div');_0x1747d0['append'](..._0x5e650d),_0x5f1837=Array['from'](_0x3e6808['domChildrenToView'](_0x1747d0))[0x0];}}else{if('r'==_0x539e0f['type']&&_0x539e0f['children'][0x0]){const _0x1ded38=_0x539e0f['children'][0x0];if(_0x5f1837['render']=function(_0x3c016f){_0x3c016f['innerHTML']=_0xe4f10(_0x1ded38);},_0x52fca2){const _0x7be2b9=new _0xabc291(_0x1b1e70);_0x7be2b9['_appendChild'](_0x5f1837);const _0x4cae31=Array['from'](_0x3e6808['viewChildrenToDom'](_0x7be2b9,{'bind':!0x1})),_0x48930c=_0x3e6808['domDocument']['createElement']('div');_0x48930c['append'](..._0x4cae31);const _0x1e2783=Array['from'](_0x3e6808['domChildrenToView'](_0x48930c));_0x1e2783['length']>0x1?_0x5f1837['_appendChild'](_0x1e2783):_0x5f1837=_0x1e2783[0x0];}}}if(_0x539e0f['customProperties']){for(const [_0x1ae583,_0x417084]of _0x539e0f['customProperties'])_0x5f1837['_setCustomProperty'](_0x1ae583,_0x417084);}const _0x54ba6a=void 0x0===_0x539e0f['fillerOffset']?null:_0x539e0f['fillerOffset'];return null!==_0x54ba6a&&(_0x5f1837['getFillerOffset']=()=>_0x54ba6a),_0x5f1837;}}_makeModelFromViewString(_0x45bde7,_0xfb0c99){const _0xc020e7=JSON['parse'](_0x45bde7),_0x1cd224=this['editor']['editing']['view']['document'],_0x135430=new _0xabc291(_0x1cd224,_0xc020e7['map'](_0x2fddf1=>this['_getViewFromDiffObj'](_0x2fddf1,!0x0))),_0xfc96c5=this['editor']['data']['toModel'](_0x135430,_0xfb0c99);return _0xfc96c5['name']=_0xfb0c99,_0xfc96c5;}['_removeRevisionMarkers'](_0x2954f5){return(_0x2954f5=_0x2954f5['filter'](_0x65f21f=>!_0x65f21f['name']||'revision-start'!==_0x65f21f['name']&&'revision-end'!==_0x65f21f['name']))['forEach'](_0x50b327=>{'string'!=typeof _0x50b327&&(_0x50b327['children']=this['_removeRevisionMarkers'](_0x50b327['children']),_0x50b327['attributes']=_0x50b327['attributes']['filter'](_0x1c85c8=>!_0x1c85c8[0x0]['startsWith']('data-revision-')));}),_0x2954f5;}};function kt(_0x3e6fd7,_0x2ed7f8,_0x1722ec){const t=_0x3e6fd7['t'];switch(_0x2ed7f8){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'},_0x1722ec);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x1722ec);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x1722ec);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x1722ec);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x1722ec);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x3ccb16{['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[_0x312567,bt,Rt,_0x55fafd];}constructor(_0x4bc2a9){super(_0x4bc2a9),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2e1c5d=_0x5289a7();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2e1c5d},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 _0x400e6a=this['repository']['getRevision'](0x0),_0xe84c79=_0x400e6a&&null===_0x400e6a['creator']?_0x400e6a:null;if(this['_continueCurrentRevision']=!!_0xe84c79&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1ada1e=this['_source']['getCurrentRevisionId'](),_0x4f7561=this['repository']['getRevision'](_0x1ada1e);if(_0x4f7561)this['_startingVersion']=_0x4f7561['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x54ff83=this['_source']['history']['_operations']['find'](_0x8bff9f=>!_0x8bff9f['_isInit']),_0x2b2ec5=_0x54ff83?_0x54ff83['baseVersion']:this['_source']['history']['version'];_0x400e6a?(_0x400e6a['toVersion']<_0x2b2ec5&&_0x400e6a['_update']({'toVersion':_0x2b2ec5}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id'],this['_startingVersion']=_0xe84c79['fromVersion']):(this['_startingVersion']=_0x400e6a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2b2ec5,this['_continueCurrentRevision']=!0x1);}}else _0xe84c79&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xe84c79['toVersion'],this['editor']['model']['document']['history']['version']),_0xe84c79['fromVersion']===_0xe84c79['toVersion']?(0x0!==_0xe84c79['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xe84c79['id'],this['_startingVersion']=_0xe84c79['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',_0x4d3b46=>!_0x4d3b46),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x178ea0=[this['editor']];for(const _0x287368 of _0x178ea0){let _0x327ea7;for(const _0x3a0298 in _0x287368){const _0x490647=_0x3a0298,_0x272f9c=_0x287368[_0x490647];if('revisionHistoryLicenseKeyValid'==_0x272f9c||'revisionHistoryLicenseKeyInvalid'==_0x272f9c||'revisionHistoryLicenseKeyExpired'==_0x272f9c||'revisionHistoryLicenseKeyDomainLimit'==_0x272f9c||'revisionHistoryLicenseKeyNotAllowed'==_0x272f9c||'revisionHistoryLicenseKeyEvaluationLimit'==_0x272f9c||'revisionHistoryLicenseKeyUsageLimit'==_0x272f9c){delete _0x287368[_0x490647],_0x327ea7=_0x272f9c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x327ea7&&_0x287368['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x327ea7&&_0x287368['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x327ea7&&_0x287368['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x327ea7&&_0x287368['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x327ea7&&_0x287368['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x327ea7&&_0x287368['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x4e250c=this['repository']['getRevision'](0x0),_0x47c924=await this['getRevisionDocumentData'](_0x4e250c),_0x2a9da8=await this['getRevisionRootsAttributes'](_0x4e250c),_0x351da7=this['_utils']['getRevisionRootsModelElements'](_0x4e250c);this['_replaceEditorDataWithRevisionData'](_0x47c924,_0x2a9da8,_0x351da7);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x22db48){this['_source']=_0x22db48;}async update(){const _0x65957c=await this['_source']['getLatestVersion']();if(_0x65957c>this['currentRevision']['toVersion']){await this['_loadState']();const _0x31b567=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x65957c});_0x31b567['authors']=_0x31b567['authorsIds']['map'](_0x1262d1=>this['editor']['plugins']['get']('Users')['getUser'](_0x1262d1)),this['currentRevision']['_update'](_0x31b567);}}async['saveRevision'](_0x1b9b59={},_0x19f076=null){const _0x3a67dd=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x19f076>this['currentRevision']['toVersion']&&(_0x19f076=null),null===_0x19f076&&(_0x19f076=await this['_source']['getLatestVersion']());const _0x361398=this['_getFromVersion'](_0x19f076),_0x4a9d3a=this['buildRevisionData']({'from':_0x361398,'to':_0x19f076});if(this['currentRevision']['toVersion']<_0x19f076){const _0x226f52=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x19f076,'to':_0x19f076});_0x226f52['authors']=[],_0x226f52['authorsIds']=[],_0x226f52['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x226f52,!0x0),delete _0x226f52['authors'],_0x3a67dd['push'](_0x226f52);}const _0x2adbf5={..._0x1b9b59,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x1b9b59['name']||null,'id':_0x1b9b59['id']||_0x5289a7(),..._0x4a9d3a,'attributes':{..._0x1b9b59['attributes'],..._0x4a9d3a['attributes']}},_0x1a3e6e=this['addRevisionData'](_0x2adbf5);_0x3a67dd['push'](_0x2adbf5);const _0xae41d=this['repository']['getIndex'](_0x1a3e6e);if(0x0!==_0xae41d){const _0x627b85=this['repository']['getRevision'](_0xae41d-0x1);if(_0x627b85['fromVersion']!==_0x19f076){const _0x31425b=this['_revisionDataBuilder']['getData'](_0x19f076,_0x627b85['toVersion']),_0x5de086={'id':_0x627b85['id'],'diffData':_0x31425b['diffData'],'authorsIds':_0x31425b['authorsIds'],'authors':_0x31425b['authorsIds']['map'](_0x4eb8b2=>this['editor']['plugins']['get']('Users')['getUser'](_0x4eb8b2)),'fromVersion':_0x19f076};this['_stampAiAttribute'](_0x5de086,_0x627b85,!!_0x31425b['hasAIChanges']),_0x627b85===this['currentRevision']&&(_0x5de086['createdAt']=new Date(_0x2adbf5['createdAt']['getTime']()+0xa)),_0x627b85['_update'](_0x5de086,!0x0),delete _0x5de086['authors'],_0x3a67dd['push'](_0x5de086);}}if(this['adapter']){for(const _0x194bb1 of _0x3a67dd)this['_bufferUpdate'](_0x194bb1['id'],_0x194bb1,!0x0);this['sendBufferedUpdates']();}return _0x1a3e6e;}addRevisionData(_0xc87ba6){const _0x1a3328=this['repository']['createRevision'](_0xc87ba6);return this['adapter']&&_0x1a3328['on']('_update',(_0x4144a4,_0x1c44d7,_0x5082ad)=>{_0x5082ad||(this['_bufferUpdate'](_0x1c44d7['id'],_0x1c44d7,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1a3328,this['_findInsertionIndex'](_0x1a3328)),_0x1a3328;}async getRevisionDocumentData(_0xae8512){return await this['_utils']['loadRevisionData'](_0xae8512,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xae8512);}async getRevisionRootsAttributes(_0x1112c8){return await this['_utils']['loadRevisionData'](_0x1112c8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1112c8);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x40fa55=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4c0eb6=0x0;_0x4c0eb6<_0x40fa55['length'];_0x4c0eb6++){const _0x5852ad=_0x40fa55[_0x4c0eb6];let _0x4f3078=!0x1;for(const _0x25e1d3 of Object['keys'](_0x5852ad))void 0x0===_0x5852ad[_0x25e1d3]?delete _0x5852ad[_0x25e1d3]:'id'!==_0x25e1d3&&(_0x4f3078=!0x0);_0x4f3078||(_0x40fa55[_0x4c0eb6]=null);}if(_0x40fa55=_0x40fa55['filter'](_0x480734=>null!==_0x480734),!_0x40fa55['length'])return;for(let _0x26b7a2=0x0;_0x26b7a2<_0x40fa55['length'];_0x26b7a2++){const _0xe8a914=_0x40fa55[_0x26b7a2];void 0x0!==_0xe8a914['fromVersion']&&void 0x0===_0xe8a914['toVersion']&&(_0xe8a914['toVersion']=this['repository']['getRevision'](_0xe8a914['id'])['toVersion']),void 0x0!==_0xe8a914['toVersion']&&void 0x0===_0xe8a914['fromVersion']&&(_0xe8a914['fromVersion']=this['repository']['getRevision'](_0xe8a914['id'])['fromVersion']);}const _0x4366de=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x40fa55,_0x4366de)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x14825f=>{if(_0x14825f){for(const _0x41ef84 of _0x14825f)this['setRevisionData']({'id':_0x41ef84['id'],'createdAt':_0x41ef84['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x237111,_0x239349,_0x37fce1){if(_0x37fce1===(!!_0x239349&&!!_0x239349['attributes']['@ai']))return;const _0x4130bb={..._0x239349?_0x239349['attributes']:{},..._0x237111['attributes']};_0x37fce1?_0x4130bb['@ai']=!0x0:delete _0x4130bb['@ai'],_0x237111['attributes']=_0x4130bb;}buildRevisionData({revision:_0x58e20a=null,from:_0xe51299=null,to:_0x3355fe=null}){_0xe51299=null!==_0xe51299?_0xe51299:_0x58e20a['fromVersion'],_0x3355fe=null!==_0x3355fe?_0x3355fe:_0x58e20a['toVersion'];const _0x41aeb5=this['_revisionDataBuilder']['getData'](_0xe51299,_0x3355fe),_0x2fa54f={'diffData':_0x41aeb5['diffData'],'authorsIds':_0x41aeb5['authorsIds'],'fromVersion':_0xe51299,'toVersion':_0x3355fe};if(this['_stampAiAttribute'](_0x2fa54f,_0x58e20a,!!_0x41aeb5['hasAIChanges']),!_0x58e20a||_0x3355fe!==_0x58e20a['toVersion']){const _0x12a42b=_0x3355fe-0x1,_0x526f17=this['_source']['history']['getOperation'](_0x12a42b);_0x2fa54f['createdAt']=_0x526f17&&_0x526f17['createdAt']||new Date();}if(this['_loadedStateData']&&_0xe51299===this['_loadedStateData']['fromVersion']){for(const _0x4907d6 of this['_loadedStateData']['authors'])_0x2fa54f['authorsIds']['includes'](_0x4907d6['id'])||_0x2fa54f['authorsIds']['push'](_0x4907d6['id']);}return _0x2fa54f;}_bufferUpdate(_0x2eebe9,_0xf5d722,_0x5861f9){if(this['_bufferedUpdates']['has'](_0x2eebe9)){const _0x3525b3=this['_bufferedUpdates']['get'](_0x2eebe9);_0xf5d722=_0x5861f9?{..._0x3525b3,..._0xf5d722}:{..._0xf5d722,..._0x3525b3};}this['_bufferedUpdates']['set'](_0x2eebe9,_0xf5d722);}setRevisionData(_0x55acfa){const _0x297f96=this['repository']['getRevision'](_0x55acfa['id']);if(_0x55acfa['createdAt']&&(_0x55acfa['createdAt']=new Date(_0x55acfa['createdAt'])),_0x55acfa['authorsIds']){const _0x468bba=this['editor']['plugins']['get']('Users');_0x55acfa['authors']=_0x55acfa['authorsIds']['map'](_0x375b0d=>_0x468bba['getUser'](_0x375b0d));}_0x297f96['_update'](_0x55acfa,!0x0);}_createInitialRevision(_0x5b6afc){const _0x4d3133=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4d3133)this['_initialRevisionId']=_0x4d3133['id'];else{const _0x27d171=!this['editor']['model']['document']['roots']['find'](_0x1836db=>this['editor']['model']['hasContent'](_0x1836db)),_0x3c986a=this['editor']['plugins']['get']('Users')['me']['id'],_0xd41ce9=kt(this['editor']['locale'],_0x27d171?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5b6afc,'to':_0x5b6afc,'id':this['_initialRevisionId'],'name':_0xd41ce9,'creatorId':_0x3c986a});}}_createCurrentRevision(_0x10fbf3){const _0x2b4e7c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2b4e7c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x10fbf3,'to':_0x10fbf3,'id':_0x2b4e7c,'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(_0x4465df,_0x163c17,_0x1d25a8){const _0x15be32={},_0x181ad1={},_0x1bb0cd={},_0xa18adf=this['editor']['config']['get']('roots')||{};for(const [_0x3f70b0,_0x5dfdea]of Object['entries'](_0xa18adf))_0x5dfdea['lazyLoad']||(_0x15be32[_0x3f70b0]=_0x5dfdea['initialData']??'',_0x181ad1[_0x3f70b0]=_0x5dfdea['modelAttributes']||{},_0x5dfdea['modelElement']&&(_0x1bb0cd[_0x3f70b0]=_0x5dfdea['modelElement']));for(const _0x496a3a of this['editor']['model']['document']['getRootNames']())_0x15be32[_0x496a3a]??='',_0x181ad1[_0x496a3a]??={};let _0x4b5374=!0x1;const _0x1180aa=Object['keys'](_0x15be32),_0x11daf4=Object['keys'](_0x4465df);for(const _0x12385e of _0x1180aa){if(_0x15be32[_0x12385e]!==_0x4465df[_0x12385e]&&''!==_0x15be32[_0x12385e]['trim']()){_0x4b5374=!0x0;break;}if(!_0x538fa0(_0x181ad1[_0x12385e],_0x163c17[_0x12385e])&&Object['keys'](_0x181ad1[_0x12385e])['length']>0x0){_0x4b5374=!0x0;break;}const _0x2ee8a8=_0x1bb0cd[_0x12385e],_0x21c663=_0x1d25a8[_0x12385e];if(_0x2ee8a8&&_0x21c663&&_0x2ee8a8!==_0x21c663){_0x4b5374=!0x0;break;}}_0x4b5374||(_0x4b5374=_0x11daf4['some'](_0x293388=>!this['editor']['model']['document']['getRoot'](_0x293388))),_0x4b5374&&_0x3905c1('editor-initial-data-replaced-with-revision-data',{'editorData':_0x15be32,'editorRootsAttributes':_0x181ad1,'editorRootsModelElements':_0x1bb0cd,'revisionData':_0x4465df,'revisionRootsAttributes':_0x163c17,'revisionRootsModelElements':_0x1d25a8});for(const [_0x3ccd87,_0x28836d]of Object['entries'](_0x4465df))this['editor']['config']['set']('roots.'+_0x3ccd87+'.initialData',_0x28836d);for(const [_0x30d8ea,_0xd46164]of Object['entries'](_0x163c17))this['editor']['config']['set']('roots.'+_0x30d8ea+'.modelAttributes',_0xd46164);const _0x2076fd=this['editor']['model']['document'];for(const [_0x41bc24,_0x396c15]of Object['entries'](_0x1d25a8)){this['editor']['config']['set']('roots.'+_0x41bc24+'.modelElement',_0x396c15);const _0x23556c=_0x2076fd['getRoot'](_0x41bc24);_0x23556c&&_0x23556c['name']!==_0x396c15&&(_0x2076fd['roots']['remove'](_0x41bc24),_0x2076fd['createRoot'](_0x396c15,_0x41bc24));}}_addPendingAction(){if(!this['_pendingAction']){const _0x2e6af2=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x2e6af2['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x1d542a){const _0x4fb1ad=this['repository']['getRevisions']();_0x4fb1ad['reverse']();let _0x26e3e9=0x0;for(;_0x26e3e9<_0x4fb1ad['length'];){const _0x207da7=_0x4fb1ad[_0x26e3e9];if(_0x207da7===this['currentRevision']){_0x26e3e9++;continue;}if(_0x207da7['id']===this['_initialRevisionId'])break;const _0x709ac8=_0x1d542a['toVersion']-_0x207da7['toVersion']||_0x1d542a['fromVersion']-_0x207da7['fromVersion'];if(_0x709ac8>0x0)break;if(_0x709ac8<0x0)_0x26e3e9++;else{if(!_0x1d542a['creator']&&_0x207da7['creator'])break;if(_0x207da7['creator']||!_0x1d542a['creator']){if(_0x1d542a['createdAt']>_0x207da7['createdAt'])break;_0x26e3e9++;}else _0x26e3e9++;}}return _0x26e3e9;}_getFromVersion(_0x1e97ca){const _0x2f2c3f=this['repository']['getRevisions']();_0x2f2c3f['reverse'](),_0x2f2c3f['shift']();const _0x328672=_0x2f2c3f['find'](_0x3adffa=>_0x3adffa['toVersion']<=_0x1e97ca)['toVersion'];return _0x328672<this['_startingVersion']?this['_startingVersion']:_0x328672;}['_makeRevision']({name:_0x219496,from:_0x1a2910,to:_0x53a2e1,creatorId:_0x49f438,id:_0x55bdc6}){const _0x139d0f=this['buildRevisionData']({'from':_0x1a2910,'to':_0x53a2e1});_0x139d0f['name']=_0x219496,_0x139d0f['creatorId']=_0x49f438,_0x139d0f['id']=_0x55bdc6;const _0x9c9a34=this['addRevisionData'](_0x139d0f);return this['adapter']&&this['_bufferUpdate'](_0x139d0f['id'],_0x139d0f,!0x0),_0x9c9a34;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x561d0d){this['editor']=_0x561d0d,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x34936f){this['source']=_0x34936f;const _0x34e79f=new Map(),_0x1af8d6=new Map(),_0xbad2c0=this['editor']['model']['document']['roots']['map'](_0x2b65f0=>_0x2b65f0['rootName']);for(const _0x4f7481 of _0xbad2c0){const _0x28cf2d=this['editor']['model']['document']['getRoot'](_0x4f7481),_0x32a344=St(_0x28cf2d);_0x34e79f['set'](_0x4f7481,_0x32a344),_0x1af8d6['set'](_0x4f7481,Object['fromEntries'](_0x28cf2d['getAttributes']()));}const _0x247873=Array['from'](this['editor']['model']['markers'])['map'](_0x5a82b9=>[_0x5a82b9['name'],_0x5a82b9['getRange']()]),_0x1bef46=this['source']['version'];this['_saveMetaData'](_0x1bef46,_0x34e79f,_0x247873,_0x1af8d6),this['_startingRevisionId']=this['_revisionId'];const _0x3c94a1=new Map(),_0x407c60=new Map();for(const _0x2fa461 of _0xbad2c0){const _0x58a453=Et(_0x2fa461,this['editor']['model']['document']['getRoot'](_0x2fa461)['name']);_0x3c94a1['set'](_0x2fa461,_0x58a453),_0x407c60['set'](_0x2fa461,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3c94a1,[],_0x407c60);}getData(_0x35f582,_0x4fe200){if(this['_lastFrom']===_0x35f582&&this['_lastTo']<=_0x4fe200)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x4fe200,!0x0);else{if(!this['_savedMetaData']['has'](_0x35f582)){const _0x2e5084=this['_getPreviousFrom'](_0x35f582);this['_calculateMetaData'](_0x2e5084,_0x35f582,!0x1);}this['_calculateMetaData'](_0x35f582,_0x4fe200,!0x0);}return this['_lastFrom']=_0x35f582,this['_lastTo']=_0x4fe200,this['_getState']();}loadState(_0x3af0b9){if(!this['_savedMetaData']['has'](_0x3af0b9['fromVersion'])){const _0x239c29=this['_getPreviousFrom'](_0x3af0b9['fromVersion']);this['_calculateMetaData'](_0x239c29,_0x3af0b9['fromVersion'],!0x1);}this['_calculateMetaData'](_0x3af0b9['fromVersion'],_0x3af0b9['toVersion'],!0x1);const _0xf41104=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x3af0b9['fromVersion'],this['_lastTo']=_0x3af0b9['toVersion'];for(const _0x2d3840 in _0x3af0b9['diffData']){const _0x3dbc43=_0x3af0b9['diffData'][_0x2d3840]['attachChange'],_0x5e956d=_0x144f08(_0x3af0b9['diffData'][_0x2d3840]['attributesBefore'])||{},_0x4a19ea=_0x3af0b9['diffData'][_0x2d3840],_0x37532f=_0xf41104['_makeModelFromViewString'](_0x4a19ea['deletions'],_0x4a19ea['rootElementName']||'$root');_0x37532f['rootName']=_0x2d3840,_0x37532f['_isAttached']=!_0x3dbc43||!_0x3dbc43['isAttached'],_0x37532f['isAttached']=()=>_0x37532f['_isAttached'],this['_baseRoots']['set'](_0x2d3840,_0x37532f),this['_baseRootsAttributes']['set'](_0x2d3840,_0x5e956d),_0x3dbc43&&this['_touchedRoots']['set'](_0x2d3840,_0x3dbc43);const _0x183ac9=this['_makeIdsRoot'](_0x37532f);this['_baseIdsRoots']['set'](_0x2d3840,_0x183ac9);for(const [_0x204a26,_0x1b6245]of _0x37532f['markers']){if(!_0x204a26['startsWith']('revision:'))continue;const _0x19d3ba=_0x204a26['split'](':')[0x2],_0x2fcd5e=_0x4a19ea['aiSources']?.[_0x204a26]||null;for(const _0xe8d32d of _0x1b6245['getWalker']({'singleCharacters':!0x0})){const _0x2c517b=this['_getVidAttributeName'](_0xe8d32d),_0x437281='elementEnd'==_0xe8d32d['type']?_0xe8d32d['previousPosition']['path']['slice'](0x0,-0x1):_0xe8d32d['previousPosition']['path'],_0x49fbcd=_0x183ac9['getNodeByPath'](_0x437281)['getAttribute'](_0x2c517b);this['_touched']['set'](_0x49fbcd,{'userId':_0x19d3ba,'aiSource':_0x2fcd5e});}_0x37532f['markers']['delete'](_0x204a26);}}this['_startingRevisionId']=this['_revisionId'];const _0x2eb5dd=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x35cdff=>!this['_touched']['has'](_0x35cdff));let _0x3bc09c=0x0;const _0x30555e=new Map();for(const _0x23e6c2 in _0x3af0b9['diffData']){const _0x3af82e=_0x3af0b9['diffData'][_0x23e6c2]['attachChange'],_0x1c9df5=_0x144f08(_0x3af0b9['diffData'][_0x23e6c2]['attributesAfter'])||{},_0x285ebc=_0x3af0b9['diffData'][_0x23e6c2],_0x5f170b=_0xf41104['_makeModelFromViewString'](_0x285ebc['insertions'],_0x285ebc['rootElementName']||'$root');_0x5f170b['rootName']=_0x23e6c2,_0x5f170b['_isAttached']=!_0x3af82e||_0x3af82e['isAttached'],_0x5f170b['isAttached']=()=>_0x5f170b['_isAttached'],this['_diffRoots']['set'](_0x23e6c2,_0x5f170b),this['_diffRootsAttributes']['set'](_0x23e6c2,_0x1c9df5);const _0x1daaf4=this['_makeIdsRoot'](_0x5f170b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x23e6c2,_0x1daaf4),_0x30555e['set'](_0x23e6c2,_0x5f170b['isAttached']()?_0x1c9df5:{});for(const [_0x1c916c,_0xc8202f]of _0x5f170b['markers']){if(!_0x1c916c['startsWith']('revision:'))continue;const _0x2d6832=_0x1c916c['split'](':')[0x2],_0x3cbe93=_0x285ebc['aiSources']?.[_0x1c916c]||null;for(const _0x181cab of _0xc8202f['getWalker']({'singleCharacters':!0x0})){const _0x580345=this['_getVidAttributeName'](_0x181cab),_0x1dbdf9=this['_revisionId']++,_0x3ce121='elementEnd'==_0x181cab['type']?_0x181cab['previousPosition']['path']['slice'](0x0,-0x1):_0x181cab['previousPosition']['path'];_0x1daaf4['getNodeByPath'](_0x3ce121)['_setAttribute'](_0x580345,_0x1dbdf9),this['_touched']['set'](_0x1dbdf9,{'userId':_0x2d6832,'aiSource':_0x3cbe93});}_0x5f170b['markers']['delete'](_0x1c916c);}for(const _0xfe0ddb of this['editor']['model']['createRangeIn'](_0x5f170b)['getWalker']({'singleCharacters':!0x0})){const _0xdd2aa4=this['_getVidAttributeName'](_0xfe0ddb),_0x33fc89='elementEnd'==_0xfe0ddb['type']?_0xfe0ddb['previousPosition']['path']['slice'](0x0,-0x1):_0xfe0ddb['previousPosition']['path'],_0x45e32e=_0x1daaf4['getNodeByPath'](_0x33fc89);_0x45e32e['getAttribute'](_0xdd2aa4)>0x0||_0x45e32e['_setAttribute'](_0xdd2aa4,_0x2eb5dd[_0x3bc09c++]);}for(const [_0x3ae353,_0x4e1ffb]of _0x5f170b['markers'])_0x3ae353['startsWith']('revision:')||this['_markers']['set'](_0x3ae353,_0x4e1ffb);}const {roots:_0xa94598}=this['_savedMetaData']['get'](_0x3af0b9['fromVersion']),{roots:_0xeaa17f}=this['_savedMetaData']['get'](_0x3af0b9['toVersion']),_0x182b13=St(_0xa94598['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x182b13),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x182b13,Number['NEGATIVE_INFINITY']));const _0x630beb=St(_0xeaa17f['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x630beb),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x630beb));const _0xa302df=Array['from'](this['_diffRoots'])['map'](([_0x2941e5,_0x47813f])=>[_0x2941e5,St(_0x47813f)]);this['_saveMetaData'](this['_lastTo'],_0xa302df,this['_markers'],_0x30555e);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x456754,_0x3cd7de,_0x5cee19,_0x237280){const _0x2edc73=new Map(_0x3cd7de),_0x11eeda=new Map(_0x144f08(_0x237280)),_0x3a73e3=new Map();for(const [_0x5290be,_0x536c11]of _0x5cee19)_0x3a73e3['set'](_0x5290be,{'start':_0x536c11['start']['clone'](),'end':_0x536c11['end']['clone'](),'rootName':_0x536c11['root']['rootName']});this['_savedMetaData']['set'](_0x456754,{'roots':_0x2edc73,'markers':_0x3a73e3,'rootsAttributes':_0x11eeda});}_removeMetaData(_0x2e53fe){this['_savedMetaData']['delete'](_0x2e53fe);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x20e88e,_0x114afd=null){let _0x2bf4de=null;_0x20e88e['is']('documentFragment')||(_0x2bf4de=new _0x28c730(_0x20e88e['name'],{'vid_start':null===_0x114afd?this['_revisionId']++:_0x114afd++}));const _0x15fd67=[];for(const _0x43cabb of _0x20e88e['getChildren']())if(_0x43cabb['is']('element')){_0x15fd67['push'](this['_makeIdsRoot'](_0x43cabb,_0x114afd));const _0x36c422=_0x15fd67[_0x15fd67['length']-0x1];null!==_0x114afd&&(_0x114afd=_0x36c422['is']('element','$text')?_0x36c422['getAttribute']('vid')+0x1:_0x36c422['getAttribute']('vid_end')+0x1);}else{for(let _0x48e7fc=0x0;_0x48e7fc<_0x43cabb['offsetSize'];_0x48e7fc++)_0x15fd67['push'](new _0x28c730('$text',{'vid':null===_0x114afd?this['_revisionId']++:_0x114afd++}));}if(_0x20e88e['is']('documentFragment')){const _0x717f95=Et(_0x20e88e['rootName'],_0x20e88e['name']);return _0x717f95['_insertChild'](0x0,_0x15fd67),_0x717f95;}return _0x2bf4de['_setAttribute']('vid_end',null===_0x114afd?this['_revisionId']++:_0x114afd),_0x2bf4de['_insertChild'](0x0,_0x15fd67),_0x2bf4de;}_calculateMetaData(_0x5e32fc,_0x150401,_0x113ee1){this['_reset']();const {roots:_0xef9b73,markers:_0x87ea9c,rootsAttributes:_0x274651}=this['_savedMetaData']['get'](_0x5e32fc);this['_baseRoots']=new Map(_0xef9b73),this['_baseRootsAttributes']=new Map(_0x144f08(_0x274651));for(const [_0x41f08b,_0x5d7aa8]of this['_baseRoots'])if('$graveyard'!==_0x41f08b&&(this['_diffRoots']['set'](_0x41f08b,St(_0x5d7aa8)),this['_diffRootsAttributes']=new Map(_0x144f08(_0x274651)),_0x113ee1)){const _0x5f3a06=this['_revisionId'];this['_idsRoots']['set'](_0x41f08b,this['_makeIdsRoot'](_0x5d7aa8)),this['_baseIdsRoots']['set'](_0x41f08b,this['_makeIdsRoot'](_0x5d7aa8,_0x5f3a06));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x113ee1&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1cdb26,_0xe73eb7]of _0x87ea9c){const _0x502fa7=this['_baseRoots']['get'](_0xe73eb7['rootName']),_0x4f899d=this['_diffRoots']['get'](_0xe73eb7['rootName']),_0x230775=new _0x390c0d(_0x289722(_0xe73eb7['start'],_0x502fa7),_0x289722(_0xe73eb7['end'],_0x502fa7)),_0xa049a4=_0x3c9bdd(_0x230775,_0x4f899d);_0x502fa7['markers']['set'](_0x1cdb26,_0x230775),this['_markers']['set'](_0x1cdb26,_0xa049a4);}this['_applyOperations'](_0x5e32fc,_0x150401,_0x113ee1);}_applyOperations(_0x198742,_0x3558ee,_0x29cf44){for(const _0x5a8b3d of this['source']['getOperations'](_0x198742,_0x3558ee))this['_handleOperation'](_0x5a8b3d,_0x29cf44);for(const _0x576e86 of this['_diffRoots']['values']())_0x576e86['markers']['clear']();for(const [_0x36e3af,_0x165e4e]of this['_markers'])this['_diffRoots']['get'](_0x165e4e['root']['rootName'])['markers']['set'](_0x36e3af,_0x165e4e['clone']());const _0x22f97a=new Map(),_0x427185=new Map();for(const [_0xc9c66d,_0x5a5611]of this['_diffRoots'])_0x22f97a['set'](_0xc9c66d,St(_0x5a5611)),_0x427185['set'](_0xc9c66d,this['_diffRootsAttributes']['get'](_0xc9c66d));this['_saveMetaData'](_0x3558ee,_0x22f97a,this['_markers'],_0x427185);}_getPreviousFrom(_0x5ab4d4){const _0x27990c=Array['from'](this['_savedMetaData']['keys']());_0x27990c['sort']((_0x5de164,_0x3ee46c)=>_0x5de164-_0x3ee46c),_0x27990c['reverse']();for(const _0x31be91 of _0x27990c)if(_0x31be91<_0x5ab4d4)return _0x31be91;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4b278f,_0x2bbe05){const _0x436362=Array['from'](_0x2bbe05['markers'])['map'](([_0x63b139,_0x5e037c])=>[_0x63b139,_0x3c9bdd(_0x5e037c,_0x4b278f)]);_0x4b278f['markers']=new Map(_0x436362);}_transformMarkers(_0x2bb28a){for(const _0x5c094f of this['_markers']['values']()){const _0xd4af9b=_0x5c094f['getTransformedByOperation'](_0x2bb28a),_0x54eeca=_0x390c0d['_createFromRanges'](_0xd4af9b);_0x5c094f['start']=_0x54eeca['start'],_0x5c094f['end']=_0x54eeca['end'];}}_handleOperation(_0x4028a2,_0x58252e){if('addRoot'!=_0x4028a2['type']&&'detachRoot'!=_0x4028a2['type']){if('insert'==_0x4028a2['type']){const _0x3b7085=_0x4028a2['position']['root'],_0x71f2b=_0x3b7085['rootName'],_0x230ba3=_0x3b7085['name'];this['_diffRoots']['has'](_0x71f2b)||(this['_diffRoots']['set'](_0x71f2b,Et(_0x71f2b,_0x230ba3,!0x0)),this['_diffRootsAttributes']['set'](_0x71f2b,{}),_0x58252e&&this['_idsRoots']['set'](_0x71f2b,Et(_0x71f2b,_0x230ba3,!0x0)));}else{if('addRootAttribute'==_0x4028a2['type']||'removeRootAttribute'==_0x4028a2['type']||'changeRootAttribute'==_0x4028a2['type'])return void this['_handleRootAttributeOperation'](_0x4028a2);'marker'==_0x4028a2['type']&&this['_handleMarkerOperation'](_0x4028a2);}if('marker'!==_0x4028a2['type']){const _0x4b720a=this['_cloneOperation'](_0x4028a2,this['_diffRoots']);_0x4b720a['_execute'](),this['_transformMarkers'](_0x4b720a);}if(_0x58252e)switch(_0x4028a2['type']){case'insert':this['_handleInsertOperation'](_0x4028a2);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4028a2);break;case'merge':this['_handleMergeOperation'](_0x4028a2);break;case'split':this['_handleSplitOperation'](_0x4028a2);}}else this['_handleRootOperation'](_0x4028a2,_0x58252e);}_cloneOperation(_0x464461,_0x1b8e59){const _0x359bbf=_0x464461['clone']();return _0x359bbf['_authorId']=_0x464461['_authorId'],_0x359bbf['_aiSource']=_0x464461['_aiSource'],_0x359bbf['baseVersion']=null,_0x51ed69(_0x359bbf,_0x1b8e59),_0x359bbf;}_getBaseVids(_0xbe4dbc){return _0xbe4dbc['map'](_0x28a8b2=>{const _0x306ae2=this['_getVidAttributeName'](_0x28a8b2);return Number(_0x28a8b2['item']['getAttribute'](_0x306ae2));});}_generateTape(_0x5159a9,_0x38b1ee){if(_0x5159a9['is']('element','$text'))_0x38b1ee['push']({'item':_0x5159a9,'type':'text'});else{_0x5159a9['is']('element')&&_0x38b1ee['push']({'item':_0x5159a9,'type':'elementStart'});for(const _0x11282b of _0x5159a9['getChildren']())this['_generateTape'](_0x11282b,_0x38b1ee);_0x5159a9['is']('element')&&_0x38b1ee['push']({'item':_0x5159a9,'type':'elementEnd'});}return _0x38b1ee;}_getState(){const _0x4e9f4f=new Map(this['_touched']),_0x24023c=new Map(_0x4e9f4f),_0x40ee3e=new Map(),_0x5a1178={'insertions':{},'deletions':{}},_0x1bd158={'insertions':{},'deletions':{}},_0x36d154=new Map(),_0x518d67=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5e64c6=new Map();_0x518d67['delete']('$graveyard');for(const _0xc60760 of _0x518d67){const _0x4df9e6=(this['_diffRoots']['get'](_0xc60760)??this['_baseRoots']['get'](_0xc60760))['name'],_0x59fe49=this['_diffRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1),_0x2fe637=this['_baseRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1);_0x59fe49['isAttached']()||_0x2fe637['isAttached']()?(_0x5e64c6['set'](_0xc60760,_0x4df9e6),_0x5a1178['insertions'][_0xc60760]=St(_0x59fe49),_0x5a1178['deletions'][_0xc60760]=St(_0x2fe637),this['_copyMarkers'](_0x5a1178['deletions'][_0xc60760],_0x2fe637),this['_copyMarkers'](_0x5a1178['insertions'][_0xc60760],_0x59fe49),_0x1bd158['insertions'][_0xc60760]=this['_generateTape'](this['_idsRoots']['get'](_0xc60760),[]),_0x1bd158['deletions'][_0xc60760]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xc60760)||Et(_0xc60760,_0x4df9e6,!0x1),[])):_0x518d67['delete'](_0xc60760);}for(const _0x44277f of _0x518d67){const _0x11eda5=_0x1bd158['insertions'][_0x44277f];for(const _0x11fa81 of _0x11eda5){const _0x14a6b9=this['_getVidAttributeName'](_0x11fa81),_0x502fe0=_0x11fa81['item']['getAttribute'](_0x14a6b9);_0x24023c['delete'](_0x502fe0),_0x502fe0>=this['_startingRevisionId']&&_0x40ee3e['set'](_0x502fe0,_0x4e9f4f['get'](_0x502fe0));}}for(const _0x455de7 of _0x518d67){const _0x5a6b37=_0x1bd158['insertions'][_0x455de7],_0x2d98a3=this['_getBaseVids'](_0x1bd158['deletions'][_0x455de7]);let _0x15e2a3=0x0;for(const _0x2ee9e0 of _0x5a6b37){const _0x3e4d7d=this['_getVidAttributeName'](_0x2ee9e0),_0x13b357=_0x2ee9e0['item']['getAttribute'](_0x3e4d7d);if(!_0x40ee3e['has'](_0x13b357)&&!_0x36d154['has'](_0x13b357)){if(_0x24023c['has'](_0x13b357))_0x15e2a3++;else{if(_0x13b357!=_0x2d98a3[_0x15e2a3]){const _0x9deba1=_0x4e9f4f['get'](_0x13b357)||_0x4e9f4f['get'](_0x2d98a3[_0x15e2a3]);for(;_0x13b357!=_0x2d98a3[_0x15e2a3];)_0x24023c['has'](_0x2d98a3[_0x15e2a3])||(_0x36d154['set'](_0x2d98a3[_0x15e2a3],_0x9deba1),_0x4e9f4f['set'](_0x2d98a3[_0x15e2a3],_0x9deba1)),_0x15e2a3++;}_0x15e2a3++;}}}}for(const _0x2d503b of _0x518d67){const _0x1fbcf7=_0x1bd158['insertions'][_0x2d503b];for(const _0x568996 of _0x1fbcf7){const _0x24a9f2=this['_getVidAttributeName'](_0x568996),_0x1d442f=_0x568996['item']['getAttribute'](_0x24a9f2);if(_0x36d154['has'](_0x1d442f)){const _0x28cd17=_0x36d154['get'](_0x1d442f);_0x24023c['has'](_0x1d442f)||_0x24023c['set'](_0x1d442f,{..._0x28cd17}),_0x40ee3e['set'](_0x1d442f,{..._0x28cd17});}}}for(const _0x3c78da of _0x24023c['keys']())_0x3c78da>=this['_startingRevisionId']&&_0x24023c['delete'](_0x3c78da);const _0x5389fe=new Map();for(const _0x30a782 of _0x518d67){let _0x3c1eaa=_0x1bd158['insertions'][_0x30a782];for(const _0x1addb3 of _0x3c1eaa)if(_0x1addb3['item']['is']('element','tableCell')){const _0x300b6a=this['_getVidAttributeName'](_0x1addb3),_0x19f6b1=_0x1addb3['item']['getAttribute'](_0x300b6a);if(_0x40ee3e['has'](_0x19f6b1)){const _0x4384be=_0x1addb3['item']['parent']['parent']['getAttribute']('vid_start'),_0x4b93d1=_0x40ee3e['get'](_0x19f6b1),_0x496ec6=_0x5389fe['get'](_0x4384be)||{'users':new Set(),'aiSource':null};_0x496ec6['users']['add'](_0x4b93d1['userId']),_0x496ec6['aiSource']=_0x496ec6['aiSource']||_0x4b93d1['aiSource']||null,_0x5389fe['set'](_0x4384be,_0x496ec6);}}_0x3c1eaa=_0x1bd158['deletions'][_0x30a782];for(const _0x501d92 of _0x3c1eaa)if(_0x501d92['item']['is']('element','tableCell')){const _0x16ea4a=this['_getVidAttributeName'](_0x501d92),_0x17afc0=_0x501d92['item']['getAttribute'](_0x16ea4a);if(_0x24023c['has'](_0x17afc0)){const _0x2cdd0d=_0x501d92['item']['parent']['parent']['getAttribute']('vid_start'),_0x46a7bc=_0x24023c['get'](_0x17afc0),_0x414de0=_0x5389fe['get'](_0x2cdd0d)||{'users':new Set(),'aiSource':null};_0x414de0['users']['add'](_0x46a7bc['userId']),_0x414de0['aiSource']=_0x414de0['aiSource']||_0x46a7bc['aiSource']||null,_0x5389fe['set'](_0x2cdd0d,_0x414de0);}}for(const _0x391faf of _0x5389fe['keys']())(_0x40ee3e['has'](_0x391faf)||_0x24023c['has'](_0x391faf))&&_0x5389fe['delete'](_0x391faf);}for(const _0x114c4e of _0x518d67){const _0x47e259=_0x1bd158['insertions'][_0x114c4e];let _0x51cb5a=null,_0x2d21c7=null,_0x4c46a5=null;for(const _0x170342 of _0x47e259){const _0x1c5e24=this['_getVidAttributeName'](_0x170342),_0x35d51f=_0x170342['item']['getAttribute'](_0x1c5e24),_0x275e89=_0x5389fe['get'](_0x35d51f);if(_0x275e89&&'elementStart'==_0x170342['type']&&(_0x51cb5a=Array['from'](_0x275e89['users'])[0x0],_0x2d21c7=_0x275e89['aiSource'],_0x4c46a5=_0x170342['item']['getAttribute']('vid_end')),_0x51cb5a){const _0x4fe191=_0x2d21c7||_0x24023c['get'](_0x35d51f)?.['aiSource']||null,_0x100791=_0x2d21c7||_0x40ee3e['get'](_0x35d51f)?.['aiSource']||null;_0x24023c['set'](_0x35d51f,{'userId':_0x51cb5a,'aiSource':_0x4fe191}),_0x40ee3e['set'](_0x35d51f,{'userId':_0x51cb5a,'aiSource':_0x100791});}_0x35d51f==_0x4c46a5&&(_0x51cb5a=null,_0x4c46a5=null);}}const _0x16ba18={},_0x3aceab=new Set();for(const _0x501865 of _0x518d67){const _0x163e43=_0x5a1178['deletions'][_0x501865],_0x708316=_0x5a1178['insertions'][_0x501865];for(const {userId:_0x2f861c}of this['_touchedMarkers']['values']())null!==_0x2f861c&&_0x3aceab['add'](_0x2f861c);for(const {userId:_0x24757d}of this['_touchedRoots']['values']())null!==_0x24757d&&_0x3aceab['add'](_0x24757d);const _0x3578c0={};this['_markChanges'](_0x708316,_0x1bd158['insertions'][_0x501865],_0x40ee3e,'insertion',_0x3aceab,_0x3578c0),this['_markChanges'](_0x163e43,_0x1bd158['deletions'][_0x501865],_0x24023c,'deletion',_0x3aceab,_0x3578c0),this['_collectSuggestionAiSources'](_0x708316,_0x3578c0),this['_collectSuggestionAiSources'](_0x163e43,_0x3578c0),_0x16ba18[_0x501865]={'insertions':this['_prepareViewToSave'](_0x708316),'deletions':this['_prepareViewToSave'](_0x163e43),'attachChange':this['_touchedRoots']['get'](_0x501865)||null,'attributesBefore':_0x144f08(this['_baseRootsAttributes']['get'](_0x501865))||{},'attributesAfter':_0x144f08(this['_diffRootsAttributes']['get'](_0x501865)),'rootElementName':_0x5e64c6['get'](_0x501865),'aiSources':_0x3578c0};}const _0x20146b=Array['from'](_0x40ee3e['values']())['some'](_0x1e5429=>!(!_0x1e5429||!_0x1e5429['aiSource']))||Array['from'](_0x24023c['values']())['some'](_0x13a76f=>!(!_0x13a76f||!_0x13a76f['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x273210=>this['_aiTouchedMarkers']['has'](_0x273210));return{'diffData':_0x16ba18,'authorsIds':Array['from'](_0x3aceab),'hasAIChanges':_0x20146b};}_collectSuggestionAiSources(_0x1ad9fa,_0x2fffef){const _0x222ee4=_0x1ad9fa['markers'];for(const _0x1b5968 of _0x222ee4['keys']()){if(!_0x1b5968['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x1b5968))continue;const _0x13c1ba=this['_aiTouchedMarkers']['get'](_0x1b5968);_0x13c1ba&&(_0x2fffef[_0x1b5968]=_0x13c1ba);}}_processRootBeforeSave(_0x21c2df){for(const [,_0x172d6b]of _0x21c2df['markers']){const _0x402a07=_0x172d6b['start']['getAncestors']()['filter'](_0x49b13e=>'tableCell'==_0x49b13e['name']);for(const _0x5c21c0 of _0x402a07)0x1==_0x5c21c0['childCount']&&_0x5c21c0['getChild'](0x0)['is']('element','paragraph')&&_0x5c21c0['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x34b23f){this['_processRootBeforeSave'](_0x34b23f);const _0x420399=this['editor']['data']['toView'](_0x34b23f,{}),_0x314e8b=Array['from'](_0x420399['getChildren']())['map'](_0xfc2f8d=>this['_getViewJson'](_0xfc2f8d));return JSON['stringify'](_0x314e8b);}_getViewJson(_0x3db8c1){if(_0x3db8c1['is']('$text'))return _0x3db8c1['data'];{const _0x1e0d0c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5691a0=_0x3db8c1,_0x3fc017=this['editor']['data']['htmlProcessor']['domConverter'],_0x4b3b9e={'type':_0x1e0d0c['_getTypeCharForViewElement'](_0x5691a0),'name':_0x5691a0['name'],'attributes':Array['from'](_0x5691a0['getAttributes']()),'children':Array['from'](_0x5691a0['getChildren']())['map'](_0x58b8c3=>this['_getViewJson'](_0x58b8c3))};if(_0x3db8c1['is']('uiElement')&&'$comment'!=_0x3db8c1['name']){const _0x2bead4=_0x3db8c1['render'](_0x3fc017['domDocument'],_0x3fc017);_0x4b3b9e['children']['push'](_0x2bead4['outerHTML']);}else{if(_0x3db8c1['is']('rawElement')){const _0x5ae06d=_0x3fc017['domDocument']['createElement'](_0x5691a0['name']);_0x3db8c1['render'](_0x5ae06d,_0x3fc017),_0x4b3b9e['children']['push'](_0x5ae06d['innerHTML']);}}const _0x23d490=Array['from'](_0x5691a0['getCustomProperties']());_0x23d490['length']>0x0&&(_0x4b3b9e['customProperties']=_0x23d490);const _0x315294=_0x5691a0['getFillerOffset']();return null!==_0x315294&&(_0x4b3b9e['fillerOffset']=_0x315294),_0x4b3b9e;}}['_markChanges'](_0x5e8e46,_0x237007,_0x31a179,_0x6de0f8,_0x48875f,_0x3863bf){let _0x3f8558=null,_0x23baaa=null,_0x5cccca=0x0;const _0x84e60b=this['editor']['model'];for(let _0x143651=0x0;_0x143651<_0x237007['length'];_0x143651++){const _0x485e5b=this['_getVidAttributeName'](_0x237007[_0x143651]),_0x137fd3=_0x237007[_0x143651]['item']['getAttribute'](_0x485e5b),_0x448ec3=_0x31a179['get'](_0x137fd3),_0x21fb0f=_0x143651==_0x237007['length']-0x1;!_0x3f8558&&_0x448ec3&&(_0x3f8558=_0x448ec3,_0x23baaa=_0x237007[_0x143651]);const _0x45e9de=!!_0x3f8558&&!!_0x448ec3&&_0x448ec3['userId']!=_0x3f8558['userId'],_0x5c5d07=!!_0x3f8558&&!!_0x448ec3&&_0x448ec3['aiSource']!=_0x3f8558['aiSource'];_0x3f8558&&(!_0x448ec3||_0x45e9de||_0x5c5d07)&&(_0x138ff5(_0x448ec3,Ot(_0x23baaa,_0x5e8e46,_0x84e60b),Ot(_0x237007[_0x143651],_0x5e8e46,_0x84e60b)),_0x3f8558=_0x448ec3||null,_0x23baaa=_0x448ec3?_0x237007[_0x143651]:null),_0x3f8558&&_0x21fb0f&&_0x138ff5(_0x448ec3,Ot(_0x23baaa,_0x5e8e46,_0x84e60b),Ct(_0x237007[_0x143651],_0x5e8e46,_0x84e60b));}function _0x138ff5(_0x10b518,_0x2ee86f,_0x5d54e8){const _0x42c349=_0x3f8558['userId'],_0x4c8d8a=_0x3f8558['aiSource'],_0x3ecfb3='revision:'+_0x6de0f8+':'+_0x42c349+':'+_0x5cccca++,_0xd56f84=_0x84e60b['createRange'](_0x2ee86f,_0x5d54e8);_0x5e8e46['markers']['set'](_0x3ecfb3,_0xd56f84),_0x4c8d8a&&(_0x3863bf[_0x3ecfb3]=_0x4c8d8a),null!==_0x42c349&&_0x48875f['add'](_0x42c349);}}_getVidAttributeName(_0x5ca80b){switch(_0x5ca80b['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0x44c101){const _0x86551a=this['_idsRoots']['get'](_0x44c101['position']['root']['rootName']),_0x5918d8=_0x289722(_0x44c101['position'],_0x86551a),_0x767c79=null===_0x44c101['_authorId']?null:_0x44c101['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d3b68=_0x44c101['_aiSource']||null,_0x183946=_0x5918d8['parent'],_0x5a5f74=this['_revisionId'],_0x3a33a6=[];for(const _0x3b9c47 of _0x44c101['nodes'])if(_0x3b9c47['is']('element'))_0x3a33a6['push'](this['_makeIdsRoot'](_0x3b9c47));else{for(let _0x13dadd=0x0;_0x13dadd<_0x3b9c47['offsetSize'];_0x13dadd++)_0x3a33a6['push'](new _0x28c730('$text',{'vid':this['_revisionId']++}));}const _0xb3c3f8=this['_revisionId'];for(let _0x52387e=_0x5a5f74;_0x52387e<_0xb3c3f8;_0x52387e++)this['_touched']['set'](_0x52387e,{'userId':_0x767c79,'aiSource':_0x4d3b68});_0x183946['_insertChild'](_0x5918d8['offset'],_0x3a33a6);}_setTouched(_0x2ee003,_0x209544,_0x39ac0f){this['_touched']['set'](_0x2ee003,{'userId':_0x209544,'aiSource':_0x39ac0f||this['_touched']['get'](_0x2ee003)?.['aiSource']||null});}_handleMoveOperation(_0x2b49f0){(_0x2b49f0=this['_cloneOperation'](_0x2b49f0,this['_idsRoots']))['_execute']();const _0x16a2d6=null===_0x2b49f0['_authorId']?null:_0x2b49f0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x116a01=_0x2b49f0['_aiSource']||null,_0x1e8b83=_0x2b49f0['getMovedRangeStart'](),_0x4f7b4c=_0x1e8b83['parent'],_0x46c142=_0x1e8b83['offset'],_0xbf0a88=(_0x1a8488,_0x109f9e,_0x5a8760)=>{for(let _0x2065d5=_0x109f9e;_0x2065d5<_0x5a8760;_0x2065d5++){const _0x1040c1=_0x1a8488['getChild'](_0x2065d5);_0x1040c1['is']('element','$text')?this['_setTouched'](_0x1040c1['getAttribute']('vid'),_0x16a2d6,_0x116a01):(this['_setTouched'](_0x1040c1['getAttribute']('vid_start'),_0x16a2d6,_0x116a01),_0xbf0a88(_0x1040c1,0x0,_0x1040c1['childCount']),this['_setTouched'](_0x1040c1['getAttribute']('vid_end'),_0x16a2d6,_0x116a01));}};_0xbf0a88(_0x4f7b4c,_0x46c142,_0x46c142+_0x2b49f0['howMany']);}_handleMergeOperation(_0x4e5647){const _0x5c4ec2=null===(_0x4e5647=this['_cloneOperation'](_0x4e5647,this['_idsRoots']))['_authorId']?null:_0x4e5647['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a8bbf=_0x4e5647['_aiSource']||null,_0x65a552=_0x4e5647['targetPosition']['parent'],_0x854fe5=_0x4e5647['sourcePosition']['parent'],_0x4e3b6f=_0x65a552['getAttribute']('vid_end'),_0x4dee27=_0x854fe5['getAttribute']('vid_start');_0x65a552['_setAttribute']('vid_end',_0x854fe5['getAttribute']('vid_end')),_0x854fe5['_setAttribute']('vid_end',_0x4e3b6f),this['_setTouched'](_0x4dee27,_0x5c4ec2,_0x4a8bbf),this['_setTouched'](_0x4e3b6f,_0x5c4ec2,_0x4a8bbf),_0x4e5647['_execute']();}_handleSplitOperation(_0x26eda0){const _0x249258=null===(_0x26eda0=this['_cloneOperation'](_0x26eda0,this['_idsRoots']))['_authorId']?null:_0x26eda0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48a760=_0x26eda0['_aiSource']||null,_0x242121=_0x26eda0['graveyardPosition'],_0x45f6d2=_0x26eda0['splitPosition']['parent'];_0x26eda0['_execute']();const _0x4a74cf=_0x45f6d2['getAttribute']('vid_end'),_0x371e07=_0x26eda0['insertionPosition']['nodeAfter'];if(_0x242121){const _0x299327=_0x371e07['getAttribute']('vid_end'),_0x548501=_0x45f6d2['getAttribute']('vid_end');_0x45f6d2['_setAttribute']('vid_end',_0x299327),_0x371e07['_setAttribute']('vid_end',_0x548501),this['_setTouched'](_0x45f6d2['getAttribute']('vid_end'),_0x249258,_0x48a760),this['_setTouched'](_0x371e07['getAttribute']('vid_start'),_0x249258,_0x48a760);}else{const _0x177831=this['_revisionId']++,_0x583e05=this['_revisionId']++;_0x45f6d2['_setAttribute']('vid_end',_0x177831),_0x371e07['_setAttribute']('vid_start',_0x583e05),_0x371e07['_setAttribute']('vid_end',_0x4a74cf),this['_setTouched'](_0x177831,_0x249258,_0x48a760),this['_setTouched'](_0x583e05,_0x249258,_0x48a760);}}_handleMarkerOperation(_0x5e4bad){if(!_0x5e4bad['affectsData'])return;const _0x255efd=(_0x5e4bad=this['_cloneOperation'](_0x5e4bad,this['_diffRoots']))['oldRange']?_0x5e4bad['oldRange']['root']:null,_0x65a1aa=_0x5e4bad['newRange']?_0x5e4bad['newRange']['root']:null;_0x255efd&&this['_markers']['delete'](_0x5e4bad['name']),_0x65a1aa&&this['_markers']['set'](_0x5e4bad['name'],_0x5e4bad['newRange']['clone']());const _0x1c5236=null===_0x5e4bad['_authorId']?null:_0x5e4bad['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x396d98=_0x5e4bad['name'];if(_0x5e4bad['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x396d98,_0x5e4bad['_aiSource']),!this['_touchedMarkers']['has'](_0x396d98))return void this['_touchedMarkers']['set'](_0x396d98,{'range':_0x5e4bad['oldRange'],'userId':_0x1c5236});const _0x3f9c74=this['_touchedMarkers']['get'](_0x396d98),_0x1d78b6=_0x3f9c74['range'],_0x3aec5b=_0x5e4bad['newRange'];null==_0x1d78b6&&null==_0x3aec5b||_0x1d78b6&&_0x3aec5b&&_0x1d78b6['isEqual'](_0x3aec5b)?this['_touchedMarkers']['delete'](_0x5e4bad['name']):_0x3f9c74['userId']=_0x1c5236;}_handleRootOperation(_0x30befd,_0x38e144){this['_diffRoots']['has'](_0x30befd['rootName'])?this['_diffRoots']['get'](_0x30befd['rootName'])['_isAttached']=_0x30befd['isAdd']:(this['_diffRoots']['set'](_0x30befd['rootName'],Et(_0x30befd['rootName'],_0x30befd['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x30befd['rootName'],{}),_0x38e144&&this['_idsRoots']['set'](_0x30befd['rootName'],Et(_0x30befd['rootName'],_0x30befd['elementName'],!0x0)));const _0x2cd72a=null===_0x30befd['_authorId']?null:_0x30befd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2772bb=this['_touchedRoots']['get'](_0x30befd['rootName']);_0x2772bb&&_0x2772bb['userId']===_0x2cd72a?this['_touchedRoots']['delete'](_0x30befd['rootName']):this['_touchedRoots']['set'](_0x30befd['rootName'],{'userId':_0x2cd72a,'isAttached':_0x30befd['isAdd']});}_handleRootAttributeOperation(_0x14a676){const _0x2f7e6d=this['_diffRootsAttributes']['get'](_0x14a676['root']['rootName']);null===_0x14a676['newValue']?delete _0x2f7e6d[_0x14a676['key']]:_0x2f7e6d[_0x14a676['key']]=_0x14a676['newValue'];}};function St(_0x5990bc){const _0x1f9605=Et(_0x5990bc['rootName'],_0x5990bc['name'],_0x5990bc['isAttached']());for(const _0x5521a2 of _0x5990bc['getChildren']()){const _0x4da94c=_0x5521a2['_clone'](!0x0);_0x1f9605['_appendChild'](_0x4da94c);}return _0x1f9605;}function Et(_0x2b6500,_0x1f8ddf,_0x52b115=!0x0){const _0x402f05=new _0x4acbd6();return _0x402f05['rootName']=_0x2b6500,_0x402f05['name']=_0x1f8ddf,_0x402f05['_isAttached']=_0x52b115,_0x402f05['isAttached']=()=>_0x402f05['_isAttached'],_0x402f05;}function Ot(_0x1a7667,_0x517b5b,_0x58e493){const _0x116357='elementEnd'==_0x1a7667['type']?_0x58e493['createPositionAt'](_0x1a7667['item'],'end'):_0x58e493['createPositionBefore'](_0x1a7667['item']);return _0x58e493['createPositionFromPath'](_0x517b5b,_0x116357['path'],_0x116357['stickiness']);}function Ct(_0x575c94,_0x10db76,_0x36944a){const _0x57008b='elementStart'==_0x575c94['type']?_0x36944a['createPositionAt'](_0x575c94['item'],0x0):_0x36944a['createPositionAfter'](_0x575c94['item']);return _0x36944a['createPositionFromPath'](_0x10db76,_0x57008b['path'],_0x57008b['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x57c0bb();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x5bbf4d){super(),this['id']=_0x5bbf4d['id']||_0x5289a7(),this['author']=_0x5bbf4d['author'],this['type']=_0x5bbf4d['type'],this['data']=_0x5bbf4d['data']||{},this['rootName']=_0x5bbf4d['rootName'],this['set']('createdAt',_0x5bbf4d['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x1354ab,_0x330bd8){this['newRevisionId']=_0x1354ab,this['oldRevisionId']=_0x330bd8,this['changes']=new _0x520f62();}_setChanges(_0xd948e7){for(const _0x2e1c23 of _0xd948e7)this['changes']['add'](_0x2e1c23);}},Pt=class extends _0x3ccb16{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x312567,_0x300371,bt,Rt];}constructor(_0x4f7b14){super(_0x4f7b14),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',(_0x6ab1ff,_0x393d7a,_0x181072)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x45c23b=>{for(const _0x4d611f of this['editor']['editing']['view']['document']['roots'])_0x181072?_0x45c23b['removeClass']('ck-editor__editable__overlay',_0x4d611f):_0x45c23b['addClass']('ck-editor__editable__overlay',_0x4d611f);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x57b56f=>null!==_0x57b56f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x42ade3,_0x1e2a59,_0x4bb0c2)=>_0x42ade3&&_0x4bb0c2?_0x1e2a59['changes']['getIndex'](_0x4bb0c2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x44d005,_0x599bcf)=>_0x44d005?_0x599bcf['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x300371),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x416e0d=this['editor'],_0x2b8094=new $t(_0x416e0d,{'direction':'backward'}),_0x466b55=new $t(_0x416e0d,{'direction':'forward'});_0x416e0d['commands']['add']('showPreviousChange',_0x2b8094),_0x416e0d['commands']['add']('showNextChange',_0x466b55),_0x416e0d['commands']['add']('restoreRevision',new Ft(_0x416e0d)),this['on']('change:numberOfChanges',()=>{_0x2b8094['refresh'](),_0x466b55['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x416e0d['enableReadOnlyMode']('revision-viewer'),_0x416e0d['plugins']['has']('WidgetToolbarRepository')&&_0x416e0d['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x12b329){return await this['_utils']['loadRevisionData'](_0x12b329,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x12b329);}async getRevisionRootsAttributes(_0x39eed8){return await this['_utils']['loadRevisionData'](_0x39eed8,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x39eed8);}async['compare'](_0x3545d5,_0x3632c8,_0x3eb166=!0x1){if(!this['isEnabled'])return;const _0x377f51=this['diff'],_0x5eae7d=this['repository'],_0x14340f='string'==typeof _0x3545d5?_0x5eae7d['getRevision'](_0x3545d5):_0x3545d5,_0x5a1b31='string'==typeof _0x3632c8?_0x5eae7d['getRevision'](_0x3632c8):_0x3632c8,_0x1c6f4f=_0x14340f['id'],_0x79667b=_0x5a1b31?_0x5a1b31['id']:null;if(!_0x3eb166&&this['diff']&&this['diff']['newRevisionId']===_0x1c6f4f&&this['diff']['oldRevisionId']===_0x79667b)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x1c6f4f,_0x79667b);const _0x3bdfbf=this['_getRevisionsRange'](_0x14340f,_0x5a1b31,!0x0)['map'](_0x2a51b7=>this['_utils']['loadRevisionData'](_0x2a51b7,this['adapter']));return _0x3bdfbf['push'](new Promise(_0x2b36af=>{setTimeout(_0x2b36af,0x14);})),Promise['all'](_0x3bdfbf)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2191a0=this['_getDiff'](_0x1c6f4f,_0x79667b);this['_cleanUpCommentMarkers'](_0x2191a0);for(const _0x2097c4 of _0x2191a0['changes'])this['_changeIdToChange']['set'](_0x2097c4['id'],_0x2097c4);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5cf956=>{for(const _0x135b9b of this['editor']['model']['document']['getRootNames']())_0x5cf956['detachRoot'](_0x135b9b);for(const _0x10d770 of Object['keys'](_0x2191a0['model'])){const _0xa1893a=_0x2191a0['model'][_0x10d770]['name'],_0x478667=_0x5cf956['addRoot'](_0x10d770,_0xa1893a);for(const _0x4f0107 of Object['keys'](_0x2191a0['attributes'][_0x10d770]))_0x5cf956['setAttribute'](_0x4f0107,_0x2191a0['attributes'][_0x10d770][_0x4f0107],_0x478667);_0x5cf956['insert'](_0x2191a0['model'][_0x10d770],_0x478667,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2191a0['changes'])),this['isReady']=!0x0;})['catch'](_0x1598f6=>{console['error'](_0x1598f6),this['_cleanUp'](),_0x377f51&&(this['diff']=_0x377f51),this['isReady']=!0x0;});}addRevisionData(_0x579f5e,_0xaca35a){const _0x350fb9=this['repository']['createRevision'](_0x579f5e);return _0x350fb9['on']('_update',(_0x33cd96,_0x39fae6,_0x3db29e)=>_0xaca35a(_0x39fae6,_0x3db29e,_0x350fb9)),this['repository']['addRevision'](_0x350fb9),_0x350fb9;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3f4478=>{for(const _0x426053 of this['editor']['model']['document']['getRootNames']())_0x3f4478['detachRoot'](_0x426053);});}_cleanUpCommentMarkers(_0x7c73f7){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x5ddc77=this['_getVisibleCommentThreadIds']();for(const _0xa78cf9 of Object['values'](_0x7c73f7['model']))for(const _0x1ce0a7 of Array['from'](_0xa78cf9['markers']['keys']()))_0x1ce0a7['startsWith']('revision-comment:')&&!_0x5ddc77['has'](Ut(_0x1ce0a7))&&_0xa78cf9['markers']['delete'](_0x1ce0a7);}_sortAndFilterDiffChanges(_0x9bc8d9){const _0x3ed016=[],_0xa2c906=new Map();for(const _0x279104 of this['editor']['model']['document']['getRootNames']()){const _0x271991=this['editor']['editing']['view']['getDomRoot'](_0x279104);if(!_0x271991)continue;const _0x17c5df=_0x271991['getClientRects']()['item'](0x0);_0x17c5df&&(_0x3ed016['push'](_0x279104),_0xa2c906['set'](_0x279104,_0x17c5df));}return _0x3ed016['sort']((_0x3eece9,_0x3bdfd0)=>{const _0x1e843d=_0xa2c906['get'](_0x3eece9),_0x13c10e=_0xa2c906['get'](_0x3bdfd0);return _0x1e843d['y']-_0x13c10e['y']||_0x1e843d['x']-_0x13c10e['x'];}),(_0x9bc8d9=_0x9bc8d9['filter'](_0xe9ffa1=>_0x3ed016['includes'](_0xe9ffa1['rootName'])))['sort']((_0x53c7f0,_0x2c0f2a)=>_0x3ed016['indexOf'](_0x53c7f0['rootName'])-_0x3ed016['indexOf'](_0x2c0f2a['rootName'])),_0x9bc8d9;}['_makeTape'](_0x5b387b,_0x197dc2={}){const _0x4224f5=Array['from'](_0x5b387b['markers'])['filter'](([_0x1831bb,_0x1c1bbc])=>_0x1831bb['startsWith']('revision:')&&!_0x1c1bbc['isCollapsed']),_0x53fb94=Array['from'](this['editor']['model']['createRangeIn'](_0x5b387b)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4224f5['length'])for(const _0x540970 of _0x53fb94){const [_0xae4fe8,_0x2d22f9]=_0x4224f5[0x0],[,_0x941cba,_0x226aa8]=_0xae4fe8['split'](':'),_0x34aa19=_0x197dc2[_0xae4fe8]||null;if(_0x2d22f9['end']['isEqual'](_0x540970['nextPosition'])&&_0x4224f5['shift'](),(_0x540970['previousPosition']['isEqual'](_0x2d22f9['start'])||_0x540970['previousPosition']['isAfter'](_0x2d22f9['start']))&&('insertion'==_0x941cba?_0x540970['isAdded']={'userId':_0x226aa8,'aiSource':_0x34aa19}:'deletion'==_0x941cba&&(_0x540970['isRemoved']={'userId':_0x226aa8,'aiSource':_0x34aa19})),0x0==_0x4224f5['length'])break;}return _0x53fb94;}_refreshStartEndIndex(_0xd88482){const _0x30bbd6=new Map();for(let _0x3d5c81=0x0;_0x3d5c81<_0xd88482['length'];_0x3d5c81++)'text'===_0xd88482[_0x3d5c81]['type']?(_0xd88482[_0x3d5c81]['item']['startIndex']=_0x3d5c81,_0xd88482[_0x3d5c81]['item']['endIndex']=_0x3d5c81):('elementStart'===_0xd88482[_0x3d5c81]['type']?_0xd88482[_0x3d5c81]['item']['startIndex']=_0x3d5c81:'elementEnd'===_0xd88482[_0x3d5c81]['type']&&(_0xd88482[_0x3d5c81]['item']['endIndex']=_0x3d5c81),_0x30bbd6['set'](_0xd88482[_0x3d5c81]['id'],_0x3d5c81));for(const _0xa25a3e of _0x30bbd6['values']())'elementStart'===_0xd88482[_0xa25a3e]['type']?_0xd88482[_0xa25a3e]['item']['endIndex']=_0x30bbd6['get'](_0xd88482[_0xa25a3e]['pairId']):'elementEnd'===_0xd88482[_0xa25a3e]['type']&&(_0xd88482[_0xa25a3e]['item']['startIndex']=_0x30bbd6['get'](_0xd88482[_0xa25a3e]['pairId']));}['_processTape'](_0x2b9983){for(let _0x15bbd2=0x0;_0x15bbd2<_0x2b9983['length'];_0x15bbd2++){if('elementStart'===_0x2b9983[_0x15bbd2]['type'])_0x2b9983[_0x15bbd2]['item']['startIndex']=_0x15bbd2;else{if('elementEnd'===_0x2b9983[_0x15bbd2]['type']){_0x2b9983[_0x15bbd2]['item']['endIndex']=_0x15bbd2;const _0x7282a=_0x2b9983[_0x15bbd2]['item']['startIndex'];_0x2b9983[_0x7282a]['pairId']=_0x2b9983[_0x15bbd2]['id'],_0x2b9983[_0x15bbd2]['pairId']=_0x2b9983[_0x7282a]['id'];}else _0x2b9983[_0x15bbd2]['item']['startIndex']=_0x15bbd2,_0x2b9983[_0x15bbd2]['item']['endIndex']=_0x15bbd2,_0x2b9983[_0x15bbd2]['pairId']=null;}_0x2b9983[_0x15bbd2]['markersStart']||(_0x2b9983[_0x15bbd2]['markersStart']=[],_0x2b9983[_0x15bbd2]['markersEnd']=[]);}}_markInsertions(_0x4a92e7,_0x4f4162){const _0x214c30=_0x4a92e7['filter'](_0x40834f=>!_0x40834f['isAdded']);for(let _0x81d4b7=0x0;_0x81d4b7<_0x4f4162['length'];_0x81d4b7++)_0x4f4162[_0x81d4b7]['isAdded']&&(_0x214c30[_0x81d4b7]['isAdded']=_0x4f4162[_0x81d4b7]['isAdded']);}_getDiff(_0x1e8c3c,_0x28586d=null){const _0x200fa7=this['repository']['getRevision'](_0x1e8c3c),_0x21a9b2=_0x28586d?this['repository']['getRevision'](_0x28586d):null,_0xf84dbd=this['_getRevisionsRange'](_0x200fa7,_0x21a9b2),_0x4d59fa=_0xf84dbd[_0xf84dbd['length']-0x1],_0x15c9b4=new Map(),_0x1b4bc4={'model':{},'attributes':{},'changes':[]},_0x5304a4=new Set(),_0x1cadd5=new Map();for(let _0x2f967f=_0xf84dbd['length']-0x1;_0x2f967f>=0x0;_0x2f967f--){const _0x5181ec=_0xf84dbd[_0x2f967f];for(const _0x102f0f of Object['keys'](_0x5181ec['diffData']))if(_0x5181ec['diffData'][_0x102f0f]['attachChange']){const _0x29473f=_0x5181ec['diffData'][_0x102f0f]['attachChange'];_0x29473f['isAttached']?(_0x5304a4['add'](_0x102f0f),_0x1cadd5['has'](_0x102f0f)&&_0x1cadd5['get'](_0x102f0f)['userId']==_0x29473f['userId']?_0x1cadd5['delete'](_0x102f0f):_0x1cadd5['set'](_0x102f0f,_0x29473f)):_0x1cadd5['has'](_0x102f0f)?(_0x5304a4['delete'](_0x102f0f),_0x1cadd5['delete'](_0x102f0f)):(_0x5304a4['add'](_0x102f0f),_0x1cadd5['set'](_0x102f0f,_0x29473f));}else _0x5304a4['add'](_0x102f0f);}for(const _0x1edd16 of _0x5304a4){const _0x3a2cc1=_0x1cadd5['has'](_0x1edd16)&&!_0x1cadd5['get'](_0x1edd16)['isAttached'];let _0x21d8ef=_0x3a2cc1?_0xf84dbd['length']-0x1:0x0;const _0x5dcafd=_0x3a2cc1?-0x1:0x1;for(;_0xf84dbd[_0x21d8ef];){const _0x582105=_0xf84dbd[_0x21d8ef];if(_0x582105['diffData'][_0x1edd16]){const _0x51720b=_0x3a2cc1?_0x582105['diffData'][_0x1edd16]['attributesBefore']:_0x582105['diffData'][_0x1edd16]['attributesAfter'];_0x1b4bc4['attributes'][_0x1edd16]=_0x51720b?_0x144f08(_0x51720b):{};break;}_0x21d8ef+=_0x5dcafd;}}for(const _0x9a5fd9 of _0xf84dbd){_0x9a5fd9['model']={};for(const _0x566785 of _0x9a5fd9['authors'])_0x15c9b4['set'](_0x566785['id'],_0x566785);for(const _0x1c1475 of _0x5304a4){const _0x32958b=_0x9a5fd9['diffData'][_0x1c1475]?_0x9a5fd9['diffData'][_0x1c1475]['insertions']:'[]',_0x47fc86=_0x9a5fd9['diffData'][_0x1c1475]?_0x9a5fd9['diffData'][_0x1c1475]['deletions']:'[]',_0x4000a1=_0x9a5fd9['diffData'][_0x1c1475]?.['rootElementName']||'$root';_0x9a5fd9['model'][_0x1c1475]={'insertions':this['_utils']['_makeModelFromViewString'](_0x32958b,_0x4000a1),'deletions':this['_utils']['_makeModelFromViewString'](_0x47fc86,_0x4000a1)};}}for(const _0x56ccbd of _0x5304a4){let _0x3f7bd9=null,_0x155a94=0x0;const _0x3622fc=_0xf84dbd['map'](_0x1d54ac=>_0x1d54ac['diffData'][_0x56ccbd]?.['rootElementName'])['find'](_0x479b9b=>void 0x0!==_0x479b9b)||'$root',_0x5ed84b=new Map(Array['from'](_0x200fa7['model'][_0x56ccbd]['insertions']['markers'])['filter'](([_0x9c8357])=>!_0x9c8357['startsWith']('revision:')));let _0x5ea7a5=0x0;for(const _0x3426d7 of _0xf84dbd){const _0x501988=_0x3426d7['diffData'][_0x56ccbd]?.['aiSources']||{},_0x1e2d70=this['_makeTape'](_0x3426d7['model'][_0x56ccbd]['insertions'],_0x501988);_0x3426d7==_0x200fa7?(_0x3f7bd9=_0x1e2d70,_0x155a94=_0x3f7bd9['length'],_0x3f7bd9['forEach'](_0x236a70=>{_0x236a70['id']=_0x5ea7a5++;}),this['_processTape'](_0x3f7bd9)):this['_markInsertions'](_0x3f7bd9,_0x1e2d70);const _0x463080=_0x3f7bd9['filter'](_0x167a61=>!_0x167a61['isAdded'])['map'](_0x42d54e=>_0x42d54e['id']);let _0x1ac205=0x0;const _0x10ea08=this['_makeTape'](_0x3426d7['model'][_0x56ccbd]['deletions'],_0x501988);_0x10ea08['forEach'](_0x30aedb=>{_0x30aedb['isRemoved']?_0x30aedb['id']=_0x155a94++:_0x30aedb['id']=_0x463080[_0x1ac205++];}),this['_processTape'](_0x10ea08),this['_setDistance'](_0x3f7bd9,'isAdded'),this['_setDistance'](_0x10ea08,'isRemoved'),_0x3426d7==_0x200fa7&&this['_markMarkers'](_0x3f7bd9,_0x5ed84b),_0x3f7bd9=this['_joinTapes'](_0x3f7bd9,_0x10ea08),this['_refreshStartEndIndex'](_0x3f7bd9),this['_setDistance'](_0x3f7bd9,'isRemoved');}_0x3f7bd9=_0x3f7bd9['filter'](_0x1c3de0=>!(_0x1c3de0['isAdded']&&_0x1c3de0['isRemoved']));const _0x4868c6=new Map(_0x4d59fa['model'][_0x56ccbd]['deletions']['markers']),_0xb15a55=new Set(_0x5ed84b['keys']());for(const _0x37e0f3 of _0x4868c6['keys']())_0xb15a55['delete'](_0x37e0f3);const _0x4ae334=Object['assign']({},..._0xf84dbd['map'](_0x4ed3c1=>_0x4ed3c1['diffData'][_0x56ccbd]?.['aiSources']));this['_markSuggestions'](_0x3f7bd9,_0xb15a55,_0x4ae334),this['_fixObsoleteTags'](_0x3f7bd9),_0x3f7bd9=this['_removeMissingPairs'](_0x3f7bd9),_0x3f7bd9=this['_markMismatchedRemovedTags'](_0x3f7bd9),_0x3f7bd9=this['_removeUnsupportedChanges'](_0x3f7bd9);const {root:_0x2cd3d1,changes:_0x1ce5c5}=this['_makeModelFromTape'](_0x3f7bd9,_0x15c9b4,_0x56ccbd,_0x3622fc);_0x1b4bc4['model'][_0x56ccbd]=_0x2cd3d1;const _0x5b3f2d=_0x1cadd5['get'](_0x56ccbd);if(_0x5b3f2d){const _0x370741=_0x15c9b4['get'](_0x5b3f2d['userId']),_0x5c8b70=new Mt({'author':_0x370741,'type':_0x5b3f2d['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x56ccbd});_0x1ce5c5['unshift'](_0x5c8b70),_0x1b4bc4['attributes'][_0x56ccbd]['revisionHistoryAttachChange']=_0x5c8b70['id'];}_0x1b4bc4['changes']=_0x1b4bc4['changes']['concat'](_0x1ce5c5);}return _0x1b4bc4;}['_markMarkers'](_0x4652ef,_0x166f1e){for(let _0x39af44=0x0;_0x39af44<_0x4652ef['length'];_0x39af44++)for(const [_0x4b179d,_0x2ce0db]of _0x166f1e)!_0x2ce0db['isCollapsed']&&_0x2ce0db['start']['isEqual'](_0x4652ef[_0x39af44]['previousPosition'])&&_0x4652ef[_0x39af44]['markersStart']['push'](_0x4b179d),_0x2ce0db['end']['isEqual'](_0x4652ef[_0x39af44]['nextPosition'])&&_0x4652ef[_0x39af44]['markersEnd']['push'](_0x4b179d);}['_joinTapes'](_0x36d53c,_0x1197ea){let _0x44219e=[],_0x2f1097=0x0,_0x1eb919=0x0;for(;_0x2f1097<_0x36d53c['length']||_0x1eb919<_0x1197ea['length'];){const _0x1c241a=_0x36d53c[_0x2f1097]||{},_0x4f5803=_0x1197ea[_0x1eb919]||{};if(_0x1c241a['id']==_0x4f5803['id'])_0x2f1097++,_0x1eb919++,_0x44219e['push'](_0x1c241a);else{if(_0x4f5803['isRemoved']&&_0x1c241a['isAdded']){const {commonTape:_0x4292e9,iEnd:_0x3956f2,jEnd:_0x59bb49}=this['_threeWayMerge'](_0x36d53c,_0x2f1097,_0x1197ea,_0x1eb919);_0x44219e=_0x44219e['concat'](_0x4292e9),_0x2f1097=_0x3956f2,_0x1eb919=_0x59bb49;}else _0x4f5803['isRemoved']?(_0x1eb919++,_0x44219e['push'](_0x4f5803)):(_0x2f1097++,_0x44219e['push'](_0x1c241a));}}return _0x44219e;}_markSuggestions(_0x1e5a79,_0x400174,_0x3281aa){const _0x2237f6=[];for(let _0x19e952=0x0;_0x19e952<_0x1e5a79['length'];_0x19e952++){for(let _0x3bbbca=0x0;_0x3bbbca<_0x1e5a79[_0x19e952]['markersStart']['length'];_0x3bbbca++){const _0x3e674e=_0x1e5a79[_0x19e952]['markersStart'][_0x3bbbca];if(!_0x400174['has'](_0x3e674e))continue;const {group:_0x3795ae,type:_0x28e8d2,authorId:_0x4d17e2}=_0x58c95b(_0x3e674e);if('revision-suggestion'!=_0x3795ae||'insertion'!=_0x28e8d2&&'deletion'!=_0x28e8d2)continue;const _0x34da04=_0x3281aa['suggestion:'+_0x3e674e['slice'](0x14)]||null;_0x2237f6['unshift']({'type':_0x28e8d2,'name':_0x3e674e,'userId':_0x4d17e2,'aiSource':_0x34da04}),_0x1e5a79[_0x19e952]['markersStart']['splice'](_0x3bbbca,0x1),_0x3bbbca--;}_0x99fa64(_0x1e5a79[_0x19e952]);for(let _0x18349a=0x0;_0x18349a<_0x1e5a79[_0x19e952]['markersEnd']['length'];_0x18349a++){const _0x480691=_0x1e5a79[_0x19e952]['markersEnd'][_0x18349a];if(!_0x400174['has'](_0x480691))continue;const {group:_0x243841,type:_0x13facc}=_0x58c95b(_0x480691);if('revision-suggestion'!=_0x243841||'insertion'!=_0x13facc&&'deletion'!=_0x13facc)continue;_0x1e5a79[_0x19e952]['markersEnd']['splice'](_0x18349a,0x1),_0x18349a--;const _0x2336a9=_0x2237f6['findIndex'](_0x3940c7=>_0x3940c7['name']==_0x480691);_0x2336a9>-0x1&&_0x2237f6['splice'](_0x2336a9,0x1);}}function _0x58c95b(_0x5c669d){const _0x3036e5=_0x5c669d['split'](':');return{'group':_0x3036e5[0x0],'type':_0x3036e5[0x1],'subType':_0x3036e5['length']>=0x5?_0x3036e5[0x2]:null,'id':_0x3036e5['length']<0x5?_0x3036e5[0x2]:_0x3036e5[0x3],'authorId':_0x3036e5['length']<0x5?_0x3036e5[0x3]:_0x3036e5[0x4],'markerCount':0x6==_0x3036e5['length']?_0x3036e5[0x5]:null};}function _0x99fa64(_0x2c67d3){for(let _0x467f5b=0x0;_0x467f5b<_0x2237f6['length'];_0x467f5b++){if(_0x2c67d3['isAdded']&&'insertion'==_0x2237f6[_0x467f5b]['type']&&_0x2c67d3['isAdded']['userId']==_0x2237f6[_0x467f5b]['userId'])return _0x2c67d3['isAddSuggestion']={..._0x2237f6[_0x467f5b],'aiSource':_0x2c67d3['isAdded']['aiSource']||_0x2237f6[_0x467f5b]['aiSource']},void delete _0x2c67d3['isAdded'];if(!_0x2c67d3['isAdded']&&!_0x2c67d3['isRemoved']&&'deletion'==_0x2237f6[_0x467f5b]['type'])return void(_0x2c67d3['isRemoveSuggestion']=_0x2237f6[_0x467f5b]);}}}_setDistance(_0x4f5e5b,_0x5916bb){let _0xdffdb3=0x0,_0x12bdf0=!0x1;const _0x3e62fc=new Map();for(const _0x8a48a8 of _0x4f5e5b)_0x8a48a8[_0x5916bb]?_0x12bdf0&&(_0xdffdb3++,_0x12bdf0=!0x1):(_0xdffdb3++,_0x12bdf0=!0x0),_0x3e62fc['set'](_0x8a48a8['id'],_0xdffdb3);for(let _0x482adf=0x0;_0x482adf<_0x4f5e5b['length'];_0x482adf++){if('isRemoved'==_0x5916bb&&_0x4f5e5b[_0x482adf]['isAdded']||'isAdded'==_0x5916bb&&_0x4f5e5b[_0x482adf]['isRemoved'])continue;if('text'==_0x4f5e5b[_0x482adf]['type']){_0x4f5e5b[_0x482adf]['distance']=0x0;continue;}const _0x3f49a0=_0x3e62fc['get'](_0x4f5e5b[_0x482adf]['pairId']),_0x510b98=_0x3e62fc['get'](_0x4f5e5b[_0x482adf]['id']);_0x4f5e5b[_0x482adf]['distance']=_0x3f49a0-_0x510b98;}}_getRevisionsRange(_0x5ac608,_0xf4c226,_0x4e3afd=!0x1){const _0x38c875=[];let _0x25b2c7=this['repository']['getIndex'](_0x5ac608),_0x11dc95=this['repository']['getIndex'](_0xf4c226);for(-0x1==_0x11dc95&&(_0x11dc95=this['repository']['_revisions']['length'],_0x4e3afd=!0x1);_0x25b2c7<_0x11dc95;)_0x38c875['push'](this['repository']['getRevision'](_0x25b2c7)),_0x25b2c7++;return _0x4e3afd&&_0x38c875['push'](this['repository']['getRevision'](_0x25b2c7)),_0x38c875;}_threeWayMerge(_0x19dfcd,_0x516759,_0xa27330,_0x44504a){const _0x1f09d8=this['editor']['model']['schema'];let _0x3a610d=_0x516759;for(;_0x19dfcd[_0x3a610d]&&_0x19dfcd[_0x3a610d]['isAdded'];)_0x3a610d++;let _0x1f8682=_0x44504a;for(;_0xa27330[_0x1f8682]&&_0xa27330[_0x1f8682]['isRemoved'];)_0x1f8682++;_0x336cf3(_0x19dfcd,_0x516759,_0x3a610d),_0x336cf3(_0xa27330,_0x44504a,_0x1f8682);const _0x1c30f6=_0xa27330['slice'](_0x44504a,_0x1f8682)['concat'](_0x19dfcd['slice'](_0x516759,_0x3a610d));return _0x1c30f6['sort']((_0x202cb5,_0x5f27fc)=>_0x202cb5['side']!=_0x5f27fc['side']?_0x202cb5['side']-_0x5f27fc['side']:_0x202cb5['level']!=_0x5f27fc['level']?_0x202cb5['level']-_0x5f27fc['level']:_0x202cb5['distance']!=_0x5f27fc['distance']?_0x5f27fc['distance']-_0x202cb5['distance']:!!_0x202cb5['isAdded']!=!!_0x5f27fc['isAdded']?-0x1==_0x202cb5['side']||0x0==_0x202cb5['side']?_0x202cb5['isAdded']?-0x1:0x1:_0x202cb5['isAdded']?0x1:-0x1:_0x202cb5['index']-_0x5f27fc['index']),{'commonTape':_0x1c30f6,'iEnd':_0x3a610d,'jEnd':_0x1f8682};function _0x336cf3(_0x2b13a8,_0x272c45,_0x311b6e){let _0x4d0ef1=-0x1,_0x59d63b=Number['POSITIVE_INFINITY'],_0x5502cb=!0x0;for(let _0x2e0cbc=_0x272c45;_0x2e0cbc<_0x311b6e;_0x2e0cbc++)if(_0x1f09d8['isInline'](_0x2b13a8[_0x2e0cbc]['item'])||(_0x5502cb=!0x1),_0x2b13a8[_0x2e0cbc]['item']['startIndex']<_0x272c45&&(_0x4d0ef1=_0x2e0cbc),_0x2b13a8[_0x2e0cbc]['item']['endIndex']>=_0x311b6e){_0x59d63b=_0x2e0cbc;break;}_0x5502cb&&(_0x4d0ef1=_0x311b6e-0x1);for(let _0x57f09d=_0x272c45;_0x57f09d<_0x311b6e;_0x57f09d++)_0x2b13a8[_0x57f09d]['side']=_0x57f09d<=_0x4d0ef1?-0x1:_0x57f09d<_0x59d63b?0x0:0x1,_0x2b13a8[_0x57f09d]['index']=_0x57f09d;let _0xf11629=0x0;for(let _0x3823e0=_0x272c45;_0x3823e0<=_0x4d0ef1;_0x3823e0++)0x0==_0x2b13a8[_0x3823e0]['distance']?_0x2b13a8[_0x3823e0]['level']=_0xf11629:(_0xf11629++,_0x2b13a8[_0x3823e0]['level']=_0xf11629,_0xf11629++);for(let _0x33cd7a=_0x272c45;_0x33cd7a<_0x311b6e;_0x33cd7a++)0x0==_0x2b13a8[_0x33cd7a]['side']&&(_0x2b13a8[_0x33cd7a]['level']=_0xf11629);_0xf11629=0x0;for(let _0x142b37=_0x311b6e-0x1;_0x142b37>=_0x59d63b;_0x142b37--)0x0==_0x2b13a8[_0x142b37]['distance']?_0x2b13a8[_0x142b37]['level']=_0xf11629:(_0xf11629--,_0x2b13a8[_0x142b37]['level']=_0xf11629,_0xf11629--);}}_fixObsoleteTags(_0x3ed486){const _0x107cea=new Map(),_0xa35022=this['editor']['model']['schema'];for(let _0x50ec15=0x1;_0x50ec15<_0x3ed486['length'];_0x50ec15++){let _0x118ddb,_0x144373,_0x2d0f43;const _0x3168e3=_0x3ed486[_0x50ec15],_0x21fc21=_0x3ed486[_0x50ec15-0x1];if('text'==_0x3168e3['type'])continue;if(_0x3168e3['type']!=_0x21fc21['type'])continue;if(!_0xa35022['isBlock'](_0x21fc21['item'])||_0xa35022['isLimit'](_0x21fc21['item']))continue;if(!_0xa35022['isBlock'](_0x3168e3['item'])||_0xa35022['isLimit'](_0x3168e3['item']))continue;if((_0x3ed486[_0x50ec15]['isAdded']||_0x3ed486[_0x50ec15]['isAddSuggestion'])&&_0x3ed486[_0x50ec15-0x1]['isRemoved'])_0x118ddb=_0x3ed486[_0x50ec15],_0x144373=_0x3ed486[_0x50ec15-0x1],_0x2d0f43=_0x50ec15-0x1;else{if(!_0x3ed486[_0x50ec15]['isRemoved']||!_0x3ed486[_0x50ec15-0x1]['isAdded']&&!_0x3ed486[_0x50ec15-0x1]['isAddSuggestion'])continue;_0x118ddb=_0x3ed486[_0x50ec15-0x1],_0x144373=_0x3ed486[_0x50ec15],_0x2d0f43=_0x50ec15;}const _0x1fedec=_0x118ddb['level']==_0x144373['level'],_0x1189cd=Math['abs'](_0x118ddb['level'])<Math['abs'](_0x144373['level'])&&0x0==_0x144373['distance'];(_0x1fedec||_0x1189cd)&&(_0x107cea['set'](_0x144373['id'],_0x118ddb['id']),_0x3ed486['splice'](_0x2d0f43,0x1),_0x50ec15--,_0x118ddb['isAdded']=!0x1);}for(let _0x88044e=0x0;_0x88044e<_0x3ed486['length'];_0x88044e++)_0x107cea['has'](_0x3ed486[_0x88044e]['pairId'])&&(_0x3ed486[_0x88044e]['pairId']=_0x107cea['get'](_0x3ed486[_0x88044e]['pairId']));}['_removeMissingPairs'](_0xa03661){const _0x4940a0=new Set(_0xa03661['map'](_0x598c8d=>_0x598c8d['id']));for(let _0x5c95e3=0x0;_0x5c95e3<_0xa03661['length'];_0x5c95e3++)_0x4940a0['has'](_0xa03661[_0x5c95e3]['pairId'])||0x0==_0xa03661[_0x5c95e3]['distance']||(_0xa03661[_0x5c95e3]['isIncorrect']=!0x0);return _0xa03661['filter'](_0x2b7538=>!_0x2b7538['isIncorrect']);}_markMismatchedRemovedTags(_0x378936){const _0x5c09b3=new Set();for(let _0x39c81a=0x0;_0x39c81a<_0x378936['length'];_0x39c81a++){if(_0x5c09b3['has'](_0x378936[_0x39c81a]['id'])&&_0x378936[_0x39c81a]['isRemoved']&&(_0x378936[_0x39c81a]['isIncorrect']=!0x0),_0x378936[_0x39c81a]['isIncorrect'])continue;if(0x0==_0x378936[_0x39c81a]['distance'])continue;if('elementStart'!=_0x378936[_0x39c81a]['type'])continue;if(null==_0x378936[_0x39c81a]['pairId'])continue;let _0x3270ef=_0x39c81a+0x1,_0x22e99e=0x0;for(;_0x378936[_0x3270ef]['id']!=_0x378936[_0x39c81a]['pairId'];)'elementStart'==_0x378936[_0x3270ef]['type']?_0x22e99e++:'elementEnd'==_0x378936[_0x3270ef]['type']&&_0x22e99e--,_0x3270ef++;if(0x0!=_0x22e99e){if(_0x378936[_0x39c81a]['isRemoved'])_0x378936[_0x39c81a]['isIncorrect']=!0x0;else{for(;_0x3270ef!=_0x39c81a;)_0x378936[_0x3270ef]['isRemoved']&&0x0!=_0x378936[_0x3270ef]['distance']&&(_0x378936[_0x3270ef]['isIncorrect']=!0x0,_0x5c09b3['add'](_0x378936[_0x3270ef]['pairId'])),_0x3270ef--;}}}return _0x378936['filter'](_0x266ff6=>!_0x266ff6['isIncorrect']);}_removeUnsupportedChanges(_0x160d54){const _0x27a501=this['editor']['model']['schema'];for(let _0x513791=0x0;_0x513791<_0x160d54['length'];_0x513791++){if(!(_0x160d54[_0x513791]['isAdded']||_0x160d54[_0x513791]['isAddSuggestion']||_0x160d54[_0x513791]['isRemoved']||_0x160d54[_0x513791]['isRemoveSuggestion']))continue;if(0x0==_0x160d54[_0x513791]['distance'])continue;const _0x2f2db5=_0x160d54[_0x513791]['item'];_0x27a501['isBlock'](_0x2f2db5)||_0x27a501['isLimit'](_0x2f2db5)||(_0x160d54[_0x513791]['isAdded']&&delete _0x160d54[_0x513791]['isAdded'],_0x160d54[_0x513791]['isAddSuggestion']&&delete _0x160d54[_0x513791]['isAddSuggestion'],_0x160d54[_0x513791]['isRemoveSuggestion']&&delete _0x160d54[_0x513791]['isRemoveSuggestion'],_0x160d54[_0x513791]['isRemoved']&&(_0x160d54[_0x513791]['isIncorrect']=!0x0));}return _0x160d54['filter'](_0x5876ae=>!_0x5876ae['isIncorrect']);}['_makeModelFromTape'](_0x2e2918,_0x2ec99f,_0x5e2b20,_0x1056a2){const _0x156acc=new _0x4acbd6(),_0x264172=[],_0x21d6cc=new Map(),_0x56b1be=this['editor']['model'],_0x3edc86=_0x56b1be['schema'],_0x303829=[_0x156acc],_0x206601={},_0x4f5f80={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x156acc['name']=_0x1056a2;let _0x476aaa=null;const _0x33dd7f=[0x0];for(let _0x2f60b6=0x0;_0x2f60b6<_0x2e2918['length'];_0x2f60b6++)if('elementStart'===_0x2e2918[_0x2f60b6]['type']){_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f);const _0x1debae=new _0x28c730(_0x2e2918[_0x2f60b6]['item']['name'],_0x2e2918[_0x2f60b6]['item']['getAttributes']());_0x303829[0x0]['_appendChild'](_0x1debae),_0x33dd7f['push'](0x0),_0x303829['unshift'](_0x1debae),_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f);}else'elementEnd'===_0x2e2918[_0x2f60b6]['type']?(_0x303829['shift'](),_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f),_0x33dd7f['pop'](),_0x33dd7f[_0x33dd7f['length']-0x1]++,_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f)):(_0x2e2918[_0x2f60b6]['previousPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f),_0x476aaa?_0x476aaa['_data']+=_0x2e2918[_0x2f60b6]['item']['data']:_0x476aaa=new _0x42becd(_0x2e2918[_0x2f60b6]['item']['data'],_0x2e2918[_0x2f60b6]['item']['getAttributes']()),_0x2e2918[_0x2f60b6+0x1]&&'text'===_0x2e2918[_0x2f60b6+0x1]['type']&&_0x4668f7(_0x476aaa,_0x2e2918[_0x2f60b6+0x1]['item'])||(_0x303829[0x0]['_appendChild'](_0x476aaa),_0x476aaa=null),_0x33dd7f[_0x33dd7f['length']-0x1]+=_0x2e2918[_0x2f60b6]['item']['offsetSize'],_0x2e2918[_0x2f60b6]['nextPosition']=_0x56b1be['createPositionFromPath'](_0x156acc,_0x33dd7f));for(let _0x380b44=0x0;_0x380b44<_0x2e2918['length'];_0x380b44++){const _0x58e7e8=_0x2e2918[_0x380b44]['previousPosition'],_0x22b0d5=_0x2e2918[_0x380b44]['nextPosition'];for(const _0x55dfd4 of _0x2e2918[_0x380b44]['markersStart'])_0x21d6cc['set'](_0x55dfd4,{'start':_0x58e7e8,'end':null});_0x4c2137('isRemoveSuggestion',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isAddSuggestion',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isRemoved',_0x380b44,_0x58e7e8,_0x22b0d5),_0x4c2137('isAdded',_0x380b44,_0x58e7e8,_0x22b0d5);for(const _0x423d9b of _0x2e2918[_0x380b44]['markersEnd']){const _0x146a85=_0x21d6cc['get'](_0x423d9b);_0x146a85?_0x146a85['end']=_0x22b0d5:_0x21d6cc['set'](_0x423d9b,{'start':_0x22b0d5,'end':_0x22b0d5});}}for(const [_0x2f9def,_0x243957]of _0x21d6cc){const _0x4957cc=this['editor']['model']['createRange'](_0x243957['start'],_0x243957['end']);_0x156acc['markers']['set'](_0x2f9def,_0x4957cc);}return _0x264172['sort']((_0x4e5b92,_0x466903)=>{const _0x41ac70=_0x156acc['markers']['get']('revision:'+_0x4e5b92['id']),_0x40fefa=_0x156acc['markers']['get']('revision:'+_0x466903['id']);return _0x41ac70['start']['isBefore'](_0x40fefa['start'])?-0x1:_0x41ac70['start']['isAfter'](_0x40fefa['start'])?0x1:_0x41ac70['end']['isBefore'](_0x40fefa['end'])?-0x1:_0x41ac70['end']['isAfter'](_0x40fefa['end'])?0x1:'add'===_0x4e5b92['type']?-0x1:0x1;}),{'root':_0x156acc,'changes':_0x264172};function _0x4c2137(_0x3b7ad7,_0x25666c,_0x55fe1f,_0x540746){const _0x12aab8=!!_0x2e2918[_0x25666c][_0x3b7ad7],_0x3efdb4=_0x12aab8?_0x2e2918[_0x25666c][_0x3b7ad7]['userId']:null,_0x5b9227=_0x12aab8&&_0x2e2918[_0x25666c][_0x3b7ad7]['aiSource']||null,_0x5114ba=_0x25666c===_0x2e2918['length']-0x1,_0x3e13b4=_0x4f5f80[_0x3b7ad7][0x0],_0x3f6b50=_0x3edc86['isObject'](_0x2e2918[_0x25666c]['item']);!_0x206601[_0x3b7ad7]&&_0x12aab8?_0x206601[_0x3b7ad7]={'start':_0x55fe1f,'tapeItem':_0x2e2918[_0x25666c],'userId':_0x3efdb4,'aiSource':_0x5b9227,'type':_0x3b7ad7}:_0x206601[_0x3b7ad7]&&!_0x12aab8?(_0x206601[_0x3b7ad7]['end']=_0x55fe1f,_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]=null):_0x206601[_0x3b7ad7]&&_0x12aab8&&(_0x206601[_0x3b7ad7]['userId']!==_0x3efdb4||_0x206601[_0x3b7ad7]['aiSource']!==_0x5b9227)&&(_0x206601[_0x3b7ad7]['end']=_0x55fe1f,_0x3e13b4&&_0x3e13b4['userId']===_0x206601[_0x3b7ad7]['userId']?_0x3e13b4['change']['aiSource']=_0x3e13b4['change']['aiSource']||_0x206601[_0x3b7ad7]['aiSource']:_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]={'start':_0x55fe1f,'tapeItem':_0x2e2918[_0x25666c],'userId':_0x3efdb4,'aiSource':_0x5b9227,'type':_0x3b7ad7}),_0x206601[_0x3b7ad7]&&_0x3f6b50&&('elementStart'!==_0x2e2918[_0x25666c]['type']||_0x3e13b4&&_0x3e13b4['userId']===_0x3efdb4||_0x4f5f80[_0x3b7ad7]['unshift']({'userId':_0x3efdb4,'object':_0x2e2918[_0x25666c]['item'],'change':_0x206601[_0x3b7ad7]}),'elementEnd'===_0x2e2918[_0x25666c]['type']&&_0x3e13b4&&_0x3e13b4['object']===_0x2e2918[_0x25666c]['item']&&(_0x4f5f80[_0x3b7ad7]['shift'](),_0x206601[_0x3b7ad7]=_0x3e13b4['change'])),_0x206601[_0x3b7ad7]&&_0x5114ba&&(_0x206601[_0x3b7ad7]['end']=_0x540746,_0x3da67f(_0x206601[_0x3b7ad7]),_0x206601[_0x3b7ad7]=null);}function _0x3da67f({start:_0x475d09,end:_0x1ad0b5,tapeItem:_0x57916f,userId:_0x5544bf,aiSource:_0x11766d,type:_0x2afeaf}){const _0x356edc=_0x57916f['item'],_0x365a31=_0x56b1be['schema']['isBlock'](_0x356edc)&&!_0x56b1be['schema']['isLimit'](_0x356edc),_0x3cdf3e=_0x475d09['nodeAfter']==_0x1ad0b5['parent']&&_0x1ad0b5['isAtStart'];if(_0x365a31&&_0x3cdf3e)return;const _0xe20150=_0x56b1be['createRange'](_0x475d09,_0x1ad0b5),_0x4aa45e=_0x2ec99f['get'](_0x5544bf),_0x31253c=new Mt({'author':_0x4aa45e,'type':'isAdded'==_0x2afeaf||'isAddSuggestion'==_0x2afeaf?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2afeaf||'isRemoveSuggestion'==_0x2afeaf,'aiSource':_0x11766d||null},'createdAt':new Date(),'rootName':_0x5e2b20});_0x264172['push'](_0x31253c),_0x156acc['markers']['set']('revision:'+_0x31253c['id'],_0xe20150);}function _0x4668f7(_0x3823a9,_0x5642c4){const _0x46a4f4=_0x3823a9['getAttributes'](),_0x32aa9a=_0x5642c4['getAttributes']();for(const _0x12ef2d of _0x46a4f4){if(_0x12ef2d[0x1]!==_0x5642c4['getAttribute'](_0x12ef2d[0x0]))return!0x1;_0x32aa9a['next']();}return _0x32aa9a['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1d8ce6=>{const _0x5ab55f=_0x1d8ce6['markerName']['split'](':')[0x1],_0xf2c957=this['_getChangeFromId'](_0x5ab55f);if(!_0xf2c957)return null;const _0x212cb2='add'==_0xf2c957['type']?'insertion':'deletion',_0x4780a3=['ck-suggestion-marker','ck-suggestion-marker-'+_0x212cb2];return _0xf2c957['data']['isSuggestion']&&_0x4780a3['push']('ck-suggestion-marker-'+_0x212cb2+'-new'),this['activeChange']==_0xf2c957&&_0x4780a3['push']('ck-suggestion-marker--active'),{'classes':_0x4780a3,'attributes':{'data-change-id':_0x5ab55f}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x24718d=>{_0x24718d['on']('element:pre',(_0x311d35,_0x430d93,_0x19f76b)=>{const _0x246f90=_0x430d93['viewItem']['getChild'](0x0);if(!_0x246f90||!_0x246f90['is']('element','code'))return;if(!_0x19f76b['consumable']['consume'](_0x246f90,{'attributes':['vid_start','vid_end']}))return;const _0xc5bee9=_0x430d93['modelRange']['start']['nodeAfter'];_0x19f76b['writer']['setAttribute']('vid_start',_0x246f90['getAttribute']('vid_start'),_0xc5bee9),_0x19f76b['writer']['setAttribute']('vid_end',_0x246f90['getAttribute']('vid_end'),_0xc5bee9);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x36a1d4=>{_0x36a1d4['on']('element',(_0x508a47,_0x4d22c9,_0x41d3e3)=>{if(!_0x41d3e3['consumable']['consume'](_0x4d22c9['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4d22c9['modelRange']['isCollapsed'])return;const _0x23a3a4=_0x4d22c9['modelRange']['start']['nodeAfter'];_0x23a3a4['hasAttribute']('vid_start')||_0x23a3a4['hasAttribute']('vid')||(_0x41d3e3['writer']['setAttribute']('vid_start',_0x4d22c9['viewItem']['getAttribute']('vid_start'),_0x23a3a4),_0x41d3e3['writer']['setAttribute']('vid_end',_0x4d22c9['viewItem']['getAttribute']('vid_end'),_0x23a3a4));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5e062d=>_0x5e062d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x1e91c2,[,_0xc96aed])=>{['vid_start','vid_end','vid']['includes'](_0xc96aed)&&(_0x1e91c2['return']=!0x0,_0x1e91c2['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x644204=>{_0x644204['on']('attribute:vid',(_0x434cb3,_0x479384,_0x3b0861)=>{if('\x20'!=_0x479384['item']['data']||_0x479384['item']['parent']['maxOffset']>0x1)return;if(!_0x3b0861['consumable']['consume'](_0x479384['item'],_0x434cb3['name']))return;const _0x44fd08=_0x3b0861['writer'],_0x1c1a58=_0x3b0861['mapper']['toViewRange'](_0x479384['range']);_0x44fd08['wrap'](_0x1c1a58,_0x44fd08['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x387f54){const _0x17ea6b=_0x387f54['plugins']['get']('RevisionViewer');return(_0x1602bf,_0x6483a4,_0x517d94)=>{const _0x4e3748=_0x6483a4['markerName']['split'](':')[0x1],_0x272b68=_0x17ea6b['_getChangeFromId'](_0x4e3748);if(!_0x272b68)return null;const _0x2f2933='add'==_0x272b68['type']?'split':'merge';if(!_0x517d94['consumable']['test'](_0x6483a4['markerRange'],_0x1602bf['name']))return;const _0x3e87aa=_0x6483a4['markerRange']['getWalker'](),_0x1c9d6f=_0x6483a4['markerRange']['start'],_0x12fd7c=_0x387f54['model']['schema'];let _0x388f48=null,_0x37082c=null,_0x1c6a23=!0x1,_0x68462d=!0x1;for(const _0x4b5a64 of _0x3e87aa){const _0x4891b7=_0x4b5a64['item'];_0x1c6a23=_0x1c6a23||_0x12fd7c['isContent'](_0x4891b7);const _0x18d41c=_0x517d94['mapper']['toViewElement'](_0x4891b7);if(_0x18d41c&&_0x18d41c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4b5a64['type']&&(_0x12fd7c['isBlock'](_0x4891b7)&&!_0x12fd7c['isLimit'](_0x4891b7)&&(_0x4891b7['nextSibling']||_0x1c9d6f['isAtEnd']?_0x388f48&&_0x388f48['parent']==_0x4891b7||(_0x388f48=_0x4891b7,_0x73243f(_0x4b5a64['previousPosition']),_0x68462d=!0x0):_0x37082c=_0x37082c||_0x4b5a64['previousPosition']));}function _0x73243f(_0x212508){const _0x5befad=_0x517d94['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2f2933}),_0x53fab5=_0x517d94['mapper']['toViewPosition'](_0x212508);_0x272b68['data']['isSuggestion']&&_0x517d94['writer']['addClass']('ck-suggestion-marker-'+_0x2f2933+'-new',_0x5befad),_0x17ea6b['activeChange']==_0x272b68&&_0x517d94['writer']['addClass']('ck-suggestion-marker--active',_0x5befad),_0x517d94['writer']['insert'](_0x53fab5,_0x5befad),_0x517d94['mapper']['bindElementToMarker'](_0x5befad,_0x6483a4['markerName']);}_0x1c6a23||_0x68462d||!_0x37082c||_0x73243f(_0x37082c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2aca78,_0x166930,_0x2bfe6d)=>{const _0x56db6e=_0x2bfe6d['mapper']['markerNameToElements'](_0x166930['markerName']);if(_0x56db6e){for(const _0x44579e of _0x56db6e)(_0x44579e['hasClass']('ck-suggestion-marker-split')||_0x44579e['hasClass']('ck-suggestion-marker-merge'))&&(_0x2bfe6d['mapper']['unbindElementFromMarkerName'](_0x44579e,_0x166930['markerName']),_0x2bfe6d['writer']['remove'](_0x44579e));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3852da,_0x4b4249,_0x130569)=>{const _0x456418=_0x4b4249['markerName']['split'](':')[0x1],_0x585d5a=this['_getChangeFromId'](_0x456418);if(!_0x585d5a)return null;const _0x2769ec='add'==_0x585d5a['type']?'split':'merge';if(_0x130569['consumable']['test'](_0x4b4249['markerRange'],_0x3852da['name']))for(const _0x2a49a9 of _0x4b4249['markerRange']['getItems']()){if(!_0x2a49a9['is']('element','softBreak'))continue;const _0x3de75c=_0x130569['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2769ec}),_0x5c2314=_0x130569['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x2a49a9));_0x585d5a['data']['isSuggestion']&&_0x130569['writer']['addClass']('ck-suggestion-marker-'+_0x2769ec+'-new',_0x3de75c),this['activeChange']==_0x585d5a&&_0x130569['writer']['addClass']('ck-suggestion-marker--active',_0x3de75c),_0x130569['writer']['insert'](_0x5c2314,_0x3de75c),_0x130569['mapper']['bindElementToMarker'](_0x3de75c,_0x4b4249['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x8714cb=>{for(const _0x113a91 of this['editor']['model']['document']['getRootNames']()){const _0x90992a=this['editor']['model']['document']['getRoot'](_0x113a91),_0x41932c=this['editor']['editing']['view']['document']['getRoot'](_0x113a91);if(_0x41932c){const _0x1b4f86=_0x90992a['getAttribute']('revisionHistoryAttachChange');if(_0x8714cb['removeAttribute']('data-change-id',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root-add',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root-remove',_0x41932c),_0x8714cb['removeClass']('ck-revision-history-root--active',_0x41932c),_0x1b4f86){const _0x29fbd6=this['_getChangeFromId'](_0x1b4f86);if(!_0x29fbd6)return null;_0x8714cb['setAttribute']('data-change-id',_0x1b4f86,_0x41932c),_0x8714cb['addClass']('ck-revision-history-root-'+_0x29fbd6['type'],_0x41932c),this['activeChange']==_0x29fbd6&&_0x8714cb['addClass']('ck-revision-history-root--active',_0x41932c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x441ef9=>'revision-comment:'+_0x441ef9,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x4801ec=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x4801ec['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x225bc4=>'revision-suggestion:'+_0x225bc4,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3f9819=>({'name':'suggestion:'+_0x3f9819,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x117962=>{const _0x88e71e=_0x117962['markerName']['split'](':')[0x1];return'insertion'!=_0x88e71e&&'deletion'!=_0x88e71e?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x88e71e]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x46e891,_0xb67791,_0xc03b5b)=>{const _0x5da6c5=_0xc03b5b['mapper']['markerNameToElements'](_0xb67791['markerName']);if(_0x5da6c5){for(const _0x9b7941 of _0x5da6c5)_0x9b7941['is']('uiElement')&&(_0xc03b5b['mapper']['unbindElementFromMarkerName'](_0x9b7941,_0xb67791['markerName']),_0xc03b5b['writer']['remove'](_0x9b7941));}},{'priority':'high'});}_getChangeFromId(_0x1c205d){return this['_changeIdToChange']['get'](_0x1c205d);}_getViewForChange(_0x34baea){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x34baea,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x39b3d3,_0x2b5c66,_0x30483e,_0x199054)=>{_0x199054&&this['_balloon']['remove'](_0x199054),_0x30483e&&(this['_balloon']['add']({'view':_0x30483e,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x39554b=this['editor']['editing'],_0x1bac95=this['_getChangeFromId'](_0x30483e['changeId']);let _0x2d536a;if(_0x1bac95['data']['isOnRoot']){const _0x42e69b=_0x39554b['view']['getDomRoot'](_0x1bac95['rootName']);_0x2d536a=Array['from'](_0x42e69b['getClientRects']());}else{const _0x765865=this['editor']['model']['markers']['get']('revision:'+_0x30483e['changeId']);_0x2d536a=Array['from'](_0x39554b['mapper']['markerNameToElements'](_0x765865['name']))['map'](_0x1f41bc=>_0x39554b['view']['domConverter']['mapViewToDom'](_0x1f41bc))['map'](_0x301391=>Array['from'](_0x301391['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x2d536a['find'](_0x2a53fb=>_0x2a53fb['top']-0x3<=this['_activeViewTarget']['y']&&_0x2a53fb['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2a53fb['left']-0x3<=this['_activeViewTarget']['x']&&_0x2a53fb['right']+0x3>=this['_activeViewTarget']['x'])||_0x2d536a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x12afc3,_0x29fe70,_0x521f29,_0x24b674)=>{this['activeView']=_0x521f29?this['_getViewForChange'](_0x521f29):null,this['editor']['model']['change'](()=>{const _0x2b7f29=this['editor']['editing'];_0x24b674&&(_0x24b674['data']['isOnRoot']?_0x2b7f29['view']['change'](_0x5a4dd5=>{_0x5a4dd5['removeClass']('ck-revision-history-root--active',_0x2b7f29['view']['document']['getRoot'](_0x24b674['rootName']));}):_0x2b7f29['reconvertMarker']('revision:'+_0x24b674['id'])),_0x521f29&&(_0x521f29['data']['isOnRoot']?_0x2b7f29['view']['change'](_0x7b5600=>{_0x7b5600['addClass']('ck-revision-history-root--active',_0x2b7f29['view']['document']['getRoot'](_0x521f29['rootName']));}):_0x2b7f29['reconvertMarker']('revision:'+_0x521f29['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x16fa6b,_0x162991)=>{if(this['activeChange'])return;const _0xee9608=this['_findChangeIdFromDomTarget'](_0x162991['target']),_0x25380e=this['_changeIdToChange']['get'](_0xee9608);_0x25380e?(this['_activeViewTarget']={'x':_0x162991['domEvent']['x'],'y':_0x162991['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x25380e)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4a0aaf,_0x5620a3)=>{const _0x412a8a=this['_findChangeIdFromDomTarget'](_0x5620a3['target']),_0x582805=this['_changeIdToChange']['get'](_0x412a8a);_0x582805?(this['_activeViewTarget']={'x':_0x5620a3['domEvent']['x'],'y':_0x5620a3['domEvent']['y']},_0x582805===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x582805):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x5c514f){do{const _0x2d8898=_0x5c514f['getAttribute']('data-change-id');if(_0x2d8898)return _0x2d8898;_0x5c514f=_0x5c514f['parent'];}while(_0x5c514f);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x390869=>{for(const _0x3af693 of this['editor']['model']['markers'])_0x390869['removeMarker'](_0x3af693);});}};function Ut(_0x32d48f){return _0x32d48f['split'](':')[0x1];}function Lt(_0x1a5a54,_0x2d5eac){return(_0x403176,_0x31f940,_0x2d6b4c)=>{if(!_0x2d6b4c['consumable']['test'](_0x31f940['markerRange'],_0x403176['name']))return;const _0xbbc7e1=_0x31f940['markerRange']['getWalker'](),_0x455a35=_0x31f940['markerRange']['start'],_0x1e3048=_0x1a5a54['model']['schema'];let _0xa4ac18=null,_0x3abd9e=null,_0x5ea654=!0x1,_0x5ab850=!0x1;for(const _0x4a90bb of _0xbbc7e1){const _0x1e8bc8=_0x4a90bb['item'];_0x5ea654=_0x5ea654||_0x1e3048['isContent'](_0x1e8bc8);const _0x4988fa=_0x2d6b4c['mapper']['toViewElement'](_0x1e8bc8);if(_0x4988fa&&_0x4988fa['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4a90bb['type']&&(_0x1e3048['isBlock'](_0x1e8bc8)&&!_0x1e3048['isLimit'](_0x1e8bc8)&&(_0x1e8bc8['nextSibling']||_0x455a35['isAtEnd']?_0xa4ac18&&_0xa4ac18['parent']==_0x1e8bc8||(_0xa4ac18=_0x1e8bc8,_0x4ea578(_0x4a90bb['previousPosition']),_0x5ab850=!0x0):_0x3abd9e=_0x3abd9e||_0x4a90bb['previousPosition']));}function _0x4ea578(_0x42e75e){const _0x155599=_0x2d6b4c['mapper']['toViewPosition'](_0x42e75e),_0x3af25a=_0x2d6b4c['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2d5eac});_0x2d6b4c['writer']['insert'](_0x155599,_0x3af25a),_0x2d6b4c['mapper']['bindElementToMarker'](_0x3af25a,_0x31f940['markerName']);}_0x5ea654||_0x5ab850||!_0x3abd9e||_0x4ea578(_0x3abd9e);};}var Ft=class extends _0x1ddd1c{constructor(_0x55eafb){super(_0x55eafb);const _0x94bfb3=_0x55eafb['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x94bfb3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x94bfb3,'change:isEnabled',()=>this['refresh']());}execute(){const _0x3dfd4c=this['editor'],_0x2debda=_0x3dfd4c['plugins']['get'](Pt),_0x22e5aa=_0x2debda['isReady']?_0x2debda['diff']['newRevisionId']:null;_0x3dfd4c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x22e5aa);}['refresh'](){const {isReady:_0x590ab4,isEnabled:_0x3160a0,repository:_0x1fbf19,diff:_0x560e5a}=this['editor']['plugins']['get'](Pt),_0x145a16=_0x560e5a&&_0x1fbf19['getLaterVisibleRevision'](_0x560e5a['newRevisionId']);this['isEnabled']=_0x590ab4&&_0x3160a0&&Boolean(_0x145a16);}},$t=class extends _0x1ddd1c{_step;constructor(_0x1874c5,{direction:_0x517533}){super(_0x1874c5);const _0x5a714f=_0x1874c5['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x517533?0x1:-0x1,this['listenTo'](_0x5a714f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5a714f,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5a714f,'change:activeChange',()=>this['refresh']());}execute(){const _0x26835a=this['editor'],_0x362ac2=_0x26835a['plugins']['get'](Pt),{isNavigationMode:_0x2f921f,currentChangeNumber:_0x36797f}=_0x362ac2;let _0x4ab517;if(_0x362ac2['activeChange']=_0x2f921f?_0x362ac2['diff']['changes']['get'](_0x36797f+this['_step']):_0x362ac2['diff']['changes']['first'],_0x362ac2['activeChange']['data']['isOnRoot'])_0x4ab517=_0x26835a['editing']['view']['getDomRoot'](_0x362ac2['activeChange']['rootName']);else{const _0x48a896=_0x26835a['model']['markers']['get']('revision:'+_0x362ac2['activeChange']['id']);_0x4ab517=_0x3ec3b7(_0x26835a['editing'],_0x48a896);}_0x98e9d6({'target':_0x4ab517,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x37987b,currentChangeNumber:_0x2d48c0,numberOfChanges:_0x5f26a2,isReady:_0x434610,isEnabled:_0x1259ed}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x1259ed&&_0x434610&&_0x5f26a2)&&(!_0x37987b||(0x1===this['_step']?_0x2d48c0<_0x5f26a2-0x1:_0x2d48c0>0x0));}},Bt=class extends dt{constructor(_0x2027d9){super(_0x2027d9);const _0x310704=this['bindTemplate'],_0x321334=new _0xfa6b1(_0x2027d9),_0x54a452=new _0xfa6b1(_0x2027d9);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',(_0x52ecfa,_0xaeb4c2)=>_0x52ecfa&&_0xaeb4c2>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x585848,_0x43798b,_0x260b64,_0x31d975)=>{if(!_0x585848)return kt(_0x2027d9,'Loading...');if(!_0x260b64)return kt(_0x2027d9,'No\x20changes');const _0x1ccf4c=kt(_0x2027d9,'NUMBER_OF_CHANGES',_0x260b64);return _0x31d975?kt(_0x2027d9,'X_OF_Y_CHANGES',[_0x43798b+0x1,_0x260b64]):_0x1ccf4c;}),_0x321334['set']({'label':kt(_0x2027d9,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x343c90}),_0x54a452['set']({'label':kt(_0x2027d9,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4a149a}),_0x321334['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x54a452['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x321334['on']('execute',()=>this['fire']('execute','backward')),_0x54a452['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',_0x310704['if']('_isStatusLabelVisible','ck-hidden',_0x36cc7a=>!_0x36cc7a)]},'children':[{'text':_0x310704['to']('isNavigationMode',_0x20196a=>_0x20196a?kt(_0x2027d9,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x2027d9,'Total')+':\x20')}]},{'text':_0x310704['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x321334,_0x54a452]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1845c8=this['editor']['editing']['view'];_0x1845c8['change'](_0x1afb52=>{for(const _0x48037a of _0x1845c8['document']['roots'])_0x1afb52['addClass'](jt,_0x48037a);});}['hide'](){const _0x2c8e25=this['editor']['editing']['view'];_0x2c8e25['change'](_0x1ef3b7=>{for(const _0xe3c171 of _0x2c8e25['document']['roots'])_0x1ef3b7['removeClass'](jt,_0xe3c171);});}},Kt=class extends _0x3ccb16{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0x50d73d=this['editor'],_0x112858=_0x50d73d['plugins']['get'](Pt),_0x3fba4f=_0x50d73d['plugins']['get'](Gt);_0x50d73d['ui']['componentFactory']['add']('exitToEditing',_0x535b67=>{const _0x3335a2=new _0xfa6b1(_0x535b67);return _0x3335a2['set']({'label':kt(_0x535b67,'Back\x20to\x20editing'),'icon':_0x2a5c35,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3335a2,'execute',()=>{_0x50d73d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3335a2;}),_0x50d73d['ui']['componentFactory']['add']('restoreRevision',_0x14b59f=>{const _0x239c11=new _0xfa6b1(_0x14b59f);return _0x239c11['set']({'label':kt(_0x14b59f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x239c11['bind']('isEnabled')['to'](_0x50d73d['commands']['get']('restoreRevision')),this['listenTo'](_0x239c11,'execute',()=>_0x50d73d['execute']('restoreRevision')),_0x239c11;}),_0x50d73d['ui']['componentFactory']['add']('changesNavigation',_0x42bcf6=>{const _0x4b75e7=new Bt(_0x42bcf6),_0x47c20d=_0x50d73d['commands']['get']('showPreviousChange'),_0x14288f=_0x50d73d['commands']['get']('showNextChange');return _0x4b75e7['bind']('isBackwardNavigationEnabled')['to'](_0x47c20d,'isEnabled'),_0x4b75e7['bind']('isForwardNavigationEnabled')['to'](_0x14288f,'isEnabled'),_0x4b75e7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x112858),this['listenTo'](_0x4b75e7,'execute',(_0x2d4632,_0x15524)=>{_0x50d73d['execute']('forward'===_0x15524?'showNextChange':'showPreviousChange');}),_0x4b75e7;}),_0x3fba4f['show'](),_0x112858['on']('change:isReady',(_0x2ca756,_0x181877,_0x4b0d7f)=>{_0x4b0d7f?_0x3fba4f['hide']():_0x3fba4f['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x60b761,_0x26ec76){super(_0x60b761,_0x26ec76);const _0x240262=this['bindTemplate'];this['set']({'label':kt(_0x60b761,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x60b761,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x240262['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x354550(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x115e66=this['fieldView']['element'];this['_tooltipString']=_0x115e66['scrollWidth']>_0x115e66['clientWidth']&&_0x115e66['value']||'';}},Yt=class extends dt{constructor(_0xb584c4,_0x516e6b,_0x45ab60){super(_0xb584c4);const _0x52a001=new _0x4c1208();_0x52a001['set']({'content':_0xac3ad6,'viewBox':'0\x200\x2011\x2010'});const _0x1c2569=['ck','ck-revision-history-sidebar__revision-author'];_0x45ab60&&_0x1c2569['push']('ck-revision-history-sidebar__revision-author_creator');const _0x188339=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0xb584c4,_0x45ab60?'Revision\x20creator':'Revision\x20author')},'children':[_0x52a001,_0x516e6b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x1c2569},'children':_0x188339});}};function Jt(_0x190944,_0x46c3ea){const _0x344fe0=_0x190944['bindTemplate'],_0xde079a=_0x190944['locale'],_0x46e7fc=vt(_0xde079a);_0x46e7fc['panelPosition']='sw';const _0x31f369=function(_0x4a60fd,_0xd268f2){const _0x15e9d7=function(_0x2d6a97,_0x1635dd){const _0x466d8c=_0x2d6a97['locale'],_0x1b58d6={'Compare\x20against\x20selected':kt(_0x466d8c,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x466d8c,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x466d8c,'Restore\x20this\x20revision')};return _0x1635dd['map'](_0x3f9c17=>{const _0x34425e=_0x1b58d6[_0x3f9c17['name']];return _0x34425e&&_0x34425e!==_0x3f9c17['name']&&(_0x3f9c17['name']=_0x34425e),_0x3f9c17;});}(_0x4a60fd,_0xd268f2),_0x13f3d8=new _0x520f62();for(const _0x1b91d2 of _0x15e9d7){const _0x2b5e85={'type':'button','model':new ut({'label':_0x1b91d2['name'],'class':_0x1b91d2['class'],'withText':!0x0,'role':'menuitem','_action':_0x1b91d2['action']})};_0x2b5e85['model']['bind']('isEnabled')['to'](_0x4a60fd,'isActionsDropdownOpen',_0x5f4ad9=>'function'!=typeof _0x1b91d2['isEnabled']||(!_0x5f4ad9||_0x1b91d2['isEnabled'](_0x4a60fd))),_0x13f3d8['add'](_0x2b5e85);}return _0x13f3d8;}(_0x190944,_0x46c3ea);return _0x190944['bind']('isActionsDropdownOpen')['to'](_0x46e7fc,'isOpen'),_0x46e7fc['buttonView']['set']({'label':kt(_0xde079a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x467e7d}),_0x46e7fc['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x344fe0['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x344fe0['to'](_0x354c11=>_0x354c11['stopPropagation']())}}),_0x46e7fc['on']('execute',_0x2039f5=>{_0x190944['isReady']&&'function'==typeof _0x2039f5['source']['_action']&&_0x2039f5['source']['_action'](_0x190944);}),ft(_0x46e7fc,_0x31f369,{'role':'menu'}),_0x46e7fc['listenTo'](_0x190944,'change:isActionsDropdownOpen',(_0x3a4031,_0x2bd758,_0x39af69)=>{if(_0x39af69)for(const _0xf53b87 of _0x46e7fc['listView']['items']){const _0xec71e5=_0xf53b87['children']['first'],_0x5ef007=_0x46c3ea['find'](_0x58a5e1=>_0x58a5e1['action']===_0xec71e5['_action'])['isVisible'];_0xf53b87['isVisible']=void 0x0===_0x5ef007||_0x5ef007(_0x190944);}}),_0x46e7fc;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{CKEditorError as _0x8716b1,Collection as _0x393ab3,ElementReplacer as _0x493518,FocusTracker as _0x1f365b,KeystrokeHandler as _0x289644,ObservableMixin as _0x301f59,ResizeObserver as _0x108a54,logWarning as _0x46499c,scrollViewportToShowTarget as _0xe8b9b6,trustedHtml as _0x3ee93e,uid as _0x1502a4}from'@ckeditor/ckeditor5-utils';import{cloneDeep as _0x2b717e,isEqual as _0x21fb00,set as _0x33aca2,unset as _0x4e2ada}from'es-toolkit/compat';import{Command as _0x83b002,Editor as _0x400523,ElementApiMixin as _0x5c9264,PendingActions as _0x17fbd0,Plugin as _0x15eb24}from'@ckeditor/ckeditor5-core';import{ConfirmMixin as _0x2c1eae,PillView as _0x1892fd,Users as _0x4fd2f9,getMarkerDomElement as _0x1f8b1e,reRootOperation as _0x21af22,reRootPosition as _0x2a2d33,reRootRange as _0x502c59,sanitizeEditorConfig as _0xed521e}from'@ckeditor/ckeditor5-collaboration-core';import{ModelDocumentFragment as _0x258ac8,ModelElement as _0x1868f7,ModelRange as _0x191a66,ModelText as _0x3ec4fc,ViewAttributeElement as _0x1fdffa,ViewContainerElement as _0x4dc6ae,ViewDocumentFragment as _0x55900d,ViewElement as _0x41ead9,ViewEmptyElement as _0x46448d,ViewRawElement as _0x1a0c46,ViewText as _0x2f41ca,ViewUIElement as _0x22ec75}from'@ckeditor/ckeditor5-engine';import{IconChevronDown as _0x18ab4e,IconChevronUp as _0x4ec9c5,IconHistory as _0x74b43d,IconSparkle as _0x525b57,IconThreeVerticalDots as _0x52e55d,IconUndo as _0xe2d6ce,IconUser as _0x25562b}from'@ckeditor/ckeditor5-icons';import{BoxedEditorUIView as _0x26cd40,ButtonView as _0x3e9ea0,ContextualBalloon as _0x11b77b,CssTransitionDisablerMixin as _0x47a750,EditorUI as _0x145983,IconView as _0x57a8a0,InlineEditableUIView as tt,LabeledFieldView as it,ListItemView as et,ListView as st,MenuBarMenuListItemButtonView as nt,MenuBarMenuListItemView as ot,MenuBarMenuListView as rt,MenuBarMenuView as at,StickyPanelView as ht,ToolbarSeparatorView as ct,ToolbarView as lt,UIModel as ut,View as dt,addListToDropdown as ft,createDropdown as vt,createLabeledInputText as gt,normalizeToolbarConfig as mt,submitHandler as _t}from'@ckeditor/ckeditor5-ui';import{DateTime as wt}from'luxon';const pt=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x301f59();var yt=class extends pt{['id'];creator;authors;diffData;toVersion;['fromVersion'];['model'];constructor(_0x279376){super(),this['id']=_0x279376['id']||_0x1502a4(),this['creator']=_0x279376['creator']||null,this['authors']=_0x279376['authors']||[],this['diffData']=_0x279376['diffData']||null,this['toVersion']=_0x279376['toVersion']||0x0,this['fromVersion']=_0x279376['fromVersion']||0x0,this['set']('name',_0x279376['name']||''),this['set']('createdAt',_0x279376['createdAt']||new Date()),this['set']('attributes',_0x279376['attributes']||{});}setName(_0x3442e3){this['_update']({'name':_0x3442e3});}setAttribute(_0x8e17a8,_0x5d5711){const _0x488464=_0x2b717e(this['attributes']);_0x33aca2(_0x488464,_0x8e17a8,_0x5d5711),this['_update']({'attributes':_0x488464});}removeAttribute(_0x32c245){const _0x5cca65=_0x2b717e(this['attributes']);_0x4e2ada(_0x5cca65,_0x32c245),this['_update']({'attributes':_0x5cca65});}_update(_0x18576f,_0x198a21=!0x1){let _0xffac52=!0x1;const _0xfe98c8={'id':this['id']};for(const _0x5e3cd1 of['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId']){const _0x205339=_0x18576f[_0x5e3cd1];void 0x0!==_0x205339&&_0x205339!==this[_0x5e3cd1]&&(this[_0x5e3cd1]=_0x205339,_0xfe98c8[_0x5e3cd1]=_0x205339,_0xffac52=!0x0);}_0xffac52&&(_0xfe98c8['authors']&&(_0xfe98c8['authorsIds']=_0xfe98c8['authors']['map'](_0x5ce800=>_0x5ce800['id']),delete _0xfe98c8['authors']),this['fire']('_update',_0xfe98c8,_0x198a21));}toJSON(){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4888f2=>_0x4888f2['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}},bt=class extends _0x15eb24{['_revisions'];static get requires(){return[_0x4fd2f9];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get length(){return this['_revisions']['length'];}constructor(_0x49fc1d){super(_0x49fc1d),this['_revisions']=new _0x393ab3();}afterInit(){!async function(_0x4b5e7a){const _0x305ab8='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x2d8fc3=0xeb829,_0x56b500=0x797d0,_0x2b1556={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x4012f5(_0x27a4b9){const _0x5dece0=new window['Promise'](_0x12e116=>{_0x27a4b9['once']('ready',_0x12e116);}),_0x448fb9=window['Date']['now'](),_0x3852ae=_0x27a4b9['config']['get']('licenseKey');async function _0x196ec5(){let _0x44b86a,_0x56d5b7=null,_0x37e7fa=null;try{return'GPL'==_0x3852ae?'NotAllowed':(_0x44b86a=_0x2638fa(),_0x44b86a?(_0x44b86a['usageEndpoint']&&(_0x37e7fa=_0x544b82(_0x44b86a['usageEndpoint'],_0x44b86a['jti'])),await _0x32f56f()?_0x5220ef()?_0x1754ed()?'Expired':_0x2debdd()?('evaluation'==_0x44b86a['licenseType']&&(_0x56d5b7=_0x565554('EvaluationLimit')),await _0x5273ba()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1754ed(){const _0x5c3566=['evaluation','trial']['includes'](_0x44b86a['licenseType'])?_0x448fb9/0x3e8:0xe10*_0x56b500;return _0x44b86a['exp']<_0x5c3566;}function _0x5220ef(){const _0x5b6b1f=_0x44b86a['features'];if(!_0x5b6b1f)return!0x1;if(_0x5b6b1f['includes']('*'))return!0x0;if(_0x5b6b1f['includes']('RH'))return!0x0;if(_0x5b6b1f['includes']('RRH')){if(_0x578eb8())return!0x0;if(_0x18a0e6()||_0x430911())return!0x0;}return!0x1;}function _0x2debdd(){const _0x3f32ef=_0x44b86a['licensedHosts'];if(!_0x3f32ef||0x0==_0x3f32ef['length'])return!0x0;const {hostname:_0x273b20}=new URL(window['location']['href']);if(_0x3f32ef['includes'](_0x273b20))return!0x0;const _0x14e0af=_0x273b20['split']('.');return _0x3f32ef['filter'](_0x2c5467=>_0x2c5467['includes']('*'))['map'](_0x545237=>_0x545237['split']('.'))['filter'](_0x49e287=>_0x49e287['length']<=_0x14e0af['length'])['map'](_0x2a96c6=>Array(_0x14e0af['length']-_0x2a96c6['length'])['fill']('*'===_0x2a96c6[0x0]?'*':'')['concat'](_0x2a96c6))['some'](_0x1bcb87=>_0x14e0af['every']((_0xf885f7,_0x4d0afa)=>_0x1bcb87[_0x4d0afa]===_0xf885f7||'*'===_0x1bcb87[_0x4d0afa]));}function _0x5273ba(){return _0x56d5b7&&_0x37e7fa?new window['Promise']((_0x110fe7,_0x2d435c)=>{_0x56d5b7['then'](_0x110fe7,_0x2d435c),_0x37e7fa['then'](_0x1af003=>{'Valid'!=_0x1af003&&_0x110fe7(_0x1af003);},_0x2d435c);}):_0x56d5b7||_0x37e7fa||'Valid';}}function _0x544b82(_0x8a4354,_0x1bcafa){return new window['Promise'](_0x3864a9=>{if(_0x218a8())return _0x3864a9('Valid');_0x4fe032(),_0x27a4b9['decorate']('_sendUsageRequest');let _0xd1e9=!0x1;const _0x2b694f=_0x1502a4();function _0x15877d(_0xbbec11){return!!_0xbbec11&&('object'==typeof _0xbbec11||'function'==typeof _0xbbec11)&&'function'==typeof _0xbbec11['then']&&'function'==typeof _0xbbec11['catch'];}function _0x1d6ab6(_0x4db189){_0x7a1a92(_0x4db189)['then'](_0x70d286=>_0x70d286&&'ok'==_0x70d286['status']?_0x5847da(_0x120c0b(_0x2b694f+_0x1bcafa))!=_0x70d286['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4f505c=>(_0x429207(),_0x4f505c),()=>{const _0x31596d=_0x2b6dae();return null==_0x31596d?(_0x429207(),'Valid'):_0x448fb9-_0x31596d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3864a9)['catch'](()=>{_0x3864a9('UsageLimit');});const _0x3b58ec=0x36ee80;function _0x429207(){const _0x47011b='llct-'+_0x5847da(_0x120c0b(_0x8a4354)),_0x2fce3b=_0x29f3db(_0x5847da(window['Math']['ceil'](_0x448fb9/_0x3b58ec)));window['localStorage']['setItem'](_0x47011b,_0x2fce3b);}function _0x2b6dae(){const _0x5da530='llct-'+_0x5847da(_0x120c0b(_0x8a4354)),_0xa63eac=window['localStorage']['getItem'](_0x5da530);return _0xa63eac?window['parseInt'](_0x29f3db(_0xa63eac),0x10)*_0x3b58ec:null;}function _0x7a1a92(_0xb69347){return new window['Promise']((_0x51280c,_0x5e2ca7)=>{_0xb69347['then'](_0x51280c,_0x5e2ca7),window['setTimeout'](_0x5e2ca7,0x1d4c0);});}}_0x27a4b9['on']('_sendUsageRequest',(_0x12484e,_0x340321)=>{if(_0x340321[0x0]!=_0x8a4354)return _0x3864a9('UsageLimit');_0x340321[0x1]={..._0x340321[0x1],'requestId':_0x2b694f};},{'priority':'high'}),_0x27a4b9['on']('_sendUsageRequest',_0x35eeb0=>{_0x15877d(_0x35eeb0['return'])&&(_0xd1e9=!0x0,_0x1d6ab6(_0x35eeb0['return']));},{'priority':'low'}),_0x5dece0['then'](()=>{_0xd1e9||_0x3864a9('UsageLimit');});});function _0x218a8(){return'auto'==_0x27a4b9['editing']['view']['_overlayModeHint'];}function _0x4fe032(){_0x27a4b9['editing']['view']['_overlayModeHint']='auto';}}function _0x565554(_0x3cab68){const _0x666a1a=[new window['Promise'](_0x3409ca=>setTimeout(_0x3409ca,0x93ecc)),_0x5dece0['then'](()=>new window['Promise'](_0x5ef50a=>{const _0x2ecc4f=0x7,_0x3b5792=_0x4b5e7a['_revisions'];function _0x26fed4(){_0x3b5792['length']>=_0x2ecc4f&&_0x5ef50a();}_0x26fed4(),_0x3b5792['on']('add',_0x26fed4);})),new window['Promise'](_0x143f16=>{function _0x4ac283(){for(const _0x306cb1 in window)if(window['Number']['isNaN'](window['Number'](_0x306cb1))&&window[_0x306cb1]==_0x2d8fc3)return _0x143f16();'destroyed'!=_0x27a4b9['state']&&window['setTimeout'](_0x4ac283,0x1388);}_0x2caf63('RevisionViewer')&&_0x4ac283();})];return window['Promise']['race'](_0x666a1a)['then'](()=>_0x3cab68);}async function _0x177ad8(){if(await _0x5dece0,_0x2caf63('RevisionViewer')){const _0x15c040=_0x4b5e7a['getRevision'](0x0),_0x2fb6e6=_0x4b5e7a['getEarlierVisibleRevision'](_0x15c040['id']),_0x5b588b=_0x203a42('RevisionViewer');return await _0x5b588b['compare'](_0x15c040['id'],_0x2fb6e6?_0x2fb6e6['id']:null,!0x0),_0x5b588b['unbind']('isEnabled'),_0x5b588b['isEnabled']=!0x1,_0x5b588b['compare']=_0x3e63a6,void(_0x5b588b['_getDiff']=_0x3e63a6);}if(_0x2caf63('RevisionTracker')){const _0x41d825=_0x203a42('RevisionTracker');_0x41d825['unbind']('isEnabled'),_0x41d825['isEnabled']=!0x1,_0x41d825['update']=_0x3e63a6,_0x41d825['saveRevision']=_0x3e63a6;}_0x27a4b9['model']['change']=_0x3e63a6,_0x27a4b9['model']['enqueueChange']=_0x3e63a6,_0x27a4b9['enableReadOnlyMode']('model');}function _0x578eb8(){return _0x2caf63('WebSocketGateway')&&'connected'==_0x203a42('WebSocketGateway')['state'];}function _0x18a0e6(){return _0x2caf63('RevisionViewerIntegration');}function _0x430911(){return _0x2caf63('TrackChangesDataGetter');}function _0x3eab2d(_0x32c531){const _0x26a0dc=_0x476a35();_0x27a4b9[_0x26a0dc]='revisionHistoryLicenseKey'+_0x32c531,_0x32c531['endsWith']('Limit')&&(window[_0x476a35()]=_0x2d8fc3),'Valid'!=_0x32c531&&_0x177ad8();}function _0x476a35(){const _0xf8d695=window['String'](window['performance']['now']())['replace']('.','');let _0x10209e='N';for(let _0x1411b8=0x0;_0x1411b8<_0xf8d695['length'];_0x1411b8+=0x2){let _0x5c4b36=window['parseInt'](_0xf8d695['substring'](_0x1411b8,_0x1411b8+0x2));_0x5c4b36>=0x3e&&(_0x5c4b36-=0x3e),_0x10209e+=_0x305ab8[_0x5c4b36];}return _0x10209e;}function _0x2638fa(){const _0x13830c=_0x3852ae['split']('.');if(0x3!=_0x13830c['length'])return null;return _0x144297(_0x13830c[0x1]);function _0x144297(_0x14b9a2){const _0x92e6c4=_0x5c1541(_0x14b9a2);return _0x92e6c4&&_0x55dc6b()?_0x92e6c4:null;function _0x55dc6b(){const _0x30fea2=_0x92e6c4['jti'],_0x23b24b=window['parseInt'](_0x30fea2['substring'](_0x30fea2['length']-0x8),0x10),_0x4455fe={..._0x92e6c4,'jti':_0x30fea2['substring'](0x0,_0x30fea2['length']-0x8)};return delete _0x4455fe['vc'],_0x120c0b(_0x4455fe)==_0x23b24b;}}}async function _0x32f56f(){let _0x31f9b6=!0x0;try{const [_0x5046be,_0x4b5b7a,_0x2e3aad]=_0x3852ae['split']('.');return _0x45b537(_0x5046be),await _0x3bf5d8(_0x5046be,_0x4b5b7a,_0x2e3aad),_0x31f9b6;}catch{return!0x1;}function _0x45b537(_0x3c6845){const _0x432344=_0x5c1541(_0x3c6845);_0x432344&&'ES256'==_0x432344['alg']||(_0x31f9b6=!0x1);}async function _0x3bf5d8(_0x59ffb2,_0x413baf,_0x509bbb){const _0x191fbd=window['Uint8Array']['from'](_0x42a237(_0x509bbb),_0x583b99=>_0x583b99['charCodeAt'](0x0)),_0x4317ad=new window['TextEncoder']()['encode'](_0x59ffb2+'.'+_0x413baf),_0x11c23a=window['crypto']['subtle'];if(!_0x11c23a)return;const _0x2f44fa=await _0x11c23a['importKey']('jwk',_0x2b1556,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x11c23a['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2f44fa,_0x191fbd,_0x4317ad)||(_0x31f9b6=!0x1);}}function _0x5c1541(_0x26bced){return _0x26bced['startsWith']('ey')?JSON['parse'](_0x42a237(_0x26bced)):null;}function _0x42a237(_0x458251){return window['atob'](_0x458251['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x120c0b(_0x47b54a){let _0xeb3b16=0x1505;function _0x4d8e65(_0x422c93){for(let _0x334718=0x0;_0x334718<_0x422c93['length'];_0x334718++){const _0x5f0a3a=_0x422c93['charCodeAt'](_0x334718);_0xeb3b16=(_0xeb3b16<<0x5)+_0xeb3b16+_0x5f0a3a,_0xeb3b16&=_0xeb3b16;}}function _0x4f7412(_0x8c1c8a){Array['isArray'](_0x8c1c8a)?_0x8c1c8a['forEach'](_0x4f7412):_0x8c1c8a&&'object'==typeof _0x8c1c8a?Object['entries'](_0x8c1c8a)['sort']()['forEach'](([_0x32752d,_0x5758e5])=>{_0x4d8e65(_0x32752d),_0x4f7412(_0x5758e5);}):_0x4d8e65(window['String'](_0x8c1c8a));}return _0x4f7412(_0x47b54a),_0xeb3b16>>>0x0;}function _0x5847da(_0xeb8f0b){return _0xeb8f0b['toString'](0x10)['padStart'](0x8,'0');}function _0x29f3db(_0xbf6805){return _0xbf6805['split']('')['reverse']()['join']('');}function _0x2caf63(_0x5df806){return _0x27a4b9['plugins']['has'](_0x5df806);}function _0x203a42(_0x34781e){return _0x27a4b9['plugins']['get'](_0x34781e);}function _0x3e63a6(){}_0x3eab2d(await _0x196ec5());}_0x4012f5(_0x4b5e7a['editor']);}(this);}createRevision(_0x5f3209){const _0x580c86=this['editor']['plugins']['get']('Users');return new yt({'id':_0x5f3209['id'],'name':_0x5f3209['name'],'creator':_0x5f3209['creatorId']?_0x580c86['getUser'](_0x5f3209['creatorId']):null,'diffData':_0x5f3209['diffData']||_0x5f3209['data'],'authors':_0x5f3209['authorsIds']['map'](_0x372175=>_0x580c86['getUser'](_0x372175)),'createdAt':new Date(_0x5f3209['createdAt']),'attributes':_0x5f3209['attributes'],'fromVersion':_0x5f3209['fromVersion'],'toVersion':_0x5f3209['toVersion']});}['addRevision'](_0x53ea03,_0x2e2299=0x0){this['_revisions']['add'](_0x53ea03,_0x2e2299);}getRevision(_0x17babb){return this['_revisions']['get'](_0x17babb);}getRevisions(_0x310a1e={'toJSON':!0x1}){const _0x58a498=Array['from'](this['_revisions']);return _0x58a498['reverse'](),_0x310a1e['toJSON']?_0x58a498['map'](_0x1107b1=>_0x1107b1['toJSON']()):_0x58a498;}getIndex(_0x9a74cc){return this['_revisions']['getIndex'](_0x9a74cc);}getEarlierVisibleRevision(_0x2aa26a){const [,_0x16f165]=this['getRevisionsIterator'](_0x2aa26a,{'direction':'earlier'});return _0x16f165;}getLaterVisibleRevision(_0xa5af30){const [,_0x186efa]=this['getRevisionsIterator'](_0xa5af30,{'direction':'later'});return _0x186efa;}getRevisionsInDiff(_0x13a27f){const _0x1312d8=[];for(const _0x37e15f of this['getRevisionsIterator'](_0x13a27f['newRevisionId']))if(_0x1312d8['push'](_0x37e15f),_0x37e15f['id']===_0x13a27f['oldRevisionId'])break;return _0x1312d8;}*getRevisionsIterator(_0x1296e5,{direction:_0x4d6aad='earlier',filter:_0x407f68=()=>!0x0}={}){const _0x4cec08='earlier'===_0x4d6aad?0x1:-0x1;let _0x40ffc2=this['_revisions']['get'](_0x1296e5),_0x571f68=this['getIndex'](_0x40ffc2);for(yield _0x40ffc2;_0x40ffc2;){if(_0x571f68+=_0x4cec08,_0x40ffc2=this['getRevision'](_0x571f68),!_0x40ffc2)return;_0x407f68(_0x40ffc2)&&(yield _0x40ffc2);}}},Rt=class extends _0x15eb24{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4dc6ae,'c'],[_0x1fdffa,'a'],[_0x46448d,'e'],[_0x1a0c46,'r'],[_0x22ec75,'u']]);_typeCharToViewClass=new Map([['c',_0x4dc6ae],['a',_0x1fdffa],['e',_0x46448d],['r',_0x1a0c46],['u',_0x22ec75]]);async loadRevisionData(_0x1afbe6,_0x5e075a){if(_0x1afbe6['diffData']||!_0x5e075a)return;const _0x5862c1=this['editor']['config']['get']('collaboration.channelId');_0x1afbe6['diffData']=(await _0x5e075a['getRevision']({'channelId':_0x5862c1,'revisionId':_0x1afbe6['id']}))['diffData'];}getRevisionDocumentData(_0x98bfd8){const _0x37b341={};for(const _0x220f40 in _0x98bfd8['diffData']){if(_0x98bfd8['diffData'][_0x220f40]['attachChange']&&!_0x98bfd8['diffData'][_0x220f40]['attachChange']['isAttached'])continue;const _0x4e1c4c=this['_removeRevisionMarkers'](JSON['parse'](_0x98bfd8['diffData'][_0x220f40]['insertions'])),_0x56e99b=this['editor']['editing']['view']['document'],_0x296ea6=new _0x55900d(_0x56e99b,_0x4e1c4c['map'](_0x2f6e1c=>this['_getViewFromDiffObj'](_0x2f6e1c,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x37b341[_0x220f40]=this['editor']['data']['processor']['toData'](_0x296ea6),this['editor']['data']['processor']['useFillerType']('default');}return _0x37b341;}getRevisionRootsAttributes(_0x1caf09){const _0x4ae57c={};for(const _0x1109d8 in _0x1caf09['diffData'])_0x1caf09['diffData'][_0x1109d8]['attachChange']&&!_0x1caf09['diffData'][_0x1109d8]['attachChange']['isAttached']||(_0x4ae57c[_0x1109d8]=_0x1caf09['diffData'][_0x1109d8]['attributesAfter']||{});return _0x4ae57c;}getRevisionRootsModelElements(_0x20d7f3){const _0x1031c2={};for(const _0x1e4363 in _0x20d7f3['diffData']){if(_0x20d7f3['diffData'][_0x1e4363]['attachChange']&&!_0x20d7f3['diffData'][_0x1e4363]['attachChange']['isAttached'])continue;const _0xea3cad=_0x20d7f3['diffData'][_0x1e4363]['rootElementName'];_0xea3cad&&(_0x1031c2[_0x1e4363]=_0xea3cad);}return _0x1031c2;}_getTypeCharForViewElement(_0x563658){return this['_viewClassToTypeChar']['get'](_0x563658['constructor']);}_getViewFromDiffObj(_0x2d8a13,_0x5aed75){const _0x29d2ea=this['editor']['editing']['view']['document'];if('string'==typeof _0x2d8a13)return new _0x2f41ca(_0x29d2ea,_0x2d8a13);{let _0x5d6933,_0x8632b8;_0x8632b8='u'==_0x2d8a13['type']||'r'==_0x2d8a13['type']?[]:_0x2d8a13['children']['map'](_0x4bda64=>this['_getViewFromDiffObj'](_0x4bda64,_0x5aed75));const _0x4b7440=this['_typeCharToViewClass']['get'](_0x2d8a13['type'])||_0x41ead9,_0x41b682=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5d6933=new _0x4b7440(_0x29d2ea,_0x2d8a13['name'],_0x2d8a13['attributes'],_0x8632b8),'u'==_0x2d8a13['type']&&_0x2d8a13['children'][0x0]){const _0x420b58=_0x2d8a13['children'][0x0];if(_0x5d6933['render']=function(_0x3ccbce){const _0x34247d=_0x3ccbce['createElement']('div');return _0x34247d['innerHTML']=_0x3ee93e(_0x420b58),_0x34247d['childNodes'][0x0];},_0x5aed75){const _0x520735=new _0x55900d(_0x29d2ea);_0x520735['_appendChild'](_0x5d6933);const _0x284e5f=Array['from'](_0x41b682['viewChildrenToDom'](_0x520735,{'bind':!0x1})),_0x132a85=_0x41b682['domDocument']['createElement']('div');_0x132a85['append'](..._0x284e5f),_0x5d6933=Array['from'](_0x41b682['domChildrenToView'](_0x132a85))[0x0];}}else{if('r'==_0x2d8a13['type']&&_0x2d8a13['children'][0x0]){const _0x1a5ab4=_0x2d8a13['children'][0x0];if(_0x5d6933['render']=function(_0x2f1c10){_0x2f1c10['innerHTML']=_0x3ee93e(_0x1a5ab4);},_0x5aed75){const _0x2e936c=new _0x55900d(_0x29d2ea);_0x2e936c['_appendChild'](_0x5d6933);const _0x8fffc3=Array['from'](_0x41b682['viewChildrenToDom'](_0x2e936c,{'bind':!0x1})),_0xa4d84d=_0x41b682['domDocument']['createElement']('div');_0xa4d84d['append'](..._0x8fffc3);const _0x1065a6=Array['from'](_0x41b682['domChildrenToView'](_0xa4d84d));_0x1065a6['length']>0x1?_0x5d6933['_appendChild'](_0x1065a6):_0x5d6933=_0x1065a6[0x0];}}}if(_0x2d8a13['customProperties']){for(const [_0x241760,_0x424c28]of _0x2d8a13['customProperties'])_0x5d6933['_setCustomProperty'](_0x241760,_0x424c28);}const _0x3a7d81=void 0x0===_0x2d8a13['fillerOffset']?null:_0x2d8a13['fillerOffset'];return null!==_0x3a7d81&&(_0x5d6933['getFillerOffset']=()=>_0x3a7d81),_0x5d6933;}}_makeModelFromViewString(_0xb2d8ad,_0x15b9ff){const _0x4b7156=JSON['parse'](_0xb2d8ad),_0x213d8b=this['editor']['editing']['view']['document'],_0x5871c2=new _0x55900d(_0x213d8b,_0x4b7156['map'](_0x288dd9=>this['_getViewFromDiffObj'](_0x288dd9,!0x0))),_0x41d0bc=this['editor']['data']['toModel'](_0x5871c2,_0x15b9ff);return _0x41d0bc['name']=_0x15b9ff,_0x41d0bc;}['_removeRevisionMarkers'](_0x5c818d){return(_0x5c818d=_0x5c818d['filter'](_0x51c644=>!_0x51c644['name']||'revision-start'!==_0x51c644['name']&&'revision-end'!==_0x51c644['name']))['forEach'](_0x34338e=>{'string'!=typeof _0x34338e&&(_0x34338e['children']=this['_removeRevisionMarkers'](_0x34338e['children']),_0x34338e['attributes']=_0x34338e['attributes']['filter'](_0x18cbcc=>!_0x18cbcc[0x0]['startsWith']('data-revision-')));}),_0x5c818d;}};function kt(_0x2f9c41,_0x116dbe,_0x10dff3){const t=_0x2f9c41['t'];switch(_0x116dbe){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'},_0x10dff3);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x10dff3);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');case'REVISION_AI_SOURCE_PILL_LABEL':return t({'string':'Includes\x20AI\x20suggestions','id':'REVISION_AI_SOURCE_PILL_LABEL'});case'AI_SOURCE_REVISION_TOOLTIP':return t({'string':'This\x20revision\x20contains\x20AI-assisted\x20suggestions.','id':'AI_SOURCE_REVISION_TOOLTIP'});case'AI_SOURCE_CHANGE_TOOLTIP':return t({'string':'This\x20change\x20was\x20suggested\x20using\x20AI.','id':'AI_SOURCE_CHANGE_TOOLTIP'});case'AI_SOURCE_ADDED_BY':return t({'string':'Added\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_ADDED_BY'},_0x10dff3);case'AI_SOURCE_REMOVED_BY':return t({'string':'Removed\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_REMOVED_BY'},_0x10dff3);case'AI_SOURCE_SUGGESTED_BY':return t({'string':'Suggested\x20by\x20%0\x20using\x20%1','id':'AI_SOURCE_SUGGESTED_BY'},_0x10dff3);case'AI_SOURCE_AI':return t({'string':'AI','id':'AI_SOURCE_AI'});default:return'';}}var At=class extends _0x15eb24{['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[_0x4fd2f9,bt,Rt,_0x17fbd0];}constructor(_0x533337){super(_0x533337),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new It(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3150c2=_0x1502a4();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3150c2},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 _0x4e03cb=this['repository']['getRevision'](0x0),_0x4430be=_0x4e03cb&&null===_0x4e03cb['creator']?_0x4e03cb:null;if(this['_continueCurrentRevision']=!!_0x4430be&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x526c51=this['_source']['getCurrentRevisionId'](),_0x25324b=this['repository']['getRevision'](_0x526c51);if(_0x25324b)this['_startingVersion']=_0x25324b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x41f7ce=this['_source']['history']['_operations']['find'](_0x4dfe9b=>!_0x4dfe9b['_isInit']),_0x24d9b8=_0x41f7ce?_0x41f7ce['baseVersion']:this['_source']['history']['version'];_0x4e03cb?(_0x4e03cb['toVersion']<_0x24d9b8&&_0x4e03cb['_update']({'toVersion':_0x24d9b8}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x4430be['id'],this['_startingVersion']=_0x4430be['fromVersion']):(this['_startingVersion']=_0x4e03cb['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x24d9b8,this['_continueCurrentRevision']=!0x1);}}else _0x4430be&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x4430be['toVersion'],this['editor']['model']['document']['history']['version']),_0x4430be['fromVersion']===_0x4430be['toVersion']?(0x0!==_0x4430be['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x4430be['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x4430be['id'],this['_startingVersion']=_0x4430be['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',_0x552439=>!_0x552439),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x121a95=[this['editor']];for(const _0x4f17d6 of _0x121a95){let _0x50ff0c;for(const _0x2f837c in _0x4f17d6){const _0x5c9f2a=_0x2f837c,_0x2b2ea4=_0x4f17d6[_0x5c9f2a];if('revisionHistoryLicenseKeyValid'==_0x2b2ea4||'revisionHistoryLicenseKeyInvalid'==_0x2b2ea4||'revisionHistoryLicenseKeyExpired'==_0x2b2ea4||'revisionHistoryLicenseKeyDomainLimit'==_0x2b2ea4||'revisionHistoryLicenseKeyNotAllowed'==_0x2b2ea4||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2b2ea4||'revisionHistoryLicenseKeyUsageLimit'==_0x2b2ea4){delete _0x4f17d6[_0x5c9f2a],_0x50ff0c=_0x2b2ea4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x50ff0c&&_0x4f17d6['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x50ff0c&&_0x4f17d6['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x50ff0c&&_0x4f17d6['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x50ff0c&&_0x4f17d6['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x50ff0c&&_0x4f17d6['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x50ff0c&&_0x4f17d6['_showLicenseError']('usageLimit');}},0x3e8);}async afterInit(){if(this['repository']['length']>0x0){const _0x501820=this['repository']['getRevision'](0x0),_0x55b178=await this['getRevisionDocumentData'](_0x501820),_0x18a9a3=await this['getRevisionRootsAttributes'](_0x501820),_0x7effe1=this['_utils']['getRevisionRootsModelElements'](_0x501820);this['_replaceEditorDataWithRevisionData'](_0x55b178,_0x18a9a3,_0x7effe1);}}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}setSource(_0x1acacd){this['_source']=_0x1acacd;}async update(){const _0x2c15af=await this['_source']['getLatestVersion']();if(_0x2c15af>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3d5466=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x2c15af});_0x3d5466['authors']=_0x3d5466['authorsIds']['map'](_0x552e50=>this['editor']['plugins']['get']('Users')['getUser'](_0x552e50)),this['currentRevision']['_update'](_0x3d5466);}}async['saveRevision'](_0x2dd1a1={},_0x2569d4=null){const _0x338ad6=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2569d4>this['currentRevision']['toVersion']&&(_0x2569d4=null),null===_0x2569d4&&(_0x2569d4=await this['_source']['getLatestVersion']());const _0x27bccb=this['_getFromVersion'](_0x2569d4),_0x1452a7=this['buildRevisionData']({'from':_0x27bccb,'to':_0x2569d4});if(this['currentRevision']['toVersion']<_0x2569d4){const _0x53d2bd=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2569d4,'to':_0x2569d4});_0x53d2bd['authors']=[],_0x53d2bd['authorsIds']=[],_0x53d2bd['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x53d2bd,!0x0),delete _0x53d2bd['authors'],_0x338ad6['push'](_0x53d2bd);}const _0xa215e5={..._0x2dd1a1,'creatorId':this['editor']['plugins']['get']('Users')['me']['id'],'name':_0x2dd1a1['name']||null,'id':_0x2dd1a1['id']||_0x1502a4(),..._0x1452a7,'attributes':{..._0x2dd1a1['attributes'],..._0x1452a7['attributes']}},_0x32b19d=this['addRevisionData'](_0xa215e5);_0x338ad6['push'](_0xa215e5);const _0x32da6d=this['repository']['getIndex'](_0x32b19d);if(0x0!==_0x32da6d){const _0x4e6e2a=this['repository']['getRevision'](_0x32da6d-0x1);if(_0x4e6e2a['fromVersion']!==_0x2569d4){const _0xb276f2=this['_revisionDataBuilder']['getData'](_0x2569d4,_0x4e6e2a['toVersion']),_0x1cedda={'id':_0x4e6e2a['id'],'diffData':_0xb276f2['diffData'],'authorsIds':_0xb276f2['authorsIds'],'authors':_0xb276f2['authorsIds']['map'](_0x2625fc=>this['editor']['plugins']['get']('Users')['getUser'](_0x2625fc)),'fromVersion':_0x2569d4};this['_stampAiAttribute'](_0x1cedda,_0x4e6e2a,!!_0xb276f2['hasAIChanges']),_0x4e6e2a===this['currentRevision']&&(_0x1cedda['createdAt']=new Date(_0xa215e5['createdAt']['getTime']()+0xa)),_0x4e6e2a['_update'](_0x1cedda,!0x0),delete _0x1cedda['authors'],_0x338ad6['push'](_0x1cedda);}}if(this['adapter']){for(const _0x3ad6d2 of _0x338ad6)this['_bufferUpdate'](_0x3ad6d2['id'],_0x3ad6d2,!0x0);this['sendBufferedUpdates']();}return _0x32b19d;}addRevisionData(_0x36e84c){const _0x5449f0=this['repository']['createRevision'](_0x36e84c);return this['adapter']&&_0x5449f0['on']('_update',(_0x1118c0,_0x519b60,_0x21d544)=>{_0x21d544||(this['_bufferUpdate'](_0x519b60['id'],_0x519b60,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5449f0,this['_findInsertionIndex'](_0x5449f0)),_0x5449f0;}async getRevisionDocumentData(_0x46b8cc){return await this['_utils']['loadRevisionData'](_0x46b8cc,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x46b8cc);}async getRevisionRootsAttributes(_0x23bdcd){return await this['_utils']['loadRevisionData'](_0x23bdcd,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x23bdcd);}sendBufferedUpdates(){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x15859e=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x5c230f=0x0;_0x5c230f<_0x15859e['length'];_0x5c230f++){const _0x3612cf=_0x15859e[_0x5c230f];let _0x5eb74a=!0x1;for(const _0x1a7727 of Object['keys'](_0x3612cf))void 0x0===_0x3612cf[_0x1a7727]?delete _0x3612cf[_0x1a7727]:'id'!==_0x1a7727&&(_0x5eb74a=!0x0);_0x5eb74a||(_0x15859e[_0x5c230f]=null);}if(_0x15859e=_0x15859e['filter'](_0x4143c6=>null!==_0x4143c6),!_0x15859e['length'])return;for(let _0x32b450=0x0;_0x32b450<_0x15859e['length'];_0x32b450++){const _0x5411c5=_0x15859e[_0x32b450];void 0x0!==_0x5411c5['fromVersion']&&void 0x0===_0x5411c5['toVersion']&&(_0x5411c5['toVersion']=this['repository']['getRevision'](_0x5411c5['id'])['toVersion']),void 0x0!==_0x5411c5['toVersion']&&void 0x0===_0x5411c5['fromVersion']&&(_0x5411c5['fromVersion']=this['repository']['getRevision'](_0x5411c5['id'])['fromVersion']);}const _0x484dab=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x15859e,_0x484dab)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x29bd7d=>{if(_0x29bd7d){for(const _0x437653 of _0x29bd7d)this['setRevisionData']({'id':_0x437653['id'],'createdAt':_0x437653['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}_stampAiAttribute(_0x279a6d,_0x22e398,_0x5bfba8){if(_0x5bfba8===(!!_0x22e398&&!!_0x22e398['attributes']['@ai']))return;const _0x3d8e3b={..._0x22e398?_0x22e398['attributes']:{},..._0x279a6d['attributes']};_0x5bfba8?_0x3d8e3b['@ai']=!0x0:delete _0x3d8e3b['@ai'],_0x279a6d['attributes']=_0x3d8e3b;}buildRevisionData({revision:_0x4722ac=null,from:_0x2b3bf8=null,to:_0x43ac96=null}){_0x2b3bf8=null!==_0x2b3bf8?_0x2b3bf8:_0x4722ac['fromVersion'],_0x43ac96=null!==_0x43ac96?_0x43ac96:_0x4722ac['toVersion'];const _0xfb490f=this['_revisionDataBuilder']['getData'](_0x2b3bf8,_0x43ac96),_0x3384f6={'diffData':_0xfb490f['diffData'],'authorsIds':_0xfb490f['authorsIds'],'fromVersion':_0x2b3bf8,'toVersion':_0x43ac96};if(this['_stampAiAttribute'](_0x3384f6,_0x4722ac,!!_0xfb490f['hasAIChanges']),!_0x4722ac||_0x43ac96!==_0x4722ac['toVersion']){const _0x553167=_0x43ac96-0x1,_0x35cc06=this['_source']['history']['getOperation'](_0x553167);_0x3384f6['createdAt']=_0x35cc06&&_0x35cc06['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2b3bf8===this['_loadedStateData']['fromVersion']){for(const _0x4b905c of this['_loadedStateData']['authors'])_0x3384f6['authorsIds']['includes'](_0x4b905c['id'])||_0x3384f6['authorsIds']['push'](_0x4b905c['id']);}return _0x3384f6;}_bufferUpdate(_0x379ff7,_0x10fb6b,_0x948896){if(this['_bufferedUpdates']['has'](_0x379ff7)){const _0x4c4691=this['_bufferedUpdates']['get'](_0x379ff7);_0x10fb6b=_0x948896?{..._0x4c4691,..._0x10fb6b}:{..._0x10fb6b,..._0x4c4691};}this['_bufferedUpdates']['set'](_0x379ff7,_0x10fb6b);}setRevisionData(_0x9a7da4){const _0x1879e1=this['repository']['getRevision'](_0x9a7da4['id']);if(_0x9a7da4['createdAt']&&(_0x9a7da4['createdAt']=new Date(_0x9a7da4['createdAt'])),_0x9a7da4['authorsIds']){const _0x4ef46=this['editor']['plugins']['get']('Users');_0x9a7da4['authors']=_0x9a7da4['authorsIds']['map'](_0x42db00=>_0x4ef46['getUser'](_0x42db00));}_0x1879e1['_update'](_0x9a7da4,!0x0);}_createInitialRevision(_0x32e788){const _0x4a4206=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4a4206)this['_initialRevisionId']=_0x4a4206['id'];else{const _0x5f125b=!this['editor']['model']['document']['roots']['find'](_0x28214b=>this['editor']['model']['hasContent'](_0x28214b)),_0x21f4fb=this['editor']['plugins']['get']('Users')['me']['id'],_0x35aa9e=kt(this['editor']['locale'],_0x5f125b?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x32e788,'to':_0x32e788,'id':this['_initialRevisionId'],'name':_0x35aa9e,'creatorId':_0x21f4fb});}}_createCurrentRevision(_0xf4c8d6){const _0x1a9342=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1a9342),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0xf4c8d6,'to':_0xf4c8d6,'id':_0x1a9342,'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(_0x37e27f,_0x4964d2,_0x2fc8f5){const _0x1057b5={},_0x5934c7={},_0x2d6e8a={},_0x22005b=this['editor']['config']['get']('roots')||{};for(const [_0x426550,_0xc3455e]of Object['entries'](_0x22005b))_0xc3455e['lazyLoad']||(_0x1057b5[_0x426550]=_0xc3455e['initialData']??'',_0x5934c7[_0x426550]=_0xc3455e['modelAttributes']||{},_0xc3455e['modelElement']&&(_0x2d6e8a[_0x426550]=_0xc3455e['modelElement']));for(const _0x25306c of this['editor']['model']['document']['getRootNames']())_0x1057b5[_0x25306c]??='',_0x5934c7[_0x25306c]??={};let _0x4a0226=!0x1;const _0xce66bb=Object['keys'](_0x1057b5),_0x3013b2=Object['keys'](_0x37e27f);for(const _0x4d7ffb of _0xce66bb){if(_0x1057b5[_0x4d7ffb]!==_0x37e27f[_0x4d7ffb]&&''!==_0x1057b5[_0x4d7ffb]['trim']()){_0x4a0226=!0x0;break;}if(!_0x21fb00(_0x5934c7[_0x4d7ffb],_0x4964d2[_0x4d7ffb])&&Object['keys'](_0x5934c7[_0x4d7ffb])['length']>0x0){_0x4a0226=!0x0;break;}const _0x3fc43e=_0x2d6e8a[_0x4d7ffb],_0x12c167=_0x2fc8f5[_0x4d7ffb];if(_0x3fc43e&&_0x12c167&&_0x3fc43e!==_0x12c167){_0x4a0226=!0x0;break;}}_0x4a0226||(_0x4a0226=_0x3013b2['some'](_0x59412a=>!this['editor']['model']['document']['getRoot'](_0x59412a))),_0x4a0226&&_0x46499c('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1057b5,'editorRootsAttributes':_0x5934c7,'editorRootsModelElements':_0x2d6e8a,'revisionData':_0x37e27f,'revisionRootsAttributes':_0x4964d2,'revisionRootsModelElements':_0x2fc8f5});for(const [_0x2d7585,_0x39fc14]of Object['entries'](_0x37e27f))this['editor']['config']['set']('roots.'+_0x2d7585+'.initialData',_0x39fc14);for(const [_0x5b6887,_0x2c78fa]of Object['entries'](_0x4964d2))this['editor']['config']['set']('roots.'+_0x5b6887+'.modelAttributes',_0x2c78fa);const _0x133bf7=this['editor']['model']['document'];for(const [_0x4fe5ac,_0x54b94a]of Object['entries'](_0x2fc8f5)){this['editor']['config']['set']('roots.'+_0x4fe5ac+'.modelElement',_0x54b94a);const _0x278f25=_0x133bf7['getRoot'](_0x4fe5ac);_0x278f25&&_0x278f25['name']!==_0x54b94a&&(_0x133bf7['roots']['remove'](_0x4fe5ac),_0x133bf7['createRoot'](_0x54b94a,_0x4fe5ac));}}_addPendingAction(){if(!this['_pendingAction']){const _0x46a66a=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x46a66a['add'](kt(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}_removePendingAction(){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}_findInsertionIndex(_0x144392){const _0x45603a=this['repository']['getRevisions']();_0x45603a['reverse']();let _0x31a2ad=0x0;for(;_0x31a2ad<_0x45603a['length'];){const _0x53c265=_0x45603a[_0x31a2ad];if(_0x53c265===this['currentRevision']){_0x31a2ad++;continue;}if(_0x53c265['id']===this['_initialRevisionId'])break;const _0x346c66=_0x144392['toVersion']-_0x53c265['toVersion']||_0x144392['fromVersion']-_0x53c265['fromVersion'];if(_0x346c66>0x0)break;if(_0x346c66<0x0)_0x31a2ad++;else{if(!_0x144392['creator']&&_0x53c265['creator'])break;if(_0x53c265['creator']||!_0x144392['creator']){if(_0x144392['createdAt']>_0x53c265['createdAt'])break;_0x31a2ad++;}else _0x31a2ad++;}}return _0x31a2ad;}_getFromVersion(_0x1015e8){const _0x5ed1a5=this['repository']['getRevisions']();_0x5ed1a5['reverse'](),_0x5ed1a5['shift']();const _0x384dbd=_0x5ed1a5['find'](_0x173bc7=>_0x173bc7['toVersion']<=_0x1015e8)['toVersion'];return _0x384dbd<this['_startingVersion']?this['_startingVersion']:_0x384dbd;}['_makeRevision']({name:_0x111158,from:_0x92a406,to:_0x172d6e,creatorId:_0x4b226d,id:_0x23bf73}){const _0x36ccd3=this['buildRevisionData']({'from':_0x92a406,'to':_0x172d6e});_0x36ccd3['name']=_0x111158,_0x36ccd3['creatorId']=_0x4b226d,_0x36ccd3['id']=_0x23bf73;const _0x5c4434=this['addRevisionData'](_0x36ccd3);return this['adapter']&&this['_bufferUpdate'](_0x36ccd3['id'],_0x36ccd3,!0x0),_0x5c4434;}_setConversion(){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}},It=class{editor;['source'];_savedMetaData;_lastFrom;_lastTo;['_markers'];_diffRoots;_diffRootsAttributes;_baseRoots;_baseRootsAttributes;_idsRoots;_baseIdsRoots;_touched;_touchedMarkers;['_aiTouchedMarkers'];_touchedRoots;['_revisionId'];_startingRevisionId;constructor(_0x49fad9){this['editor']=_0x49fad9,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['_aiTouchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}init(_0x47ccc1){this['source']=_0x47ccc1;const _0x137af4=new Map(),_0x123798=new Map(),_0x478d3e=this['editor']['model']['document']['roots']['map'](_0x3149f4=>_0x3149f4['rootName']);for(const _0xd4a22f of _0x478d3e){const _0x4c1b54=this['editor']['model']['document']['getRoot'](_0xd4a22f),_0x45eab2=St(_0x4c1b54);_0x137af4['set'](_0xd4a22f,_0x45eab2),_0x123798['set'](_0xd4a22f,Object['fromEntries'](_0x4c1b54['getAttributes']()));}const _0x1a6e0a=Array['from'](this['editor']['model']['markers'])['map'](_0x229892=>[_0x229892['name'],_0x229892['getRange']()]),_0x3914ad=this['source']['version'];this['_saveMetaData'](_0x3914ad,_0x137af4,_0x1a6e0a,_0x123798),this['_startingRevisionId']=this['_revisionId'];const _0x4573ca=new Map(),_0x1e407e=new Map();for(const _0x13e7db of _0x478d3e){const _0x2866=Et(_0x13e7db,this['editor']['model']['document']['getRoot'](_0x13e7db)['name']);_0x4573ca['set'](_0x13e7db,_0x2866),_0x1e407e['set'](_0x13e7db,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4573ca,[],_0x1e407e);}getData(_0x259a87,_0x35dee9){if(this['_lastFrom']===_0x259a87&&this['_lastTo']<=_0x35dee9)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x35dee9,!0x0);else{if(!this['_savedMetaData']['has'](_0x259a87)){const _0x2aa792=this['_getPreviousFrom'](_0x259a87);this['_calculateMetaData'](_0x2aa792,_0x259a87,!0x1);}this['_calculateMetaData'](_0x259a87,_0x35dee9,!0x0);}return this['_lastFrom']=_0x259a87,this['_lastTo']=_0x35dee9,this['_getState']();}loadState(_0x208f34){if(!this['_savedMetaData']['has'](_0x208f34['fromVersion'])){const _0x4421c5=this['_getPreviousFrom'](_0x208f34['fromVersion']);this['_calculateMetaData'](_0x4421c5,_0x208f34['fromVersion'],!0x1);}this['_calculateMetaData'](_0x208f34['fromVersion'],_0x208f34['toVersion'],!0x1);const _0x42ed59=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x208f34['fromVersion'],this['_lastTo']=_0x208f34['toVersion'];for(const _0x17bfc1 in _0x208f34['diffData']){const _0x57f597=_0x208f34['diffData'][_0x17bfc1]['attachChange'],_0x191855=_0x2b717e(_0x208f34['diffData'][_0x17bfc1]['attributesBefore'])||{},_0x339e5c=_0x208f34['diffData'][_0x17bfc1],_0x3aff5a=_0x42ed59['_makeModelFromViewString'](_0x339e5c['deletions'],_0x339e5c['rootElementName']||'$root');_0x3aff5a['rootName']=_0x17bfc1,_0x3aff5a['_isAttached']=!_0x57f597||!_0x57f597['isAttached'],_0x3aff5a['isAttached']=()=>_0x3aff5a['_isAttached'],this['_baseRoots']['set'](_0x17bfc1,_0x3aff5a),this['_baseRootsAttributes']['set'](_0x17bfc1,_0x191855),_0x57f597&&this['_touchedRoots']['set'](_0x17bfc1,_0x57f597);const _0x4681d7=this['_makeIdsRoot'](_0x3aff5a);this['_baseIdsRoots']['set'](_0x17bfc1,_0x4681d7);for(const [_0x155307,_0x5131da]of _0x3aff5a['markers']){if(!_0x155307['startsWith']('revision:'))continue;const _0x2e494e=_0x155307['split'](':')[0x2],_0x339828=_0x339e5c['aiSources']?.[_0x155307]||null;for(const _0x215566 of _0x5131da['getWalker']({'singleCharacters':!0x0})){const _0x4d770c=this['_getVidAttributeName'](_0x215566),_0x464795='elementEnd'==_0x215566['type']?_0x215566['previousPosition']['path']['slice'](0x0,-0x1):_0x215566['previousPosition']['path'],_0x107855=_0x4681d7['getNodeByPath'](_0x464795)['getAttribute'](_0x4d770c);this['_touched']['set'](_0x107855,{'userId':_0x2e494e,'aiSource':_0x339828});}_0x3aff5a['markers']['delete'](_0x155307);}}this['_startingRevisionId']=this['_revisionId'];const _0x97cb1d=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x1852be=>!this['_touched']['has'](_0x1852be));let _0x1a8e76=0x0;const _0x509083=new Map();for(const _0x438f42 in _0x208f34['diffData']){const _0x6f51b0=_0x208f34['diffData'][_0x438f42]['attachChange'],_0x19b56b=_0x2b717e(_0x208f34['diffData'][_0x438f42]['attributesAfter'])||{},_0x269f73=_0x208f34['diffData'][_0x438f42],_0xe3ccc0=_0x42ed59['_makeModelFromViewString'](_0x269f73['insertions'],_0x269f73['rootElementName']||'$root');_0xe3ccc0['rootName']=_0x438f42,_0xe3ccc0['_isAttached']=!_0x6f51b0||_0x6f51b0['isAttached'],_0xe3ccc0['isAttached']=()=>_0xe3ccc0['_isAttached'],this['_diffRoots']['set'](_0x438f42,_0xe3ccc0),this['_diffRootsAttributes']['set'](_0x438f42,_0x19b56b);const _0x1bc1a2=this['_makeIdsRoot'](_0xe3ccc0,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x438f42,_0x1bc1a2),_0x509083['set'](_0x438f42,_0xe3ccc0['isAttached']()?_0x19b56b:{});for(const [_0x44f367,_0x493d7f]of _0xe3ccc0['markers']){if(!_0x44f367['startsWith']('revision:'))continue;const _0x5b9601=_0x44f367['split'](':')[0x2],_0x469ac7=_0x269f73['aiSources']?.[_0x44f367]||null;for(const _0x7b2c18 of _0x493d7f['getWalker']({'singleCharacters':!0x0})){const _0x444e63=this['_getVidAttributeName'](_0x7b2c18),_0xe9464=this['_revisionId']++,_0x5912cb='elementEnd'==_0x7b2c18['type']?_0x7b2c18['previousPosition']['path']['slice'](0x0,-0x1):_0x7b2c18['previousPosition']['path'];_0x1bc1a2['getNodeByPath'](_0x5912cb)['_setAttribute'](_0x444e63,_0xe9464),this['_touched']['set'](_0xe9464,{'userId':_0x5b9601,'aiSource':_0x469ac7});}_0xe3ccc0['markers']['delete'](_0x44f367);}for(const _0x409e74 of this['editor']['model']['createRangeIn'](_0xe3ccc0)['getWalker']({'singleCharacters':!0x0})){const _0x53bbb8=this['_getVidAttributeName'](_0x409e74),_0x1ce12d='elementEnd'==_0x409e74['type']?_0x409e74['previousPosition']['path']['slice'](0x0,-0x1):_0x409e74['previousPosition']['path'],_0x5b65ce=_0x1bc1a2['getNodeByPath'](_0x1ce12d);_0x5b65ce['getAttribute'](_0x53bbb8)>0x0||_0x5b65ce['_setAttribute'](_0x53bbb8,_0x97cb1d[_0x1a8e76++]);}for(const [_0x348728,_0x22ee56]of _0xe3ccc0['markers'])_0x348728['startsWith']('revision:')||this['_markers']['set'](_0x348728,_0x22ee56);}const {roots:_0x20b73c}=this['_savedMetaData']['get'](_0x208f34['fromVersion']),{roots:_0x401960}=this['_savedMetaData']['get'](_0x208f34['toVersion']),_0x4a13ea=St(_0x20b73c['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4a13ea),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4a13ea,Number['NEGATIVE_INFINITY']));const _0xbc12b1=St(_0x401960['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0xbc12b1),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xbc12b1));const _0x597b03=Array['from'](this['_diffRoots'])['map'](([_0x45dee5,_0x22114a])=>[_0x45dee5,St(_0x22114a)]);this['_saveMetaData'](this['_lastTo'],_0x597b03,this['_markers'],_0x509083);}reInit(){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}_saveMetaData(_0x2dd633,_0x1b672b,_0x403830,_0x303604){const _0xb253ed=new Map(_0x1b672b),_0x534777=new Map(_0x2b717e(_0x303604)),_0x2f96f7=new Map();for(const [_0x48626a,_0x4d0fb6]of _0x403830)_0x2f96f7['set'](_0x48626a,{'start':_0x4d0fb6['start']['clone'](),'end':_0x4d0fb6['end']['clone'](),'rootName':_0x4d0fb6['root']['rootName']});this['_savedMetaData']['set'](_0x2dd633,{'roots':_0xb253ed,'markers':_0x2f96f7,'rootsAttributes':_0x534777});}_removeMetaData(_0x3a99bb){this['_savedMetaData']['delete'](_0x3a99bb);}_reset(){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_aiTouchedMarkers']['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(_0x2d4fd6,_0x2d0591=null){let _0x4b2c55=null;_0x2d4fd6['is']('documentFragment')||(_0x4b2c55=new _0x1868f7(_0x2d4fd6['name'],{'vid_start':null===_0x2d0591?this['_revisionId']++:_0x2d0591++}));const _0x23b632=[];for(const _0x433a12 of _0x2d4fd6['getChildren']())if(_0x433a12['is']('element')){_0x23b632['push'](this['_makeIdsRoot'](_0x433a12,_0x2d0591));const _0x5cd69d=_0x23b632[_0x23b632['length']-0x1];null!==_0x2d0591&&(_0x2d0591=_0x5cd69d['is']('element','$text')?_0x5cd69d['getAttribute']('vid')+0x1:_0x5cd69d['getAttribute']('vid_end')+0x1);}else{for(let _0x36e232=0x0;_0x36e232<_0x433a12['offsetSize'];_0x36e232++)_0x23b632['push'](new _0x1868f7('$text',{'vid':null===_0x2d0591?this['_revisionId']++:_0x2d0591++}));}if(_0x2d4fd6['is']('documentFragment')){const _0x3fe6b4=Et(_0x2d4fd6['rootName'],_0x2d4fd6['name']);return _0x3fe6b4['_insertChild'](0x0,_0x23b632),_0x3fe6b4;}return _0x4b2c55['_setAttribute']('vid_end',null===_0x2d0591?this['_revisionId']++:_0x2d0591),_0x4b2c55['_insertChild'](0x0,_0x23b632),_0x4b2c55;}_calculateMetaData(_0x4e01bd,_0x502bb1,_0x395f37){this['_reset']();const {roots:_0x57dddb,markers:_0x43aa07,rootsAttributes:_0x519cf0}=this['_savedMetaData']['get'](_0x4e01bd);this['_baseRoots']=new Map(_0x57dddb),this['_baseRootsAttributes']=new Map(_0x2b717e(_0x519cf0));for(const [_0x4b8955,_0x274a17]of this['_baseRoots'])if('$graveyard'!==_0x4b8955&&(this['_diffRoots']['set'](_0x4b8955,St(_0x274a17)),this['_diffRootsAttributes']=new Map(_0x2b717e(_0x519cf0)),_0x395f37)){const _0x41e1a5=this['_revisionId'];this['_idsRoots']['set'](_0x4b8955,this['_makeIdsRoot'](_0x274a17)),this['_baseIdsRoots']['set'](_0x4b8955,this['_makeIdsRoot'](_0x274a17,_0x41e1a5));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',St(this['_baseRoots']['get']('$graveyard'))),_0x395f37&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1b5de8,_0x64288]of _0x43aa07){const _0x2dfe46=this['_baseRoots']['get'](_0x64288['rootName']),_0x45e40a=this['_diffRoots']['get'](_0x64288['rootName']),_0x1299c6=new _0x191a66(_0x2a2d33(_0x64288['start'],_0x2dfe46),_0x2a2d33(_0x64288['end'],_0x2dfe46)),_0x48281f=_0x502c59(_0x1299c6,_0x45e40a);_0x2dfe46['markers']['set'](_0x1b5de8,_0x1299c6),this['_markers']['set'](_0x1b5de8,_0x48281f);}this['_applyOperations'](_0x4e01bd,_0x502bb1,_0x395f37);}_applyOperations(_0x3dbfc6,_0x527fa8,_0x56a34a){for(const _0x470b41 of this['source']['getOperations'](_0x3dbfc6,_0x527fa8))this['_handleOperation'](_0x470b41,_0x56a34a);for(const _0x5664f1 of this['_diffRoots']['values']())_0x5664f1['markers']['clear']();for(const [_0x5a1755,_0x30f143]of this['_markers'])this['_diffRoots']['get'](_0x30f143['root']['rootName'])['markers']['set'](_0x5a1755,_0x30f143['clone']());const _0x4a9b70=new Map(),_0x3ecf56=new Map();for(const [_0x5bcea2,_0xc06e1c]of this['_diffRoots'])_0x4a9b70['set'](_0x5bcea2,St(_0xc06e1c)),_0x3ecf56['set'](_0x5bcea2,this['_diffRootsAttributes']['get'](_0x5bcea2));this['_saveMetaData'](_0x527fa8,_0x4a9b70,this['_markers'],_0x3ecf56);}_getPreviousFrom(_0x5992a5){const _0xe59776=Array['from'](this['_savedMetaData']['keys']());_0xe59776['sort']((_0x4aafb3,_0x37c73a)=>_0x4aafb3-_0x37c73a),_0xe59776['reverse']();for(const _0x6454fd of _0xe59776)if(_0x6454fd<_0x5992a5)return _0x6454fd;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4b436a,_0x33d7cf){const _0x468043=Array['from'](_0x33d7cf['markers'])['map'](([_0x397d1d,_0xd2e57c])=>[_0x397d1d,_0x502c59(_0xd2e57c,_0x4b436a)]);_0x4b436a['markers']=new Map(_0x468043);}_transformMarkers(_0x4da47d){for(const _0x4b7f07 of this['_markers']['values']()){const _0x42f817=_0x4b7f07['getTransformedByOperation'](_0x4da47d),_0xf4d1dc=_0x191a66['_createFromRanges'](_0x42f817);_0x4b7f07['start']=_0xf4d1dc['start'],_0x4b7f07['end']=_0xf4d1dc['end'];}}_handleOperation(_0x5bc4ef,_0x5b0581){if('addRoot'!=_0x5bc4ef['type']&&'detachRoot'!=_0x5bc4ef['type']){if('insert'==_0x5bc4ef['type']){const _0x4d2633=_0x5bc4ef['position']['root'],_0x25fd1f=_0x4d2633['rootName'],_0x7feffe=_0x4d2633['name'];this['_diffRoots']['has'](_0x25fd1f)||(this['_diffRoots']['set'](_0x25fd1f,Et(_0x25fd1f,_0x7feffe,!0x0)),this['_diffRootsAttributes']['set'](_0x25fd1f,{}),_0x5b0581&&this['_idsRoots']['set'](_0x25fd1f,Et(_0x25fd1f,_0x7feffe,!0x0)));}else{if('addRootAttribute'==_0x5bc4ef['type']||'removeRootAttribute'==_0x5bc4ef['type']||'changeRootAttribute'==_0x5bc4ef['type'])return void this['_handleRootAttributeOperation'](_0x5bc4ef);'marker'==_0x5bc4ef['type']&&this['_handleMarkerOperation'](_0x5bc4ef);}if('marker'!==_0x5bc4ef['type']){const _0x838709=this['_cloneOperation'](_0x5bc4ef,this['_diffRoots']);_0x838709['_execute'](),this['_transformMarkers'](_0x838709);}if(_0x5b0581)switch(_0x5bc4ef['type']){case'insert':this['_handleInsertOperation'](_0x5bc4ef);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5bc4ef);break;case'merge':this['_handleMergeOperation'](_0x5bc4ef);break;case'split':this['_handleSplitOperation'](_0x5bc4ef);}}else this['_handleRootOperation'](_0x5bc4ef,_0x5b0581);}_cloneOperation(_0x35af9c,_0x4be88c){const _0x3c37d7=_0x35af9c['clone']();return _0x3c37d7['_authorId']=_0x35af9c['_authorId'],_0x3c37d7['_aiSource']=_0x35af9c['_aiSource'],_0x3c37d7['baseVersion']=null,_0x21af22(_0x3c37d7,_0x4be88c),_0x3c37d7;}_getBaseVids(_0x27f4fc){return _0x27f4fc['map'](_0x4b51a1=>{const _0xae76b5=this['_getVidAttributeName'](_0x4b51a1);return Number(_0x4b51a1['item']['getAttribute'](_0xae76b5));});}_generateTape(_0x469a82,_0x54b249){if(_0x469a82['is']('element','$text'))_0x54b249['push']({'item':_0x469a82,'type':'text'});else{_0x469a82['is']('element')&&_0x54b249['push']({'item':_0x469a82,'type':'elementStart'});for(const _0x327c62 of _0x469a82['getChildren']())this['_generateTape'](_0x327c62,_0x54b249);_0x469a82['is']('element')&&_0x54b249['push']({'item':_0x469a82,'type':'elementEnd'});}return _0x54b249;}_getState(){const _0x416d0c=new Map(this['_touched']),_0x1d3ab1=new Map(_0x416d0c),_0x4e7ac5=new Map(),_0x395eef={'insertions':{},'deletions':{}},_0x3e005a={'insertions':{},'deletions':{}},_0x2a14b4=new Map(),_0x10e525=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x18cb7b=new Map();_0x10e525['delete']('$graveyard');for(const _0x18b41d of _0x10e525){const _0xe499d9=(this['_diffRoots']['get'](_0x18b41d)??this['_baseRoots']['get'](_0x18b41d))['name'],_0x10f46e=this['_diffRoots']['get'](_0x18b41d)||Et(_0x18b41d,_0xe499d9,!0x1),_0x6dfa90=this['_baseRoots']['get'](_0x18b41d)||Et(_0x18b41d,_0xe499d9,!0x1);_0x10f46e['isAttached']()||_0x6dfa90['isAttached']()?(_0x18cb7b['set'](_0x18b41d,_0xe499d9),_0x395eef['insertions'][_0x18b41d]=St(_0x10f46e),_0x395eef['deletions'][_0x18b41d]=St(_0x6dfa90),this['_copyMarkers'](_0x395eef['deletions'][_0x18b41d],_0x6dfa90),this['_copyMarkers'](_0x395eef['insertions'][_0x18b41d],_0x10f46e),_0x3e005a['insertions'][_0x18b41d]=this['_generateTape'](this['_idsRoots']['get'](_0x18b41d),[]),_0x3e005a['deletions'][_0x18b41d]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x18b41d)||Et(_0x18b41d,_0xe499d9,!0x1),[])):_0x10e525['delete'](_0x18b41d);}for(const _0x516376 of _0x10e525){const _0x5bda17=_0x3e005a['insertions'][_0x516376];for(const _0xb85b12 of _0x5bda17){const _0x3a9ad6=this['_getVidAttributeName'](_0xb85b12),_0x57f7c9=_0xb85b12['item']['getAttribute'](_0x3a9ad6);_0x1d3ab1['delete'](_0x57f7c9),_0x57f7c9>=this['_startingRevisionId']&&_0x4e7ac5['set'](_0x57f7c9,_0x416d0c['get'](_0x57f7c9));}}for(const _0x53f6f3 of _0x10e525){const _0x1f8ee2=_0x3e005a['insertions'][_0x53f6f3],_0x51dda1=this['_getBaseVids'](_0x3e005a['deletions'][_0x53f6f3]);let _0x2494aa=0x0;for(const _0x3b5312 of _0x1f8ee2){const _0x3c5fe4=this['_getVidAttributeName'](_0x3b5312),_0x3150ef=_0x3b5312['item']['getAttribute'](_0x3c5fe4);if(!_0x4e7ac5['has'](_0x3150ef)&&!_0x2a14b4['has'](_0x3150ef)){if(_0x1d3ab1['has'](_0x3150ef))_0x2494aa++;else{if(_0x3150ef!=_0x51dda1[_0x2494aa]){const _0x464312=_0x416d0c['get'](_0x3150ef)||_0x416d0c['get'](_0x51dda1[_0x2494aa]);for(;_0x3150ef!=_0x51dda1[_0x2494aa];)_0x1d3ab1['has'](_0x51dda1[_0x2494aa])||(_0x2a14b4['set'](_0x51dda1[_0x2494aa],_0x464312),_0x416d0c['set'](_0x51dda1[_0x2494aa],_0x464312)),_0x2494aa++;}_0x2494aa++;}}}}for(const _0x5c5d27 of _0x10e525){const _0x5494b4=_0x3e005a['insertions'][_0x5c5d27];for(const _0x41cb45 of _0x5494b4){const _0xbf4947=this['_getVidAttributeName'](_0x41cb45),_0x443579=_0x41cb45['item']['getAttribute'](_0xbf4947);if(_0x2a14b4['has'](_0x443579)){const _0x1bd5ea=_0x2a14b4['get'](_0x443579);_0x1d3ab1['has'](_0x443579)||_0x1d3ab1['set'](_0x443579,{..._0x1bd5ea}),_0x4e7ac5['set'](_0x443579,{..._0x1bd5ea});}}}for(const _0xab27d0 of _0x1d3ab1['keys']())_0xab27d0>=this['_startingRevisionId']&&_0x1d3ab1['delete'](_0xab27d0);const _0x4fdd42=new Map();for(const _0x2e673b of _0x10e525){let _0x1f84e6=_0x3e005a['insertions'][_0x2e673b];for(const _0xf5d746 of _0x1f84e6)if(_0xf5d746['item']['is']('element','tableCell')){const _0x4a1941=this['_getVidAttributeName'](_0xf5d746),_0x4a2a2a=_0xf5d746['item']['getAttribute'](_0x4a1941);if(_0x4e7ac5['has'](_0x4a2a2a)){const _0x5066d1=_0xf5d746['item']['parent']['parent']['getAttribute']('vid_start'),_0x54102a=_0x4e7ac5['get'](_0x4a2a2a),_0x3392ad=_0x4fdd42['get'](_0x5066d1)||{'users':new Set(),'aiSource':null};_0x3392ad['users']['add'](_0x54102a['userId']),_0x3392ad['aiSource']=_0x3392ad['aiSource']||_0x54102a['aiSource']||null,_0x4fdd42['set'](_0x5066d1,_0x3392ad);}}_0x1f84e6=_0x3e005a['deletions'][_0x2e673b];for(const _0x14c4f3 of _0x1f84e6)if(_0x14c4f3['item']['is']('element','tableCell')){const _0x32682d=this['_getVidAttributeName'](_0x14c4f3),_0x3e053b=_0x14c4f3['item']['getAttribute'](_0x32682d);if(_0x1d3ab1['has'](_0x3e053b)){const _0x3a88eb=_0x14c4f3['item']['parent']['parent']['getAttribute']('vid_start'),_0xd7aff2=_0x1d3ab1['get'](_0x3e053b),_0x460ae8=_0x4fdd42['get'](_0x3a88eb)||{'users':new Set(),'aiSource':null};_0x460ae8['users']['add'](_0xd7aff2['userId']),_0x460ae8['aiSource']=_0x460ae8['aiSource']||_0xd7aff2['aiSource']||null,_0x4fdd42['set'](_0x3a88eb,_0x460ae8);}}for(const _0x257371 of _0x4fdd42['keys']())(_0x4e7ac5['has'](_0x257371)||_0x1d3ab1['has'](_0x257371))&&_0x4fdd42['delete'](_0x257371);}for(const _0x451141 of _0x10e525){const _0x511c2f=_0x3e005a['insertions'][_0x451141];let _0xf25201=null,_0x43b602=null,_0x1a5b81=null;for(const _0x3c35ec of _0x511c2f){const _0x15314d=this['_getVidAttributeName'](_0x3c35ec),_0x3b897a=_0x3c35ec['item']['getAttribute'](_0x15314d),_0x5d832e=_0x4fdd42['get'](_0x3b897a);if(_0x5d832e&&'elementStart'==_0x3c35ec['type']&&(_0xf25201=Array['from'](_0x5d832e['users'])[0x0],_0x43b602=_0x5d832e['aiSource'],_0x1a5b81=_0x3c35ec['item']['getAttribute']('vid_end')),_0xf25201){const _0x4672a7=_0x43b602||_0x1d3ab1['get'](_0x3b897a)?.['aiSource']||null,_0x1aa17f=_0x43b602||_0x4e7ac5['get'](_0x3b897a)?.['aiSource']||null;_0x1d3ab1['set'](_0x3b897a,{'userId':_0xf25201,'aiSource':_0x4672a7}),_0x4e7ac5['set'](_0x3b897a,{'userId':_0xf25201,'aiSource':_0x1aa17f});}_0x3b897a==_0x1a5b81&&(_0xf25201=null,_0x1a5b81=null);}}const _0x29dfe4={},_0x52cbcd=new Set();for(const _0x3eb18e of _0x10e525){const _0x383fb6=_0x395eef['deletions'][_0x3eb18e],_0x64e022=_0x395eef['insertions'][_0x3eb18e];for(const {userId:_0x218511}of this['_touchedMarkers']['values']())null!==_0x218511&&_0x52cbcd['add'](_0x218511);for(const {userId:_0x10f614}of this['_touchedRoots']['values']())null!==_0x10f614&&_0x52cbcd['add'](_0x10f614);const _0x5920be={};this['_markChanges'](_0x64e022,_0x3e005a['insertions'][_0x3eb18e],_0x4e7ac5,'insertion',_0x52cbcd,_0x5920be),this['_markChanges'](_0x383fb6,_0x3e005a['deletions'][_0x3eb18e],_0x1d3ab1,'deletion',_0x52cbcd,_0x5920be),this['_collectSuggestionAiSources'](_0x64e022,_0x5920be),this['_collectSuggestionAiSources'](_0x383fb6,_0x5920be),_0x29dfe4[_0x3eb18e]={'insertions':this['_prepareViewToSave'](_0x64e022),'deletions':this['_prepareViewToSave'](_0x383fb6),'attachChange':this['_touchedRoots']['get'](_0x3eb18e)||null,'attributesBefore':_0x2b717e(this['_baseRootsAttributes']['get'](_0x3eb18e))||{},'attributesAfter':_0x2b717e(this['_diffRootsAttributes']['get'](_0x3eb18e)),'rootElementName':_0x18cb7b['get'](_0x3eb18e),'aiSources':_0x5920be};}const _0x57d93f=Array['from'](_0x4e7ac5['values']())['some'](_0x3c0e8f=>!(!_0x3c0e8f||!_0x3c0e8f['aiSource']))||Array['from'](_0x1d3ab1['values']())['some'](_0x12f813=>!(!_0x12f813||!_0x12f813['aiSource']))||Array['from'](this['_touchedMarkers']['keys']())['some'](_0x4c28b=>this['_aiTouchedMarkers']['has'](_0x4c28b));return{'diffData':_0x29dfe4,'authorsIds':Array['from'](_0x52cbcd),'hasAIChanges':_0x57d93f};}_collectSuggestionAiSources(_0x357606,_0x32b733){const _0x4aabf9=_0x357606['markers'];for(const _0x395298 of _0x4aabf9['keys']()){if(!_0x395298['startsWith']('suggestion:'))continue;if(!this['_touchedMarkers']['has'](_0x395298))continue;const _0x113bed=this['_aiTouchedMarkers']['get'](_0x395298);_0x113bed&&(_0x32b733[_0x395298]=_0x113bed);}}_processRootBeforeSave(_0x5a74b2){for(const [,_0x448ca1]of _0x5a74b2['markers']){const _0x2b625f=_0x448ca1['start']['getAncestors']()['filter'](_0x5c8b7c=>'tableCell'==_0x5c8b7c['name']);for(const _0x4d5e06 of _0x2b625f)0x1==_0x4d5e06['childCount']&&_0x4d5e06['getChild'](0x0)['is']('element','paragraph')&&_0x4d5e06['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1c879a){this['_processRootBeforeSave'](_0x1c879a);const _0x4b19df=this['editor']['data']['toView'](_0x1c879a,{}),_0x1e61af=Array['from'](_0x4b19df['getChildren']())['map'](_0x15832c=>this['_getViewJson'](_0x15832c));return JSON['stringify'](_0x1e61af);}_getViewJson(_0x1014ff){if(_0x1014ff['is']('$text'))return _0x1014ff['data'];{const _0x5e82cb=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x16a655=_0x1014ff,_0x27d070=this['editor']['data']['htmlProcessor']['domConverter'],_0x119754={'type':_0x5e82cb['_getTypeCharForViewElement'](_0x16a655),'name':_0x16a655['name'],'attributes':Array['from'](_0x16a655['getAttributes']()),'children':Array['from'](_0x16a655['getChildren']())['map'](_0x529001=>this['_getViewJson'](_0x529001))};if(_0x1014ff['is']('uiElement')&&'$comment'!=_0x1014ff['name']){const _0x4be2d8=_0x1014ff['render'](_0x27d070['domDocument'],_0x27d070);_0x119754['children']['push'](_0x4be2d8['outerHTML']);}else{if(_0x1014ff['is']('rawElement')){const _0x2b8019=_0x27d070['domDocument']['createElement'](_0x16a655['name']);_0x1014ff['render'](_0x2b8019,_0x27d070),_0x119754['children']['push'](_0x2b8019['innerHTML']);}}const _0x3f5026=Array['from'](_0x16a655['getCustomProperties']());_0x3f5026['length']>0x0&&(_0x119754['customProperties']=_0x3f5026);const _0x1c2643=_0x16a655['getFillerOffset']();return null!==_0x1c2643&&(_0x119754['fillerOffset']=_0x1c2643),_0x119754;}}['_markChanges'](_0x412153,_0x1f27bd,_0xc6dfe6,_0x6e5ff6,_0x34e2a8,_0xd8f1be){let _0x382d17=null,_0x17a233=null,_0x167483=0x0;const _0x12642a=this['editor']['model'];for(let _0x1068ac=0x0;_0x1068ac<_0x1f27bd['length'];_0x1068ac++){const _0x582e40=this['_getVidAttributeName'](_0x1f27bd[_0x1068ac]),_0x1da40c=_0x1f27bd[_0x1068ac]['item']['getAttribute'](_0x582e40),_0x475ee1=_0xc6dfe6['get'](_0x1da40c),_0x2d0a98=_0x1068ac==_0x1f27bd['length']-0x1;!_0x382d17&&_0x475ee1&&(_0x382d17=_0x475ee1,_0x17a233=_0x1f27bd[_0x1068ac]);const _0x47a5bd=!!_0x382d17&&!!_0x475ee1&&_0x475ee1['userId']!=_0x382d17['userId'],_0x5ac6c6=!!_0x382d17&&!!_0x475ee1&&_0x475ee1['aiSource']!=_0x382d17['aiSource'];_0x382d17&&(!_0x475ee1||_0x47a5bd||_0x5ac6c6)&&(_0x562207(_0x475ee1,Ot(_0x17a233,_0x412153,_0x12642a),Ot(_0x1f27bd[_0x1068ac],_0x412153,_0x12642a)),_0x382d17=_0x475ee1||null,_0x17a233=_0x475ee1?_0x1f27bd[_0x1068ac]:null),_0x382d17&&_0x2d0a98&&_0x562207(_0x475ee1,Ot(_0x17a233,_0x412153,_0x12642a),Ct(_0x1f27bd[_0x1068ac],_0x412153,_0x12642a));}function _0x562207(_0xb55c4b,_0x271593,_0x1e26b6){const _0xbe488c=_0x382d17['userId'],_0x323d5b=_0x382d17['aiSource'],_0x12d4f0='revision:'+_0x6e5ff6+':'+_0xbe488c+':'+_0x167483++,_0x4a23ba=_0x12642a['createRange'](_0x271593,_0x1e26b6);_0x412153['markers']['set'](_0x12d4f0,_0x4a23ba),_0x323d5b&&(_0xd8f1be[_0x12d4f0]=_0x323d5b),null!==_0xbe488c&&_0x34e2a8['add'](_0xbe488c);}}_getVidAttributeName(_0x2e1242){switch(_0x2e1242['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}_handleInsertOperation(_0xba9867){const _0x5d56e6=this['_idsRoots']['get'](_0xba9867['position']['root']['rootName']),_0x979c0b=_0x2a2d33(_0xba9867['position'],_0x5d56e6),_0x39645a=null===_0xba9867['_authorId']?null:_0xba9867['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2695f9=_0xba9867['_aiSource']||null,_0x203b60=_0x979c0b['parent'],_0x1bc202=this['_revisionId'],_0x5aa740=[];for(const _0x2e4025 of _0xba9867['nodes'])if(_0x2e4025['is']('element'))_0x5aa740['push'](this['_makeIdsRoot'](_0x2e4025));else{for(let _0x4a3bb9=0x0;_0x4a3bb9<_0x2e4025['offsetSize'];_0x4a3bb9++)_0x5aa740['push'](new _0x1868f7('$text',{'vid':this['_revisionId']++}));}const _0x2611ae=this['_revisionId'];for(let _0x179a14=_0x1bc202;_0x179a14<_0x2611ae;_0x179a14++)this['_touched']['set'](_0x179a14,{'userId':_0x39645a,'aiSource':_0x2695f9});_0x203b60['_insertChild'](_0x979c0b['offset'],_0x5aa740);}_setTouched(_0x303a77,_0x20c066,_0x5036d4){this['_touched']['set'](_0x303a77,{'userId':_0x20c066,'aiSource':_0x5036d4||this['_touched']['get'](_0x303a77)?.['aiSource']||null});}_handleMoveOperation(_0x19af1c){(_0x19af1c=this['_cloneOperation'](_0x19af1c,this['_idsRoots']))['_execute']();const _0x2810ad=null===_0x19af1c['_authorId']?null:_0x19af1c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x19d8aa=_0x19af1c['_aiSource']||null,_0x31f33b=_0x19af1c['getMovedRangeStart'](),_0x1f1df3=_0x31f33b['parent'],_0x5218b0=_0x31f33b['offset'],_0x510a9c=(_0x4b2110,_0xb7367d,_0x4d2413)=>{for(let _0x11236c=_0xb7367d;_0x11236c<_0x4d2413;_0x11236c++){const _0x8aa722=_0x4b2110['getChild'](_0x11236c);_0x8aa722['is']('element','$text')?this['_setTouched'](_0x8aa722['getAttribute']('vid'),_0x2810ad,_0x19d8aa):(this['_setTouched'](_0x8aa722['getAttribute']('vid_start'),_0x2810ad,_0x19d8aa),_0x510a9c(_0x8aa722,0x0,_0x8aa722['childCount']),this['_setTouched'](_0x8aa722['getAttribute']('vid_end'),_0x2810ad,_0x19d8aa));}};_0x510a9c(_0x1f1df3,_0x5218b0,_0x5218b0+_0x19af1c['howMany']);}_handleMergeOperation(_0x53ba29){const _0x55c8c6=null===(_0x53ba29=this['_cloneOperation'](_0x53ba29,this['_idsRoots']))['_authorId']?null:_0x53ba29['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb2c1d3=_0x53ba29['_aiSource']||null,_0x257a57=_0x53ba29['targetPosition']['parent'],_0x389098=_0x53ba29['sourcePosition']['parent'],_0x2af2ef=_0x257a57['getAttribute']('vid_end'),_0x49d718=_0x389098['getAttribute']('vid_start');_0x257a57['_setAttribute']('vid_end',_0x389098['getAttribute']('vid_end')),_0x389098['_setAttribute']('vid_end',_0x2af2ef),this['_setTouched'](_0x49d718,_0x55c8c6,_0xb2c1d3),this['_setTouched'](_0x2af2ef,_0x55c8c6,_0xb2c1d3),_0x53ba29['_execute']();}_handleSplitOperation(_0x26d959){const _0x42c522=null===(_0x26d959=this['_cloneOperation'](_0x26d959,this['_idsRoots']))['_authorId']?null:_0x26d959['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x123765=_0x26d959['_aiSource']||null,_0x2ec026=_0x26d959['graveyardPosition'],_0x1087f9=_0x26d959['splitPosition']['parent'];_0x26d959['_execute']();const _0x9a88e4=_0x1087f9['getAttribute']('vid_end'),_0x3d73cf=_0x26d959['insertionPosition']['nodeAfter'];if(_0x2ec026){const _0x4246d0=_0x3d73cf['getAttribute']('vid_end'),_0x5de1f1=_0x1087f9['getAttribute']('vid_end');_0x1087f9['_setAttribute']('vid_end',_0x4246d0),_0x3d73cf['_setAttribute']('vid_end',_0x5de1f1),this['_setTouched'](_0x1087f9['getAttribute']('vid_end'),_0x42c522,_0x123765),this['_setTouched'](_0x3d73cf['getAttribute']('vid_start'),_0x42c522,_0x123765);}else{const _0x14e390=this['_revisionId']++,_0x3e5ecd=this['_revisionId']++;_0x1087f9['_setAttribute']('vid_end',_0x14e390),_0x3d73cf['_setAttribute']('vid_start',_0x3e5ecd),_0x3d73cf['_setAttribute']('vid_end',_0x9a88e4),this['_setTouched'](_0x14e390,_0x42c522,_0x123765),this['_setTouched'](_0x3e5ecd,_0x42c522,_0x123765);}}_handleMarkerOperation(_0x36a636){if(!_0x36a636['affectsData'])return;const _0x5607db=(_0x36a636=this['_cloneOperation'](_0x36a636,this['_diffRoots']))['oldRange']?_0x36a636['oldRange']['root']:null,_0xf3f60e=_0x36a636['newRange']?_0x36a636['newRange']['root']:null;_0x5607db&&this['_markers']['delete'](_0x36a636['name']),_0xf3f60e&&this['_markers']['set'](_0x36a636['name'],_0x36a636['newRange']['clone']());const _0x5b1715=null===_0x36a636['_authorId']?null:_0x36a636['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x461c09=_0x36a636['name'];if(_0x36a636['_aiSource']&&this['_aiTouchedMarkers']['set'](_0x461c09,_0x36a636['_aiSource']),!this['_touchedMarkers']['has'](_0x461c09))return void this['_touchedMarkers']['set'](_0x461c09,{'range':_0x36a636['oldRange'],'userId':_0x5b1715});const _0x4b66af=this['_touchedMarkers']['get'](_0x461c09),_0x41b22f=_0x4b66af['range'],_0x3921c5=_0x36a636['newRange'];null==_0x41b22f&&null==_0x3921c5||_0x41b22f&&_0x3921c5&&_0x41b22f['isEqual'](_0x3921c5)?this['_touchedMarkers']['delete'](_0x36a636['name']):_0x4b66af['userId']=_0x5b1715;}_handleRootOperation(_0x4f86f4,_0x5ecc54){this['_diffRoots']['has'](_0x4f86f4['rootName'])?this['_diffRoots']['get'](_0x4f86f4['rootName'])['_isAttached']=_0x4f86f4['isAdd']:(this['_diffRoots']['set'](_0x4f86f4['rootName'],Et(_0x4f86f4['rootName'],_0x4f86f4['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4f86f4['rootName'],{}),_0x5ecc54&&this['_idsRoots']['set'](_0x4f86f4['rootName'],Et(_0x4f86f4['rootName'],_0x4f86f4['elementName'],!0x0)));const _0x71a6a5=null===_0x4f86f4['_authorId']?null:_0x4f86f4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x39cd33=this['_touchedRoots']['get'](_0x4f86f4['rootName']);_0x39cd33&&_0x39cd33['userId']===_0x71a6a5?this['_touchedRoots']['delete'](_0x4f86f4['rootName']):this['_touchedRoots']['set'](_0x4f86f4['rootName'],{'userId':_0x71a6a5,'isAttached':_0x4f86f4['isAdd']});}_handleRootAttributeOperation(_0x201c35){const _0x26f1ec=this['_diffRootsAttributes']['get'](_0x201c35['root']['rootName']);null===_0x201c35['newValue']?delete _0x26f1ec[_0x201c35['key']]:_0x26f1ec[_0x201c35['key']]=_0x201c35['newValue'];}};function St(_0x5c6001){const _0x1f117c=Et(_0x5c6001['rootName'],_0x5c6001['name'],_0x5c6001['isAttached']());for(const _0x1743b4 of _0x5c6001['getChildren']()){const _0x5d65d4=_0x1743b4['_clone'](!0x0);_0x1f117c['_appendChild'](_0x5d65d4);}return _0x1f117c;}function Et(_0x2d57a6,_0x2d2c75,_0xa6d63f=!0x0){const _0x6b7045=new _0x258ac8();return _0x6b7045['rootName']=_0x2d57a6,_0x6b7045['name']=_0x2d2c75,_0x6b7045['_isAttached']=_0xa6d63f,_0x6b7045['isAttached']=()=>_0x6b7045['_isAttached'],_0x6b7045;}function Ot(_0x4171b6,_0x3a80f8,_0x213da2){const _0x1f663e='elementEnd'==_0x4171b6['type']?_0x213da2['createPositionAt'](_0x4171b6['item'],'end'):_0x213da2['createPositionBefore'](_0x4171b6['item']);return _0x213da2['createPositionFromPath'](_0x3a80f8,_0x1f663e['path'],_0x1f663e['stickiness']);}function Ct(_0x3e8964,_0x2588b7,_0x340dc5){const _0x19ebde='elementStart'==_0x3e8964['type']?_0x340dc5['createPositionAt'](_0x3e8964['item'],0x0):_0x340dc5['createPositionAfter'](_0x3e8964['item']);return _0x340dc5['createPositionFromPath'](_0x2588b7,_0x19ebde['path'],_0x19ebde['stickiness']);}const Nt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x47a750(dt);var xt=class extends Nt{['focusTracker'];keystrokes;revisionNameInputView;constructor(_0x5859a9,_0x22d456){super(_0x5859a9),this['focusTracker']=new _0x1f365b(),this['keystrokes']=new _0x289644(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x22d456),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'](),_t({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x39ff5e=_0x2a75a9=>_0x2a75a9['stopPropagation']();this['keystrokes']['set']('arrowright',_0x39ff5e),this['keystrokes']['set']('arrowleft',_0x39ff5e),this['keystrokes']['set']('arrowup',_0x39ff5e),this['keystrokes']['set']('arrowdown',_0x39ff5e);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2b2d50){this['revisionNameInputView']['fieldView']['element']['value']=_0x2b2d50['trim']();}reset(){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}_createRevisionNameInput(_0x20dc68){const _0x28f37a=new it(this['locale'],gt),_0xd3f320=_0x28f37a['fieldView'];_0xd3f320['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x439fbb=kt(this['locale'],'Name\x20of\x20the\x20revision');return!_0x20dc68&&(_0x439fbb+='\x20('+kt(this['locale'],'optional')+')'),(_0x28f37a['label']=_0x439fbb,_0xd3f320['on']('input',()=>{this['revisionNameInputValue']=_0xd3f320['element']['value']['trim']();}),_0x28f37a);}},Dt=class extends _0x15eb24{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At];}['_saveRevisionFormView'];init(){const _0x283c6f=this['editor'],_0x2b34ef=_0x283c6f['plugins']['get']('RevisionTracker');_0x283c6f['ui']['componentFactory']['add']('revisionHistory',_0x4f1844=>{const _0x4ce65a=vt(_0x4f1844),_0x2a5d18=_0x4ce65a['panelView']['children'],_0x2fee59=new st(_0x4f1844),_0x2d92da=new et(_0x4f1844),_0x21039b=this['_createSaveRevisionButton'](_0x3e9ea0),_0x28dd43=new et(_0x4f1844),_0x36d418=this['_createOpenRevisionButton'](_0x3e9ea0);return _0x4ce65a['bind']('isEnabled')['to'](_0x2b34ef,'isReady',_0x2b34ef,'isEnabled',_0x283c6f,'isReadOnly',(_0x124ea6,_0x368e57,_0xa2531e)=>_0x124ea6&&_0x368e57&&!_0xa2531e),_0x4ce65a['buttonView']['set']({'icon':_0x74b43d,'label':kt(_0x4f1844,'Revision\x20history'),'tooltip':!0x0}),_0x21039b['set']({'withText':!0x0,'role':'menuitem'}),_0x36d418['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x36d418,'execute',()=>{_0x4ce65a['isOpen']=!0x1,_0x283c6f['editing']['view']['focus']();},{'priority':'low'}),_0x2d92da['children']['add'](_0x21039b),_0x28dd43['children']['add'](_0x36d418),_0x2fee59['role']='menu',_0x2fee59['items']['addMany']([_0x2d92da,_0x28dd43]),_0x2a5d18['add'](_0x2fee59),_0x4ce65a;}),_0x283c6f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}_registerMenuComponent(){const _0x2ce572=this['editor'],_0x30f72c=_0x2ce572['locale'],_0x1e56b9=_0x2ce572['plugins']['get']('RevisionTracker'),_0x5b0f92=new at(_0x30f72c),_0x3c44f5=new rt(_0x30f72c);_0x5b0f92['bind']('isEnabled')['to'](_0x1e56b9,'isReady',_0x1e56b9,'isEnabled',_0x2ce572,'isReadOnly',(_0x37e4e3,_0x2a039e,_0x23f10b)=>_0x37e4e3&&_0x2a039e&&!_0x23f10b),_0x5b0f92['buttonView']['set']({'icon':_0x74b43d,'label':kt(_0x30f72c,'Revision\x20history')});const _0x313ddf=new ot(_0x30f72c,_0x5b0f92),_0x3a19c2=this['_createSaveRevisionButton'](nt);_0x3a19c2['delegate']('execute')['to'](_0x5b0f92),_0x313ddf['children']['add'](_0x3a19c2),_0x3c44f5['items']['add'](_0x313ddf);const _0x5393fe=new ot(_0x30f72c,_0x5b0f92),_0x3f6f20=this['_createOpenRevisionButton'](nt);return _0x3f6f20['delegate']('execute')['to'](_0x5b0f92),_0x5393fe['children']['add'](_0x3f6f20),_0x3c44f5['items']['add'](_0x5393fe),_0x5b0f92['panelView']['children']['add'](_0x3c44f5),_0x5b0f92;}_createSaveRevisionButton(_0x4e99b0){const _0x3579dd=this['editor'],_0x3df693=_0x3579dd['plugins']['get']('RevisionTracker'),_0x19e853=new _0x4e99b0(_0x3579dd['locale']);return _0x19e853['set']({'label':kt(_0x3579dd['locale'],'Save\x20current\x20revision')}),_0x19e853['bind']('isEnabled')['to'](_0x3df693,'isReady',_0x3df693,'isEnabled',_0x3579dd,'isReadOnly',(_0x5b7c45,_0x27ccd3,_0x59f310)=>_0x5b7c45&&_0x27ccd3&&!_0x59f310),this['listenTo'](_0x19e853,'execute',()=>{this['_showDialog']();}),_0x19e853;}_createOpenRevisionButton(_0x2b2d1f){const _0x163c54=this['editor'],_0x4955bd=_0x163c54['plugins']['get']('RevisionTracker'),_0x2fc73f=new _0x2b2d1f(_0x163c54['locale']);return _0x2fc73f['set']({'label':kt(_0x163c54['locale'],'Open\x20revision\x20history')}),_0x2fc73f['bind']('isEnabled')['to'](_0x4955bd,'isReady',_0x163c54,'isReadOnly',(_0x4106fa,_0x1836cb)=>_0x4106fa&&!_0x1836cb),this['listenTo'](_0x2fc73f,'execute',()=>{_0x163c54['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x2fc73f;}['_showDialog'](){const _0x427116=this['editor'],_0x142e55=_0x427116['locale'],_0x2a05e7=_0x427116['plugins']['get']('Dialog'),_0x2daf2b=_0x427116['plugins']['get']('RevisionTracker');function _0x169c74(_0x1c43af){_0x427116['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1c43af['revisionName']?_0x1c43af['revisionNameInputView']['errorText']=kt(_0x142e55,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x427116['plugins']['get'](At)['saveRevision']({'name':_0x1c43af['revisionName']}),_0x2a05e7['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x169c74(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x2a05e7['show']({'id':'revisionSave','title':kt(_0x142e55,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':kt(_0x427116['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x2a05e7['hide']()},{'label':kt(_0x427116['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5c4dd2){_0x5c4dd2['bind']('isEnabled')['to'](_0x2daf2b,'isReady',_0x2daf2b,'isEnabled',_0x427116,'isReadOnly',(_0x146dc0,_0x4bfd88,_0x6987d6)=>_0x146dc0&&_0x4bfd88&&!_0x6987d6);},'onExecute':()=>_0x169c74(this['_saveRevisionFormView'])}]});}_createSaveRevisionFormView(){const _0x34f3b4=this['editor'],_0x14c7fb=_0x34f3b4['locale'];this['_saveRevisionFormView']=new xt(_0x14c7fb,_0x34f3b4['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}},Vt=class extends dt{['changeId'];['_model'];constructor(_0x53b3a0,_0x2a3873,_0x10fc6c=!0x1){super(_0x53b3a0),this['_model']=_0x2a3873,this['changeId']=_0x2a3873['id'];const _0x2512c6=this['bindTemplate'],_0x30252b=_0x10fc6c&&!!_0x2a3873['data']['aiSource'],_0x315914=_0x30252b?this['_createAiIconView'](_0x53b3a0):null;this['set']('type',_0x2a3873['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x2512c6['to']('type',_0x2d68db=>'ck-revision-change__'+_0x2d68db),..._0x30252b?['ck-revision-change_ai']:[]],'tabindex':-0x1},'children':[{'tag':'span','children':_0x30252b?[this['_createAiDescriptionView'](_0x53b3a0,_0x2a3873),_0x315914]:this['_getDescriptionChildren'](_0x53b3a0,_0x2a3873)}]});}_getDescriptionChildren(_0x47f97c,_0xe597b){let _0x54f077='Removed\x20by';return _0xe597b['data']['isSuggestion']?_0x54f077='Suggested\x20by':'add'==_0xe597b['type']&&(_0x54f077='Added\x20by'),[this['_createLabel'](kt(_0x47f97c,_0x54f077)),{'text':'\x20'+_0xe597b['author']['name']}];}_createAiDescriptionView(_0x3b4dc7,_0x3a5d6d){let _0xaa961a='AI_SOURCE_REMOVED_BY';_0x3a5d6d['data']['isSuggestion']?_0xaa961a='AI_SOURCE_SUGGESTED_BY':'add'==_0x3a5d6d['type']&&(_0xaa961a='AI_SOURCE_ADDED_BY');const _0xe4bac0=new dt(_0x3b4dc7);return _0xe4bac0['setTemplate']({'tag':'span','attributes':{'class':['ck-revision-change__label']}}),_0xe4bac0['render'](),_0xe4bac0['element']['innerHTML']=_0x3ee93e(kt(_0x3b4dc7,_0xaa961a,['<span\x20class=\x22ck-revision-change__author\x22></span>','<span\x20class=\x22ck-revision-change__ai-note\x22>'+kt(_0x3b4dc7,'AI_SOURCE_AI')+'</span>'])),_0xe4bac0['element']['querySelector']('.ck-revision-change__author')['textContent']=_0x3a5d6d['author']['name'],_0xe4bac0;}_createLabel(_0x3a991f){return{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3a991f}]};}_createAiIconView(_0x2a6eaa){const _0x35d914=new _0x57a8a0();return _0x35d914['content']=_0x525b57,_0x35d914['extendTemplate']({'attributes':{'class':['ck-revision-change__ai-icon'],'data-cke-tooltip-text':kt(_0x2a6eaa,'AI_SOURCE_CHANGE_TOOLTIP'),'data-cke-tooltip-position':'s'}}),_0x35d914;}['focus'](){this['element']['focus']();}};const Tt=/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x301f59();var Mt=class extends Tt{['id'];author;type;data;rootName;constructor(_0x4215a7){super(),this['id']=_0x4215a7['id']||_0x1502a4(),this['author']=_0x4215a7['author'],this['type']=_0x4215a7['type'],this['data']=_0x4215a7['data']||{},this['rootName']=_0x4215a7['rootName'],this['set']('createdAt',_0x4215a7['createdAt']);}toJSON(){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}},Ht=class{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x2c553d,_0x30c4e6){this['newRevisionId']=_0x2c553d,this['oldRevisionId']=_0x30c4e6,this['changes']=new _0x393ab3();}_setChanges(_0x2b572c){for(const _0x315e16 of _0x2b572c)this['changes']['add'](_0x315e16);}},Pt=class extends _0x15eb24{repository;adapter=null;_getVisibleCommentThreadIds=null;_utils;_activeViewTarget;['_changeView'];['_changeIdToChange'];['_balloon'];_showCommentHighlights;static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x4fd2f9,_0x11b77b,bt,Rt];}constructor(_0x4421a5){super(_0x4421a5),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',(_0x3a7325,_0x3f72e7,_0x15bfa5)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4cb871=>{for(const _0x27c8f1 of this['editor']['editing']['view']['document']['roots'])_0x15bfa5?_0x4cb871['removeClass']('ck-editor__editable__overlay',_0x27c8f1):_0x4cb871['addClass']('ck-editor__editable__overlay',_0x27c8f1);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3fb588=>null!==_0x3fb588),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x5ad14c,_0x2038d8,_0x80dab1)=>_0x5ad14c&&_0x80dab1?_0x2038d8['changes']['getIndex'](_0x80dab1):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1f9120,_0x31fd9f)=>_0x1f9120?_0x31fd9f['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x11b77b),this['_showCommentHighlights']=this['editor']['config']['get']('revisionHistory.showCommentHighlights');}init(){const _0x94c1bc=this['editor'],_0x44171a=new $t(_0x94c1bc,{'direction':'backward'}),_0x317789=new $t(_0x94c1bc,{'direction':'forward'});_0x94c1bc['commands']['add']('showPreviousChange',_0x44171a),_0x94c1bc['commands']['add']('showNextChange',_0x317789),_0x94c1bc['commands']['add']('restoreRevision',new Ft(_0x94c1bc)),this['on']('change:numberOfChanges',()=>{_0x44171a['refresh'](),_0x317789['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x94c1bc['enableReadOnlyMode']('revision-viewer'),_0x94c1bc['plugins']['has']('WidgetToolbarRepository')&&_0x94c1bc['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async getRevisionDocumentData(_0x18d063){return await this['_utils']['loadRevisionData'](_0x18d063,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x18d063);}async getRevisionRootsAttributes(_0x18f65b){return await this['_utils']['loadRevisionData'](_0x18f65b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x18f65b);}async['compare'](_0x3dbea9,_0x17507b,_0x1412c3=!0x1){if(!this['isEnabled'])return;const _0xa67fc8=this['diff'],_0x482959=this['repository'],_0x37cc58='string'==typeof _0x3dbea9?_0x482959['getRevision'](_0x3dbea9):_0x3dbea9,_0x54956a='string'==typeof _0x17507b?_0x482959['getRevision'](_0x17507b):_0x17507b,_0x54a4c7=_0x37cc58['id'],_0x23ebb1=_0x54956a?_0x54956a['id']:null;if(!_0x1412c3&&this['diff']&&this['diff']['newRevisionId']===_0x54a4c7&&this['diff']['oldRevisionId']===_0x23ebb1)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new Ht(_0x54a4c7,_0x23ebb1);const _0x8a750a=this['_getRevisionsRange'](_0x37cc58,_0x54956a,!0x0)['map'](_0x30e07a=>this['_utils']['loadRevisionData'](_0x30e07a,this['adapter']));return _0x8a750a['push'](new Promise(_0x3623dc=>{setTimeout(_0x3623dc,0x14);})),Promise['all'](_0x8a750a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x4e74ee=this['_getDiff'](_0x54a4c7,_0x23ebb1);this['_cleanUpCommentMarkers'](_0x4e74ee);for(const _0x31f69c of _0x4e74ee['changes'])this['_changeIdToChange']['set'](_0x31f69c['id'],_0x31f69c);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2c616a=>{for(const _0x983e21 of this['editor']['model']['document']['getRootNames']())_0x2c616a['detachRoot'](_0x983e21);for(const _0x466636 of Object['keys'](_0x4e74ee['model'])){const _0x7ed08e=_0x4e74ee['model'][_0x466636]['name'],_0x419bb3=_0x2c616a['addRoot'](_0x466636,_0x7ed08e);for(const _0x291112 of Object['keys'](_0x4e74ee['attributes'][_0x466636]))_0x2c616a['setAttribute'](_0x291112,_0x4e74ee['attributes'][_0x466636][_0x291112],_0x419bb3);_0x2c616a['insert'](_0x4e74ee['model'][_0x466636],_0x419bb3,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x4e74ee['changes'])),this['isReady']=!0x0;})['catch'](_0x8ba409=>{console['error'](_0x8ba409),this['_cleanUp'](),_0xa67fc8&&(this['diff']=_0xa67fc8),this['isReady']=!0x0;});}addRevisionData(_0x5d7193,_0x215472){const _0x5b386b=this['repository']['createRevision'](_0x5d7193);return _0x5b386b['on']('_update',(_0x2dbd4e,_0x5656eb,_0x3173f2)=>_0x215472(_0x5656eb,_0x3173f2,_0x5b386b)),this['repository']['addRevision'](_0x5b386b),_0x5b386b;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x38d6d7=>{for(const _0x3863d0 of this['editor']['model']['document']['getRootNames']())_0x38d6d7['detachRoot'](_0x3863d0);});}_cleanUpCommentMarkers(_0x20a8e0){if(!this['_showCommentHighlights']||!this['_getVisibleCommentThreadIds'])return;const _0x27e4da=this['_getVisibleCommentThreadIds']();for(const _0x397745 of Object['values'](_0x20a8e0['model']))for(const _0x2bb94d of Array['from'](_0x397745['markers']['keys']()))_0x2bb94d['startsWith']('revision-comment:')&&!_0x27e4da['has'](Ut(_0x2bb94d))&&_0x397745['markers']['delete'](_0x2bb94d);}_sortAndFilterDiffChanges(_0x10f505){const _0x5d6caa=[],_0x18fa75=new Map();for(const _0x5c9dc1 of this['editor']['model']['document']['getRootNames']()){const _0x53d319=this['editor']['editing']['view']['getDomRoot'](_0x5c9dc1);if(!_0x53d319)continue;const _0x2fbb65=_0x53d319['getClientRects']()['item'](0x0);_0x2fbb65&&(_0x5d6caa['push'](_0x5c9dc1),_0x18fa75['set'](_0x5c9dc1,_0x2fbb65));}return _0x5d6caa['sort']((_0x2f938d,_0x3fe39f)=>{const _0x45cb92=_0x18fa75['get'](_0x2f938d),_0x4398f5=_0x18fa75['get'](_0x3fe39f);return _0x45cb92['y']-_0x4398f5['y']||_0x45cb92['x']-_0x4398f5['x'];}),(_0x10f505=_0x10f505['filter'](_0x4667c3=>_0x5d6caa['includes'](_0x4667c3['rootName'])))['sort']((_0x598c10,_0x1926c1)=>_0x5d6caa['indexOf'](_0x598c10['rootName'])-_0x5d6caa['indexOf'](_0x1926c1['rootName'])),_0x10f505;}['_makeTape'](_0x3fccb6,_0x5caed5={}){const _0x2e8417=Array['from'](_0x3fccb6['markers'])['filter'](([_0x1d41d2,_0x5f2499])=>_0x1d41d2['startsWith']('revision:')&&!_0x5f2499['isCollapsed']),_0x51d001=Array['from'](this['editor']['model']['createRangeIn'](_0x3fccb6)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2e8417['length'])for(const _0x228dce of _0x51d001){const [_0x191003,_0x114b7b]=_0x2e8417[0x0],[,_0x417dbf,_0x34df6d]=_0x191003['split'](':'),_0x4794c2=_0x5caed5[_0x191003]||null;if(_0x114b7b['end']['isEqual'](_0x228dce['nextPosition'])&&_0x2e8417['shift'](),(_0x228dce['previousPosition']['isEqual'](_0x114b7b['start'])||_0x228dce['previousPosition']['isAfter'](_0x114b7b['start']))&&('insertion'==_0x417dbf?_0x228dce['isAdded']={'userId':_0x34df6d,'aiSource':_0x4794c2}:'deletion'==_0x417dbf&&(_0x228dce['isRemoved']={'userId':_0x34df6d,'aiSource':_0x4794c2})),0x0==_0x2e8417['length'])break;}return _0x51d001;}_refreshStartEndIndex(_0x5a705e){const _0x39dfca=new Map();for(let _0x4a0c21=0x0;_0x4a0c21<_0x5a705e['length'];_0x4a0c21++)'text'===_0x5a705e[_0x4a0c21]['type']?(_0x5a705e[_0x4a0c21]['item']['startIndex']=_0x4a0c21,_0x5a705e[_0x4a0c21]['item']['endIndex']=_0x4a0c21):('elementStart'===_0x5a705e[_0x4a0c21]['type']?_0x5a705e[_0x4a0c21]['item']['startIndex']=_0x4a0c21:'elementEnd'===_0x5a705e[_0x4a0c21]['type']&&(_0x5a705e[_0x4a0c21]['item']['endIndex']=_0x4a0c21),_0x39dfca['set'](_0x5a705e[_0x4a0c21]['id'],_0x4a0c21));for(const _0x443f75 of _0x39dfca['values']())'elementStart'===_0x5a705e[_0x443f75]['type']?_0x5a705e[_0x443f75]['item']['endIndex']=_0x39dfca['get'](_0x5a705e[_0x443f75]['pairId']):'elementEnd'===_0x5a705e[_0x443f75]['type']&&(_0x5a705e[_0x443f75]['item']['startIndex']=_0x39dfca['get'](_0x5a705e[_0x443f75]['pairId']));}['_processTape'](_0x578838){for(let _0x2eea93=0x0;_0x2eea93<_0x578838['length'];_0x2eea93++){if('elementStart'===_0x578838[_0x2eea93]['type'])_0x578838[_0x2eea93]['item']['startIndex']=_0x2eea93;else{if('elementEnd'===_0x578838[_0x2eea93]['type']){_0x578838[_0x2eea93]['item']['endIndex']=_0x2eea93;const _0x36dca0=_0x578838[_0x2eea93]['item']['startIndex'];_0x578838[_0x36dca0]['pairId']=_0x578838[_0x2eea93]['id'],_0x578838[_0x2eea93]['pairId']=_0x578838[_0x36dca0]['id'];}else _0x578838[_0x2eea93]['item']['startIndex']=_0x2eea93,_0x578838[_0x2eea93]['item']['endIndex']=_0x2eea93,_0x578838[_0x2eea93]['pairId']=null;}_0x578838[_0x2eea93]['markersStart']||(_0x578838[_0x2eea93]['markersStart']=[],_0x578838[_0x2eea93]['markersEnd']=[]);}}_markInsertions(_0x2f24f3,_0x157911){const _0x4ffe9e=_0x2f24f3['filter'](_0x2feae0=>!_0x2feae0['isAdded']);for(let _0x448b94=0x0;_0x448b94<_0x157911['length'];_0x448b94++)_0x157911[_0x448b94]['isAdded']&&(_0x4ffe9e[_0x448b94]['isAdded']=_0x157911[_0x448b94]['isAdded']);}_getDiff(_0x290284,_0x2f1d25=null){const _0xfcf104=this['repository']['getRevision'](_0x290284),_0x4b7082=_0x2f1d25?this['repository']['getRevision'](_0x2f1d25):null,_0x302dda=this['_getRevisionsRange'](_0xfcf104,_0x4b7082),_0x246ae4=_0x302dda[_0x302dda['length']-0x1],_0x56596f=new Map(),_0x2c9160={'model':{},'attributes':{},'changes':[]},_0x4425a2=new Set(),_0xd09d7c=new Map();for(let _0x44912c=_0x302dda['length']-0x1;_0x44912c>=0x0;_0x44912c--){const _0x5044f1=_0x302dda[_0x44912c];for(const _0x3e3e53 of Object['keys'](_0x5044f1['diffData']))if(_0x5044f1['diffData'][_0x3e3e53]['attachChange']){const _0x21f47c=_0x5044f1['diffData'][_0x3e3e53]['attachChange'];_0x21f47c['isAttached']?(_0x4425a2['add'](_0x3e3e53),_0xd09d7c['has'](_0x3e3e53)&&_0xd09d7c['get'](_0x3e3e53)['userId']==_0x21f47c['userId']?_0xd09d7c['delete'](_0x3e3e53):_0xd09d7c['set'](_0x3e3e53,_0x21f47c)):_0xd09d7c['has'](_0x3e3e53)?(_0x4425a2['delete'](_0x3e3e53),_0xd09d7c['delete'](_0x3e3e53)):(_0x4425a2['add'](_0x3e3e53),_0xd09d7c['set'](_0x3e3e53,_0x21f47c));}else _0x4425a2['add'](_0x3e3e53);}for(const _0x56d053 of _0x4425a2){const _0x2e823a=_0xd09d7c['has'](_0x56d053)&&!_0xd09d7c['get'](_0x56d053)['isAttached'];let _0x46749c=_0x2e823a?_0x302dda['length']-0x1:0x0;const _0x42a90d=_0x2e823a?-0x1:0x1;for(;_0x302dda[_0x46749c];){const _0x29fe32=_0x302dda[_0x46749c];if(_0x29fe32['diffData'][_0x56d053]){const _0xc182bd=_0x2e823a?_0x29fe32['diffData'][_0x56d053]['attributesBefore']:_0x29fe32['diffData'][_0x56d053]['attributesAfter'];_0x2c9160['attributes'][_0x56d053]=_0xc182bd?_0x2b717e(_0xc182bd):{};break;}_0x46749c+=_0x42a90d;}}for(const _0x1ab99a of _0x302dda){_0x1ab99a['model']={};for(const _0x555916 of _0x1ab99a['authors'])_0x56596f['set'](_0x555916['id'],_0x555916);for(const _0x17efb2 of _0x4425a2){const _0x8833e5=_0x1ab99a['diffData'][_0x17efb2]?_0x1ab99a['diffData'][_0x17efb2]['insertions']:'[]',_0x56f6d7=_0x1ab99a['diffData'][_0x17efb2]?_0x1ab99a['diffData'][_0x17efb2]['deletions']:'[]',_0x16f303=_0x1ab99a['diffData'][_0x17efb2]?.['rootElementName']||'$root';_0x1ab99a['model'][_0x17efb2]={'insertions':this['_utils']['_makeModelFromViewString'](_0x8833e5,_0x16f303),'deletions':this['_utils']['_makeModelFromViewString'](_0x56f6d7,_0x16f303)};}}for(const _0x367afa of _0x4425a2){let _0x142029=null,_0xaf4f88=0x0;const _0xd8b790=_0x302dda['map'](_0x574a39=>_0x574a39['diffData'][_0x367afa]?.['rootElementName'])['find'](_0x18246d=>void 0x0!==_0x18246d)||'$root',_0xc1d46a=new Map(Array['from'](_0xfcf104['model'][_0x367afa]['insertions']['markers'])['filter'](([_0x2abd78])=>!_0x2abd78['startsWith']('revision:')));let _0x1eda75=0x0;for(const _0x5cdccf of _0x302dda){const _0x337941=_0x5cdccf['diffData'][_0x367afa]?.['aiSources']||{},_0x153f87=this['_makeTape'](_0x5cdccf['model'][_0x367afa]['insertions'],_0x337941);_0x5cdccf==_0xfcf104?(_0x142029=_0x153f87,_0xaf4f88=_0x142029['length'],_0x142029['forEach'](_0x44ade6=>{_0x44ade6['id']=_0x1eda75++;}),this['_processTape'](_0x142029)):this['_markInsertions'](_0x142029,_0x153f87);const _0x1c6b84=_0x142029['filter'](_0x4b60a8=>!_0x4b60a8['isAdded'])['map'](_0x1496ba=>_0x1496ba['id']);let _0x339356=0x0;const _0xd393d=this['_makeTape'](_0x5cdccf['model'][_0x367afa]['deletions'],_0x337941);_0xd393d['forEach'](_0x3bf532=>{_0x3bf532['isRemoved']?_0x3bf532['id']=_0xaf4f88++:_0x3bf532['id']=_0x1c6b84[_0x339356++];}),this['_processTape'](_0xd393d),this['_setDistance'](_0x142029,'isAdded'),this['_setDistance'](_0xd393d,'isRemoved'),_0x5cdccf==_0xfcf104&&this['_markMarkers'](_0x142029,_0xc1d46a),_0x142029=this['_joinTapes'](_0x142029,_0xd393d),this['_refreshStartEndIndex'](_0x142029),this['_setDistance'](_0x142029,'isRemoved');}_0x142029=_0x142029['filter'](_0xe85b73=>!(_0xe85b73['isAdded']&&_0xe85b73['isRemoved']));const _0x43b8f3=new Map(_0x246ae4['model'][_0x367afa]['deletions']['markers']),_0x543847=new Set(_0xc1d46a['keys']());for(const _0x3a80a7 of _0x43b8f3['keys']())_0x543847['delete'](_0x3a80a7);const _0x390563=Object['assign']({},..._0x302dda['map'](_0x12f5bd=>_0x12f5bd['diffData'][_0x367afa]?.['aiSources']));this['_markSuggestions'](_0x142029,_0x543847,_0x390563),this['_fixObsoleteTags'](_0x142029),_0x142029=this['_removeMissingPairs'](_0x142029),_0x142029=this['_markMismatchedRemovedTags'](_0x142029),_0x142029=this['_removeUnsupportedChanges'](_0x142029);const {root:_0x71a765,changes:_0x369de0}=this['_makeModelFromTape'](_0x142029,_0x56596f,_0x367afa,_0xd8b790);_0x2c9160['model'][_0x367afa]=_0x71a765;const _0x10f163=_0xd09d7c['get'](_0x367afa);if(_0x10f163){const _0x57c1b0=_0x56596f['get'](_0x10f163['userId']),_0xc7c069=new Mt({'author':_0x57c1b0,'type':_0x10f163['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x367afa});_0x369de0['unshift'](_0xc7c069),_0x2c9160['attributes'][_0x367afa]['revisionHistoryAttachChange']=_0xc7c069['id'];}_0x2c9160['changes']=_0x2c9160['changes']['concat'](_0x369de0);}return _0x2c9160;}['_markMarkers'](_0x3d37e9,_0x3f99fe){for(let _0x1a02a7=0x0;_0x1a02a7<_0x3d37e9['length'];_0x1a02a7++)for(const [_0x38b056,_0x4a073d]of _0x3f99fe)!_0x4a073d['isCollapsed']&&_0x4a073d['start']['isEqual'](_0x3d37e9[_0x1a02a7]['previousPosition'])&&_0x3d37e9[_0x1a02a7]['markersStart']['push'](_0x38b056),_0x4a073d['end']['isEqual'](_0x3d37e9[_0x1a02a7]['nextPosition'])&&_0x3d37e9[_0x1a02a7]['markersEnd']['push'](_0x38b056);}['_joinTapes'](_0x5bd506,_0x4b5d9a){let _0x1c97a4=[],_0x1a455c=0x0,_0x537b32=0x0;for(;_0x1a455c<_0x5bd506['length']||_0x537b32<_0x4b5d9a['length'];){const _0x58f56d=_0x5bd506[_0x1a455c]||{},_0x55fdd8=_0x4b5d9a[_0x537b32]||{};if(_0x58f56d['id']==_0x55fdd8['id'])_0x1a455c++,_0x537b32++,_0x1c97a4['push'](_0x58f56d);else{if(_0x55fdd8['isRemoved']&&_0x58f56d['isAdded']){const {commonTape:_0x222141,iEnd:_0xd86223,jEnd:_0x2a9eca}=this['_threeWayMerge'](_0x5bd506,_0x1a455c,_0x4b5d9a,_0x537b32);_0x1c97a4=_0x1c97a4['concat'](_0x222141),_0x1a455c=_0xd86223,_0x537b32=_0x2a9eca;}else _0x55fdd8['isRemoved']?(_0x537b32++,_0x1c97a4['push'](_0x55fdd8)):(_0x1a455c++,_0x1c97a4['push'](_0x58f56d));}}return _0x1c97a4;}_markSuggestions(_0x5dc5b6,_0x3bee32,_0x21879a){const _0x10e760=[];for(let _0x4940a3=0x0;_0x4940a3<_0x5dc5b6['length'];_0x4940a3++){for(let _0x2666a7=0x0;_0x2666a7<_0x5dc5b6[_0x4940a3]['markersStart']['length'];_0x2666a7++){const _0x13cfae=_0x5dc5b6[_0x4940a3]['markersStart'][_0x2666a7];if(!_0x3bee32['has'](_0x13cfae))continue;const {group:_0x5653ca,type:_0x292619,authorId:_0xec1ae3}=_0x26f1bd(_0x13cfae);if('revision-suggestion'!=_0x5653ca||'insertion'!=_0x292619&&'deletion'!=_0x292619)continue;const _0x549036=_0x21879a['suggestion:'+_0x13cfae['slice'](0x14)]||null;_0x10e760['unshift']({'type':_0x292619,'name':_0x13cfae,'userId':_0xec1ae3,'aiSource':_0x549036}),_0x5dc5b6[_0x4940a3]['markersStart']['splice'](_0x2666a7,0x1),_0x2666a7--;}_0x465b9a(_0x5dc5b6[_0x4940a3]);for(let _0x4613ce=0x0;_0x4613ce<_0x5dc5b6[_0x4940a3]['markersEnd']['length'];_0x4613ce++){const _0x16a2d0=_0x5dc5b6[_0x4940a3]['markersEnd'][_0x4613ce];if(!_0x3bee32['has'](_0x16a2d0))continue;const {group:_0x3fa628,type:_0x2f7841}=_0x26f1bd(_0x16a2d0);if('revision-suggestion'!=_0x3fa628||'insertion'!=_0x2f7841&&'deletion'!=_0x2f7841)continue;_0x5dc5b6[_0x4940a3]['markersEnd']['splice'](_0x4613ce,0x1),_0x4613ce--;const _0x521154=_0x10e760['findIndex'](_0x18ac62=>_0x18ac62['name']==_0x16a2d0);_0x521154>-0x1&&_0x10e760['splice'](_0x521154,0x1);}}function _0x26f1bd(_0x37e78c){const _0x13e42a=_0x37e78c['split'](':');return{'group':_0x13e42a[0x0],'type':_0x13e42a[0x1],'subType':_0x13e42a['length']>=0x5?_0x13e42a[0x2]:null,'id':_0x13e42a['length']<0x5?_0x13e42a[0x2]:_0x13e42a[0x3],'authorId':_0x13e42a['length']<0x5?_0x13e42a[0x3]:_0x13e42a[0x4],'markerCount':0x6==_0x13e42a['length']?_0x13e42a[0x5]:null};}function _0x465b9a(_0x30b9a5){for(let _0x1d2a78=0x0;_0x1d2a78<_0x10e760['length'];_0x1d2a78++){if(_0x30b9a5['isAdded']&&'insertion'==_0x10e760[_0x1d2a78]['type']&&_0x30b9a5['isAdded']['userId']==_0x10e760[_0x1d2a78]['userId'])return _0x30b9a5['isAddSuggestion']={..._0x10e760[_0x1d2a78],'aiSource':_0x30b9a5['isAdded']['aiSource']||_0x10e760[_0x1d2a78]['aiSource']},void delete _0x30b9a5['isAdded'];if(!_0x30b9a5['isAdded']&&!_0x30b9a5['isRemoved']&&'deletion'==_0x10e760[_0x1d2a78]['type'])return void(_0x30b9a5['isRemoveSuggestion']=_0x10e760[_0x1d2a78]);}}}_setDistance(_0x30b5fa,_0x43f358){let _0x53dcaf=0x0,_0xd1808a=!0x1;const _0x21e8ea=new Map();for(const _0x4d8522 of _0x30b5fa)_0x4d8522[_0x43f358]?_0xd1808a&&(_0x53dcaf++,_0xd1808a=!0x1):(_0x53dcaf++,_0xd1808a=!0x0),_0x21e8ea['set'](_0x4d8522['id'],_0x53dcaf);for(let _0x5f40e8=0x0;_0x5f40e8<_0x30b5fa['length'];_0x5f40e8++){if('isRemoved'==_0x43f358&&_0x30b5fa[_0x5f40e8]['isAdded']||'isAdded'==_0x43f358&&_0x30b5fa[_0x5f40e8]['isRemoved'])continue;if('text'==_0x30b5fa[_0x5f40e8]['type']){_0x30b5fa[_0x5f40e8]['distance']=0x0;continue;}const _0x3b7180=_0x21e8ea['get'](_0x30b5fa[_0x5f40e8]['pairId']),_0x10100d=_0x21e8ea['get'](_0x30b5fa[_0x5f40e8]['id']);_0x30b5fa[_0x5f40e8]['distance']=_0x3b7180-_0x10100d;}}_getRevisionsRange(_0x2e8aaf,_0x435671,_0x5b8daa=!0x1){const _0x2e9114=[];let _0x5e5816=this['repository']['getIndex'](_0x2e8aaf),_0x77845a=this['repository']['getIndex'](_0x435671);for(-0x1==_0x77845a&&(_0x77845a=this['repository']['_revisions']['length'],_0x5b8daa=!0x1);_0x5e5816<_0x77845a;)_0x2e9114['push'](this['repository']['getRevision'](_0x5e5816)),_0x5e5816++;return _0x5b8daa&&_0x2e9114['push'](this['repository']['getRevision'](_0x5e5816)),_0x2e9114;}_threeWayMerge(_0x123e9b,_0x4712d3,_0x55ae42,_0x5b6c7e){const _0x70054c=this['editor']['model']['schema'];let _0x2ddabf=_0x4712d3;for(;_0x123e9b[_0x2ddabf]&&_0x123e9b[_0x2ddabf]['isAdded'];)_0x2ddabf++;let _0x8a9915=_0x5b6c7e;for(;_0x55ae42[_0x8a9915]&&_0x55ae42[_0x8a9915]['isRemoved'];)_0x8a9915++;_0x40fea8(_0x123e9b,_0x4712d3,_0x2ddabf),_0x40fea8(_0x55ae42,_0x5b6c7e,_0x8a9915);const _0x2e4ec6=_0x55ae42['slice'](_0x5b6c7e,_0x8a9915)['concat'](_0x123e9b['slice'](_0x4712d3,_0x2ddabf));return _0x2e4ec6['sort']((_0x1218ef,_0x103819)=>_0x1218ef['side']!=_0x103819['side']?_0x1218ef['side']-_0x103819['side']:_0x1218ef['level']!=_0x103819['level']?_0x1218ef['level']-_0x103819['level']:_0x1218ef['distance']!=_0x103819['distance']?_0x103819['distance']-_0x1218ef['distance']:!!_0x1218ef['isAdded']!=!!_0x103819['isAdded']?-0x1==_0x1218ef['side']||0x0==_0x1218ef['side']?_0x1218ef['isAdded']?-0x1:0x1:_0x1218ef['isAdded']?0x1:-0x1:_0x1218ef['index']-_0x103819['index']),{'commonTape':_0x2e4ec6,'iEnd':_0x2ddabf,'jEnd':_0x8a9915};function _0x40fea8(_0x48a98,_0x3a6214,_0x59e7bc){let _0x30d203=-0x1,_0x52e8ce=Number['POSITIVE_INFINITY'],_0x33ee52=!0x0;for(let _0x43fc6b=_0x3a6214;_0x43fc6b<_0x59e7bc;_0x43fc6b++)if(_0x70054c['isInline'](_0x48a98[_0x43fc6b]['item'])||(_0x33ee52=!0x1),_0x48a98[_0x43fc6b]['item']['startIndex']<_0x3a6214&&(_0x30d203=_0x43fc6b),_0x48a98[_0x43fc6b]['item']['endIndex']>=_0x59e7bc){_0x52e8ce=_0x43fc6b;break;}_0x33ee52&&(_0x30d203=_0x59e7bc-0x1);for(let _0x5ae7f4=_0x3a6214;_0x5ae7f4<_0x59e7bc;_0x5ae7f4++)_0x48a98[_0x5ae7f4]['side']=_0x5ae7f4<=_0x30d203?-0x1:_0x5ae7f4<_0x52e8ce?0x0:0x1,_0x48a98[_0x5ae7f4]['index']=_0x5ae7f4;let _0x424abf=0x0;for(let _0x2ff3fc=_0x3a6214;_0x2ff3fc<=_0x30d203;_0x2ff3fc++)0x0==_0x48a98[_0x2ff3fc]['distance']?_0x48a98[_0x2ff3fc]['level']=_0x424abf:(_0x424abf++,_0x48a98[_0x2ff3fc]['level']=_0x424abf,_0x424abf++);for(let _0x2a78ed=_0x3a6214;_0x2a78ed<_0x59e7bc;_0x2a78ed++)0x0==_0x48a98[_0x2a78ed]['side']&&(_0x48a98[_0x2a78ed]['level']=_0x424abf);_0x424abf=0x0;for(let _0x2a65e8=_0x59e7bc-0x1;_0x2a65e8>=_0x52e8ce;_0x2a65e8--)0x0==_0x48a98[_0x2a65e8]['distance']?_0x48a98[_0x2a65e8]['level']=_0x424abf:(_0x424abf--,_0x48a98[_0x2a65e8]['level']=_0x424abf,_0x424abf--);}}_fixObsoleteTags(_0x4e1ffa){const _0x500ef3=new Map(),_0x282032=this['editor']['model']['schema'];for(let _0x24f1fa=0x1;_0x24f1fa<_0x4e1ffa['length'];_0x24f1fa++){let _0x4c9522,_0x3db97e,_0x29cce1;const _0x5360cd=_0x4e1ffa[_0x24f1fa],_0x5c5861=_0x4e1ffa[_0x24f1fa-0x1];if('text'==_0x5360cd['type'])continue;if(_0x5360cd['type']!=_0x5c5861['type'])continue;if(!_0x282032['isBlock'](_0x5c5861['item'])||_0x282032['isLimit'](_0x5c5861['item']))continue;if(!_0x282032['isBlock'](_0x5360cd['item'])||_0x282032['isLimit'](_0x5360cd['item']))continue;if((_0x4e1ffa[_0x24f1fa]['isAdded']||_0x4e1ffa[_0x24f1fa]['isAddSuggestion'])&&_0x4e1ffa[_0x24f1fa-0x1]['isRemoved'])_0x4c9522=_0x4e1ffa[_0x24f1fa],_0x3db97e=_0x4e1ffa[_0x24f1fa-0x1],_0x29cce1=_0x24f1fa-0x1;else{if(!_0x4e1ffa[_0x24f1fa]['isRemoved']||!_0x4e1ffa[_0x24f1fa-0x1]['isAdded']&&!_0x4e1ffa[_0x24f1fa-0x1]['isAddSuggestion'])continue;_0x4c9522=_0x4e1ffa[_0x24f1fa-0x1],_0x3db97e=_0x4e1ffa[_0x24f1fa],_0x29cce1=_0x24f1fa;}const _0x3925c5=_0x4c9522['level']==_0x3db97e['level'],_0x2ff26f=Math['abs'](_0x4c9522['level'])<Math['abs'](_0x3db97e['level'])&&0x0==_0x3db97e['distance'];(_0x3925c5||_0x2ff26f)&&(_0x500ef3['set'](_0x3db97e['id'],_0x4c9522['id']),_0x4e1ffa['splice'](_0x29cce1,0x1),_0x24f1fa--,_0x4c9522['isAdded']=!0x1);}for(let _0xb1bffd=0x0;_0xb1bffd<_0x4e1ffa['length'];_0xb1bffd++)_0x500ef3['has'](_0x4e1ffa[_0xb1bffd]['pairId'])&&(_0x4e1ffa[_0xb1bffd]['pairId']=_0x500ef3['get'](_0x4e1ffa[_0xb1bffd]['pairId']));}['_removeMissingPairs'](_0x3ccefa){const _0x37504c=new Set(_0x3ccefa['map'](_0x1388bb=>_0x1388bb['id']));for(let _0x355fa6=0x0;_0x355fa6<_0x3ccefa['length'];_0x355fa6++)_0x37504c['has'](_0x3ccefa[_0x355fa6]['pairId'])||0x0==_0x3ccefa[_0x355fa6]['distance']||(_0x3ccefa[_0x355fa6]['isIncorrect']=!0x0);return _0x3ccefa['filter'](_0x4f8000=>!_0x4f8000['isIncorrect']);}_markMismatchedRemovedTags(_0x5960f8){const _0x2e865e=new Set();for(let _0x43b449=0x0;_0x43b449<_0x5960f8['length'];_0x43b449++){if(_0x2e865e['has'](_0x5960f8[_0x43b449]['id'])&&_0x5960f8[_0x43b449]['isRemoved']&&(_0x5960f8[_0x43b449]['isIncorrect']=!0x0),_0x5960f8[_0x43b449]['isIncorrect'])continue;if(0x0==_0x5960f8[_0x43b449]['distance'])continue;if('elementStart'!=_0x5960f8[_0x43b449]['type'])continue;if(null==_0x5960f8[_0x43b449]['pairId'])continue;let _0x4ea03d=_0x43b449+0x1,_0x56dde6=0x0;for(;_0x5960f8[_0x4ea03d]['id']!=_0x5960f8[_0x43b449]['pairId'];)'elementStart'==_0x5960f8[_0x4ea03d]['type']?_0x56dde6++:'elementEnd'==_0x5960f8[_0x4ea03d]['type']&&_0x56dde6--,_0x4ea03d++;if(0x0!=_0x56dde6){if(_0x5960f8[_0x43b449]['isRemoved'])_0x5960f8[_0x43b449]['isIncorrect']=!0x0;else{for(;_0x4ea03d!=_0x43b449;)_0x5960f8[_0x4ea03d]['isRemoved']&&0x0!=_0x5960f8[_0x4ea03d]['distance']&&(_0x5960f8[_0x4ea03d]['isIncorrect']=!0x0,_0x2e865e['add'](_0x5960f8[_0x4ea03d]['pairId'])),_0x4ea03d--;}}}return _0x5960f8['filter'](_0x1a03be=>!_0x1a03be['isIncorrect']);}_removeUnsupportedChanges(_0x6cee7c){const _0x4f9ed9=this['editor']['model']['schema'];for(let _0x11e34e=0x0;_0x11e34e<_0x6cee7c['length'];_0x11e34e++){if(!(_0x6cee7c[_0x11e34e]['isAdded']||_0x6cee7c[_0x11e34e]['isAddSuggestion']||_0x6cee7c[_0x11e34e]['isRemoved']||_0x6cee7c[_0x11e34e]['isRemoveSuggestion']))continue;if(0x0==_0x6cee7c[_0x11e34e]['distance'])continue;const _0x72183f=_0x6cee7c[_0x11e34e]['item'];_0x4f9ed9['isBlock'](_0x72183f)||_0x4f9ed9['isLimit'](_0x72183f)||(_0x6cee7c[_0x11e34e]['isAdded']&&delete _0x6cee7c[_0x11e34e]['isAdded'],_0x6cee7c[_0x11e34e]['isAddSuggestion']&&delete _0x6cee7c[_0x11e34e]['isAddSuggestion'],_0x6cee7c[_0x11e34e]['isRemoveSuggestion']&&delete _0x6cee7c[_0x11e34e]['isRemoveSuggestion'],_0x6cee7c[_0x11e34e]['isRemoved']&&(_0x6cee7c[_0x11e34e]['isIncorrect']=!0x0));}return _0x6cee7c['filter'](_0x21f1e6=>!_0x21f1e6['isIncorrect']);}['_makeModelFromTape'](_0x154440,_0x3b0c0a,_0x1ff4ce,_0x525323){const _0x10ceed=new _0x258ac8(),_0x39ef3d=[],_0x2a17d9=new Map(),_0x5e6d09=this['editor']['model'],_0x26080b=_0x5e6d09['schema'],_0x29fb6f=[_0x10ceed],_0x469613={},_0x3d277b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x10ceed['name']=_0x525323;let _0x1d2958=null;const _0x39eb89=[0x0];for(let _0x5bd280=0x0;_0x5bd280<_0x154440['length'];_0x5bd280++)if('elementStart'===_0x154440[_0x5bd280]['type']){_0x154440[_0x5bd280]['previousPosition']=_0x5e6d09['createPositionFromPath'](_0x10ceed,_0x39eb89);const _0xf41799=new _0x1868f7(_0x154440[_0x5bd280]['item']['name'],_0x154440[_0x5bd280]['item']['getAttributes']());_0x29fb6f[0x0]['_appendChild'](_0xf41799),_0x39eb89['push'](0x0),_0x29fb6f['unshift'](_0xf41799),_0x154440[_0x5bd280]['nextPosition']=_0x5e6d09['createPositionFromPath'](_0x10ceed,_0x39eb89);}else'elementEnd'===_0x154440[_0x5bd280]['type']?(_0x29fb6f['shift'](),_0x154440[_0x5bd280]['previousPosition']=_0x5e6d09['createPositionFromPath'](_0x10ceed,_0x39eb89),_0x39eb89['pop'](),_0x39eb89[_0x39eb89['length']-0x1]++,_0x154440[_0x5bd280]['nextPosition']=_0x5e6d09['createPositionFromPath'](_0x10ceed,_0x39eb89)):(_0x154440[_0x5bd280]['previousPosition']=_0x5e6d09['createPositionFromPath'](_0x10ceed,_0x39eb89),_0x1d2958?_0x1d2958['_data']+=_0x154440[_0x5bd280]['item']['data']:_0x1d2958=new _0x3ec4fc(_0x154440[_0x5bd280]['item']['data'],_0x154440[_0x5bd280]['item']['getAttributes']()),_0x154440[_0x5bd280+0x1]&&'text'===_0x154440[_0x5bd280+0x1]['type']&&_0x5da356(_0x1d2958,_0x154440[_0x5bd280+0x1]['item'])||(_0x29fb6f[0x0]['_appendChild'](_0x1d2958),_0x1d2958=null),_0x39eb89[_0x39eb89['length']-0x1]+=_0x154440[_0x5bd280]['item']['offsetSize'],_0x154440[_0x5bd280]['nextPosition']=_0x5e6d09['createPositionFromPath'](_0x10ceed,_0x39eb89));for(let _0x44d5d4=0x0;_0x44d5d4<_0x154440['length'];_0x44d5d4++){const _0x57900a=_0x154440[_0x44d5d4]['previousPosition'],_0x44b93d=_0x154440[_0x44d5d4]['nextPosition'];for(const _0x9bf3ef of _0x154440[_0x44d5d4]['markersStart'])_0x2a17d9['set'](_0x9bf3ef,{'start':_0x57900a,'end':null});_0x216a2d('isRemoveSuggestion',_0x44d5d4,_0x57900a,_0x44b93d),_0x216a2d('isAddSuggestion',_0x44d5d4,_0x57900a,_0x44b93d),_0x216a2d('isRemoved',_0x44d5d4,_0x57900a,_0x44b93d),_0x216a2d('isAdded',_0x44d5d4,_0x57900a,_0x44b93d);for(const _0x36c2ad of _0x154440[_0x44d5d4]['markersEnd']){const _0x371127=_0x2a17d9['get'](_0x36c2ad);_0x371127?_0x371127['end']=_0x44b93d:_0x2a17d9['set'](_0x36c2ad,{'start':_0x44b93d,'end':_0x44b93d});}}for(const [_0x1eb6bf,_0x37a5e7]of _0x2a17d9){const _0x2300f8=this['editor']['model']['createRange'](_0x37a5e7['start'],_0x37a5e7['end']);_0x10ceed['markers']['set'](_0x1eb6bf,_0x2300f8);}return _0x39ef3d['sort']((_0x35b011,_0x948188)=>{const _0x44e004=_0x10ceed['markers']['get']('revision:'+_0x35b011['id']),_0x274c15=_0x10ceed['markers']['get']('revision:'+_0x948188['id']);return _0x44e004['start']['isBefore'](_0x274c15['start'])?-0x1:_0x44e004['start']['isAfter'](_0x274c15['start'])?0x1:_0x44e004['end']['isBefore'](_0x274c15['end'])?-0x1:_0x44e004['end']['isAfter'](_0x274c15['end'])?0x1:'add'===_0x35b011['type']?-0x1:0x1;}),{'root':_0x10ceed,'changes':_0x39ef3d};function _0x216a2d(_0x6865ff,_0x370086,_0x4c961c,_0x263c69){const _0x3fe6eb=!!_0x154440[_0x370086][_0x6865ff],_0x1f0a9e=_0x3fe6eb?_0x154440[_0x370086][_0x6865ff]['userId']:null,_0x36a02e=_0x3fe6eb&&_0x154440[_0x370086][_0x6865ff]['aiSource']||null,_0x1ee195=_0x370086===_0x154440['length']-0x1,_0x2d3c97=_0x3d277b[_0x6865ff][0x0],_0x3d61ec=_0x26080b['isObject'](_0x154440[_0x370086]['item']);!_0x469613[_0x6865ff]&&_0x3fe6eb?_0x469613[_0x6865ff]={'start':_0x4c961c,'tapeItem':_0x154440[_0x370086],'userId':_0x1f0a9e,'aiSource':_0x36a02e,'type':_0x6865ff}:_0x469613[_0x6865ff]&&!_0x3fe6eb?(_0x469613[_0x6865ff]['end']=_0x4c961c,_0x1c43eb(_0x469613[_0x6865ff]),_0x469613[_0x6865ff]=null):_0x469613[_0x6865ff]&&_0x3fe6eb&&(_0x469613[_0x6865ff]['userId']!==_0x1f0a9e||_0x469613[_0x6865ff]['aiSource']!==_0x36a02e)&&(_0x469613[_0x6865ff]['end']=_0x4c961c,_0x2d3c97&&_0x2d3c97['userId']===_0x469613[_0x6865ff]['userId']?_0x2d3c97['change']['aiSource']=_0x2d3c97['change']['aiSource']||_0x469613[_0x6865ff]['aiSource']:_0x1c43eb(_0x469613[_0x6865ff]),_0x469613[_0x6865ff]={'start':_0x4c961c,'tapeItem':_0x154440[_0x370086],'userId':_0x1f0a9e,'aiSource':_0x36a02e,'type':_0x6865ff}),_0x469613[_0x6865ff]&&_0x3d61ec&&('elementStart'!==_0x154440[_0x370086]['type']||_0x2d3c97&&_0x2d3c97['userId']===_0x1f0a9e||_0x3d277b[_0x6865ff]['unshift']({'userId':_0x1f0a9e,'object':_0x154440[_0x370086]['item'],'change':_0x469613[_0x6865ff]}),'elementEnd'===_0x154440[_0x370086]['type']&&_0x2d3c97&&_0x2d3c97['object']===_0x154440[_0x370086]['item']&&(_0x3d277b[_0x6865ff]['shift'](),_0x469613[_0x6865ff]=_0x2d3c97['change'])),_0x469613[_0x6865ff]&&_0x1ee195&&(_0x469613[_0x6865ff]['end']=_0x263c69,_0x1c43eb(_0x469613[_0x6865ff]),_0x469613[_0x6865ff]=null);}function _0x1c43eb({start:_0x40f8ca,end:_0x3c96d3,tapeItem:_0x3077a7,userId:_0x46405a,aiSource:_0x44b631,type:_0x527300}){const _0x1ba895=_0x3077a7['item'],_0x13c0cc=_0x5e6d09['schema']['isBlock'](_0x1ba895)&&!_0x5e6d09['schema']['isLimit'](_0x1ba895),_0x2a7124=_0x40f8ca['nodeAfter']==_0x3c96d3['parent']&&_0x3c96d3['isAtStart'];if(_0x13c0cc&&_0x2a7124)return;const _0x47bddc=_0x5e6d09['createRange'](_0x40f8ca,_0x3c96d3),_0x1cd187=_0x3b0c0a['get'](_0x46405a),_0x110cf6=new Mt({'author':_0x1cd187,'type':'isAdded'==_0x527300||'isAddSuggestion'==_0x527300?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x527300||'isRemoveSuggestion'==_0x527300,'aiSource':_0x44b631||null},'createdAt':new Date(),'rootName':_0x1ff4ce});_0x39ef3d['push'](_0x110cf6),_0x10ceed['markers']['set']('revision:'+_0x110cf6['id'],_0x47bddc);}function _0x5da356(_0x5f3c2d,_0x4c8f81){const _0x1ee057=_0x5f3c2d['getAttributes'](),_0x2facce=_0x4c8f81['getAttributes']();for(const _0x3a8d6b of _0x1ee057){if(_0x3a8d6b[0x1]!==_0x4c8f81['getAttribute'](_0x3a8d6b[0x0]))return!0x1;_0x2facce['next']();}return _0x2facce['next']()['done'];}}_setConversion(){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x477584=>{const _0x208b12=_0x477584['markerName']['split'](':')[0x1],_0xbd550f=this['_getChangeFromId'](_0x208b12);if(!_0xbd550f)return null;const _0x32ec02='add'==_0xbd550f['type']?'insertion':'deletion',_0x3eb843=['ck-suggestion-marker','ck-suggestion-marker-'+_0x32ec02];return _0xbd550f['data']['isSuggestion']&&_0x3eb843['push']('ck-suggestion-marker-'+_0x32ec02+'-new'),this['activeChange']==_0xbd550f&&_0x3eb843['push']('ck-suggestion-marker--active'),{'classes':_0x3eb843,'attributes':{'data-change-id':_0x208b12}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5b2071=>{_0x5b2071['on']('element:pre',(_0x323da9,_0x2db847,_0x2b3877)=>{const _0x9754cb=_0x2db847['viewItem']['getChild'](0x0);if(!_0x9754cb||!_0x9754cb['is']('element','code'))return;if(!_0x2b3877['consumable']['consume'](_0x9754cb,{'attributes':['vid_start','vid_end']}))return;const _0x4744f5=_0x2db847['modelRange']['start']['nodeAfter'];_0x2b3877['writer']['setAttribute']('vid_start',_0x9754cb['getAttribute']('vid_start'),_0x4744f5),_0x2b3877['writer']['setAttribute']('vid_end',_0x9754cb['getAttribute']('vid_end'),_0x4744f5);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x266844=>{_0x266844['on']('element',(_0x2b40a1,_0x2ff70f,_0x47c2a0)=>{if(!_0x47c2a0['consumable']['consume'](_0x2ff70f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2ff70f['modelRange']['isCollapsed'])return;const _0x24b2bd=_0x2ff70f['modelRange']['start']['nodeAfter'];_0x24b2bd['hasAttribute']('vid_start')||_0x24b2bd['hasAttribute']('vid')||(_0x47c2a0['writer']['setAttribute']('vid_start',_0x2ff70f['viewItem']['getAttribute']('vid_start'),_0x24b2bd),_0x47c2a0['writer']['setAttribute']('vid_end',_0x2ff70f['viewItem']['getAttribute']('vid_end'),_0x24b2bd));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x50c436=>_0x50c436['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4c8955,[,_0x5cf186])=>{['vid_start','vid_end','vid']['includes'](_0x5cf186)&&(_0x4c8955['return']=!0x0,_0x4c8955['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1f5d20=>{_0x1f5d20['on']('attribute:vid',(_0x43b44b,_0xe4bda6,_0x5bc081)=>{if('\x20'!=_0xe4bda6['item']['data']||_0xe4bda6['item']['parent']['maxOffset']>0x1)return;if(!_0x5bc081['consumable']['consume'](_0xe4bda6['item'],_0x43b44b['name']))return;const _0x2f3f09=_0x5bc081['writer'],_0x39abf2=_0x5bc081['mapper']['toViewRange'](_0xe4bda6['range']);_0x2f3f09['wrap'](_0x39abf2,_0x2f3f09['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3cadd6){const _0x4dac16=_0x3cadd6['plugins']['get']('RevisionViewer');return(_0x29d56e,_0x3b8189,_0x1568c5)=>{const _0xa87a3b=_0x3b8189['markerName']['split'](':')[0x1],_0x3e32dd=_0x4dac16['_getChangeFromId'](_0xa87a3b);if(!_0x3e32dd)return null;const _0x44b3c5='add'==_0x3e32dd['type']?'split':'merge';if(!_0x1568c5['consumable']['test'](_0x3b8189['markerRange'],_0x29d56e['name']))return;const _0x1de971=_0x3b8189['markerRange']['getWalker'](),_0x5f39e1=_0x3b8189['markerRange']['start'],_0x5653e7=_0x3cadd6['model']['schema'];let _0x1ac287=null,_0x1a268a=null,_0x56ec3d=!0x1,_0x40efdc=!0x1;for(const _0x2f4e80 of _0x1de971){const _0x209f09=_0x2f4e80['item'];_0x56ec3d=_0x56ec3d||_0x5653e7['isContent'](_0x209f09);const _0x3a912c=_0x1568c5['mapper']['toViewElement'](_0x209f09);if(_0x3a912c&&_0x3a912c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2f4e80['type']&&(_0x5653e7['isBlock'](_0x209f09)&&!_0x5653e7['isLimit'](_0x209f09)&&(_0x209f09['nextSibling']||_0x5f39e1['isAtEnd']?_0x1ac287&&_0x1ac287['parent']==_0x209f09||(_0x1ac287=_0x209f09,_0x521d37(_0x2f4e80['previousPosition']),_0x40efdc=!0x0):_0x1a268a=_0x1a268a||_0x2f4e80['previousPosition']));}function _0x521d37(_0x40795c){const _0x16f855=_0x1568c5['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x44b3c5}),_0x327cf6=_0x1568c5['mapper']['toViewPosition'](_0x40795c);_0x3e32dd['data']['isSuggestion']&&_0x1568c5['writer']['addClass']('ck-suggestion-marker-'+_0x44b3c5+'-new',_0x16f855),_0x4dac16['activeChange']==_0x3e32dd&&_0x1568c5['writer']['addClass']('ck-suggestion-marker--active',_0x16f855),_0x1568c5['writer']['insert'](_0x327cf6,_0x16f855),_0x1568c5['mapper']['bindElementToMarker'](_0x16f855,_0x3b8189['markerName']);}_0x56ec3d||_0x40efdc||!_0x1a268a||_0x521d37(_0x1a268a);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x106ea1,_0x348169,_0x115944)=>{const _0x4e3c6b=_0x115944['mapper']['markerNameToElements'](_0x348169['markerName']);if(_0x4e3c6b){for(const _0x33f930 of _0x4e3c6b)(_0x33f930['hasClass']('ck-suggestion-marker-split')||_0x33f930['hasClass']('ck-suggestion-marker-merge'))&&(_0x115944['mapper']['unbindElementFromMarkerName'](_0x33f930,_0x348169['markerName']),_0x115944['writer']['remove'](_0x33f930));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x54b013,_0x862380,_0x39b8c7)=>{const _0x518719=_0x862380['markerName']['split'](':')[0x1],_0x412f44=this['_getChangeFromId'](_0x518719);if(!_0x412f44)return null;const _0x5bcc26='add'==_0x412f44['type']?'split':'merge';if(_0x39b8c7['consumable']['test'](_0x862380['markerRange'],_0x54b013['name']))for(const _0x2753b4 of _0x862380['markerRange']['getItems']()){if(!_0x2753b4['is']('element','softBreak'))continue;const _0x3b93a2=_0x39b8c7['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5bcc26}),_0x5914e1=_0x39b8c7['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x2753b4));_0x412f44['data']['isSuggestion']&&_0x39b8c7['writer']['addClass']('ck-suggestion-marker-'+_0x5bcc26+'-new',_0x3b93a2),this['activeChange']==_0x412f44&&_0x39b8c7['writer']['addClass']('ck-suggestion-marker--active',_0x3b93a2),_0x39b8c7['writer']['insert'](_0x5914e1,_0x3b93a2),_0x39b8c7['mapper']['bindElementToMarker'](_0x3b93a2,_0x862380['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x546db7=>{for(const _0x3e17c8 of this['editor']['model']['document']['getRootNames']()){const _0x5caea6=this['editor']['model']['document']['getRoot'](_0x3e17c8),_0x2a9dec=this['editor']['editing']['view']['document']['getRoot'](_0x3e17c8);if(_0x2a9dec){const _0x2ccea8=_0x5caea6['getAttribute']('revisionHistoryAttachChange');if(_0x546db7['removeAttribute']('data-change-id',_0x2a9dec),_0x546db7['removeClass']('ck-revision-history-root-add',_0x2a9dec),_0x546db7['removeClass']('ck-revision-history-root-remove',_0x2a9dec),_0x546db7['removeClass']('ck-revision-history-root--active',_0x2a9dec),_0x2ccea8){const _0x5d6061=this['_getChangeFromId'](_0x2ccea8);if(!_0x5d6061)return null;_0x546db7['setAttribute']('data-change-id',_0x2ccea8,_0x2a9dec),_0x546db7['addClass']('ck-revision-history-root-'+_0x5d6061['type'],_0x2a9dec),this['activeChange']==_0x5d6061&&_0x546db7['addClass']('ck-revision-history-root--active',_0x2a9dec);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x3dbb6a=>'revision-comment:'+_0x3dbb6a,'converterPriority':'highest'}),this['_showCommentHighlights']&&this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-comment','view':_0x69c43f=>({'classes':['ck-comment-marker'],'attributes':{'data-comment':Ut(_0x69c43f['markerName'])}})}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x543f34=>'revision-suggestion:'+_0x543f34,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5d051f=>({'name':'suggestion:'+_0x5d051f,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x9377bf=>{const _0x3ed651=_0x9377bf['markerName']['split'](':')[0x1];return'insertion'!=_0x3ed651&&'deletion'!=_0x3ed651?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3ed651]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Lt(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Lt(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x3a3aaa,_0x261c89,_0x46418f)=>{const _0x29c7b5=_0x46418f['mapper']['markerNameToElements'](_0x261c89['markerName']);if(_0x29c7b5){for(const _0x2f7d45 of _0x29c7b5)_0x2f7d45['is']('uiElement')&&(_0x46418f['mapper']['unbindElementFromMarkerName'](_0x2f7d45,_0x261c89['markerName']),_0x46418f['writer']['remove'](_0x2f7d45));}},{'priority':'high'});}_getChangeFromId(_0x15b612){return this['_changeIdToChange']['get'](_0x15b612);}_getViewForChange(_0x3930ba){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Vt(this['editor']['locale'],_0x3930ba,'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),this['_changeView'];}_initInteractions(){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x49fee7,_0xbc9a05,_0x193251,_0x1e0a75)=>{_0x1e0a75&&this['_balloon']['remove'](_0x1e0a75),_0x193251&&(this['_balloon']['add']({'view':_0x193251,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5e536f=this['editor']['editing'],_0x1b5347=this['_getChangeFromId'](_0x193251['changeId']);let _0x31205a;if(_0x1b5347['data']['isOnRoot']){const _0x1a481b=_0x5e536f['view']['getDomRoot'](_0x1b5347['rootName']);_0x31205a=Array['from'](_0x1a481b['getClientRects']());}else{const _0x27660d=this['editor']['model']['markers']['get']('revision:'+_0x193251['changeId']);_0x31205a=Array['from'](_0x5e536f['mapper']['markerNameToElements'](_0x27660d['name']))['map'](_0x4315c7=>_0x5e536f['view']['domConverter']['mapViewToDom'](_0x4315c7))['map'](_0x1f83a5=>Array['from'](_0x1f83a5['getClientRects']()))['flat']();}return this['_activeViewTarget']&&_0x31205a['find'](_0x3019e3=>_0x3019e3['top']-0x3<=this['_activeViewTarget']['y']&&_0x3019e3['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3019e3['left']-0x3<=this['_activeViewTarget']['x']&&_0x3019e3['right']+0x3>=this['_activeViewTarget']['x'])||_0x31205a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x44746f,_0x1c8b32,_0x34436b,_0x2ef5de)=>{this['activeView']=_0x34436b?this['_getViewForChange'](_0x34436b):null,this['editor']['model']['change'](()=>{const _0x5379a9=this['editor']['editing'];_0x2ef5de&&(_0x2ef5de['data']['isOnRoot']?_0x5379a9['view']['change'](_0x3ff623=>{_0x3ff623['removeClass']('ck-revision-history-root--active',_0x5379a9['view']['document']['getRoot'](_0x2ef5de['rootName']));}):_0x5379a9['reconvertMarker']('revision:'+_0x2ef5de['id'])),_0x34436b&&(_0x34436b['data']['isOnRoot']?_0x5379a9['view']['change'](_0xe3c692=>{_0xe3c692['addClass']('ck-revision-history-root--active',_0x5379a9['view']['document']['getRoot'](_0x34436b['rootName']));}):_0x5379a9['reconvertMarker']('revision:'+_0x34436b['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0xed9a9a,_0x2c2deb)=>{if(this['activeChange'])return;const _0x422106=this['_findChangeIdFromDomTarget'](_0x2c2deb['target']),_0x2f757f=this['_changeIdToChange']['get'](_0x422106);_0x2f757f?(this['_activeViewTarget']={'x':_0x2c2deb['domEvent']['x'],'y':_0x2c2deb['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x2f757f)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x1dd6f5,_0x19965c)=>{const _0x173f74=this['_findChangeIdFromDomTarget'](_0x19965c['target']),_0x53b541=this['_changeIdToChange']['get'](_0x173f74);_0x53b541?(this['_activeViewTarget']={'x':_0x19965c['domEvent']['x'],'y':_0x19965c['domEvent']['y']},_0x53b541===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x53b541):(this['_activeViewTarget']=null,this['activeChange']=null);});}_findChangeIdFromDomTarget(_0x338e5a){do{const _0x6e1b2a=_0x338e5a['getAttribute']('data-change-id');if(_0x6e1b2a)return _0x6e1b2a;_0x338e5a=_0x338e5a['parent'];}while(_0x338e5a);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x4a2639=>{for(const _0x42e858 of this['editor']['model']['markers'])_0x4a2639['removeMarker'](_0x42e858);});}};function Ut(_0x5c564a){return _0x5c564a['split'](':')[0x1];}function Lt(_0x222422,_0x9301b4){return(_0x2c29b9,_0x3872e9,_0x3278a2)=>{if(!_0x3278a2['consumable']['test'](_0x3872e9['markerRange'],_0x2c29b9['name']))return;const _0x5307a1=_0x3872e9['markerRange']['getWalker'](),_0x2735a2=_0x3872e9['markerRange']['start'],_0x2ed2b0=_0x222422['model']['schema'];let _0x3c3a8=null,_0x54aac1=null,_0x261e71=!0x1,_0xd0080b=!0x1;for(const _0x5b1594 of _0x5307a1){const _0x47f424=_0x5b1594['item'];_0x261e71=_0x261e71||_0x2ed2b0['isContent'](_0x47f424);const _0x4bfa5=_0x3278a2['mapper']['toViewElement'](_0x47f424);if(_0x4bfa5&&_0x4bfa5['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5b1594['type']&&(_0x2ed2b0['isBlock'](_0x47f424)&&!_0x2ed2b0['isLimit'](_0x47f424)&&(_0x47f424['nextSibling']||_0x2735a2['isAtEnd']?_0x3c3a8&&_0x3c3a8['parent']==_0x47f424||(_0x3c3a8=_0x47f424,_0x32eca4(_0x5b1594['previousPosition']),_0xd0080b=!0x0):_0x54aac1=_0x54aac1||_0x5b1594['previousPosition']));}function _0x32eca4(_0x2f7aab){const _0xeeabbf=_0x3278a2['mapper']['toViewPosition'](_0x2f7aab),_0x5101bb=_0x3278a2['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x9301b4});_0x3278a2['writer']['insert'](_0xeeabbf,_0x5101bb),_0x3278a2['mapper']['bindElementToMarker'](_0x5101bb,_0x3872e9['markerName']);}_0x261e71||_0xd0080b||!_0x54aac1||_0x32eca4(_0x54aac1);};}var Ft=class extends _0x83b002{constructor(_0xe54933){super(_0xe54933);const _0x1d7fc5=_0xe54933['plugins']['get'](Pt);this['affectsData']=!0x1,this['listenTo'](_0x1d7fc5,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d7fc5,'change:isEnabled',()=>this['refresh']());}execute(){const _0x1af481=this['editor'],_0x448253=_0x1af481['plugins']['get'](Pt),_0x9c3834=_0x448253['isReady']?_0x448253['diff']['newRevisionId']:null;_0x1af481['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x9c3834);}['refresh'](){const {isReady:_0x17d24e,isEnabled:_0x3c6a62,repository:_0x23fb15,diff:_0x3a12f4}=this['editor']['plugins']['get'](Pt),_0xb530ed=_0x3a12f4&&_0x23fb15['getLaterVisibleRevision'](_0x3a12f4['newRevisionId']);this['isEnabled']=_0x17d24e&&_0x3c6a62&&Boolean(_0xb530ed);}},$t=class extends _0x83b002{_step;constructor(_0x1c6d12,{direction:_0x2d7cc3}){super(_0x1c6d12);const _0x53336e=_0x1c6d12['plugins']['get'](Pt);this['affectsData']=!0x1,this['_step']='forward'===_0x2d7cc3?0x1:-0x1,this['listenTo'](_0x53336e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x53336e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x53336e,'change:activeChange',()=>this['refresh']());}execute(){const _0x49eaef=this['editor'],_0x3e124c=_0x49eaef['plugins']['get'](Pt),{isNavigationMode:_0x56f6c6,currentChangeNumber:_0x280b90}=_0x3e124c;let _0x8f5f38;if(_0x3e124c['activeChange']=_0x56f6c6?_0x3e124c['diff']['changes']['get'](_0x280b90+this['_step']):_0x3e124c['diff']['changes']['first'],_0x3e124c['activeChange']['data']['isOnRoot'])_0x8f5f38=_0x49eaef['editing']['view']['getDomRoot'](_0x3e124c['activeChange']['rootName']);else{const _0x430ecd=_0x49eaef['model']['markers']['get']('revision:'+_0x3e124c['activeChange']['id']);_0x8f5f38=_0x1f8b1e(_0x49eaef['editing'],_0x430ecd);}_0xe8b9b6({'target':_0x8f5f38,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x445a2e,currentChangeNumber:_0x3cd44e,numberOfChanges:_0x2d7ea9,isReady:_0x330025,isEnabled:_0x18c54d}=this['editor']['plugins']['get'](Pt);this['isEnabled']=!!(_0x18c54d&&_0x330025&&_0x2d7ea9)&&(!_0x445a2e||(0x1===this['_step']?_0x3cd44e<_0x2d7ea9-0x1:_0x3cd44e>0x0));}},Bt=class extends dt{constructor(_0x25aa95){super(_0x25aa95);const _0x41ddee=this['bindTemplate'],_0x22af27=new _0x3e9ea0(_0x25aa95),_0x1be4fd=new _0x3e9ea0(_0x25aa95);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',(_0x15a6b3,_0x28d9b1)=>_0x15a6b3&&_0x28d9b1>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5e5d33,_0xc869a8,_0x5275be,_0x41d63f)=>{if(!_0x5e5d33)return kt(_0x25aa95,'Loading...');if(!_0x5275be)return kt(_0x25aa95,'No\x20changes');const _0x21752b=kt(_0x25aa95,'NUMBER_OF_CHANGES',_0x5275be);return _0x41d63f?kt(_0x25aa95,'X_OF_Y_CHANGES',[_0xc869a8+0x1,_0x5275be]):_0x21752b;}),_0x22af27['set']({'label':kt(_0x25aa95,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x4ec9c5}),_0x1be4fd['set']({'label':kt(_0x25aa95,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x18ab4e}),_0x22af27['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1be4fd['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x22af27['on']('execute',()=>this['fire']('execute','backward')),_0x1be4fd['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',_0x41ddee['if']('_isStatusLabelVisible','ck-hidden',_0x40ed12=>!_0x40ed12)]},'children':[{'text':_0x41ddee['to']('isNavigationMode',_0xf6e2ed=>_0xf6e2ed?kt(_0x25aa95,'EDIT_X_OF_Y_REVISIONS')+':\x20':kt(_0x25aa95,'Total')+':\x20')}]},{'text':_0x41ddee['to']('_statusText')}]},new ct(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x22af27,_0x1be4fd]}]});}};const jt='ck-editor__editable__loading-overlay';var Gt=class extends _0x15eb24{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x44a824=this['editor']['editing']['view'];_0x44a824['change'](_0x274a9e=>{for(const _0x40cdb2 of _0x44a824['document']['roots'])_0x274a9e['addClass'](jt,_0x40cdb2);});}['hide'](){const _0x577102=this['editor']['editing']['view'];_0x577102['change'](_0x19d02e=>{for(const _0x36ef73 of _0x577102['document']['roots'])_0x19d02e['removeClass'](jt,_0x36ef73);});}},Kt=class extends _0x15eb24{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt,Gt];}init(){const _0xbf0a88=this['editor'],_0x2d8589=_0xbf0a88['plugins']['get'](Pt),_0x1da7d9=_0xbf0a88['plugins']['get'](Gt);_0xbf0a88['ui']['componentFactory']['add']('exitToEditing',_0x56f53a=>{const _0x52029c=new _0x3e9ea0(_0x56f53a);return _0x52029c['set']({'label':kt(_0x56f53a,'Back\x20to\x20editing'),'icon':_0xe2d6ce,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x52029c,'execute',()=>{_0xbf0a88['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x52029c;}),_0xbf0a88['ui']['componentFactory']['add']('restoreRevision',_0x56a232=>{const _0x1d63f0=new _0x3e9ea0(_0x56a232);return _0x1d63f0['set']({'label':kt(_0x56a232,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1d63f0['bind']('isEnabled')['to'](_0xbf0a88['commands']['get']('restoreRevision')),this['listenTo'](_0x1d63f0,'execute',()=>_0xbf0a88['execute']('restoreRevision')),_0x1d63f0;}),_0xbf0a88['ui']['componentFactory']['add']('changesNavigation',_0x580abc=>{const _0x55d19c=new Bt(_0x580abc),_0x257276=_0xbf0a88['commands']['get']('showPreviousChange'),_0x12d09f=_0xbf0a88['commands']['get']('showNextChange');return _0x55d19c['bind']('isBackwardNavigationEnabled')['to'](_0x257276,'isEnabled'),_0x55d19c['bind']('isForwardNavigationEnabled')['to'](_0x12d09f,'isEnabled'),_0x55d19c['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2d8589),this['listenTo'](_0x55d19c,'execute',(_0x5417a4,_0xcf0428)=>{_0xbf0a88['execute']('forward'===_0xcf0428?'showNextChange':'showPreviousChange');}),_0x55d19c;}),_0x1da7d9['show'](),_0x2d8589['on']('change:isReady',(_0xd813b6,_0x15f564,_0xc793de)=>{_0xc793de?_0x1da7d9['hide']():_0x1da7d9['show']();});}},qt=class extends it{['_resizeObserver']=null;constructor(_0x49a785,_0x13e90d){super(_0x49a785,_0x13e90d);const _0x390df9=this['bindTemplate'];this['set']({'label':kt(_0x49a785,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=kt(_0x49a785,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x390df9['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x108a54(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}destroy(){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}_updateTooltipText(){const _0x4a276c=this['fieldView']['element'];this['_tooltipString']=_0x4a276c['scrollWidth']>_0x4a276c['clientWidth']&&_0x4a276c['value']||'';}},Yt=class extends dt{constructor(_0x24562a,_0x52fbc5,_0x55cd18){super(_0x24562a);const _0x447a2c=new _0x57a8a0();_0x447a2c['set']({'content':_0x25562b,'viewBox':'0\x200\x2011\x2010'});const _0x26af5b=['ck','ck-revision-history-sidebar__revision-author'];_0x55cd18&&_0x26af5b['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1a13f9=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':kt(_0x24562a,_0x55cd18?'Revision\x20creator':'Revision\x20author')},'children':[_0x447a2c,_0x52fbc5['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x26af5b},'children':_0x1a13f9});}};function Jt(_0x2d1584,_0x1f9d12){const _0x5c1734=_0x2d1584['bindTemplate'],_0x37541d=_0x2d1584['locale'],_0x1eac41=vt(_0x37541d);_0x1eac41['panelPosition']='sw';const _0x2cdca6=function(_0x3b3c55,_0x5d1ee3){const _0x4b5b8c=function(_0x5cb40e,_0x363d2b){const _0x405b01=_0x5cb40e['locale'],_0x1fe11d={'Compare\x20against\x20selected':kt(_0x405b01,'Compare\x20against\x20selected'),'Name\x20this\x20revision':kt(_0x405b01,'Name\x20this\x20revision'),'Restore\x20this\x20revision':kt(_0x405b01,'Restore\x20this\x20revision')};return _0x363d2b['map'](_0x2859f5=>{const _0x435cc0=_0x1fe11d[_0x2859f5['name']];return _0x435cc0&&_0x435cc0!==_0x2859f5['name']&&(_0x2859f5['name']=_0x435cc0),_0x2859f5;});}(_0x3b3c55,_0x5d1ee3),_0x4d0876=new _0x393ab3();for(const _0x5d7ff2 of _0x4b5b8c){const _0x5438d6={'type':'button','model':new ut({'label':_0x5d7ff2['name'],'class':_0x5d7ff2['class'],'withText':!0x0,'role':'menuitem','_action':_0x5d7ff2['action']})};_0x5438d6['model']['bind']('isEnabled')['to'](_0x3b3c55,'isActionsDropdownOpen',_0x16a7e4=>'function'!=typeof _0x5d7ff2['isEnabled']||(!_0x16a7e4||_0x5d7ff2['isEnabled'](_0x3b3c55))),_0x4d0876['add'](_0x5438d6);}return _0x4d0876;}(_0x2d1584,_0x1f9d12);return _0x2d1584['bind']('isActionsDropdownOpen')['to'](_0x1eac41,'isOpen'),_0x1eac41['buttonView']['set']({'label':kt(_0x37541d,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x52e55d}),_0x1eac41['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5c1734['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5c1734['to'](_0x24abf5=>_0x24abf5['stopPropagation']())}}),_0x1eac41['on']('execute',_0x1e76c6=>{_0x2d1584['isReady']&&'function'==typeof _0x1e76c6['source']['_action']&&_0x1e76c6['source']['_action'](_0x2d1584);}),ft(_0x1eac41,_0x2cdca6,{'role':'menu'}),_0x1eac41['listenTo'](_0x2d1584,'change:isActionsDropdownOpen',(_0x31a85d,_0x370988,_0x285d54)=>{if(_0x285d54)for(const _0x4cc39a of _0x1eac41['listView']['items']){const _0x1e853b=_0x4cc39a['children']['first'],_0x45b563=_0x1f9d12['find'](_0x45b356=>_0x45b356['action']===_0x1e853b['_action'])['isVisible'];_0x4cc39a['isVisible']=void 0x0===_0x45b563||_0x45b563(_0x2d1584);}}),_0x1eac41;}const Wt=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x2c1eae(dt);var Xt=class extends Wt{['id'];['revisionNameView'];revisionActionsView;['_revision'];_requireRevisionName;['_aiPillView'];constructor(_0xb817bc,_0x1d4c3c,_0x5d0382,_0x398d69,_0x557de1=!0x1){super(_0xb817bc);const _0x34c558=this['bindTemplate'],_0x1d8c2f=function(_0x3908bf,_0x238078){const _0x2ca6b5=Array['from'](_0x238078['authors'])['filter'](_0x236c90=>_0x236c90!=_0x238078['creator']);return _0x238078['creator']&&_0x2ca6b5['unshift'](_0x238078['creator']),_0x2ca6b5['map'](_0x37ebe8=>new Yt(_0x3908bf,_0x37ebe8,_0x37ebe8==_0x238078['creator']));}(_0xb817bc,_0x1d4c3c);this['id']=_0x1d4c3c['id'],this['_revision']=_0x1d4c3c,this['_requireRevisionName']=_0x398d69,this['bind']('_isAiGenerated')['to'](_0x1d4c3c,'attributes',_0x2e6679=>!(!_0x2e6679||!_0x2e6679['@ai'])),this['bind']('name','createdAt')['to'](_0x1d4c3c),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x26b915=>{return _0x515d0a=_0xb817bc['uiLanguage'],(_0x5a2490=_0x26b915)['toLocaleDateString'](_0x515d0a,{'month':'long','day':'numeric'})+',\x20'+_0x5a2490['toLocaleTimeString'](_0x515d0a,{'hour':'numeric','minute':'numeric'});var _0x515d0a,_0x5a2490;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new qt(_0xb817bc,gt),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x13c1c2=>_0x13c1c2||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x218d9e,_0x468411)=>_0x218d9e&&_0x468411),this['revisionActionsView']=_0x5d0382&&_0x5d0382['length']?Jt(this,_0x5d0382):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['_aiPillView']=_0x557de1?this['_createAiPillView'](_0xb817bc):null,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x34c558['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x34c558['if']('isEnabled','ck-disabled',_0x1b36c9=>!_0x1b36c9),_0x34c558['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x34c558['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x34c558['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':_0x34c558['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':_0x1d8c2f}]},..._0x557de1?[{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision-ai-pill-row',_0x34c558['if']('_isAiGenerated','ck-hidden',_0x225fd5=>!_0x225fd5)]},'children':[this['_aiPillView']]}]:[],this['revisionActionsView']],'on':{'click':_0x34c558['to'](_0x51e899=>{_0x51e899['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}_createAiPillView(_0x35edb4){const _0x255566=new _0x1892fd(_0x35edb4);return _0x255566['set']({'icon':_0x525b57,'label':kt(_0x35edb4,'REVISION_AI_SOURCE_PILL_LABEL'),'tooltip':kt(_0x35edb4,'AI_SOURCE_REVISION_TOOLTIP'),'tooltipPosition':'s','size':'small','class':'ck-pill_ai'}),_0x255566['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision-ai-pill']}}),_0x255566;}['render'](){super['render']();const _0xd01a32=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0xd01a32,'change',()=>{this['_requireRevisionName']&&!_0xd01a32['value']||this['fire']('setName',{'id':this['id'],'name':_0xd01a32['value']}),_0xd01a32['value']||(_0xd01a32['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(_0x35bdaf,_0x2fef60){const _0x23a884=wt['fromJSDate'](_0x35bdaf)['setLocale'](_0x2fef60),_0x4c66f2=wt['local'](),_0x15f4f7=_0x4c66f2['minus']({'days':0x1})['startOf']('day');let _0x4c24cc,_0x2bac10;return _0x23a884['hasSame'](_0x4c66f2,'day')?(_0x4c24cc=_0x23a884['startOf']('day')['toJSDate'](),_0x2bac10=_0x23a884['toRelativeCalendar']()):_0x23a884['hasSame'](_0x15f4f7,'day')?(_0x4c24cc=_0x15f4f7['toJSDate'](),_0x2bac10=_0x23a884['toRelativeCalendar']()):_0x23a884['hasSame'](_0x4c66f2,'week')?(_0x4c24cc=_0x23a884['startOf']('week')['toJSDate'](),_0x2bac10=_0x23a884['weekdayLong']||''):_0x23a884['hasSame'](_0x4c66f2,'year')?(_0x4c24cc=_0x23a884['startOf']('month')['toJSDate'](),_0x2bac10=_0x23a884['monthLong']||''):(_0x4c24cc=_0x23a884['startOf']('year')['toJSDate'](),_0x2bac10=String(_0x23a884['year'])),{'startDate':_0x4c24cc,'localizedPeriodName':_0x2bac10};}var zt=class extends dt{startDate;['revisionViews'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x1c34cb,_0x29c210,_0x474111,_0x353461,_0x126141){super(_0x1c34cb);const _0xe8caff=Qt(_0x29c210,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x29c210,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x474111,this['_requireRevisionName']=_0x353461,this['_showAISource']=_0x126141,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':_0xe8caff}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x464937){const _0xcafa46=new Xt(this['locale'],_0x464937,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']);this['revisionViews']['add'](_0xcafa46);}['removeRevision'](_0x3f93d0){const _0x55a822=this['revisionViews']['find'](_0x1f2eae=>_0x1f2eae['id']===_0x3f93d0['id']);this['revisionViews']['remove'](_0x55a822);}},Zt=class extends dt{constructor(_0x3995ca){super(_0x3995ca);const _0x271693=new _0x57a8a0();_0x271693['content']=_0x74b43d,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x271693,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[kt(_0x3995ca,'Revision\x20history')]}]});}},ti=class extends dt{timePeriodViews;['_revisions'];_revisionActions;_requireRevisionName;['_showAISource'];constructor(_0x2e4748,_0xe9212d,_0x452db3,_0xd4bcb4,_0x2ce1da){super(_0x2e4748);const _0x4af38d=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0xe9212d,this['_revisionActions']=_0x452db3,this['_requireRevisionName']=_0xd4bcb4,this['_showAISource']=_0x2ce1da,this['on']('select',(_0x489b2e,_0x56b245)=>{this['fire']('revisionSelected',_0x56b245);}),this['on']('setName',(_0x291196,_0x1b0ea2)=>{this['fire']('revisionSetName',_0x1b0ea2);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Zt(_0x2e4748),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x4af38d['if']('isEnabled','ck-disabled',_0x1b555a=>!_0x1b555a)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x387070 of this['_revisions'])this['_addRevision'](_0x387070);this['_revisions']['on']('add',(_0x112558,_0x5added)=>{this['_addRevision'](_0x5added);}),this['_revisions']['on']('remove',(_0x4383ac,_0x26ac5d)=>{this['_removeRevision'](_0x26ac5d);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x29d1a2=>_0x29d1a2['revisionViews']['map'](_0x451184=>_0x451184))['flat']();}selectRevision(_0x4d74e2){for(const _0x3f4ec1 of this['revisionViews'])_0x4d74e2&&_0x4d74e2['id']===_0x3f4ec1['id']?_0x3f4ec1['select']():_0x3f4ec1['deselect']();}highlightRevisions(_0x2fed16){for(const _0x5d6f92 of this['revisionViews'])_0x2fed16['some'](({id:_0x13cd5d})=>_0x13cd5d===_0x5d6f92['id'])?_0x5d6f92['highlight']():_0x5d6f92['unhighlight']();}['_addRevision'](_0x2baaba){const _0xc0246a=Qt(_0x2baaba['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2ecade=this['_getTimePeriodViewByStartDate'](_0xc0246a);_0x2ecade||(_0x2ecade=new zt(this['locale'],_0xc0246a,this['_revisionActions'],this['_requireRevisionName'],this['_showAISource']),this['timePeriodViews']['add'](_0x2ecade)),_0x2ecade['addRevision'](_0x2baaba);}['_removeRevision'](_0xad3cc1){const _0xea26b4=Qt(_0xad3cc1['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xea26b4)['removeRevision'](_0xad3cc1);}_getTimePeriodViewByStartDate(_0xbb869a){return this['timePeriodViews']['find'](_0x1d71a8=>_0x1d71a8['startDate']['getTime']()===_0xbb869a['getTime']());}},ii=class RevisionsSidebar extends _0x15eb24{['_revisionViewer'];_revisionsRepository;['_sidebarView'];static defaultRevisionActions=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static availableRevisionActions=/* #__PURE__ -- @preserve */
|
|
29
|
-
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(
|
|
30
|
-
_0x4c30f1(_0x3a29f8);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x16c097,_0x48771c){super(_0x48771c),this['sourceElement']=_0x16c097,this['model']['document']['createRoot']();const _0x228d92=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x228d92);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x48ef14,_0x363dc7){const _0x19d298=new this(_0x48ef14,_0x363dc7);return await _0x19d298['initPlugins'](),await _0x19d298['ui']['init'](_0x48ef14),await _0x19d298['data']['init'](_0x19d298['config']['get']('initialData')||''),_0x19d298['fire']('ready'),_0x19d298;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x3ccb16{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f842d){super(_0x4f842d),this['result']='end',_0x4f842d['editing']['view']['_overlayModeHint']='auto',_0x4f842d['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x3ccb16{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0xcb1678){if(super(_0xcb1678),!this['editor']['config']['get']('revisionHistory'))throw new _0x24e679('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x36050d=>this['_showRevisionViewer']({..._0x36050d,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x34ccca=>this['_closeRevisionViewer'](_0x34ccca)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x3852dd=>this['_restoreRevision'](_0x3852dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0x501aa4){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x501aa4;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0xeb7e72){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xeb7e72);}getRevision(_0x51e869){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x51e869);}getRevisions(_0x5a36a6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5a36a6||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x11e8d6=this['editor'],_0x50efee=_0x1d9224(_0x11e8d6,ai),_0x1affb0=_0x11e8d6['plugins']['get']('RevisionTracker'),_0x208337=_0x11e8d6['plugins']['get'](_0x312567)['users'];return _0x50efee['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x50efee['lazyRoots'],(_0x50efee['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x3ccb16{static get requires(){return[Pt,_0x312567];}init(){const _0x7c2282=this['editor']['plugins']['get'](_0x312567);for(const _0x270442 of _0x208337)_0x270442['isAnonymous']||_0x7c2282['getUser'](_0x270442['id'])||_0x7c2282['addUser'](_0x270442);const _0x5caa6d=_0x1affb0['repository']['getRevisions']();let _0x3d6209=null;const _0x26e74f=this['editor']['plugins']['get']('RevisionViewer');if(_0x26e74f['adapter']=_0x1affb0['adapter'],_0x26e74f['bind']('isEnabled')['to'](_0x1affb0),_0x11e8d6['plugins']['has']('CommentsRepository')){const _0x139c31=_0x11e8d6['plugins']['get']('CommentsRepository');_0x26e74f['_getVisibleCommentThreadIds']=()=>new Set(_0x139c31['getCommentThreads']()['filter'](_0x8afde2=>!_0x8afde2['isResolved'])['map'](_0x1fd5aa=>_0x1fd5aa['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x11e8d6,'isReadOnly',_0x93d2de=>!_0x93d2de);for(const _0x1c6577 of _0x5caa6d){const _0x60e1df=null===_0x1c6577['creator'];if(_0x60e1df&&_0x1c6577['toVersion']===_0x1c6577['fromVersion'])continue;const _0x5c0057=_0x1c6577['toJSON']();_0x26e74f['addRevisionData'](_0x5c0057,(_0x5c15a2,_0x4d65fd,_0x3fff0a)=>{if(_0x60e1df){if(_0x3d6209)_0x3d6209['_update'](_0x5c15a2,_0x4d65fd);else{if(!_0x4d65fd){const _0x1ce953=_0x3fff0a['toJSON']();_0x1ce953['id']=_0x5289a7(),_0x1affb0['saveRevision'](_0x1ce953,_0x3fff0a['toVersion'])['then'](_0x16fa81=>{_0x3d6209=_0x16fa81;});}}}else _0x1c6577['_update'](_0x5c15a2,_0x4d65fd);});}}},ii),_0x50efee);}['_enhanceShowRevisionViewerCallback'](){const _0x3420a8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x4bec2a=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x4bec2a['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x26da66=this['editor']['plugins']['get']('Dialog');_0x26da66['isOpen']&&_0x26da66['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0xcdfe39=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3e7208 of _0xcdfe39)_0x3e7208['class']=_0x3e7208['class']?_0x3e7208['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x29f3b9=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x29f3b9&&_0x29f3b9['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x3301a5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x3301a5&&_0x3301a5['setAttribute']('tabindex','-1');}}const _0x195849=this['_getRevisionViewerEditorConfig']();return _0x3420a8(_0x195849)['then'](_0x1015db=>(this['_viewerEditor']=_0x1015db,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'),_0x1015db))['catch'](_0x385bc7=>(console['error'](_0x385bc7),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5256fa=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 _0x359149=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x526aa1 of _0x359149)_0x526aa1['class']='ck-tab-panel_disabled'===_0x526aa1['class']?'':_0x526aa1['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x34ff4d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34ff4d&&_0x34ff4d['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1a0a48=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1a0a48&&_0x1a0a48['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5256fa(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4a1b76=this['editor']['plugins']['get']('Annotations');_0x4a1b76['refreshVisibility'](),_0x4a1b76['refreshPositioning']();}});});}['_showRevisionViewer'](_0x3a03e8){const _0x3b8389=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x3426fb=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x19da3e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x19da3e,_0x3a03e8)['then'](_0x204ef3=>(_0x3426fb['style']['display']='block',_0x3b8389['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x204ef3));}['_closeRevisionViewer'](_0x571df8){const _0x54664b=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x54664b['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x571df8['destroy']();}async _restoreRevision(_0x75776f){const _0x6470d7=this['editor'],_0x38d488=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2a448c=_0x6470d7['plugins']['get']('RevisionTracker'),_0x534141=_0x6470d7['plugins']['get']('RevisionHistoryUtils'),_0x4c3549=_0x38d488['repository']['getRevision'](_0x75776f);let _0x283d44,_0x30e38d,_0x2bd41e;try{await _0x534141['loadRevisionData'](_0x4c3549,this['adapter']),_0x283d44=_0x534141['getRevisionDocumentData'](_0x4c3549),_0x30e38d=_0x534141['getRevisionRootsAttributes'](_0x4c3549);}catch(_0x298811){return void console['error'](_0x298811);}_0x6470d7['model']['change'](_0x2b4b9d=>{for(const _0x48a31e of Array['from'](_0x6470d7['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2b4b9d['removeMarker'](_0x48a31e);}),_0x38d488['isReady']=!0x1,_0x6470d7['model']['enqueueChange'](_0x49cf49=>{_0x49cf49['setSelection'](null),_0x49cf49['removeSelectionAttribute'](_0x6470d7['model']['document']['selection']['getAttributeKeys']());const _0x169d64=Object['keys'](_0x283d44);for(const _0x4991b1 of _0x6470d7['model']['document']['roots'])'$graveyard'!=_0x4991b1['rootName']&&_0x4991b1['isAttached']()&&!_0x169d64['includes'](_0x4991b1['rootName'])&&_0x49cf49['detachRoot'](_0x4991b1);for(const _0x46aad4 of _0x169d64){let _0x148e2f=_0x6470d7['model']['document']['getRoot'](_0x46aad4);if(!_0x148e2f||!_0x148e2f['isAttached']()){const _0x408359=_0x4c3549['diffData']?.[_0x46aad4]?.['rootElementName']||'$root';_0x148e2f=_0x49cf49['addRoot'](_0x46aad4,_0x408359);}const _0x3ec03b=_0x30e38d[_0x46aad4],_0x2380ac=Object['keys'](_0x3ec03b),_0x404a51=_0x283d44[_0x46aad4];for(const _0x1106aa of _0x148e2f['getAttributeKeys']())_0x2380ac['includes'](_0x1106aa)||_0x49cf49['removeAttribute'](_0x1106aa,_0x148e2f);for(const _0x27abf8 of _0x2380ac)_0x49cf49['setAttribute'](_0x27abf8,_0x30e38d[_0x46aad4][_0x27abf8],_0x148e2f);_0x49cf49['remove'](_0x49cf49['createRangeIn'](_0x148e2f)),_0x49cf49['insert'](_0x6470d7['data']['parse'](_0x404a51,_0x148e2f),_0x148e2f,0x0);}});const _0x58611a=kt(_0x6470d7['locale'],'Restored');if(_0x4c3549['name'])_0x2bd41e=-0x1==_0x4c3549['name']['indexOf'](_0x58611a)?_0x58611a+':\x20'+_0x4c3549['name']:_0x4c3549['name'];else _0x2bd41e=_0x58611a+':\x20'+(_0x4c3549['createdAt']['toLocaleDateString'](_0x6470d7['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4c3549['createdAt']['toLocaleTimeString'](_0x6470d7['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2a448c['saveRevision']({'name':_0x2bd41e}),_0x38d488['isReady']=!0x0,_0x6470d7['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|
|
29
|
+
ei();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Pt];}constructor(_0x1c30bd){super(_0x1c30bd),this['_revisionViewer']=_0x1c30bd['plugins']['get'](Pt),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}init(){const _0x3703f1=this['_revisionsRepository']['_revisions'],_0x5e26ab=this['_createRevisionActions'](),_0x3905d5=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ti(this['editor']['locale'],_0x3703f1,_0x5e26ab,this['editor']['config']['get']('revisionHistory.requireRevisionName'),'pill'===this['editor']['config']['get']('revisionHistory.showAISource')),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',(_0x4ddc13,_0x55ff60)=>{_0x55ff60['revisionViews']['on']('add',(_0x4cdb29,_0x6f0e9a)=>{_0x6f0e9a['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)),_0x3905d5['appendChild'](this['_sidebarView']['element']);}destroy(){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}_handleEditorDataReady(){const _0x299a1f=this['_revisionsRepository']['getRevision'](0x0);if(_0x299a1f){const _0x2c1e05=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x299a1f['id']);this['_revisionViewer']['compare'](_0x299a1f,_0x2c1e05);}}_handleRevisionSelected(_0x203a90,_0x396328){const _0x22dfa3=this['_revisionsRepository']['getRevision'](_0x396328['id']),_0x338e67=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x22dfa3['id']);this['_revisionViewer']['compare'](_0x22dfa3,_0x338e67);}_handleRevisionSetName(_0x35cd32,_0x1369dd){this['_revisionsRepository']['getRevision'](_0x1369dd['id'])['setName'](_0x1369dd['name']);}['_handleDiffChange'](_0x39b22c,_0x3cf1a5,_0x266332){const _0x2ec04b=this['_revisionsRepository']['getRevisionsInDiff'](_0x266332);_0x2ec04b['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2ec04b),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2ec04b[0x0]));}_createRevisionActions(){const _0x2f87d2=this['editor'],_0x1c372e=RevisionsSidebar['availableRevisionActions'],_0x4af86f=_0x2f87d2['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x4af86f['length'])return _0x4af86f['map'](_0x55b069=>{const _0x458461='string'==typeof _0x55b069?Object['assign']({},_0x1c372e[_0x55b069]):_0x55b069;return _0x458461['action']=_0x458461['action']['bind'](this,_0x2f87d2),_0x458461['isVisible']&&(_0x458461['isVisible']=_0x458461['isVisible']['bind'](this,_0x2f87d2)),_0x458461;});}};function ei(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1732a1},_0x35f9a0)=>{const _0x2e34f9=_0x1732a1['get'](Pt),_0x3b60b2=_0x2e34f9['repository'];let _0x43c394=_0x2e34f9['diff']['newRevisionId'],_0x3fd668=_0x35f9a0['id'];_0x3b60b2['getIndex'](_0x43c394)>_0x3b60b2['getIndex'](_0x3fd668)&&([_0x43c394,_0x3fd668]=[_0x3fd668,_0x43c394]),_0x2e34f9['compare'](_0x43c394,_0x3fd668);},'isVisible':({plugins:_0x4cdc3a},_0x3e30fe)=>{const _0x3d79f2=_0x4cdc3a['get'](Pt);return!(_0x3d79f2['repository']['getRevisionsInDiff'](_0x3d79f2['diff'])['length']>0x2)&&!_0x3e30fe['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x1e22d2,{id:_0x2ab7b9})=>{_0x1e22d2['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2ab7b9);},'isVisible':({plugins:_0x525ff9},_0x3cb8ad)=>!!_0x525ff9['get'](Pt)['repository']['getLaterVisibleRevision'](_0x3cb8ad['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x559690},{id:_0x8ab4fc,revisionNameView:_0xc012d6})=>{const _0x16b45e=_0x559690['get'](Pt),_0x80e016=_0x16b45e['repository']['getEarlierVisibleRevision'](_0x8ab4fc);_0x16b45e['compare'](_0x8ab4fc,_0x80e016),_0xc012d6['focus'](),_0xc012d6['fieldView']['select']();}}};}var si=class extends _0x145983{['_view'];_toolbarConfig;_elementReplacer;get['view'](){return this['_view'];}constructor(_0x268ec8,_0x2faf99){super(_0x268ec8),this['_view']=_0x2faf99,this['_toolbarConfig']=mt(_0x268ec8['config']['get']('toolbar')),this['_elementReplacer']=new _0x493518();}get element(){return this['view']['element'];}init(_0x3b16c8){const _0x171e49=this['editor'],_0x4b641e=this['view'],_0x15d357=_0x171e49['editing']['view'],_0x476b3d=_0x4b641e['editable'];_0x476b3d['name']=_0x15d357['document']['getRoot']()['rootName'],_0x476b3d['isMainFrameEditingRoot']=!0x0,_0x4b641e['render']();const _0x193f77=_0x476b3d['element'];this['setEditableElement'](_0x476b3d['name'],_0x193f77),_0x4b641e['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x15d357['attachDomRoot'](_0x193f77),this['_elementReplacer']['replace'](_0x3b16c8,this['element']),this['_initToolbar'](),this['fire']('ready');}destroy(){super['destroy']();const _0xc44410=this['view'],_0x198669=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x198669['detachDomRoot'](_0xc44410['editable']['name']),_0xc44410['destroy']();}_initToolbar(){const _0x2f195b=this['view'];_0x2f195b['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x2f195b['stickyPanel']['limiterElement']=_0x2f195b['element'],_0x2f195b['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x356e6a})=>_0x356e6a),_0x2f195b['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x2f195b['toolbar']);}},ni=class extends _0x26cd40{_editable;stickyPanel;toolbar;get editable(){return this['_editable'];}constructor(_0xe9c7b8,_0x536f71,_0x13f487={}){super(_0xe9c7b8),this['stickyPanel']=new ht(_0xe9c7b8),this['toolbar']=new lt(_0xe9c7b8,{'shouldGroupWhenFull':_0x13f487['shouldToolbarGroupWhenFull']}),this['_editable']=new tt(_0xe9c7b8,_0x536f71);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}};const oi=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x5c9264(_0x400523);var ri=class extends oi{['_ui'];get['ui'](){return this['_ui'];}constructor(_0x12e222,_0x30433d){super(_0x30433d),this['sourceElement']=_0x12e222,this['model']['document']['createRoot']();const _0x1bfefb=new ni(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new si(this,_0x1bfefb);}destroy(){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async create(_0x2e035e,_0x87a3e9){const _0x48c8e9=new this(_0x2e035e,_0x87a3e9);return await _0x48c8e9['initPlugins'](),await _0x48c8e9['ui']['init'](_0x2e035e),await _0x48c8e9['data']['init'](_0x48c8e9['config']['get']('initialData')||''),_0x48c8e9['fire']('ready'),_0x48c8e9;}};const ai=['RevisionHistoryUI','RestrictedEditingMode'];var hi=class extends _0x15eb24{result;static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d2658){super(_0x4d2658),this['result']='end',_0x4d2658['editing']['view']['_overlayModeHint']='auto',_0x4d2658['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}},ci=class extends _0x15eb24{_viewerEditor;static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[At,Dt];}constructor(_0x23b6bb){if(super(_0x23b6bb),!this['editor']['config']['get']('revisionHistory'))throw new _0x8716b1('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2f60e4=>this['_showRevisionViewer']({..._0x2f60e4,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x3ed2b2=>this['_closeRevisionViewer'](_0x3ed2b2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x203fce=>this['_restoreRevision'](_0x203fce)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['editor']['config']['define']('revisionHistory.showCommentHighlights',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set adapter(_0xa6f792){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0xa6f792;}get adapter(){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}addRevisionData(_0x42df3d){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x42df3d);}getRevision(_0x9260f1){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x9260f1);}getRevisions(_0x54418c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x54418c||{'toJSON':!0x1});}_getRevisionViewerEditorConfig(){const _0x461018=this['editor'],_0x418cf2=_0xed521e(_0x461018,ai),_0x2de090=_0x461018['plugins']['get']('RevisionTracker'),_0x4e1f6e=_0x461018['plugins']['get'](_0x4fd2f9)['users'];return _0x418cf2['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x418cf2['lazyRoots'],(_0x418cf2['plugins']['push'](hi,Pt,Kt,class RevisionViewerInit extends _0x15eb24{static get requires(){return[Pt,_0x4fd2f9];}init(){const _0x3ec4ea=this['editor']['plugins']['get'](_0x4fd2f9);for(const _0x23ff67 of _0x4e1f6e)_0x23ff67['isAnonymous']||_0x3ec4ea['getUser'](_0x23ff67['id'])||_0x3ec4ea['addUser'](_0x23ff67);const _0x513a38=_0x2de090['repository']['getRevisions']();let _0x3d1238=null;const _0x37beab=this['editor']['plugins']['get']('RevisionViewer');if(_0x37beab['adapter']=_0x2de090['adapter'],_0x37beab['bind']('isEnabled')['to'](_0x2de090),_0x461018['plugins']['has']('CommentsRepository')){const _0x56083f=_0x461018['plugins']['get']('CommentsRepository');_0x37beab['_getVisibleCommentThreadIds']=()=>new Set(_0x56083f['getCommentThreads']()['filter'](_0x37e9f8=>!_0x37e9f8['isResolved'])['map'](_0x4241aa=>_0x4241aa['id']));}this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x461018,'isReadOnly',_0x189e34=>!_0x189e34);for(const _0x53787c of _0x513a38){const _0x11ebdf=null===_0x53787c['creator'];if(_0x11ebdf&&_0x53787c['toVersion']===_0x53787c['fromVersion'])continue;const _0x40090e=_0x53787c['toJSON']();_0x37beab['addRevisionData'](_0x40090e,(_0x583cd1,_0x5eec5c,_0x18d21b)=>{if(_0x11ebdf){if(_0x3d1238)_0x3d1238['_update'](_0x583cd1,_0x5eec5c);else{if(!_0x5eec5c){const _0x4bfbd2=_0x18d21b['toJSON']();_0x4bfbd2['id']=_0x1502a4(),_0x2de090['saveRevision'](_0x4bfbd2,_0x18d21b['toVersion'])['then'](_0x3ad331=>{_0x3d1238=_0x3ad331;});}}}else _0x53787c['_update'](_0x583cd1,_0x5eec5c);});}}},ii),_0x418cf2);}['_enhanceShowRevisionViewerCallback'](){const _0x3f30b6=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x35fe35=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')?await this['editor']['plugins']['get']('Autosave')['save']():await _0x35fe35['update'](),this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3fc486=this['editor']['plugins']['get']('Dialog');_0x3fc486['isOpen']&&_0x3fc486['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x10d6a5=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x24beb1 of _0x10d6a5)_0x24beb1['class']=_0x24beb1['class']?_0x24beb1['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x3d0e42=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x3d0e42&&_0x3d0e42['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5bae0b=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5bae0b&&_0x5bae0b['setAttribute']('tabindex','-1');}}const _0x37b71a=this['_getRevisionViewerEditorConfig']();return _0x3f30b6(_0x37b71a)['then'](_0xf161b1=>(this['_viewerEditor']=_0xf161b1,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'),_0xf161b1))['catch'](_0x490f53=>(console['error'](_0x490f53),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x8fa609=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 _0x501180=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x215afc of _0x501180)_0x215afc['class']='ck-tab-panel_disabled'===_0x215afc['class']?'':_0x215afc['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0xfac890=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xfac890&&_0xfac890['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x25fd46=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x25fd46&&_0x25fd46['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x8fa609(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x47761b=this['editor']['plugins']['get']('Annotations');_0x47761b['refreshVisibility'](),_0x47761b['refreshPositioning']();}});});}['_showRevisionViewer'](_0x59561f){const _0x5103e2=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2b07e7=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2822ba=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return ri['create'](_0x2822ba,_0x59561f)['then'](_0xa970d4=>(_0x2b07e7['style']['display']='block',_0x5103e2['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0xa970d4));}['_closeRevisionViewer'](_0x1a21d6){const _0x134868=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x134868['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x1a21d6['destroy']();}async _restoreRevision(_0x1796a6){const _0x484a77=this['editor'],_0xa25360=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1ccde3=_0x484a77['plugins']['get']('RevisionTracker'),_0x9df9ce=_0x484a77['plugins']['get']('RevisionHistoryUtils'),_0x41c559=_0xa25360['repository']['getRevision'](_0x1796a6);let _0x437b0d,_0x38ec57,_0x5004ee;try{await _0x9df9ce['loadRevisionData'](_0x41c559,this['adapter']),_0x437b0d=_0x9df9ce['getRevisionDocumentData'](_0x41c559),_0x38ec57=_0x9df9ce['getRevisionRootsAttributes'](_0x41c559);}catch(_0x8f8434){return void console['error'](_0x8f8434);}_0x484a77['model']['change'](_0x308ec8=>{for(const _0x2f4b55 of Array['from'](_0x484a77['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x308ec8['removeMarker'](_0x2f4b55);}),_0xa25360['isReady']=!0x1,_0x484a77['model']['enqueueChange'](_0x97ccc1=>{_0x97ccc1['setSelection'](null),_0x97ccc1['removeSelectionAttribute'](_0x484a77['model']['document']['selection']['getAttributeKeys']());const _0x5b2684=Object['keys'](_0x437b0d);for(const _0x1000c3 of _0x484a77['model']['document']['roots'])'$graveyard'!=_0x1000c3['rootName']&&_0x1000c3['isAttached']()&&!_0x5b2684['includes'](_0x1000c3['rootName'])&&_0x97ccc1['detachRoot'](_0x1000c3);for(const _0x312cd0 of _0x5b2684){let _0x39bd02=_0x484a77['model']['document']['getRoot'](_0x312cd0);if(!_0x39bd02||!_0x39bd02['isAttached']()){const _0x4d31ce=_0x41c559['diffData']?.[_0x312cd0]?.['rootElementName']||'$root';_0x39bd02=_0x97ccc1['addRoot'](_0x312cd0,_0x4d31ce);}const _0x4beee6=_0x38ec57[_0x312cd0],_0x4ccc48=Object['keys'](_0x4beee6),_0x296c3d=_0x437b0d[_0x312cd0];for(const _0x2e382a of _0x39bd02['getAttributeKeys']())_0x4ccc48['includes'](_0x2e382a)||_0x97ccc1['removeAttribute'](_0x2e382a,_0x39bd02);for(const _0x1755c4 of _0x4ccc48)_0x97ccc1['setAttribute'](_0x1755c4,_0x38ec57[_0x312cd0][_0x1755c4],_0x39bd02);_0x97ccc1['remove'](_0x97ccc1['createRangeIn'](_0x39bd02)),_0x97ccc1['insert'](_0x484a77['data']['parse'](_0x296c3d,_0x39bd02),_0x39bd02,0x0);}});const _0x36a5e8=kt(_0x484a77['locale'],'Restored');if(_0x41c559['name'])_0x5004ee=-0x1==_0x41c559['name']['indexOf'](_0x36a5e8)?_0x36a5e8+':\x20'+_0x41c559['name']:_0x41c559['name'];else _0x5004ee=_0x36a5e8+':\x20'+(_0x41c559['createdAt']['toLocaleDateString'](_0x484a77['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x41c559['createdAt']['toLocaleTimeString'](_0x484a77['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1ccde3['saveRevision']({'name':_0x5004ee}),_0xa25360['isReady']=!0x0,_0x484a77['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}};export{Ft as RestoreRevisionCommand,yt as Revision,ci as RevisionHistory,Dt as RevisionHistoryUI,Rt as RevisionHistoryUtils,At as RevisionTracker,Pt as RevisionViewer,ri as RevisionViewerEditor,hi as RevisionViewerIntegration,Gt as RevisionViewerLoadingOverlay,Kt as RevisionViewerUI,bt as RevisionsRepository,ii as RevisionsSidebar,$t as ShowChangeCommand};
|