UNPKG

@ckeditor/ckeditor5-export-inline-styles

Version:

The export with inline styles feature for CKEditor 5.

23 lines 7.42 kB
/* * 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x28b07a=_0x1a8a;(function(_0x47b317,_0x58d711){const _0xc6944d=_0x1a8a,_0x54a28e=_0x47b317();while(!![]){try{const _0x3ba01f=parseInt(_0xc6944d(0x184))/0x1*(parseInt(_0xc6944d(0x193))/0x2)+parseInt(_0xc6944d(0x196))/0x3*(-parseInt(_0xc6944d(0x17d))/0x4)+-parseInt(_0xc6944d(0x1a0))/0x5+-parseInt(_0xc6944d(0x170))/0x6*(-parseInt(_0xc6944d(0x19b))/0x7)+-parseInt(_0xc6944d(0x173))/0x8*(-parseInt(_0xc6944d(0x167))/0x9)+-parseInt(_0xc6944d(0x189))/0xa*(-parseInt(_0xc6944d(0x18a))/0xb)+parseInt(_0xc6944d(0x17a))/0xc;if(_0x3ba01f===_0x58d711)break;else _0x54a28e['push'](_0x54a28e['shift']());}catch(_0x619432){_0x54a28e['push'](_0x54a28e['shift']());}}}(_0x4db4,0xb644f));import{Command as _0x3cf6ba}from'ckeditor5/src/core.js';function _0x4db4(){const _0x439aac=['803GDFGjh','div','getAttribute','then','_collectAndApplyStyles','domConverter','EDITOR_STYLES','exportInlineStyles','execute','1037768tzrsnx','bind','locale','27EAEcQT','removeAttribute','affectsData','htmlWriter','main','24703fStdBA','_getRootDataHTMLFragment','firstChild','transformations','class','6910075dpVVGA','isBusy','_stylesProcessor','set','ownerDocument','477edcjTc','getRoot','pending','map','config','get','_processElementTree','appendChild','finally','1626NhymSc','style','isEnabled','8936LcuIUY','document','refresh','createDocumentFragment','has','getStylesEntries','setAttribute','6875148pUYOmx','stylesProcessor','children','178456VzlKMK','value','data','editor','toView','getHtml','viewToDom','1UcmKjV','join','ck-content','size','htmlProcessor','57910gdqhmn'];_0x4db4=function(){return _0x439aac;};return _0x4db4();}import{createElement as _0x3728e6}from'ckeditor5/src/utils.js';import _0x3e62d0 from'./utils/exportinlinestylescollector.js';function _0x1a8a(_0x540118,_0x1c9f3d){const _0x4db430=_0x4db4();return _0x1a8a=function(_0x1a8aac,_0x59efed){_0x1a8aac=_0x1a8aac-0x163;let _0xac2dd=_0x4db430[_0x1a8aac];return _0xac2dd;},_0x1a8a(_0x540118,_0x1c9f3d);}import _0x2e39d3,{concatStylesMaps as _0x47ae0e}from'./utils/exportinlinestylesmatcher.js';import{addMarginRules as _0x193f0a,addPaddingRules as _0x34b306}from'ckeditor5/src/engine.js';export default class h extends _0x3cf6ba{[_0x28b07a(0x164)];constructor(_0x457544){const _0x208655=_0x28b07a;super(_0x457544),this[_0x208655(0x165)](_0x208655(0x163),!0x1),this[_0x208655(0x164)]=this[_0x208655(0x180)][_0x208655(0x17f)][_0x208655(0x17b)],_0x193f0a(this[_0x208655(0x164)]),_0x34b306(this[_0x208655(0x164)]),this[_0x208655(0x198)]=!0x1;}[_0x28b07a(0x175)](){const _0x27d0a3=_0x28b07a;this[_0x27d0a3(0x172)]=!this[_0x27d0a3(0x163)],this[_0x27d0a3(0x17e)]=this[_0x27d0a3(0x163)]?_0x27d0a3(0x169):void 0x0;}async[_0x28b07a(0x192)](_0x16a6c0){const _0x2d24ae=_0x28b07a,_0x68a77=this[_0x2d24ae(0x180)][_0x2d24ae(0x16b)][_0x2d24ae(0x16c)](_0x2d24ae(0x191)),{contentLanguageDirection:_0x2da421}=this[_0x2d24ae(0x180)][_0x2d24ae(0x195)],{rootName:_0x189b32=_0x2d24ae(0x19a),dataControllerDowncastOptions:_0x3512b3={},transformations:_0x1030ee=_0x68a77[_0x2d24ae(0x19e)]||[]}=_0x16a6c0||{};this[_0x2d24ae(0x163)]=!0x0,this[_0x2d24ae(0x175)]();const _0x553999=this[_0x2d24ae(0x19c)](_0x189b32,_0x3512b3),_0x418b89=_0x3728e6(_0x553999[_0x2d24ae(0x166)],_0x2d24ae(0x18b),{'dir':_0x2da421,'class':_0x2d24ae(0x186)},[_0x553999]);return this[_0x2d24ae(0x18e)](_0x1030ee,_0x418b89)[_0x2d24ae(0x18d)](()=>{const _0x3564b3=_0x2d24ae,_0x27d075=function(_0x48750f){const _0x117278=_0x1a8a,_0x22610f=_0x48750f[_0x117278(0x166)][_0x117278(0x176)]();for(;_0x48750f[_0x117278(0x19d)];)_0x22610f[_0x117278(0x16e)](_0x48750f[_0x117278(0x19d)]);return _0x22610f;}(_0x418b89),_0x10ae5d=_0x418b89[_0x3564b3(0x18c)](_0x3564b3(0x171));if(_0x10ae5d)for(const _0x1e036e of _0x27d075[_0x3564b3(0x17c)]){const _0x291d1b=_0x1e036e[_0x3564b3(0x18c)](_0x3564b3(0x171)),_0x33cdb9=_0x47ae0e(this[_0x3564b3(0x164)],[_0x10ae5d,_0x291d1b]);_0x1e036e[_0x3564b3(0x179)](_0x3564b3(0x171),m(_0x33cdb9));}return this[_0x3564b3(0x180)][_0x3564b3(0x17f)][_0x3564b3(0x188)][_0x3564b3(0x199)][_0x3564b3(0x182)](_0x27d075);})[_0x2d24ae(0x16f)](()=>{const _0x540904=_0x2d24ae;this[_0x540904(0x163)]=!0x1,this[_0x540904(0x175)]();});}[_0x28b07a(0x19c)](_0x27dbbf,_0x2366d6){const _0x386bde=_0x28b07a,{data:_0x32c052,model:_0x5a40ff}=this[_0x386bde(0x180)],_0x3efd7a=_0x5a40ff[_0x386bde(0x174)][_0x386bde(0x168)](_0x27dbbf),_0x19afee=_0x32c052[_0x386bde(0x181)](_0x3efd7a,_0x2366d6);return _0x32c052[_0x386bde(0x188)][_0x386bde(0x18f)][_0x386bde(0x183)](_0x19afee);}async[_0x28b07a(0x18e)](_0x2e0ff7,_0x4de7e4){const _0x2832b0=_0x28b07a,{stylesheets:_0x19e2bc,inlineCss:_0x4d2b88,stripCssClasses:_0x4cdbea}=this[_0x2832b0(0x180)][_0x2832b0(0x16b)][_0x2832b0(0x16c)](_0x2832b0(0x191)),{parsedCssRules:_0xfa2cc3,rootCssVariables:_0x42ab62}=await _0x3e62d0({'stylesheets':_0x19e2bc||[_0x2832b0(0x190)],'stylesProcessor':this[_0x2832b0(0x164)],'inlineCss':_0x4d2b88});this[_0x2832b0(0x16d)]({'transformations':_0x2e0ff7,'parsedCssRules':_0xfa2cc3,'element':_0x4de7e4,'stripCssClasses':_0x4cdbea,'parentCSSVariablesLookup':_0x42ab62[_0x2832b0(0x16c)][_0x2832b0(0x194)](_0x42ab62)});}[_0x28b07a(0x16d)]({element:_0x2d568a,parsedCssRules:_0x9fa305,parentCSSVariablesLookup:_0x4567e6,stripCssClasses:_0x10def2,transformations:_0x15b205}){const _0x1ee4da=_0x28b07a,{stylesMap:_0x563795,localCSSVariables:_0x45a223}=_0x2e39d3({'stylesProcessor':this[_0x1ee4da(0x164)],'fallbackCSSVariablesLookup':_0x4567e6,'parsedCssRules':_0x9fa305,'element':_0x2d568a});for(const _0x2866d8 of _0x15b205)_0x2866d8(_0x2d568a,_0x563795);_0x563795[_0x1ee4da(0x187)]?_0x2d568a[_0x1ee4da(0x179)](_0x1ee4da(0x171),m(_0x563795)):_0x2d568a[_0x1ee4da(0x197)](_0x1ee4da(0x171));const _0x5a48c5=_0x48956d=>_0x45a223[_0x1ee4da(0x177)](_0x48956d)?_0x45a223[_0x1ee4da(0x16c)](_0x48956d):_0x4567e6(_0x48956d);for(const _0x5967e2 of _0x2d568a[_0x1ee4da(0x17c)])_0x5967e2 instanceof HTMLElement&&this[_0x1ee4da(0x16d)]({'element':_0x5967e2,'parentCSSVariablesLookup':_0x5a48c5,'parsedCssRules':_0x9fa305,'stripCssClasses':_0x10def2,'transformations':_0x15b205});_0x10def2&&_0x2d568a[_0x1ee4da(0x197)](_0x1ee4da(0x19f));}}function m(_0x138c3d){const _0x4bd57a=_0x28b07a;return _0x138c3d[_0x4bd57a(0x178)]()[_0x4bd57a(0x16a)](_0x57d945=>_0x57d945[_0x4bd57a(0x185)](':'))[_0x4bd57a(0x185)](';')+';';}