@ckeditor/ckeditor5-line-height 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.
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 _0x474b8e,Plugin as _0x591983}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x40b474,Collection as _0x2d36bb,first as _0x33297c,uid as _0x531c5b}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x676124,isPercentageStyleValue as _0x10f64a}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0x4b6f2c,MenuBarMenuListItemView as _0x540536,MenuBarMenuListView as _0x58b87e,MenuBarMenuView as _0x7ceb9f,UIModel as _0x5f0b18,addListToDropdown as _0xbb606f,createDropdown as _0x49cae2}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x362bb0}from'@ckeditor/ckeditor5-icons';var p=class extends _0x474b8e{['refresh'](){const _0x2a7a30=this['editor']['model']['document'],_0x2bb29d=_0x33297c(_0x2a7a30['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x2bb29d)&&this['_canHaveLineHeight'](_0x2bb29d),this['value']=this['isEnabled']&&_0x2bb29d['getAttribute']('lineHeight');}['execute'](_0x33d225={}){const _0x5bc410=this['editor']['model'],_0xa57c00=_0x5bc410['document']['selection'],_0x561d74=_0x33d225['value'];_0x5bc410['change'](_0x2758e1=>{const _0x3a38fd=Array['from'](_0xa57c00['getSelectedBlocks']())['filter'](_0x437c2d=>this['_canHaveLineHeight'](_0x437c2d));for(const _0x212f6d of _0x3a38fd)_0x561d74?_0x2758e1['setAttribute']('lineHeight',_0x561d74,_0x212f6d):_0x2758e1['removeAttribute']('lineHeight',_0x212f6d);});}['_canHaveLineHeight'](_0x51472d){return this['editor']['model']['schema']['checkAttribute'](_0x51472d,'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(_0x4cd971){return'string'==typeof _0x4cd971&&'default'===_0x4cd971['toLowerCase']();}function L(_0x3463ef){return _0x3463ef['options']['map'](_0x50d6c3=>{return H(_0x50d6c3)?{'title':String(_0x3463ef['defaultValue']),'model':'default'}:('number'==typeof _0x50d6c3&&(_0x50d6c3=String(_0x50d6c3)),'string'!=typeof _0x50d6c3?_0x50d6c3:parseFloat(_0x50d6c3)?{'title':_0x50d6c3,'model':_0x50d6c3,'view':{'name':'span','styles':{'line-height':_0x50d6c3}}}:'string'==typeof(_0x54bc26=_0x50d6c3)?y[_0x54bc26]:y[_0x54bc26['model']]);var _0x54bc26;})['filter'](_0x44f4b6=>void 0x0!==_0x44f4b6);}var v=class extends _0x591983{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {plugins:_0x3a8acd,conversion:_0x4228ee}=this['editor'];_0x3a8acd['has']('ListEditing')&&_0x3a8acd['has']('TodoListEditing')&&(_0x3a8acd['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x160424,_0xaa74e5,_0x2de030,_0x54b047,_0x531a0c){'todo'==_0x531a0c['getAttribute']('listType')&&_0xaa74e5&&(_0x160424['addClass']('ck-list-marker-line-height',_0x2de030),_0x160424['setStyle']('--ck-content-list-marker-line-height',_0xaa74e5,_0x2de030));}}),_0x4228ee['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x4228ee['for']('upcast')['add'](_0x575d65=>{_0x575d65['on']('element:li',function(_0x5f2dd3){const _0x53ae12=new _0x676124(_0x5f2dd3);return(_0x241e8d,_0x33658e,_0x2e8f37)=>{const _0x24a610=_0x53ae12['match'](_0x33658e['viewItem']);if(!_0x24a610)return;const _0x2ae65a=_0x24a610['match'];_0x2ae65a['name']=!0x1,_0x2e8f37['consumable']['consume'](_0x33658e['viewItem'],_0x2ae65a);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x591983{static get['pluginName'](){return'LineHeightEditing';}static get['requires'](){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34ab7d){super(_0x34ab7d),_0x34ab7d['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}['init'](){const _0x5488d9=this['editor'];this['_validateConfig'](),_0x5488d9['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x5488d9['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x5488d9['commands']['add']('lineHeight',new p(_0x5488d9)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}['afterInit'](){!async function(_0x3c8e52){const _0xdb59dc='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x471980=0x78de0,_0x32a92b=window['Date']['now'](),_0x39e0c6=_0x3c8e52['editor'],_0x27f22e=new window['Promise'](_0x4bb586=>{_0x39e0c6['once']('ready',_0x4bb586);}),_0x3c8599={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0xa060aa=_0x39e0c6['config']['get']('licenseKey');async function _0x4d4999(){let _0x2b33ac,_0x5d7563=null,_0x4e5df4=null;try{return'GPL'==_0xa060aa?'NotAllowed':(_0x2b33ac=_0x33263f(),_0x2b33ac?(_0x2b33ac['usageEndpoint']&&(_0x4e5df4=_0x42e9a9(_0x2b33ac['usageEndpoint'],_0x2b33ac['jti'])),await _0x4093fe()?_0x46a5c1()?_0x56cc52()?'Expired':_0x59115c()?('evaluation'==_0x2b33ac['licenseType']&&(_0x5d7563=_0x58b185('EvaluationLimit')),await _0x34ba9f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x56cc52(){const _0x1596d6=['evaluation','trial']['includes'](_0x2b33ac['licenseType'])?_0x32a92b/0x3e8:0xe10*_0x471980;return _0x2b33ac['exp']<_0x1596d6;}function _0x46a5c1(){const _0x1a4531=_0x2b33ac['features'];return!!_0x1a4531&&(!!_0x1a4531['includes']('*')||!!_0x1a4531['includes']('LH'));}function _0x59115c(){const _0x2dd3d0=_0x2b33ac['licensedHosts'];if(!_0x2dd3d0||0x0==_0x2dd3d0['length'])return!0x0;const {hostname:_0x426990}=new URL(window['location']['href']);if(_0x2dd3d0['includes'](_0x426990))return!0x0;const _0x52bee7=_0x426990['split']('.');return _0x2dd3d0['filter'](_0x1a3554=>_0x1a3554['includes']('*'))['map'](_0x148b9e=>_0x148b9e['split']('.'))['filter'](_0x1428f0=>_0x1428f0['length']<=_0x52bee7['length'])['map'](_0x5b09f2=>Array(_0x52bee7['length']-_0x5b09f2['length'])['fill']('*'===_0x5b09f2[0x0]?'*':'')['concat'](_0x5b09f2))['some'](_0x4fdc8e=>_0x52bee7['every']((_0x4d4905,_0x452cd7)=>_0x4fdc8e[_0x452cd7]===_0x4d4905||'*'===_0x4fdc8e[_0x452cd7]));}function _0x34ba9f(){return _0x5d7563&&_0x4e5df4?new window['Promise']((_0x2a85af,_0x3a2b41)=>{_0x5d7563['then'](_0x2a85af,_0x3a2b41),_0x4e5df4['then'](_0xac7972=>{'Valid'!=_0xac7972&&_0x2a85af(_0xac7972);},_0x3a2b41);}):_0x5d7563||_0x4e5df4||'Valid';}}function _0x42e9a9(_0x8c6df,_0x27fcc0){return new window['Promise'](_0x3bead1=>{if(_0x8e24f6())return _0x3bead1('Valid');_0x486705(),_0x39e0c6['decorate']('_sendUsageRequest');let _0x443184=!0x1;const _0xc215da=_0x531c5b();function _0x116121(_0x47e745){return!!_0x47e745&&('object'==typeof _0x47e745||'function'==typeof _0x47e745)&&'function'==typeof _0x47e745['then']&&'function'==typeof _0x47e745['catch'];}function _0x4d0cd8(_0x45ac09){_0xb19fc7(_0x45ac09)['then'](_0x224752=>_0x224752&&'ok'==_0x224752['status']?_0x2af99e(_0x26238e(_0xc215da+_0x27fcc0))!=_0x224752['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x13cd2c=>(_0x555190(),_0x13cd2c),()=>{const _0x4c8b25=_0x448d78();return null==_0x4c8b25?(_0x555190(),'Valid'):_0x32a92b-_0x4c8b25>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3bead1)['catch'](()=>{_0x3bead1('UsageLimit');});const _0x4e37f3=0x36ee80;function _0x555190(){const _0x2de7ea='llct-'+_0x2af99e(_0x26238e(_0x8c6df)),_0x24e294=_0x4044cc(_0x2af99e(window['Math']['ceil'](_0x32a92b/_0x4e37f3)));window['localStorage']['setItem'](_0x2de7ea,_0x24e294);}function _0x448d78(){const _0x5e5ec1='llct-'+_0x2af99e(_0x26238e(_0x8c6df)),_0x5b4310=window['localStorage']['getItem'](_0x5e5ec1);return _0x5b4310?window['parseInt'](_0x4044cc(_0x5b4310),0x10)*_0x4e37f3:null;}function _0xb19fc7(_0x42690c){return new window['Promise']((_0x4a9dab,_0xbbe44a)=>{_0x42690c['then'](_0x4a9dab,_0xbbe44a),window['setTimeout'](_0xbbe44a,0x1d4c0);});}}_0x39e0c6['on']('_sendUsageRequest',(_0x22d1d7,_0x1f3aca)=>{if(_0x1f3aca[0x0]!=_0x8c6df)return _0x3bead1('UsageLimit');_0x1f3aca[0x1]={..._0x1f3aca[0x1],'requestId':_0xc215da};},{'priority':'high'}),_0x39e0c6['on']('_sendUsageRequest',_0xafbc7c=>{_0x116121(_0xafbc7c['return'])&&(_0x443184=!0x0,_0x4d0cd8(_0xafbc7c['return']));},{'priority':'low'}),_0x27f22e['then'](()=>{_0x443184||_0x3bead1('UsageLimit');});});function _0x8e24f6(){return'auto'==_0x39e0c6['editing']['view']['_overlayModeHint'];}function _0x486705(){_0x39e0c6['editing']['view']['_overlayModeHint']='auto';}}function _0x58b185(_0xb8b707){const _0x47f1f6=[new window['Promise'](_0x1fbdd2=>setTimeout(_0x1fbdd2,0x93ecc)),_0x27f22e['then'](()=>new window['Promise'](_0x59e29f=>{let _0x531002=0x0;_0x39e0c6['model']['on']('applyOperation',(_0xd37e3c,_0x1d1366)=>{_0x1d1366[0x0]['isDocumentOperation']&&_0x531002++,0x5e8==_0x531002&&(_0x59e29f(),_0xd37e3c['off']());});}))];return window['Promise']['race'](_0x47f1f6)['then'](()=>_0xb8b707);}async function _0x360de9(){await _0x27f22e,_0x39e0c6['model']['change']=_0x130600,_0x39e0c6['model']['enqueueChange']=_0x130600,_0x39e0c6['enableReadOnlyMode']('model');}function _0x120990(_0xf67211){const _0x38f404=_0x2f242a();_0x39e0c6[_0x38f404]='lineHeightLicenseKey'+_0xf67211,'Valid'!=_0xf67211&&_0x360de9();}function _0x2f242a(){const _0x17d051=window['String'](window['performance']['now']())['replace']('.','');let _0x52ced0='P';for(let _0x25a58e=0x0;_0x25a58e<_0x17d051['length'];_0x25a58e+=0x2){let _0x4d3552=window['parseInt'](_0x17d051['substring'](_0x25a58e,_0x25a58e+0x2));_0x4d3552>=0x3e&&(_0x4d3552-=0x3e),_0x52ced0+=_0xdb59dc[_0x4d3552];}return _0x52ced0;}function _0x33263f(){const _0x390b89=_0xa060aa['split']('.');if(0x3!=_0x390b89['length'])return null;return _0x47743f(_0x390b89[0x1]);function _0x47743f(_0x2372e1){const _0x1be405=_0x2423ca(_0x2372e1);return _0x1be405&&_0x268885()?_0x1be405:null;function _0x268885(){const _0x86341e=_0x1be405['jti'],_0x5734c1=window['parseInt'](_0x86341e['substring'](_0x86341e['length']-0x8),0x10),_0x347bc0={..._0x1be405,'jti':_0x86341e['substring'](0x0,_0x86341e['length']-0x8)};return delete _0x347bc0['vc'],_0x26238e(_0x347bc0)==_0x5734c1;}}}async function _0x4093fe(){let _0xb6a7a4=!0x0;try{const [_0x54943f,_0x253368,_0x1e641e]=_0xa060aa['split']('.');return _0x570c80(_0x54943f),await _0x69fa83(_0x54943f,_0x253368,_0x1e641e),_0xb6a7a4;}catch{return!0x1;}function _0x570c80(_0x31c870){const _0x9a4968=_0x2423ca(_0x31c870);_0x9a4968&&'ES256'==_0x9a4968['alg']||(_0xb6a7a4=!0x1);}async function _0x69fa83(_0x52761a,_0x38c2ce,_0x24c8c4){const _0x1db882=window['Uint8Array']['from'](_0x38ae97(_0x24c8c4),_0x1ce930=>_0x1ce930['charCodeAt'](0x0)),_0x536cba=new window['TextEncoder']()['encode'](_0x52761a+'.'+_0x38c2ce),_0x28b980=window['crypto']['subtle'];if(!_0x28b980)return;const _0x18fa1c=await _0x28b980['importKey']('jwk',_0x3c8599,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x28b980['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x18fa1c,_0x1db882,_0x536cba)||(_0xb6a7a4=!0x1);}}function _0x2423ca(_0x56b3ee){return _0x56b3ee['startsWith']('ey')?JSON['parse'](_0x38ae97(_0x56b3ee)):null;}function _0x38ae97(_0x5b0efb){return window['atob'](_0x5b0efb['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x26238e(_0x458f8f){let _0x2a6561=0x1505;function _0x2bd79a(_0x4583da){for(let _0x355e8a=0x0;_0x355e8a<_0x4583da['length'];_0x355e8a++){const _0x29d8f2=_0x4583da['charCodeAt'](_0x355e8a);_0x2a6561=(_0x2a6561<<0x5)+_0x2a6561+_0x29d8f2,_0x2a6561&=_0x2a6561;}}function _0x3831b1(_0x4e0724){Array['isArray'](_0x4e0724)?_0x4e0724['forEach'](_0x3831b1):_0x4e0724&&'object'==typeof _0x4e0724?Object['entries'](_0x4e0724)['sort']()['forEach'](([_0x1b0c6d,_0x59b082])=>{_0x2bd79a(_0x1b0c6d),_0x3831b1(_0x59b082);}):_0x2bd79a(window['String'](_0x4e0724));}return _0x3831b1(_0x458f8f),_0x2a6561>>>0x0;}function _0x2af99e(_0x1801f7){return _0x1801f7['toString'](0x10)['padStart'](0x8,'0');}function _0x4044cc(_0x264524){return _0x264524['split']('')['reverse']()['join']('');}function _0x130600(){}_0x120990(await _0x4d4999());}(this);}['_validateConfig'](){const _0x4ca76b=this['editor'];if(!_0x4ca76b['config']['get']('lineHeight.supportAllValues'))return;const _0x35eda3=_0x4ca76b['config']['get']('lineHeight.options')['filter'](_0x52640d=>'string'==typeof _0x52640d&&(!H(_0x52640d)&&isNaN(Number(_0x52640d))));if(_0x35eda3['length'])throw new _0x40b474('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x35eda3});}['_prepareAnyValueConverters'](){const _0x31c5b9=this['editor'],_0x3573d6=this['editor']['config']['get']('lineHeight.defaultValue');_0x31c5b9['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x2d9c77=>String(_0x2d9c77)===String(_0x3573d6)?null:{'key':'style','value':{'line-height':_0x2d9c77}}}),_0x31c5b9['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x14cc39=>{let _0x370cff=_0x14cc39['getStyle']('line-height');return _0x10f64a(_0x370cff)&&(_0x370cff=String(Number(_0x370cff['slice'](0x0,-0x1))/0x64)),String(_0x370cff)===String(_0x3573d6)?null:_0x370cff;}},'view':{'styles':{'line-height':/.*/}}});}['_preparePredefinedConverters'](){const _0x25f34e=this['editor'],_0x40fa2c=this['editor']['config']['get']('lineHeight.defaultValue'),_0x1e6267=function(_0x108a25,_0x3721c3){const _0x5e69a9={'model':{'key':_0x108a25,'values':[]},'view':{}};for(const _0x311541 of _0x3721c3)'class'===_0x311541['view']?.['key']?(_0x5e69a9['model']['values']['push'](_0x311541['model']),_0x5e69a9['view'][_0x311541['model']]={'key':'class','value':_0x311541['view']['value']}):(_0x5e69a9['model']['values']['push'](_0x311541['model']),_0x5e69a9['view'][_0x311541['model']]={'key':'style','value':'line-height:'+_0x311541['model']+';'});return _0x5e69a9;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x598db6=>_0x598db6['model']));_0x25f34e['conversion']['attributeToAttribute'](_0x1e6267),_0x25f34e['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x5855d2=>{let _0xe90d11=_0x5855d2['getStyle']('line-height');return _0x10f64a(_0xe90d11)&&(_0xe90d11=String(Number(_0xe90d11['slice'](0x0,-0x1))/0x64)),_0xe90d11===String(_0x40fa2c)?null:_0x1e6267['model']['values']['includes'](_0xe90d11)?_0xe90d11:null;}}});}},k=class extends _0x591983{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x253900={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x253900),this['_registerMenuBarComponent'](_0x253900),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x573ad1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x221048;for(const _0x211371 in _0x573ad1){const _0x312581=_0x211371,_0x5ad567=_0x573ad1[_0x312581];if('lineHeightLicenseKeyValid'==_0x5ad567||'lineHeightLicenseKeyInvalid'==_0x5ad567||'lineHeightLicenseKeyExpired'==_0x5ad567||'lineHeightLicenseKeyDomainLimit'==_0x5ad567||'lineHeightLicenseKeyNotAllowed'==_0x5ad567||'lineHeightLicenseKeyEvaluationLimit'==_0x5ad567||'lineHeightLicenseKeyUsageLimit'==_0x5ad567){delete _0x573ad1[_0x312581],_0x221048=_0x5ad567,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x221048&&_0x573ad1['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x221048&&_0x573ad1['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x221048&&_0x573ad1['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x221048&&_0x573ad1['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x221048&&_0x573ad1['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x221048&&_0x573ad1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_shouldRenderCustomValueOption'](){return this['editor']['config']['get']('lineHeight.supportAllValues');}['_getLocalizedLineHeightOptions'](){const _0x21f4f8=this['editor'],t=_0x21f4f8['t'],_0x231c17=_0x21f4f8['config']['get']('lineHeight'),_0x2ebb69={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x231c17)['map'](_0xaac8b5=>{const _0x5064f9=_0x2ebb69[_0xaac8b5['title']];return _0x5064f9&&_0x5064f9!=_0xaac8b5['title']&&(_0xaac8b5=Object['assign']({},_0xaac8b5,{'title':_0x5064f9})),_0xaac8b5;});}['_prepareListOptions'](){const _0x21335c=this['editor']['commands']['get']('lineHeight'),_0x52c70b=this['editor']['config']['get']('lineHeight.defaultValue'),_0x582a1b=this['_getLocalizedLineHeightOptions'](),_0x33bd8e=new _0x2d36bb(),_0x22e658=_0x1fdb46=>'default'===_0x1fdb46||String(_0x52c70b)===_0x1fdb46;for(const _0x9ce6a7 of _0x582a1b){const _0x4a5082={'type':'button','model':new _0x5f0b18({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x9ce6a7['title'],'withText':!0x0})};_0x22e658(_0x9ce6a7['model'])?(_0x4a5082['model']['bind']('isOn')['to'](_0x21335c,'value',_0x3a609c=>!_0x3a609c),_0x4a5082['model']['commandParam']=void 0x0):(_0x4a5082['model']['bind']('isOn')['to'](_0x21335c,'value',_0x8a2ca2=>_0x8a2ca2===_0x9ce6a7['model']),_0x4a5082['model']['commandParam']=_0x9ce6a7['model']),_0x33bd8e['add'](_0x4a5082);}if(this['_shouldRenderCustomValueOption']()){const _0x5c2f4b=this['_getCustomValueOptionDefinition'](_0x582a1b);_0x33bd8e['add'](_0x5c2f4b);}return _0x33bd8e;}['_getCustomValueOptionDefinition'](_0x466aae){const _0x59f436=this['editor'],t=_0x59f436['t'],_0x1aed5e=_0x59f436['commands']['get']('lineHeight'),_0x59ccc1=_0x466aae['map'](_0x5b16c1=>_0x5b16c1['model']),_0x2e74f5={'type':'button','model':new _0x5f0b18({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x2e74f5['model']['bind']('commandParam')['to'](_0x1aed5e,'value'),_0x2e74f5['model']['bind']('isOn')['to'](_0x1aed5e,'value',_0x38ef5b=>!!_0x38ef5b&&!_0x59ccc1['includes'](String(_0x38ef5b))),_0x2e74f5['model']['bind']('label')['to'](_0x1aed5e,'value',_0x221b22=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x221b22))),_0x2e74f5;}['_registerToolbarComponent']({accessibleLabel:_0x13a12b,options:_0x1a9144}){const _0xcbccbb=this['editor'],_0x118a86=_0xcbccbb['commands']['get']('lineHeight');_0xcbccbb['ui']['componentFactory']['add']('lineHeight',_0x4a3d00=>{const _0x2be0bb=_0x49cae2(_0x4a3d00);return _0xbb606f(_0x2be0bb,_0x1a9144,{'role':'menu','ariaLabel':_0x13a12b}),_0x2be0bb['buttonView']['set']({'label':_0x13a12b,'tooltip':!0x0,'icon':_0x362bb0}),_0x2be0bb['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x2be0bb['bind']('isEnabled')['to'](_0x118a86),this['listenTo'](_0x2be0bb,'execute',_0x4a8ddd=>{_0xcbccbb['execute'](_0x4a8ddd['source']['commandName'],{'value':_0x4a8ddd['source']['commandParam']}),_0xcbccbb['editing']['view']['focus']();}),_0x2be0bb['once']('change:isOpen',()=>{const _0xf130f7=_0x2be0bb['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x2be0bb,_0x1a9144,_0xf130f7);}),_0x2be0bb;});}['_registerMenuBarComponent']({accessibleLabel:_0x411caf,options:_0x2ebfb3}){const _0x298506=this['editor'],_0x199f07=_0x298506['commands']['get']('lineHeight');_0x298506['ui']['componentFactory']['add']('menuBar:lineHeight',_0x56a188=>{const _0x4006cf=new _0x7ceb9f(_0x56a188);_0x4006cf['buttonView']['set']({'label':_0x411caf,'icon':_0x362bb0}),_0x4006cf['bind']('isEnabled')['to'](_0x199f07);const _0x503e0d=new _0x58b87e(_0x56a188);for(const _0x42295e of _0x2ebfb3){const _0x5228cf=new _0x540536(_0x56a188,_0x4006cf),_0x5ba8fb=new _0x4b6f2c(_0x56a188);_0x5ba8fb['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x5ba8fb['bind'](...Object['keys'](_0x42295e['model']))['to'](_0x42295e['model']),_0x5ba8fb['delegate']('execute')['to'](_0x4006cf),_0x5ba8fb['on']('execute',()=>{_0x298506['execute'](_0x42295e['model']['commandName'],{'value':_0x42295e['model']['commandParam']}),_0x298506['editing']['view']['focus']();}),_0x5228cf['children']['add'](_0x5ba8fb),_0x503e0d['items']['add'](_0x5228cf);}return _0x4006cf['panelView']['children']['add'](_0x503e0d),this['_attachCustomOptionVisibilityHandler'](_0x4006cf,_0x2ebfb3,_0x503e0d),_0x4006cf;});}['_attachCustomOptionVisibilityHandler'](_0x211d84,_0x4e739a,_0xbdd81a){if(!this['_shouldRenderCustomValueOption']())return;const _0x4d2bd9=()=>{if(!_0x211d84['isOpen'])return;_0xbdd81a['items']['last']['isVisible']=Boolean(_0x4e739a['last']['model']['isOn']);};_0x4d2bd9(),_0x211d84['on']('change:isOpen',()=>{_0x4d2bd9();});}},_=class extends _0x591983{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 _0x529ebf,Plugin as _0x1bc491}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x261883,Collection as _0x35ee3c,first as _0x14e5c4,uid as _0x274a5d}from'@ckeditor/ckeditor5-utils';import{Matcher as _0x4a6df8,isPercentageStyleValue as _0x5ca071}from'@ckeditor/ckeditor5-engine';import{MenuBarMenuListItemButtonView as _0xe08c28,MenuBarMenuListItemView as _0x392ced,MenuBarMenuListView as _0x2edd5a,MenuBarMenuView as _0x511c6a,UIModel as _0x5634d5,addListToDropdown as _0x339a28,createDropdown as _0x32a4da}from'@ckeditor/ckeditor5-ui';import{IconLineHeight as _0x5cc209}from'@ckeditor/ckeditor5-icons';var p=class extends _0x529ebf{['refresh'](){const _0x1032dc=this['editor']['model']['document'],_0x52824d=_0x14e5c4(_0x1032dc['selection']['getSelectedBlocks']());this['isEnabled']=Boolean(_0x52824d)&&this['_canHaveLineHeight'](_0x52824d),this['value']=this['isEnabled']&&_0x52824d['getAttribute']('lineHeight');}['execute'](_0xebd874={}){const _0x13729e=this['editor']['model'],_0x5ba21c=_0x13729e['document']['selection'],_0x539d65=_0xebd874['value'];_0x13729e['change'](_0x2f95cc=>{const _0x5ee64e=Array['from'](_0x5ba21c['getSelectedBlocks']())['filter'](_0x3f9037=>this['_canHaveLineHeight'](_0x3f9037));for(const _0x213aa2 of _0x5ee64e)_0x539d65?_0x2f95cc['setAttribute']('lineHeight',_0x539d65,_0x213aa2):_0x2f95cc['removeAttribute']('lineHeight',_0x213aa2);});}['_canHaveLineHeight'](_0x411429){return this['editor']['model']['schema']['checkAttribute'](_0x411429,'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(_0x37bbc5){return'string'==typeof _0x37bbc5&&'default'===_0x37bbc5['toLowerCase']();}function L(_0x5b7584){return _0x5b7584['options']['map'](_0x40ac5b=>{return H(_0x40ac5b)?{'title':String(_0x5b7584['defaultValue']),'model':'default'}:('number'==typeof _0x40ac5b&&(_0x40ac5b=String(_0x40ac5b)),'string'!=typeof _0x40ac5b?_0x40ac5b:parseFloat(_0x40ac5b)?{'title':_0x40ac5b,'model':_0x40ac5b,'view':{'name':'span','styles':{'line-height':_0x40ac5b}}}:'string'==typeof(_0x2685ad=_0x40ac5b)?y[_0x2685ad]:y[_0x2685ad['model']]);var _0x2685ad;})['filter'](_0x4d13fb=>void 0x0!==_0x4d13fb);}var v=class extends _0x1bc491{static get['pluginName'](){return'LineHeightTodoListIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {plugins:_0x10b72f,conversion:_0x247923}=this['editor'];_0x10b72f['has']('ListEditing')&&_0x10b72f['has']('TodoListEditing')&&(_0x10b72f['get']('ListEditing')['registerDowncastStrategy']({'scope':'item','attributeName':'lineHeight','consume':!0x1,'setAttributeOnDowncast'(_0x45503c,_0x438a77,_0x16ba93,_0x4fef3a,_0x1b8c2b){'todo'==_0x1b8c2b['getAttribute']('listType')&&_0x438a77&&(_0x45503c['addClass']('ck-list-marker-line-height',_0x16ba93),_0x45503c['setStyle']('--ck-content-list-marker-line-height',_0x438a77,_0x16ba93));}}),_0x247923['for']('upcast')['elementToElement']({'view':{'name':'span','classes':'todo-list__label__description'},'model':'paragraph','converterPriority':'high'}),_0x247923['for']('upcast')['add'](_0x16dfc9=>{_0x16dfc9['on']('element:li',function(_0x188632){const _0x3e9106=new _0x4a6df8(_0x188632);return(_0x7b3e89,_0x1a6d0a,_0x56b23e)=>{const _0x24c36d=_0x3e9106['match'](_0x1a6d0a['viewItem']);if(!_0x24c36d)return;const _0x21b005=_0x24c36d['match'];_0x21b005['name']=!0x1,_0x56b23e['consumable']['consume'](_0x1a6d0a['viewItem'],_0x21b005);};}({'name':'li','classes':'ck-list-marker-line-height','styles':{'--ck-content-list-marker-line-height':/.*/}}));}));}},b=class extends _0x1bc491{static get['pluginName'](){return'LineHeightEditing';}static get['requires'](){return[v];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31ac40){super(_0x31ac40),_0x31ac40['config']['define']('lineHeight',{'defaultValue':1.5,'supportAllValues':!0x1,'options':[0x1,1.15,'default',0x2,2.5,0x3]});}['init'](){const _0x4fd5d1=this['editor'];this['_validateConfig'](),_0x4fd5d1['model']['schema']['extend']('$block',{'allowAttributes':'lineHeight'}),_0x4fd5d1['model']['schema']['setAttributeProperties']('lineHeight',{'isFormatting':!0x0}),_0x4fd5d1['commands']['add']('lineHeight',new p(_0x4fd5d1)),this['editor']['config']['get']('lineHeight.supportAllValues')?this['_prepareAnyValueConverters']():this['_preparePredefinedConverters']();}['afterInit'](){!async function(_0x63037a){const _0x41bc5d='PHQ3YUIBrl0XdnwG9kez8sfpMv1ytWFRNZOV5jJaq7Tc2ogub64xCKDEALSihm',_0x13a532=0x78df8,_0x4af9ab=window['Date']['now'](),_0x1cd188=_0x63037a['editor'],_0x31234a=new window['Promise'](_0x22a2f4=>{_0x1cd188['once']('ready',_0x22a2f4);}),_0x5208bd={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5c4f44=_0x1cd188['config']['get']('licenseKey');async function _0x3f20a9(){let _0xb61a03,_0x540e38=null,_0x327af3=null;try{return'GPL'==_0x5c4f44?'NotAllowed':(_0xb61a03=_0x40ecaf(),_0xb61a03?(_0xb61a03['usageEndpoint']&&(_0x327af3=_0x100137(_0xb61a03['usageEndpoint'],_0xb61a03['jti'])),await _0x171c32()?_0x8a2fef()?_0x340647()?'Expired':_0x5390af()?('evaluation'==_0xb61a03['licenseType']&&(_0x540e38=_0x19ecda('EvaluationLimit')),await _0x5dc2c4()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x340647(){const _0xb5eb58=['evaluation','trial']['includes'](_0xb61a03['licenseType'])?_0x4af9ab/0x3e8:0xe10*_0x13a532;return _0xb61a03['exp']<_0xb5eb58;}function _0x8a2fef(){const _0x3f44ad=_0xb61a03['features'];return!!_0x3f44ad&&(!!_0x3f44ad['includes']('*')||!!_0x3f44ad['includes']('LH'));}function _0x5390af(){const _0x258041=_0xb61a03['licensedHosts'];if(!_0x258041||0x0==_0x258041['length'])return!0x0;const {hostname:_0x18f9d8}=new URL(window['location']['href']);if(_0x258041['includes'](_0x18f9d8))return!0x0;const _0x434d41=_0x18f9d8['split']('.');return _0x258041['filter'](_0x53d834=>_0x53d834['includes']('*'))['map'](_0x3ff245=>_0x3ff245['split']('.'))['filter'](_0x1f2f8c=>_0x1f2f8c['length']<=_0x434d41['length'])['map'](_0x3c503a=>Array(_0x434d41['length']-_0x3c503a['length'])['fill']('*'===_0x3c503a[0x0]?'*':'')['concat'](_0x3c503a))['some'](_0xee27d3=>_0x434d41['every']((_0x19582e,_0x401432)=>_0xee27d3[_0x401432]===_0x19582e||'*'===_0xee27d3[_0x401432]));}function _0x5dc2c4(){return _0x540e38&&_0x327af3?new window['Promise']((_0x869cd,_0x345b27)=>{_0x540e38['then'](_0x869cd,_0x345b27),_0x327af3['then'](_0x9c1e82=>{'Valid'!=_0x9c1e82&&_0x869cd(_0x9c1e82);},_0x345b27);}):_0x540e38||_0x327af3||'Valid';}}function _0x100137(_0x21157d,_0x5d5c54){return new window['Promise'](_0x498449=>{if(_0x289ba7())return _0x498449('Valid');_0x22e093(),_0x1cd188['decorate']('_sendUsageRequest');let _0x20bbea=!0x1;const _0x18fd80=_0x274a5d();function _0x550773(_0x4816f1){return!!_0x4816f1&&('object'==typeof _0x4816f1||'function'==typeof _0x4816f1)&&'function'==typeof _0x4816f1['then']&&'function'==typeof _0x4816f1['catch'];}function _0xe70caf(_0x41c853){_0x3a60be(_0x41c853)['then'](_0x1dcf06=>_0x1dcf06&&'ok'==_0x1dcf06['status']?_0x3f2c8c(_0x53e725(_0x18fd80+_0x5d5c54))!=_0x1dcf06['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2d019c=>(_0x6af50a(),_0x2d019c),()=>{const _0x4b8999=_0xe74a6e();return null==_0x4b8999?(_0x6af50a(),'Valid'):_0x4af9ab-_0x4b8999>0x240c8400?'UsageLimit':'Valid';})['then'](_0x498449)['catch'](()=>{_0x498449('UsageLimit');});const _0x61119c=0x36ee80;function _0x6af50a(){const _0x41e7c2='llct-'+_0x3f2c8c(_0x53e725(_0x21157d)),_0x16877c=_0x13d20f(_0x3f2c8c(window['Math']['ceil'](_0x4af9ab/_0x61119c)));window['localStorage']['setItem'](_0x41e7c2,_0x16877c);}function _0xe74a6e(){const _0x1118b0='llct-'+_0x3f2c8c(_0x53e725(_0x21157d)),_0x2fb09f=window['localStorage']['getItem'](_0x1118b0);return _0x2fb09f?window['parseInt'](_0x13d20f(_0x2fb09f),0x10)*_0x61119c:null;}function _0x3a60be(_0x243a68){return new window['Promise']((_0x3cd52c,_0x55f141)=>{_0x243a68['then'](_0x3cd52c,_0x55f141),window['setTimeout'](_0x55f141,0x1d4c0);});}}_0x1cd188['on']('_sendUsageRequest',(_0x243324,_0x258ccc)=>{if(_0x258ccc[0x0]!=_0x21157d)return _0x498449('UsageLimit');_0x258ccc[0x1]={..._0x258ccc[0x1],'requestId':_0x18fd80};},{'priority':'high'}),_0x1cd188['on']('_sendUsageRequest',_0x2992d8=>{_0x550773(_0x2992d8['return'])&&(_0x20bbea=!0x0,_0xe70caf(_0x2992d8['return']));},{'priority':'low'}),_0x31234a['then'](()=>{_0x20bbea||_0x498449('UsageLimit');});});function _0x289ba7(){return'auto'==_0x1cd188['editing']['view']['_overlayModeHint'];}function _0x22e093(){_0x1cd188['editing']['view']['_overlayModeHint']='auto';}}function _0x19ecda(_0xfd102c){const _0x4d554e=[new window['Promise'](_0x1dbd4b=>setTimeout(_0x1dbd4b,0x93ecc)),_0x31234a['then'](()=>new window['Promise'](_0x117ee2=>{let _0x174bef=0x0;_0x1cd188['model']['on']('applyOperation',(_0x415f86,_0x286462)=>{_0x286462[0x0]['isDocumentOperation']&&_0x174bef++,0x5e8==_0x174bef&&(_0x117ee2(),_0x415f86['off']());});}))];return window['Promise']['race'](_0x4d554e)['then'](()=>_0xfd102c);}async function _0x4ecd4c(){await _0x31234a,_0x1cd188['model']['change']=_0x4ab18c,_0x1cd188['model']['enqueueChange']=_0x4ab18c,_0x1cd188['enableReadOnlyMode']('model');}function _0x12d251(_0x2c3c68){const _0x14c545=_0x51b6b3();_0x1cd188[_0x14c545]='lineHeightLicenseKey'+_0x2c3c68,'Valid'!=_0x2c3c68&&_0x4ecd4c();}function _0x51b6b3(){const _0x2ed469=window['String'](window['performance']['now']())['replace']('.','');let _0x3cca34='P';for(let _0x3de6f2=0x0;_0x3de6f2<_0x2ed469['length'];_0x3de6f2+=0x2){let _0xed6379=window['parseInt'](_0x2ed469['substring'](_0x3de6f2,_0x3de6f2+0x2));_0xed6379>=0x3e&&(_0xed6379-=0x3e),_0x3cca34+=_0x41bc5d[_0xed6379];}return _0x3cca34;}function _0x40ecaf(){const _0x304836=_0x5c4f44['split']('.');if(0x3!=_0x304836['length'])return null;return _0x174500(_0x304836[0x1]);function _0x174500(_0x2e4589){const _0x41b441=_0x22e3ba(_0x2e4589);return _0x41b441&&_0x4fcbf1()?_0x41b441:null;function _0x4fcbf1(){const _0x20785d=_0x41b441['jti'],_0x205637=window['parseInt'](_0x20785d['substring'](_0x20785d['length']-0x8),0x10),_0x1b1ed2={..._0x41b441,'jti':_0x20785d['substring'](0x0,_0x20785d['length']-0x8)};return delete _0x1b1ed2['vc'],_0x53e725(_0x1b1ed2)==_0x205637;}}}async function _0x171c32(){let _0x3b0233=!0x0;try{const [_0x4efade,_0x19e21a,_0x2cf61f]=_0x5c4f44['split']('.');return _0x305a41(_0x4efade),await _0x380236(_0x4efade,_0x19e21a,_0x2cf61f),_0x3b0233;}catch{return!0x1;}function _0x305a41(_0x389354){const _0x2e2832=_0x22e3ba(_0x389354);_0x2e2832&&'ES256'==_0x2e2832['alg']||(_0x3b0233=!0x1);}async function _0x380236(_0x18e272,_0x5722d4,_0x4796d8){const _0x3bd517=window['Uint8Array']['from'](_0x4fb3cb(_0x4796d8),_0x21ffec=>_0x21ffec['charCodeAt'](0x0)),_0x1e2077=new window['TextEncoder']()['encode'](_0x18e272+'.'+_0x5722d4),_0x4e434c=window['crypto']['subtle'];if(!_0x4e434c)return;const _0x3351f6=await _0x4e434c['importKey']('jwk',_0x5208bd,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4e434c['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3351f6,_0x3bd517,_0x1e2077)||(_0x3b0233=!0x1);}}function _0x22e3ba(_0xcf80b1){return _0xcf80b1['startsWith']('ey')?JSON['parse'](_0x4fb3cb(_0xcf80b1)):null;}function _0x4fb3cb(_0x41ea97){return window['atob'](_0x41ea97['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x53e725(_0x4a847e){let _0x3ad365=0x1505;function _0x53d7b4(_0x436fb9){for(let _0x2ecfe3=0x0;_0x2ecfe3<_0x436fb9['length'];_0x2ecfe3++){const _0x22d7f9=_0x436fb9['charCodeAt'](_0x2ecfe3);_0x3ad365=(_0x3ad365<<0x5)+_0x3ad365+_0x22d7f9,_0x3ad365&=_0x3ad365;}}function _0x277a8a(_0x1a36b3){Array['isArray'](_0x1a36b3)?_0x1a36b3['forEach'](_0x277a8a):_0x1a36b3&&'object'==typeof _0x1a36b3?Object['entries'](_0x1a36b3)['sort']()['forEach'](([_0x3d6ecd,_0x40d112])=>{_0x53d7b4(_0x3d6ecd),_0x277a8a(_0x40d112);}):_0x53d7b4(window['String'](_0x1a36b3));}return _0x277a8a(_0x4a847e),_0x3ad365>>>0x0;}function _0x3f2c8c(_0x2ad0cd){return _0x2ad0cd['toString'](0x10)['padStart'](0x8,'0');}function _0x13d20f(_0xc67291){return _0xc67291['split']('')['reverse']()['join']('');}function _0x4ab18c(){}_0x12d251(await _0x3f20a9());}(this);}['_validateConfig'](){const _0x41de6e=this['editor'];if(!_0x41de6e['config']['get']('lineHeight.supportAllValues'))return;const _0x22a09c=_0x41de6e['config']['get']('lineHeight.options')['filter'](_0x54c483=>'string'==typeof _0x54c483&&(!H(_0x54c483)&&isNaN(Number(_0x54c483))));if(_0x22a09c['length'])throw new _0x261883('line-height-invalid-use-of-named-presets',null,{'namedPresets':_0x22a09c});}['_prepareAnyValueConverters'](){const _0x464d27=this['editor'],_0xb9d1be=this['editor']['config']['get']('lineHeight.defaultValue');_0x464d27['conversion']['for']('downcast')['attributeToAttribute']({'model':{'key':'lineHeight'},'view':_0x4dea24=>String(_0x4dea24)===String(_0xb9d1be)?null:{'key':'style','value':{'line-height':_0x4dea24}}}),_0x464d27['conversion']['for']('upcast')['attributeToAttribute']({'model':{'key':'lineHeight','value':_0x341b9e=>{let _0x40cb7e=_0x341b9e['getStyle']('line-height');return _0x5ca071(_0x40cb7e)&&(_0x40cb7e=String(Number(_0x40cb7e['slice'](0x0,-0x1))/0x64)),String(_0x40cb7e)===String(_0xb9d1be)?null:_0x40cb7e;}},'view':{'styles':{'line-height':/.*/}}});}['_preparePredefinedConverters'](){const _0x1d00f0=this['editor'],_0x263829=this['editor']['config']['get']('lineHeight.defaultValue'),_0x3db58e=function(_0x428d31,_0x486af3){const _0x2d4a1a={'model':{'key':_0x428d31,'values':[]},'view':{}};for(const _0x3459c4 of _0x486af3)'class'===_0x3459c4['view']?.['key']?(_0x2d4a1a['model']['values']['push'](_0x3459c4['model']),_0x2d4a1a['view'][_0x3459c4['model']]={'key':'class','value':_0x3459c4['view']['value']}):(_0x2d4a1a['model']['values']['push'](_0x3459c4['model']),_0x2d4a1a['view'][_0x3459c4['model']]={'key':'style','value':'line-height:'+_0x3459c4['model']+';'});return _0x2d4a1a;}('lineHeight',L(this['editor']['config']['get']('lineHeight'))['filter'](_0x210979=>_0x210979['model']));_0x1d00f0['conversion']['attributeToAttribute'](_0x3db58e),_0x1d00f0['conversion']['for']('upcast')['attributeToAttribute']({'view':{'styles':{'line-height':/[\s\S]+/}},'model':{'key':'lineHeight','value':_0x438cfb=>{let _0x5c1c24=_0x438cfb['getStyle']('line-height');return _0x5ca071(_0x5c1c24)&&(_0x5c1c24=String(Number(_0x5c1c24['slice'](0x0,-0x1))/0x64)),_0x5c1c24===String(_0x263829)?null:_0x3db58e['model']['values']['includes'](_0x5c1c24)?_0x5c1c24:null;}}});}},k=class extends _0x1bc491{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'LineHeightUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x1e8470={'accessibleLabel':(0x0,this['editor']['t'])('Line\x20height'),'options':this['_prepareListOptions']()};this['_registerToolbarComponent'](_0x1e8470),this['_registerMenuBarComponent'](_0x1e8470),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2fa07f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4a6f39;for(const _0x134b5e in _0x2fa07f){const _0xea23c6=_0x134b5e,_0x5885dd=_0x2fa07f[_0xea23c6];if('lineHeightLicenseKeyValid'==_0x5885dd||'lineHeightLicenseKeyInvalid'==_0x5885dd||'lineHeightLicenseKeyExpired'==_0x5885dd||'lineHeightLicenseKeyDomainLimit'==_0x5885dd||'lineHeightLicenseKeyNotAllowed'==_0x5885dd||'lineHeightLicenseKeyEvaluationLimit'==_0x5885dd||'lineHeightLicenseKeyUsageLimit'==_0x5885dd){delete _0x2fa07f[_0xea23c6],_0x4a6f39=_0x5885dd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'lineHeightLicenseKeyInvalid'==_0x4a6f39&&_0x2fa07f['_showLicenseError']('invalid'),'lineHeightLicenseKeyExpired'==_0x4a6f39&&_0x2fa07f['_showLicenseError']('expired'),'lineHeightLicenseKeyDomainLimit'==_0x4a6f39&&_0x2fa07f['_showLicenseError']('domainLimit'),'lineHeightLicenseKeyNotAllowed'==_0x4a6f39&&_0x2fa07f['_showLicenseError']('featureNotAllowed','LineHeight'),'lineHeightLicenseKeyEvaluationLimit'==_0x4a6f39&&_0x2fa07f['_showLicenseError']('evaluationLimit'),'lineHeightLicenseKeyUsageLimit'==_0x4a6f39&&_0x2fa07f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_shouldRenderCustomValueOption'](){return this['editor']['config']['get']('lineHeight.supportAllValues');}['_getLocalizedLineHeightOptions'](){const _0xb29031=this['editor'],t=_0xb29031['t'],_0x1adb54=_0xb29031['config']['get']('lineHeight'),_0x778d14={'Single':t({'string':'Single','id':'LINE_HEIGHT_SINGLE_OPTION_LABEL'}),'Double':t({'string':'Double','id':'LINE_HEIGHT_DOUBLE_OPTION_LABEL'})};return L(_0x1adb54)['map'](_0x1be543=>{const _0x38a75a=_0x778d14[_0x1be543['title']];return _0x38a75a&&_0x38a75a!=_0x1be543['title']&&(_0x1be543=Object['assign']({},_0x1be543,{'title':_0x38a75a})),_0x1be543;});}['_prepareListOptions'](){const _0x34c373=this['editor']['commands']['get']('lineHeight'),_0x5b4607=this['editor']['config']['get']('lineHeight.defaultValue'),_0x2fc82b=this['_getLocalizedLineHeightOptions'](),_0x4d93d6=new _0x35ee3c(),_0x16b3d8=_0x15e57d=>'default'===_0x15e57d||String(_0x5b4607)===_0x15e57d;for(const _0x4bf444 of _0x2fc82b){const _0x412901={'type':'button','model':new _0x5634d5({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','label':_0x4bf444['title'],'withText':!0x0})};_0x16b3d8(_0x4bf444['model'])?(_0x412901['model']['bind']('isOn')['to'](_0x34c373,'value',_0x13f397=>!_0x13f397),_0x412901['model']['commandParam']=void 0x0):(_0x412901['model']['bind']('isOn')['to'](_0x34c373,'value',_0x14a222=>_0x14a222===_0x4bf444['model']),_0x412901['model']['commandParam']=_0x4bf444['model']),_0x4d93d6['add'](_0x412901);}if(this['_shouldRenderCustomValueOption']()){const _0xa01e65=this['_getCustomValueOptionDefinition'](_0x2fc82b);_0x4d93d6['add'](_0xa01e65);}return _0x4d93d6;}['_getCustomValueOptionDefinition'](_0xbef9bf){const _0x17ea0c=this['editor'],t=_0x17ea0c['t'],_0x48c9a8=_0x17ea0c['commands']['get']('lineHeight'),_0x3ce245=_0xbef9bf['map'](_0x2630b1=>_0x2630b1['model']),_0x62b9e7={'type':'button','model':new _0x5634d5({'commandName':'lineHeight','class':'ck-line-height-option','role':'menuitemradio','withText':!0x0})};return _0x62b9e7['model']['bind']('commandParam')['to'](_0x48c9a8,'value'),_0x62b9e7['model']['bind']('isOn')['to'](_0x48c9a8,'value',_0x323b4e=>!!_0x323b4e&&!_0x3ce245['includes'](String(_0x323b4e))),_0x62b9e7['model']['bind']('label')['to'](_0x48c9a8,'value',_0x556c35=>t({'string':'Custom:\x20%0','id':'LINE_HEIGHT_CUSTOM_OPTION_LABEL'},String(_0x556c35))),_0x62b9e7;}['_registerToolbarComponent']({accessibleLabel:_0x504d72,options:_0x9fa9e5}){const _0x4a95d9=this['editor'],_0x2bcd96=_0x4a95d9['commands']['get']('lineHeight');_0x4a95d9['ui']['componentFactory']['add']('lineHeight',_0x287bc6=>{const _0x4e2715=_0x32a4da(_0x287bc6);return _0x339a28(_0x4e2715,_0x9fa9e5,{'role':'menu','ariaLabel':_0x504d72}),_0x4e2715['buttonView']['set']({'label':_0x504d72,'tooltip':!0x0,'icon':_0x5cc209}),_0x4e2715['extendTemplate']({'attributes':{'class':['ck-line-height-dropdown']}}),_0x4e2715['bind']('isEnabled')['to'](_0x2bcd96),this['listenTo'](_0x4e2715,'execute',_0x366ad5=>{_0x4a95d9['execute'](_0x366ad5['source']['commandName'],{'value':_0x366ad5['source']['commandParam']}),_0x4a95d9['editing']['view']['focus']();}),_0x4e2715['once']('change:isOpen',()=>{const _0x229c68=_0x4e2715['panelView']['children']['first'];this['_attachCustomOptionVisibilityHandler'](_0x4e2715,_0x9fa9e5,_0x229c68);}),_0x4e2715;});}['_registerMenuBarComponent']({accessibleLabel:_0x4bb258,options:_0x4d7084}){const _0x359ea2=this['editor'],_0x5757ed=_0x359ea2['commands']['get']('lineHeight');_0x359ea2['ui']['componentFactory']['add']('menuBar:lineHeight',_0x5873ad=>{const _0x1bafd7=new _0x511c6a(_0x5873ad);_0x1bafd7['buttonView']['set']({'label':_0x4bb258,'icon':_0x5cc209}),_0x1bafd7['bind']('isEnabled')['to'](_0x5757ed);const _0x35618a=new _0x2edd5a(_0x5873ad);for(const _0x325d8f of _0x4d7084){const _0x3dc0f6=new _0x392ced(_0x5873ad,_0x1bafd7),_0x1f4556=new _0xe08c28(_0x5873ad);_0x1f4556['set']({'role':'menuitemradio','isToggleable':!0x0}),_0x1f4556['bind'](...Object['keys'](_0x325d8f['model']))['to'](_0x325d8f['model']),_0x1f4556['delegate']('execute')['to'](_0x1bafd7),_0x1f4556['on']('execute',()=>{_0x359ea2['execute'](_0x325d8f['model']['commandName'],{'value':_0x325d8f['model']['commandParam']}),_0x359ea2['editing']['view']['focus']();}),_0x3dc0f6['children']['add'](_0x1f4556),_0x35618a['items']['add'](_0x3dc0f6);}return _0x1bafd7['panelView']['children']['add'](_0x35618a),this['_attachCustomOptionVisibilityHandler'](_0x1bafd7,_0x4d7084,_0x35618a),_0x1bafd7;});}['_attachCustomOptionVisibilityHandler'](_0x39b659,_0x4214e2,_0x560fd7){if(!this['_shouldRenderCustomValueOption']())return;const _0xd4e1b0=()=>{if(!_0x39b659['isOpen'])return;_0x560fd7['items']['last']['isVisible']=Boolean(_0x4214e2['last']['model']['isOn']);};_0xd4e1b0(),_0x39b659['on']('change:isOpen',()=>{_0xd4e1b0();});}},_=class extends _0x1bc491{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.3.0-alpha.0",
3
+ "version": "48.3.0-alpha.1",
4
4
  "description": "Line height feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (https://cksource.com/)",
@@ -25,12 +25,12 @@
25
25
  "dist/translations/*.umd.js"
26
26
  ],
27
27
  "dependencies": {
28
- "@ckeditor/ckeditor5-core": "48.3.0-alpha.0",
29
- "@ckeditor/ckeditor5-engine": "48.3.0-alpha.0",
30
- "@ckeditor/ckeditor5-icons": "48.3.0-alpha.0",
31
- "@ckeditor/ckeditor5-list": "48.3.0-alpha.0",
32
- "@ckeditor/ckeditor5-ui": "48.3.0-alpha.0",
33
- "@ckeditor/ckeditor5-utils": "48.3.0-alpha.0"
28
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
29
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.1",
30
+ "@ckeditor/ckeditor5-icons": "48.3.0-alpha.1",
31
+ "@ckeditor/ckeditor5-list": "48.3.0-alpha.1",
32
+ "@ckeditor/ckeditor5-ui": "48.3.0-alpha.1",
33
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.1"
34
34
  },
35
35
  "files": [
36
36
  "dist",