@ckeditor/ckeditor5-slash-command 49.0.0-alpha.3 → 49.0.0-alpha.4

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 +9 -9
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x674bba}from'@ckeditor/ckeditor5-core';import{Mention as _0xce3de0}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x571e03,uid as _0x1d3643}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x31f20e,IconBulletedList as _0x32aae0,IconCodeBlock as _0x1528ef,IconEmoji as _0xd4d189,IconFootnote as _0xb91d2,IconHeading1 as _0xd04a20,IconHeading2 as _0x3bd825,IconHeading3 as _0x276033,IconHeading4 as _0xb679f8,IconHeading5 as _0x442e7b,IconHeading6 as _0x3af91b,IconHorizontalLine as _0x4c8457,IconHtml as _0x3b1d59,IconIndent as _0x18d4e2,IconNumberedList as _0x3e6165,IconOutdent as _0x4cd936,IconParagraph as _0x358727,IconPlay as _0xf18499,IconQuote as _0x1b98d7,IconRobotPencil as _0x19af70,IconTable as _0x35ca49,IconTableOfContents as _0x35c250,IconTodoList as _0x42c993}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x4aa3e7,View as _0x5b326c}from'@ckeditor/ckeditor5-ui';var O=class extends _0x674bba{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x94ff2a){super(_0x94ff2a),this['_allowedCommands']=null;}afterInit(){const _0x185c44=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0xc3e836=function(_0x5b5272){let _0x267ec2=['heading4','heading5','heading6'];if(_0x5b5272){const _0x30fd0e=_0x5b5272['map'](_0x248e22=>_0x248e22['model']);_0x267ec2=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x138d49=>!_0x30fd0e['includes'](_0x138d49));}return _0x267ec2;}(this['editor']['config']['get']('heading.options'));let _0x503bfd=this['getDefaultCommands']()['filter'](_0x45b7cc=>!_0xc3e836['includes'](_0x45b7cc['id']))['filter'](_0x3dabeb=>!_0x185c44['includes'](_0x3dabeb['commandName']));const _0x573796=this['editor']['config']['get']('slashCommand.extraCommands');_0x573796&&_0x573796['length']&&(_0x503bfd=_0x503bfd['concat'](_0x573796));const _0x3a58ae=this['editor']['config']['get']('template.definitions');_0x3a58ae&&_0x3a58ae['length']&&(_0x503bfd=_0x503bfd['concat'](function(_0x24ff22){return _0x24ff22['map'](_0x2e4f18=>{const {title:_0xe28075,icon:_0x3bb039,description:_0x306b47,data:_0x17824c}=_0x2e4f18,_0x25078a={'id':P(_0xe28075,'template'),'commandName':'insertTemplate','execute':_0x24d1ca=>{_0x24d1ca['execute']('insertTemplate',_0x17824c);},'description':_0x306b47,'icon':_0x3bb039,'title':_0xe28075};return _0x3bb039&&(_0x25078a['isIconColorInherited']=!0x1),_0x25078a;});}(_0x3a58ae)));const _0x21ba0c=this['editor']['config']['get']('style.definitions');_0x21ba0c&&_0x21ba0c['length']&&(_0x503bfd=_0x503bfd['concat'](function(_0x566afd){return _0x566afd['map'](_0x590f7a=>({'id':P(_0x590f7a['name'],'style'),'commandName':'style','execute':_0x10f3d1=>{_0x10f3d1['execute']('style',{'styleName':_0x590f7a['name']});},'isEnabled':_0x51914d=>{const _0x7c57a5=_0x51914d['commands']['get']('style');return _0x7c57a5['isEnabled']&&_0x7c57a5['enabledStyles']['includes'](_0x590f7a['name']);},'title':_0x590f7a['name']}));}(_0x21ba0c)));const _0x288701=_0x503bfd['filter'](_0xbb74a1=>!_0xbb74a1['commandName']||void 0x0!==this['editor']['commands']['get'](_0xbb74a1['commandName'])),_0x38a2be=[];for(const _0x14f5a4 of _0x288701)_0x38a2be['push']({'id':_0x14f5a4['id'],'commandName':_0x14f5a4['commandName'],'title':'function'==typeof _0x14f5a4['title']?_0x14f5a4['title'](this['editor']):_0x14f5a4['title'],'description':_0x14f5a4['description'],'icon':_0x14f5a4['icon'],'isIconColorInherited':_0x14f5a4['isIconColorInherited'],'aliases':_0x14f5a4['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x14f5a4),'execute':()=>this['_proxyExecute'](_0x14f5a4)});this['_allowedCommands']=_0x38a2be['sort'](E),async function(_0x5cf809){const _0x47c55c='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x9a49c1=0x79758,_0x27e900={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x3a19fc(_0x1042b0){const _0x4305b3=new window['Promise'](_0x2e1490=>{_0x1042b0['once']('ready',_0x2e1490);}),_0x2bfe55=window['Date']['now'](),_0x101a04=_0x1042b0['config']['get']('licenseKey');async function _0x5c6970(){let _0x7343e4,_0x4936c2=null,_0x4633cb=null;try{return'GPL'==_0x101a04?'NotAllowed':(_0x7343e4=_0xa874a7(),_0x7343e4?(_0x7343e4['usageEndpoint']&&(_0x4633cb=_0x44113a(_0x7343e4['usageEndpoint'],_0x7343e4['jti'])),await _0x17488()?_0x523279()?_0x5600af()?'Expired':_0x461f83()?('evaluation'==_0x7343e4['licenseType']&&(_0x4936c2=_0x4f230c('EvaluationLimit')),await _0x1e2dc6()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5600af(){const _0x20825d=['evaluation','trial']['includes'](_0x7343e4['licenseType'])?_0x2bfe55/0x3e8:0xe10*_0x9a49c1;return _0x7343e4['exp']<_0x20825d;}function _0x523279(){const _0x4d5e9e=_0x7343e4['features'];return!!_0x4d5e9e&&(!!_0x4d5e9e['includes']('*')||(!!_0x4d5e9e['includes']('SC')||(!!_0x4d5e9e['includes']('PP')||!(!_0x4d5e9e['includes']('TRILIUM')||!_0x12a40e()))));}function _0x461f83(){const _0x5a5cb4=_0x7343e4['licensedHosts'];if(!_0x5a5cb4||0x0==_0x5a5cb4['length'])return!0x0;const {hostname:_0x1ff7df}=new URL(window['location']['href']);if(_0x5a5cb4['includes'](_0x1ff7df))return!0x0;const _0x42ffe3=_0x1ff7df['split']('.');return _0x5a5cb4['filter'](_0x52c80a=>_0x52c80a['includes']('*'))['map'](_0x251007=>_0x251007['split']('.'))['filter'](_0x17ec26=>_0x17ec26['length']<=_0x42ffe3['length'])['map'](_0x9a4bc7=>Array(_0x42ffe3['length']-_0x9a4bc7['length'])['fill']('*'===_0x9a4bc7[0x0]?'*':'')['concat'](_0x9a4bc7))['some'](_0x514eee=>_0x42ffe3['every']((_0x40a05c,_0x3653ae)=>_0x514eee[_0x3653ae]===_0x40a05c||'*'===_0x514eee[_0x3653ae]));}function _0x1e2dc6(){return _0x4936c2&&_0x4633cb?new window['Promise']((_0x4e6535,_0x2b546a)=>{_0x4936c2['then'](_0x4e6535,_0x2b546a),_0x4633cb['then'](_0x11a271=>{'Valid'!=_0x11a271&&_0x4e6535(_0x11a271);},_0x2b546a);}):_0x4936c2||_0x4633cb||'Valid';}}function _0x44113a(_0x5df4e9,_0x4fb241){return new window['Promise'](_0x25cbfc=>{if(_0x7dcbd())return _0x25cbfc('Valid');_0x257394(),_0x1042b0['decorate']('_sendUsageRequest');let _0x5319cd=!0x1;const _0x6a3881=_0x1d3643();function _0x204e7d(_0x12bb77){return!!_0x12bb77&&('object'==typeof _0x12bb77||'function'==typeof _0x12bb77)&&'function'==typeof _0x12bb77['then']&&'function'==typeof _0x12bb77['catch'];}function _0xc24046(_0x1ec5b3){_0x533a23(_0x1ec5b3)['then'](_0x38db87=>_0x38db87&&'ok'==_0x38db87['status']?_0x3dc8fc(_0xff3530(_0x6a3881+_0x4fb241))!=_0x38db87['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x41b823=>(_0x39b1d7(),_0x41b823),()=>{const _0x49dafb=_0x24e25e();return null==_0x49dafb?(_0x39b1d7(),'Valid'):_0x2bfe55-_0x49dafb>0x240c8400?'UsageLimit':'Valid';})['then'](_0x25cbfc)['catch'](()=>{_0x25cbfc('UsageLimit');});const _0x4029eb=0x36ee80;function _0x39b1d7(){const _0x1e8238='llct-'+_0x3dc8fc(_0xff3530(_0x5df4e9)),_0x217cce=_0x112728(_0x3dc8fc(window['Math']['ceil'](_0x2bfe55/_0x4029eb)));window['localStorage']['setItem'](_0x1e8238,_0x217cce);}function _0x24e25e(){const _0x2d37bb='llct-'+_0x3dc8fc(_0xff3530(_0x5df4e9)),_0x2ccf7f=window['localStorage']['getItem'](_0x2d37bb);return _0x2ccf7f?window['parseInt'](_0x112728(_0x2ccf7f),0x10)*_0x4029eb:null;}function _0x533a23(_0xeacc4b){return new window['Promise']((_0x4725c1,_0x581586)=>{_0xeacc4b['then'](_0x4725c1,_0x581586),window['setTimeout'](_0x581586,0x1d4c0);});}}_0x1042b0['on']('_sendUsageRequest',(_0x147372,_0x29b748)=>{if(_0x29b748[0x0]!=_0x5df4e9)return _0x25cbfc('UsageLimit');_0x29b748[0x1]={..._0x29b748[0x1],'requestId':_0x6a3881};},{'priority':'high'}),_0x1042b0['on']('_sendUsageRequest',_0x290858=>{_0x204e7d(_0x290858['return'])&&(_0x5319cd=!0x0,_0xc24046(_0x290858['return']));},{'priority':'low'}),_0x4305b3['then'](()=>{_0x5319cd||_0x25cbfc('UsageLimit');});});function _0x7dcbd(){return'auto'==_0x1042b0['editing']['view']['_overlayModeHint'];}function _0x257394(){_0x1042b0['editing']['view']['_overlayModeHint']='auto';}}function _0x4f230c(_0x16a816){const _0x4ff71b=[new window['Promise'](_0x2bc2d5=>setTimeout(_0x2bc2d5,0x93ecc)),_0x4305b3['then'](()=>new window['Promise'](_0x365b7f=>{let _0x188f94=0x0;_0x1042b0['model']['on']('applyOperation',(_0x2b2936,_0x41c3a1)=>{_0x41c3a1[0x0]['isDocumentOperation']&&_0x188f94++,0x5e8==_0x188f94&&(_0x365b7f(),_0x2b2936['off']());});}))];return window['Promise']['race'](_0x4ff71b)['then'](()=>_0x16a816);}async function _0x1c3d0c(){await _0x4305b3,_0x1042b0['model']['change']=_0x39c54f,_0x1042b0['model']['enqueueChange']=_0x39c54f,_0x1042b0['enableReadOnlyMode']('model');}function _0x12a40e(){return window['glob']&&window['glob']['triliumVersion'];}function _0x230786(_0x3de758){const _0x2d2252=_0x43fed4();_0x1042b0[_0x2d2252]='slashCommandLicenseKey'+_0x3de758,'Valid'!=_0x3de758&&_0x1c3d0c();}function _0x43fed4(){const _0x251b22=window['String'](window['performance']['now']())['replace']('.','');let _0x15cd23='g';for(let _0x5b4bae=0x0;_0x5b4bae<_0x251b22['length'];_0x5b4bae+=0x2){let _0x459457=window['parseInt'](_0x251b22['substring'](_0x5b4bae,_0x5b4bae+0x2));_0x459457>=0x3e&&(_0x459457-=0x3e),_0x15cd23+=_0x47c55c[_0x459457];}return _0x15cd23;}function _0xa874a7(){const _0x16ad7f=_0x101a04['split']('.');if(0x3!=_0x16ad7f['length'])return null;return _0x32a728(_0x16ad7f[0x1]);function _0x32a728(_0xe6d545){const _0x3257c7=_0x504652(_0xe6d545);return _0x3257c7&&_0x365a7c()?_0x3257c7:null;function _0x365a7c(){const _0x2f3b79=_0x3257c7['jti'],_0x583046=window['parseInt'](_0x2f3b79['substring'](_0x2f3b79['length']-0x8),0x10),_0x492c46={..._0x3257c7,'jti':_0x2f3b79['substring'](0x0,_0x2f3b79['length']-0x8)};return delete _0x492c46['vc'],_0xff3530(_0x492c46)==_0x583046;}}}async function _0x17488(){let _0x377862=!0x0;try{const [_0x786f3c,_0x49d42b,_0x3786f9]=_0x101a04['split']('.');return _0x35cdd6(_0x786f3c),await _0x20c2cc(_0x786f3c,_0x49d42b,_0x3786f9),_0x377862;}catch{return!0x1;}function _0x35cdd6(_0x57dbf2){const _0x1f451e=_0x504652(_0x57dbf2);_0x1f451e&&'ES256'==_0x1f451e['alg']||(_0x377862=!0x1);}async function _0x20c2cc(_0x207619,_0x3dd35d,_0xba7a90){const _0x4ec7d3=window['Uint8Array']['from'](_0x19dd82(_0xba7a90),_0xb650a5=>_0xb650a5['charCodeAt'](0x0)),_0x57624=new window['TextEncoder']()['encode'](_0x207619+'.'+_0x3dd35d),_0x2a8b8e=window['crypto']['subtle'];if(!_0x2a8b8e)return;const _0x263916=await _0x2a8b8e['importKey']('jwk',_0x27e900,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2a8b8e['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x263916,_0x4ec7d3,_0x57624)||(_0x377862=!0x1);}}function _0x504652(_0x404bf0){return _0x404bf0['startsWith']('ey')?JSON['parse'](_0x19dd82(_0x404bf0)):null;}function _0x19dd82(_0xc6538f){return window['atob'](_0xc6538f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0xff3530(_0x37ca1c){let _0x20c2bb=0x1505;function _0x5d6d97(_0x5aeb92){for(let _0x622c42=0x0;_0x622c42<_0x5aeb92['length'];_0x622c42++){const _0x5f2d59=_0x5aeb92['charCodeAt'](_0x622c42);_0x20c2bb=(_0x20c2bb<<0x5)+_0x20c2bb+_0x5f2d59,_0x20c2bb&=_0x20c2bb;}}function _0x5570c6(_0x31285c){Array['isArray'](_0x31285c)?_0x31285c['forEach'](_0x5570c6):_0x31285c&&'object'==typeof _0x31285c?Object['entries'](_0x31285c)['sort']()['forEach'](([_0x41ed8d,_0x18426c])=>{_0x5d6d97(_0x41ed8d),_0x5570c6(_0x18426c);}):_0x5d6d97(window['String'](_0x31285c));}return _0x5570c6(_0x37ca1c),_0x20c2bb>>>0x0;}function _0x3dc8fc(_0x2e0cec){return _0x2e0cec['toString'](0x10)['padStart'](0x8,'0');}function _0x112728(_0x295845){return _0x295845['split']('')['reverse']()['join']('');}function _0x39c54f(){}_0x230786(await _0x5c6970());}_0x3a19fc(_0x5cf809['editor']);}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0x109ae5=_0x3c64fb=>function(_0x1098c2,_0x249eb0){const t=_0x1098c2['t'],_0x5afece=_0x1098c2['t'];switch(_0x249eb0){case'AI\x20Assistant':return _0x5afece('AI\x20Assistant');case'Block\x20quote':return _0x5afece('Block\x20quote');case'Bulleted\x20List':return _0x5afece('Bulleted\x20List');case'Insert\x20code\x20block':return _0x5afece('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x5afece('Open\x20file\x20manager');case'Insert\x20image':return _0x5afece('Insert\x20image');case'Heading\x201':return _0x5afece('Heading\x201');case'Heading\x202':return _0x5afece('Heading\x202');case'Heading\x203':return _0x5afece('Heading\x203');case'Heading\x204':return _0x5afece('Heading\x204');case'Heading\x205':return _0x5afece('Heading\x205');case'Heading\x206':return _0x5afece('Heading\x206');case'Horizontal\x20line':return _0x5afece('Horizontal\x20line');case'Insert\x20HTML':return _0x5afece('Insert\x20HTML');case'Increase\x20indent':return _0x5afece('Increase\x20indent');case'Insert\x20table':return _0x5afece('Insert\x20table');case'Table\x20of\x20contents':return _0x5afece('Table\x20of\x20contents');case'Numbered\x20List':return _0x5afece('Numbered\x20List');case'Decrease\x20indent':return _0x5afece('Decrease\x20indent');case'Paragraph':return _0x5afece('Paragraph');case'To-do\x20List':return _0x5afece('To-do\x20List');case'Create\x20a\x20block\x20quote':return t('Create\x20a\x20block\x20quote');case'Create\x20a\x20bulleted\x20list':return t('Create\x20a\x20bulleted\x20list');case'Create\x20a\x20code\x20block':return t('Create\x20a\x20code\x20block');case'Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Create\x20a\x20heading\x20level\x201':return t('Create\x20a\x20heading\x20level\x201');case'Create\x20a\x20heading\x20level\x202':return t('Create\x20a\x20heading\x20level\x202');case'Create\x20a\x20heading\x20level\x203':return t('Create\x20a\x20heading\x20level\x203');case'Create\x20a\x20heading\x20level\x204':return t('Create\x20a\x20heading\x20level\x204');case'Create\x20a\x20heading\x20level\x205':return t('Create\x20a\x20heading\x20level\x205');case'Create\x20a\x20heading\x20level\x206':return t('Create\x20a\x20heading\x20level\x206');case'Insert\x20a\x20horizontal\x20line':return t('Insert\x20a\x20horizontal\x20line');case'Insert\x20an\x20HTML\x20snippet':return t('Insert\x20an\x20HTML\x20snippet');case'Increase\x20the\x20indentation':return t('Increase\x20the\x20indentation');case'Insert\x20Mermaid\x20diagram':return t('Insert\x20Mermaid\x20diagram');case'Insert\x20the\x20Mermaid\x20diagram':return t('Insert\x20the\x20Mermaid\x20diagram');case'Create\x20a\x20table':return t('Create\x20a\x20table');case'Insert\x20table\x20of\x20contents':return t('Insert\x20table\x20of\x20contents');case'Create\x20a\x20numbered\x20list':return t('Create\x20a\x20numbered\x20list');case'Decrease\x20the\x20indentation':return t('Decrease\x20the\x20indentation');case'Insert\x20a\x20paragraph':return t('Insert\x20a\x20paragraph');case'Create\x20a\x20to-do\x20list':return t('Create\x20a\x20to-do\x20list');case'Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content':return t('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content');case'Insert\x20an\x20emoji':return t('Insert\x20an\x20emoji');case'Insert\x20a\x20footnote':return t('Insert\x20a\x20footnote');default:return _0x249eb0;}}(this['editor']['locale'],_0x3c64fb);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x19af70,'title':_0x109ae5('AI\x20Assistant'),'description':_0x109ae5('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x766052=>{setTimeout(()=>_0x766052['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x1b98d7,'title':_0x109ae5('Block\x20quote'),'description':_0x109ae5('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x32aae0,'title':_0x109ae5('Bulleted\x20List'),'description':_0x109ae5('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x1528ef,'title':_0x109ae5('Insert\x20code\x20block'),'description':_0x109ae5('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x31f20e,'title':_0x109ae5('Open\x20file\x20manager'),'description':_0x109ae5('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x31f20e,'title':_0x109ae5('Insert\x20image'),'description':_0x109ae5('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0xd4d189,'title':_0x109ae5('Emoji'),'description':_0x109ae5('Insert\x20an\x20emoji'),'execute':_0x539a60=>{setTimeout(()=>_0x539a60['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0xd04a20,'title':_0x109ae5('Heading\x201'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x201'),'execute':_0x3ef366=>{_0x3ef366['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x3bd825,'title':_0x109ae5('Heading\x202'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x202'),'execute':_0x5c18fc=>{_0x5c18fc['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x276033,'title':_0x109ae5('Heading\x203'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x203'),'execute':_0xe399f7=>{_0xe399f7['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0xb679f8,'title':_0x109ae5('Heading\x204'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x204'),'execute':_0x2b33cd=>{_0x2b33cd['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x442e7b,'title':_0x109ae5('Heading\x205'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x205'),'execute':_0x38ce32=>{_0x38ce32['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x3af91b,'title':_0x109ae5('Heading\x206'),'description':_0x109ae5('Create\x20a\x20heading\x20level\x206'),'execute':_0x5b27e2=>{_0x5b27e2['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x4c8457,'title':_0x109ae5('Horizontal\x20line'),'description':_0x109ae5('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x3b1d59,'title':_0x109ae5('Insert\x20HTML'),'description':_0x109ae5('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x18d4e2,'title':_0x109ae5('Increase\x20indent'),'description':_0x109ae5('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x109ae5('Insert\x20Mermaid\x20diagram'),'description':_0x109ae5('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x35ca49,'title':_0x109ae5('Insert\x20table'),'description':_0x109ae5('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x35c250,'title':_0x109ae5('Table\x20of\x20contents'),'description':_0x109ae5('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x3e6165,'title':_0x109ae5('Numbered\x20List'),'description':_0x109ae5('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x4cd936,'title':_0x109ae5('Decrease\x20indent'),'description':_0x109ae5('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x358727,'title':_0x109ae5('Paragraph'),'description':_0x109ae5('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x42c993,'title':_0x109ae5('To-do\x20List'),'description':_0x109ae5('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0xb91d2,'title':_0x109ae5('Footnote'),'description':_0x109ae5('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x4ab3da){return _0x4ab3da['isEnabled']?_0x4ab3da['isEnabled'](this['editor']):!_0x4ab3da['commandName']||this['editor']['commands']['get'](_0x4ab3da['commandName'])['isEnabled'];}_proxyExecute(_0x2be967){if(_0x2be967['execute'])_0x2be967['execute'](this['editor']);else{if(!_0x2be967['commandName'])throw new _0x571e03('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x2be967});this['editor']['execute'](_0x2be967['commandName']);}}};function E(_0x5fa4a0,_0xc3065d){return _0x5fa4a0['title']<_0xc3065d['title']?-0x1:_0x5fa4a0['title']>_0xc3065d['title']?0x1:0x0;}function P(_0x491029,_0x4fcaec){return _0x4fcaec+'-'+_0x491029['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x674bba{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x2ce04c){const _0x3d622e=_0x2ce04c&&_0x2ce04c['toLowerCase']();let _0xa85939=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0xa85939=_0xa85939['filter'](_0x3f918e=>_0x3f918e['isEnabled']()),_0x3d622e){const _0x4b53d9=[],_0x3b0bd5=[],_0x3bd6bc=[],_0x3e7dc3=[];for(const _0xacc964 of _0xa85939)_0xacc964['id']['toLowerCase']()['includes'](_0x3d622e)?_0x4b53d9['push'](_0xacc964):_0xacc964['title']['toLowerCase']()['includes'](_0x3d622e)?_0x3b0bd5['push'](_0xacc964):_0xacc964['aliases']&&_0xacc964['aliases']['some'](_0x4d16e4=>_0x4d16e4['toLowerCase']()['includes'](_0x3d622e))?_0x3bd6bc['push'](_0xacc964):_0xacc964['description']&&_0xacc964['description']['toLowerCase']()['includes'](_0x3d622e)&&_0x3e7dc3['push'](_0xacc964);_0xa85939=_0x4b53d9['concat'](_0x3b0bd5,_0x3bd6bc,_0x3e7dc3);}return _0xa85939;}},M=class extends _0x4aa3e7{constructor(_0x6c62b1,_0x10e4b7){super(_0x6c62b1),this['textPartView']=this['_createTextPartView'](_0x6c62b1,_0x10e4b7),void 0x0!==_0x10e4b7['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x10e4b7['isIconColorInherited']),this['set']({'icon':_0x10e4b7['icon']||_0xf18499,'withText':!0x0,'label':_0x10e4b7['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0xe0ccb1,_0x1bae3c){const _0x9dfb86=new _0x5b326c(_0xe0ccb1);return _0x9dfb86['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x1bae3c['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x1bae3c['description']}]}]:[this['labelView']]}),_0x9dfb86;}},S=class extends _0x674bba{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x291906){super(_0x291906),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x447d02=[this['editor']];for(const _0x489831 of _0x447d02){let _0x13d1c6;for(const _0x4de26 in _0x489831){const _0x1d5ea5=_0x4de26,_0x4a5e28=_0x489831[_0x1d5ea5];if('slashCommandLicenseKeyValid'==_0x4a5e28||'slashCommandLicenseKeyInvalid'==_0x4a5e28||'slashCommandLicenseKeyExpired'==_0x4a5e28||'slashCommandLicenseKeyDomainLimit'==_0x4a5e28||'slashCommandLicenseKeyNotAllowed'==_0x4a5e28||'slashCommandLicenseKeyEvaluationLimit'==_0x4a5e28||'slashCommandLicenseKeyUsageLimit'==_0x4a5e28){delete _0x489831[_0x1d5ea5],_0x13d1c6=_0x4a5e28,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x13d1c6&&_0x489831['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x13d1c6&&_0x489831['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x13d1c6&&_0x489831['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x13d1c6&&_0x489831['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x13d1c6&&_0x489831['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x13d1c6&&_0x489831['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x9206a3=this['editor'],_0x424c95=this['editor']['plugins']['get']('SlashCommandEditing'),_0x276248=_0x9206a3['config']['get']('mention.feeds');_0x276248['push']({'marker':'/','feed':_0x1964cc=>_0x424c95['getMatchingCommands'](_0x1964cc),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x9206a3['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x9206a3['config']['set']('mention.feeds',_0x276248);}_overrideMentionExecuteListener(){const _0x33b2e7=this['editor'];_0x33b2e7['commands']['get']('mention')['on']('execute',(_0x4fa6ab,_0x38010a)=>{const _0x2822eb=_0x38010a[0x0],_0x402abe=_0x33b2e7['model'];'/'===_0x2822eb['marker']&&_0x402abe['change'](_0x1b39b5=>{_0x1b39b5['remove'](_0x2822eb['range']),_0x2822eb['mention']['execute'](),_0x4fa6ab['stop']();});},{'priority':'high'});}_customItemRenderer(_0x50bf0f){const _0x51beb5=this['editor']['locale'],_0x412017=new M(_0x51beb5,_0x50bf0f);return _0x412017['render'](),_0x412017['element'];}},D=class extends _0x674bba{static get requires(){return[_0xce3de0,K,S];}static get['pluginName'](){return'SlashCommand';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{D as SlashCommand,O as SlashCommandConfig,K as SlashCommandEditing,S as SlashCommandUI};
23
+ import{Plugin as _0x589f6e}from'@ckeditor/ckeditor5-core';import{Mention as _0x118984}from'@ckeditor/ckeditor5-mention';import{CKEditorError as _0x28d470,uid as _0x1557cd}from'@ckeditor/ckeditor5-utils';import{IconBrowseFiles as _0x290642,IconBulletedList as _0x56b977,IconCodeBlock as _0x4719d7,IconEmoji as _0x99ae14,IconFootnote as _0x416c59,IconHeading1 as _0x475df8,IconHeading2 as _0x53e621,IconHeading3 as _0x3eec22,IconHeading4 as _0x15c043,IconHeading5 as _0x3dc8c0,IconHeading6 as _0x528f47,IconHorizontalLine as _0x48c8b0,IconHtml as _0x56574e,IconIndent as _0x330106,IconNumberedList as _0x54d0b1,IconOutdent as _0x508994,IconParagraph as _0x284190,IconPlay as _0x487942,IconQuote as _0x1bc25b,IconRobotPencil as _0x3c5658,IconTable as _0x134cea,IconTableOfContents as _0x465bc9,IconTodoList as _0x57a9b0}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x754563,View as _0x5d4972}from'@ckeditor/ckeditor5-ui';var O=class extends _0x589f6e{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34d810){super(_0x34d810),this['_allowedCommands']=null;}afterInit(){const _0x339818=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x22620a=function(_0x281cea){let _0x2a56cd=['heading4','heading5','heading6'];if(_0x281cea){const _0x4aaae6=_0x281cea['map'](_0x3168c0=>_0x3168c0['model']);_0x2a56cd=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x23f2f4=>!_0x4aaae6['includes'](_0x23f2f4));}return _0x2a56cd;}(this['editor']['config']['get']('heading.options'));let _0x2ef502=this['getDefaultCommands']()['filter'](_0x7206dc=>!_0x22620a['includes'](_0x7206dc['id']))['filter'](_0x19466c=>!_0x339818['includes'](_0x19466c['commandName']));const _0x4af461=this['editor']['config']['get']('slashCommand.extraCommands');_0x4af461&&_0x4af461['length']&&(_0x2ef502=_0x2ef502['concat'](_0x4af461));const _0x2656cc=this['editor']['config']['get']('template.definitions');_0x2656cc&&_0x2656cc['length']&&(_0x2ef502=_0x2ef502['concat'](function(_0x201e23){return _0x201e23['map'](_0x226a3b=>{const {title:_0x25b229,icon:_0x3fcab9,description:_0x4af7f9,data:_0x16fa77}=_0x226a3b,_0x316caf={'id':P(_0x25b229,'template'),'commandName':'insertTemplate','execute':_0x51623c=>{_0x51623c['execute']('insertTemplate',_0x16fa77);},'description':_0x4af7f9,'icon':_0x3fcab9,'title':_0x25b229};return _0x3fcab9&&(_0x316caf['isIconColorInherited']=!0x1),_0x316caf;});}(_0x2656cc)));const _0x2daeab=this['editor']['config']['get']('style.definitions');_0x2daeab&&_0x2daeab['length']&&(_0x2ef502=_0x2ef502['concat'](function(_0x13034c){return _0x13034c['map'](_0x30cf17=>({'id':P(_0x30cf17['name'],'style'),'commandName':'style','execute':_0x3c856c=>{_0x3c856c['execute']('style',{'styleName':_0x30cf17['name']});},'isEnabled':_0x264304=>{const _0x442aa9=_0x264304['commands']['get']('style');return _0x442aa9['isEnabled']&&_0x442aa9['enabledStyles']['includes'](_0x30cf17['name']);},'title':_0x30cf17['name']}));}(_0x2daeab)));const _0x14f9ad=_0x2ef502['filter'](_0x7ffa7f=>!_0x7ffa7f['commandName']||void 0x0!==this['editor']['commands']['get'](_0x7ffa7f['commandName'])),_0x2feda5=[];for(const _0x379bdb of _0x14f9ad)_0x2feda5['push']({'id':_0x379bdb['id'],'commandName':_0x379bdb['commandName'],'title':'function'==typeof _0x379bdb['title']?_0x379bdb['title'](this['editor']):_0x379bdb['title'],'description':_0x379bdb['description'],'icon':_0x379bdb['icon'],'isIconColorInherited':_0x379bdb['isIconColorInherited'],'aliases':_0x379bdb['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x379bdb),'execute':()=>this['_proxyExecute'](_0x379bdb)});this['_allowedCommands']=_0x2feda5['sort'](E),async function(_0x58addb){const _0x20d8cd='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x256723=0x79770,_0xd3182f={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x40a472(_0x4dc2ae){const _0x46a72b=new window['Promise'](_0x84cdd3=>{_0x4dc2ae['once']('ready',_0x84cdd3);}),_0x4b0be3=window['Date']['now'](),_0x4ee334=_0x4dc2ae['config']['get']('licenseKey');async function _0x4d47cd(){let _0x181af4,_0xd7e002=null,_0x322eb2=null;try{return'GPL'==_0x4ee334?'NotAllowed':(_0x181af4=_0x2c4c1d(),_0x181af4?(_0x181af4['usageEndpoint']&&(_0x322eb2=_0x7343f2(_0x181af4['usageEndpoint'],_0x181af4['jti'])),await _0x37c2ca()?_0x1a6b79()?_0x34c5c8()?'Expired':_0x30f7dc()?('evaluation'==_0x181af4['licenseType']&&(_0xd7e002=_0x19c9b0('EvaluationLimit')),await _0x5052dd()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x34c5c8(){const _0x2c0ada=['evaluation','trial']['includes'](_0x181af4['licenseType'])?_0x4b0be3/0x3e8:0xe10*_0x256723;return _0x181af4['exp']<_0x2c0ada;}function _0x1a6b79(){const _0x5782c0=_0x181af4['features'];return!!_0x5782c0&&(!!_0x5782c0['includes']('*')||(!!_0x5782c0['includes']('SC')||(!!_0x5782c0['includes']('PP')||!(!_0x5782c0['includes']('TRILIUM')||!_0x2c214c()))));}function _0x30f7dc(){const _0x2bed55=_0x181af4['licensedHosts'];if(!_0x2bed55||0x0==_0x2bed55['length'])return!0x0;const {hostname:_0x3e7cc3}=new URL(window['location']['href']);if(_0x2bed55['includes'](_0x3e7cc3))return!0x0;const _0x4cdc7c=_0x3e7cc3['split']('.');return _0x2bed55['filter'](_0xeae767=>_0xeae767['includes']('*'))['map'](_0x26faa3=>_0x26faa3['split']('.'))['filter'](_0x485861=>_0x485861['length']<=_0x4cdc7c['length'])['map'](_0x519a68=>Array(_0x4cdc7c['length']-_0x519a68['length'])['fill']('*'===_0x519a68[0x0]?'*':'')['concat'](_0x519a68))['some'](_0x512e7a=>_0x4cdc7c['every']((_0x30c180,_0x478cef)=>_0x512e7a[_0x478cef]===_0x30c180||'*'===_0x512e7a[_0x478cef]));}function _0x5052dd(){return _0xd7e002&&_0x322eb2?new window['Promise']((_0xc5fbea,_0x45b432)=>{_0xd7e002['then'](_0xc5fbea,_0x45b432),_0x322eb2['then'](_0x58ea9c=>{'Valid'!=_0x58ea9c&&_0xc5fbea(_0x58ea9c);},_0x45b432);}):_0xd7e002||_0x322eb2||'Valid';}}function _0x7343f2(_0x3b6190,_0x5b092c){return new window['Promise'](_0x9b24a6=>{if(_0x5a2b90())return _0x9b24a6('Valid');_0x3d182a(),_0x4dc2ae['decorate']('_sendUsageRequest');let _0x296f1c=!0x1;const _0x54705c=_0x1557cd();function _0x13d63a(_0x5d84be){return!!_0x5d84be&&('object'==typeof _0x5d84be||'function'==typeof _0x5d84be)&&'function'==typeof _0x5d84be['then']&&'function'==typeof _0x5d84be['catch'];}function _0x10f5f5(_0x4653e8){_0x187f48(_0x4653e8)['then'](_0x1de484=>_0x1de484&&'ok'==_0x1de484['status']?_0x1e3e4a(_0x545dca(_0x54705c+_0x5b092c))!=_0x1de484['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4170f7=>(_0x260f74(),_0x4170f7),()=>{const _0x3711ab=_0x2e15cc();return null==_0x3711ab?(_0x260f74(),'Valid'):_0x4b0be3-_0x3711ab>0x240c8400?'UsageLimit':'Valid';})['then'](_0x9b24a6)['catch'](()=>{_0x9b24a6('UsageLimit');});const _0x63e62a=0x36ee80;function _0x260f74(){const _0x33c967='llct-'+_0x1e3e4a(_0x545dca(_0x3b6190)),_0x1d042a=_0x38ac25(_0x1e3e4a(window['Math']['ceil'](_0x4b0be3/_0x63e62a)));window['localStorage']['setItem'](_0x33c967,_0x1d042a);}function _0x2e15cc(){const _0x1e314a='llct-'+_0x1e3e4a(_0x545dca(_0x3b6190)),_0x51a0e4=window['localStorage']['getItem'](_0x1e314a);return _0x51a0e4?window['parseInt'](_0x38ac25(_0x51a0e4),0x10)*_0x63e62a:null;}function _0x187f48(_0x19b8bd){return new window['Promise']((_0x5166d5,_0x153ed3)=>{_0x19b8bd['then'](_0x5166d5,_0x153ed3),window['setTimeout'](_0x153ed3,0x1d4c0);});}}_0x4dc2ae['on']('_sendUsageRequest',(_0x4342bf,_0x44b16c)=>{if(_0x44b16c[0x0]!=_0x3b6190)return _0x9b24a6('UsageLimit');_0x44b16c[0x1]={..._0x44b16c[0x1],'requestId':_0x54705c};},{'priority':'high'}),_0x4dc2ae['on']('_sendUsageRequest',_0x1ec863=>{_0x13d63a(_0x1ec863['return'])&&(_0x296f1c=!0x0,_0x10f5f5(_0x1ec863['return']));},{'priority':'low'}),_0x46a72b['then'](()=>{_0x296f1c||_0x9b24a6('UsageLimit');});});function _0x5a2b90(){return'auto'==_0x4dc2ae['editing']['view']['_overlayModeHint'];}function _0x3d182a(){_0x4dc2ae['editing']['view']['_overlayModeHint']='auto';}}function _0x19c9b0(_0x5e98dc){const _0x217153=[new window['Promise'](_0x3f48d1=>setTimeout(_0x3f48d1,0x93ecc)),_0x46a72b['then'](()=>new window['Promise'](_0xa669aa=>{let _0x4f05a2=0x0;_0x4dc2ae['model']['on']('applyOperation',(_0x35d930,_0x537f6f)=>{_0x537f6f[0x0]['isDocumentOperation']&&_0x4f05a2++,0x5e8==_0x4f05a2&&(_0xa669aa(),_0x35d930['off']());});}))];return window['Promise']['race'](_0x217153)['then'](()=>_0x5e98dc);}async function _0x155396(){await _0x46a72b,_0x4dc2ae['model']['change']=_0x564415,_0x4dc2ae['model']['enqueueChange']=_0x564415,_0x4dc2ae['enableReadOnlyMode']('model');}function _0x2c214c(){return window['glob']&&window['glob']['triliumVersion'];}function _0x257b5a(_0x4dceb5){const _0x209e64=_0x1d7bca();_0x4dc2ae[_0x209e64]='slashCommandLicenseKey'+_0x4dceb5,'Valid'!=_0x4dceb5&&_0x155396();}function _0x1d7bca(){const _0x315d03=window['String'](window['performance']['now']())['replace']('.','');let _0x153ac2='g';for(let _0x3ced88=0x0;_0x3ced88<_0x315d03['length'];_0x3ced88+=0x2){let _0x8be074=window['parseInt'](_0x315d03['substring'](_0x3ced88,_0x3ced88+0x2));_0x8be074>=0x3e&&(_0x8be074-=0x3e),_0x153ac2+=_0x20d8cd[_0x8be074];}return _0x153ac2;}function _0x2c4c1d(){const _0x3a2b9f=_0x4ee334['split']('.');if(0x3!=_0x3a2b9f['length'])return null;return _0x58ed00(_0x3a2b9f[0x1]);function _0x58ed00(_0x58e747){const _0x5e9be5=_0x17244b(_0x58e747);return _0x5e9be5&&_0x2b3b21()?_0x5e9be5:null;function _0x2b3b21(){const _0x5dbbda=_0x5e9be5['jti'],_0x1c317e=window['parseInt'](_0x5dbbda['substring'](_0x5dbbda['length']-0x8),0x10),_0x38f8a7={..._0x5e9be5,'jti':_0x5dbbda['substring'](0x0,_0x5dbbda['length']-0x8)};return delete _0x38f8a7['vc'],_0x545dca(_0x38f8a7)==_0x1c317e;}}}async function _0x37c2ca(){let _0x2000a9=!0x0;try{const [_0x582427,_0x51b9d5,_0x2e8907]=_0x4ee334['split']('.');return _0x4ddb4e(_0x582427),await _0x45d54c(_0x582427,_0x51b9d5,_0x2e8907),_0x2000a9;}catch{return!0x1;}function _0x4ddb4e(_0x5858de){const _0x5b8e78=_0x17244b(_0x5858de);_0x5b8e78&&'ES256'==_0x5b8e78['alg']||(_0x2000a9=!0x1);}async function _0x45d54c(_0xa5da4,_0x268f0b,_0x322289){const _0x265274=window['Uint8Array']['from'](_0x4c565a(_0x322289),_0x64f5e2=>_0x64f5e2['charCodeAt'](0x0)),_0x4d61f8=new window['TextEncoder']()['encode'](_0xa5da4+'.'+_0x268f0b),_0x1130d4=window['crypto']['subtle'];if(!_0x1130d4)return;const _0x235a2e=await _0x1130d4['importKey']('jwk',_0xd3182f,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1130d4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x235a2e,_0x265274,_0x4d61f8)||(_0x2000a9=!0x1);}}function _0x17244b(_0x2faab7){return _0x2faab7['startsWith']('ey')?JSON['parse'](_0x4c565a(_0x2faab7)):null;}function _0x4c565a(_0x3081a1){return window['atob'](_0x3081a1['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x545dca(_0x3c2017){let _0x121569=0x1505;function _0x439351(_0x441b58){for(let _0x4f00dd=0x0;_0x4f00dd<_0x441b58['length'];_0x4f00dd++){const _0x41f520=_0x441b58['charCodeAt'](_0x4f00dd);_0x121569=(_0x121569<<0x5)+_0x121569+_0x41f520,_0x121569&=_0x121569;}}function _0x595ef2(_0x5ef9e3){Array['isArray'](_0x5ef9e3)?_0x5ef9e3['forEach'](_0x595ef2):_0x5ef9e3&&'object'==typeof _0x5ef9e3?Object['entries'](_0x5ef9e3)['sort']()['forEach'](([_0x110b04,_0x3af4c8])=>{_0x439351(_0x110b04),_0x595ef2(_0x3af4c8);}):_0x439351(window['String'](_0x5ef9e3));}return _0x595ef2(_0x3c2017),_0x121569>>>0x0;}function _0x1e3e4a(_0x2995e3){return _0x2995e3['toString'](0x10)['padStart'](0x8,'0');}function _0x38ac25(_0x47211c){return _0x47211c['split']('')['reverse']()['join']('');}function _0x564415(){}_0x257b5a(await _0x4d47cd());}_0x40a472(_0x58addb['editor']);}(this);}getAllowedCommands(){return this['_allowedCommands'];}getDefaultCommands(){const _0x5ab405=_0x110829=>function(_0x9cbce,_0xb69c28){const t=_0x9cbce['t'],_0x4a2020=_0x9cbce['t'];switch(_0xb69c28){case'AI\x20Assistant':return _0x4a2020('AI\x20Assistant');case'Block\x20quote':return _0x4a2020('Block\x20quote');case'Bulleted\x20List':return _0x4a2020('Bulleted\x20List');case'Insert\x20code\x20block':return _0x4a2020('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x4a2020('Open\x20file\x20manager');case'Insert\x20image':return _0x4a2020('Insert\x20image');case'Heading\x201':return _0x4a2020('Heading\x201');case'Heading\x202':return _0x4a2020('Heading\x202');case'Heading\x203':return _0x4a2020('Heading\x203');case'Heading\x204':return _0x4a2020('Heading\x204');case'Heading\x205':return _0x4a2020('Heading\x205');case'Heading\x206':return _0x4a2020('Heading\x206');case'Horizontal\x20line':return _0x4a2020('Horizontal\x20line');case'Insert\x20HTML':return _0x4a2020('Insert\x20HTML');case'Increase\x20indent':return _0x4a2020('Increase\x20indent');case'Insert\x20table':return _0x4a2020('Insert\x20table');case'Table\x20of\x20contents':return _0x4a2020('Table\x20of\x20contents');case'Numbered\x20List':return _0x4a2020('Numbered\x20List');case'Decrease\x20indent':return _0x4a2020('Decrease\x20indent');case'Paragraph':return _0x4a2020('Paragraph');case'To-do\x20List':return _0x4a2020('To-do\x20List');case'Create\x20a\x20block\x20quote':return t('Create\x20a\x20block\x20quote');case'Create\x20a\x20bulleted\x20list':return t('Create\x20a\x20bulleted\x20list');case'Create\x20a\x20code\x20block':return t('Create\x20a\x20code\x20block');case'Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Create\x20a\x20heading\x20level\x201':return t('Create\x20a\x20heading\x20level\x201');case'Create\x20a\x20heading\x20level\x202':return t('Create\x20a\x20heading\x20level\x202');case'Create\x20a\x20heading\x20level\x203':return t('Create\x20a\x20heading\x20level\x203');case'Create\x20a\x20heading\x20level\x204':return t('Create\x20a\x20heading\x20level\x204');case'Create\x20a\x20heading\x20level\x205':return t('Create\x20a\x20heading\x20level\x205');case'Create\x20a\x20heading\x20level\x206':return t('Create\x20a\x20heading\x20level\x206');case'Insert\x20a\x20horizontal\x20line':return t('Insert\x20a\x20horizontal\x20line');case'Insert\x20an\x20HTML\x20snippet':return t('Insert\x20an\x20HTML\x20snippet');case'Increase\x20the\x20indentation':return t('Increase\x20the\x20indentation');case'Insert\x20Mermaid\x20diagram':return t('Insert\x20Mermaid\x20diagram');case'Insert\x20the\x20Mermaid\x20diagram':return t('Insert\x20the\x20Mermaid\x20diagram');case'Create\x20a\x20table':return t('Create\x20a\x20table');case'Insert\x20table\x20of\x20contents':return t('Insert\x20table\x20of\x20contents');case'Create\x20a\x20numbered\x20list':return t('Create\x20a\x20numbered\x20list');case'Decrease\x20the\x20indentation':return t('Decrease\x20the\x20indentation');case'Insert\x20a\x20paragraph':return t('Insert\x20a\x20paragraph');case'Create\x20a\x20to-do\x20list':return t('Create\x20a\x20to-do\x20list');case'Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content':return t('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content');case'Insert\x20an\x20emoji':return t('Insert\x20an\x20emoji');case'Insert\x20a\x20footnote':return t('Insert\x20a\x20footnote');default:return _0xb69c28;}}(this['editor']['locale'],_0x110829);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x3c5658,'title':_0x5ab405('AI\x20Assistant'),'description':_0x5ab405('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x2db52d=>{setTimeout(()=>_0x2db52d['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x1bc25b,'title':_0x5ab405('Block\x20quote'),'description':_0x5ab405('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x56b977,'title':_0x5ab405('Bulleted\x20List'),'description':_0x5ab405('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x4719d7,'title':_0x5ab405('Insert\x20code\x20block'),'description':_0x5ab405('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x290642,'title':_0x5ab405('Open\x20file\x20manager'),'description':_0x5ab405('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x290642,'title':_0x5ab405('Insert\x20image'),'description':_0x5ab405('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'emoji','commandName':'emoji','icon':_0x99ae14,'title':_0x5ab405('Emoji'),'description':_0x5ab405('Insert\x20an\x20emoji'),'execute':_0x2068ac=>{setTimeout(()=>_0x2068ac['execute']('emoji'));}},{'id':'heading1','commandName':'heading','icon':_0x475df8,'title':_0x5ab405('Heading\x201'),'description':_0x5ab405('Create\x20a\x20heading\x20level\x201'),'execute':_0x3bd013=>{_0x3bd013['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x53e621,'title':_0x5ab405('Heading\x202'),'description':_0x5ab405('Create\x20a\x20heading\x20level\x202'),'execute':_0x5518eb=>{_0x5518eb['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x3eec22,'title':_0x5ab405('Heading\x203'),'description':_0x5ab405('Create\x20a\x20heading\x20level\x203'),'execute':_0x21f2ae=>{_0x21f2ae['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x15c043,'title':_0x5ab405('Heading\x204'),'description':_0x5ab405('Create\x20a\x20heading\x20level\x204'),'execute':_0x444e17=>{_0x444e17['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x3dc8c0,'title':_0x5ab405('Heading\x205'),'description':_0x5ab405('Create\x20a\x20heading\x20level\x205'),'execute':_0x2b64b8=>{_0x2b64b8['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x528f47,'title':_0x5ab405('Heading\x206'),'description':_0x5ab405('Create\x20a\x20heading\x20level\x206'),'execute':_0x2b220c=>{_0x2b220c['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x48c8b0,'title':_0x5ab405('Horizontal\x20line'),'description':_0x5ab405('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x56574e,'title':_0x5ab405('Insert\x20HTML'),'description':_0x5ab405('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x330106,'title':_0x5ab405('Increase\x20indent'),'description':_0x5ab405('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x5ab405('Insert\x20Mermaid\x20diagram'),'description':_0x5ab405('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x134cea,'title':_0x5ab405('Insert\x20table'),'description':_0x5ab405('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x465bc9,'title':_0x5ab405('Table\x20of\x20contents'),'description':_0x5ab405('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x54d0b1,'title':_0x5ab405('Numbered\x20List'),'description':_0x5ab405('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x508994,'title':_0x5ab405('Decrease\x20indent'),'description':_0x5ab405('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x284190,'title':_0x5ab405('Paragraph'),'description':_0x5ab405('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x57a9b0,'title':_0x5ab405('To-do\x20List'),'description':_0x5ab405('Create\x20a\x20to-do\x20list')},{'id':'footnote','commandName':'insertFootnote','icon':_0x416c59,'title':_0x5ab405('Footnote'),'description':_0x5ab405('Insert\x20a\x20footnote')}];}['_proxyIsEnabled'](_0x40390f){return _0x40390f['isEnabled']?_0x40390f['isEnabled'](this['editor']):!_0x40390f['commandName']||this['editor']['commands']['get'](_0x40390f['commandName'])['isEnabled'];}_proxyExecute(_0x5209cf){if(_0x5209cf['execute'])_0x5209cf['execute'](this['editor']);else{if(!_0x5209cf['commandName'])throw new _0x28d470('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x5209cf});this['editor']['execute'](_0x5209cf['commandName']);}}};function E(_0x4dd739,_0x305c4c){return _0x4dd739['title']<_0x305c4c['title']?-0x1:_0x4dd739['title']>_0x305c4c['title']?0x1:0x0;}function P(_0x58def9,_0x31c2ba){return _0x31c2ba+'-'+_0x58def9['toLowerCase']()['split']('\x20')['join']('-');}var K=class extends _0x589f6e{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[O];}getMatchingCommands(_0x511311){const _0x1e007d=_0x511311&&_0x511311['toLowerCase']();let _0x5811f5=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x5811f5=_0x5811f5['filter'](_0x4e203d=>_0x4e203d['isEnabled']()),_0x1e007d){const _0x2495b6=[],_0xcaa3c0=[],_0x18ea26=[],_0x4aa406=[];for(const _0x1e610f of _0x5811f5)_0x1e610f['id']['toLowerCase']()['includes'](_0x1e007d)?_0x2495b6['push'](_0x1e610f):_0x1e610f['title']['toLowerCase']()['includes'](_0x1e007d)?_0xcaa3c0['push'](_0x1e610f):_0x1e610f['aliases']&&_0x1e610f['aliases']['some'](_0x225411=>_0x225411['toLowerCase']()['includes'](_0x1e007d))?_0x18ea26['push'](_0x1e610f):_0x1e610f['description']&&_0x1e610f['description']['toLowerCase']()['includes'](_0x1e007d)&&_0x4aa406['push'](_0x1e610f);_0x5811f5=_0x2495b6['concat'](_0xcaa3c0,_0x18ea26,_0x4aa406);}return _0x5811f5;}},M=class extends _0x754563{constructor(_0x151dcc,_0x1dbd96){super(_0x151dcc),this['textPartView']=this['_createTextPartView'](_0x151dcc,_0x1dbd96),void 0x0!==_0x1dbd96['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x1dbd96['isIconColorInherited']),this['set']({'icon':_0x1dbd96['icon']||_0x487942,'withText':!0x0,'label':_0x1dbd96['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}_createTextPartView(_0x4e7357,_0x2d0d54){const _0x55f5a4=new _0x5d4972(_0x4e7357);return _0x55f5a4['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x2d0d54['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x2d0d54['description']}]}]:[this['labelView']]}),_0x55f5a4;}},S=class extends _0x589f6e{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10cc83){super(_0x10cc83),this['_setupMentionConfiguration']();}init(){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1ff392=[this['editor']];for(const _0x32ad9c of _0x1ff392){let _0x303866;for(const _0x523ba8 in _0x32ad9c){const _0xc37983=_0x523ba8,_0xf2239a=_0x32ad9c[_0xc37983];if('slashCommandLicenseKeyValid'==_0xf2239a||'slashCommandLicenseKeyInvalid'==_0xf2239a||'slashCommandLicenseKeyExpired'==_0xf2239a||'slashCommandLicenseKeyDomainLimit'==_0xf2239a||'slashCommandLicenseKeyNotAllowed'==_0xf2239a||'slashCommandLicenseKeyEvaluationLimit'==_0xf2239a||'slashCommandLicenseKeyUsageLimit'==_0xf2239a){delete _0x32ad9c[_0xc37983],_0x303866=_0xf2239a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x303866&&_0x32ad9c['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x303866&&_0x32ad9c['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x303866&&_0x32ad9c['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x303866&&_0x32ad9c['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x303866&&_0x32ad9c['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyUsageLimit'==_0x303866&&_0x32ad9c['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_setupMentionConfiguration(){const _0x18ff69=this['editor'],_0x54eb7c=this['editor']['plugins']['get']('SlashCommandEditing'),_0x3508ae=_0x18ff69['config']['get']('mention.feeds');_0x3508ae['push']({'marker':'/','feed':_0x55460b=>_0x54eb7c['getMatchingCommands'](_0x55460b),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x18ff69['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x18ff69['config']['set']('mention.feeds',_0x3508ae);}_overrideMentionExecuteListener(){const _0x3a3ade=this['editor'];_0x3a3ade['commands']['get']('mention')['on']('execute',(_0x188cd2,_0x15c06f)=>{const _0x5104ae=_0x15c06f[0x0],_0x3e2133=_0x3a3ade['model'];'/'===_0x5104ae['marker']&&_0x3e2133['change'](_0xda8dff=>{_0xda8dff['remove'](_0x5104ae['range']),_0x5104ae['mention']['execute'](),_0x188cd2['stop']();});},{'priority':'high'});}_customItemRenderer(_0x1c365f){const _0x5dd60f=this['editor']['locale'],_0x5a85a8=new M(_0x5dd60f,_0x1c365f);return _0x5a85a8['render'](),_0x5a85a8['element'];}},D=class extends _0x589f6e{static get requires(){return[_0x118984,K,S];}static get['pluginName'](){return'SlashCommand';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{D as SlashCommand,O as SlashCommandConfig,K as SlashCommandEditing,S as SlashCommandUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-slash-command",
3
- "version": "49.0.0-alpha.3",
3
+ "version": "49.0.0-alpha.4",
4
4
  "description": "Slash command feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -21,14 +21,14 @@
21
21
  "./package.json": "./package.json"
22
22
  },
23
23
  "dependencies": {
24
- "@ckeditor/ckeditor5-core": "49.0.0-alpha.3",
25
- "@ckeditor/ckeditor5-heading": "49.0.0-alpha.3",
26
- "@ckeditor/ckeditor5-icons": "49.0.0-alpha.3",
27
- "@ckeditor/ckeditor5-mention": "49.0.0-alpha.3",
28
- "@ckeditor/ckeditor5-style": "49.0.0-alpha.3",
29
- "@ckeditor/ckeditor5-template": "49.0.0-alpha.3",
30
- "@ckeditor/ckeditor5-ui": "49.0.0-alpha.3",
31
- "@ckeditor/ckeditor5-utils": "49.0.0-alpha.3"
24
+ "@ckeditor/ckeditor5-core": "49.0.0-alpha.4",
25
+ "@ckeditor/ckeditor5-heading": "49.0.0-alpha.4",
26
+ "@ckeditor/ckeditor5-icons": "49.0.0-alpha.4",
27
+ "@ckeditor/ckeditor5-mention": "49.0.0-alpha.4",
28
+ "@ckeditor/ckeditor5-style": "49.0.0-alpha.4",
29
+ "@ckeditor/ckeditor5-template": "49.0.0-alpha.4",
30
+ "@ckeditor/ckeditor5-ui": "49.0.0-alpha.4",
31
+ "@ckeditor/ckeditor5-utils": "49.0.0-alpha.4"
32
32
  },
33
33
  "files": [
34
34
  "dist",