@ckeditor/ckeditor5-export-inline-styles
Version:
The export with inline styles feature for CKEditor 5.
23 lines • 29.3 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
import{Command as _0x53d00e,Plugin as _0x45df8d}from'@ckeditor/ckeditor5-core/dist/index.js';import{collectStylesheets as _0x59dc65,createElement as _0x1a7f2c,uid as _0x258219}from'@ckeditor/ckeditor5-utils/dist/index.js';import{calculate as _0x2d979b,compare as _0x539edd}from'specificity';import{StylesMap as _0xd776e4,addMarginStylesRules as _0x3d783b,addPaddingStylesRules as _0x3e2c6e}from'@ckeditor/ckeditor5-engine/dist/index.js';function T(_0x17f082){const _0x15529c=[];let _0x34fbcc='',_0x79095d=0x0;for(;_0x79095d<_0x17f082['length'];){const _0x535997=_0x17f082[_0x79095d];if('('===_0x535997){const _0x3b7001=M(_0x17f082,_0x79095d+0x1);if(-0x1===_0x3b7001)return[];_0x34fbcc+=_0x17f082['slice'](_0x79095d,_0x3b7001+0x1),_0x79095d=_0x3b7001+0x1;}else','!==_0x535997||_0x34fbcc['endsWith']('\x5c')?(_0x34fbcc+=_0x535997,_0x79095d++):(_0x15529c['push'](_0x34fbcc['trim']()),_0x34fbcc='',_0x79095d++);}return _0x34fbcc['trim']()&&_0x15529c['push'](_0x34fbcc['trim']()),_0x15529c['filter'](Boolean);}function M(_0x24dc34,_0x11958d){let _0x702a7f=0x1;for(let _0x4903b3=_0x11958d;_0x4903b3<_0x24dc34['length'];_0x4903b3++){const _0x4ba59c=_0x24dc34[_0x4903b3];if('('===_0x4ba59c)_0x702a7f++;else{if(')'===_0x4ba59c&&(_0x702a7f--,0x0===_0x702a7f))return _0x4903b3;}}return-0x1;}function L(_0x2a7f00){return _0x2a7f00['replace'](/!\s*important/i,'')['trim']();}function g(_0x341d78,_0x4ab72e){const _0x1fd9ac=new Map(),_0x51f74a=_0x35a734=>_0x1fd9ac['has'](_0x35a734)?_0x1fd9ac['get'](_0x35a734):_0x341d78(_0x35a734);for(const [_0x3ad89a,_0x8705c5]of _0x4ab72e['getStylesEntries']())if(_0x8705c5&&_0x3ad89a['startsWith']('--')){const _0x7b7c5b=b(_0x51f74a,_0x8705c5);_0x1fd9ac['set'](_0x3ad89a,_0x7b7c5b),_0x4ab72e['remove'](_0x3ad89a);}for(const [_0x354a29,_0x4a28b6]of _0x4ab72e['getStylesEntries']())if(_0x4a28b6){const _0x4c7065=b(_0x51f74a,_0x4a28b6);_0x4ab72e['set'](_0x354a29,_0x4c7065);}return _0x1fd9ac;}function b(_0x298bc4,_0x11cff9){return function(_0x1ab01e,_0x2c0fd0){let _0x479a41='',_0x122325=0x0;for(;_0x122325<_0x1ab01e['length'];){const _0x325509=_0x1ab01e['indexOf']('var(',_0x122325);if(-0x1===_0x325509){_0x479a41+=_0x1ab01e['slice'](_0x122325);break;}_0x479a41+=_0x1ab01e['slice'](_0x122325,_0x325509);const _0x581641=_0x325509+0x4,_0x5a834=M(_0x1ab01e,_0x581641);_0x479a41+=_0x2c0fd0(_0x1ab01e['substring'](_0x581641,_0x5a834)),_0x122325=_0x5a834+0x1;}return _0x479a41;}(_0x11cff9,_0x1f21ed=>{const [_0x694eea,_0x249994]=T(_0x1f21ed),_0x3340a3=_0x298bc4(_0x694eea);return void 0x0!==_0x3340a3?_0x3340a3:_0x249994?b(_0x298bc4,_0x249994):'var('+_0x694eea+')';});}async function r(_0xf92a9){const _0x5bb4c9=[await _0x59dc65(_0xf92a9['stylesheets']),_0xf92a9['inlineCss']]['filter'](_0x2e68e1=>_0x2e68e1&&_0x2e68e1['length'])['join']('\x0a'),_0x2d537d=await async function(_0xc860b7,_0x2d905b){const _0x494b4b=new CSSStyleSheet();return await _0x494b4b['replace'](_0x2d905b),C(Array['from'](_0x494b4b['cssRules'])['filter'](_0x2931b0=>_0x2931b0 instanceof CSSStyleRule))['flatMap'](({selectorText:_0x3bcd2d,contentCssText:_0x221d69})=>{const _0x3805e6=T(_0x3bcd2d),_0x36b74a=new _0xd776e4(_0xc860b7)['setTo'](_0x221d69);return _0x3805e6['map'](_0x48102e=>({'stylesMap':_0x36b74a,'flatSelector':_0x48102e,'specificity':_0x2d979b(_0x48102e)[0x0]['specificityArray']}));})['sort']((_0x262ee8,_0x10bb18)=>_0x539edd(_0x262ee8['specificity'],_0x10bb18['specificity']));}(_0xf92a9['stylesProcessor'],_0x5bb4c9);return{'parsedCssRules':_0x2d537d,'rootCssVariables':function(_0x2e71ba){const _0x1fce57=new Map();for(const {stylesMap:_0x184824,flatSelector:_0x1a5e62}of _0x2e71ba){if(':root'!==_0x1a5e62)continue;const _0x54c74c=g(_0x1fce57['get']['bind'](_0x1fce57),_0x184824);for(const [_0x128ec8,_0x450bd8]of _0x54c74c)_0x1fce57['set'](_0x128ec8,_0x450bd8);}return _0x1fce57;}(_0x2d537d)};}function C(_0x4f9125,_0x49bc1f=''){return _0x4f9125['flatMap'](_0x38d1f7=>{const {selectorText:_0x2f5bd2,cssText:_0x580f8e,cssRules:_0xe7a66f}=_0x38d1f7;if(!_0x2f5bd2)return[];const _0x446ee0=_0x2f5bd2['replace'](/&/g,_0x49bc1f);let _0x354e58=_0x580f8e['replace'](_0x2f5bd2,'')['trim']()['replace'](/^{|}$/g,'');if(!_0xe7a66f||!_0xe7a66f['length'])return[{'selectorText':_0x446ee0,'contentCssText':_0x354e58}];for(const _0x5dd692 of _0xe7a66f)_0x354e58=_0x354e58['replace'](_0x5dd692['cssText'],'')['trim']();return[{'selectorText':_0x446ee0,'contentCssText':_0x354e58},...C(Array['from'](_0xe7a66f),_0x446ee0)];});}function l(_0x2683ed,_0x34b80f){const _0x38b1df=new _0xd776e4(_0x2683ed);for(const _0x36efb0 of _0x34b80f){let _0x21f5c4=null;if(_0x21f5c4='string'==typeof _0x36efb0?new _0xd776e4(_0x2683ed)['setTo'](_0x36efb0):_0x36efb0,_0x21f5c4){for(const [_0xa5a812,_0x2253fb]of _0x21f5c4['getStylesEntries']())_0x38b1df['set'](_0xa5a812,_0x2253fb);}}return _0x38b1df;}class w extends _0x53d00e{['_stylesProcessor'];constructor(_0x2bc828){super(_0x2bc828),this['set']('isBusy',!0x1),this['_stylesProcessor']=this['editor']['data']['stylesProcessor'],_0x3d783b(this['_stylesProcessor']),_0x3e2c6e(this['_stylesProcessor']),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}async['execute'](_0x488087){const _0x5e01ac=this['editor']['config']['get']('exportInlineStyles'),{contentLanguageDirection:_0x154ea4}=this['editor']['locale'],{rootName:_0x131e4d='main',dataControllerDowncastOptions:_0x24f76d={},transformations:_0x1f5a3f=_0x5e01ac['transformations']||[]}=_0x488087||{};this['isBusy']=!0x0,this['refresh']();const _0x5482b4=this['_getRootDataHTMLFragment'](_0x131e4d,_0x24f76d),_0x5c23f4=_0x1a7f2c(_0x5482b4['ownerDocument'],'div',{'dir':_0x154ea4,'class':'ck-content'},[_0x5482b4]);return this['_collectAndApplyStyles'](_0x1f5a3f,_0x5c23f4)['then'](()=>{const _0x53704a=function(_0x125153){const _0x2c0cb4=_0x125153['ownerDocument']['createDocumentFragment']();for(;_0x125153['firstChild'];)_0x2c0cb4['appendChild'](_0x125153['firstChild']);return _0x2c0cb4;}(_0x5c23f4),_0x3e6f04=_0x5c23f4['getAttribute']('style');if(_0x3e6f04)for(const _0x5796e2 of _0x53704a['children']){const _0x562588=_0x5796e2['getAttribute']('style'),_0x123904=l(this['_stylesProcessor'],[_0x3e6f04,_0x562588]);_0x5796e2['setAttribute']('style',p(_0x123904));}return this['editor']['data']['htmlProcessor']['htmlWriter']['getHtml'](_0x53704a);})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_getRootDataHTMLFragment'](_0xc4da84,_0x5e8900){const {data:_0x455d0c,model:_0x37281e}=this['editor'],_0xc61ffe=_0x37281e['document']['getRoot'](_0xc4da84),_0x1e309f=_0x455d0c['toView'](_0xc61ffe,_0x5e8900);return _0x455d0c['htmlProcessor']['domConverter']['viewToDom'](_0x1e309f);}async['_collectAndApplyStyles'](_0x1fd48c,_0x255aae){const {stylesheets:_0x2f8bc1,inlineCss:_0x328a75,stripCssClasses:_0x55104d}=this['editor']['config']['get']('exportInlineStyles'),{parsedCssRules:_0x5e4223,rootCssVariables:_0x4293e6}=await r({'stylesheets':_0x2f8bc1||['EDITOR_STYLES'],'stylesProcessor':this['_stylesProcessor'],'inlineCss':_0x328a75});this['_processElementTree']({'transformations':_0x1fd48c,'parsedCssRules':_0x5e4223,'element':_0x255aae,'stripCssClasses':_0x55104d,'parentCSSVariablesLookup':_0x4293e6['get']['bind'](_0x4293e6)});}['_processElementTree']({element:_0x355afd,parsedCssRules:_0x5b9326,parentCSSVariablesLookup:_0x1fde2c,stripCssClasses:_0x4aed17,transformations:_0x2115be}){const {stylesMap:_0x4c2c1b,localCSSVariables:_0x1a4303}=function(_0x28e549){const _0x4ff8e5=_0x28e549['element']['getAttribute']('style')||'',_0x11c296=_0x28e549['parsedCssRules']['filter'](_0x227fba=>_0x28e549['element']['matches'](_0x227fba['flatSelector']))['map'](_0x5d4e74=>_0x5d4e74['stylesMap']),_0x3ff309=l(_0x28e549['stylesProcessor'],[..._0x11c296,_0x4ff8e5]);return{'localCSSVariables':g(_0x28e549['fallbackCSSVariablesLookup'],_0x3ff309),'stylesMap':_0x3ff309};}({'stylesProcessor':this['_stylesProcessor'],'fallbackCSSVariablesLookup':_0x1fde2c,'parsedCssRules':_0x5b9326,'element':_0x355afd});for(const _0x13d547 of _0x2115be)_0x13d547(_0x355afd,_0x4c2c1b);_0x4c2c1b['size']?_0x355afd['setAttribute']('style',p(_0x4c2c1b)):_0x355afd['removeAttribute']('style');const _0x33b0d3=_0x1fe112=>_0x1a4303['has'](_0x1fe112)?_0x1a4303['get'](_0x1fe112):_0x1fde2c(_0x1fe112);for(const _0x361e00 of _0x355afd['children'])_0x361e00 instanceof HTMLElement&&this['_processElementTree']({'element':_0x361e00,'parentCSSVariablesLookup':_0x33b0d3,'parsedCssRules':_0x5b9326,'stripCssClasses':_0x4aed17,'transformations':_0x2115be});_0x4aed17&&_0x355afd['removeAttribute']('class');}}function p(_0xdd6351){return _0xdd6351['getStylesEntries']()['map'](_0x392783=>_0x392783['join'](':'))['join'](';')+';';}class i extends _0x45df8d{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 w(this['editor']));}['afterInit'](){!async function(_0x2064bd){const _0x5086ba=_0x291527([0x78,0x37,0x45,0x77,0x43,0x48,0x41,0x69,0x4d,0x4c,0x33,0x54,0x67,0x58,0x74,0x52,0x63,0x70,0x57,0x46,0x7a,0x65,0x50,0x6b,0x73,0x39,0x56,0x79,0x6c,0x66,0x6e,0x5a,0x62,0x42,0x6d,0x30,0x4a,0x76,0x38,0x32,0x4e,0x49,0x61,0x6a,0x4f,0x36,0x59,0x53,0x47,0x72,0x34,0x71,0x55,0x64,0x4b,0x44,0x75,0x6f,0x51,0x35,0x31,0x68]),_0x543ab8=0x4a8047df,_0x36b254=0x4a872acf^_0x543ab8,_0x6fe344=window[_0x291527([0x44,0x61,0x74,0x65])][_0x291527([0x6e,0x6f,0x77])](),_0x4a66bf=_0x2064bd[_0x291527([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1b3714=new window[(_0x291527([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e3160=>{_0x4a66bf[_0x291527([0x6f,0x6e,0x63,0x65])](_0x291527([0x72,0x65,0x61,0x64,0x79]),_0x3e3160);}),_0x1ca2c8={[_0x291527([0x6b,0x74,0x79])]:_0x291527([0x45,0x43]),[_0x291527([0x75,0x73,0x65])]:_0x291527([0x73,0x69,0x67]),[_0x291527([0x63,0x72,0x76])]:_0x291527([0x50,0x2d,0x32,0x35,0x36]),[_0x291527([0x78])]:_0x291527([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x291527([0x79])]:_0x291527([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x291527([0x61,0x6c,0x67])]:_0x291527([0x45,0x53,0x32,0x35,0x36])},_0x3810b5=_0x4a66bf[_0x291527([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x291527([0x67,0x65,0x74])](_0x291527([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3899c4(){let _0x368850,_0x5cc7d4=null,_0x4f91db=null;try{if(_0x3810b5==_0x291527([0x47,0x50,0x4c]))return _0x291527([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x368850=_0x342667(),!_0x368850)return _0x291527([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x368850[_0x291527([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4f91db=_0x179e5b(_0x368850[_0x291527([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x368850[_0x291527([0x6a,0x74,0x69])])),await _0x36a56f()?_0x42329d()?_0xe101b6()?_0x291527([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3028a2()?(_0x368850[_0x291527([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x291527([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5cc7d4=_0x4638b6(_0x291527([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x368850[_0x291527([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x291527([0x74,0x72,0x69,0x61,0x6c])&&(_0x5cc7d4=_0x4638b6(_0x291527([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x549557()):_0x291527([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x291527([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x291527([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x291527([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xe101b6(){const _0x9c966c=[_0x291527([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x291527([0x74,0x72,0x69,0x61,0x6c])][_0x291527([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x368850[_0x291527([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x6fe344/0x3e8:0xe10*_0x36b254;return _0x368850[_0x291527([0x65,0x78,0x70])]<_0x9c966c;}function _0x42329d(){const _0x1c4b5c=_0x368850[_0x291527([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1c4b5c&&(!!_0x1c4b5c[_0x291527([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x291527([0x2a]))||!!_0x1c4b5c[_0x291527([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x291527([0x45,0x49,0x53])));}function _0x3028a2(){const _0x4b8dca=_0x368850[_0x291527([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4b8dca||0x0==_0x4b8dca[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x250ac5}=new URL(window[_0x291527([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4b8dca[_0x291527([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x250ac5))return!0x0;const _0x2c93b0=_0x250ac5[_0x291527([0x73,0x70,0x6c,0x69,0x74])](_0x291527([0x2e]));return _0x4b8dca[_0x291527([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x538b24=>_0x538b24[_0x291527([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x291527([0x2a])))[_0x291527([0x6d,0x61,0x70])](_0xba0cf3=>_0xba0cf3[_0x291527([0x73,0x70,0x6c,0x69,0x74])](_0x291527([0x2e])))[_0x291527([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1daeff=>_0x1daeff[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2c93b0[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x291527([0x6d,0x61,0x70])](_0x423d34=>Array(_0x2c93b0[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x423d34[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x291527([0x66,0x69,0x6c,0x6c])](_0x423d34[0x0]===_0x291527([0x2a])?_0x291527([0x2a]):'')[_0x291527([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x423d34))[_0x291527([0x73,0x6f,0x6d,0x65])](_0x14bff1=>_0x2c93b0[_0x291527([0x65,0x76,0x65,0x72,0x79])]((_0x47f73c,_0x1c5ba8)=>_0x14bff1[_0x1c5ba8]===_0x47f73c||_0x14bff1[_0x1c5ba8]===_0x291527([0x2a])));}function _0x549557(){return _0x5cc7d4&&_0x4f91db?new window[(_0x291527([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x34b201,_0x2ec984)=>{_0x5cc7d4[_0x291527([0x74,0x68,0x65,0x6e])](_0x34b201,_0x2ec984),_0x4f91db[_0x291527([0x74,0x68,0x65,0x6e])](_0x3b4989=>{_0x3b4989!=_0x291527([0x56,0x61,0x6c,0x69,0x64])&&_0x34b201(_0x3b4989);},_0x2ec984);}):_0x5cc7d4||_0x4f91db||_0x291527([0x56,0x61,0x6c,0x69,0x64]);}}function _0x179e5b(_0x34e75f,_0x1fd331){return new window[(_0x291527([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1abc77=>{if(_0xad7789())return _0x1abc77(_0x291527([0x56,0x61,0x6c,0x69,0x64]));_0x5d09b6(),_0x4a66bf[_0x291527([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x291527([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x54ba01=!0x1;const _0x23892a=_0x258219();function _0x44b64f(_0x360399){return!!_0x360399&&(typeof _0x360399===_0x291527([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x360399===_0x291527([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x360399[_0x291527([0x74,0x68,0x65,0x6e])]===_0x291527([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x360399[_0x291527([0x63,0x61,0x74,0x63,0x68])]===_0x291527([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x160281(_0x14f805){_0x481550(_0x14f805)[_0x291527([0x74,0x68,0x65,0x6e])](_0x22161c=>{if(!_0x22161c||_0x22161c[_0x291527([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x291527([0x6f,0x6b]))return _0x291527([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x672166(_0x3fd93b(_0x23892a+_0x1fd331))!=_0x22161c[_0x291527([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x291527([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x291527([0x56,0x61,0x6c,0x69,0x64]);})[_0x291527([0x74,0x68,0x65,0x6e])](_0x4b37c5=>(_0x690ca8(),_0x4b37c5),()=>{const _0x57e528=_0x3ec8c5();return null==_0x57e528?(_0x690ca8(),_0x291527([0x56,0x61,0x6c,0x69,0x64])):_0x291527(_0x6fe344-_0x57e528>(0x6e8cc3df^_0x543ab8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x291527([0x74,0x68,0x65,0x6e])](_0x1abc77)[_0x291527([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1abc77(_0x291527([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x366c7d=0x4ab6a95f^_0x543ab8;function _0x690ca8(){const _0x3f3831=_0x291527([0x6c,0x6c,0x63,0x74,0x2d])+_0x672166(_0x3fd93b(_0x34e75f)),_0x474334=_0x547a79(_0x672166(window[_0x291527([0x4d,0x61,0x74,0x68])][_0x291527([0x63,0x65,0x69,0x6c])](_0x6fe344/_0x366c7d)));window[_0x291527([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x291527([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f3831,_0x474334);}function _0x3ec8c5(){const _0x8a82f2=_0x291527([0x6c,0x6c,0x63,0x74,0x2d])+_0x672166(_0x3fd93b(_0x34e75f)),_0x7e68ca=window[_0x291527([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x291527([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x8a82f2);return _0x7e68ca?window[_0x291527([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x547a79(_0x7e68ca),0x10)*_0x366c7d:null;}function _0x481550(_0x334e95){return new window[(_0x291527([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x586d7f,_0x16f642)=>{_0x334e95[_0x291527([0x74,0x68,0x65,0x6e])](_0x586d7f,_0x16f642),window[_0x291527([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x16f642,0x4a81931f^_0x543ab8);});}}_0x4a66bf[_0x291527([0x6f,0x6e])](_0x291527([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x16cba1,_0x24ba54)=>{if(_0x24ba54[0x0]!=_0x34e75f)return _0x1abc77(_0x291527([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x24ba54[0x1]={..._0x24ba54[0x1],[_0x291527([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x23892a};},{[_0x291527([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x291527([0x68,0x69,0x67,0x68])}),_0x4a66bf[_0x291527([0x6f,0x6e])](_0x291527([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3f6627=>{_0x44b64f(_0x3f6627[_0x291527([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x54ba01=!0x0,_0x160281(_0x3f6627[_0x291527([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x291527([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x291527([0x6c,0x6f,0x77])}),_0x1b3714[_0x291527([0x74,0x68,0x65,0x6e])](()=>{_0x54ba01||_0x1abc77(_0x291527([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xad7789(){return _0x4a66bf[_0x291527([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x291527([0x76,0x69,0x65,0x77])][_0x291527([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x291527([0x61,0x75,0x74,0x6f]);}function _0x5d09b6(){_0x4a66bf[_0x291527([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x291527([0x76,0x69,0x65,0x77])][_0x291527([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x291527([0x61,0x75,0x74,0x6f]);}}function _0x4638b6(_0x36a178){const _0x5482f1=[new window[(_0x291527([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x46e1ea=>setTimeout(_0x46e1ea,0x4a897913^_0x543ab8)),_0x1b3714[_0x291527([0x74,0x68,0x65,0x6e])](()=>new window[(_0x291527([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ef740=>{let _0x1f5784=0x0;_0x4a66bf[_0x291527([0x6d,0x6f,0x64,0x65,0x6c])][_0x291527([0x6f,0x6e])](_0x291527([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x386f4d,_0x2f0f3f)=>{_0x2f0f3f[0x0][_0x291527([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1f5784++,_0x1f5784==(0x4a804627^_0x543ab8)&&(_0x3ef740(),_0x386f4d[_0x291527([0x6f,0x66,0x66])]());});}))];return window[_0x291527([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x291527([0x72,0x61,0x63,0x65])](_0x5482f1)[_0x291527([0x74,0x68,0x65,0x6e])](()=>_0x36a178);}async function _0x35507e(){await _0x1b3714;const _0x2ece80=_0x4a66bf['commands'][_0x291527([0x67,0x65,0x74])](_0x291527([0x65,0x78,0x70,0x6f,0x72,0x74,0x49,0x6e,0x6c,0x69,0x6e,0x65,0x53,0x74,0x79,0x6c,0x65,0x73]));_0x2ece80&&_0x2ece80[_0x291527([0x6f,0x6e])](_0x291527([0x65,0x78,0x65,0x63,0x75,0x74,0x65]),_0x5978b5=>{_0x5978b5['stop']();},{'priority':_0x291527([0x68,0x69,0x67,0x68,0x65,0x73,0x74])}),_0x4a66bf[_0x291527([0x6d,0x6f,0x64,0x65,0x6c])][_0x291527([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x687c29,_0x4a66bf[_0x291527([0x6d,0x6f,0x64,0x65,0x6c])][_0x291527([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x687c29,_0x4a66bf[_0x291527([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x291527([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x54be93(_0x5c57cb){const _0x119511=_0x3fc431();_0x4a66bf[_0x119511]=_0x291527([0x65,0x78,0x70,0x6f,0x72,0x74,0x49,0x6e,0x6c,0x69,0x6e,0x65,0x53,0x74,0x79,0x6c,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5c57cb,_0x5c57cb!=_0x291527([0x56,0x61,0x6c,0x69,0x64])&&_0x35507e();}function _0x3fc431(){const _0x40f8d5=window[_0x291527([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x291527([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x291527([0x6e,0x6f,0x77])]())[_0x291527([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x291527([0x2e]),'');let _0x2fef7a=_0x291527([0x78]);for(let _0x4545de=0x0;_0x4545de<_0x40f8d5[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4545de+=0x2){let _0x32c95b=window[_0x291527([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x40f8d5[_0x291527([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4545de,_0x4545de+0x2));_0x32c95b>=_0x5086ba[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x32c95b-=_0x5086ba[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2fef7a+=_0x5086ba[_0x32c95b];}return _0x2fef7a;}function _0x342667(){const _0x23fcf6=_0x3810b5[_0x291527([0x73,0x70,0x6c,0x69,0x74])](_0x291527([0x2e]));if(0x3!=_0x23fcf6[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2912d3(_0x23fcf6[0x1]);function _0x2912d3(_0x298c35){const _0x2a1bfc=_0x537e14(_0x298c35);return _0x2a1bfc&&_0x468bbf()?_0x2a1bfc:null;function _0x468bbf(){const _0x211a92=_0x2a1bfc[_0x291527([0x6a,0x74,0x69])],_0x5d2fc3=window[_0x291527([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x211a92[_0x291527([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x211a92[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5db317={..._0x2a1bfc,[_0x291527([0x6a,0x74,0x69])]:_0x211a92[_0x291527([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x211a92[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5db317[_0x291527([0x76,0x63])],_0x3fd93b(_0x5db317)==_0x5d2fc3;}}}async function _0x36a56f(){let _0x10984c=!0x0;try{const _0x4cac46=_0x3810b5[_0x291527([0x73,0x70,0x6c,0x69,0x74])](_0x291527([0x2e])),[_0x404a86,_0x553943,_0x5e1f10]=_0x4cac46;return _0x543b7d(_0x404a86),await _0x1c0623(_0x404a86,_0x553943,_0x5e1f10),_0x10984c;}catch{return!0x1;}function _0x543b7d(_0x48835d){const _0x3f6824=_0x537e14(_0x48835d);_0x3f6824&&_0x3f6824[_0x291527([0x61,0x6c,0x67])]==_0x291527([0x45,0x53,0x32,0x35,0x36])||(_0x10984c=!0x1);}async function _0x1c0623(_0x3d8d51,_0x534514,_0x52eed9){const _0x29e8db=window[_0x291527([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x291527([0x66,0x72,0x6f,0x6d])](_0x1f04b5(_0x52eed9),_0x3ea011=>_0x3ea011[_0x291527([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x45e1d4=new window[(_0x291527([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x291527([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3d8d51+_0x291527([0x2e])+_0x534514),_0x414b60=window[_0x291527([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x291527([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x414b60)return;const _0x2d490a=await _0x414b60[_0x291527([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x291527([0x6a,0x77,0x6b]),_0x1ca2c8,{[_0x291527([0x6e,0x61,0x6d,0x65])]:_0x291527([0x45,0x43,0x44,0x53,0x41]),[_0x291527([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x291527([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x291527([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x414b60[_0x291527([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x291527([0x6e,0x61,0x6d,0x65])]:_0x291527([0x45,0x43,0x44,0x53,0x41]),[_0x291527([0x68,0x61,0x73,0x68])]:{[_0x291527([0x6e,0x61,0x6d,0x65])]:_0x291527([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2d490a,_0x29e8db,_0x45e1d4)||(_0x10984c=!0x1);}}function _0x537e14(_0x557a05){return _0x557a05[_0x291527([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x291527([0x65,0x79]))?JSON[_0x291527([0x70,0x61,0x72,0x73,0x65])](_0x1f04b5(_0x557a05)):null;}function _0x1f04b5(_0xec7de){return window[_0x291527([0x61,0x74,0x6f,0x62])](_0xec7de[_0x291527([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x291527([0x2b]))[_0x291527([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x291527([0x2f])));}function _0x3fd93b(_0x41df72){let _0x12672f=0x1505;function _0xa67369(_0x570c43){for(let _0x3b7a65=0x0;_0x3b7a65<_0x570c43[_0x291527([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b7a65++){const _0x2eb25f=_0x570c43[_0x291527([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3b7a65);_0x12672f=(_0x12672f<<0x5)+_0x12672f+_0x2eb25f,_0x12672f&=_0x12672f;}}function _0x398d2f(_0x32b250){Array[_0x291527([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x32b250)?_0x32b250[_0x291527([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x398d2f):_0x32b250&&typeof _0x32b250==_0x291527([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x291527([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x32b250)[_0x291527([0x73,0x6f,0x72,0x74])]()[_0x291527([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5321e4,_0x1ef145])=>{_0xa67369(_0x5321e4),_0x398d2f(_0x1ef145);}):_0xa67369(window[_0x291527([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x32b250));}return _0x398d2f(_0x41df72),_0x12672f>>>0x0;}function _0x672166(_0x165ec7){return _0x165ec7[_0x291527([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x291527([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x291527([0x30]));}function _0x547a79(_0x42ce3d){return _0x42ce3d[_0x291527([0x73,0x70,0x6c,0x69,0x74])]('')[_0x291527([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x291527([0x6a,0x6f,0x69,0x6e])]('');}function _0x687c29(){}function _0x291527(_0x1c5eb4){return _0x1c5eb4['map'](_0x1d9268=>String['fromCharCode'](_0x1d9268))['join']('');}_0x54be93(await _0x3899c4());}(this);}}class I extends _0x45df8d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'ExportInlineStyles';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[i];}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3f8384=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2dc0b5;for(const _0x5bac6d in _0x3f8384){const _0x4effe4=_0x5bac6d,_0x192ec2=_0x3f8384[_0x4effe4];if('exportInlineStylesLicenseKeyValid'==_0x192ec2||'exportInlineStylesLicenseKeyInvalid'==_0x192ec2||'exportInlineStylesLicenseKeyExpired'==_0x192ec2||'exportInlineStylesLicenseKeyDomainLimit'==_0x192ec2||'exportInlineStylesLicenseKeyNotAllowed'==_0x192ec2||'exportInlineStylesLicenseKeyEvaluationLimit'==_0x192ec2||'exportInlineStylesLicenseKeyTrialLimit'==_0x192ec2||'exportInlineStylesLicenseKeyUsageLimit'==_0x192ec2){delete _0x3f8384[_0x4effe4],_0x2dc0b5=_0x192ec2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'exportInlineStylesLicenseKeyInvalid'==_0x2dc0b5&&_0x3f8384['_showLicenseError']('invalid'),'exportInlineStylesLicenseKeyExpired'==_0x2dc0b5&&_0x3f8384['_showLicenseError']('expired'),'exportInlineStylesLicenseKeyDomainLimit'==_0x2dc0b5&&_0x3f8384['_showLicenseError']('domainLimit'),'exportInlineStylesLicenseKeyNotAllowed'==_0x2dc0b5&&_0x3f8384['_showLicenseError']('featureNotAllowed','ExportInlineStyles'),'exportInlineStylesLicenseKeyEvaluationLimit'==_0x2dc0b5&&_0x3f8384['_showLicenseError']('evaluationLimit'),'exportInlineStylesLicenseKeyTrialLimit'==_0x2dc0b5&&_0x3f8384['_showLicenseError']('trialLimit'),'exportInlineStylesLicenseKeyUsageLimit'==_0x2dc0b5&&_0x3f8384['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}export{I as ExportInlineStyles,w as ExportInlineStylesCommand,i as ExportInlineStylesEditing,L as dropImportantStyleSuffix};