@ckeditor/ckeditor5-template 48.5.0-alpha.1 → 48.5.0-alpha.2
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 _0x20b1bd,Plugin as _0x3c97f5}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x1325d7,IconTemplateGeneric as _0x329987}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0xeeb17d,HighlightedTextView as _0x2baedd,ListItemView as _0x2d293d,ListView as _0x252f3d,MenuBarMenuListItemButtonView as _0x121653,MenuBarMenuListItemView as _0x5bd162,MenuBarMenuListView as _0x6acd08,MenuBarMenuView as _0x41ee43,SearchTextView as _0x26acce,View as _0x3b0b3d,createDropdown as _0x439372}from'@ckeditor/ckeditor5-ui';import{uid as _0x23a6a6}from'@ckeditor/ckeditor5-utils';var g=class extends _0x20b1bd{execute(_0x2513dd){const {model:_0x155b81}=this['editor'];let _0x3409ef;switch(typeof _0x2513dd){case'string':_0x3409ef=_0x2513dd;break;case'function':_0x3409ef=_0x2513dd();}'string'==typeof _0x3409ef&&_0x155b81['change'](()=>{const _0x3305b5=this['editor']['data']['htmlProcessor']['toView'](_0x3409ef),_0x5e33f3=_0x155b81['document']['selection']['getFirstPosition']()['root'],_0x36e402=this['editor']['data']['toModel'](_0x3305b5,_0x5e33f3);_0x155b81['insertContent'](_0x36e402);});}},y=class extends _0x3c97f5{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x42589e}=this;_0x42589e['commands']['add']('insertTemplate',new g(_0x42589e)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x2a073f=[this['editor']];for(const _0x5bdc1d of _0x2a073f){let _0x2d07fc;for(const _0x1ee251 in _0x5bdc1d){const _0x3347d8=_0x1ee251,_0x41927b=_0x5bdc1d[_0x3347d8];if('templateLicenseKeyValid'==_0x41927b||'templateLicenseKeyInvalid'==_0x41927b||'templateLicenseKeyExpired'==_0x41927b||'templateLicenseKeyDomainLimit'==_0x41927b||'templateLicenseKeyNotAllowed'==_0x41927b||'templateLicenseKeyEvaluationLimit'==_0x41927b||'templateLicenseKeyUsageLimit'==_0x41927b){delete _0x5bdc1d[_0x3347d8],_0x2d07fc=_0x41927b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x2d07fc&&_0x5bdc1d['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x2d07fc&&_0x5bdc1d['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x2d07fc&&_0x5bdc1d['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x2d07fc&&_0x5bdc1d['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x2d07fc&&_0x5bdc1d['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x2d07fc&&_0x5bdc1d['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x252f3d{filter(_0x56c737){if(!_0x56c737)return this['_resetFiltering']();const _0x578457=new Map(),_0x5c98ec=this['items']['map'](_0x36b5e6=>{const _0x3618b9=_0x36b5e6['buttonView']['isMatching'](_0x56c737);return _0x36b5e6['isVisible']=!!_0x3618b9,_0x36b5e6['buttonView']['highlightText'](_0x3618b9?_0x56c737:null),_0x3618b9&&_0x578457['set'](_0x36b5e6,_0x3618b9),_0x36b5e6;})['sort'](v)['sort'](function(_0x18ac08){return function(_0xc70729,_0x45c1be){const _0x25f946=_0x18ac08['get'](_0xc70729),_0x4d771c=_0x18ac08['get'](_0x45c1be);return _0x25f946&&!_0x4d771c?-0x1:_0x4d771c&&!_0x25f946?0x1:_0x25f946||_0x4d771c?_0x25f946['title']&&!_0x4d771c['title']?-0x1:!_0x25f946['title']&&_0x4d771c['title']?0x1:0x0:0x0;};}(_0x578457));return this['items']['clear'](),this['items']['addMany'](_0x5c98ec),{'resultsCount':_0x578457['size'],'totalItemsCount':this['items']['length']};}_resetFiltering(){const _0x228915=this['items']['map'](_0x1ed8f8=>_0x1ed8f8)['sort'](v);return _0x228915['forEach'](_0x390297=>{_0x390297['isVisible']=!0x0,_0x390297['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x228915),{'resultsCount':_0x228915['length'],'totalItemsCount':_0x228915['length']};}};function v(_0x457e4b,_0x245c97){return _0x457e4b['originalIndex']-_0x245c97['originalIndex'];}var x=class extends _0x2d293d{['originalIndex'];buttonView;constructor(_0x27a123,_0x111563){super(_0x27a123),this['originalIndex']=_0x111563,this['buttonView']=null;}},b=class extends _0xeeb17d{templateDefinition;textPartView;constructor(_0x23fe3a,_0x31759f){super(_0x23fe3a),this['templateDefinition']=_0x31759f,this['textPartView']=null;const {icon:_0x381ef3=_0x329987}=_0x31759f;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x381ef3}),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(_0x4d202f){const {title:_0x10e080,description:_0x454bb4}=this['templateDefinition'],_0x20905f=!!_0x10e080['match'](_0x4d202f),_0x2ac10c=!(!_0x454bb4||!_0x454bb4['match'](_0x4d202f));return _0x20905f||_0x2ac10c?{'title':_0x20905f,'description':_0x2ac10c}:null;}highlightText(_0x20c5e2){this['textPartView']['highlightText'](_0x20c5e2);}},k=class extends _0x3b0b3d{constructor(_0x285b75,_0x5241d9,_0x56b442){super(_0x285b75),this['title']=_0x5241d9['title'],this['description']=_0x5241d9['description'],this['titleView']=new _0x2baedd(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x56b442}});const _0x250fe0=[this['titleView']];this['description']&&(this['descriptionView']=new _0x2baedd(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x250fe0['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x250fe0});}highlightText(_0x40bf3c){this['titleView']['highlightText'](_0x40bf3c),this['description']&&this['descriptionView']['highlightText'](_0x40bf3c);}};function I(_0x34cdde,_0x1e5eda,..._0x4b8326){const t=_0x34cdde['t'];switch(_0x1e5eda){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x4b8326);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',..._0x4b8326);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x1e5eda;}}var T=class extends _0x3c97f5{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x356dc7}=this,_0x8670bc=_0x356dc7['config']['get']('template.definitions')||[];_0x356dc7['ui']['componentFactory']['add']('insertTemplate',_0xb67496=>{const _0x40051d=_0x439372(_0xb67496),_0x1caa6c=this['_createTemplateListView'](_0xb67496,_0x8670bc),_0xcca45=new _0x26acce(_0xb67496,{'filteredView':_0x1caa6c,'queryView':{'label':I(_0xb67496,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0xcf560e=>I(_0xb67496,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0xcf560e),'secondary':I(_0xb67496,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0xb67496,'No\x20templates\x20available.')}}}}),_0x3f01ad=_0x356dc7['commands']['get']('insertTemplate');return _0xcca45['on']('search',(_0x35aba4,_0x5800b2)=>{_0x5800b2['query']&&_0x5800b2['query']['length']&&_0x356dc7['ui']['ariaLiveAnnouncer']['announce'](I(_0xb67496,'%0\x20templates\x20found',_0x5800b2['resultsCount']));}),_0x40051d['bind']('isEnabled')['to'](_0x3f01ad),_0x40051d['panelView']['children']['add'](_0xcca45),_0x40051d['buttonView']['set']({'label':I(_0xb67496,'Insert\x20template'),'icon':_0x1325d7,'tooltip':!0x0}),_0x40051d['on']('change:isOpen',(_0x16d922,_0x940096,_0x4037ee)=>{_0x4037ee||_0xcca45['reset']();}),_0x40051d;}),_0x356dc7['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x34376f=>{const _0x4dc65d=_0x356dc7['commands']['get']('insertTemplate'),_0x45b308=new _0x41ee43(_0x34376f);_0x45b308['buttonView']['set']({'label':I(_0x34376f,'Template'),'icon':_0x1325d7});const _0x127750=new _0x6acd08(_0x34376f);if(!_0x8670bc||!_0x8670bc['length']){const _0x14ab6b=new _0x5bd162(_0x34376f,_0x45b308),_0x45b910=new _0x121653(_0x34376f);_0x45b910['set']({'label':I(_0x34376f,'No\x20templates\x20available.')}),_0x45b910['delegate']('execute')['to'](_0x45b308),_0x45b910['on']('execute',()=>{_0x356dc7['editing']['view']['focus']();}),_0x14ab6b['children']['add'](_0x45b910),_0x127750['items']['add'](_0x14ab6b);}for(const _0x326e73 of _0x8670bc){const _0x1b9a89=new _0x5bd162(_0x34376f,_0x45b308),_0x51cc94=new _0x121653(_0x34376f);_0x51cc94['set']({'class':'ck-template-button','label':_0x326e73['title'],'icon':_0x326e73['icon']||_0x329987}),_0x51cc94['delegate']('execute')['to'](_0x45b308),_0x51cc94['on']('execute',()=>{_0x356dc7['execute']('insertTemplate',_0x326e73['data']),_0x356dc7['editing']['view']['focus']();}),_0x1b9a89['children']['add'](_0x51cc94),_0x127750['items']['add'](_0x1b9a89);}return _0x45b308['panelView']['children']['add'](_0x127750),_0x45b308['bind']('isEnabled')['to'](_0x4dc65d,'isEnabled'),_0x45b308;});}afterInit(){!async function(_0x473102){const _0x4ce87d='hgP68pqc7OBJx9u3zrHatYUXf04TdVkMFmwCs5SDAvj21iWQGeZKLyRlENnoIb',_0x1d286b=0x793e0,_0x170766={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x4c36b5(_0x89d7f3){const _0x51d8af=new window['Promise'](_0xe306e=>{_0x89d7f3['once']('ready',_0xe306e);}),_0xabb8c2=window['Date']['now'](),_0xb4d80=_0x89d7f3['config']['get']('licenseKey');async function _0x435319(){let _0x20469f,_0x33b821=null,_0x33e4aa=null;try{return'GPL'==_0xb4d80?'NotAllowed':(_0x20469f=_0x9f479b(),_0x20469f?(_0x20469f['usageEndpoint']&&(_0x33e4aa=_0x811615(_0x20469f['usageEndpoint'],_0x20469f['jti'])),await _0x150a6e()?_0xb26bb2()?_0x3e31ce()?'Expired':_0x103482()?('evaluation'==_0x20469f['licenseType']&&(_0x33b821=_0x4b327a('EvaluationLimit')),await _0x58cbb0()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3e31ce(){const _0x2e62bd=['evaluation','trial']['includes'](_0x20469f['licenseType'])?_0xabb8c2/0x3e8:0xe10*_0x1d286b;return _0x20469f['exp']<_0x2e62bd;}function _0xb26bb2(){const _0x369955=_0x20469f['features'];return!!_0x369955&&(!!_0x369955['includes']('*')||(!!_0x369955['includes']('TPL')||(!!_0x369955['includes']('PP')||(!(!_0x369955['includes']('DRUP')||!_0x3311c0())||!(!_0x369955['includes']('TRILIUM')||!_0x6f3a0d())))));}function _0x103482(){const _0x26cad8=_0x20469f['licensedHosts'];if(!_0x26cad8||0x0==_0x26cad8['length'])return!0x0;const {hostname:_0x36a182}=new URL(window['location']['href']);if(_0x26cad8['includes'](_0x36a182))return!0x0;const _0x3996af=_0x36a182['split']('.');return _0x26cad8['filter'](_0x9ac1a=>_0x9ac1a['includes']('*'))['map'](_0x4555c7=>_0x4555c7['split']('.'))['filter'](_0x1e3d57=>_0x1e3d57['length']<=_0x3996af['length'])['map'](_0x2e8e1b=>Array(_0x3996af['length']-_0x2e8e1b['length'])['fill']('*'===_0x2e8e1b[0x0]?'*':'')['concat'](_0x2e8e1b))['some'](_0x9cfcdf=>_0x3996af['every']((_0x10b97f,_0x4e1823)=>_0x9cfcdf[_0x4e1823]===_0x10b97f||'*'===_0x9cfcdf[_0x4e1823]));}function _0x58cbb0(){return _0x33b821&&_0x33e4aa?new window['Promise']((_0x118cef,_0x483a4d)=>{_0x33b821['then'](_0x118cef,_0x483a4d),_0x33e4aa['then'](_0x105904=>{'Valid'!=_0x105904&&_0x118cef(_0x105904);},_0x483a4d);}):_0x33b821||_0x33e4aa||'Valid';}}function _0x811615(_0x4f1cde,_0x55fb20){return new window['Promise'](_0x2a4c6d=>{if(_0x385e10())return _0x2a4c6d('Valid');_0x214841(),_0x89d7f3['decorate']('_sendUsageRequest');let _0x37604a=!0x1;const _0x212f91=_0x23a6a6();function _0x51d39b(_0x4a788e){return!!_0x4a788e&&('object'==typeof _0x4a788e||'function'==typeof _0x4a788e)&&'function'==typeof _0x4a788e['then']&&'function'==typeof _0x4a788e['catch'];}function _0x13a4e6(_0x109b35){_0x46dcd6(_0x109b35)['then'](_0x482ed4=>_0x482ed4&&'ok'==_0x482ed4['status']?_0x28c189(_0x44048a(_0x212f91+_0x55fb20))!=_0x482ed4['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2ca87b=>(_0x102a11(),_0x2ca87b),()=>{const _0x5d4f16=_0x20f62b();return null==_0x5d4f16?(_0x102a11(),'Valid'):_0xabb8c2-_0x5d4f16>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2a4c6d)['catch'](()=>{_0x2a4c6d('UsageLimit');});const _0x5d57dc=0x36ee80;function _0x102a11(){const _0x9abb95='llct-'+_0x28c189(_0x44048a(_0x4f1cde)),_0x18489b=_0x36a2be(_0x28c189(window['Math']['ceil'](_0xabb8c2/_0x5d57dc)));window['localStorage']['setItem'](_0x9abb95,_0x18489b);}function _0x20f62b(){const _0x3abf0c='llct-'+_0x28c189(_0x44048a(_0x4f1cde)),_0x324324=window['localStorage']['getItem'](_0x3abf0c);return _0x324324?window['parseInt'](_0x36a2be(_0x324324),0x10)*_0x5d57dc:null;}function _0x46dcd6(_0x2b0954){return new window['Promise']((_0x1514b4,_0x1e4d52)=>{_0x2b0954['then'](_0x1514b4,_0x1e4d52),window['setTimeout'](_0x1e4d52,0x1d4c0);});}}_0x89d7f3['on']('_sendUsageRequest',(_0x4ea98,_0x13b880)=>{if(_0x13b880[0x0]!=_0x4f1cde)return _0x2a4c6d('UsageLimit');_0x13b880[0x1]={..._0x13b880[0x1],'requestId':_0x212f91};},{'priority':'high'}),_0x89d7f3['on']('_sendUsageRequest',_0x28c64d=>{_0x51d39b(_0x28c64d['return'])&&(_0x37604a=!0x0,_0x13a4e6(_0x28c64d['return']));},{'priority':'low'}),_0x51d8af['then'](()=>{_0x37604a||_0x2a4c6d('UsageLimit');});});function _0x385e10(){return'auto'==_0x89d7f3['editing']['view']['_overlayModeHint'];}function _0x214841(){_0x89d7f3['editing']['view']['_overlayModeHint']='auto';}}function _0x4b327a(_0x4695ec){const _0xc4a392=[new window['Promise'](_0x293476=>setTimeout(_0x293476,0x93ecc)),_0x51d8af['then'](()=>new window['Promise'](_0x5ee45c=>{let _0x525387=0x0;_0x89d7f3['model']['on']('applyOperation',(_0x64d3b5,_0x1b53f2)=>{_0x1b53f2[0x0]['isDocumentOperation']&&_0x525387++,0x5e8==_0x525387&&(_0x5ee45c(),_0x64d3b5['off']());});}))];return window['Promise']['race'](_0xc4a392)['then'](()=>_0x4695ec);}async function _0x27d011(){await _0x51d8af,_0x89d7f3['model']['change']=_0x49a1ab,_0x89d7f3['model']['enqueueChange']=_0x49a1ab,_0x89d7f3['enableReadOnlyMode']('model');}function _0x3311c0(){return window['Drupal'];}function _0x6f3a0d(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5ef9f7(_0x5867ec){const _0x26a9de=_0x458873();_0x89d7f3[_0x26a9de]='templateLicenseKey'+_0x5867ec,'Valid'!=_0x5867ec&&_0x27d011();}function _0x458873(){const _0x468858=window['String'](window['performance']['now']())['replace']('.','');let _0xaa1ae7='h';for(let _0x5ecfc5=0x0;_0x5ecfc5<_0x468858['length'];_0x5ecfc5+=0x2){let _0x27fea1=window['parseInt'](_0x468858['substring'](_0x5ecfc5,_0x5ecfc5+0x2));_0x27fea1>=0x3e&&(_0x27fea1-=0x3e),_0xaa1ae7+=_0x4ce87d[_0x27fea1];}return _0xaa1ae7;}function _0x9f479b(){const _0x43b959=_0xb4d80['split']('.');if(0x3!=_0x43b959['length'])return null;return _0x5ebb59(_0x43b959[0x1]);function _0x5ebb59(_0x4fe278){const _0x2be85b=_0x4e5c28(_0x4fe278);return _0x2be85b&&_0x5e9d71()?_0x2be85b:null;function _0x5e9d71(){const _0x21c7ef=_0x2be85b['jti'],_0x22736=window['parseInt'](_0x21c7ef['substring'](_0x21c7ef['length']-0x8),0x10),_0x2c2f15={..._0x2be85b,'jti':_0x21c7ef['substring'](0x0,_0x21c7ef['length']-0x8)};return delete _0x2c2f15['vc'],_0x44048a(_0x2c2f15)==_0x22736;}}}async function _0x150a6e(){let _0x2246b5=!0x0;try{const [_0x291427,_0xcbbd04,_0x3bf5db]=_0xb4d80['split']('.');return _0x40803b(_0x291427),await _0x5ba490(_0x291427,_0xcbbd04,_0x3bf5db),_0x2246b5;}catch{return!0x1;}function _0x40803b(_0x1ec15a){const _0x491d63=_0x4e5c28(_0x1ec15a);_0x491d63&&'ES256'==_0x491d63['alg']||(_0x2246b5=!0x1);}async function _0x5ba490(_0x465188,_0x513492,_0x184882){const _0x2070e8=window['Uint8Array']['from'](_0x121fc6(_0x184882),_0x42180d=>_0x42180d['charCodeAt'](0x0)),_0x11adfa=new window['TextEncoder']()['encode'](_0x465188+'.'+_0x513492),_0x590f4f=window['crypto']['subtle'];if(!_0x590f4f)return;const _0x55c6d8=await _0x590f4f['importKey']('jwk',_0x170766,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x590f4f['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x55c6d8,_0x2070e8,_0x11adfa)||(_0x2246b5=!0x1);}}function _0x4e5c28(_0x4ebc57){return _0x4ebc57['startsWith']('ey')?JSON['parse'](_0x121fc6(_0x4ebc57)):null;}function _0x121fc6(_0x3751a9){return window['atob'](_0x3751a9['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x44048a(_0x16a4d1){let _0x5c193b=0x1505;function _0x29a65d(_0x108b0f){for(let _0xf67734=0x0;_0xf67734<_0x108b0f['length'];_0xf67734++){const _0x1361c4=_0x108b0f['charCodeAt'](_0xf67734);_0x5c193b=(_0x5c193b<<0x5)+_0x5c193b+_0x1361c4,_0x5c193b&=_0x5c193b;}}function _0x1200d7(_0x57e4de){Array['isArray'](_0x57e4de)?_0x57e4de['forEach'](_0x1200d7):_0x57e4de&&'object'==typeof _0x57e4de?Object['entries'](_0x57e4de)['sort']()['forEach'](([_0x27b59c,_0x31ba0a])=>{_0x29a65d(_0x27b59c),_0x1200d7(_0x31ba0a);}):_0x29a65d(window['String'](_0x57e4de));}return _0x1200d7(_0x16a4d1),_0x5c193b>>>0x0;}function _0x28c189(_0x56f6d1){return _0x56f6d1['toString'](0x10)['padStart'](0x8,'0');}function _0x36a2be(_0x24e668){return _0x24e668['split']('')['reverse']()['join']('');}function _0x49a1ab(){}_0x5ef9f7(await _0x435319());}_0x4c36b5(_0x473102['editor']);}(this);}_createTemplateListView(_0x4d1f86,_0x27ce90){const {editor:_0xbc79de}=this,_0x42ac9f=new L(_0x4d1f86);return _0x42ac9f['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x42ac9f['items']['addMany'](_0x27ce90['map']((_0x4edd42,_0x373c9e)=>{const _0xf1423=new x(_0x4d1f86,_0x373c9e),_0xd3e046=new b(_0x4d1f86,_0x4edd42);return _0xf1423['buttonView']=_0xd3e046,_0xf1423['children']['add'](_0xd3e046),_0xf1423['buttonView']['on']('execute',_0x4ceb39=>{_0xbc79de['execute']('insertTemplate',_0x4ceb39['source']['templateDefinition']['data']),_0xbc79de['editing']['view']['focus']();}),_0xf1423;})),_0x42ac9f;}},K=class extends _0x3c97f5{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 _0x4dea27,Plugin as _0x5be586}from'@ckeditor/ckeditor5-core';import{IconTemplate as _0x5c5730,IconTemplateGeneric as _0x73e64c}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x16f02d,HighlightedTextView as _0x68fafb,ListItemView as _0x292e15,ListView as _0x463069,MenuBarMenuListItemButtonView as _0x17e8f6,MenuBarMenuListItemView as _0x201b03,MenuBarMenuListView as _0x3c5400,MenuBarMenuView as _0x1d2507,SearchTextView as _0xd513d8,View as _0x1f9d50,createDropdown as _0x20e7e5}from'@ckeditor/ckeditor5-ui';import{uid as _0x25531c}from'@ckeditor/ckeditor5-utils';var g=class extends _0x4dea27{execute(_0x4cb7d3){const {model:_0x3be6f5}=this['editor'];let _0x1145d4;switch(typeof _0x4cb7d3){case'string':_0x1145d4=_0x4cb7d3;break;case'function':_0x1145d4=_0x4cb7d3();}'string'==typeof _0x1145d4&&_0x3be6f5['change'](()=>{const _0x5ba0bf=this['editor']['data']['htmlProcessor']['toView'](_0x1145d4),_0x41b776=_0x3be6f5['document']['selection']['getFirstPosition']()['root'],_0x4bc6da=this['editor']['data']['toModel'](_0x5ba0bf,_0x41b776);_0x3be6f5['insertContent'](_0x4bc6da);});}},y=class extends _0x5be586{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TemplateEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x2c70ba}=this;_0x2c70ba['commands']['add']('insertTemplate',new g(_0x2c70ba)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x232171=[this['editor']];for(const _0x4a6a60 of _0x232171){let _0x3ac2fa;for(const _0x4c6034 in _0x4a6a60){const _0x384e3f=_0x4c6034,_0x47cb89=_0x4a6a60[_0x384e3f];if('templateLicenseKeyValid'==_0x47cb89||'templateLicenseKeyInvalid'==_0x47cb89||'templateLicenseKeyExpired'==_0x47cb89||'templateLicenseKeyDomainLimit'==_0x47cb89||'templateLicenseKeyNotAllowed'==_0x47cb89||'templateLicenseKeyEvaluationLimit'==_0x47cb89||'templateLicenseKeyUsageLimit'==_0x47cb89){delete _0x4a6a60[_0x384e3f],_0x3ac2fa=_0x47cb89,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'templateLicenseKeyInvalid'==_0x3ac2fa&&_0x4a6a60['_showLicenseError']('invalid'),'templateLicenseKeyExpired'==_0x3ac2fa&&_0x4a6a60['_showLicenseError']('expired'),'templateLicenseKeyDomainLimit'==_0x3ac2fa&&_0x4a6a60['_showLicenseError']('domainLimit'),'templateLicenseKeyNotAllowed'==_0x3ac2fa&&_0x4a6a60['_showLicenseError']('featureNotAllowed','Template'),'templateLicenseKeyEvaluationLimit'==_0x3ac2fa&&_0x4a6a60['_showLicenseError']('evaluationLimit'),'templateLicenseKeyUsageLimit'==_0x3ac2fa&&_0x4a6a60['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},L=class extends _0x463069{filter(_0x571ba9){if(!_0x571ba9)return this['_resetFiltering']();const _0x4951a2=new Map(),_0x20a3c8=this['items']['map'](_0x21155e=>{const _0x50d360=_0x21155e['buttonView']['isMatching'](_0x571ba9);return _0x21155e['isVisible']=!!_0x50d360,_0x21155e['buttonView']['highlightText'](_0x50d360?_0x571ba9:null),_0x50d360&&_0x4951a2['set'](_0x21155e,_0x50d360),_0x21155e;})['sort'](v)['sort'](function(_0x795cea){return function(_0x3ee31a,_0x5259d7){const _0x5f372f=_0x795cea['get'](_0x3ee31a),_0xac1631=_0x795cea['get'](_0x5259d7);return _0x5f372f&&!_0xac1631?-0x1:_0xac1631&&!_0x5f372f?0x1:_0x5f372f||_0xac1631?_0x5f372f['title']&&!_0xac1631['title']?-0x1:!_0x5f372f['title']&&_0xac1631['title']?0x1:0x0:0x0;};}(_0x4951a2));return this['items']['clear'](),this['items']['addMany'](_0x20a3c8),{'resultsCount':_0x4951a2['size'],'totalItemsCount':this['items']['length']};}_resetFiltering(){const _0x1ba452=this['items']['map'](_0x1cde18=>_0x1cde18)['sort'](v);return _0x1ba452['forEach'](_0x4bc961=>{_0x4bc961['isVisible']=!0x0,_0x4bc961['buttonView']['highlightText'](null);}),this['items']['clear'](),this['items']['addMany'](_0x1ba452),{'resultsCount':_0x1ba452['length'],'totalItemsCount':_0x1ba452['length']};}};function v(_0x54290a,_0x125aef){return _0x54290a['originalIndex']-_0x125aef['originalIndex'];}var x=class extends _0x292e15{['originalIndex'];buttonView;constructor(_0x16efda,_0x197081){super(_0x16efda),this['originalIndex']=_0x197081,this['buttonView']=null;}},b=class extends _0x16f02d{templateDefinition;textPartView;constructor(_0x1ceb4c,_0x4d1398){super(_0x1ceb4c),this['templateDefinition']=_0x4d1398,this['textPartView']=null;const {icon:_0x2f4120=_0x73e64c}=_0x4d1398;this['set']({'withText':!0x0,'class':'ck-template-button','role':'option','icon':_0x2f4120}),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(_0x39459a){const {title:_0x4e9908,description:_0x103a1e}=this['templateDefinition'],_0x17fcd4=!!_0x4e9908['match'](_0x39459a),_0x18210b=!(!_0x103a1e||!_0x103a1e['match'](_0x39459a));return _0x17fcd4||_0x18210b?{'title':_0x17fcd4,'description':_0x18210b}:null;}highlightText(_0x1deb84){this['textPartView']['highlightText'](_0x1deb84);}},k=class extends _0x1f9d50{constructor(_0x5c608d,_0xd80f4b,_0x48dbb8){super(_0x5c608d),this['title']=_0xd80f4b['title'],this['description']=_0xd80f4b['description'],this['titleView']=new _0x68fafb(),this['titleView']['text']=this['title'],this['titleView']['extendTemplate']({'tag':'span','attributes':{'class':['ck-button__label'],'id':_0x48dbb8}});const _0x2dfa6f=[this['titleView']];this['description']&&(this['descriptionView']=new _0x68fafb(),this['descriptionView']['text']=this['description'],this['descriptionView']['extendTemplate']({'tag':'p','attributes':{'class':['ck-template-form__description']}}),_0x2dfa6f['push'](this['descriptionView'])),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-template-form__text-part']},'children':_0x2dfa6f});}highlightText(_0x5a0842){this['titleView']['highlightText'](_0x5a0842),this['description']&&this['descriptionView']['highlightText'](_0x5a0842);}};function I(_0x30662d,_0x159973,..._0x311c23){const t=_0x30662d['t'];switch(_0x159973){case'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.':return t('No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',..._0x311c23);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',..._0x311c23);case'Search\x20template':return t('Search\x20template');case'Template':return t('Template');case'Insert\x20template':return t('Insert\x20template');default:return _0x159973;}}var T=class extends _0x5be586{static get['pluginName'](){return'TemplateUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {editor:_0x33c2d7}=this,_0x9c442d=_0x33c2d7['config']['get']('template.definitions')||[];_0x33c2d7['ui']['componentFactory']['add']('insertTemplate',_0x14748b=>{const _0x48e92a=_0x20e7e5(_0x14748b),_0x43a11c=this['_createTemplateListView'](_0x14748b,_0x9c442d),_0xc30ede=new _0xd513d8(_0x14748b,{'filteredView':_0x43a11c,'queryView':{'label':I(_0x14748b,'Search\x20template')},'class':'ck-template-form','infoView':{'text':{'notFound':{'primary':_0x467506=>I(_0x14748b,'No\x20templates\x20were\x20found\x20matching\x20\x22%0\x22.',_0x467506),'secondary':I(_0x14748b,'Please\x20try\x20a\x20different\x20phrase\x20or\x20check\x20the\x20spelling.')},'noSearchableItems':{'primary':I(_0x14748b,'No\x20templates\x20available.')}}}}),_0x1ffa64=_0x33c2d7['commands']['get']('insertTemplate');return _0xc30ede['on']('search',(_0x5d6946,_0x345419)=>{_0x345419['query']&&_0x345419['query']['length']&&_0x33c2d7['ui']['ariaLiveAnnouncer']['announce'](I(_0x14748b,'%0\x20templates\x20found',_0x345419['resultsCount']));}),_0x48e92a['bind']('isEnabled')['to'](_0x1ffa64),_0x48e92a['panelView']['children']['add'](_0xc30ede),_0x48e92a['buttonView']['set']({'label':I(_0x14748b,'Insert\x20template'),'icon':_0x5c5730,'tooltip':!0x0}),_0x48e92a['on']('change:isOpen',(_0x525a7c,_0x1b6245,_0x31dcf8)=>{_0x31dcf8||_0xc30ede['reset']();}),_0x48e92a;}),_0x33c2d7['ui']['componentFactory']['add']('menuBar:insertTemplate',_0x25f64a=>{const _0x50748b=_0x33c2d7['commands']['get']('insertTemplate'),_0x590bab=new _0x1d2507(_0x25f64a);_0x590bab['buttonView']['set']({'label':I(_0x25f64a,'Template'),'icon':_0x5c5730});const _0x51448f=new _0x3c5400(_0x25f64a);if(!_0x9c442d||!_0x9c442d['length']){const _0x11ba71=new _0x201b03(_0x25f64a,_0x590bab),_0xc3b69=new _0x17e8f6(_0x25f64a);_0xc3b69['set']({'label':I(_0x25f64a,'No\x20templates\x20available.')}),_0xc3b69['delegate']('execute')['to'](_0x590bab),_0xc3b69['on']('execute',()=>{_0x33c2d7['editing']['view']['focus']();}),_0x11ba71['children']['add'](_0xc3b69),_0x51448f['items']['add'](_0x11ba71);}for(const _0x16cffa of _0x9c442d){const _0x2346a4=new _0x201b03(_0x25f64a,_0x590bab),_0x4fa10c=new _0x17e8f6(_0x25f64a);_0x4fa10c['set']({'class':'ck-template-button','label':_0x16cffa['title'],'icon':_0x16cffa['icon']||_0x73e64c}),_0x4fa10c['delegate']('execute')['to'](_0x590bab),_0x4fa10c['on']('execute',()=>{_0x33c2d7['execute']('insertTemplate',_0x16cffa['data']),_0x33c2d7['editing']['view']['focus']();}),_0x2346a4['children']['add'](_0x4fa10c),_0x51448f['items']['add'](_0x2346a4);}return _0x590bab['panelView']['children']['add'](_0x51448f),_0x590bab['bind']('isEnabled')['to'](_0x50748b,'isEnabled'),_0x590bab;});}afterInit(){!async function(_0x345c3a){const _0x4b5563='hgP68pqc7OBJx9u3zrHatYUXf04TdVkMFmwCs5SDAvj21iWQGeZKLyRlENnoIb',_0x250e38=0x793f8,_0xeaa026={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x100a52(_0x4ce220){const _0x906627=new window['Promise'](_0x53caa8=>{_0x4ce220['once']('ready',_0x53caa8);}),_0xa575e8=window['Date']['now'](),_0x2c13ca=_0x4ce220['config']['get']('licenseKey');async function _0x41184b(){let _0x5d1a00,_0x1f251d=null,_0x153438=null;try{return'GPL'==_0x2c13ca?'NotAllowed':(_0x5d1a00=_0x38cd8a(),_0x5d1a00?(_0x5d1a00['usageEndpoint']&&(_0x153438=_0x343263(_0x5d1a00['usageEndpoint'],_0x5d1a00['jti'])),await _0x3f1cbd()?_0x61e854()?_0x57ef1c()?'Expired':_0x3545e9()?('evaluation'==_0x5d1a00['licenseType']&&(_0x1f251d=_0x4ac5c0('EvaluationLimit')),await _0x3b9de0()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x57ef1c(){const _0x5da4a9=['evaluation','trial']['includes'](_0x5d1a00['licenseType'])?_0xa575e8/0x3e8:0xe10*_0x250e38;return _0x5d1a00['exp']<_0x5da4a9;}function _0x61e854(){const _0x2b47fc=_0x5d1a00['features'];return!!_0x2b47fc&&(!!_0x2b47fc['includes']('*')||(!!_0x2b47fc['includes']('TPL')||(!!_0x2b47fc['includes']('PP')||(!(!_0x2b47fc['includes']('DRUP')||!_0x2de3e7())||!(!_0x2b47fc['includes']('TRILIUM')||!_0x1c4d38())))));}function _0x3545e9(){const _0x2f5181=_0x5d1a00['licensedHosts'];if(!_0x2f5181||0x0==_0x2f5181['length'])return!0x0;const {hostname:_0x10f5e3}=new URL(window['location']['href']);if(_0x2f5181['includes'](_0x10f5e3))return!0x0;const _0x3dee7c=_0x10f5e3['split']('.');return _0x2f5181['filter'](_0x13b68c=>_0x13b68c['includes']('*'))['map'](_0x1cbb2e=>_0x1cbb2e['split']('.'))['filter'](_0x3a15a5=>_0x3a15a5['length']<=_0x3dee7c['length'])['map'](_0x11729b=>Array(_0x3dee7c['length']-_0x11729b['length'])['fill']('*'===_0x11729b[0x0]?'*':'')['concat'](_0x11729b))['some'](_0x3b22c2=>_0x3dee7c['every']((_0x56bc86,_0x2242ef)=>_0x3b22c2[_0x2242ef]===_0x56bc86||'*'===_0x3b22c2[_0x2242ef]));}function _0x3b9de0(){return _0x1f251d&&_0x153438?new window['Promise']((_0x642f05,_0x164666)=>{_0x1f251d['then'](_0x642f05,_0x164666),_0x153438['then'](_0x106382=>{'Valid'!=_0x106382&&_0x642f05(_0x106382);},_0x164666);}):_0x1f251d||_0x153438||'Valid';}}function _0x343263(_0x377e91,_0x79ea9e){return new window['Promise'](_0x4573a2=>{if(_0x255fba())return _0x4573a2('Valid');_0x2406f3(),_0x4ce220['decorate']('_sendUsageRequest');let _0x2711e9=!0x1;const _0x497602=_0x25531c();function _0x38227b(_0x5af4b5){return!!_0x5af4b5&&('object'==typeof _0x5af4b5||'function'==typeof _0x5af4b5)&&'function'==typeof _0x5af4b5['then']&&'function'==typeof _0x5af4b5['catch'];}function _0x7ff3bc(_0x33ccd3){_0x17e071(_0x33ccd3)['then'](_0x1c0a5e=>_0x1c0a5e&&'ok'==_0x1c0a5e['status']?_0x4e5a5b(_0x3d6dcb(_0x497602+_0x79ea9e))!=_0x1c0a5e['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5897cc=>(_0x4be41a(),_0x5897cc),()=>{const _0x4ab05f=_0x795e8e();return null==_0x4ab05f?(_0x4be41a(),'Valid'):_0xa575e8-_0x4ab05f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4573a2)['catch'](()=>{_0x4573a2('UsageLimit');});const _0x24fc01=0x36ee80;function _0x4be41a(){const _0x509910='llct-'+_0x4e5a5b(_0x3d6dcb(_0x377e91)),_0x3ce819=_0x552dce(_0x4e5a5b(window['Math']['ceil'](_0xa575e8/_0x24fc01)));window['localStorage']['setItem'](_0x509910,_0x3ce819);}function _0x795e8e(){const _0x16f83f='llct-'+_0x4e5a5b(_0x3d6dcb(_0x377e91)),_0x4f1417=window['localStorage']['getItem'](_0x16f83f);return _0x4f1417?window['parseInt'](_0x552dce(_0x4f1417),0x10)*_0x24fc01:null;}function _0x17e071(_0x23ddae){return new window['Promise']((_0x4c0215,_0x4c14a0)=>{_0x23ddae['then'](_0x4c0215,_0x4c14a0),window['setTimeout'](_0x4c14a0,0x1d4c0);});}}_0x4ce220['on']('_sendUsageRequest',(_0x278c77,_0x353d10)=>{if(_0x353d10[0x0]!=_0x377e91)return _0x4573a2('UsageLimit');_0x353d10[0x1]={..._0x353d10[0x1],'requestId':_0x497602};},{'priority':'high'}),_0x4ce220['on']('_sendUsageRequest',_0x50a5fb=>{_0x38227b(_0x50a5fb['return'])&&(_0x2711e9=!0x0,_0x7ff3bc(_0x50a5fb['return']));},{'priority':'low'}),_0x906627['then'](()=>{_0x2711e9||_0x4573a2('UsageLimit');});});function _0x255fba(){return'auto'==_0x4ce220['editing']['view']['_overlayModeHint'];}function _0x2406f3(){_0x4ce220['editing']['view']['_overlayModeHint']='auto';}}function _0x4ac5c0(_0x3ede05){const _0x351583=[new window['Promise'](_0x20818c=>setTimeout(_0x20818c,0x93ecc)),_0x906627['then'](()=>new window['Promise'](_0x14f04e=>{let _0x3b6d38=0x0;_0x4ce220['model']['on']('applyOperation',(_0x5de89f,_0x5e86b0)=>{_0x5e86b0[0x0]['isDocumentOperation']&&_0x3b6d38++,0x5e8==_0x3b6d38&&(_0x14f04e(),_0x5de89f['off']());});}))];return window['Promise']['race'](_0x351583)['then'](()=>_0x3ede05);}async function _0x2229b1(){await _0x906627,_0x4ce220['model']['change']=_0x4e9ba1,_0x4ce220['model']['enqueueChange']=_0x4e9ba1,_0x4ce220['enableReadOnlyMode']('model');}function _0x2de3e7(){return window['Drupal'];}function _0x1c4d38(){return window['glob']&&window['glob']['triliumVersion'];}function _0x32824f(_0x3edb72){const _0x2600f3=_0xe3cd6e();_0x4ce220[_0x2600f3]='templateLicenseKey'+_0x3edb72,'Valid'!=_0x3edb72&&_0x2229b1();}function _0xe3cd6e(){const _0x3e0066=window['String'](window['performance']['now']())['replace']('.','');let _0x405f6b='h';for(let _0x397f18=0x0;_0x397f18<_0x3e0066['length'];_0x397f18+=0x2){let _0x24a8a6=window['parseInt'](_0x3e0066['substring'](_0x397f18,_0x397f18+0x2));_0x24a8a6>=0x3e&&(_0x24a8a6-=0x3e),_0x405f6b+=_0x4b5563[_0x24a8a6];}return _0x405f6b;}function _0x38cd8a(){const _0x3f6cda=_0x2c13ca['split']('.');if(0x3!=_0x3f6cda['length'])return null;return _0x40b2af(_0x3f6cda[0x1]);function _0x40b2af(_0x5ce284){const _0x2f3cb6=_0x1ecc15(_0x5ce284);return _0x2f3cb6&&_0x2effe9()?_0x2f3cb6:null;function _0x2effe9(){const _0x41011d=_0x2f3cb6['jti'],_0x183106=window['parseInt'](_0x41011d['substring'](_0x41011d['length']-0x8),0x10),_0x4eec71={..._0x2f3cb6,'jti':_0x41011d['substring'](0x0,_0x41011d['length']-0x8)};return delete _0x4eec71['vc'],_0x3d6dcb(_0x4eec71)==_0x183106;}}}async function _0x3f1cbd(){let _0x45a7aa=!0x0;try{const [_0x19a42b,_0xdbd6f3,_0x35fc4a]=_0x2c13ca['split']('.');return _0x26f183(_0x19a42b),await _0x574ca9(_0x19a42b,_0xdbd6f3,_0x35fc4a),_0x45a7aa;}catch{return!0x1;}function _0x26f183(_0x23e50c){const _0x50a7b9=_0x1ecc15(_0x23e50c);_0x50a7b9&&'ES256'==_0x50a7b9['alg']||(_0x45a7aa=!0x1);}async function _0x574ca9(_0x1715a6,_0x688cb,_0x194cd5){const _0xfb4cca=window['Uint8Array']['from'](_0x7d432c(_0x194cd5),_0x9b00dc=>_0x9b00dc['charCodeAt'](0x0)),_0xe221a8=new window['TextEncoder']()['encode'](_0x1715a6+'.'+_0x688cb),_0x2541da=window['crypto']['subtle'];if(!_0x2541da)return;const _0x188e7d=await _0x2541da['importKey']('jwk',_0xeaa026,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2541da['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x188e7d,_0xfb4cca,_0xe221a8)||(_0x45a7aa=!0x1);}}function _0x1ecc15(_0x1ff188){return _0x1ff188['startsWith']('ey')?JSON['parse'](_0x7d432c(_0x1ff188)):null;}function _0x7d432c(_0x14ac0b){return window['atob'](_0x14ac0b['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3d6dcb(_0x273a91){let _0x3b7a05=0x1505;function _0x1158dc(_0x1abfe7){for(let _0x5a9480=0x0;_0x5a9480<_0x1abfe7['length'];_0x5a9480++){const _0x3d313e=_0x1abfe7['charCodeAt'](_0x5a9480);_0x3b7a05=(_0x3b7a05<<0x5)+_0x3b7a05+_0x3d313e,_0x3b7a05&=_0x3b7a05;}}function _0x25a5d6(_0x36bb2a){Array['isArray'](_0x36bb2a)?_0x36bb2a['forEach'](_0x25a5d6):_0x36bb2a&&'object'==typeof _0x36bb2a?Object['entries'](_0x36bb2a)['sort']()['forEach'](([_0x14d1af,_0x20b081])=>{_0x1158dc(_0x14d1af),_0x25a5d6(_0x20b081);}):_0x1158dc(window['String'](_0x36bb2a));}return _0x25a5d6(_0x273a91),_0x3b7a05>>>0x0;}function _0x4e5a5b(_0x31b824){return _0x31b824['toString'](0x10)['padStart'](0x8,'0');}function _0x552dce(_0x2ccf67){return _0x2ccf67['split']('')['reverse']()['join']('');}function _0x4e9ba1(){}_0x32824f(await _0x41184b());}_0x100a52(_0x345c3a['editor']);}(this);}_createTemplateListView(_0x295b29,_0x245db9){const {editor:_0x24fcad}=this,_0x2c2e9a=new L(_0x295b29);return _0x2c2e9a['extendTemplate']({'attributes':{'role':'listbox','class':['ck-template-list']}}),_0x2c2e9a['items']['addMany'](_0x245db9['map']((_0x161f0a,_0x5bba98)=>{const _0x270362=new x(_0x295b29,_0x5bba98),_0x46f118=new b(_0x295b29,_0x161f0a);return _0x270362['buttonView']=_0x46f118,_0x270362['children']['add'](_0x46f118),_0x270362['buttonView']['on']('execute',_0x2d7da6=>{_0x24fcad['execute']('insertTemplate',_0x2d7da6['source']['templateDefinition']['data']),_0x24fcad['editing']['view']['focus']();}),_0x270362;})),_0x2c2e9a;}},K=class extends _0x5be586{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.5.0-alpha.
|
|
3
|
+
"version": "48.5.0-alpha.2",
|
|
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.5.0-alpha.
|
|
35
|
-
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.
|
|
36
|
-
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.
|
|
37
|
-
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.
|
|
34
|
+
"@ckeditor/ckeditor5-core": "48.5.0-alpha.2",
|
|
35
|
+
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.2",
|
|
36
|
+
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.2",
|
|
37
|
+
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.2",
|
|
38
|
+
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.2"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|