@ckeditor/ckeditor5-revision-history
Version:
Document revision history feature for CKEditor 5.
23 lines • 8.53 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x3997e6=_0x2f65;(function(_0x45964e,_0x302f65){const _0x9057ce=_0x2f65,_0x170ef7=_0x45964e();while(!![]){try{const _0x247478=-parseInt(_0x9057ce(0xe0))/0x1*(-parseInt(_0x9057ce(0x106))/0x2)+-parseInt(_0x9057ce(0xf1))/0x3+parseInt(_0x9057ce(0x105))/0x4*(parseInt(_0x9057ce(0xef))/0x5)+parseInt(_0x9057ce(0xcf))/0x6*(-parseInt(_0x9057ce(0xfd))/0x7)+-parseInt(_0x9057ce(0xea))/0x8*(-parseInt(_0x9057ce(0xd9))/0x9)+-parseInt(_0x9057ce(0xf4))/0xa*(-parseInt(_0x9057ce(0xbe))/0xb)+-parseInt(_0x9057ce(0xf7))/0xc*(-parseInt(_0x9057ce(0xce))/0xd);if(_0x247478===_0x302f65)break;else _0x170ef7['push'](_0x170ef7['shift']());}catch(_0x4e3088){_0x170ef7['push'](_0x170ef7['shift']());}}}(_0x5046,0x9e263));import{Plugin as _0x457521}from'ckeditor5/src/core.js';import _0x5e71e7 from'./revisionssidebarview.js';function _0x2f65(_0x18c9e4,_0x2d3a9e){const _0x5046b9=_0x5046();return _0x2f65=function(_0x2f6546,_0x27c5f7){_0x2f6546=_0x2f6546-0xbb;let _0x528d5a=_0x5046b9[_0x2f6546];return _0x528d5a;},_0x2f65(_0x18c9e4,_0x2d3a9e);}import _0x1d82c0 from'../../revisionviewer.js';class d extends _0x457521{[_0x3997e6(0x10a)];[_0x3997e6(0xc0)];[_0x3997e6(0xfb)];static [_0x3997e6(0xbf)]=[_0x3997e6(0xe8),_0x3997e6(0xc2),_0x3997e6(0xd8)];static [_0x3997e6(0xd1)]=(function(){const _0x5a4b76=_0x3997e6;return{'compareAgainstSelected':{'name':_0x5a4b76(0x104),'action':({plugins:i},s)=>{const _0x26725=_0x5a4b76,e=i[_0x26725(0xed)](_0x1d82c0),n=e[_0x26725(0xc3)];let r=e[_0x26725(0xfe)][_0x26725(0xf8)],o=s['id'];n[_0x26725(0xcb)](r)>n[_0x26725(0xcb)](o)&&([r,o]=[o,r]),e[_0x26725(0xc9)](r,o);},'isVisible':({plugins:i},s)=>{const _0x4975db=_0x5a4b76,e=i[_0x4975db(0xed)](_0x1d82c0);return!(e[_0x4975db(0xc3)][_0x4975db(0xfa)](e[_0x4975db(0xfe)])[_0x4975db(0xcc)]>0x2)&&!s[_0x4975db(0x102)];}},'restoreRevision':{'name':_0x5a4b76(0xc8),'action':(i,{id:s})=>{const _0x361382=_0x5a4b76;i[_0x361382(0xf2)][_0x361382(0xed)](_0x361382(0xbb))[_0x361382(0xd5)](s);},'isVisible':({plugins:i},s)=>!!i[_0x5a4b76(0xed)](_0x1d82c0)[_0x5a4b76(0xc3)][_0x5a4b76(0x10f)](s['id'])},'nameRevision':{'name':_0x5a4b76(0xf6),'action':({plugins:i},{id:s,revisionNameView:e})=>{const _0x1ae984=_0x5a4b76,n=i[_0x1ae984(0xed)](_0x1d82c0),r=n[_0x1ae984(0xc3)][_0x1ae984(0xec)](s);n[_0x1ae984(0xc9)](s,r),e[_0x1ae984(0xca)](),e[_0x1ae984(0x100)][_0x1ae984(0xee)]();}}};}());static get[_0x3997e6(0xc5)](){const _0x2e2a89=_0x3997e6;return _0x2e2a89(0x107);}static get[_0x3997e6(0xe4)](){return!0x0;}static get[_0x3997e6(0xc4)](){return!0x0;}static get[_0x3997e6(0xfc)](){return[_0x1d82c0];}constructor(_0x264379){const _0x236e02=_0x3997e6;super(_0x264379),this[_0x236e02(0x10a)]=_0x264379[_0x236e02(0xe1)][_0x236e02(0xed)](_0x1d82c0),this[_0x236e02(0xc0)]=this[_0x236e02(0x10a)][_0x236e02(0xc3)],this[_0x236e02(0xfb)]=null;}[_0x3997e6(0xf0)](){const _0x16881e=_0x3997e6,_0x27300a=this[_0x16881e(0xc0)][_0x16881e(0x109)],_0x1a11d5=this[_0x16881e(0xd0)](),_0x14b928=this[_0x16881e(0xe3)][_0x16881e(0xf2)][_0x16881e(0xed)](_0x16881e(0x103));this[_0x16881e(0xfb)]=new _0x5e71e7(this[_0x16881e(0xe3)][_0x16881e(0xe6)],_0x27300a,_0x1a11d5,this[_0x16881e(0xe3)][_0x16881e(0xf2)][_0x16881e(0xed)](_0x16881e(0xd3))),this[_0x16881e(0xfb)]['on'](_0x16881e(0xf9),this[_0x16881e(0x108)][_0x16881e(0xdc)](this)),this[_0x16881e(0xfb)]['on'](_0x16881e(0xdd),this[_0x16881e(0xff)][_0x16881e(0xdc)](this)),this[_0x16881e(0xfb)][_0x16881e(0xdc)](_0x16881e(0xf3))['to'](this[_0x16881e(0x10a)]),this[_0x16881e(0xfb)][_0x16881e(0xe5)]['on'](_0x16881e(0xd6),(_0x83908e,_0x2fdccc)=>{const _0x3dae60=_0x16881e;_0x2fdccc[_0x3dae60(0xf5)]['on'](_0x3dae60(0xd6),(_0x66948f,_0x314abe)=>{const _0x548208=_0x3dae60;_0x314abe[_0x548208(0xdc)](_0x548208(0xf3),_0x548208(0x10e))['to'](this[_0x548208(0x10a)]);});}),this[_0x16881e(0xfb)][_0x16881e(0xd7)](),this[_0x16881e(0xc6)](this[_0x16881e(0xe3)][_0x16881e(0xe9)],_0x16881e(0xd4),this[_0x16881e(0x110)][_0x16881e(0xdc)](this)),this[_0x16881e(0xc6)](this[_0x16881e(0x10a)],_0x16881e(0xda),this[_0x16881e(0xe7)][_0x16881e(0xdc)](this)),_0x14b928[_0x16881e(0xeb)](this[_0x16881e(0xfb)][_0x16881e(0xbc)]);}[_0x3997e6(0xc1)](){const _0x537195=_0x3997e6;this[_0x537195(0xfb)][_0x537195(0xbc)][_0x537195(0x10c)](),this[_0x537195(0xfb)][_0x537195(0xc1)]();}[_0x3997e6(0x110)](){const _0x23f034=_0x3997e6,_0x529ca=this[_0x23f034(0xc0)][_0x23f034(0xbd)](0x0);if(_0x529ca){const _0x4acc77=this[_0x23f034(0xc0)][_0x23f034(0xec)](_0x529ca['id']);this[_0x23f034(0x10a)][_0x23f034(0xc9)](_0x529ca,_0x4acc77);}}[_0x3997e6(0x108)](_0x5e64b5,_0x46794c){const _0xed8db3=_0x3997e6,_0x35b0a7=this[_0xed8db3(0xc0)][_0xed8db3(0xbd)](_0x46794c['id']),_0x209de4=this[_0xed8db3(0xc0)][_0xed8db3(0xec)](_0x35b0a7['id']);this[_0xed8db3(0x10a)][_0xed8db3(0xc9)](_0x35b0a7,_0x209de4);}[_0x3997e6(0xff)](_0x40d1c1,_0x383ed2){const _0x3bf3ff=_0x3997e6;this[_0x3bf3ff(0xc0)][_0x3bf3ff(0xbd)](_0x383ed2['id'])[_0x3bf3ff(0xdb)](_0x383ed2[_0x3bf3ff(0xde)]);}[_0x3997e6(0xe7)](_0x460124,_0x400247,_0x55a1ce){const _0x13f320=_0x3997e6,_0x314601=this[_0x13f320(0xc0)][_0x13f320(0xfa)](_0x55a1ce);_0x314601[_0x13f320(0xcc)]>0x2?(this[_0x13f320(0xfb)][_0x13f320(0xe2)](_0x314601),this[_0x13f320(0xfb)][_0x13f320(0xcd)](null)):(this[_0x13f320(0xfb)][_0x13f320(0xe2)]([]),this[_0x13f320(0xfb)][_0x13f320(0xcd)](_0x314601[0x0]));}[_0x3997e6(0xd0)](){const _0x1078ce=_0x3997e6,_0x270162=this[_0x1078ce(0xe3)],_0x548d05=d[_0x1078ce(0xd1)],_0x3465ff=_0x270162[_0x1078ce(0xf2)][_0x1078ce(0xed)](_0x1078ce(0x101))||d[_0x1078ce(0xbf)];if(_0x3465ff[_0x1078ce(0xcc)])return _0x3465ff[_0x1078ce(0xd2)](_0x5149d0=>{const _0x3f412f=_0x1078ce,_0x3206d4=_0x3f412f(0x10b)==typeof _0x5149d0?Object[_0x3f412f(0xdf)]({},_0x548d05[_0x5149d0]):_0x5149d0;return _0x3206d4[_0x3f412f(0xc7)]=_0x3206d4[_0x3f412f(0xc7)][_0x3f412f(0xdc)](this,_0x270162),_0x3206d4[_0x3f412f(0x10d)]&&(_0x3206d4[_0x3f412f(0x10d)]=_0x3206d4[_0x3f412f(0x10d)][_0x3f412f(0xdc)](this,_0x270162)),_0x3206d4;});}}function _0x5046(){const _0x595f4c=['select','217430sRqXeB','init','1225107kPFGOR','config','isEnabled','150hYSehR','revisionViews','Name\x20this\x20revision','24djneAF','newRevisionId','revisionSelected','getRevisionsInDiff','_sidebarView','requires','28FuckDi','diff','_handleRevisionSetName','fieldView','revisionHistory.revisionActions','isSelected','revisionHistory.viewerSidebarContainer','Compare\x20against\x20selected','84aFHIOh','876CDVkyH','RevisionsSidebar','_handleRevisionSelected','_revisions','_revisionViewer','string','remove','isVisible','isReady','getLaterVisibleRevision','_handleEditorDataReady','revisionHistory','element','getRevision','36377AJxAqe','defaultRevisionActions','_revisionsRepository','destroy','restoreRevision','repository','isPremiumPlugin','pluginName','listenTo','action','Restore\x20this\x20revision','compare','focus','getIndex','length','selectRevision','519493iglirj','1320756ESdlzR','_createRevisionActions','availableRevisionActions','map','revisionHistory.requireRevisionName','ready','restoreRevisionCallback','add','render','nameRevision','27HIKMgA','change:diff','setName','bind','revisionSetName','name','assign','407xIMklx','plugins','highlightRevisions','editor','isOfficialPlugin','timePeriodViews','locale','_handleDiffChange','compareAgainstSelected','data','1908408fyceyD','appendChild','getEarlierVisibleRevision','get'];_0x5046=function(){return _0x595f4c;};return _0x5046();}export default d;