@ckeditor/ckeditor5-line-height 48.5.0-alpha.2 → 48.5.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 +7 -7
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1b2de8,Plugin as _0x44ed52}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x561132,Collection as _0x1a01d9,first as _0x4ba204,uid as _0x469505}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x47f5b3,isPercentageStyleValue as _0x20f581}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x3c4dc1,MenuBarMenuListItemView as _0x3100d6,MenuBarMenuListView as _0x152ff1,MenuBarMenuView as _0x29da89,UIModel as _0x1759ba,addListToDropdown as _0x3ed2ed,createDropdown as _0x2f7737}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x2d6370}from'@ckeditor/ckeditor5-icons';var p=class extends _0x1b2de8{['refresh'](){const _0x4500c9=this['editor']['model']['document'],_0x5cca14=_0x4ba204(_0x4500c9['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x5cca14)&&this['_canHaveLineHeight'](_0x5cca14),this['value']=this['isEnabled']&&_0x5cca14['getAttribute']('lineHeight');}execute(_0x488c1c={}){const _0xf95827=this['editor']['model'],_0x5618b4=_0xf95827['document']['selection'],_0x2f9a7c=_0x488c1c['value'];_0xf95827['change'](_0x258a53=>{const _0x3c4cfd=Array['from'](_0x5618b4['getSelectedBlocks']())['filter'](_0x4b9482=>this['_canHaveLineHeight'](_0x4b9482));for(const _0x396e5a of _0x3c4cfd)_0x2f9a7c?_0x258a53['setAttribute']('lineHeight',_0x2f9a7c,_0x396e5a):_0x258a53['removeAttribute']('lineHeight',_0x396e5a);});}_canHaveLineHeight(_0x4e3a4f){return this['editor']['model']['schema']['checkAttribute'](_0x4e3a4f,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x37389b){return'string'==typeof _0x37389b&&'default'===_0x37389b['toLowerCase']();}function L(_0x7332cf){return _0x7332cf['options']['map'](_0x43e940=>{return H(_0x43e940)?{'title':String(_0x7332cf['defaultValue']),'model':'default'}:('number'==typeof _0x43e940&&(_0x43e940=String(_0x43e940)),'string'!=typeof _0x43e940?_0x43e940:parseFloat(_0x43e940)?{'title':_0x43e940,'model':_0x43e940,'view':{'name':'span','styles':{'line-height':_0x43e940}}}:'string'==typeof(_0x315d8a=_0x43e940)?y[_0x315d8a]:y[_0x315d8a['model']]);var _0x315d8a;})['filter'](_0x592016=>void 0x0!==_0x592016);}var v=class extends _0x44ed52{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x2c0fb2,conversion:_0x504c46}=this['editor'];_0x2c0fb2['has']('ListEditing')&&_0x2c0fb2['has']('TodoListEditing')&&(_0x2c0fb2['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x3bfb8d,_0x271346,_0x3ab87b,_0x5e0056,_0x36aa2c){'todo'==_0x36aa2c['getAttribute']('listType')&&_0x271346&&(_0x3bfb8d['addClass']('ck-list-marker-line-height',_0x3ab87b),_0x3bfb8d['setStyle']('--ck-content-list-marker-line-height',_0x271346,_0x3ab87b));}}),_0x504c46['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x504c46['for']('upcast')['add'](_0xfabd75=>{_0xfabd75['on']('element:li',function(_0x2f2f66){const _0x4368a3=new _0x47f5b3(_0x2f2f66);return(_0x5df3e8,_0x1305bc,_0x449415)=>{const _0x30d6dc=_0x4368a3['match'](_0x1305bc['viewItem']);if(!_0x30d6dc)return;const _0x13c20f=_0x30d6dc['match'];_0x13c20f['name']=!0x1,_0x449415['consumable']['consume'](_0x1305bc['viewItem'],_0x13c20f);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x44ed52{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e58d9){super(_0x4e58d9),_0x4e58d9['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x41ef48=this['editor'];this['_validateConfig'](),_0x41ef48['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x41ef48['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x41ef48['commands']['add']('lineHeight',new p(_0x41ef48)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x1b6d51){const _0x34d51c='cvqCYM8ia9TDP6n5dmrzbJtlj03FwLxIpEWSUG7ARu21KfQoXNyg4ZBeOhskHV',_0x25d916=0x793f8,_0x2c0043={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x4966fd(_0x2fc23e){const _0x2b312e=new window['Promise'](_0x5e40ff=>{_0x2fc23e['once']('ready',_0x5e40ff);}),_0x5413a8=window['Date']['now'](),_0x47b58b=_0x2fc23e['config']['get']('licenseKey');async function _0x30d5b9(){let _0x4c9d1b,_0x36f9eb=null,_0x2a622e=null;try{return'GPL'==_0x47b58b?'NotAllowed':(_0x4c9d1b=_0x4450e9(),_0x4c9d1b?(_0x4c9d1b['usageEndpoint']&&(_0x2a622e=_0x3f5321(_0x4c9d1b['usageEndpoint'],_0x4c9d1b['jti'])),await _0x339399()?_0x4d75ab()?_0xa6af89()?'Expired':_0xa26906()?('evaluation'==_0x4c9d1b['licenseType']&&(_0x36f9eb=_0x532dfd('EvaluationLimit')),await _0x2390a7()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xa6af89(){const _0x3a5481=['evaluation','trial']['includes'](_0x4c9d1b['licenseType'])?_0x5413a8/0x3e8:0xe10*_0x25d916;return _0x4c9d1b['exp']<_0x3a5481;}function _0x4d75ab(){const _0x56aec3=_0x4c9d1b['features'];return!!_0x56aec3&&(!!_0x56aec3['includes']('*')||!!_0x56aec3['includes']('LH'));}function _0xa26906(){const _0x4f1ece=_0x4c9d1b['licensedHosts'];if(!_0x4f1ece||0x0==_0x4f1ece['length'])return!0x0;const {hostname:_0x2929da}=new URL(window['location']['href']);if(_0x4f1ece['includes'](_0x2929da))return!0x0;const _0xeaba80=_0x2929da['split']('.');return _0x4f1ece['filter'](_0x4a93af=>_0x4a93af['includes']('*'))['map'](_0x4d9893=>_0x4d9893['split']('.'))['filter'](_0x37f04c=>_0x37f04c['length']<=_0xeaba80['length'])['map'](_0x67acb3=>Array(_0xeaba80['length']-_0x67acb3['length'])['fill']('*'===_0x67acb3[0x0]?'*':'')['concat'](_0x67acb3))['some'](_0x38f554=>_0xeaba80['every']((_0x1d3a31,_0x52eba6)=>_0x38f554[_0x52eba6]===_0x1d3a31||'*'===_0x38f554[_0x52eba6]));}function _0x2390a7(){return _0x36f9eb&&_0x2a622e?new window['Promise']((_0x28a331,_0x53c7f8)=>{_0x36f9eb['then'](_0x28a331,_0x53c7f8),_0x2a622e['then'](_0x342357=>{'Valid'!=_0x342357&&_0x28a331(_0x342357);},_0x53c7f8);}):_0x36f9eb||_0x2a622e||'Valid';}}function _0x3f5321(_0x41f2e8,_0xfe0984){return new window['Promise'](_0x3644c0=>{if(_0xcee93d())return _0x3644c0('Valid');_0x19d29a(),_0x2fc23e['decorate']('_sendUsageRequest');let _0x1f7f5e=!0x1;const _0x10936a=_0x469505();function _0x458429(_0x4059bb){return!!_0x4059bb&&('object'==typeof _0x4059bb||'function'==typeof _0x4059bb)&&'function'==typeof _0x4059bb['then']&&'function'==typeof _0x4059bb['catch'];}function _0x2de620(_0x56ae6d){_0x2fb889(_0x56ae6d)['then'](_0xee2fe7=>_0xee2fe7&&'ok'==_0xee2fe7['status']?_0x5e98aa(_0x109a08(_0x10936a+_0xfe0984))!=_0xee2fe7['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x27c9c6=>(_0xce9700(),_0x27c9c6),()=>{const _0x1bcd32=_0x5bcf5f();return null==_0x1bcd32?(_0xce9700(),'Valid'):_0x5413a8-_0x1bcd32>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3644c0)['catch'](()=>{_0x3644c0('UsageLimit');});const _0x5d5aa8=0x36ee80;function _0xce9700(){const _0x414e89='llct-'+_0x5e98aa(_0x109a08(_0x41f2e8)),_0x31ffcb=_0x3c99eb(_0x5e98aa(window['Math']['ceil'](_0x5413a8/_0x5d5aa8)));window['localStorage']['setItem'](_0x414e89,_0x31ffcb);}function _0x5bcf5f(){const _0x16fe43='llct-'+_0x5e98aa(_0x109a08(_0x41f2e8)),_0x4d9ebb=window['localStorage']['getItem'](_0x16fe43);return _0x4d9ebb?window['parseInt'](_0x3c99eb(_0x4d9ebb),0x10)*_0x5d5aa8:null;}function _0x2fb889(_0x1c8b87){return new window['Promise']((_0x3f322e,_0x1977d4)=>{_0x1c8b87['then'](_0x3f322e,_0x1977d4),window['setTimeout'](_0x1977d4,0x1d4c0);});}}_0x2fc23e['on']('_sendUsageRequest',(_0x5d80f3,_0x198402)=>{if(_0x198402[0x0]!=_0x41f2e8)return _0x3644c0('UsageLimit');_0x198402[0x1]={..._0x198402[0x1],'requestId':_0x10936a};},{'priority':'high'}),_0x2fc23e['on']('_sendUsageRequest',_0x41d5a8=>{_0x458429(_0x41d5a8['return'])&&(_0x1f7f5e=!0x0,_0x2de620(_0x41d5a8['return']));},{'priority':'low'}),_0x2b312e['then'](()=>{_0x1f7f5e||_0x3644c0('UsageLimit');});});function _0xcee93d(){return'auto'==_0x2fc23e['editing']['view']['_overlayModeHint'];}function _0x19d29a(){_0x2fc23e['editing']['view']['_overlayModeHint']='auto';}}function _0x532dfd(_0x17f7d7){const _0x128829=[new window['Promise'](_0x4957c6=>setTimeout(_0x4957c6,0x93ecc)),_0x2b312e['then'](()=>new window['Promise'](_0x818fa1=>{let _0x54990f=0x0;_0x2fc23e['model']['on']('applyOperation',(_0x4b4c0b,_0x3c5818)=>{_0x3c5818[0x0]['isDocumentOperation']&&_0x54990f++,0x5e8==_0x54990f&&(_0x818fa1(),_0x4b4c0b['off']());});}))];return window['Promise']['race'](_0x128829)['then'](()=>_0x17f7d7);}async function _0x295f80(){await _0x2b312e,_0x2fc23e['model']['change']=_0x288f08,_0x2fc23e['model']['enqueueChange']=_0x288f08,_0x2fc23e['enableReadOnlyMode']('model');}function _0x133cb3(_0x11f019){const _0x1d3cdd=_0x1006f2();_0x2fc23e[_0x1d3cdd]='lineHeightLicenseKey'+_0x11f019,'Valid'!=_0x11f019&&_0x295f80();}function _0x1006f2(){const _0x4212d9=window['String'](window['performance']['now']())['replace']('.','');let _0x40e420='c';for(let _0x4f1739=0x0;_0x4f1739<_0x4212d9['length'];_0x4f1739+=0x2){let _0x4ea317=window['parseInt'](_0x4212d9['substring'](_0x4f1739,_0x4f1739+0x2));_0x4ea317>=0x3e&&(_0x4ea317-=0x3e),_0x40e420+=_0x34d51c[_0x4ea317];}return _0x40e420;}function _0x4450e9(){const _0x3c1937=_0x47b58b['split']('.');if(0x3!=_0x3c1937['length'])return null;return _0x18f688(_0x3c1937[0x1]);function _0x18f688(_0x126285){const _0x27ac64=_0x17c0b1(_0x126285);return _0x27ac64&&_0x1985fe()?_0x27ac64:null;function _0x1985fe(){const _0x1040bf=_0x27ac64['jti'],_0x39b299=window['parseInt'](_0x1040bf['substring'](_0x1040bf['length']-0x8),0x10),_0x167723={..._0x27ac64,'jti':_0x1040bf['substring'](0x0,_0x1040bf['length']-0x8)};return delete _0x167723['vc'],_0x109a08(_0x167723)==_0x39b299;}}}async function _0x339399(){let _0x279659=!0x0;try{const [_0x578c54,_0x1eea69,_0x2e3bc7]=_0x47b58b['split']('.');return _0x2f734f(_0x578c54),await _0x10847b(_0x578c54,_0x1eea69,_0x2e3bc7),_0x279659;}catch{return!0x1;}function _0x2f734f(_0x1b9cef){const _0x16ab5a=_0x17c0b1(_0x1b9cef);_0x16ab5a&&'ES256'==_0x16ab5a['alg']||(_0x279659=!0x1);}async function _0x10847b(_0x4afbd4,_0x4817b4,_0x5a3272){const _0x138651=window['Uint8Array']['from'](_0x258b67(_0x5a3272),_0x18b836=>_0x18b836['charCodeAt'](0x0)),_0x22f1af=new window['TextEncoder']()['encode'](_0x4afbd4+'.'+_0x4817b4),_0x8e663c=window['crypto']['subtle'];if(!_0x8e663c)return;const _0x2a288c=await _0x8e663c['importKey']('jwk',_0x2c0043,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x8e663c['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2a288c,_0x138651,_0x22f1af)||(_0x279659=!0x1);}}function _0x17c0b1(_0x12f295){return _0x12f295['startsWith']('ey')?JSON['parse'](_0x258b67(_0x12f295)):null;}function _0x258b67(_0x1ed82d){return window['atob'](_0x1ed82d['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x109a08(_0x54126c){let _0xf4123d=0x1505;function _0x19d006(_0x95313f){for(let _0x2018b6=0x0;_0x2018b6<_0x95313f['length'];_0x2018b6++){const _0x577b15=_0x95313f['charCodeAt'](_0x2018b6);_0xf4123d=(_0xf4123d<<0x5)+_0xf4123d+_0x577b15,_0xf4123d&=_0xf4123d;}}function _0x10a206(_0x4a02dc){Array['isArray'](_0x4a02dc)?_0x4a02dc['forEach'](_0x10a206):_0x4a02dc&&'object'==typeof _0x4a02dc?Object['entries'](_0x4a02dc)['sort']()['forEach'](([_0x220e33,_0x243668])=>{_0x19d006(_0x220e33),_0x10a206(_0x243668);}):_0x19d006(window['String'](_0x4a02dc));}return _0x10a206(_0x54126c),_0xf4123d>>>0x0;}function _0x5e98aa(_0x40f666){return _0x40f666['toString'](0x10)['padStart'](0x8,'0');}function _0x3c99eb(_0x1ec0da){return _0x1ec0da['split']('')['reverse']()['join']('');}function _0x288f08(){}_0x133cb3(await _0x30d5b9());}_0x4966fd(_0x1b6d51['editor']);}(this);}_validateConfig(){const _0x2d55d5=this['editor'];if(!_0x2d55d5['config']['get']('lineHeight.supportAllValues'))return;const _0x53c279=_0x2d55d5['config']['get']('lineHeight.options')['filter'](_0x250037=>'string'==typeof _0x250037&&(!H(_0x250037)&&isNaN(Number(_0x250037))));if(_0x53c279['length'])throw new _0x561132('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x53c279});}_prepareAnyValueConverters(){const _0x10d269=this['editor'],_0x45b40f=this['editor']['config']['get']('lineHeight.defaultValue');_0x10d269['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x46bcfe=>String(_0x46bcfe)===String(_0x45b40f)?null:{'key':'style','value':{'line-height':_0x46bcfe}}}),_0x10d269['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x514bc5=>{let _0x4b28bd=_0x514bc5['getStyle']('line-height');return _0x20f581(_0x4b28bd)&&(_0x4b28bd=String(Number(_0x4b28bd['slice'](0x0,-0x1))/0x64)),String(_0x4b28bd)===String(_0x45b40f)?null:_0x4b28bd;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0x5dcefe=this['editor'],_0x1b7895=this['editor']['config']['get']('lineHeight.defaultValue'),_0xa03c33=function(_0x552b97,_0x45335b){const _0x2eb179={'model':{'key':_0x552b97,'values':[]},'view':{}};for(const _0x5b830a of _0x45335b)'class'===_0x5b830a['view']?.['key']?(_0x2eb179['model']['values']['push'](_0x5b830a['model']),_0x2eb179['view'][_0x5b830a['model']]={'key':'class','value':_0x5b830a['view']['value']}):(_0x2eb179['model']['values']['push'](_0x5b830a['model']),_0x2eb179['view'][_0x5b830a['model']]={'key':'style','value':'line-height:'+_0x5b830a['model']+';'});return _0x2eb179;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x4a5f3a=>_0x4a5f3a['model']));_0x5dcefe['conversion']['attributeToAttribute'](_0xa03c33),_0x5dcefe['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x1b4efa=>{let _0x4dbc4c=_0x1b4efa['getStyle']('line-height');return _0x20f581(_0x4dbc4c)&&(_0x4dbc4c=String(Number(_0x4dbc4c['slice'](0x0,-0x1))/0x64)),_0x4dbc4c===String(_0x1b7895)?null:_0xa03c33['model']['values']['includes'](_0x4dbc4c)?_0x4dbc4c:null;}}});}},k=class extends _0x44ed52{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x427442={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x427442),this['_registerMenuBarComponent'](_0x427442),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1efd25=[this['editor']];for(const _0x4b5cc7 of _0x1efd25){let _0x5d1a03;for(const _0x300793 in _0x4b5cc7){const _0x223c93=_0x300793,_0x3cc51c=_0x4b5cc7[_0x223c93];if('lineHeightLicenseKeyValid'==_0x3cc51c||'lineHeightLicenseKeyInvalid'==_0x3cc51c||'lineHeightLicenseKeyExpired'==_0x3cc51c||'lineHeightLicenseKeyDomainLimit'==_0x3cc51c||'lineHeightLicenseKeyNotAllowed'==_0x3cc51c||'lineHeightLicenseKeyEvaluationLimit'==_0x3cc51c||'lineHeightLicenseKeyUsageLimit'==_0x3cc51c){delete _0x4b5cc7[_0x223c93],_0x5d1a03=_0x3cc51c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x5d1a03&&_0x4b5cc7['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x52609b=this['editor'],t=_0x52609b['t'],_0x5f0dc6=_0x52609b['config']['get']('lineHeight'),_0xa037b7={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x5f0dc6)['map'](_0x17cc91=>{const _0x294f89=_0xa037b7[_0x17cc91['title']];return _0x294f89&&_0x294f89!=_0x17cc91['title']&&(_0x17cc91=Object['assign']({},_0x17cc91,{'title':_0x294f89})),_0x17cc91;});}_prepareListOptions(){const _0x2d0c37=this['editor']['commands']['get']('lineHeight'),_0x3779cc=this['editor']['config']['get']('lineHeight.defaultValue'),_0x42143e=this['_getLocalizedLineHeightOptions'](),_0x379154=new _0x1a01d9(),_0x1ccfbb=_0x53523b=>'default'===_0x53523b||String(_0x3779cc)===_0x53523b;for(const _0x58ee47 of _0x42143e){const _0x2bc776={'type':'button','model':new _0x1759ba({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x58ee47['title'],'withText':!0x0})};_0x1ccfbb(_0x58ee47['model'])?(_0x2bc776['model']['bind']('isOn')['to'](_0x2d0c37,'value',_0x2354b8=>!_0x2354b8),_0x2bc776['model']['commandParam']=void 0x0):(_0x2bc776['model']['bind']('isOn')['to'](_0x2d0c37,'value',_0x2d69e1=>_0x2d69e1===_0x58ee47['model']),_0x2bc776['model']['commandParam']=_0x58ee47['model']),_0x379154['add'](_0x2bc776);}if(this['_shouldRenderCustomValueOption']()){const _0x3a4e80=this['_getCustomValueOptionDefinition'](_0x42143e);_0x379154['add'](_0x3a4e80);}return _0x379154;}_getCustomValueOptionDefinition(_0x3841ba){const _0x195c30=this['editor'],t=_0x195c30['t'],_0x2358fb=_0x195c30['commands']['get']('lineHeight'),_0x4c8355=_0x3841ba['map'](_0x58b7b7=>_0x58b7b7['model']),_0x164af4={'type':'button','model':new _0x1759ba({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x164af4['model']['bind']('commandParam')['to'](_0x2358fb,'value'),_0x164af4['model']['bind']('isOn')['to'](_0x2358fb,'value',_0x54a8ad=>!!_0x54a8ad&&!_0x4c8355['includes'](String(_0x54a8ad))),_0x164af4['model']['bind']('label')['to'](_0x2358fb,'value',_0x17e0f4=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x17e0f4))),_0x164af4;}_registerToolbarComponent({accessibleLabel:_0x5a7ff6,options:_0x4459ee}){const _0x2eeef6=this['editor'],_0x3f4db3=_0x2eeef6['commands']['get']('lineHeight');_0x2eeef6['ui']['componentFactory']['add']('lineHeight',_0x3c6851=>{const _0x457990=_0x2f7737(_0x3c6851);return _0x3ed2ed(_0x457990,_0x4459ee,{'role':'menu','ariaLabel':_0x5a7ff6}),_0x457990['buttonView']['set']({'label':_0x5a7ff6,'tooltip':!0x0,'icon':_0x2d6370}),_0x457990['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x457990['bind']('isEnabled')['to'](_0x3f4db3),this['listenTo'](_0x457990,'execute',_0x5b617f=>{_0x2eeef6['execute'](_0x5b617f['source']['commandName'],{'value':_0x5b617f['source']['commandParam']}),_0x2eeef6['editing']['view']['focus']();}),_0x457990['once']('change:isOpen',()=>{const _0x40e11a=_0x457990['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x457990,_0x4459ee,_0x40e11a);}),_0x457990;});}_registerMenuBarComponent({accessibleLabel:_0x3f6ee4,options:_0x35140e}){const _0x2f96f5=this['editor'],_0x391110=_0x2f96f5['commands']['get']('lineHeight');_0x2f96f5['ui']['componentFactory']['add']('menuBar:lineHeight',_0x2e6192=>{const _0x1fdee8=new _0x29da89(_0x2e6192);_0x1fdee8['buttonView']['set']({'label':_0x3f6ee4,'icon':_0x2d6370}),_0x1fdee8['bind']('isEnabled')['to'](_0x391110);const _0x4c99d5=new _0x152ff1(_0x2e6192);for(const _0x332aa3 of _0x35140e){const _0x359925=new _0x3100d6(_0x2e6192,_0x1fdee8),_0x389ae9=new _0x3c4dc1(_0x2e6192);_0x389ae9['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x389ae9['bind'](...Object['keys'](_0x332aa3['model']))['to'](_0x332aa3['model']),_0x389ae9['delegate']('execute')['to'](_0x1fdee8),_0x389ae9['on']('execute',()=>{_0x2f96f5['execute'](_0x332aa3['model']['commandName'],{'value':_0x332aa3['model']['commandParam']}),_0x2f96f5['editing']['view']['focus']();}),_0x359925['children']['add'](_0x389ae9),_0x4c99d5['items']['add'](_0x359925);}return _0x1fdee8['panelView']['children']['add'](_0x4c99d5),this['_attachCustomOptionVisibilityHandler'](_0x1fdee8,_0x35140e,_0x4c99d5),_0x1fdee8;});}_attachCustomOptionVisibilityHandler(_0x4c7999,_0x401593,_0x41cc72){if(!this['_shouldRenderCustomValueOption']())return;const _0x32f608=()=>{if(!_0x4c7999['isOpen'])return;_0x41cc72['items']['last']['isVisible']=Boolean(_0x401593['last']['model']['isOn']);};_0x32f608(),_0x4c7999['on']('change:isOpen',()=>{_0x32f608();});}},_=class extends _0x44ed52{static get requires(){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
23
+ import{Command as _0x570afd,Plugin as _0x278965}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3b6cb4,Collection as _0x1e4ea1,first as _0x29c89e,uid as _0x2974af}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x40ee6d,isPercentageStyleValue as _0x5a6826}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x512f12,MenuBarMenuListItemView as _0x6f049e,MenuBarMenuListView as _0x2c51b9,MenuBarMenuView as _0x320db5,UIModel as _0x31d832,addListToDropdown as _0x1dbc38,createDropdown as _0x320d4d}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x4a967c}from'@ckeditor/ckeditor5-icons';var p=class extends _0x570afd{['refresh'](){const _0xc965cf=this['editor']['model']['document'],_0x5df90e=_0x29c89e(_0xc965cf['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x5df90e)&&this['_canHaveLineHeight'](_0x5df90e),this['value']=this['isEnabled']&&_0x5df90e['getAttribute']('lineHeight');}execute(_0x2b1baf={}){const _0x2a7eb7=this['editor']['model'],_0x12c35e=_0x2a7eb7['document']['selection'],_0x3d81b1=_0x2b1baf['value'];_0x2a7eb7['change'](_0xa958ea=>{const _0x3660c5=Array['from'](_0x12c35e['getSelectedBlocks']())['filter'](_0x146697=>this['_canHaveLineHeight'](_0x146697));for(const _0x354315 of _0x3660c5)_0x3d81b1?_0xa958ea['setAttribute']('lineHeight',_0x3d81b1,_0x354315):_0xa958ea['removeAttribute']('lineHeight',_0x354315);});}_canHaveLineHeight(_0x32c7c3){return this['editor']['model']['schema']['checkAttribute'](_0x32c7c3,'lineHeight');}};const y={get 'single'(){return{'title':'Single','model':'single','view':{'key':'class','value':'line-height-single'}};},get 'double'(){return{'title':'Double','model':'double','view':{'key':'class','value':'line-height-double'}};}};function H(_0x5357ee){return'string'==typeof _0x5357ee&&'default'===_0x5357ee['toLowerCase']();}function L(_0x5d3026){return _0x5d3026['options']['map'](_0x43855e=>{return H(_0x43855e)?{'title':String(_0x5d3026['defaultValue']),'model':'default'}:('number'==typeof _0x43855e&&(_0x43855e=String(_0x43855e)),'string'!=typeof _0x43855e?_0x43855e:parseFloat(_0x43855e)?{'title':_0x43855e,'model':_0x43855e,'view':{'name':'span','styles':{'line-height':_0x43855e}}}:'string'==typeof(_0x1aba10=_0x43855e)?y[_0x1aba10]:y[_0x1aba10['model']]);var _0x1aba10;})['filter'](_0x4f7eaf=>void 0x0!==_0x4f7eaf);}var v=class extends _0x278965{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const {plugins:_0x41b541,conversion:_0x8a8c3}=this['editor'];_0x41b541['has']('ListEditing')&&_0x41b541['has']('TodoListEditing')&&(_0x41b541['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x4ef50b,_0x1fce8d,_0x5b6b92,_0x46a467,_0x2b43e7){'todo'==_0x2b43e7['getAttribute']('listType')&&_0x1fce8d&&(_0x4ef50b['addClass']('ck-list-marker-line-height',_0x5b6b92),_0x4ef50b['setStyle']('--ck-content-list-marker-line-height',_0x1fce8d,_0x5b6b92));}}),_0x8a8c3['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x8a8c3['for']('upcast')['add'](_0x9aabbc=>{_0x9aabbc['on']('element:li',function(_0x2aa22d){const _0x4d5ae0=new _0x40ee6d(_0x2aa22d);return(_0x40adc3,_0x3903aa,_0x3db968)=>{const _0x5e5aca=_0x4d5ae0['match'](_0x3903aa['viewItem']);if(!_0x5e5aca)return;const _0xe5a414=_0x5e5aca['match'];_0xe5a414['name']=!0x1,_0x3db968['consumable']['consume'](_0x3903aa['viewItem'],_0xe5a414);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x278965{static get['pluginName'](){return'LineHeightEditing';}static get requires(){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x14f6f9){super(_0x14f6f9),_0x14f6f9['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}init(){const _0x109863=this['editor'];this['_validateConfig'](),_0x109863['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x109863['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x109863['commands']['add']('lineHeight',new p(_0x109863)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}afterInit(){!async function(_0x2d4302){const _0x1735aa='cvqCYM8ia9TDP6n5dmrzbJtlj03FwLxIpEWSUG7ARu21KfQoXNyg4ZBeOhskHV',_0x32d9bd=0x79428,_0x5ec64e={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5e8fbb(_0x541be9){const _0x47c1b0=new window['Promise'](_0x89f7b8=>{_0x541be9['once']('ready',_0x89f7b8);}),_0x521d9b=window['Date']['now'](),_0x16552e=_0x541be9['config']['get']('licenseKey');async function _0x4bc239(){let _0x2f94b7,_0x481ec0=null,_0x5425c8=null;try{return'GPL'==_0x16552e?'NotAllowed':(_0x2f94b7=_0x62f5ff(),_0x2f94b7?(_0x2f94b7['usageEndpoint']&&(_0x5425c8=_0x4e903e(_0x2f94b7['usageEndpoint'],_0x2f94b7['jti'])),await _0x37d4b4()?_0x7d5d52()?_0x5443f6()?'Expired':_0x40c00f()?('evaluation'==_0x2f94b7['licenseType']&&(_0x481ec0=_0x44cf60('EvaluationLimit')),await _0x4dece3()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x5443f6(){const _0xb34ba2=['evaluation','trial']['includes'](_0x2f94b7['licenseType'])?_0x521d9b/0x3e8:0xe10*_0x32d9bd;return _0x2f94b7['exp']<_0xb34ba2;}function _0x7d5d52(){const _0x15d74a=_0x2f94b7['features'];return!!_0x15d74a&&(!!_0x15d74a['includes']('*')||!!_0x15d74a['includes']('LH'));}function _0x40c00f(){const _0x47bd55=_0x2f94b7['licensedHosts'];if(!_0x47bd55||0x0==_0x47bd55['length'])return!0x0;const {hostname:_0x5c3ebd}=new URL(window['location']['href']);if(_0x47bd55['includes'](_0x5c3ebd))return!0x0;const _0x3d72f4=_0x5c3ebd['split']('.');return _0x47bd55['filter'](_0x22afbb=>_0x22afbb['includes']('*'))['map'](_0x21ce90=>_0x21ce90['split']('.'))['filter'](_0xaf2ebc=>_0xaf2ebc['length']<=_0x3d72f4['length'])['map'](_0x7aacd5=>Array(_0x3d72f4['length']-_0x7aacd5['length'])['fill']('*'===_0x7aacd5[0x0]?'*':'')['concat'](_0x7aacd5))['some'](_0x959192=>_0x3d72f4['every']((_0x373520,_0x283f0d)=>_0x959192[_0x283f0d]===_0x373520||'*'===_0x959192[_0x283f0d]));}function _0x4dece3(){return _0x481ec0&&_0x5425c8?new window['Promise']((_0x5c0083,_0x4dc2f2)=>{_0x481ec0['then'](_0x5c0083,_0x4dc2f2),_0x5425c8['then'](_0x1ff9de=>{'Valid'!=_0x1ff9de&&_0x5c0083(_0x1ff9de);},_0x4dc2f2);}):_0x481ec0||_0x5425c8||'Valid';}}function _0x4e903e(_0x333cad,_0x586fc2){return new window['Promise'](_0xfc5658=>{if(_0x548c1c())return _0xfc5658('Valid');_0x374650(),_0x541be9['decorate']('_sendUsageRequest');let _0x1e3038=!0x1;const _0x476158=_0x2974af();function _0x178ca2(_0x2f6a8f){return!!_0x2f6a8f&&('object'==typeof _0x2f6a8f||'function'==typeof _0x2f6a8f)&&'function'==typeof _0x2f6a8f['then']&&'function'==typeof _0x2f6a8f['catch'];}function _0x2a2312(_0x3f0d6a){_0x52239c(_0x3f0d6a)['then'](_0x18227e=>_0x18227e&&'ok'==_0x18227e['status']?_0x4d9e82(_0x2985a5(_0x476158+_0x586fc2))!=_0x18227e['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2037e9=>(_0x8956c8(),_0x2037e9),()=>{const _0x3e4cc3=_0x41080b();return null==_0x3e4cc3?(_0x8956c8(),'Valid'):_0x521d9b-_0x3e4cc3>0x240c8400?'UsageLimit':'Valid';})['then'](_0xfc5658)['catch'](()=>{_0xfc5658('UsageLimit');});const _0x1c633b=0x36ee80;function _0x8956c8(){const _0x581ed3='llct-'+_0x4d9e82(_0x2985a5(_0x333cad)),_0x37af0d=_0x4fe449(_0x4d9e82(window['Math']['ceil'](_0x521d9b/_0x1c633b)));window['localStorage']['setItem'](_0x581ed3,_0x37af0d);}function _0x41080b(){const _0x13ffd3='llct-'+_0x4d9e82(_0x2985a5(_0x333cad)),_0x12b591=window['localStorage']['getItem'](_0x13ffd3);return _0x12b591?window['parseInt'](_0x4fe449(_0x12b591),0x10)*_0x1c633b:null;}function _0x52239c(_0x39da78){return new window['Promise']((_0x573b75,_0x139432)=>{_0x39da78['then'](_0x573b75,_0x139432),window['setTimeout'](_0x139432,0x1d4c0);});}}_0x541be9['on']('_sendUsageRequest',(_0xe600c2,_0x4ea1ef)=>{if(_0x4ea1ef[0x0]!=_0x333cad)return _0xfc5658('UsageLimit');_0x4ea1ef[0x1]={..._0x4ea1ef[0x1],'requestId':_0x476158};},{'priority':'high'}),_0x541be9['on']('_sendUsageRequest',_0x350b8=>{_0x178ca2(_0x350b8['return'])&&(_0x1e3038=!0x0,_0x2a2312(_0x350b8['return']));},{'priority':'low'}),_0x47c1b0['then'](()=>{_0x1e3038||_0xfc5658('UsageLimit');});});function _0x548c1c(){return'auto'==_0x541be9['editing']['view']['_overlayModeHint'];}function _0x374650(){_0x541be9['editing']['view']['_overlayModeHint']='auto';}}function _0x44cf60(_0x13053b){const _0x1dffed=[new window['Promise'](_0x18c784=>setTimeout(_0x18c784,0x93ecc)),_0x47c1b0['then'](()=>new window['Promise'](_0x55fea7=>{let _0x57fac0=0x0;_0x541be9['model']['on']('applyOperation',(_0x27c32d,_0x7eec71)=>{_0x7eec71[0x0]['isDocumentOperation']&&_0x57fac0++,0x5e8==_0x57fac0&&(_0x55fea7(),_0x27c32d['off']());});}))];return window['Promise']['race'](_0x1dffed)['then'](()=>_0x13053b);}async function _0x31a92f(){await _0x47c1b0,_0x541be9['model']['change']=_0x2c4d00,_0x541be9['model']['enqueueChange']=_0x2c4d00,_0x541be9['enableReadOnlyMode']('model');}function _0x43585f(_0x363a2d){const _0x326c12=_0x21d811();_0x541be9[_0x326c12]='lineHeightLicenseKey'+_0x363a2d,'Valid'!=_0x363a2d&&_0x31a92f();}function _0x21d811(){const _0x27200d=window['String'](window['performance']['now']())['replace']('.','');let _0x4b0f9b='c';for(let _0x4c48b3=0x0;_0x4c48b3<_0x27200d['length'];_0x4c48b3+=0x2){let _0x346f0a=window['parseInt'](_0x27200d['substring'](_0x4c48b3,_0x4c48b3+0x2));_0x346f0a>=0x3e&&(_0x346f0a-=0x3e),_0x4b0f9b+=_0x1735aa[_0x346f0a];}return _0x4b0f9b;}function _0x62f5ff(){const _0x20cade=_0x16552e['split']('.');if(0x3!=_0x20cade['length'])return null;return _0x16db49(_0x20cade[0x1]);function _0x16db49(_0x5297ac){const _0x45a78a=_0x523374(_0x5297ac);return _0x45a78a&&_0x221d78()?_0x45a78a:null;function _0x221d78(){const _0xdf4780=_0x45a78a['jti'],_0x494220=window['parseInt'](_0xdf4780['substring'](_0xdf4780['length']-0x8),0x10),_0x5d9731={..._0x45a78a,'jti':_0xdf4780['substring'](0x0,_0xdf4780['length']-0x8)};return delete _0x5d9731['vc'],_0x2985a5(_0x5d9731)==_0x494220;}}}async function _0x37d4b4(){let _0x21490d=!0x0;try{const [_0x1af043,_0x3caf95,_0x5172bf]=_0x16552e['split']('.');return _0x59c32f(_0x1af043),await _0x11a22e(_0x1af043,_0x3caf95,_0x5172bf),_0x21490d;}catch{return!0x1;}function _0x59c32f(_0x22044f){const _0x30340f=_0x523374(_0x22044f);_0x30340f&&'ES256'==_0x30340f['alg']||(_0x21490d=!0x1);}async function _0x11a22e(_0x1c4f90,_0x97c329,_0x17b7d0){const _0xf62499=window['Uint8Array']['from'](_0x42d46c(_0x17b7d0),_0x3b77d4=>_0x3b77d4['charCodeAt'](0x0)),_0x562a05=new window['TextEncoder']()['encode'](_0x1c4f90+'.'+_0x97c329),_0x16351d=window['crypto']['subtle'];if(!_0x16351d)return;const _0x3d973f=await _0x16351d['importKey']('jwk',_0x5ec64e,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x16351d['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3d973f,_0xf62499,_0x562a05)||(_0x21490d=!0x1);}}function _0x523374(_0x46595b){return _0x46595b['startsWith']('ey')?JSON['parse'](_0x42d46c(_0x46595b)):null;}function _0x42d46c(_0x503ae5){return window['atob'](_0x503ae5['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2985a5(_0x207fe0){let _0xd3564=0x1505;function _0x91a6d7(_0x5c6b77){for(let _0x15388c=0x0;_0x15388c<_0x5c6b77['length'];_0x15388c++){const _0xaeb17c=_0x5c6b77['charCodeAt'](_0x15388c);_0xd3564=(_0xd3564<<0x5)+_0xd3564+_0xaeb17c,_0xd3564&=_0xd3564;}}function _0x5638bb(_0x2e2493){Array['isArray'](_0x2e2493)?_0x2e2493['forEach'](_0x5638bb):_0x2e2493&&'object'==typeof _0x2e2493?Object['entries'](_0x2e2493)['sort']()['forEach'](([_0x2141de,_0x31dae8])=>{_0x91a6d7(_0x2141de),_0x5638bb(_0x31dae8);}):_0x91a6d7(window['String'](_0x2e2493));}return _0x5638bb(_0x207fe0),_0xd3564>>>0x0;}function _0x4d9e82(_0x107040){return _0x107040['toString'](0x10)['padStart'](0x8,'0');}function _0x4fe449(_0x186836){return _0x186836['split']('')['reverse']()['join']('');}function _0x2c4d00(){}_0x43585f(await _0x4bc239());}_0x5e8fbb(_0x2d4302['editor']);}(this);}_validateConfig(){const _0x13156b=this['editor'];if(!_0x13156b['config']['get']('lineHeight.supportAllValues'))return;const _0x1ff765=_0x13156b['config']['get']('lineHeight.options')['filter'](_0x54ec6f=>'string'==typeof _0x54ec6f&&(!H(_0x54ec6f)&&isNaN(Number(_0x54ec6f))));if(_0x1ff765['length'])throw new _0x3b6cb4('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x1ff765});}_prepareAnyValueConverters(){const _0x50ba0f=this['editor'],_0x4a0dcf=this['editor']['config']['get']('lineHeight.defaultValue');_0x50ba0f['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x104625=>String(_0x104625)===String(_0x4a0dcf)?null:{'key':'style','value':{'line-height':_0x104625}}}),_0x50ba0f['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x27fe55=>{let _0x4cc0d7=_0x27fe55['getStyle']('line-height');return _0x5a6826(_0x4cc0d7)&&(_0x4cc0d7=String(Number(_0x4cc0d7['slice'](0x0,-0x1))/0x64)),String(_0x4cc0d7)===String(_0x4a0dcf)?null:_0x4cc0d7;}},'view':{'styles':{'line-height':/.*/}}});}_preparePredefinedConverters(){const _0x582933=this['editor'],_0x3e9d7c=this['editor']['config']['get']('lineHeight.defaultValue'),_0x247c08=function(_0x588512,_0x29b8e1){const _0x4db354={'model':{'key':_0x588512,'values':[]},'view':{}};for(const _0x3d10e0 of _0x29b8e1)'class'===_0x3d10e0['view']?.['key']?(_0x4db354['model']['values']['push'](_0x3d10e0['model']),_0x4db354['view'][_0x3d10e0['model']]={'key':'class','value':_0x3d10e0['view']['value']}):(_0x4db354['model']['values']['push'](_0x3d10e0['model']),_0x4db354['view'][_0x3d10e0['model']]={'key':'style','value':'line-height:'+_0x3d10e0['model']+';'});return _0x4db354;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x28a793=>_0x28a793['model']));_0x582933['conversion']['attributeToAttribute'](_0x247c08),_0x582933['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x1c4953=>{let _0x5b7213=_0x1c4953['getStyle']('line-height');return _0x5a6826(_0x5b7213)&&(_0x5b7213=String(Number(_0x5b7213['slice'](0x0,-0x1))/0x64)),_0x5b7213===String(_0x3e9d7c)?null:_0x247c08['model']['values']['includes'](_0x5b7213)?_0x5b7213:null;}}});}},k=class extends _0x278965{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x38a795={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x38a795),this['_registerMenuBarComponent'](_0x38a795),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1a49e1=[this['editor']];for(const _0x37422b of _0x1a49e1){let _0x2db76b;for(const _0xb001f5 in _0x37422b){const _0x5cf858=_0xb001f5,_0x3b2f92=_0x37422b[_0x5cf858];if('lineHeightLicenseKeyValid'==_0x3b2f92||'lineHeightLicenseKeyInvalid'==_0x3b2f92||'lineHeightLicenseKeyExpired'==_0x3b2f92||'lineHeightLicenseKeyDomainLimit'==_0x3b2f92||'lineHeightLicenseKeyNotAllowed'==_0x3b2f92||'lineHeightLicenseKeyEvaluationLimit'==_0x3b2f92||'lineHeightLicenseKeyUsageLimit'==_0x3b2f92){delete _0x37422b[_0x5cf858],_0x2db76b=_0x3b2f92,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x2db76b&&_0x37422b['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x2db76b&&_0x37422b['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x2db76b&&_0x37422b['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x2db76b&&_0x37422b['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x2db76b&&_0x37422b['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x2db76b&&_0x37422b['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_shouldRenderCustomValueOption(){return this['editor']['config']['get']('lineHeight.supportAllValues');}_getLocalizedLineHeightOptions(){const _0x29a7b1=this['editor'],t=_0x29a7b1['t'],_0x4cfa5d=_0x29a7b1['config']['get']('lineHeight'),_0x537a89={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x4cfa5d)['map'](_0x271687=>{const _0x4f2bb2=_0x537a89[_0x271687['title']];return _0x4f2bb2&&_0x4f2bb2!=_0x271687['title']&&(_0x271687=Object['assign']({},_0x271687,{'title':_0x4f2bb2})),_0x271687;});}_prepareListOptions(){const _0x5612b0=this['editor']['commands']['get']('lineHeight'),_0x5a4768=this['editor']['config']['get']('lineHeight.defaultValue'),_0x9e13b1=this['_getLocalizedLineHeightOptions'](),_0x2cb102=new _0x1e4ea1(),_0x38e5d0=_0x14e61f=>'default'===_0x14e61f||String(_0x5a4768)===_0x14e61f;for(const _0x134c8a of _0x9e13b1){const _0x3a1961={'type':'button','model':new _0x31d832({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x134c8a['title'],'withText':!0x0})};_0x38e5d0(_0x134c8a['model'])?(_0x3a1961['model']['bind']('isOn')['to'](_0x5612b0,'value',_0x40de4d=>!_0x40de4d),_0x3a1961['model']['commandParam']=void 0x0):(_0x3a1961['model']['bind']('isOn')['to'](_0x5612b0,'value',_0x3072b7=>_0x3072b7===_0x134c8a['model']),_0x3a1961['model']['commandParam']=_0x134c8a['model']),_0x2cb102['add'](_0x3a1961);}if(this['_shouldRenderCustomValueOption']()){const _0x5e61f6=this['_getCustomValueOptionDefinition'](_0x9e13b1);_0x2cb102['add'](_0x5e61f6);}return _0x2cb102;}_getCustomValueOptionDefinition(_0x19473e){const _0x75ac99=this['editor'],t=_0x75ac99['t'],_0x401d2c=_0x75ac99['commands']['get']('lineHeight'),_0x573aaa=_0x19473e['map'](_0x598861=>_0x598861['model']),_0x41abe8={'type':'button','model':new _0x31d832({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x41abe8['model']['bind']('commandParam')['to'](_0x401d2c,'value'),_0x41abe8['model']['bind']('isOn')['to'](_0x401d2c,'value',_0x14f29a=>!!_0x14f29a&&!_0x573aaa['includes'](String(_0x14f29a))),_0x41abe8['model']['bind']('label')['to'](_0x401d2c,'value',_0x4d7adf=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x4d7adf))),_0x41abe8;}_registerToolbarComponent({accessibleLabel:_0x33272d,options:_0x4fad25}){const _0x2afc3b=this['editor'],_0x25997a=_0x2afc3b['commands']['get']('lineHeight');_0x2afc3b['ui']['componentFactory']['add']('lineHeight',_0x19c54d=>{const _0x5139cc=_0x320d4d(_0x19c54d);return _0x1dbc38(_0x5139cc,_0x4fad25,{'role':'menu','ariaLabel':_0x33272d}),_0x5139cc['buttonView']['set']({'label':_0x33272d,'tooltip':!0x0,'icon':_0x4a967c}),_0x5139cc['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x5139cc['bind']('isEnabled')['to'](_0x25997a),this['listenTo'](_0x5139cc,'execute',_0x15cf17=>{_0x2afc3b['execute'](_0x15cf17['source']['commandName'],{'value':_0x15cf17['source']['commandParam']}),_0x2afc3b['editing']['view']['focus']();}),_0x5139cc['once']('change:isOpen',()=>{const _0x50bfac=_0x5139cc['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x5139cc,_0x4fad25,_0x50bfac);}),_0x5139cc;});}_registerMenuBarComponent({accessibleLabel:_0x794b0d,options:_0x31410a}){const _0x209c72=this['editor'],_0x58f677=_0x209c72['commands']['get']('lineHeight');_0x209c72['ui']['componentFactory']['add']('menuBar:lineHeight',_0x45f0d3=>{const _0x3be2c1=new _0x320db5(_0x45f0d3);_0x3be2c1['buttonView']['set']({'label':_0x794b0d,'icon':_0x4a967c}),_0x3be2c1['bind']('isEnabled')['to'](_0x58f677);const _0x2bc58d=new _0x2c51b9(_0x45f0d3);for(const _0x51ca75 of _0x31410a){const _0x4504de=new _0x6f049e(_0x45f0d3,_0x3be2c1),_0x3e5f91=new _0x512f12(_0x45f0d3);_0x3e5f91['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x3e5f91['bind'](...Object['keys'](_0x51ca75['model']))['to'](_0x51ca75['model']),_0x3e5f91['delegate']('execute')['to'](_0x3be2c1),_0x3e5f91['on']('execute',()=>{_0x209c72['execute'](_0x51ca75['model']['commandName'],{'value':_0x51ca75['model']['commandParam']}),_0x209c72['editing']['view']['focus']();}),_0x4504de['children']['add'](_0x3e5f91),_0x2bc58d['items']['add'](_0x4504de);}return _0x3be2c1['panelView']['children']['add'](_0x2bc58d),this['_attachCustomOptionVisibilityHandler'](_0x3be2c1,_0x31410a,_0x2bc58d),_0x3be2c1;});}_attachCustomOptionVisibilityHandler(_0x53b581,_0x283a17,_0x42342){if(!this['_shouldRenderCustomValueOption']())return;const _0x411aab=()=>{if(!_0x53b581['isOpen'])return;_0x42342['items']['last']['isVisible']=Boolean(_0x283a17['last']['model']['isOn']);};_0x411aab(),_0x53b581['on']('change:isOpen',()=>{_0x411aab();});}},_=class extends _0x278965{static get requires(){return[b,k];}static get['pluginName'](){return'LineHeight';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{_ as LineHeight,p as LineHeightCommand,b as LineHeightEditing,v as LineHeightTodoListIntegration,k as LineHeightUI};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-line-height",
3
- "version": "48.5.0-alpha.2",
3
+ "version": "48.5.0-alpha.4",
4
4
  "description": "Line height feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (https://cksource.com/)",
@@ -26,12 +26,12 @@
26
26
  "dist/translations/*.umd.js"
27
27
  ],
28
28
  "dependencies": {
29
- "@ckeditor/ckeditor5-core": "48.5.0-alpha.2",
30
- "@ckeditor/ckeditor5-engine": "48.5.0-alpha.2",
31
- "@ckeditor/ckeditor5-icons": "48.5.0-alpha.2",
32
- "@ckeditor/ckeditor5-list": "48.5.0-alpha.2",
33
- "@ckeditor/ckeditor5-ui": "48.5.0-alpha.2",
34
- "@ckeditor/ckeditor5-utils": "48.5.0-alpha.2"
29
+ "@ckeditor/ckeditor5-core": "48.5.0-alpha.4",
30
+ "@ckeditor/ckeditor5-engine": "48.5.0-alpha.4",
31
+ "@ckeditor/ckeditor5-icons": "48.5.0-alpha.4",
32
+ "@ckeditor/ckeditor5-list": "48.5.0-alpha.4",
33
+ "@ckeditor/ckeditor5-ui": "48.5.0-alpha.4",
34
+ "@ckeditor/ckeditor5-utils": "48.5.0-alpha.4"
35
35
  },
36
36
  "files": [
37
37
  "dist",