@ckeditor/ckeditor5-paste-from-office-enhanced 48.2.0 → 48.3.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 _0x564ade}from'@ckeditor/ckeditor5-core/dist/index.js';import{PasteFromOfficeMSWordNormalizer as _0x352fbb,PasteFromOffice as _0x3ae215}from'@ckeditor/ckeditor5-paste-from-office/dist/index.js';import{priorities as _0x4cdd7d,uid as _0x5ab7b8}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ViewUpcastWriter as _0x2528d8,ViewDocument as _0x5a0b83,ViewDomConverter as _0xb19473}from'@ckeditor/ckeditor5-engine/dist/index.js';const a=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0x7030b){return a['test'](_0x7030b);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x23a8bd,_0x3e0b93){const _0x3c983e=new Map();for(const [_0x1137f9,_0x52e7c1]of _0x3e0b93){if(!_0x1137f9['tagName']&&!_0x1137f9['className'])continue;const _0x1f68d2=!_0x1137f9['tagName']||_0x23a8bd['name']===_0x1137f9['tagName'],_0x77f357=!_0x1137f9['className']||_0x23a8bd['hasClass'](_0x1137f9['className']);_0x1f68d2&&_0x77f357&&_0x3c983e['set'](_0x1137f9,_0x52e7c1);}return _0x3c983e;}function w(_0x503aab){const _0x5207ea={};for(let _0x2dd4af=0x0;_0x2dd4af<_0x503aab['length'];_0x2dd4af++){const _0x2e31af=_0x503aab[_0x2dd4af],_0x19cbcd=_0x503aab['getPropertyValue'](_0x2e31af);'initial'!==_0x19cbcd&&(_0x5207ea[_0x2e31af]=_0x19cbcd);}return _0x5207ea;}function m(_0x5e016a){const _0x5c624e=_0x5e016a['split'](',')['map'](_0x430158=>_0x430158['trim']()),_0x37fcbf=[];for(const _0x505592 of _0x5c624e){const _0x52ac93=l['exec'](_0x505592);_0x52ac93&&_0x37fcbf['push'](_0x52ac93['groups']);}return _0x37fcbf;}function p(_0x915907){const _0x9c0f1a={};for(const _0x580d8e of _0x915907)Object['assign'](_0x9c0f1a,_0x580d8e);return _0x9c0f1a;}class MSOfficeStylesInliner extends _0x352fbb{['execute'](_0x2e842a){const {styles:_0x521e97,stylesString:_0x4f0788}=_0x2e842a['extraContent'],_0x46dc38=new _0x2528d8(_0x2e842a['content']['document']),_0x53d3ce=_0x46dc38['createRangeIn'](_0x2e842a['content']),_0x152080=function(_0x1b0943){const _0x3f15a6={};for(const _0x300956 of _0x1b0943)for(const _0x81c382 of _0x300956['cssRules'])if(_0x81c382 instanceof CSSStyleRule){const _0x1506d7=w(_0x81c382['style']);_0x3f15a6[_0x81c382['selectorText']]=Object['assign']({},_0x3f15a6[_0x81c382['selectorText']]||{},_0x1506d7);}return _0x3f15a6;}(_0x521e97),_0x17f880=function(_0x40741c){const _0xf41f78=new Map();for(const _0x1c58af in _0x40741c){const _0x17384b=m(_0x1c58af),_0x10d0d1=_0x40741c[_0x1c58af];for(const _0x8c0ca3 of _0x17384b)_0xf41f78['set'](_0x8c0ca3,_0x10d0d1);}return _0xf41f78;}(_0x152080),_0x4b0c53=function(_0x276d10){const _0x59d74b={},_0xae444=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x126bc4=/\.(?<className>[\w-]+)/g;let _0x1bc716;for(;null!==(_0x1bc716=_0xae444['exec'](_0x276d10));){const {selector:_0x4d5523,color:_0x4d52e8,patternType:_0x2b538f}=_0x1bc716['groups'];if('auto'!==_0x4d52e8['toLowerCase']()&&'none'!==_0x2b538f['toLowerCase']()&&'auto'!==_0x2b538f['toLowerCase']()){for(const _0x1e4d65 of _0x4d5523['matchAll'](_0x126bc4))_0x59d74b[_0x1e4d65['groups']['className']]=_0x4d52e8;}}return _0x59d74b;}(_0x4f0788);for(const _0x29fed8 of _0x53d3ce){if('elementStart'!==_0x29fed8['type'])continue;const _0x26809c=_0x29fed8['item'],_0x426533=d(_0x26809c,_0x17f880),_0x48241e=_0x426533['size']?p(Array['from'](_0x426533['values']())):{};if(!('background-color'in _0x48241e)&&!('background'in _0x48241e)){for(const [_0x302846,_0xf31c02]of Object['entries'](_0x4b0c53))if(_0x26809c['hasClass'](_0x302846)){_0x48241e['background-color']=_0xf31c02;break;}}for(const _0x442ae2 in _0x48241e)_0x26809c['hasStyle'](_0x442ae2)||_0x46dc38['setStyle'](_0x442ae2,_0x48241e[_0x442ae2],_0x26809c);}}['isActive'](_0x6f9737){return super['isActive'](_0x6f9737)||u(_0x6f9737);}}class PasteFromOfficeEnhancedInliner extends _0x564ade{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3ae215];}['init'](){const _0x117924=this['editor'],_0x37af9a=_0x117924['plugins']['get']('PasteFromOffice'),_0x18e649=_0x117924['editing']['view']['document'],_0x104f28=new MSOfficeStylesInliner(_0x18e649);_0x37af9a['registerNormalizer'](_0x104f28,_0x4cdd7d['high']+0xb);}['afterInit'](){!async function(_0x4f38b2){const _0x537cb1=_0x47cb00([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]),_0x520aca=0x7374585f,_0x18e184=0x7373d38f^_0x520aca,_0x305715=window[_0x47cb00([0x44,0x61,0x74,0x65])][_0x47cb00([0x6e,0x6f,0x77])](),_0x23636f=_0x4f38b2[_0x47cb00([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3bb10f=new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e969c=>{_0x23636f[_0x47cb00([0x6f,0x6e,0x63,0x65])](_0x47cb00([0x72,0x65,0x61,0x64,0x79]),_0x5e969c);}),_0x50fed0={[_0x47cb00([0x6b,0x74,0x79])]:_0x47cb00([0x45,0x43]),[_0x47cb00([0x75,0x73,0x65])]:_0x47cb00([0x73,0x69,0x67]),[_0x47cb00([0x63,0x72,0x76])]:_0x47cb00([0x50,0x2d,0x32,0x35,0x36]),[_0x47cb00([0x78])]:_0x47cb00([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]),[_0x47cb00([0x79])]:_0x47cb00([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]),[_0x47cb00([0x61,0x6c,0x67])]:_0x47cb00([0x45,0x53,0x32,0x35,0x36])},_0x1629b0=_0x23636f[_0x47cb00([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x47cb00([0x67,0x65,0x74])](_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x52eb9b(){let _0x4f4459,_0x47a163=null,_0x749b01=null;try{if(_0x1629b0==_0x47cb00([0x47,0x50,0x4c]))return _0x47cb00([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4f4459=_0x153945(),!_0x4f4459)return _0x47cb00([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4f4459[_0x47cb00([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x749b01=_0x2f9c91(_0x4f4459[_0x47cb00([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4f4459[_0x47cb00([0x6a,0x74,0x69])])),await _0x745636()?_0x539df5()?_0x5d594e()?_0x47cb00([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19fec0()?(_0x4f4459[_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47cb00([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x47a163=_0x4d78c9(_0x47cb00([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1289e6()):_0x47cb00([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x47cb00([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x47cb00([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x47cb00([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5d594e(){const _0x5a23fa=[_0x47cb00([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x47cb00([0x74,0x72,0x69,0x61,0x6c])][_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f4459[_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x305715/0x3e8:0xe10*_0x18e184;return _0x4f4459[_0x47cb00([0x65,0x78,0x70])]<_0x5a23fa;}function _0x539df5(){const _0x2cabf7=_0x4f4459[_0x47cb00([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2cabf7&&(!!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x2a]))||(!!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x50,0x4f,0x45]))||(!!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x50,0x50]))||!(!_0x2cabf7[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))||!_0x160901()))));}function _0x19fec0(){const _0x29ba1b=_0x4f4459[_0x47cb00([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29ba1b||0x0==_0x29ba1b[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3e10d8}=new URL(window[_0x47cb00([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29ba1b[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e10d8))return!0x0;const _0x274231=_0x3e10d8[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e]));return _0x29ba1b[_0x47cb00([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x27135b=>_0x27135b[_0x47cb00([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47cb00([0x2a])))[_0x47cb00([0x6d,0x61,0x70])](_0x1b7222=>_0x1b7222[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e])))[_0x47cb00([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf2d031=>_0xf2d031[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x274231[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47cb00([0x6d,0x61,0x70])](_0x1208a1=>Array(_0x274231[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1208a1[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47cb00([0x66,0x69,0x6c,0x6c])](_0x1208a1[0x0]===_0x47cb00([0x2a])?_0x47cb00([0x2a]):'')[_0x47cb00([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1208a1))[_0x47cb00([0x73,0x6f,0x6d,0x65])](_0x5301c5=>_0x274231[_0x47cb00([0x65,0x76,0x65,0x72,0x79])]((_0x40a703,_0x4a3200)=>_0x5301c5[_0x4a3200]===_0x40a703||_0x5301c5[_0x4a3200]===_0x47cb00([0x2a])));}function _0x1289e6(){return _0x47a163&&_0x749b01?new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4cfeff,_0x440ee6)=>{_0x47a163[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x4cfeff,_0x440ee6),_0x749b01[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x48ac07=>{_0x48ac07!=_0x47cb00([0x56,0x61,0x6c,0x69,0x64])&&_0x4cfeff(_0x48ac07);},_0x440ee6);}):_0x47a163||_0x749b01||_0x47cb00([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2f9c91(_0x2d7eec,_0x2593a5){return new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x462a61=>{if(_0x2cdef5())return _0x462a61(_0x47cb00([0x56,0x61,0x6c,0x69,0x64]));_0x53e039(),_0x23636f[_0x47cb00([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x47cb00([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x230d1c=!0x1;const _0x30ef34=_0x5ab7b8();function _0x4908e1(_0x13ac0f){return!!_0x13ac0f&&(typeof _0x13ac0f===_0x47cb00([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x13ac0f===_0x47cb00([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x13ac0f[_0x47cb00([0x74,0x68,0x65,0x6e])]===_0x47cb00([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x13ac0f[_0x47cb00([0x63,0x61,0x74,0x63,0x68])]===_0x47cb00([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x449fd3(_0x5c35f2){_0x5e9982(_0x5c35f2)[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x2a66cc=>{if(!_0x2a66cc||_0x2a66cc[_0x47cb00([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x47cb00([0x6f,0x6b]))return _0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3dbaa9(_0xb553c5(_0x30ef34+_0x2593a5))!=_0x2a66cc[_0x47cb00([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x47cb00([0x56,0x61,0x6c,0x69,0x64]);})[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x4c5b7e=>(_0x482354(),_0x4c5b7e),()=>{const _0x2edf26=_0x58b570();return null==_0x2edf26?(_0x482354(),_0x47cb00([0x56,0x61,0x6c,0x69,0x64])):_0x47cb00(_0x305715-_0x2edf26>(0x5778dc5f^_0x520aca)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x462a61)[_0x47cb00([0x63,0x61,0x74,0x63,0x68])](()=>{_0x462a61(_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x13bac5=0x7342b6df^_0x520aca;function _0x482354(){const _0x3ebd70=_0x47cb00([0x6c,0x6c,0x63,0x74,0x2d])+_0x3dbaa9(_0xb553c5(_0x2d7eec)),_0x5d872c=_0x3f5542(_0x3dbaa9(window[_0x47cb00([0x4d,0x61,0x74,0x68])][_0x47cb00([0x63,0x65,0x69,0x6c])](_0x305715/_0x13bac5)));window[_0x47cb00([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47cb00([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ebd70,_0x5d872c);}function _0x58b570(){const _0x39d8aa=_0x47cb00([0x6c,0x6c,0x63,0x74,0x2d])+_0x3dbaa9(_0xb553c5(_0x2d7eec)),_0x5091f4=window[_0x47cb00([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47cb00([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x39d8aa);return _0x5091f4?window[_0x47cb00([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f5542(_0x5091f4),0x10)*_0x13bac5:null;}function _0x5e9982(_0x1babcc){return new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3334fa,_0x2ada25)=>{_0x1babcc[_0x47cb00([0x74,0x68,0x65,0x6e])](_0x3334fa,_0x2ada25),window[_0x47cb00([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2ada25,0x73758c9f^_0x520aca);});}}_0x23636f[_0x47cb00([0x6f,0x6e])](_0x47cb00([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1b0763,_0x5f56f9)=>{if(_0x5f56f9[0x0]!=_0x2d7eec)return _0x462a61(_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5f56f9[0x1]={..._0x5f56f9[0x1],[_0x47cb00([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x30ef34};},{[_0x47cb00([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47cb00([0x68,0x69,0x67,0x68])}),_0x23636f[_0x47cb00([0x6f,0x6e])](_0x47cb00([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4a2c8a=>{_0x4908e1(_0x4a2c8a[_0x47cb00([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x230d1c=!0x0,_0x449fd3(_0x4a2c8a[_0x47cb00([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x47cb00([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47cb00([0x6c,0x6f,0x77])}),_0x3bb10f[_0x47cb00([0x74,0x68,0x65,0x6e])](()=>{_0x230d1c||_0x462a61(_0x47cb00([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2cdef5(){return _0x23636f[_0x47cb00([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47cb00([0x76,0x69,0x65,0x77])][_0x47cb00([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x47cb00([0x61,0x75,0x74,0x6f]);}function _0x53e039(){_0x23636f[_0x47cb00([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47cb00([0x76,0x69,0x65,0x77])][_0x47cb00([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x47cb00([0x61,0x75,0x74,0x6f]);}}function _0x4d78c9(_0x3655b7){const _0x282f1e=[new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f32d1=>setTimeout(_0x2f32d1,0x737d6693^_0x520aca)),_0x3bb10f[_0x47cb00([0x74,0x68,0x65,0x6e])](()=>new window[(_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b6c66=>{let _0x15b7f4=0x0;_0x23636f[_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c])][_0x47cb00([0x6f,0x6e])](_0x47cb00([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1ed9d5,_0x24685b)=>{_0x24685b[0x0][_0x47cb00([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x15b7f4++,_0x15b7f4==(0x73745db7^_0x520aca)&&(_0x3b6c66(),_0x1ed9d5[_0x47cb00([0x6f,0x66,0x66])]());});}))];return window[_0x47cb00([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x47cb00([0x72,0x61,0x63,0x65])](_0x282f1e)[_0x47cb00([0x74,0x68,0x65,0x6e])](()=>_0x3655b7);}async function _0x1f7fe6(){await _0x3bb10f,_0x23636f[_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c])][_0x47cb00([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x252d69,_0x23636f[_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c])][_0x47cb00([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x252d69,_0x23636f[_0x47cb00([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x47cb00([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x160901(){return window[_0x47cb00([0x67,0x6c,0x6f,0x62])]&&window[_0x47cb00([0x67,0x6c,0x6f,0x62])][_0x47cb00([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x5b3dee(_0x76cca5){const _0x1fa77e=_0x8d1ad0();_0x23636f[_0x1fa77e]=_0x47cb00([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])+_0x76cca5,_0x76cca5!=_0x47cb00([0x56,0x61,0x6c,0x69,0x64])&&_0x1f7fe6();}function _0x8d1ad0(){const _0x25c7a6=window[_0x47cb00([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x47cb00([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x47cb00([0x6e,0x6f,0x77])]())[_0x47cb00([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x47cb00([0x2e]),'');let _0xb9d65f=_0x47cb00([0x73]);for(let _0x53e085=0x0;_0x53e085<_0x25c7a6[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53e085+=0x2){let _0x4c6582=window[_0x47cb00([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25c7a6[_0x47cb00([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53e085,_0x53e085+0x2));_0x4c6582>=_0x537cb1[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4c6582-=_0x537cb1[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xb9d65f+=_0x537cb1[_0x4c6582];}return _0xb9d65f;}function _0x153945(){const _0x1d2284=_0x1629b0[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e]));if(0x3!=_0x1d2284[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xf3f164(_0x1d2284[0x1]);function _0xf3f164(_0x122dd1){const _0x2c23d0=_0x310055(_0x122dd1);return _0x2c23d0&&_0x3b39b6()?_0x2c23d0:null;function _0x3b39b6(){const _0x217102=_0x2c23d0[_0x47cb00([0x6a,0x74,0x69])],_0xbfab8b=window[_0x47cb00([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x217102[_0x47cb00([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x217102[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3fbd30={..._0x2c23d0,[_0x47cb00([0x6a,0x74,0x69])]:_0x217102[_0x47cb00([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x217102[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3fbd30[_0x47cb00([0x76,0x63])],_0xb553c5(_0x3fbd30)==_0xbfab8b;}}}async function _0x745636(){let _0x5dbcc8=!0x0;try{const _0x438f77=_0x1629b0[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])](_0x47cb00([0x2e])),[_0x2f1097,_0x44ee83,_0x2e9daf]=_0x438f77;return _0x28c3f4(_0x2f1097),await _0x5afed9(_0x2f1097,_0x44ee83,_0x2e9daf),_0x5dbcc8;}catch{return!0x1;}function _0x28c3f4(_0x53f14e){const _0xbdcc09=_0x310055(_0x53f14e);_0xbdcc09&&_0xbdcc09[_0x47cb00([0x61,0x6c,0x67])]==_0x47cb00([0x45,0x53,0x32,0x35,0x36])||(_0x5dbcc8=!0x1);}async function _0x5afed9(_0xd8dbbd,_0x77aec4,_0x253966){const _0x53b6c6=window[_0x47cb00([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x47cb00([0x66,0x72,0x6f,0x6d])](_0x41977e(_0x253966),_0x2e9534=>_0x2e9534[_0x47cb00([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4d8922=new window[(_0x47cb00([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x47cb00([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xd8dbbd+_0x47cb00([0x2e])+_0x77aec4),_0xb67fc7=window[_0x47cb00([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x47cb00([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xb67fc7)return;const _0x29548e=await _0xb67fc7[_0x47cb00([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x47cb00([0x6a,0x77,0x6b]),_0x50fed0,{[_0x47cb00([0x6e,0x61,0x6d,0x65])]:_0x47cb00([0x45,0x43,0x44,0x53,0x41]),[_0x47cb00([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x47cb00([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x47cb00([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xb67fc7[_0x47cb00([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x47cb00([0x6e,0x61,0x6d,0x65])]:_0x47cb00([0x45,0x43,0x44,0x53,0x41]),[_0x47cb00([0x68,0x61,0x73,0x68])]:{[_0x47cb00([0x6e,0x61,0x6d,0x65])]:_0x47cb00([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x29548e,_0x53b6c6,_0x4d8922)||(_0x5dbcc8=!0x1);}}function _0x310055(_0x4df010){return _0x4df010[_0x47cb00([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x47cb00([0x65,0x79]))?JSON[_0x47cb00([0x70,0x61,0x72,0x73,0x65])](_0x41977e(_0x4df010)):null;}function _0x41977e(_0x485d04){return window[_0x47cb00([0x61,0x74,0x6f,0x62])](_0x485d04[_0x47cb00([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x47cb00([0x2b]))[_0x47cb00([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x47cb00([0x2f])));}function _0xb553c5(_0x3ed337){let _0x48abca=0x1505;function _0x1f4e38(_0x545fb2){for(let _0x30a15b=0x0;_0x30a15b<_0x545fb2[_0x47cb00([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x30a15b++){const _0x3e9fa2=_0x545fb2[_0x47cb00([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x30a15b);_0x48abca=(_0x48abca<<0x5)+_0x48abca+_0x3e9fa2,_0x48abca&=_0x48abca;}}function _0x4ecaff(_0x8381f9){Array[_0x47cb00([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x8381f9)?_0x8381f9[_0x47cb00([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4ecaff):_0x8381f9&&typeof _0x8381f9==_0x47cb00([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x47cb00([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x8381f9)[_0x47cb00([0x73,0x6f,0x72,0x74])]()[_0x47cb00([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5f0ae9,_0x6177a4])=>{_0x1f4e38(_0x5f0ae9),_0x4ecaff(_0x6177a4);}):_0x1f4e38(window[_0x47cb00([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x8381f9));}return _0x4ecaff(_0x3ed337),_0x48abca>>>0x0;}function _0x3dbaa9(_0x15806b){return _0x15806b[_0x47cb00([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x47cb00([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x47cb00([0x30]));}function _0x3f5542(_0x1b7322){return _0x1b7322[_0x47cb00([0x73,0x70,0x6c,0x69,0x74])]('')[_0x47cb00([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x47cb00([0x6a,0x6f,0x69,0x6e])]('');}function _0x252d69(){}function _0x47cb00(_0x554134){return _0x554134['map'](_0x12552b=>String['fromCharCode'](_0x12552b))['join']('');}_0x5b3dee(await _0x52eb9b());}(this);}}const y=['color','font-family','font-size','text-decoration','text-decoration-line','font-weight','font-style','vertical-align'],g=['color','font-family','font-size'],h={'font-style':[['italic','i']],'font-weight':[['medium','strong'],['bold','strong'],['bolder','strong'],[_0x3e0e62=>Number(_0x3e0e62)>=0x258,'strong']],'text-decoration':[['underline','u'],['line-through','s']],'text-decoration-line':[['underline','u'],['line-through','s']],'vertical-align':[['sub','sub'],['super','sup']]};function O(_0x5e5e79){return y['includes'](_0x5e5e79);}function E(_0x4e4087){return Array['from'](_0x4e4087['getStyleNames']())['filter'](O);}function F(_0x34dcff,_0x17c9c8,_0x3a38f5){const {spanStyles:_0x26f061,stylesToBeHtmlElements:_0x12283f}=L(_0x34dcff,_0x3a38f5);!function(_0x265913,_0x7cc8b,_0x411f22){for(const _0x274e88 in _0x411f22){_0x411f22[_0x274e88]['forEach'](([,_0x4f98be])=>{const _0x5458bd=_0x7cc8b['createElement'](_0x4f98be,[],_0x265913['getChildren']());_0x7cc8b['insertChild'](0x0,_0x5458bd,_0x265913);}),_0x7cc8b['removeStyle'](_0x274e88,_0x265913);}}(_0x34dcff,_0x17c9c8,_0x12283f),function(_0x3b1623,_0x1760f5,_0x4eda3d){if(!Object['keys'](_0x4eda3d)['length'])return;const _0x41a550=_0x1760f5['createElement']('span',[],_0x3b1623['getChildren']());_0x1760f5['setStyle'](_0x4eda3d,_0x41a550),_0x1760f5['insertChild'](0x0,_0x41a550,_0x3b1623),_0x1760f5['removeStyle'](Object['keys'](_0x4eda3d),_0x3b1623);}(_0x34dcff,_0x17c9c8,_0x26f061);}function P(_0x3e75a7,_0x5ee093,_0x8df850){const {spanStyles:_0x4cb048}=L(_0x3e75a7,_0x8df850),_0x1f7305=Object['keys'](_0x4cb048);if(!_0x1f7305['length'])return;let _0x2a2af5=!0x1;for(const _0x1418ba of _0x3e75a7['getChildren']())if(_0x1418ba['is']('element','span')){_0x2a2af5=!0x0;for(const [_0x30db78,_0x640547]of Object['entries'](_0x4cb048))_0x1418ba['hasStyle'](_0x30db78)||_0x5ee093['setStyle']({[_0x30db78]:_0x640547},_0x1418ba);}_0x2a2af5&&_0x5ee093['removeStyle'](_0x1f7305,_0x3e75a7);}function L(_0x4a87fa,_0x458226){const _0x4a2fc0={},_0x2652d9={};return _0x458226['forEach'](_0x5b8fff=>{const _0x4af2eb=_0x4a87fa['getStyle'](_0x5b8fff);if(_0x4af2eb){if(function(_0x2d70a4){return g['includes'](_0x2d70a4);}(_0x5b8fff))_0x4a2fc0[_0x5b8fff]=_0x4af2eb;else{if(function(_0x7b5dd7){return _0x7b5dd7 in h;}(_0x5b8fff)){const _0x1ae9cb=_0x4af2eb['split']('\x20');h[_0x5b8fff]['forEach'](([_0x289499,_0x27546a])=>{for(const _0x724c9a of _0x1ae9cb){('function'==typeof _0x289499&&_0x289499(_0x724c9a)||_0x289499===_0x724c9a)&&(_0x2652d9[_0x5b8fff]=[..._0x2652d9[_0x5b8fff]||[],[_0x289499,_0x27546a]]);}});}}}}),{'spanStyles':_0x4a2fc0,'stylesToBeHtmlElements':_0x2652d9};}class MSOfficeInlineStylePropagator extends _0x352fbb{['execute'](_0x13504a){const _0x42e16c=new _0x2528d8(_0x13504a['content']['document']),_0x20ec79=_0x42e16c['createRangeIn'](_0x13504a['content']),_0x76e421=new _0x5a0b83(_0x42e16c['document']['stylesProcessor']),_0x3c9407=[...new _0xb19473(_0x76e421)['blockElements'],'font'],_0xf281da=_0x20ec79['getItems']();for(const _0x43a775 of _0xf281da)if(_0x43a775['is']('element')&&_0x3c9407['includes'](_0x43a775['name'])){if(_0x43a775['hasStyle']('mso-list')&&'none'!==_0x43a775['getStyle']('mso-list')){P(_0x43a775,_0x42e16c,E(_0x43a775));continue;}F(_0x43a775,_0x42e16c,E(_0x43a775));}}['isActive'](_0x8e7fed){return super['isActive'](_0x8e7fed)||u(_0x8e7fed);}}class PasteFromOfficeEnhancedPropagator extends _0x564ade{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3ae215];}['init'](){const _0x5cd1d6=this['editor'],_0x1f01a0=_0x5cd1d6['plugins']['get']('PasteFromOffice'),_0x1c692a=_0x5cd1d6['editing']['view']['document'],_0x71db94=new MSOfficeInlineStylePropagator(_0x1c692a);_0x1f01a0['registerNormalizer'](_0x71db94,_0x4cdd7d['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x492595=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x537e88;for(const _0x2b4067 in _0x492595){const _0x2bf7ea=_0x2b4067,_0x4845d1=_0x492595[_0x2bf7ea];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x4845d1||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x4845d1){delete _0x492595[_0x2bf7ea],_0x537e88=_0x4845d1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x537e88&&_0x492595['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x537e88&&_0x492595['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x537e88&&_0x492595['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x537e88&&_0x492595['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x537e88&&_0x492595['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x537e88&&_0x492595['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}class PasteFromOfficeEnhanced extends _0x564ade{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3ae215,PasteFromOfficeEnhancedInliner,PasteFromOfficeEnhancedPropagator];}}export{PasteFromOfficeEnhanced};
23
+ import{Plugin as _0x34d34d}from'@ckeditor/ckeditor5-core';import{PasteFromOffice as _0x3037bc,PasteFromOfficeMSWordNormalizer as _0x3e1f02}from'@ckeditor/ckeditor5-paste-from-office';import{priorities as _0x597b6e,uid as _0x2eb799}from'@ckeditor/ckeditor5-utils';import{ViewDocument as _0x27de1b,ViewDomConverter as _0x2072eb,ViewUpcastWriter as _0x3944a0}from'@ckeditor/ckeditor5-engine';const f=/<meta\s*name="?generator"?\s*content="?microsoft\s*excel\s*\d+"?\/?>/i;function u(_0x385d0e){return f['test'](_0x385d0e);}const l=/^(?<tagName>(?!\.)[\w-]+)?(\.(?<className>[\w-]+))?$/i;function d(_0x2fa7e6,_0x4bcdcc){const _0x50bc43=new Map();for(const [_0x20191c,_0x9b04bd]of _0x4bcdcc){if(!_0x20191c['tagName']&&!_0x20191c['className'])continue;const _0xc886dd=!_0x20191c['tagName']||_0x2fa7e6['name']===_0x20191c['tagName'],_0x4bedb1=!_0x20191c['className']||_0x2fa7e6['hasClass'](_0x20191c['className']);_0xc886dd&&_0x4bedb1&&_0x50bc43['set'](_0x20191c,_0x9b04bd);}return _0x50bc43;}function m(_0x312473){const _0x303124={};for(let _0x4cc104=0x0;_0x4cc104<_0x312473['length'];_0x4cc104++){const _0x5dbf11=_0x312473[_0x4cc104],_0x24c057=_0x312473['getPropertyValue'](_0x5dbf11);'initial'!==_0x24c057&&(_0x303124[_0x5dbf11]=_0x24c057);}return _0x303124;}function w(_0x359763){const _0x709d1c=_0x359763['split'](',')['map'](_0x298057=>_0x298057['trim']()),_0x4c038d=[];for(const _0x41792a of _0x709d1c){const _0x5d3950=l['exec'](_0x41792a);_0x5d3950&&_0x4c038d['push'](_0x5d3950['groups']);}return _0x4c038d;}function y(_0x252d00){const _0x2d44e3={};for(const _0x5cafd4 of _0x252d00)Object['assign'](_0x2d44e3,_0x5cafd4);return _0x2d44e3;}var g=class extends _0x3e1f02{['execute'](_0x3ae6d9){const {styles:_0x20d5ac,stylesString:_0x43c318}=_0x3ae6d9['extraContent'],_0x1e0bcd=new _0x3944a0(_0x3ae6d9['content']['document']),_0x449d8e=_0x1e0bcd['createRangeIn'](_0x3ae6d9['content']),_0x47ea2b=function(_0x4cd9e2){const _0x23b9c3=new Map();for(const _0xf9cd7e in _0x4cd9e2){const _0x4e1207=w(_0xf9cd7e),_0x2135f1=_0x4cd9e2[_0xf9cd7e];for(const _0x3fe222 of _0x4e1207)_0x23b9c3['set'](_0x3fe222,_0x2135f1);}return _0x23b9c3;}(function(_0x2aee91){const _0x4834ab={};for(const _0x533538 of _0x2aee91)for(const _0x5dc6e8 of _0x533538['cssRules'])if(_0x5dc6e8 instanceof CSSStyleRule){const _0x2e4661=m(_0x5dc6e8['style']);_0x4834ab[_0x5dc6e8['selectorText']]=Object['assign']({},_0x4834ab[_0x5dc6e8['selectorText']]||{},_0x2e4661);}return _0x4834ab;}(_0x20d5ac)),_0x58f72a=function(_0x402dc9){const _0x5199b6={},_0x134934=/(?<selector>[^{}]+)\{[^}]*mso-pattern:\s*(?<color>#[0-9A-Fa-f]{3,6}|[a-z]+)\s+(?<patternType>[\w-]+)[^}]*\}/gi,_0x113596=/\.(?<className>[\w-]+)/g;let _0x2c1e7e;for(;null!==(_0x2c1e7e=_0x134934['exec'](_0x402dc9));){const {selector:_0x47f51a,color:_0x382392,patternType:_0x2db886}=_0x2c1e7e['groups'];if('auto'!==_0x382392['toLowerCase']()&&'none'!==_0x2db886['toLowerCase']()&&'auto'!==_0x2db886['toLowerCase']()){for(const _0x3bde1c of _0x47f51a['matchAll'](_0x113596))_0x5199b6[_0x3bde1c['groups']['className']]=_0x382392;}}return _0x5199b6;}(_0x43c318);for(const _0x9d72f1 of _0x449d8e){if('elementStart'!==_0x9d72f1['type'])continue;const _0x288dd1=_0x9d72f1['item'],_0x48dc0c=d(_0x288dd1,_0x47ea2b),_0x402362=_0x48dc0c['size']?y(Array['from'](_0x48dc0c['values']())):{};if(!('background-color'in _0x402362)&&!('background'in _0x402362)){for(const [_0x1df3af,_0x55958f]of Object['entries'](_0x58f72a))if(_0x288dd1['hasClass'](_0x1df3af)){_0x402362['background-color']=_0x55958f;break;}}for(const _0x156fdf in _0x402362)_0x288dd1['hasStyle'](_0x156fdf)||_0x1e0bcd['setStyle'](_0x156fdf,_0x402362[_0x156fdf],_0x288dd1);}}['isActive'](_0x1f9e1c){return super['isActive'](_0x1f9e1c)||u(_0x1f9e1c);}},p=class extends _0x34d34d{static get['pluginName'](){return'PasteFromOfficeEnhancedInliner';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3037bc];}['init'](){const _0x17af90=this['editor'],_0x319dc0=_0x17af90['plugins']['get']('PasteFromOffice'),_0x27cb72=_0x17af90['editing']['view']['document'],_0x58fc4e=new g(_0x27cb72);_0x319dc0['registerNormalizer'](_0x58fc4e,_0x597b6e['high']+0xb);}['afterInit'](){!async function(_0x735840){const _0x4e037f='sG65Crk1cd2igLN7zIEAYju9J3hbPBtnFMxQf4HwZal0qTSVKyDmoRvUXepWO8',_0x52e562=0x78df8,_0x22c977=window['Date']['now'](),_0x5ed30a=_0x735840['editor'],_0x3142b1=new window['Promise'](_0x556433=>{_0x5ed30a['once']('ready',_0x556433);}),_0x50eefa={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x20dc83=_0x5ed30a['config']['get']('licenseKey');async function _0x112cf3(){let _0x59f20c,_0x1520d3=null,_0x2247c7=null;try{return'GPL'==_0x20dc83?'NotAllowed':(_0x59f20c=_0x170779(),_0x59f20c?(_0x59f20c['usageEndpoint']&&(_0x2247c7=_0x180455(_0x59f20c['usageEndpoint'],_0x59f20c['jti'])),await _0x2c3872()?_0x487d79()?_0x13b5ef()?'Expired':_0x3e2eb6()?('evaluation'==_0x59f20c['licenseType']&&(_0x1520d3=_0x33d357('EvaluationLimit')),await _0xcf0ba4()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x13b5ef(){const _0x2d59aa=['evaluation','trial']['includes'](_0x59f20c['licenseType'])?_0x22c977/0x3e8:0xe10*_0x52e562;return _0x59f20c['exp']<_0x2d59aa;}function _0x487d79(){const _0x21e1f4=_0x59f20c['features'];return!!_0x21e1f4&&(!!_0x21e1f4['includes']('*')||(!!_0x21e1f4['includes']('POE')||(!!_0x21e1f4['includes']('PP')||!(!_0x21e1f4['includes']('TRILIUM')||!_0x47dbe3()))));}function _0x3e2eb6(){const _0x1cd294=_0x59f20c['licensedHosts'];if(!_0x1cd294||0x0==_0x1cd294['length'])return!0x0;const {hostname:_0x1c10d1}=new URL(window['location']['href']);if(_0x1cd294['includes'](_0x1c10d1))return!0x0;const _0x438596=_0x1c10d1['split']('.');return _0x1cd294['filter'](_0xdc163c=>_0xdc163c['includes']('*'))['map'](_0x818953=>_0x818953['split']('.'))['filter'](_0x1cbbc9=>_0x1cbbc9['length']<=_0x438596['length'])['map'](_0x4c2d29=>Array(_0x438596['length']-_0x4c2d29['length'])['fill']('*'===_0x4c2d29[0x0]?'*':'')['concat'](_0x4c2d29))['some'](_0x4c8f57=>_0x438596['every']((_0x49012f,_0x5e5798)=>_0x4c8f57[_0x5e5798]===_0x49012f||'*'===_0x4c8f57[_0x5e5798]));}function _0xcf0ba4(){return _0x1520d3&&_0x2247c7?new window['Promise']((_0x4131ad,_0x498d3b)=>{_0x1520d3['then'](_0x4131ad,_0x498d3b),_0x2247c7['then'](_0x5ce054=>{'Valid'!=_0x5ce054&&_0x4131ad(_0x5ce054);},_0x498d3b);}):_0x1520d3||_0x2247c7||'Valid';}}function _0x180455(_0x4a3862,_0x42bfb9){return new window['Promise'](_0x1de86b=>{if(_0x3310f9())return _0x1de86b('Valid');_0x5a1546(),_0x5ed30a['decorate']('_sendUsageRequest');let _0x4efcca=!0x1;const _0xcb428f=_0x2eb799();function _0x4433a6(_0x2c9c8f){return!!_0x2c9c8f&&('object'==typeof _0x2c9c8f||'function'==typeof _0x2c9c8f)&&'function'==typeof _0x2c9c8f['then']&&'function'==typeof _0x2c9c8f['catch'];}function _0x3e8099(_0x224fa2){_0x19b432(_0x224fa2)['then'](_0x15ba49=>_0x15ba49&&'ok'==_0x15ba49['status']?_0xd1510a(_0x321598(_0xcb428f+_0x42bfb9))!=_0x15ba49['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x1b0893=>(_0x350748(),_0x1b0893),()=>{const _0x52898f=_0x206f08();return null==_0x52898f?(_0x350748(),'Valid'):_0x22c977-_0x52898f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1de86b)['catch'](()=>{_0x1de86b('UsageLimit');});const _0x1d88bf=0x36ee80;function _0x350748(){const _0x2730b1='llct-'+_0xd1510a(_0x321598(_0x4a3862)),_0x2c2db8=_0x584da2(_0xd1510a(window['Math']['ceil'](_0x22c977/_0x1d88bf)));window['localStorage']['setItem'](_0x2730b1,_0x2c2db8);}function _0x206f08(){const _0x5a443b='llct-'+_0xd1510a(_0x321598(_0x4a3862)),_0x46c3c5=window['localStorage']['getItem'](_0x5a443b);return _0x46c3c5?window['parseInt'](_0x584da2(_0x46c3c5),0x10)*_0x1d88bf:null;}function _0x19b432(_0x168a5c){return new window['Promise']((_0x5c28cb,_0xc3de9e)=>{_0x168a5c['then'](_0x5c28cb,_0xc3de9e),window['setTimeout'](_0xc3de9e,0x1d4c0);});}}_0x5ed30a['on']('_sendUsageRequest',(_0x3838b3,_0x7bf5d8)=>{if(_0x7bf5d8[0x0]!=_0x4a3862)return _0x1de86b('UsageLimit');_0x7bf5d8[0x1]={..._0x7bf5d8[0x1],'requestId':_0xcb428f};},{'priority':'high'}),_0x5ed30a['on']('_sendUsageRequest',_0x276451=>{_0x4433a6(_0x276451['return'])&&(_0x4efcca=!0x0,_0x3e8099(_0x276451['return']));},{'priority':'low'}),_0x3142b1['then'](()=>{_0x4efcca||_0x1de86b('UsageLimit');});});function _0x3310f9(){return'auto'==_0x5ed30a['editing']['view']['_overlayModeHint'];}function _0x5a1546(){_0x5ed30a['editing']['view']['_overlayModeHint']='auto';}}function _0x33d357(_0x46866f){const _0x512b97=[new window['Promise'](_0x49d678=>setTimeout(_0x49d678,0x93ecc)),_0x3142b1['then'](()=>new window['Promise'](_0x333e8d=>{let _0x1a7011=0x0;_0x5ed30a['model']['on']('applyOperation',(_0x43dfca,_0x10d97a)=>{_0x10d97a[0x0]['isDocumentOperation']&&_0x1a7011++,0x5e8==_0x1a7011&&(_0x333e8d(),_0x43dfca['off']());});}))];return window['Promise']['race'](_0x512b97)['then'](()=>_0x46866f);}async function _0x4b0b00(){await _0x3142b1,_0x5ed30a['model']['change']=_0x8a6241,_0x5ed30a['model']['enqueueChange']=_0x8a6241,_0x5ed30a['enableReadOnlyMode']('model');}function _0x47dbe3(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5a0e20(_0x43bb92){const _0x15d0df=_0x56d630();_0x5ed30a[_0x15d0df]='pasteFromOfficeEnhancedLicenseKey'+_0x43bb92,'Valid'!=_0x43bb92&&_0x4b0b00();}function _0x56d630(){const _0x10c49a=window['String'](window['performance']['now']())['replace']('.','');let _0x5bbdc0='s';for(let _0x266b98=0x0;_0x266b98<_0x10c49a['length'];_0x266b98+=0x2){let _0x18fb4e=window['parseInt'](_0x10c49a['substring'](_0x266b98,_0x266b98+0x2));_0x18fb4e>=0x3e&&(_0x18fb4e-=0x3e),_0x5bbdc0+=_0x4e037f[_0x18fb4e];}return _0x5bbdc0;}function _0x170779(){const _0x2fdf2d=_0x20dc83['split']('.');if(0x3!=_0x2fdf2d['length'])return null;return _0x47f9cb(_0x2fdf2d[0x1]);function _0x47f9cb(_0x8c9b80){const _0x2ae5f5=_0x40656d(_0x8c9b80);return _0x2ae5f5&&_0x214593()?_0x2ae5f5:null;function _0x214593(){const _0x595d09=_0x2ae5f5['jti'],_0x22e67a=window['parseInt'](_0x595d09['substring'](_0x595d09['length']-0x8),0x10),_0xb1ddf={..._0x2ae5f5,'jti':_0x595d09['substring'](0x0,_0x595d09['length']-0x8)};return delete _0xb1ddf['vc'],_0x321598(_0xb1ddf)==_0x22e67a;}}}async function _0x2c3872(){let _0x49d7d1=!0x0;try{const [_0x1e7030,_0x1c6361,_0x38f23e]=_0x20dc83['split']('.');return _0x3eb066(_0x1e7030),await _0x37394d(_0x1e7030,_0x1c6361,_0x38f23e),_0x49d7d1;}catch{return!0x1;}function _0x3eb066(_0x751d37){const _0x58fef7=_0x40656d(_0x751d37);_0x58fef7&&'ES256'==_0x58fef7['alg']||(_0x49d7d1=!0x1);}async function _0x37394d(_0x1a9a77,_0x13b77f,_0xf7270f){const _0x33cb2a=window['Uint8Array']['from'](_0x52536a(_0xf7270f),_0x5697b3=>_0x5697b3['charCodeAt'](0x0)),_0x2121cf=new window['TextEncoder']()['encode'](_0x1a9a77+'.'+_0x13b77f),_0x2d4770=window['crypto']['subtle'];if(!_0x2d4770)return;const _0x140c76=await _0x2d4770['importKey']('jwk',_0x50eefa,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x2d4770['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x140c76,_0x33cb2a,_0x2121cf)||(_0x49d7d1=!0x1);}}function _0x40656d(_0x17f115){return _0x17f115['startsWith']('ey')?JSON['parse'](_0x52536a(_0x17f115)):null;}function _0x52536a(_0x2845f7){return window['atob'](_0x2845f7['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x321598(_0x52e638){let _0x5e04e1=0x1505;function _0xe6274c(_0x5e6c20){for(let _0xfa777e=0x0;_0xfa777e<_0x5e6c20['length'];_0xfa777e++){const _0x32dd51=_0x5e6c20['charCodeAt'](_0xfa777e);_0x5e04e1=(_0x5e04e1<<0x5)+_0x5e04e1+_0x32dd51,_0x5e04e1&=_0x5e04e1;}}function _0x469c84(_0x47e2db){Array['isArray'](_0x47e2db)?_0x47e2db['forEach'](_0x469c84):_0x47e2db&&'object'==typeof _0x47e2db?Object['entries'](_0x47e2db)['sort']()['forEach'](([_0x224d72,_0x21d027])=>{_0xe6274c(_0x224d72),_0x469c84(_0x21d027);}):_0xe6274c(window['String'](_0x47e2db));}return _0x469c84(_0x52e638),_0x5e04e1>>>0x0;}function _0xd1510a(_0x1f6d7a){return _0x1f6d7a['toString'](0x10)['padStart'](0x8,'0');}function _0x584da2(_0x5a93b5){return _0x5a93b5['split']('')['reverse']()['join']('');}function _0x8a6241(){}_0x5a0e20(await _0x112cf3());}(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'],[_0x295773=>Number(_0x295773)>=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(_0x3c0810){return h['includes'](_0x3c0810);}function v(_0x219ffa){return Array['from'](_0x219ffa['getStyleNames']())['filter'](E);}function F(_0x4635b9,_0x156bfc,_0x337562){const {spanStyles:_0x347fc0,stylesToBeHtmlElements:_0x277bc4}=K(_0x4635b9,_0x337562);!function(_0x4d1517,_0x38a19b,_0x428b14){for(const _0x57fdc1 in _0x428b14)_0x428b14[_0x57fdc1]['forEach'](([,_0x4ec55e])=>{const _0x6cca25=_0x38a19b['createElement'](_0x4ec55e,[],_0x4d1517['getChildren']());_0x38a19b['insertChild'](0x0,_0x6cca25,_0x4d1517);}),_0x38a19b['removeStyle'](_0x57fdc1,_0x4d1517);}(_0x4635b9,_0x156bfc,_0x277bc4),function(_0x225d2b,_0x34f4c8,_0x1b1206){if(!Object['keys'](_0x1b1206)['length'])return;const _0x3ee3b3=_0x34f4c8['createElement']('span',[],_0x225d2b['getChildren']());_0x34f4c8['setStyle'](_0x1b1206,_0x3ee3b3),_0x34f4c8['insertChild'](0x0,_0x3ee3b3,_0x225d2b),_0x34f4c8['removeStyle'](Object['keys'](_0x1b1206),_0x225d2b);}(_0x4635b9,_0x156bfc,_0x347fc0);}function P(_0x565843,_0x130345,_0x2e051c){const {spanStyles:_0x531afb}=K(_0x565843,_0x2e051c),_0x4b43b5=Object['keys'](_0x531afb);if(!_0x4b43b5['length'])return;let _0x527f9a=!0x1;for(const _0x48695d of _0x565843['getChildren']())if(_0x48695d['is']('element','span')){_0x527f9a=!0x0;for(const [_0x17db36,_0x27a3ef]of Object['entries'](_0x531afb))_0x48695d['hasStyle'](_0x17db36)||_0x130345['setStyle']({[_0x17db36]:_0x27a3ef},_0x48695d);}_0x527f9a&&_0x130345['removeStyle'](_0x4b43b5,_0x565843);}function K(_0x32c3ec,_0x3bec52){const _0x54e143={},_0x3d43e3={};return _0x3bec52['forEach'](_0x1ce04b=>{const _0x2b1167=_0x32c3ec['getStyle'](_0x1ce04b);if(_0x2b1167){if(function(_0xce45c0){return O['includes'](_0xce45c0);}(_0x1ce04b))_0x54e143[_0x1ce04b]=_0x2b1167;else{if(function(_0x2fc344){return _0x2fc344 in L;}(_0x1ce04b)){const _0x1af571=_0x2b1167['split']('\x20');L[_0x1ce04b]['forEach'](([_0x2e0d64,_0x3f296a])=>{for(const _0x12d5a1 of _0x1af571)('function'==typeof _0x2e0d64&&_0x2e0d64(_0x12d5a1)||_0x2e0d64===_0x12d5a1)&&(_0x3d43e3[_0x1ce04b]=[..._0x3d43e3[_0x1ce04b]||[],[_0x2e0d64,_0x3f296a]]);});}}}}),{'spanStyles':_0x54e143,'stylesToBeHtmlElements':_0x3d43e3};}var b=class extends _0x3e1f02{['execute'](_0x138ddd){const _0x329558=new _0x3944a0(_0x138ddd['content']['document']),_0x322a9b=_0x329558['createRangeIn'](_0x138ddd['content']),_0x11ab81=[...new _0x2072eb(new _0x27de1b(_0x329558['document']['stylesProcessor']))['blockElements'],'font'],_0x4bf5b8=_0x322a9b['getItems']();for(const _0xeb3cca of _0x4bf5b8)if(_0xeb3cca['is']('element')&&_0x11ab81['includes'](_0xeb3cca['name'])){if(_0xeb3cca['hasStyle']('mso-list')&&'none'!==_0xeb3cca['getStyle']('mso-list')){P(_0xeb3cca,_0x329558,v(_0xeb3cca));continue;}F(_0xeb3cca,_0x329558,v(_0xeb3cca));}}['isActive'](_0x28f2c9){return super['isActive'](_0x28f2c9)||u(_0x28f2c9);}},x=class extends _0x34d34d{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PasteFromOfficeEnhancedPropagator';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3037bc];}['init'](){const _0x239552=this['editor'],_0x95ae82=_0x239552['plugins']['get']('PasteFromOffice'),_0x32f52b=_0x239552['editing']['view']['document'],_0xffaa2b=new b(_0x32f52b);_0x95ae82['registerNormalizer'](_0xffaa2b,_0x597b6e['high']+0xa),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x225be4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x53b120;for(const _0x2d745f in _0x225be4){const _0x34dd69=_0x2d745f,_0x104bb1=_0x225be4[_0x34dd69];if('pasteFromOfficeEnhancedLicenseKeyValid'==_0x104bb1||'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x104bb1||'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x104bb1||'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x104bb1||'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x104bb1||'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x104bb1||'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x104bb1){delete _0x225be4[_0x34dd69],_0x53b120=_0x104bb1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'pasteFromOfficeEnhancedLicenseKeyInvalid'==_0x53b120&&_0x225be4['_showLicenseError']('invalid'),'pasteFromOfficeEnhancedLicenseKeyExpired'==_0x53b120&&_0x225be4['_showLicenseError']('expired'),'pasteFromOfficeEnhancedLicenseKeyDomainLimit'==_0x53b120&&_0x225be4['_showLicenseError']('domainLimit'),'pasteFromOfficeEnhancedLicenseKeyNotAllowed'==_0x53b120&&_0x225be4['_showLicenseError']('featureNotAllowed','PasteFromOfficeEnhanced'),'pasteFromOfficeEnhancedLicenseKeyEvaluationLimit'==_0x53b120&&_0x225be4['_showLicenseError']('evaluationLimit'),'pasteFromOfficeEnhancedLicenseKeyUsageLimit'==_0x53b120&&_0x225be4['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},k=class extends _0x34d34d{static get['pluginName'](){return'PasteFromOfficeEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3037bc,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,43 +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 { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';
6
- import { 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";
7
7
  /**
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
- */
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
+ */
34
34
  export declare class MSOfficeStylesInliner extends PasteFromOfficeMSWordNormalizer {
35
- /**
36
- * @inheritDoc
37
- */
38
- execute(data: ClipboardInputTransformationData): void;
39
- /**
40
- * @inheritDoc
41
- */
42
- isActive(htmlString: string): boolean;
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ override execute(data: ClipboardInputTransformationData): void;
39
+ /**
40
+ * @inheritDoc
41
+ */
42
+ override isActive(htmlString: string): boolean;
43
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,47 +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
- */
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/msofficeinlinestylepropagator
7
- */
8
- import type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';
9
- import { PasteFromOfficeMSWordNormalizer } from '@ckeditor/ckeditor5-paste-from-office';
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
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
- */
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
+ */
38
38
  export declare class MSOfficeInlineStylePropagator extends PasteFromOfficeMSWordNormalizer {
39
- /**
40
- * @inheritDoc
41
- */
42
- execute(data: ClipboardInputTransformationData): void;
43
- /**
44
- * @inheritDoc
45
- */
46
- isActive(htmlString: string): boolean;
39
+ /**
40
+ * @inheritDoc
41
+ */
42
+ override execute(data: ClipboardInputTransformationData): void;
43
+ /**
44
+ * @inheritDoc
45
+ */
46
+ override isActive(htmlString: string): boolean;
47
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.2.0",
3
+ "version": "48.3.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.2.0",
35
- "@ckeditor/ckeditor5-core": "48.2.0",
36
- "@ckeditor/ckeditor5-engine": "48.2.0",
37
- "@ckeditor/ckeditor5-paste-from-office": "48.2.0",
38
- "@ckeditor/ckeditor5-utils": "48.2.0"
34
+ "@ckeditor/ckeditor5-clipboard": "48.3.0-alpha.1",
35
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
36
+ "@ckeditor/ckeditor5-engine": "48.3.0-alpha.1",
37
+ "@ckeditor/ckeditor5-paste-from-office": "48.3.0-alpha.1",
38
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.1"
39
39
  },
40
40
  "files": [
41
41
  "dist",