@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240402.0 → 0.0.0-nightly-20240404.0

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.
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),o=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(n=>{const i=t.commands.get("importWord"),s=new o.FileDialogButtonView(n),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),p=r(584);class c extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const n=new DataTransfer;n.setData("text/html",r.html);const o=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(o),t.editing.view.document.fire("clipboardInput",{dataTransfer:n})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),n={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(n).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,n=(0,p.first)(r.getSelectedBlocks());return!!n&&e.checkChild(n.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const n=r.getFirstPosition(),o=(0,p.first)(r.getSelectedBlocks());let i;i=o.is("element","paragraph")&&o.isEmpty?n:n.isAtStart?e.createPositionBefore(o):n.isAtEnd?e.createPositionAfter(o):t.split(n).position,this._importMarker=t.addMarker("importWord:"+(0,p.uid)(),{usingOperation:!1,affectsData:!1,range:new a.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const n=this.editor.plugins.get("ImportWordEditing").getToken(),o=new FormData;o.set("config",JSON.stringify(r)),o.set("file",e);const i={method:"POST",headers:{},body:o,signal:this._abortController.signal};return n&&(i.headers.Authorization=n.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,p.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,p.logError)("import-word-plugin-conversion-failed")}}const l=d;function d(t,e){const r=u();return(d=function(t,e){return r[t-=242]})(t,e)}function u(){const t=["https://docx-converter.cke-cs.com/v2/convert/docx-html","317442Ygehaq","301368IXCkWG","plugins","ImportWordEditing","306BMPJqh","CloudServices","requires","pluginName","define","token","add","42606mVbsDs","registerTokenUrl","23248nBihYT","539514NCCKhR","32694398mFTFxD","init","commands","editor","getToken","1240KbsmPY","tokenUrl","_token","importWord","get","cloudServices","473630HSSGIp","7uqpSff","none","2086hOgSog","inline","config"];return(u=function(){return t})()}!function(t,e){const r=d,n=t();for(;;)try{if(948973===parseInt(r(255))/1*(-parseInt(r(261))/2)+parseInt(r(242))/3+-parseInt(r(262))/4+-parseInt(r(248))/5*(parseInt(r(272))/6)+-parseInt(r(257))/7*(parseInt(r(274))/8)+parseInt(r(265))/9*(parseInt(r(254))/10)+parseInt(r(243))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class h extends t.Plugin{static get[l(268)](){return l(264)}static get[l(267)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(266)]}constructor(t){const e=l;super(t),this[e(250)]=null}async[l(244)](){const t=l,e=this[t(246)];e[t(259)][t(269)](t(251),{converterUrl:t(260),tokenUrl:(e[t(259)][t(252)](t(253))||{})[t(249)],formatting:{resets:t(256),defaults:t(256),styles:t(258)}}),e[t(245)][t(271)](t(251),new c(e));const{tokenUrl:r}=e[t(259)][t(252)](t(251));if(r){const{tokenUrl:n}=e[t(259)][t(252)](t(253))||{};this[t(250)]=r===n?e[t(263)][t(252)](t(266))[t(270)]:await e[t(263)][t(252)](t(266))[t(273)](r)}}[l(247)](){return this[l(250)]}}function m(){var t=["22YKqyRP","pluginName","1019025RhuYnR","3OXGkFc","1227274KBYsDI","12HdRmkX","ImportWord","3743188ijzCJX","11471280QSNquU","requires","5JbTRQA","567769NzAGQW","9568332sXQSdC","2005130xIRdRo"];return(m=function(){return t})()}function f(t,e){var r=m();return(f=function(t,e){return r[t-=342]})(t,e)}var g=f;!function(t,e){for(var r=f,n=t();;)try{if(726247===parseInt(r(353))/1+parseInt(r(346))/2*(parseInt(r(345))/3)+-parseInt(r(349))/4*(parseInt(r(352))/5)+parseInt(r(347))/6*(-parseInt(r(344))/7)+parseInt(r(350))/8+-parseInt(r(354))/9+parseInt(r(355))/10*(parseInt(r(342))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(m);class I extends t.Plugin{static get[g(343)](){return g(348)}static get[g(351)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=188]})(t,e)}function b(){var t=["474945ndKZKk","700230wSeqFO","8Hoxpfi","1160040sBRDwf","21056157vLwiZw","1733631jwahgb","128wbQluD","410221ITEVXQ","2368116RukfuJ"];return(b=function(){return t})()}!function(t,e){for(var r=v,n=t();;)try{if(796328===-parseInt(r(195))/1+parseInt(r(194))/2+parseInt(r(191))/3*(parseInt(r(188))/4)+parseInt(r(196))/5+parseInt(r(189))/6+parseInt(r(193))/7*(parseInt(r(192))/8)+-parseInt(r(190))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=n})();
5
+ */(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>g,ImportWordEditing:()=>u,ImportWordUI:()=>n});var t=r(782),e=r(311);class n extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor;t.ui.componentFactory.add("importWord",(()=>{const r=this._createButton(e.FileDialogButtonView),o=t.commands.get("importWord");return r.bind("isOn").to(o,"isBusy"),r.tooltip=!0,r})),t.ui.componentFactory.add("menuBar:importWord",(()=>this._createButton(e.MenuBarMenuListItemFileDialogButtonView)))}_createButton(t){const r=this.editor,o=r.locale.t,n=r.commands.get("importWord"),i=new t(r.locale),s=new e.SpinnerView;return i.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),i.set({label:o("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n'}),i.bind("isEnabled").to(n),s.bind("isVisible").to(n,"isBusy"),i.iconView.bind("isVisible").to(n,"isBusy",(t=>!t)),i.children.add(s),i.on("done",((t,e)=>{r.execute("importWord",e[0],{}),r.editing.view.focus()})),i}}var i=r(331),s=r(783),a=r(584);class c extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const o=new DataTransfer;o.setData("text/html",r.html);const n=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(n),t.editing.view.document.fire("clipboardInput",{dataTransfer:o})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),o={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(o).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,o=(0,a.first)(r.getSelectedBlocks());return!!o&&e.checkChild(o.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const o=r.getFirstPosition(),n=(0,a.first)(r.getSelectedBlocks());let i;i=n.is("element","paragraph")&&n.isEmpty?o:o.isAtStart?e.createPositionBefore(n):o.isAtEnd?e.createPositionAfter(n):t.split(o).position,this._importMarker=t.addMarker("importWord:"+(0,a.uid)(),{usingOperation:!1,affectsData:!1,range:new s.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,a.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,a.logError)("import-word-plugin-conversion-failed")}}const l=p;function d(){const t=["ImportWordEditing","_token","none","193406HHHtXJ","registerTokenUrl","cloudServices","962949gEmlNW","init","requires","importWord","config","6881dSiXGM","8070672PYwUjB","getToken","tokenUrl","pluginName","get","897938otpkQw","editor","inline","CloudServices","add","2370VIWwyJ","define","455204QkfIUf","plugins","495265NLXnPQ","commands","https://docx-converter.cke-cs.com/v2/convert/docx-html","token"];return(d=function(){return t})()}function p(t,e){const r=d();return(p=function(t,e){return r[t-=342]})(t,e)}!function(t,e){const r=p,o=t();for(;;)try{if(256857===parseInt(r(353))/1+-parseInt(r(367))/2+-parseInt(r(356))/3+parseInt(r(344))/4+parseInt(r(346))/5+parseInt(r(342))/6*(-parseInt(r(361))/7)+parseInt(r(362))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class u extends t.Plugin{static get[l(365)](){return l(350)}static get[l(358)](){const t=l;return[e.Notification,i.ClipboardPipeline,t(370)]}constructor(t){const e=l;super(t),this[e(351)]=null}async[l(357)](){const t=l,e=this[t(368)];e[t(360)][t(343)](t(359),{converterUrl:t(348),tokenUrl:(e[t(360)][t(366)](t(355))||{})[t(364)],formatting:{resets:t(352),defaults:t(352),styles:t(369)}}),e[t(347)][t(371)](t(359),new c(e));const{tokenUrl:r}=e[t(360)][t(366)](t(359));if(r){const{tokenUrl:o}=e[t(360)][t(366)](t(355))||{};this[t(351)]=r===o?e[t(345)][t(366)](t(370))[t(349)]:await e[t(345)][t(366)](t(370))[t(354)](r)}}[l(363)](){return this[l(351)]}}var h=m;function m(t,e){var r=f();return(m=function(t,e){return r[t-=169]})(t,e)}function f(){var t=["327432tBNsGy","pluginName","258934CxvoMl","1529464MZJzDA","4454224PTcXYX","14txefbf","2073555kDezuB","ImportWord","1DODBPP","15341823hTkPhE","143292yuDrkZ","requires"];return(f=function(){return t})()}!function(t,e){for(var r=m,o=t();;)try{if(323351===parseInt(r(178))/1*(parseInt(r(172))/2)+-parseInt(r(180))/3+-parseInt(r(173))/4+-parseInt(r(176))/5+parseInt(r(170))/6*(-parseInt(r(175))/7)+-parseInt(r(174))/8+parseInt(r(179))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class g extends t.Plugin{static get[h(171)](){return h(177)}static get[h(169)](){return[u,n]}}function I(t,e){var r=v();return(I=function(t,e){return r[t-=224]})(t,e)}function v(){var t=["4886820yAmHwV","761108Ndddkv","264177HnxgrN","6120415cGnERI","20188JARdBP","3102fitFIi","1088vhzgvD","3059008uoqrns","205960EncoLd"];return(v=function(){return t})()}!function(t,e){for(var r=I,o=t();;)try{if(942201===parseInt(r(229))/1+-parseInt(r(231))/2+parseInt(r(230))/3+parseInt(r(228))/4+parseInt(r(224))/5+parseInt(r(226))/6*(parseInt(r(225))/7)+parseInt(r(227))/8*(-parseInt(r(232))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(v)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-import-word",
3
- "version": "0.0.0-nightly-20240402.0",
3
+ "version": "0.0.0-nightly-20240404.0",
4
4
  "description": "Import from Word feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -30,7 +30,7 @@
30
30
  "type": "module",
31
31
  "main": "src/index.js",
32
32
  "dependencies": {
33
- "ckeditor5": "0.0.0-nightly-20240402.0"
33
+ "ckeditor5": "0.0.0-nightly-20240404.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (https://cksource.com/)",
package/src/importword.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0xe956(){var _0x44a8a6=['22YKqyRP','pluginName','1019025RhuYnR','3OXGkFc','1227274KBYsDI','12HdRmkX','ImportWord','3743188ijzCJX','11471280QSNquU','requires','5JbTRQA','567769NzAGQW','9568332sXQSdC','2005130xIRdRo'];_0xe956=function(){return _0x44a8a6;};return _0xe956();}function _0x37f9(_0x500f37,_0x4f8998){var _0xe95680=_0xe956();return _0x37f9=function(_0x37f93b,_0x40b787){_0x37f93b=_0x37f93b-0x156;var _0x3cfe08=_0xe95680[_0x37f93b];return _0x3cfe08;},_0x37f9(_0x500f37,_0x4f8998);}var _0x346db9=_0x37f9;(function(_0x1840e0,_0x27ecb0){var _0x9eefa8=_0x37f9,_0x4d4c1b=_0x1840e0();while(!![]){try{var _0x4c4fa4=parseInt(_0x9eefa8(0x161))/0x1+parseInt(_0x9eefa8(0x15a))/0x2*(parseInt(_0x9eefa8(0x159))/0x3)+-parseInt(_0x9eefa8(0x15d))/0x4*(parseInt(_0x9eefa8(0x160))/0x5)+parseInt(_0x9eefa8(0x15b))/0x6*(-parseInt(_0x9eefa8(0x158))/0x7)+parseInt(_0x9eefa8(0x15e))/0x8+-parseInt(_0x9eefa8(0x162))/0x9+parseInt(_0x9eefa8(0x163))/0xa*(parseInt(_0x9eefa8(0x156))/0xb);if(_0x4c4fa4===_0x27ecb0)break;else _0x4d4c1b['push'](_0x4d4c1b['shift']());}catch(_0x3d302a){_0x4d4c1b['push'](_0x4d4c1b['shift']());}}}(_0xe956,0xb14e7));import{Plugin as _0x2f22f5}from'ckeditor5/src/core.js';import _0x3139d7 from'./importwordui.js';import _0x15b778 from'./importwordediting.js';export default class i extends _0x2f22f5{static get[_0x346db9(0x157)](){var _0x5644aa=_0x346db9;return _0x5644aa(0x15c);}static get[_0x346db9(0x15f)](){return[_0x15b778,_0x3139d7];}}
23
+ var _0x25aa65=_0x40fd;(function(_0x1eed88,_0x196bea){var _0x23a822=_0x40fd,_0x4c8782=_0x1eed88();while(!![]){try{var _0x58d145=parseInt(_0x23a822(0xb2))/0x1*(parseInt(_0x23a822(0xac))/0x2)+-parseInt(_0x23a822(0xb4))/0x3+-parseInt(_0x23a822(0xad))/0x4+-parseInt(_0x23a822(0xb0))/0x5+parseInt(_0x23a822(0xaa))/0x6*(-parseInt(_0x23a822(0xaf))/0x7)+-parseInt(_0x23a822(0xae))/0x8+parseInt(_0x23a822(0xb3))/0x9;if(_0x58d145===_0x196bea)break;else _0x4c8782['push'](_0x4c8782['shift']());}catch(_0x561983){_0x4c8782['push'](_0x4c8782['shift']());}}}(_0x363f,0x4ef17));function _0x40fd(_0x3409d0,_0x449d1b){var _0x363f6c=_0x363f();return _0x40fd=function(_0x40fda9,_0x2794d0){_0x40fda9=_0x40fda9-0xa9;var _0x3bd035=_0x363f6c[_0x40fda9];return _0x3bd035;},_0x40fd(_0x3409d0,_0x449d1b);}import{Plugin as _0x143164}from'ckeditor5/src/core.js';function _0x363f(){var _0xba8e6c=['327432tBNsGy','pluginName','258934CxvoMl','1529464MZJzDA','4454224PTcXYX','14txefbf','2073555kDezuB','ImportWord','1DODBPP','15341823hTkPhE','143292yuDrkZ','requires'];_0x363f=function(){return _0xba8e6c;};return _0x363f();}import _0xc2168c from'./importwordui.js';import _0x354e3d from'./importwordediting.js';export default class i extends _0x143164{static get[_0x25aa65(0xab)](){var _0x2350eb=_0x25aa65;return _0x2350eb(0xb1);}static get[_0x25aa65(0xa9)](){return[_0x354e3d,_0xc2168c];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x4513f1}from'ckeditor5/src/core.js';import{Range as _0x516ccb}from'ckeditor5/src/engine.js';import{logWarning as _0x3c2beb,logError as _0x28a97a,first as _0x4eda3e,uid as _0x2f99f4}from'ckeditor5/src/utils.js';export default class d extends _0x4513f1{constructor(_0x537346){super(_0x537346),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x3a2ffb,_0x1a2ac3)=>{const _0x1a0eb4=new DataTransfer();_0x1a0eb4['setData']('text/html',_0x1a2ac3['html']);const _0x390808=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x3aa6c5=>{this['_importMarker']['stopListening'](),_0x3aa6c5['setSelection'](_0x390808),_0x537346['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x1a0eb4});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3f7d55,_0x5a7410={}){if(this['isBusy'])return Promise['resolve']();const _0x53673a=this['editor']['config']['get']('importWord'),_0x2d8b86={'url':_0x53673a['converterUrl'],'file':_0x3f7d55,'serviceConfig':{..._0x5a7410,'formatting':_0x53673a['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x2d8b86)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x31b338=this['editor']['model'],_0x5aa9f6=_0x31b338['schema'],_0x226aea=_0x31b338['document']['selection'],_0x1594d5=_0x4eda3e(_0x226aea['getSelectedBlocks']());return!!_0x1594d5&&_0x5aa9f6['checkChild'](_0x1594d5['parent'],'paragraph');}['_prepareForImport'](){const _0x362973=this['editor'],_0x49d637=_0x362973['model'],_0x5945b3=_0x49d637['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x362973['model']['createBatch']({'isUndoable':!0x0}),_0x49d637['enqueueChange'](this['_undoStepBatch'],_0x21cd38=>{_0x5945b3['isCollapsed']||_0x49d637['deleteContent'](_0x5945b3,{'leaveUnmerged':!0x0});const _0x5ca673=_0x5945b3['getFirstPosition'](),_0x10c799=_0x4eda3e(_0x5945b3['getSelectedBlocks']());let _0x5302b4;_0x5302b4=_0x10c799['is']('element','paragraph')&&_0x10c799['isEmpty']?_0x5ca673:_0x5ca673['isAtStart']?_0x49d637['createPositionBefore'](_0x10c799):_0x5ca673['isAtEnd']?_0x49d637['createPositionAfter'](_0x10c799):_0x21cd38['split'](_0x5ca673)['position'],this['_importMarker']=_0x21cd38['addMarker']('importWord:'+_0x2f99f4(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x516ccb(_0x5302b4)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x10ad2a=this['editor']['model'];_0x10ad2a['markers']['has'](this['_importMarker'])&&_0x10ad2a['enqueueChange'](this['_undoStepBatch'],_0x271e92=>{_0x271e92['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x48ec31,file:_0x378693,serviceConfig:_0x8f5d1d}){const _0x2ac96b=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x4b0eee=new FormData();_0x4b0eee['set']('config',JSON['stringify'](_0x8f5d1d)),_0x4b0eee['set']('file',_0x378693);const _0x134750={'method':'POST','headers':{},'body':_0x4b0eee,'signal':this['_abortController']['signal']};return _0x2ac96b&&(_0x134750['headers']['Authorization']=_0x2ac96b['value']),fetch(_0x48ec31,_0x134750);}['_handleImportResponse'](_0x3770f6){return _0x3770f6['ok']?_0x3770f6['json']()['then'](_0x315551=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x315551);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x3c2beb('import-word-plugin-import-cancelled');const _0x573cee=this['editor'],_0x402b8d=(0x0,_0x573cee['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x573cee['plugins']['get']('Notification')['showWarning'](_0x402b8d),_0x28a97a('import-word-plugin-conversion-failed');}}
23
+ import{Command as _0x2203e6}from'ckeditor5/src/core.js';import{Range as _0x39215b}from'ckeditor5/src/engine.js';import{logWarning as _0x1cf89a,logError as _0x306718,first as _0x23bc74,uid as _0xd0bf86}from'ckeditor5/src/utils.js';export default class d extends _0x2203e6{constructor(_0x42dae3){super(_0x42dae3),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x3b37ae,_0x5eb18c)=>{const _0x481fc1=new DataTransfer();_0x481fc1['setData']('text/html',_0x5eb18c['html']);const _0xe81a7d=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x4f9c8e=>{this['_importMarker']['stopListening'](),_0x4f9c8e['setSelection'](_0xe81a7d),_0x42dae3['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x481fc1});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4f8f93,_0x422d38={}){if(this['isBusy'])return Promise['resolve']();const _0x3e36db=this['editor']['config']['get']('importWord'),_0x3f13b6={'url':_0x3e36db['converterUrl'],'file':_0x4f8f93,'serviceConfig':{..._0x422d38,'formatting':_0x3e36db['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x3f13b6)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x4732e3=this['editor']['model'],_0x16d912=_0x4732e3['schema'],_0x32bfc0=_0x4732e3['document']['selection'],_0x2cd146=_0x23bc74(_0x32bfc0['getSelectedBlocks']());return!!_0x2cd146&&_0x16d912['checkChild'](_0x2cd146['parent'],'paragraph');}['_prepareForImport'](){const _0x842b0=this['editor'],_0x35528a=_0x842b0['model'],_0xf1ed2d=_0x35528a['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x842b0['model']['createBatch']({'isUndoable':!0x0}),_0x35528a['enqueueChange'](this['_undoStepBatch'],_0x1ee6df=>{_0xf1ed2d['isCollapsed']||_0x35528a['deleteContent'](_0xf1ed2d,{'leaveUnmerged':!0x0});const _0x6f4eca=_0xf1ed2d['getFirstPosition'](),_0x2a796f=_0x23bc74(_0xf1ed2d['getSelectedBlocks']());let _0x1d75ae;_0x1d75ae=_0x2a796f['is']('element','paragraph')&&_0x2a796f['isEmpty']?_0x6f4eca:_0x6f4eca['isAtStart']?_0x35528a['createPositionBefore'](_0x2a796f):_0x6f4eca['isAtEnd']?_0x35528a['createPositionAfter'](_0x2a796f):_0x1ee6df['split'](_0x6f4eca)['position'],this['_importMarker']=_0x1ee6df['addMarker']('importWord:'+_0xd0bf86(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x39215b(_0x1d75ae)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x48491e=this['editor']['model'];_0x48491e['markers']['has'](this['_importMarker'])&&_0x48491e['enqueueChange'](this['_undoStepBatch'],_0xed5077=>{_0xed5077['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x32730b,file:_0x33e0d5,serviceConfig:_0x2a9d8a}){const _0x255798=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x38580e=new FormData();_0x38580e['set']('config',JSON['stringify'](_0x2a9d8a)),_0x38580e['set']('file',_0x33e0d5);const _0x19c9fe={'method':'POST','headers':{},'body':_0x38580e,'signal':this['_abortController']['signal']};return _0x255798&&(_0x19c9fe['headers']['Authorization']=_0x255798['value']),fetch(_0x32730b,_0x19c9fe);}['_handleImportResponse'](_0x337300){return _0x337300['ok']?_0x337300['json']()['then'](_0x21cf1d=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x21cf1d);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x1cf89a('import-word-plugin-import-cancelled');const _0x442cae=this['editor'],_0x59e7a7=(0x0,_0x442cae['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x442cae['plugins']['get']('Notification')['showWarning'](_0x59e7a7),_0x306718('import-word-plugin-conversion-failed');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x70fe7d=_0x234c;(function(_0x2a2c9f,_0x5c5baa){const _0x4b9eab=_0x234c,_0x20ec80=_0x2a2c9f();while(!![]){try{const _0x6aceba=parseInt(_0x4b9eab(0xff))/0x1*(-parseInt(_0x4b9eab(0x105))/0x2)+parseInt(_0x4b9eab(0xf2))/0x3+-parseInt(_0x4b9eab(0x106))/0x4+-parseInt(_0x4b9eab(0xf8))/0x5*(parseInt(_0x4b9eab(0x110))/0x6)+-parseInt(_0x4b9eab(0x101))/0x7*(parseInt(_0x4b9eab(0x112))/0x8)+parseInt(_0x4b9eab(0x109))/0x9*(parseInt(_0x4b9eab(0xfe))/0xa)+parseInt(_0x4b9eab(0xf3))/0xb;if(_0x6aceba===_0x5c5baa)break;else _0x20ec80['push'](_0x20ec80['shift']());}catch(_0x4094df){_0x20ec80['push'](_0x20ec80['shift']());}}}(_0x1103,0xe7aed));function _0x234c(_0x143766,_0x2129f5){const _0x1103bc=_0x1103();return _0x234c=function(_0x234c7c,_0xab21ab){_0x234c7c=_0x234c7c-0xf2;let _0x2681cb=_0x1103bc[_0x234c7c];return _0x2681cb;},_0x234c(_0x143766,_0x2129f5);}function _0x1103(){const _0x3b4184=['https://docx-converter.cke-cs.com/v2/convert/docx-html','317442Ygehaq','301368IXCkWG','plugins','ImportWordEditing','306BMPJqh','CloudServices','requires','pluginName','define','token','add','42606mVbsDs','registerTokenUrl','23248nBihYT','539514NCCKhR','32694398mFTFxD','init','commands','editor','getToken','1240KbsmPY','tokenUrl','_token','importWord','get','cloudServices','473630HSSGIp','7uqpSff','none','2086hOgSog','inline','config'];_0x1103=function(){return _0x3b4184;};return _0x1103();}import{Plugin as _0x508423}from'ckeditor5/src/core.js';import{Notification as _0x268b22}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x2fbfce}from'ckeditor5/src/clipboard.js';import _0x5549fd from'./importwordcommand.js';export default class e extends _0x508423{static get[_0x70fe7d(0x10c)](){const _0x25ead4=_0x70fe7d;return _0x25ead4(0x108);}static get[_0x70fe7d(0x10b)](){const _0x31922f=_0x70fe7d;return[_0x268b22,_0x2fbfce,_0x31922f(0x10a)];}constructor(_0x5483b9){const _0x3d8970=_0x70fe7d;super(_0x5483b9),this[_0x3d8970(0xfa)]=null;}async[_0x70fe7d(0xf4)](){const _0x2b5ad8=_0x70fe7d,_0x5a222e=this[_0x2b5ad8(0xf6)];_0x5a222e[_0x2b5ad8(0x103)][_0x2b5ad8(0x10d)](_0x2b5ad8(0xfb),{'converterUrl':_0x2b5ad8(0x104),'tokenUrl':(_0x5a222e[_0x2b5ad8(0x103)][_0x2b5ad8(0xfc)](_0x2b5ad8(0xfd))||{})[_0x2b5ad8(0xf9)],'formatting':{'resets':_0x2b5ad8(0x100),'defaults':_0x2b5ad8(0x100),'styles':_0x2b5ad8(0x102)}}),_0x5a222e[_0x2b5ad8(0xf5)][_0x2b5ad8(0x10f)](_0x2b5ad8(0xfb),new _0x5549fd(_0x5a222e));const {tokenUrl:_0x54cf60}=_0x5a222e[_0x2b5ad8(0x103)][_0x2b5ad8(0xfc)](_0x2b5ad8(0xfb));if(_0x54cf60){const {tokenUrl:_0x2d6d36}=_0x5a222e[_0x2b5ad8(0x103)][_0x2b5ad8(0xfc)](_0x2b5ad8(0xfd))||{};this[_0x2b5ad8(0xfa)]=_0x54cf60===_0x2d6d36?_0x5a222e[_0x2b5ad8(0x107)][_0x2b5ad8(0xfc)](_0x2b5ad8(0x10a))[_0x2b5ad8(0x10e)]:await _0x5a222e[_0x2b5ad8(0x107)][_0x2b5ad8(0xfc)](_0x2b5ad8(0x10a))[_0x2b5ad8(0x111)](_0x54cf60);}}[_0x70fe7d(0xf7)](){const _0x2ac9c2=_0x70fe7d;return this[_0x2ac9c2(0xfa)];}}
23
+ const _0x5705e0=_0x98f2;function _0x2c87(){const _0xa0cf95=['ImportWordEditing','_token','none','193406HHHtXJ','registerTokenUrl','cloudServices','962949gEmlNW','init','requires','importWord','config','6881dSiXGM','8070672PYwUjB','getToken','tokenUrl','pluginName','get','897938otpkQw','editor','inline','CloudServices','add','2370VIWwyJ','define','455204QkfIUf','plugins','495265NLXnPQ','commands','https://docx-converter.cke-cs.com/v2/convert/docx-html','token'];_0x2c87=function(){return _0xa0cf95;};return _0x2c87();}function _0x98f2(_0x10f517,_0x245264){const _0x2c876f=_0x2c87();return _0x98f2=function(_0x98f2cf,_0x2a65ed){_0x98f2cf=_0x98f2cf-0x156;let _0x5dd71f=_0x2c876f[_0x98f2cf];return _0x5dd71f;},_0x98f2(_0x10f517,_0x245264);}(function(_0x538b1a,_0x74a1a5){const _0x42600f=_0x98f2,_0x2728b4=_0x538b1a();while(!![]){try{const _0x21fdc3=parseInt(_0x42600f(0x161))/0x1+-parseInt(_0x42600f(0x16f))/0x2+-parseInt(_0x42600f(0x164))/0x3+parseInt(_0x42600f(0x158))/0x4+parseInt(_0x42600f(0x15a))/0x5+parseInt(_0x42600f(0x156))/0x6*(-parseInt(_0x42600f(0x169))/0x7)+parseInt(_0x42600f(0x16a))/0x8;if(_0x21fdc3===_0x74a1a5)break;else _0x2728b4['push'](_0x2728b4['shift']());}catch(_0xf3846b){_0x2728b4['push'](_0x2728b4['shift']());}}}(_0x2c87,0x3eb59));import{Plugin as _0x46e4a5}from'ckeditor5/src/core.js';import{Notification as _0x3c3e0c}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x505007}from'ckeditor5/src/clipboard.js';import _0x3aa56b from'./importwordcommand.js';export default class e extends _0x46e4a5{static get[_0x5705e0(0x16d)](){const _0x3c62fc=_0x5705e0;return _0x3c62fc(0x15e);}static get[_0x5705e0(0x166)](){const _0x4120e1=_0x5705e0;return[_0x3c3e0c,_0x505007,_0x4120e1(0x172)];}constructor(_0xa77d80){const _0x2aa3ef=_0x5705e0;super(_0xa77d80),this[_0x2aa3ef(0x15f)]=null;}async[_0x5705e0(0x165)](){const _0x56d978=_0x5705e0,_0x17c1a2=this[_0x56d978(0x170)];_0x17c1a2[_0x56d978(0x168)][_0x56d978(0x157)](_0x56d978(0x167),{'converterUrl':_0x56d978(0x15c),'tokenUrl':(_0x17c1a2[_0x56d978(0x168)][_0x56d978(0x16e)](_0x56d978(0x163))||{})[_0x56d978(0x16c)],'formatting':{'resets':_0x56d978(0x160),'defaults':_0x56d978(0x160),'styles':_0x56d978(0x171)}}),_0x17c1a2[_0x56d978(0x15b)][_0x56d978(0x173)](_0x56d978(0x167),new _0x3aa56b(_0x17c1a2));const {tokenUrl:_0x33619e}=_0x17c1a2[_0x56d978(0x168)][_0x56d978(0x16e)](_0x56d978(0x167));if(_0x33619e){const {tokenUrl:_0x4684cf}=_0x17c1a2[_0x56d978(0x168)][_0x56d978(0x16e)](_0x56d978(0x163))||{};this[_0x56d978(0x15f)]=_0x33619e===_0x4684cf?_0x17c1a2[_0x56d978(0x159)][_0x56d978(0x16e)](_0x56d978(0x172))[_0x56d978(0x15d)]:await _0x17c1a2[_0x56d978(0x159)][_0x56d978(0x16e)](_0x56d978(0x172))[_0x56d978(0x162)](_0x33619e);}}[_0x5705e0(0x16b)](){const _0x1ba513=_0x5705e0;return this[_0x1ba513(0x15f)];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x5a77d8}from'ckeditor5/src/core.js';import{SpinnerView as _0x196fd2}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x5dc23a}from'ckeditor5/src/upload.js';import _0x20056d from'../theme/icons/importword.svg';export default class o extends _0x5a77d8{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x26320b=this['editor'],t=_0x26320b['t'];_0x26320b['ui']['componentFactory']['add']('importWord',_0x398f8e=>{const _0x38eaf4=_0x26320b['commands']['get']('importWord'),_0x4ab0da=new _0x5dc23a(_0x398f8e),_0x349462=new _0x196fd2();return _0x4ab0da['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x4ab0da['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x20056d,'tooltip':!0x0}),_0x4ab0da['buttonView']['bind']('isOn','isEnabled')['to'](_0x38eaf4,'isBusy','isEnabled'),_0x349462['bind']('isVisible')['to'](_0x38eaf4,'isBusy'),_0x4ab0da['buttonView']['iconView']['bind']('isVisible')['to'](_0x38eaf4,'isBusy',_0x2d7221=>!_0x2d7221),_0x4ab0da['buttonView']['children']['add'](_0x349462),_0x4ab0da['on']('done',(_0x322205,_0x4a6c7e)=>{_0x26320b['execute']('importWord',_0x4a6c7e[0x0],{}),_0x26320b['editing']['view']['focus']();}),_0x4ab0da;});}}
23
+ import{Plugin as _0x1e690a}from'ckeditor5/src/core.js';import{SpinnerView as _0x3f3eab,FileDialogButtonView as _0x6573c0,MenuBarMenuListItemFileDialogButtonView as _0x4d17c4}from'ckeditor5/src/ui.js';import _0x51b736 from'../theme/icons/importword.svg';export default class o extends _0x1e690a{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x15b1ff=this['editor'];_0x15b1ff['ui']['componentFactory']['add']('importWord',()=>{const _0x22d889=this['_createButton'](_0x6573c0),_0x2ee754=_0x15b1ff['commands']['get']('importWord');return _0x22d889['bind']('isOn')['to'](_0x2ee754,'isBusy'),_0x22d889['tooltip']=!0x0,_0x22d889;}),_0x15b1ff['ui']['componentFactory']['add']('menuBar:importWord',()=>this['_createButton'](_0x4d17c4));}['_createButton'](_0x3b970c){const _0x5e903b=this['editor'],t=_0x5e903b['locale']['t'],_0x397e5e=_0x5e903b['commands']['get']('importWord'),_0x35b007=new _0x3b970c(_0x5e903b['locale']),_0x187721=new _0x3f3eab();return _0x35b007['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x35b007['set']({'label':t('Import\x20from\x20Word'),'icon':_0x51b736}),_0x35b007['bind']('isEnabled')['to'](_0x397e5e),_0x187721['bind']('isVisible')['to'](_0x397e5e,'isBusy'),_0x35b007['iconView']['bind']('isVisible')['to'](_0x397e5e,'isBusy',_0x2f54e7=>!_0x2f54e7),_0x35b007['children']['add'](_0x187721),_0x35b007['on']('done',(_0x557a9c,_0x4e75cd)=>{_0x5e903b['execute']('importWord',_0x4e75cd[0x0],{}),_0x5e903b['editing']['view']['focus']();}),_0x35b007;}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x38d2(_0x3898be,_0x46a243){var _0x248e9f=_0x248e();return _0x38d2=function(_0x38d276,_0x11938d){_0x38d276=_0x38d276-0xbc;var _0x42ecfe=_0x248e9f[_0x38d276];return _0x42ecfe;},_0x38d2(_0x3898be,_0x46a243);}(function(_0x3199c9,_0x30eb97){var _0x11f2ae=_0x38d2,_0x1028df=_0x3199c9();while(!![]){try{var _0x1a3477=-parseInt(_0x11f2ae(0xc3))/0x1+parseInt(_0x11f2ae(0xc2))/0x2+parseInt(_0x11f2ae(0xbf))/0x3*(parseInt(_0x11f2ae(0xbc))/0x4)+parseInt(_0x11f2ae(0xc4))/0x5+parseInt(_0x11f2ae(0xbd))/0x6+parseInt(_0x11f2ae(0xc1))/0x7*(parseInt(_0x11f2ae(0xc0))/0x8)+-parseInt(_0x11f2ae(0xbe))/0x9;if(_0x1a3477===_0x30eb97)break;else _0x1028df['push'](_0x1028df['shift']());}catch(_0xbaad49){_0x1028df['push'](_0x1028df['shift']());}}}(_0x248e,0xc26a8));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';function _0x248e(){var _0xe3cd21=['474945ndKZKk','700230wSeqFO','8Hoxpfi','1160040sBRDwf','21056157vLwiZw','1733631jwahgb','128wbQluD','410221ITEVXQ','2368116RukfuJ'];_0x248e=function(){return _0xe3cd21;};return _0x248e();}
23
+ (function(_0x2e4f7b,_0x2ef246){var _0x24032e=_0x3aaf,_0x97cfe3=_0x2e4f7b();while(!![]){try{var _0x427326=parseInt(_0x24032e(0xe5))/0x1+-parseInt(_0x24032e(0xe7))/0x2+parseInt(_0x24032e(0xe6))/0x3+parseInt(_0x24032e(0xe4))/0x4+parseInt(_0x24032e(0xe0))/0x5+parseInt(_0x24032e(0xe2))/0x6*(parseInt(_0x24032e(0xe1))/0x7)+parseInt(_0x24032e(0xe3))/0x8*(-parseInt(_0x24032e(0xe8))/0x9);if(_0x427326===_0x2ef246)break;else _0x97cfe3['push'](_0x97cfe3['shift']());}catch(_0x2a01e3){_0x97cfe3['push'](_0x97cfe3['shift']());}}}(_0x3f72,0xe6079));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';function _0x3aaf(_0x1e4097,_0x2afe4c){var _0x3f7280=_0x3f72();return _0x3aaf=function(_0x3aaff9,_0x279deb){_0x3aaff9=_0x3aaff9-0xe0;var _0xefcd46=_0x3f7280[_0x3aaff9];return _0xefcd46;},_0x3aaf(_0x1e4097,_0x2afe4c);}function _0x3f72(){var _0x573281=['4886820yAmHwV','761108Ndddkv','264177HnxgrN','6120415cGnERI','20188JARdBP','3102fitFIi','1088vhzgvD','3059008uoqrns','205960EncoLd'];_0x3f72=function(){return _0x573281;};return _0x3f72();}export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';