@ckeditor/ckeditor5-export-inline-styles 48.4.0-alpha.0 → 48.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x872d68,Plugin as _0x5c523e}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x38373d,createElement as _0x35896d,uid as _0x27d62b}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x2b7b1f,addMarginStylesRules as _0x4cea01,addPaddingStylesRules as _0x2fa5cf}from'@ckeditor/ckeditor5-engine';import{calculate as _0x53a1c3,compare as _0x33cee1}from'specificity';function f(_0x3cc888){const _0x351e24=[];let _0x343d1d='',_0xe46f99=0x0;for(;_0xe46f99<_0x3cc888['length'];){const _0x53f464=_0x3cc888[_0xe46f99];if('('===_0x53f464){const _0x29def8=y(_0x3cc888,_0xe46f99+0x1);if(-0x1===_0x29def8)return[];_0x343d1d+=_0x3cc888['slice'](_0xe46f99,_0x29def8+0x1),_0xe46f99=_0x29def8+0x1;}else','!==_0x53f464||_0x343d1d['endsWith']('\x5c')?(_0x343d1d+=_0x53f464,_0xe46f99++):(_0x351e24['push'](_0x343d1d['trim']()),_0x343d1d='',_0xe46f99++);}return _0x343d1d['trim']()&&_0x351e24['push'](_0x343d1d['trim']()),_0x351e24['filter'](Boolean);}function y(_0x25ed13,_0x26aa5f){let _0x1a389d=0x1;for(let _0x1f53d7=_0x26aa5f;_0x1f53d7<_0x25ed13['length'];_0x1f53d7++){const _0x3e9e87=_0x25ed13[_0x1f53d7];if('('===_0x3e9e87)_0x1a389d++;else{if(')'===_0x3e9e87&&(_0x1a389d--,0x0===_0x1a389d))return _0x1f53d7;}}return-0x1;}function d(_0x1ac667){return _0x1ac667['replace'](/!\s*important/i,'')['trim']();}function w(_0x181291){const _0x5f46c9=new Map();for(const {stylesMap:_0x40b3a0,flatSelector:_0x320a33}of _0x181291){if(':root'!==_0x320a33)continue;const _0x283065=p(_0x5f46c9['get']['bind'](_0x5f46c9),_0x40b3a0);for(const [_0x1cfef3,_0x2ad4d4]of _0x283065)_0x5f46c9['set'](_0x1cfef3,_0x2ad4d4);}return _0x5f46c9;}function p(_0x2a4d60,_0x481c33){const _0x473650=new Map(),_0x308ca7=_0x36e507=>_0x473650['has'](_0x36e507)?_0x473650['get'](_0x36e507):_0x2a4d60(_0x36e507);for(const [_0x148cdb,_0x27b976]of _0x481c33['getStylesEntries']())if(_0x27b976&&_0x148cdb['startsWith']('--')){const _0x1b2c1c=m(_0x308ca7,_0x27b976);_0x473650['set'](_0x148cdb,_0x1b2c1c),_0x481c33['remove'](_0x148cdb);}for(const [_0x2faca0,_0x5b4b40]of _0x481c33['getStylesEntries']())if(_0x5b4b40){const _0x1aab54=m(_0x308ca7,_0x5b4b40);_0x481c33['set'](_0x2faca0,_0x1aab54);}return _0x473650;}function m(_0x3dc824,_0x4ed2ec){return function(_0x359f31,_0x36a75c){let _0x20ab76='',_0x15968e=0x0;for(;_0x15968e<_0x359f31['length'];){const _0x26cc46=_0x359f31['indexOf']('var(',_0x15968e);if(-0x1===_0x26cc46){_0x20ab76+=_0x359f31['slice'](_0x15968e);break;}_0x20ab76+=_0x359f31['slice'](_0x15968e,_0x26cc46);const _0x394dd5=_0x26cc46+0x4,_0x3af241=y(_0x359f31,_0x394dd5);_0x20ab76+=_0x36a75c(_0x359f31['substring'](_0x394dd5,_0x3af241)),_0x15968e=_0x3af241+0x1;}return _0x20ab76;}(_0x4ed2ec,_0x6c1ae2=>{const [_0x333729,_0x13a4d2]=f(_0x6c1ae2),_0x1d71e1=_0x3dc824(_0x333729);return void 0x0!==_0x1d71e1?_0x1d71e1:_0x13a4d2?m(_0x3dc824,_0x13a4d2):'var('+_0x333729+')';});}async function h(_0x30c0e4){const _0x587e93=[await _0x38373d(_0x30c0e4['stylesheets']),_0x30c0e4['inlineCss']]['filter'](_0x533b83=>_0x533b83&&_0x533b83['length'])['join']('\x0a'),_0x2bc8b7=await async function(_0x1302a8,_0x5db12d){const _0x31d74f=new CSSStyleSheet();return await _0x31d74f['replace'](_0x5db12d),S(Array['from'](_0x31d74f['cssRules'])['filter'](_0x18091e=>_0x18091e instanceof CSSStyleRule))['flatMap'](({selectorText:_0xc39850,contentCssText:_0x508cfd})=>{const _0x2d8ae9=f(_0xc39850),_0x216940=new _0x2b7b1f(_0x1302a8)['setTo'](_0x508cfd);return _0x2d8ae9['map'](_0x21f68f=>{const _0x2a5f63=function(_0x85b5cb){const _0x35a4d6=':where(';let _0x3e7158=_0x85b5cb,_0x537b8d=0x0;for(let _0x2908c1=0x0;_0x2908c1<0x64;_0x2908c1++){const _0x8bb2b2=_0x3e7158['indexOf'](_0x35a4d6,_0x537b8d);if(-0x1===_0x8bb2b2)break;let _0x671b2e=0x0;for(let _0x1225c5=0x0;_0x1225c5<_0x8bb2b2;_0x1225c5++)'('===_0x3e7158[_0x1225c5]?_0x671b2e++:')'===_0x3e7158[_0x1225c5]&&_0x671b2e--;if(_0x671b2e>0x0){_0x537b8d=_0x8bb2b2+0x7;continue;}let _0x1be582=-0x1;for(let _0x54d330=_0x8bb2b2+0x7,_0x1e449a=0x1;_0x54d330<_0x3e7158['length'];_0x54d330++)if('('===_0x3e7158[_0x54d330]?_0x1e449a++:')'===_0x3e7158[_0x54d330]&&_0x1e449a--,!_0x1e449a){_0x1be582=_0x54d330;break;}-0x1!==_0x1be582?(_0x3e7158=_0x3e7158['slice'](0x0,_0x8bb2b2)+_0x3e7158['slice'](_0x1be582+0x1),_0x537b8d=_0x8bb2b2):_0x537b8d=_0x8bb2b2+0x7;}return _0x3e7158['replace'](/\s+/g,'\x20')['trim']();}(_0x21f68f),_0x4fe5d7=_0x2a5f63?_0x53a1c3(_0x2a5f63)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x216940,'flatSelector':_0x21f68f,'specificity':_0x4fe5d7};});})['sort']((_0x42562c,_0x2f3e99)=>_0x33cee1(_0x42562c['specificity'],_0x2f3e99['specificity']));}(_0x30c0e4['stylesProcessor'],_0x587e93);return{'parsedCssRules':_0x2bc8b7,'rootCssVariables':w(_0x2bc8b7)};}function S(_0x36b264,_0x5339cf=''){return _0x36b264['flatMap'](_0x5e26f6=>{const {selectorText:_0x2c514c,cssText:_0x1793f0,cssRules:_0x369f4d}=_0x5e26f6;if(!_0x2c514c)return[];const _0x3efbee=_0x2c514c['replace'](/&/g,_0x5339cf);let _0x5c8273=_0x1793f0['replace'](_0x2c514c,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x369f4d||!_0x369f4d['length'])return[{'selectorText':_0x3efbee,'contentCssText':_0x5c8273}];for(const _0x52d18c of _0x369f4d)_0x5c8273=_0x5c8273['replace'](_0x52d18c['cssText'],'')['trim']();return[{'selectorText':_0x3efbee,'contentCssText':_0x5c8273},...S(Array['from'](_0x369f4d),_0x3efbee)];});}function L(_0x44cf91,_0x1d0b5d){const _0x364595=new _0x2b7b1f(_0x44cf91);for(const _0x593ae6 of _0x1d0b5d){let _0x13c3f2;if(_0x13c3f2='string'==typeof _0x593ae6?new _0x2b7b1f(_0x44cf91)['setTo'](_0x593ae6):_0x593ae6,_0x13c3f2){for(const [_0xa2ea1f,_0xf7204f]of _0x13c3f2['getStylesEntries']())_0x364595['set'](_0xa2ea1f,_0xf7204f);}}return _0x364595;}var g=class extends _0x872d68{_stylesProcessor;constructor(_0x54de2d){super(_0x54de2d),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x4cea01(this['_stylesProcessor']),_0x2fa5cf(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x8c88f4){const _0x2cceca=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0xce706b}=this['editor']['locale'],{rootName:_0x2eb2e0='main',dataControllerDowncastOptions:_0x44850f={},transformations:_0xcb66a6=_0x2cceca['transformations']||[]}=_0x8c88f4||{};this['isBusy']=!0x0,this['refresh']();const _0x432661=this['_getRootDataHTMLFragment'](_0x2eb2e0,_0x44850f),_0x587494=_0x35896d(_0x432661['ownerDocument'],'div',{'dir':_0xce706b,'class':'ck-content'},[_0x432661]);return this['_collectAndApplyStyles'](_0xcb66a6,_0x587494)['then'](()=>{const _0x397192=function(_0xff3288){const _0x1f035a=_0xff3288['ownerDocument']['createDocumentFragment']();for(;_0xff3288['firstChild'];)_0x1f035a['appendChild'](_0xff3288['firstChild']);return _0x1f035a;}(_0x587494),_0x322b4d=_0x587494['getAttribute']('style');if(_0x322b4d)for(const _0x37631c of _0x397192['children']){const _0x5f4982=_0x37631c['getAttribute']('style'),_0xe6dfd5=L(this['_stylesProcessor'],[_0x322b4d,_0x5f4982]);_0x37631c['setAttribute']('style',x(_0xe6dfd5));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x397192);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0xe1a7a0,_0x298601){const {data:_0x4e87a1,model:_0x460a46}=this['editor'],_0xef60b6=_0x460a46['document']['getRoot'](_0xe1a7a0),_0x9ed1e6=_0x4e87a1['toView'](_0xef60b6,_0x298601);return _0x4e87a1['htmlProcessor']['domConverter']['viewToDom'](_0x9ed1e6);}async _collectAndApplyStyles(_0x383e7e,_0x16ffe1){const {stylesheets:_0x414a39,inlineCss:_0xa99edf,stripCssClasses:_0x482f5d}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x2b1eab,rootCssVariables:_0x3f3a85}=await h({'stylesheets':_0x414a39||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0xa99edf}),_0x5ae504=[];this['_processElementTree']({'transformations':_0x383e7e,'parsedCssRules':_0x2b1eab,'element':_0x16ffe1,'stripCssClasses':_0x482f5d,'parentCSSVariablesLookup':_0x3f3a85['get']['bind'](_0x3f3a85),'runAfterDocumentTransformation':_0x1cd485=>{_0x5ae504['unshift'](_0x1cd485);}});for(const _0x464210 of _0x5ae504)_0x464210();}_processElementTree({element:_0x5208bc,parsedCssRules:_0x432f86,parentCSSVariablesLookup:_0x3cda91,runAfterDocumentTransformation:_0x3ca15e,stripCssClasses:_0x31873e,transformations:_0x5a4e52}){const {stylesMap:_0x594bfb,localCSSVariables:_0x124278}=function(_0x26f583){const _0x2fc2e1=_0x26f583['element']['getAttribute']('style')||'',_0x51524b=_0x26f583['parsedCssRules']['filter'](_0x5d7d73=>_0x26f583['element']['matches'](_0x5d7d73['flatSelector']))['map'](_0x3a1811=>_0x3a1811['stylesMap']),_0x3c11de=L(_0x26f583['stylesProcessor'],[..._0x51524b,_0x2fc2e1]);return{'localCSSVariables':p(_0x26f583['fallbackCSSVariablesLookup'],_0x3c11de),'stylesMap':_0x3c11de};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x3cda91,'parsedCssRules':_0x432f86,'element':_0x5208bc}),_0x1c41a8=[];for(const _0x10fdc5 of _0x5a4e52){const _0x88edbc=_0x10fdc5(_0x5208bc,_0x594bfb,{'runAfterDocumentTransformation':_0x3ca15e,'runAfterChildrenTransformation':_0x85c0fd=>{_0x1c41a8['unshift'](_0x85c0fd);}});_0x88edbc&&_0x88edbc instanceof HTMLElement&&(_0x5208bc=_0x88edbc);}_0x594bfb['size']?_0x5208bc['setAttribute']('style',x(_0x594bfb)):_0x5208bc['removeAttribute']('style');const _0x4db15c=_0x33192f=>_0x124278['has'](_0x33192f)?_0x124278['get'](_0x33192f):_0x3cda91(_0x33192f);for(const _0x13ff84 of _0x5208bc['children'])_0x13ff84 instanceof HTMLElement&&this['_processElementTree']({'element':_0x13ff84,'parsedCssRules':_0x432f86,'stripCssClasses':_0x31873e,'transformations':_0x5a4e52,'parentCSSVariablesLookup':_0x4db15c,'runAfterDocumentTransformation':_0x3ca15e});_0x31873e&&_0x5208bc['removeAttribute']('class');for(const _0x49ce27 of _0x1c41a8)_0x49ce27();}};function x(_0x5c4252){return _0x5c4252['getStylesEntries']()['map'](_0x38e1c6=>_0x38e1c6['join'](':'))['join'](';')+';';}var C=class extends _0x5c523e{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(_0x1fb043){const _0x470b77='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x283c4e=0x79128,_0x4efdf8=window['Date']['now'](),_0x420cfd=_0x1fb043['editor'],_0x137f52=new window['Promise'](_0x5bf578=>{_0x420cfd['once']('ready',_0x5bf578);}),_0xf4628={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x21c615=_0x420cfd['config']['get']('licenseKey');async function _0x37bca9(){let _0x415ca5,_0x1a93dd=null,_0x3ed600=null;try{return'GPL'==_0x21c615?'NotAllowed':(_0x415ca5=_0x3602cb(),_0x415ca5?(_0x415ca5['usageEndpoint']&&(_0x3ed600=_0xd17c42(_0x415ca5['usageEndpoint'],_0x415ca5['jti'])),await _0xa569f9()?_0x3c0468()?_0x9f0d1e()?'Expired':_0xf3244d()?('evaluation'==_0x415ca5['licenseType']&&(_0x1a93dd=_0x4c440f('EvaluationLimit')),await _0x4f918a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x9f0d1e(){const _0x1ece7a=['evaluation','trial']['includes'](_0x415ca5['licenseType'])?_0x4efdf8/0x3e8:0xe10*_0x283c4e;return _0x415ca5['exp']<_0x1ece7a;}function _0x3c0468(){const _0x567b93=_0x415ca5['features'];return!!_0x567b93&&(!!_0x567b93['includes']('*')||!!_0x567b93['includes']('EIS'));}function _0xf3244d(){const _0xacf89=_0x415ca5['licensedHosts'];if(!_0xacf89||0x0==_0xacf89['length'])return!0x0;const {hostname:_0x2ef543}=new URL(window['location']['href']);if(_0xacf89['includes'](_0x2ef543))return!0x0;const _0x9ed802=_0x2ef543['split']('.');return _0xacf89['filter'](_0x308762=>_0x308762['includes']('*'))['map'](_0x3d1ac0=>_0x3d1ac0['split']('.'))['filter'](_0x4313cc=>_0x4313cc['length']<=_0x9ed802['length'])['map'](_0x5ec0bb=>Array(_0x9ed802['length']-_0x5ec0bb['length'])['fill']('*'===_0x5ec0bb[0x0]?'*':'')['concat'](_0x5ec0bb))['some'](_0x3141c3=>_0x9ed802['every']((_0x59a281,_0x4b1c2f)=>_0x3141c3[_0x4b1c2f]===_0x59a281||'*'===_0x3141c3[_0x4b1c2f]));}function _0x4f918a(){return _0x1a93dd&&_0x3ed600?new window['Promise']((_0x2b750a,_0x2b4aab)=>{_0x1a93dd['then'](_0x2b750a,_0x2b4aab),_0x3ed600['then'](_0x312713=>{'Valid'!=_0x312713&&_0x2b750a(_0x312713);},_0x2b4aab);}):_0x1a93dd||_0x3ed600||'Valid';}}function _0xd17c42(_0x5c43ae,_0xd3c4f7){return new window['Promise'](_0x160707=>{if(_0x2fea8f())return _0x160707('Valid');_0x143ab5(),_0x420cfd['decorate']('_sendUsageRequest');let _0x3f9fc3=!0x1;const _0x2e6d26=_0x27d62b();function _0x416cf0(_0x1c0f4d){return!!_0x1c0f4d&&('object'==typeof _0x1c0f4d||'function'==typeof _0x1c0f4d)&&'function'==typeof _0x1c0f4d['then']&&'function'==typeof _0x1c0f4d['catch'];}function _0x19c974(_0x26e2bb){_0x171c25(_0x26e2bb)['then'](_0x459292=>_0x459292&&'ok'==_0x459292['status']?_0x127838(_0x32fec2(_0x2e6d26+_0xd3c4f7))!=_0x459292['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x451257=>(_0x9bb9f0(),_0x451257),()=>{const _0x28ddc9=_0x15b650();return null==_0x28ddc9?(_0x9bb9f0(),'Valid'):_0x4efdf8-_0x28ddc9>0x240c8400?'UsageLimit':'Valid';})['then'](_0x160707)['catch'](()=>{_0x160707('UsageLimit');});const _0x213030=0x36ee80;function _0x9bb9f0(){const _0x39a858='llct-'+_0x127838(_0x32fec2(_0x5c43ae)),_0xfb02ae=_0x79e69a(_0x127838(window['Math']['ceil'](_0x4efdf8/_0x213030)));window['localStorage']['setItem'](_0x39a858,_0xfb02ae);}function _0x15b650(){const _0x3966e7='llct-'+_0x127838(_0x32fec2(_0x5c43ae)),_0x3e6963=window['localStorage']['getItem'](_0x3966e7);return _0x3e6963?window['parseInt'](_0x79e69a(_0x3e6963),0x10)*_0x213030:null;}function _0x171c25(_0x280892){return new window['Promise']((_0x2ea573,_0x51e59f)=>{_0x280892['then'](_0x2ea573,_0x51e59f),window['setTimeout'](_0x51e59f,0x1d4c0);});}}_0x420cfd['on']('_sendUsageRequest',(_0x2cb96b,_0xf34cd5)=>{if(_0xf34cd5[0x0]!=_0x5c43ae)return _0x160707('UsageLimit');_0xf34cd5[0x1]={..._0xf34cd5[0x1],'requestId':_0x2e6d26};},{'priority':'high'}),_0x420cfd['on']('_sendUsageRequest',_0x309195=>{_0x416cf0(_0x309195['return'])&&(_0x3f9fc3=!0x0,_0x19c974(_0x309195['return']));},{'priority':'low'}),_0x137f52['then'](()=>{_0x3f9fc3||_0x160707('UsageLimit');});});function _0x2fea8f(){return'auto'==_0x420cfd['editing']['view']['_overlayModeHint'];}function _0x143ab5(){_0x420cfd['editing']['view']['_overlayModeHint']='auto';}}function _0x4c440f(_0x513320){const _0x4c559c=[new window['Promise'](_0x1f2a6d=>setTimeout(_0x1f2a6d,0x93ecc)),_0x137f52['then'](()=>new window['Promise'](_0x5776c2=>{let _0x276297=0x0;_0x420cfd['model']['on']('applyOperation',(_0x321e96,_0x29e8c3)=>{_0x29e8c3[0x0]['isDocumentOperation']&&_0x276297++,0x5e8==_0x276297&&(_0x5776c2(),_0x321e96['off']());});}))];return window['Promise']['race'](_0x4c559c)['then'](()=>_0x513320);}async function _0x567d85(){await _0x137f52;const _0x1efd31=_0x420cfd['commands']['get']('exportInlineStyles');_0x1efd31&&_0x1efd31['on']('execute',_0x25ce0f=>{_0x25ce0f['stop']();},{'priority':'highest'}),_0x420cfd['model']['change']=_0x4f8041,_0x420cfd['model']['enqueueChange']=_0x4f8041,_0x420cfd['enableReadOnlyMode']('model');}function _0x175f64(_0x2a7765){const _0x29c662=_0x2d6c55();_0x420cfd[_0x29c662]='exportInlineStylesLicenseKey'+_0x2a7765,'Valid'!=_0x2a7765&&_0x567d85();}function _0x2d6c55(){const _0x4d4da8=window['String'](window['performance']['now']())['replace']('.','');let _0x111434='D';for(let _0x272821=0x0;_0x272821<_0x4d4da8['length'];_0x272821+=0x2){let _0x479cdb=window['parseInt'](_0x4d4da8['substring'](_0x272821,_0x272821+0x2));_0x479cdb>=0x3e&&(_0x479cdb-=0x3e),_0x111434+=_0x470b77[_0x479cdb];}return _0x111434;}function _0x3602cb(){const _0x3ab281=_0x21c615['split']('.');if(0x3!=_0x3ab281['length'])return null;return _0x4d284b(_0x3ab281[0x1]);function _0x4d284b(_0x45e02a){const _0x4ea08a=_0x7fb1f1(_0x45e02a);return _0x4ea08a&&_0x2509d2()?_0x4ea08a:null;function _0x2509d2(){const _0x2699ec=_0x4ea08a['jti'],_0x5d6a67=window['parseInt'](_0x2699ec['substring'](_0x2699ec['length']-0x8),0x10),_0x235aa1={..._0x4ea08a,'jti':_0x2699ec['substring'](0x0,_0x2699ec['length']-0x8)};return delete _0x235aa1['vc'],_0x32fec2(_0x235aa1)==_0x5d6a67;}}}async function _0xa569f9(){let _0x21563d=!0x0;try{const [_0x14e038,_0x489a50,_0x33e3be]=_0x21c615['split']('.');return _0x253d45(_0x14e038),await _0x192559(_0x14e038,_0x489a50,_0x33e3be),_0x21563d;}catch{return!0x1;}function _0x253d45(_0x31f9fd){const _0x54ee57=_0x7fb1f1(_0x31f9fd);_0x54ee57&&'ES256'==_0x54ee57['alg']||(_0x21563d=!0x1);}async function _0x192559(_0x23694a,_0x3b35e3,_0x2c50ff){const _0x544a84=window['Uint8Array']['from'](_0x11a4c5(_0x2c50ff),_0x1846e8=>_0x1846e8['charCodeAt'](0x0)),_0x5dab44=new window['TextEncoder']()['encode'](_0x23694a+'.'+_0x3b35e3),_0x20b1a3=window['crypto']['subtle'];if(!_0x20b1a3)return;const _0x12adf5=await _0x20b1a3['importKey']('jwk',_0xf4628,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x20b1a3['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x12adf5,_0x544a84,_0x5dab44)||(_0x21563d=!0x1);}}function _0x7fb1f1(_0x1f5c4d){return _0x1f5c4d['startsWith']('ey')?JSON['parse'](_0x11a4c5(_0x1f5c4d)):null;}function _0x11a4c5(_0x16dcd3){return window['atob'](_0x16dcd3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x32fec2(_0x4894c0){let _0x55c3b3=0x1505;function _0x277607(_0x56f1b5){for(let _0x30669d=0x0;_0x30669d<_0x56f1b5['length'];_0x30669d++){const _0x325546=_0x56f1b5['charCodeAt'](_0x30669d);_0x55c3b3=(_0x55c3b3<<0x5)+_0x55c3b3+_0x325546,_0x55c3b3&=_0x55c3b3;}}function _0xa65a29(_0x3ba8ca){Array['isArray'](_0x3ba8ca)?_0x3ba8ca['forEach'](_0xa65a29):_0x3ba8ca&&'object'==typeof _0x3ba8ca?Object['entries'](_0x3ba8ca)['sort']()['forEach'](([_0x251e00,_0x2978e4])=>{_0x277607(_0x251e00),_0xa65a29(_0x2978e4);}):_0x277607(window['String'](_0x3ba8ca));}return _0xa65a29(_0x4894c0),_0x55c3b3>>>0x0;}function _0x127838(_0x310b91){return _0x310b91['toString'](0x10)['padStart'](0x8,'0');}function _0x79e69a(_0x5a6594){return _0x5a6594['split']('')['reverse']()['join']('');}function _0x4f8041(){}_0x175f64(await _0x37bca9());}(this);}},I=class extends _0x5c523e{['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 _0x51ffce=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5d1e12;for(const _0x3b5f9b in _0x51ffce){const _0x54cfca=_0x3b5f9b,_0x4d66b0=_0x51ffce[_0x54cfca];if('exportInlineStylesLicenseKeyValid'==_0x4d66b0||'exportInlineStylesLicenseKeyInvalid'==_0x4d66b0||'exportInlineStylesLicenseKeyExpired'==_0x4d66b0||'exportInlineStylesLicenseKeyDomainLimit'==_0x4d66b0||'exportInlineStylesLicenseKeyNotAllowed'==_0x4d66b0||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x4d66b0||'exportInlineStylesLicenseKeyUsageLimit'==_0x4d66b0){delete _0x51ffce[_0x54cfca],_0x5d1e12=_0x4d66b0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x5d1e12&&_0x51ffce['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x5d1e12&&_0x51ffce['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x5d1e12&&_0x51ffce['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5d1e12&&_0x51ffce['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x5d1e12&&_0x51ffce['_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 _0x105db4,Plugin as _0x57fc27}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x5e3616,createElement as _0x2815ca,uid as _0x5d2155}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x57ba7b,addMarginStylesRules as _0x523e4b,addPaddingStylesRules as _0x232b1f}from'@ckeditor/ckeditor5-engine';import{calculate as _0x128971,compare as _0x4144f5}from'specificity';function f(_0x5d8321){const _0x39da1e=[];let _0x15ecbf='',_0x4b7aa1=0x0;for(;_0x4b7aa1<_0x5d8321['length'];){const _0x2d18f9=_0x5d8321[_0x4b7aa1];if('('===_0x2d18f9){const _0x262631=y(_0x5d8321,_0x4b7aa1+0x1);if(-0x1===_0x262631)return[];_0x15ecbf+=_0x5d8321['slice'](_0x4b7aa1,_0x262631+0x1),_0x4b7aa1=_0x262631+0x1;}else','!==_0x2d18f9||_0x15ecbf['endsWith']('\x5c')?(_0x15ecbf+=_0x2d18f9,_0x4b7aa1++):(_0x39da1e['push'](_0x15ecbf['trim']()),_0x15ecbf='',_0x4b7aa1++);}return _0x15ecbf['trim']()&&_0x39da1e['push'](_0x15ecbf['trim']()),_0x39da1e['filter'](Boolean);}function y(_0x3b24f8,_0x31b487){let _0xb265ff=0x1;for(let _0x148f68=_0x31b487;_0x148f68<_0x3b24f8['length'];_0x148f68++){const _0x24c10f=_0x3b24f8[_0x148f68];if('('===_0x24c10f)_0xb265ff++;else{if(')'===_0x24c10f&&(_0xb265ff--,0x0===_0xb265ff))return _0x148f68;}}return-0x1;}function d(_0x23c83f){return _0x23c83f['replace'](/!\s*important/i,'')['trim']();}function w(_0x2aac89){const _0x22dba2=new Map();for(const {stylesMap:_0x187311,flatSelector:_0x5102c9}of _0x2aac89){if(':root'!==_0x5102c9)continue;const _0x1c8b8d=p(_0x22dba2['get']['bind'](_0x22dba2),_0x187311);for(const [_0x1cc500,_0x352701]of _0x1c8b8d)_0x22dba2['set'](_0x1cc500,_0x352701);}return _0x22dba2;}function p(_0x420b91,_0x5a1ac0){const _0x12578f=new Map(),_0x3adacf=_0x301ac1=>_0x12578f['has'](_0x301ac1)?_0x12578f['get'](_0x301ac1):_0x420b91(_0x301ac1);for(const [_0x565249,_0x2e431c]of _0x5a1ac0['getStylesEntries']())if(_0x2e431c&&_0x565249['startsWith']('--')){const _0x279828=m(_0x3adacf,_0x2e431c);_0x12578f['set'](_0x565249,_0x279828),_0x5a1ac0['remove'](_0x565249);}for(const [_0x17c58a,_0x22925f]of _0x5a1ac0['getStylesEntries']())if(_0x22925f){const _0x322c8e=m(_0x3adacf,_0x22925f);_0x5a1ac0['set'](_0x17c58a,_0x322c8e);}return _0x12578f;}function m(_0x9d0bc0,_0x58a489){return function(_0x11a795,_0x116ad7){let _0x413101='',_0x4833e6=0x0;for(;_0x4833e6<_0x11a795['length'];){const _0x3411fb=_0x11a795['indexOf']('var(',_0x4833e6);if(-0x1===_0x3411fb){_0x413101+=_0x11a795['slice'](_0x4833e6);break;}_0x413101+=_0x11a795['slice'](_0x4833e6,_0x3411fb);const _0x4053a9=_0x3411fb+0x4,_0x4c6d28=y(_0x11a795,_0x4053a9);_0x413101+=_0x116ad7(_0x11a795['substring'](_0x4053a9,_0x4c6d28)),_0x4833e6=_0x4c6d28+0x1;}return _0x413101;}(_0x58a489,_0x5ca719=>{const [_0x5a0aaf,_0x7c81d]=f(_0x5ca719),_0x38f413=_0x9d0bc0(_0x5a0aaf);return void 0x0!==_0x38f413?_0x38f413:_0x7c81d?m(_0x9d0bc0,_0x7c81d):'var('+_0x5a0aaf+')';});}async function h(_0x4a0751){const _0x3762e3=[await _0x5e3616(_0x4a0751['stylesheets']),_0x4a0751['inlineCss']]['filter'](_0x379d0f=>_0x379d0f&&_0x379d0f['length'])['join']('\x0a'),_0x11ab2b=await async function(_0x4ed6af,_0x4be2d6){const _0x340768=new CSSStyleSheet();return await _0x340768['replace'](_0x4be2d6),S(Array['from'](_0x340768['cssRules'])['filter'](_0x53661f=>_0x53661f instanceof CSSStyleRule))['flatMap'](({selectorText:_0x11f821,contentCssText:_0x90e9b6})=>{const _0x5b602f=f(_0x11f821),_0x4a630a=new _0x57ba7b(_0x4ed6af)['setTo'](_0x90e9b6);return _0x5b602f['map'](_0x1fc0ec=>{const _0x2b76eb=function(_0x169c44){const _0x2ba93a=':where(';let _0x39db42=_0x169c44,_0x29fc3e=0x0;for(let _0x5c4f53=0x0;_0x5c4f53<0x64;_0x5c4f53++){const _0x248849=_0x39db42['indexOf'](_0x2ba93a,_0x29fc3e);if(-0x1===_0x248849)break;let _0x1402c3=0x0;for(let _0x3143ae=0x0;_0x3143ae<_0x248849;_0x3143ae++)'('===_0x39db42[_0x3143ae]?_0x1402c3++:')'===_0x39db42[_0x3143ae]&&_0x1402c3--;if(_0x1402c3>0x0){_0x29fc3e=_0x248849+0x7;continue;}let _0x31d6f7=-0x1;for(let _0x1db471=_0x248849+0x7,_0x5c239b=0x1;_0x1db471<_0x39db42['length'];_0x1db471++)if('('===_0x39db42[_0x1db471]?_0x5c239b++:')'===_0x39db42[_0x1db471]&&_0x5c239b--,!_0x5c239b){_0x31d6f7=_0x1db471;break;}-0x1!==_0x31d6f7?(_0x39db42=_0x39db42['slice'](0x0,_0x248849)+_0x39db42['slice'](_0x31d6f7+0x1),_0x29fc3e=_0x248849):_0x29fc3e=_0x248849+0x7;}return _0x39db42['replace'](/\s+/g,'\x20')['trim']();}(_0x1fc0ec),_0x153a41=_0x2b76eb?_0x128971(_0x2b76eb)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x4a630a,'flatSelector':_0x1fc0ec,'specificity':_0x153a41};});})['sort']((_0x1bbddf,_0x49bea9)=>_0x4144f5(_0x1bbddf['specificity'],_0x49bea9['specificity']));}(_0x4a0751['stylesProcessor'],_0x3762e3);return{'parsedCssRules':_0x11ab2b,'rootCssVariables':w(_0x11ab2b)};}function S(_0x3b9525,_0x2e2253=''){return _0x3b9525['flatMap'](_0x581441=>{const {selectorText:_0x17890e,cssText:_0x31a993,cssRules:_0x308185}=_0x581441;if(!_0x17890e)return[];const _0x3cf8c1=_0x17890e['replace'](/&/g,_0x2e2253);let _0x1d295b=_0x31a993['replace'](_0x17890e,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x308185||!_0x308185['length'])return[{'selectorText':_0x3cf8c1,'contentCssText':_0x1d295b}];for(const _0x1a4d83 of _0x308185)_0x1d295b=_0x1d295b['replace'](_0x1a4d83['cssText'],'')['trim']();return[{'selectorText':_0x3cf8c1,'contentCssText':_0x1d295b},...S(Array['from'](_0x308185),_0x3cf8c1)];});}function L(_0x30f177,_0x368feb){const _0x38ea8a=new _0x57ba7b(_0x30f177);for(const _0x2272e0 of _0x368feb){let _0x3487e3;if(_0x3487e3='string'==typeof _0x2272e0?new _0x57ba7b(_0x30f177)['setTo'](_0x2272e0):_0x2272e0,_0x3487e3){for(const [_0x534362,_0x28b079]of _0x3487e3['getStylesEntries']())_0x38ea8a['set'](_0x534362,_0x28b079);}}return _0x38ea8a;}var g=class extends _0x105db4{_stylesProcessor;constructor(_0x36f312){super(_0x36f312),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x523e4b(this['_stylesProcessor']),_0x232b1f(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x1b9f93){const _0x1feb26=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x549a7f}=this['editor']['locale'],{rootName:_0x13d02f='main',dataControllerDowncastOptions:_0x384348={},transformations:_0x378f9b=_0x1feb26['transformations']||[]}=_0x1b9f93||{};this['isBusy']=!0x0,this['refresh']();const _0x37f7cd=this['_getRootDataHTMLFragment'](_0x13d02f,_0x384348),_0x4bfbd4=_0x2815ca(_0x37f7cd['ownerDocument'],'div',{'dir':_0x549a7f,'class':'ck-content'},[_0x37f7cd]);return this['_collectAndApplyStyles'](_0x378f9b,_0x4bfbd4)['then'](()=>{const _0x2f3249=function(_0x2cec76){const _0x1d3d1e=_0x2cec76['ownerDocument']['createDocumentFragment']();for(;_0x2cec76['firstChild'];)_0x1d3d1e['appendChild'](_0x2cec76['firstChild']);return _0x1d3d1e;}(_0x4bfbd4),_0x1e3806=_0x4bfbd4['getAttribute']('style');if(_0x1e3806)for(const _0x247fbc of _0x2f3249['children']){const _0x184cdd=_0x247fbc['getAttribute']('style'),_0x50c8eb=L(this['_stylesProcessor'],[_0x1e3806,_0x184cdd]);_0x247fbc['setAttribute']('style',x(_0x50c8eb));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x2f3249);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x47dce2,_0x274aeb){const {data:_0x4411e9,model:_0x426c09}=this['editor'],_0x35d3e6=_0x426c09['document']['getRoot'](_0x47dce2),_0x421479=_0x4411e9['toView'](_0x35d3e6,_0x274aeb);return _0x4411e9['htmlProcessor']['domConverter']['viewToDom'](_0x421479);}async _collectAndApplyStyles(_0x55260c,_0x1d3015){const {stylesheets:_0x330cb9,inlineCss:_0xaf4a66,stripCssClasses:_0x5346c6}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x1f338b,rootCssVariables:_0x624d72}=await h({'stylesheets':_0x330cb9||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0xaf4a66}),_0xa3558e=[];this['_processElementTree']({'transformations':_0x55260c,'parsedCssRules':_0x1f338b,'element':_0x1d3015,'stripCssClasses':_0x5346c6,'parentCSSVariablesLookup':_0x624d72['get']['bind'](_0x624d72),'runAfterDocumentTransformation':_0x576fe1=>{_0xa3558e['unshift'](_0x576fe1);}});for(const _0x49661b of _0xa3558e)_0x49661b();}_processElementTree({element:_0x50d447,parsedCssRules:_0x4fa8a7,parentCSSVariablesLookup:_0xa13fe,runAfterDocumentTransformation:_0x30b961,stripCssClasses:_0x45a362,transformations:_0x12cdde}){const {stylesMap:_0x3bc282,localCSSVariables:_0x40c213}=function(_0x1c9257){const _0x5420fc=_0x1c9257['element']['getAttribute']('style')||'',_0x5e55ec=_0x1c9257['parsedCssRules']['filter'](_0x347d9b=>_0x1c9257['element']['matches'](_0x347d9b['flatSelector']))['map'](_0x3d256b=>_0x3d256b['stylesMap']),_0x442bf5=L(_0x1c9257['stylesProcessor'],[..._0x5e55ec,_0x5420fc]);return{'localCSSVariables':p(_0x1c9257['fallbackCSSVariablesLookup'],_0x442bf5),'stylesMap':_0x442bf5};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0xa13fe,'parsedCssRules':_0x4fa8a7,'element':_0x50d447}),_0x34fd43=[];for(const _0x338d7c of _0x12cdde){const _0x3e84ee=_0x338d7c(_0x50d447,_0x3bc282,{'runAfterDocumentTransformation':_0x30b961,'runAfterChildrenTransformation':_0x51cd92=>{_0x34fd43['unshift'](_0x51cd92);}});_0x3e84ee&&_0x3e84ee instanceof HTMLElement&&(_0x50d447=_0x3e84ee);}_0x3bc282['size']?_0x50d447['setAttribute']('style',x(_0x3bc282)):_0x50d447['removeAttribute']('style');const _0x28c4d7=_0x7be454=>_0x40c213['has'](_0x7be454)?_0x40c213['get'](_0x7be454):_0xa13fe(_0x7be454);for(const _0x38e0fd of _0x50d447['children'])_0x38e0fd instanceof HTMLElement&&this['_processElementTree']({'element':_0x38e0fd,'parsedCssRules':_0x4fa8a7,'stripCssClasses':_0x45a362,'transformations':_0x12cdde,'parentCSSVariablesLookup':_0x28c4d7,'runAfterDocumentTransformation':_0x30b961});_0x45a362&&_0x50d447['removeAttribute']('class');for(const _0x2b49ac of _0x34fd43)_0x2b49ac();}};function x(_0xe82948){return _0xe82948['getStylesEntries']()['map'](_0x4713ab=>_0x4713ab['join'](':'))['join'](';')+';';}var C=class extends _0x57fc27{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(_0x5518bf){const _0x1d893f='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x2fa502=0x79140,_0x3172a5=window['Date']['now'](),_0xec9179=_0x5518bf['editor'],_0x3458bd=new window['Promise'](_0x9d04f8=>{_0xec9179['once']('ready',_0x9d04f8);}),_0x104e15={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3ca0e9=_0xec9179['config']['get']('licenseKey');async function _0x36c673(){let _0x1fd516,_0x4691ea=null,_0x369d1a=null;try{return'GPL'==_0x3ca0e9?'NotAllowed':(_0x1fd516=_0x221436(),_0x1fd516?(_0x1fd516['usageEndpoint']&&(_0x369d1a=_0x233879(_0x1fd516['usageEndpoint'],_0x1fd516['jti'])),await _0x28e3a8()?_0x300038()?_0x474cd0()?'Expired':_0x3fedee()?('evaluation'==_0x1fd516['licenseType']&&(_0x4691ea=_0x1d6821('EvaluationLimit')),await _0x485fce()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x474cd0(){const _0x5616a3=['evaluation','trial']['includes'](_0x1fd516['licenseType'])?_0x3172a5/0x3e8:0xe10*_0x2fa502;return _0x1fd516['exp']<_0x5616a3;}function _0x300038(){const _0x28ae83=_0x1fd516['features'];return!!_0x28ae83&&(!!_0x28ae83['includes']('*')||!!_0x28ae83['includes']('EIS'));}function _0x3fedee(){const _0x1fd3c6=_0x1fd516['licensedHosts'];if(!_0x1fd3c6||0x0==_0x1fd3c6['length'])return!0x0;const {hostname:_0x239ce5}=new URL(window['location']['href']);if(_0x1fd3c6['includes'](_0x239ce5))return!0x0;const _0x485fa5=_0x239ce5['split']('.');return _0x1fd3c6['filter'](_0x5375b1=>_0x5375b1['includes']('*'))['map'](_0x4cf967=>_0x4cf967['split']('.'))['filter'](_0x31962b=>_0x31962b['length']<=_0x485fa5['length'])['map'](_0x3ac8d0=>Array(_0x485fa5['length']-_0x3ac8d0['length'])['fill']('*'===_0x3ac8d0[0x0]?'*':'')['concat'](_0x3ac8d0))['some'](_0x4f5c12=>_0x485fa5['every']((_0x5d9234,_0x4efce7)=>_0x4f5c12[_0x4efce7]===_0x5d9234||'*'===_0x4f5c12[_0x4efce7]));}function _0x485fce(){return _0x4691ea&&_0x369d1a?new window['Promise']((_0x78e7c4,_0x5dc9ae)=>{_0x4691ea['then'](_0x78e7c4,_0x5dc9ae),_0x369d1a['then'](_0xb96d31=>{'Valid'!=_0xb96d31&&_0x78e7c4(_0xb96d31);},_0x5dc9ae);}):_0x4691ea||_0x369d1a||'Valid';}}function _0x233879(_0x402c70,_0x3e0ead){return new window['Promise'](_0x73596f=>{if(_0x3a472a())return _0x73596f('Valid');_0x3c2e61(),_0xec9179['decorate']('_sendUsageRequest');let _0x4123f0=!0x1;const _0x1ddb5f=_0x5d2155();function _0x23504a(_0x37ae5d){return!!_0x37ae5d&&('object'==typeof _0x37ae5d||'function'==typeof _0x37ae5d)&&'function'==typeof _0x37ae5d['then']&&'function'==typeof _0x37ae5d['catch'];}function _0x2cde3a(_0x14a0ce){_0x4f8b10(_0x14a0ce)['then'](_0x39ade8=>_0x39ade8&&'ok'==_0x39ade8['status']?_0xacb626(_0x172eb4(_0x1ddb5f+_0x3e0ead))!=_0x39ade8['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5e5602=>(_0x397bce(),_0x5e5602),()=>{const _0x43dc7c=_0x35c66e();return null==_0x43dc7c?(_0x397bce(),'Valid'):_0x3172a5-_0x43dc7c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x73596f)['catch'](()=>{_0x73596f('UsageLimit');});const _0x29f74b=0x36ee80;function _0x397bce(){const _0x346833='llct-'+_0xacb626(_0x172eb4(_0x402c70)),_0x53380a=_0x400e93(_0xacb626(window['Math']['ceil'](_0x3172a5/_0x29f74b)));window['localStorage']['setItem'](_0x346833,_0x53380a);}function _0x35c66e(){const _0xb09acf='llct-'+_0xacb626(_0x172eb4(_0x402c70)),_0x37b57a=window['localStorage']['getItem'](_0xb09acf);return _0x37b57a?window['parseInt'](_0x400e93(_0x37b57a),0x10)*_0x29f74b:null;}function _0x4f8b10(_0x1a2a06){return new window['Promise']((_0x579161,_0x334853)=>{_0x1a2a06['then'](_0x579161,_0x334853),window['setTimeout'](_0x334853,0x1d4c0);});}}_0xec9179['on']('_sendUsageRequest',(_0x1a0022,_0x1badc9)=>{if(_0x1badc9[0x0]!=_0x402c70)return _0x73596f('UsageLimit');_0x1badc9[0x1]={..._0x1badc9[0x1],'requestId':_0x1ddb5f};},{'priority':'high'}),_0xec9179['on']('_sendUsageRequest',_0x34caa1=>{_0x23504a(_0x34caa1['return'])&&(_0x4123f0=!0x0,_0x2cde3a(_0x34caa1['return']));},{'priority':'low'}),_0x3458bd['then'](()=>{_0x4123f0||_0x73596f('UsageLimit');});});function _0x3a472a(){return'auto'==_0xec9179['editing']['view']['_overlayModeHint'];}function _0x3c2e61(){_0xec9179['editing']['view']['_overlayModeHint']='auto';}}function _0x1d6821(_0x106bb3){const _0x20e566=[new window['Promise'](_0x543c7b=>setTimeout(_0x543c7b,0x93ecc)),_0x3458bd['then'](()=>new window['Promise'](_0x267aee=>{let _0x7a6501=0x0;_0xec9179['model']['on']('applyOperation',(_0x307492,_0x4012d9)=>{_0x4012d9[0x0]['isDocumentOperation']&&_0x7a6501++,0x5e8==_0x7a6501&&(_0x267aee(),_0x307492['off']());});}))];return window['Promise']['race'](_0x20e566)['then'](()=>_0x106bb3);}async function _0x5796b7(){await _0x3458bd;const _0x21e5ef=_0xec9179['commands']['get']('exportInlineStyles');_0x21e5ef&&_0x21e5ef['on']('execute',_0x5bc0b7=>{_0x5bc0b7['stop']();},{'priority':'highest'}),_0xec9179['model']['change']=_0x5836c5,_0xec9179['model']['enqueueChange']=_0x5836c5,_0xec9179['enableReadOnlyMode']('model');}function _0x5eb1cd(_0x5238d0){const _0x32abba=_0x5146e1();_0xec9179[_0x32abba]='exportInlineStylesLicenseKey'+_0x5238d0,'Valid'!=_0x5238d0&&_0x5796b7();}function _0x5146e1(){const _0x253285=window['String'](window['performance']['now']())['replace']('.','');let _0x24d1c6='D';for(let _0x66fccb=0x0;_0x66fccb<_0x253285['length'];_0x66fccb+=0x2){let _0x3fbeff=window['parseInt'](_0x253285['substring'](_0x66fccb,_0x66fccb+0x2));_0x3fbeff>=0x3e&&(_0x3fbeff-=0x3e),_0x24d1c6+=_0x1d893f[_0x3fbeff];}return _0x24d1c6;}function _0x221436(){const _0x29ac64=_0x3ca0e9['split']('.');if(0x3!=_0x29ac64['length'])return null;return _0x1746da(_0x29ac64[0x1]);function _0x1746da(_0xda4a0f){const _0x36db71=_0x5d591e(_0xda4a0f);return _0x36db71&&_0x5baad0()?_0x36db71:null;function _0x5baad0(){const _0x234f1b=_0x36db71['jti'],_0x3d0487=window['parseInt'](_0x234f1b['substring'](_0x234f1b['length']-0x8),0x10),_0x337935={..._0x36db71,'jti':_0x234f1b['substring'](0x0,_0x234f1b['length']-0x8)};return delete _0x337935['vc'],_0x172eb4(_0x337935)==_0x3d0487;}}}async function _0x28e3a8(){let _0x350d80=!0x0;try{const [_0x30e485,_0x43e2c9,_0x456718]=_0x3ca0e9['split']('.');return _0x5b5ba3(_0x30e485),await _0x122899(_0x30e485,_0x43e2c9,_0x456718),_0x350d80;}catch{return!0x1;}function _0x5b5ba3(_0x2bf62e){const _0x2cfff0=_0x5d591e(_0x2bf62e);_0x2cfff0&&'ES256'==_0x2cfff0['alg']||(_0x350d80=!0x1);}async function _0x122899(_0x9a3f2d,_0x291928,_0x4f3e76){const _0x124001=window['Uint8Array']['from'](_0x1952bb(_0x4f3e76),_0x46d38e=>_0x46d38e['charCodeAt'](0x0)),_0x710554=new window['TextEncoder']()['encode'](_0x9a3f2d+'.'+_0x291928),_0x4d3f54=window['crypto']['subtle'];if(!_0x4d3f54)return;const _0x5ad18c=await _0x4d3f54['importKey']('jwk',_0x104e15,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4d3f54['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x5ad18c,_0x124001,_0x710554)||(_0x350d80=!0x1);}}function _0x5d591e(_0x213eef){return _0x213eef['startsWith']('ey')?JSON['parse'](_0x1952bb(_0x213eef)):null;}function _0x1952bb(_0x5a8b77){return window['atob'](_0x5a8b77['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x172eb4(_0x25d3dc){let _0x227dd1=0x1505;function _0x5075bc(_0x452cfe){for(let _0x2ea008=0x0;_0x2ea008<_0x452cfe['length'];_0x2ea008++){const _0x319ffa=_0x452cfe['charCodeAt'](_0x2ea008);_0x227dd1=(_0x227dd1<<0x5)+_0x227dd1+_0x319ffa,_0x227dd1&=_0x227dd1;}}function _0x6b87bb(_0x333d48){Array['isArray'](_0x333d48)?_0x333d48['forEach'](_0x6b87bb):_0x333d48&&'object'==typeof _0x333d48?Object['entries'](_0x333d48)['sort']()['forEach'](([_0x38df2e,_0x46ebac])=>{_0x5075bc(_0x38df2e),_0x6b87bb(_0x46ebac);}):_0x5075bc(window['String'](_0x333d48));}return _0x6b87bb(_0x25d3dc),_0x227dd1>>>0x0;}function _0xacb626(_0x55f5da){return _0x55f5da['toString'](0x10)['padStart'](0x8,'0');}function _0x400e93(_0x50172a){return _0x50172a['split']('')['reverse']()['join']('');}function _0x5836c5(){}_0x5eb1cd(await _0x36c673());}(this);}},I=class extends _0x57fc27{['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 _0xbc3c30=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x56b913;for(const _0x425579 in _0xbc3c30){const _0x367e48=_0x425579,_0x593c97=_0xbc3c30[_0x367e48];if('exportInlineStylesLicenseKeyValid'==_0x593c97||'exportInlineStylesLicenseKeyInvalid'==_0x593c97||'exportInlineStylesLicenseKeyExpired'==_0x593c97||'exportInlineStylesLicenseKeyDomainLimit'==_0x593c97||'exportInlineStylesLicenseKeyNotAllowed'==_0x593c97||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x593c97||'exportInlineStylesLicenseKeyUsageLimit'==_0x593c97){delete _0xbc3c30[_0x367e48],_0x56b913=_0x593c97,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x56b913&&_0xbc3c30['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x56b913&&_0xbc3c30['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x56b913&&_0xbc3c30['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x56b913&&_0xbc3c30['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x56b913&&_0xbc3c30['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x56b913&&_0xbc3c30['_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.1",
|
|
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.1",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.1",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.1",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|