@ckeditor/ckeditor5-paste-from-office-enhanced 48.8.1-alpha.4 → 49.0.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.
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import type { PasteFromOfficeEnhanced } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface PluginsMap {
8
- [PasteFromOfficeEnhanced.pluginName]: PasteFromOfficeEnhanced;
9
- }
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { PasteFromOfficeEnhanced } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface PluginsMap {
8
+ [PasteFromOfficeEnhanced.pluginName]: PasteFromOfficeEnhanced;
9
+ }
10
10
  }
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module paste-from-office-enhanced
7
- */
8
- export { PasteFromOfficeEnhanced } from './pastefromofficeenhanced.js';
9
- import './augmentation.js';
6
+ * @module paste-from-office-enhanced
7
+ */
8
+ export { PasteFromOfficeEnhanced } from "./pastefromofficeenhanced.js";
9
+ import "./augmentation.js";
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x222a13}from'@ckeditor/ckeditor5-core/dist/index.js';import{PasteFromOfficeMSWordNormalizer as _0x531cc5,PasteFromOffice as _0x138f84,parsePasteOfficeHtml as _0x23183b}from'@ckeditor/ckeditor5-paste-from-office/dist/index.js';import{priorities as _0x139688,uid as _0x343d20}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ViewUpcastWriter as _0x319d19,ViewDocument as _0x26a59f,ViewDomConverter as _0x2f4628}from'@ckeditor/ckeditor5-engine/dist/index.js';const u=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function l(_0x425678){return u['test'](_0x425678);}const d=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function w(_0x332267,_0x42248b){const _0x32c7b0=new Map();for(const [_0x4bdf37,_0x58c455]of _0x42248b){if(!_0x4bdf37['tagName']&&!_0x4bdf37['className'])continue;const _0x19d6b1=!_0x4bdf37['tagName']||_0x332267['name']===_0x4bdf37['tagName'],_0x28d358=!_0x4bdf37['className']||_0x332267['hasClass'](_0x4bdf37['className']);_0x19d6b1&&_0x28d358&&_0x32c7b0['set'](_0x4bdf37,_0x58c455);}return _0x32c7b0;}function m(_0x31f84c){const _0x2db30b={};for(let _0x5e0552=0x0;_0x5e0552<_0x31f84c['length'];_0x5e0552++){const _0x2b4242=_0x31f84c[_0x5e0552],_0x5ca6ca=_0x31f84c['getPropertyValue'](_0x2b4242);'initial'!==_0x5ca6ca&&(_0x2db30b[_0x2b4242]=_0x5ca6ca);}return _0x2db30b;}function p(_0x163b72){const _0xa6680=_0x163b72['split'](',')['map'](_0x4f9305=>_0x4f9305['trim']()),_0x19eb06=[];for(const _0x3c762f of _0xa6680){const _0x472d58=d['exec'](_0x3c762f);_0x472d58&&_0x19eb06['push'](_0x472d58['groups']);}return _0x19eb06;}function y(_0x3f6595){const _0x274cfb={};for(const _0x36d778 of _0x3f6595)Object['assign'](_0x274cfb,_0x36d778);return _0x274cfb;}class MSOfficeStylesInliner extends _0x531cc5{['execute'](_0xb19e6a){const {body:_0x54da10,styles:_0xc5c6aa,stylesString:_0x491a94}=_0xb19e6a['_parsedData'],_0x35505a=new _0x319d19(_0x54da10['document']),_0x22e92b=_0x35505a['createRangeIn'](_0x54da10),_0x3d2786=function(_0x3555fb){const _0x154835={};for(const _0x4e0615 of _0x3555fb)for(const _0xbf748d of _0x4e0615['cssRules'])if(_0xbf748d instanceof CSSStyleRule){const _0x1bd59d=m(_0xbf748d['style']);_0x154835[_0xbf748d['selectorText']]=Object['assign']({},_0x154835[_0xbf748d['selectorText']]||{},_0x1bd59d);}return _0x154835;}(_0xc5c6aa),_0x2e057f=function(_0x21d845){const _0x163934=new Map();for(const _0x587150 in _0x21d845){const _0x673e56=p(_0x587150),_0x1d33f0=_0x21d845[_0x587150];for(const _0x2d1477 of _0x673e56)_0x163934['set'](_0x2d1477,_0x1d33f0);}return _0x163934;}(_0x3d2786),_0x2ce339=function(_0x302b4e){const _0x116a2c={},_0x4ea818=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x322785=/\.(?<className>[\w-]+)/g;let _0x59ef4a;for(;null!==(_0x59ef4a=_0x4ea818['exec'](_0x302b4e));){const {selector:_0x51326e,color:_0x3f6721,patternType:_0x4c45f5}=_0x59ef4a['groups'];if('auto'!==_0x3f6721['toLowerCase']()&&'none'!==_0x4c45f5['toLowerCase']()&&'auto'!==_0x4c45f5['toLowerCase']()){for(const _0x1b3c58 of _0x51326e['matchAll'](_0x322785))_0x116a2c[_0x1b3c58['groups']['className']]=_0x3f6721;}}return _0x116a2c;}(_0x491a94);for(const _0x123b78 of _0x22e92b){if('elementStart'!==_0x123b78['type'])continue;const _0x439d34=_0x123b78['item'],_0x31a56a=w(_0x439d34,_0x2e057f),_0x360aa3=_0x31a56a['size']?y(Array['from'](_0x31a56a['values']())):{};if(!('background-color'in _0x360aa3)&&!('background'in _0x360aa3)){for(const [_0x4e980e,_0xbdaa21]of Object['entries'](_0x2ce339))if(_0x439d34['hasClass'](_0x4e980e)){_0x360aa3['background-color']=_0xbdaa21;break;}}for(const _0x2ab733 in _0x360aa3)_0x439d34['hasStyle'](_0x2ab733)||_0x35505a['setStyle'](_0x2ab733,_0x360aa3[_0x2ab733],_0x439d34);}_0xb19e6a['content']=_0x54da10;}['isActive'](_0x48c387){return super['isActive'](_0x48c387)||l(_0x48c387);}}class PasteFromOfficeEnhancedInliner extends _0x222a13{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x138f84];}['init'](){const _0xaec99b=this['editor'],_0x1a1fbb=_0xaec99b['plugins']['get']('ClipboardPipeline'),_0x5cf026=_0xaec99b['editing']['view']['document'],_0x46e0d3=new MSOfficeStylesInliner(_0x5cf026);_0x1a1fbb['on']('inputTransformation',(_0x1e989b,_0x44d148)=>{const _0x43c289=_0x44d148['dataTransfer']['getData']('text/html');_0x46e0d3['isActive'](_0x43c289)&&(_0x44d148['_parsedData']||(_0x44d148['_parsedData']=_0x23183b(_0x43c289,_0x5cf026['stylesProcessor'])),_0x46e0d3['execute'](_0x44d148));},{'priority':_0x139688['get']('high')+0xb});}['afterInit'](){!async function(_0x4931b0){const _0x6a0743=_0x213f37([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x3da863=0x7374585f,_0x2c6221=0x7373d2df^_0x3da863,_0x1fee3d=window[_0x213f37([0x44,0x61,0x74,0x65])][_0x213f37([0x6e,0x6f,0x77])](),_0x38cb84=_0x4931b0[_0x213f37([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x42bbc9=new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53729d=>{_0x38cb84[_0x213f37([0x6f,0x6e,0x63,0x65])](_0x213f37([0x72,0x65,0x61,0x64,0x79]),_0x53729d);}),_0x24b858={[_0x213f37([0x6b,0x74,0x79])]:_0x213f37([0x45,0x43]),[_0x213f37([0x75,0x73,0x65])]:_0x213f37([0x73,0x69,0x67]),[_0x213f37([0x63,0x72,0x76])]:_0x213f37([0x50,0x2d,0x32,0x35,0x36]),[_0x213f37([0x78])]:_0x213f37([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]),[_0x213f37([0x79])]:_0x213f37([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]),[_0x213f37([0x61,0x6c,0x67])]:_0x213f37([0x45,0x53,0x32,0x35,0x36])},_0x4ca719=_0x38cb84[_0x213f37([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x213f37([0x67,0x65,0x74])](_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x34d2f1(){let _0x51e9e4,_0x373087=null,_0x2a6f42=null;try{if(_0x4ca719==_0x213f37([0x47,0x50,0x4c]))return _0x213f37([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x51e9e4=_0x555668(),!_0x51e9e4)return _0x213f37([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x51e9e4[_0x213f37([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a6f42=_0x258ae3(_0x51e9e4[_0x213f37([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x51e9e4[_0x213f37([0x6a,0x74,0x69])])),await _0xb8ed66()?_0x2918af()?_0x17c8f8()?_0x213f37([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5b814d()?(_0x51e9e4[_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x213f37([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x373087=_0x211198(_0x213f37([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x40b8e6()):_0x213f37([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x213f37([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x213f37([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x213f37([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x17c8f8(){const _0x153b78=[_0x213f37([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x213f37([0x74,0x72,0x69,0x61,0x6c])][_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51e9e4[_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1fee3d/0x3e8:0xe10*_0x2c6221;return _0x51e9e4[_0x213f37([0x65,0x78,0x70])]<_0x153b78;}function _0x2918af(){const _0x8d9ed3=_0x51e9e4[_0x213f37([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x8d9ed3&&(!!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x2a]))||(!!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x50,0x4f,0x45]))||(!!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x50,0x50]))||!(!_0x8d9ed3[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))||!_0xe2258e()))));}function _0x5b814d(){const _0x46523c=_0x51e9e4[_0x213f37([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x46523c||0x0==_0x46523c[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x718895}=new URL(window[_0x213f37([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x46523c[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x718895))return!0x0;const _0x33854f=_0x718895[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e]));return _0x46523c[_0x213f37([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x377657=>_0x377657[_0x213f37([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x213f37([0x2a])))[_0x213f37([0x6d,0x61,0x70])](_0x5ac8a5=>_0x5ac8a5[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e])))[_0x213f37([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1414d4=>_0x1414d4[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x33854f[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x213f37([0x6d,0x61,0x70])](_0x1736c4=>Array(_0x33854f[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1736c4[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x213f37([0x66,0x69,0x6c,0x6c])](_0x1736c4[0x0]===_0x213f37([0x2a])?_0x213f37([0x2a]):'')[_0x213f37([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1736c4))[_0x213f37([0x73,0x6f,0x6d,0x65])](_0x195583=>_0x33854f[_0x213f37([0x65,0x76,0x65,0x72,0x79])]((_0x121dba,_0x4ebf34)=>_0x195583[_0x4ebf34]===_0x121dba||_0x195583[_0x4ebf34]===_0x213f37([0x2a])));}function _0x40b8e6(){return _0x373087&&_0x2a6f42?new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4a0967,_0x2525d3)=>{_0x373087[_0x213f37([0x74,0x68,0x65,0x6e])](_0x4a0967,_0x2525d3),_0x2a6f42[_0x213f37([0x74,0x68,0x65,0x6e])](_0x190123=>{_0x190123!=_0x213f37([0x56,0x61,0x6c,0x69,0x64])&&_0x4a0967(_0x190123);},_0x2525d3);}):_0x373087||_0x2a6f42||_0x213f37([0x56,0x61,0x6c,0x69,0x64]);}}function _0x258ae3(_0x59ae79,_0x1538bd){return new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d3710=>{if(_0x1b1d61())return _0x3d3710(_0x213f37([0x56,0x61,0x6c,0x69,0x64]));_0x16c5e4(),_0x38cb84[_0x213f37([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x213f37([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1a9949=!0x1;const _0x5e6b6d=_0x343d20();function _0x5050e8(_0x57c60b){return!!_0x57c60b&&(typeof _0x57c60b===_0x213f37([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x57c60b===_0x213f37([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x57c60b[_0x213f37([0x74,0x68,0x65,0x6e])]===_0x213f37([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x57c60b[_0x213f37([0x63,0x61,0x74,0x63,0x68])]===_0x213f37([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x172834(_0x6a003a){_0xbc7d52(_0x6a003a)[_0x213f37([0x74,0x68,0x65,0x6e])](_0x53e156=>{if(!_0x53e156||_0x53e156[_0x213f37([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x213f37([0x6f,0x6b]))return _0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x386904(_0x1e1d78(_0x5e6b6d+_0x1538bd))!=_0x53e156[_0x213f37([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x213f37([0x56,0x61,0x6c,0x69,0x64]);})[_0x213f37([0x74,0x68,0x65,0x6e])](_0x3c619b=>(_0x2e76d2(),_0x3c619b),()=>{const _0x1ec6b2=_0x3f3d35();return null==_0x1ec6b2?(_0x2e76d2(),_0x213f37([0x56,0x61,0x6c,0x69,0x64])):_0x213f37(_0x1fee3d-_0x1ec6b2>(0x5778dc5f^_0x3da863)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x213f37([0x74,0x68,0x65,0x6e])](_0x3d3710)[_0x213f37([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d3710(_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3e0dea=0x7342b6df^_0x3da863;function _0x2e76d2(){const _0x4dc2cd=_0x213f37([0x6c,0x6c,0x63,0x74,0x2d])+_0x386904(_0x1e1d78(_0x59ae79)),_0x25b505=_0x37fa2e(_0x386904(window[_0x213f37([0x4d,0x61,0x74,0x68])][_0x213f37([0x63,0x65,0x69,0x6c])](_0x1fee3d/_0x3e0dea)));window[_0x213f37([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x213f37([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4dc2cd,_0x25b505);}function _0x3f3d35(){const _0x5394e6=_0x213f37([0x6c,0x6c,0x63,0x74,0x2d])+_0x386904(_0x1e1d78(_0x59ae79)),_0x379594=window[_0x213f37([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x213f37([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5394e6);return _0x379594?window[_0x213f37([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37fa2e(_0x379594),0x10)*_0x3e0dea:null;}function _0xbc7d52(_0x52f457){return new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6ea71b,_0x23968d)=>{_0x52f457[_0x213f37([0x74,0x68,0x65,0x6e])](_0x6ea71b,_0x23968d),window[_0x213f37([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x23968d,0x73758c9f^_0x3da863);});}}_0x38cb84[_0x213f37([0x6f,0x6e])](_0x213f37([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1a7867,_0x2cb178)=>{if(_0x2cb178[0x0]!=_0x59ae79)return _0x3d3710(_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2cb178[0x1]={..._0x2cb178[0x1],[_0x213f37([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5e6b6d};},{[_0x213f37([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x213f37([0x68,0x69,0x67,0x68])}),_0x38cb84[_0x213f37([0x6f,0x6e])](_0x213f37([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17f530=>{_0x5050e8(_0x17f530[_0x213f37([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1a9949=!0x0,_0x172834(_0x17f530[_0x213f37([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x213f37([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x213f37([0x6c,0x6f,0x77])}),_0x42bbc9[_0x213f37([0x74,0x68,0x65,0x6e])](()=>{_0x1a9949||_0x3d3710(_0x213f37([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1b1d61(){return _0x38cb84[_0x213f37([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x213f37([0x76,0x69,0x65,0x77])][_0x213f37([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x213f37([0x61,0x75,0x74,0x6f]);}function _0x16c5e4(){_0x38cb84[_0x213f37([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x213f37([0x76,0x69,0x65,0x77])][_0x213f37([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x213f37([0x61,0x75,0x74,0x6f]);}}function _0x211198(_0x364bc1){const _0x2f97f0=[new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x7cc2b6=>setTimeout(_0x7cc2b6,0x737d6693^_0x3da863)),_0x42bbc9[_0x213f37([0x74,0x68,0x65,0x6e])](()=>new window[(_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d55b6=>{let _0x4fcd1e=0x0;_0x38cb84[_0x213f37([0x6d,0x6f,0x64,0x65,0x6c])][_0x213f37([0x6f,0x6e])](_0x213f37([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x235544,_0x565425)=>{_0x565425[0x0][_0x213f37([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4fcd1e++,_0x4fcd1e==(0x73745db7^_0x3da863)&&(_0x5d55b6(),_0x235544[_0x213f37([0x6f,0x66,0x66])]());});}))];return window[_0x213f37([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x213f37([0x72,0x61,0x63,0x65])](_0x2f97f0)[_0x213f37([0x74,0x68,0x65,0x6e])](()=>_0x364bc1);}async function _0x8ee6bd(){await _0x42bbc9,_0x38cb84[_0x213f37([0x6d,0x6f,0x64,0x65,0x6c])][_0x213f37([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x33c314,_0x38cb84[_0x213f37([0x6d,0x6f,0x64,0x65,0x6c])][_0x213f37([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x33c314,_0x38cb84[_0x213f37([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x213f37([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xe2258e(){return window[_0x213f37([0x67,0x6c,0x6f,0x62])]&&window[_0x213f37([0x67,0x6c,0x6f,0x62])][_0x213f37([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1a5cdf(_0x3c1aa2){const _0x2637bb=_0x291b2d();_0x38cb84[_0x2637bb]=_0x213f37([0x70,0x61,0x73,0x74,0x65,0x46,0x72,0x6f,0x6d,0x4f,0x66,0x66,0x69,0x63,0x65,0x45,0x6e,0x68,0x61,0x6e,0x63,0x65,0x64,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3c1aa2,_0x3c1aa2!=_0x213f37([0x56,0x61,0x6c,0x69,0x64])&&_0x8ee6bd();}function _0x291b2d(){const _0x568cd9=window[_0x213f37([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x213f37([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x213f37([0x6e,0x6f,0x77])]())[_0x213f37([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x213f37([0x2e]),'');let _0x2d4abd=_0x213f37([0x73]);for(let _0x3bc2b0=0x0;_0x3bc2b0<_0x568cd9[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3bc2b0+=0x2){let _0x355fd6=window[_0x213f37([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x568cd9[_0x213f37([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3bc2b0,_0x3bc2b0+0x2));_0x355fd6>=_0x6a0743[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x355fd6-=_0x6a0743[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2d4abd+=_0x6a0743[_0x355fd6];}return _0x2d4abd;}function _0x555668(){const _0x2cf696=_0x4ca719[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e]));if(0x3!=_0x2cf696[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x36d387(_0x2cf696[0x1]);function _0x36d387(_0x391750){const _0x2d4168=_0x190ac2(_0x391750);return _0x2d4168&&_0x24c252()?_0x2d4168:null;function _0x24c252(){const _0x437be6=_0x2d4168[_0x213f37([0x6a,0x74,0x69])],_0x2fdc8f=window[_0x213f37([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x437be6[_0x213f37([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x437be6[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x19df89={..._0x2d4168,[_0x213f37([0x6a,0x74,0x69])]:_0x437be6[_0x213f37([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x437be6[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x19df89[_0x213f37([0x76,0x63])],_0x1e1d78(_0x19df89)==_0x2fdc8f;}}}async function _0xb8ed66(){let _0x9836f8=!0x0;try{const _0x6f12de=_0x4ca719[_0x213f37([0x73,0x70,0x6c,0x69,0x74])](_0x213f37([0x2e])),[_0x115f81,_0x3055a9,_0x5217a9]=_0x6f12de;return _0x506dbe(_0x115f81),await _0x58ac9d(_0x115f81,_0x3055a9,_0x5217a9),_0x9836f8;}catch{return!0x1;}function _0x506dbe(_0x552b9e){const _0x413430=_0x190ac2(_0x552b9e);_0x413430&&_0x413430[_0x213f37([0x61,0x6c,0x67])]==_0x213f37([0x45,0x53,0x32,0x35,0x36])||(_0x9836f8=!0x1);}async function _0x58ac9d(_0x182a2d,_0x12ea6c,_0x476d71){const _0x522cdb=window[_0x213f37([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x213f37([0x66,0x72,0x6f,0x6d])](_0x558610(_0x476d71),_0x3ff166=>_0x3ff166[_0x213f37([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x400a1e=new window[(_0x213f37([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x213f37([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x182a2d+_0x213f37([0x2e])+_0x12ea6c),_0x238678=window[_0x213f37([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x213f37([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x238678)return;const _0x557ff1=await _0x238678[_0x213f37([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x213f37([0x6a,0x77,0x6b]),_0x24b858,{[_0x213f37([0x6e,0x61,0x6d,0x65])]:_0x213f37([0x45,0x43,0x44,0x53,0x41]),[_0x213f37([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x213f37([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x213f37([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x238678[_0x213f37([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x213f37([0x6e,0x61,0x6d,0x65])]:_0x213f37([0x45,0x43,0x44,0x53,0x41]),[_0x213f37([0x68,0x61,0x73,0x68])]:{[_0x213f37([0x6e,0x61,0x6d,0x65])]:_0x213f37([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x557ff1,_0x522cdb,_0x400a1e)||(_0x9836f8=!0x1);}}function _0x190ac2(_0x53fc78){return _0x53fc78[_0x213f37([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x213f37([0x65,0x79]))?JSON[_0x213f37([0x70,0x61,0x72,0x73,0x65])](_0x558610(_0x53fc78)):null;}function _0x558610(_0x37049b){return window[_0x213f37([0x61,0x74,0x6f,0x62])](_0x37049b[_0x213f37([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x213f37([0x2b]))[_0x213f37([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x213f37([0x2f])));}function _0x1e1d78(_0x297edb){let _0x4d8eb5=0x1505;function _0x19e8dc(_0x105bc8){for(let _0x1076d4=0x0;_0x1076d4<_0x105bc8[_0x213f37([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1076d4++){const _0x3ffff2=_0x105bc8[_0x213f37([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1076d4);_0x4d8eb5=(_0x4d8eb5<<0x5)+_0x4d8eb5+_0x3ffff2,_0x4d8eb5&=_0x4d8eb5;}}function _0x5dae30(_0x2c0f47){Array[_0x213f37([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2c0f47)?_0x2c0f47[_0x213f37([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5dae30):_0x2c0f47&&typeof _0x2c0f47==_0x213f37([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x213f37([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2c0f47)[_0x213f37([0x73,0x6f,0x72,0x74])]()[_0x213f37([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2b6005,_0x4c1d21])=>{_0x19e8dc(_0x2b6005),_0x5dae30(_0x4c1d21);}):_0x19e8dc(window[_0x213f37([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2c0f47));}return _0x5dae30(_0x297edb),_0x4d8eb5>>>0x0;}function _0x386904(_0x2efcd3){return _0x2efcd3[_0x213f37([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x213f37([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x213f37([0x30]));}function _0x37fa2e(_0x536b8f){return _0x536b8f[_0x213f37([0x73,0x70,0x6c,0x69,0x74])]('')[_0x213f37([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x213f37([0x6a,0x6f,0x69,0x6e])]('');}function _0x33c314(){}function _0x213f37(_0x4c9153){return _0x4c9153['map'](_0x1d7570=>String['fromCharCode'](_0x1d7570))['join']('');}_0x1a5cdf(await _0x34d2f1());}(this);}}const g=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],h=['color','font-family','font-size'],O={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x48461b=>Number(_0x48461b)>=0x258,'strong']],'text-decoration':[['underline','u'],['line-through','s']],'text-decoration-line':[['underline','u'],['line-through','s']],'vertical-align':[['sub','sub'],['super','sup']]};function E(_0x4c5a9b){return g['includes'](_0x4c5a9b);}function P(_0x3927d9){return Array['from'](_0x3927d9['getStyleNames']())['filter'](E);}function F(_0x336891,_0x3edb0f,_0xd0bc6b){const {spanStyles:_0x135da3,stylesToBeHtmlElements:_0x30881a}=x(_0x336891,_0xd0bc6b);!function(_0x3dc8fc,_0x20a446,_0x3074b4){for(const _0x42bef9 in _0x3074b4){_0x3074b4[_0x42bef9]['forEach'](([,_0x936e05])=>{const _0x501110=_0x20a446['createElement'](_0x936e05,[],_0x3dc8fc['getChildren']());_0x20a446['insertChild'](0x0,_0x501110,_0x3dc8fc);}),_0x20a446['removeStyle'](_0x42bef9,_0x3dc8fc);}}(_0x336891,_0x3edb0f,_0x30881a),function(_0x9d0a13,_0x270ed6,_0x1a2111){if(!Object['keys'](_0x1a2111)['length'])return;const _0x30104e=_0x270ed6['createElement']('span',[],_0x9d0a13['getChildren']());_0x270ed6['setStyle'](_0x1a2111,_0x30104e),_0x270ed6['insertChild'](0x0,_0x30104e,_0x9d0a13),_0x270ed6['removeStyle'](Object['keys'](_0x1a2111),_0x9d0a13);}(_0x336891,_0x3edb0f,_0x135da3);}function L(_0x123686,_0x3778eb,_0x904ae4){const {spanStyles:_0x57d980}=x(_0x123686,_0x904ae4),_0x25b218=Object['keys'](_0x57d980);if(!_0x25b218['length'])return;let _0x38c37b=!0x1;for(const _0x498623 of _0x123686['getChildren']())if(_0x498623['is']('element','span')){_0x38c37b=!0x0;for(const [_0x439f2d,_0x424f83]of Object['entries'](_0x57d980))_0x498623['hasStyle'](_0x439f2d)||_0x3778eb['setStyle']({[_0x439f2d]:_0x424f83},_0x498623);}_0x38c37b&&_0x3778eb['removeStyle'](_0x25b218,_0x123686);}function x(_0x44b9a0,_0x3ab251){const _0xc6626={},_0x4e15c1={};return _0x3ab251['forEach'](_0x21de33=>{const _0xd52ed8=_0x44b9a0['getStyle'](_0x21de33);if(_0xd52ed8){if(function(_0x47a184){return h['includes'](_0x47a184);}(_0x21de33))_0xc6626[_0x21de33]=_0xd52ed8;else{if(function(_0x5724c4){return _0x5724c4 in O;}(_0x21de33)){const _0x275612=_0xd52ed8['split']('\x20');O[_0x21de33]['forEach'](([_0x3e6979,_0xaa87a5])=>{for(const _0x1aee2b of _0x275612){('function'==typeof _0x3e6979&&_0x3e6979(_0x1aee2b)||_0x3e6979===_0x1aee2b)&&(_0x4e15c1[_0x21de33]=[..._0x4e15c1[_0x21de33]||[],[_0x3e6979,_0xaa87a5]]);}});}}}}),{'spanStyles':_0xc6626,'stylesToBeHtmlElements':_0x4e15c1};}class MSOfficeInlineStylePropagator extends _0x531cc5{['execute'](_0x18da0c){const {body:_0x81eeee}=_0x18da0c['_parsedData'],_0x147b19=new _0x319d19(_0x81eeee['document']),_0x3a7581=_0x147b19['createRangeIn'](_0x81eeee),_0x240215=new _0x26a59f(_0x147b19['document']['stylesProcessor']),_0x4e51ba=[...new _0x2f4628(_0x240215)['blockElements'],'font'],_0x364237=_0x3a7581['getItems']();for(const _0x3d30f9 of _0x364237)if(_0x3d30f9['is']('element')&&_0x4e51ba['includes'](_0x3d30f9['name'])){if(_0x3d30f9['hasStyle']('mso-list')&&'none'!==_0x3d30f9['getStyle']('mso-list')){L(_0x3d30f9,_0x147b19,P(_0x3d30f9));continue;}F(_0x3d30f9,_0x147b19,P(_0x3d30f9));}_0x18da0c['content']=_0x81eeee;}['isActive'](_0x19869a){return super['isActive'](_0x19869a)||l(_0x19869a);}}class PasteFromOfficeEnhancedPropagator extends _0x222a13{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x138f84];}['init'](){const _0x11a624=this['editor'],_0x4becc2=_0x11a624['plugins']['get']('ClipboardPipeline'),_0x46a920=_0x11a624['editing']['view']['document'],_0xab3137=new MSOfficeInlineStylePropagator(_0x46a920);_0x4becc2['on']('inputTransformation',(_0x663202,_0x37d6da)=>{const _0x46d7b3=_0x37d6da['dataTransfer']['getData']('text/html');_0xab3137['isActive'](_0x46d7b3)&&(_0x37d6da['_parsedData']||(_0x37d6da['_parsedData']=_0x23183b(_0x46d7b3,_0x46a920['stylesProcessor'])),_0xab3137['execute'](_0x37d6da));},{'priority':_0x139688['get']('high')+0xa}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x272499=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2d45b0;for(const _0xfe084e in _0x272499){const _0x49c830=_0xfe084e,_0x5d5a37=_0x272499[_0x49c830];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x5d5a37||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x5d5a37){delete _0x272499[_0x49c830],_0x2d45b0=_0x5d5a37,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x2d45b0&&_0x272499['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x2d45b0&&_0x272499['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x2d45b0&&_0x272499['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x2d45b0&&_0x272499['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x2d45b0&&_0x272499['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x2d45b0&&_0x272499['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}class PasteFromOfficeEnhanced extends _0x222a13{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x138f84,PasteFromOfficeEnhancedInliner,PasteFromOfficeEnhancedPropagator];}}export{PasteFromOfficeEnhanced};
23
+ import{Plugin as _0x521308}from'@ckeditor/ckeditor5-core';import{PasteFromOffice as _0x42827c,PasteFromOfficeMSWordNormalizer as _0x22a5e9}from'@ckeditor/ckeditor5-paste-from-office';import{priorities as _0x2f9d86,uid as _0x1bec62}from'@ckeditor/ckeditor5-utils';import{ViewDocument as _0x3969c5,ViewDomConverter as _0x55c840,ViewUpcastWriter as _0x3dec71}from'@ckeditor/ckeditor5-engine';const f=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0x4501ef){return f['test'](_0x4501ef);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x34812f,_0x119d20){const _0x22f0bd=new Map();for(const [_0x5bb33b,_0x31aed9]of _0x119d20){if(!_0x5bb33b['tagName']&&!_0x5bb33b['className'])continue;const _0x1623f2=!_0x5bb33b['tagName']||_0x34812f['name']===_0x5bb33b['tagName'],_0x5493e8=!_0x5bb33b['className']||_0x34812f['hasClass'](_0x5bb33b['className']);_0x1623f2&&_0x5493e8&&_0x22f0bd['set'](_0x5bb33b,_0x31aed9);}return _0x22f0bd;}function m(_0x1f7c63){const _0x4c3fb4={};for(let _0x5dc384=0x0;_0x5dc384<_0x1f7c63['length'];_0x5dc384++){const _0x51f90d=_0x1f7c63[_0x5dc384],_0x2cd691=_0x1f7c63['getPropertyValue'](_0x51f90d);'initial'!==_0x2cd691&&(_0x4c3fb4[_0x51f90d]=_0x2cd691);}return _0x4c3fb4;}function w(_0x5ca1c0){const _0x100022=_0x5ca1c0['split'](',')['map'](_0x5d89fd=>_0x5d89fd['trim']()),_0x492a7f=[];for(const _0x40f811 of _0x100022){const _0x11e08e=l['exec'](_0x40f811);_0x11e08e&&_0x492a7f['push'](_0x11e08e['groups']);}return _0x492a7f;}function y(_0x588b69){const _0x5918b9={};for(const _0x60a46c of _0x588b69)Object['assign'](_0x5918b9,_0x60a46c);return _0x5918b9;}var g=class extends _0x22a5e9{execute(_0x335f35){const {styles:_0x420359,stylesString:_0x28543a}=_0x335f35['extraContent'],_0xfabc5d=new _0x3dec71(_0x335f35['content']['document']),_0x34d630=_0xfabc5d['createRangeIn'](_0x335f35['content']),_0x50dc4a=function(_0x323a35){const _0x162b29={};for(const _0x47a5d4 of _0x323a35)for(const _0xf75881 of _0x47a5d4['cssRules'])if(_0xf75881 instanceof CSSStyleRule){const _0x135f1d=m(_0xf75881['style']);_0x162b29[_0xf75881['selectorText']]=Object['assign']({},_0x162b29[_0xf75881['selectorText']]||{},_0x135f1d);}return _0x162b29;}(_0x420359),_0x3ec51b=function(_0x2ca714){const _0x2343a2=new Map();for(const _0x3deffb in _0x2ca714){const _0x57dc66=w(_0x3deffb),_0x11aaaa=_0x2ca714[_0x3deffb];for(const _0x1402a4 of _0x57dc66)_0x2343a2['set'](_0x1402a4,_0x11aaaa);}return _0x2343a2;}(_0x50dc4a),_0x700df4=function(_0xcc40d3){const _0x5c4fd9={},_0x55a778=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x189ebe=/\.(?<className>[\w-]+)/g;let _0x130667;for(;null!==(_0x130667=_0x55a778['exec'](_0xcc40d3));){const {selector:_0x1e2955,color:_0x1b056e,patternType:_0x30f0cd}=_0x130667['groups'];if('auto'!==_0x1b056e['toLowerCase']()&&'none'!==_0x30f0cd['toLowerCase']()&&'auto'!==_0x30f0cd['toLowerCase']()){for(const _0x20b9a4 of _0x1e2955['matchAll'](_0x189ebe))_0x5c4fd9[_0x20b9a4['groups']['className']]=_0x1b056e;}}return _0x5c4fd9;}(_0x28543a);for(const _0x2a6df9 of _0x34d630){if('elementStart'!==_0x2a6df9['type'])continue;const _0x59e3e4=_0x2a6df9['item'],_0x5a5d58=d(_0x59e3e4,_0x3ec51b),_0x24e5f4=_0x5a5d58['size']?y(Array['from'](_0x5a5d58['values']())):{};if(!('background-color'in _0x24e5f4)&&!('background'in _0x24e5f4)){for(const [_0x138f14,_0x1f493f]of Object['entries'](_0x700df4))if(_0x59e3e4['hasClass'](_0x138f14)){_0x24e5f4['background-color']=_0x1f493f;break;}}for(const _0x2e68f7 in _0x24e5f4)_0x59e3e4['hasStyle'](_0x2e68f7)||_0xfabc5d['setStyle'](_0x2e68f7,_0x24e5f4[_0x2e68f7],_0x59e3e4);}}isActive(_0x4a23ea){return super['isActive'](_0x4a23ea)||u(_0x4a23ea);}},p=class extends _0x521308{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x42827c];}init(){const _0x4ddf99=this['editor'],_0xcf0549=_0x4ddf99['plugins']['get']('PasteFromOffice'),_0x6cabf7=_0x4ddf99['editing']['view']['document'],_0x1fafeb=new g(_0x6cabf7);_0xcf0549['registerNormalizer'](_0x1fafeb,_0x2f9d86['high']+0xb);}afterInit(){!async function(_0x554bc1){const _0x2a1982='umgl1F4YkAVEtv0TcN6nKiXCrhODd2PaGMSIJbspyz9QLBoWxUfj5HZew738Rq',_0x38b49f=0x79728,_0x403c5f={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x126ed3(_0x573358){const _0x1c05ea=new window['Promise'](_0x239211=>{_0x573358['once']('ready',_0x239211);}),_0x4eea72=window['Date']['now'](),_0x12cc5b=_0x573358['config']['get']('licenseKey');async function _0x59a98e(){let _0x45b4b7,_0x3cb345=null,_0x2ab845=null;try{return'GPL'==_0x12cc5b?'NotAllowed':(_0x45b4b7=_0x56fbde(),_0x45b4b7?(_0x45b4b7['usageEndpoint']&&(_0x2ab845=_0x4e2d8e(_0x45b4b7['usageEndpoint'],_0x45b4b7['jti'])),await _0x4324f9()?_0x2b2cfd()?_0x3f146d()?'Expired':_0x59703b()?('evaluation'==_0x45b4b7['licenseType']&&(_0x3cb345=_0x322621('EvaluationLimit')),await _0xad7afa()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3f146d(){const _0x51d3f3=['evaluation','trial']['includes'](_0x45b4b7['licenseType'])?_0x4eea72/0x3e8:0xe10*_0x38b49f;return _0x45b4b7['exp']<_0x51d3f3;}function _0x2b2cfd(){const _0x53e6b0=_0x45b4b7['features'];return!!_0x53e6b0&&(!!_0x53e6b0['includes']('*')||(!!_0x53e6b0['includes']('POE')||(!!_0x53e6b0['includes']('PP')||!(!_0x53e6b0['includes']('TRILIUM')||!_0x32626b()))));}function _0x59703b(){const _0x16e862=_0x45b4b7['licensedHosts'];if(!_0x16e862||0x0==_0x16e862['length'])return!0x0;const {hostname:_0x455242}=new URL(window['location']['href']);if(_0x16e862['includes'](_0x455242))return!0x0;const _0x472f89=_0x455242['split']('.');return _0x16e862['filter'](_0x2f1eff=>_0x2f1eff['includes']('*'))['map'](_0xf86c8=>_0xf86c8['split']('.'))['filter'](_0x502bb9=>_0x502bb9['length']<=_0x472f89['length'])['map'](_0x364629=>Array(_0x472f89['length']-_0x364629['length'])['fill']('*'===_0x364629[0x0]?'*':'')['concat'](_0x364629))['some'](_0x2d275d=>_0x472f89['every']((_0x4ed1a8,_0x1898ce)=>_0x2d275d[_0x1898ce]===_0x4ed1a8||'*'===_0x2d275d[_0x1898ce]));}function _0xad7afa(){return _0x3cb345&&_0x2ab845?new window['Promise']((_0x2c9b40,_0x37c02e)=>{_0x3cb345['then'](_0x2c9b40,_0x37c02e),_0x2ab845['then'](_0x4314b3=>{'Valid'!=_0x4314b3&&_0x2c9b40(_0x4314b3);},_0x37c02e);}):_0x3cb345||_0x2ab845||'Valid';}}function _0x4e2d8e(_0x56d73d,_0x4e0e0f){return new window['Promise'](_0x5c3384=>{if(_0x41a948())return _0x5c3384('Valid');_0x20481e(),_0x573358['decorate']('_sendUsageRequest');let _0x518061=!0x1;const _0x598966=_0x1bec62();function _0x4367c9(_0x19bae7){return!!_0x19bae7&&('object'==typeof _0x19bae7||'function'==typeof _0x19bae7)&&'function'==typeof _0x19bae7['then']&&'function'==typeof _0x19bae7['catch'];}function _0x3b8ca8(_0x2bc7a1){_0x3d10b7(_0x2bc7a1)['then'](_0x358851=>_0x358851&&'ok'==_0x358851['status']?_0x105126(_0x387e2b(_0x598966+_0x4e0e0f))!=_0x358851['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x25a886=>(_0x264017(),_0x25a886),()=>{const _0x11ca26=_0x4c4143();return null==_0x11ca26?(_0x264017(),'Valid'):_0x4eea72-_0x11ca26>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5c3384)['catch'](()=>{_0x5c3384('UsageLimit');});const _0x3107f3=0x36ee80;function _0x264017(){const _0x1e2b3d='llct-'+_0x105126(_0x387e2b(_0x56d73d)),_0x4c4b6f=_0x3c9f15(_0x105126(window['Math']['ceil'](_0x4eea72/_0x3107f3)));window['localStorage']['setItem'](_0x1e2b3d,_0x4c4b6f);}function _0x4c4143(){const _0x5a6d7d='llct-'+_0x105126(_0x387e2b(_0x56d73d)),_0x22adb8=window['localStorage']['getItem'](_0x5a6d7d);return _0x22adb8?window['parseInt'](_0x3c9f15(_0x22adb8),0x10)*_0x3107f3:null;}function _0x3d10b7(_0x4ea087){return new window['Promise']((_0x2966ee,_0x2c3ec3)=>{_0x4ea087['then'](_0x2966ee,_0x2c3ec3),window['setTimeout'](_0x2c3ec3,0x1d4c0);});}}_0x573358['on']('_sendUsageRequest',(_0x36b950,_0x3d8c7d)=>{if(_0x3d8c7d[0x0]!=_0x56d73d)return _0x5c3384('UsageLimit');_0x3d8c7d[0x1]={..._0x3d8c7d[0x1],'requestId':_0x598966};},{'priority':'high'}),_0x573358['on']('_sendUsageRequest',_0x117cf6=>{_0x4367c9(_0x117cf6['return'])&&(_0x518061=!0x0,_0x3b8ca8(_0x117cf6['return']));},{'priority':'low'}),_0x1c05ea['then'](()=>{_0x518061||_0x5c3384('UsageLimit');});});function _0x41a948(){return'auto'==_0x573358['editing']['view']['_overlayModeHint'];}function _0x20481e(){_0x573358['editing']['view']['_overlayModeHint']='auto';}}function _0x322621(_0x4305ae){const _0x526dc7=[new window['Promise'](_0x4cb474=>setTimeout(_0x4cb474,0x93ecc)),_0x1c05ea['then'](()=>new window['Promise'](_0x1ac33f=>{let _0xbe8360=0x0;_0x573358['model']['on']('applyOperation',(_0x3545ea,_0x1a58a8)=>{_0x1a58a8[0x0]['isDocumentOperation']&&_0xbe8360++,0x5e8==_0xbe8360&&(_0x1ac33f(),_0x3545ea['off']());});}))];return window['Promise']['race'](_0x526dc7)['then'](()=>_0x4305ae);}async function _0x173584(){await _0x1c05ea,_0x573358['model']['change']=_0x54d29f,_0x573358['model']['enqueueChange']=_0x54d29f,_0x573358['enableReadOnlyMode']('model');}function _0x32626b(){return window['glob']&&window['glob']['triliumVersion'];}function _0x471e94(_0x585907){const _0x3ace1b=_0x3c775d();_0x573358[_0x3ace1b]='pasteFromOfficeEnhancedLicenseKey'+_0x585907,'Valid'!=_0x585907&&_0x173584();}function _0x3c775d(){const _0x12d396=window['String'](window['performance']['now']())['replace']('.','');let _0x3fbb20='u';for(let _0x56868c=0x0;_0x56868c<_0x12d396['length'];_0x56868c+=0x2){let _0x409b10=window['parseInt'](_0x12d396['substring'](_0x56868c,_0x56868c+0x2));_0x409b10>=0x3e&&(_0x409b10-=0x3e),_0x3fbb20+=_0x2a1982[_0x409b10];}return _0x3fbb20;}function _0x56fbde(){const _0x5194b8=_0x12cc5b['split']('.');if(0x3!=_0x5194b8['length'])return null;return _0x23a8c6(_0x5194b8[0x1]);function _0x23a8c6(_0x36e3e1){const _0x3f1944=_0x46f0ff(_0x36e3e1);return _0x3f1944&&_0x53c9aa()?_0x3f1944:null;function _0x53c9aa(){const _0x549b32=_0x3f1944['jti'],_0x217188=window['parseInt'](_0x549b32['substring'](_0x549b32['length']-0x8),0x10),_0x5ba0f6={..._0x3f1944,'jti':_0x549b32['substring'](0x0,_0x549b32['length']-0x8)};return delete _0x5ba0f6['vc'],_0x387e2b(_0x5ba0f6)==_0x217188;}}}async function _0x4324f9(){let _0x4d431a=!0x0;try{const [_0x2746bd,_0x54c0d8,_0x18c012]=_0x12cc5b['split']('.');return _0x4d9354(_0x2746bd),await _0x4b1bcf(_0x2746bd,_0x54c0d8,_0x18c012),_0x4d431a;}catch{return!0x1;}function _0x4d9354(_0x26770d){const _0x480aed=_0x46f0ff(_0x26770d);_0x480aed&&'ES256'==_0x480aed['alg']||(_0x4d431a=!0x1);}async function _0x4b1bcf(_0x23a593,_0xfc3e3a,_0x5dbb48){const _0x59500a=window['Uint8Array']['from'](_0x5da037(_0x5dbb48),_0x2b93af=>_0x2b93af['charCodeAt'](0x0)),_0x4a3b78=new window['TextEncoder']()['encode'](_0x23a593+'.'+_0xfc3e3a),_0x2568bf=window['crypto']['subtle'];if(!_0x2568bf)return;const _0x1fbb0a=await _0x2568bf['importKey']('jwk',_0x403c5f,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2568bf['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x1fbb0a,_0x59500a,_0x4a3b78)||(_0x4d431a=!0x1);}}function _0x46f0ff(_0x3f22d3){return _0x3f22d3['startsWith']('ey')?JSON['parse'](_0x5da037(_0x3f22d3)):null;}function _0x5da037(_0x493be3){return window['atob'](_0x493be3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x387e2b(_0x438852){let _0xab1bc7=0x1505;function _0x956940(_0x58bf27){for(let _0x5af87b=0x0;_0x5af87b<_0x58bf27['length'];_0x5af87b++){const _0x52ac3c=_0x58bf27['charCodeAt'](_0x5af87b);_0xab1bc7=(_0xab1bc7<<0x5)+_0xab1bc7+_0x52ac3c,_0xab1bc7&=_0xab1bc7;}}function _0x2f5772(_0x146436){Array['isArray'](_0x146436)?_0x146436['forEach'](_0x2f5772):_0x146436&&'object'==typeof _0x146436?Object['entries'](_0x146436)['sort']()['forEach'](([_0x448d21,_0x254bf1])=>{_0x956940(_0x448d21),_0x2f5772(_0x254bf1);}):_0x956940(window['String'](_0x146436));}return _0x2f5772(_0x438852),_0xab1bc7>>>0x0;}function _0x105126(_0x25ec51){return _0x25ec51['toString'](0x10)['padStart'](0x8,'0');}function _0x3c9f15(_0x33d84a){return _0x33d84a['split']('')['reverse']()['join']('');}function _0x54d29f(){}_0x471e94(await _0x59a98e());}_0x126ed3(_0x554bc1['editor']);}(this);}};const h=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],O=['color','font-family','font-size'],L={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x3907ba=>Number(_0x3907ba)>=0x258,'strong']],'text-decoration':[['underline','u'],['line-through','s']],'text-decoration-line':[['underline','u'],['line-through','s']],'vertical-align':[['sub','sub'],['super','sup']]};function E(_0xa8d341){return h['includes'](_0xa8d341);}function v(_0x2a43e2){return Array['from'](_0x2a43e2['getStyleNames']())['filter'](E);}function F(_0x2bc184,_0x7e36d7,_0x4bd9a2){const {spanStyles:_0x44d3ae,stylesToBeHtmlElements:_0x231041}=K(_0x2bc184,_0x4bd9a2);!function(_0x40d356,_0x5b0362,_0x325d3f){for(const _0x1b0ef3 in _0x325d3f)_0x325d3f[_0x1b0ef3]['forEach'](([,_0x396f4b])=>{const _0x49f690=_0x5b0362['createElement'](_0x396f4b,[],_0x40d356['getChildren']());_0x5b0362['insertChild'](0x0,_0x49f690,_0x40d356);}),_0x5b0362['removeStyle'](_0x1b0ef3,_0x40d356);}(_0x2bc184,_0x7e36d7,_0x231041),function(_0x575392,_0x3fa82d,_0x4be3d2){if(!Object['keys'](_0x4be3d2)['length'])return;const _0x220155=_0x3fa82d['createElement']('span',[],_0x575392['getChildren']());_0x3fa82d['setStyle'](_0x4be3d2,_0x220155),_0x3fa82d['insertChild'](0x0,_0x220155,_0x575392),_0x3fa82d['removeStyle'](Object['keys'](_0x4be3d2),_0x575392);}(_0x2bc184,_0x7e36d7,_0x44d3ae);}function P(_0x392c0d,_0x200ec6,_0x3e6723){const {spanStyles:_0x568ff2}=K(_0x392c0d,_0x3e6723),_0x43b3dc=Object['keys'](_0x568ff2);if(!_0x43b3dc['length'])return;let _0x27770b=!0x1;for(const _0x203d82 of _0x392c0d['getChildren']())if(_0x203d82['is']('element','span')){_0x27770b=!0x0;for(const [_0x2f9ab1,_0x4da509]of Object['entries'](_0x568ff2))_0x203d82['hasStyle'](_0x2f9ab1)||_0x200ec6['setStyle']({[_0x2f9ab1]:_0x4da509},_0x203d82);}_0x27770b&&_0x200ec6['removeStyle'](_0x43b3dc,_0x392c0d);}function K(_0x4e6084,_0x40d96b){const _0x2822bf={},_0x193c22={};return _0x40d96b['forEach'](_0x4f733a=>{const _0x495959=_0x4e6084['getStyle'](_0x4f733a);if(_0x495959){if(function(_0x2ce6e0){return O['includes'](_0x2ce6e0);}(_0x4f733a))_0x2822bf[_0x4f733a]=_0x495959;else{if(function(_0x295a3e){return _0x295a3e in L;}(_0x4f733a)){const _0x587c26=_0x495959['split']('\x20');L[_0x4f733a]['forEach'](([_0x4980f1,_0x34c158])=>{for(const _0x4de5b5 of _0x587c26)('function'==typeof _0x4980f1&&_0x4980f1(_0x4de5b5)||_0x4980f1===_0x4de5b5)&&(_0x193c22[_0x4f733a]=[..._0x193c22[_0x4f733a]||[],[_0x4980f1,_0x34c158]]);});}}}}),{'spanStyles':_0x2822bf,'stylesToBeHtmlElements':_0x193c22};}var b=class extends _0x22a5e9{execute(_0x4610fb){const _0x12c8e9=new _0x3dec71(_0x4610fb['content']['document']),_0x4da467=_0x12c8e9['createRangeIn'](_0x4610fb['content']),_0xedd3ff=new _0x3969c5(_0x12c8e9['document']['stylesProcessor']),_0x4d1a8f=[...new _0x55c840(_0xedd3ff)['blockElements'],'font'],_0x5eeeaa=_0x4da467['getItems']();for(const _0x39618c of _0x5eeeaa)if(_0x39618c['is']('element')&&_0x4d1a8f['includes'](_0x39618c['name'])){if(_0x39618c['hasStyle']('mso-list')&&'none'!==_0x39618c['getStyle']('mso-list')){P(_0x39618c,_0x12c8e9,v(_0x39618c));continue;}F(_0x39618c,_0x12c8e9,v(_0x39618c));}}isActive(_0x4f18ef){return super['isActive'](_0x4f18ef)||u(_0x4f18ef);}},x=class extends _0x521308{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x42827c];}init(){const _0x61a7b8=this['editor'],_0x243c91=_0x61a7b8['plugins']['get']('PasteFromOffice'),_0xd80c94=_0x61a7b8['editing']['view']['document'],_0x3fce51=new b(_0xd80c94);_0x243c91['registerNormalizer'](_0x3fce51,_0x2f9d86['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x483b39=[this['editor']];for(const _0x188d52 of _0x483b39){let _0x4a6b24;for(const _0x177c08 in _0x188d52){const _0x3b43f4=_0x177c08,_0x81bba6=_0x188d52[_0x3b43f4];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x81bba6||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x81bba6||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x81bba6||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x81bba6||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x81bba6||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x81bba6||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x81bba6){delete _0x188d52[_0x3b43f4],_0x4a6b24=_0x81bba6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x4a6b24&&_0x188d52['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x4a6b24&&_0x188d52['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x4a6b24&&_0x188d52['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x4a6b24&&_0x188d52['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x4a6b24&&_0x188d52['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x4a6b24&&_0x188d52['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},k=class extends _0x521308{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x42827c,p,x];}};export{k as PasteFromOfficeEnhanced};
@@ -1,5 +1 @@
1
- /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
1
  export {};
@@ -1,42 +1,43 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { type PasteFromOfficeNormalizerData, PasteFromOfficeMSWordNormalizer } from '@ckeditor/ckeditor5-paste-from-office';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
6
+ import { PasteFromOfficeMSWordNormalizer } from "@ckeditor/ckeditor5-paste-from-office";
6
7
  /**
7
- * A normalizer that inlines styles passed along the content from MS Office.
8
- *
9
- * Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
10
- * plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
11
- * They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
12
- *
13
- * This particular normalizer turns a pasted content such as:
14
- *
15
- * ```html
16
- * <style>
17
- * p { margin-top: 10px }
18
- * .foo { font-family: Arial }
19
- * <style>
20
- * <p class="foo">Foo</p>
21
- * ```
22
- *
23
- * into:
24
- *
25
- * ```html
26
- * <style>
27
- * p { margin-top: 10px }
28
- * .foo { font-family: Arial }
29
- * <style>
30
- * <p class="foo" style="margin-top: 10px; font-family: Arial">Foo</p>
31
- * ```
32
- */
8
+ * A normalizer that inlines styles passed along the content from MS Office.
9
+ *
10
+ * Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
11
+ * plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
12
+ * They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
13
+ *
14
+ * This particular normalizer turns a pasted content such as:
15
+ *
16
+ * ```html
17
+ * <style>
18
+ * p { margin-top: 10px }
19
+ * .foo { font-family: Arial }
20
+ * <style>
21
+ * <p class="foo">Foo</p>
22
+ * ```
23
+ *
24
+ * into:
25
+ *
26
+ * ```html
27
+ * <style>
28
+ * p { margin-top: 10px }
29
+ * .foo { font-family: Arial }
30
+ * <style>
31
+ * <p class="foo" style="margin-top: 10px; font-family: Arial">Foo</p>
32
+ * ```
33
+ */
33
34
  export declare class MSOfficeStylesInliner extends PasteFromOfficeMSWordNormalizer {
34
- /**
35
- * @inheritDoc
36
- */
37
- execute(data: PasteFromOfficeNormalizerData): void;
38
- /**
39
- * @inheritDoc
40
- */
41
- isActive(htmlString: string): boolean;
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ override execute(data: ClipboardInputTransformationData): void;
39
+ /**
40
+ * @inheritDoc
41
+ */
42
+ override isActive(htmlString: string): boolean;
42
43
  }
@@ -1,148 +1,148 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module paste-from-office-enhanced/normalizers/inliner/utils
7
- */
8
- import { type ViewElement } from '@ckeditor/ckeditor5-engine';
6
+ * @module paste-from-office-enhanced/normalizers/inliner/utils
7
+ */
8
+ import { type ViewElement } from "@ckeditor/ckeditor5-engine";
9
9
  type StyleSelector = string;
10
10
  type CSSStyleDefinitions = Record<string, string>;
11
11
  type ExtractedStyles = Record<StyleSelector, CSSStyleDefinitions>;
12
12
  type ExpandedStyles = Map<ParsedCSSSelector, CSSStyleDefinitions>;
13
13
  type ParsedCSSSelector = {
14
- tagName?: StyleSelector;
15
- className?: StyleSelector;
14
+ tagName?: StyleSelector;
15
+ className?: StyleSelector;
16
16
  };
17
17
  /**
18
- * Returns style definitions that match given element.
19
- *
20
- * @param element
21
- * @param expandedStyles
22
- * @returns
23
- */
18
+ * Returns style definitions that match given element.
19
+ *
20
+ * @param element
21
+ * @param expandedStyles
22
+ * @returns
23
+ */
24
24
  export declare function getMatchingStyles(element: ViewElement, expandedStyles: ExpandedStyles): ExpandedStyles;
25
25
  /**
26
- * Converts CSSStyleSheets into a simple object format:
27
- *
28
- * ```js
29
- * {
30
- * 'p, p.foo': {
31
- * 'font-family': 'Arial'
32
- * },
33
- * 'td': {
34
- * 'background': 'red'
35
- * },
36
- * // ...
37
- * }
38
- * ```
39
- * @param styles
40
- * @returns
41
- */
26
+ * Converts CSSStyleSheets into a simple object format:
27
+ *
28
+ * ```js
29
+ * {
30
+ * 'p, p.foo': {
31
+ * 'font-family': 'Arial'
32
+ * },
33
+ * 'td': {
34
+ * 'background': 'red'
35
+ * },
36
+ * // ...
37
+ * }
38
+ * ```
39
+ * @param styles
40
+ * @returns
41
+ */
42
42
  export declare function extractStyles(styles: Array<CSSStyleSheet>): ExtractedStyles;
43
43
  /**
44
- * Expands styles object with complex selector into a map of unique parsed selectors and style definitions.
45
- *
46
- * ```ts
47
- * const styles = {
48
- * 'p, p.foo': {
49
- * 'font-family': 'Arial'
50
- * },
51
- * 'td': {
52
- * 'background': 'red'
53
- * },
54
- * // ...
55
- * }
56
- *
57
- * expandStyles( styles );
58
- *
59
- * {
60
- * { tagName: 'p' }: {
61
- * 'font-family': 'Arial'
62
- * },
63
- * { tagName: 'p', className: 'foo }: {
64
- * 'font-family': 'Arial'
65
- * },
66
- * { tagName: 'td' }: {
67
- * 'background': 'red'
68
- * },
69
- * // ...
70
- * }
71
- * ```
72
- * @param styles
73
- * @returns
74
- */
44
+ * Expands styles object with complex selector into a map of unique parsed selectors and style definitions.
45
+ *
46
+ * ```ts
47
+ * const styles = {
48
+ * 'p, p.foo': {
49
+ * 'font-family': 'Arial'
50
+ * },
51
+ * 'td': {
52
+ * 'background': 'red'
53
+ * },
54
+ * // ...
55
+ * }
56
+ *
57
+ * expandStyles( styles );
58
+ *
59
+ * {
60
+ * { tagName: 'p' }: {
61
+ * 'font-family': 'Arial'
62
+ * },
63
+ * { tagName: 'p', className: 'foo }: {
64
+ * 'font-family': 'Arial'
65
+ * },
66
+ * { tagName: 'td' }: {
67
+ * 'background': 'red'
68
+ * },
69
+ * // ...
70
+ * }
71
+ * ```
72
+ * @param styles
73
+ * @returns
74
+ */
75
75
  export declare function expandStyles(styles: ExtractedStyles): ExpandedStyles;
76
76
  /**
77
- * Converts a native CSSStyleDeclaration into a simple object.
78
- *
79
- * ```ts
80
- * {
81
- * 'font-family': 'Arial'
82
- * 'background': 'red',
83
- * // ...
84
- * }
85
- * ```
86
- * @param declaration
87
- * @returns
88
- */
77
+ * Converts a native CSSStyleDeclaration into a simple object.
78
+ *
79
+ * ```ts
80
+ * {
81
+ * 'font-family': 'Arial'
82
+ * 'background': 'red',
83
+ * // ...
84
+ * }
85
+ * ```
86
+ * @param declaration
87
+ * @returns
88
+ */
89
89
  export declare function parseCSSStyleDeclaration(declaration: CSSStyleDeclaration): CSSStyleDefinitions;
90
90
  /**
91
- * Parses CSS selector into an array of objects with tagName and className properties.
92
- *
93
- * ```ts
94
- * parseCSSSelector( 'p, p.foo' );
95
- * ```
96
- *
97
- * returns:
98
- *
99
- * ```ts
100
- * [
101
- * { tagName: 'p' },
102
- * { tagName: 'p', className: 'foo' }
103
- * ]
104
- * ```
105
- * @param selector
106
- * @returns
107
- */
91
+ * Parses CSS selector into an array of objects with tagName and className properties.
92
+ *
93
+ * ```ts
94
+ * parseCSSSelector( 'p, p.foo' );
95
+ * ```
96
+ *
97
+ * returns:
98
+ *
99
+ * ```ts
100
+ * [
101
+ * { tagName: 'p' },
102
+ * { tagName: 'p', className: 'foo' }
103
+ * ]
104
+ * ```
105
+ * @param selector
106
+ * @returns
107
+ */
108
108
  export declare function parseCSSSelector(selector: string): Array<ParsedCSSSelector>;
109
109
  /**
110
- * Extracts `mso-pattern` background colors from raw CSS text (`stylesString`).
111
- *
112
- * Browsers silently discard `mso-*` vendor properties during CSS parsing, so the browser-parsed
113
- * `CSSStyleSheet` objects never contain `mso-pattern` values. This function parses the raw CSS text
114
- * to extract pattern colors from class-scoped rules.
115
- *
116
- * Returns a mapping of class names to their pattern colors (e.g., `{ xl65: '#4EA72E' }`).
117
- *
118
- * Conditions for synthesizing a background-color:
119
- * - `mso-pattern: auto` (no pattern set) — skipped (single value doesn't match the regex).
120
- * - `mso-pattern: <color> none` — skipped (pattern explicitly off).
121
- * - `mso-pattern: <color> auto` — skipped (no pattern).
122
- * - `mso-pattern: auto none` — skipped (color is `auto`).
123
- * - `mso-pattern: <color> <pattern-type>` where pattern type is not `none`/`auto` — extracted.
124
- *
125
- * @param stylesString Raw CSS text from `data._parsedData.stylesString`.
126
- * @returns A record mapping class names to their `mso-pattern` color values.
127
- */
110
+ * Extracts `mso-pattern` background colors from raw CSS text (`stylesString`).
111
+ *
112
+ * Browsers silently discard `mso-*` vendor properties during CSS parsing, so the browser-parsed
113
+ * `CSSStyleSheet` objects never contain `mso-pattern` values. This function parses the raw CSS text
114
+ * to extract pattern colors from class-scoped rules.
115
+ *
116
+ * Returns a mapping of class names to their pattern colors (e.g., `{ xl65: '#4EA72E' }`).
117
+ *
118
+ * Conditions for synthesizing a background-color:
119
+ * - `mso-pattern: auto` (no pattern set) — skipped (single value doesn't match the regex).
120
+ * - `mso-pattern: <color> none` — skipped (pattern explicitly off).
121
+ * - `mso-pattern: <color> auto` — skipped (no pattern).
122
+ * - `mso-pattern: auto none` — skipped (color is `auto`).
123
+ * - `mso-pattern: <color> <pattern-type>` where pattern type is not `none`/`auto` — extracted.
124
+ *
125
+ * @param stylesString Raw CSS text from `data._parsedData.stylesString`.
126
+ * @returns A record mapping class names to their `mso-pattern` color values.
127
+ */
128
128
  export declare function extractMsoPatternBackgroundColors(stylesString: string): Record<string, string>;
129
129
  /**
130
- * Flattens multiple style definitions considering their order to simulate a CSS cascade.
131
- *
132
- * ```ts
133
- * flattenStyleDefinitions( [
134
- * { 'font-family': 'Arial', 'margin-top': '1px', 'font-size': '10px' },
135
- * { 'font-family': 'monospace', 'margin-top': '3px' }
136
- * ] );
137
- * ```
138
- *
139
- * returns:
140
- *
141
- * ```ts
142
- * { 'font-family': 'monospace', 'margin-top': '3px', 'font-size': '10px' }
143
- * ```
144
- * @param definitions
145
- * @returns
146
- */
130
+ * Flattens multiple style definitions considering their order to simulate a CSS cascade.
131
+ *
132
+ * ```ts
133
+ * flattenStyleDefinitions( [
134
+ * { 'font-family': 'Arial', 'margin-top': '1px', 'font-size': '10px' },
135
+ * { 'font-family': 'monospace', 'margin-top': '3px' }
136
+ * ] );
137
+ * ```
138
+ *
139
+ * returns:
140
+ *
141
+ * ```ts
142
+ * { 'font-family': 'monospace', 'margin-top': '3px', 'font-size': '10px' }
143
+ * ```
144
+ * @param definitions
145
+ * @returns
146
+ */
147
147
  export declare function flattenStyleDefinitions(definitions: Array<CSSStyleDefinitions>): CSSStyleDefinitions;
148
148
  export {};
@@ -1,43 +1,47 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { type PasteFromOfficeNormalizerData, PasteFromOfficeMSWordNormalizer } from '@ckeditor/ckeditor5-paste-from-office';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
6
5
  /**
7
- * A normalizer that propagates inline styles from block element into `span` element with style properties
8
- * and/or creates an `HTML` structure based on early mentioned block element styles.
9
- *
10
- * Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
11
- * plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
12
- * They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
13
- *
14
- * This particular normalizer turns a pasted content such as:
15
- *
16
- * ```html
17
- * <p style="color:red;font-size:10px;font-weight:bold;">
18
- * foo
19
- * </p>
20
- * ```
21
- *
22
- * into:
23
- *
24
- * ```html
25
- * <p>
26
- * <span style="color:red;font-size:10px">
27
- * <strong>
28
- * foo
29
- * </strong>
30
- * </span>
31
- * </p>
32
- * ```
33
- */
6
+ * @module paste-from-office-enhanced/normalizers/propagator/msofficeinlinestylepropagator
7
+ */
8
+ import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
9
+ import { PasteFromOfficeMSWordNormalizer } from "@ckeditor/ckeditor5-paste-from-office";
10
+ /**
11
+ * A normalizer that propagates inline styles from block element into `span` element with style properties
12
+ * and/or creates an `HTML` structure based on early mentioned block element styles.
13
+ *
14
+ * Normalizers are registered by the {@link module:paste-from-office-enhanced/pastefromofficeenhanced~PasteFromOfficeEnhanced}
15
+ * plugin and run on {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
16
+ * They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
17
+ *
18
+ * This particular normalizer turns a pasted content such as:
19
+ *
20
+ * ```html
21
+ * <p style="color:red;font-size:10px;font-weight:bold;">
22
+ * foo
23
+ * </p>
24
+ * ```
25
+ *
26
+ * into:
27
+ *
28
+ * ```html
29
+ * <p>
30
+ * <span style="color:red;font-size:10px">
31
+ * <strong>
32
+ * foo
33
+ * </strong>
34
+ * </span>
35
+ * </p>
36
+ * ```
37
+ */
34
38
  export declare class MSOfficeInlineStylePropagator extends PasteFromOfficeMSWordNormalizer {
35
- /**
36
- * @inheritDoc
37
- */
38
- execute(data: PasteFromOfficeNormalizerData): void;
39
- /**
40
- * @inheritDoc
41
- */
42
- isActive(htmlString: string): boolean;
39
+ /**
40
+ * @inheritDoc
41
+ */
42
+ override execute(data: ClipboardInputTransformationData): void;
43
+ /**
44
+ * @inheritDoc
45
+ */
46
+ override isActive(htmlString: string): boolean;
43
47
  }
@@ -1,117 +1,115 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module paste-from-office-enhanced/normalizers/propagator/utils
7
- */
8
- import type { ViewUpcastWriter, ViewElement } from '@ckeditor/ckeditor5-engine';
6
+ * @module paste-from-office-enhanced/normalizers/propagator/utils
7
+ */
8
+ import type { ViewUpcastWriter, ViewElement } from "@ckeditor/ckeditor5-engine";
9
9
  /**
10
- * The list of all `CSS` properties that need to be propagated.
11
- *
12
- * @protected
13
- */
10
+ * The list of all `CSS` properties that need to be propagated.
11
+ *
12
+ * @protected
13
+ */
14
14
  export declare const CSS_PROPERTIES_TO_PROPAGATE: readonly ["color", "font-family", "font-size", "text-decoration", "text-decoration-line", "font-weight", "font-style", "vertical-align"];
15
15
  /**
16
- * The list of `CSS` properties that needs to be propagated as an inline `<span>` element.
17
- *
18
- * It's a subset of `CSS_PROPERTIES_TO_PROPAGATE`.
19
- *
20
- * @protected
21
- */
16
+ * The list of `CSS` properties that needs to be propagated as an inline `<span>` element.
17
+ *
18
+ * It's a subset of `CSS_PROPERTIES_TO_PROPAGATE`.
19
+ *
20
+ * @protected
21
+ */
22
22
  export declare const CSS_PROPERTIES_TO_BE_SPANS: readonly ["color", "font-family", "font-size"];
23
23
  export type CSSPropertyValueAssertion = (value: string) => boolean;
24
24
  export type CSSPropertyValueToElementNameMap = readonly [string | CSSPropertyValueAssertion, string];
25
25
  /**
26
- * The map of style to element propagate as a HTML elements
27
- * (e.g. `text-decoration` with the `underline` value is propagated to `<u>`,
28
- * or `font-weight` with the `bold` value is propagated to `<strong>`).
29
- *
30
- * @protected
31
- */
32
- export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: {
33
- [key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap>;
34
- };
26
+ * The map of style to element propagate as a HTML elements
27
+ * (e.g. `text-decoration` with the `underline` value is propagated to `<u>`,
28
+ * or `font-weight` with the `bold` value is propagated to `<strong>`).
29
+ *
30
+ * @protected
31
+ */
32
+ export declare const CSS_PROPERTIES_TO_BE_HTML_ELEMENTS: { [key in Exclude<typeof CSS_PROPERTIES_TO_PROPAGATE[number], typeof CSS_PROPERTIES_TO_BE_SPANS[number]>]: ReadonlyArray<CSSPropertyValueToElementNameMap> };
35
33
  /**
36
- * Checks whether the given property should be propagated at all.
37
- *
38
- * @param property
39
- * @returns
40
- */
34
+ * Checks whether the given property should be propagated at all.
35
+ *
36
+ * @param property
37
+ * @returns
38
+ */
41
39
  export declare function isPropertyToBePropagated(property: string): property is typeof CSS_PROPERTIES_TO_PROPAGATE[number];
42
40
  /**
43
- * Checks whether the given property should be propagated as a span element.
44
- *
45
- * @param property
46
- * @returns
47
- */
41
+ * Checks whether the given property should be propagated as a span element.
42
+ *
43
+ * @param property
44
+ * @returns
45
+ */
48
46
  export declare function isPropertyToBePropagatedAsSpan(property: string): property is typeof CSS_PROPERTIES_TO_BE_SPANS[number];
49
47
  /**
50
- * Checks whether the given property should be propagated as an HTML element.
51
- *
52
- * @param property
53
- * @returns
54
- */
48
+ * Checks whether the given property should be propagated as an HTML element.
49
+ *
50
+ * @param property
51
+ * @returns
52
+ */
55
53
  export declare function isPropertyToBePropagatedAsHTMLElement(property: string): property is keyof typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS;
56
54
  /**
57
- * Collects a list of styles to propagate from a block element.
58
- *
59
- * @param element The source `ViewElement`.
60
- * @returns List of valid CSS properties to propagate.
61
- */
55
+ * Collects a list of styles to propagate from a block element.
56
+ *
57
+ * @param element The source `ViewElement`.
58
+ * @returns List of valid CSS properties to propagate.
59
+ */
62
60
  export declare function getStylePropertyNamesToPropagate(element: ViewElement): Array<typeof CSS_PROPERTIES_TO_PROPAGATE[number]>;
63
61
  /**
64
- * Executes styles propagation.
65
- *
66
- * @param element The source `ViewElement`.
67
- * @param writer `ViewUpcastWriter` instance.
68
- * @param propertiesToPropagate List of valid CSS properties to propagate.
69
- */
62
+ * Executes styles propagation.
63
+ *
64
+ * @param element The source `ViewElement`.
65
+ * @param writer `ViewUpcastWriter` instance.
66
+ * @param propertiesToPropagate List of valid CSS properties to propagate.
67
+ */
70
68
  export declare function propagateStyleProperties(element: ViewElement, writer: ViewUpcastWriter, propertiesToPropagate: Array<string>): void;
71
69
  /**
72
- * Creates an `HTML` structure based on styles propagated from parent block element.
73
- *
74
- * @param element The source `ViewElement`.
75
- * @param writer `ViewUpcastWriter` instance.
76
- * @param stylesToBeHtmlElements List of styles properties to be propagated as a HTML elements.
77
- */
70
+ * Creates an `HTML` structure based on styles propagated from parent block element.
71
+ *
72
+ * @param element The source `ViewElement`.
73
+ * @param writer `ViewUpcastWriter` instance.
74
+ * @param stylesToBeHtmlElements List of styles properties to be propagated as a HTML elements.
75
+ */
78
76
  export declare function propagateStylesAsHTMLElements(element: ViewElement, writer: ViewUpcastWriter, stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>): void;
79
77
  /**
80
- * Propagates span styles from a block element to its existing direct `<span>` children, instead of
81
- * creating a new wrapper `<span>`. Use this for list-item paragraphs where adding a wrapper would
82
- * shift the span depth and break `findListMarkerNode()` bullet detection. See #6129.
83
- *
84
- * HTML-element style properties (`font-weight`, `font-style`, and similar) are intentionally not
85
- * propagated here — promoting them would require wrapping children in `<strong>`, `<em>`, etc.,
86
- * which shifts span depth just as much as `propagateStylesAsSpan()` and defeats the purpose.
87
- *
88
- * In practice this is safe because Word does not emit `font-weight` / `font-style` / `text-decoration`
89
- * directly on list-item `<p>` elements — those styles live on inner `<span>` character-style wrappers,
90
- * which are preserved untouched. They could only land on the `<p>` via a class-based rule like
91
- * `p.MsoListParagraph { font-weight: bold }` promoted by `MSOfficeStylesInliner`, which standard
92
- * Word HTML does not produce.
93
- *
94
- * @param element The source `ViewElement`.
95
- * @param writer `ViewUpcastWriter` instance.
96
- * @param propertiesToPropagate List of valid CSS properties to propagate.
97
- */
78
+ * Propagates span styles from a block element to its existing direct `<span>` children, instead of
79
+ * creating a new wrapper `<span>`. Use this for list-item paragraphs where adding a wrapper would
80
+ * shift the span depth and break `findListMarkerNode()` bullet detection. See #6129.
81
+ *
82
+ * HTML-element style properties (`font-weight`, `font-style`, and similar) are intentionally not
83
+ * propagated here — promoting them would require wrapping children in `<strong>`, `<em>`, etc.,
84
+ * which shifts span depth just as much as `propagateStylesAsSpan()` and defeats the purpose.
85
+ *
86
+ * In practice this is safe because Word does not emit `font-weight` / `font-style` / `text-decoration`
87
+ * directly on list-item `<p>` elements — those styles live on inner `<span>` character-style wrappers,
88
+ * which are preserved untouched. They could only land on the `<p>` via a class-based rule like
89
+ * `p.MsoListParagraph { font-weight: bold }` promoted by `MSOfficeStylesInliner`, which standard
90
+ * Word HTML does not produce.
91
+ *
92
+ * @param element The source `ViewElement`.
93
+ * @param writer `ViewUpcastWriter` instance.
94
+ * @param propertiesToPropagate List of valid CSS properties to propagate.
95
+ */
98
96
  export declare function propagateSpanStylesToExistingChildren(element: ViewElement, writer: ViewUpcastWriter, propertiesToPropagate: Array<string>): void;
99
97
  /**
100
- * Creates a `span` as a first child of the `element` with styles propagated from parent block element.
101
- *
102
- * @param element The source `ViewElement`.
103
- * @param writer `ViewUpcastWriter` instance.
104
- * @param spanStyles List of styles properties to propagate.
105
- */
98
+ * Creates a `span` as a first child of the `element` with styles propagated from parent block element.
99
+ *
100
+ * @param element The source `ViewElement`.
101
+ * @param writer `ViewUpcastWriter` instance.
102
+ * @param spanStyles List of styles properties to propagate.
103
+ */
106
104
  export declare function propagateStylesAsSpan(element: ViewElement, writer: ViewUpcastWriter, spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>): void;
107
105
  /**
108
- * Collects and filters element styles into proper objects for further propagation.
109
- *
110
- * @param element The source `ViewElement`.
111
- * @param propertiesToPropagate The array of style properties to propagate.
112
- * @returns An object with properties to propagate filtered into styles that will be propagated onto `span` and as a HTML elements.
113
- */
106
+ * Collects and filters element styles into proper objects for further propagation.
107
+ *
108
+ * @param element The source `ViewElement`.
109
+ * @param propertiesToPropagate The array of style properties to propagate.
110
+ * @returns An object with properties to propagate filtered into styles that will be propagated onto `span` and as a HTML elements.
111
+ */
114
112
  export declare function getStylesToPropagate(element: ViewElement, propertiesToPropagate: Array<string>): {
115
- spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>;
116
- stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>;
113
+ spanStyles: Partial<Record<typeof CSS_PROPERTIES_TO_BE_SPANS[number], string>>;
114
+ stylesToBeHtmlElements: Partial<typeof CSS_PROPERTIES_TO_BE_HTML_ELEMENTS>;
117
115
  };
@@ -1,38 +1,38 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module paste-from-office-enhanced/pastefromofficeenhanced
7
- * @publicApi
8
- */
9
- import { Plugin } from '@ckeditor/ckeditor5-core';
10
- import { PasteFromOffice } from '@ckeditor/ckeditor5-paste-from-office';
11
- import { PasteFromOfficeEnhancedInliner } from './pastefromofficeenhancedinliner.js';
12
- import { PasteFromOfficeEnhancedPropagator } from './pastefromofficeenhancedpropagator.js';
6
+ * @module paste-from-office-enhanced/pastefromofficeenhanced
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
10
+ import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
11
+ import { PasteFromOfficeEnhancedInliner } from "./pastefromofficeenhancedinliner.js";
12
+ import { PasteFromOfficeEnhancedPropagator } from "./pastefromofficeenhancedpropagator.js";
13
13
  /**
14
- * The Paste from Office Enhanced feature.
15
- *
16
- * Introduces seamless content pasting from MS Office applications with improved formatting retention for a smoother
17
- * and more efficient workflow.
18
- *
19
- * For a detailed overview, check the {@glink features/pasting/paste-from-office Paste from Office Enhanced feature guide}.
20
- */
14
+ * The Paste from Office Enhanced feature.
15
+ *
16
+ * Introduces seamless content pasting from MS Office applications with improved formatting retention for a smoother
17
+ * and more efficient workflow.
18
+ *
19
+ * For a detailed overview, check the {@glink features/pasting/paste-from-office Paste from Office Enhanced feature guide}.
20
+ */
21
21
  export declare class PasteFromOfficeEnhanced extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "PasteFromOfficeEnhanced";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
30
- /**
31
- * @inheritDoc
32
- */
33
- static get isPremiumPlugin(): true;
34
- /**
35
- * @inheritDoc
36
- */
37
- static get requires(): readonly [typeof PasteFromOffice, typeof PasteFromOfficeEnhancedInliner, typeof PasteFromOfficeEnhancedPropagator];
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "PasteFromOfficeEnhanced";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static override get isOfficialPlugin(): true;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static override get isPremiumPlugin(): true;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static get requires(): PluginDependenciesOf<[PasteFromOffice, PasteFromOfficeEnhancedInliner, PasteFromOfficeEnhancedPropagator]>;
38
38
  }
@@ -1,38 +1,38 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module paste-from-office-enhanced/pastefromofficeenhancedinliner
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { PasteFromOffice } from '@ckeditor/ckeditor5-paste-from-office';
6
+ * @module paste-from-office-enhanced/pastefromofficeenhancedinliner
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
10
10
  /**
11
- * The Paste from Office Enhanced inliner plugin that inlines styles passed along the content from MS Office.
12
- */
11
+ * The Paste from Office Enhanced inliner plugin that inlines styles passed along the content from MS Office.
12
+ */
13
13
  export declare class PasteFromOfficeEnhancedInliner extends Plugin {
14
- /**
15
- * @inheritDoc
16
- */
17
- static get pluginName(): "PasteFromOfficeEnhancedInliner";
18
- /**
19
- * @inheritDoc
20
- */
21
- static get isOfficialPlugin(): true;
22
- /**
23
- * @inheritDoc
24
- */
25
- static get isPremiumPlugin(): true;
26
- /**
27
- * @inheritDoc
28
- */
29
- static get requires(): readonly [typeof PasteFromOffice];
30
- /**
31
- * @inheritDoc
32
- */
33
- init(): void;
34
- /**
35
- * @inheritDoc
36
- */
37
- afterInit(): void;
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ static get pluginName(): "PasteFromOfficeEnhancedInliner";
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static override get isOfficialPlugin(): true;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static override get isPremiumPlugin(): true;
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get requires(): PluginDependenciesOf<[PasteFromOffice]>;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ init(): void;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ afterInit(): void;
38
38
  }
@@ -1,40 +1,40 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module paste-from-office-enhanced/pastefromofficeenhancedpropagator
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { PasteFromOffice } from '@ckeditor/ckeditor5-paste-from-office';
6
+ * @module paste-from-office-enhanced/pastefromofficeenhancedpropagator
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { PasteFromOffice } from "@ckeditor/ckeditor5-paste-from-office";
10
10
  /**
11
- * The Paste from Office Enhanced propagator that propagates inline styles from block elements to:
12
- * * `span` element with `style` properties,
13
- * * `HTML` structures based block element styles.
14
- */
11
+ * The Paste from Office Enhanced propagator that propagates inline styles from block elements to:
12
+ * * `span` element with `style` properties,
13
+ * * `HTML` structures based block element styles.
14
+ */
15
15
  export declare class PasteFromOfficeEnhancedPropagator extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "PasteFromOfficeEnhancedPropagator";
20
- /**
21
- * @inheritDoc
22
- */
23
- static get isOfficialPlugin(): true;
24
- /**
25
- * @inheritDoc
26
- */
27
- static get isPremiumPlugin(): true;
28
- /**
29
- * @inheritDoc
30
- */
31
- static get requires(): readonly [typeof PasteFromOffice];
32
- /**
33
- * @inheritDoc
34
- */
35
- init(): void;
36
- /**
37
- * @inheritDoc
38
- */
39
- destroy(): void;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "PasteFromOfficeEnhancedPropagator";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static override get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static override get isPremiumPlugin(): true;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get requires(): PluginDependenciesOf<[PasteFromOffice]>;
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ init(): void;
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ override destroy(): void;
40
40
  }
package/dist/utils.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * Check if content was pasted from MS Excel.
7
- *
8
- * @param html
9
- * @returns True if content is pasted from MS Excel
10
- */
6
+ * Check if content was pasted from MS Excel.
7
+ *
8
+ * @param html
9
+ * @returns True if content is pasted from MS Excel
10
+ */
11
11
  export declare function isMSExcelContent(html: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-paste-from-office-enhanced",
3
- "version": "48.8.1-alpha.4",
3
+ "version": "49.0.0-alpha.1",
4
4
  "description": "Enhanced paste from Office feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -31,11 +31,11 @@
31
31
  "./package.json": "./package.json"
32
32
  },
33
33
  "dependencies": {
34
- "@ckeditor/ckeditor5-clipboard": "48.8.1-alpha.4",
35
- "@ckeditor/ckeditor5-core": "48.8.1-alpha.4",
36
- "@ckeditor/ckeditor5-engine": "48.8.1-alpha.4",
37
- "@ckeditor/ckeditor5-paste-from-office": "48.8.1-alpha.4",
38
- "@ckeditor/ckeditor5-utils": "48.8.1-alpha.4"
34
+ "@ckeditor/ckeditor5-clipboard": "49.0.0-alpha.1",
35
+ "@ckeditor/ckeditor5-core": "49.0.0-alpha.1",
36
+ "@ckeditor/ckeditor5-engine": "49.0.0-alpha.1",
37
+ "@ckeditor/ckeditor5-paste-from-office": "49.0.0-alpha.1",
38
+ "@ckeditor/ckeditor5-utils": "49.0.0-alpha.1"
39
39
  },
40
40
  "files": [
41
41
  "dist",