UNPKG

@ckeditor/ckeditor5-export-word

Version:

Export to Word feature for CKEditor 5.

23 lines 7.09 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x1e7b40=_0x4113;function _0x4113(_0x10ce00,_0x24263f){const _0x49d1b2=_0x49d1();return _0x4113=function(_0x4113c8,_0x5834e6){_0x4113c8=_0x4113c8-0xce;let _0x5f39d9=_0x49d1b2[_0x4113c8];return _0x5f39d9;},_0x4113(_0x10ce00,_0x24263f);}(function(_0xbd1972,_0x2431a8){const _0xaa4035=_0x4113,_0x49e447=_0xbd1972();while(!![]){try{const _0x1822ba=parseInt(_0xaa4035(0xdb))/0x1*(parseInt(_0xaa4035(0xde))/0x2)+-parseInt(_0xaa4035(0xd6))/0x3+-parseInt(_0xaa4035(0x10c))/0x4*(parseInt(_0xaa4035(0x10f))/0x5)+-parseInt(_0xaa4035(0xe1))/0x6+-parseInt(_0xaa4035(0xf3))/0x7+-parseInt(_0xaa4035(0xdf))/0x8*(-parseInt(_0xaa4035(0x105))/0x9)+-parseInt(_0xaa4035(0xf8))/0xa*(-parseInt(_0xaa4035(0xe7))/0xb);if(_0x1822ba===_0x2431a8)break;else _0x49e447['push'](_0x49e447['shift']());}catch(_0x5cf62c){_0x49e447['push'](_0x49e447['shift']());}}}(_0x49d1,0x96b9a));import{Command as _0x4bb729}from'ckeditor5/src/core.js';import{logWarning as _0x374bc1,collectStylesheets as _0x963823}from'ckeditor5/src/utils.js';import{getConverterOptions as _0x25539e,getConverterOptionsV2 as _0xa2cff9}from'./utils.js';import{getTranslation as _0x4e1fcf}from'./utils/common-translations.js';function _0x49d1(){const _0x547d90=['80ScHwVL','refresh','https://docx-converter.cke-cs.com/v2/convert/html-docx','download','createObjectURL','announce','token','export-word-v1-api-is-deprecated','converterOptions','document.docx','stringify','_downloadFile','dataCallback','1000953iqCbTM','ariaLiveAnnouncer','status','ExportWord','click','catch','POST','276fRJVZf','get','pending','39725tZyyXO','comments','margin_top','EDITOR_STYLES','header','href','finally','options','version','_token','</div>','createElement','converterUrl','application/docx','auto_pagination','margin_left','locale','footer','stylesheets','Word\x20document\x20export\x20failed','Word\x20document\x20export\x20successful','showWarning','format','contentLanguageDirection','remove','2511384uvNRBB','affectsData','then','isEnabled','execute','2dmmzWw','<div\x20class=\x22ck-content\x22\x20dir=\x22','set','275414iaRkXB','8ItbuWH','fileName','4695954SZlhPZ','An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.','function','editor','margin_bottom','data','4371774xCDlzg','suggestions','URL','Word\x20document\x20export\x20started','assertive','blob','fetch','config','isBusy','value','margin_right','Notification','5465187mYZnQB','application/json','plugins','https://docx-converter.cke-cs.com/v1/convert','orientation'];_0x49d1=function(){return _0x547d90;};return _0x49d1();}const h=[_0x1e7b40(0xf7),_0x1e7b40(0x111),_0x1e7b40(0xf1),_0x1e7b40(0xe5),_0x1e7b40(0x11e),_0x1e7b40(0xd3),_0x1e7b40(0x113),_0x1e7b40(0xce),_0x1e7b40(0x110),_0x1e7b40(0xe8)];export default class i extends _0x4bb729{constructor(_0x1fbf9f){const _0x3d8de1=_0x1e7b40;super(_0x1fbf9f),this[_0x3d8de1(0xdd)](_0x3d8de1(0xef),!0x1),this[_0x3d8de1(0xd7)]=!0x1;}[_0x1e7b40(0xf9)](){const _0x5e15b4=_0x1e7b40;this[_0x5e15b4(0xd9)]=!this[_0x5e15b4(0xef)],this[_0x5e15b4(0xf0)]=this[_0x5e15b4(0xef)]?_0x5e15b4(0x10e):void 0x0;}[_0x1e7b40(0xda)](_0x3ec2fb={}){const _0x68e3f6=_0x1e7b40,_0x1eebcc=this[_0x68e3f6(0xe4)],_0x425960=_0x3ec2fb[_0x68e3f6(0x117)]||0x2,_0x15fe58=0x1===_0x425960,_0x17ca5a=_0x3ec2fb[_0x68e3f6(0x11b)]||(_0x15fe58?_0x68e3f6(0xf6):_0x68e3f6(0xfa)),_0x459524=_0x3ec2fb[_0x68e3f6(0x100)]||{},_0xb022eb=_0x1eebcc[_0x68e3f6(0xf5)][_0x68e3f6(0x10d)](_0x68e3f6(0x108)),_0x2a6728=_0x3ec2fb[_0x68e3f6(0xfe)]||_0xb022eb[_0x68e3f6(0x118)],_0x55d4f5=!0x0===_0x459524[_0x68e3f6(0x11d)],_0x3b988c=_0x3ec2fb[_0x68e3f6(0x104)]||(_0x256061=>_0x256061[_0x68e3f6(0xe6)][_0x68e3f6(0x10d)]({'pagination':_0x55d4f5}));return 0x2===_0x425960&&function(_0x4f1470){for(const _0x2f4198 of h)if(void 0x0!==_0x4f1470[_0x2f4198])return!0x0;return!0x1;}(_0x459524)&&_0x374bc1(_0x68e3f6(0xff)),this[_0x68e3f6(0xef)]=!0x0,this[_0x68e3f6(0xf9)](),_0x963823(_0x3ec2fb[_0x68e3f6(0xcf)]||[_0x68e3f6(0x112)])[_0x68e3f6(0xd8)](async _0x2b6389=>{const _0x4a1407=_0x68e3f6;_0x1eebcc['ui'][_0x4a1407(0x106)][_0x4a1407(0xfd)](_0x4e1fcf(_0x1eebcc[_0x4a1407(0x11f)],_0x4a1407(0xea)));const _0x5dda71=await _0x3b988c(_0x1eebcc),_0x305bd4={'html':_0x4a1407(0xdc)+_0x1eebcc[_0x4a1407(0x11f)][_0x4a1407(0xd4)]+'\x22>'+_0x5dda71+_0x4a1407(0x119),'css':_0x2b6389,[_0x15fe58?_0x4a1407(0x116):_0x4a1407(0xee)]:{..._0x459524,..._0x15fe58?_0x25539e(_0x1eebcc,_0x459524):_0xa2cff9(_0x1eebcc,_0x459524)}},_0x5a3c46={'method':_0x4a1407(0x10b),'headers':{'Content-Type':_0x4a1407(0xf4),'Accept':_0x4a1407(0x11c),..._0x2a6728?{'Authorization':_0x2a6728[_0x4a1407(0xf0)]}:null},'body':JSON[_0x4a1407(0x102)](_0x305bd4)};return window[_0x4a1407(0xed)](_0x17ca5a,_0x5a3c46)[_0x4a1407(0xd8)](_0x174ae3=>{const _0x227713=_0x4a1407;if(0xc8!==_0x174ae3[_0x227713(0x107)])throw _0x174ae3;return _0x174ae3[_0x227713(0xec)]();})[_0x4a1407(0xd8)](_0x57ca21=>{const _0x5c5671=_0x4a1407;_0x1eebcc['ui'][_0x5c5671(0x106)][_0x5c5671(0xfd)](_0x4e1fcf(_0x1eebcc[_0x5c5671(0x11f)],_0x5c5671(0xd1)));const _0x42fe91=_0x5c5671(0xe3)==typeof _0x3ec2fb[_0x5c5671(0xe0)]?_0x3ec2fb[_0x5c5671(0xe0)]():_0x3ec2fb[_0x5c5671(0xe0)];this[_0x5c5671(0x103)](_0x57ca21,_0x42fe91||_0x5c5671(0x101));});})[_0x68e3f6(0x10a)](_0x2abda0=>{const _0x4f5e3c=_0x68e3f6,_0x3ff2a4=_0x1eebcc[_0x4f5e3c(0xf5)][_0x4f5e3c(0x10d)](_0x4f5e3c(0xf2));throw _0x1eebcc['ui'][_0x4f5e3c(0x106)][_0x4f5e3c(0xfd)](_0x4e1fcf(_0x1eebcc[_0x4f5e3c(0x11f)],_0x4f5e3c(0xd0)),{'politeness':_0x4f5e3c(0xeb)}),_0x3ff2a4[_0x4f5e3c(0xd2)](_0x4e1fcf(_0x1eebcc[_0x4f5e3c(0x11f)],_0x4f5e3c(0xe2))),_0x2abda0;})[_0x68e3f6(0x115)](()=>{const _0x45b533=_0x68e3f6;this[_0x45b533(0xef)]=!0x1,this[_0x45b533(0xf9)]();});}[_0x1e7b40(0x103)](_0x4b709d,_0x333e14){const _0x1d1b51=_0x1e7b40,_0x20e703=document[_0x1d1b51(0x11a)]('a');_0x20e703[_0x1d1b51(0x114)]=window[_0x1d1b51(0xe9)][_0x1d1b51(0xfc)](_0x4b709d),_0x20e703[_0x1d1b51(0xfb)]=_0x333e14,_0x20e703[_0x1d1b51(0x109)](),_0x20e703[_0x1d1b51(0xd5)]();}}