@ckeditor/ckeditor5-export-inline-styles 48.4.0-alpha.5 → 48.4.0-alpha.6
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 +4 -4
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x342929,Plugin as _0x1ba53a}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x2bfdf6,createElement as _0x14ce08,uid as _0x227673}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x373681,addMarginStylesRules as _0xa5e01a,addPaddingStylesRules as _0x39b8d8}from'@ckeditor/ckeditor5-engine';import{calculate as _0x380cda,compare as _0x2a3da9}from'specificity';function f(_0x2985c5){const _0x201585=[];let _0x55c10c='',_0x580b5b=0x0;for(;_0x580b5b<_0x2985c5['length'];){const _0x244354=_0x2985c5[_0x580b5b];if('('===_0x244354){const _0x326da9=y(_0x2985c5,_0x580b5b+0x1);if(-0x1===_0x326da9)return[];_0x55c10c+=_0x2985c5['slice'](_0x580b5b,_0x326da9+0x1),_0x580b5b=_0x326da9+0x1;}else','!==_0x244354||_0x55c10c['endsWith']('\x5c')?(_0x55c10c+=_0x244354,_0x580b5b++):(_0x201585['push'](_0x55c10c['trim']()),_0x55c10c='',_0x580b5b++);}return _0x55c10c['trim']()&&_0x201585['push'](_0x55c10c['trim']()),_0x201585['filter'](Boolean);}function y(_0x5da5ee,_0x2432f9){let _0x4fd842=0x1;for(let _0x2c813c=_0x2432f9;_0x2c813c<_0x5da5ee['length'];_0x2c813c++){const _0x2bc987=_0x5da5ee[_0x2c813c];if('('===_0x2bc987)_0x4fd842++;else{if(')'===_0x2bc987&&(_0x4fd842--,0x0===_0x4fd842))return _0x2c813c;}}return-0x1;}function d(_0x204940){return _0x204940['replace'](/!\s*important/i,'')['trim']();}function w(_0x51553f){const _0x3d7e37=new Map();for(const {stylesMap:_0x885867,flatSelector:_0x5b5f78}of _0x51553f){if(':root'!==_0x5b5f78)continue;const _0x419e6f=p(_0x3d7e37['get']['bind'](_0x3d7e37),_0x885867);for(const [_0x11e160,_0x3bc968]of _0x419e6f)_0x3d7e37['set'](_0x11e160,_0x3bc968);}return _0x3d7e37;}function p(_0x234408,_0x3c3a39){const _0x3e3573=new Map(),_0x3eca9e=_0x2268e7=>_0x3e3573['has'](_0x2268e7)?_0x3e3573['get'](_0x2268e7):_0x234408(_0x2268e7);for(const [_0x2b3d77,_0x44b7fe]of _0x3c3a39['getStylesEntries']())if(_0x44b7fe&&_0x2b3d77['startsWith']('--')){const _0x49c422=m(_0x3eca9e,_0x44b7fe);_0x3e3573['set'](_0x2b3d77,_0x49c422),_0x3c3a39['remove'](_0x2b3d77);}for(const [_0x55d7d0,_0x2020a8]of _0x3c3a39['getStylesEntries']())if(_0x2020a8){const _0x14494c=m(_0x3eca9e,_0x2020a8);_0x3c3a39['set'](_0x55d7d0,_0x14494c);}return _0x3e3573;}function m(_0x13cd1c,_0x44d4a4){return function(_0x8b69b5,_0x1bcd0d){let _0x3900b0='',_0x3a3352=0x0;for(;_0x3a3352<_0x8b69b5['length'];){const _0x50832a=_0x8b69b5['indexOf']('var(',_0x3a3352);if(-0x1===_0x50832a){_0x3900b0+=_0x8b69b5['slice'](_0x3a3352);break;}_0x3900b0+=_0x8b69b5['slice'](_0x3a3352,_0x50832a);const _0x593aeb=_0x50832a+0x4,_0x1d2385=y(_0x8b69b5,_0x593aeb);_0x3900b0+=_0x1bcd0d(_0x8b69b5['substring'](_0x593aeb,_0x1d2385)),_0x3a3352=_0x1d2385+0x1;}return _0x3900b0;}(_0x44d4a4,_0x1e111d=>{const [_0x1281b,_0x407b07]=f(_0x1e111d),_0x3e2dd9=_0x13cd1c(_0x1281b);return void 0x0!==_0x3e2dd9?_0x3e2dd9:_0x407b07?m(_0x13cd1c,_0x407b07):'var('+_0x1281b+')';});}async function h(_0x3afa61){const _0x57593b=[await _0x2bfdf6(_0x3afa61['stylesheets']),_0x3afa61['inlineCss']]['filter'](_0x4e590c=>_0x4e590c&&_0x4e590c['length'])['join']('\x0a'),_0x46708c=await async function(_0x336d0d,_0x4932f1){const _0x280c3c=new CSSStyleSheet();return await _0x280c3c['replace'](_0x4932f1),S(Array['from'](_0x280c3c['cssRules'])['filter'](_0x34f6b2=>_0x34f6b2 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x1cdbf0,contentCssText:_0x40b080})=>{const _0x55ba38=f(_0x1cdbf0),_0x4cc6bf=new _0x373681(_0x336d0d)['setTo'](_0x40b080);return _0x55ba38['map'](_0x22d458=>{const _0x162fde=function(_0x2a0ccc){const _0x375147=':where(';let _0xf934a8=_0x2a0ccc,_0x1957b5=0x0;for(let _0x187c80=0x0;_0x187c80<0x64;_0x187c80++){const _0x39f696=_0xf934a8['indexOf'](_0x375147,_0x1957b5);if(-0x1===_0x39f696)break;let _0x2afc9c=0x0;for(let _0x2b87fa=0x0;_0x2b87fa<_0x39f696;_0x2b87fa++)'('===_0xf934a8[_0x2b87fa]?_0x2afc9c++:')'===_0xf934a8[_0x2b87fa]&&_0x2afc9c--;if(_0x2afc9c>0x0){_0x1957b5=_0x39f696+0x7;continue;}let _0x45dee0=-0x1;for(let _0x1aaa57=_0x39f696+0x7,_0x3c4ad4=0x1;_0x1aaa57<_0xf934a8['length'];_0x1aaa57++)if('('===_0xf934a8[_0x1aaa57]?_0x3c4ad4++:')'===_0xf934a8[_0x1aaa57]&&_0x3c4ad4--,!_0x3c4ad4){_0x45dee0=_0x1aaa57;break;}-0x1!==_0x45dee0?(_0xf934a8=_0xf934a8['slice'](0x0,_0x39f696)+_0xf934a8['slice'](_0x45dee0+0x1),_0x1957b5=_0x39f696):_0x1957b5=_0x39f696+0x7;}return _0xf934a8['replace'](/\s+/g,'\x20')['trim']();}(_0x22d458),_0x3f2076=_0x162fde?_0x380cda(_0x162fde)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x4cc6bf,'flatSelector':_0x22d458,'specificity':_0x3f2076};});})['sort']((_0x22b7db,_0x290861)=>_0x2a3da9(_0x22b7db['specificity'],_0x290861['specificity']));}(_0x3afa61['stylesProcessor'],_0x57593b);return{'parsedCssRules':_0x46708c,'rootCssVariables':w(_0x46708c)};}function S(_0x22f0c6,_0x966bfe=''){return _0x22f0c6['flatMap'](_0x8ee832=>{const {selectorText:_0x3cfb74,cssText:_0x83d9c1,cssRules:_0x321a8b}=_0x8ee832;if(!_0x3cfb74)return[];const _0x3ff20e=_0x3cfb74['replace'](/&/g,_0x966bfe);let _0x3a78b4=_0x83d9c1['replace'](_0x3cfb74,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x321a8b||!_0x321a8b['length'])return[{'selectorText':_0x3ff20e,'contentCssText':_0x3a78b4}];for(const _0x15acd6 of _0x321a8b)_0x3a78b4=_0x3a78b4['replace'](_0x15acd6['cssText'],'')['trim']();return[{'selectorText':_0x3ff20e,'contentCssText':_0x3a78b4},...S(Array['from'](_0x321a8b),_0x3ff20e)];});}function L(_0x2797ba,_0x104cf6){const _0x56b441=new _0x373681(_0x2797ba);for(const _0x302ed6 of _0x104cf6){let _0x1577a9;if(_0x1577a9='string'==typeof _0x302ed6?new _0x373681(_0x2797ba)['setTo'](_0x302ed6):_0x302ed6,_0x1577a9){for(const [_0x30d0c9,_0x273291]of _0x1577a9['getStylesEntries']())_0x56b441['set'](_0x30d0c9,_0x273291);}}return _0x56b441;}var g=class extends _0x342929{_stylesProcessor;constructor(_0x44a422){super(_0x44a422),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0xa5e01a(this['_stylesProcessor']),_0x39b8d8(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x5d60c7){const _0xf67110=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x5d6965}=this['editor']['locale'],{rootName:_0x20e41f='main',dataControllerDowncastOptions:_0x2dfad1={},transformations:_0xbc6a64=_0xf67110['transformations']||[]}=_0x5d60c7||{};this['isBusy']=!0x0,this['refresh']();const _0x472843=this['_getRootDataHTMLFragment'](_0x20e41f,_0x2dfad1),_0x48e173=_0x14ce08(_0x472843['ownerDocument'],'div',{'dir':_0x5d6965,'class':'ck-content'},[_0x472843]);return this['_collectAndApplyStyles'](_0xbc6a64,_0x48e173)['then'](()=>{const _0x53a3be=function(_0x27e98f){const _0x44f8a7=_0x27e98f['ownerDocument']['createDocumentFragment']();for(;_0x27e98f['firstChild'];)_0x44f8a7['appendChild'](_0x27e98f['firstChild']);return _0x44f8a7;}(_0x48e173),_0x18b00b=_0x48e173['getAttribute']('style');if(_0x18b00b)for(const _0x1fa6d0 of _0x53a3be['children']){const _0x4d7dbb=_0x1fa6d0['getAttribute']('style'),_0x32e51e=L(this['_stylesProcessor'],[_0x18b00b,_0x4d7dbb]);_0x1fa6d0['setAttribute']('style',x(_0x32e51e));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x53a3be);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x518b8d,_0x138acc){const {data:_0x1cf6ee,model:_0x544952}=this['editor'],_0x23b78d=_0x544952['document']['getRoot'](_0x518b8d),_0x1f5fc5=_0x1cf6ee['toView'](_0x23b78d,_0x138acc);return _0x1cf6ee['htmlProcessor']['domConverter']['viewToDom'](_0x1f5fc5);}async _collectAndApplyStyles(_0x43805b,_0x10b266){const {stylesheets:_0x637356,inlineCss:_0x3b9857,stripCssClasses:_0x2b4a41}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x32911a,rootCssVariables:_0x25d0a2}=await h({'stylesheets':_0x637356||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x3b9857}),_0x6ab82f=[];this['_processElementTree']({'transformations':_0x43805b,'parsedCssRules':_0x32911a,'element':_0x10b266,'stripCssClasses':_0x2b4a41,'parentCSSVariablesLookup':_0x25d0a2['get']['bind'](_0x25d0a2),'runAfterDocumentTransformation':_0x2b5f01=>{_0x6ab82f['unshift'](_0x2b5f01);}});for(const _0xf5741a of _0x6ab82f)_0xf5741a();}_processElementTree({element:_0x21e0d5,parsedCssRules:_0x5b2e65,parentCSSVariablesLookup:_0x18a1aa,runAfterDocumentTransformation:_0x347a59,stripCssClasses:_0x3eba98,transformations:_0x2289a8}){const {stylesMap:_0x389717,localCSSVariables:_0x21bba8}=function(_0x56d383){const _0x2afebf=_0x56d383['element']['getAttribute']('style')||'',_0xcffbfa=_0x56d383['parsedCssRules']['filter'](_0x56dcd8=>_0x56d383['element']['matches'](_0x56dcd8['flatSelector']))['map'](_0x127b8a=>_0x127b8a['stylesMap']),_0x4c4c99=L(_0x56d383['stylesProcessor'],[..._0xcffbfa,_0x2afebf]);return{'localCSSVariables':p(_0x56d383['fallbackCSSVariablesLookup'],_0x4c4c99),'stylesMap':_0x4c4c99};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x18a1aa,'parsedCssRules':_0x5b2e65,'element':_0x21e0d5}),_0x53da28=[];for(const _0x5b4a66 of _0x2289a8){const _0x12b632=_0x5b4a66(_0x21e0d5,_0x389717,{'runAfterDocumentTransformation':_0x347a59,'runAfterChildrenTransformation':_0x501f58=>{_0x53da28['unshift'](_0x501f58);}});_0x12b632&&_0x12b632 instanceof HTMLElement&&(_0x21e0d5=_0x12b632);}_0x389717['size']?_0x21e0d5['setAttribute']('style',x(_0x389717)):_0x21e0d5['removeAttribute']('style');const _0x5587f8=_0x34d887=>_0x21bba8['has'](_0x34d887)?_0x21bba8['get'](_0x34d887):_0x18a1aa(_0x34d887);for(const _0x3b83a6 of _0x21e0d5['children'])_0x3b83a6 instanceof HTMLElement&&this['_processElementTree']({'element':_0x3b83a6,'parsedCssRules':_0x5b2e65,'stripCssClasses':_0x3eba98,'transformations':_0x2289a8,'parentCSSVariablesLookup':_0x5587f8,'runAfterDocumentTransformation':_0x347a59});_0x3eba98&&_0x21e0d5['removeAttribute']('class');for(const _0x470224 of _0x53da28)_0x470224();}};function x(_0x4a55d6){return _0x4a55d6['getStylesEntries']()['map'](_0x106fcd=>_0x106fcd['join'](':'))['join'](';')+';';}var C=class extends _0x1ba53a{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}afterInit(){!async function(_0x1c2ff4){const _0x5f4a08='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x38b684=0x791a0,_0x52ebb1=window['Date']['now'](),_0x5c6e8d=_0x1c2ff4['editor'],_0x39c4eb=new window['Promise'](_0x2712e5=>{_0x5c6e8d['once']('ready',_0x2712e5);}),_0x36fa2c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x51a5e0=_0x5c6e8d['config']['get']('licenseKey');async function _0x2d71cf(){let _0x5f8f81,_0x3cd3c1=null,_0x485b03=null;try{return'GPL'==_0x51a5e0?'NotAllowed':(_0x5f8f81=_0x1bb69c(),_0x5f8f81?(_0x5f8f81['usageEndpoint']&&(_0x485b03=_0x131787(_0x5f8f81['usageEndpoint'],_0x5f8f81['jti'])),await _0x38a7fa()?_0x5a7e4f()?_0x159f22()?'Expired':_0x2aec6c()?('evaluation'==_0x5f8f81['licenseType']&&(_0x3cd3c1=_0x4a31e4('EvaluationLimit')),await _0x2644c1()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x159f22(){const _0x589b5a=['evaluation','trial']['includes'](_0x5f8f81['licenseType'])?_0x52ebb1/0x3e8:0xe10*_0x38b684;return _0x5f8f81['exp']<_0x589b5a;}function _0x5a7e4f(){const _0x3345e5=_0x5f8f81['features'];return!!_0x3345e5&&(!!_0x3345e5['includes']('*')||!!_0x3345e5['includes']('EIS'));}function _0x2aec6c(){const _0x243c81=_0x5f8f81['licensedHosts'];if(!_0x243c81||0x0==_0x243c81['length'])return!0x0;const {hostname:_0x4bbd2c}=new URL(window['location']['href']);if(_0x243c81['includes'](_0x4bbd2c))return!0x0;const _0xce3531=_0x4bbd2c['split']('.');return _0x243c81['filter'](_0x5364ff=>_0x5364ff['includes']('*'))['map'](_0x23013f=>_0x23013f['split']('.'))['filter'](_0x21c017=>_0x21c017['length']<=_0xce3531['length'])['map'](_0x74a233=>Array(_0xce3531['length']-_0x74a233['length'])['fill']('*'===_0x74a233[0x0]?'*':'')['concat'](_0x74a233))['some'](_0x3b6452=>_0xce3531['every']((_0x2bee07,_0x561e1b)=>_0x3b6452[_0x561e1b]===_0x2bee07||'*'===_0x3b6452[_0x561e1b]));}function _0x2644c1(){return _0x3cd3c1&&_0x485b03?new window['Promise']((_0x4d52c3,_0x17a81f)=>{_0x3cd3c1['then'](_0x4d52c3,_0x17a81f),_0x485b03['then'](_0xe51d45=>{'Valid'!=_0xe51d45&&_0x4d52c3(_0xe51d45);},_0x17a81f);}):_0x3cd3c1||_0x485b03||'Valid';}}function _0x131787(_0x3b2448,_0x1dc9c0){return new window['Promise'](_0x21e71f=>{if(_0x5981b6())return _0x21e71f('Valid');_0x2d350c(),_0x5c6e8d['decorate']('_sendUsageRequest');let _0x3db5e6=!0x1;const _0x32d5a7=_0x227673();function _0x26dd1c(_0x326af1){return!!_0x326af1&&('object'==typeof _0x326af1||'function'==typeof _0x326af1)&&'function'==typeof _0x326af1['then']&&'function'==typeof _0x326af1['catch'];}function _0x476104(_0xaa52f8){_0xde8f8a(_0xaa52f8)['then'](_0x31e77d=>_0x31e77d&&'ok'==_0x31e77d['status']?_0x404852(_0x4b0da5(_0x32d5a7+_0x1dc9c0))!=_0x31e77d['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1e9c20=>(_0x533b6a(),_0x1e9c20),()=>{const _0x552767=_0x34e098();return null==_0x552767?(_0x533b6a(),'Valid'):_0x52ebb1-_0x552767>0x240c8400?'UsageLimit':'Valid';})['then'](_0x21e71f)['catch'](()=>{_0x21e71f('UsageLimit');});const _0x9a36e8=0x36ee80;function _0x533b6a(){const _0x435834='llct-'+_0x404852(_0x4b0da5(_0x3b2448)),_0x554648=_0xa78888(_0x404852(window['Math']['ceil'](_0x52ebb1/_0x9a36e8)));window['localStorage']['setItem'](_0x435834,_0x554648);}function _0x34e098(){const _0x50567b='llct-'+_0x404852(_0x4b0da5(_0x3b2448)),_0x5a1760=window['localStorage']['getItem'](_0x50567b);return _0x5a1760?window['parseInt'](_0xa78888(_0x5a1760),0x10)*_0x9a36e8:null;}function _0xde8f8a(_0x16c10d){return new window['Promise']((_0x5b0136,_0x536a69)=>{_0x16c10d['then'](_0x5b0136,_0x536a69),window['setTimeout'](_0x536a69,0x1d4c0);});}}_0x5c6e8d['on']('_sendUsageRequest',(_0x155b8e,_0x5f504a)=>{if(_0x5f504a[0x0]!=_0x3b2448)return _0x21e71f('UsageLimit');_0x5f504a[0x1]={..._0x5f504a[0x1],'requestId':_0x32d5a7};},{'priority':'high'}),_0x5c6e8d['on']('_sendUsageRequest',_0x12accc=>{_0x26dd1c(_0x12accc['return'])&&(_0x3db5e6=!0x0,_0x476104(_0x12accc['return']));},{'priority':'low'}),_0x39c4eb['then'](()=>{_0x3db5e6||_0x21e71f('UsageLimit');});});function _0x5981b6(){return'auto'==_0x5c6e8d['editing']['view']['_overlayModeHint'];}function _0x2d350c(){_0x5c6e8d['editing']['view']['_overlayModeHint']='auto';}}function _0x4a31e4(_0x4ac272){const _0x160ed9=[new window['Promise'](_0xbc31e1=>setTimeout(_0xbc31e1,0x93ecc)),_0x39c4eb['then'](()=>new window['Promise'](_0x20ac3a=>{let _0x562cb1=0x0;_0x5c6e8d['model']['on']('applyOperation',(_0x7ee9a,_0x575e24)=>{_0x575e24[0x0]['isDocumentOperation']&&_0x562cb1++,0x5e8==_0x562cb1&&(_0x20ac3a(),_0x7ee9a['off']());});}))];return window['Promise']['race'](_0x160ed9)['then'](()=>_0x4ac272);}async function _0x3ae9b3(){await _0x39c4eb;const _0x54aea2=_0x5c6e8d['commands']['get']('exportInlineStyles');_0x54aea2&&_0x54aea2['on']('execute',_0x21358d=>{_0x21358d['stop']();},{'priority':'highest'}),_0x5c6e8d['model']['change']=_0x51d7d6,_0x5c6e8d['model']['enqueueChange']=_0x51d7d6,_0x5c6e8d['enableReadOnlyMode']('model');}function _0x2d248e(_0x33df16){const _0x3d07de=_0x4b0081();_0x5c6e8d[_0x3d07de]='exportInlineStylesLicenseKey'+_0x33df16,'Valid'!=_0x33df16&&_0x3ae9b3();}function _0x4b0081(){const _0x3a4d3d=window['String'](window['performance']['now']())['replace']('.','');let _0xb8c071='D';for(let _0x506632=0x0;_0x506632<_0x3a4d3d['length'];_0x506632+=0x2){let _0x1ce190=window['parseInt'](_0x3a4d3d['substring'](_0x506632,_0x506632+0x2));_0x1ce190>=0x3e&&(_0x1ce190-=0x3e),_0xb8c071+=_0x5f4a08[_0x1ce190];}return _0xb8c071;}function _0x1bb69c(){const _0x1d2909=_0x51a5e0['split']('.');if(0x3!=_0x1d2909['length'])return null;return _0x3cf781(_0x1d2909[0x1]);function _0x3cf781(_0x33925d){const _0x1cd664=_0xaea4c2(_0x33925d);return _0x1cd664&&_0x1e4900()?_0x1cd664:null;function _0x1e4900(){const _0x5b4baf=_0x1cd664['jti'],_0x141400=window['parseInt'](_0x5b4baf['substring'](_0x5b4baf['length']-0x8),0x10),_0x4209a0={..._0x1cd664,'jti':_0x5b4baf['substring'](0x0,_0x5b4baf['length']-0x8)};return delete _0x4209a0['vc'],_0x4b0da5(_0x4209a0)==_0x141400;}}}async function _0x38a7fa(){let _0x952179=!0x0;try{const [_0x2a2598,_0x48b596,_0x1ced55]=_0x51a5e0['split']('.');return _0x279c63(_0x2a2598),await _0x34cb87(_0x2a2598,_0x48b596,_0x1ced55),_0x952179;}catch{return!0x1;}function _0x279c63(_0x5f2dc2){const _0x2b93ae=_0xaea4c2(_0x5f2dc2);_0x2b93ae&&'ES256'==_0x2b93ae['alg']||(_0x952179=!0x1);}async function _0x34cb87(_0x477378,_0x2f2f19,_0x1d0b28){const _0x4b8078=window['Uint8Array']['from'](_0x128c00(_0x1d0b28),_0x4eb7a6=>_0x4eb7a6['charCodeAt'](0x0)),_0x37e692=new window['TextEncoder']()['encode'](_0x477378+'.'+_0x2f2f19),_0x35d487=window['crypto']['subtle'];if(!_0x35d487)return;const _0x240c0a=await _0x35d487['importKey']('jwk',_0x36fa2c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x35d487['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x240c0a,_0x4b8078,_0x37e692)||(_0x952179=!0x1);}}function _0xaea4c2(_0x1b029b){return _0x1b029b['startsWith']('ey')?JSON['parse'](_0x128c00(_0x1b029b)):null;}function _0x128c00(_0x3a37e6){return window['atob'](_0x3a37e6['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4b0da5(_0x21314e){let _0x34ae97=0x1505;function _0x58bbb9(_0x50ad48){for(let _0x1b7014=0x0;_0x1b7014<_0x50ad48['length'];_0x1b7014++){const _0x5b59b8=_0x50ad48['charCodeAt'](_0x1b7014);_0x34ae97=(_0x34ae97<<0x5)+_0x34ae97+_0x5b59b8,_0x34ae97&=_0x34ae97;}}function _0x5dbdfc(_0x55c247){Array['isArray'](_0x55c247)?_0x55c247['forEach'](_0x5dbdfc):_0x55c247&&'object'==typeof _0x55c247?Object['entries'](_0x55c247)['sort']()['forEach'](([_0x4c2dbf,_0x63b71b])=>{_0x58bbb9(_0x4c2dbf),_0x5dbdfc(_0x63b71b);}):_0x58bbb9(window['String'](_0x55c247));}return _0x5dbdfc(_0x21314e),_0x34ae97>>>0x0;}function _0x404852(_0x499108){return _0x499108['toString'](0x10)['padStart'](0x8,'0');}function _0xa78888(_0x2d4d02){return _0x2d4d02['split']('')['reverse']()['join']('');}function _0x51d7d6(){}_0x2d248e(await _0x2d71cf());}(this);}},I=class extends _0x1ba53a{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[C];}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x327364=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5bf641;for(const _0x5ac173 in _0x327364){const _0x2aa8cc=_0x5ac173,_0x1f3cd3=_0x327364[_0x2aa8cc];if('exportInlineStylesLicenseKeyValid'==_0x1f3cd3||'exportInlineStylesLicenseKeyInvalid'==_0x1f3cd3||'exportInlineStylesLicenseKeyExpired'==_0x1f3cd3||'exportInlineStylesLicenseKeyDomainLimit'==_0x1f3cd3||'exportInlineStylesLicenseKeyNotAllowed'==_0x1f3cd3||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x1f3cd3||'exportInlineStylesLicenseKeyUsageLimit'==_0x1f3cd3){delete _0x327364[_0x2aa8cc],_0x5bf641=_0x1f3cd3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x5bf641&&_0x327364['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x5bf641&&_0x327364['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x5bf641&&_0x327364['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x5bf641&&_0x327364['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5bf641&&_0x327364['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x5bf641&&_0x327364['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
|
23
|
+
import{Command as _0x521997,Plugin as _0x4d4458}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x2e540d,createElement as _0x39f257,uid as _0x53ea61}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x29e09e,addMarginStylesRules as _0x383e50,addPaddingStylesRules as _0x2ab082}from'@ckeditor/ckeditor5-engine';import{calculate as _0x45050f,compare as _0x35575e}from'specificity';function f(_0x27d67b){const _0x5500db=[];let _0x38dfc0='',_0xaf11be=0x0;for(;_0xaf11be<_0x27d67b['length'];){const _0x2fde7c=_0x27d67b[_0xaf11be];if('('===_0x2fde7c){const _0x32f2b1=y(_0x27d67b,_0xaf11be+0x1);if(-0x1===_0x32f2b1)return[];_0x38dfc0+=_0x27d67b['slice'](_0xaf11be,_0x32f2b1+0x1),_0xaf11be=_0x32f2b1+0x1;}else','!==_0x2fde7c||_0x38dfc0['endsWith']('\x5c')?(_0x38dfc0+=_0x2fde7c,_0xaf11be++):(_0x5500db['push'](_0x38dfc0['trim']()),_0x38dfc0='',_0xaf11be++);}return _0x38dfc0['trim']()&&_0x5500db['push'](_0x38dfc0['trim']()),_0x5500db['filter'](Boolean);}function y(_0x51fce7,_0x260dfb){let _0x4e42a1=0x1;for(let _0x5272ed=_0x260dfb;_0x5272ed<_0x51fce7['length'];_0x5272ed++){const _0x35099c=_0x51fce7[_0x5272ed];if('('===_0x35099c)_0x4e42a1++;else{if(')'===_0x35099c&&(_0x4e42a1--,0x0===_0x4e42a1))return _0x5272ed;}}return-0x1;}function d(_0x3d6a95){return _0x3d6a95['replace'](/!\s*important/i,'')['trim']();}function w(_0x5f007e){const _0x531d39=new Map();for(const {stylesMap:_0x259f28,flatSelector:_0xff6479}of _0x5f007e){if(':root'!==_0xff6479)continue;const _0x2ddec6=p(_0x531d39['get']['bind'](_0x531d39),_0x259f28);for(const [_0x1fe17a,_0x13ca63]of _0x2ddec6)_0x531d39['set'](_0x1fe17a,_0x13ca63);}return _0x531d39;}function p(_0x420b6e,_0x1607ea){const _0x1d7289=new Map(),_0x251ffe=_0x179072=>_0x1d7289['has'](_0x179072)?_0x1d7289['get'](_0x179072):_0x420b6e(_0x179072);for(const [_0x5f1682,_0x516415]of _0x1607ea['getStylesEntries']())if(_0x516415&&_0x5f1682['startsWith']('--')){const _0x166460=m(_0x251ffe,_0x516415);_0x1d7289['set'](_0x5f1682,_0x166460),_0x1607ea['remove'](_0x5f1682);}for(const [_0x22061d,_0x4abe55]of _0x1607ea['getStylesEntries']())if(_0x4abe55){const _0x4e987f=m(_0x251ffe,_0x4abe55);_0x1607ea['set'](_0x22061d,_0x4e987f);}return _0x1d7289;}function m(_0x2b27d2,_0x5847d5){return function(_0x34e11d,_0x1771bb){let _0x6da1ad='',_0x4d6da3=0x0;for(;_0x4d6da3<_0x34e11d['length'];){const _0x353dc0=_0x34e11d['indexOf']('var(',_0x4d6da3);if(-0x1===_0x353dc0){_0x6da1ad+=_0x34e11d['slice'](_0x4d6da3);break;}_0x6da1ad+=_0x34e11d['slice'](_0x4d6da3,_0x353dc0);const _0x318a43=_0x353dc0+0x4,_0x12c54e=y(_0x34e11d,_0x318a43);_0x6da1ad+=_0x1771bb(_0x34e11d['substring'](_0x318a43,_0x12c54e)),_0x4d6da3=_0x12c54e+0x1;}return _0x6da1ad;}(_0x5847d5,_0x4a7693=>{const [_0x243f12,_0x356053]=f(_0x4a7693),_0x2262ea=_0x2b27d2(_0x243f12);return void 0x0!==_0x2262ea?_0x2262ea:_0x356053?m(_0x2b27d2,_0x356053):'var('+_0x243f12+')';});}async function h(_0x1f237e){const _0x454f8e=[await _0x2e540d(_0x1f237e['stylesheets']),_0x1f237e['inlineCss']]['filter'](_0x5f483c=>_0x5f483c&&_0x5f483c['length'])['join']('\x0a'),_0x1f5a22=await async function(_0x52b188,_0x3bfc37){const _0x114eda=new CSSStyleSheet();return await _0x114eda['replace'](_0x3bfc37),S(Array['from'](_0x114eda['cssRules'])['filter'](_0x460677=>_0x460677 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x35af91,contentCssText:_0x1be12f})=>{const _0x22fb5a=f(_0x35af91),_0x398d88=new _0x29e09e(_0x52b188)['setTo'](_0x1be12f);return _0x22fb5a['map'](_0x30d94c=>{const _0x49d168=function(_0xdc4088){const _0x5537cd=':where(';let _0x338513=_0xdc4088,_0x2b7e32=0x0;for(let _0x506d6a=0x0;_0x506d6a<0x64;_0x506d6a++){const _0x5e45ba=_0x338513['indexOf'](_0x5537cd,_0x2b7e32);if(-0x1===_0x5e45ba)break;let _0x1d7df9=0x0;for(let _0x3313e4=0x0;_0x3313e4<_0x5e45ba;_0x3313e4++)'('===_0x338513[_0x3313e4]?_0x1d7df9++:')'===_0x338513[_0x3313e4]&&_0x1d7df9--;if(_0x1d7df9>0x0){_0x2b7e32=_0x5e45ba+0x7;continue;}let _0x12b5f9=-0x1;for(let _0x31e7ae=_0x5e45ba+0x7,_0x5a945a=0x1;_0x31e7ae<_0x338513['length'];_0x31e7ae++)if('('===_0x338513[_0x31e7ae]?_0x5a945a++:')'===_0x338513[_0x31e7ae]&&_0x5a945a--,!_0x5a945a){_0x12b5f9=_0x31e7ae;break;}-0x1!==_0x12b5f9?(_0x338513=_0x338513['slice'](0x0,_0x5e45ba)+_0x338513['slice'](_0x12b5f9+0x1),_0x2b7e32=_0x5e45ba):_0x2b7e32=_0x5e45ba+0x7;}return _0x338513['replace'](/\s+/g,'\x20')['trim']();}(_0x30d94c),_0x2eeeca=_0x49d168?_0x45050f(_0x49d168)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x398d88,'flatSelector':_0x30d94c,'specificity':_0x2eeeca};});})['sort']((_0x46308a,_0x29bb68)=>_0x35575e(_0x46308a['specificity'],_0x29bb68['specificity']));}(_0x1f237e['stylesProcessor'],_0x454f8e);return{'parsedCssRules':_0x1f5a22,'rootCssVariables':w(_0x1f5a22)};}function S(_0x2b6805,_0x35423c=''){return _0x2b6805['flatMap'](_0x1171d6=>{const {selectorText:_0x5243bb,cssText:_0x1bc8a4,cssRules:_0x2f15bf}=_0x1171d6;if(!_0x5243bb)return[];const _0x3d9929=_0x5243bb['replace'](/&/g,_0x35423c);let _0x426cd9=_0x1bc8a4['replace'](_0x5243bb,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x2f15bf||!_0x2f15bf['length'])return[{'selectorText':_0x3d9929,'contentCssText':_0x426cd9}];for(const _0xf1ff83 of _0x2f15bf)_0x426cd9=_0x426cd9['replace'](_0xf1ff83['cssText'],'')['trim']();return[{'selectorText':_0x3d9929,'contentCssText':_0x426cd9},...S(Array['from'](_0x2f15bf),_0x3d9929)];});}function L(_0x21595f,_0x4234ad){const _0x429e52=new _0x29e09e(_0x21595f);for(const _0x2497c6 of _0x4234ad){let _0x16ea4a;if(_0x16ea4a='string'==typeof _0x2497c6?new _0x29e09e(_0x21595f)['setTo'](_0x2497c6):_0x2497c6,_0x16ea4a){for(const [_0xb2bf7c,_0xb1b3da]of _0x16ea4a['getStylesEntries']())_0x429e52['set'](_0xb2bf7c,_0xb1b3da);}}return _0x429e52;}var g=class extends _0x521997{_stylesProcessor;constructor(_0x1a4a26){super(_0x1a4a26),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x383e50(this['_stylesProcessor']),_0x2ab082(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x4b8309){const _0x17b0dc=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x292da9}=this['editor']['locale'],{rootName:_0x313538='main',dataControllerDowncastOptions:_0x2db050={},transformations:_0x2e7ae9=_0x17b0dc['transformations']||[]}=_0x4b8309||{};this['isBusy']=!0x0,this['refresh']();const _0x79bafd=this['_getRootDataHTMLFragment'](_0x313538,_0x2db050),_0x348226=_0x39f257(_0x79bafd['ownerDocument'],'div',{'dir':_0x292da9,'class':'ck-content'},[_0x79bafd]);return this['_collectAndApplyStyles'](_0x2e7ae9,_0x348226)['then'](()=>{const _0x2facc0=function(_0xfe70b3){const _0x587c94=_0xfe70b3['ownerDocument']['createDocumentFragment']();for(;_0xfe70b3['firstChild'];)_0x587c94['appendChild'](_0xfe70b3['firstChild']);return _0x587c94;}(_0x348226),_0x5dbd73=_0x348226['getAttribute']('style');if(_0x5dbd73)for(const _0x2450ef of _0x2facc0['children']){const _0x13d575=_0x2450ef['getAttribute']('style'),_0x29cbfd=L(this['_stylesProcessor'],[_0x5dbd73,_0x13d575]);_0x2450ef['setAttribute']('style',x(_0x29cbfd));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x2facc0);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x34f482,_0x644e72){const {data:_0x43ba61,model:_0x1f01d8}=this['editor'],_0x2b5150=_0x1f01d8['document']['getRoot'](_0x34f482),_0x577d0a=_0x43ba61['toView'](_0x2b5150,_0x644e72);return _0x43ba61['htmlProcessor']['domConverter']['viewToDom'](_0x577d0a);}async _collectAndApplyStyles(_0x5991ae,_0x5e8f82){const {stylesheets:_0x3907f9,inlineCss:_0x3a51a3,stripCssClasses:_0x244f47}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x486441,rootCssVariables:_0x3e9921}=await h({'stylesheets':_0x3907f9||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x3a51a3}),_0xfa8800=[];this['_processElementTree']({'transformations':_0x5991ae,'parsedCssRules':_0x486441,'element':_0x5e8f82,'stripCssClasses':_0x244f47,'parentCSSVariablesLookup':_0x3e9921['get']['bind'](_0x3e9921),'runAfterDocumentTransformation':_0x2eccf4=>{_0xfa8800['unshift'](_0x2eccf4);}});for(const _0x589289 of _0xfa8800)_0x589289();}_processElementTree({element:_0x15fc29,parsedCssRules:_0x4f82ca,parentCSSVariablesLookup:_0x155bf9,runAfterDocumentTransformation:_0x174b1e,stripCssClasses:_0x5f39fe,transformations:_0x24a57c}){const {stylesMap:_0x345e0d,localCSSVariables:_0xe444cd}=function(_0x2404dc){const _0x270d23=_0x2404dc['element']['getAttribute']('style')||'',_0x578f26=_0x2404dc['parsedCssRules']['filter'](_0x5e0282=>_0x2404dc['element']['matches'](_0x5e0282['flatSelector']))['map'](_0x2de943=>_0x2de943['stylesMap']),_0x2522ed=L(_0x2404dc['stylesProcessor'],[..._0x578f26,_0x270d23]);return{'localCSSVariables':p(_0x2404dc['fallbackCSSVariablesLookup'],_0x2522ed),'stylesMap':_0x2522ed};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x155bf9,'parsedCssRules':_0x4f82ca,'element':_0x15fc29}),_0x17d2ca=[];for(const _0x2d48af of _0x24a57c){const _0x186d14=_0x2d48af(_0x15fc29,_0x345e0d,{'runAfterDocumentTransformation':_0x174b1e,'runAfterChildrenTransformation':_0x453759=>{_0x17d2ca['unshift'](_0x453759);}});_0x186d14&&_0x186d14 instanceof HTMLElement&&(_0x15fc29=_0x186d14);}_0x345e0d['size']?_0x15fc29['setAttribute']('style',x(_0x345e0d)):_0x15fc29['removeAttribute']('style');const _0xe20759=_0xad4002=>_0xe444cd['has'](_0xad4002)?_0xe444cd['get'](_0xad4002):_0x155bf9(_0xad4002);for(const _0x44e651 of _0x15fc29['children'])_0x44e651 instanceof HTMLElement&&this['_processElementTree']({'element':_0x44e651,'parsedCssRules':_0x4f82ca,'stripCssClasses':_0x5f39fe,'transformations':_0x24a57c,'parentCSSVariablesLookup':_0xe20759,'runAfterDocumentTransformation':_0x174b1e});_0x5f39fe&&_0x15fc29['removeAttribute']('class');for(const _0x2ebef9 of _0x17d2ca)_0x2ebef9();}};function x(_0x50ccd6){return _0x50ccd6['getStylesEntries']()['map'](_0x584301=>_0x584301['join'](':'))['join'](';')+';';}var C=class extends _0x4d4458{static get['pluginName'](){return'ExportInlineStylesEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['editor']['config']['define']('exportInlineStyles',{}),this['editor']['commands']['add']('exportInlineStyles',new g(this['editor']));}afterInit(){!async function(_0x48daa6){const _0x5c17f2='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x23f066=0x791b8,_0x552888=window['Date']['now'](),_0x5e69f1=_0x48daa6['editor'],_0x3124af=new window['Promise'](_0xdc62ac=>{_0x5e69f1['once']('ready',_0xdc62ac);}),_0xfad357={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3204ad=_0x5e69f1['config']['get']('licenseKey');async function _0x3dd415(){let _0x302ff2,_0x24d382=null,_0x242216=null;try{return'GPL'==_0x3204ad?'NotAllowed':(_0x302ff2=_0x156d9a(),_0x302ff2?(_0x302ff2['usageEndpoint']&&(_0x242216=_0x89bbe8(_0x302ff2['usageEndpoint'],_0x302ff2['jti'])),await _0x379f74()?_0x5f0732()?_0x16459b()?'Expired':_0x59dbe9()?('evaluation'==_0x302ff2['licenseType']&&(_0x24d382=_0x52c718('EvaluationLimit')),await _0x263e8f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x16459b(){const _0x2383e1=['evaluation','trial']['includes'](_0x302ff2['licenseType'])?_0x552888/0x3e8:0xe10*_0x23f066;return _0x302ff2['exp']<_0x2383e1;}function _0x5f0732(){const _0x15f838=_0x302ff2['features'];return!!_0x15f838&&(!!_0x15f838['includes']('*')||!!_0x15f838['includes']('EIS'));}function _0x59dbe9(){const _0x22f503=_0x302ff2['licensedHosts'];if(!_0x22f503||0x0==_0x22f503['length'])return!0x0;const {hostname:_0x2b9bb8}=new URL(window['location']['href']);if(_0x22f503['includes'](_0x2b9bb8))return!0x0;const _0xf4f0a6=_0x2b9bb8['split']('.');return _0x22f503['filter'](_0x36d246=>_0x36d246['includes']('*'))['map'](_0x55d3c9=>_0x55d3c9['split']('.'))['filter'](_0x48d3c1=>_0x48d3c1['length']<=_0xf4f0a6['length'])['map'](_0x36cecb=>Array(_0xf4f0a6['length']-_0x36cecb['length'])['fill']('*'===_0x36cecb[0x0]?'*':'')['concat'](_0x36cecb))['some'](_0x4b2160=>_0xf4f0a6['every']((_0x3aa937,_0x5f4088)=>_0x4b2160[_0x5f4088]===_0x3aa937||'*'===_0x4b2160[_0x5f4088]));}function _0x263e8f(){return _0x24d382&&_0x242216?new window['Promise']((_0x67cfe,_0x2a1309)=>{_0x24d382['then'](_0x67cfe,_0x2a1309),_0x242216['then'](_0x33c4b8=>{'Valid'!=_0x33c4b8&&_0x67cfe(_0x33c4b8);},_0x2a1309);}):_0x24d382||_0x242216||'Valid';}}function _0x89bbe8(_0x68c5a1,_0x20a1f4){return new window['Promise'](_0x35e0ee=>{if(_0x197cf6())return _0x35e0ee('Valid');_0x29e603(),_0x5e69f1['decorate']('_sendUsageRequest');let _0x599c35=!0x1;const _0x37a56e=_0x53ea61();function _0x5b74c1(_0x5d3cb8){return!!_0x5d3cb8&&('object'==typeof _0x5d3cb8||'function'==typeof _0x5d3cb8)&&'function'==typeof _0x5d3cb8['then']&&'function'==typeof _0x5d3cb8['catch'];}function _0x32e44c(_0xb42652){_0x434e05(_0xb42652)['then'](_0x334db4=>_0x334db4&&'ok'==_0x334db4['status']?_0x50e0a5(_0x23d13e(_0x37a56e+_0x20a1f4))!=_0x334db4['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1dae79=>(_0x57fd2c(),_0x1dae79),()=>{const _0x3c4e61=_0x3bd8e2();return null==_0x3c4e61?(_0x57fd2c(),'Valid'):_0x552888-_0x3c4e61>0x240c8400?'UsageLimit':'Valid';})['then'](_0x35e0ee)['catch'](()=>{_0x35e0ee('UsageLimit');});const _0x15b4a0=0x36ee80;function _0x57fd2c(){const _0x1b7c11='llct-'+_0x50e0a5(_0x23d13e(_0x68c5a1)),_0x4c1b2d=_0x47deb2(_0x50e0a5(window['Math']['ceil'](_0x552888/_0x15b4a0)));window['localStorage']['setItem'](_0x1b7c11,_0x4c1b2d);}function _0x3bd8e2(){const _0x4bf287='llct-'+_0x50e0a5(_0x23d13e(_0x68c5a1)),_0x123e25=window['localStorage']['getItem'](_0x4bf287);return _0x123e25?window['parseInt'](_0x47deb2(_0x123e25),0x10)*_0x15b4a0:null;}function _0x434e05(_0x2d13a4){return new window['Promise']((_0x4f7fa1,_0xd64ce0)=>{_0x2d13a4['then'](_0x4f7fa1,_0xd64ce0),window['setTimeout'](_0xd64ce0,0x1d4c0);});}}_0x5e69f1['on']('_sendUsageRequest',(_0x5bcc01,_0x57837e)=>{if(_0x57837e[0x0]!=_0x68c5a1)return _0x35e0ee('UsageLimit');_0x57837e[0x1]={..._0x57837e[0x1],'requestId':_0x37a56e};},{'priority':'high'}),_0x5e69f1['on']('_sendUsageRequest',_0x736f24=>{_0x5b74c1(_0x736f24['return'])&&(_0x599c35=!0x0,_0x32e44c(_0x736f24['return']));},{'priority':'low'}),_0x3124af['then'](()=>{_0x599c35||_0x35e0ee('UsageLimit');});});function _0x197cf6(){return'auto'==_0x5e69f1['editing']['view']['_overlayModeHint'];}function _0x29e603(){_0x5e69f1['editing']['view']['_overlayModeHint']='auto';}}function _0x52c718(_0x3144d4){const _0x555de2=[new window['Promise'](_0x464daa=>setTimeout(_0x464daa,0x93ecc)),_0x3124af['then'](()=>new window['Promise'](_0x534e7b=>{let _0x4c454a=0x0;_0x5e69f1['model']['on']('applyOperation',(_0x4a769f,_0x4e9f36)=>{_0x4e9f36[0x0]['isDocumentOperation']&&_0x4c454a++,0x5e8==_0x4c454a&&(_0x534e7b(),_0x4a769f['off']());});}))];return window['Promise']['race'](_0x555de2)['then'](()=>_0x3144d4);}async function _0x2ea77e(){await _0x3124af;const _0x5e8269=_0x5e69f1['commands']['get']('exportInlineStyles');_0x5e8269&&_0x5e8269['on']('execute',_0x4e1011=>{_0x4e1011['stop']();},{'priority':'highest'}),_0x5e69f1['model']['change']=_0x45b394,_0x5e69f1['model']['enqueueChange']=_0x45b394,_0x5e69f1['enableReadOnlyMode']('model');}function _0x440fd2(_0x41b6cb){const _0x5d24fa=_0x1bd025();_0x5e69f1[_0x5d24fa]='exportInlineStylesLicenseKey'+_0x41b6cb,'Valid'!=_0x41b6cb&&_0x2ea77e();}function _0x1bd025(){const _0x334142=window['String'](window['performance']['now']())['replace']('.','');let _0x4f2536='D';for(let _0x215a0b=0x0;_0x215a0b<_0x334142['length'];_0x215a0b+=0x2){let _0x34d12f=window['parseInt'](_0x334142['substring'](_0x215a0b,_0x215a0b+0x2));_0x34d12f>=0x3e&&(_0x34d12f-=0x3e),_0x4f2536+=_0x5c17f2[_0x34d12f];}return _0x4f2536;}function _0x156d9a(){const _0x14eaa8=_0x3204ad['split']('.');if(0x3!=_0x14eaa8['length'])return null;return _0x665630(_0x14eaa8[0x1]);function _0x665630(_0x30f8d8){const _0x4bc42f=_0x33e225(_0x30f8d8);return _0x4bc42f&&_0x188733()?_0x4bc42f:null;function _0x188733(){const _0x45cbee=_0x4bc42f['jti'],_0x230e94=window['parseInt'](_0x45cbee['substring'](_0x45cbee['length']-0x8),0x10),_0x59f6f6={..._0x4bc42f,'jti':_0x45cbee['substring'](0x0,_0x45cbee['length']-0x8)};return delete _0x59f6f6['vc'],_0x23d13e(_0x59f6f6)==_0x230e94;}}}async function _0x379f74(){let _0x190bed=!0x0;try{const [_0x18d24d,_0x2e7906,_0x17a088]=_0x3204ad['split']('.');return _0x14eec5(_0x18d24d),await _0xe30b7b(_0x18d24d,_0x2e7906,_0x17a088),_0x190bed;}catch{return!0x1;}function _0x14eec5(_0x37bd38){const _0x423b6f=_0x33e225(_0x37bd38);_0x423b6f&&'ES256'==_0x423b6f['alg']||(_0x190bed=!0x1);}async function _0xe30b7b(_0x405a1d,_0x29e81e,_0x2d3599){const _0x2569ec=window['Uint8Array']['from'](_0x5c8e46(_0x2d3599),_0x78b2a9=>_0x78b2a9['charCodeAt'](0x0)),_0x540e4e=new window['TextEncoder']()['encode'](_0x405a1d+'.'+_0x29e81e),_0xbc2e75=window['crypto']['subtle'];if(!_0xbc2e75)return;const _0xcc3d3a=await _0xbc2e75['importKey']('jwk',_0xfad357,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xbc2e75['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xcc3d3a,_0x2569ec,_0x540e4e)||(_0x190bed=!0x1);}}function _0x33e225(_0xa7d91d){return _0xa7d91d['startsWith']('ey')?JSON['parse'](_0x5c8e46(_0xa7d91d)):null;}function _0x5c8e46(_0x2d2308){return window['atob'](_0x2d2308['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x23d13e(_0x5cc480){let _0x18cfc8=0x1505;function _0x33df63(_0x2b01b7){for(let _0x66084=0x0;_0x66084<_0x2b01b7['length'];_0x66084++){const _0x1b1f03=_0x2b01b7['charCodeAt'](_0x66084);_0x18cfc8=(_0x18cfc8<<0x5)+_0x18cfc8+_0x1b1f03,_0x18cfc8&=_0x18cfc8;}}function _0x10cb89(_0x37ceb9){Array['isArray'](_0x37ceb9)?_0x37ceb9['forEach'](_0x10cb89):_0x37ceb9&&'object'==typeof _0x37ceb9?Object['entries'](_0x37ceb9)['sort']()['forEach'](([_0x5ed714,_0x393b22])=>{_0x33df63(_0x5ed714),_0x10cb89(_0x393b22);}):_0x33df63(window['String'](_0x37ceb9));}return _0x10cb89(_0x5cc480),_0x18cfc8>>>0x0;}function _0x50e0a5(_0x5798c3){return _0x5798c3['toString'](0x10)['padStart'](0x8,'0');}function _0x47deb2(_0x1cc98f){return _0x1cc98f['split']('')['reverse']()['join']('');}function _0x45b394(){}_0x440fd2(await _0x3dd415());}(this);}},I=class extends _0x4d4458{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[C];}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x361eca=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x19a99a;for(const _0x3d9c8c in _0x361eca){const _0x5beaff=_0x3d9c8c,_0x4d213a=_0x361eca[_0x5beaff];if('exportInlineStylesLicenseKeyValid'==_0x4d213a||'exportInlineStylesLicenseKeyInvalid'==_0x4d213a||'exportInlineStylesLicenseKeyExpired'==_0x4d213a||'exportInlineStylesLicenseKeyDomainLimit'==_0x4d213a||'exportInlineStylesLicenseKeyNotAllowed'==_0x4d213a||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x4d213a||'exportInlineStylesLicenseKeyUsageLimit'==_0x4d213a){delete _0x361eca[_0x5beaff],_0x19a99a=_0x4d213a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x19a99a&&_0x361eca['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x19a99a&&_0x361eca['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x19a99a&&_0x361eca['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x19a99a&&_0x361eca['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x19a99a&&_0x361eca['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x19a99a&&_0x361eca['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}};export{I as ExportInlineStyles,g as ExportInlineStylesCommand,C as ExportInlineStylesEditing,d as dropImportantStyleSuffix};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-export-inline-styles",
|
|
3
|
-
"version": "48.4.0-alpha.
|
|
3
|
+
"version": "48.4.0-alpha.6",
|
|
4
4
|
"description": "The export with inline styles feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ckeditor/ckeditor5-core": "48.4.0-alpha.
|
|
38
|
-
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.
|
|
39
|
-
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.
|
|
37
|
+
"@ckeditor/ckeditor5-core": "48.4.0-alpha.6",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.6",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.6",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|