UNPKG

@ckeditor/ckeditor5-revision-history

Version:

Document revision history feature for CKEditor 5.

24 lines • 172 kB
/* * Copyright (c) 2003-2026, 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ import{ObservableMixin as _0x5ab6a2,uid as _0x3a9e51,Collection as _0x17f096,logWarning as _0xbee62d,FocusTracker as _0x5d8af1,KeystrokeHandler as _0x2b2db0,scrollViewportToShowTarget as _0x117344,ResizeObserver as _0xd338d9,ElementReplacer as _0x3cc16b,CKEditorError as _0x4e0fab}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2bd58a,set as _0x3a8c40,unset as _0x1d4ffa,isEqual as _0x1b0b6b}from'es-toolkit/compat';import{Plugin as _0x176a35,PendingActions as _0x2ba888,Command as _0x59969e,ElementApiMixin as _0x2e7a9f,Editor as _0x18ee47}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x12edcd,getMarkerDomElement as _0x173d85,ConfirmMixin as _0x51d528,sanitizeEditorConfig as _0x106aa0}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x56887a,ViewAttributeElement as _0x37282f,ViewEmptyElement as _0x6df7a,ViewRawElement as _0x48b4cb,ViewUIElement as _0x52e48c,ViewDocumentFragment as _0x2967c2,ViewText as _0x3c1158,ViewElement as _0x404663,ModelElement as _0x3b031c,ModelRange as _0x522e84,ModelPosition as _0x5821d2,ModelDocumentFragment as _0x5b6cbc,ModelText as _0x21be22}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x275320,IconChevronUp as _0x2522e5,IconChevronDown as _0x30e910,IconUndo as _0x4005f5,IconUser as _0x317fde,IconThreeVerticalDots as _0x3856a7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x4ce890,View as _0x55ecc0,submitHandler as _0x1c74fa,LabeledFieldView as _0x49faef,createLabeledInputText as _0x3f7ef0,createDropdown as _0xbd5db9,ListView as _0x22037b,ListItemView as _0x1ae556,ButtonView as _0xb28a32,MenuBarMenuView as _0x2ac15f,MenuBarMenuListView as _0x5c8d84,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */ _0x5ab6a2(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x49719d){super(),this['id']=_0x49719d['id']||_0x3a9e51(),this['creator']=_0x49719d['creator']||null,this['authors']=_0x49719d['authors']||[],this['diffData']=_0x49719d['diffData']||null,this['toVersion']=_0x49719d['toVersion']||0x0,this['fromVersion']=_0x49719d['fromVersion']||0x0,this['set']('name',_0x49719d['name']||''),this['set']('createdAt',_0x49719d['createdAt']||new Date()),this['set']('attributes',_0x49719d['attributes']||{});}['setName'](_0x322490){this['_update']({'name':_0x322490});}['setAttribute'](_0x24a581,_0x2b5c0f){const _0x21f8d5=_0x2bd58a(this['attributes']);_0x3a8c40(_0x21f8d5,_0x24a581,_0x2b5c0f),this['_update']({'attributes':_0x21f8d5});}['removeAttribute'](_0x48b01b){const _0x37649d=_0x2bd58a(this['attributes']);_0x1d4ffa(_0x37649d,_0x48b01b),this['_update']({'attributes':_0x37649d});}['_update'](_0x57d3a4,_0x7408d0=!0x1){let _0x4090c3=!0x1;const _0xcd21f0={'id':this['id']},_0x15fb62=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4cf062 of _0x15fb62){const _0xe224e7=_0x57d3a4[_0x4cf062];void 0x0!==_0xe224e7&&_0xe224e7!==this[_0x4cf062]&&(this[_0x4cf062]=_0xe224e7,_0xcd21f0[_0x4cf062]=_0xe224e7,_0x4090c3=!0x0);}_0x4090c3&&(_0xcd21f0['authors']&&(_0xcd21f0['authorsIds']=_0xcd21f0['authors']['map'](_0x48862a=>_0x48862a['id']),delete _0xcd21f0['authors']),this['fire']('_update',_0xcd21f0,_0x7408d0));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x32c880=>_0x32c880['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x176a35{['_revisions'];static get['requires'](){return[_0x12edcd];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xf97c6c){super(_0xf97c6c),this['_revisions']=new _0x17f096();}['afterInit'](){!async function(_0x56a602){const _0x57a775=_0x4c039d([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x48fbc4=0xeb829,_0x471892=0x359e09b0,_0x2407d7=0x359983d8^_0x471892,_0x3daa6a=window[_0x4c039d([0x44,0x61,0x74,0x65])][_0x4c039d([0x6e,0x6f,0x77])](),_0xcda8bc=_0x56a602[_0x4c039d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2c23f2=new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x555612=>{_0xcda8bc[_0x4c039d([0x6f,0x6e,0x63,0x65])](_0x4c039d([0x72,0x65,0x61,0x64,0x79]),_0x555612);}),_0x439175={[_0x4c039d([0x6b,0x74,0x79])]:_0x4c039d([0x45,0x43]),[_0x4c039d([0x75,0x73,0x65])]:_0x4c039d([0x73,0x69,0x67]),[_0x4c039d([0x63,0x72,0x76])]:_0x4c039d([0x50,0x2d,0x32,0x35,0x36]),[_0x4c039d([0x78])]:_0x4c039d([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4c039d([0x79])]:_0x4c039d([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4c039d([0x61,0x6c,0x67])]:_0x4c039d([0x45,0x53,0x32,0x35,0x36])},_0x1439b8=_0xcda8bc[_0x4c039d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c039d([0x67,0x65,0x74])](_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x28f074(){let _0x46334e,_0x1ac4f9=null,_0x5c1efb=null;try{if(_0x1439b8==_0x4c039d([0x47,0x50,0x4c]))return _0x4c039d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46334e=_0xedbb07(),!_0x46334e)return _0x4c039d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46334e[_0x4c039d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c1efb=_0x2f46bc(_0x46334e[_0x4c039d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46334e[_0x4c039d([0x6a,0x74,0x69])])),await _0x40f25a()?_0x310f30()?_0x4cfd7f()?_0x4c039d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xca5954()?(_0x46334e[_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c039d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1ac4f9=_0x3d2773(_0x4c039d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3fd522()):_0x4c039d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c039d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c039d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c039d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4cfd7f(){const _0x449e19=[_0x4c039d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c039d([0x74,0x72,0x69,0x61,0x6c])][_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46334e[_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3daa6a/0x3e8:0xe10*_0x2407d7;return _0x46334e[_0x4c039d([0x65,0x78,0x70])]<_0x449e19;}function _0x310f30(){const _0x15afb5=_0x46334e[_0x4c039d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x15afb5)return!0x1;if(_0x15afb5[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x2a])))return!0x0;if(_0x15afb5[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x52,0x48])))return!0x0;if(_0x15afb5[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x52,0x52,0x48]))){if(_0x27fca6())return!0x0;if(_0x677624()||_0x21d7ee())return!0x0;}return!0x1;}function _0xca5954(){const _0x2ca8b2=_0x46334e[_0x4c039d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2ca8b2||0x0==_0x2ca8b2[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4a98cd}=new URL(window[_0x4c039d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2ca8b2[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a98cd))return!0x0;const _0xde4303=_0x4a98cd[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e]));return _0x2ca8b2[_0x4c039d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x36d27c=>_0x36d27c[_0x4c039d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c039d([0x2a])))[_0x4c039d([0x6d,0x61,0x70])](_0x5e126e=>_0x5e126e[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e])))[_0x4c039d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x17ad37=>_0x17ad37[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xde4303[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c039d([0x6d,0x61,0x70])](_0x53b5f5=>Array(_0xde4303[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x53b5f5[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c039d([0x66,0x69,0x6c,0x6c])](_0x53b5f5[0x0]===_0x4c039d([0x2a])?_0x4c039d([0x2a]):'')[_0x4c039d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x53b5f5))[_0x4c039d([0x73,0x6f,0x6d,0x65])](_0x357880=>_0xde4303[_0x4c039d([0x65,0x76,0x65,0x72,0x79])]((_0x173845,_0x18a1b8)=>_0x357880[_0x18a1b8]===_0x173845||_0x357880[_0x18a1b8]===_0x4c039d([0x2a])));}function _0x3fd522(){return _0x1ac4f9&&_0x5c1efb?new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x531f68,_0x2fd21e)=>{_0x1ac4f9[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x531f68,_0x2fd21e),_0x5c1efb[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x389cba=>{_0x389cba!=_0x4c039d([0x56,0x61,0x6c,0x69,0x64])&&_0x531f68(_0x389cba);},_0x2fd21e);}):_0x1ac4f9||_0x5c1efb||_0x4c039d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2f46bc(_0x960445,_0x320210){return new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x505f6e=>{if(_0x20d01c())return _0x505f6e(_0x4c039d([0x56,0x61,0x6c,0x69,0x64]));_0x273441(),_0xcda8bc[_0x4c039d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c039d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2717f1=!0x1;const _0x4a701b=_0x3a9e51();function _0x49d15e(_0x46fe8e){return!!_0x46fe8e&&(typeof _0x46fe8e===_0x4c039d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x46fe8e===_0x4c039d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x46fe8e[_0x4c039d([0x74,0x68,0x65,0x6e])]===_0x4c039d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x46fe8e[_0x4c039d([0x63,0x61,0x74,0x63,0x68])]===_0x4c039d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x380969(_0x1a6ad0){_0x14e1e8(_0x1a6ad0)[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x370f64=>{if(!_0x370f64||_0x370f64[_0x4c039d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c039d([0x6f,0x6b]))return _0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1a5072(_0x3d8a57(_0x4a701b+_0x320210))!=_0x370f64[_0x4c039d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c039d([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x389662=>(_0x1a4010(),_0x389662),()=>{const _0x168c2d=_0x11ee50();return null==_0x168c2d?(_0x1a4010(),_0x4c039d([0x56,0x61,0x6c,0x69,0x64])):_0x4c039d(_0x3daa6a-_0x168c2d>(0x11928db0^_0x471892)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x505f6e)[_0x4c039d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x505f6e(_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e47df=0x35a8e730^_0x471892;function _0x1a4010(){const _0x478049=_0x4c039d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a5072(_0x3d8a57(_0x960445)),_0x48f350=_0x18e2c6(_0x1a5072(window[_0x4c039d([0x4d,0x61,0x74,0x68])][_0x4c039d([0x63,0x65,0x69,0x6c])](_0x3daa6a/_0x4e47df)));window[_0x4c039d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c039d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x478049,_0x48f350);}function _0x11ee50(){const _0x12293e=_0x4c039d([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a5072(_0x3d8a57(_0x960445)),_0x5daec4=window[_0x4c039d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c039d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12293e);return _0x5daec4?window[_0x4c039d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18e2c6(_0x5daec4),0x10)*_0x4e47df:null;}function _0x14e1e8(_0x2148ac){return new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x169078,_0x2f756d)=>{_0x2148ac[_0x4c039d([0x74,0x68,0x65,0x6e])](_0x169078,_0x2f756d),window[_0x4c039d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2f756d,0x359fdd70^_0x471892);});}}_0xcda8bc[_0x4c039d([0x6f,0x6e])](_0x4c039d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4363bc,_0x285345)=>{if(_0x285345[0x0]!=_0x960445)return _0x505f6e(_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x285345[0x1]={..._0x285345[0x1],[_0x4c039d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4a701b};},{[_0x4c039d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c039d([0x68,0x69,0x67,0x68])}),_0xcda8bc[_0x4c039d([0x6f,0x6e])](_0x4c039d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x101fb0=>{_0x49d15e(_0x101fb0[_0x4c039d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2717f1=!0x0,_0x380969(_0x101fb0[_0x4c039d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c039d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c039d([0x6c,0x6f,0x77])}),_0x2c23f2[_0x4c039d([0x74,0x68,0x65,0x6e])](()=>{_0x2717f1||_0x505f6e(_0x4c039d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x20d01c(){return _0xcda8bc[_0x4c039d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c039d([0x76,0x69,0x65,0x77])][_0x4c039d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c039d([0x61,0x75,0x74,0x6f]);}function _0x273441(){_0xcda8bc[_0x4c039d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c039d([0x76,0x69,0x65,0x77])][_0x4c039d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c039d([0x61,0x75,0x74,0x6f]);}}function _0x3d2773(_0x251acc){const _0x36f48a=[new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xeadda1=>setTimeout(_0xeadda1,0x3597377c^_0x471892)),_0x2c23f2[_0x4c039d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3aed6f=>{const _0x137706=0x359e09b7^_0x471892,_0x19ea3c=_0x56a602[_0x4c039d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x1fb418(){_0x19ea3c[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x137706&&_0x3aed6f();}_0x1fb418(),_0x19ea3c[_0x4c039d([0x6f,0x6e])](_0x4c039d([0x61,0x64,0x64]),_0x1fb418);})),new window[(_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3272d0=>{function _0x49263d(){for(const _0x43a08a in window)if(window[_0x4c039d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4c039d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x43a08a))&&window[_0x43a08a]==_0x48fbc4)return _0x3272d0();_0xcda8bc[_0x4c039d([0x73,0x74,0x61,0x74,0x65])]!=_0x4c039d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4c039d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49263d,0x359e1a38^_0x471892);}_0x4aa89(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x49263d();})];return window[_0x4c039d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c039d([0x72,0x61,0x63,0x65])](_0x36f48a)[_0x4c039d([0x74,0x68,0x65,0x6e])](()=>_0x251acc);}async function _0x309002(){if(await _0x2c23f2,_0x4aa89(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x349a90=_0x56a602[_0x4c039d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2f438f=_0x56a602[_0x4c039d([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x349a90[_0x4c039d([0x69,0x64])]),_0x4af75a=_0x47039b(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4af75a[_0x4c039d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x349a90['id'],_0x2f438f?_0x2f438f['id']:null,!0x0),_0x4af75a[_0x4c039d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4af75a[_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4af75a[_0x4c039d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x7a8ffa,void(_0x4af75a[_0x4c039d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x7a8ffa);}if(_0x4aa89(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0xa5e49d=_0x47039b(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0xa5e49d[_0x4c039d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0xa5e49d[_0x4c039d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0xa5e49d[_0x4c039d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x7a8ffa,_0xa5e49d[_0x4c039d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x7a8ffa;}_0xcda8bc[_0x4c039d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c039d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x7a8ffa,_0xcda8bc[_0x4c039d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c039d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x7a8ffa,_0xcda8bc[_0x4c039d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c039d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x27fca6(){return _0x4aa89(_0x4c039d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x47039b(_0x4c039d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4c039d([0x73,0x74,0x61,0x74,0x65])]==_0x4c039d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x677624(){return _0x4aa89(_0x4c039d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x21d7ee(){return _0x4aa89(_0x4c039d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x171b77(_0x4de303){const _0x570134=_0x56cdf7();_0xcda8bc[_0x570134]=_0x4c039d([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4de303,_0x4de303[_0x4c039d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4c039d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x56cdf7()]=_0x48fbc4),_0x4de303!=_0x4c039d([0x56,0x61,0x6c,0x69,0x64])&&_0x309002();}function _0x56cdf7(){const _0x23aee3=window[_0x4c039d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c039d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c039d([0x6e,0x6f,0x77])]())[_0x4c039d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c039d([0x2e]),'');let _0x783c8d=_0x4c039d([0x76]);for(let _0x62330f=0x0;_0x62330f<_0x23aee3[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x62330f+=0x2){let _0xe8dcf5=window[_0x4c039d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23aee3[_0x4c039d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x62330f,_0x62330f+0x2));_0xe8dcf5>=_0x57a775[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xe8dcf5-=_0x57a775[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x783c8d+=_0x57a775[_0xe8dcf5];}return _0x783c8d;}function _0xedbb07(){const _0x58a155=_0x1439b8[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e]));if(0x3!=_0x58a155[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3f6fdb(_0x58a155[0x1]);function _0x3f6fdb(_0x437833){const _0xb7215b=_0x5d5c00(_0x437833);return _0xb7215b&&_0x3668bc()?_0xb7215b:null;function _0x3668bc(){const _0x5b71bd=_0xb7215b[_0x4c039d([0x6a,0x74,0x69])],_0x378ae2=window[_0x4c039d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b71bd[_0x4c039d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b71bd[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1c65e0={..._0xb7215b,[_0x4c039d([0x6a,0x74,0x69])]:_0x5b71bd[_0x4c039d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5b71bd[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1c65e0[_0x4c039d([0x76,0x63])],_0x3d8a57(_0x1c65e0)==_0x378ae2;}}}async function _0x40f25a(){let _0x3d3189=!0x0;try{const _0x5d6b4c=_0x1439b8[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])](_0x4c039d([0x2e])),[_0x582e1e,_0xae20a2,_0x5e5b7d]=_0x5d6b4c;return _0x2a448c(_0x582e1e),await _0x4315fe(_0x582e1e,_0xae20a2,_0x5e5b7d),_0x3d3189;}catch{return!0x1;}function _0x2a448c(_0x4f826c){const _0x1f9e97=_0x5d5c00(_0x4f826c);_0x1f9e97&&_0x1f9e97[_0x4c039d([0x61,0x6c,0x67])]==_0x4c039d([0x45,0x53,0x32,0x35,0x36])||(_0x3d3189=!0x1);}async function _0x4315fe(_0x46d1e6,_0x54b77b,_0x245a5d){const _0x3c9ba1=window[_0x4c039d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c039d([0x66,0x72,0x6f,0x6d])](_0x23e5ec(_0x245a5d),_0x266984=>_0x266984[_0x4c039d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1c8ce1=new window[(_0x4c039d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c039d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x46d1e6+_0x4c039d([0x2e])+_0x54b77b),_0x234e76=window[_0x4c039d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c039d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x234e76)return;const _0x27084e=await _0x234e76[_0x4c039d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c039d([0x6a,0x77,0x6b]),_0x439175,{[_0x4c039d([0x6e,0x61,0x6d,0x65])]:_0x4c039d([0x45,0x43,0x44,0x53,0x41]),[_0x4c039d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c039d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c039d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x234e76[_0x4c039d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c039d([0x6e,0x61,0x6d,0x65])]:_0x4c039d([0x45,0x43,0x44,0x53,0x41]),[_0x4c039d([0x68,0x61,0x73,0x68])]:{[_0x4c039d([0x6e,0x61,0x6d,0x65])]:_0x4c039d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x27084e,_0x3c9ba1,_0x1c8ce1)||(_0x3d3189=!0x1);}}function _0x5d5c00(_0x3d87fb){return _0x3d87fb[_0x4c039d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c039d([0x65,0x79]))?JSON[_0x4c039d([0x70,0x61,0x72,0x73,0x65])](_0x23e5ec(_0x3d87fb)):null;}function _0x23e5ec(_0x360ea3){return window[_0x4c039d([0x61,0x74,0x6f,0x62])](_0x360ea3[_0x4c039d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c039d([0x2b]))[_0x4c039d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c039d([0x2f])));}function _0x3d8a57(_0x2a6d71){let _0x3c04ff=0x1505;function _0x31c823(_0xa10f74){for(let _0x458516=0x0;_0x458516<_0xa10f74[_0x4c039d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x458516++){const _0x1d2621=_0xa10f74[_0x4c039d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x458516);_0x3c04ff=(_0x3c04ff<<0x5)+_0x3c04ff+_0x1d2621,_0x3c04ff&=_0x3c04ff;}}function _0x823610(_0x1118f7){Array[_0x4c039d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1118f7)?_0x1118f7[_0x4c039d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x823610):_0x1118f7&&typeof _0x1118f7==_0x4c039d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c039d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1118f7)[_0x4c039d([0x73,0x6f,0x72,0x74])]()[_0x4c039d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x522b96,_0x4744e2])=>{_0x31c823(_0x522b96),_0x823610(_0x4744e2);}):_0x31c823(window[_0x4c039d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1118f7));}return _0x823610(_0x2a6d71),_0x3c04ff>>>0x0;}function _0x1a5072(_0x12f32d){return _0x12f32d[_0x4c039d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c039d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c039d([0x30]));}function _0x18e2c6(_0x1ef334){return _0x1ef334[_0x4c039d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c039d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c039d([0x6a,0x6f,0x69,0x6e])]('');}function _0x4aa89(_0x449c62){return _0xcda8bc[_0x4c039d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c039d([0x68,0x61,0x73])](_0x449c62);}function _0x47039b(_0x38d078){return _0xcda8bc[_0x4c039d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c039d([0x67,0x65,0x74])](_0x38d078);}function _0x7a8ffa(){}function _0x4c039d(_0x520b10){return _0x520b10['map'](_0x1bb057=>String['fromCharCode'](_0x1bb057))['join']('');}_0x171b77(await _0x28f074());}(this);}['createRevision'](_0x19e0e1){const _0x5efc77=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x19e0e1['id'],'name':_0x19e0e1['name'],'creator':_0x19e0e1['creatorId']?_0x5efc77['getUser'](_0x19e0e1['creatorId']):null,'diffData':_0x19e0e1['diffData']||_0x19e0e1['data'],'authors':_0x19e0e1['authorsIds']['map'](_0x54a0f0=>_0x5efc77['getUser'](_0x54a0f0)),'createdAt':new Date(_0x19e0e1['createdAt']),'attributes':_0x19e0e1['attributes'],'fromVersion':_0x19e0e1['fromVersion'],'toVersion':_0x19e0e1['toVersion']});}['addRevision'](_0x1078e3,_0x4d7554=0x0){this['_revisions']['add'](_0x1078e3,_0x4d7554);}['getRevision'](_0x481ea4){return this['_revisions']['get'](_0x481ea4);}['getRevisions'](_0xa59a96={'toJSON':!0x1}){const _0xf8f10f=Array['from'](this['_revisions']);return _0xf8f10f['reverse'](),_0xa59a96['toJSON']?_0xf8f10f['map'](_0x8db10=>_0x8db10['toJSON']()):_0xf8f10f;}['getIndex'](_0x2e1bbe){return this['_revisions']['getIndex'](_0x2e1bbe);}['getEarlierVisibleRevision'](_0xd8ce8d){const [,_0x4993e4]=this['getRevisionsIterator'](_0xd8ce8d,{'direction':'earlier'});return _0x4993e4;}['getLaterVisibleRevision'](_0x2b837c){const [,_0x246b28]=this['getRevisionsIterator'](_0x2b837c,{'direction':'later'});return _0x246b28;}['getRevisionsInDiff'](_0x31e605){const _0x4cfbea=[];for(const _0x341def of this['getRevisionsIterator'](_0x31e605['newRevisionId']))if(_0x4cfbea['push'](_0x341def),_0x341def['id']===_0x31e605['oldRevisionId'])break;return _0x4cfbea;}*['getRevisionsIterator'](_0x141b02,{direction:_0x103652='earlier',filter:_0x189144=()=>!0x0}={}){const _0x5268cc='earlier'===_0x103652?0x1:-0x1;let _0x57ec1c=this['_revisions']['get'](_0x141b02),_0x149fb0=this['getIndex'](_0x57ec1c);for(yield _0x57ec1c;_0x57ec1c;){if(_0x149fb0+=_0x5268cc,_0x57ec1c=this['getRevision'](_0x149fb0),!_0x57ec1c)return;_0x189144(_0x57ec1c)&&(yield _0x57ec1c);}}}class RevisionHistoryUtils extends _0x176a35{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x56887a,'c'],[_0x37282f,'a'],[_0x6df7a,'e'],[_0x48b4cb,'r'],[_0x52e48c,'u']]);['_typeCharToViewClass']=new Map([['c',_0x56887a],['a',_0x37282f],['e',_0x6df7a],['r',_0x48b4cb],['u',_0x52e48c]]);async['loadRevisionData'](_0x2f852f,_0x2a627a){if(_0x2f852f['diffData']||!_0x2a627a)return;const _0x2bea51=this['editor']['config']['get']('collaboration.channelId'),_0x3f53a9=await _0x2a627a['getRevision']({'channelId':_0x2bea51,'revisionId':_0x2f852f['id']});_0x2f852f['diffData']=_0x3f53a9['diffData'];}['getRevisionDocumentData'](_0x449f07){const _0x3db8cc={};for(const _0x368772 in _0x449f07['diffData']){if(_0x449f07['diffData'][_0x368772]['attachChange']&&!_0x449f07['diffData'][_0x368772]['attachChange']['isAttached'])continue;const _0x35054d=this['_removeRevisionMarkers'](JSON['parse'](_0x449f07['diffData'][_0x368772]['insertions'])),_0x1fe51a=this['editor']['editing']['view']['document'],_0x1458bf=new _0x2967c2(_0x1fe51a,_0x35054d['map'](_0x3e09d5=>this['_getViewFromDiffObj'](_0x3e09d5,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x3db8cc[_0x368772]=this['editor']['data']['processor']['toData'](_0x1458bf),this['editor']['data']['processor']['useFillerType']('default');}return _0x3db8cc;}['getRevisionRootsAttributes'](_0x58b5a8){const _0x502222={};for(const _0x244d8d in _0x58b5a8['diffData'])_0x58b5a8['diffData'][_0x244d8d]['attachChange']&&!_0x58b5a8['diffData'][_0x244d8d]['attachChange']['isAttached']||(_0x502222[_0x244d8d]=_0x58b5a8['diffData'][_0x244d8d]['attributesAfter']||{});return _0x502222;}['_getTypeCharForViewElement'](_0x5d7682){return this['_viewClassToTypeChar']['get'](_0x5d7682['constructor']);}['_getViewFromDiffObj'](_0x1c0724,_0x1c6932){const _0x3156a1=this['editor']['editing']['view']['document'];if('string'==typeof _0x1c0724)return new _0x3c1158(_0x3156a1,_0x1c0724);{let _0x1999fa,_0x52e716;_0x52e716='u'==_0x1c0724['type']||'r'==_0x1c0724['type']?[]:_0x1c0724['children']['map'](_0xad4409=>this['_getViewFromDiffObj'](_0xad4409,_0x1c6932));const _0x36a046=this['_typeCharToViewClass']['get'](_0x1c0724['type'])||_0x404663,_0x7010d=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x1999fa=new _0x36a046(_0x3156a1,_0x1c0724['name'],_0x1c0724['attributes'],_0x52e716),'u'==_0x1c0724['type']&&_0x1c0724['children'][0x0]){const _0x26b8cc=_0x1c0724['children'][0x0];if(_0x1999fa['render']=function(_0x1a5648){const _0x54b729=_0x1a5648['createElement']('div');return _0x54b729['innerHTML']=_0x26b8cc,_0x54b729['childNodes'][0x0];},_0x1c6932){const _0xde9f8e=new _0x2967c2(_0x3156a1);_0xde9f8e['_appendChild'](_0x1999fa);const _0xa8e8ac=Array['from'](_0x7010d['viewChildrenToDom'](_0xde9f8e,{'bind':!0x1})),_0x48e97d=_0x7010d['domDocument']['createElement']('div');_0x48e97d['append'](..._0xa8e8ac),_0x1999fa=Array['from'](_0x7010d['domChildrenToView'](_0x48e97d))[0x0];}}else{if('r'==_0x1c0724['type']&&_0x1c0724['children'][0x0]){const _0x52bb17=_0x1c0724['children'][0x0];if(_0x1999fa['render']=function(_0x34de3a){_0x34de3a['innerHTML']=_0x52bb17;},_0x1c6932){const _0x2fe596=new _0x2967c2(_0x3156a1);_0x2fe596['_appendChild'](_0x1999fa);const _0x13bde7=Array['from'](_0x7010d['viewChildrenToDom'](_0x2fe596,{'bind':!0x1})),_0xd2ce2f=_0x7010d['domDocument']['createElement']('div');_0xd2ce2f['append'](..._0x13bde7);const _0x69b326=Array['from'](_0x7010d['domChildrenToView'](_0xd2ce2f));_0x69b326['length']>0x1?_0x1999fa['_appendChild'](_0x69b326):_0x1999fa=_0x69b326[0x0];}}}if(_0x1c0724['customProperties']){for(const [_0x5c3cfc,_0x4f9d52]of _0x1c0724['customProperties'])_0x1999fa['_setCustomProperty'](_0x5c3cfc,_0x4f9d52);}const _0x4d95e9=void 0x0===_0x1c0724['fillerOffset']?null:_0x1c0724['fillerOffset'];return null!==_0x4d95e9&&(_0x1999fa['getFillerOffset']=()=>_0x4d95e9),_0x1999fa;}}['_makeModelFromViewString'](_0x127a51){const _0x2b0802=JSON['parse'](_0x127a51),_0x2a91a3=this['editor']['editing']['view']['document'],_0x5f3281=new _0x2967c2(_0x2a91a3,_0x2b0802['map'](_0x1956bc=>this['_getViewFromDiffObj'](_0x1956bc,!0x0)));return this['editor']['data']['toModel'](_0x5f3281);}['_removeRevisionMarkers'](_0x47b3d1){return(_0x47b3d1=_0x47b3d1['filter'](_0x7e2bbf=>!_0x7e2bbf['name']||'revision-start'!==_0x7e2bbf['name']&&'revision-end'!==_0x7e2bbf['name']))['forEach'](_0x1db75e=>{'string'!=typeof _0x1db75e&&(_0x1db75e['children']=this['_removeRevisionMarkers'](_0x1db75e['children']),_0x1db75e['attributes']=_0x1db75e['attributes']['filter'](_0x1392c7=>!_0x1392c7[0x0]['startsWith']('data-revision-')));}),_0x47b3d1;}}function ft(_0xdb3c11,_0x4a1f20,_0x47e718){const t=_0xdb3c11['t'];switch(_0x4a1f20){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'},_0x47e718);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x47e718);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x176a35{['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[_0x12edcd,RevisionsRepository,RevisionHistoryUtils,_0x2ba888];}constructor(_0x2ef2bc){super(_0x2ef2bc),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x40a33f=_0x3a9e51();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x40a33f},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 _0x1274e0=this['repository']['getRevision'](0x0),_0x306899=_0x1274e0&&null===_0x1274e0['creator']?_0x1274e0:null;if(this['_continueCurrentRevision']=!!_0x306899&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4061b3=this['_source']['getCurrentRevisionId'](),_0x3292df=this['repository']['getRevision'](_0x4061b3);if(_0x3292df)this['_startingVersion']=_0x3292df['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4afce0=this['_source']['history']['_operations']['find'](_0xbd23c2=>!_0xbd23c2['_isInit']),_0x19d6ce=_0x4afce0?_0x4afce0['baseVersion']:this['_source']['history']['version'];_0x1274e0?(_0x1274e0['toVersion']<_0x19d6ce&&_0x1274e0['_update']({'toVersion':_0x19d6ce}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x306899['id'],this['_startingVersion']=_0x306899['fromVersion']):(this['_startingVersion']=_0x1274e0['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x19d6ce,this['_continueCurrentRevision']=!0x1);}}else _0x306899&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x306899['toVersion'],this['editor']['model']['document']['history']['version']),_0x306899['fromVersion']===_0x306899['toVersion']?(0x0!==_0x306899['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x306899['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x306899['id'],this['_startingVersion']=_0x306899['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',_0x3db88d=>!_0x3db88d),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1307b3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x251c65;for(const _0x2553e8 in _0x1307b3){const _0x35f8c3=_0x2553e8,_0x3986f6=_0x1307b3[_0x35f8c3];if('revisionHistoryLicenseKeyValid'==_0x3986f6||'revisionHistoryLicenseKeyInvalid'==_0x3986f6||'revisionHistoryLicenseKeyExpired'==_0x3986f6||'revisionHistoryLicenseKeyDomainLimit'==_0x3986f6||'revisionHistoryLicenseKeyNotAllowed'==_0x3986f6||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3986f6||'revisionHistoryLicenseKeyUsageLimit'==_0x3986f6){delete _0x1307b3[_0x35f8c3],_0x251c65=_0x3986f6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x251c65&&_0x1307b3['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x251c65&&_0x1307b3['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x251c65&&_0x1307b3['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x251c65&&_0x1307b3['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x251c65&&_0x1307b3['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x251c65&&_0x1307b3['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x57071c=this['repository']['getRevision'](0x0),_0x28dc94=await this['getRevisionDocumentData'](_0x57071c),_0x562399=await this['getRevisionRootsAttributes'](_0x57071c);this['_replaceEditorDataWithRevisionData'](_0x28dc94,_0x562399);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x54868a){this['_source']=_0x54868a;}async['update'](){const _0x73783e=await this['_source']['getLatestVersion']();if(_0x73783e>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1e7b78=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x73783e});_0x1e7b78['authors']=_0x1e7b78['authorsIds']['map'](_0x2079d0=>this['editor']['plugins']['get']('Users')['getUser'](_0x2079d0)),this['currentRevision']['_update'](_0x1e7b78);}}async['saveRevision'](_0x4d11e7={},_0x104a07=null){const _0xb167da=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x104a07>this['currentRevision']['toVersion']&&(_0x104a07=null),null===_0x104a07&&(_0x104a07=await this['_source']['getLatestVersion']());const _0x2c66e0=this['_getFromVersion'](_0x104a07),_0x50863a=this['buildRevisionData']({'from':_0x2c66e0,'to':_0x104a07});if(this['currentRevision']['toVersion']<_0x104a07){const _0x4c8d7c=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x104a07,'to':_0x104a07});_0x4c8d7c['authors']=[],_0x4c8d7c['authorsIds']=[],_0x4c8d7c['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4c8d7c,!0x0),delete _0x4c8d7c['authors'],_0xb167da['push'](_0x4c8d7c);}_0x4d11e7['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4d11e7['name']=_0x4d11e7['name']||null,_0x4d11e7['id']=_0x4d11e7['id']||_0x3a9e51(),_0x4d11e7={..._0x4d11e7,..._0x50863a};const _0x29165b=this['addRevisionData'](_0x4d11e7);_0xb167da['push'](_0x4d11e7);const _0x4d754f=this['repository']['getIndex'](_0x29165b);if(0x0!==_0x4d754f){const _0x30d499=this['repository']['getRevision'](_0x4d754f-0x1);if(_0x30d499['fromVersion']!==_0x104a07){const _0x5be94b=this['_revisionDataBuilder']['getData'](_0x104a07,_0x30d499['toVersion']),_0x31936b={'id':_0x30d499['id'],'diffData':_0x5be94b['diffData'],'authorsIds':_0x5be94b['authorsIds'],'authors':_0x5be94b['authorsIds']['map'](_0x81d45f=>this['editor']['plugins']['get']('Users')['getUser'](_0x81d45f)),'fromVersion':_0x104a07};_0x30d499===this['currentRevision']&&(_0x31936b['createdAt']=new Date(_0x4d11e7['createdAt']['getTime']()+0xa)),_0x30d499['_update'](_0x31936b,!0x0),delete _0x31936b['authors'],_0xb167da['push'](_0x31936b);}}if(this['adapter']){for(const _0x402f01 of _0xb167da)this['_bufferUpdate'](_0x402f01['id'],_0x402f01,!0x0);this['sendBufferedUpdates']();}return _0x29165b;}['addRevisionData'](_0x44d2f4){const _0x314d55=this['repository']['createRevision'](_0x44d2f4);return this['adapter']&&_0x314d55['on']('_update',(_0x4f292c,_0x467368,_0x498a77)=>{_0x498a77||(this['_bufferUpdate'](_0x467368['id'],_0x467368,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x314d55,this['_findInsertionIndex'](_0x314d55)),_0x314d55;}async['getRevisionDocumentData'](_0xad7725){return await this['_utils']['loadRevisionData'](_0xad7725,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xad7725);}async['getRevisionRootsAttributes'](_0xeee811){return await this['_utils']['loadRevisionData'](_0xeee811,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0xeee811);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3d6008=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x299866=0x0;_0x299866<_0x3d6008['length'];_0x299866++){const _0x4c4bb6=_0x3d6008[_0x299866];let _0x2a6dd3=!0x1;for(const _0x374ee6 of Object['keys'](_0x4c4bb6))void 0x0===_0x4c4bb6[_0x374ee6]?delete _0x4c4bb6[_0x374ee6]:'id'!==_0x374ee6&&(_0x2a6dd3=!0x0);_0x2a6dd3||(_0x3d6008[_0x299866]=null);}if(_0x3d6008=_0x3d6008['filter'](_0x4c7565=>null!==_0x4c7565),!_0x3d6008['length'])return;for(let _0x143ac8=0x0;_0x143ac8<_0x3d6008['length'];_0x143ac8++){const _0x374e0f=_0x3d6008[_0x143ac8];void 0x0!==_0x374e0f['fromVersion']&&void 0x0===_0x374e0f['toVersion']&&(_0x374e0f['toVersion']=this['repository']['getRevision'](_0x374e0f['id'])['toVersion']),void 0x0!==_0x374e0f['toVersion']&&void 0x0===_0x374e0f['fromVersion']&&(_0x374e0f['fromVersion']=this['repository']['getRevision'](_0x374e0f['id'])['fromVersion']);}const _0x1cea90=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3d6008,_0x1cea90)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x248343=>{if(_0x248343){for(const _0x55ec6f of _0x248343)this['setRevisionData']({'id':_0x55ec6f['id'],'createdAt':_0x55ec6f['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0xc2cf7c=null,from:_0x5d43a1=null,to:_0x16f100=null}){_0x5d43a1=null!==_0x5d43a1?_0x5d43a1:_0xc2cf7c['fromVersion'],_0x16f100=null!==_0x16f100?_0x16f100:_0xc2cf7c['toVersion'];const _0x106bfc=this['_revisionDataBuilder']['getData'](_0x5d43a1,_0x16f100),_0x26d63e={'diffData':_0x106bfc['diffData'],'authorsIds':_0x106bfc['authorsIds'],'fromVersion':_0x5d43a1,'toVersion':_0x16f100};if(!_0xc2cf7c||_0x16f100!==_0xc2cf7c['toVersion']){const _0xe17f5c=_0x16f100-0x1,_0x43fce2=this['_source']['history']['getOperation'](_0xe17f5c);_0x26d63e['createdAt']=_0x43fce2&&_0x43fce2['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5d43a1===this['_loadedStateData']['fromVersion']){for(const _0x5e1185 of this['_loadedStateData']['authors'])_0x26d63e['authorsIds']['includes'](_0x5e1185['id'])||_0x26d63e['authorsIds']['push'](_0x5e1185['id']);}return _0x26d63e;}['_bufferUpdate'](_0x528faf,_0x2a5b54,_0x29cbef){if(this['_bufferedUpdates']['has'](_0x528faf)){const _0x1ebf0d=this['_bufferedUpdates']['get'](_0x528faf);_0x2a5b54=_0x29cbef?{..._0x1ebf0d,..._0x2a5b54}:{..._0x2a5b54,..._0x1ebf0d};}this['_bufferedUpdates']['set'](_0x528faf,_0x2a5b54);}['setRevisionData'](_0x21c37d){const _0x48f580=this['repository']['getRevision'](_0x21c37d['id']);if(_0x21c37d['createdAt']&&(_0x21c37d['createdAt']=new Date(_0x21c37d['createdAt'])),_0x21c37d['authorsIds']){const _0x31133d=this['editor']['plugins']['get']('Users');_0x21c37d['authors']=_0x21c37d['authorsIds']['map'](_0x3c0ce1=>_0x31133d['getUser'](_0x3c0ce1));}_0x48f580['_update'](_0x21c37d,!0x0);}['_createInitialRevision'](_0x2e7431){const _0x5a7e35=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5a7e35)this['_initialRevisionId']=_0x5a7e35['id'];else{const _0x39dc23=!this['editor']['model']['document']['roots']['find'](_0x5ca58b=>this['editor']['model']['hasContent'](_0x5ca58b)),_0x5eb3bd=this['editor']['plugins']['get']('Users')['me']['id'],_0x40a035=ft(this['editor']['locale'],_0x39dc23?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2e7431,'to':_0x2e7431,'id':this['_initialRevisionId'],'name':_0x40a035,'creatorId':_0x5eb3bd});}}['_createCurrentRevision'](_0x1f08e0){const _0x361606=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x361606),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1f08e0,'to':_0x1f08e0,'id':_0x361606,'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'](_0x1c0a8b,_0x5caccb){const _0x4b8090={},_0x165e92={},_0x2a5cc0=this['editor']['config']['get']('roots')||{};for(const [_0x212da4,_0x20d318]of Object['entries'](_0x2a5cc0))_0x20d318['lazyLoad']||(_0x4b8090[_0x212da4]=_0x20d318['initialData']??'',_0x165e92[_0x212da4]=_0x20d318['modelAttributes']||{});for(const _0x389660 of this['editor']['model']['document']['getRootNames']())_0x4b8090[_0x389660]??='',_0x165e92[_0x389660]??={};let _0x366cd3=!0x1;const _0x3760c1=Object['keys'](_0x4b8090),_0x3955ad=Object['keys'](_0x1c0a8b);for(const _0x688251 of _0x3760c1){if(_0x4b8090[_0x688251]!==_0x1c0a8b[_0x688251]&&''!==_0x4b8090[_0x688251]['trim']()){_0x366cd3=!0x0;break;}if(!_0x1b0b6b(_0x165e92[_0x688251],_0x5caccb[_0x688251])&&Object['keys'](_0x165e92[_0x688251])['length']>0x0){_0x366cd3=!0x0;break;}}_0x366cd3||(_0x366cd3=_0x3955ad['some'](_0x120570=>!this['editor']['model']['document']['getRoot'](_0x120570))),_0x366cd3&&_0xbee62d('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4b8090,'editorRootsAttributes':_0x165e92,'revisionData':_0x1c0a8b,'revisionRootsAttributes':_0x5caccb});for(const [_0x74418b,_0x81c4e6]of Object['entries'](_0x1c0a8b))this['editor']['config']['set']('roots.'+_0x74418b+'.initialData',_0x81c4e6);for(const [_0x549ceb,_0x4ccbcd]of Object['entries'](_0x5caccb))this['editor']['config']['set']('roots.'+_0x549ceb+'.modelAttributes',_0x4ccbcd);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x57f1ff=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x57f1ff['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x5d7d4a){const _0x5cc19a=this['repository']['getRevisions']();_0x5cc19a['reverse']();let _0x5f17cc=0x0;for(;_0x5f17cc<_0x5cc19a['length'];){const _0x1708b2=_0x5cc19a[_0x5f17cc];if(_0x1708b2===this['currentRevision']){_0x5f17cc++;continue;}if(_0x1708b2['id']===this['_initialRevisionId'])break;const _0x690a7c=_0x5d7d4a['toVersion']-_0x1708b2['toVersion']||_0x5d7d4a['fromVersion']-_0x1708b2['fromVersion'];if(_0x690a7c>0x0)break;if(_0x690a7c<0x0)_0x5f17cc++;else{if(!_0x5d7d4a['creator']&&_0x1708b2['creator'])break;if(_0x1708b2['creator']||!_0x5d7d4a['creator']){if(_0x5d7d4a['createdAt']>_0x1708b2['createdAt'])break;_0x5f17cc++;}else _0x5f17cc++;}}return _0x5f17cc;}['_getFromVersion'](_0x5ee3a0){const _0x4272d1=this['repository']['getRevisions']();_0x4272d1['reverse'](),_0x4272d1['shift']();const _0x49caf5=_0x4272d1['find'](_0x4ec9a7=>_0x4ec9a7['toVersion']<=_0x5ee3a0)['toVersion'];return _0x49caf5<this['_startingVersion']?this['_startingVersion']:_0x49caf5;}['_makeRevision']({name:_0x51ad0d,from:_0x3f8254,to:_0xfc540a,creatorId:_0x55291e,id:_0x531f27}){const _0x8b