UNPKG

@ckeditor/ckeditor5-export-inline-styles

Version:

The export with inline styles feature for CKEditor 5.

23 lines 4.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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ (function(_0x41fb69,_0xf8ef02){const _0x5059fd=_0x3d6e,_0x522353=_0x41fb69();while(!![]){try{const _0x43473c=-parseInt(_0x5059fd(0x143))/0x1*(-parseInt(_0x5059fd(0x155))/0x2)+parseInt(_0x5059fd(0x152))/0x3+-parseInt(_0x5059fd(0x14a))/0x4*(-parseInt(_0x5059fd(0x149))/0x5)+parseInt(_0x5059fd(0x14f))/0x6*(-parseInt(_0x5059fd(0x13f))/0x7)+parseInt(_0x5059fd(0x144))/0x8*(parseInt(_0x5059fd(0x147))/0x9)+parseInt(_0x5059fd(0x154))/0xa*(parseInt(_0x5059fd(0x141))/0xb)+-parseInt(_0x5059fd(0x140))/0xc;if(_0x43473c===_0xf8ef02)break;else _0x522353['push'](_0x522353['shift']());}catch(_0x49f4ee){_0x522353['push'](_0x522353['shift']());}}}(_0x3c8d,0xd4a9e));function _0x3d6e(_0x25e74c,_0x367a4f){const _0x3c8da5=_0x3c8d();return _0x3d6e=function(_0x3d6efb,_0x5d8b0f){_0x3d6efb=_0x3d6efb-0x13d;let _0x21f981=_0x3c8da5[_0x3d6efb];return _0x21f981;},_0x3d6e(_0x25e74c,_0x367a4f);}import{findMatchingParenthesis as _0x40d535,splitByTopLevelComma as _0x5e0a66}from'../exportinlinestylesutils.js';export function collectRootStylesheetsVariables(_0x3eaf43){const _0x36b3a1=_0x3d6e,_0x1405c2=new Map();for(const {stylesMap:_0x47da1a,flatSelector:_0x273184}of _0x3eaf43){if(_0x36b3a1(0x153)!==_0x273184)continue;const _0x57dca0=inlineStylesMapCSSVariables(_0x1405c2[_0x36b3a1(0x14e)][_0x36b3a1(0x145)](_0x1405c2),_0x47da1a);for(const [_0x30ce23,_0x523a6e]of _0x57dca0)_0x1405c2[_0x36b3a1(0x14c)](_0x30ce23,_0x523a6e);}return _0x1405c2;}export function inlineStylesMapCSSVariables(_0x46743d,_0x376304){const _0x1a1691=_0x3d6e,_0x1b26c6=new Map(),_0x26158f=_0x3dc3ff=>_0x1b26c6[_0x1a1691(0x13d)](_0x3dc3ff)?_0x1b26c6[_0x1a1691(0x14e)](_0x3dc3ff):_0x46743d(_0x3dc3ff);for(const [_0x273f1c,_0x411a59]of _0x376304[_0x1a1691(0x14d)]())if(_0x411a59&&_0x273f1c[_0x1a1691(0x142)]('--')){const _0x26bbfb=b(_0x26158f,_0x411a59);_0x1b26c6[_0x1a1691(0x14c)](_0x273f1c,_0x26bbfb),_0x376304[_0x1a1691(0x151)](_0x273f1c);}for(const [_0x549d01,_0x18e5fd]of _0x376304[_0x1a1691(0x14d)]())if(_0x18e5fd){const _0x37b337=b(_0x26158f,_0x18e5fd);_0x376304[_0x1a1691(0x14c)](_0x549d01,_0x37b337);}return _0x1b26c6;}function b(_0x328de9,_0x1b4bc3){return function(_0x1e387f,_0x580abc){const _0x1c4817=_0x3d6e;let _0x1583f9='',_0x4ae41b=0x0;for(;_0x4ae41b<_0x1e387f[_0x1c4817(0x14b)];){const _0x1bc792=_0x1e387f[_0x1c4817(0x148)](_0x1c4817(0x146),_0x4ae41b);if(-0x1===_0x1bc792){_0x1583f9+=_0x1e387f[_0x1c4817(0x150)](_0x4ae41b);break;}_0x1583f9+=_0x1e387f[_0x1c4817(0x150)](_0x4ae41b,_0x1bc792);const _0x318996=_0x1bc792+0x4,_0x3c1d45=_0x40d535(_0x1e387f,_0x318996);_0x1583f9+=_0x580abc(_0x1e387f[_0x1c4817(0x13e)](_0x318996,_0x3c1d45)),_0x4ae41b=_0x3c1d45+0x1;}return _0x1583f9;}(_0x1b4bc3,_0x452ccf=>{const _0x1187fd=_0x3d6e,[_0x366225,_0x11f7a6]=_0x5e0a66(_0x452ccf),_0x22d321=_0x328de9(_0x366225);return void 0x0!==_0x22d321?_0x22d321:_0x11f7a6?b(_0x328de9,_0x11f7a6):_0x1187fd(0x146)+_0x366225+')';});}function _0x3c8d(){const _0x413589=['set','getStylesEntries','get','18VsUlhT','slice','remove','3163098VGiAoB',':root','525380joMspD','2NRvURg','has','substring','167965QszQym','49941120YrrDOS','286nNLPbG','startsWith','29786xAIspt','1656DWEFsC','bind','var(','62406KWvYNW','indexOf','870955YPLIkm','28lBbQOw','length'];_0x3c8d=function(){return _0x413589;};return _0x3c8d();}