@ckeditor/ckeditor5-template 48.3.0-alpha.0 → 48.3.0-alpha.1
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.
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x1f4b67,Plugin as _0x1ac961}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x3d5950,IconTemplateGeneric as _0xe3cb7a}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x2c427d,HighlightedTextView as _0x43cf95,ListItemView as _0x4497c5,ListView as _0x2929d1,MenuBarMenuListItemButtonView as _0x2c4f85,MenuBarMenuListItemView as _0xf2850d,MenuBarMenuListView as _0x87e371,MenuBarMenuView as _0x317086,SearchTextView as _0x438d5c,View as _0x105415,createDropdown as _0x369be9}from'@ckeditor/ckeditor5-ui';import{uid as _0x484e09}from'@ckeditor/ckeditor5-utils';var g=class extends _0x1f4b67{['execute'](_0x1df254){const {model:_0x559ffc}=this['editor'];let _0x1452da;switch(typeof _0x1df254){case'string':_0x1452da=_0x1df254;break;case'function':_0x1452da=_0x1df254();}'string'==typeof _0x1452da&&_0x559ffc['change'](()=>{const _0x4c7982=this['editor']['data']['htmlProcessor']['toView'](_0x1452da),_0x2f638e=_0x559ffc['document']['selection']['getFirstPosition']()['root'],_0x7c7575=this['editor']['data']['toModel'](_0x4c7982,_0x2f638e);_0x559ffc['insertContent'](_0x7c7575);});}},y=class extends _0x1ac961{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x553433}=this;_0x553433['commands']['add']('insertTemplate',new g(_0x553433)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x404d15=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x15852c;for(const _0x5b45a4 in _0x404d15){const _0x5b0a4d=_0x5b45a4,_0x28e669=_0x404d15[_0x5b0a4d];if('templateLicenseKeyValid'==_0x28e669||'templateLicenseKeyInvalid'==_0x28e669||'templateLicenseKeyExpired'==_0x28e669||'templateLicenseKeyDomainLimit'==_0x28e669||'templateLicenseKeyNotAllowed'==_0x28e669||'templateLicenseKeyEvaluationLimit'==_0x28e669||'templateLicenseKeyUsageLimit'==_0x28e669){delete _0x404d15[_0x5b0a4d],_0x15852c=_0x28e669,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x15852c&&_0x404d15['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x15852c&&_0x404d15['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x15852c&&_0x404d15['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x15852c&&_0x404d15['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x15852c&&_0x404d15['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x15852c&&_0x404d15['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x2929d1{['filter'](_0x132800){if(!_0x132800)return this['_resetFiltering']();const _0x2aec1f=new Map(),_0x28efe0=this['items']['map'](_0x1f36c2=>{const _0x1e044c=_0x1f36c2['buttonView']['isMatching'](_0x132800);return _0x1f36c2['isVisible']=!!_0x1e044c,_0x1f36c2['buttonView']['highlightText'](_0x1e044c?_0x132800:null),_0x1e044c&&_0x2aec1f['set'](_0x1f36c2,_0x1e044c),_0x1f36c2;})['sort'](v)['sort'](function(_0x1694c7){return function(_0x4306a9,_0x44abed){const _0x4f81ff=_0x1694c7['get'](_0x4306a9),_0xb45568=_0x1694c7['get'](_0x44abed);return _0x4f81ff&&!_0xb45568?-0x1:_0xb45568&&!_0x4f81ff?0x1:_0x4f81ff||_0xb45568?_0x4f81ff['title']&&!_0xb45568['title']?-0x1:!_0x4f81ff['title']&&_0xb45568['title']?0x1:0x0:0x0;};}(_0x2aec1f));return this['items']['clear'](),this['items']['addMany'](_0x28efe0),{'resultsCount':_0x2aec1f['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x5ebe82=this['items']['map'](_0x3c4228=>_0x3c4228)['sort'](v);return _0x5ebe82['forEach'](_0x4ed757=>{_0x4ed757['isVisible']=!0x0,_0x4ed757['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x5ebe82),{'resultsCount':_0x5ebe82['length'],'totalItemsCount':_0x5ebe82['length']};}};function v(_0x4123c4,_0x523447){return _0x4123c4['originalIndex']-_0x523447['originalIndex'];}var x=class extends _0x4497c5{['originalIndex'];['buttonView'];constructor(_0x49d644,_0x2b1a94){super(_0x49d644),this['originalIndex']=_0x2b1a94,this['buttonView']=null;}},b=class extends _0x2c427d{['templateDefinition'];['textPartView'];constructor(_0x48b720,_0x3faf68){super(_0x48b720),this['templateDefinition']=_0x3faf68,this['textPartView']=null;const {icon:_0x2fd7dc=_0xe3cb7a}=_0x3faf68;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x2fd7dc}),this['iconView']['isColorInherited']=!0x1;}['render'](){super['render'](),this['textPartView']=new k(this['locale'],this['templateDefinition'],this['labelView']['element']['id']),this['children']['remove'](this['labelView']),this['children']['add'](this['textPartView']);}['destroy'](){super['destroy'](),this['labelView']['destroy']();}['isMatching'](_0x1dafbe){const {title:_0x12842e,description:_0x361a5d}=this['templateDefinition'],_0x4e765e=!!_0x12842e['match'](_0x1dafbe),_0xf4dd29=!(!_0x361a5d||!_0x361a5d['match'](_0x1dafbe));return _0x4e765e||_0xf4dd29?{'title':_0x4e765e,'description':_0xf4dd29}:null;}['highlightText'](_0x364d87){this['textPartView']['highlightText'](_0x364d87);}},k=class extends _0x105415{constructor(_0x1e2632,_0x19695f,_0x26fb27){super(_0x1e2632),this['title']=_0x19695f['title'],this['description']=_0x19695f['description'],this['titleView']=new _0x43cf95(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x26fb27}});const _0xb20bbf=[this['titleView']];this['description']&&(this['descriptionView']=new _0x43cf95(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0xb20bbf['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0xb20bbf});}['highlightText'](_0x3721d4){this['titleView']['highlightText'](_0x3721d4),this['description']&&this['descriptionView']['highlightText'](_0x3721d4);}};function I(_0x85667a,_0x1ab913,..._0xbf443d){const t=_0x85667a['t'];switch(_0x1ab913){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0xbf443d);case'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':return t('Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.');case'No\x20templates\x20available.':return t('No\x20templates\x20available.');case'%0\x20templates\x20found':return t('%0\x20templates\x20found',..._0xbf443d);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x1ab913;}}var T=class extends _0x1ac961{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x10993c}=this,_0x47eaf7=_0x10993c['config']['get']('template.definitions')||[];_0x10993c['ui']['componentFactory']['add']('insertTemplate',_0x93fb5=>{const _0x19b361=_0x369be9(_0x93fb5),_0x337ae4=new _0x438d5c(_0x93fb5,{'filteredView':this['_createTemplateListView'](_0x93fb5,_0x47eaf7),'queryView':{'label':I(_0x93fb5,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x25b757=>I(_0x93fb5,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x25b757),'secondary':I(_0x93fb5,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x93fb5,'No\x20templates\x20available.')}}}}),_0x1cd848=_0x10993c['commands']['get']('insertTemplate');return _0x337ae4['on']('search',(_0x4e4fc2,_0x59c1ba)=>{_0x59c1ba['query']&&_0x59c1ba['query']['length']&&_0x10993c['ui']['ariaLiveAnnouncer']['announce'](I(_0x93fb5,'%0\x20templates\x20found',_0x59c1ba['resultsCount']));}),_0x19b361['bind']('isEnabled')['to'](_0x1cd848),_0x19b361['panelView']['children']['add'](_0x337ae4),_0x19b361['buttonView']['set']({'label':I(_0x93fb5,'Insert\x20template'),'icon':_0x3d5950,'tooltip':!0x0}),_0x19b361['on']('change:isOpen',(_0xe3bac2,_0x387e1d,_0x143959)=>{_0x143959||_0x337ae4['reset']();}),_0x19b361;}),_0x10993c['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x1d4c93=>{const _0x388338=_0x10993c['commands']['get']('insertTemplate'),_0x1154d7=new _0x317086(_0x1d4c93);_0x1154d7['buttonView']['set']({'label':I(_0x1d4c93,'Template'),'icon':_0x3d5950});const _0x3215a7=new _0x87e371(_0x1d4c93);if(!_0x47eaf7||!_0x47eaf7['length']){const _0x41d160=new _0xf2850d(_0x1d4c93,_0x1154d7),_0x5916a9=new _0x2c4f85(_0x1d4c93);_0x5916a9['set']({'label':I(_0x1d4c93,'No\x20templates\x20available.')}),_0x5916a9['delegate']('execute')['to'](_0x1154d7),_0x5916a9['on']('execute',()=>{_0x10993c['editing']['view']['focus']();}),_0x41d160['children']['add'](_0x5916a9),_0x3215a7['items']['add'](_0x41d160);}for(const _0x4710f4 of _0x47eaf7){const _0x270c04=new _0xf2850d(_0x1d4c93,_0x1154d7),_0x573888=new _0x2c4f85(_0x1d4c93);_0x573888['set']({'class':'ck-template-button','label':_0x4710f4['title'],'icon':_0x4710f4['icon']||_0xe3cb7a}),_0x573888['delegate']('execute')['to'](_0x1154d7),_0x573888['on']('execute',()=>{_0x10993c['execute']('insertTemplate',_0x4710f4['data']),_0x10993c['editing']['view']['focus']();}),_0x270c04['children']['add'](_0x573888),_0x3215a7['items']['add'](_0x270c04);}return _0x1154d7['panelView']['children']['add'](_0x3215a7),_0x1154d7['bind']('isEnabled')['to'](_0x388338,'isEnabled'),_0x1154d7;});}['afterInit'](){!async function(_0x4b27fa){const _0x36f9e1='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x3ce5ee=0x78de0,_0x291bb0=window['Date']['now'](),_0x3d0edd=_0x4b27fa['editor'],_0xe87386=new window['Promise'](_0x3d7994=>{_0x3d0edd['once']('ready',_0x3d7994);}),_0x4dfff8={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x40f5df=_0x3d0edd['config']['get']('licenseKey');async function _0x2da6f7(){let _0x9c7042,_0x3064eb=null,_0x88f0eb=null;try{return'GPL'==_0x40f5df?'NotAllowed':(_0x9c7042=_0x44a365(),_0x9c7042?(_0x9c7042['usageEndpoint']&&(_0x88f0eb=_0x46afa6(_0x9c7042['usageEndpoint'],_0x9c7042['jti'])),await _0x89e540()?_0x52bd06()?_0x4bd23a()?'Expired':_0x1c2307()?('evaluation'==_0x9c7042['licenseType']&&(_0x3064eb=_0x5dbc1a('EvaluationLimit')),await _0x4a833a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4bd23a(){const _0x52ed6b=['evaluation','trial']['includes'](_0x9c7042['licenseType'])?_0x291bb0/0x3e8:0xe10*_0x3ce5ee;return _0x9c7042['exp']<_0x52ed6b;}function _0x52bd06(){const _0x3d6f41=_0x9c7042['features'];return!!_0x3d6f41&&(!!_0x3d6f41['includes']('*')||(!!_0x3d6f41['includes']('TPL')||(!!_0x3d6f41['includes']('PP')||(!(!_0x3d6f41['includes']('DRUP')||!_0x23f414())||!(!_0x3d6f41['includes']('TRILIUM')||!_0x38221b())))));}function _0x1c2307(){const _0x3929b8=_0x9c7042['licensedHosts'];if(!_0x3929b8||0x0==_0x3929b8['length'])return!0x0;const {hostname:_0x114f1f}=new URL(window['location']['href']);if(_0x3929b8['includes'](_0x114f1f))return!0x0;const _0x3c1fa4=_0x114f1f['split']('.');return _0x3929b8['filter'](_0x320485=>_0x320485['includes']('*'))['map'](_0x35cf50=>_0x35cf50['split']('.'))['filter'](_0x2e2c58=>_0x2e2c58['length']<=_0x3c1fa4['length'])['map'](_0x2e10d0=>Array(_0x3c1fa4['length']-_0x2e10d0['length'])['fill']('*'===_0x2e10d0[0x0]?'*':'')['concat'](_0x2e10d0))['some'](_0x54b12c=>_0x3c1fa4['every']((_0x5d7729,_0x373a29)=>_0x54b12c[_0x373a29]===_0x5d7729||'*'===_0x54b12c[_0x373a29]));}function _0x4a833a(){return _0x3064eb&&_0x88f0eb?new window['Promise']((_0x3b0bbb,_0xa6c502)=>{_0x3064eb['then'](_0x3b0bbb,_0xa6c502),_0x88f0eb['then'](_0x74f9af=>{'Valid'!=_0x74f9af&&_0x3b0bbb(_0x74f9af);},_0xa6c502);}):_0x3064eb||_0x88f0eb||'Valid';}}function _0x46afa6(_0x44f5db,_0x34fffc){return new window['Promise'](_0x21b59d=>{if(_0x3ccf8a())return _0x21b59d('Valid');_0x11aab9(),_0x3d0edd['decorate']('_sendUsageRequest');let _0x3b808b=!0x1;const _0x552fc2=_0x484e09();function _0x13942a(_0x20045e){return!!_0x20045e&&('object'==typeof _0x20045e||'function'==typeof _0x20045e)&&'function'==typeof _0x20045e['then']&&'function'==typeof _0x20045e['catch'];}function _0x36fc1(_0x3f7d39){_0x3897dc(_0x3f7d39)['then'](_0xe27d86=>_0xe27d86&&'ok'==_0xe27d86['status']?_0x3e61ec(_0x315cf0(_0x552fc2+_0x34fffc))!=_0xe27d86['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xf91c06=>(_0x162d85(),_0xf91c06),()=>{const _0x2dd48f=_0x1ac18a();return null==_0x2dd48f?(_0x162d85(),'Valid'):_0x291bb0-_0x2dd48f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x21b59d)['catch'](()=>{_0x21b59d('UsageLimit');});const _0x47f7b9=0x36ee80;function _0x162d85(){const _0x5ca74a='llct-'+_0x3e61ec(_0x315cf0(_0x44f5db)),_0x3a42a7=_0x57ac6b(_0x3e61ec(window['Math']['ceil'](_0x291bb0/_0x47f7b9)));window['localStorage']['setItem'](_0x5ca74a,_0x3a42a7);}function _0x1ac18a(){const _0x2a7259='llct-'+_0x3e61ec(_0x315cf0(_0x44f5db)),_0x218666=window['localStorage']['getItem'](_0x2a7259);return _0x218666?window['parseInt'](_0x57ac6b(_0x218666),0x10)*_0x47f7b9:null;}function _0x3897dc(_0x5c77d8){return new window['Promise']((_0x2bfef8,_0x6bfc18)=>{_0x5c77d8['then'](_0x2bfef8,_0x6bfc18),window['setTimeout'](_0x6bfc18,0x1d4c0);});}}_0x3d0edd['on']('_sendUsageRequest',(_0x555e61,_0x818106)=>{if(_0x818106[0x0]!=_0x44f5db)return _0x21b59d('UsageLimit');_0x818106[0x1]={..._0x818106[0x1],'requestId':_0x552fc2};},{'priority':'high'}),_0x3d0edd['on']('_sendUsageRequest',_0x4ef65b=>{_0x13942a(_0x4ef65b['return'])&&(_0x3b808b=!0x0,_0x36fc1(_0x4ef65b['return']));},{'priority':'low'}),_0xe87386['then'](()=>{_0x3b808b||_0x21b59d('UsageLimit');});});function _0x3ccf8a(){return'auto'==_0x3d0edd['editing']['view']['_overlayModeHint'];}function _0x11aab9(){_0x3d0edd['editing']['view']['_overlayModeHint']='auto';}}function _0x5dbc1a(_0x1f085d){const _0x57761f=[new window['Promise'](_0x9f232e=>setTimeout(_0x9f232e,0x93ecc)),_0xe87386['then'](()=>new window['Promise'](_0x43f98d=>{let _0x5aa196=0x0;_0x3d0edd['model']['on']('applyOperation',(_0x46629d,_0x26e542)=>{_0x26e542[0x0]['isDocumentOperation']&&_0x5aa196++,0x5e8==_0x5aa196&&(_0x43f98d(),_0x46629d['off']());});}))];return window['Promise']['race'](_0x57761f)['then'](()=>_0x1f085d);}async function _0x2046a3(){await _0xe87386,_0x3d0edd['model']['change']=_0x58dd8d,_0x3d0edd['model']['enqueueChange']=_0x58dd8d,_0x3d0edd['enableReadOnlyMode']('model');}function _0x23f414(){return window['Drupal'];}function _0x38221b(){return window['glob']&&window['glob']['triliumVersion'];}function _0x3d6fd9(_0x5189b6){const _0x7483aa=_0x4a09d6();_0x3d0edd[_0x7483aa]='templateLicenseKey'+_0x5189b6,'Valid'!=_0x5189b6&&_0x2046a3();}function _0x4a09d6(){const _0x3c9078=window['String'](window['performance']['now']())['replace']('.','');let _0x5e4a0c='g';for(let _0x3e27f7=0x0;_0x3e27f7<_0x3c9078['length'];_0x3e27f7+=0x2){let _0x1b364f=window['parseInt'](_0x3c9078['substring'](_0x3e27f7,_0x3e27f7+0x2));_0x1b364f>=0x3e&&(_0x1b364f-=0x3e),_0x5e4a0c+=_0x36f9e1[_0x1b364f];}return _0x5e4a0c;}function _0x44a365(){const _0x2e0f4d=_0x40f5df['split']('.');if(0x3!=_0x2e0f4d['length'])return null;return _0x122c66(_0x2e0f4d[0x1]);function _0x122c66(_0x36d0fb){const _0x1a5c44=_0x5dedca(_0x36d0fb);return _0x1a5c44&&_0x50eab8()?_0x1a5c44:null;function _0x50eab8(){const _0x241b2f=_0x1a5c44['jti'],_0x5d0aae=window['parseInt'](_0x241b2f['substring'](_0x241b2f['length']-0x8),0x10),_0x519e51={..._0x1a5c44,'jti':_0x241b2f['substring'](0x0,_0x241b2f['length']-0x8)};return delete _0x519e51['vc'],_0x315cf0(_0x519e51)==_0x5d0aae;}}}async function _0x89e540(){let _0x4b51fa=!0x0;try{const [_0x5a9b6d,_0x48e4f,_0x72ee53]=_0x40f5df['split']('.');return _0x4f65c9(_0x5a9b6d),await _0x15387c(_0x5a9b6d,_0x48e4f,_0x72ee53),_0x4b51fa;}catch{return!0x1;}function _0x4f65c9(_0x2ebfcf){const _0x227a97=_0x5dedca(_0x2ebfcf);_0x227a97&&'ES256'==_0x227a97['alg']||(_0x4b51fa=!0x1);}async function _0x15387c(_0x2547c4,_0x5d7957,_0x39218f){const _0x16fcd6=window['Uint8Array']['from'](_0xf57908(_0x39218f),_0x19d628=>_0x19d628['charCodeAt'](0x0)),_0x3dd5df=new window['TextEncoder']()['encode'](_0x2547c4+'.'+_0x5d7957),_0x4e7560=window['crypto']['subtle'];if(!_0x4e7560)return;const _0x5df673=await _0x4e7560['importKey']('jwk',_0x4dfff8,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4e7560['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5df673,_0x16fcd6,_0x3dd5df)||(_0x4b51fa=!0x1);}}function _0x5dedca(_0x442271){return _0x442271['startsWith']('ey')?JSON['parse'](_0xf57908(_0x442271)):null;}function _0xf57908(_0x203d26){return window['atob'](_0x203d26['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x315cf0(_0x38f02a){let _0x1b78b2=0x1505;function _0x135eb0(_0x127a1d){for(let _0x157d91=0x0;_0x157d91<_0x127a1d['length'];_0x157d91++){const _0x432a19=_0x127a1d['charCodeAt'](_0x157d91);_0x1b78b2=(_0x1b78b2<<0x5)+_0x1b78b2+_0x432a19,_0x1b78b2&=_0x1b78b2;}}function _0x27d2ee(_0x17ac93){Array['isArray'](_0x17ac93)?_0x17ac93['forEach'](_0x27d2ee):_0x17ac93&&'object'==typeof _0x17ac93?Object['entries'](_0x17ac93)['sort']()['forEach'](([_0x3e8265,_0x5e1716])=>{_0x135eb0(_0x3e8265),_0x27d2ee(_0x5e1716);}):_0x135eb0(window['String'](_0x17ac93));}return _0x27d2ee(_0x38f02a),_0x1b78b2>>>0x0;}function _0x3e61ec(_0x134201){return _0x134201['toString'](0x10)['padStart'](0x8,'0');}function _0x57ac6b(_0x2e7f62){return _0x2e7f62['split']('')['reverse']()['join']('');}function _0x58dd8d(){}_0x3d6fd9(await _0x2da6f7());}(this);}['_createTemplateListView'](_0x1ec2b8,_0x42996a){const {editor:_0x6a0697}=this,_0x50c693=new L(_0x1ec2b8);return _0x50c693['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x50c693['items']['addMany'](_0x42996a['map']((_0x254968,_0x193414)=>{const _0x1e6c2b=new x(_0x1ec2b8,_0x193414),_0x23ea7a=new b(_0x1ec2b8,_0x254968);return _0x1e6c2b['buttonView']=_0x23ea7a,_0x1e6c2b['children']['add'](_0x23ea7a),_0x1e6c2b['buttonView']['on']('execute',_0x2ef1be=>{_0x6a0697['execute']('insertTemplate',_0x2ef1be['source']['templateDefinition']['data']),_0x6a0697['editing']['view']['focus']();}),_0x1e6c2b;})),_0x50c693;}},K=class extends _0x1ac961{static get['requires'](){return[y,T];}static get['pluginName'](){return'Template';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as Template,g as TemplateCommand,y as TemplateEditing,T as TemplateUI};
|
|
23
|
+
import{Command as _0x46012c,Plugin as _0x595992}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x10ddad,IconTemplateGeneric as _0x43559f}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x3083b8,HighlightedTextView as _0xf1c779,ListItemView as _0x364320,ListView as _0x19ac51,MenuBarMenuListItemButtonView as _0x6c4021,MenuBarMenuListItemView as _0x13f2cc,MenuBarMenuListView as _0x3762ad,MenuBarMenuView as _0x17b06a,SearchTextView as _0x3bb6ca,View as _0x2b5d97,createDropdown as _0xa35401}from'@ckeditor/ckeditor5-ui';import{uid as _0x1e259a}from'@ckeditor/ckeditor5-utils';var g=class extends _0x46012c{['execute'](_0x2a4bd5){const {model:_0x36cac8}=this['editor'];let _0x5465ea;switch(typeof _0x2a4bd5){case'string':_0x5465ea=_0x2a4bd5;break;case'function':_0x5465ea=_0x2a4bd5();}'string'==typeof _0x5465ea&&_0x36cac8['change'](()=>{const _0x4b95bb=this['editor']['data']['htmlProcessor']['toView'](_0x5465ea),_0x4ef58a=_0x36cac8['document']['selection']['getFirstPosition']()['root'],_0x1fc3b4=this['editor']['data']['toModel'](_0x4b95bb,_0x4ef58a);_0x36cac8['insertContent'](_0x1fc3b4);});}},y=class extends _0x595992{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xff1e96}=this;_0xff1e96['commands']['add']('insertTemplate',new g(_0xff1e96)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4ec732=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x332dff;for(const _0x21e593 in _0x4ec732){const _0x28ed63=_0x21e593,_0x37d1ce=_0x4ec732[_0x28ed63];if('templateLicenseKeyValid'==_0x37d1ce||'templateLicenseKeyInvalid'==_0x37d1ce||'templateLicenseKeyExpired'==_0x37d1ce||'templateLicenseKeyDomainLimit'==_0x37d1ce||'templateLicenseKeyNotAllowed'==_0x37d1ce||'templateLicenseKeyEvaluationLimit'==_0x37d1ce||'templateLicenseKeyUsageLimit'==_0x37d1ce){delete _0x4ec732[_0x28ed63],_0x332dff=_0x37d1ce,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x332dff&&_0x4ec732['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x332dff&&_0x4ec732['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x332dff&&_0x4ec732['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x332dff&&_0x4ec732['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x332dff&&_0x4ec732['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x332dff&&_0x4ec732['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x19ac51{['filter'](_0x3d3f06){if(!_0x3d3f06)return this['_resetFiltering']();const _0x377392=new Map(),_0x58d95f=this['items']['map'](_0x979957=>{const _0x30357b=_0x979957['buttonView']['isMatching'](_0x3d3f06);return _0x979957['isVisible']=!!_0x30357b,_0x979957['buttonView']['highlightText'](_0x30357b?_0x3d3f06:null),_0x30357b&&_0x377392['set'](_0x979957,_0x30357b),_0x979957;})['sort'](v)['sort'](function(_0x385555){return function(_0x4b276a,_0x3553cb){const _0x4742a0=_0x385555['get'](_0x4b276a),_0x5a0638=_0x385555['get'](_0x3553cb);return _0x4742a0&&!_0x5a0638?-0x1:_0x5a0638&&!_0x4742a0?0x1:_0x4742a0||_0x5a0638?_0x4742a0['title']&&!_0x5a0638['title']?-0x1:!_0x4742a0['title']&&_0x5a0638['title']?0x1:0x0:0x0;};}(_0x377392));return this['items']['clear'](),this['items']['addMany'](_0x58d95f),{'resultsCount':_0x377392['size'],'totalItemsCount':this['items']['length']};}['_resetFiltering'](){const _0x4f4743=this['items']['map'](_0xa21bd3=>_0xa21bd3)['sort'](v);return _0x4f4743['forEach'](_0x20a294=>{_0x20a294['isVisible']=!0x0,_0x20a294['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x4f4743),{'resultsCount':_0x4f4743['length'],'totalItemsCount':_0x4f4743['length']};}};function v(_0x3aea0c,_0x4d394b){return _0x3aea0c['originalIndex']-_0x4d394b['originalIndex'];}var x=class extends _0x364320{['originalIndex'];['buttonView'];constructor(_0xd20d0c,_0x46d327){super(_0xd20d0c),this['originalIndex']=_0x46d327,this['buttonView']=null;}},b=class extends _0x3083b8{['templateDefinition'];['textPartView'];constructor(_0x36e953,_0x4610b8){super(_0x36e953),this['templateDefinition']=_0x4610b8,this['textPartView']=null;const {icon:_0x1ce638=_0x43559f}=_0x4610b8;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x1ce638}),this['iconView']['isColorInherited']=!0x1;}['render'](){super['render'](),this['textPartView']=new k(this['locale'],this['templateDefinition'],this['labelView']['element']['id']),this['children']['remove'](this['labelView']),this['children']['add'](this['textPartView']);}['destroy'](){super['destroy'](),this['labelView']['destroy']();}['isMatching'](_0x57d970){const {title:_0x425c59,description:_0x32f045}=this['templateDefinition'],_0x494dde=!!_0x425c59['match'](_0x57d970),_0x5baf2a=!(!_0x32f045||!_0x32f045['match'](_0x57d970));return _0x494dde||_0x5baf2a?{'title':_0x494dde,'description':_0x5baf2a}:null;}['highlightText'](_0x530a06){this['textPartView']['highlightText'](_0x530a06);}},k=class extends _0x2b5d97{constructor(_0x2cbbbc,_0x393be3,_0x4af13e){super(_0x2cbbbc),this['title']=_0x393be3['title'],this['description']=_0x393be3['description'],this['titleView']=new _0xf1c779(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x4af13e}});const _0x40e74d=[this['titleView']];this['description']&&(this['descriptionView']=new _0xf1c779(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x40e74d['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x40e74d});}['highlightText'](_0x1b712f){this['titleView']['highlightText'](_0x1b712f),this['description']&&this['descriptionView']['highlightText'](_0x1b712f);}};function I(_0x4ef4b7,_0x2a6e0d,..._0x5a8550){const t=_0x4ef4b7['t'];switch(_0x2a6e0d){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x5a8550);case'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.':return t('Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.');case'No\x20templates\x20available.':return t('No\x20templates\x20available.');case'%0\x20templates\x20found':return t('%0\x20templates\x20found',..._0x5a8550);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x2a6e0d;}}var T=class extends _0x595992{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1c5670}=this,_0x4a4fe9=_0x1c5670['config']['get']('template.definitions')||[];_0x1c5670['ui']['componentFactory']['add']('insertTemplate',_0x1a200e=>{const _0x10f618=_0xa35401(_0x1a200e),_0x2bb159=new _0x3bb6ca(_0x1a200e,{'filteredView':this['_createTemplateListView'](_0x1a200e,_0x4a4fe9),'queryView':{'label':I(_0x1a200e,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x4e39e4=>I(_0x1a200e,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x4e39e4),'secondary':I(_0x1a200e,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x1a200e,'No\x20templates\x20available.')}}}}),_0x3119db=_0x1c5670['commands']['get']('insertTemplate');return _0x2bb159['on']('search',(_0x2f608f,_0x2a249c)=>{_0x2a249c['query']&&_0x2a249c['query']['length']&&_0x1c5670['ui']['ariaLiveAnnouncer']['announce'](I(_0x1a200e,'%0\x20templates\x20found',_0x2a249c['resultsCount']));}),_0x10f618['bind']('isEnabled')['to'](_0x3119db),_0x10f618['panelView']['children']['add'](_0x2bb159),_0x10f618['buttonView']['set']({'label':I(_0x1a200e,'Insert\x20template'),'icon':_0x10ddad,'tooltip':!0x0}),_0x10f618['on']('change:isOpen',(_0x49798d,_0x1890b3,_0x4a8d16)=>{_0x4a8d16||_0x2bb159['reset']();}),_0x10f618;}),_0x1c5670['ui']['componentFactory']['add']('menuBar:insertTemplate',_0xe7e4b4=>{const _0x39f25f=_0x1c5670['commands']['get']('insertTemplate'),_0x5b1999=new _0x17b06a(_0xe7e4b4);_0x5b1999['buttonView']['set']({'label':I(_0xe7e4b4,'Template'),'icon':_0x10ddad});const _0x4884de=new _0x3762ad(_0xe7e4b4);if(!_0x4a4fe9||!_0x4a4fe9['length']){const _0x55ef08=new _0x13f2cc(_0xe7e4b4,_0x5b1999),_0x737b6b=new _0x6c4021(_0xe7e4b4);_0x737b6b['set']({'label':I(_0xe7e4b4,'No\x20templates\x20available.')}),_0x737b6b['delegate']('execute')['to'](_0x5b1999),_0x737b6b['on']('execute',()=>{_0x1c5670['editing']['view']['focus']();}),_0x55ef08['children']['add'](_0x737b6b),_0x4884de['items']['add'](_0x55ef08);}for(const _0x561316 of _0x4a4fe9){const _0x227eaf=new _0x13f2cc(_0xe7e4b4,_0x5b1999),_0x1d7f42=new _0x6c4021(_0xe7e4b4);_0x1d7f42['set']({'class':'ck-template-button','label':_0x561316['title'],'icon':_0x561316['icon']||_0x43559f}),_0x1d7f42['delegate']('execute')['to'](_0x5b1999),_0x1d7f42['on']('execute',()=>{_0x1c5670['execute']('insertTemplate',_0x561316['data']),_0x1c5670['editing']['view']['focus']();}),_0x227eaf['children']['add'](_0x1d7f42),_0x4884de['items']['add'](_0x227eaf);}return _0x5b1999['panelView']['children']['add'](_0x4884de),_0x5b1999['bind']('isEnabled')['to'](_0x39f25f,'isEnabled'),_0x5b1999;});}['afterInit'](){!async function(_0x645a6c){const _0x19dfba='5goNZRxHzmBfrl0Fq6Cks1ahDGS2LUEWiby3wKvu4IVPdeT8jn9MOQJtcAY7Xp',_0x4d6d1e=0x78df8,_0x6ca7e7=window['Date']['now'](),_0x12e365=_0x645a6c['editor'],_0x2d94d3=new window['Promise'](_0x45a835=>{_0x12e365['once']('ready',_0x45a835);}),_0x1b6ac6={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x38e355=_0x12e365['config']['get']('licenseKey');async function _0x2f3a3b(){let _0x2b047f,_0x20f681=null,_0x4e6a6a=null;try{return'GPL'==_0x38e355?'NotAllowed':(_0x2b047f=_0x31c7bb(),_0x2b047f?(_0x2b047f['usageEndpoint']&&(_0x4e6a6a=_0x194036(_0x2b047f['usageEndpoint'],_0x2b047f['jti'])),await _0x4f26f3()?_0x26b67e()?_0x2339c1()?'Expired':_0x1f9690()?('evaluation'==_0x2b047f['licenseType']&&(_0x20f681=_0x127f8c('EvaluationLimit')),await _0x369051()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2339c1(){const _0x19719c=['evaluation','trial']['includes'](_0x2b047f['licenseType'])?_0x6ca7e7/0x3e8:0xe10*_0x4d6d1e;return _0x2b047f['exp']<_0x19719c;}function _0x26b67e(){const _0x33fd61=_0x2b047f['features'];return!!_0x33fd61&&(!!_0x33fd61['includes']('*')||(!!_0x33fd61['includes']('TPL')||(!!_0x33fd61['includes']('PP')||(!(!_0x33fd61['includes']('DRUP')||!_0x200c1b())||!(!_0x33fd61['includes']('TRILIUM')||!_0x30d1aa())))));}function _0x1f9690(){const _0x1ce107=_0x2b047f['licensedHosts'];if(!_0x1ce107||0x0==_0x1ce107['length'])return!0x0;const {hostname:_0x99ca6e}=new URL(window['location']['href']);if(_0x1ce107['includes'](_0x99ca6e))return!0x0;const _0x10d0c0=_0x99ca6e['split']('.');return _0x1ce107['filter'](_0x4b20cc=>_0x4b20cc['includes']('*'))['map'](_0xfe5b16=>_0xfe5b16['split']('.'))['filter'](_0x243e93=>_0x243e93['length']<=_0x10d0c0['length'])['map'](_0x581136=>Array(_0x10d0c0['length']-_0x581136['length'])['fill']('*'===_0x581136[0x0]?'*':'')['concat'](_0x581136))['some'](_0x2bbdf5=>_0x10d0c0['every']((_0xabe642,_0x2d2c6c)=>_0x2bbdf5[_0x2d2c6c]===_0xabe642||'*'===_0x2bbdf5[_0x2d2c6c]));}function _0x369051(){return _0x20f681&&_0x4e6a6a?new window['Promise']((_0x539c31,_0xb3dc54)=>{_0x20f681['then'](_0x539c31,_0xb3dc54),_0x4e6a6a['then'](_0x3fe7c5=>{'Valid'!=_0x3fe7c5&&_0x539c31(_0x3fe7c5);},_0xb3dc54);}):_0x20f681||_0x4e6a6a||'Valid';}}function _0x194036(_0x45d733,_0x53c547){return new window['Promise'](_0x841e48=>{if(_0x185734())return _0x841e48('Valid');_0x4bdd25(),_0x12e365['decorate']('_sendUsageRequest');let _0xb00135=!0x1;const _0x1f6e5c=_0x1e259a();function _0x274dc5(_0x423770){return!!_0x423770&&('object'==typeof _0x423770||'function'==typeof _0x423770)&&'function'==typeof _0x423770['then']&&'function'==typeof _0x423770['catch'];}function _0x5cd8bc(_0x4c638a){_0x5f0f69(_0x4c638a)['then'](_0x646ef6=>_0x646ef6&&'ok'==_0x646ef6['status']?_0x47c518(_0x1d9b8f(_0x1f6e5c+_0x53c547))!=_0x646ef6['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x52f2de=>(_0x2dab77(),_0x52f2de),()=>{const _0x1d1ede=_0x1f7404();return null==_0x1d1ede?(_0x2dab77(),'Valid'):_0x6ca7e7-_0x1d1ede>0x240c8400?'UsageLimit':'Valid';})['then'](_0x841e48)['catch'](()=>{_0x841e48('UsageLimit');});const _0x441f4a=0x36ee80;function _0x2dab77(){const _0xf8e529='llct-'+_0x47c518(_0x1d9b8f(_0x45d733)),_0x333ad0=_0x375918(_0x47c518(window['Math']['ceil'](_0x6ca7e7/_0x441f4a)));window['localStorage']['setItem'](_0xf8e529,_0x333ad0);}function _0x1f7404(){const _0x2789f9='llct-'+_0x47c518(_0x1d9b8f(_0x45d733)),_0x2aa528=window['localStorage']['getItem'](_0x2789f9);return _0x2aa528?window['parseInt'](_0x375918(_0x2aa528),0x10)*_0x441f4a:null;}function _0x5f0f69(_0x3602f2){return new window['Promise']((_0x359d65,_0x3b06ed)=>{_0x3602f2['then'](_0x359d65,_0x3b06ed),window['setTimeout'](_0x3b06ed,0x1d4c0);});}}_0x12e365['on']('_sendUsageRequest',(_0x32c643,_0x32a5d9)=>{if(_0x32a5d9[0x0]!=_0x45d733)return _0x841e48('UsageLimit');_0x32a5d9[0x1]={..._0x32a5d9[0x1],'requestId':_0x1f6e5c};},{'priority':'high'}),_0x12e365['on']('_sendUsageRequest',_0x4289e9=>{_0x274dc5(_0x4289e9['return'])&&(_0xb00135=!0x0,_0x5cd8bc(_0x4289e9['return']));},{'priority':'low'}),_0x2d94d3['then'](()=>{_0xb00135||_0x841e48('UsageLimit');});});function _0x185734(){return'auto'==_0x12e365['editing']['view']['_overlayModeHint'];}function _0x4bdd25(){_0x12e365['editing']['view']['_overlayModeHint']='auto';}}function _0x127f8c(_0x5d75cb){const _0x48c826=[new window['Promise'](_0x3b0825=>setTimeout(_0x3b0825,0x93ecc)),_0x2d94d3['then'](()=>new window['Promise'](_0x514a4f=>{let _0x366702=0x0;_0x12e365['model']['on']('applyOperation',(_0x383e14,_0x4084a5)=>{_0x4084a5[0x0]['isDocumentOperation']&&_0x366702++,0x5e8==_0x366702&&(_0x514a4f(),_0x383e14['off']());});}))];return window['Promise']['race'](_0x48c826)['then'](()=>_0x5d75cb);}async function _0x99d2e2(){await _0x2d94d3,_0x12e365['model']['change']=_0xf76772,_0x12e365['model']['enqueueChange']=_0xf76772,_0x12e365['enableReadOnlyMode']('model');}function _0x200c1b(){return window['Drupal'];}function _0x30d1aa(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5ca403(_0x253cbd){const _0x4221b2=_0x502510();_0x12e365[_0x4221b2]='templateLicenseKey'+_0x253cbd,'Valid'!=_0x253cbd&&_0x99d2e2();}function _0x502510(){const _0x2531a9=window['String'](window['performance']['now']())['replace']('.','');let _0xa89e9c='g';for(let _0x12f4a9=0x0;_0x12f4a9<_0x2531a9['length'];_0x12f4a9+=0x2){let _0x34f6b3=window['parseInt'](_0x2531a9['substring'](_0x12f4a9,_0x12f4a9+0x2));_0x34f6b3>=0x3e&&(_0x34f6b3-=0x3e),_0xa89e9c+=_0x19dfba[_0x34f6b3];}return _0xa89e9c;}function _0x31c7bb(){const _0x4c8abc=_0x38e355['split']('.');if(0x3!=_0x4c8abc['length'])return null;return _0x142065(_0x4c8abc[0x1]);function _0x142065(_0xecbd57){const _0x257d06=_0x1d120(_0xecbd57);return _0x257d06&&_0x30d858()?_0x257d06:null;function _0x30d858(){const _0x1e7f31=_0x257d06['jti'],_0xa8b7da=window['parseInt'](_0x1e7f31['substring'](_0x1e7f31['length']-0x8),0x10),_0x596f64={..._0x257d06,'jti':_0x1e7f31['substring'](0x0,_0x1e7f31['length']-0x8)};return delete _0x596f64['vc'],_0x1d9b8f(_0x596f64)==_0xa8b7da;}}}async function _0x4f26f3(){let _0x5aed49=!0x0;try{const [_0x5a5da7,_0x487314,_0x4b5595]=_0x38e355['split']('.');return _0x5896db(_0x5a5da7),await _0x3839e7(_0x5a5da7,_0x487314,_0x4b5595),_0x5aed49;}catch{return!0x1;}function _0x5896db(_0x4434e9){const _0x57aefd=_0x1d120(_0x4434e9);_0x57aefd&&'ES256'==_0x57aefd['alg']||(_0x5aed49=!0x1);}async function _0x3839e7(_0x331de3,_0xa27ff2,_0x21eded){const _0x128908=window['Uint8Array']['from'](_0x1c3499(_0x21eded),_0x47d11a=>_0x47d11a['charCodeAt'](0x0)),_0x31c28b=new window['TextEncoder']()['encode'](_0x331de3+'.'+_0xa27ff2),_0x52d047=window['crypto']['subtle'];if(!_0x52d047)return;const _0x2a56b0=await _0x52d047['importKey']('jwk',_0x1b6ac6,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x52d047['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2a56b0,_0x128908,_0x31c28b)||(_0x5aed49=!0x1);}}function _0x1d120(_0x2ab404){return _0x2ab404['startsWith']('ey')?JSON['parse'](_0x1c3499(_0x2ab404)):null;}function _0x1c3499(_0x2dddc8){return window['atob'](_0x2dddc8['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1d9b8f(_0x1b6924){let _0x52d07d=0x1505;function _0x42a338(_0x3c4580){for(let _0x34e9d6=0x0;_0x34e9d6<_0x3c4580['length'];_0x34e9d6++){const _0x548882=_0x3c4580['charCodeAt'](_0x34e9d6);_0x52d07d=(_0x52d07d<<0x5)+_0x52d07d+_0x548882,_0x52d07d&=_0x52d07d;}}function _0x1e2c4c(_0x8c3a59){Array['isArray'](_0x8c3a59)?_0x8c3a59['forEach'](_0x1e2c4c):_0x8c3a59&&'object'==typeof _0x8c3a59?Object['entries'](_0x8c3a59)['sort']()['forEach'](([_0x28fefc,_0x2660c8])=>{_0x42a338(_0x28fefc),_0x1e2c4c(_0x2660c8);}):_0x42a338(window['String'](_0x8c3a59));}return _0x1e2c4c(_0x1b6924),_0x52d07d>>>0x0;}function _0x47c518(_0x30ecf5){return _0x30ecf5['toString'](0x10)['padStart'](0x8,'0');}function _0x375918(_0x38c551){return _0x38c551['split']('')['reverse']()['join']('');}function _0xf76772(){}_0x5ca403(await _0x2f3a3b());}(this);}['_createTemplateListView'](_0xb4a465,_0x4bf46b){const {editor:_0x4e2eb0}=this,_0x364f10=new L(_0xb4a465);return _0x364f10['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x364f10['items']['addMany'](_0x4bf46b['map']((_0xd17267,_0x1bfa00)=>{const _0x500b44=new x(_0xb4a465,_0x1bfa00),_0x39a2a3=new b(_0xb4a465,_0xd17267);return _0x500b44['buttonView']=_0x39a2a3,_0x500b44['children']['add'](_0x39a2a3),_0x500b44['buttonView']['on']('execute',_0x158755=>{_0x4e2eb0['execute']('insertTemplate',_0x158755['source']['templateDefinition']['data']),_0x4e2eb0['editing']['view']['focus']();}),_0x500b44;})),_0x364f10;}},K=class extends _0x595992{static get['requires'](){return[y,T];}static get['pluginName'](){return'Template';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as Template,g as TemplateCommand,y as TemplateEditing,T as TemplateUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-template",
|
|
3
|
-
"version": "48.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.1",
|
|
4
4
|
"description": "Template feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ckeditor/ckeditor5-core": "48.3.0-alpha.
|
|
35
|
-
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.
|
|
36
|
-
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.
|
|
37
|
-
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
34
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
|
|
35
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.1",
|
|
36
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.1",
|
|
37
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.1",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.1"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|