UNPKG

@ckeditor/ckeditor5-revision-history

Version:

Document revision history feature for CKEditor 5.

23 lines 6.3 kB
/* * 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 _0x2aa3d7=_0x3a97;(function(_0x288deb,_0x12eb3b){const _0x54d945=_0x3a97,_0x1faf3b=_0x288deb();while(!![]){try{const _0x37e8ae=parseInt(_0x54d945(0xa0))/0x1*(parseInt(_0x54d945(0x8d))/0x2)+parseInt(_0x54d945(0x9c))/0x3*(parseInt(_0x54d945(0x88))/0x4)+-parseInt(_0x54d945(0xa2))/0x5+-parseInt(_0x54d945(0xb0))/0x6*(parseInt(_0x54d945(0xac))/0x7)+-parseInt(_0x54d945(0x8a))/0x8+parseInt(_0x54d945(0xb7))/0x9+-parseInt(_0x54d945(0x8e))/0xa*(-parseInt(_0x54d945(0xb8))/0xb);if(_0x37e8ae===_0x12eb3b)break;else _0x1faf3b['push'](_0x1faf3b['shift']());}catch(_0x21e569){_0x1faf3b['push'](_0x1faf3b['shift']());}}}(_0x736f,0x5acff));import{View as _0x1812bb}from'ckeditor5/src/ui.js';import _0x262a97 from'./revisionssidebartimeperiodview.js';function _0x736f(){const _0x5165e3=['ck-reset','revisionViews','remove','bindTemplate','set','14BEMqlk','setName','createdAt','unhighlight','600786YNGPCu','highlight','find','revisionSelected','revisionSetName','map','get','986985SQmAZI','22OaNeeN','getTime','ck-revision-history-sidebar','ck-revision-history-sidebar__timeline','removeRevision','_removeRevision','div','locale','1783804pMWJtP','_revisionActions','5406920HSMKna','delegate','_getTimePeriodViewByStartDate','97172GWZDpa','5268740OgGjgB','_addRevision','createCollection','some','select','ck-disabled','_requireRevisionName','setTemplate','ck-rounded-corners','add','fire','uiLanguage','deselect','timePeriodViews','3lmJbad','highlightRevisions','selectRevision','addRevision','7DmQJON','isEnabled','3506860ESwZjv','startDate','render','flat','_revisions'];_0x736f=function(){return _0x5165e3;};return _0x736f();}import _0x253548 from'./revisionssidebarheaderview.js';function _0x3a97(_0x4bfeae,_0x2d2b79){const _0x736f04=_0x736f();return _0x3a97=function(_0x3a977a,_0x13ac23){_0x3a977a=_0x3a977a-0x86;let _0x17bd69=_0x736f04[_0x3a977a];return _0x17bd69;},_0x3a97(_0x4bfeae,_0x2d2b79);}import{getDateTimePeriodInfo as _0x522442}from'./utils.js';import'../../../theme/revisionssidebar/revisionssidebar.css';export default class vi extends _0x1812bb{[_0x2aa3d7(0x9b)];[_0x2aa3d7(0xa6)];[_0x2aa3d7(0x89)];[_0x2aa3d7(0x94)];constructor(_0x23e8b7,_0x394429,_0x236d9e,_0x79c65b){const _0x438c80=_0x2aa3d7;super(_0x23e8b7);const _0x1b3789=this[_0x438c80(0xaa)];this[_0x438c80(0x9b)]=this[_0x438c80(0x90)](),this[_0x438c80(0x9b)][_0x438c80(0x8b)](_0x438c80(0x92))['to'](this),this[_0x438c80(0x9b)][_0x438c80(0x8b)](_0x438c80(0xad))['to'](this),this[_0x438c80(0xa6)]=_0x394429,this[_0x438c80(0x89)]=_0x236d9e,this[_0x438c80(0x94)]=_0x79c65b,this['on'](_0x438c80(0x92),(_0x54593f,_0x147f7d)=>{const _0x228995=_0x438c80;this[_0x228995(0x98)](_0x228995(0xb3),_0x147f7d);}),this['on'](_0x438c80(0xad),(_0x31bcf7,_0x2d6b14)=>{const _0x575e4b=_0x438c80;this[_0x575e4b(0x98)](_0x575e4b(0xb4),_0x2d6b14);}),this[_0x438c80(0xab)](_0x438c80(0xa1),!0x1),this[_0x438c80(0x95)]({'tag':_0x438c80(0x86),'attributes':{'class':['ck',_0x438c80(0xa7),_0x438c80(0x96),_0x438c80(0xba)]},'children':[new _0x253548(_0x23e8b7),{'tag':_0x438c80(0x86),'attributes':{'class':['ck',_0x438c80(0xbb),_0x1b3789['if'](_0x438c80(0xa1),_0x438c80(0x93),_0x560d5e=>!_0x560d5e)]},'children':this[_0x438c80(0x9b)]}]});}[_0x2aa3d7(0xa4)](){const _0x274b7d=_0x2aa3d7;super[_0x274b7d(0xa4)]();for(const _0x95732e of this[_0x274b7d(0xa6)])this[_0x274b7d(0x8f)](_0x95732e);this[_0x274b7d(0xa6)]['on'](_0x274b7d(0x97),(_0x38d4d7,_0x1af952)=>{const _0x1c83a6=_0x274b7d;this[_0x1c83a6(0x8f)](_0x1af952);}),this[_0x274b7d(0xa6)]['on'](_0x274b7d(0xa9),(_0x1ebfd7,_0x25c16e)=>{const _0x59eaa4=_0x274b7d;this[_0x59eaa4(0xbd)](_0x25c16e);});}get[_0x2aa3d7(0xa8)](){const _0x1efb17=_0x2aa3d7;return this[_0x1efb17(0x9b)][_0x1efb17(0xb5)](_0x24ef9b=>_0x24ef9b[_0x1efb17(0xa8)][_0x1efb17(0xb5)](_0x28aec2=>_0x28aec2))[_0x1efb17(0xa5)]();}[_0x2aa3d7(0x9e)](_0x2ae27b){const _0x37c191=_0x2aa3d7;for(const _0x392021 of this[_0x37c191(0xa8)])_0x2ae27b&&_0x2ae27b['id']===_0x392021['id']?_0x392021[_0x37c191(0x92)]():_0x392021[_0x37c191(0x9a)]();}[_0x2aa3d7(0x9d)](_0x4324b3){const _0x38f981=_0x2aa3d7;for(const _0x1dae1f of this[_0x38f981(0xa8)])_0x4324b3[_0x38f981(0x91)](({id:_0xe9fd9})=>_0xe9fd9===_0x1dae1f['id'])?_0x1dae1f[_0x38f981(0xb1)]():_0x1dae1f[_0x38f981(0xaf)]();}[_0x2aa3d7(0x8f)](_0x1c94cc){const _0x2173c7=_0x2aa3d7,_0x330eef=_0x522442(_0x1c94cc[_0x2173c7(0xae)],this[_0x2173c7(0x87)][_0x2173c7(0x99)])[_0x2173c7(0xa3)];let _0x3b7f63=this[_0x2173c7(0x9b)][_0x2173c7(0xb6)](0x0);_0x3b7f63&&_0x3b7f63[_0x2173c7(0xa3)][_0x2173c7(0xb9)]()===_0x330eef[_0x2173c7(0xb9)]()||(_0x3b7f63=new _0x262a97(this[_0x2173c7(0x87)],_0x330eef,this[_0x2173c7(0x89)],this[_0x2173c7(0x94)]),this[_0x2173c7(0x9b)][_0x2173c7(0x97)](_0x3b7f63)),_0x3b7f63[_0x2173c7(0x9f)](_0x1c94cc);}[_0x2aa3d7(0xbd)](_0x5706b2){const _0x36442e=_0x2aa3d7,_0x54fa97=_0x522442(_0x5706b2[_0x36442e(0xae)],this[_0x36442e(0x87)][_0x36442e(0x99)])[_0x36442e(0xa3)];this[_0x36442e(0x8c)](_0x54fa97)[_0x36442e(0xbc)](_0x5706b2);}[_0x2aa3d7(0x8c)](_0x1f4866){const _0x18281f=_0x2aa3d7;return this[_0x18281f(0x9b)][_0x18281f(0xb2)](_0x417886=>_0x417886[_0x18281f(0xa3)][_0x18281f(0xb9)]()===_0x1f4866[_0x18281f(0xb9)]());}}