@ckeditor/ckeditor5-export-inline-styles 48.5.0-alpha.6 → 48.5.0
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 _0x39b4b2,Plugin as _0x51399f}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x5d1b1a,createElement as _0x1ccc08,uid as _0x567196}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x4393e9,addMarginStylesRules as _0x3dbfc3,addPaddingStylesRules as _0x3efc2f}from'@ckeditor/ckeditor5-engine';import{calculate as _0x3ae739,compare as _0xc18706}from'specificity';function f(_0x545e61){const _0x5e6e8d=[];let _0x393f3f='',_0x178ef4=0x0;for(;_0x178ef4<_0x545e61['length'];){const _0x53b031=_0x545e61[_0x178ef4];if('('===_0x53b031){const _0x3dbd6b=y(_0x545e61,_0x178ef4+0x1);if(-0x1===_0x3dbd6b)return[];_0x393f3f+=_0x545e61['slice'](_0x178ef4,_0x3dbd6b+0x1),_0x178ef4=_0x3dbd6b+0x1;}else','!==_0x53b031||_0x393f3f['endsWith']('\x5c')?(_0x393f3f+=_0x53b031,_0x178ef4++):(_0x5e6e8d['push'](_0x393f3f['trim']()),_0x393f3f='',_0x178ef4++);}return _0x393f3f['trim']()&&_0x5e6e8d['push'](_0x393f3f['trim']()),_0x5e6e8d['filter'](Boolean);}function y(_0x59c2d,_0x2c2876){let _0x5728ec=0x1;for(let _0x1ff091=_0x2c2876;_0x1ff091<_0x59c2d['length'];_0x1ff091++){const _0x102adc=_0x59c2d[_0x1ff091];if('('===_0x102adc)_0x5728ec++;else{if(')'===_0x102adc&&(_0x5728ec--,0x0===_0x5728ec))return _0x1ff091;}}return-0x1;}function d(_0x226b5b){return _0x226b5b['replace'](/!\s*important/i,'')['trim']();}function w(_0x2ca10a){const _0x5e2992=new Map();for(const {stylesMap:_0x2e505c,flatSelector:_0x4c4ddc}of _0x2ca10a){if(':root'!==_0x4c4ddc)continue;const _0x124f17=p(_0x5e2992['get']['bind'](_0x5e2992),_0x2e505c);for(const [_0x497275,_0x4c6e34]of _0x124f17)_0x5e2992['set'](_0x497275,_0x4c6e34);}return _0x5e2992;}function p(_0x6072e1,_0xc028cf){const _0x72c8e1=new Map(),_0x2a7bc4=_0x22ad0d=>_0x72c8e1['has'](_0x22ad0d)?_0x72c8e1['get'](_0x22ad0d):_0x6072e1(_0x22ad0d);for(const [_0x5807c0,_0x275ec3]of _0xc028cf['getStylesEntries']())if(_0x275ec3&&_0x5807c0['startsWith']('--')){const _0xc1d4c6=m(_0x2a7bc4,_0x275ec3);_0x72c8e1['set'](_0x5807c0,_0xc1d4c6),_0xc028cf['remove'](_0x5807c0);}for(const [_0x1a6d37,_0x2e8edb]of _0xc028cf['getStylesEntries']())if(_0x2e8edb){const _0x2bdd6d=m(_0x2a7bc4,_0x2e8edb);_0xc028cf['set'](_0x1a6d37,_0x2bdd6d);}return _0x72c8e1;}function m(_0x348e34,_0x2ace4b){return function(_0x5b047b,_0x4f4b62){let _0x40bf68='',_0x4ece21=0x0;for(;_0x4ece21<_0x5b047b['length'];){const _0x54526f=_0x5b047b['indexOf']('var(',_0x4ece21);if(-0x1===_0x54526f){_0x40bf68+=_0x5b047b['slice'](_0x4ece21);break;}_0x40bf68+=_0x5b047b['slice'](_0x4ece21,_0x54526f);const _0x4cb6da=_0x54526f+0x4,_0x390c4c=y(_0x5b047b,_0x4cb6da);_0x40bf68+=_0x4f4b62(_0x5b047b['substring'](_0x4cb6da,_0x390c4c)),_0x4ece21=_0x390c4c+0x1;}return _0x40bf68;}(_0x2ace4b,_0x45219a=>{const [_0x38a67d,_0x368b28]=f(_0x45219a),_0x323b77=_0x348e34(_0x38a67d);return void 0x0!==_0x323b77?_0x323b77:_0x368b28?m(_0x348e34,_0x368b28):'var('+_0x38a67d+')';});}async function h(_0xde073a){const _0x4e6a51=[await _0x5d1b1a(_0xde073a['stylesheets']),_0xde073a['inlineCss']]['filter'](_0x1374ec=>_0x1374ec&&_0x1374ec['length'])['join']('\x0a'),_0x5b213a=await async function(_0x3acd3e,_0x4d5df9){const _0x4fb413=new CSSStyleSheet();return await _0x4fb413['replace'](_0x4d5df9),S(Array['from'](_0x4fb413['cssRules'])['filter'](_0x3c56fa=>_0x3c56fa instanceof CSSStyleRule))['flatMap'](({selectorText:_0x12083c,contentCssText:_0x5533e5})=>{const _0x458c89=f(_0x12083c),_0xa06c8d=new _0x4393e9(_0x3acd3e)['setTo'](_0x5533e5);return _0x458c89['map'](_0x530ed0=>{const _0x5f1df5=function(_0x3064c2){const _0x304dcc=':where(';let _0x14cda7=_0x3064c2,_0x2748d2=0x0;for(let _0x577de6=0x0;_0x577de6<0x64;_0x577de6++){const _0x3fd9f5=_0x14cda7['indexOf'](_0x304dcc,_0x2748d2);if(-0x1===_0x3fd9f5)break;let _0x3971e8=0x0;for(let _0xa13726=0x0;_0xa13726<_0x3fd9f5;_0xa13726++)'('===_0x14cda7[_0xa13726]?_0x3971e8++:')'===_0x14cda7[_0xa13726]&&_0x3971e8--;if(_0x3971e8>0x0){_0x2748d2=_0x3fd9f5+0x7;continue;}let _0x2ff632=-0x1;for(let _0x4dd354=_0x3fd9f5+0x7,_0x30605e=0x1;_0x4dd354<_0x14cda7['length'];_0x4dd354++)if('('===_0x14cda7[_0x4dd354]?_0x30605e++:')'===_0x14cda7[_0x4dd354]&&_0x30605e--,!_0x30605e){_0x2ff632=_0x4dd354;break;}-0x1!==_0x2ff632?(_0x14cda7=_0x14cda7['slice'](0x0,_0x3fd9f5)+_0x14cda7['slice'](_0x2ff632+0x1),_0x2748d2=_0x3fd9f5):_0x2748d2=_0x3fd9f5+0x7;}return _0x14cda7['replace'](/\s+/g,'\x20')['trim']();}(_0x530ed0),_0x17fe06=_0x5f1df5?_0x3ae739(_0x5f1df5)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0xa06c8d,'flatSelector':_0x530ed0,'specificity':_0x17fe06};});})['sort']((_0x43dfdc,_0x11131f)=>_0xc18706(_0x43dfdc['specificity'],_0x11131f['specificity']));}(_0xde073a['stylesProcessor'],_0x4e6a51);return{'parsedCssRules':_0x5b213a,'rootCssVariables':w(_0x5b213a)};}function S(_0x5d1802,_0x589389=''){return _0x5d1802['flatMap'](_0x89dd6e=>{const {selectorText:_0x11dd44,cssText:_0x1c6e33,cssRules:_0x2d5045}=_0x89dd6e;if(!_0x11dd44)return[];const _0x4e12a1=_0x11dd44['replace'](/&/g,_0x589389);let _0x32945c=_0x1c6e33['replace'](_0x11dd44,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x2d5045||!_0x2d5045['length'])return[{'selectorText':_0x4e12a1,'contentCssText':_0x32945c}];for(const _0x28b9d6 of _0x2d5045)_0x32945c=_0x32945c['replace'](_0x28b9d6['cssText'],'')['trim']();return[{'selectorText':_0x4e12a1,'contentCssText':_0x32945c},...S(Array['from'](_0x2d5045),_0x4e12a1)];});}function L(_0x546fe1,_0x8ecef6){const _0x234361=new _0x4393e9(_0x546fe1);for(const _0x35ccc7 of _0x8ecef6){let _0x124231;if(_0x124231='string'==typeof _0x35ccc7?new _0x4393e9(_0x546fe1)['setTo'](_0x35ccc7):_0x35ccc7,_0x124231){for(const [_0x353885,_0x5e22c6]of _0x124231['getStylesEntries']())_0x234361['set'](_0x353885,_0x5e22c6);}}return _0x234361;}var g=class extends _0x39b4b2{_stylesProcessor;constructor(_0x1a2d64){super(_0x1a2d64),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x3dbfc3(this['_stylesProcessor']),_0x3efc2f(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x2cb27b){const _0x13950e=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x5251f7}=this['editor']['locale'],{rootName:_0xc52a38='main',dataControllerDowncastOptions:_0x439636={},transformations:_0x5265c7=_0x13950e['transformations']||[]}=_0x2cb27b||{};this['isBusy']=!0x0,this['refresh']();const _0x2ea9da=this['_getRootDataHTMLFragment'](_0xc52a38,_0x439636),_0x1379c0=_0x1ccc08(_0x2ea9da['ownerDocument'],'div',{'dir':_0x5251f7,'class':'ck-content'},[_0x2ea9da]);return this['_collectAndApplyStyles'](_0x5265c7,_0x1379c0)['then'](()=>{const _0x324b4a=function(_0x42e247){const _0x32bb9b=_0x42e247['ownerDocument']['createDocumentFragment']();for(;_0x42e247['firstChild'];)_0x32bb9b['appendChild'](_0x42e247['firstChild']);return _0x32bb9b;}(_0x1379c0),_0x54a816=_0x1379c0['getAttribute']('style');if(_0x54a816)for(const _0x361b82 of _0x324b4a['children']){const _0x4097d9=_0x361b82['getAttribute']('style'),_0x5ab976=L(this['_stylesProcessor'],[_0x54a816,_0x4097d9]);_0x361b82['setAttribute']('style',x(_0x5ab976));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x324b4a);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x504327,_0x55b3bd){const {data:_0x3e565b,model:_0x24a267}=this['editor'],_0x3b9b19=_0x24a267['document']['getRoot'](_0x504327),_0x35704a=_0x3e565b['toView'](_0x3b9b19,_0x55b3bd);return _0x3e565b['htmlProcessor']['domConverter']['viewToDom'](_0x35704a);}async _collectAndApplyStyles(_0x113c32,_0x5a6d6e){const {stylesheets:_0x21f26d,inlineCss:_0x383842,stripCssClasses:_0x285588}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x5ba328,rootCssVariables:_0x3f0721}=await h({'stylesheets':_0x21f26d||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x383842}),_0x309b29=[];this['_processElementTree']({'transformations':_0x113c32,'parsedCssRules':_0x5ba328,'element':_0x5a6d6e,'stripCssClasses':_0x285588,'parentCSSVariablesLookup':_0x3f0721['get']['bind'](_0x3f0721),'runAfterDocumentTransformation':_0x39ad96=>{_0x309b29['unshift'](_0x39ad96);}});for(const _0x5b6b5b of _0x309b29)_0x5b6b5b();}_processElementTree({element:_0x2dafd8,parsedCssRules:_0x32a315,parentCSSVariablesLookup:_0x470c8d,runAfterDocumentTransformation:_0x239c8b,stripCssClasses:_0x22f5f3,transformations:_0x4d80b0}){const {stylesMap:_0x41e6aa,localCSSVariables:_0x5d2e9e}=function(_0x199b3a){const _0x5a4ff1=_0x199b3a['element']['getAttribute']('style')||'',_0x16966e=_0x199b3a['parsedCssRules']['filter'](_0x5aad19=>_0x199b3a['element']['matches'](_0x5aad19['flatSelector']))['map'](_0x4af6ed=>_0x4af6ed['stylesMap']),_0x1abffa=L(_0x199b3a['stylesProcessor'],[..._0x16966e,_0x5a4ff1]);return{'localCSSVariables':p(_0x199b3a['fallbackCSSVariablesLookup'],_0x1abffa),'stylesMap':_0x1abffa};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x470c8d,'parsedCssRules':_0x32a315,'element':_0x2dafd8}),_0x4536df=[];for(const _0x4fdadc of _0x4d80b0){const _0x3c11c4=_0x4fdadc(_0x2dafd8,_0x41e6aa,{'runAfterDocumentTransformation':_0x239c8b,'runAfterChildrenTransformation':_0x565f70=>{_0x4536df['unshift'](_0x565f70);}});_0x3c11c4&&_0x3c11c4 instanceof HTMLElement&&(_0x2dafd8=_0x3c11c4);}_0x41e6aa['size']?_0x2dafd8['setAttribute']('style',x(_0x41e6aa)):_0x2dafd8['removeAttribute']('style');const _0x2f659a=_0xd2b212=>_0x5d2e9e['has'](_0xd2b212)?_0x5d2e9e['get'](_0xd2b212):_0x470c8d(_0xd2b212);for(const _0xbd5ac of _0x2dafd8['children'])_0xbd5ac instanceof HTMLElement&&this['_processElementTree']({'element':_0xbd5ac,'parsedCssRules':_0x32a315,'stripCssClasses':_0x22f5f3,'transformations':_0x4d80b0,'parentCSSVariablesLookup':_0x2f659a,'runAfterDocumentTransformation':_0x239c8b});_0x22f5f3&&_0x2dafd8['removeAttribute']('class');for(const _0x24d973 of _0x4536df)_0x24d973();}};function x(_0x3f1d66){return _0x3f1d66['getStylesEntries']()['map'](_0x43dce0=>_0x43dce0['join'](':'))['join'](';')+';';}var C=class extends _0x51399f{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(_0x3f517a){const _0x9599a8='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x3960df=0x79458,_0x21908a={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x32858b(_0x4c3ce9){const _0x54c5a1=new window['Promise'](_0x5d384f=>{_0x4c3ce9['once']('ready',_0x5d384f);}),_0x5500db=window['Date']['now'](),_0x4467a5=_0x4c3ce9['config']['get']('licenseKey');async function _0x5576a9(){let _0x2153bb,_0x8aa212=null,_0xe04aa6=null;try{return'GPL'==_0x4467a5?'NotAllowed':(_0x2153bb=_0x518031(),_0x2153bb?(_0x2153bb['usageEndpoint']&&(_0xe04aa6=_0x24881d(_0x2153bb['usageEndpoint'],_0x2153bb['jti'])),await _0x4ba3c4()?_0x20b8de()?_0x182d26()?'Expired':_0x6278d9()?('evaluation'==_0x2153bb['licenseType']&&(_0x8aa212=_0x244d0a('EvaluationLimit')),await _0x9a1eb6()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x182d26(){const _0x21e211=['evaluation','trial']['includes'](_0x2153bb['licenseType'])?_0x5500db/0x3e8:0xe10*_0x3960df;return _0x2153bb['exp']<_0x21e211;}function _0x20b8de(){const _0x49d9f7=_0x2153bb['features'];return!!_0x49d9f7&&(!!_0x49d9f7['includes']('*')||!!_0x49d9f7['includes']('EIS'));}function _0x6278d9(){const _0x512b03=_0x2153bb['licensedHosts'];if(!_0x512b03||0x0==_0x512b03['length'])return!0x0;const {hostname:_0x346e15}=new URL(window['location']['href']);if(_0x512b03['includes'](_0x346e15))return!0x0;const _0x1abe6f=_0x346e15['split']('.');return _0x512b03['filter'](_0x15bfc9=>_0x15bfc9['includes']('*'))['map'](_0x1830f2=>_0x1830f2['split']('.'))['filter'](_0x17724b=>_0x17724b['length']<=_0x1abe6f['length'])['map'](_0x27d307=>Array(_0x1abe6f['length']-_0x27d307['length'])['fill']('*'===_0x27d307[0x0]?'*':'')['concat'](_0x27d307))['some'](_0xd6bb0a=>_0x1abe6f['every']((_0x3c56cd,_0x2cd395)=>_0xd6bb0a[_0x2cd395]===_0x3c56cd||'*'===_0xd6bb0a[_0x2cd395]));}function _0x9a1eb6(){return _0x8aa212&&_0xe04aa6?new window['Promise']((_0x309e2c,_0x49e815)=>{_0x8aa212['then'](_0x309e2c,_0x49e815),_0xe04aa6['then'](_0xb798e1=>{'Valid'!=_0xb798e1&&_0x309e2c(_0xb798e1);},_0x49e815);}):_0x8aa212||_0xe04aa6||'Valid';}}function _0x24881d(_0x363f58,_0x20b31b){return new window['Promise'](_0x14f559=>{if(_0x192730())return _0x14f559('Valid');_0x2c6ee6(),_0x4c3ce9['decorate']('_sendUsageRequest');let _0x2c5665=!0x1;const _0x41a6ce=_0x567196();function _0xdf6860(_0x5d79c4){return!!_0x5d79c4&&('object'==typeof _0x5d79c4||'function'==typeof _0x5d79c4)&&'function'==typeof _0x5d79c4['then']&&'function'==typeof _0x5d79c4['catch'];}function _0x361985(_0x56b597){_0x25646b(_0x56b597)['then'](_0x11a9f3=>_0x11a9f3&&'ok'==_0x11a9f3['status']?_0x4055c2(_0x1b6877(_0x41a6ce+_0x20b31b))!=_0x11a9f3['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x534948=>(_0x519dfb(),_0x534948),()=>{const _0x1d5acb=_0x3f718e();return null==_0x1d5acb?(_0x519dfb(),'Valid'):_0x5500db-_0x1d5acb>0x240c8400?'UsageLimit':'Valid';})['then'](_0x14f559)['catch'](()=>{_0x14f559('UsageLimit');});const _0x1cf116=0x36ee80;function _0x519dfb(){const _0x3681d8='llct-'+_0x4055c2(_0x1b6877(_0x363f58)),_0x3c312c=_0xf53d16(_0x4055c2(window['Math']['ceil'](_0x5500db/_0x1cf116)));window['localStorage']['setItem'](_0x3681d8,_0x3c312c);}function _0x3f718e(){const _0xa84918='llct-'+_0x4055c2(_0x1b6877(_0x363f58)),_0x471f9c=window['localStorage']['getItem'](_0xa84918);return _0x471f9c?window['parseInt'](_0xf53d16(_0x471f9c),0x10)*_0x1cf116:null;}function _0x25646b(_0xeb9253){return new window['Promise']((_0x3d101f,_0x26a357)=>{_0xeb9253['then'](_0x3d101f,_0x26a357),window['setTimeout'](_0x26a357,0x1d4c0);});}}_0x4c3ce9['on']('_sendUsageRequest',(_0x4a1134,_0x445ef2)=>{if(_0x445ef2[0x0]!=_0x363f58)return _0x14f559('UsageLimit');_0x445ef2[0x1]={..._0x445ef2[0x1],'requestId':_0x41a6ce};},{'priority':'high'}),_0x4c3ce9['on']('_sendUsageRequest',_0xe5057e=>{_0xdf6860(_0xe5057e['return'])&&(_0x2c5665=!0x0,_0x361985(_0xe5057e['return']));},{'priority':'low'}),_0x54c5a1['then'](()=>{_0x2c5665||_0x14f559('UsageLimit');});});function _0x192730(){return'auto'==_0x4c3ce9['editing']['view']['_overlayModeHint'];}function _0x2c6ee6(){_0x4c3ce9['editing']['view']['_overlayModeHint']='auto';}}function _0x244d0a(_0x1f3f99){const _0x3df553=[new window['Promise'](_0x124580=>setTimeout(_0x124580,0x93ecc)),_0x54c5a1['then'](()=>new window['Promise'](_0x30de07=>{let _0x444687=0x0;_0x4c3ce9['model']['on']('applyOperation',(_0x497b3f,_0x477484)=>{_0x477484[0x0]['isDocumentOperation']&&_0x444687++,0x5e8==_0x444687&&(_0x30de07(),_0x497b3f['off']());});}))];return window['Promise']['race'](_0x3df553)['then'](()=>_0x1f3f99);}async function _0x506027(){await _0x54c5a1;const _0x29bd75=_0x4c3ce9['commands']['get']('exportInlineStyles');_0x29bd75&&_0x29bd75['on']('execute',_0x441fa5=>{_0x441fa5['stop']();},{'priority':'highest'}),_0x4c3ce9['model']['change']=_0xf321e3,_0x4c3ce9['model']['enqueueChange']=_0xf321e3,_0x4c3ce9['enableReadOnlyMode']('model');}function _0x41ef93(_0x5916db){const _0x4ca913=_0x17ab08();_0x4c3ce9[_0x4ca913]='exportInlineStylesLicenseKey'+_0x5916db,'Valid'!=_0x5916db&&_0x506027();}function _0x17ab08(){const _0x3ce3ea=window['String'](window['performance']['now']())['replace']('.','');let _0x2a2120='Q';for(let _0x3453be=0x0;_0x3453be<_0x3ce3ea['length'];_0x3453be+=0x2){let _0x2854b0=window['parseInt'](_0x3ce3ea['substring'](_0x3453be,_0x3453be+0x2));_0x2854b0>=0x3e&&(_0x2854b0-=0x3e),_0x2a2120+=_0x9599a8[_0x2854b0];}return _0x2a2120;}function _0x518031(){const _0xf9b81b=_0x4467a5['split']('.');if(0x3!=_0xf9b81b['length'])return null;return _0x4deaa4(_0xf9b81b[0x1]);function _0x4deaa4(_0x52bdb8){const _0x2cfeac=_0x38c861(_0x52bdb8);return _0x2cfeac&&_0x9d68a3()?_0x2cfeac:null;function _0x9d68a3(){const _0x3e0279=_0x2cfeac['jti'],_0x31257f=window['parseInt'](_0x3e0279['substring'](_0x3e0279['length']-0x8),0x10),_0x5eef2a={..._0x2cfeac,'jti':_0x3e0279['substring'](0x0,_0x3e0279['length']-0x8)};return delete _0x5eef2a['vc'],_0x1b6877(_0x5eef2a)==_0x31257f;}}}async function _0x4ba3c4(){let _0x2bf95c=!0x0;try{const [_0x5b2a37,_0x10ca61,_0x272a34]=_0x4467a5['split']('.');return _0x155139(_0x5b2a37),await _0x3caa26(_0x5b2a37,_0x10ca61,_0x272a34),_0x2bf95c;}catch{return!0x1;}function _0x155139(_0x24411e){const _0x2c762a=_0x38c861(_0x24411e);_0x2c762a&&'ES256'==_0x2c762a['alg']||(_0x2bf95c=!0x1);}async function _0x3caa26(_0x2a7ae7,_0x226fae,_0x199c09){const _0x5f0987=window['Uint8Array']['from'](_0x1accdd(_0x199c09),_0x2a5512=>_0x2a5512['charCodeAt'](0x0)),_0x3774b4=new window['TextEncoder']()['encode'](_0x2a7ae7+'.'+_0x226fae),_0x4b8a8b=window['crypto']['subtle'];if(!_0x4b8a8b)return;const _0x3a9ccb=await _0x4b8a8b['importKey']('jwk',_0x21908a,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4b8a8b['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3a9ccb,_0x5f0987,_0x3774b4)||(_0x2bf95c=!0x1);}}function _0x38c861(_0x373474){return _0x373474['startsWith']('ey')?JSON['parse'](_0x1accdd(_0x373474)):null;}function _0x1accdd(_0x3c0159){return window['atob'](_0x3c0159['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1b6877(_0x3c6693){let _0x10dc97=0x1505;function _0x279ab5(_0x5395e4){for(let _0x111466=0x0;_0x111466<_0x5395e4['length'];_0x111466++){const _0x8d875c=_0x5395e4['charCodeAt'](_0x111466);_0x10dc97=(_0x10dc97<<0x5)+_0x10dc97+_0x8d875c,_0x10dc97&=_0x10dc97;}}function _0x440b58(_0xab27cb){Array['isArray'](_0xab27cb)?_0xab27cb['forEach'](_0x440b58):_0xab27cb&&'object'==typeof _0xab27cb?Object['entries'](_0xab27cb)['sort']()['forEach'](([_0x364acb,_0x4be121])=>{_0x279ab5(_0x364acb),_0x440b58(_0x4be121);}):_0x279ab5(window['String'](_0xab27cb));}return _0x440b58(_0x3c6693),_0x10dc97>>>0x0;}function _0x4055c2(_0x20de4f){return _0x20de4f['toString'](0x10)['padStart'](0x8,'0');}function _0xf53d16(_0x1f2dc4){return _0x1f2dc4['split']('')['reverse']()['join']('');}function _0xf321e3(){}_0x41ef93(await _0x5576a9());}_0x32858b(_0x3f517a['editor']);}(this);}},I=class extends _0x51399f{['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'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x369edd=[this['editor']];for(const _0x9789f6 of _0x369edd){let _0x486506;for(const _0x46b4e9 in _0x9789f6){const _0x55d064=_0x46b4e9,_0x1da943=_0x9789f6[_0x55d064];if('exportInlineStylesLicenseKeyValid'==_0x1da943||'exportInlineStylesLicenseKeyInvalid'==_0x1da943||'exportInlineStylesLicenseKeyExpired'==_0x1da943||'exportInlineStylesLicenseKeyDomainLimit'==_0x1da943||'exportInlineStylesLicenseKeyNotAllowed'==_0x1da943||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x1da943||'exportInlineStylesLicenseKeyUsageLimit'==_0x1da943){delete _0x9789f6[_0x55d064],_0x486506=_0x1da943,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x486506&&_0x9789f6['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x486506&&_0x9789f6['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x486506&&_0x9789f6['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x486506&&_0x9789f6['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x486506&&_0x9789f6['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x486506&&_0x9789f6['_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 _0x554a39,Plugin as _0x1bd2fd}from'@ckeditor/ckeditor5-core';import{collectStylesheets as _0x4f2eca,createElement as _0x3eb2f8,uid as _0x477c1e}from'@ckeditor/ckeditor5-utils';import{StylesMap as _0x37a1b7,addMarginStylesRules as _0x3569d1,addPaddingStylesRules as _0x17121d}from'@ckeditor/ckeditor5-engine';import{calculate as _0x2fd242,compare as _0x34eb9f}from'specificity';function f(_0x54a57a){const _0x35603b=[];let _0x596133='',_0x50d704=0x0;for(;_0x50d704<_0x54a57a['length'];){const _0x8853d9=_0x54a57a[_0x50d704];if('('===_0x8853d9){const _0x426ea2=y(_0x54a57a,_0x50d704+0x1);if(-0x1===_0x426ea2)return[];_0x596133+=_0x54a57a['slice'](_0x50d704,_0x426ea2+0x1),_0x50d704=_0x426ea2+0x1;}else','!==_0x8853d9||_0x596133['endsWith']('\x5c')?(_0x596133+=_0x8853d9,_0x50d704++):(_0x35603b['push'](_0x596133['trim']()),_0x596133='',_0x50d704++);}return _0x596133['trim']()&&_0x35603b['push'](_0x596133['trim']()),_0x35603b['filter'](Boolean);}function y(_0x3f1aa0,_0x5dac71){let _0x5d8f89=0x1;for(let _0x251466=_0x5dac71;_0x251466<_0x3f1aa0['length'];_0x251466++){const _0x372a3e=_0x3f1aa0[_0x251466];if('('===_0x372a3e)_0x5d8f89++;else{if(')'===_0x372a3e&&(_0x5d8f89--,0x0===_0x5d8f89))return _0x251466;}}return-0x1;}function d(_0x3891ca){return _0x3891ca['replace'](/!\s*important/i,'')['trim']();}function w(_0x3d8ff0){const _0x330f80=new Map();for(const {stylesMap:_0x5ab699,flatSelector:_0x4fb3f5}of _0x3d8ff0){if(':root'!==_0x4fb3f5)continue;const _0x98d541=p(_0x330f80['get']['bind'](_0x330f80),_0x5ab699);for(const [_0x345206,_0x390347]of _0x98d541)_0x330f80['set'](_0x345206,_0x390347);}return _0x330f80;}function p(_0x3b4245,_0x2042cd){const _0x4c655e=new Map(),_0x593fe8=_0x3173dc=>_0x4c655e['has'](_0x3173dc)?_0x4c655e['get'](_0x3173dc):_0x3b4245(_0x3173dc);for(const [_0x39e3e0,_0x5cefb9]of _0x2042cd['getStylesEntries']())if(_0x5cefb9&&_0x39e3e0['startsWith']('--')){const _0x4f9757=m(_0x593fe8,_0x5cefb9);_0x4c655e['set'](_0x39e3e0,_0x4f9757),_0x2042cd['remove'](_0x39e3e0);}for(const [_0x5e112b,_0x4d1fce]of _0x2042cd['getStylesEntries']())if(_0x4d1fce){const _0x410643=m(_0x593fe8,_0x4d1fce);_0x2042cd['set'](_0x5e112b,_0x410643);}return _0x4c655e;}function m(_0xd0d5f6,_0x140880){return function(_0x42386f,_0x54e9a4){let _0x107676='',_0x504920=0x0;for(;_0x504920<_0x42386f['length'];){const _0x20b5b0=_0x42386f['indexOf']('var(',_0x504920);if(-0x1===_0x20b5b0){_0x107676+=_0x42386f['slice'](_0x504920);break;}_0x107676+=_0x42386f['slice'](_0x504920,_0x20b5b0);const _0x4c2ff9=_0x20b5b0+0x4,_0x428bd5=y(_0x42386f,_0x4c2ff9);_0x107676+=_0x54e9a4(_0x42386f['substring'](_0x4c2ff9,_0x428bd5)),_0x504920=_0x428bd5+0x1;}return _0x107676;}(_0x140880,_0x27ddc3=>{const [_0x5aee97,_0x794f03]=f(_0x27ddc3),_0x10ff93=_0xd0d5f6(_0x5aee97);return void 0x0!==_0x10ff93?_0x10ff93:_0x794f03?m(_0xd0d5f6,_0x794f03):'var('+_0x5aee97+')';});}async function h(_0xa5be68){const _0x1804bf=[await _0x4f2eca(_0xa5be68['stylesheets']),_0xa5be68['inlineCss']]['filter'](_0x3502d1=>_0x3502d1&&_0x3502d1['length'])['join']('\x0a'),_0x4f5112=await async function(_0x243adc,_0x2845f0){const _0x2a1cde=new CSSStyleSheet();return await _0x2a1cde['replace'](_0x2845f0),S(Array['from'](_0x2a1cde['cssRules'])['filter'](_0x5c2436=>_0x5c2436 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x4a6d24,contentCssText:_0x46a4a1})=>{const _0x3f3d87=f(_0x4a6d24),_0x240aa7=new _0x37a1b7(_0x243adc)['setTo'](_0x46a4a1);return _0x3f3d87['map'](_0x49ac3c=>{const _0x410420=function(_0x109c1e){const _0x130b1e=':where(';let _0x1fb267=_0x109c1e,_0x210870=0x0;for(let _0x16417e=0x0;_0x16417e<0x64;_0x16417e++){const _0x46b8de=_0x1fb267['indexOf'](_0x130b1e,_0x210870);if(-0x1===_0x46b8de)break;let _0x5d338a=0x0;for(let _0x56b474=0x0;_0x56b474<_0x46b8de;_0x56b474++)'('===_0x1fb267[_0x56b474]?_0x5d338a++:')'===_0x1fb267[_0x56b474]&&_0x5d338a--;if(_0x5d338a>0x0){_0x210870=_0x46b8de+0x7;continue;}let _0xf632f2=-0x1;for(let _0xcadfc0=_0x46b8de+0x7,_0xb19fcd=0x1;_0xcadfc0<_0x1fb267['length'];_0xcadfc0++)if('('===_0x1fb267[_0xcadfc0]?_0xb19fcd++:')'===_0x1fb267[_0xcadfc0]&&_0xb19fcd--,!_0xb19fcd){_0xf632f2=_0xcadfc0;break;}-0x1!==_0xf632f2?(_0x1fb267=_0x1fb267['slice'](0x0,_0x46b8de)+_0x1fb267['slice'](_0xf632f2+0x1),_0x210870=_0x46b8de):_0x210870=_0x46b8de+0x7;}return _0x1fb267['replace'](/\s+/g,'\x20')['trim']();}(_0x49ac3c),_0x11e999=_0x410420?_0x2fd242(_0x410420)[0x0]['specificityArray']:[0x0,0x0,0x0,0x0];return{'stylesMap':_0x240aa7,'flatSelector':_0x49ac3c,'specificity':_0x11e999};});})['sort']((_0x62a168,_0x37cf30)=>_0x34eb9f(_0x62a168['specificity'],_0x37cf30['specificity']));}(_0xa5be68['stylesProcessor'],_0x1804bf);return{'parsedCssRules':_0x4f5112,'rootCssVariables':w(_0x4f5112)};}function S(_0x4c71ec,_0x242664=''){return _0x4c71ec['flatMap'](_0x193fd5=>{const {selectorText:_0x3a877d,cssText:_0x2addd1,cssRules:_0x265cc8}=_0x193fd5;if(!_0x3a877d)return[];const _0x474069=_0x3a877d['replace'](/&/g,_0x242664);let _0x97fe8b=_0x2addd1['replace'](_0x3a877d,'')['trim']()['replace'](/^{|}$/g,'');if(!_0x265cc8||!_0x265cc8['length'])return[{'selectorText':_0x474069,'contentCssText':_0x97fe8b}];for(const _0x4c8d6d of _0x265cc8)_0x97fe8b=_0x97fe8b['replace'](_0x4c8d6d['cssText'],'')['trim']();return[{'selectorText':_0x474069,'contentCssText':_0x97fe8b},...S(Array['from'](_0x265cc8),_0x474069)];});}function L(_0x4990db,_0x459190){const _0x33f7ec=new _0x37a1b7(_0x4990db);for(const _0x4aa1b2 of _0x459190){let _0x12fd8f;if(_0x12fd8f='string'==typeof _0x4aa1b2?new _0x37a1b7(_0x4990db)['setTo'](_0x4aa1b2):_0x4aa1b2,_0x12fd8f){for(const [_0x548adf,_0x246cf9]of _0x12fd8f['getStylesEntries']())_0x33f7ec['set'](_0x548adf,_0x246cf9);}}return _0x33f7ec;}var g=class extends _0x554a39{_stylesProcessor;constructor(_0x1d49f9){super(_0x1d49f9),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x3569d1(this['_stylesProcessor']),_0x17121d(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async execute(_0x5a3034){const _0x28bddc=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x23ae4d}=this['editor']['locale'],{rootName:_0x2717cc='main',dataControllerDowncastOptions:_0x50efbf={},transformations:_0x5e57a0=_0x28bddc['transformations']||[]}=_0x5a3034||{};this['isBusy']=!0x0,this['refresh']();const _0x15cc4f=this['_getRootDataHTMLFragment'](_0x2717cc,_0x50efbf),_0x2dc3db=_0x3eb2f8(_0x15cc4f['ownerDocument'],'div',{'dir':_0x23ae4d,'class':'ck-content'},[_0x15cc4f]);return this['_collectAndApplyStyles'](_0x5e57a0,_0x2dc3db)['then'](()=>{const _0x3c56b5=function(_0x1b2319){const _0x19e4e2=_0x1b2319['ownerDocument']['createDocumentFragment']();for(;_0x1b2319['firstChild'];)_0x19e4e2['appendChild'](_0x1b2319['firstChild']);return _0x19e4e2;}(_0x2dc3db),_0x50bd87=_0x2dc3db['getAttribute']('style');if(_0x50bd87)for(const _0x2f4f4f of _0x3c56b5['children']){const _0x4a355c=_0x2f4f4f['getAttribute']('style'),_0x271b58=L(this['_stylesProcessor'],[_0x50bd87,_0x4a355c]);_0x2f4f4f['setAttribute']('style',x(_0x271b58));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x3c56b5);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}_getRootDataHTMLFragment(_0x2fd6a7,_0x236e18){const {data:_0x348a3e,model:_0x2a9d1a}=this['editor'],_0x10849a=_0x2a9d1a['document']['getRoot'](_0x2fd6a7),_0x4883fa=_0x348a3e['toView'](_0x10849a,_0x236e18);return _0x348a3e['htmlProcessor']['domConverter']['viewToDom'](_0x4883fa);}async _collectAndApplyStyles(_0x14b92b,_0x435978){const {stylesheets:_0x1ff972,inlineCss:_0x228ec9,stripCssClasses:_0x2593db}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x29e125,rootCssVariables:_0x4f8f38}=await h({'stylesheets':_0x1ff972||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x228ec9}),_0x5cfcc4=[];this['_processElementTree']({'transformations':_0x14b92b,'parsedCssRules':_0x29e125,'element':_0x435978,'stripCssClasses':_0x2593db,'parentCSSVariablesLookup':_0x4f8f38['get']['bind'](_0x4f8f38),'runAfterDocumentTransformation':_0x4dbe6a=>{_0x5cfcc4['unshift'](_0x4dbe6a);}});for(const _0x127fc5 of _0x5cfcc4)_0x127fc5();}_processElementTree({element:_0x3b5979,parsedCssRules:_0x1fca06,parentCSSVariablesLookup:_0x3310d2,runAfterDocumentTransformation:_0x3a4079,stripCssClasses:_0x103d21,transformations:_0x3d6a59}){const {stylesMap:_0x214ac2,localCSSVariables:_0x16ee14}=function(_0x5d73a8){const _0x143285=_0x5d73a8['element']['getAttribute']('style')||'',_0x31e880=_0x5d73a8['parsedCssRules']['filter'](_0x156dc6=>_0x5d73a8['element']['matches'](_0x156dc6['flatSelector']))['map'](_0x3c96f0=>_0x3c96f0['stylesMap']),_0x44d221=L(_0x5d73a8['stylesProcessor'],[..._0x31e880,_0x143285]);return{'localCSSVariables':p(_0x5d73a8['fallbackCSSVariablesLookup'],_0x44d221),'stylesMap':_0x44d221};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x3310d2,'parsedCssRules':_0x1fca06,'element':_0x3b5979}),_0x40749b=[];for(const _0x430057 of _0x3d6a59){const _0x179b1d=_0x430057(_0x3b5979,_0x214ac2,{'runAfterDocumentTransformation':_0x3a4079,'runAfterChildrenTransformation':_0x4d8f66=>{_0x40749b['unshift'](_0x4d8f66);}});_0x179b1d&&_0x179b1d instanceof HTMLElement&&(_0x3b5979=_0x179b1d);}_0x214ac2['size']?_0x3b5979['setAttribute']('style',x(_0x214ac2)):_0x3b5979['removeAttribute']('style');const _0x11680d=_0x4f7fc2=>_0x16ee14['has'](_0x4f7fc2)?_0x16ee14['get'](_0x4f7fc2):_0x3310d2(_0x4f7fc2);for(const _0x32d487 of _0x3b5979['children'])_0x32d487 instanceof HTMLElement&&this['_processElementTree']({'element':_0x32d487,'parsedCssRules':_0x1fca06,'stripCssClasses':_0x103d21,'transformations':_0x3d6a59,'parentCSSVariablesLookup':_0x11680d,'runAfterDocumentTransformation':_0x3a4079});_0x103d21&&_0x3b5979['removeAttribute']('class');for(const _0x17505b of _0x40749b)_0x17505b();}};function x(_0x2eaa54){return _0x2eaa54['getStylesEntries']()['map'](_0x147efa=>_0x147efa['join'](':'))['join'](';')+';';}var C=class extends _0x1bd2fd{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(_0x20b6e7){const _0x1ef24a='QiLRCSOsZ8pAvDdaPJUE3oxjKlzM2uXgrtGfeyh5cNFkmBw9I6WH0qnb4T17YV',_0x2ba09f=0x79470,_0x4e7888={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x1fdd56(_0x57740a){const _0x6a96f9=new window['Promise'](_0x44b7e1=>{_0x57740a['once']('ready',_0x44b7e1);}),_0x59ccf6=window['Date']['now'](),_0x32e64e=_0x57740a['config']['get']('licenseKey');async function _0x57e9b2(){let _0x1c31fa,_0x3cb460=null,_0x6be3d7=null;try{return'GPL'==_0x32e64e?'NotAllowed':(_0x1c31fa=_0x43b94a(),_0x1c31fa?(_0x1c31fa['usageEndpoint']&&(_0x6be3d7=_0xbc3136(_0x1c31fa['usageEndpoint'],_0x1c31fa['jti'])),await _0x3030bc()?_0x16e2ed()?_0x2d4703()?'Expired':_0x439c64()?('evaluation'==_0x1c31fa['licenseType']&&(_0x3cb460=_0x5deebf('EvaluationLimit')),await _0x580008()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2d4703(){const _0x102790=['evaluation','trial']['includes'](_0x1c31fa['licenseType'])?_0x59ccf6/0x3e8:0xe10*_0x2ba09f;return _0x1c31fa['exp']<_0x102790;}function _0x16e2ed(){const _0xbfa3ba=_0x1c31fa['features'];return!!_0xbfa3ba&&(!!_0xbfa3ba['includes']('*')||!!_0xbfa3ba['includes']('EIS'));}function _0x439c64(){const _0x1fb881=_0x1c31fa['licensedHosts'];if(!_0x1fb881||0x0==_0x1fb881['length'])return!0x0;const {hostname:_0x3fe7b8}=new URL(window['location']['href']);if(_0x1fb881['includes'](_0x3fe7b8))return!0x0;const _0x3f14ec=_0x3fe7b8['split']('.');return _0x1fb881['filter'](_0x291d34=>_0x291d34['includes']('*'))['map'](_0x313ae1=>_0x313ae1['split']('.'))['filter'](_0x5ad51f=>_0x5ad51f['length']<=_0x3f14ec['length'])['map'](_0x16d8fe=>Array(_0x3f14ec['length']-_0x16d8fe['length'])['fill']('*'===_0x16d8fe[0x0]?'*':'')['concat'](_0x16d8fe))['some'](_0x3c0901=>_0x3f14ec['every']((_0x179c5f,_0x14dd71)=>_0x3c0901[_0x14dd71]===_0x179c5f||'*'===_0x3c0901[_0x14dd71]));}function _0x580008(){return _0x3cb460&&_0x6be3d7?new window['Promise']((_0x4a6b1e,_0x3a48cd)=>{_0x3cb460['then'](_0x4a6b1e,_0x3a48cd),_0x6be3d7['then'](_0x4eff8d=>{'Valid'!=_0x4eff8d&&_0x4a6b1e(_0x4eff8d);},_0x3a48cd);}):_0x3cb460||_0x6be3d7||'Valid';}}function _0xbc3136(_0x59f52e,_0x3af167){return new window['Promise'](_0x30097f=>{if(_0x33fcbb())return _0x30097f('Valid');_0x91bc1b(),_0x57740a['decorate']('_sendUsageRequest');let _0x50bd53=!0x1;const _0x5a0ee3=_0x477c1e();function _0x3e585a(_0xbdb30f){return!!_0xbdb30f&&('object'==typeof _0xbdb30f||'function'==typeof _0xbdb30f)&&'function'==typeof _0xbdb30f['then']&&'function'==typeof _0xbdb30f['catch'];}function _0x3f4496(_0x39db5d){_0x25d904(_0x39db5d)['then'](_0x3a78d2=>_0x3a78d2&&'ok'==_0x3a78d2['status']?_0x85057d(_0x2342ce(_0x5a0ee3+_0x3af167))!=_0x3a78d2['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2cc116=>(_0x33d24b(),_0x2cc116),()=>{const _0x4a42e7=_0xb758f2();return null==_0x4a42e7?(_0x33d24b(),'Valid'):_0x59ccf6-_0x4a42e7>0x240c8400?'UsageLimit':'Valid';})['then'](_0x30097f)['catch'](()=>{_0x30097f('UsageLimit');});const _0x4f0d13=0x36ee80;function _0x33d24b(){const _0x2aa92b='llct-'+_0x85057d(_0x2342ce(_0x59f52e)),_0x140a74=_0x26f794(_0x85057d(window['Math']['ceil'](_0x59ccf6/_0x4f0d13)));window['localStorage']['setItem'](_0x2aa92b,_0x140a74);}function _0xb758f2(){const _0x575049='llct-'+_0x85057d(_0x2342ce(_0x59f52e)),_0x27b18a=window['localStorage']['getItem'](_0x575049);return _0x27b18a?window['parseInt'](_0x26f794(_0x27b18a),0x10)*_0x4f0d13:null;}function _0x25d904(_0x44b234){return new window['Promise']((_0x3cff3e,_0x37d9cb)=>{_0x44b234['then'](_0x3cff3e,_0x37d9cb),window['setTimeout'](_0x37d9cb,0x1d4c0);});}}_0x57740a['on']('_sendUsageRequest',(_0x4c24e7,_0x3d144b)=>{if(_0x3d144b[0x0]!=_0x59f52e)return _0x30097f('UsageLimit');_0x3d144b[0x1]={..._0x3d144b[0x1],'requestId':_0x5a0ee3};},{'priority':'high'}),_0x57740a['on']('_sendUsageRequest',_0x2f849a=>{_0x3e585a(_0x2f849a['return'])&&(_0x50bd53=!0x0,_0x3f4496(_0x2f849a['return']));},{'priority':'low'}),_0x6a96f9['then'](()=>{_0x50bd53||_0x30097f('UsageLimit');});});function _0x33fcbb(){return'auto'==_0x57740a['editing']['view']['_overlayModeHint'];}function _0x91bc1b(){_0x57740a['editing']['view']['_overlayModeHint']='auto';}}function _0x5deebf(_0x5acccb){const _0x4ac07a=[new window['Promise'](_0x31b69e=>setTimeout(_0x31b69e,0x93ecc)),_0x6a96f9['then'](()=>new window['Promise'](_0x3fe1cd=>{let _0x1d0a95=0x0;_0x57740a['model']['on']('applyOperation',(_0x5705ba,_0x3351b0)=>{_0x3351b0[0x0]['isDocumentOperation']&&_0x1d0a95++,0x5e8==_0x1d0a95&&(_0x3fe1cd(),_0x5705ba['off']());});}))];return window['Promise']['race'](_0x4ac07a)['then'](()=>_0x5acccb);}async function _0x217c62(){await _0x6a96f9;const _0x230331=_0x57740a['commands']['get']('exportInlineStyles');_0x230331&&_0x230331['on']('execute',_0x56af96=>{_0x56af96['stop']();},{'priority':'highest'}),_0x57740a['model']['change']=_0x22b8c0,_0x57740a['model']['enqueueChange']=_0x22b8c0,_0x57740a['enableReadOnlyMode']('model');}function _0x4d98c4(_0x148348){const _0x305347=_0x365140();_0x57740a[_0x305347]='exportInlineStylesLicenseKey'+_0x148348,'Valid'!=_0x148348&&_0x217c62();}function _0x365140(){const _0x81641c=window['String'](window['performance']['now']())['replace']('.','');let _0x2cd448='Q';for(let _0xb48c87=0x0;_0xb48c87<_0x81641c['length'];_0xb48c87+=0x2){let _0x48b246=window['parseInt'](_0x81641c['substring'](_0xb48c87,_0xb48c87+0x2));_0x48b246>=0x3e&&(_0x48b246-=0x3e),_0x2cd448+=_0x1ef24a[_0x48b246];}return _0x2cd448;}function _0x43b94a(){const _0x26863e=_0x32e64e['split']('.');if(0x3!=_0x26863e['length'])return null;return _0x45d459(_0x26863e[0x1]);function _0x45d459(_0x4534b9){const _0x4e5b11=_0x36b119(_0x4534b9);return _0x4e5b11&&_0x490fb4()?_0x4e5b11:null;function _0x490fb4(){const _0x4f6747=_0x4e5b11['jti'],_0x1b3f72=window['parseInt'](_0x4f6747['substring'](_0x4f6747['length']-0x8),0x10),_0x5ced8a={..._0x4e5b11,'jti':_0x4f6747['substring'](0x0,_0x4f6747['length']-0x8)};return delete _0x5ced8a['vc'],_0x2342ce(_0x5ced8a)==_0x1b3f72;}}}async function _0x3030bc(){let _0x58212d=!0x0;try{const [_0x1c9ebe,_0x3e8f1e,_0x4c24ab]=_0x32e64e['split']('.');return _0x2b0f16(_0x1c9ebe),await _0x51a043(_0x1c9ebe,_0x3e8f1e,_0x4c24ab),_0x58212d;}catch{return!0x1;}function _0x2b0f16(_0x3a36a5){const _0x496f2c=_0x36b119(_0x3a36a5);_0x496f2c&&'ES256'==_0x496f2c['alg']||(_0x58212d=!0x1);}async function _0x51a043(_0x5c8217,_0x863cc4,_0x4860c0){const _0x4cbeb8=window['Uint8Array']['from'](_0x540778(_0x4860c0),_0x3cb5c7=>_0x3cb5c7['charCodeAt'](0x0)),_0x59cbcb=new window['TextEncoder']()['encode'](_0x5c8217+'.'+_0x863cc4),_0x310a36=window['crypto']['subtle'];if(!_0x310a36)return;const _0xf4da57=await _0x310a36['importKey']('jwk',_0x4e7888,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x310a36['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xf4da57,_0x4cbeb8,_0x59cbcb)||(_0x58212d=!0x1);}}function _0x36b119(_0x59fd46){return _0x59fd46['startsWith']('ey')?JSON['parse'](_0x540778(_0x59fd46)):null;}function _0x540778(_0x2e821f){return window['atob'](_0x2e821f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x2342ce(_0x1dabfa){let _0x2df10c=0x1505;function _0x99359d(_0x3ae799){for(let _0xd6ccf5=0x0;_0xd6ccf5<_0x3ae799['length'];_0xd6ccf5++){const _0x4867a7=_0x3ae799['charCodeAt'](_0xd6ccf5);_0x2df10c=(_0x2df10c<<0x5)+_0x2df10c+_0x4867a7,_0x2df10c&=_0x2df10c;}}function _0x48630b(_0x297414){Array['isArray'](_0x297414)?_0x297414['forEach'](_0x48630b):_0x297414&&'object'==typeof _0x297414?Object['entries'](_0x297414)['sort']()['forEach'](([_0x302f75,_0x99c8eb])=>{_0x99359d(_0x302f75),_0x48630b(_0x99c8eb);}):_0x99359d(window['String'](_0x297414));}return _0x48630b(_0x1dabfa),_0x2df10c>>>0x0;}function _0x85057d(_0x4e2977){return _0x4e2977['toString'](0x10)['padStart'](0x8,'0');}function _0x26f794(_0x5ae5b8){return _0x5ae5b8['split']('')['reverse']()['join']('');}function _0x22b8c0(){}_0x4d98c4(await _0x57e9b2());}_0x1fdd56(_0x20b6e7['editor']);}(this);}},I=class extends _0x1bd2fd{['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'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x40d787=[this['editor']];for(const _0x31e081 of _0x40d787){let _0x1720cc;for(const _0x52e1c4 in _0x31e081){const _0xddbd7f=_0x52e1c4,_0x5897b5=_0x31e081[_0xddbd7f];if('exportInlineStylesLicenseKeyValid'==_0x5897b5||'exportInlineStylesLicenseKeyInvalid'==_0x5897b5||'exportInlineStylesLicenseKeyExpired'==_0x5897b5||'exportInlineStylesLicenseKeyDomainLimit'==_0x5897b5||'exportInlineStylesLicenseKeyNotAllowed'==_0x5897b5||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x5897b5||'exportInlineStylesLicenseKeyUsageLimit'==_0x5897b5){delete _0x31e081[_0xddbd7f],_0x1720cc=_0x5897b5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x1720cc&&_0x31e081['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x1720cc&&_0x31e081['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x1720cc&&_0x31e081['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x1720cc&&_0x31e081['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x1720cc&&_0x31e081['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x1720cc&&_0x31e081['_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.5.0
|
|
3
|
+
"version": "48.5.0",
|
|
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.5.0
|
|
38
|
-
"@ckeditor/ckeditor5-engine": "48.5.0
|
|
39
|
-
"@ckeditor/ckeditor5-utils": "48.5.0
|
|
37
|
+
"@ckeditor/ckeditor5-core": "48.5.0",
|
|
38
|
+
"@ckeditor/ckeditor5-engine": "48.5.0",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "48.5.0",
|
|
40
40
|
"specificity": "0.4.1"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|