@ckeditor/ckeditor5-source-editing-enhanced 48.3.0-alpha.5 → 48.3.0-alpha.6

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1ddc59,PendingActions as _0x1872e7,Plugin as _0x579330}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x1bec98,env as _0x438824,formatHtml as _0x20f422,uid as _0xf7647f}from'@ckeditor/ckeditor5-utils';import{IconSource as _0x4e67c5}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x491d16,MenuBarMenuListItemButtonView as _0x34c52a,View as _0x1585d2}from'@ckeditor/ckeditor5-ui';import{EditorView as _0x53f418,crosshairCursor as _0x580e2c,drawSelection as _0x286c53,dropCursor as _0x31ccad,highlightActiveLine as _0x3e8e68,highlightActiveLineGutter as _0x3788e6,highlightSpecialChars as _0x34dc59,keymap as _0x4781c5,lineNumbers as _0x2d3429,rectangularSelection as _0x35d962}from'@codemirror/view';import{Compartment as _0x23a66c,Transaction as _0x3b5728}from'@codemirror/state';import{bracketMatching as _0x3f92dd,defaultHighlightStyle as _0x4e833d,foldGutter as _0x445608,foldKeymap as _0x5e10be,indentOnInput as _0x5ec608,syntaxHighlighting as _0x10ccd2}from'@codemirror/language';import{defaultKeymap as _0x1b2a9c,history as _0x11d06b,historyKeymap as _0x279433,indentLess as _0x1a273d,indentMore as _0x51c22d,redo as _0x5e9c86,toggleTabFocusMode as _0x34de91,undo as _0x9d6477}from'@codemirror/commands';import{autocompletion as _0x3207e0,closeBrackets as _0x490156,closeBracketsKeymap as _0x14a4c1,completionKeymap as _0x3b30c2}from'@codemirror/autocomplete';import{html as _0x219b7c}from'@codemirror/lang-html';import{markdown as _0x202c25}from'@codemirror/lang-markdown';import{oneDark as _0xad4d44}from'@codemirror/theme-one-dark';function Q(_0x2a1e34,_0x3c06f6){const t=_0x2a1e34['t'];switch(_0x3c06f6){case'Edit\x20source\x20modal\x20label':return t({'string':'Edit\x20source','id':'Edit\x20source\x20modal\x20label'});case'Source':return t('Source');case'Source\x20Editing\x20Enhanced':return t('Source\x20Editing\x20Enhanced');case'Copy\x20line\x20down':return t('Copy\x20line\x20down');case'Copy\x20line\x20up':return t('Copy\x20line\x20up');case'Delete\x20line':return t('Delete\x20line');case'Indent\x20less':return t('Indent\x20less');case'Indent\x20more':return t('Indent\x20more');case'Fold\x20all':return t('Fold\x20all');case'Fold\x20code\x20(current\x20level)':return t('Fold\x20code\x20(current\x20level)');case'Move\x20line\x20down':return t('Move\x20line\x20down');case'Move\x20line\x20up':return t('Move\x20line\x20up');case'Redo\x20(keystroke)':return t({'id':'Redo\x20(keystroke)','string':'Redo'});case'Select\x20line':return t('Select\x20line');case'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':return t('Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode');case'Toggle\x20block\x20comment':return t('Toggle\x20block\x20comment');case'Toggle\x20comment':return t('Toggle\x20comment');case'Undo\x20(keystroke)':return t({'id':'Undo\x20(keystroke)','string':'Undo'});case'Unfold\x20all':return t('Unfold\x20all');case'Unfold\x20code\x20(current\x20level)':return t('Unfold\x20code\x20(current\x20level)');case'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':return t('Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.');case'Cancel':return t('Cancel');case'Save':return t('Save');default:return _0x3c06f6;}}function B(_0x567279){const _0x210b4c=_0x567279['editing']['view']['document']['roots'],_0x1274a0=_0x210b4c['length'];if(0x0===_0x1274a0)throw new _0x1bec98('source-editing-enhanced-editor-no-root',_0x567279);return 0x1===_0x1274a0?_0x210b4c['first']['rootName']:Array['from'](_0x567279['editing']['view']['document']['selection']['getRanges']())[0x0]['root']['rootName'];}function Y(_0x1b868e){return J(_0x1b868e['replace'](/^[\n\s]*/g,''))?_0x1b868e['replace'](/\s+/g,''):_0x1b868e;}function J(_0x1fbd29){return _0x1fbd29['startsWith']('<');}function X(_0x59069e){const _0xb42804=[_0x53f418['lineWrapping'],_0x3207e0(),_0x3f92dd(),_0x490156(),_0x580e2c(),_0x286c53(),_0x31ccad(),_0x2d3429(),_0x445608(),_0x3e8e68(),_0x3788e6(),_0x34dc59(),_0x11d06b(),_0x5ec608(),_0x35d962(),_0x10ccd2(_0x4e833d,{'fallback':!0x0})],_0x2761b0=new _0x23a66c();_0xb42804['push'](_0x2761b0['of'](_0x53f418['editable']['of'](!0x0))),'html'===_0x59069e['syntaxLanguage']?_0xb42804['push'](_0x219b7c()):_0xb42804['push'](_0x202c25());const _0x159e80=(_0x3b4f3b=_0x59069e['theme'])&&'default'!==_0x3b4f3b?'dark'===_0x3b4f3b?_0xad4d44:_0x3b4f3b:null;var _0x3b4f3b;_0x159e80&&_0xb42804['push'](_0x159e80),_0xb42804['push'](_0x4781c5['of']([..._0x14a4c1,..._0x1b2a9c,..._0x279433,..._0x5e10be,..._0x3b30c2,{'key':'Tab','run':_0x51c22d,'shift':_0x1a273d,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-y','mac':'Cmd-y','run':_0x5e9c86,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-Shift-z','mac':'Cmd-Shift-z','run':_0x5e9c86,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-z','mac':'Cmd-z','run':_0x9d6477,'preventDefault':!0x0,'stopPropagation':!0x0}]));const _0x535854=new _0x53f418({'extensions':_0xb42804,'parent':_0x59069e['parent']});return _0x34de91(_0x535854),{'focus':()=>{_0x535854['dispatch']({'selection':{'anchor':0x0},'scrollIntoView':!0x0}),_0x535854['focus']();},'getData':()=>_0x535854['state']['doc']['toString'](),'setData':_0x533cf0=>{_0x535854['dispatch']({'changes':{'from':0x0,'to':_0x535854['state']['doc']['length'],'insert':_0x533cf0},'annotations':_0x3b5728['addToHistory']['of'](!0x1)});},'setReadOnly':_0x34f4f0=>{_0x535854['dispatch']({'effects':[_0x2761b0['reconfigure'](_0x53f418['editable']['of'](!_0x34f4f0))]});},'destroy':()=>{_0x535854['destroy']();},'instance':_0x535854};}var Z=class extends _0x1585d2{['_codeEditorApi']=null;['_options'];constructor(_0x2bdd93,_0x50634c){super(_0x2bdd93),this['_options']=_0x50634c,this['set']('isReadOnly',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-code-editor'],'tabindex':-0x1}});}['render'](){super['render'](),this['_codeEditorApi']=X({'parent':this['element'],'syntaxLanguage':this['_options']['syntaxLanguage'],'theme':this['_options']['theme']}),this['on']('change:isReadOnly',(_0x38a1d9,_0x434264,_0x2bf6c0)=>{this['setReadOnly'](_0x2bf6c0);});}['destroy'](){super['destroy'](),this['_codeEditorApi']['destroy'](),this['_codeEditorApi']=null;}['focus'](){this['isReadOnly']?this['element']['focus']():this['_codeEditorApi']['focus']();}['getData'](){return this['_codeEditorApi']['getData']();}['setData'](_0x402dad){this['_codeEditorApi']['setData'](_0x402dad);}['setReadOnly'](_0x879e32){this['_codeEditorApi']['setReadOnly'](_0x879e32);}};const G='SourceEditingEnhancedMode';var W=class extends _0x1ddc59{constructor(_0x4adc7b){super(_0x4adc7b),this['affectsData']=!0x1,this['editor']['plugins']['get'](_0x1872e7)['on']('change:hasAny',(_0xfb1de2,_0x402112,_0x4dc48f)=>{_0x4dc48f?this['forceDisabled']('pendingActions'):this['clearForceDisabled']('pendingActions');});}['_disableCommands'](){const _0x226fb5=this['editor'];for(const _0x1ae145 of _0x226fb5['commands']['names']())['replaceSource','editSource']['includes'](_0x1ae145)||_0x226fb5['commands']['get'](_0x1ae145)['forceDisabled'](G);}['_enableCommands'](){const _0x368e69=this['editor'];for(const _0x1f83bd of _0x368e69['commands']['commands']())_0x1f83bd['clearForceDisabled'](G);}['refresh'](){this['isEnabled']=!0x0;}['execute'](){const _0x3a2bc6=this['editor'],_0x151db2=_0x3a2bc6['locale'],_0x55f410=_0x3a2bc6['plugins']['get']('Dialog'),_0x18febf=B(_0x3a2bc6),_0xdeac3e=J(_0x20240f=_0x3a2bc6['data']['get']({'rootName':_0x18febf}))?_0x20f422(_0x20240f):_0x20240f;var _0x20240f;const _0x52bf2e=new Z(_0x151db2,{'syntaxLanguage':_0x3a2bc6['plugins']['has']('Markdown')?'markdown':'html','theme':_0x3a2bc6['config']['get']('sourceEditingEnhanced.theme')});let _0x1dc496=!0x0;const _0x39a3d8=_0x4ceb48=>{if(_0x1dc496&&Y(_0x52bf2e['getData']())!==Y(_0xdeac3e))return window['confirm'](Q(_0x151db2,'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.'))?void 0x0:_0x4ceb48['stop']();};_0x55f410['show']({'id':'sourceEditingEnhanced','title':Q(_0x151db2,'Edit\x20source\x20modal\x20label'),'isModal':!0x0,'className':'ck-source-editing-enhanced-dialog','content':_0x52bf2e,'actionButtons':[{'label':Q(_0x151db2,'Cancel'),'withText':!0x0,'onExecute':()=>{_0x55f410['hide']();}},{'label':Q(_0x151db2,'Save'),'class':'ck-button-action','withText':!0x0,'onExecute':()=>{const _0x5a72cf=Y(_0x52bf2e['getData']())!==Y(_0xdeac3e);_0x5a72cf&&_0x3a2bc6['execute']('replaceSource',_0x52bf2e['getData']()),_0x1dc496=!0x1,_0x55f410['hide'](),_0x5a72cf&&'editables'in _0x3a2bc6['ui']['view']&&_0x3a2bc6['ui']['view']['editables'][_0x18febf]['element']['focus']();},'onCreate':_0x25153b=>{_0x25153b['set']('isEnabled',!_0x3a2bc6['isReadOnly']),_0x25153b['bind']('isEnabled')['to'](_0x3a2bc6,'isReadOnly',this,'isEnabled',(_0xacd0ce,_0x25ac78)=>!_0xacd0ce&&_0x25ac78);}}],'onHide':()=>{this['_enableCommands'](),_0x55f410['off']('hide',_0x39a3d8),_0x52bf2e['destroy']();},'onShow':()=>{_0x52bf2e['bind']('isReadOnly')['to'](_0x3a2bc6,'isReadOnly',this,'isEnabled',(_0x20d504,_0x14dc16)=>_0x20d504||!_0x14dc16),_0x52bf2e['setData'](_0xdeac3e),_0x52bf2e['focus'](),_0x55f410['on']('hide',_0x39a3d8,{'priority':'highest'}),this['_disableCommands']();}});}},$=class extends _0x579330{static get['pluginName'](){return'SourceEditingEnhancedUI';}static get['requires'](){return[_0x1872e7];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x3c2940=this['editor'],_0xfa38fa=_0x3c2940['locale'],_0x3b2f8d=new W(_0x3c2940);_0x3c2940['commands']['add']('editSource',_0x3b2f8d),_0x3c2940['ui']['componentFactory']['add']('sourceEditingEnhanced',()=>{const _0x28bc55=this['_createButton'](_0x491d16,_0x3b2f8d);return _0x28bc55['set']({'label':Q(_0xfa38fa,'Source'),'icon':_0x4e67c5,'tooltip':Q(_0xfa38fa,'Edit\x20source\x20modal\x20label'),'class':'ck-source-editing-enhanced-button'}),_0x28bc55;}),_0x3c2940['ui']['componentFactory']['add']('menuBar:sourceEditingEnhanced',()=>{const _0x52fff6=this['_createButton'](_0x34c52a,_0x3b2f8d,!0x0);return _0x52fff6['set']({'label':Q(_0xfa38fa,'Edit\x20source\x20modal\x20label'),'icon':_0x4e67c5,'role':'menuitemcheckbox'}),_0x52fff6;}),this['_registerKeybindings']();}['afterInit'](){!async function(_0xc785cc){const _0x1f6807='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x328d36=0x78e40,_0x1b4091=window['Date']['now'](),_0x30c56f=_0xc785cc['editor'],_0x32d2a6=new window['Promise'](_0x3d2363=>{_0x30c56f['once']('ready',_0x3d2363);}),_0x3680e8={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x366c34=_0x30c56f['config']['get']('licenseKey');async function _0x35c54e(){let _0x1a0a4c,_0x5de6cc=null,_0x2e63a8=null;try{return'GPL'==_0x366c34?'NotAllowed':(_0x1a0a4c=_0x988bd3(),_0x1a0a4c?(_0x1a0a4c['usageEndpoint']&&(_0x2e63a8=_0x44bb9e(_0x1a0a4c['usageEndpoint'],_0x1a0a4c['jti'])),await _0x77a432()?_0x52e756()?_0x32b5a4()?'Expired':_0x36e5c3()?('evaluation'==_0x1a0a4c['licenseType']&&(_0x5de6cc=_0x509c97('EvaluationLimit')),await _0x79bd4f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x32b5a4(){const _0x19af20=['evaluation','trial']['includes'](_0x1a0a4c['licenseType'])?_0x1b4091/0x3e8:0xe10*_0x328d36;return _0x1a0a4c['exp']<_0x19af20;}function _0x52e756(){const _0x9eaea6=_0x1a0a4c['features'];return!!_0x9eaea6&&(!!_0x9eaea6['includes']('*')||!!_0x9eaea6['includes']('SEE'));}function _0x36e5c3(){const _0x2832f6=_0x1a0a4c['licensedHosts'];if(!_0x2832f6||0x0==_0x2832f6['length'])return!0x0;const {hostname:_0x582d0b}=new URL(window['location']['href']);if(_0x2832f6['includes'](_0x582d0b))return!0x0;const _0x5c045a=_0x582d0b['split']('.');return _0x2832f6['filter'](_0x35473e=>_0x35473e['includes']('*'))['map'](_0x4fea3c=>_0x4fea3c['split']('.'))['filter'](_0x4cfc59=>_0x4cfc59['length']<=_0x5c045a['length'])['map'](_0x42dc02=>Array(_0x5c045a['length']-_0x42dc02['length'])['fill']('*'===_0x42dc02[0x0]?'*':'')['concat'](_0x42dc02))['some'](_0x8f5661=>_0x5c045a['every']((_0x507af9,_0x39f47b)=>_0x8f5661[_0x39f47b]===_0x507af9||'*'===_0x8f5661[_0x39f47b]));}function _0x79bd4f(){return _0x5de6cc&&_0x2e63a8?new window['Promise']((_0x1b89ad,_0x25e7af)=>{_0x5de6cc['then'](_0x1b89ad,_0x25e7af),_0x2e63a8['then'](_0x1774b0=>{'Valid'!=_0x1774b0&&_0x1b89ad(_0x1774b0);},_0x25e7af);}):_0x5de6cc||_0x2e63a8||'Valid';}}function _0x44bb9e(_0x5681f3,_0x2294a9){return new window['Promise'](_0x1363f5=>{if(_0x2466ec())return _0x1363f5('Valid');_0x3096a7(),_0x30c56f['decorate']('_sendUsageRequest');let _0x1e7efb=!0x1;const _0x15bf52=_0xf7647f();function _0x1c8dc4(_0x11c7a8){return!!_0x11c7a8&&('object'==typeof _0x11c7a8||'function'==typeof _0x11c7a8)&&'function'==typeof _0x11c7a8['then']&&'function'==typeof _0x11c7a8['catch'];}function _0x148594(_0x4c09cc){_0x5cff24(_0x4c09cc)['then'](_0x58e0e1=>_0x58e0e1&&'ok'==_0x58e0e1['status']?_0xb74b02(_0x3e8ee3(_0x15bf52+_0x2294a9))!=_0x58e0e1['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5b0437=>(_0x51021f(),_0x5b0437),()=>{const _0x266cb2=_0x440fc5();return null==_0x266cb2?(_0x51021f(),'Valid'):_0x1b4091-_0x266cb2>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1363f5)['catch'](()=>{_0x1363f5('UsageLimit');});const _0x5097d5=0x36ee80;function _0x51021f(){const _0x13d9ab='llct-'+_0xb74b02(_0x3e8ee3(_0x5681f3)),_0x6b59ca=_0x4f2bda(_0xb74b02(window['Math']['ceil'](_0x1b4091/_0x5097d5)));window['localStorage']['setItem'](_0x13d9ab,_0x6b59ca);}function _0x440fc5(){const _0x515e4e='llct-'+_0xb74b02(_0x3e8ee3(_0x5681f3)),_0x194c49=window['localStorage']['getItem'](_0x515e4e);return _0x194c49?window['parseInt'](_0x4f2bda(_0x194c49),0x10)*_0x5097d5:null;}function _0x5cff24(_0x503d34){return new window['Promise']((_0x3cef74,_0x1017a7)=>{_0x503d34['then'](_0x3cef74,_0x1017a7),window['setTimeout'](_0x1017a7,0x1d4c0);});}}_0x30c56f['on']('_sendUsageRequest',(_0x222ef3,_0x5b42f1)=>{if(_0x5b42f1[0x0]!=_0x5681f3)return _0x1363f5('UsageLimit');_0x5b42f1[0x1]={..._0x5b42f1[0x1],'requestId':_0x15bf52};},{'priority':'high'}),_0x30c56f['on']('_sendUsageRequest',_0x547ec0=>{_0x1c8dc4(_0x547ec0['return'])&&(_0x1e7efb=!0x0,_0x148594(_0x547ec0['return']));},{'priority':'low'}),_0x32d2a6['then'](()=>{_0x1e7efb||_0x1363f5('UsageLimit');});});function _0x2466ec(){return'auto'==_0x30c56f['editing']['view']['_overlayModeHint'];}function _0x3096a7(){_0x30c56f['editing']['view']['_overlayModeHint']='auto';}}function _0x509c97(_0x3af9af){const _0x29dd62=[new window['Promise'](_0x3bcdd8=>setTimeout(_0x3bcdd8,0x93ecc)),_0x32d2a6['then'](()=>new window['Promise'](_0x40f755=>{let _0x14f189=0x0;_0x30c56f['model']['on']('applyOperation',(_0x31b3e4,_0x26aeba)=>{_0x26aeba[0x0]['isDocumentOperation']&&_0x14f189++,0x5e8==_0x14f189&&(_0x40f755(),_0x31b3e4['off']());});}))];return window['Promise']['race'](_0x29dd62)['then'](()=>_0x3af9af);}async function _0x74e33(){await _0x32d2a6,_0x30c56f['model']['change']=_0x1325d0,_0x30c56f['model']['enqueueChange']=_0x1325d0,_0x30c56f['enableReadOnlyMode']('model');}function _0x477795(_0x318e50){const _0x14063a=_0x4f2da9();_0x30c56f[_0x14063a]='sourceEditingEnhancedLicenseKey'+_0x318e50,'Valid'!=_0x318e50&&_0x74e33();}function _0x4f2da9(){const _0x419c12=window['String'](window['performance']['now']())['replace']('.','');let _0x36c26f='N';for(let _0x45fd95=0x0;_0x45fd95<_0x419c12['length'];_0x45fd95+=0x2){let _0x21fa8d=window['parseInt'](_0x419c12['substring'](_0x45fd95,_0x45fd95+0x2));_0x21fa8d>=0x3e&&(_0x21fa8d-=0x3e),_0x36c26f+=_0x1f6807[_0x21fa8d];}return _0x36c26f;}function _0x988bd3(){const _0x2634b4=_0x366c34['split']('.');if(0x3!=_0x2634b4['length'])return null;return _0x365ab9(_0x2634b4[0x1]);function _0x365ab9(_0x2db03f){const _0x46247c=_0x30162e(_0x2db03f);return _0x46247c&&_0x2522f7()?_0x46247c:null;function _0x2522f7(){const _0x43ded2=_0x46247c['jti'],_0x467488=window['parseInt'](_0x43ded2['substring'](_0x43ded2['length']-0x8),0x10),_0x181185={..._0x46247c,'jti':_0x43ded2['substring'](0x0,_0x43ded2['length']-0x8)};return delete _0x181185['vc'],_0x3e8ee3(_0x181185)==_0x467488;}}}async function _0x77a432(){let _0x3c98ac=!0x0;try{const [_0x49cd1f,_0x517aae,_0x56b870]=_0x366c34['split']('.');return _0x461a95(_0x49cd1f),await _0x1548ed(_0x49cd1f,_0x517aae,_0x56b870),_0x3c98ac;}catch{return!0x1;}function _0x461a95(_0x37acea){const _0x441304=_0x30162e(_0x37acea);_0x441304&&'ES256'==_0x441304['alg']||(_0x3c98ac=!0x1);}async function _0x1548ed(_0x3239f5,_0x1e80ea,_0x15a677){const _0x13a324=window['Uint8Array']['from'](_0x73176e(_0x15a677),_0x2aae45=>_0x2aae45['charCodeAt'](0x0)),_0x29e8a2=new window['TextEncoder']()['encode'](_0x3239f5+'.'+_0x1e80ea),_0x5a8b71=window['crypto']['subtle'];if(!_0x5a8b71)return;const _0x3624c7=await _0x5a8b71['importKey']('jwk',_0x3680e8,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5a8b71['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3624c7,_0x13a324,_0x29e8a2)||(_0x3c98ac=!0x1);}}function _0x30162e(_0x89297f){return _0x89297f['startsWith']('ey')?JSON['parse'](_0x73176e(_0x89297f)):null;}function _0x73176e(_0x33e80f){return window['atob'](_0x33e80f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3e8ee3(_0x83190e){let _0x57ddc7=0x1505;function _0x3fe3c8(_0x2610e9){for(let _0x5c1e20=0x0;_0x5c1e20<_0x2610e9['length'];_0x5c1e20++){const _0x13d3cf=_0x2610e9['charCodeAt'](_0x5c1e20);_0x57ddc7=(_0x57ddc7<<0x5)+_0x57ddc7+_0x13d3cf,_0x57ddc7&=_0x57ddc7;}}function _0x5c06ec(_0x9625fa){Array['isArray'](_0x9625fa)?_0x9625fa['forEach'](_0x5c06ec):_0x9625fa&&'object'==typeof _0x9625fa?Object['entries'](_0x9625fa)['sort']()['forEach'](([_0x1abb01,_0x2d346b])=>{_0x3fe3c8(_0x1abb01),_0x5c06ec(_0x2d346b);}):_0x3fe3c8(window['String'](_0x9625fa));}return _0x5c06ec(_0x83190e),_0x57ddc7>>>0x0;}function _0xb74b02(_0x29a62d){return _0x29a62d['toString'](0x10)['padStart'](0x8,'0');}function _0x4f2bda(_0x4aa12d){return _0x4aa12d['split']('')['reverse']()['join']('');}function _0x1325d0(){}_0x477795(await _0x35c54e());}(this);}['_createButton'](_0x55d24e,_0x561c8f,_0x2ca0d0=!0x1){const _0x4bef37=new _0x55d24e(this['editor']['locale']);return _0x4bef37['set']({'withText':_0x2ca0d0,'isToggleable':!0x1}),_0x4bef37['bind']('isEnabled')['to'](_0x561c8f,'isEnabled'),this['listenTo'](_0x4bef37,'execute',()=>_0x561c8f['execute']()),_0x4bef37;}['_registerKeybindings'](){const _0xf52464=this['editor']['locale'];this['editor']['accessibility']['addKeystrokeInfoCategory']({'id':'sourceEditingEnhanced','label':Q(_0xf52464,'Source\x20Editing\x20Enhanced')});const _0x44d762=_0x438824['isMac']||_0x438824['isiOS'];this['editor']['accessibility']['addKeystrokeInfos']({'categoryId':'sourceEditingEnhanced','keystrokes':[{'label':Q(_0xf52464,'Copy\x20line\x20down'),'keystroke':'Shift+Alt+ArrowDown'},{'label':Q(_0xf52464,'Copy\x20line\x20up'),'keystroke':'Shift+Alt+ArrowUp'},{'label':Q(_0xf52464,'Delete\x20line'),'keystroke':'Shift+Ctrl+K'},{'label':Q(_0xf52464,'Indent\x20less'),'keystroke':'Ctrl+['},{'label':Q(_0xf52464,'Indent\x20more'),'keystroke':'Ctrl+]'},{'label':Q(_0xf52464,'Fold\x20all'),'keystroke':'Ctrl!+Alt+['},{'label':Q(_0xf52464,'Fold\x20code\x20(current\x20level)'),'keystroke':_0x44d762?'Cmd+Alt+[':'Ctrl+Shift+['},{'label':Q(_0xf52464,'Move\x20line\x20down'),'keystroke':'Alt+ArrowDown'},{'label':Q(_0xf52464,'Move\x20line\x20up'),'keystroke':'Alt+ArrowUp'},{'label':Q(_0xf52464,'Redo\x20(keystroke)'),'keystroke':[['Ctrl+Shift+Z'],['Ctrl+Y']]},{'label':Q(_0xf52464,'Select\x20line'),'keystroke':_0x44d762?'Ctrl!+L':'Alt+L'},{'label':Q(_0xf52464,'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode'),'keystroke':_0x44d762?'Alt+Shift+M':'Ctrl+M'},{'label':Q(_0xf52464,'Toggle\x20block\x20comment'),'keystroke':'Shift+Alt+A'},{'label':Q(_0xf52464,'Toggle\x20comment'),'keystroke':'Ctrl+/'},{'label':Q(_0xf52464,'Undo\x20(keystroke)'),'keystroke':'Ctrl+Z'},{'label':Q(_0xf52464,'Unfold\x20all'),'keystroke':'Ctrl!+Alt+]'},{'label':Q(_0xf52464,'Unfold\x20code\x20(current\x20level)'),'keystroke':_0x44d762?'Cmd+Alt+]':'Ctrl+Shift+]'}]});}},ee=class extends _0x1ddc59{constructor(_0x4240b4){super(_0x4240b4),this['refresh']();}['refresh'](){this['isEnabled']=!this['editor']['isReadOnly'];}['execute'](_0x41c006,_0x1736ef){const _0x542ed7=this['editor'],_0x541d07=_0x1736ef?.['rootName']??B(_0x542ed7);_0x542ed7['data']['set']({[_0x541d07]:_0x41c006},{'batchType':{'isUndoable':!0x0},'suppressErrorInCollaboration':!0x0});}},te=class extends _0x579330{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SourceEditingEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[$];}constructor(_0x5aad08){super(_0x5aad08),_0x5aad08['config']['define']('sourceEditingEnhanced.allowCollaborationFeatures',!0x1);}['init'](){this['_checkCompatibility'](),this['editor']['commands']['add']('replaceSource',new ee(this['editor'])),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x201374=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e89ca;for(const _0x4fb9e4 in _0x201374){const _0x3f9f33=_0x4fb9e4,_0x149258=_0x201374[_0x3f9f33];if('sourceEditingEnhancedLicenseKeyValid'==_0x149258||'sourceEditingEnhancedLicenseKeyInvalid'==_0x149258||'sourceEditingEnhancedLicenseKeyExpired'==_0x149258||'sourceEditingEnhancedLicenseKeyDomainLimit'==_0x149258||'sourceEditingEnhancedLicenseKeyNotAllowed'==_0x149258||'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0x149258||'sourceEditingEnhancedLicenseKeyUsageLimit'==_0x149258){delete _0x201374[_0x3f9f33],_0x1e89ca=_0x149258,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'sourceEditingEnhancedLicenseKeyInvalid'==_0x1e89ca&&_0x201374['_showLicenseError']('invalid'),'sourceEditingEnhancedLicenseKeyExpired'==_0x1e89ca&&_0x201374['_showLicenseError']('expired'),'sourceEditingEnhancedLicenseKeyDomainLimit'==_0x1e89ca&&_0x201374['_showLicenseError']('domainLimit'),'sourceEditingEnhancedLicenseKeyNotAllowed'==_0x1e89ca&&_0x201374['_showLicenseError']('featureNotAllowed','SourceEditingEnhanced'),'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0x1e89ca&&_0x201374['_showLicenseError']('evaluationLimit'),'sourceEditingEnhancedLicenseKeyUsageLimit'==_0x1e89ca&&_0x201374['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_checkCompatibility'](){const _0x444c48=this['editor'],_0x39052a=_0x444c48['config']['get']('sourceEditingEnhanced.allowCollaborationFeatures');if(!_0x39052a&&_0x444c48['plugins']['has']('RealTimeCollaborativeEditing'))throw new _0x1bec98('source-editing-enhanced-incompatible-with-real-time-collaboration',null);!_0x39052a&&['CommentsEditing','TrackChangesEditing','RevisionHistory']['some'](_0x2da09b=>_0x444c48['plugins']['has'](_0x2da09b))&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20at\x20least\x20one\x20of\x20the\x20collaboration\x20features.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20collaboration\x20features.'),_0x444c48['plugins']['has']('RestrictedEditingModeEditing')&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20restricted\x20editing\x20feature.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20enhanced\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20restricted\x20editing\x20feature.');}};export{W as EditSourceCommand,ee as ReplaceSourceCommand,te as SourceEditingEnhanced};
23
+ import{Command as _0x4e4c57,PendingActions as _0x20b0cc,Plugin as _0x3e0f24}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x5c0d9c,env as _0x345c76,formatHtml as _0x2164e3,uid as _0x297b7f}from'@ckeditor/ckeditor5-utils';import{IconSource as _0x21fcba}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0xfec814,MenuBarMenuListItemButtonView as _0x595db2,View as _0x2acbcc}from'@ckeditor/ckeditor5-ui';import{EditorView as _0xe8f632,crosshairCursor as _0x20df4c,drawSelection as _0x397fb8,dropCursor as _0x54ac4d,highlightActiveLine as _0x38fb63,highlightActiveLineGutter as _0x4d6014,highlightSpecialChars as _0x56ce1b,keymap as _0x5b0c6d,lineNumbers as _0x569343,rectangularSelection as _0xe9271b}from'@codemirror/view';import{Compartment as _0x3bbbd5,Transaction as _0x447b1d}from'@codemirror/state';import{bracketMatching as _0x17c82d,defaultHighlightStyle as _0xc085de,foldGutter as _0x2428d8,foldKeymap as _0x342175,indentOnInput as _0x88c300,syntaxHighlighting as _0x3b47ac}from'@codemirror/language';import{defaultKeymap as _0x2d23e3,history as _0x489f9,historyKeymap as _0x43d5d4,indentLess as _0x405305,indentMore as _0x469866,redo as _0x26d796,toggleTabFocusMode as _0x46c137,undo as _0x5d2288}from'@codemirror/commands';import{autocompletion as _0x4e760f,closeBrackets as _0x52cf32,closeBracketsKeymap as _0x20a02c,completionKeymap as _0x308c9d}from'@codemirror/autocomplete';import{html as _0xde4482}from'@codemirror/lang-html';import{markdown as _0x2756b8}from'@codemirror/lang-markdown';import{oneDark as _0x53d88c}from'@codemirror/theme-one-dark';function Q(_0x648cf1,_0x48bdfd){const t=_0x648cf1['t'];switch(_0x48bdfd){case'Edit\x20source\x20modal\x20label':return t({'string':'Edit\x20source','id':'Edit\x20source\x20modal\x20label'});case'Source':return t('Source');case'Source\x20Editing\x20Enhanced':return t('Source\x20Editing\x20Enhanced');case'Copy\x20line\x20down':return t('Copy\x20line\x20down');case'Copy\x20line\x20up':return t('Copy\x20line\x20up');case'Delete\x20line':return t('Delete\x20line');case'Indent\x20less':return t('Indent\x20less');case'Indent\x20more':return t('Indent\x20more');case'Fold\x20all':return t('Fold\x20all');case'Fold\x20code\x20(current\x20level)':return t('Fold\x20code\x20(current\x20level)');case'Move\x20line\x20down':return t('Move\x20line\x20down');case'Move\x20line\x20up':return t('Move\x20line\x20up');case'Redo\x20(keystroke)':return t({'id':'Redo\x20(keystroke)','string':'Redo'});case'Select\x20line':return t('Select\x20line');case'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':return t('Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode');case'Toggle\x20block\x20comment':return t('Toggle\x20block\x20comment');case'Toggle\x20comment':return t('Toggle\x20comment');case'Undo\x20(keystroke)':return t({'id':'Undo\x20(keystroke)','string':'Undo'});case'Unfold\x20all':return t('Unfold\x20all');case'Unfold\x20code\x20(current\x20level)':return t('Unfold\x20code\x20(current\x20level)');case'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':return t('Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.');case'Cancel':return t('Cancel');case'Save':return t('Save');default:return _0x48bdfd;}}function B(_0x3c2a87){const _0x5eb070=_0x3c2a87['editing']['view']['document']['roots'],_0x1f96bc=_0x5eb070['length'];if(0x0===_0x1f96bc)throw new _0x5c0d9c('source-editing-enhanced-editor-no-root',_0x3c2a87);return 0x1===_0x1f96bc?_0x5eb070['first']['rootName']:Array['from'](_0x3c2a87['editing']['view']['document']['selection']['getRanges']())[0x0]['root']['rootName'];}function Y(_0x333cdc){return J(_0x333cdc['replace'](/^[\n\s]*/g,''))?_0x333cdc['replace'](/\s+/g,''):_0x333cdc;}function J(_0x5c4f41){return _0x5c4f41['startsWith']('<');}function X(_0x5edee3){const _0x88d166=[_0xe8f632['lineWrapping'],_0x4e760f(),_0x17c82d(),_0x52cf32(),_0x20df4c(),_0x397fb8(),_0x54ac4d(),_0x569343(),_0x2428d8(),_0x38fb63(),_0x4d6014(),_0x56ce1b(),_0x489f9(),_0x88c300(),_0xe9271b(),_0x3b47ac(_0xc085de,{'fallback':!0x0})],_0x134b21=new _0x3bbbd5();_0x88d166['push'](_0x134b21['of'](_0xe8f632['editable']['of'](!0x0))),'html'===_0x5edee3['syntaxLanguage']?_0x88d166['push'](_0xde4482()):_0x88d166['push'](_0x2756b8());const _0x3e0fd6=(_0x2d01b4=_0x5edee3['theme'])&&'default'!==_0x2d01b4?'dark'===_0x2d01b4?_0x53d88c:_0x2d01b4:null;var _0x2d01b4;_0x3e0fd6&&_0x88d166['push'](_0x3e0fd6),_0x88d166['push'](_0x5b0c6d['of']([..._0x20a02c,..._0x2d23e3,..._0x43d5d4,..._0x342175,..._0x308c9d,{'key':'Tab','run':_0x469866,'shift':_0x405305,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-y','mac':'Cmd-y','run':_0x26d796,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-Shift-z','mac':'Cmd-Shift-z','run':_0x26d796,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-z','mac':'Cmd-z','run':_0x5d2288,'preventDefault':!0x0,'stopPropagation':!0x0}]));const _0x3549f0=new _0xe8f632({'extensions':_0x88d166,'parent':_0x5edee3['parent']});return _0x46c137(_0x3549f0),{'focus':()=>{_0x3549f0['dispatch']({'selection':{'anchor':0x0},'scrollIntoView':!0x0}),_0x3549f0['focus']();},'getData':()=>_0x3549f0['state']['doc']['toString'](),'setData':_0x5b1e89=>{_0x3549f0['dispatch']({'changes':{'from':0x0,'to':_0x3549f0['state']['doc']['length'],'insert':_0x5b1e89},'annotations':_0x447b1d['addToHistory']['of'](!0x1)});},'setReadOnly':_0x540f1f=>{_0x3549f0['dispatch']({'effects':[_0x134b21['reconfigure'](_0xe8f632['editable']['of'](!_0x540f1f))]});},'destroy':()=>{_0x3549f0['destroy']();},'instance':_0x3549f0};}var Z=class extends _0x2acbcc{['_codeEditorApi']=null;['_options'];constructor(_0x5a1be2,_0x1b8625){super(_0x5a1be2),this['_options']=_0x1b8625,this['set']('isReadOnly',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-code-editor'],'tabindex':-0x1}});}['render'](){super['render'](),this['_codeEditorApi']=X({'parent':this['element'],'syntaxLanguage':this['_options']['syntaxLanguage'],'theme':this['_options']['theme']}),this['on']('change:isReadOnly',(_0xf0cf3e,_0x2fc268,_0x3b7bc2)=>{this['setReadOnly'](_0x3b7bc2);});}['destroy'](){super['destroy'](),this['_codeEditorApi']['destroy'](),this['_codeEditorApi']=null;}['focus'](){this['isReadOnly']?this['element']['focus']():this['_codeEditorApi']['focus']();}['getData'](){return this['_codeEditorApi']['getData']();}['setData'](_0x3991c7){this['_codeEditorApi']['setData'](_0x3991c7);}['setReadOnly'](_0x5ec212){this['_codeEditorApi']['setReadOnly'](_0x5ec212);}};const G='SourceEditingEnhancedMode';var W=class extends _0x4e4c57{constructor(_0x4518f3){super(_0x4518f3),this['affectsData']=!0x1,this['editor']['plugins']['get'](_0x20b0cc)['on']('change:hasAny',(_0x37217a,_0x16e7e3,_0x34ae52)=>{_0x34ae52?this['forceDisabled']('pendingActions'):this['clearForceDisabled']('pendingActions');});}['_disableCommands'](){const _0x2ed2f=this['editor'];for(const _0x2098c4 of _0x2ed2f['commands']['names']())['replaceSource','editSource']['includes'](_0x2098c4)||_0x2ed2f['commands']['get'](_0x2098c4)['forceDisabled'](G);}['_enableCommands'](){const _0x256a52=this['editor'];for(const _0x3e5e62 of _0x256a52['commands']['commands']())_0x3e5e62['clearForceDisabled'](G);}['refresh'](){this['isEnabled']=!0x0;}['execute'](){const _0x34cd6e=this['editor'],_0x3018ff=_0x34cd6e['locale'],_0x3be23f=_0x34cd6e['plugins']['get']('Dialog'),_0x3f9a6d=B(_0x34cd6e),_0x258d25=J(_0x45a6c8=_0x34cd6e['data']['get']({'rootName':_0x3f9a6d}))?_0x2164e3(_0x45a6c8):_0x45a6c8;var _0x45a6c8;const _0x3e7f04=new Z(_0x3018ff,{'syntaxLanguage':_0x34cd6e['plugins']['has']('Markdown')?'markdown':'html','theme':_0x34cd6e['config']['get']('sourceEditingEnhanced.theme')});let _0x434866=!0x0;const _0x37d3ff=_0x1bd5da=>{if(_0x434866&&Y(_0x3e7f04['getData']())!==Y(_0x258d25))return window['confirm'](Q(_0x3018ff,'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.'))?void 0x0:_0x1bd5da['stop']();};_0x3be23f['show']({'id':'sourceEditingEnhanced','title':Q(_0x3018ff,'Edit\x20source\x20modal\x20label'),'isModal':!0x0,'className':'ck-source-editing-enhanced-dialog','content':_0x3e7f04,'actionButtons':[{'label':Q(_0x3018ff,'Cancel'),'withText':!0x0,'onExecute':()=>{_0x3be23f['hide']();}},{'label':Q(_0x3018ff,'Save'),'class':'ck-button-action','withText':!0x0,'onExecute':()=>{const _0x3dafaa=Y(_0x3e7f04['getData']())!==Y(_0x258d25);_0x3dafaa&&_0x34cd6e['execute']('replaceSource',_0x3e7f04['getData']()),_0x434866=!0x1,_0x3be23f['hide'](),_0x3dafaa&&'editables'in _0x34cd6e['ui']['view']&&_0x34cd6e['ui']['view']['editables'][_0x3f9a6d]['element']['focus']();},'onCreate':_0x358164=>{_0x358164['set']('isEnabled',!_0x34cd6e['isReadOnly']),_0x358164['bind']('isEnabled')['to'](_0x34cd6e,'isReadOnly',this,'isEnabled',(_0xb07f6c,_0x4ffb8b)=>!_0xb07f6c&&_0x4ffb8b);}}],'onHide':()=>{this['_enableCommands'](),_0x3be23f['off']('hide',_0x37d3ff),_0x3e7f04['destroy']();},'onShow':()=>{_0x3e7f04['bind']('isReadOnly')['to'](_0x34cd6e,'isReadOnly',this,'isEnabled',(_0x524f0f,_0x2ce5ff)=>_0x524f0f||!_0x2ce5ff),_0x3e7f04['setData'](_0x258d25),_0x3e7f04['focus'](),_0x3be23f['on']('hide',_0x37d3ff,{'priority':'highest'}),this['_disableCommands']();}});}},$=class extends _0x3e0f24{static get['pluginName'](){return'SourceEditingEnhancedUI';}static get['requires'](){return[_0x20b0cc];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x247784=this['editor'],_0x4b7bca=_0x247784['locale'],_0x4a870e=new W(_0x247784);_0x247784['commands']['add']('editSource',_0x4a870e),_0x247784['ui']['componentFactory']['add']('sourceEditingEnhanced',()=>{const _0x232f49=this['_createButton'](_0xfec814,_0x4a870e);return _0x232f49['set']({'label':Q(_0x4b7bca,'Source'),'icon':_0x21fcba,'tooltip':Q(_0x4b7bca,'Edit\x20source\x20modal\x20label'),'class':'ck-source-editing-enhanced-button'}),_0x232f49;}),_0x247784['ui']['componentFactory']['add']('menuBar:sourceEditingEnhanced',()=>{const _0x28c466=this['_createButton'](_0x595db2,_0x4a870e,!0x0);return _0x28c466['set']({'label':Q(_0x4b7bca,'Edit\x20source\x20modal\x20label'),'icon':_0x21fcba,'role':'menuitemcheckbox'}),_0x28c466;}),this['_registerKeybindings']();}['afterInit'](){!async function(_0x4e4fa3){const _0x5bec60='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x318f2f=0x78e58,_0x563e85=window['Date']['now'](),_0x591844=_0x4e4fa3['editor'],_0x281b48=new window['Promise'](_0x3e67dc=>{_0x591844['once']('ready',_0x3e67dc);}),_0x9f32b6={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0xe5729=_0x591844['config']['get']('licenseKey');async function _0x6bec03(){let _0x58a034,_0x4c4b68=null,_0x2c701a=null;try{return'GPL'==_0xe5729?'NotAllowed':(_0x58a034=_0x3e729f(),_0x58a034?(_0x58a034['usageEndpoint']&&(_0x2c701a=_0x1f95a3(_0x58a034['usageEndpoint'],_0x58a034['jti'])),await _0x2119d2()?_0x446d3b()?_0x54c030()?'Expired':_0x5983cd()?('evaluation'==_0x58a034['licenseType']&&(_0x4c4b68=_0x46baf3('EvaluationLimit')),await _0x31e858()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x54c030(){const _0x35397b=['evaluation','trial']['includes'](_0x58a034['licenseType'])?_0x563e85/0x3e8:0xe10*_0x318f2f;return _0x58a034['exp']<_0x35397b;}function _0x446d3b(){const _0x27de8c=_0x58a034['features'];return!!_0x27de8c&&(!!_0x27de8c['includes']('*')||!!_0x27de8c['includes']('SEE'));}function _0x5983cd(){const _0x425e02=_0x58a034['licensedHosts'];if(!_0x425e02||0x0==_0x425e02['length'])return!0x0;const {hostname:_0x163912}=new URL(window['location']['href']);if(_0x425e02['includes'](_0x163912))return!0x0;const _0x4f7d7c=_0x163912['split']('.');return _0x425e02['filter'](_0x68d40c=>_0x68d40c['includes']('*'))['map'](_0x1b13a8=>_0x1b13a8['split']('.'))['filter'](_0x377fef=>_0x377fef['length']<=_0x4f7d7c['length'])['map'](_0xfe1819=>Array(_0x4f7d7c['length']-_0xfe1819['length'])['fill']('*'===_0xfe1819[0x0]?'*':'')['concat'](_0xfe1819))['some'](_0x4cb038=>_0x4f7d7c['every']((_0xbb74b4,_0x381c3c)=>_0x4cb038[_0x381c3c]===_0xbb74b4||'*'===_0x4cb038[_0x381c3c]));}function _0x31e858(){return _0x4c4b68&&_0x2c701a?new window['Promise']((_0x8de61a,_0x22eb3d)=>{_0x4c4b68['then'](_0x8de61a,_0x22eb3d),_0x2c701a['then'](_0x12406b=>{'Valid'!=_0x12406b&&_0x8de61a(_0x12406b);},_0x22eb3d);}):_0x4c4b68||_0x2c701a||'Valid';}}function _0x1f95a3(_0x46c692,_0x45442d){return new window['Promise'](_0x164fe2=>{if(_0x16294c())return _0x164fe2('Valid');_0x5a2064(),_0x591844['decorate']('_sendUsageRequest');let _0x4be23f=!0x1;const _0x24c53d=_0x297b7f();function _0x3dfc1b(_0x4f2120){return!!_0x4f2120&&('object'==typeof _0x4f2120||'function'==typeof _0x4f2120)&&'function'==typeof _0x4f2120['then']&&'function'==typeof _0x4f2120['catch'];}function _0xca6bbd(_0x257dd7){_0x51df3f(_0x257dd7)['then'](_0x367098=>_0x367098&&'ok'==_0x367098['status']?_0x1a1385(_0x48b4cf(_0x24c53d+_0x45442d))!=_0x367098['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x34e46d=>(_0x10d576(),_0x34e46d),()=>{const _0x26fc76=_0x3d8440();return null==_0x26fc76?(_0x10d576(),'Valid'):_0x563e85-_0x26fc76>0x240c8400?'UsageLimit':'Valid';})['then'](_0x164fe2)['catch'](()=>{_0x164fe2('UsageLimit');});const _0x52f109=0x36ee80;function _0x10d576(){const _0x26309a='llct-'+_0x1a1385(_0x48b4cf(_0x46c692)),_0x2d3043=_0x135643(_0x1a1385(window['Math']['ceil'](_0x563e85/_0x52f109)));window['localStorage']['setItem'](_0x26309a,_0x2d3043);}function _0x3d8440(){const _0x67fde2='llct-'+_0x1a1385(_0x48b4cf(_0x46c692)),_0x11b9d7=window['localStorage']['getItem'](_0x67fde2);return _0x11b9d7?window['parseInt'](_0x135643(_0x11b9d7),0x10)*_0x52f109:null;}function _0x51df3f(_0x4746ba){return new window['Promise']((_0x112593,_0x552c64)=>{_0x4746ba['then'](_0x112593,_0x552c64),window['setTimeout'](_0x552c64,0x1d4c0);});}}_0x591844['on']('_sendUsageRequest',(_0x1b09e2,_0x2da653)=>{if(_0x2da653[0x0]!=_0x46c692)return _0x164fe2('UsageLimit');_0x2da653[0x1]={..._0x2da653[0x1],'requestId':_0x24c53d};},{'priority':'high'}),_0x591844['on']('_sendUsageRequest',_0x216480=>{_0x3dfc1b(_0x216480['return'])&&(_0x4be23f=!0x0,_0xca6bbd(_0x216480['return']));},{'priority':'low'}),_0x281b48['then'](()=>{_0x4be23f||_0x164fe2('UsageLimit');});});function _0x16294c(){return'auto'==_0x591844['editing']['view']['_overlayModeHint'];}function _0x5a2064(){_0x591844['editing']['view']['_overlayModeHint']='auto';}}function _0x46baf3(_0x5e072b){const _0x2c4542=[new window['Promise'](_0x3d1417=>setTimeout(_0x3d1417,0x93ecc)),_0x281b48['then'](()=>new window['Promise'](_0x4e3f29=>{let _0x53434e=0x0;_0x591844['model']['on']('applyOperation',(_0xadedb9,_0x1817d5)=>{_0x1817d5[0x0]['isDocumentOperation']&&_0x53434e++,0x5e8==_0x53434e&&(_0x4e3f29(),_0xadedb9['off']());});}))];return window['Promise']['race'](_0x2c4542)['then'](()=>_0x5e072b);}async function _0x269afa(){await _0x281b48,_0x591844['model']['change']=_0x1e7318,_0x591844['model']['enqueueChange']=_0x1e7318,_0x591844['enableReadOnlyMode']('model');}function _0x496f2e(_0x232a36){const _0x2bded4=_0x1aed26();_0x591844[_0x2bded4]='sourceEditingEnhancedLicenseKey'+_0x232a36,'Valid'!=_0x232a36&&_0x269afa();}function _0x1aed26(){const _0x7217c5=window['String'](window['performance']['now']())['replace']('.','');let _0x3800b3='N';for(let _0x3a0a7a=0x0;_0x3a0a7a<_0x7217c5['length'];_0x3a0a7a+=0x2){let _0x509d9b=window['parseInt'](_0x7217c5['substring'](_0x3a0a7a,_0x3a0a7a+0x2));_0x509d9b>=0x3e&&(_0x509d9b-=0x3e),_0x3800b3+=_0x5bec60[_0x509d9b];}return _0x3800b3;}function _0x3e729f(){const _0x239e7f=_0xe5729['split']('.');if(0x3!=_0x239e7f['length'])return null;return _0x1928da(_0x239e7f[0x1]);function _0x1928da(_0xd9f706){const _0x20e625=_0x1cad40(_0xd9f706);return _0x20e625&&_0x2b133e()?_0x20e625:null;function _0x2b133e(){const _0xbb328f=_0x20e625['jti'],_0x19d719=window['parseInt'](_0xbb328f['substring'](_0xbb328f['length']-0x8),0x10),_0x25ab69={..._0x20e625,'jti':_0xbb328f['substring'](0x0,_0xbb328f['length']-0x8)};return delete _0x25ab69['vc'],_0x48b4cf(_0x25ab69)==_0x19d719;}}}async function _0x2119d2(){let _0x5d9cdc=!0x0;try{const [_0x3f9e03,_0x592d7b,_0x2cd211]=_0xe5729['split']('.');return _0x55bd66(_0x3f9e03),await _0x2507e6(_0x3f9e03,_0x592d7b,_0x2cd211),_0x5d9cdc;}catch{return!0x1;}function _0x55bd66(_0xd166b0){const _0x222c13=_0x1cad40(_0xd166b0);_0x222c13&&'ES256'==_0x222c13['alg']||(_0x5d9cdc=!0x1);}async function _0x2507e6(_0x18c725,_0x334b6,_0x20bb45){const _0x2a75c0=window['Uint8Array']['from'](_0x21b04e(_0x20bb45),_0x3b375d=>_0x3b375d['charCodeAt'](0x0)),_0x529b1f=new window['TextEncoder']()['encode'](_0x18c725+'.'+_0x334b6),_0x67dbd8=window['crypto']['subtle'];if(!_0x67dbd8)return;const _0x3227c3=await _0x67dbd8['importKey']('jwk',_0x9f32b6,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x67dbd8['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3227c3,_0x2a75c0,_0x529b1f)||(_0x5d9cdc=!0x1);}}function _0x1cad40(_0x42f38e){return _0x42f38e['startsWith']('ey')?JSON['parse'](_0x21b04e(_0x42f38e)):null;}function _0x21b04e(_0xeada8d){return window['atob'](_0xeada8d['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x48b4cf(_0x3ae016){let _0x1d7592=0x1505;function _0x3655f2(_0xd4fe3a){for(let _0x43a3b8=0x0;_0x43a3b8<_0xd4fe3a['length'];_0x43a3b8++){const _0x1a2571=_0xd4fe3a['charCodeAt'](_0x43a3b8);_0x1d7592=(_0x1d7592<<0x5)+_0x1d7592+_0x1a2571,_0x1d7592&=_0x1d7592;}}function _0x3cbc4d(_0x4c44bc){Array['isArray'](_0x4c44bc)?_0x4c44bc['forEach'](_0x3cbc4d):_0x4c44bc&&'object'==typeof _0x4c44bc?Object['entries'](_0x4c44bc)['sort']()['forEach'](([_0x4b7d01,_0x83edaa])=>{_0x3655f2(_0x4b7d01),_0x3cbc4d(_0x83edaa);}):_0x3655f2(window['String'](_0x4c44bc));}return _0x3cbc4d(_0x3ae016),_0x1d7592>>>0x0;}function _0x1a1385(_0x142b74){return _0x142b74['toString'](0x10)['padStart'](0x8,'0');}function _0x135643(_0x3bb843){return _0x3bb843['split']('')['reverse']()['join']('');}function _0x1e7318(){}_0x496f2e(await _0x6bec03());}(this);}['_createButton'](_0x1a08d6,_0x428396,_0x48533a=!0x1){const _0x3e697a=new _0x1a08d6(this['editor']['locale']);return _0x3e697a['set']({'withText':_0x48533a,'isToggleable':!0x1}),_0x3e697a['bind']('isEnabled')['to'](_0x428396,'isEnabled'),this['listenTo'](_0x3e697a,'execute',()=>_0x428396['execute']()),_0x3e697a;}['_registerKeybindings'](){const _0x140c76=this['editor']['locale'];this['editor']['accessibility']['addKeystrokeInfoCategory']({'id':'sourceEditingEnhanced','label':Q(_0x140c76,'Source\x20Editing\x20Enhanced')});const _0x5ec74=_0x345c76['isMac']||_0x345c76['isiOS'];this['editor']['accessibility']['addKeystrokeInfos']({'categoryId':'sourceEditingEnhanced','keystrokes':[{'label':Q(_0x140c76,'Copy\x20line\x20down'),'keystroke':'Shift+Alt+ArrowDown'},{'label':Q(_0x140c76,'Copy\x20line\x20up'),'keystroke':'Shift+Alt+ArrowUp'},{'label':Q(_0x140c76,'Delete\x20line'),'keystroke':'Shift+Ctrl+K'},{'label':Q(_0x140c76,'Indent\x20less'),'keystroke':'Ctrl+['},{'label':Q(_0x140c76,'Indent\x20more'),'keystroke':'Ctrl+]'},{'label':Q(_0x140c76,'Fold\x20all'),'keystroke':'Ctrl!+Alt+['},{'label':Q(_0x140c76,'Fold\x20code\x20(current\x20level)'),'keystroke':_0x5ec74?'Cmd+Alt+[':'Ctrl+Shift+['},{'label':Q(_0x140c76,'Move\x20line\x20down'),'keystroke':'Alt+ArrowDown'},{'label':Q(_0x140c76,'Move\x20line\x20up'),'keystroke':'Alt+ArrowUp'},{'label':Q(_0x140c76,'Redo\x20(keystroke)'),'keystroke':[['Ctrl+Shift+Z'],['Ctrl+Y']]},{'label':Q(_0x140c76,'Select\x20line'),'keystroke':_0x5ec74?'Ctrl!+L':'Alt+L'},{'label':Q(_0x140c76,'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode'),'keystroke':_0x5ec74?'Alt+Shift+M':'Ctrl+M'},{'label':Q(_0x140c76,'Toggle\x20block\x20comment'),'keystroke':'Shift+Alt+A'},{'label':Q(_0x140c76,'Toggle\x20comment'),'keystroke':'Ctrl+/'},{'label':Q(_0x140c76,'Undo\x20(keystroke)'),'keystroke':'Ctrl+Z'},{'label':Q(_0x140c76,'Unfold\x20all'),'keystroke':'Ctrl!+Alt+]'},{'label':Q(_0x140c76,'Unfold\x20code\x20(current\x20level)'),'keystroke':_0x5ec74?'Cmd+Alt+]':'Ctrl+Shift+]'}]});}},ee=class extends _0x4e4c57{constructor(_0x5e2acf){super(_0x5e2acf),this['refresh']();}['refresh'](){this['isEnabled']=!this['editor']['isReadOnly'];}['execute'](_0x534244,_0x24e8bc){const _0x1d866b=this['editor'],_0x12e487=_0x24e8bc?.['rootName']??B(_0x1d866b);_0x1d866b['data']['set']({[_0x12e487]:_0x534244},{'batchType':{'isUndoable':!0x0},'suppressErrorInCollaboration':!0x0});}},te=class extends _0x3e0f24{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SourceEditingEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[$];}constructor(_0x445628){super(_0x445628),_0x445628['config']['define']('sourceEditingEnhanced.allowCollaborationFeatures',!0x1);}['init'](){this['_checkCompatibility'](),this['editor']['commands']['add']('replaceSource',new ee(this['editor'])),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x56066a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1feede;for(const _0x472052 in _0x56066a){const _0x2d9e0c=_0x472052,_0x5928f3=_0x56066a[_0x2d9e0c];if('sourceEditingEnhancedLicenseKeyValid'==_0x5928f3||'sourceEditingEnhancedLicenseKeyInvalid'==_0x5928f3||'sourceEditingEnhancedLicenseKeyExpired'==_0x5928f3||'sourceEditingEnhancedLicenseKeyDomainLimit'==_0x5928f3||'sourceEditingEnhancedLicenseKeyNotAllowed'==_0x5928f3||'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0x5928f3||'sourceEditingEnhancedLicenseKeyUsageLimit'==_0x5928f3){delete _0x56066a[_0x2d9e0c],_0x1feede=_0x5928f3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'sourceEditingEnhancedLicenseKeyInvalid'==_0x1feede&&_0x56066a['_showLicenseError']('invalid'),'sourceEditingEnhancedLicenseKeyExpired'==_0x1feede&&_0x56066a['_showLicenseError']('expired'),'sourceEditingEnhancedLicenseKeyDomainLimit'==_0x1feede&&_0x56066a['_showLicenseError']('domainLimit'),'sourceEditingEnhancedLicenseKeyNotAllowed'==_0x1feede&&_0x56066a['_showLicenseError']('featureNotAllowed','SourceEditingEnhanced'),'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0x1feede&&_0x56066a['_showLicenseError']('evaluationLimit'),'sourceEditingEnhancedLicenseKeyUsageLimit'==_0x1feede&&_0x56066a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_checkCompatibility'](){const _0xefd472=this['editor'],_0x3341c3=_0xefd472['config']['get']('sourceEditingEnhanced.allowCollaborationFeatures');if(!_0x3341c3&&_0xefd472['plugins']['has']('RealTimeCollaborativeEditing'))throw new _0x5c0d9c('source-editing-enhanced-incompatible-with-real-time-collaboration',null);!_0x3341c3&&['CommentsEditing','TrackChangesEditing','RevisionHistory']['some'](_0x457785=>_0xefd472['plugins']['has'](_0x457785))&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20at\x20least\x20one\x20of\x20the\x20collaboration\x20features.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20collaboration\x20features.'),_0xefd472['plugins']['has']('RestrictedEditingModeEditing')&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20restricted\x20editing\x20feature.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20enhanced\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20restricted\x20editing\x20feature.');}};export{W as EditSourceCommand,ee as ReplaceSourceCommand,te as SourceEditingEnhanced};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-source-editing-enhanced",
3
- "version": "48.3.0-alpha.5",
3
+ "version": "48.3.0-alpha.6",
4
4
  "description": "Source editing enhanced feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -25,11 +25,11 @@
25
25
  "dist/translations/*.umd.js"
26
26
  ],
27
27
  "dependencies": {
28
- "@ckeditor/ckeditor5-core": "48.3.0-alpha.5",
29
- "@ckeditor/ckeditor5-engine": "48.3.0-alpha.5",
30
- "@ckeditor/ckeditor5-icons": "48.3.0-alpha.5",
31
- "@ckeditor/ckeditor5-ui": "48.3.0-alpha.5",
32
- "@ckeditor/ckeditor5-utils": "48.3.0-alpha.5",
28
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.6",
29
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.6",
30
+ "@ckeditor/ckeditor5-icons": "48.3.0-alpha.6",
31
+ "@ckeditor/ckeditor5-ui": "48.3.0-alpha.6",
32
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.6",
33
33
  "@codemirror/autocomplete": "^6.7.1",
34
34
  "@codemirror/commands": "6.8.1",
35
35
  "@codemirror/lang-html": "^6.0.0",